@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/CHANGELOG.md
ADDED
|
@@ -0,0 +1,966 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@aseansc/ui` (trước đây `@asc/ui`) are documented here.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## [4.0.0] — 2026-09-10
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **BREAKING: npm scope đổi từ `@asc/ui` sang `@aseansc/ui`** — org `asc` chưa từng được claim trên npmjs.org (chỉ có `aseansc` dưới account `aseansc-admin`), đổi lại cho khớp org thật để publish được. Update tất cả import/`peerDependencies`/`@use`/`@import`.
|
|
12
|
+
- Đồng bộ lại toàn bộ design tokens theo đúng spec Figma chính thức ("Thư viện Hệ thống nội bộ"):
|
|
13
|
+
- Bảng màu `brand` (50-950) đổi sang giá trị chính thức (trước đây suy đoán từ tints.dev).
|
|
14
|
+
- Thêm bảng `grey` (10-900) thay cho `slate` — neutral chính của mọi border/text/surface.
|
|
15
|
+
- Thêm token semantic còn thiếu: `--asc-border-color-brand`, `--asc-text-brand`, tier `--asc-icon-*` (primary/secondary/disabled/brand/link/danger/success/info).
|
|
16
|
+
- `--asc-color-primary` mặc định đổi từ brand-600 sang brand-500; `--asc-text-link` đổi từ đỏ (brand) sang xanh dương; success family đổi từ green sang emerald; warning đổi từ yellow sang amber.
|
|
17
|
+
- Dark mode đồng bộ tương ứng (brand giữ nguyên brand-500 làm default, chỉ hover/active nhạt dần).
|
|
18
|
+
- Chiều cao control (`--asc-h-md`): 40px → 36px.
|
|
19
|
+
- Border-radius: 8px → 12px cho input/select/datepicker/textarea/password/input-number; Button đổi thành 999px (pill).
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- `AscTextDirective` (`[ascText]`) — gán named text style theo đúng Figma Text Styles (44 token: h1-h5/title/text, autocomplete + type-check đầy đủ) qua class `.asc-typo-{token}` (`tokens/_typography.scss`).
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- Sửa loạt API PrimeNG v21 deprecated: `styleClass` → `class` (button, select-button, upload, confirm-popup, dialog, confirm-dialog, sidebar, spinner, popover); `AscPopoverComponent` `showTransitionOptions`/`hideTransitionOptions` (đã chết từ v21, không còn được đọc) → `motionOptions`.
|
|
28
|
+
- `AscToast` dùng nhầm `[pStyleClass]` (directive toggle-class khi click) thay vì `class` — khiến class container chưa từng được áp dụng, sửa lại.
|
|
29
|
+
- `AscRadioComponent` — input `readonly` trước đây không có tác dụng thật (PrimeNG `RadioButton` không có khái niệm readonly) — giờ chặn tương tác qua `disabled` + guard trong handler, giống cách `AscSelectButtonComponent` đã làm đúng.
|
|
30
|
+
- `AscInputComponent` — `floatLabel`/`label` được khai báo nhưng chưa từng render (thiếu `<p-floatlabel>` wrapper) — implement đầy đủ theo đúng pattern của `AscSelectComponent`/`AscPasswordComponent`/`AscDatepickerComponent`.
|
|
31
|
+
- Nút dropdown (icon lịch) của `AscDatepickerComponent` bo góc `border-start-end-radius`/`border-end-end-radius` 12px, ghép liền với input thành 1 khối pill.
|
|
32
|
+
- Button severity `secondary`: text `#262626`; kết hợp `variant="outlined"` thêm border `#525252`.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## [3.0.0] — 2026-09-03
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
|
|
40
|
+
- **BREAKING: package renamed from `@aseansc-admin/ui` to `@asc/ui`** (fork `aseansc-fe-framework-upgrate`, Angular 22 + PrimeNG 21 line). Update all imports/`peerDependencies`/`@use`/`@import` paths accordingly. See root `CLAUDE.md` and `README.md` for the current install instructions.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## [2.11.0] — 2026-08-25
|
|
45
|
+
|
|
46
|
+
### Added
|
|
47
|
+
|
|
48
|
+
- **`AscConfirmPopup` — input `maxWidth`**: cho phép cấu hình max-width cho confirm popup (mặc định `'450px'` nếu không truyền).
|
|
49
|
+
- **`AscConfirmDialog` — input `maxWidth`**: cho phép cấu hình max-width cho confirm dialog (mặc định `'450px'` nếu không truyền).
|
|
50
|
+
|
|
51
|
+
### Fixed
|
|
52
|
+
|
|
53
|
+
- **Tinh chỉnh visual**: `AscTableComponent` `.asc-td` font-size đổi thành `12px`; button preset `borderRadius` đổi thành `8px`; token `--text-color` hardcode `#0F0F0F`; `AscConfirmDialog` icon căn giữa và message thêm `word-break: break-word` để tránh tràn nội dung khi bị giới hạn bởi `maxWidth`.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## [2.10.0] — 2026-08-20
|
|
58
|
+
|
|
59
|
+
### Added
|
|
60
|
+
|
|
61
|
+
- **`AscTableComponent` — input `actionsWidth`/`actionsMinWidth`/`actionsMaxWidth`**: cho phép cấu hình width/minWidth/maxWidth cho cột Thao tác khi `actionsDisplay="full"` (mặc định vẫn `'8rem'` nếu không truyền). Không có tác dụng khi `actionsDisplay="dropdown"` — cột đó luôn cố định `4rem`. Đồng thời mirror width/minWidth/maxWidth sang `<td>` của cột Thao tác (trước đây chỉ set ở `<th>`).
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## [2.9.3] — 2026-08-20
|
|
66
|
+
|
|
67
|
+
### Fixed
|
|
68
|
+
|
|
69
|
+
- **`AscTableComponent` — `column.width`/`minWidth`/`maxWidth` không được áp dụng cho `<td>`**: trước đây chỉ bind vào `<th>`, khiến nội dung dài trong data cell đẩy cột rộng ra vượt `width` đã khai báo (bảng dùng `table-layout: auto`, width trên header chỉ là gợi ý tối thiểu). Mirror 3 binding này sang `<td>` — cột có khai `width` giờ khớp đúng giữa header và data cell; cột không khai `width` vẫn auto-size như cũ.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## [2.9.2] — 2026-08-19
|
|
74
|
+
|
|
75
|
+
### Fixed
|
|
76
|
+
|
|
77
|
+
- **`AscTableComponent` — cell text dài (>150 ký tự) đẩy chiều cao hàng vô hạn**: cell `type='text'` giờ clamp còn tối đa 2 dòng kèm `text-overflow: ellipsis` khi nội dung vượt 150 ký tự, thay vì wrap toàn bộ nội dung khiến hàng cao bất thường (chỉ áp dụng cho `type='text'`, các type khác không đổi). Hover vào cell bị clamp hiện tooltip đầy đủ nội dung gốc.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## [2.9.1] — 2026-08-19
|
|
82
|
+
|
|
83
|
+
### Fixed
|
|
84
|
+
|
|
85
|
+
- **`AscTableComponent` — cell text dài bị cắt bởi ellipsis**: `.asc-td` đổi từ `white-space: nowrap` + `text-overflow: ellipsis` sang `overflow-wrap`/`word-break` để hiển thị đầy đủ nội dung dài (vd nội dung giao dịch ngân hàng) thay vì bị cắt ngắn.
|
|
86
|
+
- **`AscTableComponent` — `formatText()` bỏ qua `format.transform` khi giá trị null/undefined**: đổi thứ tự kiểm tra để ưu tiên gọi `transform` trước, cho phép custom transform tự quyết định cách hiển thị giá trị null thay vì luôn bị ghi đè bằng `'—'`.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## [2.9.0] — 2026-08-05
|
|
91
|
+
|
|
92
|
+
### Added
|
|
93
|
+
|
|
94
|
+
- **`AscTableComponent` — input `selectionGroupField`**: gộp checkbox cột selection theo `rowspan` của nhóm (cùng field với `AscTableColumn.rowspan`) và biến thành tri-state (checked/indeterminate/unchecked) — dùng cho bảng đã nhóm sẵn dữ liệu cần chọn cả nhóm cùng lúc thay vì từng hàng.
|
|
95
|
+
- **`AscTableComponent` — input `checkedField` (dùng cùng `selectionGroupField`)**: biến checkbox nhóm thành checkbox cha của 1 field boolean tuỳ ý trên row (vd cột nghiệp vụ tự dựng qua custom cell template) thay vì gắn với `selectedRows` — tri-state theo giá trị field của các hàng con trong nhóm, click cha set field đó cho cả nhóm. Emit output `groupCheckedChange` kèm danh sách hàng vừa đổi.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## [2.8.0] — 2026-08-04
|
|
100
|
+
|
|
101
|
+
### Added
|
|
102
|
+
|
|
103
|
+
- **`AscTableAction` — input `iconSrc`**: render icon SVG cho action (qua `asc-icon`) thay cho class PrimeIcons qua `icon`, tương tự `AscMenuItem` của sidebar. Áp dụng cho cả `actionsDisplay="full"` và `"dropdown"`; `iconSrc` ưu tiên hơn `icon` nếu truyền cả hai.
|
|
104
|
+
|
|
105
|
+
### Fixed
|
|
106
|
+
|
|
107
|
+
- **`AscFormFieldComponent` — gap thừa ở layout `horizontal`**: `:host` trước đây áp `gap: 4px` cho cả row lẫn column bất kể layout, khiến layout `horizontal` (dùng `display: grid`) bị dư khoảng cách dọc giữa các hàng. Tách riêng `row-gap` cho `vertical` và `column-gap` cho `horizontal`.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## [2.7.0] — 2026-08-04
|
|
112
|
+
|
|
113
|
+
### Added
|
|
114
|
+
|
|
115
|
+
- **`AscSelectButtonComponent`** — wrapper PrimeNG SelectButton hỗ trợ single/multiple select, custom object mapping, custom item template, size, invalid/disabled/readonly, `mode="view"`.
|
|
116
|
+
- **`AscFormFieldComponent` — input `labelWidth`**: cấu hình width cột label per-instance khi `layout="horizontal"` (nhận CSS length bất kỳ: `'10rem'`, `'160px'`, `'20%'`). Mặc định `10rem`, không ảnh hưởng layout `vertical`/`inline`.
|
|
117
|
+
- **`AscTableComponent` — input `rowDisabled`**: predicate `(row: T) => boolean` disable selection theo từng hàng — checkbox/radio mờ đi và không thể chọn, kể cả qua "chọn tất cả" ở header hoặc Ctrl+A.
|
|
118
|
+
|
|
119
|
+
### Fixed
|
|
120
|
+
|
|
121
|
+
- **`AscTypographyDirective` — `size` giờ ưu tiên hơn `type` cho font-size**: khi cả hai cùng truyền, `size` thắng thay vì `type` như trước đây (weight/color mặc định của `type` không đổi, vẫn bị `weight`/`color` tường minh override).
|
|
122
|
+
- **`AscTableComponent` — output `rowClicked` chưa emit**: đã khai báo output nhưng chưa được wire vào template, click vào hàng không phát sự kiện. Wire `(click)` trên `<tr>`, chặn bubble từ các cell tương tác (checkbox/radio/expand/actions) để không emit trùng khi thao tác trong các control đó.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## [2.6.0] — 2026-07-29
|
|
127
|
+
|
|
128
|
+
### Added
|
|
129
|
+
|
|
130
|
+
- **`AscTableComponent` — `rowspan` opt-in trên `AscTableColumn`**: gộp các `<td>` liên tiếp có cùng giá trị thành 1 ô span dọc, dùng cho bảng đã nhóm sẵn dữ liệu (vd nhiều dòng cùng 1 mã đơn hàng). Dữ liệu phải đã sắp xếp để các hàng cùng nhóm nằm liền kề — component không tự group lại.
|
|
131
|
+
- **`AscTableComponent` — `headerGroup` opt-in trên `AscTableColumn` (dùng cùng `headerColspan`)**: tách header thành 2 hàng — hàng 1 hiện label nhóm (colspan), hàng 2 hiện header/sort/filter riêng từng cột con, không mất sort/filter như flat merge cũ. Các cột không thuộc nhóm nào tự động `rowspan=2` để nối liền xuống hàng 2.
|
|
132
|
+
|
|
133
|
+
### Fixed
|
|
134
|
+
|
|
135
|
+
- **`AscTableComponent` — selection bar hiện lặp số lượng đã chọn**: sửa lỗi hiển thị "3 3 đã chọn" (đếm bị nối 2 lần) thành "3 đã chọn".
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## [2.5.0] — 2026-07-29
|
|
140
|
+
|
|
141
|
+
### Added
|
|
142
|
+
|
|
143
|
+
- **`AscTableComponent` — i18n cho header cột Thao tác**: thêm `msg.table.actionsHeader` (vi: "Thao tác", en: "Actions") và input `actionsHeader` để override thủ công, tương tự `rowNumberHeader`.
|
|
144
|
+
|
|
145
|
+
### Changed
|
|
146
|
+
|
|
147
|
+
- **`AscTableComponent` — cột STT và Thao tác mặc định frozen**: `showRowNumber` ghim bên trái, cột Thao tác (actions) ghim bên phải; bảng tự bật `scrollable` khi có 1 trong 2 cột này.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## [2.4.0] — 2026-07-27
|
|
152
|
+
|
|
153
|
+
### Added
|
|
154
|
+
|
|
155
|
+
- **`AscTableComponent` — `headerColspan`/`footerColspan` opt-in trên `AscTableColumn`**: gộp header/footer cell với N-1 column liền sau khi colspan > 1. Footer là tính năng mới, opt-in — chỉ render khi có ít nhất một column khai báo nội dung footer.
|
|
156
|
+
- **`AscTypographyDirective` — input `type` (preset heading ngữ nghĩa)**: `big-title` (48px), `main-title` (36px), `title` (18px), `sub-title` (16px), `support-text` (12px), `inform-text` (10px). `type` ưu tiên hơn `size` khi cả hai cùng truyền. Mỗi preset có font-weight mặc định riêng (`big-title`/`main-title` = 600, `title`/`sub-title` = 500) và màu mặc định cho `support-text`/`inform-text`; `color` truyền tường minh luôn được ưu tiên hơn màu mặc định của preset.
|
|
157
|
+
|
|
158
|
+
### Fixed
|
|
159
|
+
|
|
160
|
+
- **`AscUpload` — chế độ `view` còn dư padding/border**: bỏ padding container header/content và border ngoài của `p-fileupload` khi `isViewMode()`, hiển thị gọn hơn khi preload file có sẵn.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## [2.3.4] — 2026-07-22
|
|
165
|
+
|
|
166
|
+
### Changed
|
|
167
|
+
|
|
168
|
+
- **`AscStepperComponent` — `variant="detailed"` (horizontal)**: bo tròn container giảm còn 6px (từ 12px), padding trong mỗi step giảm còn 12px 24px (từ 16px 24px), circle giảm còn 30px (từ 40px). Step đầu/cuối tự bo tròn theo góc container thay vì bị vuông do lớp nền `.p-step-title` che mất border-radius của `.p-steplist`.
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## [2.3.3] — 2026-07-22
|
|
173
|
+
|
|
174
|
+
### Fixed
|
|
175
|
+
|
|
176
|
+
- **`AscTableComponent` — column `type: 'badge'` với `severity: 'warn'` không ra đúng màu**: `mapSeverityToTag()` map sai key `warning` (không tồn tại trong `AscSeverity`) thay vì `warn`, khiến `[severity]` truyền vào `p-tag` luôn là `undefined` → mất class `p-tag-warn`, badge render với màu mặc định (giống primary/danger) thay vì màu warning.
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## [2.3.2] — 2026-07-22
|
|
181
|
+
|
|
182
|
+
### Changed
|
|
183
|
+
|
|
184
|
+
- **`AscRadioComponent` — input `alignColumn`**: đổi giá trị mặc định từ `'start'` sang `'center'`.
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## [2.3.1] — 2026-07-22
|
|
189
|
+
|
|
190
|
+
### Fixed
|
|
191
|
+
|
|
192
|
+
- **`AscCheckboxComponent` / `AscRadioComponent` — khoảng cách giữa các item trong danh sách hẹp**: tăng `gap` từ 8px lên 12px cho dễ nhìn hơn.
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## [2.3.0] — 2026-07-22
|
|
197
|
+
|
|
198
|
+
### Added
|
|
199
|
+
|
|
200
|
+
- **`AscRadioComponent` — input `alignColumn`**: căn `align-items` của mỗi item trong danh sách radio, nhận `'start'` (mặc định) hoặc `'center'`.
|
|
201
|
+
|
|
202
|
+
### Changed
|
|
203
|
+
|
|
204
|
+
- **`AscStepperComponent` — `variant="detailed"` (horizontal)**: circle to hơn (32px→40px), padding trong mỗi step tăng (14px 28px→16px 24px). Step đầu tiên giảm riêng `padding-left` còn 16px do không có khấc (notch) bên trái ăn vào như các step giữa.
|
|
205
|
+
|
|
206
|
+
### Fixed
|
|
207
|
+
|
|
208
|
+
- **`AscRadioComponent` — `alignColumn` không có tác dụng**: class Tailwind sai (`item-{value}` thay vì `items-{value}`), khiến prop mới thêm không align được item nào.
|
|
209
|
+
- **`AscStepperComponent` — `variant="detailed"` (horizontal) các step bị tách rời thay vì nối liền thành 1 dải ribbon**: `.p-step` vẫn giữ `padding: 7px` mặc định của theme PrimeNG, khiến lớp viền chevron bị thụt vào trong thay vì lấp đầy toàn bộ ô step.
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## [2.2.0] — 2026-07-22
|
|
214
|
+
|
|
215
|
+
### Added
|
|
216
|
+
|
|
217
|
+
- **`AscTableComponent` — frozen columns**: `column.frozen`/`column.alignFrozen` (đã có sẵn trong type từ trước nhưng chưa từng hoạt động) giờ ghim được cột khi cuộn ngang, dùng directive `pFrozenColumn` có sẵn của PrimeNG. Bảng tự bật `scrollable` khi có ít nhất 1 cột frozen, không cần tự set `[scrollable]="true"`.
|
|
218
|
+
- **`AscFormFieldComponent` — label tự đồng bộ theo `size` của control**: không cần cấu hình gì thêm, font-size label tự đổi theo `size` của `asc-input`/`asc-select`/`asc-password`/`asc-input-number`/`asc-datepicker` (xs/sm: 12px, md: 14px, lg: 16px, xl: 18px).
|
|
219
|
+
- **`AscFormFieldComponent` — label tự đổi màu khi control disabled**: `[disabled]="true"` trên control bên trong tự làm label chuyển màu `--asc-text-disabled`, ưu tiên hơn màu `mode="view"` nếu cả hai cùng true.
|
|
220
|
+
- **`AscTableComponent` — `stripedRows` mặc định `true`**: màu nền hàng xen kẽ dùng `--asc-surface-50` (`#F2F3F5`).
|
|
221
|
+
|
|
222
|
+
### Changed
|
|
223
|
+
|
|
224
|
+
- **Thang chiều cao control (`--asc-h-*`) tăng**: `sm` 28px→32px, `md` 32px→40px, `lg` 40px→48px, `xl` 52px→56px — áp dụng cho `AscInputComponent`, `AscSelectComponent`, `AscPasswordComponent`, `AscInputNumberComponent`, `AscDatepickerComponent`, `AscButtonComponent`. Font-size `sm` đổi 13px→12px trên các control này; `xl` đổi 16px→18px để không còn trùng `lg`.
|
|
225
|
+
|
|
226
|
+
### Fixed
|
|
227
|
+
|
|
228
|
+
- **`AscTableComponent` — border-radius không hoạt động**: `.asc-table-wrapper` trước dùng biến CSS `--asc-border-radius-lg` (không tồn tại trong token, không có fallback) nên border-radius thực tế luôn là 0. Đổi sang đúng token `--asc-radius-lg` (8px).
|
|
229
|
+
- **`AscTableComponent` — border thừa dưới thanh pagination**: bỏ `border-top` trên `.p-paginator`.
|
|
230
|
+
- **`AscTableComponent` — frozen column shadow không hoạt động**: CSS trước target nhầm class `.p-frozen-column` (không tồn tại ở PrimeNG v20), đúng phải là `.p-datatable-frozen-column`.
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## [2.1.0] — 2026-07-20
|
|
235
|
+
|
|
236
|
+
### Added
|
|
237
|
+
|
|
238
|
+
- **`theme.showSwitcher` config** — ẩn/hiện nút chuyển dark/light trên topbar của `AscLayout` qua `provideAscUI({ theme: { showSwitcher: false } })`. Mặc định `true` (giữ hành vi cũ). Dùng khi app tự làm UI switch theme riêng hoặc không cần switcher.
|
|
239
|
+
|
|
240
|
+
### Changed
|
|
241
|
+
|
|
242
|
+
- **`AscButtonComponent`**: giảm padding ngang cho size `md`/`lg`/`xl` (`8px 24px→16px`, `10px 32px→24px`, `12px 40px→32px`).
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## [2.0.1] — 2026-07-20
|
|
247
|
+
|
|
248
|
+
### Fixed
|
|
249
|
+
|
|
250
|
+
- **CSS lồng nhau trong `::ng-deep` bị `ng-packagr` âm thầm loại bỏ khỏi bản publish** — bug hệ thống, không phải riêng radio. Root cause: bất kỳ rule nào lồng bên trong một selector chain có chứa `::ng-deep` (`:host ::ng-deep { .foo {...} }`, hoặc `&:pseudo`/`.child{}` lồng 1 cấp bên trong `:host(...) ::ng-deep .foo {...}`) đều bị `ng-packagr` strip khi build production cho `styles: [...]` inline — khác với file `.scss` (qua Sass, resolve nesting trước khi tới ng-packagr) hay selector viết phẳng vẫn hoạt động bình thường. Vì showcase/dev dùng `ng serve` (esbuild, hỗ trợ CSS nesting native) nên bug này không lộ ra khi test qua showcase — chỉ xuất hiện ở bản đã publish lên npm. Đã rà toàn bộ `libs/ui` và viết phẳng lại CSS cho các component sau (tất cả các style liệt kê dưới đây **chưa từng thực sự hoạt động trong bất kỳ bản npm nào đã publish trước 2.0.1**):
|
|
251
|
+
- **`AscRadioComponent`**: checked-state (viền rỗng + chấm giữa), cố định kích thước 20×20px, hover states.
|
|
252
|
+
- **`AscInputComponent`, `AscSelectComponent`, `AscDatepickerComponent`, `AscPasswordComponent`, `AscTextareaComponent`, `AscInputNumberComponent`**: box-shadow đỏ khi `invalid` + đang focus.
|
|
253
|
+
- **`AscButtonComponent`**: font-size của icon co theo từng size (xs/sm/md/lg/xl).
|
|
254
|
+
- **`AscToastService`**: border-radius/box-shadow/border của toast message.
|
|
255
|
+
- **`AscConfirmPopup`**: toàn bộ layout (content/icon/message/footer) — trước hoàn toàn không có style.
|
|
256
|
+
- **`AscConfirmDialog`**: toàn bộ layout (header/content/icon/message/footer) — trước hoàn toàn không có style.
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## [2.0.0] — 2026-07-20
|
|
261
|
+
|
|
262
|
+
### ⚠ BREAKING CHANGES
|
|
263
|
+
|
|
264
|
+
- **`AscBreadcrumb` — mặc định ẩn icon home**: trước mặc định luôn có `{ icon: 'pi pi-home', routerLink: '/' }` ở đầu breadcrumb kể cả khi app không truyền `home`. Giờ mặc định `null` (ẩn) — app tự truyền `home` nếu muốn hiện icon.
|
|
265
|
+
- **`AscRadioComponent` — bỏ input `size`**: box radio đã bị cố định 20x20px từ bản trước nên `size` không còn tác dụng thị giác dù vẫn map xuống PrimeNG. Bỏ hẳn prop thay vì để một API im lặng không hoạt động — app đang truyền `[size]` cho `asc-radio` cần xoá.
|
|
266
|
+
|
|
267
|
+
### Fixed
|
|
268
|
+
|
|
269
|
+
- **`AscDatepickerComponent` — thiếu size `xs`/`md`/`xl`**: trước chỉ có `sm`/`lg`, dùng `rem` + `min-height` + `padding-top/bottom` riêng biệt. Giờ đủ 5 size, dùng chung `height: var(--asc-h-*)` + `border-radius: 8px` + `font-size`/`padding-inline` theo px như `AscInputComponent`/`AscSelectComponent`.
|
|
270
|
+
- **`AscPasswordComponent`, `AscInputNumberComponent` — thiếu size `xs`/`xl`, block `md` gãy**: `md` trước không set `height`/`font-size` (rơi về padding cứng ở base rule), dùng `min-height` thay vì `height`. Giờ đủ 5 size, cùng công thức với input/select/datepicker.
|
|
271
|
+
- **`AscTextareaComponent` — thiếu size `xs`/`xl`**: mở rộng thang padding/font-size, giữ nguyên `sm`/`md`/`lg` cũ.
|
|
272
|
+
|
|
273
|
+
### Docs
|
|
274
|
+
|
|
275
|
+
- Cập nhật API doc `size` cho `AscCheckboxComponent`/`AscToggleSwitchComponent` — làm rõ PrimeNG chỉ hỗ trợ 2 mức nên `xs`/`sm` gộp `small`, `lg`/`xl` gộp `large`.
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## [1.15.0] — 2026-07-20
|
|
280
|
+
|
|
281
|
+
### Added
|
|
282
|
+
|
|
283
|
+
- **`AscMenuItem` — icon SVG cho sidebar menu**: input mới `iconSrc` (URL tới file `.svg`), render qua `asc-icon` (tái dùng `AscIconService` fetch + cache + inline `currentColor`) thay vì bắt buộc dùng class PrimeIcons qua `icon`. `icon` vẫn hoạt động như cũ nếu không truyền `iconSrc`.
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## [1.14.0] — 2026-07-20
|
|
288
|
+
|
|
289
|
+
### Added
|
|
290
|
+
|
|
291
|
+
- **`AscTableComponent` — tùy chỉnh dòng báo cáo phân trang**: input mới `showFirstLastIcon` (mặc định `false`), `showCurrentPageReport` (mặc định `true`), `currentPageReportTemplate` (fallback theo `msg.table.totalRecords`).
|
|
292
|
+
|
|
293
|
+
### Changed
|
|
294
|
+
|
|
295
|
+
- **`AscTableComponent` — giao diện paginator**: nút số trang/prev/next bo góc vuông thay vì tròn, trang hiện tại tô nền màu primary; dropdown số dòng/trang + tổng số bản ghi chuyển sang trái, cụm điều hướng đẩy sang phải.
|
|
296
|
+
- **`AscRadioComponent` — trạng thái checked**: đổi từ fill đặc (nền primary + chấm trắng) sang viền rỗng (nền trắng, viền primary 2px) + chấm primary ở giữa. Cố định kích thước box mặc định 20×20px, chấm 10×10px. Thêm hover states cho cả trạng thái chưa chọn và đã chọn.
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## [1.13.0] — 2026-07-17
|
|
301
|
+
|
|
302
|
+
### Added
|
|
303
|
+
|
|
304
|
+
- **`AscUpload` — nút xem/tải file trong content template**: mỗi file đã chọn giờ có nút xem (ảnh/PDF/text → mở tab mới) hoặc tải xuống (Word/Excel/... không render được trong trình duyệt → tải trực tiếp). Nút tự ẩn khi file rỗng (`size = 0`, chỉ có tên).
|
|
305
|
+
|
|
306
|
+
### Fixed
|
|
307
|
+
|
|
308
|
+
- **`AscUpload` — xem ảnh mở tab trắng**: `file.objectURL` do `p-fileupload` gán là `SafeUrl` (qua `DomSanitizer.bypassSecurityTrustUrl`), chỉ dùng được trong template binding — ép sang string trong code TS ra chuỗi không hợp lệ khiến `window.open` mở trang trắng. Giờ luôn tự tạo `objectURL` riêng cho thao tác xem/tải.
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
## [1.12.0] — 2026-07-16
|
|
313
|
+
|
|
314
|
+
### Added
|
|
315
|
+
|
|
316
|
+
- **`AscUpload` — `chooseLabel` cho `headerStyle="button"`**: input mới cho phép tùy chỉnh label nút Choose; không truyền thì vẫn dùng mặc định theo locale (`msg.upload.browse`) như trước.
|
|
317
|
+
- **`AscStepperComponent` — `orientation="vertical"`**: step xếp chồng theo cột thay vì hàng ngang, nội dung hiện ngay dưới header của chính step đó, nối nhau bằng đường kẻ dọc mặc định của PrimeNG. Kết hợp được với cả `variant="simple"` lẫn `variant="detailed"`.
|
|
318
|
+
- **`AscStepperComponent` — compact mode tự động (responsive)**: dùng CSS container query dựa trên chiều rộng của chính stepper (không phải viewport) — khi container hẹp hơn 560px, tự ẩn header đầy đủ (ribbon ngang / timeline dọc) và hiện 1 thanh gọn "Bước x/y: label" + progress bar mảnh. Không cần input riêng, áp dụng cho cả 2 orientation và cả 2 variant.
|
|
319
|
+
|
|
320
|
+
### Fixed
|
|
321
|
+
|
|
322
|
+
- **`AscUpload` — `multipleUpload=false` vẫn hiển thị nhiều file**: `onSelectedFiles` trước đây luôn cộng dồn file vào signal nội bộ bất kể `multipleUpload`, khiến chọn file nhiều lần liên tiếp vẫn tích lũy dù đã set `multipleUpload=false` — giờ replace hoàn toàn danh sách khi không cho phép multiple.
|
|
323
|
+
- **`AscStepperComponent` — `orientation="vertical"` kết hợp `variant="detailed"` bị vỡ layout**: số tròn mặc định của PrimeNG (`.p-step-number`) chồng lên circle tự vẽ, và `.p-step-title` không phải flex row khiến circle/text vỡ layout — override giờ áp dụng cho cả 2 orientation thay vì chỉ horizontal.
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
## [1.11.0] — 2026-07-16
|
|
328
|
+
|
|
329
|
+
### Added
|
|
330
|
+
|
|
331
|
+
- **`AscUpload` — `headerStyle="button"`**: input mới (`'icon' | 'button'`, mặc định `'icon'` giữ hành vi cũ) render 1 nút "+ Chọn file" duy nhất thay cho 2 nút round icon-only (choose + clear-all) — chọn file xong coi như đã upload nên không cần nút Upload/Cancel; xóa từng file đã chọn dùng nút trash có sẵn trong content template. Nút bo góc 8px + `pRipple` đồng bộ design system.
|
|
332
|
+
|
|
333
|
+
### Fixed
|
|
334
|
+
|
|
335
|
+
- **`AscUpload` — view mode không ẩn nút khi `FormControl.disable()`**: `actionEvents="VIEW" | "APPROVE" | "REJECT"` giờ ẩn hẳn nút Choose/Clear/Trash thay vì chỉ disable; trường hợp disable qua `FormControl` (`disabled: true`) thì nút vẫn hiển thị nhưng ở trạng thái disabled — phân biệt rõ 2 cách vô hiệu hóa.
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
## [1.10.0] — 2026-07-16
|
|
340
|
+
|
|
341
|
+
### Added
|
|
342
|
+
|
|
343
|
+
- **`AscInputComponent` — `showCounter` cho đếm ký tự**: trước đây cứ có `maxLength` là hiện đếm ký tự; giờ phải bật `showCounter` (mặc định `false`) mới hiện.
|
|
344
|
+
|
|
345
|
+
### Fixed
|
|
346
|
+
|
|
347
|
+
- **`AscInputComponent` — màu near-limit/at-limit của đếm ký tự không áp dụng**: selector CSS sai (`:is(--near-limit)` lặp lại 2 lần, không match class thực tế) khiến đếm ký tự không bao giờ đổi màu cảnh báo — giờ dùng đúng `&.asc-input-counter--near-limit` / `&.asc-input-counter--at-limit`.
|
|
348
|
+
- **`AscSelectComponent` — label/chip trong multiselect lệch dọc**: thêm `display: flex; align-items: center` cho `.p-multiselect-label-container`.
|
|
349
|
+
|
|
350
|
+
---
|
|
351
|
+
|
|
352
|
+
## [1.9.0] — 2026-07-16
|
|
353
|
+
|
|
354
|
+
### Added
|
|
355
|
+
|
|
356
|
+
- **`AscRadioComponent` — `subLabel` cho option**: `AscCheckboxOption` nhận thêm `subLabel?: string`, hiển thị mô tả phụ dưới label trong mỗi radio item. Khi option (hoặc cả nhóm) disabled, label và subLabel dùng chung 1 màu (`var(--asc-text-disabled)`) thay vì lệch màu như trước.
|
|
357
|
+
- **`AscRadioComponent` — custom item template qua `#ascItem`**: cho phép thay thế hoàn toàn phần hiển thị bên cạnh mỗi `p-radiobutton` (icon, markup tuỳ ý...) bằng `<ng-template #ascItem let-opt let-index="index" let-disabled="disabled">`, trong khi `asc-radio` vẫn quản lý `name`/`value`/`ngModel`/`disabled`/`invalid`. Cùng pattern với `#ascItem` của `AscPicklistComponent`.
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
## [1.8.0] — 2026-07-15
|
|
362
|
+
|
|
363
|
+
### Added
|
|
364
|
+
|
|
365
|
+
- **`AscLayout`, `AppTopbar` — input `iconToggle` để tùy chỉnh icon nút toggle menu**: cho phép truyền `TemplateRef` để override icon mặc định (`pi-bars`) của nút toggle sidebar. Đồng thời tách nút toggle ra khỏi `layout-topbar-logo-container` (không còn ẩn theo logo) và bỏ `width` cố định của container logo để topbar co giãn đúng khi ẩn/hiện logo.
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
369
|
+
## [1.7.2] — 2026-07-15
|
|
370
|
+
|
|
371
|
+
### Fixed
|
|
372
|
+
|
|
373
|
+
- **Form control (input/textarea/select/datepicker/password/input-number...) — màu nền/border/placeholder mặc định**: `formField` semantic token trong preset thêm `background` (`#F2F3F5`), `borderColor` (`#DEDFE0`), `placeholderColor` (`#5B5B5C`) làm giá trị mặc định — override được qua CSS variable `--asc-formfield-bg`, `--asc-formfield-border-color`, `--asc-formfield-placeholder-color` ở app dùng lib.
|
|
374
|
+
- **`AscFormFieldComponent`, `AscCheckboxComponent`, `AscRadioComponent` — label font-weight về 500**: label của `asc-form-field` (override qua `--asc-field-label-font-weight`) và label từng option của checkbox/radio đồng bộ font-weight 500.
|
|
375
|
+
- **`AscSelectComponent` — label lệch dọc khi không dùng float/labeled**: thêm `display: flex; align-items: center` cho `.p-select-label`/`.p-multiselect-label` ở mọi size (xs/sm/md/lg/xl).
|
|
376
|
+
- **Validation message `required`/`requiredTrue` — đổi wording**: chuyển sang dạng gợi ý hành động ("Vui lòng nhập ..."/"Vui lòng chọn ...") thay vì "... là bắt buộc"/"... phải được chọn".
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
## [1.7.1] — 2026-07-15
|
|
381
|
+
|
|
382
|
+
### Fixed
|
|
383
|
+
|
|
384
|
+
- **`AscInputComponent` — icon đè lên text khi dùng `icon`/`iconPos` hoặc `clearable`**: đợt chuẩn hóa size `xs`/`sm`/`md`/`lg`/`xl` (1.7.0) đặt `padding` cố định 8–12px cho mọi trường hợp, không tính đến icon/nút clear chiếm chỗ cố định ~24.5px ở 1 phía (icon luôn rộng 14px, cách mép ~10.5px, không phụ thuộc padding của input) — khiến text chồng lên icon. Thêm host class `asc-input--icon-left`/`asc-input--icon-right` set CSS var `--asc-input-pad-start`/`--asc-input-pad-end` (2rem) đè đúng 1 phía padding, không ảnh hưởng size/font/height đã chuẩn hóa.
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
388
|
+
## [1.7.0] — 2026-07-15
|
|
389
|
+
|
|
390
|
+
### Added
|
|
391
|
+
|
|
392
|
+
- **`AscRadioComponent`, `AscCheckboxComponent`, `AscDatepickerComponent` — hỗ trợ `mode="view"`**: 3 component còn lại kế thừa `mode` từ `BaseControlAccessor` nhưng chưa xử lý trong template. Giờ hiển thị value dạng text thay vì render form control, tham gia auto-sync màu label với `AscFormFieldComponent` như các control khác.
|
|
393
|
+
- `AscRadioComponent` — hiển thị label của option đang chọn, `—` khi chưa chọn.
|
|
394
|
+
- `AscCheckboxComponent` — group hiển thị label các option đã chọn nối bằng dấu phẩy; binary hiển thị label khi `true` (hoặc `✓` nếu không có label), `—` khi `false`.
|
|
395
|
+
- `AscDatepickerComponent` — hiển thị value đã format theo `dateFormat`/`showTime`, hỗ trợ cả 3 `selectionMode` (single/range/multiple), dùng `dateRangeSeparator` i18n cho range.
|
|
396
|
+
- **`AscStepperComponent` — thêm `variant="detailed"`**: circle số (tick khi step đã đi qua) + title + description phụ, đặt trong card viền chevron nối tiếp nhau (mũi tên) thay cho layout icon+label + đường kẻ mảnh mặc định. `AscStepComponent` thêm input `description` (chỉ dùng khi variant="detailed"). Step completed: circle nền đỏ + tick trắng, title đen. Step active: circle viền đỏ, title đỏ. Step chưa tới: circle + title xám mờ. Dùng cho các luồng nhiều bước cần ngữ cảnh rõ ràng từng bước (vd: mở tài khoản, đăng ký).
|
|
397
|
+
- **`AscTableComponent` — thêm input `emptyMessage`**: cho phép truyền message tùy chỉnh khi table rỗng thay vì luôn dùng i18n mặc định (`msg.table.empty`) — fallback về i18n nếu không truyền.
|
|
398
|
+
|
|
399
|
+
### Fixed
|
|
400
|
+
|
|
401
|
+
- **Font `Inter` không thực sự áp dụng cho consumer app**: `--asc-font-family` đã đặt `'Inter'` từ trước nhưng chưa từng load webfont thật — nếu máy không cài sẵn Inter, trình duyệt tự fallback sang font hệ thống. Self-host 3 file `.woff2` (subset latin, latin-ext, vietnamese — variable font, dùng chung cho mọi weight 400–700) ngay trong package tại `tokens/fonts/`, khai báo `@font-face` với path tương đối trong `preset.scss`. Font thực sự render đúng khi consumer app chỉ cần import preset, không cần cấu hình gì thêm — và không phụ thuộc CDN bên ngoài lúc runtime lẫn lúc build (Angular production build tự "inline fonts" qua HTTPS nếu dùng Google Fonts `@import`, fail ở môi trường build không có internet ra ngoài hoặc sau proxy chặn TLS).
|
|
402
|
+
- **`body { font-family: 'Lato' }` hardcode trong `tokens/layout/_core.scss` đè mất token `--asc-font-family`**: rule này (leftover từ template layout gốc) override font Inter cho toàn bộ nội dung bên trong `AscLayout` vì `body` có khai báo riêng, không kế thừa từ `html`. Đổi sang `font-family: var(--asc-font-family)`.
|
|
403
|
+
- **Size `xs`/`sm`/`md`/`lg`/`xl` không đồng nhất giữa các control — có case `xs` còn to hơn `sm`**: `AscButtonComponent`, `AscInputComponent`, `AscSelectComponent` thiếu hẳn CSS cho size `xs`/`xl` (rơi về style mặc định không kiểm soát được, có khi to hơn cả `sm`/`lg`), và không dùng chung thang `--asc-h-*` (token `_semantic.scss` vốn ghi rõ "dùng cho input, button, select — đảm bảo align nhau" nhưng gần như không component nào áp dụng). Cả 3 giờ dùng chung `--asc-h-xs/sm/md/lg/xl` (28/32/38/44/52px), đảm bảo tăng dần đúng thứ tự trong từng control và chiều cao khớp nhau giữa 3 control ở cùng 1 size.
|
|
404
|
+
|
|
405
|
+
---
|
|
406
|
+
|
|
407
|
+
## [1.6.1] — 2026-07-14
|
|
408
|
+
|
|
409
|
+
### Fixed
|
|
410
|
+
|
|
411
|
+
- **`AscUpload` — không hiển thị size file khi `size` là `null`/`0`**: `formatSize()` trả về chuỗi rỗng thay vì tính `Math.log(0)` (ra `-Infinity`); template ẩn hẳn phần hiển thị size khi `file.size` falsy.
|
|
412
|
+
|
|
413
|
+
---
|
|
414
|
+
|
|
415
|
+
## [1.6.0] — 2026-07-14
|
|
416
|
+
|
|
417
|
+
### Added
|
|
418
|
+
|
|
419
|
+
- **`AscInputNumberComponent` — hỗ trợ `mode="view"`**: trước đó component kế thừa input `mode` từ `BaseControlAccessor` nhưng template chưa xử lý, set `mode="view"` không có tác dụng (cùng lỗi đã fix ở `AscTextareaComponent`). Giờ hiển thị value đã format qua `Intl.NumberFormat` (grouping, decimals, locale) kèm `prefix`/`suffix` — y hệt lúc edit, fallback `—` khi rỗng. Tham gia auto-sync màu label với `AscFormFieldComponent` như các control khác.
|
|
420
|
+
|
|
421
|
+
---
|
|
422
|
+
|
|
423
|
+
## [1.5.2] — 2026-07-13
|
|
424
|
+
|
|
425
|
+
### Fixed
|
|
426
|
+
|
|
427
|
+
- **`AscFormFieldComponent` — error message không cập nhật khi chỉ gọi `markAsDirty()`/`markAsTouched()`**: cùng nguyên nhân với lỗi đã fix ở `BaseControlAccessor` trước đây (`ctrl.statusChanges` không emit trong các trường hợp này), nhưng nằm ở 1 subscription riêng, độc lập chưa được fix theo. Đổi sang nghe `ctrl.events` giống `BaseControlAccessor`.
|
|
428
|
+
|
|
429
|
+
### Changed
|
|
430
|
+
|
|
431
|
+
- **`AscInputComponent`, `AscInputNumberComponent`, `AscPasswordComponent`, `AscSelectComponent`** — bỏ `min-height: 40px` dư thừa ở rule chung cho mọi size (`md`/`lg` vốn đã cao hơn 40px nhờ padding + line-height nên rule này chưa từng có tác dụng). `sm` không đổi (vẫn `min-height: 32px` riêng).
|
|
432
|
+
|
|
433
|
+
---
|
|
434
|
+
|
|
435
|
+
## [1.5.1] — 2026-07-10
|
|
436
|
+
|
|
437
|
+
### Fixed
|
|
438
|
+
|
|
439
|
+
- **`AscSidebarComponent` — nút Hủy (secondary) trong header không emit `hidden`**: `onSecondary()` đóng sidebar qua `visible.set(false)` — chỉ là gán signal, không đi qua `close()`/`hide()` của PrimeNG Drawer nên `onHide` (và output `hidden` của mình) không tự bắn ra, khác với các đường đóng khác (X, Escape, click ra ngoài). Giờ emit `hidden` thủ công cho nhất quán.
|
|
440
|
+
|
|
441
|
+
### Changed
|
|
442
|
+
|
|
443
|
+
- **`.asc-sidebar-body`** — bỏ `display:flex`/`flex-direction`/`gap` ép sẵn và padding bất đối xứng, đổi thành `padding: 24px` đơn giản — để consumer tự kiểm soát layout nội dung projected thay vì bị áp đặt.
|
|
444
|
+
|
|
445
|
+
---
|
|
446
|
+
|
|
447
|
+
## [1.5.0] — 2026-07-10
|
|
448
|
+
|
|
449
|
+
### Added
|
|
450
|
+
|
|
451
|
+
- **`AscSidebarComponent` — input `buttonSize`** (`AscSize`, mặc định `'sm'`): size của 2 nút Hủy/Xác nhận mặc định ở header trước đây bị hardcode `size="sm"`, giờ đồng bộ được theo `AscSize` của `AscButtonComponent`.
|
|
452
|
+
|
|
453
|
+
### Changed
|
|
454
|
+
|
|
455
|
+
- **`AscFormFieldComponent`** — bỏ `padding-top: 0.5rem` trên label ở layout horizontal.
|
|
456
|
+
|
|
457
|
+
---
|
|
458
|
+
|
|
459
|
+
## [1.4.0] — 2026-07-10
|
|
460
|
+
|
|
461
|
+
### Added
|
|
462
|
+
|
|
463
|
+
- **`AscTextareaComponent` — hỗ trợ `mode="view"`**: trước đó component kế thừa input `mode` từ `BaseControlAccessor` nhưng template chưa xử lý, set `mode="view"` không có tác dụng. Giờ hiển thị value dạng text (giữ nguyên xuống dòng qua `white-space: pre-wrap`), tham gia auto-sync màu label với `AscFormFieldComponent` như `AscInputComponent`/`AscSelectComponent`.
|
|
464
|
+
|
|
465
|
+
### Fixed
|
|
466
|
+
|
|
467
|
+
- **`AscFormFieldComponent` — sai selector SCSS cho layout horizontal + mode view**: `&&.--view` không khớp class `asc-form-field--view` nên rule `align-items: center` chưa từng được áp dụng. Sửa thành `&.asc-form-field--view`.
|
|
468
|
+
- **`AscInputComponent`, `AscSelectComponent` — đơn giản hoá box hiển thị ở `mode="view"`**: bỏ `display:flex`/`padding`/`min-height:40px` (không còn giả lập kích thước ô input nữa), chỉ còn text thuần với `min-height:20px`.
|
|
469
|
+
|
|
470
|
+
---
|
|
471
|
+
|
|
472
|
+
## [1.3.0] — 2026-07-10
|
|
473
|
+
|
|
474
|
+
### Added
|
|
475
|
+
|
|
476
|
+
- **`AscFormFieldComponent` — input `mode`** (`'edit' | 'view'`, mặc định `'edit'`): `mode="view"` chuyển label sang màu muted (mặc định `#747475`, override qua CSS custom property `--asc-field-label-view-color`).
|
|
477
|
+
- **`mode` tự đồng bộ giữa `AscFormFieldComponent` và control bên trong** — `mode` được chuyển lên `BaseControlAccessor` (mọi control kế thừa đều có sẵn, không cần khai báo lại), và `AscFormFieldComponent` tự đọc `mode` của control con qua `ContentChild` đã có sẵn. Chỉ cần set `mode="view"` ở **một trong hai nơi** (thường là trên `asc-input`/`asc-select`) — label tự follow theo, không cần lặp lại cấu hình ở cả 2 chỗ.
|
|
478
|
+
|
|
479
|
+
---
|
|
480
|
+
|
|
481
|
+
## [1.2.1] — 2026-07-10
|
|
482
|
+
|
|
483
|
+
### Fixed
|
|
484
|
+
|
|
485
|
+
- **`AscButtonComponent` — `[fullWidth]="true"` không thực sự kéo giãn button**: CSS trước đây chỉ set `width:100%` lên `.p-button` (class của thẻ `<button>` native bên trong), chưa từng đụng tới thẻ `<p-button>` (custom element PrimeNG dùng để wrap) — thẻ này mặc định `display:block` và không tự stretch trong flex host, khiến toàn bộ bị kẹt theo content-width. Giờ set `width:100%` trực tiếp lên thẻ `p-button`.
|
|
486
|
+
|
|
487
|
+
---
|
|
488
|
+
|
|
489
|
+
## [1.2.0] — 2026-07-09
|
|
490
|
+
|
|
491
|
+
### Added
|
|
492
|
+
|
|
493
|
+
- **`AscTrimSpaceDirective`** (`[ascTrimSpace]`) — cắt khoảng trắng 2 đầu giá trị khi blur (focusout), không đụng lúc đang gõ. Có `NgControl` → set qua `control.setValue()`; không có → fallback thao tác DOM trực tiếp + dispatch `input`. Dùng được trên native input/textarea lẫn `AscInputComponent`/`AscTextareaComponent`.
|
|
494
|
+
- **`AscInputComponent`, `AscSelectComponent` — input `mode`** (`'edit' | 'view'`, mặc định `'edit'`): `mode="view"` chỉ hiển thị value dạng text, không render form control — dùng cho trang xem chi tiết mà không cần đổi component. `AscSelectComponent` tự resolve label từ `options()` (hỗ trợ single, multi — join dấu phẩy, và grouped options); fallback về raw value nếu không tìm thấy option khớp.
|
|
495
|
+
|
|
496
|
+
---
|
|
497
|
+
|
|
498
|
+
## [1.1.2] — 2026-07-09
|
|
499
|
+
|
|
500
|
+
### Fixed
|
|
501
|
+
|
|
502
|
+
- **`BaseControlAccessor.isInvalid` — sync trạng thái ban đầu**: trước đây `isInvalid` chỉ cập nhật khi có event tương lai từ `AbstractControl`, nên control đã invalid + touched/dirty sẵn lúc mount (vd: parent gọi `markAllAsTouched()` trước khi subscribe kịp bắt event) sẽ hiển thị như valid cho tới lần tương tác kế tiếp. Giờ sync 1 lần ngay trong `ngOnInit`, nhất quán với pattern đã dùng ở `AscFormFieldComponent`.
|
|
503
|
+
- **`AscFormFieldComponent` — label font-size/font-weight giờ cấu hình được**: đọc từ CSS custom property `--asc-field-label-font-size`/`--asc-field-label-font-weight` (fallback về giá trị cũ), không cần `::ng-deep` để override.
|
|
504
|
+
- **`AscFormFieldComponent` — bỏ khoảng trống thừa ở footer**: `.asc-field-footer` trước đây luôn render với `min-height: 1.125rem` dù không có hint/error, để lại khoảng trống rỗng dưới mọi field. Giờ chỉ render khi thực sự có nội dung.
|
|
505
|
+
|
|
506
|
+
---
|
|
507
|
+
|
|
508
|
+
## [1.1.1] — 2026-07-09
|
|
509
|
+
|
|
510
|
+
### Fixed
|
|
511
|
+
|
|
512
|
+
- **`AscInputComponent`, `AscInputNumberComponent`, `AscPasswordComponent`, `AscSelectComponent` — size="sm" giờ thấp hơn `md`/`lg`**: trước đây cả 3 size đều cao `40px` (chỉ khác font-size/line-height). `size="sm"` giờ có `min-height: 32px`, khớp token `--asc-h-sm` mà `AscDatepickerComponent` đã dùng từ trước. `md`/`lg` không đổi (vẫn `40px`).
|
|
513
|
+
|
|
514
|
+
---
|
|
515
|
+
|
|
516
|
+
## [1.1.0] — 2026-07-08
|
|
517
|
+
|
|
518
|
+
### Added
|
|
519
|
+
|
|
520
|
+
- **`AscTableComponent` — cột STT (row number)**: input `showRowNumber` (mặc định `false`) thêm cột số thứ tự ở đầu bảng, giá trị tự tính đúng theo trang hiện tại (dùng `rowIndex` của PrimeNG — đã cộng offset phân trang `first` khi có paginator) — chuyển trang không cần tự tính lại. Header cột lấy theo locale (`msg.table.rowNumber` — "STT"/"No.") hoặc override qua input `rowNumberHeader`.
|
|
521
|
+
|
|
522
|
+
---
|
|
523
|
+
|
|
524
|
+
## [1.0.0] — 2026-07-06
|
|
525
|
+
|
|
526
|
+
### ⚠ BREAKING CHANGE
|
|
527
|
+
|
|
528
|
+
- **`AscTableComponent` lazyLoad — `pageNumber` đổi từ 1-based sang 0-based**: `pageNumber` trong `AscTableLazyLoadEvent` giờ tính bằng `Math.floor(first / rows)` (0-based, khớp convention `pageNumber = 0` đã dùng ở `@aseansc-admin/sea-http`) thay vì `Math.floor(first / rows) + 1` (1-based) như ở `0.9.0`/`0.10.0`. `pageSize`/`first`/`rows` không đổi.
|
|
529
|
+
- Consumer đang trừ `1` thủ công cho `pageNumber` nhận được từ `(lazyLoad)` (để bù đắp cho version cũ) cần bỏ chỗ trừ đó đi.
|
|
530
|
+
- Consumer chỉ mới dùng `first`/`rows` không bị ảnh hưởng.
|
|
531
|
+
|
|
532
|
+
---
|
|
533
|
+
|
|
534
|
+
## [0.10.0] — 2026-07-06
|
|
535
|
+
|
|
536
|
+
### Added
|
|
537
|
+
|
|
538
|
+
- **`AscIconComponent`** (`<asc-icon>`): render icon SVG inline bằng cách fetch qua HTTP từ app consume (`src` trỏ tới file `.svg`), thay vì PrimeIcon font-class — cho phép style màu qua CSS `currentColor` và kích thước tuỳ ý (`size` input). Fetch được cache theo `src` qua `AscIconService` (`providedIn: 'root'`) — nhiều `<asc-icon>` cùng `src` chỉ gọi HTTP 1 lần. Emit `(loadError)` khi fetch lỗi. Export public: `AscIconComponent`, `AscIconService`.
|
|
539
|
+
- Khai báo tường minh `@angular/common` và `@angular/platform-browser` vào `peerDependencies` (dùng bởi `AscIconComponent`/`AscIconService` — `HttpClient` + `DomSanitizer`). Cả hai vốn đã là dependency bắc cầu qua `@angular/core` nên không breaking.
|
|
540
|
+
|
|
541
|
+
### Bảo mật
|
|
542
|
+
|
|
543
|
+
- `AscIconComponent` dùng `DomSanitizer.bypassSecurityTrustHtml` để render SVG — chỉ truyền `src` do chính app kiểm soát (assets nội bộ), không dùng cho URL do user nhập.
|
|
544
|
+
|
|
545
|
+
---
|
|
546
|
+
|
|
547
|
+
## [0.9.0] — 2026-07-06
|
|
548
|
+
|
|
549
|
+
### Added
|
|
550
|
+
|
|
551
|
+
- **`AscTableComponent` lazyLoad**: `(lazyLoad)` event giờ kèm thêm `pageNumber`/`pageSize` (1-based, `pageNumber = Math.floor(first / rows) + 1`) bên cạnh `first`/`rows` sẵn có — khỏi phải tự tính lại ở service layer khi BE dùng convention `pageNumber`/`pageSize`. Thuần additive, không đổi/xoá field nào của `AscTableLazyLoadEvent` cũ.
|
|
552
|
+
|
|
553
|
+
---
|
|
554
|
+
|
|
555
|
+
## [0.8.0] — 2026-07-02
|
|
556
|
+
|
|
557
|
+
### Added
|
|
558
|
+
|
|
559
|
+
- **`AscLocaleService`**: đổi ngôn ngữ runtime (`setLocale('en-US' | 'vi-VN')`) mà **không cần reload trang**. Toàn bộ label/message của `@asc/ui` (table, datepicker, input, password, select, dialog, sidebar, toast, confirm) và translation nội bộ của PrimeNG (tên tháng, filter operator, aria label...) tự động cập nhật ngay khi gọi `setLocale()`. Export public: `import { AscLocaleService } from '@aseansc-admin/ui'`.
|
|
560
|
+
|
|
561
|
+
### Fixed
|
|
562
|
+
|
|
563
|
+
- **`AscTableComponent.formatNumber/formatCurrency`**: bỏ hardcode `'vi-VN'`, giờ fallback theo locale hiện tại (`AscLocaleService`) khi `format.locale` không được truyền.
|
|
564
|
+
- **`AscMessageErrorPipe`** / **`AscInputNumberComponent.resolvedLocale`**: đọc locale reactive thay vì đọc 1 lần lúc bootstrap.
|
|
565
|
+
|
|
566
|
+
---
|
|
567
|
+
|
|
568
|
+
## [0.7.16] — 2026-07-02
|
|
569
|
+
|
|
570
|
+
### Fixed
|
|
571
|
+
|
|
572
|
+
- **`preset.css` export**: Angular esbuild sass plugin resolve stylesheet import qua điều kiện `sass`/`style` trong `package.json#exports`, không phải `default`. Bản `0.7.15` chỉ khai báo `default` nên consumer app bị lỗi `"./preset.css" is not exported under the condition "style"`. Đã patch cả 3 điều kiện (`sass`, `style`, `default`).
|
|
573
|
+
|
|
574
|
+
---
|
|
575
|
+
|
|
576
|
+
## [0.7.15] — 2026-07-02
|
|
577
|
+
|
|
578
|
+
### Fixed
|
|
579
|
+
|
|
580
|
+
- **Tailwind auto-detection**: consumer app không còn phải tự thêm `@source '../node_modules/@aseansc-admin/ui';` thủ công. `preset.css` ship kèm bản build giờ tự đăng ký `@source` trỏ vào bundle của lib — chỉ cần import qua CSS `@import "@aseansc-admin/ui/preset.css";` (thay vì Sass `@use`).
|
|
581
|
+
|
|
582
|
+
---
|
|
583
|
+
|
|
584
|
+
## [0.7.14] — 2026-07-01
|
|
585
|
+
|
|
586
|
+
### Fixed
|
|
587
|
+
|
|
588
|
+
- **`AscStepperComponent`**: fix nội dung step không hiển thị — `p-step-panel` không render direct children, phải wrap qua `pTemplate="content"`.
|
|
589
|
+
- **`AscStepComponent`**: thêm `AscStepContentDirective` (`ng-template[ascStepContent]`) — bắt buộc wrap nội dung bước trong directive này thay vì dùng `ng-content` trong `ng-template` (pattern cũ không hoạt động khi TemplateRef được instantiate bởi component khác).
|
|
590
|
+
|
|
591
|
+
### Changed
|
|
592
|
+
|
|
593
|
+
- **Showcase Stepper**: nâng cấp demo thành luồng đăng ký thực tế 4 bước — form thông tin cá nhân (có validation), upload tài liệu CMND/CV, trang xem lại thông tin, trang hoàn tất.
|
|
594
|
+
|
|
595
|
+
---
|
|
596
|
+
|
|
597
|
+
## [0.7.13] — 2026-06-29
|
|
598
|
+
|
|
599
|
+
### Changed
|
|
600
|
+
|
|
601
|
+
- **`AscCardComponent`**: refactor bỏ custom card template/CSS, wrap `p-card` từ PrimeNG. Public API không thay đổi (`title`, `subtitle`, `shadow`, `rounded`, `[ascCardHeader]`, `[ascCardFooter]`).
|
|
602
|
+
|
|
603
|
+
---
|
|
604
|
+
|
|
605
|
+
## [0.7.12] — 2026-06-29
|
|
606
|
+
|
|
607
|
+
### Fixed
|
|
608
|
+
|
|
609
|
+
- **`BaseControlAccessor`**: `isInvalid` signal không cập nhật khi `markAllAsTouched()` / `markAllAsDirty()` được gọi vì `statusChanges` không emit khi chỉ có `touched`/`dirty` thay đổi. Chuyển sang `ctrl.events` với filter `StatusChangeEvent | TouchedChangeEvent | PristineChangeEvent`.
|
|
610
|
+
- **`AscSelectComponent`**, **`AscDatepickerComponent`**: không hiển thị viền đỏ khi invalid vì chỉ dùng `invalid()` (explicit input) thay vì `isInvalid()` từ base class. Thêm `isInvalidState = computed(() => invalid() || isInvalid())` như các component khác.
|
|
611
|
+
- **Preset**: `hoverBorderColor` đang là màu đỏ brand (`{primary.500}`) khiến mọi form control khi hover trông giống trạng thái lỗi. Đổi sang `{surface.400}` (slate, nhẹ hơn focus blue).
|
|
612
|
+
- **Preset**: `focusBorderColor` đang cùng màu đỏ với `invalidBorderColor`. Đổi focus sang `{blue.500}` / `{blue.400}` để phân biệt rõ hai trạng thái.
|
|
613
|
+
|
|
614
|
+
---
|
|
615
|
+
|
|
616
|
+
## [0.7.11] — 2026-06-25
|
|
617
|
+
|
|
618
|
+
### Fixed
|
|
619
|
+
|
|
620
|
+
- **`AscDatepickerComponent`**: khi config `locale: 'en-US'` mà không set `dateFormat` tường minh, datepicker vẫn dùng `dd/mm/yy` (vi-VN) để format ngày được chọn dù placeholder hiển thị đúng `mm/dd/yyyy`. `provideAscUI()` giờ tự derive `dateFormat` từ locale (`en-US` → `mm/dd/yy`, `vi-VN` → `dd/mm/yy`) khi user không cung cấp.
|
|
621
|
+
|
|
622
|
+
---
|
|
623
|
+
|
|
624
|
+
## [0.7.10] — 2026-06-24
|
|
625
|
+
|
|
626
|
+
### Fixed
|
|
627
|
+
|
|
628
|
+
- **`AscBoxDirective`**: đổi `(string & {})` → `string` cho các type `AscBoxWidth`, `AscBoxHeight`, `AscBorderColor`, `AscBgColor`. Angular template type checker không simplify intersection type, gây lỗi giả `"200 is not a valid value for w"` khi truyền CSS value tuỳ ý.
|
|
629
|
+
|
|
630
|
+
---
|
|
631
|
+
|
|
632
|
+
## [0.7.9] — 2026-06-24
|
|
633
|
+
|
|
634
|
+
### Added
|
|
635
|
+
|
|
636
|
+
- **`AscInputMaskComponent`** (`asc-input-mask`) — input định dạng cố định, wrap PrimeNG InputMask. CVA pattern, tích hợp với `AscFormFieldComponent`. `mask` input required (pattern: `9`=chữ số · `a`=chữ cái · `*`=alphanumeric · `?`=optional từ ký tự đó). Inputs: `placeholder`, `slotChar`, `autoClear`, `showClear`, `readonly`, `unmask`. Output `(complete)` emit khi điền đủ mask. Hỗ trợ các định dạng VN: số điện thoại, ngày tháng, CCCD, mã số thuế.
|
|
637
|
+
|
|
638
|
+
---
|
|
639
|
+
|
|
640
|
+
## [0.7.8] — 2026-06-24
|
|
641
|
+
|
|
642
|
+
### Added
|
|
643
|
+
|
|
644
|
+
- **`AscLoadingOverlayComponent`** (`asc-loading-overlay`) — overlay toàn màn hình với spinner ở giữa, block UI trong khi xử lý. Inputs: `visible` (boolean), `message` (string tuỳ chọn). `backdrop-filter: blur(2px)`, z-index 10000. Tích hợp với `AscLoadingService` từ `@aseansc-admin/sea-http`.
|
|
645
|
+
|
|
646
|
+
### Fixed
|
|
647
|
+
|
|
648
|
+
- **`AscTimelineAlign`**: thêm `'top' | 'bottom'` cho horizontal layout.
|
|
649
|
+
- **`AscAutoCompleteItem`**: đổi `Record<string, unknown>` → `Record<string, any>` để tương thích với interface không có index signature.
|
|
650
|
+
|
|
651
|
+
---
|
|
652
|
+
|
|
653
|
+
## [0.7.7] — 2026-06-24
|
|
654
|
+
|
|
655
|
+
### Added
|
|
656
|
+
|
|
657
|
+
- **`AscAutoCompleteComponent`** (`asc-auto-complete`) — input với gợi ý thời gian thực, wrap PrimeNG AutoComplete. CVA pattern, tích hợp với `AscFormFieldComponent`. Inputs: `suggestions`, `optionLabel`, `optionValue`, `minLength`, `delay`, `multiple` (chip mode), `forceSelection`, `dropdown`, `showClear`, `placeholder`. Output `(completeMethod)` emit text user đang gõ — consumer chịu trách nhiệm lọc và cập nhật `[suggestions]`.
|
|
658
|
+
- **`AscAvatarComponent`** (`asc-avatar`) — hiển thị đại diện người dùng, wrap PrimeNG Avatar. Fallback chain: `image` → `label` → `icon` → `pi pi-user` (mặc định). Inputs: `image`, `label`, `icon`, `size` (`normal`/`large`/`xlarge`), `shape` (`circle`/`square`), `style` (cho màu nền/chữ). Output `(imageError)`.
|
|
659
|
+
- **`AscAvatarGroupComponent`** (`asc-avatar-group`) — nhóm avatar chồng nhau, wrap PrimeNG AvatarGroup.
|
|
660
|
+
- **`AscTimelineComponent`** (`asc-timeline`) — chuỗi sự kiện theo trục thời gian, wrap PrimeNG Timeline. Input `[items]: AscTimelineItem[]` với các trường `title`, `description`, `date`, `icon`, `status` (`success`/`info`/`warn`/`danger`/`secondary`). Inputs: `align` (`left`/`right`/`alternate`), `layout` (`vertical`/`horizontal`).
|
|
661
|
+
- Export types: `AscAutoCompleteItem`, `AscAvatarSize`, `AscAvatarShape`, `AscTimelineItem`, `AscTimelineAlign`, `AscTimelineLayout`, `AscTimelineStatus`.
|
|
662
|
+
|
|
663
|
+
---
|
|
664
|
+
|
|
665
|
+
## [0.7.6] — 2026-06-24
|
|
666
|
+
|
|
667
|
+
### Changed
|
|
668
|
+
|
|
669
|
+
- **`index.ts`** — chuyển `AscPicklistComponent` từ section `Form` sang section `Data` cho đúng nhóm. Không có breaking change.
|
|
670
|
+
|
|
671
|
+
---
|
|
672
|
+
|
|
673
|
+
## [0.7.5] — 2026-06-24
|
|
674
|
+
|
|
675
|
+
### Added
|
|
676
|
+
|
|
677
|
+
- **`AscLoadingBarComponent`** — thanh loading 3px cố định đầu trang (`position: fixed; top: 0`). Input `[visible]` boolean điều khiển hiển thị. Kết hợp với `AscLoadingService` từ `@aseansc-admin/sea-http` để bind tự động với trạng thái API call toàn cục: `<asc-loading-bar [visible]="loading.isLoading()" />`.
|
|
678
|
+
- README — bổ sung section **Feedback** với bảng API đầy đủ cho: Spinner, Badge, Alert, Skeleton, Progress Bar, Empty State, Loading Bar.
|
|
679
|
+
|
|
680
|
+
---
|
|
681
|
+
|
|
682
|
+
## [0.7.4] — 2026-06-24
|
|
683
|
+
|
|
684
|
+
### Added
|
|
685
|
+
|
|
686
|
+
- **`AscSpinnerComponent`** (`asc-spinner`) — loading indicator tròn wrap PrimeNG `ProgressSpinner`. Inputs: `size` (`xs`=16px / `sm`=24px / `md`=40px / `lg`=56px / `xl`=80px, default `md`), `strokeWidth` (default `'4'`). Màu tự động theo `--p-primary-color`.
|
|
687
|
+
- **`AscBadgeComponent`** (`asc-badge`) — label nhỏ hiển thị trạng thái, wrap PrimeNG `Tag`. Input bắt buộc: `label`. Inputs tuỳ chọn: `severity` (`primary`/`success`/`warn`/`danger`/`info`/`secondary`/`contrast`), `rounded`, `icon`.
|
|
688
|
+
- **`AscAlertComponent`** (`asc-alert`) — thông báo inline dạng banner, 4 mức (`success`/`info`/`warn`/`danger`). Inputs: `severity`, `title`, `text`, `closable`. Output: `closed`. Hỗ trợ `ng-content` cho nội dung HTML tự do.
|
|
689
|
+
- **`AscSkeletonComponent`** (`asc-skeleton`) — placeholder loading, wrap PrimeNG `Skeleton`. Input `preset` (`text`/`avatar`/`button`/`image`/`thumbnail`) định nghĩa kích thước mặc định; `width`/`height`/`borderRadius` ghi đè preset. `shape` hỗ trợ `rectangle` và `circle`.
|
|
690
|
+
- **`AscAccordionComponent`** + **`AscAccordionItemComponent`** (`asc-accordion` / `asc-accordion-item`) — panel xếp chồng wrap PrimeNG Accordion v20 headless API. Hỗ trợ `[(value)]` two-way binding cho single/multiple mode, `disabled`, `icon` per item.
|
|
691
|
+
- **`AscProgressBarComponent`** (`asc-progress-bar`) — thanh tiến trình wrap PrimeNG `ProgressBar`. Inputs: `value`, `mode` (`determinate`/`indeterminate`), `showValue`, `unit`, `color`.
|
|
692
|
+
- **`AscEmptyStateComponent`** (`asc-empty-state`) — UI trống dữ liệu với icon, tiêu đề, mô tả, `ng-content` cho action buttons.
|
|
693
|
+
- **`AscPaginatorComponent`** (`asc-paginator`) — phân trang wrap PrimeNG `Paginator`. `model()` cho `first` và `rows`, output `pageChange`.
|
|
694
|
+
- Showcase: thêm menu group **Feedback** (Spinner, Badge, Alert, Skeleton, Progress Bar, Empty State) và **Accordion** vào Panel, **Paginator** vào Data.
|
|
695
|
+
|
|
696
|
+
---
|
|
697
|
+
|
|
698
|
+
## [0.7.3] — 2026-06-24
|
|
699
|
+
|
|
700
|
+
### Changed
|
|
701
|
+
|
|
702
|
+
- **`AscTypographyDirective`** — `SIZE_MAP` đổi từ `var(--text-xs)` … sang giá trị px cứng (xs=9px, sm=12px, md=14px, base=16px, lg=16px, xl=18px, 2xl=20px, 3xl=24px, 4xl=28px, 5xl=32px, 6xl=48px). Giải quyết lỗi CSS variable không được emit khi Tailwind không scan thấy class tương ứng trong template. Tất cả computed styles (`_size`, `_color`, `_align`, `_leading`, `_weight`) áp dụng `!important` mặc định.
|
|
703
|
+
- **`AscBoxDirective`** — `RADIUS_MAP` đổi sang giá trị px cứng (xs=4px, sm=8px, md=12px, lg=16px, xl=24px, 2xl=32px, 3xl=48px). `toSize()` helper tự động append `!important`. Tất cả thuộc tính trong `_styles()` có `!important`.
|
|
704
|
+
- Cùng lý do trên: CSS vars từ Tailwind v4 (như `var(--radius-sm)`) chỉ được emit khi class xuất hiện trong template — directive TypeScript không được scan.
|
|
705
|
+
|
|
706
|
+
---
|
|
707
|
+
|
|
708
|
+
## [0.7.2] — 2026-06-23
|
|
709
|
+
|
|
710
|
+
### Changed
|
|
711
|
+
|
|
712
|
+
- **`AscTypographyDirective`** — không còn phụ thuộc Tailwind CSS classes. Mọi giá trị được apply bằng inline style: `font-size` dùng CSS var theme (`var(--text-xs)`…), `font-weight` dùng numeric (100–900), `line-height` dùng số, `color` resolve qua `resolveColor()`.
|
|
713
|
+
- **`AscBoxDirective`** — không còn phụ thuộc Tailwind CSS classes. `border-radius` dùng CSS var theme (`var(--radius-xs)`…), `border-width` dùng px, `border-color` và `background-color` resolve qua `resolveColor()`.
|
|
714
|
+
- **`resolveColor()` utility** — hàm dùng chung strip prefix (`text-`/`bg-`/`border-`) rồi map sang: PrimeUI CSS var (`var(--p-primary-color)`, `var(--p-surface-*)`), Tailwind v4 CSS var (`var(--color-red-600)`), utility keywords (`white`/`black`/`transparent`…), hoặc passthrough cho CSS value thô (`#ff0000`, `oklch(...)`, `var(--custom)`).
|
|
715
|
+
- API inputs giữ nguyên — không có breaking change cho consumer.
|
|
716
|
+
|
|
717
|
+
---
|
|
718
|
+
|
|
719
|
+
## [0.7.1] — 2026-06-23
|
|
720
|
+
|
|
721
|
+
### Changed
|
|
722
|
+
- **`AscTypographyDirective`** — thêm JSDoc với bảng px cho `AscTextSize` và input `size`. IDE sẽ hiện tooltip px khi hover.
|
|
723
|
+
|
|
724
|
+
---
|
|
725
|
+
|
|
726
|
+
## [0.7.0] — 2026-06-22
|
|
727
|
+
|
|
728
|
+
### Added
|
|
729
|
+
|
|
730
|
+
- **`AscTypographyDirective`** — directive `[ascTypography]` cho phép style text bằng Tailwind class có type-safe. Inputs: `size` (`xs`…`6xl` tương ứng px), `color` (`AscTextColor` — gợi ý đầy đủ PrimeUI semantic + 15 Tailwind palettes × 11 shade), `align`, `leading`, `weight`.
|
|
731
|
+
- **`AscBoxDirective`** — directive `[ascBox]` cho box layout với typed inputs: `radius` / `radiusT/B/L/R/TL/TR/BL/BR`, `border` / `borderT/B/L/R`, `borderStyle`, `borderColor`, `bg`, `w`, `h`. Width/height dùng style binding, các thuộc tính còn lại dùng lookup map để Tailwind JIT scanner nhận đủ class.
|
|
732
|
+
- **`AscCardComponent`** — card container với slot `[ascCardHeader]` / `[ascCardFooter]` (TemplateRef), inputs `title`, `subtitle`, `shadow`, `rounded`. Dùng thay thế cho `p-card`.
|
|
733
|
+
- **`AscDividerComponent`** — đường kẻ phân cách, hỗ trợ nội dung tuỳ chọn qua `ng-content`. Inputs: `layout` (`horizontal` / `vertical`), `type` (`solid` / `dashed` / `dotted`), `align` (`left` / `center` / `right`). Dùng `::before` / `::after` pseudo-element, không dùng PrimeNG Divider.
|
|
734
|
+
- **`AscTextColor`** — TypeScript template literal type cho typed color autocomplete trong `AscTypographyDirective`.
|
|
735
|
+
- Export types: `AscTextSize`, `AscTextAlign`, `AscLeading`, `AscFontWeight`, `AscTextColor`, `AscBoxRadius`, `AscBorderWidth`, `AscBorderStyle`, `AscBorderColor`, `AscBgColor`, `AscBoxWidth`, `AscBoxHeight`, `AscCardShadow`, `AscCardRadius`, `AscDividerLayout`, `AscDividerType`, `AscDividerAlign`.
|
|
736
|
+
|
|
737
|
+
### Changed
|
|
738
|
+
|
|
739
|
+
- **`preset.scss`** — thêm `--text-5xl: 32px` và `--text-6xl: 48px` vào Tailwind `@theme` block để hoàn chỉnh font-size scale.
|
|
740
|
+
|
|
741
|
+
---
|
|
742
|
+
|
|
743
|
+
## [0.6.0] — 2026-06-11
|
|
744
|
+
|
|
745
|
+
### Breaking
|
|
746
|
+
|
|
747
|
+
- **Tailwind spacing scale** — base unit đổi từ `0.25rem` (4px) sang `1px`. Số trong class bây giờ = pixel: `p-16 = 16px`, `gap-8 = 8px`. Project hiện có cần nhân tất cả numeric spacing class ×4 để giữ nguyên layout (`p-4` → `p-16`, `gap-2` → `gap-8`, ...).
|
|
748
|
+
|
|
749
|
+
### Added
|
|
750
|
+
|
|
751
|
+
- **`AscBreadcrumb`** — component layout mới wrap `p-breadcrumb`. Tự động sinh trail từ Angular Router (`ActivatedRoute.data.breadcrumb`) hoặc nhận manual `items: MenuItem[]`. Input `home` mặc định `pi pi-home → /`, truyền `null` để ẩn.
|
|
752
|
+
- **`AscLayout` / `AppTopbar`** — thêm input `breadCrumb: TemplateRef` để đặt breadcrumb vào topbar.
|
|
753
|
+
- **`AscUpload` — 3 uploadMode mới**: `excelFile` (.xls, .xlsx, .csv), `docFile` (.doc, .docx, .txt), `pdfFile` (.pdf). Non-image mode hiển thị icon file có màu thay cho `<img>`. Nút xóa đổi sang `pi-trash`.
|
|
754
|
+
|
|
755
|
+
### Fixed
|
|
756
|
+
|
|
757
|
+
- **`AscTableComponent` — date/datetime** — column `type: 'date'` và `type: 'datetime'` hiển thị raw `Date.toString()` do `DatePipe.transform()` với locale `'vi-VN'` hardcode throw khi locale data chưa register. Đã sửa: dùng `LOCALE_ID` inject.
|
|
758
|
+
- **`AscTableComponent` — number format** — `type: 'number'` nay đọc đúng `format.thousandSep` và `format.locale`. `thousandSep: true` + `locale: 'vi-VN'` → dấu chấm (`8.000.000`); `locale: 'en-US'` → dấu phẩy (`8,000,000`); `thousandSep: false` (mặc định) → không có separator.
|
|
759
|
+
|
|
760
|
+
### Changed
|
|
761
|
+
|
|
762
|
+
- **Design tokens** — `_primitive.scss` spacing, font-size, border-radius đổi từ `rem` sang `px`.
|
|
763
|
+
- **`preset.ts`** — tất cả component override đổi sang `px`. Datatable dùng đúng cấu trúc token nested (`root.borderColor`, `headerCell.padding`, `bodyCell.padding`).
|
|
764
|
+
- **`preset.scss`** — thêm `--radius-*`, `--text-*`, `--leading-*` vào Tailwind `@theme`.
|
|
765
|
+
- **`AscTableComponent`** — `showGridlines` default `false` → `true`; `scrollHeight` default `400px` → `500px`; column type `date` giờ align center.
|
|
766
|
+
|
|
767
|
+
---
|
|
768
|
+
|
|
769
|
+
## [0.5.1] — 2026-05-27
|
|
770
|
+
|
|
771
|
+
### Added
|
|
772
|
+
|
|
773
|
+
- **`AscUpload` — uploadMode mở rộng**: thêm `excelFile` (.xls, .xlsx, .csv), `docFile` (.doc, .docx, .txt), `pdfFile` (.pdf). Non-image mode hiển thị icon file có màu; nút xóa đổi sang `pi-trash`.
|
|
774
|
+
- **`AscBreadcrumb`** — component layout mới wrap `p-breadcrumb`. Tự sinh trail từ `ActivatedRoute.data.breadcrumb` hoặc nhận manual `items: MenuItem[]`. Input `home` mặc định `pi pi-home → /`, truyền `null` để ẩn.
|
|
775
|
+
- **`AscLayout` / `AppTopbar`** — thêm input `breadCrumb: TemplateRef` để nhúng breadcrumb vào topbar.
|
|
776
|
+
|
|
777
|
+
### Fixed
|
|
778
|
+
|
|
779
|
+
- **`AscTableComponent` — date/datetime** — `DatePipe.transform()` với locale `'vi-VN'` hardcode throw khi locale data chưa register. Sửa: dùng `LOCALE_ID` inject.
|
|
780
|
+
- **`AscTableComponent` — number format** — `type: 'number'` đọc đúng `format.thousandSep` và `format.locale`.
|
|
781
|
+
|
|
782
|
+
### Changed
|
|
783
|
+
|
|
784
|
+
- **`AscTableComponent`** — `showGridlines` default `false` → `true`; `scrollHeight` default `400px` → `500px`; column `type: 'date'` align center.
|
|
785
|
+
|
|
786
|
+
---
|
|
787
|
+
|
|
788
|
+
## [0.5.0] — 2026-05-27
|
|
789
|
+
|
|
790
|
+
### Added
|
|
791
|
+
|
|
792
|
+
- **`AscToggleSwitchComponent`** — toggle switch với CVA integration, label trái/phải.
|
|
793
|
+
- **`AscPicklistComponent`** — chuyển sang CVA pattern (`BaseControlAccessor`). Fix overlay z-index bị che khuất.
|
|
794
|
+
|
|
795
|
+
### Changed
|
|
796
|
+
|
|
797
|
+
- **Form components (tất cả)** — thêm input `disabled` đồng nhất cho toàn bộ form components (`AscInput`, `AscSelect`, `AscDatepicker`, `AscPassword`, `AscInputNumber`, `AscCheckbox`, `AscRadio`, `AscTextarea`).
|
|
798
|
+
- **`AscSidebarComponent`** — default header có nút action primary/secondary với label mặc định, tùy chỉnh show/hide; nút secondary đóng sidebar.
|
|
799
|
+
|
|
800
|
+
### Fixed
|
|
801
|
+
|
|
802
|
+
- **`BaseControlAccessor`** — sync `ng-invalid` CSS class trên native input qua reactive `isInvalid` signal.
|
|
803
|
+
- **`AscPassword`, `AscInputNumber`, `AscTextarea`, `AscCheckbox`, `AscRadio`** — áp dụng `isInvalid` signal đồng nhất.
|
|
804
|
+
- Hai bug nhỏ phát hiện trong component audit (label binding, slot projection).
|
|
805
|
+
|
|
806
|
+
---
|
|
807
|
+
|
|
808
|
+
## [0.4.1] — 2026-05-14
|
|
809
|
+
|
|
810
|
+
### Added
|
|
811
|
+
|
|
812
|
+
- **`AscTextareaComponent`** — textarea có character counter, CVA integration.
|
|
813
|
+
- **`AscPicklistComponent`** — picklist dual-list với custom item template support.
|
|
814
|
+
- **`AscConfirmPopup`** — confirm popup anchor vào element, dùng thay PrimeNG `ConfirmPopup`.
|
|
815
|
+
- **`AscPopoverComponent`** — popover với arbitrary content, trigger manual / hover.
|
|
816
|
+
- **`AscTooltipDirective`** — directive `[ascTooltip]` với typed position input.
|
|
817
|
+
|
|
818
|
+
---
|
|
819
|
+
|
|
820
|
+
## [0.4.0] — 2026-05-14
|
|
821
|
+
|
|
822
|
+
### Added
|
|
823
|
+
|
|
824
|
+
- **`AscRadioComponent`** — radio button group với CVA integration, showcase đầy đủ.
|
|
825
|
+
|
|
826
|
+
---
|
|
827
|
+
|
|
828
|
+
## [0.3.3] — 2026-05-13
|
|
829
|
+
|
|
830
|
+
### Changed
|
|
831
|
+
- **Button**: size xs/sm/md/lg — fixed px values, border-radius 8px, font-size 14px (xs/sm) / 16px (md/lg), outlined border 1.5px
|
|
832
|
+
- **Input**: sm/md/lg sizing with fixed px, floatLabel mode skips size overrides
|
|
833
|
+
- **Select**: sm/md/lg sizing with fixed px, skips overrides when floatLabel or label active
|
|
834
|
+
- **Tokens**: success color updated to `#22C55E`
|
|
835
|
+
|
|
836
|
+
---
|
|
837
|
+
|
|
838
|
+
## [0.3.2] — 2026-05-13
|
|
839
|
+
|
|
840
|
+
### Changed
|
|
841
|
+
- **Button sizing** — aligned to design system spec:
|
|
842
|
+
- `xs`: min-width 64px, height 32px, padding 4px 16px
|
|
843
|
+
- `md`: min-width 80px, height 40px, padding 8px 24px
|
|
844
|
+
- `lg`: min-width 96px, height 48px, padding 12px 32px
|
|
845
|
+
- **Button border-radius** — all sizes now use 8px (`0.5rem`)
|
|
846
|
+
|
|
847
|
+
---
|
|
848
|
+
|
|
849
|
+
## [0.3.1] — 2026-05-13
|
|
850
|
+
|
|
851
|
+
### Fixed
|
|
852
|
+
- **`--asc-text-primary` not changing in dark mode** — `_semantic.scss` dark mode overrides were scoped to `.asc-dark` selector but `AscThemeService` toggles `.app-dark`; changed selector to `.app-dark` to match.
|
|
853
|
+
|
|
854
|
+
---
|
|
855
|
+
|
|
856
|
+
## [0.3.0] — 2026-05-13
|
|
857
|
+
|
|
858
|
+
### Fixed
|
|
859
|
+
- **`@import "layout/layout"` not found** — layout SCSS was living in `components/layout/theme/layout/` and only copied to `tokens/layout/` during dist build, causing Sass to fail in both the monorepo showcase and consumer apps. Moved layout theme files directly into `tokens/layout/` so the path is consistent in source and dist.
|
|
860
|
+
- Updated `ng-package.json`: removed the separate asset copy for layout (now redundant) and removed `components/layout/theme` from `styleIncludePaths`.
|
|
861
|
+
|
|
862
|
+
---
|
|
863
|
+
|
|
864
|
+
## [0.2.9] — 2026-05-13
|
|
865
|
+
|
|
866
|
+
### Fixed
|
|
867
|
+
- **`--p-surface-overlay` not defined** — `layout/_main.scss` was incorrectly using `var(--p-surface-overlay)` (non-existent PrimeNG variable); corrected to `var(--surface-overlay)` (the layout-scoped variable that maps to `--p-overlay-popover-background`).
|
|
868
|
+
- **Dark mode toggle broken** — `AscThemeService` was adding class `asc-dark` to `<html>` but `darkModeSelector` in PrimeNG config expected `.app-dark`; aligned to `app-dark`.
|
|
869
|
+
|
|
870
|
+
---
|
|
871
|
+
|
|
872
|
+
## [0.2.8] — 2026-05-13
|
|
873
|
+
|
|
874
|
+
### Fixed
|
|
875
|
+
- **ERESOLVE on install** — declaring `@angular/common`, `@angular/forms`, `@angular/router` as peer dependencies caused npm to resolve them independently, potentially picking a patch version newer than what the consumer has, triggering exact-version peer conflicts between Angular sub-packages. Removed these three from `peerDependencies`; only `@angular/core` and `@angular/cdk` are now declared (all Angular sub-packages are always installed at the same version as `@angular/core` in any Angular project).
|
|
876
|
+
|
|
877
|
+
---
|
|
878
|
+
|
|
879
|
+
## [0.2.7] — 2026-05-13
|
|
880
|
+
|
|
881
|
+
### Fixed
|
|
882
|
+
- **peerDependencies version conflict** — `primeng: ">=20.0.0"` caused npm to resolve `primeng@21` in consumer apps, which required `@angular/cdk@^21.0.0` and conflicted with CDK@20.x. All Angular-ecosystem peer deps (`@angular/*`, `primeng`) now use `^20.0.0` to lock to major version 20 and prevent cross-major resolution.
|
|
883
|
+
|
|
884
|
+
> **Note:** When upgrading to Angular 21, use a future release of `@aseansc-admin/ui` built against Angular 21.
|
|
885
|
+
|
|
886
|
+
---
|
|
887
|
+
|
|
888
|
+
## [0.2.6] — 2026-05-13
|
|
889
|
+
|
|
890
|
+
### Added
|
|
891
|
+
- `README.md` and `CHANGELOG.md` now shipped inside the npm package.
|
|
892
|
+
|
|
893
|
+
---
|
|
894
|
+
|
|
895
|
+
## [0.2.5] — 2026-05-13
|
|
896
|
+
|
|
897
|
+
### Changed
|
|
898
|
+
- Relaxed all Angular, PrimeNG, and Tailwind peer dependencies from `^20.x` to `>=20.0.0`.
|
|
899
|
+
|
|
900
|
+
---
|
|
901
|
+
|
|
902
|
+
## [0.2.4] — 2026-05-13
|
|
903
|
+
|
|
904
|
+
### Fixed
|
|
905
|
+
- **Layout CSS missing in consumer apps** — `ng-package.json` only shipped `tokens/*.scss`; the entire layout theme (`_core`, `_menu`, `_topbar`, `_responsive`, variables, etc.) was absent from the published package. Layout SCSS is now copied to `tokens/layout/` in the dist.
|
|
906
|
+
- Updated `preset.scss` import path to use the dist-relative `layout/layout` instead of a source-relative path that broke after install.
|
|
907
|
+
|
|
908
|
+
---
|
|
909
|
+
|
|
910
|
+
## [0.2.3] — 2026-05-13
|
|
911
|
+
|
|
912
|
+
### Changed
|
|
913
|
+
- Added `@primeuix/themes: >=0.0.1` to `peerDependencies`.
|
|
914
|
+
|
|
915
|
+
---
|
|
916
|
+
|
|
917
|
+
## [0.2.2] — 2026-05-13
|
|
918
|
+
|
|
919
|
+
### Changed
|
|
920
|
+
- Relaxed `@angular/cdk` peer dependency from `^20.3.0` to `^20.0.0`.
|
|
921
|
+
|
|
922
|
+
---
|
|
923
|
+
|
|
924
|
+
## [0.2.1] — 2026-05-13
|
|
925
|
+
|
|
926
|
+
### Changed
|
|
927
|
+
- Fixed all `peerDependencies` version ranges from `>=` to `^` for consistency.
|
|
928
|
+
|
|
929
|
+
---
|
|
930
|
+
|
|
931
|
+
## [0.2.0] — 2026-05-12
|
|
932
|
+
|
|
933
|
+
### Breaking
|
|
934
|
+
- Package renamed from `@asc/ui` to `@aseansc-admin/ui` to match the npm account scope.
|
|
935
|
+
|
|
936
|
+
### Added
|
|
937
|
+
- **Dark mode support** — `.app-dark` class on `<html>` now drives both PrimeNG theme and Tailwind `dark:` utilities.
|
|
938
|
+
- `@custom-variant dark (&:where(.app-dark, .app-dark *))` registered in `preset.scss` so consumers get `dark:` utilities out of the box.
|
|
939
|
+
- `postcss.config.json` support documented — Angular's `@angular/build:application` only reads JSON PostCSS configs (`.mjs` is silently ignored).
|
|
940
|
+
|
|
941
|
+
### Fixed
|
|
942
|
+
- **Tailwind CSS not applying** — `postcss.config.mjs` was ignored by Angular's build system; replaced with `postcss.config.json`.
|
|
943
|
+
- **Dark mode toggle broken** — `darkModeSelector` in PrimeNG config was `.asc-dark` but `LayoutService` toggled `.app-dark`; aligned to `.app-dark`.
|
|
944
|
+
|
|
945
|
+
---
|
|
946
|
+
|
|
947
|
+
## [0.1.0] — Initial release
|
|
948
|
+
|
|
949
|
+
### Components
|
|
950
|
+
- `AscLayout` — app shell with topbar, sidebar, and footer
|
|
951
|
+
- `AscButtonComponent` — button with variants, severity, loading state
|
|
952
|
+
- `AscInputComponent` — text input with CVA integration
|
|
953
|
+
- `AscSelectComponent` — dropdown select
|
|
954
|
+
- `AscDatepickerComponent` — date picker (vi-VN / en-US locale)
|
|
955
|
+
- `AscFormFieldComponent` — form field wrapper with label and validation messages
|
|
956
|
+
- `AscTableComponent` — data table with lazy loading, sorting, filtering, custom cell templates
|
|
957
|
+
- `AscDialogComponent` — modal dialog with header/footer slots
|
|
958
|
+
- `AscSidebarComponent` — slide-in drawer with position support
|
|
959
|
+
- `AscUpload` — file upload with disabled state, size formatting, and HttpClient integration
|
|
960
|
+
- `AscToastService` / `AscConfirmService` — programmatic toast and confirm dialog
|
|
961
|
+
|
|
962
|
+
### Bootstrap
|
|
963
|
+
- `provideAscUI()` — single provider function for PrimeNG theme, i18n, and service registration
|
|
964
|
+
|
|
965
|
+
### i18n
|
|
966
|
+
- Built-in Vietnamese (`vi-VN`) and English (`en-US`) translations
|