@aseansc/ui 5.1.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/CHANGELOG.md +42 -0
- package/fesm2022/aseansc-ui.mjs +98 -41
- package/fesm2022/aseansc-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/tokens/_semantic.scss +213 -191
- package/tokens/layout/_menu.scss +5 -3
- package/tokens/preset.css +22 -5
- package/types/aseansc-ui.d.ts +18 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aseansc/ui",
|
|
3
|
-
"version": "5.1
|
|
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",
|
package/tokens/_semantic.scss
CHANGED
|
@@ -1,191 +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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
--asc-
|
|
49
|
-
--asc-
|
|
50
|
-
--asc-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
--asc-
|
|
55
|
-
--asc-
|
|
56
|
-
--asc-
|
|
57
|
-
--asc-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
--asc-text-
|
|
61
|
-
--asc-text-
|
|
62
|
-
--asc-text-
|
|
63
|
-
--asc-text-
|
|
64
|
-
--asc-
|
|
65
|
-
--asc-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
--asc-
|
|
70
|
-
--asc-
|
|
71
|
-
--asc-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
--asc-
|
|
75
|
-
--asc-icon-
|
|
76
|
-
--asc-icon-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
--asc-
|
|
80
|
-
|
|
81
|
-
--asc-
|
|
82
|
-
--asc-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
--asc-
|
|
88
|
-
--asc-
|
|
89
|
-
--asc-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
--asc-
|
|
95
|
-
--asc-
|
|
96
|
-
--asc-
|
|
97
|
-
--asc-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
//
|
|
101
|
-
--asc-
|
|
102
|
-
--asc-
|
|
103
|
-
--asc-
|
|
104
|
-
--asc-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
--asc-
|
|
109
|
-
--asc-
|
|
110
|
-
--asc-
|
|
111
|
-
--asc-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
--asc-
|
|
116
|
-
--asc-
|
|
117
|
-
--asc-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
--asc-
|
|
122
|
-
--asc-
|
|
123
|
-
--asc-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
--asc-z-
|
|
127
|
-
--asc-z-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
--asc-
|
|
132
|
-
--asc-
|
|
133
|
-
--asc-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
//
|
|
139
|
-
//
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
--asc-
|
|
146
|
-
--asc-
|
|
147
|
-
--asc-
|
|
148
|
-
--asc-
|
|
149
|
-
|
|
150
|
-
--asc-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
--asc-
|
|
159
|
-
--asc-
|
|
160
|
-
|
|
161
|
-
--asc-
|
|
162
|
-
--asc-
|
|
163
|
-
--asc-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
--asc-
|
|
167
|
-
--asc-
|
|
168
|
-
--asc-
|
|
169
|
-
|
|
170
|
-
--asc-
|
|
171
|
-
//
|
|
172
|
-
|
|
173
|
-
--asc-
|
|
174
|
-
--asc-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
--asc-
|
|
178
|
-
--asc-
|
|
179
|
-
--asc-
|
|
180
|
-
|
|
181
|
-
--asc-
|
|
182
|
-
--asc-
|
|
183
|
-
--asc-
|
|
184
|
-
--asc-
|
|
185
|
-
|
|
186
|
-
--asc-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
--asc-
|
|
190
|
-
--asc-
|
|
191
|
-
}
|
|
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
|
+
}
|
package/tokens/layout/_menu.scss
CHANGED
|
@@ -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:
|
|
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
|
|
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:
|
|
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
|
@@ -79,6 +79,11 @@
|
|
|
79
79
|
--asc-surface-0: #ffffff;
|
|
80
80
|
--asc-surface-50: #ffffff;
|
|
81
81
|
--asc-formfield-bg: #ffffff;
|
|
82
|
+
--asc-formfield-focus-border-color: #a7a7a8;
|
|
83
|
+
--asc-formfield-disabled-border-color: #f2f3f5;
|
|
84
|
+
--asc-input-clear-bg: #dedfe0;
|
|
85
|
+
--asc-input-clear-bg-hover: #c0c0c2;
|
|
86
|
+
--asc-input-clear-color: #ffffff;
|
|
82
87
|
--asc-border-color: #dedfe0;
|
|
83
88
|
--asc-border-color-strong: #a7a7a8;
|
|
84
89
|
--asc-border-color-focus: #3b82f6;
|
|
@@ -141,10 +146,16 @@
|
|
|
141
146
|
--asc-z-tooltip: 1100;
|
|
142
147
|
--asc-z-toast: 1200;
|
|
143
148
|
--asc-h-xs: 24px;
|
|
144
|
-
--asc-h-sm:
|
|
145
|
-
--asc-h-md:
|
|
149
|
+
--asc-h-sm: 36px;
|
|
150
|
+
--asc-h-md: 40px;
|
|
146
151
|
--asc-h-lg: 48px;
|
|
147
152
|
--asc-h-xl: 56px;
|
|
153
|
+
--asc-button-solid-text: #FCFCFC;
|
|
154
|
+
--asc-button-outline-border: #525252;
|
|
155
|
+
--asc-button-outline-text: #262626;
|
|
156
|
+
--asc-button-outline-bg-hover: #f2f3f5;
|
|
157
|
+
--asc-button-outline-bg-active: #dedfe0;
|
|
158
|
+
--asc-button-disabled-opacity: 0.35;
|
|
148
159
|
}
|
|
149
160
|
|
|
150
161
|
.app-dark {
|
|
@@ -169,6 +180,7 @@
|
|
|
169
180
|
--asc-border-color-brand: #f74036;
|
|
170
181
|
--asc-text-primary: #fafafc;
|
|
171
182
|
--asc-table-header-color: #fafafc;
|
|
183
|
+
--asc-text-secondary: #c0c0c2;
|
|
172
184
|
--asc-text-muted: #a7a7a8;
|
|
173
185
|
--asc-text-disabled: #5b5b5c;
|
|
174
186
|
--asc-text-placeholder: #a7a7a8;
|
|
@@ -183,6 +195,10 @@
|
|
|
183
195
|
--asc-icon-danger: #ef4444;
|
|
184
196
|
--asc-icon-success: #10b981;
|
|
185
197
|
--asc-icon-info: #3b82f6;
|
|
198
|
+
--asc-button-outline-border: #8d8e8f;
|
|
199
|
+
--asc-button-outline-text: #fafafc;
|
|
200
|
+
--asc-button-outline-bg-hover: #282829;
|
|
201
|
+
--asc-button-outline-bg-active: #424242;
|
|
186
202
|
--asc-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.3);
|
|
187
203
|
--asc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.4);
|
|
188
204
|
--asc-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
|
|
@@ -932,20 +948,21 @@ img {
|
|
|
932
948
|
transition: transform var(--layout-section-transition-duration), left var(--layout-section-transition-duration);
|
|
933
949
|
background-color: var(--asc-surface-base);
|
|
934
950
|
border-radius: 20px;
|
|
951
|
+
padding: var(--layout-sidebar-padding-y, 16px) var(--layout-sidebar-padding-x, 12px);
|
|
935
952
|
}
|
|
936
953
|
|
|
937
954
|
.layout-sidebar-logo {
|
|
938
955
|
flex-shrink: 0;
|
|
939
956
|
display: flex;
|
|
940
957
|
align-items: center;
|
|
941
|
-
padding:
|
|
958
|
+
padding: 0 0 var(--layout-sidebar-padding-y, 16px);
|
|
942
959
|
}
|
|
943
960
|
|
|
944
961
|
.layout-sidebar-content {
|
|
945
962
|
flex: 1 1 auto;
|
|
946
963
|
min-height: 0;
|
|
947
964
|
overflow-y: auto;
|
|
948
|
-
padding: 0
|
|
965
|
+
padding: 0;
|
|
949
966
|
}
|
|
950
967
|
|
|
951
968
|
.layout-menu {
|
|
@@ -999,7 +1016,7 @@ img {
|
|
|
999
1016
|
outline: 0 none;
|
|
1000
1017
|
color: var(--text-color);
|
|
1001
1018
|
cursor: pointer;
|
|
1002
|
-
padding:
|
|
1019
|
+
padding: 10px 8px;
|
|
1003
1020
|
border-radius: var(--content-border-radius);
|
|
1004
1021
|
transition: background-color var(--element-transition-duration), box-shadow var(--element-transition-duration);
|
|
1005
1022
|
}
|
package/types/aseansc-ui.d.ts
CHANGED
|
@@ -674,9 +674,20 @@ declare class AscFormFieldComponent implements AfterContentInit {
|
|
|
674
674
|
readonly layout: _angular_core.InputSignal<AscFormLayout>;
|
|
675
675
|
/**
|
|
676
676
|
* Width cột label khi `layout="horizontal"` — nhận bất kỳ CSS length nào (`'10rem'`, `'160px'`, `'20%'`).
|
|
677
|
+
* Không truyền → không gắn inline style, width lấy theo CSS custom property
|
|
678
|
+
* `--asc-field-label-width` (đặt global hoặc theo vùng), fallback `max-content`.
|
|
677
679
|
* Không ảnh hưởng layout `vertical`/`inline`.
|
|
678
680
|
*/
|
|
679
|
-
readonly labelWidth: _angular_core.InputSignal<string>;
|
|
681
|
+
readonly labelWidth: _angular_core.InputSignal<string | undefined>;
|
|
682
|
+
/** Icon trước label (class icon, vd `'pi pi-user'`) — chỉ áp dụng typeLabel='default' */
|
|
683
|
+
readonly labelIcon: _angular_core.InputSignal<string>;
|
|
684
|
+
/** Icon sau label, trước dấu * (vd `'pi pi-info-circle'`) — chỉ áp dụng typeLabel='default' */
|
|
685
|
+
readonly labelSuffixIcon: _angular_core.InputSignal<string>;
|
|
686
|
+
/**
|
|
687
|
+
* Tooltip gắn vào icon sau label. Truyền tooltip mà không truyền `labelSuffixIcon`
|
|
688
|
+
* → tự hiện icon `pi pi-info-circle`.
|
|
689
|
+
*/
|
|
690
|
+
readonly labelTooltip: _angular_core.InputSignal<string>;
|
|
680
691
|
/**
|
|
681
692
|
* Ẩn label text.
|
|
682
693
|
* Dùng khi typeLabel='FloatLabel'/'IftaLabel' và label đã được hiển thị bên trong.
|
|
@@ -718,12 +729,17 @@ declare class AscFormFieldComponent implements AfterContentInit {
|
|
|
718
729
|
* → chỉ cần set ở 1 trong 2 nơi (thường là ngay trên control), không cần lặp lại.
|
|
719
730
|
*/
|
|
720
731
|
protected readonly resolvedMode: _angular_core.Signal<"edit" | "view">;
|
|
732
|
+
protected readonly resolvedLabelSuffixIcon: _angular_core.Signal<string>;
|
|
733
|
+
/** Dấu * bắt buộc — ẩn ở mode view (chỉ đọc, không cần nhập) */
|
|
734
|
+
protected readonly showRequiredMark: _angular_core.Signal<boolean>;
|
|
735
|
+
/** Chữ "(tùy chọn)" — ẩn ở mode view */
|
|
736
|
+
protected readonly showOptionalMark: _angular_core.Signal<boolean>;
|
|
721
737
|
/** true nếu control bên trong đang disabled — form-field tự đọc qua ContentChild, không cần set thủ công */
|
|
722
738
|
protected readonly resolvedDisabled: _angular_core.Signal<boolean>;
|
|
723
739
|
protected readonly hostCls: _angular_core.Signal<string>;
|
|
724
740
|
ngAfterContentInit(): void;
|
|
725
741
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AscFormFieldComponent, never>;
|
|
726
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AscFormFieldComponent, "asc-form-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "typeLabel": { "alias": "typeLabel"; "required": false; "isSignal": true; }; "layout": { "alias": "layout"; "required": false; "isSignal": true; }; "labelWidth": { "alias": "labelWidth"; "required": false; "isSignal": true; }; "hideLabel": { "alias": "hideLabel"; "required": false; "isSignal": true; }; "optional": { "alias": "optional"; "required": false; "isSignal": true; }; "forId": { "alias": "forId"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; }, {}, ["_innerControl"], ["*"], true, never>;
|
|
742
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AscFormFieldComponent, "asc-form-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "typeLabel": { "alias": "typeLabel"; "required": false; "isSignal": true; }; "layout": { "alias": "layout"; "required": false; "isSignal": true; }; "labelWidth": { "alias": "labelWidth"; "required": false; "isSignal": true; }; "labelIcon": { "alias": "labelIcon"; "required": false; "isSignal": true; }; "labelSuffixIcon": { "alias": "labelSuffixIcon"; "required": false; "isSignal": true; }; "labelTooltip": { "alias": "labelTooltip"; "required": false; "isSignal": true; }; "hideLabel": { "alias": "hideLabel"; "required": false; "isSignal": true; }; "optional": { "alias": "optional"; "required": false; "isSignal": true; }; "forId": { "alias": "forId"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; }, {}, ["_innerControl"], ["*"], true, never>;
|
|
727
743
|
}
|
|
728
744
|
|
|
729
745
|
declare class AscInputComponent extends BaseControlAccessor<string> {
|