refactor: improve invoice editor UX and fix visual issues

- Remove clock icons and hour text from calendar month view, show only activity bars
- Fix calendar week view mobile layout (2-column grid instead of vertical stack)
- Update invoice form skeleton to match actual layout structure
- Add client-side validation for empty invoice item descriptions with auto-scroll to error
- Fix hourly rate defaulting logic with proper type guards
- Update invoice details skeleton to match page structure with PageHeader
- Fix hydration error in sidebar (div inside button -> span)
- Improve dashboard chart color consistency (draft status now matches monthly metrics)
- Fix mobile header layout to prevent text squishing (vertical stack on mobile)
- Add IDs to invoice line items for scroll-into-view functionality
This commit is contained in:
2025-12-11 19:57:54 -05:00
parent 39fdf16280
commit 1a3c2e08ce
27 changed files with 1685 additions and 2024 deletions

View File

@@ -1,5 +1,6 @@
import type { Config } from "tailwindcss";
import animate from "tailwindcss-animate";
import defaultTheme from "tailwindcss/defaultTheme";
export default {
darkMode: "class",
@@ -14,71 +15,57 @@ export default {
xs: "475px",
},
fontFamily: {
sans: ["var(--font-geist-sans)", "Frutiger", "sans-serif"],
mono: ["var(--font-geist-mono)", "monospace"],
serif: ["var(--font-serif)", "serif"],
sans: ["var(--font-sans)", ...defaultTheme.fontFamily.sans],
heading: ["var(--font-heading)", ...defaultTheme.fontFamily.sans],
mono: ["var(--font-geist-mono)", ...defaultTheme.fontFamily.mono],
},
colors: {
background: "var(--background)",
foreground: "var(--foreground)",
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",
card: {
DEFAULT: "var(--card)",
foreground: "var(--card-foreground)",
DEFAULT: "hsl(var(--card))",
foreground: "hsl(var(--card-foreground))",
},
popover: {
DEFAULT: "var(--popover)",
foreground: "var(--popover-foreground)",
DEFAULT: "hsl(var(--popover))",
foreground: "hsl(var(--popover-foreground))",
},
primary: {
DEFAULT: "var(--primary)",
foreground: "var(--primary-foreground)",
DEFAULT: "hsl(var(--primary))",
foreground: "hsl(var(--primary-foreground))",
},
secondary: {
DEFAULT: "var(--secondary)",
foreground: "var(--secondary-foreground)",
DEFAULT: "hsl(var(--secondary))",
foreground: "hsl(var(--secondary-foreground))",
},
muted: {
DEFAULT: "var(--muted)",
foreground: "var(--muted-foreground)",
DEFAULT: "hsl(var(--muted))",
foreground: "hsl(var(--muted-foreground))",
},
accent: {
DEFAULT: "var(--accent)",
foreground: "var(--accent-foreground)",
DEFAULT: "hsl(var(--accent))",
foreground: "hsl(var(--accent-foreground))",
},
destructive: {
DEFAULT: "var(--destructive)",
foreground: "var(--destructive-foreground)",
DEFAULT: "hsl(var(--destructive))",
foreground: "hsl(var(--destructive-foreground))",
},
success: {
DEFAULT: "var(--success)",
foreground: "var(--success-foreground)",
DEFAULT: "hsl(var(--success))",
foreground: "hsl(var(--success-foreground))",
},
warning: {
DEFAULT: "var(--warning)",
foreground: "var(--warning-foreground)",
DEFAULT: "hsl(var(--warning))",
foreground: "hsl(var(--warning-foreground))",
},
border: "var(--border)",
input: "var(--input)",
ring: "var(--ring)",
sidebar: {
DEFAULT: "var(--sidebar)",
foreground: "var(--sidebar-foreground)",
primary: "var(--sidebar-primary)",
"primary-foreground": "var(--sidebar-primary-foreground)",
accent: "var(--sidebar-accent)",
"accent-foreground": "var(--sidebar-accent-foreground)",
border: "var(--sidebar-border)",
ring: "var(--sidebar-ring)",
},
navbar: "var(--navbar)",
"navbar-foreground": "var(--navbar-foreground)",
"navbar-border": "var(--navbar-border)",
border: "hsl(var(--border))",
input: "hsl(var(--input))",
ring: "hsl(var(--ring))",
},
animation: {
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
"subtle-spin": "spin-slow 20s linear infinite",
"subtle-wave": "wave 15s ease-in-out infinite alternate",
blob: "blob 7s infinite",
},
keyframes: {
"accordion-down": {
@@ -89,15 +76,11 @@ export default {
from: { height: "var(--radix-accordion-content-height)" },
to: { height: "0" },
},
"spin-slow": {
from: { transform: "rotate(0deg)" },
to: { transform: "rotate(360deg)" },
},
wave: {
"0%": { transform: "translate(0, 0) scale(1)" },
blob: {
"0%": { transform: "translate(0px, 0px) scale(1)" },
"33%": { transform: "translate(30px, -50px) scale(1.1)" },
"66%": { transform: "translate(-20px, 20px) scale(0.9)" },
"100%": { transform: "translate(20px, -30px) scale(1.05)" },
"100%": { transform: "translate(0px, 0px) scale(1)" },
},
},
borderRadius: {