@shival99/z-ui 2.0.29 → 2.0.31

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.
Files changed (46) hide show
  1. package/fesm2022/shival99-z-ui-components-z-calendar.mjs +294 -7
  2. package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
  3. package/fesm2022/shival99-z-ui-components-z-chat.mjs +1 -1
  4. package/fesm2022/shival99-z-ui-components-z-chat.mjs.map +1 -1
  5. package/fesm2022/shival99-z-ui-components-z-drawer.mjs +16 -4
  6. package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -1
  7. package/fesm2022/shival99-z-ui-components-z-editor.mjs +43 -25
  8. package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -1
  9. package/fesm2022/shival99-z-ui-components-z-gallery.mjs +457 -532
  10. package/fesm2022/shival99-z-ui-components-z-gallery.mjs.map +1 -1
  11. package/fesm2022/shival99-z-ui-components-z-kanban.mjs +1 -1
  12. package/fesm2022/shival99-z-ui-components-z-kanban.mjs.map +1 -1
  13. package/fesm2022/shival99-z-ui-components-z-media-player.mjs +658 -0
  14. package/fesm2022/shival99-z-ui-components-z-media-player.mjs.map +1 -0
  15. package/fesm2022/shival99-z-ui-components-z-modal.mjs +16 -4
  16. package/fesm2022/shival99-z-ui-components-z-modal.mjs.map +1 -1
  17. package/fesm2022/shival99-z-ui-components-z-qrcode.mjs +383 -0
  18. package/fesm2022/shival99-z-ui-components-z-qrcode.mjs.map +1 -0
  19. package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs +131 -0
  20. package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs.map +1 -0
  21. package/fesm2022/shival99-z-ui-components-z-show-more.mjs +121 -0
  22. package/fesm2022/shival99-z-ui-components-z-show-more.mjs.map +1 -0
  23. package/fesm2022/shival99-z-ui-components-z-table.mjs +988 -137
  24. package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -1
  25. package/fesm2022/shival99-z-ui-components-z-tabs.mjs +135 -61
  26. package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -1
  27. package/fesm2022/shival99-z-ui-components-z-tags.mjs +24 -14
  28. package/fesm2022/shival99-z-ui-components-z-tags.mjs.map +1 -1
  29. package/fesm2022/shival99-z-ui-components-z-toast.mjs +124 -31
  30. package/fesm2022/shival99-z-ui-components-z-toast.mjs.map +1 -1
  31. package/fesm2022/shival99-z-ui-i18n.mjs +70 -0
  32. package/fesm2022/shival99-z-ui-i18n.mjs.map +1 -1
  33. package/package.json +17 -1
  34. package/types/shival99-z-ui-components-z-calendar.d.ts +10 -5
  35. package/types/shival99-z-ui-components-z-drawer.d.ts +14 -2
  36. package/types/shival99-z-ui-components-z-editor.d.ts +13 -8
  37. package/types/shival99-z-ui-components-z-gallery.d.ts +97 -6
  38. package/types/shival99-z-ui-components-z-media-player.d.ts +123 -0
  39. package/types/shival99-z-ui-components-z-modal.d.ts +14 -2
  40. package/types/shival99-z-ui-components-z-qrcode.d.ts +76 -0
  41. package/types/shival99-z-ui-components-z-scrollarea.d.ts +46 -0
  42. package/types/shival99-z-ui-components-z-show-more.d.ts +36 -0
  43. package/types/shival99-z-ui-components-z-table.d.ts +59 -14
  44. package/types/shival99-z-ui-components-z-tabs.d.ts +10 -6
  45. package/types/shival99-z-ui-components-z-tags.d.ts +3 -0
  46. package/types/shival99-z-ui-components-z-toast.d.ts +35 -2
@@ -5,20 +5,23 @@ import * as _shival99_z_ui_components_z_input from '@shival99/z-ui/components/z-
5
5
  import { ZInputSize } from '@shival99/z-ui/components/z-input';
6
6
  import * as _angular_core from '@angular/core';
7
7
  import { TemplateRef, Type, AfterViewInit, ElementRef, OnInit } from '@angular/core';
8
- import { CdkDragDrop, CdkDragEnd } from '@angular/cdk/drag-drop';
8
+ import { CdkDragDrop } from '@angular/cdk/drag-drop';
9
9
  import { ConnectedPosition } from '@angular/cdk/overlay';
