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:
s.esmaeili
2026-09-12 01:33:07 +03:30
parent 9a991fc1f1
commit 1ae87c97b7
87 changed files with 7844 additions and 5718 deletions
+3 -3
View File
@@ -70,12 +70,12 @@
font-display: swap;
}
/* map 800 → Black */
/* map 800 → Bold (avoid oversized heavy Black in UI) */
@font-face {
font-family: "IRANSans";
src:
url("../assets/fonts/iranSans/woff2/IRANSansWeb(FaNum)_Black.woff2") format("woff2"),
url("../assets/fonts/iranSans/woff/IRANSansWeb(FaNum)_Black.woff") format("woff");
url("../assets/fonts/iranSans/woff2/IRANSansWeb(FaNum)_Bold.woff2") format("woff2"),
url("../assets/fonts/iranSans/woff/IRANSansWeb(FaNum)_Bold.woff") format("woff");
font-weight: 800;
font-style: normal;
font-display: swap;
+119 -4
View File
@@ -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 {
+496
View File
@@ -0,0 +1,496 @@
/**
* Montact CRM (منتکت) Design System - Core Tokens & Utilities
* RTL-first, IRANSans typography, unified spacing, controls & surfaces.
*/
/* ==========================================================================
Page Layout
========================================================================== */
.crm-page,
.page,
.dashboard,
.profile,
.notes-page {
display: flex;
flex-direction: column;
gap: var(--sp-5);
padding: 0;
margin: 0;
max-width: 100%;
width: 100%;
min-width: 0;
box-sizing: border-box;
}
.crm-page.narrow,
.crm-page.wide,
.crm-page.full {
max-width: 100%;
}
.crm-page.embedded {
padding: 0;
gap: var(--sp-4);
}
/* ==========================================================================
Page Header
========================================================================== */
.crm-page-header {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: var(--sp-4);
min-width: 0;
}
.crm-page-header-titles {
display: flex;
flex-direction: column;
gap: var(--sp-1);
min-width: 0;
}
.crm-page-title {
margin: 0;
font-size: var(--fs-xl);
font-weight: var(--fw-bold);
color: var(--ink);
line-height: var(--lh-tight);
}
.crm-page-lead {
margin: 0;
font-size: var(--fs-sm);
color: var(--muted);
line-height: var(--lh-normal);
}
.crm-header-actions {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: var(--sp-2);
}
/* ==========================================================================
Toolbar & Filter Bar
========================================================================== */
.crm-toolbar {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: var(--sp-3);
min-width: 0;
width: 100%;
}
.crm-toolbar-stretch,
.crm-toolbar .toolbar-search,
.crm-toolbar .search-box,
.crm-toolbar .crm-search {
flex: 1 1 200px;
min-width: 180px;
max-width: 380px;
}
.crm-toolbar .toolbar-select,
.crm-toolbar .ui-select:not(.block) {
width: auto;
min-width: 130px;
max-width: 220px;
}
.crm-toolbar .ui-btn,
.crm-toolbar .btn {
flex-shrink: 0;
}
/* ==========================================================================
Card & Container Surfaces
========================================================================== */
.crm-card {
background: var(--surface);
border: 1px solid var(--line);
border-radius: var(--radius);
box-shadow: var(--shadow-xs);
padding: var(--sp-5);
box-sizing: border-box;
transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.crm-card-sm {
padding: var(--sp-3);
}
.crm-card-lg {
padding: var(--sp-6);
}
.crm-card-interactive:hover {
border-color: var(--line-strong);
box-shadow: var(--shadow-sm);
}
.crm-card-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--sp-3);
padding-bottom: var(--sp-3);
margin-bottom: var(--sp-4);
border-bottom: 1px solid var(--line-light);
}
.crm-card-title {
margin: 0;
font-size: var(--fs-md);
font-weight: var(--fw-semibold);
color: var(--ink);
}
.crm-card-actions {
display: flex;
align-items: center;
gap: var(--sp-2);
}
/* ==========================================================================
Forms & Field Layouts
========================================================================== */
.crm-form {
display: flex;
flex-direction: column;
gap: var(--sp-5);
width: 100%;
}
.crm-form-section {
display: flex;
flex-direction: column;
gap: var(--sp-3);
}
.crm-form-section-title {
margin: 0;
font-size: var(--fs-md);
font-weight: var(--fw-semibold);
color: var(--ink);
padding-bottom: var(--sp-2);
border-bottom: 1px solid var(--line-light);
}
.crm-form-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: var(--sp-4);
width: 100%;
}
.crm-form-grid-2 {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: var(--sp-4);
width: 100%;
}
.crm-form-grid-3 {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: var(--sp-4);
width: 100%;
}
.crm-form-grid-4 {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: var(--sp-4);
width: 100%;
}
.crm-col-span-2 {
grid-column: span 2;
}
.crm-col-span-full {
grid-column: 1 / -1;
}
.crm-field {
display: flex;
flex-direction: column;
gap: var(--sp-1);
min-width: 0;
}
.crm-label {
display: flex;
align-items: center;
gap: var(--sp-1);
font-size: var(--fs-sm);
font-weight: var(--fw-medium);
color: var(--ink-secondary);
}
.crm-required-indicator {
color: var(--danger);
}
.crm-hint {
font-size: var(--fs-xs);
color: var(--muted);
line-height: var(--lh-normal);
}
.crm-field-error {
font-size: var(--fs-xs);
color: var(--danger);
font-weight: var(--fw-medium);
display: flex;
align-items: center;
gap: var(--sp-1);
}
.crm-form-actions {
display: flex;
align-items: center;
justify-content: flex-start;
gap: var(--sp-3);
padding-top: var(--sp-4);
margin-top: var(--sp-2);
border-top: 1px solid var(--line-light);
flex-wrap: wrap;
}
/* ==========================================================================
Data Table
========================================================================== */
.crm-table-container {
width: 100%;
overflow-x: auto;
background: var(--surface);
border: 1px solid var(--line);
border-radius: var(--radius);
box-shadow: var(--shadow-xs);
-webkit-overflow-scrolling: touch;
}
.crm-table {
width: 100%;
border-collapse: collapse;
text-align: right;
font-size: var(--fs-sm);
}
.crm-table th {
background: var(--surface-subtle);
color: var(--muted);
font-weight: var(--fw-semibold);
padding: var(--sp-3) var(--sp-4);
border-bottom: 1px solid var(--line);
white-space: nowrap;
}
.crm-table td {
padding: var(--sp-3) var(--sp-4);
border-bottom: 1px solid var(--line-light);
color: var(--ink);
vertical-align: middle;
}
.crm-table tbody tr:last-child td {
border-bottom: none;
}
.crm-table tbody tr:hover td {
background: var(--surface-hover);
}
.crm-table-actions {
display: inline-flex;
align-items: center;
gap: var(--sp-1);
white-space: nowrap;
}
/* ==========================================================================
Badges & Status Indicators
========================================================================== */
.crm-badge {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.35rem;
padding: 0.2rem 0.6rem;
border-radius: var(--radius-full);
font-size: var(--fs-xs);
font-weight: var(--fw-semibold);
line-height: 1.2;
white-space: nowrap;
border: 1px solid transparent;
}
.crm-badge-sm {
padding: 0.1rem 0.45rem;
font-size: 0.7rem;
}
.crm-badge-neutral {
background: var(--surface-subtle);
color: var(--ink-secondary);
border-color: var(--line);
}
.crm-badge-accent,
.crm-badge-primary {
background: var(--accent-soft);
color: var(--accent-deep);
border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}
.crm-badge-success {
background: var(--success-soft);
color: var(--success-deep);
border-color: color-mix(in srgb, var(--success) 30%, transparent);
}
.crm-badge-warning {
background: var(--warning-soft);
color: var(--warning-deep);
border-color: color-mix(in srgb, var(--warning) 30%, transparent);
}
.crm-badge-danger {
background: var(--danger-soft);
color: var(--danger);
border-color: color-mix(in srgb, var(--danger) 30%, transparent);
}
.crm-badge-info {
background: var(--info-soft);
color: var(--info-deep);
border-color: color-mix(in srgb, var(--info) 30%, transparent);
}
/* ==========================================================================
Pagination
========================================================================== */
.crm-pagination {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: var(--sp-3);
padding-top: var(--sp-3);
}
.crm-pagination-info {
font-size: var(--fs-sm);
color: var(--muted);
}
.crm-pagination-nav {
display: inline-flex;
align-items: center;
gap: var(--sp-1);
}
/* ==========================================================================
Empty States
========================================================================== */
.crm-empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
padding: var(--sp-10) var(--sp-6);
gap: var(--sp-3);
color: var(--muted);
background: var(--surface);
border: 1px dashed var(--line-strong);
border-radius: var(--radius);
}
.crm-empty-title {
margin: 0;
font-size: var(--fs-md);
font-weight: var(--fw-semibold);
color: var(--ink);
}
.crm-empty-desc {
margin: 0;
font-size: var(--fs-sm);
max-width: 360px;
line-height: var(--lh-relaxed);
}
/* ==========================================================================
Typography Utilities
========================================================================== */
.crm-text-xs { font-size: var(--fs-xs); }
.crm-text-sm { font-size: var(--fs-sm); }
.crm-text-base { font-size: var(--fs-base); }
.crm-text-md { font-size: var(--fs-md); }
.crm-text-lg { font-size: var(--fs-lg); }
.crm-text-xl { font-size: var(--fs-xl); }
.crm-text-2xl { font-size: var(--fs-2xl); }
.crm-font-normal { font-weight: var(--fw-normal); }
.crm-font-medium { font-weight: var(--fw-medium); }
.crm-font-semibold { font-weight: var(--fw-semibold); }
.crm-font-bold { font-weight: var(--fw-bold); }
.crm-font-extrabold { font-weight: var(--fw-extrabold); }
.crm-text-ink { color: var(--ink); }
.crm-text-secondary { color: var(--ink-secondary); }
.crm-text-muted { color: var(--muted); }
.crm-text-accent { color: var(--accent); }
.crm-text-danger { color: var(--danger); }
.crm-text-success { color: var(--success); }
.crm-text-warning { color: var(--warning); }
/* ==========================================================================
Responsive Breakpoints
========================================================================== */
@media (max-width: 900px) {
.crm-page {
padding: 0;
gap: var(--sp-4);
}
.crm-page-title {
font-size: var(--fs-xl);
}
.crm-page-header {
flex-direction: column;
align-items: stretch;
gap: var(--sp-3);
}
.crm-header-actions {
justify-content: stretch;
}
.crm-header-actions > * {
flex: 1 1 auto;
}
.crm-form-grid-2,
.crm-form-grid-3,
.crm-form-grid-4 {
grid-template-columns: 1fr;
}
.crm-col-span-2 {
grid-column: auto;
}
.crm-pagination {
flex-direction: column;
align-items: center;
}
}