@shival99/z-ui 2.6.6 → 2.6.8

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 (82) hide show
  1. package/assets/css/base.css +16 -16
  2. package/fesm2022/shival99-z-ui-components-z-button-group.mjs +1 -1
  3. package/fesm2022/shival99-z-ui-components-z-button-group.mjs.map +1 -1
  4. package/fesm2022/shival99-z-ui-components-z-calendar.mjs +13 -13
  5. package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
  6. package/fesm2022/shival99-z-ui-components-z-editor.mjs +1 -1
  7. package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -1
  8. package/fesm2022/shival99-z-ui-components-z-menu.mjs +5 -3
  9. package/fesm2022/shival99-z-ui-components-z-menu.mjs.map +1 -1
  10. package/fesm2022/shival99-z-ui-components-z-modal.mjs +6 -7
  11. package/fesm2022/shival99-z-ui-components-z-modal.mjs.map +1 -1
  12. package/fesm2022/shival99-z-ui-components-z-popover.mjs +2 -2
  13. package/fesm2022/shival99-z-ui-components-z-popover.mjs.map +1 -1
  14. package/fesm2022/shival99-z-ui-components-z-select.mjs +3 -2
  15. package/fesm2022/shival99-z-ui-components-z-select.mjs.map +1 -1
  16. package/fesm2022/shival99-z-ui-components-z-toast.mjs +4 -4
  17. package/fesm2022/shival99-z-ui-components-z-toast.mjs.map +1 -1
  18. package/fesm2022/shival99-z-ui-components-z-tooltip.mjs +1 -1
  19. package/fesm2022/shival99-z-ui-components-z-tooltip.mjs.map +1 -1
  20. package/fesm2022/shival99-z-ui-components-z-upload.mjs +3 -2
  21. package/fesm2022/shival99-z-ui-components-z-upload.mjs.map +1 -1
  22. package/fesm2022/shival99-z-ui-utils.mjs +27 -1
  23. package/fesm2022/shival99-z-ui-utils.mjs.map +1 -1
  24. package/package.json +1 -1
  25. package/types/shival99-z-ui-components-z-button-group.d.ts +1 -1
  26. package/types/shival99-z-ui-components-z-menu.d.ts +2 -0
  27. package/types/shival99-z-ui-components-z-modal.d.ts +1 -1
  28. package/types/shival99-z-ui-components-z-select.d.ts +1 -0
  29. package/types/shival99-z-ui-components-z-upload.d.ts +1 -0
  30. package/types/shival99-z-ui-utils.d.ts +8 -2
  31. package/.npmignore +0 -58
  32. package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs +0 -1215
  33. package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs.map +0 -1
  34. package/fesm2022/shival99-z-ui-components-z-drawer.mjs +0 -994
  35. package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +0 -1
  36. package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs +0 -99
  37. package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs.map +0 -1
  38. package/fesm2022/shival99-z-ui-components-z-filter.mjs +0 -962
  39. package/fesm2022/shival99-z-ui-components-z-filter.mjs.map +0 -1
  40. package/fesm2022/shival99-z-ui-components-z-number-ticker.mjs +0 -352
  41. package/fesm2022/shival99-z-ui-components-z-number-ticker.mjs.map +0 -1
  42. package/fesm2022/shival99-z-ui-components-z-pagination.mjs +0 -179
  43. package/fesm2022/shival99-z-ui-components-z-pagination.mjs.map +0 -1
  44. package/fesm2022/shival99-z-ui-components-z-qrcode.mjs +0 -429
  45. package/fesm2022/shival99-z-ui-components-z-qrcode.mjs.map +0 -1
  46. package/fesm2022/shival99-z-ui-components-z-radio.mjs +0 -183
  47. package/fesm2022/shival99-z-ui-components-z-radio.mjs.map +0 -1
  48. package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs +0 -143
  49. package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs.map +0 -1
  50. package/fesm2022/shival99-z-ui-components-z-show-more.mjs +0 -138
  51. package/fesm2022/shival99-z-ui-components-z-show-more.mjs.map +0 -1
  52. package/fesm2022/shival99-z-ui-components-z-skeleton-auto.mjs +0 -80
  53. package/fesm2022/shival99-z-ui-components-z-skeleton-auto.mjs.map +0 -1
  54. package/fesm2022/shival99-z-ui-components-z-steps.mjs +0 -420
  55. package/fesm2022/shival99-z-ui-components-z-steps.mjs.map +0 -1
  56. package/fesm2022/shival99-z-ui-components-z-table.mjs +0 -11471
  57. package/fesm2022/shival99-z-ui-components-z-table.mjs.map +0 -1
  58. package/fesm2022/shival99-z-ui-components-z-tabs.mjs +0 -1102
  59. package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +0 -1
  60. package/fesm2022/shival99-z-ui-components-z-tags.mjs +0 -364
  61. package/fesm2022/shival99-z-ui-components-z-tags.mjs.map +0 -1
  62. package/fesm2022/shival99-z-ui-components-z-timeline.mjs +0 -254
  63. package/fesm2022/shival99-z-ui-components-z-timeline.mjs.map +0 -1
  64. package/fesm2022/shival99-z-ui-services-excel.mjs +0 -672
  65. package/fesm2022/shival99-z-ui-services-excel.mjs.map +0 -1
  66. package/types/shival99-z-ui-components-z-autocomplete.d.ts +0 -299
  67. package/types/shival99-z-ui-components-z-drawer.d.ts +0 -301
  68. package/types/shival99-z-ui-components-z-dropdown-menu.d.ts +0 -52
  69. package/types/shival99-z-ui-components-z-filter.d.ts +0 -285
  70. package/types/shival99-z-ui-components-z-number-ticker.d.ts +0 -110
  71. package/types/shival99-z-ui-components-z-pagination.d.ts +0 -55
  72. package/types/shival99-z-ui-components-z-qrcode.d.ts +0 -79
  73. package/types/shival99-z-ui-components-z-radio.d.ts +0 -69
  74. package/types/shival99-z-ui-components-z-scrollarea.d.ts +0 -46
  75. package/types/shival99-z-ui-components-z-show-more.d.ts +0 -36
  76. package/types/shival99-z-ui-components-z-skeleton-auto.d.ts +0 -35
  77. package/types/shival99-z-ui-components-z-steps.d.ts +0 -106
  78. package/types/shival99-z-ui-components-z-table.d.ts +0 -2413
  79. package/types/shival99-z-ui-components-z-tabs.d.ts +0 -196
  80. package/types/shival99-z-ui-components-z-tags.d.ts +0 -127
  81. package/types/shival99-z-ui-components-z-timeline.d.ts +0 -71
  82. package/types/shival99-z-ui-services-excel.d.ts +0 -36
