@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
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @aseansc/ui — Preset CSS
|
|
3
|
+
*
|
|
4
|
+
* Consumer app import file này 1 lần vào styles.scss bằng CSS @import
|
|
5
|
+
* (không dùng Sass @use — xem tools/scripts/build-ui-preset-css.mjs):
|
|
6
|
+
* @import "@aseansc/ui/preset.css";
|
|
7
|
+
*
|
|
8
|
+
* File này cung cấp:
|
|
9
|
+
* 1. TailwindCSS v4 base + utilities
|
|
10
|
+
* 2. tailwindcss-primeui plugin (Tailwind utilities cho PrimeNG CSS vars)
|
|
11
|
+
* 3. PrimeIcons font
|
|
12
|
+
* 4. ASC design tokens (CSS custom properties)
|
|
13
|
+
* 5. Base resets
|
|
14
|
+
*
|
|
15
|
+
* Bản build (dist/libs/ui/tokens/preset.css) được tools/scripts/build-ui-preset-css.mjs
|
|
16
|
+
* biên dịch lại từ file này và tự thêm 1 khai báo @source trỏ vào bundle fesm2022 ngay sau
|
|
17
|
+
* @import "tailwindcss" — nhờ đó Tailwind ở app consumer tự nhận diện được các class
|
|
18
|
+
* dùng trong template của @aseansc/ui mà không cần khai báo @source thủ công.
|
|
19
|
+
*/
|
|
20
|
+
/* Font Inter — self-host trong package (tokens/fonts/*.woff2) thay vì load
|
|
21
|
+
qua Google Fonts CDN: build production của Angular tự động "inline fonts"
|
|
22
|
+
(fetch CSS + font qua HTTPS lúc build) — fail ở môi trường build không có
|
|
23
|
+
internet ra ngoài hoặc sau proxy chặn TLS (rất phổ biến trong mạng nội bộ
|
|
24
|
+
doanh nghiệp). Self-host loại bỏ hoàn toàn network call lúc build/runtime.
|
|
25
|
+
Chỉ bundle 3 subset cần dùng (latin, latin-ext, vietnamese) — bỏ
|
|
26
|
+
cyrillic/greek vì app chỉ dùng tiếng Việt/Anh. File là variable font nên
|
|
27
|
+
1 file dùng chung cho mọi font-weight (400/500/600/700). */
|
|
28
|
+
@font-face {
|
|
29
|
+
font-family: 'Inter';
|
|
30
|
+
font-style: normal;
|
|
31
|
+
font-weight: 400 700;
|
|
32
|
+
font-display: swap;
|
|
33
|
+
src: url('./fonts/inter-latin.woff2') format('woff2');
|
|
34
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
35
|
+
}
|
|
36
|
+
@font-face {
|
|
37
|
+
font-family: 'Inter';
|
|
38
|
+
font-style: normal;
|
|
39
|
+
font-weight: 400 700;
|
|
40
|
+
font-display: swap;
|
|
41
|
+
src: url('./fonts/inter-latin-ext.woff2') format('woff2');
|
|
42
|
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
43
|
+
}
|
|
44
|
+
@font-face {
|
|
45
|
+
font-family: 'Inter';
|
|
46
|
+
font-style: normal;
|
|
47
|
+
font-weight: 400 700;
|
|
48
|
+
font-display: swap;
|
|
49
|
+
src: url('./fonts/inter-vietnamese.woff2') format('woff2');
|
|
50
|
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@import "index.scss";
|
|
54
|
+
@import "layout/layout";
|
|
55
|
+
@import "primeicons/primeicons.css";
|
|
56
|
+
|
|
57
|
+
/* 1. TailwindCSS v4 */
|
|
58
|
+
@import "tailwindcss";
|
|
59
|
+
@custom-variant dark (&:where(.app-dark, .app-dark *));
|
|
60
|
+
@theme {
|
|
61
|
+
--spacing: 1px;
|
|
62
|
+
--radius-xs: 4px;
|
|
63
|
+
--radius-sm: 8px;
|
|
64
|
+
--radius-md: 12px;
|
|
65
|
+
--radius-lg: 16px;
|
|
66
|
+
--radius-xl: 24px;
|
|
67
|
+
--radius-2xl: 32px;
|
|
68
|
+
--radius-3xl: 48px;
|
|
69
|
+
--radius-4xl: 16px;
|
|
70
|
+
--text-xs: 9px;
|
|
71
|
+
--text-sm: 12px;
|
|
72
|
+
--text-md: 14px;
|
|
73
|
+
--text-lg: 16px;
|
|
74
|
+
--text-xl: 18px;
|
|
75
|
+
--text-2xl: 20px;
|
|
76
|
+
--text-3xl: 24px;
|
|
77
|
+
--text-4xl: 28px;
|
|
78
|
+
--text-5xl: 32px;
|
|
79
|
+
--text-6xl: 48px;
|
|
80
|
+
--leading-15: 15px;
|
|
81
|
+
--leading-20: 20px;
|
|
82
|
+
--leading-30: 30px;
|
|
83
|
+
--leading-32: 32px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* 2. PrimeUI Tailwind plugin — map --p-* vars thành Tailwind utilities */
|
|
87
|
+
/* Sau khi import, dùng được: bg-primary, text-primary-600, border-surface-200, ... */
|
|
88
|
+
@plugin "tailwindcss-primeui";
|
|
89
|
+
|
|
90
|
+
/* 3. PrimeIcons */
|
|
91
|
+
|
|
92
|
+
/* 4. ASC design tokens */
|
|
93
|
+
|
|
94
|
+
/* 5. Base resets & global styles */
|
|
95
|
+
*,
|
|
96
|
+
*::before,
|
|
97
|
+
*::after {
|
|
98
|
+
box-sizing: border-box;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
html {
|
|
102
|
+
font-family: var(--asc-font-family);
|
|
103
|
+
font-size: var(--asc-font-size-base);
|
|
104
|
+
line-height: var(--asc-line-height-base);
|
|
105
|
+
color: var(--asc-text-primary);
|
|
106
|
+
background: var(--asc-surface-ground);
|
|
107
|
+
-webkit-font-smoothing: antialiased;
|
|
108
|
+
-moz-osx-font-smoothing: grayscale;
|
|
109
|
+
text-rendering: optimizeLegibility;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
body {
|
|
113
|
+
margin: 0;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Highlight text — dùng bởi CmpHighlightPipe */
|
|
117
|
+
mark.asc-highlight {
|
|
118
|
+
background: var(--asc-color-primary-light);
|
|
119
|
+
color: var(--asc-color-primary);
|
|
120
|
+
border-radius: 0.125rem;
|
|
121
|
+
padding: 0 0.125rem;
|
|
122
|
+
}
|