@aseansc/ui 5.2.0 → 5.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aseansc/ui",
3
- "version": "5.2.0",
3
+ "version": "5.2.1",
4
4
  "description": "ASC Internal UI Component Library — Angular 22 + PrimeNG 21 + TailwindCSS 4 (PrimeNG capped at 21.x — 22.x requires a paid PrimeUI license key, xem README.md)",
5
5
  "license": "UNLICENSED",
6
6
  "author": "ASC Team",
@@ -1,213 +1,213 @@
1
- @use 'primitive' as p;
2
-
3
- // ─────────────────────────────────────────────────────────────────────────────
4
- // Layer 2 — Semantic Tokens
5
- //
6
- // Role-based. Đây là layer component styles nên dùng.
7
- // Expose thành CSS custom properties để support runtime theming (dark mode).
8
- // ─────────────────────────────────────────────────────────────────────────────
9
-
10
- :root {
11
- // ── Color: Primary (brand) — theo design-token-color.json (Brand.default/hover/secondary) ──
12
- --asc-color-primary-lighter: #{p.$asc-brand-50}; // Background.brand-lv1
13
- --asc-color-primary-light: #{p.$asc-brand-100}; // Background.brand-lv2
14
- --asc-color-primary-subtle: #{p.$asc-brand-200};
15
- --asc-color-primary: #{p.$asc-brand-500}; // default state — Brand.default
16
- --asc-color-primary-hover: #{p.$asc-brand-600}; // hover state — Brand.hover
17
- --asc-color-primary-active: #{p.$asc-brand-700}; // active/pressed — Brand.secondary
18
- --asc-color-primary-text: #{p.$asc-white}; // text on primary bg — Background.on-brand
19
- // ── Color: Semantic states — theo design-token-color.json ───────────────────
20
- --asc-color-success: #{p.$asc-emerald-500}; // Brand.tertiary / Text.success
21
- --asc-color-success-bg: #{p.$asc-emerald-50}; // Background.green
22
- --asc-color-success-border: #{p.$asc-green-100};
23
-
24
- --asc-color-warning: #{p.$asc-amber-500}; // Border/Icon/Text.warning
25
- --asc-color-warning-bg: #{p.$asc-yellow-50}; // Background.yellow
26
- --asc-color-warning-border: #{p.$asc-yellow-100};
27
-
28
- --asc-color-danger: #{p.$asc-red-500}; // Border/Icon/Text.danger
29
- --asc-color-danger-bg: #{p.$asc-red-50}; // Background.red
30
- --asc-color-danger-border: #{p.$asc-red-100};
31
-
32
- --asc-color-info: #{p.$asc-blue-500}; // Border/Icon/Text.info
33
- --asc-color-info-bg: #{p.$asc-blue-50}; // Background.blue
34
- --asc-color-info-border: #{p.$asc-blue-100};
35
-
36
- // ── Color: Surface (backgrounds) — Background.* (design-token-color.json) ──
37
- --asc-surface-ground: #{p.$asc-grey-10}; // page background — Background.default dùng #fff, nhưng ground cần khác base 1 chút để phân lớp — giữ tone grey-10 gần trắng
38
- --asc-surface-base: #{p.$asc-white}; // card / panel background — Background.default
39
- --asc-surface-overlay: #{p.$asc-white}; // dialog / tooltip bg
40
- --asc-surface-hover: #{p.$asc-grey-50}; // Background.surface
41
- --asc-surface-active: #{p.$asc-grey-100}; // Background.onSurface
42
- --asc-surface-0: #{p.$asc-white};
43
- --asc-surface-50: #{p.$asc-white};
44
- --asc-formfield-bg: #{p.$asc-white}; // nền input/select/datepicker... (PrimeNG formField.background)
45
- --asc-formfield-focus-border-color: #{p.$asc-grey-300}; // input/border/focus = #A7A7A8
46
- --asc-formfield-disabled-border-color: #{p.$asc-grey-50}; // input/border/disable = #F2F3F5
47
- // Nút xóa (Delete action) trong input/select/datepicker/password... — tròn xám, dấu × trắng
48
- --asc-input-clear-bg: #{p.$asc-grey-100};
49
- --asc-input-clear-bg-hover: #{p.$asc-grey-200};
50
- --asc-input-clear-color: #{p.$asc-white};
51
-
52
- // ── Color: Border — Border.* (design-token-color.json) ──────────────────────
53
- --asc-border-color: #{p.$asc-grey-100}; // Border.default
54
- --asc-border-color-strong: #{p.$asc-grey-300}; // Border.secondary
55
- --asc-border-color-focus: #{p.$asc-blue-500}; // Border.info
56
- --asc-border-color-invalid: #{p.$asc-red-500}; // Border.danger
57
- --asc-border-color-brand: #{p.$asc-brand-500}; // Border.brand — token trước đây chưa có
58
-
59
- // ── Color: Text — Text.* (design-token-color.json) ───────────────────────────
60
- --asc-text-primary: #{p.$asc-grey-900}; // Text.primary
61
- --asc-text-secondary: #{p.$asc-grey-600}; // Text.secondary — sửa theo tài liệu MD gốc (file color mới bị trùng giá trị với tertiary, nghi lỗi copy)
62
- --asc-text-muted: #{p.$asc-grey-500}; // Text.tertiary
63
- --asc-text-disabled: #{p.$asc-grey-200}; // Text.disable
64
- --asc-text-inverse: #{p.$asc-white}; // Text.reverse
65
- --asc-text-placeholder: #{p.$asc-grey-500};
66
- --asc-text-link: #{p.$asc-blue-600}; // Text.link — ĐỔI: link giờ là xanh dương, không còn dùng brand đỏ
67
- --asc-text-link-hover: #{p.$asc-blue-700};
68
- --asc-text-invalid: #{p.$asc-red-500}; // Text.danger
69
- --asc-text-brand: #{p.$asc-brand-500}; // Text.brand — token mới, tách riêng khỏi link
70
- --asc-table-header-color: #A3A3A3; // chữ header AscTable — theo design mới
71
- --asc-table-border-color: #0C0C0D1A; // kẻ ô table (grey đậm, alpha 10%) — theo design mới
72
-
73
- // ── Color: Icon — Icon.* (design-token-color.json) — tier mới, trước đây
74
- // component tự tái dùng --asc-text-*, giờ có set riêng theo đúng design ──────
75
- --asc-icon-primary: #{p.$asc-grey-900};
76
- --asc-icon-secondary: #{p.$asc-grey-400};
77
- --asc-icon-disabled: #{p.$asc-grey-200};
78
- --asc-icon-brand: #{p.$asc-brand-500};
79
- --asc-icon-link: #{p.$asc-blue-600};
80
- --asc-icon-danger: #{p.$asc-red-500};
81
- --asc-icon-success: #{p.$asc-emerald-500};
82
- --asc-icon-info: #{p.$asc-blue-500};
83
-
84
- // ── Typography ─────────────────────────────────────────────────────────────
85
- --asc-font-family: 'Inter', -apple-system, BlinkMacSystemFont,
86
- 'Segoe UI', sans-serif;
87
- --asc-font-family-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
88
- --asc-font-size-base: #{p.$asc-text-sm}; // 14px — base cho components
89
- --asc-line-height-base: #{p.$asc-leading-normal};
90
-
91
- // ── Spacing ────────────────────────────────────────────────────────────────
92
- // Component internal spacing — dùng trong padding/gap của component
93
- --asc-space-component-xs: #{p.$asc-space-1}; // 4px
94
- --asc-space-component-sm: #{p.$asc-space-2}; // 8px
95
- --asc-space-component-md: #{p.$asc-space-3}; // 12px
96
- --asc-space-component-lg: #{p.$asc-space-4}; // 16px
97
- --asc-space-component-xl: #{p.$asc-space-6}; // 24px
98
-
99
- // ── Border radius ──────────────────────────────────────────────────────────
100
- --asc-radius-sm: #{p.$asc-radius-base}; // 4px — badge, tag
101
- --asc-radius-md: #{p.$asc-radius-md}; // 6px — input, button
102
- --asc-radius-lg: #{p.$asc-radius-lg}; // 8px — card, panel
103
- --asc-radius-xl: #{p.$asc-radius-xl}; // 12px — dialog
104
- --asc-radius-full: #{p.$asc-radius-full}; // pill
105
-
106
- // ── Shadows ────────────────────────────────────────────────────────────────
107
- --asc-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
108
- --asc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
109
- --asc-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
110
- --asc-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
111
- --asc-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
112
-
113
- // ── font-size ────────────────────────────────────────────────────────────────
114
- --asc-text-xs: #{p.$asc-text-xs};
115
- --asc-text-sm: #{p.$asc-text-sm};
116
- --asc-text-md: #{p.$asc-text-base};
117
- --asc-text-lg: #{p.$asc-text-lg};
118
- --asc-text-xl: #{p.$asc-text-xl};
119
-
120
- // ── Transitions ────────────────────────────────────────────────────────────
121
- --asc-transition-fast: #{p.$asc-duration-150} #{p.$asc-ease-in-out};
122
- --asc-transition-base: #{p.$asc-duration-200} #{p.$asc-ease-in-out};
123
- --asc-transition-slow: #{p.$asc-duration-300} #{p.$asc-ease-in-out};
124
-
125
- // ── Z-index ────────────────────────────────────────────────────────────────
126
- --asc-z-dropdown: 1000;
127
- --asc-z-sticky: 1020;
128
- --asc-z-fixed: 1030;
129
- --asc-z-modal-bg: 1040;
130
- --asc-z-modal: 1050;
131
- --asc-z-popover: 1060;
132
- --asc-z-tooltip: 1100;
133
- --asc-z-toast: 1200;
134
-
135
- // ── Component height scale ─────────────────────────────────────────────────
136
- // Dùng cho input, button, select — đảm bảo align nhau
137
- --asc-h-xs: 24px;
138
- --asc-h-sm: 32px;
139
- --asc-h-md: 40px; // Figma Input medium = 40px (trước 36px)
140
- --asc-h-lg: 48px;
141
- --asc-h-xl: 56px;
142
-
143
- // ── Button (Figma Button/Anatomy) ──────────────────────────────────────────
144
- // Nền solid lấy từ theme primary (#F74036 / hover #E6271B) — xem preset.ts
145
- --asc-button-solid-text: #FCFCFC; // button/solid/text-default
146
- --asc-button-outline-border: #525252; // button/outline/border-default
147
- --asc-button-outline-text: #262626; // button/outline/text-default
148
- --asc-button-outline-bg-hover: #{p.$asc-grey-50}; // design chưa có — dùng Background.surface
149
- --asc-button-outline-bg-active: #{p.$asc-grey-100};
150
- --asc-button-disabled-opacity: 0.35; // disable: 35%
151
- }
152
-
153
- // ── Dark mode overrides ──────────────────────────────────────────────────────
154
- // Class `.app-dark` được toggle bởi AscThemeService trên <html>
155
- .app-dark {
156
- // Brand.default KHÔNG đổi giữa light/dark (vẫn brand-500) — chỉ hover/active
157
- // nhạt dần cho hợp nền tối, theo đúng design-token-color.json (dark.Brand).
158
- --asc-color-primary-lighter: #{p.$asc-brand-900}; // Background.brand-lv1 (dark)
159
- --asc-color-primary-light: #{p.$asc-brand-800}; // Background.brand-lv2 (dark)
160
- --asc-color-primary-subtle: #{p.$asc-brand-700};
161
- --asc-color-primary: #{p.$asc-brand-500}; // Brand.default (dark) — không đổi so với light
162
- --asc-color-primary-hover: #{p.$asc-brand-400}; // Brand.hover (dark)
163
- --asc-color-primary-active: #{p.$asc-brand-300}; // Brand.secondary (dark)
164
-
165
- --asc-color-success-bg: #022c22; // Background.green (dark)
166
- --asc-color-warning-bg: #422006; // Background.yellow (dark)
167
- --asc-color-danger-bg: #{p.$asc-brand-950}; // Background.red (dark) = #5c0a05
168
- --asc-color-info-bg: #172554; // Background.blue (dark)
169
-
170
- --asc-surface-ground: #0c0c0d; // Background.default (dark)
171
- --asc-surface-base: #{p.$asc-grey-800}; // Background.surface (dark)
172
- --asc-surface-overlay: #{p.$asc-grey-800};
173
- --asc-surface-hover: #{p.$asc-grey-800};
174
- --asc-surface-active: #{p.$asc-grey-700}; // Background.onSurface (dark)
175
-
176
- --asc-border-color: #{p.$asc-grey-700}; // Border.default (dark)
177
- --asc-border-color-strong: #{p.$asc-grey-500}; // Border.secondary (dark)
178
- --asc-border-color-focus: #{p.$asc-blue-400};
179
- --asc-border-color-brand: #{p.$asc-brand-500}; // Border.brand (dark) — không đổi
180
-
181
- --asc-text-primary: #{p.$asc-grey-10}; // Text.primary (dark)
182
- --asc-table-header-color: #{p.$asc-grey-10}; // dark giữ như cũ (= Text.primary dark)
183
- --asc-text-secondary: #{p.$asc-grey-200}; // Text.secondary (dark)
184
- --asc-text-muted: #{p.$asc-grey-300}; // Text.tertiary (dark)
185
- --asc-text-disabled: #{p.$asc-grey-600}; // Text.disable (dark)
186
- --asc-text-placeholder: #{p.$asc-grey-300};
187
- // Text.link (dark) trong design-token-color.json bị #ef4444 (trùng màu danger,
188
- // nghi lỗi copy-paste) — dùng blue-400 (nhạt hơn cho nền tối) thay vì giá trị lỗi đó.
189
- --asc-text-link: #{p.$asc-blue-400};
190
- --asc-text-link-hover: #{p.$asc-blue-400};
191
- --asc-text-brand: #{p.$asc-brand-500}; // không đổi
192
-
193
- --asc-icon-primary: #{p.$asc-grey-10};
194
- --asc-icon-secondary: #{p.$asc-grey-400}; // không đổi so với light
195
- --asc-icon-disabled: #{p.$asc-grey-600};
196
- --asc-icon-brand: #{p.$asc-brand-500};
197
- --asc-icon-link: #{p.$asc-blue-600}; // không đổi so với light
198
- --asc-icon-danger: #{p.$asc-red-500};
199
- --asc-icon-success: #{p.$asc-emerald-500};
200
- --asc-icon-info: #{p.$asc-blue-500};
201
-
202
- // Button outline (dark) — design chưa có, đảo sang tone sáng để đọc được trên nền tối
203
- --asc-button-outline-border: #{p.$asc-grey-400};
204
- --asc-button-outline-text: #{p.$asc-grey-10};
205
- --asc-button-outline-bg-hover: #{p.$asc-grey-800};
206
- --asc-button-outline-bg-active: #{p.$asc-grey-700};
207
-
208
- --asc-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.3);
209
- --asc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.4);
210
- --asc-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
211
- --asc-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
212
- --asc-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.4);
213
- }
1
+ @use 'primitive' as p;
2
+
3
+ // ─────────────────────────────────────────────────────────────────────────────
4
+ // Layer 2 — Semantic Tokens
5
+ //
6
+ // Role-based. Đây là layer component styles nên dùng.
7
+ // Expose thành CSS custom properties để support runtime theming (dark mode).
8
+ // ─────────────────────────────────────────────────────────────────────────────
9
+
10
+ :root {
11
+ // ── Color: Primary (brand) — theo design-token-color.json (Brand.default/hover/secondary) ──
12
+ --asc-color-primary-lighter: #{p.$asc-brand-50}; // Background.brand-lv1
13
+ --asc-color-primary-light: #{p.$asc-brand-100}; // Background.brand-lv2
14
+ --asc-color-primary-subtle: #{p.$asc-brand-200};
15
+ --asc-color-primary: #{p.$asc-brand-500}; // default state — Brand.default
16
+ --asc-color-primary-hover: #{p.$asc-brand-600}; // hover state — Brand.hover
17
+ --asc-color-primary-active: #{p.$asc-brand-700}; // active/pressed — Brand.secondary
18
+ --asc-color-primary-text: #{p.$asc-white}; // text on primary bg — Background.on-brand
19
+ // ── Color: Semantic states — theo design-token-color.json ───────────────────
20
+ --asc-color-success: #{p.$asc-emerald-500}; // Brand.tertiary / Text.success
21
+ --asc-color-success-bg: #{p.$asc-emerald-50}; // Background.green
22
+ --asc-color-success-border: #{p.$asc-green-100};
23
+
24
+ --asc-color-warning: #{p.$asc-amber-500}; // Border/Icon/Text.warning
25
+ --asc-color-warning-bg: #{p.$asc-yellow-50}; // Background.yellow
26
+ --asc-color-warning-border: #{p.$asc-yellow-100};
27
+
28
+ --asc-color-danger: #{p.$asc-red-500}; // Border/Icon/Text.danger
29
+ --asc-color-danger-bg: #{p.$asc-red-50}; // Background.red
30
+ --asc-color-danger-border: #{p.$asc-red-100};
31
+
32
+ --asc-color-info: #{p.$asc-blue-500}; // Border/Icon/Text.info
33
+ --asc-color-info-bg: #{p.$asc-blue-50}; // Background.blue
34
+ --asc-color-info-border: #{p.$asc-blue-100};
35
+
36
+ // ── Color: Surface (backgrounds) — Background.* (design-token-color.json) ──
37
+ --asc-surface-ground: #{p.$asc-grey-10}; // page background — Background.default dùng #fff, nhưng ground cần khác base 1 chút để phân lớp — giữ tone grey-10 gần trắng
38
+ --asc-surface-base: #{p.$asc-white}; // card / panel background — Background.default
39
+ --asc-surface-overlay: #{p.$asc-white}; // dialog / tooltip bg
40
+ --asc-surface-hover: #{p.$asc-grey-50}; // Background.surface
41
+ --asc-surface-active: #{p.$asc-grey-100}; // Background.onSurface
42
+ --asc-surface-0: #{p.$asc-white};
43
+ --asc-surface-50: #{p.$asc-white};
44
+ --asc-formfield-bg: #{p.$asc-white}; // nền input/select/datepicker... (PrimeNG formField.background)
45
+ --asc-formfield-focus-border-color: #{p.$asc-grey-300}; // input/border/focus = #A7A7A8
46
+ --asc-formfield-disabled-border-color: #{p.$asc-grey-50}; // input/border/disable = #F2F3F5
47
+ // Nút xóa (Delete action) trong input/select/datepicker/password... — tròn xám, dấu × trắng
48
+ --asc-input-clear-bg: #{p.$asc-grey-100};
49
+ --asc-input-clear-bg-hover: #{p.$asc-grey-200};
50
+ --asc-input-clear-color: #{p.$asc-white};
51
+
52
+ // ── Color: Border — Border.* (design-token-color.json) ──────────────────────
53
+ --asc-border-color: #{p.$asc-grey-100}; // Border.default
54
+ --asc-border-color-strong: #{p.$asc-grey-300}; // Border.secondary
55
+ --asc-border-color-focus: #{p.$asc-blue-500}; // Border.info
56
+ --asc-border-color-invalid: #{p.$asc-red-500}; // Border.danger
57
+ --asc-border-color-brand: #{p.$asc-brand-500}; // Border.brand — token trước đây chưa có
58
+
59
+ // ── Color: Text — Text.* (design-token-color.json) ───────────────────────────
60
+ --asc-text-primary: #{p.$asc-grey-900}; // Text.primary
61
+ --asc-text-secondary: #{p.$asc-grey-600}; // Text.secondary — sửa theo tài liệu MD gốc (file color mới bị trùng giá trị với tertiary, nghi lỗi copy)
62
+ --asc-text-muted: #{p.$asc-grey-500}; // Text.tertiary
63
+ --asc-text-disabled: #{p.$asc-grey-200}; // Text.disable
64
+ --asc-text-inverse: #{p.$asc-white}; // Text.reverse
65
+ --asc-text-placeholder: #{p.$asc-grey-500};
66
+ --asc-text-link: #{p.$asc-blue-600}; // Text.link — ĐỔI: link giờ là xanh dương, không còn dùng brand đỏ
67
+ --asc-text-link-hover: #{p.$asc-blue-700};
68
+ --asc-text-invalid: #{p.$asc-red-500}; // Text.danger
69
+ --asc-text-brand: #{p.$asc-brand-500}; // Text.brand — token mới, tách riêng khỏi link
70
+ --asc-table-header-color: #A3A3A3; // chữ header AscTable — theo design mới
71
+ --asc-table-border-color: #0C0C0D1A; // kẻ ô table (grey đậm, alpha 10%) — theo design mới
72
+
73
+ // ── Color: Icon — Icon.* (design-token-color.json) — tier mới, trước đây
74
+ // component tự tái dùng --asc-text-*, giờ có set riêng theo đúng design ──────
75
+ --asc-icon-primary: #{p.$asc-grey-900};
76
+ --asc-icon-secondary: #{p.$asc-grey-400};
77
+ --asc-icon-disabled: #{p.$asc-grey-200};
78
+ --asc-icon-brand: #{p.$asc-brand-500};
79
+ --asc-icon-link: #{p.$asc-blue-600};
80
+ --asc-icon-danger: #{p.$asc-red-500};
81
+ --asc-icon-success: #{p.$asc-emerald-500};
82
+ --asc-icon-info: #{p.$asc-blue-500};
83
+
84
+ // ── Typography ─────────────────────────────────────────────────────────────
85
+ --asc-font-family: 'Inter', -apple-system, BlinkMacSystemFont,
86
+ 'Segoe UI', sans-serif;
87
+ --asc-font-family-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
88
+ --asc-font-size-base: #{p.$asc-text-sm}; // 14px — base cho components
89
+ --asc-line-height-base: #{p.$asc-leading-normal};
90
+
91
+ // ── Spacing ────────────────────────────────────────────────────────────────
92
+ // Component internal spacing — dùng trong padding/gap của component
93
+ --asc-space-component-xs: #{p.$asc-space-1}; // 4px
94
+ --asc-space-component-sm: #{p.$asc-space-2}; // 8px
95
+ --asc-space-component-md: #{p.$asc-space-3}; // 12px
96
+ --asc-space-component-lg: #{p.$asc-space-4}; // 16px
97
+ --asc-space-component-xl: #{p.$asc-space-6}; // 24px
98
+
99
+ // ── Border radius ──────────────────────────────────────────────────────────
100
+ --asc-radius-sm: #{p.$asc-radius-base}; // 4px — badge, tag
101
+ --asc-radius-md: #{p.$asc-radius-md}; // 6px — input, button
102
+ --asc-radius-lg: #{p.$asc-radius-lg}; // 8px — card, panel
103
+ --asc-radius-xl: #{p.$asc-radius-xl}; // 12px — dialog
104
+ --asc-radius-full: #{p.$asc-radius-full}; // pill
105
+
106
+ // ── Shadows ────────────────────────────────────────────────────────────────
107
+ --asc-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
108
+ --asc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
109
+ --asc-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
110
+ --asc-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
111
+ --asc-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
112
+
113
+ // ── font-size ────────────────────────────────────────────────────────────────
114
+ --asc-text-xs: #{p.$asc-text-xs};
115
+ --asc-text-sm: #{p.$asc-text-sm};
116
+ --asc-text-md: #{p.$asc-text-base};
117
+ --asc-text-lg: #{p.$asc-text-lg};
118
+ --asc-text-xl: #{p.$asc-text-xl};
119
+
120
+ // ── Transitions ────────────────────────────────────────────────────────────
121
+ --asc-transition-fast: #{p.$asc-duration-150} #{p.$asc-ease-in-out};
122
+ --asc-transition-base: #{p.$asc-duration-200} #{p.$asc-ease-in-out};
123
+ --asc-transition-slow: #{p.$asc-duration-300} #{p.$asc-ease-in-out};
124
+
125
+ // ── Z-index ────────────────────────────────────────────────────────────────
126
+ --asc-z-dropdown: 1000;
127
+ --asc-z-sticky: 1020;
128
+ --asc-z-fixed: 1030;
129
+ --asc-z-modal-bg: 1040;
130
+ --asc-z-modal: 1050;
131
+ --asc-z-popover: 1060;
132
+ --asc-z-tooltip: 1100;
133
+ --asc-z-toast: 1200;
134
+
135
+ // ── Component height scale ─────────────────────────────────────────────────
136
+ // Dùng cho input, button, select — đảm bảo align nhau
137
+ --asc-h-xs: 24px;
138
+ --asc-h-sm: 36px; // Figma Input small = 36px (trước 32px)
139
+ --asc-h-md: 40px; // Figma Input medium = 40px (trước 36px)
140
+ --asc-h-lg: 48px;
141
+ --asc-h-xl: 56px;
142
+
143
+ // ── Button (Figma Button/Anatomy) ──────────────────────────────────────────
144
+ // Nền solid lấy từ theme primary (#F74036 / hover #E6271B) — xem preset.ts
145
+ --asc-button-solid-text: #FCFCFC; // button/solid/text-default
146
+ --asc-button-outline-border: #525252; // button/outline/border-default
147
+ --asc-button-outline-text: #262626; // button/outline/text-default
148
+ --asc-button-outline-bg-hover: #{p.$asc-grey-50}; // design chưa có — dùng Background.surface
149
+ --asc-button-outline-bg-active: #{p.$asc-grey-100};
150
+ --asc-button-disabled-opacity: 0.35; // disable: 35%
151
+ }
152
+
153
+ // ── Dark mode overrides ──────────────────────────────────────────────────────
154
+ // Class `.app-dark` được toggle bởi AscThemeService trên <html>
155
+ .app-dark {
156
+ // Brand.default KHÔNG đổi giữa light/dark (vẫn brand-500) — chỉ hover/active
157
+ // nhạt dần cho hợp nền tối, theo đúng design-token-color.json (dark.Brand).
158
+ --asc-color-primary-lighter: #{p.$asc-brand-900}; // Background.brand-lv1 (dark)
159
+ --asc-color-primary-light: #{p.$asc-brand-800}; // Background.brand-lv2 (dark)
160
+ --asc-color-primary-subtle: #{p.$asc-brand-700};
161
+ --asc-color-primary: #{p.$asc-brand-500}; // Brand.default (dark) — không đổi so với light
162
+ --asc-color-primary-hover: #{p.$asc-brand-400}; // Brand.hover (dark)
163
+ --asc-color-primary-active: #{p.$asc-brand-300}; // Brand.secondary (dark)
164
+
165
+ --asc-color-success-bg: #022c22; // Background.green (dark)
166
+ --asc-color-warning-bg: #422006; // Background.yellow (dark)
167
+ --asc-color-danger-bg: #{p.$asc-brand-950}; // Background.red (dark) = #5c0a05
168
+ --asc-color-info-bg: #172554; // Background.blue (dark)
169
+
170
+ --asc-surface-ground: #0c0c0d; // Background.default (dark)
171
+ --asc-surface-base: #{p.$asc-grey-800}; // Background.surface (dark)
172
+ --asc-surface-overlay: #{p.$asc-grey-800};
173
+ --asc-surface-hover: #{p.$asc-grey-800};
174
+ --asc-surface-active: #{p.$asc-grey-700}; // Background.onSurface (dark)
175
+
176
+ --asc-border-color: #{p.$asc-grey-700}; // Border.default (dark)
177
+ --asc-border-color-strong: #{p.$asc-grey-500}; // Border.secondary (dark)
178
+ --asc-border-color-focus: #{p.$asc-blue-400};
179
+ --asc-border-color-brand: #{p.$asc-brand-500}; // Border.brand (dark) — không đổi
180
+
181
+ --asc-text-primary: #{p.$asc-grey-10}; // Text.primary (dark)
182
+ --asc-table-header-color: #{p.$asc-grey-10}; // dark giữ như cũ (= Text.primary dark)
183
+ --asc-text-secondary: #{p.$asc-grey-200}; // Text.secondary (dark)
184
+ --asc-text-muted: #{p.$asc-grey-300}; // Text.tertiary (dark)
185
+ --asc-text-disabled: #{p.$asc-grey-600}; // Text.disable (dark)
186
+ --asc-text-placeholder: #{p.$asc-grey-300};
187
+ // Text.link (dark) trong design-token-color.json bị #ef4444 (trùng màu danger,
188
+ // nghi lỗi copy-paste) — dùng blue-400 (nhạt hơn cho nền tối) thay vì giá trị lỗi đó.
189
+ --asc-text-link: #{p.$asc-blue-400};
190
+ --asc-text-link-hover: #{p.$asc-blue-400};
191
+ --asc-text-brand: #{p.$asc-brand-500}; // không đổi
192
+
193
+ --asc-icon-primary: #{p.$asc-grey-10};
194
+ --asc-icon-secondary: #{p.$asc-grey-400}; // không đổi so với light
195
+ --asc-icon-disabled: #{p.$asc-grey-600};
196
+ --asc-icon-brand: #{p.$asc-brand-500};
197
+ --asc-icon-link: #{p.$asc-blue-600}; // không đổi so với light
198
+ --asc-icon-danger: #{p.$asc-red-500};
199
+ --asc-icon-success: #{p.$asc-emerald-500};
200
+ --asc-icon-info: #{p.$asc-blue-500};
201
+
202
+ // Button outline (dark) — design chưa có, đảo sang tone sáng để đọc được trên nền tối
203
+ --asc-button-outline-border: #{p.$asc-grey-400};
204
+ --asc-button-outline-text: #{p.$asc-grey-10};
205
+ --asc-button-outline-bg-hover: #{p.$asc-grey-800};
206
+ --asc-button-outline-bg-active: #{p.$asc-grey-700};
207
+
208
+ --asc-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.3);
209
+ --asc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.4);
210
+ --asc-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
211
+ --asc-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
212
+ --asc-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.4);
213
+ }
@@ -17,6 +17,8 @@
17
17
  left var(--layout-section-transition-duration);
