@shival99/z-ui 1.0.1 → 1.0.3

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 (115) hide show
  1. package/README.md +50 -77
  2. package/assets/css/animations.css +207 -0
  3. package/assets/css/base.css +76 -0
  4. package/assets/css/tailwind.css +53 -0
  5. package/assets/css/themes/gray.css +73 -0
  6. package/assets/css/themes/green.css +75 -0
  7. package/assets/css/themes/hospital.css +79 -0
  8. package/assets/css/themes/neutral.css +73 -0
  9. package/assets/css/themes/orange.css +73 -0
  10. package/assets/css/themes/slate.css +73 -0
  11. package/assets/css/themes/stone.css +73 -0
  12. package/assets/css/themes/violet.css +73 -0
  13. package/assets/css/themes/zinc.css +73 -0
  14. package/assets/images/avatar.svg +6 -0
  15. package/assets/images/logo.svg +6 -0
  16. package/fesm2022/shival99-z-ui-components-z-accordion.mjs +148 -0
  17. package/fesm2022/shival99-z-ui-components-z-accordion.mjs.map +1 -0
  18. package/fesm2022/shival99-z-ui-components-z-breadcrumb.mjs +74 -0
  19. package/fesm2022/shival99-z-ui-components-z-breadcrumb.mjs.map +1 -0
  20. package/fesm2022/shival99-z-ui-components-z-button.mjs +155 -0
  21. package/fesm2022/shival99-z-ui-components-z-button.mjs.map +1 -0
  22. package/fesm2022/shival99-z-ui-components-z-calendar.mjs +2335 -0
  23. package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -0
  24. package/fesm2022/shival99-z-ui-components-z-checkbox.mjs +240 -0
  25. package/fesm2022/shival99-z-ui-components-z-checkbox.mjs.map +1 -0
  26. package/fesm2022/shival99-z-ui-components-z-code.mjs +139 -0
  27. package/fesm2022/shival99-z-ui-components-z-code.mjs.map +1 -0
  28. package/fesm2022/shival99-z-ui-components-z-drawer.mjs +664 -0
  29. package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -0
  30. package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs +55 -0
  31. package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs.map +1 -0
  32. package/fesm2022/shival99-z-ui-components-z-editor.mjs +411 -0
  33. package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -0
  34. package/fesm2022/shival99-z-ui-components-z-filter.mjs +794 -0
  35. package/fesm2022/shival99-z-ui-components-z-filter.mjs.map +1 -0
  36. package/fesm2022/shival99-z-ui-components-z-icon.mjs +451 -0
  37. package/fesm2022/shival99-z-ui-components-z-icon.mjs.map +1 -0
  38. package/fesm2022/shival99-z-ui-components-z-input.mjs +804 -0
  39. package/fesm2022/shival99-z-ui-components-z-input.mjs.map +1 -0
  40. package/fesm2022/shival99-z-ui-components-z-loading.mjs +105 -0
  41. package/fesm2022/shival99-z-ui-components-z-loading.mjs.map +1 -0
  42. package/fesm2022/shival99-z-ui-components-z-menu.mjs +351 -0
  43. package/fesm2022/shival99-z-ui-components-z-menu.mjs.map +1 -0
  44. package/fesm2022/shival99-z-ui-components-z-modal.mjs +722 -0
  45. package/fesm2022/shival99-z-ui-components-z-modal.mjs.map +1 -0
  46. package/fesm2022/shival99-z-ui-components-z-pagination.mjs +131 -0
  47. package/fesm2022/shival99-z-ui-components-z-pagination.mjs.map +1 -0
  48. package/fesm2022/shival99-z-ui-components-z-popover.mjs +917 -0
  49. package/fesm2022/shival99-z-ui-components-z-popover.mjs.map +1 -0
  50. package/fesm2022/shival99-z-ui-components-z-radio.mjs +154 -0
  51. package/fesm2022/shival99-z-ui-components-z-radio.mjs.map +1 -0
  52. package/fesm2022/shival99-z-ui-components-z-select.mjs +998 -0
  53. package/fesm2022/shival99-z-ui-components-z-select.mjs.map +1 -0
  54. package/fesm2022/shival99-z-ui-components-z-skeleton.mjs +139 -0
  55. package/fesm2022/shival99-z-ui-components-z-skeleton.mjs.map +1 -0
  56. package/fesm2022/shival99-z-ui-components-z-switch.mjs +127 -0
  57. package/fesm2022/shival99-z-ui-components-z-switch.mjs.map +1 -0
  58. package/fesm2022/shival99-z-ui-components-z-table.mjs +2628 -0
  59. package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -0
  60. package/fesm2022/shival99-z-ui-components-z-tabs.mjs +259 -0
  61. package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -0
  62. package/fesm2022/shival99-z-ui-components-z-timeline.mjs +335 -0
  63. package/fesm2022/shival99-z-ui-components-z-timeline.mjs.map +1 -0
  64. package/fesm2022/shival99-z-ui-components-z-toast.mjs +93 -0
  65. package/fesm2022/shival99-z-ui-components-z-toast.mjs.map +1 -0
  66. package/fesm2022/shival99-z-ui-components-z-tooltip.mjs +660 -0
  67. package/fesm2022/shival99-z-ui-components-z-tooltip.mjs.map +1 -0
  68. package/fesm2022/shival99-z-ui-components-z-upload.mjs +504 -0
  69. package/fesm2022/shival99-z-ui-components-z-upload.mjs.map +1 -0
  70. package/fesm2022/shival99-z-ui-i18n.mjs +258 -0
  71. package/fesm2022/shival99-z-ui-i18n.mjs.map +1 -0
  72. package/fesm2022/shival99-z-ui-pipes.mjs +116 -0
  73. package/fesm2022/shival99-z-ui-pipes.mjs.map +1 -0
  74. package/fesm2022/shival99-z-ui-providers.mjs +203 -0
  75. package/fesm2022/shival99-z-ui-providers.mjs.map +1 -0
  76. package/fesm2022/shival99-z-ui-services.mjs +919 -0
  77. package/fesm2022/shival99-z-ui-services.mjs.map +1 -0
  78. package/fesm2022/shival99-z-ui-utils.mjs +591 -0
  79. package/fesm2022/shival99-z-ui-utils.mjs.map +1 -0
  80. package/fesm2022/z-ui.mjs +3 -19924
  81. package/fesm2022/z-ui.mjs.map +1 -1
  82. package/package.json +132 -4
  83. package/types/shival99-z-ui-components-z-accordion.d.ts +55 -0
  84. package/types/shival99-z-ui-components-z-breadcrumb.d.ts +36 -0
  85. package/types/shival99-z-ui-components-z-button.d.ts +41 -0
  86. package/types/shival99-z-ui-components-z-calendar.d.ts +300 -0
  87. package/types/shival99-z-ui-components-z-checkbox.d.ts +84 -0
  88. package/types/shival99-z-ui-components-z-code.d.ts +35 -0
  89. package/types/shival99-z-ui-components-z-drawer.d.ts +232 -0
  90. package/types/shival99-z-ui-components-z-dropdown-menu.d.ts +50 -0
  91. package/types/shival99-z-ui-components-z-editor.d.ts +115 -0
  92. package/types/shival99-z-ui-components-z-filter.d.ts +268 -0
  93. package/types/shival99-z-ui-components-z-icon.d.ts +291 -0
  94. package/types/shival99-z-ui-components-z-input.d.ts +188 -0
  95. package/types/shival99-z-ui-components-z-loading.d.ts +46 -0
  96. package/types/shival99-z-ui-components-z-menu.d.ts +116 -0
  97. package/types/shival99-z-ui-components-z-modal.d.ts +270 -0
  98. package/types/shival99-z-ui-components-z-pagination.d.ts +52 -0
  99. package/types/shival99-z-ui-components-z-popover.d.ts +134 -0
  100. package/types/shival99-z-ui-components-z-radio.d.ts +63 -0
  101. package/types/shival99-z-ui-components-z-select.d.ts +268 -0
  102. package/types/shival99-z-ui-components-z-skeleton.d.ts +55 -0
  103. package/types/shival99-z-ui-components-z-switch.d.ts +48 -0
  104. package/types/shival99-z-ui-components-z-table.d.ts +482 -0
  105. package/types/shival99-z-ui-components-z-tabs.d.ts +75 -0
  106. package/types/shival99-z-ui-components-z-timeline.d.ts +98 -0
  107. package/types/shival99-z-ui-components-z-toast.d.ts +61 -0
  108. package/types/shival99-z-ui-components-z-tooltip.d.ts +85 -0
  109. package/types/shival99-z-ui-components-z-upload.d.ts +136 -0
  110. package/types/shival99-z-ui-i18n.d.ts +50 -0
  111. package/types/shival99-z-ui-pipes.d.ts +36 -0
  112. package/types/shival99-z-ui-providers.d.ts +132 -0
  113. package/types/shival99-z-ui-services.d.ts +364 -0
  114. package/types/shival99-z-ui-utils.d.ts +145 -0
  115. package/types/z-ui.d.ts +3 -4977
