@aseansc/ui 5.8.0 → 5.9.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/CHANGELOG.md +88 -43
- package/fesm2022/aseansc-ui.mjs +632 -616
- package/fesm2022/aseansc-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/tokens/_semantic.scss +262 -246
- package/tokens/layout/_main.scss +1 -0
- package/tokens/preset.css +11 -0
- package/types/aseansc-ui.d.ts +17 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aseansc/ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.9.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",
|
package/tokens/_semantic.scss
CHANGED
|
@@ -1,246 +1,262 @@
|
|
|
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 export Figma Alias (light/dark.tokens.json, 2026-10-29) ──
|
|
20
|
-
--asc-color-success: #{p.$asc-green-500}; // Brand.tertiary / Background/Border/Icon/Text.success
|
|
21
|
-
--asc-color-success-bg: #{p.$asc-green-50}; // Background.green
|
|
22
|
-
--asc-color-success-border: #{p.$asc-green-100};
|
|
23
|
-
|
|
24
|
-
--asc-color-warning: #{p.$asc-yellow-500}; // Background/Border.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}; // Background/Border/Icon/Text.error (design đổi tên danger → error)
|
|
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-translucent: #{rgba(p.$asc-white, 0.95)}; // layout main / sidebar / table header — nền trắng hơi trong
|
|
40
|
-
--asc-surface-overlay: #{p.$asc-white}; // dialog / tooltip bg
|
|
41
|
-
--asc-surface-hover: #{p.$asc-grey-50}; // Background.surface
|
|
42
|
-
--asc-surface-active: #{p.$asc-grey-100}; // Background.onSurface
|
|
43
|
-
// Background."surface 0" trong export mới = white 70% (light) / grey-400 (dark) — chưa áp
|
|
44
|
-
// vì đang làm nền table/radio, chờ designer xác nhận. Giữ trắng đặc.
|
|
45
|
-
--asc-surface-0: #{p.$asc-white};
|
|
46
|
-
--asc-surface-50: #{p.$asc-white};
|
|
47
|
-
--asc-formfield-bg: #{p.$asc-white}; // nền input/select/datepicker... (PrimeNG formField.background)
|
|
48
|
-
--asc-formfield-disabled-bg: #{p.$asc-grey-50}; // Input/background/disable
|
|
49
|
-
--asc-formfield-border-color: #{p.$asc-grey-100}; // Input/border/default
|
|
50
|
-
--asc-formfield-focus-border-color: #{p.$asc-grey-300}; // input/border/focus = #A7A7A8
|
|
51
|
-
--asc-formfield-disabled-border-color: #{p.$asc-grey-50}; // input/border/disable = #F2F3F5
|
|
52
|
-
--asc-formfield-placeholder-color: #{p.$asc-grey-600}; // Input/text/unfill
|
|
53
|
-
// Nút xóa (Delete action) trong input/select/datepicker/password... — tròn xám, dấu × trắng
|
|
54
|
-
--asc-input-clear-bg: #{p.$asc-grey-100};
|
|
55
|
-
--asc-input-clear-bg-hover: #{p.$asc-grey-200};
|
|
56
|
-
--asc-input-clear-color: #{p.$asc-white};
|
|
57
|
-
|
|
58
|
-
// ── Color: Border — Border.* (design-token-color.json) ──────────────────────
|
|
59
|
-
--asc-border-color: #{p.$asc-grey-100}; // Border.default
|
|
60
|
-
--asc-border-color-strong: #{p.$asc-grey-300}; // Border.secondary
|
|
61
|
-
--asc-border-color-focus: #{p.$asc-blue-500}; // Border.info
|
|
62
|
-
--asc-border-color-invalid: #{p.$asc-red-500}; // Border.error
|
|
63
|
-
--asc-border-color-brand: #{p.$asc-brand-500}; // Border.brand — token trước đây chưa có
|
|
64
|
-
|
|
65
|
-
// ── Color: Text — Text.* (design-token-color.json) ───────────────────────────
|
|
66
|
-
--asc-text-primary: #{p.$asc-grey-900}; // Text.primary
|
|
67
|
-
--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)
|
|
68
|
-
--asc-text-muted: #{p.$asc-grey-500}; // Text.tertiary
|
|
69
|
-
--asc-text-disabled: #{p.$asc-grey-200}; // Text.disable
|
|
70
|
-
--asc-text-inverse: #{p.$asc-white-variable}; // Text.reverse = #FCFCFC (light + dark)
|
|
71
|
-
--asc-text-placeholder: #{p.$asc-grey-500};
|
|
72
|
-
--asc-text-link: #{p.$asc-blue-600}; // Text.link — ĐỔI: link giờ là xanh dương, không còn dùng brand đỏ
|
|
73
|
-
--asc-text-link-hover: #{p.$asc-blue-700};
|
|
74
|
-
--asc-text-invalid: #{p.$asc-red-500}; // Text.error
|
|
75
|
-
--asc-text-brand: #{p.$asc-brand-500}; // Text.brand — token mới, tách riêng khỏi link
|
|
76
|
-
--asc-table-header-color: #A3A3A3; // chữ header AscTable — theo design mới
|
|
77
|
-
--asc-paginator-border: transparent; // Pagination/border/default (light = trắng trên nền trắng)
|
|
78
|
-
--asc-paginator-border-active: transparent;
|
|
79
|
-
// Figma: white/499 (trắng 70%) trên khung #F2F3F5 — khung code giữ trắng 95% nên
|
|
80
|
-
// dùng Background/surface để mục active/hover còn nhìn thấy.
|
|
81
|
-
--asc-sidebar-item-active-bg: #{p.$asc-grey-50};
|
|
82
|
-
--asc-table-border-color: #0C0C0D1A; // kẻ ô table (grey đậm, alpha 10%) — theo design mới
|
|
83
|
-
// Figma Table "Dành cho FE": header #FAFAFA (neutral/50), kẻ header phải + dưới gradient
|
|
84
|
-
// zinc/100 → zinc/300; hover dòng + dòng tổng Table/background/hover (#FAFAFC).
|
|
85
|
-
--asc-table-header-bg: #fafafa;
|
|
86
|
-
--asc-table-header-divider-top: #f4f4f5;
|
|
87
|
-
--asc-table-header-divider-bottom: #d4d4d8;
|
|
88
|
-
--asc-table-row-hover-bg: #{p.$asc-grey-10};
|
|
89
|
-
|
|
90
|
-
// ── Color: Icon — Icon.* (design-token-color.json) — tier mới, trước đây
|
|
91
|
-
// component tự tái dùng --asc-text-*, giờ có set riêng theo đúng design ──────
|
|
92
|
-
--asc-icon-primary: #{p.$asc-grey-900};
|
|
93
|
-
--asc-icon-secondary: #{p.$asc-grey-400};
|
|
94
|
-
--asc-icon-disabled: #{p.$asc-grey-200};
|
|
95
|
-
--asc-icon-brand: #{p.$asc-brand-500};
|
|
96
|
-
--asc-icon-link: #{p.$asc-blue-600};
|
|
97
|
-
--asc-icon-danger: #{p.$asc-red-500}; // Icon.error
|
|
98
|
-
--asc-icon-success: #{p.$asc-green-500};
|
|
99
|
-
--asc-icon-info: #{p.$asc-blue-500};
|
|
100
|
-
|
|
101
|
-
// ── Typography ─────────────────────────────────────────────────────────────
|
|
102
|
-
--asc-font-family: 'Inter', -apple-system, BlinkMacSystemFont,
|
|
103
|
-
'Segoe UI', sans-serif;
|
|
104
|
-
--asc-font-family-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
|
|
105
|
-
--asc-font-size-base: #{p.$asc-text-sm}; // 14px — base cho components
|
|
106
|
-
--asc-line-height-base: #{p.$asc-leading-normal};
|
|
107
|
-
|
|
108
|
-
// ── Spacing ────────────────────────────────────────────────────────────────
|
|
109
|
-
// Component internal spacing — dùng trong padding/gap của component
|
|
110
|
-
--asc-space-component-xs: #{p.$asc-space-1}; // 4px
|
|
111
|
-
--asc-space-component-sm: #{p.$asc-space-2}; // 8px
|
|
112
|
-
--asc-space-component-md: #{p.$asc-space-3}; // 12px
|
|
113
|
-
--asc-space-component-lg: #{p.$asc-space-4}; // 16px
|
|
114
|
-
--asc-space-component-xl: #{p.$asc-space-6}; // 24px
|
|
115
|
-
|
|
116
|
-
// ── Border radius ──────────────────────────────────────────────────────────
|
|
117
|
-
--asc-radius-sm: #{p.$asc-radius-base}; // 4px — badge, tag
|
|
118
|
-
--asc-radius-md: #{p.$asc-radius-md}; // 6px — input, button
|
|
119
|
-
--asc-radius-lg: #{p.$asc-radius-lg}; // 8px — card, panel
|
|
120
|
-
--asc-radius-xl: #{p.$asc-radius-xl}; // 12px — dialog
|
|
121
|
-
--asc-radius-full: #{p.$asc-radius-full}; // pill
|
|
122
|
-
|
|
123
|
-
// ── Shadows ────────────────────────────────────────────────────────────────
|
|
124
|
-
--asc-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
125
|
-
--asc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
126
|
-
--asc-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
127
|
-
--asc-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
128
|
-
--asc-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
|
|
129
|
-
|
|
130
|
-
// ── font-size ────────────────────────────────────────────────────────────────
|
|
131
|
-
--asc-text-xs: #{p.$asc-text-xs};
|
|
132
|
-
--asc-text-sm: #{p.$asc-text-sm};
|
|
133
|
-
--asc-text-md: #{p.$asc-text-base};
|
|
134
|
-
--asc-text-lg: #{p.$asc-text-lg};
|
|
135
|
-
--asc-text-xl: #{p.$asc-text-xl};
|
|
136
|
-
|
|
137
|
-
// ── Transitions ────────────────────────────────────────────────────────────
|
|
138
|
-
--asc-transition-fast: #{p.$asc-duration-150} #{p.$asc-ease-in-out};
|
|
139
|
-
--asc-transition-base: #{p.$asc-duration-200} #{p.$asc-ease-in-out};
|
|
140
|
-
--asc-transition-slow: #{p.$asc-duration-300} #{p.$asc-ease-in-out};
|
|
141
|
-
|
|
142
|
-
// ── Z-index ────────────────────────────────────────────────────────────────
|
|
143
|
-
--asc-z-dropdown: 1000;
|
|
144
|
-
--asc-z-sticky: 1020;
|
|
145
|
-
--asc-z-fixed: 1030;
|
|
146
|
-
--asc-z-modal-bg: 1040;
|
|
147
|
-
--asc-z-modal: 1050;
|
|
148
|
-
--asc-z-popover: 1060;
|
|
149
|
-
--asc-z-tooltip: 1100;
|
|
150
|
-
--asc-z-toast: 1200;
|
|
151
|
-
|
|
152
|
-
// ── Component height scale ─────────────────────────────────────────────────
|
|
153
|
-
// Dùng cho input, button, select — đảm bảo align nhau
|
|
154
|
-
--asc-h-xs: 24px;
|
|
155
|
-
--asc-h-sm: 36px; // Figma Input small = 36px (trước 32px)
|
|
156
|
-
--asc-h-md: 40px; // Figma Input medium = 40px (trước 36px)
|
|
157
|
-
--asc-h-lg: 48px;
|
|
158
|
-
--asc-h-xl: 56px;
|
|
159
|
-
|
|
160
|
-
// ──
|
|
161
|
-
//
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
--asc-
|
|
166
|
-
--asc-
|
|
167
|
-
--asc-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
--asc-
|
|
179
|
-
--asc-
|
|
180
|
-
--asc-
|
|
181
|
-
|
|
182
|
-
--asc-
|
|
183
|
-
--asc-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
--asc-
|
|
192
|
-
--asc-
|
|
193
|
-
|
|
194
|
-
//
|
|
195
|
-
--asc-
|
|
196
|
-
--asc-
|
|
197
|
-
|
|
198
|
-
--asc-
|
|
199
|
-
--asc-
|
|
200
|
-
--asc-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
--asc-
|
|
204
|
-
--asc-
|
|
205
|
-
--asc-
|
|
206
|
-
|
|
207
|
-
--asc-
|
|
208
|
-
--asc-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
--asc-
|
|
212
|
-
--asc-
|
|
213
|
-
--asc-
|
|
214
|
-
--asc-
|
|
215
|
-
--asc-
|
|
216
|
-
--asc-
|
|
217
|
-
|
|
218
|
-
--asc-
|
|
219
|
-
--asc-
|
|
220
|
-
--asc-
|
|
221
|
-
--asc-
|
|
222
|
-
|
|
223
|
-
--asc-text-
|
|
224
|
-
--asc-
|
|
225
|
-
|
|
226
|
-
--asc-
|
|
227
|
-
--asc-
|
|
228
|
-
--asc-
|
|
229
|
-
--asc-
|
|
230
|
-
--asc-
|
|
231
|
-
--asc-
|
|
232
|
-
--asc-
|
|
233
|
-
--asc-
|
|
234
|
-
|
|
235
|
-
//
|
|
236
|
-
--asc-
|
|
237
|
-
--asc-
|
|
238
|
-
--asc-
|
|
239
|
-
--asc-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
--asc-
|
|
243
|
-
--asc-
|
|
244
|
-
--asc-
|
|
245
|
-
--asc-
|
|
246
|
-
}
|
|
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 export Figma Alias (light/dark.tokens.json, 2026-10-29) ──
|
|
20
|
+
--asc-color-success: #{p.$asc-green-500}; // Brand.tertiary / Background/Border/Icon/Text.success
|
|
21
|
+
--asc-color-success-bg: #{p.$asc-green-50}; // Background.green
|
|
22
|
+
--asc-color-success-border: #{p.$asc-green-100};
|
|
23
|
+
|
|
24
|
+
--asc-color-warning: #{p.$asc-yellow-500}; // Background/Border.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}; // Background/Border/Icon/Text.error (design đổi tên danger → error)
|
|
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-translucent: #{rgba(p.$asc-white, 0.95)}; // layout main / sidebar / table header — nền trắng hơi trong
|
|
40
|
+
--asc-surface-overlay: #{p.$asc-white}; // dialog / tooltip bg
|
|
41
|
+
--asc-surface-hover: #{p.$asc-grey-50}; // Background.surface
|
|
42
|
+
--asc-surface-active: #{p.$asc-grey-100}; // Background.onSurface
|
|
43
|
+
// Background."surface 0" trong export mới = white 70% (light) / grey-400 (dark) — chưa áp
|
|
44
|
+
// vì đang làm nền table/radio, chờ designer xác nhận. Giữ trắng đặc.
|
|
45
|
+
--asc-surface-0: #{p.$asc-white};
|
|
46
|
+
--asc-surface-50: #{p.$asc-white};
|
|
47
|
+
--asc-formfield-bg: #{p.$asc-white}; // nền input/select/datepicker... (PrimeNG formField.background)
|
|
48
|
+
--asc-formfield-disabled-bg: #{p.$asc-grey-50}; // Input/background/disable
|
|
49
|
+
--asc-formfield-border-color: #{p.$asc-grey-100}; // Input/border/default
|
|
50
|
+
--asc-formfield-focus-border-color: #{p.$asc-grey-300}; // input/border/focus = #A7A7A8
|
|
51
|
+
--asc-formfield-disabled-border-color: #{p.$asc-grey-50}; // input/border/disable = #F2F3F5
|
|
52
|
+
--asc-formfield-placeholder-color: #{p.$asc-grey-600}; // Input/text/unfill
|
|
53
|
+
// Nút xóa (Delete action) trong input/select/datepicker/password... — tròn xám, dấu × trắng
|
|
54
|
+
--asc-input-clear-bg: #{p.$asc-grey-100};
|
|
55
|
+
--asc-input-clear-bg-hover: #{p.$asc-grey-200};
|
|
56
|
+
--asc-input-clear-color: #{p.$asc-white};
|
|
57
|
+
|
|
58
|
+
// ── Color: Border — Border.* (design-token-color.json) ──────────────────────
|
|
59
|
+
--asc-border-color: #{p.$asc-grey-100}; // Border.default
|
|
60
|
+
--asc-border-color-strong: #{p.$asc-grey-300}; // Border.secondary
|
|
61
|
+
--asc-border-color-focus: #{p.$asc-blue-500}; // Border.info
|
|
62
|
+
--asc-border-color-invalid: #{p.$asc-red-500}; // Border.error
|
|
63
|
+
--asc-border-color-brand: #{p.$asc-brand-500}; // Border.brand — token trước đây chưa có
|
|
64
|
+
|
|
65
|
+
// ── Color: Text — Text.* (design-token-color.json) ───────────────────────────
|
|
66
|
+
--asc-text-primary: #{p.$asc-grey-900}; // Text.primary
|
|
67
|
+
--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)
|
|
68
|
+
--asc-text-muted: #{p.$asc-grey-500}; // Text.tertiary
|
|
69
|
+
--asc-text-disabled: #{p.$asc-grey-200}; // Text.disable
|
|
70
|
+
--asc-text-inverse: #{p.$asc-white-variable}; // Text.reverse = #FCFCFC (light + dark)
|
|
71
|
+
--asc-text-placeholder: #{p.$asc-grey-500};
|
|
72
|
+
--asc-text-link: #{p.$asc-blue-600}; // Text.link — ĐỔI: link giờ là xanh dương, không còn dùng brand đỏ
|
|
73
|
+
--asc-text-link-hover: #{p.$asc-blue-700};
|
|
74
|
+
--asc-text-invalid: #{p.$asc-red-500}; // Text.error
|
|
75
|
+
--asc-text-brand: #{p.$asc-brand-500}; // Text.brand — token mới, tách riêng khỏi link
|
|
76
|
+
--asc-table-header-color: #A3A3A3; // chữ header AscTable — theo design mới
|
|
77
|
+
--asc-paginator-border: transparent; // Pagination/border/default (light = trắng trên nền trắng)
|
|
78
|
+
--asc-paginator-border-active: transparent;
|
|
79
|
+
// Figma: white/499 (trắng 70%) trên khung #F2F3F5 — khung code giữ trắng 95% nên
|
|
80
|
+
// dùng Background/surface để mục active/hover còn nhìn thấy.
|
|
81
|
+
--asc-sidebar-item-active-bg: #{p.$asc-grey-50};
|
|
82
|
+
--asc-table-border-color: #0C0C0D1A; // kẻ ô table (grey đậm, alpha 10%) — theo design mới
|
|
83
|
+
// Figma Table "Dành cho FE": header #FAFAFA (neutral/50), kẻ header phải + dưới gradient
|
|
84
|
+
// zinc/100 → zinc/300; hover dòng + dòng tổng Table/background/hover (#FAFAFC).
|
|
85
|
+
--asc-table-header-bg: #fafafa;
|
|
86
|
+
--asc-table-header-divider-top: #f4f4f5;
|
|
87
|
+
--asc-table-header-divider-bottom: #d4d4d8;
|
|
88
|
+
--asc-table-row-hover-bg: #{p.$asc-grey-10};
|
|
89
|
+
|
|
90
|
+
// ── Color: Icon — Icon.* (design-token-color.json) — tier mới, trước đây
|
|
91
|
+
// component tự tái dùng --asc-text-*, giờ có set riêng theo đúng design ──────
|
|
92
|
+
--asc-icon-primary: #{p.$asc-grey-900};
|
|
93
|
+
--asc-icon-secondary: #{p.$asc-grey-400};
|
|
94
|
+
--asc-icon-disabled: #{p.$asc-grey-200};
|
|
95
|
+
--asc-icon-brand: #{p.$asc-brand-500};
|
|
96
|
+
--asc-icon-link: #{p.$asc-blue-600};
|
|
97
|
+
--asc-icon-danger: #{p.$asc-red-500}; // Icon.error
|
|
98
|
+
--asc-icon-success: #{p.$asc-green-500};
|
|
99
|
+
--asc-icon-info: #{p.$asc-blue-500};
|
|
100
|
+
|
|
101
|
+
// ── Typography ─────────────────────────────────────────────────────────────
|
|
102
|
+
--asc-font-family: 'Inter', -apple-system, BlinkMacSystemFont,
|
|
103
|
+
'Segoe UI', sans-serif;
|
|
104
|
+
--asc-font-family-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
|
|
105
|
+
--asc-font-size-base: #{p.$asc-text-sm}; // 14px — base cho components
|
|
106
|
+
--asc-line-height-base: #{p.$asc-leading-normal};
|
|
107
|
+
|
|
108
|
+
// ── Spacing ────────────────────────────────────────────────────────────────
|
|
109
|
+
// Component internal spacing — dùng trong padding/gap của component
|
|
110
|
+
--asc-space-component-xs: #{p.$asc-space-1}; // 4px
|
|
111
|
+
--asc-space-component-sm: #{p.$asc-space-2}; // 8px
|
|
112
|
+
--asc-space-component-md: #{p.$asc-space-3}; // 12px
|
|
113
|
+
--asc-space-component-lg: #{p.$asc-space-4}; // 16px
|
|
114
|
+
--asc-space-component-xl: #{p.$asc-space-6}; // 24px
|
|
115
|
+
|
|
116
|
+
// ── Border radius ──────────────────────────────────────────────────────────
|
|
117
|
+
--asc-radius-sm: #{p.$asc-radius-base}; // 4px — badge, tag
|
|
118
|
+
--asc-radius-md: #{p.$asc-radius-md}; // 6px — input, button
|
|
119
|
+
--asc-radius-lg: #{p.$asc-radius-lg}; // 8px — card, panel
|
|
120
|
+
--asc-radius-xl: #{p.$asc-radius-xl}; // 12px — dialog
|
|
121
|
+
--asc-radius-full: #{p.$asc-radius-full}; // pill
|
|
122
|
+
|
|
123
|
+
// ── Shadows ────────────────────────────────────────────────────────────────
|
|
124
|
+
--asc-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
125
|
+
--asc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
126
|
+
--asc-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
127
|
+
--asc-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
128
|
+
--asc-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
|
|
129
|
+
|
|
130
|
+
// ── font-size ────────────────────────────────────────────────────────────────
|
|
131
|
+
--asc-text-xs: #{p.$asc-text-xs};
|
|
132
|
+
--asc-text-sm: #{p.$asc-text-sm};
|
|
133
|
+
--asc-text-md: #{p.$asc-text-base};
|
|
134
|
+
--asc-text-lg: #{p.$asc-text-lg};
|
|
135
|
+
--asc-text-xl: #{p.$asc-text-xl};
|
|
136
|
+
|
|
137
|
+
// ── Transitions ────────────────────────────────────────────────────────────
|
|
138
|
+
--asc-transition-fast: #{p.$asc-duration-150} #{p.$asc-ease-in-out};
|
|
139
|
+
--asc-transition-base: #{p.$asc-duration-200} #{p.$asc-ease-in-out};
|
|
140
|
+
--asc-transition-slow: #{p.$asc-duration-300} #{p.$asc-ease-in-out};
|
|
141
|
+
|
|
142
|
+
// ── Z-index ────────────────────────────────────────────────────────────────
|
|
143
|
+
--asc-z-dropdown: 1000;
|
|
144
|
+
--asc-z-sticky: 1020;
|
|
145
|
+
--asc-z-fixed: 1030;
|
|
146
|
+
--asc-z-modal-bg: 1040;
|
|
147
|
+
--asc-z-modal: 1050;
|
|
148
|
+
--asc-z-popover: 1060;
|
|
149
|
+
--asc-z-tooltip: 1100;
|
|
150
|
+
--asc-z-toast: 1200;
|
|
151
|
+
|
|
152
|
+
// ── Component height scale ─────────────────────────────────────────────────
|
|
153
|
+
// Dùng cho input, button, select — đảm bảo align nhau
|
|
154
|
+
--asc-h-xs: 24px;
|
|
155
|
+
--asc-h-sm: 36px; // Figma Input small = 36px (trước 32px)
|
|
156
|
+
--asc-h-md: 40px; // Figma Input medium = 40px (trước 36px)
|
|
157
|
+
--asc-h-lg: 48px;
|
|
158
|
+
--asc-h-xl: 56px;
|
|
159
|
+
|
|
160
|
+
// ── Control typography scale ───────────────────────────────────────────────
|
|
161
|
+
// Cỡ chữ / line-height của giá trị trong form control theo size — nguồn
|
|
162
|
+
// duy nhất cho CẢ chế độ sửa (ô nhập) lẫn chế độ xem (span *-view) của
|
|
163
|
+
// input, select, datepicker, input-number, textarea, checkbox, radio.
|
|
164
|
+
// Figma Input: small 12px/18px, medium 14px/20px (weight 400).
|
|
165
|
+
--asc-control-font-size-xs: 12px;
|
|
166
|
+
--asc-control-font-size-sm: 12px;
|
|
167
|
+
--asc-control-font-size-md: 14px;
|
|
168
|
+
--asc-control-font-size-lg: 16px;
|
|
169
|
+
--asc-control-font-size-xl: 18px;
|
|
170
|
+
--asc-control-line-height-xs: 16px;
|
|
171
|
+
--asc-control-line-height-sm: 18px;
|
|
172
|
+
--asc-control-line-height-md: 20px;
|
|
173
|
+
--asc-control-line-height-lg: 24px;
|
|
174
|
+
--asc-control-line-height-xl: 28px;
|
|
175
|
+
|
|
176
|
+
// ── Button (Figma Button/Anatomy) ──────────────────────────────────────────
|
|
177
|
+
// Nền solid lấy từ theme primary (#F74036 / hover #E6271B) — xem preset.ts
|
|
178
|
+
--asc-button-solid-text: #FCFCFC; // button/solid/text-default
|
|
179
|
+
--asc-button-outline-border: #525252; // button/outline/border-default
|
|
180
|
+
--asc-button-outline-text: #262626; // button/outline/text-default
|
|
181
|
+
--asc-button-outline-bg-hover: #{p.$asc-grey-50}; // design chưa có — dùng Background.surface
|
|
182
|
+
--asc-button-outline-bg-active: #{p.$asc-grey-100};
|
|
183
|
+
--asc-button-disabled-opacity: 0.35; // disable: 35%
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// ── Dark mode overrides ──────────────────────────────────────────────────────
|
|
187
|
+
// Class `.app-dark` được toggle bởi AscThemeService trên <html>
|
|
188
|
+
.app-dark {
|
|
189
|
+
// Brand.default KHÔNG đổi giữa light/dark (vẫn brand-500) — chỉ hover/active
|
|
190
|
+
// nhạt dần cho hợp nền tối, theo đúng design-token-color.json (dark.Brand).
|
|
191
|
+
--asc-color-primary-lighter: #{p.$asc-brand-900}; // Background.brand-lv1 (dark)
|
|
192
|
+
--asc-color-primary-light: #{p.$asc-brand-800}; // Background.brand-lv2 (dark)
|
|
193
|
+
--asc-color-primary-subtle: #{p.$asc-brand-700};
|
|
194
|
+
--asc-color-primary: #{p.$asc-brand-500}; // Brand.default (dark) — không đổi so với light
|
|
195
|
+
--asc-color-primary-hover: #{p.$asc-brand-400}; // Brand.hover (dark)
|
|
196
|
+
--asc-color-primary-active: #{p.$asc-brand-300}; // Brand.secondary (dark)
|
|
197
|
+
|
|
198
|
+
--asc-color-success-bg: #{p.$asc-green-950}; // Background.green (dark)
|
|
199
|
+
--asc-color-warning-bg: #422006; // Background.yellow (dark)
|
|
200
|
+
--asc-color-danger-bg: #{p.$asc-brand-950}; // Background.red (dark) = #5c0a05
|
|
201
|
+
--asc-color-info-bg: #172554; // Background.blue (dark)
|
|
202
|
+
|
|
203
|
+
--asc-surface-ground: #0c0c0d; // Background.default (dark)
|
|
204
|
+
--asc-surface-base: #{p.$asc-grey-800}; // Background.surface (dark)
|
|
205
|
+
--asc-surface-translucent: #{rgba(p.$asc-grey-800, 0.95)}; // layout main / sidebar / table header (dark)
|
|
206
|
+
--asc-surface-overlay: #{p.$asc-grey-800};
|
|
207
|
+
--asc-surface-hover: #{p.$asc-grey-800};
|
|
208
|
+
--asc-surface-active: #{p.$asc-grey-700}; // Background.onSurface (dark)
|
|
209
|
+
|
|
210
|
+
// Form field (dark) — theo Figma Components: Input/* (dark)
|
|
211
|
+
--asc-formfield-bg: #{p.$asc-grey-800}; // Input/background/default = Background/surface
|
|
212
|
+
--asc-formfield-disabled-bg: #{p.$asc-grey-800}; // Input/background/disable
|
|
213
|
+
--asc-formfield-border-color: #{p.$asc-grey-700}; // Input/border/default
|
|
214
|
+
--asc-formfield-focus-border-color: #{p.$asc-grey-500}; // Input/border/focus = Border/secondary
|
|
215
|
+
--asc-formfield-disabled-border-color: #{p.$asc-grey-800}; // = nền disable
|
|
216
|
+
--asc-formfield-placeholder-color: #{p.$asc-grey-200}; // Input/text/unfill = Text/secondary
|
|
217
|
+
|
|
218
|
+
--asc-border-color: #{p.$asc-grey-700}; // Border.default (dark)
|
|
219
|
+
--asc-border-color-strong: #{p.$asc-grey-500}; // Border.secondary (dark)
|
|
220
|
+
--asc-border-color-focus: #{p.$asc-blue-500}; // Border.info (dark) — không đổi so với light
|
|
221
|
+
--asc-border-color-brand: #{p.$asc-brand-500}; // Border.brand (dark) — không đổi
|
|
222
|
+
|
|
223
|
+
--asc-text-primary: #{p.$asc-grey-10}; // Text.primary (dark)
|
|
224
|
+
--asc-table-header-color: #{p.$asc-grey-10}; // dark giữ như cũ (= Text.primary dark)
|
|
225
|
+
// Figma chưa có dark cho Table/* — giữ nền header như cũ, kẻ/hover theo tông tối
|
|
226
|
+
--asc-table-header-bg: var(--asc-surface-translucent);
|
|
227
|
+
--asc-table-header-divider-top: #{p.$asc-grey-700};
|
|
228
|
+
--asc-table-header-divider-bottom: #{p.$asc-grey-700};
|
|
229
|
+
--asc-table-row-hover-bg: #{p.$asc-grey-700};
|
|
230
|
+
--asc-paginator-border: #{p.$asc-grey-700}; // Pagination/border/default (dark) = Border/default
|
|
231
|
+
--asc-paginator-border-active: #{p.$asc-brand-500}; // Pagination/border/hover (dark) = Border/brand
|
|
232
|
+
--asc-sidebar-item-active-bg: #{rgba(#0c0c0d, 0.7)}; // Sidebar/background/Active (dark) = black/500
|
|
233
|
+
--asc-dialog-bg: #{rgba(#0c0c0d, 0.9)}; // Modal/background (dark) = Background/default
|
|
234
|
+
--asc-text-secondary: #{p.$asc-grey-200}; // Text.secondary (dark)
|
|
235
|
+
--asc-text-muted: #{p.$asc-grey-300}; // Text.tertiary (dark)
|
|
236
|
+
--asc-text-disabled: #{p.$asc-grey-600}; // Text.disable (dark)
|
|
237
|
+
--asc-text-placeholder: #{p.$asc-grey-300};
|
|
238
|
+
--asc-text-link: #{p.$asc-blue-500}; // Text.link (dark) — export Figma 2026-10-29
|
|
239
|
+
--asc-text-link-hover: #{p.$asc-blue-400}; // design chưa có hover — nhạt hơn 1 bậc trên nền tối
|
|
240
|
+
--asc-text-brand: #{p.$asc-brand-500}; // không đổi
|
|
241
|
+
|
|
242
|
+
--asc-icon-primary: #{p.$asc-grey-10};
|
|
243
|
+
--asc-icon-secondary: #{p.$asc-grey-400}; // không đổi so với light
|
|
244
|
+
--asc-icon-disabled: #{p.$asc-grey-600};
|
|
245
|
+
--asc-icon-brand: #{p.$asc-brand-500};
|
|
246
|
+
--asc-icon-link: #{p.$asc-blue-600}; // không đổi so với light
|
|
247
|
+
--asc-icon-danger: #{p.$asc-red-500};
|
|
248
|
+
--asc-icon-success: #{p.$asc-green-500};
|
|
249
|
+
--asc-icon-info: #{p.$asc-blue-500};
|
|
250
|
+
|
|
251
|
+
// Button outline (dark) — design chưa có, đảo sang tone sáng để đọc được trên nền tối
|
|
252
|
+
--asc-button-outline-border: #{p.$asc-grey-400};
|
|
253
|
+
--asc-button-outline-text: #{p.$asc-grey-10};
|
|
254
|
+
--asc-button-outline-bg-hover: #{p.$asc-grey-800};
|
|
255
|
+
--asc-button-outline-bg-active: #{p.$asc-grey-700};
|
|
256
|
+
|
|
257
|
+
--asc-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.3);
|
|
258
|
+
--asc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.4);
|
|
259
|
+
--asc-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
|
|
260
|
+
--asc-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
|
|
261
|
+
--asc-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.4);
|
|
262
|
+
}
|
package/tokens/layout/_main.scss
CHANGED
package/tokens/preset.css
CHANGED
|
@@ -161,6 +161,16 @@
|
|
|
161
161
|
--asc-h-md: 40px;
|
|
162
162
|
--asc-h-lg: 48px;
|
|
163
163
|
--asc-h-xl: 56px;
|
|
164
|
+
--asc-control-font-size-xs: 12px;
|
|
165
|
+
--asc-control-font-size-sm: 12px;
|
|
166
|
+
--asc-control-font-size-md: 14px;
|
|
167
|
+
--asc-control-font-size-lg: 16px;
|
|
168
|
+
--asc-control-font-size-xl: 18px;
|
|
169
|
+
--asc-control-line-height-xs: 16px;
|
|
170
|
+
--asc-control-line-height-sm: 18px;
|
|
171
|
+
--asc-control-line-height-md: 20px;
|
|
172
|
+
--asc-control-line-height-lg: 24px;
|
|
173
|
+
--asc-control-line-height-xl: 28px;
|
|
164
174
|
--asc-button-solid-text: #FCFCFC;
|
|
165
175
|
--asc-button-outline-border: #525252;
|
|
166
176
|
--asc-button-outline-text: #262626;
|
|
@@ -797,6 +807,7 @@ a {
|
|
|
797
807
|
padding: 1.5rem 1.5rem 2rem;
|
|
798
808
|
background-color: var(--asc-surface-translucent);
|
|
799
809
|
border-radius: 1.25rem;
|
|
810
|
+
margin-bottom: 1rem;
|
|
800
811
|
}
|
|
801
812
|
|
|
802
813
|
img {
|