10
+ import { ZButtonVariants } from '@shival99/z-ui/components/z-button';
10
11
  import { ZPopoverDirective } from '@shival99/z-ui/components/z-popover';
11
12
  import { ClassValue } from 'clsx';
12
13
  import { NgScrollbar } from 'ngx-scrollbar';
13
14
  import { ZAutocompleteType, ZAutocompleteOption } from '@shival99/z-ui/components/z-autocomplete';
14
- import { ZButtonVariants } from '@shival99/z-ui/components/z-button';
15
15
  import { ZIcon, ZIconVariants } from '@shival99/z-ui/components/z-icon';
16
16
  import { ZSelectOption, ZSelectConfig } from '@shival99/z-ui/components/z-select';
17
+ import * as _shival99_z_ui_components_z_tags from '@shival99/z-ui/components/z-tags';
18
+ import { ZTagColor } from '@shival99/z-ui/components/z-tags';
17
19
  import * as _shival99_z_ui_components_z_tooltip from '@shival99/z-ui/components/z-tooltip';
18
20
  import { ZTooltipConfig, ZTooltipContent } from '@shival99/z-ui/components/z-tooltip';
19
21
  import { ZExcelColumnConfig, ZExcelExportOptions } from '@shival99/z-ui/services';
20
22
  import { ZDateRange } from '@shival99/z-ui/components/z-calendar';
21
23
  import { ZDropdownMenuItem } from '@shival99/z-ui/components/z-dropdown-menu';
24
+ import * as _shival99_z_ui_components_z_table from '@shival99/z-ui/components/z-table';
22
25
 
23
26
  /**
24
27
  * Z-Table Type Definitions
@@ -55,6 +58,9 @@ interface ZTableIconPart {
55
58
  strokeWidth?: number;
56
59
  }
57
60
  type ZTableAlign = 'left' | 'center' | 'right';
61
+ type ZTableBodyContentType = 'default' | 'tag';
62
+ type ZTableColumnType = 'data' | 'select' | 'expand' | 'rowDrag' | 'rowPin' | 'actions';
63
+ type ZTableTagColor = ZTagColor;
58
64
  /**
59
65
  * Body cell content — supports static values, Angular templates/components,
60
66
  * or a function that receives the cell context and returns dynamic content.
@@ -228,6 +234,10 @@ interface ZTableHeaderColumnConfig<T> {
228
234
  */