@@ -0,0 +1,259 @@
1
+ import { NgTemplateOutlet } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { input, inject, TemplateRef, Directive, contentChildren, viewChild, viewChildren, model, output, signal, effect, computed, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import { ZButtonComponent } from '@shival99/z-ui/components/z-button';
5
+ import { ZIconComponent } from '@shival99/z-ui/components/z-icon';
6
+ import { ZPopoverDirective } from '@shival99/z-ui/components/z-popover';
7
+ import { ZTooltipDirective } from '@shival99/z-ui/components/z-tooltip';
8
+ import { zMergeClasses } from '@shival99/z-ui/utils';
9
+ import { cva } from 'class-variance-authority';
10
+
11
+ class ZTabPanelDirective {
12
+ zTabPanel = input.required(...(ngDevMode ? [{ debugName: "zTabPanel" }] : []));
13
+ template = inject((TemplateRef));
14
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ZTabPanelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
15
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: ZTabPanelDirective, isStandalone: true, selector: "[z-tab-panel], [zTabPanel]", inputs: { zTabPanel: { classPropertyName: "zTabPanel", publicName: "zTabPanel", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["zTabPanel"], ngImport: i0 });
16
+ }
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ZTabPanelDirective, decorators: [{
18
+ type: Directive,
19
+ args: [{
20
+ selector: '[z-tab-panel], [zTabPanel]',
21
+ standalone: true,
22
+ exportAs: 'zTabPanel',
23
+ }]
24
+ }], propDecorators: { zTabPanel: [{ type: i0.Input, args: [{ isSignal: true, alias: "zTabPanel", required: true }] }] } });
25
+
26
+ const zTabsVariants = cva('z-tabs flex', {
27
+ variants: {
28
+ zVariant: {
29
+ line: 'border-b',
30
+ enclosed: '',
31
+ soft: 'bg-muted/30 rounded-lg p-1',
32
+ pill: 'gap-2',
33
+ solid: 'gap-1',
34
+ underline: 'gap-2 border-b',
35
+ },
36
+ zOrientation: {
37
+ horizontal: 'flex-row',
38
+ vertical: 'flex-col border-r border-b-0',
39
+ },
40
+ },
41
+ defaultVariants: {
42
+ zVariant: 'line',
43
+ zOrientation: 'horizontal',
44
+ },
45
+ });
46
+ const zTabItemVariants = cva('z-tab-item relative inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-[border-color,background-color,color,box-shadow] duration-200 outline-none focus-visible:ring-2 focus-visible:ring-ring cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed', {
47
+ variants: {
48
+ zVariant: {
49
+ line: 'border-b-2 border-transparent hover:text-foreground data-[active=true]:border-primary data-[active=true]:text-primary',
50
+ enclosed: 'border border-transparent rounded-t-md hover:border-border data-[active=true]:border-border data-[active=true]:border-b-background data-[active=true]:bg-background',
51
+ soft: 'rounded-md hover:bg-muted data-[active=true]:bg-background data-[active=true]:shadow-sm',
52
+ pill: 'rounded-full hover:bg-muted data-[active=true]:bg-primary data-[active=true]:text-primary-foreground',
53
+ solid: 'rounded-md border border-transparent hover:border-border data-[active=true]:bg-primary data-[active=true]:text-primary-foreground data-[active=true]:border-primary',
54
+ underline: 'border-b-2 border-transparent hover:text-foreground data-[active=true]:border-primary data-[active=true]:text-primary data-[active=true]:font-semibold',
55
+ },
56
+ zSize: {
57
+ sm: 'px-3 py-1.5 text-sm',
58
+ default: 'px-4 py-2 text-sm',
59
+ lg: 'px-5 py-2.5 text-base',
60
+ },
61
+ zOrientation: {
62
+ horizontal: '',
63
+ vertical: 'w-full justify-start',
64
+ },
65
+ },
66
+ defaultVariants: {
67
+ zVariant: 'line',
68
+ zSize: 'default',
69
+ zOrientation: 'horizontal',
70
+ },
71
+ });
72
+
73
+ class ZTabsComponent {
74
+ tabPanels = contentChildren(ZTabPanelDirective, ...(ngDevMode ? [{ debugName: "tabPanels" }] : []));
75
+ tabsListContainer = viewChild('tabsListContainer', ...(ngDevMode ? [{ debugName: "tabsListContainer" }] : []));
76
+ tabButtons = viewChildren('tabButton', ...(ngDevMode ? [{ debugName: "tabButtons" }] : []));
77
+ class = input('', ...(ngDevMode ? [{ debugName: "class" }] : []));
78
+ zTabs = input.required(...(ngDevMode ? [{ debugName: "zTabs" }] : []));
79
+ zVariant = input('line', ...(ngDevMode ? [{ debugName: "zVariant" }] : []));
80
+ zSize = input('default', ...(ngDevMode ? [{ debugName: "zSize" }] : []));
81
+ zOrientation = input('horizontal', ...(ngDevMode ? [{ debugName: "zOrientation" }] : []));
82
+ zLazy = input(false, ...(ngDevMode ? [{ debugName: "zLazy" }] : []));
83
+ activeTab = model('', ...(ngDevMode ? [{ debugName: "activeTab" }] : []));
84
+ zTabChange = output();
85
+ loadedTabs = signal(new Set(), ...(ngDevMode ? [{ debugName: "loadedTabs" }] : []));
86
+ canScrollLeft = signal(false, ...(ngDevMode ? [{ debugName: "canScrollLeft" }] : []));
87
+ canScrollRight = signal(false, ...(ngDevMode ? [{ debugName: "canScrollRight" }] : []));
88
+ _resizeObserver;
89
+ constructor() {
90
+ effect(() => {
91
+ this.zTabs();
92
+ requestAnimationFrame(() => this.checkScroll());
93
+ });
94
+ }
95
+ ngAfterViewInit() {
96
+ this.checkScroll();
97
+ this._setupResizeObserver();
98
+ }
99
+ ngOnDestroy() {
100
+ this._resizeObserver?.disconnect();
101
+ }
102
+ tabsClasses = computed(() => zMergeClasses(zTabsVariants({
103
+ zVariant: this.zVariant(),
104
+ zOrientation: this.zOrientation(),
105
+ }), this.class()), ...(ngDevMode ? [{ debugName: "tabsClasses" }] : []));
106
+ getTabItemClasses(_tab) {
107
+ return zMergeClasses(zTabItemVariants({
108
+ zVariant: this.zVariant(),
109
+ zSize: this.zSize(),
110
+ zOrientation: this.zOrientation(),
111
+ }));
112
+ }
113
+ selectTab(tab, scrollToView = false) {
114
+ if (tab.disabled) {
115
+ return;
116
+ }
117
+ this.activeTab.set(tab.value);
118
+ this.zTabChange.emit(tab.value);
119
+ if (this.zLazy()) {
120
+ this.loadedTabs.update(tabs => {
121
+ const newTabs = new Set(tabs);
122
+ newTabs.add(tab.value);
123
+ return newTabs;
124
+ });
125
+ }
126
+ if (scrollToView && this.zOrientation() === 'horizontal') {
127
+ requestAnimationFrame(() => {
128
+ const tabIndex = this.zTabs().findIndex(t => t.value === tab.value);
129
+ const tabButtonsList = this.tabButtons();
130
+ const tabButton = tabButtonsList[tabIndex];
131
+ if (tabButton) {
132
+ tabButton.nativeElement.scrollIntoView({
133
+ behavior: 'smooth',
134
+ block: 'nearest',
135
+ inline: 'center',
136
+ });
137
+ }
138
+ });
139
+ }
140
+ }
141
+ isTabActive(tab) {
142
+ return this.activeTab() === tab.value;
143
+ }
144
+ shouldRenderPanel(tabValue) {
145
+ if (!this.zLazy()) {
146
+ return true;
147
+ }
148
+ return this.loadedTabs().has(tabValue) || this.activeTab() === tabValue;
149
+ }
150
+ onTabKeydown(event, currentIndex) {
151
+ const tabs = this.zTabs().filter(t => !t.disabled);
152
+ const currentTab = tabs[currentIndex];
153
+ if (!currentTab) {
154
+ return;
155
+ }
156
+ const isHorizontal = this.zOrientation() === 'horizontal';
157
+ const nextKey = isHorizontal ? 'ArrowRight' : 'ArrowDown';
158
+ const prevKey = isHorizontal ? 'ArrowLeft' : 'ArrowUp';
159
+ if (event.key === nextKey) {
160
+ event.preventDefault();
161
+ const nextIndex = (currentIndex + 1) % tabs.length;
162
+ this.selectTab(tabs[nextIndex]);
163
+ return;
164
+ }
165
+ if (event.key === prevKey) {
166
+ event.preventDefault();
167
+ const prevIndex = (currentIndex - 1 + tabs.length) % tabs.length;
168
+ this.selectTab(tabs[prevIndex]);
169
+ return;
170
+ }
171
+ if (event.key === 'Home') {
172
+ event.preventDefault();
173
+ this.selectTab(tabs[0]);
174
+ return;
175
+ }
176
+ if (event.key === 'End') {
177
+ event.preventDefault();
178
+ this.selectTab(tabs[tabs.length - 1]);
179
+ }
180
+ }
181
+ checkScroll() {
182
+ const container = this.tabsListContainer()?.nativeElement;
183
+ if (!container || this.zOrientation() !== 'horizontal') {
184
+ this.canScrollLeft.set(false);
185
+ this.canScrollRight.set(false);
186
+ return;
187
+ }
188
+ const { scrollLeft, scrollWidth, clientWidth } = container;
189
+ this.canScrollLeft.set(scrollLeft > 0);
190
+ this.canScrollRight.set(scrollLeft + clientWidth < scrollWidth - 1);
191
+ }
192
+ scrollLeft() {
193
+ const container = this.tabsListContainer()?.nativeElement;
194
+ if (!container) {
195
+ return;
196
+ }
197
+ container.scrollBy({ left: -200, behavior: 'smooth' });
198
+ setTimeout(() => this.checkScroll(), 300);
199
+ }
200
+ scrollRight() {
201
+ const container = this.tabsListContainer()?.nativeElement;
202
+ if (!container) {
203
+ return;
204
+ }
205
+ container.scrollBy({ left: 200, behavior: 'smooth' });
206
+ setTimeout(() => this.checkScroll(), 300);
207
+ }
208
+ onTabsScroll() {
209
+ this.checkScroll();
210
+ }
211
+ _setupResizeObserver() {
212
+ const container = this.tabsListContainer()?.nativeElement;
213
+ if (!container) {
214
+ return;
215
+ }
216
+ this._resizeObserver = new ResizeObserver(() => {
217
+ this.checkScroll();
218
+ });
219
+ this._resizeObserver.observe(container);
220
+ }
221
+ scrollToActiveDropdownItem() {
222
+ setTimeout(() => {
223
+ const activeIndex = this.zTabs().findIndex(tab => tab.value === this.activeTab());
224
+ if (activeIndex === -1) {
225
+ return;
226
+ }
227
+ const dropdownMenu = document.querySelector('.z-tabs-dropdown-menu');
228
+ if (!dropdownMenu) {
229
+ return;
230
+ }
231
+ const dropdownItems = Array.from(dropdownMenu.querySelectorAll('button'));
232
+ const activeItem = dropdownItems[activeIndex];
233
+ if (activeItem && dropdownMenu) {
234
+ const menuRect = dropdownMenu.getBoundingClientRect();
235
+ const itemRect = activeItem.getBoundingClientRect();
236
+ const scrollTop = activeItem.offsetTop - menuRect.height / 2 + itemRect.height / 2;
237
+ dropdownMenu.scrollTo({
238
+ top: scrollTop,
239
+ behavior: 'smooth',
240
+ });
241
+ }
242
+ }, 150);
243
+ }
244
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ZTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
245
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ZTabsComponent, isStandalone: true, selector: "z-tabs", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zTabs: { classPropertyName: "zTabs", publicName: "zTabs", isSignal: true, isRequired: true, transformFunction: null }, zVariant: { classPropertyName: "zVariant", publicName: "zVariant", isSignal: true, isRequired: false, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zOrientation: { classPropertyName: "zOrientation", publicName: "zOrientation", isSignal: true, isRequired: false, transformFunction: null }, zLazy: { classPropertyName: "zLazy", publicName: "zLazy", isSignal: true, isRequired: false, transformFunction: null }, activeTab: { classPropertyName: "activeTab", publicName: "activeTab", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeTab: "activeTabChange", zTabChange: "zTabChange" }, host: { classAttribute: "z-tabs-wrapper block" }, queries: [{ propertyName: "tabPanels", predicate: ZTabPanelDirective, isSignal: true }], viewQueries: [{ propertyName: "tabsListContainer", first: true, predicate: ["tabsListContainer"], descendants: true, isSignal: true }, { propertyName: "tabButtons", predicate: ["tabButton"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"z-tabs-container flex flex-col gap-4\"\n [class.flex-row]=\"zOrientation() === 'vertical'\"\n [class.gap-4]=\"zOrientation() === 'vertical'\">\n <!-- Tabs Navigation (Left/Scroll/Tabs/Right/Dropdown) -->\n <div class=\"z-tabs-nav flex items-start gap-2\">\n <!-- Scroll Left Button -->\n @if (canScrollLeft() && zOrientation() === 'horizontal') {\n <z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zIconOnly=\"true\"\n [zWave]=\"false\"\n class=\"shrink-0\"\n (click)=\"scrollLeft()\"\n aria-label=\"Scroll left\">\n <z-icon zType=\"lucideChevronLeft\" zSize=\"16\" />\n </z-button>\n }\n\n <!-- Tabs List Container with Scroll + Fade -->\n <div class=\"z-tabs-scroll-container relative min-w-0 flex-1\">\n <div\n #tabsListContainer\n class=\"z-tabs-scroll-wrapper\"\n [class.vertical]=\"zOrientation() === 'vertical'\"\n (scroll)=\"onTabsScroll()\">\n <!-- Tab List -->\n <div [class]=\"tabsClasses()\" role=\"tablist\" [attr.aria-orientation]=\"zOrientation()\">\n @for (tab of zTabs(); track tab.value; let idx = $index) {\n <button\n #tabButton\n type=\"button\"\n role=\"tab\"\n [class]=\"getTabItemClasses(tab)\"\n [attr.data-active]=\"isTabActive(tab)\"\n [attr.aria-selected]=\"isTabActive(tab)\"\n [attr.aria-controls]=\"'panel-' + tab.value\"\n [disabled]=\"tab.disabled\"\n [tabindex]=\"isTabActive(tab) ? 0 : -1\"\n (click)=\"selectTab(tab)\"\n (keydown)=\"onTabKeydown($event, idx)\">\n @if (tab.icon) {\n <z-icon [zType]=\"tab.icon\" zSize=\"16\" />\n }\n <span>{{ tab.label }}</span>\n @if (tab.badge) {\n <span\n class=\"bg-primary text-primary-foreground ml-1.5 inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-xs font-semibold\">\n {{ tab.badge }}\n </span>\n }\n </button>\n }\n </div>\n </div>\n\n <!-- Fade overlays (outside scroll container) -->\n @if (canScrollLeft() && zOrientation() === 'horizontal') {\n <div class=\"z-tabs-fade-left\"></div>\n }\n @if (canScrollRight() && zOrientation() === 'horizontal') {\n <div class=\"z-tabs-fade-right\"></div>\n }\n </div>\n\n <!-- Scroll Right Button -->\n @if (canScrollRight() && zOrientation() === 'horizontal') {\n <z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zIconOnly=\"true\"\n class=\"shink-0\"\n (click)=\"scrollRight()\"\n [zWave]=\"false\"\n aria-label=\"Scroll right\">\n <z-icon zType=\"lucideChevronRight\" zSize=\"16\" />\n </z-button>\n }\n\n <!-- Dropdown Button (Mobile or Overflow) -->\n @if (zOrientation() === 'horizontal' && (canScrollLeft() || canScrollRight())) {\n <z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zIconOnly=\"true\"\n class=\"shink-0\"\n z-popover\n [zPopoverContent]=\"dropdownTpl\"\n zPosition=\"bottom-right\"\n [zWave]=\"false\"\n zClass=\"min-w-[100px] max-w-[200px]\"\n (zShow)=\"scrollToActiveDropdownItem()\"\n aria-label=\"Select tab\">\n <z-icon zType=\"lucideChevronDown\" zSize=\"16\" />\n </z-button>\n }\n </div>\n\n <!-- Tab Panels -->\n <div class=\"z-tabs-panels min-h-0\" [class.mt-2]=\"zOrientation() === 'horizontal'\">\n @for (panel of tabPanels(); track panel.zTabPanel()) {\n @if (shouldRenderPanel(panel.zTabPanel())) {\n <div\n role=\"tabpanel\"\n [id]=\"'panel-' + panel.zTabPanel()\"\n [attr.aria-labelledby]=\"panel.zTabPanel()\"\n [hidden]=\"activeTab() !== panel.zTabPanel()\">\n <ng-container *ngTemplateOutlet=\"panel.template\" />\n </div>\n }\n }\n </div>\n</div>\n\n<!-- Dropdown Menu Template -->\n<ng-template #dropdownTpl let-close=\"close\">\n <div class=\"z-tabs-dropdown-menu flex max-h-[300px] max-w-[200px] min-w-[100px] flex-col gap-0.5 overflow-y-auto p-1\">\n @for (tab of zTabs(); track tab.value) {\n <button\n #dropdownItem\n type=\"button\"\n class=\"flex w-full cursor-pointer items-center justify-start gap-2 rounded-sm px-2 py-1.5 text-left text-sm transition-colors outline-none disabled:pointer-events-none disabled:opacity-50\"\n [class.hover:bg-primary/10]=\"!isTabActive(tab)\"\n [class.hover:text-foreground]=\"!isTabActive(tab)\"\n [class.focus:bg-primary/10]=\"!isTabActive(tab)\"\n [class.bg-primary/15]=\"isTabActive(tab)\"\n [class.text-primary]=\"isTabActive(tab)\"\n [class.font-medium]=\"isTabActive(tab)\"\n [disabled]=\"tab.disabled\"\n (click)=\"selectTab(tab, true); close()\">\n @if (tab.icon) {\n <z-icon [zType]=\"tab.icon\" zSize=\"16\" class=\"text-muted-foreground shink-0\" />\n }\n <span\n class=\"min-w-0 flex-1 truncate\"\n z-tooltip\n [zContent]=\"tab.label\"\n zPosition=\"top\"\n [zHideDelay]=\"0\"\n [zOffset]=\"5\"\n [zArrow]=\"false\"\n [zTriggerElement]=\"dropdownItem\">\n {{ tab.label }}\n </span>\n @if (tab.badge) {\n <span\n class=\"bg-primary text-primary-foreground inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-xs font-semibold\">\n {{ tab.badge }}\n </span>\n }\n @if (isTabActive(tab)) {\n <z-icon zType=\"lucideCheck\" zSize=\"16\" class=\"text-primary shink-0\" />\n }\n </button>\n }\n </div>\n</ng-template>\n", styles: [".z-tabs-scroll-wrapper{overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none;scroll-behavior:smooth}.z-tabs-scroll-wrapper::-webkit-scrollbar{display:none}.z-tabs-scroll-wrapper.vertical{overflow-x:hidden;overflow-y:auto}.z-tabs-fade-left{content:\"\";position:absolute;left:0;top:0;bottom:0;width:40px;background:linear-gradient(to right,var(--background) 0%,oklch(from var(--background) l c h/.8) 30%,oklch(from var(--background) l c h/.4) 60%,oklch(from var(--background) l c h/0) 100%);pointer-events:none;z-index:10}.z-tabs-fade-right{content:\"\";position:absolute;right:0;top:0;bottom:0;width:40px;background:linear-gradient(to left,var(--background) 0%,oklch(from var(--background) l c h/.8) 30%,oklch(from var(--background) l c h/.4) 60%,oklch(from var(--background) l c h/0) 100%);pointer-events:none;z-index:10}.z-tabs.flex-row.border-b{border-bottom:1px solid hsl(var(--border))}.z-tabs.flex-col.border-r{border-right:1px solid hsl(var(--border));padding-right:.5rem}.z-tab-item{-webkit-tap-highlight-color:transparent}.z-tab-item[data-active=true]{position:relative}.z-tab-item:disabled{pointer-events:none}.z-tabs-panels [role=tabpanel]{animation:z-tabs-fade-in .2s ease-in-out}.z-tabs-panels [role=tabpanel][hidden]{display:none}.z-tabs-wrapper .z-tabs.flex-row.border-b+.z-tabs-panels{margin-top:1rem}.z-tabs-wrapper .z-tabs.flex-row:not(.border-b)+.z-tabs-panels{margin-top:-1px}.z-tabs-wrapper .z-tabs.flex-row:not(.border-b)+.z-tabs-panels [role=tabpanel]:not([hidden]){border:1px solid hsl(var(--border));border-radius:0 6px 6px;padding:1rem}.z-tabs-wrapper .z-tabs.bg-muted\\/30+.z-tabs-panels{margin-top:.75rem}.z-tabs-wrapper .z-tabs.flex-col+.z-tabs-panels{margin-top:0;margin-left:1rem}@keyframes z-tabs-fade-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}\n"], dependencies: [{ kind: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "component", type: ZButtonComponent, selector: "z-button, button[z-button], a[z-button]", inputs: ["class", "zType", "zSize", "zShape", "zLabel", "zLoading", "zDisabled", "zTypeIcon", "zSizeIcon", "zStrokeWidthIcon", "zWave"], exportAs: ["zButton"] }, { kind: "directive", type: ZTooltipDirective, selector: "[z-tooltip], [zTooltip]", inputs: ["zContent", "zPosition", "zTrigger", "zTooltipType", "zTooltipSize", "zClass", "zShowDelay", "zHideDelay", "zArrow", "zDisabled", "zOffset", "zAutoDetect", "zTriggerElement", "zAlwaysShow", "zMaxWidth"], outputs: ["zShow", "zHide"], exportAs: ["zTooltip"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ZPopoverDirective, selector: "[z-popover]", inputs: ["zPopoverContent", "zPosition", "zTrigger", "zClass", "zShowDelay", "zHideDelay", "zDisabled", "zOffset", "zPopoverWidth", "zManualClose", "zScrollClose", "zShowArrow"], outputs: ["zShow", "zHide", "zHideStart", "zControl"], exportAs: ["zPopover"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
246
+ }
247
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ZTabsComponent, decorators: [{
248
+ type: Component,
249
+ args: [{ selector: 'z-tabs', imports: [ZIconComponent, ZButtonComponent, ZTooltipDirective, NgTemplateOutlet, ZPopoverDirective], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
250
+ class: 'z-tabs-wrapper block',
251
+ }, template: "<div\n class=\"z-tabs-container flex flex-col gap-4\"\n [class.flex-row]=\"zOrientation() === 'vertical'\"\n [class.gap-4]=\"zOrientation() === 'vertical'\">\n <!-- Tabs Navigation (Left/Scroll/Tabs/Right/Dropdown) -->\n <div class=\"z-tabs-nav flex items-start gap-2\">\n <!-- Scroll Left Button -->\n @if (canScrollLeft() && zOrientation() === 'horizontal') {\n <z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zIconOnly=\"true\"\n [zWave]=\"false\"\n class=\"shrink-0\"\n (click)=\"scrollLeft()\"\n aria-label=\"Scroll left\">\n <z-icon zType=\"lucideChevronLeft\" zSize=\"16\" />\n </z-button>\n }\n\n <!-- Tabs List Container with Scroll + Fade -->\n <div class=\"z-tabs-scroll-container relative min-w-0 flex-1\">\n <div\n #tabsListContainer\n class=\"z-tabs-scroll-wrapper\"\n [class.vertical]=\"zOrientation() === 'vertical'\"\n (scroll)=\"onTabsScroll()\">\n <!-- Tab List -->\n <div [class]=\"tabsClasses()\" role=\"tablist\" [attr.aria-orientation]=\"zOrientation()\">\n @for (tab of zTabs(); track tab.value; let idx = $index) {\n <button\n #tabButton\n type=\"button\"\n role=\"tab\"\n [class]=\"getTabItemClasses(tab)\"\n [attr.data-active]=\"isTabActive(tab)\"\n [attr.aria-selected]=\"isTabActive(tab)\"\n [attr.aria-controls]=\"'panel-' + tab.value\"\n [disabled]=\"tab.disabled\"\n [tabindex]=\"isTabActive(tab) ? 0 : -1\"\n (click)=\"selectTab(tab)\"\n (keydown)=\"onTabKeydown($event, idx)\">\n @if (tab.icon) {\n <z-icon [zType]=\"tab.icon\" zSize=\"16\" />\n }\n <span>{{ tab.label }}</span>\n @if (tab.badge) {\n <span\n class=\"bg-primary text-primary-foreground ml-1.5 inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-xs font-semibold\">\n {{ tab.badge }}\n </span>\n }\n </button>\n }\n </div>\n </div>\n\n <!-- Fade overlays (outside scroll container) -->\n @if (canScrollLeft() && zOrientation() === 'horizontal') {\n <div class=\"z-tabs-fade-left\"></div>\n }\n @if (canScrollRight() && zOrientation() === 'horizontal') {\n <div class=\"z-tabs-fade-right\"></div>\n }\n </div>\n\n <!-- Scroll Right Button -->\n @if (canScrollRight() && zOrientation() === 'horizontal') {\n <z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zIconOnly=\"true\"\n class=\"shink-0\"\n (click)=\"scrollRight()\"\n [zWave]=\"false\"\n aria-label=\"Scroll right\">\n <z-icon zType=\"lucideChevronRight\" zSize=\"16\" />\n </z-button>\n }\n\n <!-- Dropdown Button (Mobile or Overflow) -->\n @if (zOrientation() === 'horizontal' && (canScrollLeft() || canScrollRight())) {\n <z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zIconOnly=\"true\"\n class=\"shink-0\"\n z-popover\n [zPopoverContent]=\"dropdownTpl\"\n zPosition=\"bottom-right\"\n [zWave]=\"false\"\n zClass=\"min-w-[100px] max-w-[200px]\"\n (zShow)=\"scrollToActiveDropdownItem()\"\n aria-label=\"Select tab\">\n <z-icon zType=\"lucideChevronDown\" zSize=\"16\" />\n </z-button>\n }\n </div>\n\n <!-- Tab Panels -->\n <div class=\"z-tabs-panels min-h-0\" [class.mt-2]=\"zOrientation() === 'horizontal'\">\n @for (panel of tabPanels(); track panel.zTabPanel()) {\n @if (shouldRenderPanel(panel.zTabPanel())) {\n <div\n role=\"tabpanel\"\n [id]=\"'panel-' + panel.zTabPanel()\"\n [attr.aria-labelledby]=\"panel.zTabPanel()\"\n [hidden]=\"activeTab() !== panel.zTabPanel()\">\n <ng-container *ngTemplateOutlet=\"panel.template\" />\n </div>\n }\n }\n </div>\n</div>\n\n<!-- Dropdown Menu Template -->\n<ng-template #dropdownTpl let-close=\"close\">\n <div class=\"z-tabs-dropdown-menu flex max-h-[300px] max-w-[200px] min-w-[100px] flex-col gap-0.5 overflow-y-auto p-1\">\n @for (tab of zTabs(); track tab.value) {\n <button\n #dropdownItem\n type=\"button\"\n class=\"flex w-full cursor-pointer items-center justify-start gap-2 rounded-sm px-2 py-1.5 text-left text-sm transition-colors outline-none disabled:pointer-events-none disabled:opacity-50\"\n [class.hover:bg-primary/10]=\"!isTabActive(tab)\"\n [class.hover:text-foreground]=\"!isTabActive(tab)\"\n [class.focus:bg-primary/10]=\"!isTabActive(tab)\"\n [class.bg-primary/15]=\"isTabActive(tab)\"\n [class.text-primary]=\"isTabActive(tab)\"\n [class.font-medium]=\"isTabActive(tab)\"\n [disabled]=\"tab.disabled\"\n (click)=\"selectTab(tab, true); close()\">\n @if (tab.icon) {\n <z-icon [zType]=\"tab.icon\" zSize=\"16\" class=\"text-muted-foreground shink-0\" />\n }\n <span\n class=\"min-w-0 flex-1 truncate\"\n z-tooltip\n [zContent]=\"tab.label\"\n zPosition=\"top\"\n [zHideDelay]=\"0\"\n [zOffset]=\"5\"\n [zArrow]=\"false\"\n [zTriggerElement]=\"dropdownItem\">\n {{ tab.label }}\n </span>\n @if (tab.badge) {\n <span\n class=\"bg-primary text-primary-foreground inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-xs font-semibold\">\n {{ tab.badge }}\n </span>\n }\n @if (isTabActive(tab)) {\n <z-icon zType=\"lucideCheck\" zSize=\"16\" class=\"text-primary shink-0\" />\n }\n </button>\n }\n </div>\n</ng-template>\n", styles: [".z-tabs-scroll-wrapper{overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none;scroll-behavior:smooth}.z-tabs-scroll-wrapper::-webkit-scrollbar{display:none}.z-tabs-scroll-wrapper.vertical{overflow-x:hidden;overflow-y:auto}.z-tabs-fade-left{content:\"\";position:absolute;left:0;top:0;bottom:0;width:40px;background:linear-gradient(to right,var(--background) 0%,oklch(from var(--background) l c h/.8) 30%,oklch(from var(--background) l c h/.4) 60%,oklch(from var(--background) l c h/0) 100%);pointer-events:none;z-index:10}.z-tabs-fade-right{content:\"\";position:absolute;right:0;top:0;bottom:0;width:40px;background:linear-gradient(to left,var(--background) 0%,oklch(from var(--background) l c h/.8) 30%,oklch(from var(--background) l c h/.4) 60%,oklch(from var(--background) l c h/0) 100%);pointer-events:none;z-index:10}.z-tabs.flex-row.border-b{border-bottom:1px solid hsl(var(--border))}.z-tabs.flex-col.border-r{border-right:1px solid hsl(var(--border));padding-right:.5rem}.z-tab-item{-webkit-tap-highlight-color:transparent}.z-tab-item[data-active=true]{position:relative}.z-tab-item:disabled{pointer-events:none}.z-tabs-panels [role=tabpanel]{animation:z-tabs-fade-in .2s ease-in-out}.z-tabs-panels [role=tabpanel][hidden]{display:none}.z-tabs-wrapper .z-tabs.flex-row.border-b+.z-tabs-panels{margin-top:1rem}.z-tabs-wrapper .z-tabs.flex-row:not(.border-b)+.z-tabs-panels{margin-top:-1px}.z-tabs-wrapper .z-tabs.flex-row:not(.border-b)+.z-tabs-panels [role=tabpanel]:not([hidden]){border:1px solid hsl(var(--border));border-radius:0 6px 6px;padding:1rem}.z-tabs-wrapper .z-tabs.bg-muted\\/30+.z-tabs-panels{margin-top:.75rem}.z-tabs-wrapper .z-tabs.flex-col+.z-tabs-panels{margin-top:0;margin-left:1rem}@keyframes z-tabs-fade-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}\n"] }]
252
+ }], ctorParameters: () => [], propDecorators: { tabPanels: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ZTabPanelDirective), { isSignal: true }] }], tabsListContainer: [{ type: i0.ViewChild, args: ['tabsListContainer', { isSignal: true }] }], tabButtons: [{ type: i0.ViewChildren, args: ['tabButton', { isSignal: true }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], zTabs: [{ type: i0.Input, args: [{ isSignal: true, alias: "zTabs", required: true }] }], zVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "zVariant", required: false }] }], zSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSize", required: false }] }], zOrientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "zOrientation", required: false }] }], zLazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLazy", required: false }] }], activeTab: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeTab", required: false }] }, { type: i0.Output, args: ["activeTabChange"] }], zTabChange: [{ type: i0.Output, args: ["zTabChange"] }] } });
253
+
254
+ /**
255
+ * Generated bundle index. Do not edit.
256
+ */
257
+
258
+ export { ZTabPanelDirective, ZTabsComponent, zTabItemVariants, zTabsVariants };
259
+ //# sourceMappingURL=shival99-z-ui-components-z-tabs.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shival99-z-ui-components-z-tabs.mjs","sources":["../../../../libs/core-ui/components/z-tabs/directives/z-tab-panel.directive.ts","../../../../libs/core-ui/components/z-tabs/z-tabs.variants.ts","../../../../libs/core-ui/components/z-tabs/z-tabs.component.ts","../../../../libs/core-ui/components/z-tabs/z-tabs.component.html","../../../../libs/core-ui/components/z-tabs/shival99-z-ui-components-z-tabs.ts"],"sourcesContent":["import { Directive, inject, input, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[z-tab-panel], [zTabPanel]',\n standalone: true,\n exportAs: 'zTabPanel',\n})\nexport class ZTabPanelDirective {\n public readonly zTabPanel = input.required<string>();\n public readonly template = inject(TemplateRef<unknown>);\n}\n","import { cva, type VariantProps } from 'class-variance-authority';\n\nexport const zTabsVariants = cva('z-tabs flex', {\n variants: {\n zVariant: {\n line: 'border-b',\n enclosed: '',\n soft: 'bg-muted/30 rounded-lg p-1',\n pill: 'gap-2',\n solid: 'gap-1',\n underline: 'gap-2 border-b',\n },\n zOrientation: {\n horizontal: 'flex-row',\n vertical: 'flex-col border-r border-b-0',\n },\n },\n defaultVariants: {\n zVariant: 'line',\n zOrientation: 'horizontal',\n },\n});\n\nexport const zTabItemVariants = cva(\n 'z-tab-item relative inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-[border-color,background-color,color,box-shadow] duration-200 outline-none focus-visible:ring-2 focus-visible:ring-ring cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed',\n {\n variants: {\n zVariant: {\n line: 'border-b-2 border-transparent hover:text-foreground data-[active=true]:border-primary data-[active=true]:text-primary',\n enclosed:\n 'border border-transparent rounded-t-md hover:border-border data-[active=true]:border-border data-[active=true]:border-b-background data-[active=true]:bg-background',\n soft: 'rounded-md hover:bg-muted data-[active=true]:bg-background data-[active=true]:shadow-sm',\n pill: 'rounded-full hover:bg-muted data-[active=true]:bg-primary data-[active=true]:text-primary-foreground',\n solid:\n 'rounded-md border border-transparent hover:border-border data-[active=true]:bg-primary data-[active=true]:text-primary-foreground data-[active=true]:border-primary',\n underline:\n 'border-b-2 border-transparent hover:text-foreground data-[active=true]:border-primary data-[active=true]:text-primary data-[active=true]:font-semibold',\n },\n zSize: {\n sm: 'px-3 py-1.5 text-sm',\n default: 'px-4 py-2 text-sm',\n lg: 'px-5 py-2.5 text-base',\n },\n zOrientation: {\n horizontal: '',\n vertical: 'w-full justify-start',\n },\n },\n defaultVariants: {\n zVariant: 'line',\n zSize: 'default',\n zOrientation: 'horizontal',\n },\n }\n);\n\nexport type ZTabsVariants = VariantProps<typeof zTabsVariants>;\nexport type ZTabItemVariants = VariantProps<typeof zTabItemVariants>;\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChildren,\n effect,\n ElementRef,\n input,\n model,\n output,\n signal,\n viewChild,\n viewChildren,\n ViewEncapsulation,\n OnDestroy,\n} from '@angular/core';\nimport { ZButtonComponent } from '@shival99/z-ui/components/z-button';\nimport { ZIconComponent } from '@shival99/z-ui/components/z-icon';\nimport { ZPopoverDirective } from '@shival99/z-ui/components/z-popover';\nimport { ZTooltipDirective } from '@shival99/z-ui/components/z-tooltip';\nimport { zMergeClasses } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\nimport { ZTabPanelDirective } from './directives/z-tab-panel.directive';\nimport type { ZTab, ZTabsVariant, ZTabsSize, ZTabsOrientation } from './z-tabs.types';\nimport { zTabsVariants, zTabItemVariants } from './z-tabs.variants';\n\n@Component({\n selector: 'z-tabs',\n imports: [ZIconComponent, ZButtonComponent, ZTooltipDirective, NgTemplateOutlet, ZPopoverDirective],\n standalone: true,\n templateUrl: './z-tabs.component.html',\n styleUrl: './z-tabs.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'z-tabs-wrapper block',\n },\n})\nexport class ZTabsComponent implements AfterViewInit, OnDestroy {\n public readonly tabPanels = contentChildren(ZTabPanelDirective);\n public readonly tabsListContainer = viewChild<ElementRef<HTMLDivElement>>('tabsListContainer');\n public readonly tabButtons = viewChildren<ElementRef<HTMLButtonElement>>('tabButton');\n\n public readonly class = input<ClassValue>('');\n public readonly zTabs = input.required<ZTab[]>();\n public readonly zVariant = input<ZTabsVariant>('line');\n public readonly zSize = input<ZTabsSize>('default');\n public readonly zOrientation = input<ZTabsOrientation>('horizontal');\n public readonly zLazy = input(false);\n\n public readonly activeTab = model<string>('');\n public readonly zTabChange = output<string>();\n\n protected readonly loadedTabs = signal<Set<string>>(new Set());\n protected readonly canScrollLeft = signal(false);\n protected readonly canScrollRight = signal(false);\n\n private _resizeObserver?: ResizeObserver;\n\n constructor() {\n effect(() => {\n this.zTabs();\n requestAnimationFrame(() => this.checkScroll());\n });\n }\n\n ngAfterViewInit(): void {\n this.checkScroll();\n this._setupResizeObserver();\n }\n\n ngOnDestroy(): void {\n this._resizeObserver?.disconnect();\n }\n\n protected readonly tabsClasses = computed(() =>\n zMergeClasses(\n zTabsVariants({\n zVariant: this.zVariant(),\n zOrientation: this.zOrientation(),\n }),\n this.class()\n )\n );\n\n protected getTabItemClasses(_tab: ZTab): string {\n return zMergeClasses(\n zTabItemVariants({\n zVariant: this.zVariant(),\n zSize: this.zSize(),\n zOrientation: this.zOrientation(),\n })\n );\n }\n\n protected selectTab(tab: ZTab, scrollToView = false): void {\n if (tab.disabled) {\n return;\n }\n\n this.activeTab.set(tab.value);\n this.zTabChange.emit(tab.value);\n\n if (this.zLazy()) {\n this.loadedTabs.update(tabs => {\n const newTabs = new Set(tabs);\n newTabs.add(tab.value);\n return newTabs;\n });\n }\n\n if (scrollToView && this.zOrientation() === 'horizontal') {\n requestAnimationFrame(() => {\n const tabIndex = this.zTabs().findIndex(t => t.value === tab.value);\n const tabButtonsList = this.tabButtons();\n const tabButton = tabButtonsList[tabIndex];\n if (tabButton) {\n tabButton.nativeElement.scrollIntoView({\n behavior: 'smooth',\n block: 'nearest',\n inline: 'center',\n });\n }\n });\n }\n }\n\n protected isTabActive(tab: ZTab): boolean {\n return this.activeTab() === tab.value;\n }\n\n protected shouldRenderPanel(tabValue: string): boolean {\n if (!this.zLazy()) {\n return true;\n }\n return this.loadedTabs().has(tabValue) || this.activeTab() === tabValue;\n }\n\n protected onTabKeydown(event: KeyboardEvent, currentIndex: number): void {\n const tabs = this.zTabs().filter(t => !t.disabled);\n const currentTab = tabs[currentIndex];\n\n if (!currentTab) {\n return;\n }\n\n const isHorizontal = this.zOrientation() === 'horizontal';\n const nextKey = isHorizontal ? 'ArrowRight' : 'ArrowDown';\n const prevKey = isHorizontal ? 'ArrowLeft' : 'ArrowUp';\n\n if (event.key === nextKey) {\n event.preventDefault();\n const nextIndex = (currentIndex + 1) % tabs.length;\n this.selectTab(tabs[nextIndex]);\n return;\n }\n\n if (event.key === prevKey) {\n event.preventDefault();\n const prevIndex = (currentIndex - 1 + tabs.length) % tabs.length;\n this.selectTab(tabs[prevIndex]);\n return;\n }\n\n if (event.key === 'Home') {\n event.preventDefault();\n this.selectTab(tabs[0]);\n return;\n }\n\n if (event.key === 'End') {\n event.preventDefault();\n this.selectTab(tabs[tabs.length - 1]);\n }\n }\n\n protected checkScroll(): void {\n const container = this.tabsListContainer()?.nativeElement;\n if (!container || this.zOrientation() !== 'horizontal') {\n this.canScrollLeft.set(false);\n this.canScrollRight.set(false);\n return;\n }\n\n const { scrollLeft, scrollWidth, clientWidth } = container;\n this.canScrollLeft.set(scrollLeft > 0);\n this.canScrollRight.set(scrollLeft + clientWidth < scrollWidth - 1);\n }\n\n protected scrollLeft(): void {\n const container = this.tabsListContainer()?.nativeElement;\n if (!container) {\n return;\n }\n\n container.scrollBy({ left: -200, behavior: 'smooth' });\n setTimeout(() => this.checkScroll(), 300);\n }\n\n protected scrollRight(): void {\n const container = this.tabsListContainer()?.nativeElement;\n if (!container) {\n return;\n }\n\n container.scrollBy({ left: 200, behavior: 'smooth' });\n setTimeout(() => this.checkScroll(), 300);\n }\n\n protected onTabsScroll(): void {\n this.checkScroll();\n }\n\n private _setupResizeObserver(): void {\n const container = this.tabsListContainer()?.nativeElement;\n if (!container) {\n return;\n }\n\n this._resizeObserver = new ResizeObserver(() => {\n this.checkScroll();\n });\n\n this._resizeObserver.observe(container);\n }\n\n protected scrollToActiveDropdownItem(): void {\n setTimeout(() => {\n const activeIndex = this.zTabs().findIndex(tab => tab.value === this.activeTab());\n if (activeIndex === -1) {\n return;\n }\n\n const dropdownMenu = document.querySelector('.z-tabs-dropdown-menu') as HTMLElement;\n if (!dropdownMenu) {\n return;\n }\n\n const dropdownItems = Array.from(dropdownMenu.querySelectorAll('button'));\n const activeItem = dropdownItems[activeIndex];\n\n if (activeItem && dropdownMenu) {\n const menuRect = dropdownMenu.getBoundingClientRect();\n const itemRect = activeItem.getBoundingClientRect();\n const scrollTop = activeItem.offsetTop - menuRect.height / 2 + itemRect.height / 2;\n\n dropdownMenu.scrollTo({\n top: scrollTop,\n behavior: 'smooth',\n });\n }\n }, 150);\n }\n}\n","<div\n class=\"z-tabs-container flex flex-col gap-4\"\n [class.flex-row]=\"zOrientation() === 'vertical'\"\n [class.gap-4]=\"zOrientation() === 'vertical'\">\n <!-- Tabs Navigation (Left/Scroll/Tabs/Right/Dropdown) -->\n <div class=\"z-tabs-nav flex items-start gap-2\">\n <!-- Scroll Left Button -->\n @if (canScrollLeft() && zOrientation() === 'horizontal') {\n <z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zIconOnly=\"true\"\n [zWave]=\"false\"\n class=\"shrink-0\"\n (click)=\"scrollLeft()\"\n aria-label=\"Scroll left\">\n <z-icon zType=\"lucideChevronLeft\" zSize=\"16\" />\n </z-button>\n }\n\n <!-- Tabs List Container with Scroll + Fade -->\n <div class=\"z-tabs-scroll-container relative min-w-0 flex-1\">\n <div\n #tabsListContainer\n class=\"z-tabs-scroll-wrapper\"\n [class.vertical]=\"zOrientation() === 'vertical'\"\n (scroll)=\"onTabsScroll()\">\n <!-- Tab List -->\n <div [class]=\"tabsClasses()\" role=\"tablist\" [attr.aria-orientation]=\"zOrientation()\">\n @for (tab of zTabs(); track tab.value; let idx = $index) {\n <button\n #tabButton\n type=\"button\"\n role=\"tab\"\n [class]=\"getTabItemClasses(tab)\"\n [attr.data-active]=\"isTabActive(tab)\"\n [attr.aria-selected]=\"isTabActive(tab)\"\n [attr.aria-controls]=\"'panel-' + tab.value\"\n [disabled]=\"tab.disabled\"\n [tabindex]=\"isTabActive(tab) ? 0 : -1\"\n (click)=\"selectTab(tab)\"\n (keydown)=\"onTabKeydown($event, idx)\">\n @if (tab.icon) {\n <z-icon [zType]=\"tab.icon\" zSize=\"16\" />\n }\n <span>{{ tab.label }}</span>\n @if (tab.badge) {\n <span\n class=\"bg-primary text-primary-foreground ml-1.5 inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-xs font-semibold\">\n {{ tab.badge }}\n </span>\n }\n </button>\n }\n </div>\n </div>\n\n <!-- Fade overlays (outside scroll container) -->\n @if (canScrollLeft() && zOrientation() === 'horizontal') {\n <div class=\"z-tabs-fade-left\"></div>\n }\n @if (canScrollRight() && zOrientation() === 'horizontal') {\n <div class=\"z-tabs-fade-right\"></div>\n }\n </div>\n\n <!-- Scroll Right Button -->\n @if (canScrollRight() && zOrientation() === 'horizontal') {\n <z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zIconOnly=\"true\"\n class=\"shink-0\"\n (click)=\"scrollRight()\"\n [zWave]=\"false\"\n aria-label=\"Scroll right\">\n <z-icon zType=\"lucideChevronRight\" zSize=\"16\" />\n </z-button>\n }\n\n <!-- Dropdown Button (Mobile or Overflow) -->\n @if (zOrientation() === 'horizontal' && (canScrollLeft() || canScrollRight())) {\n <z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zIconOnly=\"true\"\n class=\"shink-0\"\n z-popover\n [zPopoverContent]=\"dropdownTpl\"\n zPosition=\"bottom-right\"\n [zWave]=\"false\"\n zClass=\"min-w-[100px] max-w-[200px]\"\n (zShow)=\"scrollToActiveDropdownItem()\"\n aria-label=\"Select tab\">\n <z-icon zType=\"lucideChevronDown\" zSize=\"16\" />\n </z-button>\n }\n </div>\n\n <!-- Tab Panels -->\n <div class=\"z-tabs-panels min-h-0\" [class.mt-2]=\"zOrientation() === 'horizontal'\">\n @for (panel of tabPanels(); track panel.zTabPanel()) {\n @if (shouldRenderPanel(panel.zTabPanel())) {\n <div\n role=\"tabpanel\"\n [id]=\"'panel-' + panel.zTabPanel()\"\n [attr.aria-labelledby]=\"panel.zTabPanel()\"\n [hidden]=\"activeTab() !== panel.zTabPanel()\">\n <ng-container *ngTemplateOutlet=\"panel.template\" />\n </div>\n }\n }\n </div>\n</div>\n\n<!-- Dropdown Menu Template -->\n<ng-template #dropdownTpl let-close=\"close\">\n <div class=\"z-tabs-dropdown-menu flex max-h-[300px] max-w-[200px] min-w-[100px] flex-col gap-0.5 overflow-y-auto p-1\">\n @for (tab of zTabs(); track tab.value) {\n <button\n #dropdownItem\n type=\"button\"\n class=\"flex w-full cursor-pointer items-center justify-start gap-2 rounded-sm px-2 py-1.5 text-left text-sm transition-colors outline-none disabled:pointer-events-none disabled:opacity-50\"\n [class.hover:bg-primary/10]=\"!isTabActive(tab)\"\n [class.hover:text-foreground]=\"!isTabActive(tab)\"\n [class.focus:bg-primary/10]=\"!isTabActive(tab)\"\n [class.bg-primary/15]=\"isTabActive(tab)\"\n [class.text-primary]=\"isTabActive(tab)\"\n [class.font-medium]=\"isTabActive(tab)\"\n [disabled]=\"tab.disabled\"\n (click)=\"selectTab(tab, true); close()\">\n @if (tab.icon) {\n <z-icon [zType]=\"tab.icon\" zSize=\"16\" class=\"text-muted-foreground shink-0\" />\n }\n <span\n class=\"min-w-0 flex-1 truncate\"\n z-tooltip\n [zContent]=\"tab.label\"\n zPosition=\"top\"\n [zHideDelay]=\"0\"\n [zOffset]=\"5\"\n [zArrow]=\"false\"\n [zTriggerElement]=\"dropdownItem\">\n {{ tab.label }}\n </span>\n @if (tab.badge) {\n <span\n class=\"bg-primary text-primary-foreground inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-xs font-semibold\">\n {{ tab.badge }}\n </span>\n }\n @if (isTabActive(tab)) {\n <z-icon zType=\"lucideCheck\" zSize=\"16\" class=\"text-primary shink-0\" />\n }\n </button>\n }\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAOa,kBAAkB,CAAA;AACb,IAAA,SAAS,GAAG,KAAK,CAAC,QAAQ,oDAAU;AACpC,IAAA,QAAQ,GAAG,MAAM,EAAC,WAAoB,EAAC;uGAF5C,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,4BAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QA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