feat(ui): standardize design system, modals, sidebar, and form inputs
- Implement unified design system tokens, 10px radius, and IRANSans typography - Modernize sidebar with Gemini-style collapsed expander, square 1:1 items, and elevated profile flyout - Standardize all modal dialogs with 16px padding, fixed header/footer, 16px medium title, and sticky bottom actions - Refactor DealFormView and CustomFieldsSection with standard UiField, UiInput, and UiSelect components - Add draggable bottom-left QuickCreate floating action button
This commit is contained in:
@@ -1,20 +1,131 @@
|
||||
@import "./fonts.css";
|
||||
@import "./tokens.css";
|
||||
|
||||
:root {
|
||||
/* Surface & Background */
|
||||
--bg: #f8fafc;
|
||||
--surface: #ffffff;
|
||||
--surface-subtle: #f1f5f9;
|
||||
--surface-hover: #f8fafc;
|
||||
|
||||
/* Typography & Foreground */
|
||||
--font: "IRANSans", Tahoma, sans-serif;
|
||||
--ink: #0f172a;
|
||||
--ink-secondary: #334155;
|
||||
--muted: #64748b;
|
||||
--muted-light: #94a3b8;
|
||||
--line: #e2e8f0;
|
||||
--line-light: #f1f5f9;
|
||||
--line-strong: #cbd5e1;
|
||||
|
||||
/* Accent / Primary (Teal) */
|
||||
--accent: #14b8a6;
|
||||
--accent-hover: #0d9488;
|
||||
--accent-deep: #0f766e;
|
||||
--accent-soft: #ccfbf1;
|
||||
--accent-subtle: #f0fdfa;
|
||||
--accent-contrast: #ffffff;
|
||||
|
||||
/* Semantics */
|
||||
--danger: #b42318;
|
||||
--shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
|
||||
--danger-hover: #991b1b;
|
||||
--danger-soft: #fee2e2;
|
||||
--danger-deep: #7f1d1d;
|
||||
|
||||
--success: #10b981;
|
||||
--success-soft: #d1fae5;
|
||||
--success-deep: #047857;
|
||||
|
||||
--warning: #f59e0b;
|
||||
--warning-soft: #fef3c7;
|
||||
--warning-deep: #b45309;
|
||||
|
||||
--info: #0284c7;
|
||||
--info-soft: #e0f2fe;
|
||||
--info-deep: #0369a1;
|
||||
|
||||
/* Typography Scale */
|
||||
--fs-xs: 0.75rem; /* 12px */
|
||||
--fs-sm: 0.8125rem; /* 13px */
|
||||
--fs-base: 0.875rem; /* 14px */
|
||||
--fs-md: 0.9375rem; /* 15px */
|
||||
--fs-lg: 1.0625rem; /* 17px */
|
||||
--fs-xl: 1.25rem; /* 20px */
|
||||
--fs-2xl: 1.5rem; /* 24px */
|
||||
--fs-3xl: 1.75rem; /* 28px */
|
||||
|
||||
--fw-normal: 400;
|
||||
--fw-medium: 500;
|
||||
--fw-semibold: 600;
|
||||
--fw-bold: 700;
|
||||
--fw-extrabold: 700;
|
||||
|
||||
--lh-tight: 1.25;
|
||||
--lh-normal: 1.5;
|
||||
--lh-relaxed: 1.625;
|
||||
|
||||
/* Spacing Scale */
|
||||
--sp-1: 0.25rem; /* 4px */
|
||||
--sp-2: 0.5rem; /* 8px */
|
||||
--sp-3: 0.75rem; /* 12px */
|
||||
--sp-4: 1rem; /* 16px */
|
||||
--sp-5: 1.25rem; /* 20px */
|
||||
--sp-6: 1.5rem; /* 24px */
|
||||
--sp-8: 2rem; /* 32px */
|
||||
--sp-10: 2.5rem; /* 40px */
|
||||
|
||||
/* Radius - Single Source of Truth (Globally 10px as requested) */
|
||||
--radius: 10px;
|
||||
--radius-xs: var(--radius);
|
||||
--radius-sm: var(--radius);
|
||||
--radius-md: var(--radius);
|
||||
--radius-lg: var(--radius);
|
||||
--radius-xl: var(--radius);
|
||||
--radius-2xl: var(--radius);
|
||||
--radius-full: 9999px;
|
||||
|
||||
/* Control Dimensions */
|
||||
--control-h-sm: 30px;
|
||||
--control-h: 36px;
|
||||
--pad-modal: 24px;
|
||||
--font: "IRANSans", Tahoma, sans-serif;
|
||||
--control-h-md: 36px;
|
||||
--control-h-lg: 42px;
|
||||
--pad-modal: 16px;
|
||||
|
||||
/* Shadows */
|
||||
--shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
|
||||
--shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
|
||||
--shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
|
||||
--shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
|
||||
--shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
|
||||
--shadow-xl: 0 20px 48px rgba(15, 23, 42, 0.16);
|
||||
|
||||
/* Transitions */
|
||||
--transition-fast: 150ms ease;
|
||||
--transition-normal: 200ms ease;
|
||||
|
||||
/* Z-index */
|
||||
--z-dropdown: 50;
|
||||
--z-sticky: 60;
|
||||
--z-modal-backdrop: 80;
|
||||
--z-modal: 90;
|
||||
--z-toast: 100;
|
||||
/* Compatibility aliases for legacy views */
|
||||
--color-border: var(--line);
|
||||
--color-border-light: var(--line-light);
|
||||
--color-text: var(--ink);
|
||||
--color-text-primary: var(--ink);
|
||||
--color-text-secondary: var(--ink-secondary);
|
||||
--color-text-muted: var(--muted);
|
||||
--color-text-emphasis: var(--ink);
|
||||
--color-surface: var(--surface);
|
||||
--color-surface-sunken: var(--surface-subtle);
|
||||
--color-primary: var(--accent);
|
||||
--color-primary-dark: var(--accent-deep);
|
||||
--color-primary-light: var(--accent-soft);
|
||||
--color-primary-surface: var(--accent-subtle);
|
||||
--color-danger: var(--danger);
|
||||
--color-danger-surface: var(--danger-soft);
|
||||
--color-warning: var(--warning);
|
||||
}
|
||||
|
||||
* {
|
||||
@@ -64,16 +175,20 @@ textarea {
|
||||
.btn {
|
||||
border: 0;
|
||||
border-radius: var(--radius);
|
||||
height: var(--control-h);
|
||||
min-height: var(--control-h);
|
||||
padding: 0 1rem;
|
||||
padding: 0 0.85rem;
|
||||
cursor: pointer;
|
||||
background: var(--accent);
|
||||
color: white;
|
||||
font-weight: 600;
|
||||
font-size: var(--fs-sm);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.35rem;
|
||||
box-sizing: border-box;
|
||||
transition: background var(--transition-fast), border-color var(--transition-fast), opacity var(--transition-fast);
|
||||
}
|
||||
|
||||
.btn:disabled {
|
||||
|
||||
Reference in New Issue
Block a user