229
235
  interface ZTableBodyColumnConfig<T> {
230
236
  content?: ZTableCellContent<T>;
237
+ /** Built-in visual treatment for the rendered body content. */
238
+ type?: ZTableBodyContentType;
239
+ /** Semantic color used when type is "tag". */
240
+ tagColor?: ZTableTagColor | ((info: CellContext<T, unknown>) => ZTableTagColor);
231
241
  class?: string | ((info: CellContext<T, unknown>) => string);
232
242
  style?: Record<string, string> | ((info: CellContext<T, unknown>) => Record<string, string>);
233
243
  align?: ZTableAlign;
@@ -276,6 +286,8 @@ interface ZTableFooterColumnConfig<T> {
276
286
  interface ZTableColumnConfig<T> {
277
287
  /** Unique column identifier — must be stable across re-renders */
278
288
  id: string;
289
+ /** Semantic column role. Falls back to legacy id/body detection when omitted. */
290
+ type?: ZTableColumnType;
279
291
  /** Pre-filter visibility — unlike columnVisibility, this removes the column entirely */
280
292
  visible?: boolean | (() => boolean);
281
293
  /** Object property key for simple accessor — mutually exclusive with accessorFn */
@@ -647,6 +659,13 @@ interface ZTableConfig<T> {
647
659
  getRowId?: (row: T, index: number, parent: T | undefined, data: T[]) => string;
648
660
  /** Sub-row accessor for tree/hierarchical data */
649
661
  getSubRows?: (row: T, index: number, parent: T | undefined, data: T[]) => T[] | undefined;
662
+ /** Class applied to the row and its cells. Cell body classes take precedence on conflicts. */
663
+ rowClass?: string | ((row: Row<T>) => string);
664
+ /**
665
+ * Style applied to the row and its cells. Cell body styles take precedence on conflicts.
666
+ * Fixed-size virtual rows keep the height configured by virtual.size.
667
+ */
668
+ rowStyle?: Record<string, string> | ((row: Row<T>) => Record<string, string>);
650
669
  /** @deprecated Use totalCount instead */
651
670
  totalRows?: number;
652
671
  /** true = enable with defaults; object = full virtual scroll config */
@@ -711,6 +730,18 @@ interface ZResolvedEditConfig {
711
730
  disabled: boolean;
712
731
  readonly: boolean;
713
732
  }
733
+ type ZTableDragEntity = 'row' | 'settings-column';
734
+ type ZTableDropEdge = 'top' | 'bottom';
735
+ interface ZTableDragData {
736
+ tableId: string;
737
+ entity: ZTableDragEntity;
738
+ itemId: string;
739
+ }
740
+ interface ZTableDragDropData {
741
+ source: ZTableDragData;
742
+ target: ZTableDragData;
743
+ edge: ZTableDropEdge;
744
+ }
714
745
  /**
715
746
  * Extends TanStack's TableMeta to add a custom `updateData` callback.
716
747
  * This is used by inline edit cells to notify the table of value changes.
@@ -721,6 +752,9 @@ declare module '@tanstack/angular-table' {
721
752
  }
722
753
  }
723
754
 
755
+ type ZTableBulkActionRenderItem<T> = ZTableBulkActionViewItem<T> & {
756
+ buttonType: ZButtonVariants['zType'];
757
+ };
724
758
  declare class ZTableComponent<T> implements AfterViewInit {
725
759
  /** Unified change event — parent listens to this for all table interactions */
726
760
  readonly zChange: _angular_core.OutputEmitterRef<ZTableChangeEvent<T>>;
@@ -737,6 +771,7 @@ declare class ZTableComponent<T> implements AfterViewInit {
737
771
  /** Visual variant: 'default' has card shadow, 'borderless' has no container border */
738
772
  readonly zVariant: _angular_core.InputSignal<"default" | "borderless">;
739
773
  private readonly _destroy$;
774
+ private readonly _dragService;
740
775
  private readonly _zExcel;
741
776
  private readonly _zTranslate;
742
777
  /** Prevents recursive scroll sync between thead/tbody/tfoot */
@@ -747,16 +782,18 @@ declare class ZTableComponent<T> implements AfterViewInit {
747
782
  private _resizeObserver;
748
783
  /** Debounces rapid settings changes (visibility/pin toggles) */
749
784
  private _settingsDebounceTimeout;
785
+ private _visibilityDebounceTimeout;
750
786
  /** Debounces filter change emissions to server */
751
787
  private _filterEmitDebounceTimeout;
752
788
  /** Keeps the bulk bar mounted long enough for its exit animation */
753
789
  private _bulkBarTimer;
754
790
  private readonly _activeColumnVisibilityPopover;
791
+ private _hasInitializedColumnPinning;
755
792
  /** Merged loading state from both zLoading input and config.loading */
756
793
  protected readonly isLoading: _angular_core.Signal<boolean>;
757
794
  /** True during debounced async state transitions (sort/filter processing) */
758
795
  protected readonly isProcessing: _angular_core.WritableSignal<boolean>;
759
- protected readonly isDraggingRow: _angular_core.WritableSignal<boolean>;
796
+ protected readonly dragInstanceId: string;
760
797
  protected readonly theadWrapper: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
761
798
  protected readonly tbodyContainer: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
762
799
  protected readonly tbodyWrapper: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
@@ -798,7 +835,7 @@ declare class ZTableComponent<T> implements AfterViewInit {
798
835
  protected readonly bulkBarClosing: _angular_core.WritableSignal<boolean>;
799
836
  protected readonly bulkBarConfig: _angular_core.WritableSignal<ZTableBulkActionOptions<T> | null>;
800
837
  protected readonly bulkBarContext: _angular_core.WritableSignal<ZTableBulkActionContext<T> | null>;
801
- protected readonly bulkBarItems: _angular_core.WritableSignal<ZTableBulkActionViewItem<T>[]>;
838
+ protected readonly bulkBarItems: _angular_core.WritableSignal<ZTableBulkActionRenderItem<T>[]>;
802
839
  /** True when table body is scrolled away from left edge (shows left pin shadow) */
803
840
  protected readonly hasScrollLeft: _angular_core.WritableSignal<boolean>;
804
841
  /** True when table has right-pinned columns and body isn't scrolled to the end */
@@ -842,7 +879,9 @@ declare class ZTableComponent<T> implements AfterViewInit {
842
879
  config: ZTableActionColumnConfig<T>;
843
880
  width: number;
844
881
  } | null>;
882
+ private readonly _actionColumnRows;
845
883
  protected readonly hasActionColumn: _angular_core.Signal<boolean>;
884
+ private readonly _fixedColumnPinning;
846
885
  protected readonly hasFiltering: _angular_core.Signal<boolean>;
847
886
  protected readonly hasLocalFiltering: _angular_core.Signal<boolean>;
848
887
  protected readonly hasSorting: _angular_core.Signal<boolean>;
@@ -900,6 +939,7 @@ declare class ZTableComponent<T> implements AfterViewInit {
900
939
  protected readonly virtualRightSpacerWidth: _angular_core.Signal<number>;
901
940
  protected readonly renderedColumnCount: _angular_core.Signal<number>;
902
941
  protected readonly orderedLeafColumns: _angular_core.Signal<Column<T, unknown>[]>;
942
+ protected readonly fillColumnId: _angular_core.Signal<string | null>;
903
943
  protected readonly hideableColumns: _angular_core.Signal<Column<T, unknown>[]>;
904
944
  protected readonly orderedHeaderGroups: _angular_core.Signal<{
905
945
  id: string;
@@ -938,16 +978,14 @@ declare class ZTableComponent<T> implements AfterViewInit {
938
978
  protected readonly selectedRows: _angular_core.Signal<T[]>;
939
979
  protected readonly bulkActionContext: _angular_core.Signal<ZTableBulkActionContext<T>>;
940
980
  protected readonly bulkActionConfig: _angular_core.Signal<ZTableBulkActionOptions<T> | null>;
941
- protected readonly bulkActionItems: _angular_core.Signal<{
942
- action: ZTableBulkActionItem<T>;
943
- disabled: boolean;
944
- }[]>;
981
+ protected readonly bulkActionItems: _angular_core.Signal<ZTableBulkActionRenderItem<T>[]>;
945
982
  protected readonly showBulkBar: _angular_core.Signal<boolean>;
946
983
  protected readonly bulkBarPositions: ConnectedPosition[];
947
984
  private readonly _bulkBarExitDuration;
948
985
  /** Virtualizer instance — operates on groups rather than individual rows */
949
986
  protected readonly virtualizer: _shival99_angular_virtual.AngularVirtualizer<HTMLDivElement, Element>;
950
987
  private readonly _measureVirtualItems;
988
+ private readonly _rowDragAutoScroll;
951
989
  constructor();
952
990
  ngAfterViewInit(): void;
953
991
  /**
@@ -979,6 +1017,7 @@ declare class ZTableComponent<T> implements AfterViewInit {
979
1017
  private _refreshPinnedRowHeights;
980
1018
  private _checkVerticalScroll;
981
1019
  private _checkLastRowTouchesBottom;
1020
+ private _getTbodyViewportElement;
982
1021
  private _checkHorizontalScroll;
983
1022
  private _updateScrollShadowState;
984
1023
  hasRightPinnedColumns(): boolean;
@@ -989,11 +1028,8 @@ declare class ZTableComponent<T> implements AfterViewInit {
989
1028
  * Giữ tạm để các consumer/template cũ còn compile trong giai đoạn chuyển đổi.
990
1029
  */
991
1030
  handleSort(event: Event, handler?: (event: unknown) => void): void;
992
- onColumnDrop(event: CdkDragDrop<string[]>): void;
993
- onRowDragStarted(): void;
994
- onRowDragEnded(_event: CdkDragEnd<Row<T>>): void;
995
- onRowDrop(event: CdkDragDrop<Row<T>[]>): void;
996
- private _resolveRowDragDropIndex;
1031
+ protected _handleDragDrop(event: ZTableDragDropData): void;
1032
+ private _handleRowDrop;
997
1033
  onToggleAllColumns(): void;
998
1034
  onPageChange(event: {
999
1035
  pageIndex: number;
@@ -1018,10 +1054,15 @@ declare class ZTableComponent<T> implements AfterViewInit {
1018
1054
  hideColumnPopoversOnOutsideClick(optionsPopover: ZPopoverDirective): void;
1019
1055
  openSettingsDrawerFromColumnMenu(...popovers: ZPopoverDirective[]): void;
1020
1056
  private _isColumnHiddenFromVisibilityMenu;
1057
+ private _setColumnPinning;
1058
+ private _areColumnIdListsEqual;
1021
1059
  moveColumnLeft(columnId: string): void;
1022
1060
  moveColumnRight(columnId: string): void;
1023
1061
  isFirstMovableColumn(columnId: string): boolean;
1024
1062
  isLastMovableColumn(columnId: string): boolean;
1063
+ private _isFixedLeadingColumnId;
1064
+ private _isRowPinColumnId;
1065
+ private _isSpecialColumnId;
1025
1066
  /** Saves current column layout, sizing, pinning, and visibility to ZCacheService */
1026
1067
  private _saveConfig;
1027
1068
  private _collectColumnInfo;
@@ -1243,6 +1284,8 @@ declare const getHeaderConfig: <T>(col: ZTableColumnConfig<T> | undefined) => {
1243
1284
  */
1244
1285
  declare const getBodyConfig: <T>(col: ZTableColumnConfig<T> | undefined, ctx?: CellContext<T, unknown>) => {
1245
1286
  content: ZTableCellContent<T> | undefined;
1287
+ type: "default";
1288
+ tagColor: "primary";
1246
1289
  class: string | undefined;
1247
1290
  style: Record<string, string> | undefined;
1248
1291
  align: string | undefined;
@@ -1253,6 +1296,8 @@ declare const getBodyConfig: <T>(col: ZTableColumnConfig<T> | undefined, ctx?: C
1253
1296
  tooltip: string | object | undefined;
1254
1297
  } | {
1255
1298
  content: ZTableCellContent<T> | undefined;
1299
+ type: _shival99_z_ui_components_z_table.ZTableBodyContentType;
1300
+ tagColor: _shival99_z_ui_components_z_tags.ZTagColor | ((info: CellContext<T, unknown>) => _shival99_z_ui_components_z_table.ZTableTagColor);
1256
1301
  class: string | ((info: CellContext<T, unknown>) => string) | undefined;
1257
1302
  style: Record<string, string> | undefined;
1258
1303
  align: ZTableAlign | undefined;
@@ -1299,4 +1344,4 @@ declare const findColumnConfig: <T>(columnId: string, columns: ZTableColumnConfi
1299
1344
  declare function columnConfigToColumnDef<T>(config: ZTableColumnConfig<T>): ColumnDef<T>;
1300
1345
 
1301
1346
  export { ZTableActionsComponent, ZTableComponent, ZTableEditCellComponent, ZTableFilterComponent, ZTableIconTextComponent, columnConfigToColumnDef, findColumnConfig, getBodyConfig, getFooterConfig, getHeaderConfig, isBodyConfig, isFooterConfig, isHeaderConfig };
1302
- export type { ZTableActionBodyConfig, ZTableActionClickEvent, ZTableActionColumnConfig, ZTableActionItem, ZTableActionList, ZTableAdvancedFilterType, ZTableBulkActionClickEvent, ZTableBulkActionConfig, ZTableBulkActionContext, ZTableBulkActionHandlerContext, ZTableBulkActionItem, ZTableBulkActionList, ZTableBulkActionOptions, ZTableBulkActionViewItem, ZTableCellEditChange, ZTableCellEditEvent, ZTableChangeEvent, ZTableColumn, ZTableColumnConfig, ZTableConfig, ZTableControl, ZTableEditCellChangeEvent, ZTableEditConfig, ZTableEditSize, ZTableEditType, ZTableExcelExportConfig, ZTableExcelExportContext, ZTableExcelExportScope, ZTableFilterChangeEvent, ZTableFilterCondition, ZTableFilterConfig, ZTableFilterJoinOperator, ZTableFilterOperator, ZTableFilterOptionSource, ZTableFilterUi, ZTableFilterValueType, ZTablePageChangeEvent, ZTablePaginationConfig, ZTableRowExpandEvent, ZTableRowSelectEvent, ZTableSearchChangeEvent, ZTableSearchConfig, ZTableSortChangeEvent, ZTableSortConfig };
1347
+ export type { ZTableActionBodyConfig, ZTableActionClickEvent, ZTableActionColumnConfig, ZTableActionItem, ZTableActionList, ZTableAdvancedFilterType, ZTableBodyContentType, ZTableBulkActionClickEvent, ZTableBulkActionConfig, ZTableBulkActionContext, ZTableBulkActionHandlerContext, ZTableBulkActionItem, ZTableBulkActionList, ZTableBulkActionOptions, ZTableBulkActionViewItem, ZTableCellEditChange, ZTableCellEditEvent, ZTableChangeEvent, ZTableColumn, ZTableColumnConfig, ZTableConfig, ZTableControl, ZTableEditCellChangeEvent, ZTableEditConfig, ZTableEditSize, ZTableEditType, ZTableExcelExportConfig, ZTableExcelExportContext, ZTableExcelExportScope, ZTableFilterChangeEvent, ZTableFilterCondition, ZTableFilterConfig, ZTableFilterJoinOperator, ZTableFilterOperator, ZTableFilterOptionSource, ZTableFilterUi, ZTableFilterValueType, ZTablePageChangeEvent, ZTablePaginationConfig, ZTableRowExpandEvent, ZTableRowSelectEvent, ZTableSearchChangeEvent, ZTableSearchConfig, ZTableSortChangeEvent, ZTableSortConfig, ZTableTagColor };
@@ -20,8 +20,8 @@ interface ZTab {
20
20
  badge?: string | number;
21
21
  template?: TemplateRef<unknown>;
22
22
  }
23
- type ZTabsType = 'line' | 'default' | 'enclosed' | 'enclosed-solid' | 'soft' | 'pill' | 'solid' | 'underline' | 'underlined' | 'badge' | 'sharp' | 'vertical-sharp' | 'code-line';
24
- type ZTabsSize = 'sm' | 'default' | 'lg';
23
+ type ZTabsType = 'line' | 'soft' | 'segment' | 'folder' | 'folder-soft' | 'folder-solid' | 'underline' | 'underlined' | 'badge' | 'sharp' | 'sharp-line' | 'vertical-sharp' | 'code-line';
24
+ type ZTabsSize = 'xs' | 'sm' | 'default' | 'lg';
25
25
  type ZTabsOrientation = 'horizontal' | 'vertical';
26
26
 
27
27
  declare class ZTabsComponent implements OnInit, AfterViewInit, OnDestroy {
@@ -36,6 +36,7 @@ declare class ZTabsComponent implements OnInit, AfterViewInit, OnDestroy {
36
36
  readonly zLazy: _angular_core.InputSignal<boolean>;
37
37
  readonly zDestroyInactive: _angular_core.InputSignal<boolean>;
38
38
  readonly zTabsOnly: _angular_core.InputSignal<boolean>;
39
+ readonly zShowContentWrapper: _angular_core.InputSignal<boolean>;
39
40
  readonly zReloadable: _angular_core.InputSignal<boolean>;
40
41
  readonly zEmitOnActiveClick: _angular_core.InputSignal<boolean>;
41
42
  readonly zCache: _angular_core.InputSignal<boolean>;
@@ -53,6 +54,9 @@ declare class ZTabsComponent implements OnInit, AfterViewInit, OnDestroy {
53
54
  ngAfterViewInit(): void;
54
55
  ngOnDestroy(): void;
55
56
  protected readonly tabsClasses: _angular_core.Signal<string>;
57
+ protected readonly contentWrapperFramed: _angular_core.Signal<boolean>;
58
+ protected readonly tabsListHasBottomPadding: _angular_core.Signal<boolean>;
59
+ protected readonly verticalTabsScrollable: _angular_core.Signal<boolean>;
56
60
  protected getTabItemClasses(_tab: ZTab): string;
57
61
  protected selectTab(tab: ZTab, scrollToView?: boolean): void;
58
62
  protected isTabActive(tab: ZTab): boolean;
@@ -67,16 +71,16 @@ declare class ZTabsComponent implements OnInit, AfterViewInit, OnDestroy {
67
71
  private _getCacheKey;
68
72
  protected scrollToActiveDropdownItem(): void;
69
73
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZTabsComponent, never>;
70
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZTabsComponent, "z-tabs", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; "zTabs": { "alias": "zTabs"; "required": true; "isSignal": true; }; "zType": { "alias": "zType"; "required": false; "isSignal": true; }; "zSize": { "alias": "zSize"; "required": false; "isSignal": true; }; "zOrientation": { "alias": "zOrientation"; "required": false; "isSignal": true; }; "zLazy": { "alias": "zLazy"; "required": false; "isSignal": true; }; "zDestroyInactive": { "alias": "zDestroyInactive"; "required": false; "isSignal": true; }; "zTabsOnly": { "alias": "zTabsOnly"; "required": false; "isSignal": true; }; "zReloadable": { "alias": "zReloadable"; "required": false; "isSignal": true; }; "zEmitOnActiveClick": { "alias": "zEmitOnActiveClick"; "required": false; "isSignal": true; }; "zCache": { "alias": "zCache"; "required": false; "isSignal": true; }; "zCacheKey": { "alias": "zCacheKey"; "required": false; "isSignal": true; }; "activeTab": { "alias": "activeTab"; "required": false; "isSignal": true; }; }, { "activeTab": "activeTabChange"; "zTabChange": "zTabChange"; }, ["tabPanels"], never, true, never>;
74
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZTabsComponent, "z-tabs", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; "zTabs": { "alias": "zTabs"; "required": true; "isSignal": true; }; "zType": { "alias": "zType"; "required": false; "isSignal": true; }; "zSize": { "alias": "zSize"; "required": false; "isSignal": true; }; "zOrientation": { "alias": "zOrientation"; "required": false; "isSignal": true; }; "zLazy": { "alias": "zLazy"; "required": false; "isSignal": true; }; "zDestroyInactive": { "alias": "zDestroyInactive"; "required": false; "isSignal": true; }; "zTabsOnly": { "alias": "zTabsOnly"; "required": false; "isSignal": true; }; "zShowContentWrapper": { "alias": "zShowContentWrapper"; "required": false; "isSignal": true; }; "zReloadable": { "alias": "zReloadable"; "required": false; "isSignal": true; }; "zEmitOnActiveClick": { "alias": "zEmitOnActiveClick"; "required": false; "isSignal": true; }; "zCache": { "alias": "zCache"; "required": false; "isSignal": true; }; "zCacheKey": { "alias": "zCacheKey"; "required": false; "isSignal": true; }; "activeTab": { "alias": "activeTab"; "required": false; "isSignal": true; }; }, { "activeTab": "activeTabChange"; "zTabChange": "zTabChange"; }, ["tabPanels"], never, true, never>;
71
75
  }
72
76
 
73
77
  declare const zTabsVariants: (props?: ({
74
- zType?: "line" | "default" | "enclosed" | "enclosed-solid" | "soft" | "pill" | "solid" | "underline" | "underlined" | "badge" | "sharp" | "vertical-sharp" | "code-line" | null | undefined;
78
+ zType?: "line" | "soft" | "segment" | "folder" | "folder-soft" | "folder-solid" | "underline" | "underlined" | "badge" | "sharp" | "sharp-line" | "vertical-sharp" | "code-line" | null | undefined;
75
79
  zOrientation?: "horizontal" | "vertical" | null | undefined;
76
80
  } & class_variance_authority_types.ClassProp) | undefined) => string;
77
81
  declare const zTabItemVariants: (props?: ({
78
- zType?: "line" | "default" | "enclosed" | "enclosed-solid" | "soft" | "pill" | "solid" | "underline" | "underlined" | "badge" | "sharp" | "vertical-sharp" | "code-line" | null | undefined;
79
- zSize?: "default" | "sm" | "lg" | null | undefined;
82
+ zType?: "line" | "soft" | "segment" | "folder" | "folder-soft" | "folder-solid" | "underline" | "underlined" | "badge" | "sharp" | "sharp-line" | "vertical-sharp" | "code-line" | null | undefined;
83
+ zSize?: "xs" | "sm" | "default" | "lg" | null | undefined;
80
84
  zOrientation?: "horizontal" | "vertical" | null | undefined;
81
85
  } & class_variance_authority_types.ClassProp) | undefined) => string;
82
86
  type ZTabsVariants = VariantProps<typeof zTabsVariants>;
@@ -18,6 +18,9 @@ interface ZTagRandomColorCache {
18
18
  text: string;
19
19
  border: string;
20
20
  hoverBg: string;
21
+ darkBg?: string;
22
+ darkText?: string;
23
+ darkHoverBg?: string;
21
24
  }
22
25
  interface ZTagConfig {
23
26
  size: ZTagSize;
@@ -2,6 +2,7 @@ import * as _angular_core from '@angular/core';
2
2
  import { InjectionToken, EnvironmentProviders, OnDestroy } from '@angular/core';
3
3
  import { ClassValue } from 'clsx';
4
4
  import { ExternalToast } from '@shival99/ngx-sonner';
5
+ import { ZIcon } from '@shival99/z-ui/components/z-icon';
5
6
  import * as class_variance_authority_types from 'class-variance-authority/types';
6
7
  import { VariantProps } from 'class-variance-authority';
7
8
 
@@ -32,6 +33,25 @@ interface ZToasterConfig {
32
33
  zDir?: ZToastDir;
33
34
  }
34
35
  declare const Z_TOASTER_DEFAULT_CONFIG: ZToasterConfig;
36
+ interface ZCustomToastAction {
37
+ label: string;
38
+ onClick: (toastId: string | number) => void;
39
+ zType?: 'primary' | 'secondary' | 'outline' | 'text' | 'danger';
40
+ }
41
+ interface ZCustomToastConfig {
42
+ title: string;
43
+ description?: string;
44
+ type?: 'success' | 'error' | 'warning' | 'info' | 'avatar' | 'image' | 'progress' | 'default';
45
+ icon?: string;
46
+ avatarUrl?: string;
47
+ avatarOnline?: boolean;
48
+ avatarBadgeIcon?: string;
49
+ imageUrl?: string;
50
+ progress?: number;
51
+ actions?: ZCustomToastAction[];
52
+ closeable?: boolean;
53
+ toastId?: string | number;
54
+ }
35
55
 
36
56
  declare class ZToastComponent {
37
57
  private readonly _themeService;
@@ -61,6 +81,18 @@ declare class ZToastComponent {
61
81
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZToastComponent, "z-toast, z-toaster", ["zToast"], { "class": { "alias": "class"; "required": false; "isSignal": true; }; "zVariant": { "alias": "zVariant"; "required": false; "isSignal": true; }; "zTheme": { "alias": "zTheme"; "required": false; "isSignal": true; }; "zPosition": { "alias": "zPosition"; "required": false; "isSignal": true; }; "zRichColors": { "alias": "zRichColors"; "required": false; "isSignal": true; }; "zExpand": { "alias": "zExpand"; "required": false; "isSignal": true; }; "zDuration": { "alias": "zDuration"; "required": false; "isSignal": true; }; "zVisibleToasts": { "alias": "zVisibleToasts"; "required": false; "isSignal": true; }; "zCloseButton": { "alias": "zCloseButton"; "required": false; "isSignal": true; }; "zToastOptions": { "alias": "zToastOptions"; "required": false; "isSignal": true; }; "zDir": { "alias": "zDir"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
62
82
  }
63
83
 
84
+ declare class ZToastCustomComponent {
85
+ private readonly _toastService;
86
+ readonly config: _angular_core.InputSignal<ZCustomToastConfig>;
87
+ protected dismiss(): void;
88
+ protected handleAction(action: ZCustomToastAction): void;
89
+ protected getFeaturedIconName(): ZIcon;
90
+ protected getFeaturedIconContainerClasses(): string;
91
+ protected getActionClasses(action: ZCustomToastAction): string;
92
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZToastCustomComponent, never>;
93
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZToastCustomComponent, "z-toast-custom", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
94
+ }
95
+
64
96
  /**
65
97
  * Provides global toast configuration options
66
98
  * Use this in app.config.ts: providers: [provideZToast({ zPosition: 'top-right' })]
@@ -103,6 +135,7 @@ declare class ZToastService implements OnDestroy {
103
135
  info(message: string, options?: ZToastOptions): string | number;
104
136
  loading(message: string, options?: ZToastOptions): string | number;
105
137
  promise<T>(promise: Promise<T>, messages: ZToastPromiseMessages<T>): string | number | undefined;
138
+ custom(config: ZCustomToastConfig, options?: ZToastOptions): string | number;
106
139
  dismiss(toastId?: string | number): void;
107
140
  dismissAll(): void;
108
141
  destroy(): void;
@@ -123,5 +156,5 @@ declare const zToastVariants: (props?: ({
123
156
  } & class_variance_authority_types.ClassProp) | undefined) => string;
124
157
  type ZToastVariants = VariantProps<typeof zToastVariants>;
125
158
 
126
- export { ZToastComponent, ZToastService, Z_TOASTER_CONFIG, Z_TOASTER_DEFAULT_CONFIG, Z_TOAST_DATA, provideZToast, zToastVariants };
127
- export type { ZToastDir, ZToastOptions, ZToastPosition, ZToastPromiseMessages, ZToastTheme, ZToastType, ZToastVariants, ZToasterConfig };
159
+ export { ZToastComponent, ZToastCustomComponent, ZToastService, Z_TOASTER_CONFIG, Z_TOASTER_DEFAULT_CONFIG, Z_TOAST_DATA, provideZToast, zToastVariants };
160
+ export type { ZCustomToastAction, ZCustomToastConfig, ZToastDir, ZToastOptions, ZToastPosition, ZToastPromiseMessages, ZToastTheme, ZToastType, ZToastVariants, ZToasterConfig };