Adds a search box (matches name, location, and labels) and a Location/Label grouping toggle to Inventory, and fixes the unstyled Suggestions page. (Renumbered from 0.19.0 → 0.22.0: Pantry work took 0.19–0.21 in parallel.) Hardening from a max-effort code review of the new grid: - Contained items resolve to their container's effective location, so search finds them and the flat view groups them under the right place (not "No location"). - Location/label groups key on id, not name, so same-named places/labels stay separate; synthetic bucket renamed "No labels" to avoid colliding with a real label; fixed duplicate React keys and two empty-state regressions. - deleteItem now reparents a deleted container's contents into its own spot (its place or parent item) instead of orphaning them; the grid also treats any still-orphaned child as top-level so nothing silently vanishes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
108 lines
3.5 KiB
TypeScript
108 lines
3.5 KiB
TypeScript
import type { Config } from "tailwindcss";
|
|
|
|
const config: Config = {
|
|
darkMode: ["class"],
|
|
content: [
|
|
"./pages/**/*.{ts,tsx}",
|
|
"./components/**/*.{ts,tsx}",
|
|
"./app/**/*.{ts,tsx}",
|
|
"./src/**/*.{ts,tsx}",
|
|
// The shared @otm/account-panel ships its own Tailwind classes (Suggestions,
|
|
// self-update, etc.). Scan its source so those utilities actually compile —
|
|
// otherwise the panel renders nearly unstyled (e.g. a bg-less Send button).
|
|
"./node_modules/@otm/account-panel/src/**/*.{ts,tsx}",
|
|
],
|
|
theme: {
|
|
container: {
|
|
center: true,
|
|
padding: "2rem",
|
|
screens: { "2xl": "1400px" },
|
|
},
|
|
extend: {
|
|
colors: {
|
|
border: "hsl(var(--border))",
|
|
input: "hsl(var(--input))",
|
|
ring: "hsl(var(--ring))",
|
|
background: "hsl(var(--background))",
|
|
foreground: "hsl(var(--foreground))",
|
|
primary: {
|
|
DEFAULT: "hsl(var(--primary))",
|
|
foreground: "hsl(var(--primary-foreground))",
|
|
},
|
|
secondary: {
|
|
DEFAULT: "hsl(var(--secondary))",
|
|
foreground: "hsl(var(--secondary-foreground))",
|
|
},
|
|
destructive: {
|
|
DEFAULT: "hsl(var(--destructive))",
|
|
foreground: "hsl(var(--destructive-foreground))",
|
|
},
|
|
muted: {
|
|
DEFAULT: "hsl(var(--muted))",
|
|
foreground: "hsl(var(--muted-foreground))",
|
|
},
|
|
accent: {
|
|
DEFAULT: "hsl(var(--accent))",
|
|
foreground: "hsl(var(--accent-foreground))",
|
|
},
|
|
popover: {
|
|
DEFAULT: "hsl(var(--popover))",
|
|
foreground: "hsl(var(--popover-foreground))",
|
|
},
|
|
card: {
|
|
DEFAULT: "hsl(var(--card))",
|
|
foreground: "hsl(var(--card-foreground))",
|
|
},
|
|
// Brand palette — forest / earth / sky
|
|
soil: "hsl(var(--soil))",
|
|
"soil-muted": "hsl(var(--soil-muted))",
|
|
leaf: "hsl(var(--leaf))",
|
|
"leaf-soft": "hsl(var(--leaf-soft))",
|
|
canopy: {
|
|
DEFAULT: "hsl(var(--canopy))",
|
|
foreground: "hsl(var(--canopy-foreground))",
|
|
accent: "hsl(var(--canopy-accent))",
|
|
"accent-foreground": "hsl(var(--canopy-accent-foreground))",
|
|
border: "hsl(var(--canopy-border))",
|
|
},
|
|
dew: "hsl(var(--dew))",
|
|
ember: "hsl(var(--ember))",
|
|
},
|
|
fontFamily: {
|
|
display: ["var(--font-display)", "ui-serif", "Georgia", "serif"],
|
|
sans: ["var(--font-sans)", "ui-sans-serif", "system-ui", "sans-serif"],
|
|
},
|
|
borderRadius: {
|
|
lg: "var(--radius)",
|
|
md: "calc(var(--radius) - 2px)",
|
|
sm: "calc(var(--radius) - 4px)",
|
|
},
|
|
keyframes: {
|
|
"accordion-down": {
|
|
from: { height: "0" },
|
|
to: { height: "var(--radix-accordion-content-height)" },
|
|
},
|
|
"accordion-up": {
|
|
from: { height: "var(--radix-accordion-content-height)" },
|
|
to: { height: "0" },
|
|
},
|
|
wiggle: {
|
|
"0%, 100%": { transform: "translateX(0)" },
|
|
"25%": { transform: "translateX(-5px)" },
|
|
"50%": { transform: "translateX(5px)" },
|
|
"75%": { transform: "translateX(-3px)" },
|
|
},
|
|
},
|
|
animation: {
|
|
"accordion-down": "accordion-down 0.2s ease-out",
|
|
"accordion-up": "accordion-up 0.2s ease-out",
|
|
wiggle: "wiggle 0.4s ease-in-out",
|
|
},
|
|
},
|
|
},
|
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
plugins: [require("tailwindcss-animate")],
|
|
};
|
|
|
|
export default config;
|