@aseansc/ui 5.12.0 → 5.13.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 +17 -0
- package/fesm2022/aseansc-ui.mjs +3 -3
- package/fesm2022/aseansc-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/tokens/_semantic.scss +10 -0
- package/tokens/layout/_main.scss +2 -1
- package/tokens/layout/_responsive.scss +3 -3
- package/tokens/layout/_typography.scss +11 -0
- package/tokens/layout/variables/_common.scss +2 -1
- package/tokens/preset.css +21 -4
- package/types/aseansc-ui.d.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aseansc/ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.13.0",
|
|
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
|
@@ -62,6 +62,15 @@
|
|
|
62
62
|
--asc-border-color-invalid: #{p.$asc-red-500}; // Border.error
|
|
63
63
|
--asc-border-color-brand: #{p.$asc-brand-500}; // Border.brand — token trước đây chưa có
|
|
64
64
|
|
|
65
|
+
// ── Tiêu đề màn hình (UX SeAHolder 17/11, SEAHDR-514) — dùng qua class .asc-page-title ──────
|
|
66
|
+
// Khác tiêu đề khối trong card (.p-card-title 14px / 400). App ghi đè từng biến.
|
|
67
|
+
--asc-page-title-font-size: 18px;
|
|
68
|
+
--asc-page-title-line-height: 27px; // Figma title-18
|
|
69
|
+
--asc-page-title-font-weight: 600;
|
|
70
|
+
--asc-page-title-color: #{p.$asc-black};
|
|
71
|
+
--asc-page-title-padding-top: 12px;
|
|
72
|
+
--asc-page-title-padding-bottom: 16px;
|
|
73
|
+
|
|
65
74
|
// ── Color: Text — Text.* (design-token-color.json) ───────────────────────────
|
|
66
75
|
--asc-text-primary: #{p.$asc-grey-900}; // Text.primary
|
|
67
76
|
--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)
|
|
@@ -221,6 +230,7 @@
|
|
|
221
230
|
--asc-border-color-brand: #{p.$asc-brand-500}; // Border.brand (dark) — không đổi
|
|
222
231
|
|
|
223
232
|
--asc-text-primary: #{p.$asc-grey-10}; // Text.primary (dark)
|
|
233
|
+
--asc-page-title-color: #{p.$asc-grey-10}; // #000 không đọc được trên nền tối → theo Text.primary (dark)
|
|
224
234
|
--asc-table-header-color: #{p.$asc-grey-10}; // dark giữ như cũ (= Text.primary dark)
|
|
225
235
|
// Figma chưa có dark cho Table/* — giữ nền header như cũ, kẻ/hover theo tông tối
|
|
226
236
|
--asc-table-header-bg: var(--asc-surface-translucent);
|
package/tokens/layout/_main.scss
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
min-height: 100vh;
|
|
5
5
|
justify-content: space-between;
|
|
6
6
|
// padding-top = cao topbar (fixed) + khoảng topbar ↔ nội dung, để topbar không che nội dung
|
|
7
|
-
|
|
7
|
+
// phải: lề mép màn hình; trái: khoảng cách với sidebar (nhánh không có sidebar ở _responsive.scss)
|
|
8
|
+
padding: calc(var(--layout-topbar-height) + var(--layout-content-top-gap)) var(--layout-edge-gap) 0
|
|
8
9
|
var(--layout-content-gap);
|
|
9
10
|
transition: margin-left var(--layout-section-transition-duration);
|
|
10
11
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
&.layout-overlay {
|
|
13
13
|
.layout-main-container {
|
|
14
14
|
margin-left: 0;
|
|
15
|
-
padding-left: var(--layout-
|
|
15
|
+
padding-left: var(--layout-edge-gap); // không có sidebar bên trái → lề mép màn hình
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.layout-sidebar {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
|
|
64
64
|
.layout-main-container {
|
|
65
65
|
margin-left: 0;
|
|
66
|
-
padding-left: var(--layout-
|
|
66
|
+
padding-left: var(--layout-edge-gap); // không có sidebar bên trái → lề mép màn hình
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
.layout-wrapper {
|
|
147
147
|
.layout-main-container {
|
|
148
148
|
margin-left: 0;
|
|
149
|
-
padding-left: var(--layout-
|
|
149
|
+
padding-left: var(--layout-edge-gap); // không có sidebar bên trái → lề mép màn hình
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
.layout-sidebar {
|
|
@@ -66,3 +66,14 @@ p {
|
|
|
66
66
|
margin-bottom: 0;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
+
|
|
70
|
+
// Tiêu đề màn hình (UX SeAHolder 17/11, SEAHDR-514): 18px / 600 / #000, cách trên 12px, dưới 16px.
|
|
71
|
+
// Gắn lên phần tử tiêu đề của màn (vd <h1 class="asc-page-title">). Chỉnh qua --asc-page-title-*.
|
|
72
|
+
.asc-page-title {
|
|
73
|
+
margin: 0;
|
|
74
|
+
padding: var(--asc-page-title-padding-top) 0 var(--asc-page-title-padding-bottom);
|
|
75
|
+
font-size: var(--asc-page-title-font-size);
|
|
76
|
+
line-height: var(--asc-page-title-line-height);
|
|
77
|
+
font-weight: var(--asc-page-title-font-weight);
|
|
78
|
+
color: var(--asc-page-title-color);
|
|
79
|
+
}
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
--layout-sidebar-gap: 12px; // khoảng hở giữa sidebar nổi và mép viewport
|
|
17
17
|
// Khoảng cách layout viết bằng px: html font-size 14px nên rem ra số lẻ (14, 21, 28…). App ghi đè được.
|
|
18
18
|
--layout-topbar-height: 64px;
|
|
19
|
-
--layout-content-gap: 16px; // sidebar ↔ nội dung
|
|
19
|
+
--layout-content-gap: 16px; // sidebar ↔ nội dung
|
|
20
|
+
--layout-edge-gap: 12px; // nội dung ↔ mép màn hình (phải; trái khi không có sidebar) — UX chốt 12px 4 cạnh
|
|
20
21
|
--layout-content-top-gap: 12px; // topbar ↔ nội dung
|
|
21
22
|
--layout-main-padding: 24px; // padding trong card .layout-main
|
|
22
23
|
--layout-main-margin-bottom: 12px; // card ↔ đáy viewport
|
package/tokens/preset.css
CHANGED
|
@@ -93,6 +93,12 @@
|
|
|
93
93
|
--asc-border-color-focus: #3b82f6;
|
|
94
94
|
--asc-border-color-invalid: #ef4444;
|
|
95
95
|
--asc-border-color-brand: #f74036;
|
|
96
|
+
--asc-page-title-font-size: 18px;
|
|
97
|
+
--asc-page-title-line-height: 27px;
|
|
98
|
+
--asc-page-title-font-weight: 600;
|
|
99
|
+
--asc-page-title-color: #000000;
|
|
100
|
+
--asc-page-title-padding-top: 12px;
|
|
101
|
+
--asc-page-title-padding-bottom: 16px;
|
|
96
102
|
--asc-text-primary: #0f0f0f;
|
|
97
103
|
--asc-text-secondary: #5b5b5c;
|
|
98
104
|
--asc-text-muted: #747475;
|
|
@@ -207,6 +213,7 @@
|
|
|
207
213
|
--asc-border-color-focus: #3b82f6;
|
|
208
214
|
--asc-border-color-brand: #f74036;
|
|
209
215
|
--asc-text-primary: #fafafc;
|
|
216
|
+
--asc-page-title-color: #fafafc;
|
|
210
217
|
--asc-table-header-color: #fafafc;
|
|
211
218
|
--asc-table-header-bg: var(--asc-surface-translucent);
|
|
212
219
|
--asc-table-header-divider-top: #424242;
|
|
@@ -700,6 +707,7 @@
|
|
|
700
707
|
--layout-sidebar-gap: 12px;
|
|
701
708
|
--layout-topbar-height: 64px;
|
|
702
709
|
--layout-content-gap: 16px;
|
|
710
|
+
--layout-edge-gap: 12px;
|
|
703
711
|
--layout-content-top-gap: 12px;
|
|
704
712
|
--layout-main-padding: 24px;
|
|
705
713
|
--layout-main-margin-bottom: 12px;
|
|
@@ -804,7 +812,7 @@ a {
|
|
|
804
812
|
flex-direction: column;
|
|
805
813
|
min-height: 100vh;
|
|
806
814
|
justify-content: space-between;
|
|
807
|
-
padding: calc(var(--layout-topbar-height) + var(--layout-content-top-gap)) var(--layout-
|
|
815
|
+
padding: calc(var(--layout-topbar-height) + var(--layout-content-top-gap)) var(--layout-edge-gap) 0 var(--layout-content-gap);
|
|
808
816
|
transition: margin-left var(--layout-section-transition-duration);
|
|
809
817
|
}
|
|
810
818
|
|
|
@@ -1152,7 +1160,7 @@ img {
|
|
|
1152
1160
|
@media (min-width: 992px) {
|
|
1153
1161
|
.layout-wrapper.layout-overlay .layout-main-container {
|
|
1154
1162
|
margin-left: 0;
|
|
1155
|
-
padding-left: var(--layout-
|
|
1163
|
+
padding-left: var(--layout-edge-gap);
|
|
1156
1164
|
}
|
|
1157
1165
|
.layout-wrapper.layout-overlay .layout-sidebar {
|
|
1158
1166
|
transform: translateX(-100%);
|
|
@@ -1185,7 +1193,7 @@ img {
|
|
|
1185
1193
|
}
|
|
1186
1194
|
.layout-wrapper.layout-static.layout-static-inactive .layout-main-container {
|
|
1187
1195
|
margin-left: 0;
|
|
1188
|
-
padding-left: var(--layout-
|
|
1196
|
+
padding-left: var(--layout-edge-gap);
|
|
1189
1197
|
}
|
|
1190
1198
|
.layout-wrapper.layout-static.layout-sidebar-rail {
|
|
1191
1199
|
--layout-sidebar-width: var(--layout-sidebar-rail-width);
|
|
@@ -1241,7 +1249,7 @@ img {
|
|
|
1241
1249
|
}
|
|
1242
1250
|
.layout-wrapper .layout-main-container {
|
|
1243
1251
|
margin-left: 0;
|
|
1244
|
-
padding-left: var(--layout-
|
|
1252
|
+
padding-left: var(--layout-edge-gap);
|
|
1245
1253
|
}
|
|
1246
1254
|
.layout-wrapper .layout-sidebar {
|
|
1247
1255
|
transform: translateX(-100%);
|
|
@@ -1364,6 +1372,15 @@ p {
|
|
|
1364
1372
|
p:last-child {
|
|
1365
1373
|
margin-bottom: 0;
|
|
1366
1374
|
}
|
|
1375
|
+
|
|
1376
|
+
.asc-page-title {
|
|
1377
|
+
margin: 0;
|
|
1378
|
+
padding: var(--asc-page-title-padding-top) 0 var(--asc-page-title-padding-bottom);
|
|
1379
|
+
font-size: var(--asc-page-title-font-size);
|
|
1380
|
+
line-height: var(--asc-page-title-line-height);
|
|
1381
|
+
font-weight: var(--asc-page-title-font-weight);
|
|
1382
|
+
color: var(--asc-page-title-color);
|
|
1383
|
+
}
|
|
1367
1384
|
/* 1. TailwindCSS v4 */
|
|
1368
1385
|
@import "tailwindcss";
|
|
1369
1386
|
@source "../fesm2022/**/*.mjs";
|
package/types/aseansc-ui.d.ts
CHANGED
|
@@ -699,7 +699,7 @@ declare class AscButtonComponent {
|
|
|
699
699
|
readonly icon: _angular_core.InputSignal<string>;
|
|
700
700
|
/**
|
|
701
701
|
* URL file SVG (vd icon Phosphor tải từ Figma) — render qua `asc-icon`, màu theo `currentColor`.
|
|
702
|
-
* Có `iconSrc` thì bỏ qua `icon`. Cỡ icon theo size button (md/lg 20px,
|
|
702
|
+
* Có `iconSrc` thì bỏ qua `icon`. Cỡ icon theo size button (sm/md/lg 20px, xs 12px, xl 24px).
|
|
703
703
|
*/
|
|
704
704
|
readonly iconSrc: _angular_core.InputSignal<string>;
|
|
705
705
|
readonly iconPos: _angular_core.InputSignal<"left" | "right" | "top" | "bottom">;
|
|
@@ -770,7 +770,7 @@ declare class AscFormFieldComponent implements AfterContentInit {
|
|
|
770
770
|
* 'FloatLabel' → PrimeNG FloatLabel
|
|
771
771
|
* 'IftaLabel' → PrimeNG IftaLabel
|
|
772
772
|
*/
|
|
773
|
-
readonly typeLabel: _angular_core.InputSignal<"
|
|
773
|
+
readonly typeLabel: _angular_core.InputSignal<"FloatLabel" | "IftaLabel" | "default">;
|
|
774
774
|
/** Layout tổng thể */
|
|
775
775
|
readonly layout: _angular_core.InputSignal<AscFormLayout>;
|
|
776
776
|
/**
|