@aseansc/ui 4.0.1 → 5.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 CHANGED
@@ -1,978 +1,1021 @@
1
- # Changelog
2
-
3
- All notable changes to `@aseansc/ui` (trước đây `@asc/ui`) are documented here.
4
-
5
- ---
6
-
7
- ## [4.0.1] — 2026-09-10
8
-
9
- ### Fixed
10
-
11
- Phát hiện khi cài `@aseansc/ui@4.0.0` thật vào 1 project Angular 22 sạch (test riêng, không qua monorepo) — README hướng dẫn thiếu/sai 3 chỗ:
12
-
13
- - **Thiếu hướng dẫn `.npmrc`**: PrimeNG 21 tự khai peer dep `@angular/cdk@^21`, cài trên Angular 22 sẽ bị `ERESOLVE` nếu không có `legacy-peer-deps=true`. Thêm hướng dẫn rõ ràng vào mục Peer dependencies.
14
- - **`provideAnimations()`/`@angular/animations` không cần thiết** — verify PrimeNG 21 không đụng tới `@angular/animations`/`BrowserAnimationsModule` ở đâu (dùng `@primeuix/motion` riêng). Bỏ khỏi setup example — trước đây bắt cài thêm 1 package đã bị Angular 22 đánh dấu deprecated mà không có tác dụng gì.
15
- - **`provideZoneChangeDetection()` → `provideZonelessChangeDetection()`** — `ng new` ở Angular 22 mặc định không còn cài `zone.js`; dùng API cũ khiến app mới tạo theo hướng dẫn bị lỗi runtime đòi Zone. Toàn bộ component đã dùng signal + `OnPush` nên chạy zoneless bình thường.
16
-
17
- ---
18
-
19
- ## [4.0.0] — 2026-09-10
20
-
21
- ### Changed
22
-
23
- - **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`.
24
- - Đồ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ộ"):
25
- - Bảng màu `brand` (50-950) đổi sang giá trị chính thức (trước đây suy đoán từ tints.dev).
26
- - Thêm bảng `grey` (10-900) thay cho `slate` — neutral chính của mọi border/text/surface.
27
- - 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).
28
- - `--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.
29
- - Dark mode đồng bộ tương ứng (brand giữ nguyên brand-500 làm default, chỉ hover/active nhạt dần).
30
- - Chiều cao control (`--asc-h-md`): 40px → 36px.
31
- - Border-radius: 8px → 12px cho input/select/datepicker/textarea/password/input-number; Button đổi thành 999px (pill).
32
-
33
- ### Added
34
-
35
- - `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`).
36
-
37
- ### Fixed
38
-
39
- - 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`.
40
- - `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.
41
- - `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.
42
- - `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`.
43
- - 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.
44
- - Button severity `secondary`: text `#262626`; kết hợp `variant="outlined"` thêm border `#525252`.
45
-
46
- ---
47
-
48
- ## [3.0.0] — 2026-09-03
49
-
50
- ### Changed
51
-
52
- - **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.
53
-
54
- ---
55
-
56
- ## [2.11.0] — 2026-08-25
57
-
58
- ### Added
59
-
60
- - **`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).
61
- - **`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).
62
-
63
- ### Fixed
64
-
65
- - **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`.
66
-
67
- ---
68
-
69
- ## [2.10.0] — 2026-08-20
70
-
71
- ### Added
72
-
73
- - **`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>`).
74
-
75
- ---
76
-
77
- ## [2.9.3] — 2026-08-20
78
-
79
- ### Fixed
80
-
81
- - **`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ũ.
82
-
83
- ---
84
-
85
- ## [2.9.2] — 2026-08-19
86
-
87
- ### Fixed
88
-
89
- - **`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.
90
-
91
- ---
92
-
93
- ## [2.9.1] — 2026-08-19
94
-
95
- ### Fixed
96
-
97
- - **`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.
98
- - **`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 `'—'`.
99
-
100
- ---
101
-
102
- ## [2.9.0] — 2026-08-05
103
-
104
- ### Added
105
-
106
- - **`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.
107
- - **`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.
108
-
109
- ---
110
-
111
- ## [2.8.0] — 2026-08-04
112
-
113
- ### Added
114
-
115
- - **`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.
116
-
117
- ### Fixed
118
-
119
- - **`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`.
120
-
121
- ---
122
-
123
- ## [2.7.0] — 2026-08-04
124
-
125
- ### Added
126
-
127
- - **`AscSelectButtonComponent`** — wrapper PrimeNG SelectButton hỗ trợ single/multiple select, custom object mapping, custom item template, size, invalid/disabled/readonly, `mode="view"`.
128
- - **`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`.
129
- - **`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.
130
-
131
- ### Fixed
132
-
133
- - **`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).
134
- - **`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 đó.
135
-
136
- ---
137
-
138
- ## [2.6.0] — 2026-07-29
139
-
140
- ### Added
141
-
142
- - **`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.
143
- - **`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.
144
-
145
- ### Fixed
146
-
147
- - **`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".
148
-
149
- ---
150
-
151
- ## [2.5.0] — 2026-07-29
152
-
153
- ### Added
154
-
155
- - **`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`.
156
-
157
- ### Changed
158
-
159
- - **`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.
160
-
161
- ---
162
-
163
- ## [2.4.0] — 2026-07-27
164
-
165
- ### Added
166
-
167
- - **`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.
168
- - **`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.
169
-
170
- ### Fixed
171
-
172
- - **`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.
173
-
174
- ---
175
-
176
- ## [2.3.4] — 2026-07-22
177
-
178
- ### Changed
179
-
180
- - **`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`.
181
-
182
- ---
183
-
184
- ## [2.3.3] — 2026-07-22
185
-
186
- ### Fixed
187
-
188
- - **`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.
189
-
190
- ---
191
-
192
- ## [2.3.2] — 2026-07-22
193
-
194
- ### Changed
195
-
196
- - **`AscRadioComponent` — input `alignColumn`**: đổi giá trị mặc định từ `'start'` sang `'center'`.
197
-
198
- ---
199
-
200
- ## [2.3.1] — 2026-07-22
201
-
202
- ### Fixed
203
-
204
- - **`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.
205
-
206
- ---
207
-
208
- ## [2.3.0] — 2026-07-22
209
-
210
- ### Added
211
-
212
- - **`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'`.
213
-
214
- ### Changed
215
-
216
- - **`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.
217
-
218
- ### Fixed
219
-
220
- - **`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.
221
- - **`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.
222
-
223
- ---
224
-
225
- ## [2.2.0] — 2026-07-22
226
-
227
- ### Added
228
-
229
- - **`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"`.
230
- - **`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).
231
- - **`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.
232
- - **`AscTableComponent` — `stripedRows` mặc định `true`**: màu nền hàng xen kẽ dùng `--asc-surface-50` (`#F2F3F5`).
233
-
234
- ### Changed
235
-
236
- - **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`.
237
-
238
- ### Fixed
239
-
240
- - **`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).
241
- - **`AscTableComponent` — border thừa dưới thanh pagination**: bỏ `border-top` trên `.p-paginator`.
242
- - **`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`.
243
-
244
- ---
245
-
246
- ## [2.1.0] — 2026-07-20
247
-
248
- ### Added
249
-
250
- - **`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.
251
-
252
- ### Changed
253
-
254
- - **`AscButtonComponent`**: giảm padding ngang cho size `md`/`lg`/`xl` (`8px 24px→16px`, `10px 32px→24px`, `12px 40px→32px`).
255
-
256
- ---
257
-
258
- ## [2.0.1] — 2026-07-20
259
-
260
- ### Fixed
261
-
262
- - **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**):
263
- - **`AscRadioComponent`**: checked-state (viền rỗng + chấm giữa), cố định kích thước 20×20px, hover states.
264
- - **`AscInputComponent`, `AscSelectComponent`, `AscDatepickerComponent`, `AscPasswordComponent`, `AscTextareaComponent`, `AscInputNumberComponent`**: box-shadow đỏ khi `invalid` + đang focus.
265
- - **`AscButtonComponent`**: font-size của icon co theo từng size (xs/sm/md/lg/xl).
266
- - **`AscToastService`**: border-radius/box-shadow/border của toast message.
267
- - **`AscConfirmPopup`**: toàn bộ layout (content/icon/message/footer) — trước hoàn toàn không có style.
268
- - **`AscConfirmDialog`**: toàn bộ layout (header/content/icon/message/footer) — trước hoàn toàn không có style.
269
-
270
- ---
271
-
272
- ## [2.0.0] — 2026-07-20
273
-
274
- ### ⚠ BREAKING CHANGES
275
-
276
- - **`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.
277
- - **`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á.
278
-
279
- ### Fixed
280
-
281
- - **`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`.
282
- - **`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.
283
- - **`AscTextareaComponent` — thiếu size `xs`/`xl`**: mở rộng thang padding/font-size, giữ nguyên `sm`/`md`/`lg` cũ.
284
-
285
- ### Docs
286
-
287
- - 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`.
288
-
289
- ---
290
-
291
- ## [1.15.0] — 2026-07-20
292
-
293
- ### Added
294
-
295
- - **`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`.
296
-
297
- ---
298
-
299
- ## [1.14.0] — 2026-07-20
300
-
301
- ### Added
302
-
303
- - **`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`).
304
-
305
- ### Changed
306
-
307
- - **`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.
308
- - **`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.
309
-
310
- ---
311
-
312
- ## [1.13.0] — 2026-07-17
313
-
314
- ### Added
315
-
316
- - **`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).
317
-
318
- ### Fixed
319
-
320
- - **`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.
321
-
322
- ---
323
-
324
- ## [1.12.0] — 2026-07-16
325
-
326
- ### Added
327
-
328
- - **`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.
329
- - **`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"`.
330
- - **`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.
331
-
332
- ### Fixed
333
-
334
- - **`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.
335
- - **`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.
336
-
337
- ---
338
-
339
- ## [1.11.0] — 2026-07-16
340
-
341
- ### Added
342
-
343
- - **`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.
344
-
345
- ### Fixed
346
-
347
- - **`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.
348
-
349
- ---
350
-
351
- ## [1.10.0] — 2026-07-16
352
-
353
- ### Added
354
-
355
- - **`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.
356
-
357
- ### Fixed
358
-
359
- - **`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`.
360
- - **`AscSelectComponent` — label/chip trong multiselect lệch dọc**: thêm `display: flex; align-items: center` cho `.p-multiselect-label-container`.
361
-
362
- ---
363
-
364
- ## [1.9.0] — 2026-07-16
365
-
366
- ### Added
367
-
368
- - **`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.
369
- - **`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`.
370
-
371
- ---
372
-
373
- ## [1.8.0] — 2026-07-15
374
-
375
- ### Added
376
-
377
- - **`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.
378
-
379
- ---
380
-
381
- ## [1.7.2] — 2026-07-15
382
-
383
- ### Fixed
384
-
385
- - **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.
386
- - **`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.
387
- - **`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).
388
- - **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".
389
-
390
- ---
391
-
392
- ## [1.7.1] — 2026-07-15
393
-
394
- ### Fixed
395
-
396
- - **`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.
397
-
398
- ---
399
-
400
- ## [1.7.0] — 2026-07-15
401
-
402
- ### Added
403
-
404
- - **`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.
405
- - `AscRadioComponent` — hiển thị label của option đang chọn, `—` khi chưa chọn.
406
- - `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`.
407
- - `AscDatepickerComponent` — hiển thị value đã format theo `dateFormat`/`showTime`, hỗ trợ cả 3 `selectionMode` (single/range/multiple), dùng `dateRangeSeparator` i18n cho range.
408
- - **`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ý).
409
- - **`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.
410
-
411
- ### Fixed
412
-
413
- - **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).
414
- - **`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)`.
415
- - **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.
416
-
417
- ---
418
-
419
- ## [1.6.1] — 2026-07-14
420
-
421
- ### Fixed
422
-
423
- - **`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.
424
-
425
- ---
426
-
427
- ## [1.6.0] — 2026-07-14
428
-
429
- ### Added
430
-
431
- - **`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.
432
-
433
- ---
434
-
435
- ## [1.5.2] — 2026-07-13
436
-
437
- ### Fixed
438
-
439
- - **`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`.
440
-
441
- ### Changed
442
-
443
- - **`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).
444
-
445
- ---
446
-
447
- ## [1.5.1] — 2026-07-10
448
-
449
- ### Fixed
450
-
451
- - **`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.
452
-
453
- ### Changed
454
-
455
- - **`.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.
456
-
457
- ---
458
-
459
- ## [1.5.0] — 2026-07-10
460
-
461
- ### Added
462
-
463
- - **`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`.
464
-
465
- ### Changed
466
-
467
- - **`AscFormFieldComponent`** — bỏ `padding-top: 0.5rem` trên label ở layout horizontal.
468
-
469
- ---
470
-
471
- ## [1.4.0] — 2026-07-10
472
-
473
- ### Added
474
-
475
- - **`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`.
476
-
477
- ### Fixed
478
-
479
- - **`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`.
480
- - **`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`.
481
-
482
- ---
483
-
484
- ## [1.3.0] — 2026-07-10
485
-
486
- ### Added
487
-
488
- - **`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`).
489
- - **`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ỗ.
490
-
491
- ---
492
-
493
- ## [1.2.1] — 2026-07-10
494
-
495
- ### Fixed
496
-
497
- - **`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`.
498
-
499
- ---
500
-
501
- ## [1.2.0] — 2026-07-09
502
-
503
- ### Added
504
-
505
- - **`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`.
506
- - **`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.
507
-
508
- ---
509
-
510
- ## [1.1.2] — 2026-07-09
511
-
512
- ### Fixed
513
-
514
- - **`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`.
515
- - **`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.
516
- - **`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.
517
-
518
- ---
519
-
520
- ## [1.1.1] — 2026-07-09
521
-
522
- ### Fixed
523
-
524
- - **`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`).
525
-
526
- ---
527
-
528
- ## [1.1.0] — 2026-07-08
529
-
530
- ### Added
531
-
532
- - **`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`.
533
-
534
- ---
535
-
536
- ## [1.0.0] — 2026-07-06
537
-
538
- ### ⚠ BREAKING CHANGE
539
-
540
- - **`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.
541
- - 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.
542
- - Consumer chỉ mới dùng `first`/`rows` không bị ảnh hưởng.
543
-
544
- ---
545
-
546
- ## [0.10.0] — 2026-07-06
547
-
548
- ### Added
549
-
550
- - **`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`.
551
- - 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.
552
-
553
- ### Bảo mật
554
-
555
- - `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.
556
-
557
- ---
558
-
559
- ## [0.9.0] — 2026-07-06
560
-
561
- ### Added
562
-
563
- - **`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ũ.
564
-
565
- ---
566
-
567
- ## [0.8.0] — 2026-07-02
568
-
569
- ### Added
570
-
571
- - **`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'`.
572
-
573
- ### Fixed
574
-
575
- - **`AscTableComponent.formatNumber/formatCurrency`**: bỏ hardcode `'vi-VN'`, giờ fallback theo locale hiện tại (`AscLocaleService`) khi `format.locale` không được truyền.
576
- - **`AscMessageErrorPipe`** / **`AscInputNumberComponent.resolvedLocale`**: đọc locale reactive thay vì đọc 1 lần lúc bootstrap.
577
-
578
- ---
579
-
580
- ## [0.7.16] — 2026-07-02
581
-
582
- ### Fixed
583
-
584
- - **`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`).
585
-
586
- ---
587
-
588
- ## [0.7.15] — 2026-07-02
589
-
590
- ### Fixed
591
-
592
- - **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`).
593
-
594
- ---
595
-
596
- ## [0.7.14] — 2026-07-01
597
-
598
- ### Fixed
599
-
600
- - **`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"`.
601
- - **`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).
602
-
603
- ### Changed
604
-
605
- - **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.
606
-
607
- ---
608
-
609
- ## [0.7.13] — 2026-06-29
610
-
611
- ### Changed
612
-
613
- - **`AscCardComponent`**: refactor bỏ custom card template/CSS, wrap `p-card` từ PrimeNG. Public API không thay đổi (`title`, `subtitle`, `shadow`, `rounded`, `[ascCardHeader]`, `[ascCardFooter]`).
614
-
615
- ---
616
-
617
- ## [0.7.12] — 2026-06-29
618
-
619
- ### Fixed
620
-
621
- - **`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`.
622
- - **`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.
623
- - **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).
624
- - **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.
625
-
626
- ---
627
-
628
- ## [0.7.11] — 2026-06-25
629
-
630
- ### Fixed
631
-
632
- - **`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.
633
-
634
- ---
635
-
636
- ## [0.7.10] — 2026-06-24
637
-
638
- ### Fixed
639
-
640
- - **`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ỳ ý.
641
-
642
- ---
643
-
644
- ## [0.7.9] — 2026-06-24
645
-
646
- ### Added
647
-
648
- - **`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ế.
649
-
650
- ---
651
-
652
- ## [0.7.8] — 2026-06-24
653
-
654
- ### Added
655
-
656
- - **`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`.
657
-
658
- ### Fixed
659
-
660
- - **`AscTimelineAlign`**: thêm `'top' | 'bottom'` cho horizontal layout.
661
- - **`AscAutoCompleteItem`**: đổi `Record<string, unknown>` → `Record<string, any>` để tương thích với interface không có index signature.
662
-
663
- ---
664
-
665
- ## [0.7.7] — 2026-06-24
666
-
667
- ### Added
668
-
669
- - **`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]`.
670
- - **`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)`.
671
- - **`AscAvatarGroupComponent`** (`asc-avatar-group`) — nhóm avatar chồng nhau, wrap PrimeNG AvatarGroup.
672
- - **`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`).
673
- - Export types: `AscAutoCompleteItem`, `AscAvatarSize`, `AscAvatarShape`, `AscTimelineItem`, `AscTimelineAlign`, `AscTimelineLayout`, `AscTimelineStatus`.
674
-
675
- ---
676
-
677
- ## [0.7.6] — 2026-06-24
678
-
679
- ### Changed
680
-
681
- - **`index.ts`** — chuyển `AscPicklistComponent` từ section `Form` sang section `Data` cho đúng nhóm. Không có breaking change.
682
-
683
- ---
684
-
685
- ## [0.7.5] — 2026-06-24
686
-
687
- ### Added
688
-
689
- - **`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()" />`.
690
- - README — bổ sung section **Feedback** với bảng API đầy đủ cho: Spinner, Badge, Alert, Skeleton, Progress Bar, Empty State, Loading Bar.
691
-
692
- ---
693
-
694
- ## [0.7.4] — 2026-06-24
695
-
696
- ### Added
697
-
698
- - **`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`.
699
- - **`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`.
700
- - **`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.
701
- - **`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`.
702
- - **`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.
703
- - **`AscProgressBarComponent`** (`asc-progress-bar`) — thanh tiến trình wrap PrimeNG `ProgressBar`. Inputs: `value`, `mode` (`determinate`/`indeterminate`), `showValue`, `unit`, `color`.
704
- - **`AscEmptyStateComponent`** (`asc-empty-state`) — UI trống dữ liệu với icon, tiêu đề, mô tả, `ng-content` cho action buttons.
705
- - **`AscPaginatorComponent`** (`asc-paginator`) — phân trang wrap PrimeNG `Paginator`. `model()` cho `first` và `rows`, output `pageChange`.
706
- - Showcase: thêm menu group **Feedback** (Spinner, Badge, Alert, Skeleton, Progress Bar, Empty State) và **Accordion** vào Panel, **Paginator** vào Data.
707
-
708
- ---
709
-
710
- ## [0.7.3] — 2026-06-24
711
-
712
- ### Changed
713
-
714
- - **`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.
715
- - **`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`.
716
- - 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.
717
-
718
- ---
719
-
720
- ## [0.7.2] — 2026-06-23
721
-
722
- ### Changed
723
-
724
- - **`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()`.
725
- - **`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()`.
726
- - **`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)`).
727
- - API inputs giữ nguyên — không có breaking change cho consumer.
728
-
729
- ---
730
-
731
- ## [0.7.1] — 2026-06-23
732
-
733
- ### Changed
734
- - **`AscTypographyDirective`** — thêm JSDoc với bảng px cho `AscTextSize` và input `size`. IDE sẽ hiện tooltip px khi hover.
735
-
736
- ---
737
-
738
- ## [0.7.0] — 2026-06-22
739
-
740
- ### Added
741
-
742
- - **`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`.
743
- - **`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.
744
- - **`AscCardComponent`** — card container với slot `[ascCardHeader]` / `[ascCardFooter]` (TemplateRef), inputs `title`, `subtitle`, `shadow`, `rounded`. Dùng thay thế cho `p-card`.
745
- - **`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.
746
- - **`AscTextColor`** — TypeScript template literal type cho typed color autocomplete trong `AscTypographyDirective`.
747
- - Export types: `AscTextSize`, `AscTextAlign`, `AscLeading`, `AscFontWeight`, `AscTextColor`, `AscBoxRadius`, `AscBorderWidth`, `AscBorderStyle`, `AscBorderColor`, `AscBgColor`, `AscBoxWidth`, `AscBoxHeight`, `AscCardShadow`, `AscCardRadius`, `AscDividerLayout`, `AscDividerType`, `AscDividerAlign`.
748
-
749
- ### Changed
750
-
751
- - **`preset.scss`** — thêm `--text-5xl: 32px` và `--text-6xl: 48px` vào Tailwind `@theme` block để hoàn chỉnh font-size scale.
752
-
753
- ---
754
-
755
- ## [0.6.0] — 2026-06-11
756
-
757
- ### Breaking
758
-
759
- - **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`, ...).
760
-
761
- ### Added
762
-
763
- - **`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.
764
- - **`AscLayout` / `AppTopbar`** — thêm input `breadCrumb: TemplateRef` để đặt breadcrumb vào topbar.
765
- - **`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`.
766
-
767
- ### Fixed
768
-
769
- - **`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.
770
- - **`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.
771
-
772
- ### Changed
773
-
774
- - **Design tokens** — `_primitive.scss` spacing, font-size, border-radius đổi từ `rem` sang `px`.
775
- - **`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`).
776
- - **`preset.scss`** — thêm `--radius-*`, `--text-*`, `--leading-*` vào Tailwind `@theme`.
777
- - **`AscTableComponent`** — `showGridlines` default `false` → `true`; `scrollHeight` default `400px` → `500px`; column type `date` giờ align center.
778
-
779
- ---
780
-
781
- ## [0.5.1] — 2026-05-27
782
-
783
- ### Added
784
-
785
- - **`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`.
786
- - **`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.
787
- - **`AscLayout` / `AppTopbar`** — thêm input `breadCrumb: TemplateRef` để nhúng breadcrumb vào topbar.
788
-
789
- ### Fixed
790
-
791
- - **`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.
792
- - **`AscTableComponent` — number format** — `type: 'number'` đọc đúng `format.thousandSep` và `format.locale`.
793
-
794
- ### Changed
795
-
796
- - **`AscTableComponent`** — `showGridlines` default `false` → `true`; `scrollHeight` default `400px` → `500px`; column `type: 'date'` align center.
797
-
798
- ---
799
-
800
- ## [0.5.0] — 2026-05-27
801
-
802
- ### Added
803
-
804
- - **`AscToggleSwitchComponent`** — toggle switch với CVA integration, label trái/phải.
805
- - **`AscPicklistComponent`** — chuyển sang CVA pattern (`BaseControlAccessor`). Fix overlay z-index bị che khuất.
806
-
807
- ### Changed
808
-
809
- - **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`).
810
- - **`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.
811
-
812
- ### Fixed
813
-
814
- - **`BaseControlAccessor`** — sync `ng-invalid` CSS class trên native input qua reactive `isInvalid` signal.
815
- - **`AscPassword`, `AscInputNumber`, `AscTextarea`, `AscCheckbox`, `AscRadio`** — áp dụng `isInvalid` signal đồng nhất.
816
- - Hai bug nhỏ phát hiện trong component audit (label binding, slot projection).
817
-
818
- ---
819
-
820
- ## [0.4.1] — 2026-05-14
821
-
822
- ### Added
823
-
824
- - **`AscTextareaComponent`** — textarea có character counter, CVA integration.
825
- - **`AscPicklistComponent`** — picklist dual-list với custom item template support.
826
- - **`AscConfirmPopup`** — confirm popup anchor vào element, dùng thay PrimeNG `ConfirmPopup`.
827
- - **`AscPopoverComponent`** — popover với arbitrary content, trigger manual / hover.
828
- - **`AscTooltipDirective`** — directive `[ascTooltip]` với typed position input.
829
-
830
- ---
831
-
832
- ## [0.4.0] — 2026-05-14
833
-
834
- ### Added
835
-
836
- - **`AscRadioComponent`** — radio button group với CVA integration, showcase đầy đủ.
837
-
838
- ---
839
-
840
- ## [0.3.3] — 2026-05-13
841
-
842
- ### Changed
843
- - **Button**: size xs/sm/md/lg — fixed px values, border-radius 8px, font-size 14px (xs/sm) / 16px (md/lg), outlined border 1.5px
844
- - **Input**: sm/md/lg sizing with fixed px, floatLabel mode skips size overrides
845
- - **Select**: sm/md/lg sizing with fixed px, skips overrides when floatLabel or label active
846
- - **Tokens**: success color updated to `#22C55E`
847
-
848
- ---
849
-
850
- ## [0.3.2] — 2026-05-13
851
-
852
- ### Changed
853
- - **Button sizing** — aligned to design system spec:
854
- - `xs`: min-width 64px, height 32px, padding 4px 16px
855
- - `md`: min-width 80px, height 40px, padding 8px 24px
856
- - `lg`: min-width 96px, height 48px, padding 12px 32px
857
- - **Button border-radius** — all sizes now use 8px (`0.5rem`)
858
-
859
- ---
860
-
861
- ## [0.3.1] — 2026-05-13
862
-
863
- ### Fixed
864
- - **`--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.
865
-
866
- ---
867
-
868
- ## [0.3.0] — 2026-05-13
869
-
870
- ### Fixed
871
- - **`@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.
872
- - Updated `ng-package.json`: removed the separate asset copy for layout (now redundant) and removed `components/layout/theme` from `styleIncludePaths`.
873
-
874
- ---
875
-
876
- ## [0.2.9] — 2026-05-13
877
-
878
- ### Fixed
879
- - **`--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`).
880
- - **Dark mode toggle broken** — `AscThemeService` was adding class `asc-dark` to `<html>` but `darkModeSelector` in PrimeNG config expected `.app-dark`; aligned to `app-dark`.
881
-
882
- ---
883
-
884
- ## [0.2.8] — 2026-05-13
885
-
886
- ### Fixed
887
- - **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).
888
-
889
- ---
890
-
891
- ## [0.2.7] — 2026-05-13
892
-
893
- ### Fixed
894
- - **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.
895
-
896
- > **Note:** When upgrading to Angular 21, use a future release of `@aseansc-admin/ui` built against Angular 21.
897
-
898
- ---
899
-
900
- ## [0.2.6] — 2026-05-13
901
-
902
- ### Added
903
- - `README.md` and `CHANGELOG.md` now shipped inside the npm package.
904
-
905
- ---
906
-
907
- ## [0.2.5] — 2026-05-13
908
-
909
- ### Changed
910
- - Relaxed all Angular, PrimeNG, and Tailwind peer dependencies from `^20.x` to `>=20.0.0`.
911
-
912
- ---
913
-
914
- ## [0.2.4] — 2026-05-13
915
-
916
- ### Fixed
917
- - **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.
918
- - Updated `preset.scss` import path to use the dist-relative `layout/layout` instead of a source-relative path that broke after install.
919
-
920
- ---
921
-
922
- ## [0.2.3] — 2026-05-13
923
-
924
- ### Changed
925
- - Added `@primeuix/themes: >=0.0.1` to `peerDependencies`.
926
-
927
- ---
928
-
929
- ## [0.2.2] — 2026-05-13
930
-
931
- ### Changed
932
- - Relaxed `@angular/cdk` peer dependency from `^20.3.0` to `^20.0.0`.
933
-
934
- ---
935
-
936
- ## [0.2.1] — 2026-05-13
937
-
938
- ### Changed
939
- - Fixed all `peerDependencies` version ranges from `>=` to `^` for consistency.
940
-
941
- ---
942
-
943
- ## [0.2.0] — 2026-05-12
944
-
945
- ### Breaking
946
- - Package renamed from `@asc/ui` to `@aseansc-admin/ui` to match the npm account scope.
947
-
948
- ### Added
949
- - **Dark mode support** — `.app-dark` class on `<html>` now drives both PrimeNG theme and Tailwind `dark:` utilities.
950
- - `@custom-variant dark (&:where(.app-dark, .app-dark *))` registered in `preset.scss` so consumers get `dark:` utilities out of the box.
951
- - `postcss.config.json` support documented — Angular's `@angular/build:application` only reads JSON PostCSS configs (`.mjs` is silently ignored).
952
-
953
- ### Fixed
954
- - **Tailwind CSS not applying** — `postcss.config.mjs` was ignored by Angular's build system; replaced with `postcss.config.json`.
955
- - **Dark mode toggle broken** — `darkModeSelector` in PrimeNG config was `.asc-dark` but `LayoutService` toggled `.app-dark`; aligned to `.app-dark`.
956
-
957
- ---
958
-
959
- ## [0.1.0] — Initial release
960
-
961
- ### Components
962
- - `AscLayout` — app shell with topbar, sidebar, and footer
963
- - `AscButtonComponent` — button with variants, severity, loading state
964
- - `AscInputComponent` — text input with CVA integration
965
- - `AscSelectComponent` — dropdown select
966
- - `AscDatepickerComponent` — date picker (vi-VN / en-US locale)
967
- - `AscFormFieldComponent` — form field wrapper with label and validation messages
968
- - `AscTableComponent` — data table with lazy loading, sorting, filtering, custom cell templates
969
- - `AscDialogComponent` — modal dialog with header/footer slots
970
- - `AscSidebarComponent` — slide-in drawer with position support
971
- - `AscUpload` — file upload with disabled state, size formatting, and HttpClient integration
972
- - `AscToastService` / `AscConfirmService` — programmatic toast and confirm dialog
973
-
974
- ### Bootstrap
975
- - `provideAscUI()` — single provider function for PrimeNG theme, i18n, and service registration
976
-
977
- ### i18n
978
- - Built-in Vietnamese (`vi-VN`) and English (`en-US`) translations
1
+ # Changelog
2
+
3
+ All notable changes to `@aseansc/ui` (trước đây `@asc/ui`) are documented here.
4
+
5
+ ---
6
+
7
+ ## [5.0.0] — 2026-09-24
8
+
9
+ Đổi UI layout + table theo design mới của UI/UX.
10
+
11
+ ### Changed
12
+
13
+ - **BREAKING — `AscTableComponent`: `stripedRows` đổi default từ `true` sang `false`** theo design mới (hàng nền trắng, chỉ kẻ ngang). Bảng nào cần xen kẽ màu thì truyền `[stripedRows]="true"`.
14
+ - **BREAKING — `--asc-surface-50` đổi từ `grey-50` sang trắng**: header/footer của `AscTable` không còn nền xám.
15
+ - `AscTableComponent` — gridlines: header chỉ kẻ dọc giữa các cột (bỏ mép trái cột đầu, mép phải cột cuối, bỏ kẻ ngang phía trên); body bỏ kẻ dọc, chỉ giữ kẻ ngang. Chữ header `font-weight: 400`, màu qua token mới `--asc-table-header-color` (light `#A3A3A3`). Màu kẻ ô qua token mới `--asc-table-border-color` (light `#0C0C0D1A`) — áp cho mọi `p-table`.
16
+ - **`AscLayout`**:
17
+ - Sidebar nổi full chiều cao viewport, rộng `212px`, bo góc `20px`, nền `--asc-surface-base`. Kích thước qua biến `--layout-sidebar-width` / `--layout-sidebar-gap`.
18
+ - `sideBarLogo` render trong vùng `.layout-sidebar-logo` cố định ở đầu sidebar (không cuộn theo menu).
19
+ - Topbar nằm bên phải sidebar (`width: 100% - sidebar`), nền bán trong suốt + `backdrop-filter: blur`. Full width lại khi sidebar thu gọn / overlay / mobile.
20
+ - `.layout-main` nền `--asc-surface-base`; nền trang (`--surface-ground`, light) tạm `#EAE6E1`.
21
+ - `p-breadcrumb` nền `transparent`.
22
+ - Khai báo `--asc-surface-0` (trắng — trước đây chưa khai báo, các chỗ dùng bị trong suốt) và `--asc-formfield-bg` (trắng — nền input/select/datepicker…).
23
+
24
+ ### Fixed
25
+
26
+ - Dark mode: `--text-color` bị hardcode `#0F0F0F` cho cả 2 mode → chữ đen trên nền tối. Dark giờ dùng `var(--p-text-color)`.
27
+ - Sidebar: scrollbar làm mất bo góc bên phải — chuyển phần cuộn vào `.layout-sidebar-content` để scrollbar bị clip theo `border-radius`.
28
+
29
+ ---
30
+
31
+ ## [4.1.0] — 2026-09-23
32
+
33
+ Port các thay đổi từ `@aseansc-admin/ui` 2.11.1 → 2.12.0.
34
+
35
+ ### Added
36
+
37
+ - **`AscMenuItem` — `iconSize` / `iconWidth` / `iconHeight`**: cấu hình kích thước icon của menu item trong `AscLayout`. `iconSize` áp cho cả width lẫn height (icon SVG) hoặc `font-size` (icon PrimeIcons); `iconWidth` / `iconHeight` ghi đè riêng từng chiều, dùng cho icon không vuông. `AscMenuItem.items` giờ được type là `AscMenuItem[]`.
38
+ - **`AscIconComponent` — input `width` / `height`**: ghi đè riêng chiều rộng/cao, ưu tiên hơn `size`.
39
+
40
+ ### Changed
41
+
42
+ - `AscTableComponent`: `showFirstLastIcon` (nút về trang đầu/cuối trên paginator) đổi default từ `false` sang `true` — trước đây phải opt-in từng bảng dù đa số muốn có sẵn.
43
+
44
+ ### Fixed
45
+
46
+ - **`AscTableComponent`**: bỏ `overflow: hidden` ở `.asc-table-wrapper` và bỏ `margin-left` của nút prev trong pagination.
47
+
48
+ ---
49
+
50
+ ## [4.0.1] — 2026-09-10
51
+
52
+ ### Fixed
53
+
54
+ Phát hiện khi cài `@aseansc/ui@4.0.0` thật vào 1 project Angular 22 sạch (test riêng, không qua monorepo) — README hướng dẫn thiếu/sai 3 chỗ:
55
+
56
+ - **Thiếu hướng dẫn `.npmrc`**: PrimeNG 21 tự khai peer dep `@angular/cdk@^21`, cài trên Angular 22 sẽ bị `ERESOLVE` nếu không có `legacy-peer-deps=true`. Thêm hướng dẫn rõ ràng vào mục Peer dependencies.
57
+ - **`provideAnimations()`/`@angular/animations` không cần thiết** — verify PrimeNG 21 không đụng tới `@angular/animations`/`BrowserAnimationsModule` ở đâu (dùng `@primeuix/motion` riêng). Bỏ khỏi setup example — trước đây bắt cài thêm 1 package đã bị Angular 22 đánh dấu deprecated mà không có tác dụng gì.
58
+ - **`provideZoneChangeDetection()` → `provideZonelessChangeDetection()`** — `ng new` ở Angular 22 mặc định không còn cài `zone.js`; dùng API cũ khiến app mới tạo theo hướng dẫn bị lỗi runtime đòi Zone. Toàn bộ component đã dùng signal + `OnPush` nên chạy zoneless bình thường.
59
+
60
+ ---
61
+
62
+ ## [4.0.0] — 2026-09-10
63
+
64
+ ### Changed
65
+
66
+ - **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`.
67
+ - Đồ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ộ"):
68
+ - Bảng màu `brand` (50-950) đổi sang giá trị chính thức (trước đây suy đoán từ tints.dev).
69
+ - Thêm bảng `grey` (10-900) thay cho `slate` — neutral chính của mọi border/text/surface.
70
+ - 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).
71
+ - `--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.
72
+ - Dark mode đồng bộ tương ứng (brand giữ nguyên brand-500 làm default, chỉ hover/active nhạt dần).
73
+ - Chiều cao control (`--asc-h-md`): 40px → 36px.
74
+ - Border-radius: 8px → 12px cho input/select/datepicker/textarea/password/input-number; Button đổi thành 999px (pill).
75
+
76
+ ### Added
77
+
78
+ - `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`).
79
+
80
+ ### Fixed
81
+
82
+ - 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`.
83
+ - `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.
84
+ - `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.
85
+ - `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`.
86
+ - 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.
87
+ - Button severity `secondary`: text `#262626`; kết hợp `variant="outlined"` thêm border `#525252`.
88
+
89
+ ---
90
+
91
+ ## [3.0.0] — 2026-09-03
92
+
93
+ ### Changed
94
+
95
+ - **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.
96
+
97
+ ---
98
+
99
+ ## [2.11.0] — 2026-08-25
100
+
101
+ ### Added
102
+
103
+ - **`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).
104
+ - **`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).
105
+
106
+ ### Fixed
107
+
108
+ - **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`.
109
+
110
+ ---
111
+
112
+ ## [2.10.0] — 2026-08-20
113
+
114
+ ### Added
115
+
116
+ - **`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>`).
117
+
118
+ ---
119
+
120
+ ## [2.9.3] — 2026-08-20
121
+
122
+ ### Fixed
123
+
124
+ - **`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ũ.
125
+
126
+ ---
127
+
128
+ ## [2.9.2] — 2026-08-19
129
+
130
+ ### Fixed
131
+
132
+ - **`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.
133
+
134
+ ---
135
+
136
+ ## [2.9.1] — 2026-08-19
137
+
138
+ ### Fixed
139
+
140
+ - **`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.
141
+ - **`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 `'—'`.
142
+
143
+ ---
144
+
145
+ ## [2.9.0] — 2026-08-05
146
+
147
+ ### Added
148
+
149
+ - **`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.
150
+ - **`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.
151
+
152
+ ---
153
+
154
+ ## [2.8.0] — 2026-08-04
155
+
156
+ ### Added
157
+
158
+ - **`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.
159
+
160
+ ### Fixed
161
+
162
+ - **`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`.
163
+
164
+ ---
165
+
166
+ ## [2.7.0] — 2026-08-04
167
+
168
+ ### Added
169
+
170
+ - **`AscSelectButtonComponent`** — wrapper PrimeNG SelectButton hỗ trợ single/multiple select, custom object mapping, custom item template, size, invalid/disabled/readonly, `mode="view"`.
171
+ - **`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`.
172
+ - **`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.
173
+
174
+ ### Fixed
175
+
176
+ - **`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).
177
+ - **`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 đó.
178
+
179
+ ---
180
+
181
+ ## [2.6.0] — 2026-07-29
182
+
183
+ ### Added
184
+
185
+ - **`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.
186
+ - **`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.
187
+
188
+ ### Fixed
189
+
190
+ - **`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".
191
+
192
+ ---
193
+
194
+ ## [2.5.0] — 2026-07-29
195
+
196
+ ### Added
197
+
198
+ - **`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`.
199
+
200
+ ### Changed
201
+
202
+ - **`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.
203
+
204
+ ---
205
+
206
+ ## [2.4.0] — 2026-07-27
207
+
208
+ ### Added
209
+
210
+ - **`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.
211
+ - **`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.
212
+
213
+ ### Fixed
214
+
215
+ - **`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.
216
+
217
+ ---
218
+
219
+ ## [2.3.4] — 2026-07-22
220
+
221
+ ### Changed
222
+
223
+ - **`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`.
224
+
225
+ ---
226
+
227
+ ## [2.3.3] — 2026-07-22
228
+
229
+ ### Fixed
230
+
231
+ - **`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.
232
+
233
+ ---
234
+
235
+ ## [2.3.2] — 2026-07-22
236
+
237
+ ### Changed
238
+
239
+ - **`AscRadioComponent` — input `alignColumn`**: đổi giá trị mặc định từ `'start'` sang `'center'`.
240
+
241
+ ---
242
+
243
+ ## [2.3.1] — 2026-07-22
244
+
245
+ ### Fixed
246
+
247
+ - **`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.
248
+
249
+ ---
250
+
251
+ ## [2.3.0] — 2026-07-22
252
+
253
+ ### Added
254
+
255
+ - **`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'`.
256
+
257
+ ### Changed
258
+
259
+ - **`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.
260
+
261
+ ### Fixed
262
+
263
+ - **`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.
264
+ - **`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.
265
+
266
+ ---
267
+
268
+ ## [2.2.0] — 2026-07-22
269
+
270
+ ### Added
271
+
272
+ - **`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"`.
273
+ - **`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).
274
+ - **`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.
275
+ - **`AscTableComponent` — `stripedRows` mặc định `true`**: màu nền hàng xen kẽ dùng `--asc-surface-50` (`#F2F3F5`).
276
+
277
+ ### Changed
278
+
279
+ - **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`.
280
+
281
+ ### Fixed
282
+
283
+ - **`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).
284
+ - **`AscTableComponent` — border thừa dưới thanh pagination**: bỏ `border-top` trên `.p-paginator`.
285
+ - **`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`.
286
+
287
+ ---
288
+
289
+ ## [2.1.0] — 2026-07-20
290
+
291
+ ### Added
292
+
293
+ - **`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.
294
+
295
+ ### Changed
296
+
297
+ - **`AscButtonComponent`**: giảm padding ngang cho size `md`/`lg`/`xl` (`8px 24px→16px`, `10px 32px→24px`, `12px 40px→32px`).
298
+
299
+ ---
300
+
301
+ ## [2.0.1] — 2026-07-20
302
+
303
+ ### Fixed
304
+
305
+ - **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**):
306
+ - **`AscRadioComponent`**: checked-state (viền rỗng + chấm giữa), cố định kích thước 20×20px, hover states.
307
+ - **`AscInputComponent`, `AscSelectComponent`, `AscDatepickerComponent`, `AscPasswordComponent`, `AscTextareaComponent`, `AscInputNumberComponent`**: box-shadow đỏ khi `invalid` + đang focus.
308
+ - **`AscButtonComponent`**: font-size của icon co theo từng size (xs/sm/md/lg/xl).
309
+ - **`AscToastService`**: border-radius/box-shadow/border của toast message.
310
+ - **`AscConfirmPopup`**: toàn bộ layout (content/icon/message/footer) — trước hoàn toàn không có style.
311
+ - **`AscConfirmDialog`**: toàn bộ layout (header/content/icon/message/footer) — trước hoàn toàn không có style.
312
+
313
+ ---
314
+
315
+ ## [2.0.0] — 2026-07-20
316
+
317
+ ### ⚠ BREAKING CHANGES
318
+
319
+ - **`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.
320
+ - **`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á.
321
+
322
+ ### Fixed
323
+
324
+ - **`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`.
325
+ - **`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.
326
+ - **`AscTextareaComponent` — thiếu size `xs`/`xl`**: mở rộng thang padding/font-size, giữ nguyên `sm`/`md`/`lg` cũ.
327
+
328
+ ### Docs
329
+
330
+ - 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`.
331
+
332
+ ---
333
+
334
+ ## [1.15.0] — 2026-07-20
335
+
336
+ ### Added
337
+
338
+ - **`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`.
339
+
340
+ ---
341
+
342
+ ## [1.14.0] — 2026-07-20
343
+
344
+ ### Added
345
+
346
+ - **`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`).
347
+
348
+ ### Changed
349
+
350
+ - **`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.
351
+ - **`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.
352
+
353
+ ---
354
+
355
+ ## [1.13.0] — 2026-07-17
356
+
357
+ ### Added
358
+
359
+ - **`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).
360
+
361
+ ### Fixed
362
+
363
+ - **`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.
364
+
365
+ ---
366
+
367
+ ## [1.12.0] — 2026-07-16
368
+
369
+ ### Added
370
+
371
+ - **`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.
372
+ - **`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"`.
373
+ - **`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.
374
+
375
+ ### Fixed
376
+
377
+ - **`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.
378
+ - **`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.
379
+
380
+ ---
381
+
382
+ ## [1.11.0] — 2026-07-16
383
+
384
+ ### Added
385
+
386
+ - **`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.
387
+
388
+ ### Fixed
389
+
390
+ - **`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.
391
+
392
+ ---
393
+
394
+ ## [1.10.0] — 2026-07-16
395
+
396
+ ### Added
397
+
398
+ - **`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.
399
+
400
+ ### Fixed
401
+
402
+ - **`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`.
403
+ - **`AscSelectComponent` — label/chip trong multiselect lệch dọc**: thêm `display: flex; align-items: center` cho `.p-multiselect-label-container`.
404
+
405
+ ---
406
+
407
+ ## [1.9.0] — 2026-07-16
408
+
409
+ ### Added
410
+
411
+ - **`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.
412
+ - **`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`.
413
+
414
+ ---
415
+
416
+ ## [1.8.0] — 2026-07-15
417
+
418
+ ### Added
419
+
420
+ - **`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.
421
+
422
+ ---
423
+
424
+ ## [1.7.2] — 2026-07-15
425
+
426
+ ### Fixed
427
+
428
+ - **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.
429
+ - **`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.
430
+ - **`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).
431
+ - **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".
432
+
433
+ ---
434
+
435
+ ## [1.7.1] — 2026-07-15
436
+
437
+ ### Fixed
438
+
439
+ - **`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.
440
+
441
+ ---
442
+
443
+ ## [1.7.0] — 2026-07-15
444
+
445
+ ### Added
446
+
447
+ - **`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.
448
+ - `AscRadioComponent` — hiển thị label của option đang chọn, `—` khi chưa chọn.
449
+ - `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`.
450
+ - `AscDatepickerComponent` — hiển thị value đã format theo `dateFormat`/`showTime`, hỗ trợ cả 3 `selectionMode` (single/range/multiple), dùng `dateRangeSeparator` i18n cho range.
451
+ - **`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ý).
452
+ - **`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.
453
+
454
+ ### Fixed
455
+
456
+ - **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).
457
+ - **`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)`.
458
+ - **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.
459
+
460
+ ---
461
+
462
+ ## [1.6.1] — 2026-07-14
463
+
464
+ ### Fixed
465
+
466
+ - **`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.
467
+
468
+ ---
469
+
470
+ ## [1.6.0] — 2026-07-14
471
+
472
+ ### Added
473
+
474
+ - **`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.
475
+
476
+ ---
477
+
478
+ ## [1.5.2] — 2026-07-13
479
+
480
+ ### Fixed
481
+
482
+ - **`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`.
483
+
484
+ ### Changed
485
+
486
+ - **`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).
487
+
488
+ ---
489
+
490
+ ## [1.5.1] — 2026-07-10
491
+
492
+ ### Fixed
493
+
494
+ - **`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.
495
+
496
+ ### Changed
497
+
498
+ - **`.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.
499
+
500
+ ---
501
+
502
+ ## [1.5.0] — 2026-07-10
503
+
504
+ ### Added
505
+
506
+ - **`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`.
507
+
508
+ ### Changed
509
+
510
+ - **`AscFormFieldComponent`** — bỏ `padding-top: 0.5rem` trên label ở layout horizontal.
511
+
512
+ ---
513
+
514
+ ## [1.4.0] — 2026-07-10
515
+
516
+ ### Added
517
+
518
+ - **`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`.
519
+
520
+ ### Fixed
521
+
522
+ - **`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`.
523
+ - **`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`.
524
+
525
+ ---
526
+
527
+ ## [1.3.0] — 2026-07-10
528
+
529
+ ### Added
530
+
531
+ - **`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`).
532
+ - **`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ỗ.
533
+
534
+ ---
535
+
536
+ ## [1.2.1] — 2026-07-10
537
+
538
+ ### Fixed
539
+
540
+ - **`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`.
541
+
542
+ ---
543
+
544
+ ## [1.2.0] — 2026-07-09
545
+
546
+ ### Added
547
+
548
+ - **`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`.
549
+ - **`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.
550
+
551
+ ---
552
+
553
+ ## [1.1.2] — 2026-07-09
554
+
555
+ ### Fixed
556
+
557
+ - **`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`.
558
+ - **`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.
559
+ - **`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.
560
+
561
+ ---
562
+
563
+ ## [1.1.1] — 2026-07-09
564
+
565
+ ### Fixed
566
+
567
+ - **`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`).
568
+
569
+ ---
570
+
571
+ ## [1.1.0] — 2026-07-08
572
+
573
+ ### Added
574
+
575
+ - **`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`.
576
+
577
+ ---
578
+
579
+ ## [1.0.0] — 2026-07-06
580
+
581
+ ### ⚠ BREAKING CHANGE
582
+
583
+ - **`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.
584
+ - 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.
585
+ - Consumer chỉ mới dùng `first`/`rows` không bị ảnh hưởng.
586
+
587
+ ---
588
+
589
+ ## [0.10.0] — 2026-07-06
590
+
591
+ ### Added
592
+
593
+ - **`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`.
594
+ - 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.
595
+
596
+ ### Bảo mật
597
+
598
+ - `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.
599
+
600
+ ---
601
+
602
+ ## [0.9.0] — 2026-07-06
603
+
604
+ ### Added
605
+
606
+ - **`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ũ.
607
+
608
+ ---
609
+
610
+ ## [0.8.0] — 2026-07-02
611
+
612
+ ### Added
613
+
614
+ - **`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'`.
615
+
616
+ ### Fixed
617
+
618
+ - **`AscTableComponent.formatNumber/formatCurrency`**: bỏ hardcode `'vi-VN'`, giờ fallback theo locale hiện tại (`AscLocaleService`) khi `format.locale` không được truyền.
619
+ - **`AscMessageErrorPipe`** / **`AscInputNumberComponent.resolvedLocale`**: đọc locale reactive thay vì đọc 1 lần lúc bootstrap.
620
+
621
+ ---
622
+
623
+ ## [0.7.16] — 2026-07-02
624
+
625
+ ### Fixed
626
+
627
+ - **`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`).
628
+
629
+ ---
630
+
631
+ ## [0.7.15] — 2026-07-02
632
+
633
+ ### Fixed
634
+
635
+ - **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`).
636
+
637
+ ---
638
+
639
+ ## [0.7.14] — 2026-07-01
640
+
641
+ ### Fixed
642
+
643
+ - **`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"`.
644
+ - **`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).
645
+
646
+ ### Changed
647
+
648
+ - **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.
649
+
650
+ ---
651
+
652
+ ## [0.7.13] — 2026-06-29
653
+
654
+ ### Changed
655
+
656
+ - **`AscCardComponent`**: refactor bỏ custom card template/CSS, wrap `p-card` từ PrimeNG. Public API không thay đổi (`title`, `subtitle`, `shadow`, `rounded`, `[ascCardHeader]`, `[ascCardFooter]`).
657
+
658
+ ---
659
+
660
+ ## [0.7.12] — 2026-06-29
661
+
662
+ ### Fixed
663
+
664
+ - **`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`.
665
+ - **`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.
666
+ - **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).
667
+ - **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.
668
+
669
+ ---
670
+
671
+ ## [0.7.11] — 2026-06-25
672
+
673
+ ### Fixed
674
+
675
+ - **`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.
676
+
677
+ ---
678
+
679
+ ## [0.7.10] — 2026-06-24
680
+
681
+ ### Fixed
682
+
683
+ - **`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ỳ ý.
684
+
685
+ ---
686
+
687
+ ## [0.7.9] — 2026-06-24
688
+
689
+ ### Added
690
+
691
+ - **`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ế.
692
+
693
+ ---
694
+
695
+ ## [0.7.8] — 2026-06-24
696
+
697
+ ### Added
698
+
699
+ - **`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`.
700
+
701
+ ### Fixed
702
+
703
+ - **`AscTimelineAlign`**: thêm `'top' | 'bottom'` cho horizontal layout.
704
+ - **`AscAutoCompleteItem`**: đổi `Record<string, unknown>` → `Record<string, any>` để tương thích với interface không có index signature.
705
+
706
+ ---
707
+
708
+ ## [0.7.7] — 2026-06-24
709
+
710
+ ### Added
711
+
712
+ - **`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]`.
713
+ - **`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)`.
714
+ - **`AscAvatarGroupComponent`** (`asc-avatar-group`) — nhóm avatar chồng nhau, wrap PrimeNG AvatarGroup.
715
+ - **`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`).
716
+ - Export types: `AscAutoCompleteItem`, `AscAvatarSize`, `AscAvatarShape`, `AscTimelineItem`, `AscTimelineAlign`, `AscTimelineLayout`, `AscTimelineStatus`.
717
+
718
+ ---
719
+
720
+ ## [0.7.6] — 2026-06-24
721
+
722
+ ### Changed
723
+
724
+ - **`index.ts`** — chuyển `AscPicklistComponent` từ section `Form` sang section `Data` cho đúng nhóm. Không có breaking change.
725
+
726
+ ---
727
+
728
+ ## [0.7.5] — 2026-06-24
729
+
730
+ ### Added
731
+
732
+ - **`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()" />`.
733
+ - README — bổ sung section **Feedback** với bảng API đầy đủ cho: Spinner, Badge, Alert, Skeleton, Progress Bar, Empty State, Loading Bar.
734
+
735
+ ---
736
+
737
+ ## [0.7.4] — 2026-06-24
738
+
739
+ ### Added
740
+
741
+ - **`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`.
742
+ - **`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`.
743
+ - **`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.
744
+ - **`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`.
745
+ - **`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.
746
+ - **`AscProgressBarComponent`** (`asc-progress-bar`) — thanh tiến trình wrap PrimeNG `ProgressBar`. Inputs: `value`, `mode` (`determinate`/`indeterminate`), `showValue`, `unit`, `color`.
747
+ - **`AscEmptyStateComponent`** (`asc-empty-state`) — UI trống dữ liệu với icon, tiêu đề, mô tả, `ng-content` cho action buttons.
748
+ - **`AscPaginatorComponent`** (`asc-paginator`) — phân trang wrap PrimeNG `Paginator`. `model()` cho `first` và `rows`, output `pageChange`.
749
+ - Showcase: thêm menu group **Feedback** (Spinner, Badge, Alert, Skeleton, Progress Bar, Empty State) và **Accordion** vào Panel, **Paginator** vào Data.
750
+
751
+ ---
752
+
753
+ ## [0.7.3] — 2026-06-24
754
+
755
+ ### Changed
756
+
757
+ - **`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.
758
+ - **`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`.
759
+ - 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.
760
+
761
+ ---
762
+
763
+ ## [0.7.2] — 2026-06-23
764
+
765
+ ### Changed
766
+
767
+ - **`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()`.
768
+ - **`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()`.
769
+ - **`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)`).
770
+ - API inputs giữ nguyên — không có breaking change cho consumer.
771
+
772
+ ---
773
+
774
+ ## [0.7.1] — 2026-06-23
775
+
776
+ ### Changed
777
+ - **`AscTypographyDirective`** — thêm JSDoc với bảng px cho `AscTextSize` và input `size`. IDE sẽ hiện tooltip px khi hover.
778
+
779
+ ---
780
+
781
+ ## [0.7.0] — 2026-06-22
782
+
783
+ ### Added
784
+
785
+ - **`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`.
786
+ - **`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.
787
+ - **`AscCardComponent`** — card container với slot `[ascCardHeader]` / `[ascCardFooter]` (TemplateRef), inputs `title`, `subtitle`, `shadow`, `rounded`. Dùng thay thế cho `p-card`.
788
+ - **`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.
789
+ - **`AscTextColor`** — TypeScript template literal type cho typed color autocomplete trong `AscTypographyDirective`.
790
+ - Export types: `AscTextSize`, `AscTextAlign`, `AscLeading`, `AscFontWeight`, `AscTextColor`, `AscBoxRadius`, `AscBorderWidth`, `AscBorderStyle`, `AscBorderColor`, `AscBgColor`, `AscBoxWidth`, `AscBoxHeight`, `AscCardShadow`, `AscCardRadius`, `AscDividerLayout`, `AscDividerType`, `AscDividerAlign`.
791
+
792
+ ### Changed
793
+
794
+ - **`preset.scss`** — thêm `--text-5xl: 32px` và `--text-6xl: 48px` vào Tailwind `@theme` block để hoàn chỉnh font-size scale.
795
+
796
+ ---
797
+
798
+ ## [0.6.0] — 2026-06-11
799
+
800
+ ### Breaking
801
+
802
+ - **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`, ...).
803
+
804
+ ### Added
805
+
806
+ - **`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.
807
+ - **`AscLayout` / `AppTopbar`** — thêm input `breadCrumb: TemplateRef` để đặt breadcrumb vào topbar.
808
+ - **`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`.
809
+
810
+ ### Fixed
811
+
812
+ - **`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.
813
+ - **`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.
814
+
815
+ ### Changed
816
+
817
+ - **Design tokens** — `_primitive.scss` spacing, font-size, border-radius đổi từ `rem` sang `px`.
818
+ - **`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`).
819
+ - **`preset.scss`** — thêm `--radius-*`, `--text-*`, `--leading-*` vào Tailwind `@theme`.
820
+ - **`AscTableComponent`** — `showGridlines` default `false` → `true`; `scrollHeight` default `400px` → `500px`; column type `date` giờ align center.
821
+
822
+ ---
823
+
824
+ ## [0.5.1] — 2026-05-27
825
+
826
+ ### Added
827
+
828
+ - **`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`.
829
+ - **`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.
830
+ - **`AscLayout` / `AppTopbar`** — thêm input `breadCrumb: TemplateRef` để nhúng breadcrumb vào topbar.
831
+
832
+ ### Fixed
833
+
834
+ - **`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.
835
+ - **`AscTableComponent` — number format** — `type: 'number'` đọc đúng `format.thousandSep` và `format.locale`.
836
+
837
+ ### Changed
838
+
839
+ - **`AscTableComponent`** — `showGridlines` default `false` → `true`; `scrollHeight` default `400px` → `500px`; column `type: 'date'` align center.
840
+
841
+ ---
842
+
843
+ ## [0.5.0] — 2026-05-27
844
+
845
+ ### Added
846
+
847
+ - **`AscToggleSwitchComponent`** — toggle switch với CVA integration, label trái/phải.
848
+ - **`AscPicklistComponent`** — chuyển sang CVA pattern (`BaseControlAccessor`). Fix overlay z-index bị che khuất.
849
+
850
+ ### Changed
851
+
852
+ - **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`).
853
+ - **`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.
854
+
855
+ ### Fixed
856
+
857
+ - **`BaseControlAccessor`** — sync `ng-invalid` CSS class trên native input qua reactive `isInvalid` signal.
858
+ - **`AscPassword`, `AscInputNumber`, `AscTextarea`, `AscCheckbox`, `AscRadio`** — áp dụng `isInvalid` signal đồng nhất.
859
+ - Hai bug nhỏ phát hiện trong component audit (label binding, slot projection).
860
+
861
+ ---
862
+
863
+ ## [0.4.1] — 2026-05-14
864
+
865
+ ### Added
866
+
867
+ - **`AscTextareaComponent`** — textarea có character counter, CVA integration.
868
+ - **`AscPicklistComponent`** — picklist dual-list với custom item template support.
869
+ - **`AscConfirmPopup`** — confirm popup anchor vào element, dùng thay PrimeNG `ConfirmPopup`.
870
+ - **`AscPopoverComponent`** — popover với arbitrary content, trigger manual / hover.
871
+ - **`AscTooltipDirective`** — directive `[ascTooltip]` với typed position input.
872
+
873
+ ---
874
+
875
+ ## [0.4.0] — 2026-05-14
876
+
877
+ ### Added
878
+
879
+ - **`AscRadioComponent`** — radio button group với CVA integration, showcase đầy đủ.
880
+
881
+ ---
882
+
883
+ ## [0.3.3] — 2026-05-13
884
+
885
+ ### Changed
886
+ - **Button**: size xs/sm/md/lg — fixed px values, border-radius 8px, font-size 14px (xs/sm) / 16px (md/lg), outlined border 1.5px
887
+ - **Input**: sm/md/lg sizing with fixed px, floatLabel mode skips size overrides
888
+ - **Select**: sm/md/lg sizing with fixed px, skips overrides when floatLabel or label active
889
+ - **Tokens**: success color updated to `#22C55E`
890
+
891
+ ---
892
+
893
+ ## [0.3.2] — 2026-05-13
894
+
895
+ ### Changed
896
+ - **Button sizing** — aligned to design system spec:
897
+ - `xs`: min-width 64px, height 32px, padding 4px 16px
898
+ - `md`: min-width 80px, height 40px, padding 8px 24px
899
+ - `lg`: min-width 96px, height 48px, padding 12px 32px
900
+ - **Button border-radius** — all sizes now use 8px (`0.5rem`)
901
+
902
+ ---
903
+
904
+ ## [0.3.1] — 2026-05-13
905
+
906
+ ### Fixed
907
+ - **`--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.
908
+
909
+ ---
910
+
911
+ ## [0.3.0] — 2026-05-13
912
+
913
+ ### Fixed
914
+ - **`@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.
915
+ - Updated `ng-package.json`: removed the separate asset copy for layout (now redundant) and removed `components/layout/theme` from `styleIncludePaths`.
916
+
917
+ ---
918
+
919
+ ## [0.2.9] — 2026-05-13
920
+
921
+ ### Fixed
922
+ - **`--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`).
923
+ - **Dark mode toggle broken** — `AscThemeService` was adding class `asc-dark` to `<html>` but `darkModeSelector` in PrimeNG config expected `.app-dark`; aligned to `app-dark`.
924
+
925
+ ---
926
+
927
+ ## [0.2.8] — 2026-05-13
928
+
929
+ ### Fixed
930
+ - **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).
931
+
932
+ ---
933
+
934
+ ## [0.2.7] — 2026-05-13
935
+
936
+ ### Fixed
937
+ - **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.
938
+
939
+ > **Note:** When upgrading to Angular 21, use a future release of `@aseansc-admin/ui` built against Angular 21.
940
+
941
+ ---
942
+
943
+ ## [0.2.6] — 2026-05-13
944
+
945
+ ### Added
946
+ - `README.md` and `CHANGELOG.md` now shipped inside the npm package.
947
+
948
+ ---
949
+
950
+ ## [0.2.5] — 2026-05-13
951
+
952
+ ### Changed
953
+ - Relaxed all Angular, PrimeNG, and Tailwind peer dependencies from `^20.x` to `>=20.0.0`.
954
+
955
+ ---
956
+
957
+ ## [0.2.4] — 2026-05-13
958
+
959
+ ### Fixed
960
+ - **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.
961
+ - Updated `preset.scss` import path to use the dist-relative `layout/layout` instead of a source-relative path that broke after install.
962
+
963
+ ---
964
+
965
+ ## [0.2.3] — 2026-05-13
966
+
967
+ ### Changed
968
+ - Added `@primeuix/themes: >=0.0.1` to `peerDependencies`.
969
+
970
+ ---
971
+
972
+ ## [0.2.2] — 2026-05-13
973
+
974
+ ### Changed
975
+ - Relaxed `@angular/cdk` peer dependency from `^20.3.0` to `^20.0.0`.
976
+
977
+ ---
978
+
979
+ ## [0.2.1] — 2026-05-13
980
+
981
+ ### Changed
982
+ - Fixed all `peerDependencies` version ranges from `>=` to `^` for consistency.
983
+
984
+ ---
985
+
986
+ ## [0.2.0] — 2026-05-12
987
+
988
+ ### Breaking
989
+ - Package renamed from `@asc/ui` to `@aseansc-admin/ui` to match the npm account scope.
990
+
991
+ ### Added
992
+ - **Dark mode support** — `.app-dark` class on `<html>` now drives both PrimeNG theme and Tailwind `dark:` utilities.
993
+ - `@custom-variant dark (&:where(.app-dark, .app-dark *))` registered in `preset.scss` so consumers get `dark:` utilities out of the box.
994
+ - `postcss.config.json` support documented — Angular's `@angular/build:application` only reads JSON PostCSS configs (`.mjs` is silently ignored).
995
+
996
+ ### Fixed
997
+ - **Tailwind CSS not applying** — `postcss.config.mjs` was ignored by Angular's build system; replaced with `postcss.config.json`.
998
+ - **Dark mode toggle broken** — `darkModeSelector` in PrimeNG config was `.asc-dark` but `LayoutService` toggled `.app-dark`; aligned to `.app-dark`.
999
+
1000
+ ---
1001
+
1002
+ ## [0.1.0] — Initial release
1003
+
1004
+ ### Components
1005
+ - `AscLayout` — app shell with topbar, sidebar, and footer
1006
+ - `AscButtonComponent` — button with variants, severity, loading state
1007
+ - `AscInputComponent` — text input with CVA integration
1008
+ - `AscSelectComponent` — dropdown select
1009
+ - `AscDatepickerComponent` — date picker (vi-VN / en-US locale)
1010
+ - `AscFormFieldComponent` — form field wrapper with label and validation messages
1011
+ - `AscTableComponent` — data table with lazy loading, sorting, filtering, custom cell templates
1012
+ - `AscDialogComponent` — modal dialog with header/footer slots
1013
+ - `AscSidebarComponent` — slide-in drawer with position support
1014
+ - `AscUpload` — file upload with disabled state, size formatting, and HttpClient integration
1015
+ - `AscToastService` / `AscConfirmService` — programmatic toast and confirm dialog
1016
+
1017
+ ### Bootstrap
1018
+ - `provideAscUI()` — single provider function for PrimeNG theme, i18n, and service registration
1019
+
1020
+ ### i18n
1021
+ - Built-in Vietnamese (`vi-VN`) and English (`en-US`) translations