18
18
  background-color: var(--asc-surface-base);
19
19
  border-radius: 20px;
20
+ // Padding sidebar theo design: dọc 16px, ngang 12px
21
+ padding: var(--layout-sidebar-padding-y, 16px) var(--layout-sidebar-padding-x, 12px);
20
22
  }
21
23
 
22
24
  // Logo đứng yên ở đầu sidebar, không cuộn theo menu
@@ -24,14 +26,14 @@
24
26
  flex-shrink: 0;
25
27
  display: flex;
26
28
  align-items: center;
27
- padding: 1rem 1.5rem 0.5rem;
29
+ padding: 0 0 var(--layout-sidebar-padding-y, 16px); // khoảng cách logo – menu
28
30
  }
29
31
 
30
32
  .layout-sidebar-content {
31
33
  flex: 1 1 auto;
32
34
  min-height: 0;
33
35
  overflow-y: auto;
34
- padding: 0.5rem 1.5rem;
36
+ padding: 0;
35
37
  }
36
38
 
37
39
  .layout-menu {
@@ -97,7 +99,7 @@
97
99
  outline: 0 none;
98
100
  color: var(--text-color);
99
101
  cursor: pointer;
100
- padding: 0.75rem 1rem;
102
+ padding: 10px 8px;
101
103
  border-radius: var(--content-border-radius);
102
104
  transition:
103
105
  background-color var(--element-transition-duration),
package/tokens/preset.css CHANGED
@@ -146,7 +146,7 @@
146
146
  --asc-z-tooltip: 1100;
147
147
  --asc-z-toast: 1200;
148
148
  --asc-h-xs: 24px;
149
- --asc-h-sm: 32px;
149
+ --asc-h-sm: 36px;
150
150
  --asc-h-md: 40px;
151
151
  --asc-h-lg: 48px;
152
152
  --asc-h-xl: 56px;
@@ -948,20 +948,21 @@ img {
948
948
  transition: transform var(--layout-section-transition-duration), left var(--layout-section-transition-duration);
949
949
  background-color: var(--asc-surface-base);
950
950
  border-radius: 20px;
951
+ padding: var(--layout-sidebar-padding-y, 16px) var(--layout-sidebar-padding-x, 12px);
951
952
  }
952
953
 
953
954
  .layout-sidebar-logo {
954
955
  flex-shrink: 0;
955
956
  display: flex;
956
957
  align-items: center;
957
- padding: 1rem 1.5rem 0.5rem;
958
+ padding: 0 0 var(--layout-sidebar-padding-y, 16px);
958
959
  }
959
960
 
960
961
  .layout-sidebar-content {
961
962
  flex: 1 1 auto;
962
963
  min-height: 0;
963
964
  overflow-y: auto;
964
- padding: 0.5rem 1.5rem;
965
+ padding: 0;
965
966
  }
966
967
 
967
968
  .layout-menu {
@@ -1015,7 +1016,7 @@ img {
1015
1016
  outline: 0 none;
1016
1017
  color: var(--text-color);
1017
1018
  cursor: pointer;
1018
- padding: 0.75rem 1rem;
1019
+ padding: 10px 8px;
1019
1020
  border-radius: var(--content-border-radius);
1020
1021
  transition: background-color var(--element-transition-duration), box-shadow var(--element-transition-duration);
1021
1022
  }