@@ -86,46 +86,46 @@ body {
86
86
  /* ==================== Utility Classes ==================== */
87
87
 
88
88
  @layer utilities {
89
- .shadow-0,
90
- .shadow-1,
91
- .shadow-2,
92
- .shadow-3,
93
- .shadow-card,
94
- .shadow-card-md,
95
- .shadow-card-lg,
96
- .shadow-card-soft {
89
+ :where(.shadow-0),
90
+ :where(.shadow-1),
91
+ :where(.shadow-2),
92
+ :where(.shadow-3),
93
+ :where(.shadow-card),
94
+ :where(.shadow-card-md),
95
+ :where(.shadow-card-lg),
96
+ :where(.shadow-card-soft) {
97
97
  --tw-shadow-color: initial;
98
98
  }
99
99
 
100
- .shadow-0 {
100
+ :where(.shadow-0) {
101
101
  box-shadow: var(--shadow-0);
102
102
  }
103
103
 
104
- .shadow-1 {
104
+ :where(.shadow-1) {
105
105
  box-shadow: var(--shadow-1);
106
106
  }
107
107
 
108
- .shadow-2 {
108
+ :where(.shadow-2) {
109
109
  box-shadow: var(--shadow-2);
110
110
  }
111
111
 
112
- .shadow-3 {
112
+ :where(.shadow-3) {
113
113
  box-shadow: var(--shadow-3);
114
114
  }
115
115
 
116
- .shadow-card {
116
+ :where(.shadow-card) {
117
117
  box-shadow: var(--shadow-card);
118
118
  }
119
119
 
120
- .shadow-card-md {
120
+ :where(.shadow-card-md) {
121
121
  box-shadow: var(--shadow-card-md);
122
122
  }
123
123
 
124
- .shadow-card-lg {
124
+ :where(.shadow-card-lg) {
125
125
  box-shadow: var(--shadow-card-lg);
126
126
  }
127
127
 
128
- .shadow-card-soft {
128
+ :where(.shadow-card-soft) {
129
129
  box-shadow: var(--shadow-card-soft);
130
130
  }
131
131
  }
@@ -9,7 +9,7 @@ class ZButtonGroupItemDirective {
9
9
  _group = inject(Z_BUTTON_GROUP, { optional: true });
10
10
  _index = signal(-1, /* @ts-ignore */
11
11
  ...(ngDevMode ? [{ debugName: "_index" }] : /* istanbul ignore next */ []));
12
- /** Khóa ổn định tùy chọn, ưu tiên hơn index khi xác định active. */
12
+ /** Stable option key; takes precedence over the index when resolving the active item. */
13
13
  zValue = input(/* @ts-ignore */
14
14
  ...(ngDevMode ? [undefined, { debugName: "zValue" }] : /* istanbul ignore next */ []));
15
15
  _value = computed(() => this.zValue() ?? this._index(), /* @ts-ignore */
@@ -1 +1 @@
1
- {"version":3,"file":"shival99-z-ui-components-z-button-group.mjs","sources":["../../../../libs/core-ui/components/z-button-group/z-button-group.define.ts","../../../../libs/core-ui/components/z-button-group/z-button-group-item.directive.ts","../../../../libs/core-ui/components/z-button-group/z-button-group.variants.ts","../../../../libs/core-ui/components/z-button-group/z-button-group-separator.component.ts","../../../../libs/core-ui/components/z-button-group/z-button-group.component.ts","../../../../libs/core-ui/components/z-button-group/shival99-z-ui-components-z-button-group.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport type { ZButtonGroupHost } from './z-button-group.types';\n\nexport const Z_BUTTON_GROUP = new InjectionToken<ZButtonGroupHost>('Z_BUTTON_GROUP');\n","import { computed, Directive, inject, input, signal } from '@angular/core';\nimport { Z_BUTTON_GROUP } from './z-button-group.define';\nimport type { ZButtonGroupValue } from './z-button-group.types';\n\n@Directive({\n selector: '[z-button-group-item]',\n standalone: true,\n host: {\n '[class.z-button-group-item-active]': 'isActive()',\n '(click)': 'onClick()',\n },\n exportAs: 'zButtonGroupItem',\n})\nexport class ZButtonGroupItemDirective {\n private readonly _group = inject(Z_BUTTON_GROUP, { optional: true });\n private readonly _index = signal<number>(-1);\n\n /** Khóa ổn định tùy chọn, ưu tiên hơn index khi xác định active. */\n public readonly zValue = input<ZButtonGroupValue>();\n\n private readonly _value = computed<ZButtonGroupValue>(() => this.zValue() ?? this._index());\n\n public readonly isActive = computed(() => {\n if (!this._group) {\n return false;\n }\n return this._group._isItemActive(this._value());\n });\n\n public readonly index = this._index.asReadonly();\n public _setIndex(index: number): void {\n this._index.set(index);\n }\n\n protected onClick(): void {\n if (!this._group) {\n return;\n }\n this._group._selectItem(this._value(), this._index());\n }\n}\n","import { cva } from 'class-variance-authority';\n\nexport const zButtonGroupVariants = cva('inline-flex h-fit', {\n variants: {\n zOrientation: {\n horizontal: [\n 'flex-row',\n 'items-center',\n // First child - only left border radius\n '[&>*:first-child]:rounded-r-none!',\n // Last child - only right border radius\n '[&>*:last-child]:rounded-l-none!',\n // Middle children - no border radius\n '[&>*:not(:first-child):not(:last-child)]:rounded-none!',\n // Remove double borders between buttons\n '[&>*:not(:first-child)]:border-l-0!',\n // Handle single child\n '[&>*:only-child]:rounded-lg!',\n '[&>*:only-child]:border-l!',\n // Active item styling - use primary color from theme\n '[&>*.z-button-group-item-active]:bg-primary',\n '[&>*.z-button-group-item-active]:text-primary-foreground',\n '[&>*.z-button-group-item-active]:border-primary',\n '[&>*.z-button-group-item-active]:z-[1]',\n ],\n vertical: [\n 'flex-col',\n 'items-stretch',\n // First child - only top border radius\n '[&>*:first-child]:rounded-b-none!',\n // Last child - only bottom border radius\n '[&>*:last-child]:rounded-t-none!',\n // Middle children - no border radius\n '[&>*:not(:first-child):not(:last-child)]:rounded-none!',\n // Remove double borders between buttons\n '[&>*:not(:first-child)]:border-t-0!',\n // Handle single child\n '[&>*:only-child]:rounded-lg!',\n '[&>*:only-child]:border-t!',\n // Active item styling - use primary color from theme\n '[&>*.z-button-group-item-active]:bg-primary',\n '[&>*.z-button-group-item-active]:text-primary-foreground',\n '[&>*.z-button-group-item-active]:border-primary',\n '[&>*.z-button-group-item-active]:z-[1]',\n ],\n },\n },\n defaultVariants: {\n zOrientation: 'horizontal',\n },\n});\n\nexport const zButtonGroupSeparatorVariants = cva('shrink-0 bg-border', {\n variants: {\n zOrientation: {\n horizontal: 'h-full w-px',\n vertical: 'w-full h-px',\n },\n },\n defaultVariants: {\n zOrientation: 'horizontal',\n },\n});\n","import { ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from '@angular/core';\nimport { zMergeClasses } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\nimport type { ZButtonGroupSeparatorVariants } from './z-button-group.types';\nimport { zButtonGroupSeparatorVariants } from './z-button-group.variants';\n\n@Component({\n selector: 'z-button-group-separator',\n standalone: true,\n template: ``,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'separator',\n '[class]': 'zClasses()',\n },\n exportAs: 'zButtonGroupSeparator',\n})\nexport class ZButtonGroupSeparatorComponent {\n public readonly zClass = input<ClassValue>('');\n public readonly zOrientation = input<ZButtonGroupSeparatorVariants['zOrientation']>('horizontal');\n\n protected readonly zClasses = computed(() =>\n zMergeClasses(\n zButtonGroupSeparatorVariants({\n zOrientation: this.zOrientation(),\n }),\n this.zClass()\n )\n );\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChildren,\n effect,\n input,\n model,\n output,\n ViewEncapsulation,\n} from '@angular/core';\nimport { zMergeClasses } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\nimport { ZButtonGroupItemDirective } from './z-button-group-item.directive';\nimport { Z_BUTTON_GROUP } from './z-button-group.define';\nimport { type ZButtonGroupHost, type ZButtonGroupValue, type ZButtonGroupVariants } from './z-button-group.types';\nimport { zButtonGroupVariants } from './z-button-group.variants';\n\n@Component({\n selector: 'z-button-group',\n standalone: true,\n template: `\n <ng-content />\n `,\n providers: [\n {\n provide: Z_BUTTON_GROUP,\n useExisting: ZButtonGroupComponent,\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'group',\n '[class]': 'zClasses()',\n },\n exportAs: 'zButtonGroup',\n})\nexport class ZButtonGroupComponent implements ZButtonGroupHost {\n public readonly zClass = input<ClassValue>('');\n public readonly zOrientation = input<ZButtonGroupVariants['zOrientation']>('horizontal');\n\n public readonly zActive = model<ZButtonGroupValue | null>(null);\n public readonly zActiveIndexChange = output<number | null>();\n public readonly zActiveValueChange = output<ZButtonGroupValue | null>();\n private readonly _items = contentChildren(ZButtonGroupItemDirective);\n\n protected readonly zClasses = computed(() =>\n zMergeClasses(\n zButtonGroupVariants({\n zOrientation: this.zOrientation(),\n }),\n this.zClass()\n )\n );\n\n constructor() {\n effect(() => {\n const items = this._items();\n items.forEach((item, index) => {\n item._setIndex(index);\n });\n });\n }\n\n public _selectItem(value: ZButtonGroupValue, index: number): void {\n const newValue = this.zActive() === value ? null : value;\n this.zActive.set(newValue);\n this.zActiveIndexChange.emit(newValue === null ? null : index);\n this.zActiveValueChange.emit(newValue);\n }\n\n public _isItemActive(value: ZButtonGroupValue): boolean {\n return this.zActive() === value;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAGa,cAAc,GAAG,IAAI,cAAc,CAAmB,gBAAgB;;MCUtE,yBAAyB,CAAA;IACnB,MAAM,GAAG,MAAM,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACnD,IAAA,MAAM,GAAG,MAAM,CAAS,CAAC,CAAC;+EAAC;;AAG5B,IAAA,MAAM,GAAG,KAAK;0FAAqB;AAElC,IAAA,MAAM,GAAG,QAAQ,CAAoB,MAAM,IAAI,CAAC,MAAM,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE;+EAAC;AAE3E,IAAA,QAAQ,GAAG,QAAQ,CAAC,MAAK;AACvC,QAAA,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;AAChB,YAAA,OAAO,KAAK;QACd;QACA,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;IACjD,CAAC;iFAAC;AAEc,IAAA,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;AACzC,IAAA,SAAS,CAAC,KAAa,EAAA;AAC5B,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;IACxB;IAEU,OAAO,GAAA;AACf,QAAA,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB;QACF;AACA,QAAA,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CA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EG;;"}
1
+ {"version":3,"file":"shival99-z-ui-components-z-button-group.mjs","sources":["../../../../libs/core-ui/components/z-button-group/z-button-group.define.ts","../../../../libs/core-ui/components/z-button-group/z-button-group-item.directive.ts","../../../../libs/core-ui/components/z-button-group/z-button-group.variants.ts","../../../../libs/core-ui/components/z-button-group/z-button-group-separator.component.ts","../../../../libs/core-ui/components/z-button-group/z-button-group.component.ts","../../../../libs/core-ui/components/z-button-group/shival99-z-ui-components-z-button-group.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport type { ZButtonGroupHost } from './z-button-group.types';\n\nexport const Z_BUTTON_GROUP = new InjectionToken<ZButtonGroupHost>('Z_BUTTON_GROUP');\n","import { computed, Directive, inject, input, signal } from '@angular/core';\nimport { Z_BUTTON_GROUP } from './z-button-group.define';\nimport type { ZButtonGroupValue } from './z-button-group.types';\n\n@Directive({\n selector: '[z-button-group-item]',\n standalone: true,\n host: {\n '[class.z-button-group-item-active]': 'isActive()',\n '(click)': 'onClick()',\n },\n exportAs: 'zButtonGroupItem',\n})\nexport class ZButtonGroupItemDirective {\n private readonly _group = inject(Z_BUTTON_GROUP, { optional: true });\n private readonly _index = signal<number>(-1);\n\n /** Stable option key; takes precedence over the index when resolving the active item. */\n public readonly zValue = input<ZButtonGroupValue>();\n\n private readonly _value = computed<ZButtonGroupValue>(() => this.zValue() ?? this._index());\n\n public readonly isActive = computed(() => {\n if (!this._group) {\n return false;\n }\n return this._group._isItemActive(this._value());\n });\n\n public readonly index = this._index.asReadonly();\n public _setIndex(index: number): void {\n this._index.set(index);\n }\n\n protected onClick(): void {\n if (!this._group) {\n return;\n }\n this._group._selectItem(this._value(), this._index());\n }\n}\n","import { cva } from 'class-variance-authority';\n\nexport const zButtonGroupVariants = cva('inline-flex h-fit', {\n variants: {\n zOrientation: {\n horizontal: [\n 'flex-row',\n 'items-center',\n // First child - only left border radius\n '[&>*:first-child]:rounded-r-none!',\n // Last child - only right border radius\n '[&>*:last-child]:rounded-l-none!',\n // Middle children - no border radius\n '[&>*:not(:first-child):not(:last-child)]:rounded-none!',\n // Remove double borders between buttons\n '[&>*:not(:first-child)]:border-l-0!',\n // Handle single child\n '[&>*:only-child]:rounded-lg!',\n '[&>*:only-child]:border-l!',\n // Active item styling - use primary color from theme\n '[&>*.z-button-group-item-active]:bg-primary',\n '[&>*.z-button-group-item-active]:text-primary-foreground',\n '[&>*.z-button-group-item-active]:border-primary',\n '[&>*.z-button-group-item-active]:z-[1]',\n ],\n vertical: [\n 'flex-col',\n 'items-stretch',\n // First child - only top border radius\n '[&>*:first-child]:rounded-b-none!',\n // Last child - only bottom border radius\n '[&>*:last-child]:rounded-t-none!',\n // Middle children - no border radius\n '[&>*:not(:first-child):not(:last-child)]:rounded-none!',\n // Remove double borders between buttons\n '[&>*:not(:first-child)]:border-t-0!',\n // Handle single child\n '[&>*:only-child]:rounded-lg!',\n '[&>*:only-child]:border-t!',\n // Active item styling - use primary color from theme\n '[&>*.z-button-group-item-active]:bg-primary',\n '[&>*.z-button-group-item-active]:text-primary-foreground',\n '[&>*.z-button-group-item-active]:border-primary',\n '[&>*.z-button-group-item-active]:z-[1]',\n ],\n },\n },\n defaultVariants: {\n zOrientation: 'horizontal',\n },\n});\n\nexport const zButtonGroupSeparatorVariants = cva('shrink-0 bg-border', {\n variants: {\n zOrientation: {\n horizontal: 'h-full w-px',\n vertical: 'w-full h-px',\n },\n },\n defaultVariants: {\n zOrientation: 'horizontal',\n },\n});\n","import { ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from '@angular/core';\nimport { zMergeClasses } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\nimport type { ZButtonGroupSeparatorVariants } from './z-button-group.types';\nimport { zButtonGroupSeparatorVariants } from './z-button-group.variants';\n\n@Component({\n selector: 'z-button-group-separator',\n standalone: true,\n template: ``,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'separator',\n '[class]': 'zClasses()',\n },\n exportAs: 'zButtonGroupSeparator',\n})\nexport class ZButtonGroupSeparatorComponent {\n public readonly zClass = input<ClassValue>('');\n public readonly zOrientation = input<ZButtonGroupSeparatorVariants['zOrientation']>('horizontal');\n\n protected readonly zClasses = computed(() =>\n zMergeClasses(\n zButtonGroupSeparatorVariants({\n zOrientation: this.zOrientation(),\n }),\n this.zClass()\n )\n );\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChildren,\n effect,\n input,\n model,\n output,\n ViewEncapsulation,\n} from '@angular/core';\nimport { zMergeClasses } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\nimport { ZButtonGroupItemDirective } from './z-button-group-item.directive';\nimport { Z_BUTTON_GROUP } from './z-button-group.define';\nimport { type ZButtonGroupHost, type ZButtonGroupValue, type ZButtonGroupVariants } from './z-button-group.types';\nimport { zButtonGroupVariants } from './z-button-group.variants';\n\n@Component({\n selector: 'z-button-group',\n standalone: true,\n template: `\n <ng-content />\n `,\n providers: [\n {\n provide: Z_BUTTON_GROUP,\n useExisting: ZButtonGroupComponent,\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'group',\n '[class]': 'zClasses()',\n },\n exportAs: 'zButtonGroup',\n})\nexport class ZButtonGroupComponent implements ZButtonGroupHost {\n public readonly zClass = input<ClassValue>('');\n public readonly zOrientation = input<ZButtonGroupVariants['zOrientation']>('horizontal');\n\n public readonly zActive = model<ZButtonGroupValue | null>(null);\n public readonly zActiveIndexChange = output<number | null>();\n public readonly zActiveValueChange = output<ZButtonGroupValue | null>();\n private readonly _items = contentChildren(ZButtonGroupItemDirective);\n\n protected readonly zClasses = computed(() =>\n zMergeClasses(\n zButtonGroupVariants({\n zOrientation: this.zOrientation(),\n }),\n this.zClass()\n )\n );\n\n constructor() {\n effect(() => {\n const items = this._items();\n items.forEach((item, index) => {\n item._setIndex(index);\n });\n });\n }\n\n public _selectItem(value: ZButtonGroupValue, index: number): void {\n const newValue = this.zActive() === value ? null : value;\n this.zActive.set(newValue);\n this.zActiveIndexChange.emit(newValue === null ? null : index);\n this.zActiveValueChange.emit(newValue);\n }\n\n public _isItemActive(value: ZButtonGroupValue): boolean {\n return this.zActive() === value;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAGa,cAAc,GAAG,IAAI,cAAc,CAAmB,gBAAgB;;MCUtE,yBAAyB,CAAA;IACnB,MAAM,GAAG,MAAM,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACnD,IAAA,MAAM,GAAG,MAAM,CAAS,CAAC,CAAC;+EAAC;;AAG5B,IAAA,MAAM,GAAG,KAAK;0FAAqB;AAElC,IAAA,MAAM,GAAG,QAAQ,CAAoB,MAAM,IAAI,CAAC,MAAM,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE;+EAAC;AAE3E,IAAA,QAAQ,GAAG,QAAQ,CAAC,MAAK;AACvC,QAAA,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;AAChB,YAAA,OAAO,KAAK;QACd;QACA,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;IACjD,CAAC;iFAAC;AAEc,IAAA,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;AACzC,IAAA,SAAS,CAAC,KAAa,EAAA;AAC5B,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;IACxB;IAEU,OAAO,GAAA;AACf,QAAA,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB;QACF;AACA,QAAA,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;IACvD;uGA1BW,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA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AAA;AACE,gBAAA,OAAO,EAAE,cAAc;AACvB,gBAAA,WAAW,EAAE,qBAAqB;AACnC,aAAA;AACF,SAAA,EAAA,OAAA,EAAA,CAAA,EAAA,YAAA,EAAA,QAAA,EAAA,SAAA,EAgByC,yBAAyB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,cAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAxBzD;;AAET,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAeU,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBApBjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE;;AAET,EAAA,CAAA;AACD,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,cAAc;AACvB,4BAAA,WAAW,EAAA,qBAAuB;AACnC,yBAAA;AACF,qBAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;AACrC,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,SAAS,EAAE,YAAY;AACxB,qBAAA;AACD,oBAAA,QAAQ,EAAE,cAAc;AACzB,iBAAA;0lBAQ2C,yBAAyB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC7CrE;;AAEG;;"}
@@ -1711,7 +1711,7 @@ class ZCalendarComponent {
1711
1711
  let end = null;
1712
1712
  const valStart = range['start'];
1713
1713
  const valEnd = range['end'];
1714
- // Tự động phân tích giá trị start nếu là chuỗi ISO hoặc định dạng thông thường
1714
+ // Parse the start value when it is an ISO string or a supported date format.
1715
1715
  if (valStart instanceof Date) {
1716
1716
  start = valStart;
1717
1717
  }
@@ -1725,7 +1725,7 @@ class ZCalendarComponent {
1725
1725
  start = parseDate(valStart, this.zFormat(), this.zLocale());
1726
1726
  }
1727
1727
  }
1728
- // Tự động phân tích giá trị end nếu là chuỗi ISO hoặc định dạng thông thường
1728
+ // Parse the end value when it is an ISO string or a supported date format.
1729
1729
  if (valEnd instanceof Date) {
1730
1730
  end = valEnd;
1731
1731
  }
@@ -1765,7 +1765,7 @@ class ZCalendarComponent {
1765
1765
  if (value instanceof Date) {
1766
1766
  date = value;
1767
1767
  }
1768
- // Tự động phân tích chuỗi ISO của single mode (hữu ích khi nhận giá trị thô từ API)
1768
+ // Parse ISO strings in single mode when values come directly from an API.
1769
1769
  if (!date && typeof value === 'string') {
1770
1770
  const isIsoLike = /^\d{4}-\d{2}-\d{2}/.test(value);
1771
1771
  date = valueType === 'iso' || isIsoLike ? fromISOString(value) : parseDate(value, this.zFormat(), this.zLocale());
@@ -2106,7 +2106,7 @@ class ZCalendarComponent {
2106
2106
  }
2107
2107
  }
2108
2108
  if (matchedToken) {
2109
- // Tách các token thành các loại tương ứng
2109
+ // Classify each format token.
2110
2110
  if (matchedToken === 'A' || matchedToken === 'a') {
2111
2111
  segments.push({ type: 'period', value: matchedToken });
2112
2112
  }
@@ -2129,12 +2129,12 @@ class ZCalendarComponent {
2129
2129
  return segments;
2130
2130
  }
2131
2131
  _formatValueOnTyping(value, format) {
2132
- // Không tự động format cho các định dạng tên tháng (như Tháng 6, June)
2132
+ // Do not auto-format formats that contain month names.
2133
2133
  if (format.includes('MMM') || format.includes('MMMM')) {
2134
2134
  return value;
2135
2135
  }
2136
2136
  const digitsCount = value.replace(/\D/g, '').length;
2137
- // Nếu không có chữ số nào (ví dụ đang nhập chữ 'invalid-date'), trả về giá trị gốc để không xóa trắng textbox
2137
+ // Keep non-numeric input intact so validation can report it instead of clearing the field.
2138
2138
  if (digitsCount === 0) {
2139
2139
  return value;
2140
2140
  }
@@ -2147,7 +2147,7 @@ class ZCalendarComponent {
2147
2147
  if (seg.type === 'digit') {
2148
2148
  let group = userGroups[groupIndex] || '';
2149
2149
  groupIndex++;
2150
- // Bỏ qua các nhóm không phải là chữ số khi cần khớp với segment dạng số
2150
+ // Skip non-numeric groups when matching a numeric segment.
2151
2151
  while (group && !/^\d+$/.test(group)) {
2152
2152
  group = userGroups[groupIndex] || '';
2153
2153
  groupIndex++;
@@ -2155,17 +2155,17 @@ class ZCalendarComponent {
2155
2155
  if (!group) {
2156
2156
  break;
2157
2157
  }
2158
- // Giới hạn chiều dài của nhóm số theo định nghĩa segment
2158
+ // Limit the numeric group to the segment length.
2159
2159
  const len = seg.value.length;
2160
2160
  const clampedGroup = group.slice(0, len);
2161
2161
  result += clampedGroup;
2162
- // Nếu nhóm số đã nhập đủ độ dài segment, tự động chèn separator tiếp theo
2162
+ // Insert the next separator once the numeric segment is complete.
2163
2163
  if (clampedGroup.length === len) {
2164
2164
  const nextSeg = segments[i + 1];
2165
2165
  if (nextSeg && nextSeg.type === 'literal') {
2166
2166
  result += nextSeg.value;
2167
2167
  i++;
2168
- // Nếu người dùng đã gõ separator này rồi thì bỏ qua không lặp lại
2168
+ // Do not duplicate a separator the user already typed.
2169
2169
  const nextGroup = userGroups[groupIndex];
2170
2170
  if (nextGroup && !/^[a-zA-Z0-9]+$/.test(nextGroup)) {
2171
2171
  groupIndex++;
@@ -2282,13 +2282,13 @@ class ZCalendarComponent {
2282
2282
  return false;
2283
2283
  }
2284
2284
  _clampInputDateString(value, format) {
2285
- // Không tự động clamp đối với các định dạng chữ chứa tên tháng
2285
+ // Do not clamp formats that contain month names.
2286
2286
  if (format.includes('MMM') || format.includes('MMMM')) {
2287
2287
  return value;
2288
2288
  }
2289
2289
  const trimmed = value.trim();
2290
2290
  const digitsCount = trimmed.replace(/\D/g, '').length;
2291
- // Nếu không có chữ số nào, trả về giá trị gốc để validation phát hiện lỗi và revert
2291
+ // Keep non-numeric input intact so validation can report and revert it.
2292
2292
  if (digitsCount === 0) {
2293
2293
  return value;
2294
2294
  }
@@ -2407,7 +2407,7 @@ class ZCalendarComponent {
2407
2407
  }
2408
2408
  result += seg.value;
2409
2409
  }
2410
- // Khôi phục AM/PM ở đuôi chuỗi nếu bị mất sau khi clamp
2410
+ // Restore a trailing AM/PM marker if clamping removed it.
2411
2411
  const isPM = /PM/i.test(trimmed);
2412
2412
  const isAM = /AM/i.test(trimmed);
2413
2413
  if ((isPM || isAM) && !/am|pm/i.test(result)) {