@aseansc/ui 4.0.0
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 +966 -0
- package/README.md +1018 -0
- package/fesm2022/aseansc-ui.mjs +10524 -0
- package/fesm2022/aseansc-ui.mjs.map +1 -0
- package/package.json +50 -0
- package/tokens/_primitive.scss +155 -0
- package/tokens/_semantic.scss +187 -0
- package/tokens/_typography.scss +106 -0
- package/tokens/fonts/inter-latin-ext.woff2 +0 -0
- package/tokens/fonts/inter-latin.woff2 +0 -0
- package/tokens/fonts/inter-vietnamese.woff2 +0 -0
- package/tokens/index.scss +14 -0
- package/tokens/layout/_core.scss +24 -0
- package/tokens/layout/_footer.scss +8 -0
- package/tokens/layout/_main.scss +19 -0
- package/tokens/layout/_menu.scss +151 -0
- package/tokens/layout/_mixins.scss +15 -0
- package/tokens/layout/_preloading.scss +49 -0
- package/tokens/layout/_responsive.scss +110 -0
- package/tokens/layout/_topbar.scss +159 -0
- package/tokens/layout/_typography.scss +68 -0
- package/tokens/layout/_utils.scss +25 -0
- package/tokens/layout/layout.scss +13 -0
- package/tokens/layout/variables/_common.scss +20 -0
- package/tokens/layout/variables/_dark.scss +5 -0
- package/tokens/layout/variables/_light.scss +5 -0
- package/tokens/preset.css +1276 -0
- package/tokens/preset.scss +122 -0
- package/types/aseansc-ui.d.ts +3148 -0
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aseansc/ui",
|
|
3
|
+
"version": "4.0.0",
|
|
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
|
+
"license": "UNLICENSED",
|
|
6
|
+
"author": "ASC Team",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"angular",
|
|
9
|
+
"ui",
|
|
10
|
+
"components",
|
|
11
|
+
"primeng",
|
|
12
|
+
"tailwindcss"
|
|
13
|
+
],
|
|
14
|
+
"sideEffects": [
|
|
15
|
+
"*.css"
|
|
16
|
+
],
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"tailwindcss-primeui": "^0.6.1",
|
|
19
|
+
"prismjs": "^1.30.0",
|
|
20
|
+
"tslib": "^2.3.0"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"@angular/core": "^22.0.0",
|
|
24
|
+
"@angular/common": "^22.0.0",
|
|
25
|
+
"@angular/platform-browser": "^22.0.0",
|
|
26
|
+
"@angular/cdk": "^22.0.0",
|
|
27
|
+
"primeng": "^21.0.0",
|
|
28
|
+
"primeicons": ">=7.0.0",
|
|
29
|
+
"@tailwindcss/postcss": ">=4.0.0",
|
|
30
|
+
"tailwindcss": ">=4.0.0",
|
|
31
|
+
"@primeuix/themes": ">=2.0.0 <3.0.0"
|
|
32
|
+
},
|
|
33
|
+
"module": "fesm2022/aseansc-ui.mjs",
|
|
34
|
+
"typings": "types/aseansc-ui.d.ts",
|
|
35
|
+
"exports": {
|
|
36
|
+
"./package.json": {
|
|
37
|
+
"default": "./package.json"
|
|
38
|
+
},
|
|
39
|
+
".": {
|
|
40
|
+
"types": "./types/aseansc-ui.d.ts",
|
|
41
|
+
"default": "./fesm2022/aseansc-ui.mjs"
|
|
42
|
+
},
|
|
43
|
+
"./preset.css": {
|
|
44
|
+
"sass": "./tokens/preset.css",
|
|
45
|
+
"style": "./tokens/preset.css",
|
|
46
|
+
"default": "./tokens/preset.css"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"type": "module"
|
|
50
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
2
|
+
// Layer 1 — Primitive Tokens
|
|
3
|
+
//
|
|
4
|
+
// Raw values. KHÔNG dùng trực tiếp trong component styles.
|
|
5
|
+
// Chỉ được reference bởi Layer 2 (semantic tokens).
|
|
6
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
7
|
+
|
|
8
|
+
// ── Brand palette (#f74036) — nguồn: Figma "Design System — Thư viện Hệ thống
|
|
9
|
+
// nội bộ" (ASC design-system -new.md, 2026-09-08). Thay toàn bộ giá trị cũ
|
|
10
|
+
// (suy đoán từ tints.dev) bằng giá trị chính thức từ design. ──────────────────
|
|
11
|
+
$asc-brand-50: #ffebea;
|
|
12
|
+
$asc-brand-100: #ffd8d6;
|
|
13
|
+
$asc-brand-200: #ffb1ac;
|
|
14
|
+
$asc-brand-300: #ff8983;
|
|
15
|
+
$asc-brand-400: #ff6259;
|
|
16
|
+
$asc-brand-500: #f74036;
|
|
17
|
+
$asc-brand-600: #e6271b;
|
|
18
|
+
$asc-brand-700: #b7251d;
|
|
19
|
+
$asc-brand-800: #921a13;
|
|
20
|
+
$asc-brand-900: #6e0f0a;
|
|
21
|
+
$asc-brand-950: #5c0a05;
|
|
22
|
+
|
|
23
|
+
// ── Grey (neutral / surface chính — thay cho Slate, khớp design-token-color.json) ──
|
|
24
|
+
$asc-grey-10: #fafafc;
|
|
25
|
+
$asc-grey-50: #f2f3f5;
|
|
26
|
+
$asc-grey-100: #dedfe0;
|
|
27
|
+
$asc-grey-200: #c0c0c2;
|
|
28
|
+
$asc-grey-300: #a7a7a8;
|
|
29
|
+
$asc-grey-400: #8d8e8f;
|
|
30
|
+
$asc-grey-500: #747475;
|
|
31
|
+
$asc-grey-600: #5b5b5c;
|
|
32
|
+
$asc-grey-700: #424242;
|
|
33
|
+
$asc-grey-800: #282829;
|
|
34
|
+
$asc-grey-900: #0f0f0f;
|
|
35
|
+
|
|
36
|
+
// ── Slate — giữ lại (không xoá để tránh vỡ chỗ khác lỡ còn dùng), nhưng
|
|
37
|
+
// _semantic.scss không còn reference family này cho surface/border/text nữa —
|
|
38
|
+
// dùng $asc-grey-* ở trên thay thế (khớp đúng design, Slate chỉ là suy đoán cũ). ──
|
|
39
|
+
$asc-slate-50: #f8fafc;
|
|
40
|
+
$asc-slate-100: #f1f5f9;
|
|
41
|
+
$asc-slate-200: #e2e8f0;
|
|
42
|
+
$asc-slate-300: #cbd5e1;
|
|
43
|
+
$asc-slate-400: #94a3b8;
|
|
44
|
+
$asc-slate-500: #64748b;
|
|
45
|
+
$asc-slate-600: #475569;
|
|
46
|
+
$asc-slate-700: #334155;
|
|
47
|
+
$asc-slate-800: #1e293b;
|
|
48
|
+
$asc-slate-900: #0f172a;
|
|
49
|
+
$asc-slate-950: #020617;
|
|
50
|
+
|
|
51
|
+
// ── Green — giữ lại (không xoá), nhưng success giờ dùng Emerald (đúng design) ──
|
|
52
|
+
$asc-green-50: #f0fdf4;
|
|
53
|
+
$asc-green-100: #dcfce7;
|
|
54
|
+
$asc-green-500: #22c55e;
|
|
55
|
+
$asc-green-600: #16a34a;
|
|
56
|
+
$asc-green-700: #15803d;
|
|
57
|
+
|
|
58
|
+
// ── Emerald (success — theo design-token-color.json: success = #10b981) ──────
|
|
59
|
+
$asc-emerald-50: #ecfdf5;
|
|
60
|
+
$asc-emerald-500: #10b981;
|
|
61
|
+
$asc-emerald-600: #059669;
|
|
62
|
+
|
|
63
|
+
// ── Amber (warning — theo design-token-color.json: warning = #f59e0b) ────────
|
|
64
|
+
$asc-amber-500: #f59e0b;
|
|
65
|
+
|
|
66
|
+
// ── Yellow — vẫn dùng cho Background/yellow (bg nhạt của warning) ────────────
|
|
67
|
+
$asc-yellow-50: #fefce8;
|
|
68
|
+
$asc-yellow-100: #fef9c3;
|
|
69
|
+
$asc-yellow-500: #eab308;
|
|
70
|
+
$asc-yellow-600: #ca8a04;
|
|
71
|
+
$asc-yellow-700: #a16207;
|
|
72
|
+
|
|
73
|
+
// ── Blue (info/link) ──────────────────────────────────────────────────────────
|
|
74
|
+
$asc-blue-50: #eff6ff;
|
|
75
|
+
$asc-blue-100: #dbeafe;
|
|
76
|
+
$asc-blue-400: #60a5fa;
|
|
77
|
+
$asc-blue-500: #3b82f6;
|
|
78
|
+
$asc-blue-600: #2563eb;
|
|
79
|
+
$asc-blue-700: #1d4ed8;
|
|
80
|
+
|
|
81
|
+
// ── Red (danger) ──────────────────────────────────────────────────────────────
|
|
82
|
+
$asc-red-50: #fef2f2;
|
|
83
|
+
$asc-red-100: #fee2e2;
|
|
84
|
+
$asc-red-500: #ef4444;
|
|
85
|
+
$asc-red-600: #dc2626;
|
|
86
|
+
|
|
87
|
+
// ── White / Black ─────────────────────────────────────────────────────────────
|
|
88
|
+
$asc-white: #ffffff;
|
|
89
|
+
$asc-black: #000000;
|
|
90
|
+
|
|
91
|
+
// ── Spacing scale ─────────────────────────────────────────────────────────────
|
|
92
|
+
$asc-space-0: 0;
|
|
93
|
+
$asc-space-px: 1px;
|
|
94
|
+
$asc-space-0_5: 2px;
|
|
95
|
+
$asc-space-1: 4px;
|
|
96
|
+
$asc-space-1_5: 6px;
|
|
97
|
+
$asc-space-2: 8px;
|
|
98
|
+
$asc-space-2_5: 10px;
|
|
99
|
+
$asc-space-3: 12px;
|
|
100
|
+
$asc-space-3_5: 14px;
|
|
101
|
+
$asc-space-4: 16px;
|
|
102
|
+
$asc-space-5: 20px;
|
|
103
|
+
$asc-space-6: 24px;
|
|
104
|
+
$asc-space-7: 28px;
|
|
105
|
+
$asc-space-8: 32px;
|
|
106
|
+
$asc-space-10: 40px;
|
|
107
|
+
$asc-space-12: 48px;
|
|
108
|
+
$asc-space-16: 64px;
|
|
109
|
+
|
|
110
|
+
// ── Font sizes ────────────────────────────────────────────────────────────────
|
|
111
|
+
$asc-text-xs: 12px;
|
|
112
|
+
$asc-text-sm: 14px;
|
|
113
|
+
$asc-text-base: 16px;
|
|
114
|
+
$asc-text-lg: 18px;
|
|
115
|
+
$asc-text-xl: 20px;
|
|
116
|
+
$asc-text-2xl: 24px;
|
|
117
|
+
$asc-text-3xl: 30px;
|
|
118
|
+
$asc-text-4xl: 36px;
|
|
119
|
+
|
|
120
|
+
// ── Font weights ──────────────────────────────────────────────────────────────
|
|
121
|
+
$asc-font-normal: 400;
|
|
122
|
+
$asc-font-medium: 500;
|
|
123
|
+
$asc-font-semibold: 600;
|
|
124
|
+
$asc-font-bold: 700;
|
|
125
|
+
|
|
126
|
+
// ── Line heights ──────────────────────────────────────────────────────────────
|
|
127
|
+
$asc-leading-tight: 1.25;
|
|
128
|
+
$asc-leading-snug: 1.375;
|
|
129
|
+
$asc-leading-normal: 1.5;
|
|
130
|
+
$asc-leading-relaxed: 1.625;
|
|
131
|
+
|
|
132
|
+
// ── Border radius ─────────────────────────────────────────────────────────────
|
|
133
|
+
$asc-radius-none: 0;
|
|
134
|
+
$asc-radius-sm: 2px;
|
|
135
|
+
$asc-radius-base: 4px;
|
|
136
|
+
$asc-radius-md: 6px;
|
|
137
|
+
$asc-radius-lg: 8px;
|
|
138
|
+
$asc-radius-xl: 12px;
|
|
139
|
+
$asc-radius-2xl: 16px;
|
|
140
|
+
$asc-radius-3xl: 24px;
|
|
141
|
+
$asc-radius-full: 9999px;
|
|
142
|
+
|
|
143
|
+
// ── Duration ──────────────────────────────────────────────────────────────────
|
|
144
|
+
$asc-duration-75: 75ms;
|
|
145
|
+
$asc-duration-100: 100ms;
|
|
146
|
+
$asc-duration-150: 150ms;
|
|
147
|
+
$asc-duration-200: 200ms;
|
|
148
|
+
$asc-duration-300: 300ms;
|
|
149
|
+
$asc-duration-500: 500ms;
|
|
150
|
+
|
|
151
|
+
// ── Easing ────────────────────────────────────────────────────────────────────
|
|
152
|
+
$asc-ease-linear: linear;
|
|
153
|
+
$asc-ease-in: cubic-bezier(0.4, 0, 1, 1);
|
|
154
|
+
$asc-ease-out: cubic-bezier(0, 0, 0.2, 1);
|
|
155
|
+
$asc-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
@@ -0,0 +1,187 @@
|
|
|
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-50: #{p.$asc-grey-50};
|
|
43
|
+
|
|
44
|
+
// ── Color: Border — Border.* (design-token-color.json) ──────────────────────
|
|
45
|
+
--asc-border-color: #{p.$asc-grey-100}; // Border.default
|
|
46
|
+
--asc-border-color-strong: #{p.$asc-grey-300}; // Border.secondary
|
|
47
|
+
--asc-border-color-focus: #{p.$asc-blue-500}; // Border.info
|
|
48
|
+
--asc-border-color-invalid: #{p.$asc-red-500}; // Border.danger
|
|
49
|
+
--asc-border-color-brand: #{p.$asc-brand-500}; // Border.brand — token trước đây chưa có
|
|
50
|
+
|
|
51
|
+
// ── Color: Text — Text.* (design-token-color.json) ───────────────────────────
|
|
52
|
+
--asc-text-primary: #{p.$asc-grey-900}; // Text.primary
|
|
53
|
+
--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)
|
|
54
|
+
--asc-text-muted: #{p.$asc-grey-500}; // Text.tertiary
|
|
55
|
+
--asc-text-disabled: #{p.$asc-grey-200}; // Text.disable
|
|
56
|
+
--asc-text-inverse: #{p.$asc-white}; // Text.reverse
|
|
57
|
+
--asc-text-placeholder: #{p.$asc-grey-500};
|
|
58
|
+
--asc-text-link: #{p.$asc-blue-600}; // Text.link — ĐỔI: link giờ là xanh dương, không còn dùng brand đỏ
|
|
59
|
+
--asc-text-link-hover: #{p.$asc-blue-700};
|
|
60
|
+
--asc-text-invalid: #{p.$asc-red-500}; // Text.danger
|
|
61
|
+
--asc-text-brand: #{p.$asc-brand-500}; // Text.brand — token mới, tách riêng khỏi link
|
|
62
|
+
|
|
63
|
+
// ── Color: Icon — Icon.* (design-token-color.json) — tier mới, trước đây
|
|
64
|
+
// component tự tái dùng --asc-text-*, giờ có set riêng theo đúng design ──────
|
|
65
|
+
--asc-icon-primary: #{p.$asc-grey-900};
|
|
66
|
+
--asc-icon-secondary: #{p.$asc-grey-400};
|
|
67
|
+
--asc-icon-disabled: #{p.$asc-grey-200};
|
|
68
|
+
--asc-icon-brand: #{p.$asc-brand-500};
|
|
69
|
+
--asc-icon-link: #{p.$asc-blue-600};
|
|
70
|
+
--asc-icon-danger: #{p.$asc-red-500};
|
|
71
|
+
--asc-icon-success: #{p.$asc-emerald-500};
|
|
72
|
+
--asc-icon-info: #{p.$asc-blue-500};
|
|
73
|
+
|
|
74
|
+
// ── Typography ─────────────────────────────────────────────────────────────
|
|
75
|
+
--asc-font-family: 'Inter', -apple-system, BlinkMacSystemFont,
|
|
76
|
+
'Segoe UI', sans-serif;
|
|
77
|
+
--asc-font-family-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
|
|
78
|
+
--asc-font-size-base: #{p.$asc-text-sm}; // 14px — base cho components
|
|
79
|
+
--asc-line-height-base: #{p.$asc-leading-normal};
|
|
80
|
+
|
|
81
|
+
// ── Spacing ────────────────────────────────────────────────────────────────
|
|
82
|
+
// Component internal spacing — dùng trong padding/gap của component
|
|
83
|
+
--asc-space-component-xs: #{p.$asc-space-1}; // 4px
|
|
84
|
+
--asc-space-component-sm: #{p.$asc-space-2}; // 8px
|
|
85
|
+
--asc-space-component-md: #{p.$asc-space-3}; // 12px
|
|
86
|
+
--asc-space-component-lg: #{p.$asc-space-4}; // 16px
|
|
87
|
+
--asc-space-component-xl: #{p.$asc-space-6}; // 24px
|
|
88
|
+
|
|
89
|
+
// ── Border radius ──────────────────────────────────────────────────────────
|
|
90
|
+
--asc-radius-sm: #{p.$asc-radius-base}; // 4px — badge, tag
|
|
91
|
+
--asc-radius-md: #{p.$asc-radius-md}; // 6px — input, button
|
|
92
|
+
--asc-radius-lg: #{p.$asc-radius-lg}; // 8px — card, panel
|
|
93
|
+
--asc-radius-xl: #{p.$asc-radius-xl}; // 12px — dialog
|
|
94
|
+
--asc-radius-full: #{p.$asc-radius-full}; // pill
|
|
95
|
+
|
|
96
|
+
// ── Shadows ────────────────────────────────────────────────────────────────
|
|
97
|
+
--asc-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
98
|
+
--asc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
99
|
+
--asc-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
100
|
+
--asc-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
101
|
+
--asc-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
|
|
102
|
+
|
|
103
|
+
// ── font-size ────────────────────────────────────────────────────────────────
|
|
104
|
+
--asc-text-xs: #{p.$asc-text-xs};
|
|
105
|
+
--asc-text-sm: #{p.$asc-text-sm};
|
|
106
|
+
--asc-text-md: #{p.$asc-text-base};
|
|
107
|
+
--asc-text-lg: #{p.$asc-text-lg};
|
|
108
|
+
--asc-text-xl: #{p.$asc-text-xl};
|
|
109
|
+
|
|
110
|
+
// ── Transitions ────────────────────────────────────────────────────────────
|
|
111
|
+
--asc-transition-fast: #{p.$asc-duration-150} #{p.$asc-ease-in-out};
|
|
112
|
+
--asc-transition-base: #{p.$asc-duration-200} #{p.$asc-ease-in-out};
|
|
113
|
+
--asc-transition-slow: #{p.$asc-duration-300} #{p.$asc-ease-in-out};
|
|
114
|
+
|
|
115
|
+
// ── Z-index ────────────────────────────────────────────────────────────────
|
|
116
|
+
--asc-z-dropdown: 1000;
|
|
117
|
+
--asc-z-sticky: 1020;
|
|
118
|
+
--asc-z-fixed: 1030;
|
|
119
|
+
--asc-z-modal-bg: 1040;
|
|
120
|
+
--asc-z-modal: 1050;
|
|
121
|
+
--asc-z-popover: 1060;
|
|
122
|
+
--asc-z-tooltip: 1100;
|
|
123
|
+
--asc-z-toast: 1200;
|
|
124
|
+
|
|
125
|
+
// ── Component height scale ─────────────────────────────────────────────────
|
|
126
|
+
// Dùng cho input, button, select — đảm bảo align nhau
|
|
127
|
+
--asc-h-xs: 24px;
|
|
128
|
+
--asc-h-sm: 32px;
|
|
129
|
+
--asc-h-md: 36px;
|
|
130
|
+
--asc-h-lg: 48px;
|
|
131
|
+
--asc-h-xl: 56px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// ── Dark mode overrides ──────────────────────────────────────────────────────
|
|
135
|
+
// Class `.app-dark` được toggle bởi AscThemeService trên <html>
|
|
136
|
+
.app-dark {
|
|
137
|
+
// Brand.default KHÔNG đổi giữa light/dark (vẫn brand-500) — chỉ hover/active
|
|
138
|
+
// nhạt dần cho hợp nền tối, theo đúng design-token-color.json (dark.Brand).
|
|
139
|
+
--asc-color-primary-lighter: #{p.$asc-brand-900}; // Background.brand-lv1 (dark)
|
|
140
|
+
--asc-color-primary-light: #{p.$asc-brand-800}; // Background.brand-lv2 (dark)
|
|
141
|
+
--asc-color-primary-subtle: #{p.$asc-brand-700};
|
|
142
|
+
--asc-color-primary: #{p.$asc-brand-500}; // Brand.default (dark) — không đổi so với light
|
|
143
|
+
--asc-color-primary-hover: #{p.$asc-brand-400}; // Brand.hover (dark)
|
|
144
|
+
--asc-color-primary-active: #{p.$asc-brand-300}; // Brand.secondary (dark)
|
|
145
|
+
|
|
146
|
+
--asc-color-success-bg: #022c22; // Background.green (dark)
|
|
147
|
+
--asc-color-warning-bg: #422006; // Background.yellow (dark)
|
|
148
|
+
--asc-color-danger-bg: #{p.$asc-brand-950}; // Background.red (dark) = #5c0a05
|
|
149
|
+
--asc-color-info-bg: #172554; // Background.blue (dark)
|
|
150
|
+
|
|
151
|
+
--asc-surface-ground: #0c0c0d; // Background.default (dark)
|
|
152
|
+
--asc-surface-base: #{p.$asc-grey-800}; // Background.surface (dark)
|
|
153
|
+
--asc-surface-overlay: #{p.$asc-grey-800};
|
|
154
|
+
--asc-surface-hover: #{p.$asc-grey-800};
|
|
155
|
+
--asc-surface-active: #{p.$asc-grey-700}; // Background.onSurface (dark)
|
|
156
|
+
|
|
157
|
+
--asc-border-color: #{p.$asc-grey-700}; // Border.default (dark)
|
|
158
|
+
--asc-border-color-strong: #{p.$asc-grey-500}; // Border.secondary (dark)
|
|
159
|
+
--asc-border-color-focus: #{p.$asc-blue-400};
|
|
160
|
+
--asc-border-color-brand: #{p.$asc-brand-500}; // Border.brand (dark) — không đổi
|
|
161
|
+
|
|
162
|
+
--asc-text-primary: #{p.$asc-grey-10}; // Text.primary (dark)
|
|
163
|
+
--asc-text-secondary: #{p.$asc-grey-200}; // Text.secondary (dark)
|
|
164
|
+
--asc-text-muted: #{p.$asc-grey-300}; // Text.tertiary (dark)
|
|
165
|
+
--asc-text-disabled: #{p.$asc-grey-600}; // Text.disable (dark)
|
|
166
|
+
--asc-text-placeholder: #{p.$asc-grey-300};
|
|
167
|
+
// Text.link (dark) trong design-token-color.json bị #ef4444 (trùng màu danger,
|
|
168
|
+
// nghi lỗi copy-paste) — dùng blue-400 (nhạt hơn cho nền tối) thay vì giá trị lỗi đó.
|
|
169
|
+
--asc-text-link: #{p.$asc-blue-400};
|
|
170
|
+
--asc-text-link-hover: #{p.$asc-blue-400};
|
|
171
|
+
--asc-text-brand: #{p.$asc-brand-500}; // không đổi
|
|
172
|
+
|
|
173
|
+
--asc-icon-primary: #{p.$asc-grey-10};
|
|
174
|
+
--asc-icon-secondary: #{p.$asc-grey-400}; // không đổi so với light
|
|
175
|
+
--asc-icon-disabled: #{p.$asc-grey-600};
|
|
176
|
+
--asc-icon-brand: #{p.$asc-brand-500};
|
|
177
|
+
--asc-icon-link: #{p.$asc-blue-600}; // không đổi so với light
|
|
178
|
+
--asc-icon-danger: #{p.$asc-red-500};
|
|
179
|
+
--asc-icon-success: #{p.$asc-emerald-500};
|
|
180
|
+
--asc-icon-info: #{p.$asc-blue-500};
|
|
181
|
+
|
|
182
|
+
--asc-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.3);
|
|
183
|
+
--asc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.4);
|
|
184
|
+
--asc-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
|
|
185
|
+
--asc-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
|
|
186
|
+
--asc-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.4);
|
|
187
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
4
|
+
// Layer 3 — Typography type scale
|
|
5
|
+
//
|
|
6
|
+
// Import trực tiếp từ Figma Text Styles (design-tokens.tokens.json, export
|
|
7
|
+
// 2026-09-08 bằng plugin "Design Tokens" — org.lukasoppermann.figmaDesignTokens).
|
|
8
|
+
// Khác với --asc-text-* (size scale nội bộ component) ở _semantic.scss —
|
|
9
|
+
// đây là named typographic styles (heading/title/body) dùng qua class
|
|
10
|
+
// .asc-typo-{name}-{weight}, ví dụ:
|
|
11
|
+
// <h1 class="asc-typo-h1-80-bold">...</h1>
|
|
12
|
+
// <p class="asc-typo-text-14-regular">...</p>
|
|
13
|
+
//
|
|
14
|
+
// Lưu ý: style "body-text-*" của Figma được rút gọn thành "text-*" ở đây
|
|
15
|
+
// (bỏ chữ "body" cho ngắn) — vd Figma "body-text-14" → key "text-14".
|
|
16
|
+
//
|
|
17
|
+
// Giữ nguyên tên style y hệt Figma (kể cả số size trong tên, vd "h1-80") để
|
|
18
|
+
// designer/dev tra ngược lại đúng style gốc mà không cần bảng map riêng.
|
|
19
|
+
// Cập nhật lại map này khi designer export lại (color/spacing/radius sẽ bổ
|
|
20
|
+
// sung ở layer riêng khi có data thật).
|
|
21
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
22
|
+
|
|
23
|
+
$asc-typography: (
|
|
24
|
+
'h1-80': (
|
|
25
|
+
'bold': (font-size: 80px, line-height: 96px, font-weight: 700),
|
|
26
|
+
'semibold': (font-size: 80px, line-height: 96px, font-weight: 600),
|
|
27
|
+
),
|
|
28
|
+
'h2-64': (
|
|
29
|
+
'bold': (font-size: 64px, line-height: 77px, font-weight: 700),
|
|
30
|
+
'semibold': (font-size: 64px, line-height: 77px, font-weight: 600),
|
|
31
|
+
),
|
|
32
|
+
'h3-48': (
|
|
33
|
+
'bold': (font-size: 48px, line-height: 58px, font-weight: 700),
|
|
34
|
+
'semibold': (font-size: 48px, line-height: 58px, font-weight: 600),
|
|
35
|
+
),
|
|
36
|
+
'h4-40': (
|
|
37
|
+
'bold': (font-size: 40px, line-height: 48px, font-weight: 700),
|
|
38
|
+
'semibold': (font-size: 40px, line-height: 48px, font-weight: 600),
|
|
39
|
+
),
|
|
40
|
+
'h5-32': (
|
|
41
|
+
'bold': (font-size: 32px, line-height: 39px, font-weight: 700),
|
|
42
|
+
'semibold': (font-size: 32px, line-height: 39px, font-weight: 600),
|
|
43
|
+
),
|
|
44
|
+
'title-24': (
|
|
45
|
+
'regular': (font-size: 24px, line-height: 36px, font-weight: 400),
|
|
46
|
+
'medium': (font-size: 24px, line-height: 36px, font-weight: 500),
|
|
47
|
+
'semibold': (font-size: 24px, line-height: 36px, font-weight: 600),
|
|
48
|
+
'bold': (font-size: 24px, line-height: 36px, font-weight: 700),
|
|
49
|
+
),
|
|
50
|
+
'title-20': (
|
|
51
|
+
'regular': (font-size: 20px, line-height: 30px, font-weight: 400),
|
|
52
|
+
'medium': (font-size: 20px, line-height: 30px, font-weight: 500),
|
|
53
|
+
'semibold': (font-size: 20px, line-height: 30px, font-weight: 600),
|
|
54
|
+
'bold': (font-size: 20px, line-height: 30px, font-weight: 700),
|
|
55
|
+
),
|
|
56
|
+
'text-18': (
|
|
57
|
+
'regular': (font-size: 18px, line-height: 27px, font-weight: 400),
|
|
58
|
+
'medium': (font-size: 18px, line-height: 27px, font-weight: 500),
|
|
59
|
+
'semibold': (font-size: 18px, line-height: 27px, font-weight: 600),
|
|
60
|
+
'bold': (font-size: 18px, line-height: 27px, font-weight: 700),
|
|
61
|
+
),
|
|
62
|
+
'text-16': (
|
|
63
|
+
'regular': (font-size: 16px, line-height: 24px, font-weight: 400),
|
|
64
|
+
'medium': (font-size: 16px, line-height: 24px, font-weight: 500),
|
|
65
|
+
'semibold': (font-size: 16px, line-height: 24px, font-weight: 600),
|
|
66
|
+
'bold': (font-size: 16px, line-height: 24px, font-weight: 700),
|
|
67
|
+
'underline': (font-size: 16px, line-height: 24px, font-weight: 400, text-decoration: underline),
|
|
68
|
+
'strikethrough':(font-size: 16px, line-height: 24px, font-weight: 400, text-decoration: line-through),
|
|
69
|
+
'button': (font-size: 16px, line-height: 24px, font-weight: 600),
|
|
70
|
+
),
|
|
71
|
+
'text-14': (
|
|
72
|
+
'regular': (font-size: 14px, line-height: 20px, font-weight: 400),
|
|
73
|
+
'medium': (font-size: 14px, line-height: 20px, font-weight: 500),
|
|
74
|
+
'semibold': (font-size: 14px, line-height: 20px, font-weight: 600),
|
|
75
|
+
'bold': (font-size: 14px, line-height: 20px, font-weight: 700),
|
|
76
|
+
'underline': (font-size: 14px, line-height: 20px, font-weight: 400, text-decoration: underline),
|
|
77
|
+
'strikethrough':(font-size: 14px, line-height: 20px, font-weight: 400, text-decoration: line-through),
|
|
78
|
+
'button': (font-size: 14px, line-height: 24px, font-weight: 600),
|
|
79
|
+
),
|
|
80
|
+
'text-12': (
|
|
81
|
+
'regular': (font-size: 12px, line-height: 18px, font-weight: 400),
|
|
82
|
+
'medium': (font-size: 12px, line-height: 18px, font-weight: 500),
|
|
83
|
+
'semibold': (font-size: 12px, line-height: 18px, font-weight: 600),
|
|
84
|
+
'bold': (font-size: 12px, line-height: 18px, font-weight: 700),
|
|
85
|
+
),
|
|
86
|
+
'text-10': (
|
|
87
|
+
'regular': (font-size: 10px, line-height: 14px, font-weight: 400),
|
|
88
|
+
'medium': (font-size: 10px, line-height: 14px, font-weight: 500),
|
|
89
|
+
'semibold': (font-size: 10px, line-height: 14px, font-weight: 600),
|
|
90
|
+
'bold': (font-size: 10px, line-height: 14px, font-weight: 700),
|
|
91
|
+
),
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
@each $name, $weights in $asc-typography {
|
|
95
|
+
@each $weight, $props in $weights {
|
|
96
|
+
.asc-typo-#{$name}-#{$weight} {
|
|
97
|
+
font-family: var(--asc-font-family);
|
|
98
|
+
font-size: map.get($props, font-size);
|
|
99
|
+
line-height: map.get($props, line-height);
|
|
100
|
+
font-weight: map.get($props, font-weight);
|
|
101
|
+
text-decoration: map.get($props, text-decoration) or none;
|
|
102
|
+
letter-spacing: 0;
|
|
103
|
+
margin: 0;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
2
|
+
// @aseansc/ui — SCSS Tokens barrel
|
|
3
|
+
//
|
|
4
|
+
// Dùng khi component SCSS cần access SCSS variables (không phải CSS vars):
|
|
5
|
+
// @use '@aseansc/ui/tokens' as asc;
|
|
6
|
+
// .my-component { color: asc.$asc-brand-600; }
|
|
7
|
+
//
|
|
8
|
+
// Lưu ý: Trong hầu hết trường hợp nên dùng CSS vars thay vì SCSS vars.
|
|
9
|
+
// SCSS vars chỉ nên dùng trong build-time logic (breakpoints, calc, etc.)
|
|
10
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
11
|
+
|
|
12
|
+
@forward 'primitive';
|
|
13
|
+
@forward 'semantic';
|
|
14
|
+
@forward 'typography';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
html {
|
|
2
|
+
height: 100%;
|
|
3
|
+
font-size: 14px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
body {
|
|
7
|
+
font-family: var(--asc-font-family);
|
|
8
|
+
color: var(--text-color);
|
|
9
|
+
background-color: var(--surface-ground);
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
min-height: 100%;
|
|
13
|
+
-webkit-font-smoothing: antialiased;
|
|
14
|
+
-moz-osx-font-smoothing: grayscale;
|
|
15
|
+
line-height: 1.2;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
a {
|
|
19
|
+
text-decoration: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.layout-wrapper {
|
|
23
|
+
min-height: 100vh;
|
|
24
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.layout-main-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
min-height: 100vh;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
padding: 6rem 2rem 0 2rem;
|
|
7
|
+
transition: margin-left var(--layout-section-transition-duration);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.layout-main {
|
|
11
|
+
flex: 1 1 auto;
|
|
12
|
+
padding: 1.5rem 1.5rem 2rem;
|
|
13
|
+
background: var(--surface-overlay);
|
|
14
|
+
border-radius: 1.25rem;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
img {
|
|
18
|
+
max-width: none !important;
|
|
19
|
+
}
|