@aseansc/ui 5.6.0 → 5.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aseansc/ui",
3
- "version": "5.6.0",
3
+ "version": "5.7.0",
4
4
  "description": "ASC Internal UI Component Library — Angular 22 + PrimeNG 21 + TailwindCSS 4 (PrimeNG capped at 21.x — 22.x requires a paid PrimeUI license key, xem README.md)",
5
5
  "license": "UNLICENSED",
6
6
  "author": "ASC Team",
@@ -1,19 +1,19 @@
1
- .layout-main-container {
2
- display: flex;
3
- flex-direction: column;
4
- min-height: 100vh;
5
- justify-content: space-between;
6
- padding: 6rem 2rem 0 2rem;
7
- transition: margin-left var(--layout-section-transition-duration);
8
- }
9
-
10
- .layout-main {
11
- flex: 1 1 auto;
12
- padding: 1.5rem 1.5rem 2rem;
13
- background-color: var(--asc-surface-translucent);
14
- border-radius: 1.25rem;
15
- }
16
-
17
- img {
18
- max-width: none !important;
19
- }
1
+ .layout-main-container {
2
+ display: flex;
3
+ flex-direction: column;
4
+ min-height: 100vh;
5
+ justify-content: space-between;
6
+ padding: 6rem 2rem 0 2rem;
7
+ transition: margin-left var(--layout-section-transition-duration);
8
+ }
9
+
10
+ .layout-main {
11
+ flex: 1 1 auto;
12
+ padding: 1.5rem 1.5rem 2rem;
13
+ background-color: var(--asc-surface-translucent);
14
+ border-radius: 1.25rem;
15
+ }
16
+
17
+ img {
18
+ max-width: none !important;
19
+ }
@@ -613,7 +613,7 @@ declare class AscButtonComponent {
613
613
  private readonly config;
614
614
  readonly label: _angular_core.InputSignal<string>;
615
615
  readonly icon: _angular_core.InputSignal<string>;
616
- readonly iconPos: _angular_core.InputSignal<"top" | "left" | "right" | "bottom">;
616
+ readonly iconPos: _angular_core.InputSignal<"left" | "right" | "top" | "bottom">;
617
617
  readonly severity: _angular_core.InputSignal<AscSeverity>;
618
618
  readonly variant: _angular_core.InputSignal<AscButtonVariant>;
619
619
  /**
@@ -626,7 +626,7 @@ declare class AscButtonComponent {
626
626
  readonly fullWidth: _angular_core.InputSignal<boolean>;
627
627
  readonly type: _angular_core.InputSignal<"button" | "submit" | "reset">;
628
628
  readonly tooltip: _angular_core.InputSignal<string>;
629
- readonly tooltipPos: _angular_core.InputSignal<"top" | "left" | "right" | "bottom">;
629
+ readonly tooltipPos: _angular_core.InputSignal<"left" | "right" | "top" | "bottom">;
630
630
  readonly ariaLabel: _angular_core.InputSignal<string>;
631
631
  readonly styleClass: _angular_core.InputSignal<string>;
632
632
  /**
@@ -762,6 +762,8 @@ declare class AscInputComponent extends BaseControlAccessor<string> {
762
762
  readonly type: _angular_core.InputSignal<"text" | "email">;
763
763
  readonly icon: _angular_core.InputSignal<string>;
764
764
  readonly iconPos: _angular_core.InputSignal<"left" | "right">;
765
+ /** `icon="search"` hoặc `icon="pi pi-search"` → dùng icon search dựng sẵn của thư viện */
766
+ protected readonly isSearchIcon: _angular_core.Signal<boolean>;
765
767
  readonly clearable: _angular_core.InputSignal<boolean>;
766
768
  readonly maxLength: _angular_core.InputSignal<number | null>;
767
769
  readonly showCounter: _angular_core.InputSignal<boolean>;
@@ -819,7 +821,7 @@ declare class AscSelectComponent extends BaseControlAccessor<unknown> {
819
821
  private readonly localeService;
820
822
  protected get msg(): _aseansc_ui.AscUIMessages;
821
823
  /** Danh sách options. Có thể là AscSelectOption[] hoặc object bất kỳ. */
822
- readonly options: _angular_core.InputSignal<unknown[] | AscSelectOption<unknown>[]>;
824
+ readonly options: _angular_core.InputSignal<AscSelectOption<unknown>[] | unknown[]>;
823
825
  /** Field tên hiển thị trong option object */
824
826
  readonly optionLabel: _angular_core.InputSignal<string>;
825
827
  /** Field value trong option object */
@@ -1090,7 +1092,7 @@ declare class AscInputNumberComponent extends BaseControlAccessor<number | null>
1090
1092
  /** Hiển thị spinner buttons tăng/giảm */
1091
1093
  readonly showButtons: _angular_core.InputSignal<boolean>;
1092
1094
  /** Layout của spinner buttons khi showButtons=true */
1093
- readonly buttonLayout: _angular_core.InputSignal<"horizontal" | "vertical" | "stacked">;
1095
+ readonly buttonLayout: _angular_core.InputSignal<"vertical" | "horizontal" | "stacked">;
1094
1096
  /** Nút X xóa giá trị */
1095
1097
  readonly showClear: _angular_core.InputSignal<boolean>;
1096
1098
  /**
@@ -1204,7 +1206,7 @@ declare class AscRadioComponent extends BaseControlAccessor<unknown> {
1204
1206
  /** Hướng danh sách. @default 'column' */
1205
1207
  readonly layout: _angular_core.InputSignal<"column" | "row">;
1206
1208
  /** Căn theo trục ngang của item (align-items). @default 'center' */
1207
- readonly alignColumn: _angular_core.InputSignal<"center" | "start">;
1209
+ readonly alignColumn: _angular_core.InputSignal<"start" | "center">;
1208
1210
  readonly invalid: _angular_core.InputSignal<boolean>;
1209
1211
  readonly disabled: _angular_core.InputSignal<boolean>;
1210
1212
  readonly readonly: _angular_core.InputSignal<boolean>;
@@ -1403,6 +1405,34 @@ declare class AscUpload extends BaseControlAccessor<File | File[] | null> {
1403
1405
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AscUpload, "asc-upload", never, { "actionEvents": { "alias": "actionEvents"; "required": false; "isSignal": true; }; "uploadMode": { "alias": "uploadMode"; "required": false; "isSignal": true; }; "maxSizePerFile": { "alias": "maxSizePerFile"; "required": false; "isSignal": true; }; "multipleUpload": { "alias": "multipleUpload"; "required": false; "isSignal": true; }; "totalSize": { "alias": "totalSize"; "required": false; "isSignal": true; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; "isSignal": true; }; "headerStyle": { "alias": "headerStyle"; "required": false; "isSignal": true; }; "chooseLabel": { "alias": "chooseLabel"; "required": false; "isSignal": true; }; }, {}, never, ["[empty]"], true, never>;
1404
1406
  }
1405
1407
 
1408
+ /** Tên icon dựng sẵn trong thư viện. */
1409
+ type AscBuiltinIconName = 'approve' | 'view' | 'edit' | 'delete' | 'search';
1410
+ /** Path data (viewBox 0 0 20 20) của từng icon — render với fill="currentColor". */
1411
+ declare const ASC_BUILTIN_ICONS: Record<AscBuiltinIconName, string>;
1412
+
1413
+ /**
1414
+ * Nhận tên icon dựng sẵn ('approve' | 'view' | 'edit' | 'delete' | 'search') hoặc class
1415
+ * PrimeIcons tương ứng ('pi pi-trash'...) → trả về tên icon dựng sẵn, không khớp → null.
1416
+ */
1417
+ declare function resolveAscBuiltinIcon(icon: string | null | undefined): AscBuiltinIconName | null;
1418
+ /**
1419
+ * Icon dựng sẵn của thư viện (bộ icon thao tác của designer) — SVG inline, không fetch HTTP,
1420
+ * màu theo `currentColor`.
1421
+ *
1422
+ * @example
1423
+ * <asc-svg-icon name="edit" />
1424
+ * <asc-svg-icon name="search" size="16px" />
1425
+ */
1426
+ declare class AscSvgIconComponent {
1427
+ /** Tên icon dựng sẵn */
1428
+ readonly name: _angular_core.InputSignal<AscBuiltinIconName>;
1429
+ /** Kích thước CSS — mặc định 20px theo thiết kế */
1430
+ readonly size: _angular_core.InputSignal<string>;
1431
+ protected readonly path: _angular_core.Signal<string>;
1432
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AscSvgIconComponent, never>;
1433
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AscSvgIconComponent, "asc-svg-icon", never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1434
+ }
1435
+
1406
1436
  /**
1407
1437
  * @file asc-table.types.ts
1408
1438
  *
@@ -1843,6 +1873,8 @@ declare class AscTableComponent<T extends object = Record<string, unknown>> impl
1843
1873
  * Không set → toggle qua `selectedRows`/`selectionChange` như cũ.
1844
1874
  */
1845
1875
  protected toggleGroupSelection(rowIndex: number, span: number): void;
1876
+ /** Icon thao tác dựng sẵn (approve/view/edit/delete) — nhận cả tên lẫn class PrimeIcons cũ (pi-trash...) */
1877
+ protected readonly builtinIcon: typeof resolveAscBuiltinIcon;
1846
1878
  protected getVisibleActions(row: T): AscTableAction<T>[];
1847
1879
  protected openActionMenu(event: MouseEvent, row: T, rowIndex: number, menu: Menu): void;
1848
1880
  protected isSelected(row: T): boolean;
@@ -2143,7 +2175,7 @@ declare class AscDialogComponent {
2143
2175
  readonly maximizable: _angular_core.InputSignal<boolean>;
2144
2176
  readonly draggable: _angular_core.InputSignal<boolean>;
2145
2177
  readonly resizable: _angular_core.InputSignal<boolean>;
2146
- readonly position: _angular_core.InputSignal<"center" | "top" | "left" | "right" | "bottom" | "topleft" | "topright" | "bottomleft" | "bottomright">;
2178
+ readonly position: _angular_core.InputSignal<"left" | "right" | "top" | "bottom" | "center" | "topleft" | "topright" | "bottomleft" | "bottomright">;
2147
2179
  /** Hiện footer mặc định với 2 nút confirm/cancel */
2148
2180
  readonly showFooter: _angular_core.InputSignal<boolean>;
2149
2181
  readonly confirmLabel: _angular_core.InputSignal<string>;
@@ -2223,7 +2255,7 @@ declare class AscSidebarComponent {
2223
2255
  /** Alias của `header()` dùng trong template — tránh đụng tên với `#header` (PrimeNG Drawer v22 content-child template). */
2224
2256
  protected readonly headerLabel: _angular_core.Signal<string>;
2225
2257
  readonly headerIcon: _angular_core.InputSignal<string>;
2226
- readonly position: _angular_core.InputSignal<"top" | "left" | "right" | "bottom">;
2258
+ readonly position: _angular_core.InputSignal<"left" | "right" | "top" | "bottom">;
2227
2259
  readonly size: _angular_core.InputSignal<"sm" | "md" | "lg" | "xl" | "full">;
2228
2260
  /** Override width/height tuyệt đối */
2229
2261
  readonly customSize: _angular_core.InputSignal<string>;
@@ -2562,7 +2594,7 @@ declare class AscStepperComponent {
2562
2594
  * 'vertical' — mỗi step xếp chồng theo cột, nội dung hiện ngay dưới header
2563
2595
  * của chính step đó, nối nhau bằng đường kẻ dọc.
2564
2596
  */
2565
- readonly orientation: _angular_core.InputSignal<"horizontal" | "vertical">;
2597
+ readonly orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
2566
2598
  protected readonly steps: _angular_core.Signal<readonly AscStepComponent[]>;
2567
2599
  protected readonly hostCls: _angular_core.Signal<string>;
2568
2600
  /** true khi step đã đi qua (value nhỏ hơn bước đang active) */
@@ -3221,5 +3253,5 @@ declare class AscTrimSpaceDirective {
3221
3253
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AscTrimSpaceDirective, "[ascTrimSpace]", never, {}, {}, never, never, true, never>;
3222
3254
  }
3223
3255
 
3224
- export { ASC_BASE_CONTROL, ASC_MESSAGES_EN_US, ASC_MESSAGES_VI_VN, ASC_PRESET, ASC_UI_CONFIG, ASC_UI_DEFAULT_CONFIG, ASC_UI_MESSAGES, AscAccordionComponent, AscAccordionItemComponent, AscAlertComponent, AscAutoCompleteComponent, AscAvatarComponent, AscAvatarGroupComponent, AscBadgeComponent, AscBoxDirective, AscBreadcrumb, AscButtonComponent, AscCardComponent, AscCardFooterDirective, AscCardHeaderDirective, AscCheckboxComponent, AscConfirmDialog, AscConfirmPopup, AscConfirmService, AscDatepickerComponent, AscDialogComponent, AscDialogFooterDirective, AscDialogHeaderDirective, AscDividerComponent, AscEmptyStateComponent, AscFormFieldComponent, AscIconComponent, AscIconService, AscInputComponent, AscInputMaskComponent, AscInputNumberComponent, AscLayout, AscLoadingBarComponent, AscLoadingOverlayComponent, AscLocaleService, AscMessageErrorPipe, AscPaginatorComponent, AscPasswordComponent, AscPicklistComponent, AscPopoverComponent, AscProgressBarComponent, AscRadioComponent, AscSelectButtonComponent, AscSelectComponent, AscSidebarComponent, AscSidebarFooterDirective, AscSidebarHeaderDirective, AscSkeletonComponent, AscSpinnerComponent, AscStepComponent, AscStepContentDirective, AscStepperComponent, AscTabComponent, AscTableCaptionDirective, AscTableCellDirective, AscTableComponent, AscTableEmptyDirective, AscTableExpandDirective, AscTabsComponent, AscTextDirective, AscTextareaComponent, AscThemeService, AscTimelineComponent, AscToast, AscToastService, AscToggleSwitchComponent, AscTooltipDirective, AscTrimSpaceDirective, AscTypographyDirective, AscUpload, BaseControlAccessor, ascCls, ascUniqueId, coerceArray, coerceBooleanProperty, coerceNumberProperty, coerceStringProperty, isAscSeverity, isAscSize, provideAscUI };
3225
- export type { AscAlertSeverity, AscAutoCompleteItem, AscAvatarShape, AscAvatarSize, AscBadgeConfig, AscBadgeSeverity, AscBgColor, AscBorderColor, AscBorderStyle, AscBorderWidth, AscBoxHeight, AscBoxRadius, AscBoxWidth, AscButtonVariant, AscCardRadius, AscCardShadow, AscCheckboxOption, AscColumnFormat, AscColumnVisibility, AscConfirmOptions, AscConfirmPopupOptions, AscDateSelectionMode, AscDateValue, AscDateView, AscDividerAlign, AscDividerLayout, AscDividerType, AscFontWeight, AscFormLayout, AscHourFormat, AscIconPosition, AscInputVariant, AscLeading, AscLocale, AscMenuItem, AscNumberType, AscProgressBarMode, AscSelectOption, AscSelectionMode, AscSeverity, AscSize, AscSkeletonPreset, AscSkeletonShape, AscSpinnerSize, AscTableAction, AscTableCellContext, AscTableColumn, AscTableColumnType, AscTableExpandContext, AscTableFilterMeta, AscTableLazyLoadEvent, AscTablePageEvent, AscTableSortEvent, AscTableSortMeta, AscTabsOrientation, AscTextAlign, AscTextColor, AscTextSize, AscTimelineAlign, AscTimelineItem, AscTimelineLayout, AscTimelineStatus, AscToastOptions, AscToastSeverity, AscTooltipPosition, AscTypographyToken, AscTypographyType, AscUIButtonConfig, AscUIConfig, AscUIInputConfig, AscUILayoutConfig, AscUIMessages, AscUITableConfig, AscUIThemeConfig, AscUIToastConfig, AscUIValidationConfig, AscValidationMessageFn, AscValidationMessages };
3256
+ export { ASC_BASE_CONTROL, ASC_BUILTIN_ICONS, ASC_MESSAGES_EN_US, ASC_MESSAGES_VI_VN, ASC_PRESET, ASC_UI_CONFIG, ASC_UI_DEFAULT_CONFIG, ASC_UI_MESSAGES, AscAccordionComponent, AscAccordionItemComponent, AscAlertComponent, AscAutoCompleteComponent, AscAvatarComponent, AscAvatarGroupComponent, AscBadgeComponent, AscBoxDirective, AscBreadcrumb, AscButtonComponent, AscCardComponent, AscCardFooterDirective, AscCardHeaderDirective, AscCheckboxComponent, AscConfirmDialog, AscConfirmPopup, AscConfirmService, AscDatepickerComponent, AscDialogComponent, AscDialogFooterDirective, AscDialogHeaderDirective, AscDividerComponent, AscEmptyStateComponent, AscFormFieldComponent, AscIconComponent, AscIconService, AscInputComponent, AscInputMaskComponent, AscInputNumberComponent, AscLayout, AscLoadingBarComponent, AscLoadingOverlayComponent, AscLocaleService, AscMessageErrorPipe, AscPaginatorComponent, AscPasswordComponent, AscPicklistComponent, AscPopoverComponent, AscProgressBarComponent, AscRadioComponent, AscSelectButtonComponent, AscSelectComponent, AscSidebarComponent, AscSidebarFooterDirective, AscSidebarHeaderDirective, AscSkeletonComponent, AscSpinnerComponent, AscStepComponent, AscStepContentDirective, AscStepperComponent, AscSvgIconComponent, AscTabComponent, AscTableCaptionDirective, AscTableCellDirective, AscTableComponent, AscTableEmptyDirective, AscTableExpandDirective, AscTabsComponent, AscTextDirective, AscTextareaComponent, AscThemeService, AscTimelineComponent, AscToast, AscToastService, AscToggleSwitchComponent, AscTooltipDirective, AscTrimSpaceDirective, AscTypographyDirective, AscUpload, BaseControlAccessor, ascCls, ascUniqueId, coerceArray, coerceBooleanProperty, coerceNumberProperty, coerceStringProperty, isAscSeverity, isAscSize, provideAscUI, resolveAscBuiltinIcon };
3257
+ export type { AscAlertSeverity, AscAutoCompleteItem, AscAvatarShape, AscAvatarSize, AscBadgeConfig, AscBadgeSeverity, AscBgColor, AscBorderColor, AscBorderStyle, AscBorderWidth, AscBoxHeight, AscBoxRadius, AscBoxWidth, AscBuiltinIconName, AscButtonVariant, AscCardRadius, AscCardShadow, AscCheckboxOption, AscColumnFormat, AscColumnVisibility, AscConfirmOptions, AscConfirmPopupOptions, AscDateSelectionMode, AscDateValue, AscDateView, AscDividerAlign, AscDividerLayout, AscDividerType, AscFontWeight, AscFormLayout, AscHourFormat, AscIconPosition, AscInputVariant, AscLeading, AscLocale, AscMenuItem, AscNumberType, AscProgressBarMode, AscSelectOption, AscSelectionMode, AscSeverity, AscSize, AscSkeletonPreset, AscSkeletonShape, AscSpinnerSize, AscTableAction, AscTableCellContext, AscTableColumn, AscTableColumnType, AscTableExpandContext, AscTableFilterMeta, AscTableLazyLoadEvent, AscTablePageEvent, AscTableSortEvent, AscTableSortMeta, AscTabsOrientation, AscTextAlign, AscTextColor, AscTextSize, AscTimelineAlign, AscTimelineItem, AscTimelineLayout, AscTimelineStatus, AscToastOptions, AscToastSeverity, AscTooltipPosition, AscTypographyToken, AscTypographyType, AscUIButtonConfig, AscUIConfig, AscUIInputConfig, AscUILayoutConfig, AscUIMessages, AscUITableConfig, AscUIThemeConfig, AscUIToastConfig, AscUIValidationConfig, AscValidationMessageFn, AscValidationMessages };