diff --git a/packages/ui/src/globals.css b/packages/ui/src/globals.css index 30eea43..44bd937 100644 --- a/packages/ui/src/globals.css +++ b/packages/ui/src/globals.css @@ -1,17 +1,125 @@ @import 'tailwindcss'; - @source "../src"; +/* ========================================= + BASE STYLES & RESETS + Ensures consistent typography and form styling + ========================================= */ +@layer base { + body { + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; + background-color: var(--color-gray-50); + color: var(--color-gray-800); + @apply text-base; /* Set global base font to 13px */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + + /* Form elements inherit base font styles */ + input, + textarea, + select, + button { + font-family: inherit; + font-size: inherit; + color: inherit; + } + + /* Table headers: consistent style with enterprise Fiori design */ + th { + @apply text-gray-500 font-medium text-left border-b border-gray-200 py-2 px-3; + } +} + @theme { - --color-brand-50: #f5f3fd; /* sangat terang, hampir lavender */ + /* ========================================= + 1. BRAND COLORS (Company Identity) + ========================================= */ + --color-brand-50: #f5f3fd; --color-brand-100: #e6dbfb; --color-brand-200: #d0b6f8; --color-brand-300: #b78ff5; --color-brand-400: #9f64f1; - --color-brand-500: #7d39ed; /* warna utama purple */ + --color-brand-500: #7d39ed; /* Primary color for main ERP actions */ --color-brand-600: #652ed9; --color-brand-700: #4a23a5; --color-brand-800: #321a7a; --color-brand-900: #1b0f4a; - --color-brand-950: #0d0726; /* paling gelap */ + --color-brand-950: #0d0726; + + /* ========================================= + 2. ENTERPRISE NEUTRALS (SAP Fiori Inspired) + Override default Tailwind gray palette to match enterprise style + ========================================= */ + --color-gray-50: #f5f6f7; /* Canvas or background of pages */ + --color-gray-100: #eceff1; /* Shell/Header background */ + --color-gray-200: #e0e3e7; /* Subtle borders for tables/separators */ + --color-gray-300: #d1d5db; /* Strong borders, e.g., input fields */ + --color-gray-400: #9ca3af; /* Disabled elements */ + --color-gray-500: #6b7280; /* Metadata, labels */ + --color-gray-600: #4b5563; /* Secondary body text */ + --color-gray-700: #374151; /* Primary body text */ + --color-gray-800: #1f2937; /* Section headers */ + --color-gray-900: #111827; /* Page titles */ + + /* ========================================= + 3. SEMANTIC COLORS (Status Indicators) + Professional colors for business contexts (errors, success, warnings) + ========================================= */ + --color-red-50: #fff5f5; + --color-red-100: #ffe3e3; + --color-red-500: #d93025; /* Negative status / Error messages */ + --color-red-600: #b91c1c; + + --color-green-50: #f6ffed; + --color-green-100: #d9f7be; + --color-green-500: #237804; /* Positive status / Success messages */ + --color-green-600: #135200; + + --color-amber-50: #fffbe6; + --color-amber-100: #fff1b8; + --color-amber-500: #faad14; /* Critical / Warning notifications */ + --color-amber-600: #d48806; + + /* ========================================= + 4. TYPOGRAPHY (Base font size: 13px) + Override Tailwind default text sizes for consistent UI + ========================================= */ + --text-xs: 0.6875rem; /* 11px - Captions or minor labels */ + --text-xs--line-height: 1rem; + + --text-sm: 0.75rem; /* 12px - Secondary text */ + --text-sm--line-height: 1.125rem; + + --text-base: 0.8125rem; /* 13px - Default body text */ + --text-base--line-height: 1.25rem; /* Comfortable reading spacing */ + + --text-lg: 0.9375rem; /* 15px - Section headers */ + --text-lg--line-height: 1.5rem; + + --text-xl: 1.125rem; /* 18px - Card or page titles */ + --text-xl--line-height: 1.75rem; + + --text-2xl: 1.375rem; /* 22px - Dashboard headers */ + --text-2xl--line-height: 2rem; + + /* Font weights */ + --font-weight-normal: 400; + --font-weight-medium: 500; /* Recommended for table headers */ + --font-weight-semibold: 600; /* Highlight important data points */ + --font-weight-bold: 700; + + /* ========================================= + 5. SHAPE & DEPTH (UI Consistency) + Border radius and shadow presets for consistent UI + ========================================= */ + --radius-sm: 0.125rem; /* 2px - small elements like badges/checkboxes */ + --radius-md: 0.25rem; /* 4px - default buttons/inputs */ + --radius-lg: 0.5rem; /* 8px - card containers */ + --radius-xl: 0.75rem; /* 12px - modal dialogs */ + + /* Shadow presets for depth */ + --shadow-xs: 0 1px 1px rgba(0, 0, 0, 0.05); + --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); + --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }