@shival99/z-ui 2.6.8 → 2.6.9

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 (53) hide show
  1. package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs +1211 -0
  2. package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs.map +1 -0
  3. package/fesm2022/shival99-z-ui-components-z-drawer.mjs +991 -0
  4. package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -0
  5. package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs +99 -0
  6. package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs.map +1 -0
  7. package/fesm2022/shival99-z-ui-components-z-filter.mjs +962 -0
  8. package/fesm2022/shival99-z-ui-components-z-filter.mjs.map +1 -0
  9. package/fesm2022/shival99-z-ui-components-z-number-ticker.mjs +352 -0
  10. package/fesm2022/shival99-z-ui-components-z-number-ticker.mjs.map +1 -0
  11. package/fesm2022/shival99-z-ui-components-z-pagination.mjs +179 -0
  12. package/fesm2022/shival99-z-ui-components-z-pagination.mjs.map +1 -0
  13. package/fesm2022/shival99-z-ui-components-z-qrcode.mjs +429 -0
  14. package/fesm2022/shival99-z-ui-components-z-qrcode.mjs.map +1 -0
  15. package/fesm2022/shival99-z-ui-components-z-radio.mjs +183 -0
  16. package/fesm2022/shival99-z-ui-components-z-radio.mjs.map +1 -0
  17. package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs +137 -0
  18. package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs.map +1 -0
  19. package/fesm2022/shival99-z-ui-components-z-show-more.mjs +138 -0
  20. package/fesm2022/shival99-z-ui-components-z-show-more.mjs.map +1 -0
  21. package/fesm2022/shival99-z-ui-components-z-skeleton-auto.mjs +80 -0
  22. package/fesm2022/shival99-z-ui-components-z-skeleton-auto.mjs.map +1 -0
  23. package/fesm2022/shival99-z-ui-components-z-steps.mjs +420 -0
  24. package/fesm2022/shival99-z-ui-components-z-steps.mjs.map +1 -0
  25. package/fesm2022/shival99-z-ui-components-z-table.mjs +11424 -0
  26. package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -0
  27. package/fesm2022/shival99-z-ui-components-z-tabs.mjs +1102 -0
  28. package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -0
  29. package/fesm2022/shival99-z-ui-components-z-tags.mjs +364 -0
  30. package/fesm2022/shival99-z-ui-components-z-tags.mjs.map +1 -0
  31. package/fesm2022/shival99-z-ui-components-z-timeline.mjs +254 -0
  32. package/fesm2022/shival99-z-ui-components-z-timeline.mjs.map +1 -0
  33. package/fesm2022/shival99-z-ui-services-excel.mjs +672 -0
  34. package/fesm2022/shival99-z-ui-services-excel.mjs.map +1 -0
  35. package/package.json +1 -1
  36. package/types/shival99-z-ui-components-z-autocomplete.d.ts +301 -0
  37. package/types/shival99-z-ui-components-z-drawer.d.ts +298 -0
  38. package/types/shival99-z-ui-components-z-dropdown-menu.d.ts +52 -0
  39. package/types/shival99-z-ui-components-z-filter.d.ts +285 -0
  40. package/types/shival99-z-ui-components-z-modal.d.ts +1 -1
  41. package/types/shival99-z-ui-components-z-number-ticker.d.ts +110 -0
  42. package/types/shival99-z-ui-components-z-pagination.d.ts +55 -0
  43. package/types/shival99-z-ui-components-z-qrcode.d.ts +79 -0
  44. package/types/shival99-z-ui-components-z-radio.d.ts +69 -0
  45. package/types/shival99-z-ui-components-z-scrollarea.d.ts +48 -0
  46. package/types/shival99-z-ui-components-z-show-more.d.ts +36 -0
  47. package/types/shival99-z-ui-components-z-skeleton-auto.d.ts +35 -0
  48. package/types/shival99-z-ui-components-z-steps.d.ts +106 -0
  49. package/types/shival99-z-ui-components-z-table.d.ts +2386 -0
  50. package/types/shival99-z-ui-components-z-tabs.d.ts +196 -0
  51. package/types/shival99-z-ui-components-z-tags.d.ts +127 -0
  52. package/types/shival99-z-ui-components-z-timeline.d.ts +71 -0
  53. package/types/shival99-z-ui-services-excel.d.ts +36 -0
@@ -0,0 +1,1102 @@
1
+ import { NgTemplateOutlet } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { input, inject, TemplateRef, Directive, contentChildren, viewChild, viewChildren, ViewContainerRef, model, output, signal, computed, NgZone, effect, untracked, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import { TranslatePipe } from '@ngx-translate/core';
5
+ import { ZButtonComponent } from '@shival99/z-ui/components/z-button';
6
+ import { ZHoverGlideDirective } from '@shival99/z-ui/components/z-hover-glide';
7
+ import { ZIconComponent } from '@shival99/z-ui/components/z-icon';
8
+ import { ZPopoverDirective } from '@shival99/z-ui/components/z-popover';
9
+ import { ZTooltipDirective } from '@shival99/z-ui/components/z-tooltip';
10
+ import { ZCacheService } from '@shival99/z-ui/services';
11
+ import { zMergeClasses } from '@shival99/z-ui/utils';
12
+ import { NgScrollbar } from 'ngx-scrollbar';
13
+ import { cva } from 'class-variance-authority';
14
+
15
+ class ZTabPanelDirective {
16
+ zTabPanel = input.required(/* @ts-ignore */
17
+ ...(ngDevMode ? [{ debugName: "zTabPanel" }] : /* istanbul ignore next */ []));
18
+ template = inject((TemplateRef));
19
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ZTabPanelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
20
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.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 });
21
+ }
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ZTabPanelDirective, decorators: [{
23
+ type: Directive,
24
+ args: [{
25
+ selector: '[z-tab-panel], [zTabPanel]',
26
+ standalone: true,
27
+ exportAs: 'zTabPanel',
28
+ }]
29
+ }], propDecorators: { zTabPanel: [{ type: i0.Input, args: [{ isSignal: true, alias: "zTabPanel", required: true }] }] } });
30
+
31
+ /** Minimum scroll-position delta (px) before the fade/scroll-button state is toggled. */
32
+ const Z_TABS_SCROLL_TOLERANCE = 4;
33
+ /**
34
+ * Types that render a shared pill behind the active tab and glide it into place instead of
35
+ * swapping each item's own background. These predate the vertical glide, so they keep their
36
+ * static per-item active background when laid out vertically.
37
+ */
38
+ const Z_TABS_GLIDE_TYPES = ['segment', 'segment-solid', 'pill-solid', 'pill-blur', 'pill-float'];
39
+ /** Glide types whose indicator is measured and animated in either orientation. */
40
+ const Z_TABS_OMNI_GLIDE_TYPES = ['pill-primary', 'underline-hover', 'bar'];
41
+ /**
42
+ * Types that glide the shared indicator only when laid out vertically. `assistant` collapses its
43
+ * labels horizontally, so there the active tab is resizing and the surface has to live on the tab
44
+ * itself; a vertical rail keeps every label at a fixed width, which removes that constraint and lets
45
+ * the indicator simply slide between rows.
46
+ */
47
+ const Z_TABS_VERTICAL_GLIDE_TYPES = ['assistant'];
48
+ /**
49
+ * Types that collapse an inactive tab down to its icon and expand the active one to icon + label,
50
+ * which only applies to a horizontal strip. These paint the active surface on the tab itself rather
51
+ * than on a shared indicator, so the surface grows with the label instead of chasing a box whose
52
+ * width is still animating.
53
+ */
54
+ const Z_TABS_COLLAPSING_LABEL_TYPES = ['assistant'];
55
+ /** Types that also glide a muted highlight behind the hovered tab. */
56
+ const Z_TABS_HOVER_GLIDE_TYPES = ['underline-hover'];
57
+
58
+ /** Hands out a fresh, monotonically increasing id for scoping each `z-tabs` instance's cache key. */
59
+ const zTabsInstanceIds = (() => {
60
+ let counter = 0;
61
+ return { next: () => ++counter };
62
+ })();
63
+ /**
64
+ * Counter-scales the indicator's corner radius across the glide so a box that is being scaled still
65
+ * renders the radius its design calls for, instead of stretched oval caps.
66
+ */
67
+ function zTabsRadiusKeyframes(radius, scaleX, scaleY) {
68
+ const steps = 16;
69
+ return Array.from({ length: steps }, (_, index) => {
70
+ const progress = index / (steps - 1);
71
+ const x = scaleX + (1 - scaleX) * progress;
72
+ const y = scaleY + (1 - scaleY) * progress;
73
+ return { borderRadius: `${radius / x}px / ${radius / y}px` };
74
+ });
75
+ }
76
+ /** Queues low-priority work on idle time, falling back to a timer where `requestIdleCallback` is missing. */
77
+ function zTabsRequestIdle(task, timeout = 200) {
78
+ if (typeof window === 'undefined') {
79
+ return 0;
80
+ }
81
+ const idle = window.requestIdleCallback;
82
+ return idle ? idle(() => task(), { timeout }) : window.setTimeout(task, 0);
83
+ }
84
+ /** Cancels a handle returned by `zTabsRequestIdle`, regardless of which scheduler produced it. */
85
+ function zTabsCancelIdle(handle) {
86
+ if (!handle || typeof window === 'undefined') {
87
+ return;
88
+ }
89
+ const cancel = window.cancelIdleCallback;
90
+ if (cancel) {
91
+ cancel(handle);
92
+ return;
93
+ }
94
+ window.clearTimeout(handle);
95
+ }
96
+ function zTabsMeasure(button) {
97
+ const container = button.offsetParent ?? button.parentElement;
98
+ if (!container) {
99
+ return { x: button.offsetLeft, y: button.offsetTop, w: button.offsetWidth, h: button.offsetHeight };
100
+ }
101
+ const buttonRect = button.getBoundingClientRect();
102
+ const containerRect = container.getBoundingClientRect();
103
+ return {
104
+ x: buttonRect.left - containerRect.left,
105
+ y: buttonRect.top - containerRect.top,
106
+ w: buttonRect.width,
107
+ h: buttonRect.height,
108
+ };
109
+ }
110
+ function zTabsBoxEquals(a, b) {
111
+ if (!a) {
112
+ return false;
113
+ }
114
+ return a.x === b.x && a.y === b.y && a.w === b.w && a.h === b.h;
115
+ }
116
+ /**
117
+ * Keyframes for the entering panel, per `zContentAnimation`. `slide` and `blur` travel along the tab
118
+ * strip's own axis so the content appears to come from the tab that was clicked; `direction` is 1 when
119
+ * moving further down the list and -1 when moving back.
120
+ *
121
+ * Only `blur` animates a filter — it repaints the panel each frame, which is why the distance and
122
+ * duration are kept small.
123
+ */
124
+ function zTabsContentKeyframes(animation, direction, vertical) {
125
+ const offset = 16 * (direction >= 0 ? 1 : -1);
126
+ const from = vertical ? `translateY(${offset}px)` : `translateX(${offset}px)`;
127
+ if (animation === 'slide') {
128
+ return {
129
+ keyframes: [
130
+ { opacity: 0, transform: from },
131
+ { opacity: 1, transform: 'none' },
132
+ ],
133
+ options: { duration: 260, easing: 'cubic-bezier(0.22, 1, 0.36, 1)', fill: 'both' },
134
+ };
135
+ }
136
+ if (animation === 'blur') {
137
+ return {
138
+ keyframes: [
139
+ { opacity: 0, filter: 'blur(0.25rem)', transform: from },
140
+ { opacity: 1, filter: 'none', transform: 'none' },
141
+ ],
142
+ options: { duration: 240, easing: 'ease-out', fill: 'both' },
143
+ };
144
+ }
145
+ if (animation === 'scale') {
146
+ return {
147
+ keyframes: [
148
+ { opacity: 0, transform: 'scale(0.97)' },
149
+ { opacity: 1, transform: 'none' },
150
+ ],
151
+ options: { duration: 220, easing: 'cubic-bezier(0.22, 1, 0.36, 1)', fill: 'both' },
152
+ };
153
+ }
154
+ return {
155
+ keyframes: [{ opacity: 0 }, { opacity: 1 }],
156
+ options: { duration: 180, easing: 'ease-out', fill: 'both' },
157
+ };
158
+ }
159
+
160
+ const zBarePillTabs = 'relative gap-0.5 rounded-full bg-transparent p-0 dark:bg-transparent';
161
+ const zBarePillTabItem = 'z-10 shrink-0 rounded-full border-0 text-muted-foreground hover:text-foreground data-[active=true]:text-primary-foreground';
162
+ const zTabsVariants = cva('z-tabs flex min-w-0', {
163
+ variants: {
164
+ zType: {
165
+ line: 'gap-0',
166
+ soft: 'gap-1 bg-background p-0 dark:bg-transparent',
167
+ segment: 'relative gap-1 rounded-sm bg-muted/60 p-1 dark:bg-muted/35',
168
+ 'segment-solid': 'relative gap-1 rounded-sm bg-muted/60 p-1 dark:bg-muted/35',
169
+ 'pill-solid': 'relative gap-1 rounded-full bg-muted/60 p-1 dark:bg-muted/35',
170
+ 'pill-blur': 'relative gap-1 rounded-full bg-muted/40 p-1 backdrop-blur-md dark:bg-muted/20',
171
+ 'pill-float': zBarePillTabs,
172
+ 'pill-primary': zBarePillTabs,
173
+ assistant: 'relative w-full gap-1 rounded-(--radius-pill) bg-muted p-1 dark:bg-muted/40',
174
+ 'underline-hover': 'relative gap-0 rounded-none bg-transparent p-0 dark:bg-transparent',
175
+ bar: 'relative gap-1 rounded-none bg-transparent p-0 dark:bg-transparent',
176
+ folder: 'isolate gap-0 bg-background p-0 dark:bg-transparent',
177
+ 'folder-soft': 'isolate gap-0 bg-background p-0 dark:bg-transparent',
178
+ 'folder-solid': 'isolate gap-0 bg-background p-0 dark:bg-transparent',
179
+ underline: 'gap-0',
180
+ underlined: 'gap-0 rounded-none bg-background p-0 dark:bg-transparent',
181
+ badge: 'gap-0 rounded-none bg-background p-0 dark:bg-transparent',
182
+ sharp: 'gap-1 rounded-none bg-background p-0 dark:bg-transparent',
183
+ 'sharp-line': 'gap-0 rounded-none bg-background p-0 dark:bg-transparent',
184
+ 'sharp-line-filled': 'gap-0 rounded-none bg-background p-0 dark:bg-transparent',
185
+ square: 'gap-0 rounded-none bg-background p-0 dark:bg-transparent',
186
+ 'vertical-sharp': 'gap-1 rounded-none bg-background p-0 dark:bg-transparent',
187
+ 'code-line': 'h-10 w-full justify-start gap-0 rounded-none bg-background p-0 dark:bg-transparent',
188
+ },
189
+ zOrientation: {
190
+ horizontal: 'w-max flex-row items-center',
191
+ vertical: 'w-full flex-col items-stretch gap-1 border-b-0',
192
+ },
193
+ },
194
+ defaultVariants: {
195
+ zType: 'line',
196
+ zOrientation: 'horizontal',
197
+ },
198
+ compoundVariants: [
199
+ {
200
+ zType: 'assistant',
201
+ zOrientation: 'vertical',
202
+ class: 'rounded-sm bg-muted/40 p-1 dark:bg-muted/25',
203
+ },
204
+ {
205
+ zType: 'bar',
206
+ zOrientation: 'vertical',
207
+ class: 'gap-2 border-border border-e pe-4',
208
+ },
209
+ {
210
+ zType: 'vertical-sharp',
211
+ zOrientation: 'vertical',
212
+ class: 'border-r-0 pr-0',
213
+ },
214
+ {
215
+ zType: 'sharp-line',
216
+ zOrientation: 'vertical',
217
+ class: 'gap-0',
218
+ },
219
+ {
220
+ zType: 'sharp-line-filled',
221
+ zOrientation: 'vertical',
222
+ class: 'gap-0',
223
+ },
224
+ ],
225
+ });
226
+ const zTabItemVariants = cva('z-tab-item relative inline-flex min-h-10 select-none items-center justify-center gap-2 whitespace-nowrap font-medium text-sm leading-none text-muted-foreground transition-[color,background-color,border-color,box-shadow,transform] duration-200 outline-none focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 cursor-pointer disabled:opacity-45 disabled:cursor-not-allowed', {
227
+ variants: {
228
+ zType: {
229
+ line: 'rounded-none border-0 hover:text-foreground data-[active=true]:text-primary after:pointer-events-none after:absolute after:inset-x-0 after:bottom-[-1px] after:h-1 after:bg-primary after:origin-center after:scale-x-0 after:transition-transform after:duration-200 data-[active=true]:after:scale-x-100',
230
+ soft: 'rounded-sm border-0 text-muted-foreground hover:text-foreground data-[active=true]:bg-primary/10 data-[active=true]:text-primary data-[active=true]:shadow-xs! dark:data-[active=true]:bg-primary/15',
231
+ segment: 'z-10 rounded-sm border-0 text-muted-foreground hover:text-foreground data-[active=true]:text-primary',
232
+ 'segment-solid': 'z-10 rounded-sm border-0 text-muted-foreground hover:text-foreground data-[active=true]:text-primary-foreground',
233
+ 'pill-solid': 'z-10 rounded-full border-0 text-muted-foreground hover:text-foreground data-[active=true]:text-primary',
234
+ 'pill-blur': 'z-10 rounded-full border-0 text-muted-foreground hover:text-foreground data-[active=true]:text-primary',
235
+ 'pill-float': zBarePillTabItem,
236
+ 'pill-primary': zBarePillTabItem,
237
+ assistant: 'z-10 flex-1 justify-center gap-1.5 rounded-(--radius-pill) border-0 text-muted-foreground hover:text-foreground data-[active=true]:text-primary-foreground',
238
+ 'underline-hover': 'z-10 shrink-0 rounded-none border-0 bg-transparent text-muted-foreground hover:text-foreground data-[active=true]:text-foreground',
239
+ bar: 'z-10 gap-3 rounded-sm border-0 bg-transparent text-muted-foreground hover:text-foreground data-[active=true]:text-primary',
240
+ folder: 'rounded-t-sm border-0 bg-transparent text-muted-foreground shadow-[inset_0_-1px_0_var(--border)] hover:text-foreground focus-visible:ring-0 focus-visible:ring-offset-0 data-[active=true]:z-[2] data-[active=true]:bg-background data-[active=true]:text-primary data-[active=true]:shadow-[inset_1px_0_0_var(--border),inset_-1px_0_0_var(--border),inset_0_1px_0_var(--border)]',
241
+ 'folder-soft': 'rounded-t-sm border-0 bg-transparent text-muted-foreground shadow-[inset_0_-1px_0_var(--border)] hover:text-foreground focus-visible:ring-0 focus-visible:ring-offset-0 data-[active=true]:z-[2] data-[active=true]:bg-primary/10 data-[active=true]:text-primary data-[active=true]:shadow-[inset_1px_0_0_var(--border),inset_-1px_0_0_var(--border),inset_0_1px_0_var(--border)] dark:data-[active=true]:bg-primary/15',
242
+ 'folder-solid': 'rounded-t-sm border-0 bg-transparent text-muted-foreground shadow-[inset_0_-1px_0_var(--border)] hover:text-foreground focus-visible:ring-0 focus-visible:ring-offset-0 data-[active=true]:z-[2] data-[active=true]:bg-primary data-[active=true]:text-primary-foreground data-[active=true]:shadow-[inset_1px_0_0_var(--primary),inset_-1px_0_0_var(--primary),inset_0_1px_0_var(--primary)]',
243
+ underline: 'hover:text-foreground data-[active=true]:text-primary after:pointer-events-none after:absolute after:inset-x-1 after:bottom-[-1px] after:h-[0.1875rem] after:bg-primary after:origin-center after:scale-x-0 after:transition-transform after:duration-200 data-[active=true]:after:scale-x-100',
244
+ underlined: 'rounded-none border-0 border-b-2 border-b-transparent! bg-background text-foreground/60 hover:text-foreground data-[active=true]:border-b-primary! data-[active=true]:bg-primary/10 data-[active=true]:text-primary data-[active=true]:shadow-sm!',
245
+ badge: 'rounded-none border-0 border-b-2 border-b-transparent! bg-background text-foreground/60 hover:text-foreground data-[active=true]:border-b-primary! data-[active=true]:bg-primary/10 data-[active=true]:text-primary data-[active=true]:shadow-none',
246
+ sharp: 'rounded-none border border-border/45 border-b-[3px] bg-background text-foreground/60 hover:text-foreground data-[active=true]:border-primary! data-[active=true]:border-b-primary! data-[active=true]:text-primary',
247
+ 'sharp-line': 'rounded-none first:rounded-l-sm last:rounded-r-sm border border-border/45 border-b-[3px] bg-background text-foreground/60 hover:text-foreground data-[active=true]:border-primary! data-[active=true]:border-b-primary! data-[active=true]:text-primary',
248
+ 'sharp-line-filled': 'rounded-none first:rounded-l-sm last:rounded-r-sm border border-border/45 border-b-[3px] bg-background text-foreground/60 hover:text-foreground data-[active=true]:border-primary! data-[active=true]:border-b-primary! data-[active=true]:bg-primary/30 data-[active=true]:text-primary',
249
+ square: 'rounded-none border border-border/45 border-b-[3px] bg-background text-foreground/60 hover:text-foreground data-[active=true]:border-primary! data-[active=true]:border-b-primary! data-[active=true]:bg-primary/15 data-[active=true]:text-primary',
250
+ 'vertical-sharp': 'rounded-none border border-transparent border-b-[3px] bg-background text-foreground/60 hover:text-foreground data-[active=true]:border-primary data-[active=true]:bg-primary/10 data-[active=true]:text-primary data-[active=true]:shadow-none',
251
+ 'code-line': 'relative inline-flex h-full min-h-8 flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-none first:rounded-l-sm last:rounded-r-sm border border-border/45 border-b-2 bg-background px-4 py-1.5 font-medium text-foreground/60 transition-all hover:text-foreground data-[active=true]:relative data-[active=true]:z-[1] data-[active=true]:-mb-px data-[active=true]:border-x-primary/70! data-[active=true]:border-t-primary/70! data-[active=true]:border-b-primary! data-[active=true]:bg-primary/30 data-[active=true]:text-primary data-[active=true]:shadow-none [&_span.z-tab-item-label]:font-mono [&_span.z-tab-item-label]:text-[13px]',
252
+ },
253
+ zSize: {
254
+ xs: 'min-h-8 px-2.5 py-1 text-xs',
255
+ sm: 'min-h-9 px-3 py-1.5 text-sm',
256
+ default: 'min-h-10 px-4 py-2 text-sm',
257
+ lg: 'min-h-[2.625rem] px-4.5 py-2.25 text-sm',
258
+ },
259
+ zOrientation: {
260
+ horizontal: '',
261
+ vertical: 'justify-start px-3 py-2',
262
+ },
263
+ },
264
+ compoundVariants: [
265
+ {
266
+ zType: 'line',
267
+ zOrientation: 'vertical',
268
+ class: 'w-full justify-start rounded-sm data-[active=true]:shadow-xs',
269
+ },
270
+ {
271
+ zType: 'soft',
272
+ zOrientation: 'vertical',
273
+ class: 'w-full justify-start rounded-sm data-[active=true]:bg-primary/10 data-[active=true]:shadow-xs dark:data-[active=true]:bg-primary/15',
274
+ },
275
+ {
276
+ zType: 'segment',
277
+ zOrientation: 'vertical',
278
+ class: 'w-full justify-start rounded-sm data-[active=true]:bg-background data-[active=true]:shadow-xs dark:data-[active=true]:border-border!',
279
+ },
280
+ {
281
+ zType: 'segment-solid',
282
+ zOrientation: 'vertical',
283
+ class: 'w-full justify-start rounded-sm data-[active=true]:bg-primary data-[active=true]:text-primary-foreground data-[active=true]:shadow-xs',
284
+ },
285
+ {
286
+ zType: 'pill-solid',
287
+ zOrientation: 'vertical',
288
+ class: 'w-full justify-start rounded-full data-[active=true]:bg-background data-[active=true]:shadow-sm dark:data-[active=true]:border-border!',
289
+ },
290
+ {
291
+ zType: 'pill-blur',
292
+ zOrientation: 'vertical',
293
+ class: 'w-full justify-start rounded-full backdrop-blur-md data-[active=true]:bg-background/70 data-[active=true]:shadow-sm',
294
+ },
295
+ {
296
+ zType: 'pill-float',
297
+ zOrientation: 'vertical',
298
+ class: 'w-full justify-start rounded-full data-[active=true]:bg-primary data-[active=true]:text-primary-foreground data-[active=true]:shadow-sm',
299
+ },
300
+ {
301
+ zType: 'pill-primary',
302
+ zOrientation: 'vertical',
303
+ class: 'w-full justify-start rounded-full',
304
+ },
305
+ {
306
+ zType: 'assistant',
307
+ zOrientation: 'vertical',
308
+ class: 'w-full justify-start rounded-sm',
309
+ },
310
+ {
311
+ zType: 'underline-hover',
312
+ zOrientation: 'vertical',
313
+ class: 'w-full justify-start rounded-none px-4 py-2.5',
314
+ },
315
+ {
316
+ zType: 'bar',
317
+ zOrientation: 'vertical',
318
+ class: 'w-full justify-start rounded-sm px-4 py-2.5',
319
+ },
320
+ {
321
+ zType: 'folder',
322
+ zOrientation: 'vertical',
323
+ class: 'w-full justify-start rounded-sm data-[active=true]:shadow-xs',
324
+ },
325
+ {
326
+ zType: 'folder-soft',
327
+ zOrientation: 'vertical',
328
+ class: 'w-full justify-start rounded-sm data-[active=true]:shadow-xs',
329
+ },
330
+ {
331
+ zType: 'folder-solid',
332
+ zOrientation: 'vertical',
333
+ class: 'w-full justify-start rounded-sm data-[active=true]:shadow-xs',
334
+ },
335
+ {
336
+ zType: 'underline',
337
+ zOrientation: 'vertical',
338
+ class: 'w-full justify-start rounded-sm data-[active=true]:shadow-xs',
339
+ },
340
+ {
341
+ zType: 'underlined',
342
+ zOrientation: 'vertical',
343
+ class: 'w-full justify-start rounded-none data-[active=true]:shadow-xs',
344
+ },
345
+ {
346
+ zType: 'badge',
347
+ zOrientation: 'vertical',
348
+ class: 'w-full justify-start rounded-none data-[active=true]:shadow-xs',
349
+ },
350
+ {
351
+ zType: 'sharp',
352
+ zOrientation: 'vertical',
353
+ class: 'w-full justify-start rounded-none data-[active=true]:shadow-xs',
354
+ },
355
+ {
356
+ zType: 'sharp-line',
357
+ zOrientation: 'vertical',
358
+ class: 'w-full justify-start rounded-none data-[active=true]:shadow-xs',
359
+ },
360
+ {
361
+ zType: 'sharp-line-filled',
362
+ zOrientation: 'vertical',
363
+ class: 'w-full justify-start rounded-none data-[active=true]:shadow-xs',
364
+ },
365
+ {
366
+ zType: 'square',
367
+ zOrientation: 'vertical',
368
+ class: 'w-full justify-start rounded-none data-[active=true]:shadow-xs',
369
+ },
370
+ {
371
+ zType: 'vertical-sharp',
372
+ zOrientation: 'vertical',
373
+ class: 'w-full justify-start rounded-none border border-transparent border-b-[3px] px-3 py-1.5 data-[active=true]:border-primary data-[active=true]:shadow-xs',
374
+ },
375
+ {
376
+ zType: 'code-line',
377
+ zSize: 'xs',
378
+ zOrientation: 'horizontal',
379
+ class: 'min-h-7 px-3 py-1 text-xs [&_span.z-tab-item-label]:text-xs',
380
+ },
381
+ {
382
+ zType: 'code-line',
383
+ zSize: 'sm',
384
+ zOrientation: 'horizontal',
385
+ class: 'min-h-8 px-3.5 py-1.5 text-sm',
386
+ },
387
+ {
388
+ zType: 'code-line',
389
+ zSize: 'default',
390
+ zOrientation: 'horizontal',
391
+ class: 'min-h-8 px-4 py-1.5 text-sm',
392
+ },
393
+ {
394
+ zType: 'code-line',
395
+ zSize: 'lg',
396
+ zOrientation: 'horizontal',
397
+ class: 'min-h-9 px-4.5 py-2 text-sm',
398
+ },
399
+ {
400
+ zType: 'code-line',
401
+ zOrientation: 'vertical',
402
+ class: 'h-auto w-full flex-none justify-start rounded-none px-3 py-2 data-[active=true]:shadow-xs',
403
+ },
404
+ ],
405
+ defaultVariants: {
406
+ zType: 'line',
407
+ zSize: 'default',
408
+ zOrientation: 'horizontal',
409
+ },
410
+ });
411
+
412
+ class ZTabsComponent {
413
+ tabPanels = contentChildren(ZTabPanelDirective, /* @ts-ignore */
414
+ ...(ngDevMode ? [{ debugName: "tabPanels" }] : /* istanbul ignore next */ []));
415
+ tabsListContainer = viewChild('tabsListContainer', /* @ts-ignore */
416
+ ...(ngDevMode ? [{ debugName: "tabsListContainer" }] : /* istanbul ignore next */ []));
417
+ tabButtons = viewChildren('tabButton', /* @ts-ignore */
418
+ ...(ngDevMode ? [{ debugName: "tabButtons" }] : /* istanbul ignore next */ []));
419
+ glideIndicator = viewChild('glideIndicator', /* @ts-ignore */
420
+ ...(ngDevMode ? [{ debugName: "glideIndicator" }] : /* istanbul ignore next */ []));
421
+ hoverIndicator = viewChild('hoverIndicator', /* @ts-ignore */
422
+ ...(ngDevMode ? [{ debugName: "hoverIndicator" }] : /* istanbul ignore next */ []));
423
+ tabsList = viewChild('tabsList', /* @ts-ignore */
424
+ ...(ngDevMode ? [{ debugName: "tabsList" }] : /* istanbul ignore next */ []));
425
+ panelsHost = viewChild('panelsHost', /* @ts-ignore */
426
+ ...(ngDevMode ? [{ debugName: "panelsHost" }] : /* istanbul ignore next */ []));
427
+ panelHost = viewChild('panelHost', { ...(ngDevMode ? { debugName: "panelHost" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
428
+ class = input('', /* @ts-ignore */
429
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
430
+ zTabs = input.required(/* @ts-ignore */
431
+ ...(ngDevMode ? [{ debugName: "zTabs" }] : /* istanbul ignore next */ []));
432
+ zType = input('line', /* @ts-ignore */
433
+ ...(ngDevMode ? [{ debugName: "zType" }] : /* istanbul ignore next */ []));
434
+ zSize = input('default', /* @ts-ignore */
435
+ ...(ngDevMode ? [{ debugName: "zSize" }] : /* istanbul ignore next */ []));
436
+ zOrientation = input('horizontal', /* @ts-ignore */
437
+ ...(ngDevMode ? [{ debugName: "zOrientation" }] : /* istanbul ignore next */ []));
438
+ zContentFit = input('none', /* @ts-ignore */
439
+ ...(ngDevMode ? [{ debugName: "zContentFit" }] : /* istanbul ignore next */ []));
440
+ zContentAnimation = input('fade', /* @ts-ignore */
441
+ ...(ngDevMode ? [{ debugName: "zContentAnimation" }] : /* istanbul ignore next */ []));
442
+ zLazy = input(false, /* @ts-ignore */
443
+ ...(ngDevMode ? [{ debugName: "zLazy" }] : /* istanbul ignore next */ []));
444
+ zTabsOnly = input(false, /* @ts-ignore */
445
+ ...(ngDevMode ? [{ debugName: "zTabsOnly" }] : /* istanbul ignore next */ []));
446
+ zShowNavWrapper = input(false, /* @ts-ignore */
447
+ ...(ngDevMode ? [{ debugName: "zShowNavWrapper" }] : /* istanbul ignore next */ []));
448
+ zNavFullWidth = input(false, /* @ts-ignore */
449
+ ...(ngDevMode ? [{ debugName: "zNavFullWidth" }] : /* istanbul ignore next */ []));
450
+ zClassContent = input('', /* @ts-ignore */
451
+ ...(ngDevMode ? [{ debugName: "zClassContent" }] : /* istanbul ignore next */ []));
452
+ zShowContentWrapper = input(true, /* @ts-ignore */
453
+ ...(ngDevMode ? [{ debugName: "zShowContentWrapper" }] : /* istanbul ignore next */ []));
454
+ zReloadable = input(true, /* @ts-ignore */
455
+ ...(ngDevMode ? [{ debugName: "zReloadable" }] : /* istanbul ignore next */ []));
456
+ zEmitOnActiveClick = input(true, /* @ts-ignore */
457
+ ...(ngDevMode ? [{ debugName: "zEmitOnActiveClick" }] : /* istanbul ignore next */ []));
458
+ zCache = input(true, /* @ts-ignore */
459
+ ...(ngDevMode ? [{ debugName: "zCache" }] : /* istanbul ignore next */ []));
460
+ zCacheKey = input('', /* @ts-ignore */
461
+ ...(ngDevMode ? [{ debugName: "zCacheKey" }] : /* istanbul ignore next */ []));
462
+ zWithDropdown = input('150px', /* @ts-ignore */
463
+ ...(ngDevMode ? [{ debugName: "zWithDropdown" }] : /* istanbul ignore next */ []));
464
+ activeTab = model('', /* @ts-ignore */
465
+ ...(ngDevMode ? [{ debugName: "activeTab" }] : /* istanbul ignore next */ []));
466
+ zTabChange = output();
467
+ renderedTab = signal('', /* @ts-ignore */
468
+ ...(ngDevMode ? [{ debugName: "renderedTab" }] : /* istanbul ignore next */ []));
469
+ canScrollLeft = signal(false, /* @ts-ignore */
470
+ ...(ngDevMode ? [{ debugName: "canScrollLeft" }] : /* istanbul ignore next */ []));
471
+ canScrollRight = signal(false, /* @ts-ignore */
472
+ ...(ngDevMode ? [{ debugName: "canScrollRight" }] : /* istanbul ignore next */ []));
473
+ bouncingTab = signal(null, /* @ts-ignore */
474
+ ...(ngDevMode ? [{ debugName: "bouncingTab" }] : /* istanbul ignore next */ []));
475
+ hoveredTab = signal(null, /* @ts-ignore */
476
+ ...(ngDevMode ? [{ debugName: "hoveredTab" }] : /* istanbul ignore next */ []));
477
+ isGlideType = computed(() => {
478
+ const type = this.zType();
479
+ if (Z_TABS_OMNI_GLIDE_TYPES.includes(type)) {
480
+ return true;
481
+ }
482
+ if (Z_TABS_VERTICAL_GLIDE_TYPES.includes(type)) {
483
+ return this.zOrientation() === 'vertical';
484
+ }
485
+ return Z_TABS_GLIDE_TYPES.includes(type) && this.zOrientation() === 'horizontal';
486
+ }, /* @ts-ignore */
487
+ ...(ngDevMode ? [{ debugName: "isGlideType" }] : /* istanbul ignore next */ []));
488
+ isHoverGlideType = computed(() => Z_TABS_HOVER_GLIDE_TYPES.includes(this.zType()), /* @ts-ignore */
489
+ ...(ngDevMode ? [{ debugName: "isHoverGlideType" }] : /* istanbul ignore next */ []));
490
+ _hasCollapsingLabel = computed(() => Z_TABS_COLLAPSING_LABEL_TYPES.includes(this.zType()) && this.zOrientation() === 'horizontal', /* @ts-ignore */
491
+ ...(ngDevMode ? [{ debugName: "_hasCollapsingLabel" }] : /* istanbul ignore next */ []));
492
+ /**
493
+ * A vertical rail truncates long labels, so it gets a tooltip. `assistant` never does: it collapses
494
+ * inactive labels by design, and a tooltip on every icon turns browsing the strip into a popup storm.
495
+ */
496
+ showsTabTooltip = computed(() => this.zOrientation() === 'vertical' && this.zType() !== 'assistant', /* @ts-ignore */
497
+ ...(ngDevMode ? [{ debugName: "showsTabTooltip" }] : /* istanbul ignore next */ []));
498
+ _resizeObserver;
499
+ _scrollFrame;
500
+ _zone = inject(NgZone);
501
+ _mountedPanel = '';
502
+ _panelView;
503
+ _retiredViews = [];
504
+ _teardownHandle;
505
+ _glideBox;
506
+ _hoverBox;
507
+ _glidePending = false;
508
+ _glideAnimations = [];
509
+ _contentAnimation;
510
+ _lastActiveIndex = -1;
511
+ _contentDirection = 1;
512
+ _viewReady = false;
513
+ _cacheInstanceId = zTabsInstanceIds.next();
514
+ constructor() {
515
+ effect(() => {
516
+ this.zTabs();
517
+ this._outsideFrame(() => this.checkScroll());
518
+ });
519
+ effect(() => {
520
+ this.activeTab();
521
+ this.zTabs();
522
+ this.isGlideType();
523
+ this._glidePending = true;
524
+ this._outsideFrame(() => this._updateGlideIndicator());
525
+ });
526
+ effect(() => {
527
+ this.hoveredTab();
528
+ this.isHoverGlideType();
529
+ this._outsideFrame(() => this._updateHoverIndicator());
530
+ });
531
+ effect(() => {
532
+ this.activeTab();
533
+ this.zTabs();
534
+ this._hasCollapsingLabel();
535
+ this.zOrientation();
536
+ this._outsideFrame(() => this._updateCollapsingLabels());
537
+ });
538
+ effect(() => {
539
+ const active = this.activeTab();
540
+ this.zContentAnimation();
541
+ untracked(() => this._trackContentDirection(active));
542
+ });
543
+ effect(() => {
544
+ const active = this.activeTab();
545
+ this.zLazy();
546
+ untracked(() => this._scheduleCommit(active));
547
+ });
548
+ effect(() => {
549
+ const host = this.panelHost();
550
+ const rendered = this.renderedTab();
551
+ const panels = this.tabPanels();
552
+ untracked(() => this._swapPanelView(host, rendered, panels));
553
+ });
554
+ }
555
+ ngOnInit() {
556
+ this._restoreActiveTabFromCache();
557
+ }
558
+ ngAfterViewInit() {
559
+ this._viewReady = true;
560
+ this.checkScroll();
561
+ this._setupResizeObserver();
562
+ this._outsideFrame(() => this._updateGlideIndicator());
563
+ }
564
+ ngOnDestroy() {
565
+ zTabsCancelIdle(this._teardownHandle);
566
+ for (const view of [...this._retiredViews, this._panelView]) {
567
+ view?.destroy();
568
+ }
569
+ this._retiredViews = [];
570
+ this._resizeObserver?.disconnect();
571
+ for (const animation of this._glideAnimations) {
572
+ animation.cancel();
573
+ }
574
+ this._contentAnimation?.cancel();
575
+ if (this._scrollFrame !== undefined) {
576
+ cancelAnimationFrame(this._scrollFrame);
577
+ }
578
+ }
579
+ tabsClasses = computed(() => zMergeClasses(zTabsVariants({
580
+ zType: this.zType(),
581
+ zOrientation: this.zOrientation(),
582
+ }), this.zNavFullWidth() ? 'w-full' : '', this.class()), /* @ts-ignore */
583
+ ...(ngDevMode ? [{ debugName: "tabsClasses" }] : /* istanbul ignore next */ []));
584
+ contentWrapperFramed = computed(() => {
585
+ if (!this.zShowContentWrapper()) {
586
+ return false;
587
+ }
588
+ if (this.zOrientation() === 'vertical') {
589
+ return false;
590
+ }
591
+ const type = this.zType();
592
+ return (type === 'folder' ||
593
+ type === 'folder-soft' ||
594
+ type === 'folder-solid' ||
595
+ type === 'sharp' ||
596
+ type === 'sharp-line' ||
597
+ type === 'sharp-line-filled' ||
598
+ type === 'square' ||
599
+ type === 'code-line');
600
+ }, /* @ts-ignore */
601
+ ...(ngDevMode ? [{ debugName: "contentWrapperFramed" }] : /* istanbul ignore next */ []));
602
+ tabsListHasBottomPadding = computed(() => {
603
+ if (this.zOrientation() !== 'horizontal') {
604
+ return false;
605
+ }
606
+ const type = this.zType();
607
+ return (type !== 'folder' &&
608
+ type !== 'folder-soft' &&
609
+ type !== 'folder-solid' &&
610
+ type !== 'segment' &&
611
+ type !== 'segment-solid' &&
612
+ type !== 'pill-solid' &&
613
+ type !== 'pill-blur' &&
614
+ type !== 'pill-float' &&
615
+ type !== 'pill-primary' &&
616
+ type !== 'assistant' &&
617
+ type !== 'underline-hover' &&
618
+ type !== 'bar' &&
619
+ type !== 'sharp' &&
620
+ type !== 'sharp-line' &&
621
+ type !== 'sharp-line-filled' &&
622
+ type !== 'square' &&
623
+ type !== 'code-line');
624
+ }, /* @ts-ignore */
625
+ ...(ngDevMode ? [{ debugName: "tabsListHasBottomPadding" }] : /* istanbul ignore next */ []));
626
+ verticalTabsScrollable = computed(() => this.zOrientation() === 'vertical' && this.zTabs().length > 8, /* @ts-ignore */
627
+ ...(ngDevMode ? [{ debugName: "verticalTabsScrollable" }] : /* istanbul ignore next */ []));
628
+ navClasses = computed(() => zMergeClasses('z-tabs-nav flex items-center gap-1.5', this.zClassContent()), /* @ts-ignore */
629
+ ...(ngDevMode ? [{ debugName: "navClasses" }] : /* istanbul ignore next */ []));
630
+ tabItems = computed(() => {
631
+ const activeValue = this.activeTab();
632
+ const classes = this._tabItemClasses();
633
+ return this.zTabs().map(tab => ({
634
+ tab,
635
+ classes,
636
+ isActive: activeValue === tab.value,
637
+ }));
638
+ }, /* @ts-ignore */
639
+ ...(ngDevMode ? [{ debugName: "tabItems" }] : /* istanbul ignore next */ []));
640
+ _tabItemClasses = computed(() => zMergeClasses(zTabItemVariants({
641
+ zType: this.zType(),
642
+ zSize: this.zSize(),
643
+ zOrientation: this.zOrientation(),
644
+ })), /* @ts-ignore */
645
+ ...(ngDevMode ? [{ debugName: "_tabItemClasses" }] : /* istanbul ignore next */ []));
646
+ selectTab(tab, scrollToView = true) {
647
+ if (tab.disabled) {
648
+ return;
649
+ }
650
+ const isAlreadyActive = this.activeTab() === tab.value;
651
+ if (isAlreadyActive && !this.zReloadable()) {
652
+ return;
653
+ }
654
+ this.activeTab.set(tab.value);
655
+ this._saveActiveTabToCache(tab.value);
656
+ if (this.isGlideType()) {
657
+ this.bouncingTab.set(tab.value);
658
+ setTimeout(() => {
659
+ if (this.bouncingTab() === tab.value) {
660
+ this.bouncingTab.set(null);
661
+ }
662
+ }, 320);
663
+ }
664
+ if (!isAlreadyActive || this.zEmitOnActiveClick()) {
665
+ this.zTabChange.emit(tab.value);
666
+ }
667
+ if (scrollToView && this.zOrientation() === 'horizontal') {
668
+ this._outsideFrame(() => {
669
+ const tabIndex = this.zTabs().findIndex(t => t.value === tab.value);
670
+ const tabButtonsList = this.tabButtons();
671
+ const tabButton = tabButtonsList[tabIndex];
672
+ if (tabButton) {
673
+ const alignTabInViewport = () => {
674
+ const container = this.tabsListContainer()?.nativeElement;
675
+ if (!container) {
676
+ return;
677
+ }
678
+ const containerRect = container.getBoundingClientRect();
679
+ const tabRect = tabButton.nativeElement.getBoundingClientRect();
680
+ const centeredScrollLeft = container.scrollLeft + tabRect.left - containerRect.left - (container.clientWidth - tabRect.width) / 2;
681
+ const maxScrollLeft = container.scrollWidth - container.clientWidth;
682
+ container.scrollTo({
683
+ left: Math.max(0, Math.min(centeredScrollLeft, maxScrollLeft)),
684
+ behavior: 'smooth',
685
+ });
686
+ };
687
+ alignTabInViewport();
688
+ }
689
+ });
690
+ }
691
+ }
692
+ onTabKeydown(event, currentIndex) {
693
+ const tabs = this.zTabs().filter(t => !t.disabled);
694
+ const currentTab = tabs[currentIndex];
695
+ if (!currentTab) {
696
+ return;
697
+ }
698
+ const isHorizontal = this.zOrientation() === 'horizontal';
699
+ const nextKey = isHorizontal ? 'ArrowRight' : 'ArrowDown';
700
+ const prevKey = isHorizontal ? 'ArrowLeft' : 'ArrowUp';
701
+ if (event.key === nextKey) {
702
+ event.preventDefault();
703
+ const nextIndex = (currentIndex + 1) % tabs.length;
704
+ this.selectTab(tabs[nextIndex]);
705
+ return;
706
+ }
707
+ if (event.key === prevKey) {
708
+ event.preventDefault();
709
+ const prevIndex = (currentIndex - 1 + tabs.length) % tabs.length;
710
+ this.selectTab(tabs[prevIndex]);
711
+ return;
712
+ }
713
+ if (event.key === 'Home') {
714
+ event.preventDefault();
715
+ this.selectTab(tabs[0]);
716
+ return;
717
+ }
718
+ if (event.key === 'End') {
719
+ event.preventDefault();
720
+ this.selectTab(tabs[tabs.length - 1]);
721
+ }
722
+ }
723
+ /**
724
+ * Keyboard focus moves the highlight too, so tabbing through the strip reads the same as hovering.
725
+ * Every type pays the listener, but only the hover-glide types get past the guard into a signal write.
726
+ */
727
+ onTabHover(tab) {
728
+ if (!this.isHoverGlideType() || tab.disabled || this.hoveredTab() === tab.value) {
729
+ return;
730
+ }
731
+ this.hoveredTab.set(tab.value);
732
+ }
733
+ onTabHoverEnd() {
734
+ if (!this.isHoverGlideType() || this.hoveredTab() === null) {
735
+ return;
736
+ }
737
+ this.hoveredTab.set(null);
738
+ }
739
+ checkScroll() {
740
+ const container = this.tabsListContainer()?.nativeElement;
741
+ if (!container || this.zOrientation() !== 'horizontal') {
742
+ this.canScrollLeft.set(false);
743
+ this.canScrollRight.set(false);
744
+ return;
745
+ }
746
+ const { scrollLeft, scrollWidth, clientWidth } = container;
747
+ const maxScrollLeft = scrollWidth - clientWidth;
748
+ if (maxScrollLeft <= Z_TABS_SCROLL_TOLERANCE) {
749
+ container.scrollLeft = 0;
750
+ this.canScrollLeft.set(false);
751
+ this.canScrollRight.set(false);
752
+ return;
753
+ }
754
+ this.canScrollLeft.set(scrollLeft > Z_TABS_SCROLL_TOLERANCE);
755
+ this.canScrollRight.set(maxScrollLeft - scrollLeft > Z_TABS_SCROLL_TOLERANCE);
756
+ }
757
+ scrollLeft() {
758
+ const container = this.tabsListContainer()?.nativeElement;
759
+ if (!container) {
760
+ return;
761
+ }
762
+ container.scrollBy({ left: -200, behavior: 'smooth' });
763
+ setTimeout(() => this.checkScroll(), 300);
764
+ }
765
+ scrollRight() {
766
+ const container = this.tabsListContainer()?.nativeElement;
767
+ if (!container) {
768
+ return;
769
+ }
770
+ container.scrollBy({ left: 200, behavior: 'smooth' });
771
+ setTimeout(() => this.checkScroll(), 300);
772
+ }
773
+ onTabsScroll() {
774
+ if (this._scrollFrame !== undefined) {
775
+ return;
776
+ }
777
+ // Smooth-scrolling the strip fires this every frame; measuring once per frame keeps the forced
778
+ // layout from piling up while the glide animation runs.
779
+ this._scrollFrame = this._outsideFrame(() => {
780
+ this._scrollFrame = undefined;
781
+ this.checkScroll();
782
+ });
783
+ }
784
+ /**
785
+ * Commits the new panel on the next frame, so the tab strip paints its new state before a heavy
786
+ * subtree is built. Nothing longer is needed: the glide runs on the compositor, so the mount that
787
+ * follows cannot stall it — waiting out the animation would only make content feel late.
788
+ */
789
+ _scheduleCommit(value) {
790
+ if (!value) {
791
+ return;
792
+ }
793
+ if (!this.zLazy() || !this._viewReady || typeof requestAnimationFrame === 'undefined') {
794
+ this._commitPanel(value);
795
+ return;
796
+ }
797
+ // Deliberately inside the Angular zone: this instantiates the consumer's panel content.
798
+ requestAnimationFrame(() => this._commitPanel(value));
799
+ }
800
+ _commitPanel(value) {
801
+ if (this.activeTab() !== value) {
802
+ return;
803
+ }
804
+ this.renderedTab.set(value);
805
+ }
806
+ /**
807
+ * Sizes the indicator once, then moves it with a transform-only animation. Transform is the one
808
+ * property the compositor can tick by itself, so a busy main thread — a heavy panel mounting, the
809
+ * host's own work — cannot drop frames from the glide. A second animation counter-scales the corner
810
+ * radius; that one only repaints a small element and degrades to a late radius, never a stalled pill.
811
+ */
812
+ _updateGlideIndicator() {
813
+ const element = this.glideIndicator()?.nativeElement;
814
+ if (!this.isGlideType() || !element) {
815
+ this._glideBox = undefined;
816
+ return;
817
+ }
818
+ const activeIndex = this.zTabs().findIndex(tab => tab.value === this.activeTab());
819
+ const button = this.tabButtons()[activeIndex]?.nativeElement;
820
+ if (!button) {
821
+ return;
822
+ }
823
+ const next = zTabsMeasure(button);
824
+ const previous = this._glideBox;
825
+ const moved = !zTabsBoxEquals(previous, next);
826
+ // A tab change arms the glide; whichever call observes the new geometry first plays it, and later
827
+ // calls for the same geometry leave the running animation alone.
828
+ const shouldGlide = this._glidePending && Boolean(previous) && !this._prefersReducedMotion();
829
+ if (!moved) {
830
+ return;
831
+ }
832
+ this._glidePending = false;
833
+ this._glideBox = next;
834
+ for (const animation of this._glideAnimations) {
835
+ animation.cancel();
836
+ }
837
+ this._glideAnimations = [];
838
+ element.style.width = `${next.w}px`;
839
+ element.style.height = `${next.h}px`;
840
+ element.style.transform = `translate(${next.x}px, ${next.y}px)`;
841
+ element.style.borderRadius = '';
842
+ element.style.opacity = '1';
843
+ // jsdom and older SSR shims ship no Web Animations API; the indicator simply snaps there.
844
+ if (!shouldGlide || !previous || typeof element.animate !== 'function') {
845
+ return;
846
+ }
847
+ const scaleX = previous.w / next.w;
848
+ const scaleY = previous.h / next.h;
849
+ // Both animations share one timing so the radius correction tracks the transform's progress exactly.
850
+ const options = { duration: 480, easing: 'cubic-bezier(0.22, 1, 0.36, 1)' };
851
+ this._glideAnimations.push(element.animate([
852
+ { transform: `translate(${previous.x}px, ${previous.y}px) scale(${scaleX}, ${scaleY})` },
853
+ { transform: `translate(${next.x}px, ${next.y}px)` },
854
+ ], options));
855
+ const radius = Math.min(parseFloat(getComputedStyle(element).borderTopLeftRadius) || 0, next.w / 2, next.h / 2);
856
+ if (radius > 0) {
857
+ this._glideAnimations.push(element.animate(zTabsRadiusKeyframes(radius, scaleX, scaleY), options));
858
+ }
859
+ }
860
+ /**
861
+ * Swaps the visible panel. The incoming view is built and bound while it is still off-document, so
862
+ * none of that work triggers style, layout or paint; only the final insert does. The outgoing view is
863
+ * detached immediately — it leaves the DOM at once — and destroyed off the critical path, keeping
864
+ * teardown out of the frame the user clicked in. It is still destroyed, so panels re-initialise.
865
+ */
866
+ _swapPanelView(host, value, panels) {
867
+ if (!host || !this.zLazy() || !value || this._mountedPanel === value) {
868
+ return;
869
+ }
870
+ const panel = panels.find(item => item.zTabPanel() === value);
871
+ if (!panel) {
872
+ return;
873
+ }
874
+ if (host.length > 0) {
875
+ host.detach(0);
876
+ }
877
+ if (this._panelView) {
878
+ this._retiredViews.push(this._panelView);
879
+ }
880
+ const view = panel.template.createEmbeddedView({});
881
+ view.detectChanges();
882
+ host.insert(view);
883
+ this._panelView = view;
884
+ this._mountedPanel = value;
885
+ this._scheduleTeardown();
886
+ // The lazy path knows the exact moment the panel lands, so it plays the enter animation itself
887
+ // instead of waiting for the frame the eager path has to.
888
+ this._animateContent();
889
+ }
890
+ _scheduleTeardown() {
891
+ if (this._retiredViews.length === 0 || this._teardownHandle !== undefined) {
892
+ return;
893
+ }
894
+ this._teardownHandle = zTabsRequestIdle(() => {
895
+ this._teardownHandle = undefined;
896
+ const retired = this._retiredViews;
897
+ this._retiredViews = [];
898
+ for (const view of retired) {
899
+ view.destroy();
900
+ }
901
+ });
902
+ }
903
+ /**
904
+ * Records which way the strip travelled so `slide`/`blur` can enter from the side the user clicked
905
+ * towards. Effects run after the active-panel binding has updated, so the eager path can animate
906
+ * immediately and avoid painting one unanimated frame before the enter state is applied.
907
+ */
908
+ _trackContentDirection(active) {
909
+ const index = this.zTabs().findIndex(tab => tab.value === active);
910
+ if (index === -1) {
911
+ return;
912
+ }
913
+ const hadActiveTab = this._lastActiveIndex !== -1;
914
+ if (hadActiveTab) {
915
+ this._contentDirection = index >= this._lastActiveIndex ? 1 : -1;
916
+ }
917
+ this._lastActiveIndex = index;
918
+ if (!this.zLazy() && hadActiveTab) {
919
+ // Let Angular finish the active-panel binding, then start before the browser paints. Waiting
920
+ // for another RAF lets one unanimated frame flash through, which reads as a small jump.
921
+ queueMicrotask(() => this._animateContent());
922
+ }
923
+ }
924
+ /**
925
+ * Animates the entering panel. Everything but `blur` is transform/opacity only, so the animation
926
+ * ticks on the compositor and a heavy panel mounting in the same frame cannot stall it.
927
+ */
928
+ _animateContent() {
929
+ const animation = this.zContentAnimation();
930
+ this._contentAnimation?.cancel();
931
+ this._contentAnimation = undefined;
932
+ if (animation === 'none' || this.zTabsOnly() || this._prefersReducedMotion()) {
933
+ return;
934
+ }
935
+ const panel = this.panelsHost()?.nativeElement?.querySelector('[role="tabpanel"][data-state="active"]');
936
+ if (!panel || typeof panel.animate !== 'function') {
937
+ return;
938
+ }
939
+ const { keyframes, options } = zTabsContentKeyframes(animation, this._contentDirection, this.zOrientation() === 'vertical');
940
+ this._contentAnimation = panel.animate(keyframes, options);
941
+ }
942
+ /**
943
+ * `width: auto` cannot be interpolated, so the label's own content width is measured and written as
944
+ * an explicit pixel width for the stylesheet to transition from zero. `scrollWidth` reports that
945
+ * content width even while the element is clamped to zero and hidden, so no reflow-forcing dance is
946
+ * needed. The active surface lives on the tab itself for these types, which is what lets the pill
947
+ * grow in step with the label rather than chase a box that is still resizing.
948
+ */
949
+ _updateCollapsingLabels() {
950
+ if (!this._hasCollapsingLabel()) {
951
+ return;
952
+ }
953
+ for (const button of this.tabButtons()) {
954
+ const label = button.nativeElement.querySelector('.z-tab-item-label');
955
+ if (!label) {
956
+ continue;
957
+ }
958
+ const isActive = button.nativeElement.dataset['active'] === 'true';
959
+ label.style.width = isActive ? `${label.scrollWidth}px` : '0px';
960
+ }
961
+ }
962
+ /**
963
+ * Moves the muted highlight onto the hovered tab. The first placement jumps into position and only
964
+ * fades in — gliding it in from a stale box would read as a stray rectangle crossing the strip.
965
+ */
966
+ _updateHoverIndicator() {
967
+ const element = this.hoverIndicator()?.nativeElement;
968
+ if (!this.isHoverGlideType() || !element) {
969
+ this._hoverBox = undefined;
970
+ return;
971
+ }
972
+ const hovered = this.hoveredTab();
973
+ if (!hovered) {
974
+ element.style.opacity = '0';
975
+ this._hoverBox = undefined;
976
+ return;
977
+ }
978
+ const index = this.zTabs().findIndex(tab => tab.value === hovered);
979
+ const button = this.tabButtons()[index]?.nativeElement;
980
+ if (!button) {
981
+ return;
982
+ }
983
+ const next = zTabsMeasure(button);
984
+ if (zTabsBoxEquals(this._hoverBox, next)) {
985
+ return;
986
+ }
987
+ const isFirstPlacement = !this._hoverBox;
988
+ this._hoverBox = next;
989
+ if (isFirstPlacement) {
990
+ element.style.transition = 'opacity 150ms ease-out';
991
+ }
992
+ element.style.width = `${next.w}px`;
993
+ element.style.height = `${next.h}px`;
994
+ element.style.transform = `translate(${next.x}px, ${next.y}px)`;
995
+ element.style.opacity = '1';
996
+ if (isFirstPlacement) {
997
+ // Hand the transition back to the stylesheet so the next hover glides instead of jumping.
998
+ this._outsideFrame(() => {
999
+ element.style.transition = '';
1000
+ });
1001
+ }
1002
+ }
1003
+ /**
1004
+ * Measurement and imperative DOM work never needs a change-detection tick of its own. With zone.js a
1005
+ * plain `requestAnimationFrame` schedules one per callback — wasteful during a smooth scroll, which
1006
+ * fires every frame. Signal writes made inside still schedule change detection on their own.
1007
+ */
1008
+ _outsideFrame(task) {
1009
+ return this._zone.runOutsideAngular(() => requestAnimationFrame(task));
1010
+ }
1011
+ _prefersReducedMotion() {
1012
+ return typeof window !== 'undefined' && Boolean(window.matchMedia?.('(prefers-reduced-motion: reduce)').matches);
1013
+ }
1014
+ _setupResizeObserver() {
1015
+ const container = this.tabsListContainer()?.nativeElement ?? this.tabsList()?.nativeElement;
1016
+ if (!container) {
1017
+ return;
1018
+ }
1019
+ this._resizeObserver = new ResizeObserver(() => {
1020
+ this.checkScroll();
1021
+ this._updateGlideIndicator();
1022
+ this._updateHoverIndicator();
1023
+ });
1024
+ this._resizeObserver.observe(container);
1025
+ }
1026
+ _restoreActiveTabFromCache() {
1027
+ if (!this.zCache()) {
1028
+ return;
1029
+ }
1030
+ const cacheKey = this._getCacheKey();
1031
+ const cachedTab = ZCacheService.get(cacheKey);
1032
+ if (!cachedTab) {
1033
+ return;
1034
+ }
1035
+ const tab = this.zTabs().find(item => item.value === cachedTab && !item.disabled);
1036
+ if (!tab) {
1037
+ return;
1038
+ }
1039
+ this.activeTab.set(tab.value);
1040
+ }
1041
+ _saveActiveTabToCache(value) {
1042
+ if (!this.zCache()) {
1043
+ return;
1044
+ }
1045
+ ZCacheService.set(this._getCacheKey(), value);
1046
+ }
1047
+ _getCacheKey() {
1048
+ const customKey = this.zCacheKey().trim();
1049
+ if (customKey) {
1050
+ return customKey;
1051
+ }
1052
+ const path = typeof window === 'undefined' ? 'ssr' : window.location.pathname;
1053
+ return `z-tabs:${path}:${this._cacheInstanceId}`;
1054
+ }
1055
+ scrollToActiveDropdownItem() {
1056
+ setTimeout(() => {
1057
+ const activeIndex = this.zTabs().findIndex(tab => tab.value === this.activeTab());
1058
+ if (activeIndex === -1) {
1059
+ return;
1060
+ }
1061
+ const dropdownMenu = document.querySelector('.z-tabs-dropdown-menu');
1062
+ if (!dropdownMenu) {
1063
+ return;
1064
+ }
1065
+ const dropdownItems = Array.from(dropdownMenu.querySelectorAll('button'));
1066
+ const activeItem = dropdownItems[activeIndex];
1067
+ if (activeItem && dropdownMenu) {
1068
+ const menuRect = dropdownMenu.getBoundingClientRect();
1069
+ const itemRect = activeItem.getBoundingClientRect();
1070
+ const scrollTop = activeItem.offsetTop - menuRect.height / 2 + itemRect.height / 2;
1071
+ dropdownMenu.scrollTo({
1072
+ top: scrollTop,
1073
+ behavior: 'smooth',
1074
+ });
1075
+ }
1076
+ }, 150);
1077
+ }
1078
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ZTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1079
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.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 }, zType: { classPropertyName: "zType", publicName: "zType", 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 }, zContentFit: { classPropertyName: "zContentFit", publicName: "zContentFit", isSignal: true, isRequired: false, transformFunction: null }, zContentAnimation: { classPropertyName: "zContentAnimation", publicName: "zContentAnimation", isSignal: true, isRequired: false, transformFunction: null }, zLazy: { classPropertyName: "zLazy", publicName: "zLazy", isSignal: true, isRequired: false, transformFunction: null }, zTabsOnly: { classPropertyName: "zTabsOnly", publicName: "zTabsOnly", isSignal: true, isRequired: false, transformFunction: null }, zShowNavWrapper: { classPropertyName: "zShowNavWrapper", publicName: "zShowNavWrapper", isSignal: true, isRequired: false, transformFunction: null }, zNavFullWidth: { classPropertyName: "zNavFullWidth", publicName: "zNavFullWidth", isSignal: true, isRequired: false, transformFunction: null }, zClassContent: { classPropertyName: "zClassContent", publicName: "zClassContent", isSignal: true, isRequired: false, transformFunction: null }, zShowContentWrapper: { classPropertyName: "zShowContentWrapper", publicName: "zShowContentWrapper", isSignal: true, isRequired: false, transformFunction: null }, zReloadable: { classPropertyName: "zReloadable", publicName: "zReloadable", isSignal: true, isRequired: false, transformFunction: null }, zEmitOnActiveClick: { classPropertyName: "zEmitOnActiveClick", publicName: "zEmitOnActiveClick", isSignal: true, isRequired: false, transformFunction: null }, zCache: { classPropertyName: "zCache", publicName: "zCache", isSignal: true, isRequired: false, transformFunction: null }, zCacheKey: { classPropertyName: "zCacheKey", publicName: "zCacheKey", isSignal: true, isRequired: false, transformFunction: null }, zWithDropdown: { classPropertyName: "zWithDropdown", publicName: "zWithDropdown", 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 }, { propertyName: "glideIndicator", first: true, predicate: ["glideIndicator"], descendants: true, isSignal: true }, { propertyName: "hoverIndicator", first: true, predicate: ["hoverIndicator"], descendants: true, isSignal: true }, { propertyName: "tabsList", first: true, predicate: ["tabsList"], descendants: true, isSignal: true }, { propertyName: "panelsHost", first: true, predicate: ["panelsHost"], descendants: true, isSignal: true }, { propertyName: "panelHost", first: true, predicate: ["panelHost"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "<div\n class=\"z-tabs-container flex gap-1\"\n [attr.data-type]=\"zType()\"\n [attr.data-orientation]=\"zOrientation()\"\n [attr.data-content-fit]=\"zContentFit()\"\n [class.flex-col]=\"!zTabsOnly()\"\n [class.flex-row]=\"zOrientation() === 'vertical'\"\n [class.gap-4]=\"zOrientation() === 'vertical'\">\n <!-- Tabs Navigation (Left/Scroll/Tabs/Right/Dropdown) -->\n <div\n [class]=\"navClasses()\"\n [class.z-tabs-nav-surface]=\"zShowNavWrapper() && isGlideType()\"\n [class.w-full]=\"zOrientation() === 'horizontal' && (!zShowNavWrapper() || zNavFullWidth())\"\n [class.w-fit]=\"zOrientation() === 'horizontal' && zShowNavWrapper() && !zNavFullWidth()\"\n [class.max-w-full]=\"zOrientation() === 'horizontal' && zShowNavWrapper() && !zNavFullWidth()\"\n [class.w-auto]=\"zOrientation() === 'vertical'\"\n [class.shrink-0]=\"zOrientation() === 'vertical'\">\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=\"z-tabs-nav-control z-tabs-nav-prev 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\n class=\"z-tabs-scroll-container relative min-w-0 flex-1\"\n [class.z-tabs-scroll-container-surface]=\"(canScrollLeft() || canScrollRight()) && !zShowNavWrapper()\"\n [attr.data-type]=\"zType()\">\n @if (zOrientation() === 'vertical') {\n <ng-scrollbar\n class=\"z-tabs-scroll-wrapper z-tabs-scrollbar vertical\"\n [class.z-tabs-scroll-wrapper-limited]=\"verticalTabsScrollable()\"\n track=\"vertical\"\n orientation=\"vertical\"\n appearance=\"compact\"\n visibility=\"hover\">\n <ng-container *ngTemplateOutlet=\"tabsListTpl\" />\n </ng-scrollbar>\n } @else {\n <div\n #tabsListContainer\n class=\"z-tabs-scroll-wrapper\"\n [class.z-tabs-scroll-wrapper-scrollable]=\"canScrollLeft() || canScrollRight()\"\n [class.z-tabs-scroll-wrapper-fade-left]=\"canScrollLeft()\"\n [class.z-tabs-scroll-wrapper-fade-right]=\"canScrollRight()\"\n (scroll)=\"onTabsScroll()\">\n <ng-container *ngTemplateOutlet=\"tabsListTpl\" />\n </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=\"z-tabs-nav-control z-tabs-nav-next shrink-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=\"z-tabs-nav-control z-tabs-nav-menu shrink-0\"\n z-popover\n [zPopoverContent]=\"dropdownTpl\"\n zPosition=\"bottom-right\"\n [zWave]=\"false\"\n zClass=\"min-w-[6.25rem] max-w-[12.5rem]\"\n (zShow)=\"scrollToActiveDropdownItem()\"\n aria-label=\"Select tab\">\n <z-icon zType=\"lucideChevronDown\" zSize=\"16\" />\n </z-button>\n }\n </div>\n\n <ng-template #tabsListTpl>\n <!-- Tab List -->\n <div\n #tabsList\n [class]=\"tabsClasses()\"\n [class.pb-0.5]=\"tabsListHasBottomPadding()\"\n role=\"tablist\"\n [attr.aria-orientation]=\"zOrientation()\"\n [attr.data-type]=\"zType()\">\n @if (isHoverGlideType()) {\n <div\n #hoverIndicator\n class=\"z-tabs-hover-indicator pointer-events-none absolute top-0 left-0 z-[5]\"\n [attr.data-type]=\"zType()\"\n aria-hidden=\"true\"></div>\n }\n @if (isGlideType()) {\n <div\n #glideIndicator\n class=\"z-tabs-glide-indicator pointer-events-none absolute top-0 left-0 z-[6]\"\n [attr.data-type]=\"zType()\"\n aria-hidden=\"true\"></div>\n }\n @for (item of tabItems(); track item.tab.value; let idx = $index; let last = $last) {\n <button\n #tabButton\n type=\"button\"\n role=\"tab\"\n [class]=\"item.classes\"\n [class.z-tab-item-has-icon]=\"!!item.tab.icon || !!item.tab.iconTemplate\"\n [attr.data-active]=\"item.isActive\"\n [attr.data-state]=\"item.isActive ? 'active' : 'inactive'\"\n [attr.data-type]=\"zType()\"\n [attr.data-orientation]=\"zOrientation()\"\n [attr.data-last]=\"last\"\n [attr.aria-selected]=\"item.isActive\"\n [attr.aria-controls]=\"'panel-' + item.tab.value\"\n [disabled]=\"item.tab.disabled\"\n [tabindex]=\"item.isActive ? 0 : -1\"\n z-tooltip\n [zContent]=\"showsTabTooltip() ? (item.tab.label | translate) : ''\"\n zPosition=\"top\"\n [zHideDelay]=\"0\"\n [zOffset]=\"5\"\n [zArrow]=\"false\"\n (click)=\"selectTab(item.tab)\"\n (keydown)=\"onTabKeydown($event, idx)\"\n (mouseenter)=\"onTabHover(item.tab)\"\n (mouseleave)=\"onTabHoverEnd()\"\n (focus)=\"onTabHover(item.tab)\"\n (blur)=\"onTabHoverEnd()\">\n @if (item.tab.iconTemplate) {\n <span class=\"shrink-0\" [class.z-tab-icon-bounce]=\"isGlideType() && bouncingTab() === item.tab.value\">\n <ng-container *ngTemplateOutlet=\"item.tab.iconTemplate; context: { $implicit: item.tab }\" />\n </span>\n } @else if (item.tab.icon) {\n <z-icon\n [zType]=\"item.tab.icon\"\n zSize=\"16\"\n class=\"shrink-0\"\n [class.z-tab-icon-bounce]=\"isGlideType() && bouncingTab() === item.tab.value\" />\n }\n <span\n class=\"z-tab-item-label min-w-0 flex-1 truncate text-left\"\n [class.z-tab-icon-bounce]=\"isGlideType() && bouncingTab() === item.tab.value\">\n {{ item.tab.label | translate }}\n </span>\n @if (item.tab.badge) {\n <span\n class=\"ring-background ml-1.5 inline-flex h-5 min-w-5 items-center justify-center rounded-(--radius-pill) px-1.5 text-xs font-semibold ring-2\"\n [class.bg-primary]=\"zType() !== 'badge'\"\n [class.text-primary-foreground]=\"zType() !== 'badge'\"\n [class.bg-primary!]=\"zType() === 'badge'\"\n [class.text-primary-foreground!]=\"zType() === 'badge'\">\n {{ item.tab.badge }}\n </span>\n }\n </button>\n }\n </div>\n </ng-template>\n\n <!-- Tab Panels -->\n @if (!zTabsOnly()) {\n <div\n #panelsHost\n class=\"z-tabs-panels min-h-0\"\n [class.flex-1]=\"zOrientation() === 'vertical'\"\n [class.shadow-xs]=\"contentWrapperFramed()\"\n [class.z-tabs-panels-unwrapped]=\"!contentWrapperFramed()\">\n @if (!zLazy()) {\n @for (panel of tabPanels(); track panel.zTabPanel()) {\n <div\n role=\"tabpanel\"\n [id]=\"'panel-' + panel.zTabPanel()\"\n [attr.aria-labelledby]=\"panel.zTabPanel()\"\n [attr.data-state]=\"activeTab() === panel.zTabPanel() ? 'active' : 'inactive'\"\n [attr.inert]=\"activeTab() === panel.zTabPanel() ? null : ''\">\n <ng-container *ngTemplateOutlet=\"panel.template\" />\n </div>\n }\n } @else if (renderedTab()) {\n <div role=\"tabpanel\" [id]=\"'panel-' + renderedTab()\" [attr.aria-labelledby]=\"renderedTab()\" data-state=\"active\">\n <ng-container #panelHost />\n </div>\n }\n </div>\n }\n</div>\n\n<!-- Dropdown Menu Template -->\n<ng-template #dropdownTpl let-close=\"close\">\n <div\n zHoverGlide\n zHoverGlideClass=\"bg-muted/70 rounded-(--radius-sm)\"\n class=\"z-tabs-dropdown-menu flex max-h-[18.75rem] flex-col gap-0.5 overflow-y-auto p-1\"\n [style.width]=\"zWithDropdown()\"\n [style.min-width]=\"zWithDropdown()\"\n [style.max-width]=\"zWithDropdown()\">\n @for (item of tabItems(); track item.tab.value) {\n <button\n #dropdownItem\n type=\"button\"\n class=\"relative z-[1] flex w-full cursor-pointer items-center justify-start gap-2 rounded-sm px-2 py-1.5 text-left text-sm font-medium transition-colors outline-none disabled:pointer-events-none disabled:opacity-50\"\n data-glide-item\n [class.hover:text-foreground]=\"!item.isActive\"\n [class.focus:bg-primary/10]=\"!item.isActive\"\n [class.bg-primary/15]=\"item.isActive\"\n [class.text-primary]=\"item.isActive\"\n [disabled]=\"item.tab.disabled\"\n (click)=\"selectTab(item.tab, true); close()\">\n @if (item.tab.icon) {\n <z-icon [zType]=\"item.tab.icon\" zSize=\"16\" class=\"text-muted-foreground shrink-0\" />\n }\n <span\n class=\"min-w-0 flex-1 truncate\"\n z-tooltip\n [zContent]=\"item.tab.label | translate\"\n zPosition=\"top\"\n [zHideDelay]=\"0\"\n [zOffset]=\"5\"\n [zArrow]=\"false\"\n [zTriggerElement]=\"dropdownItem\">\n {{ item.tab.label | translate }}\n </span>\n @if (item.tab.badge) {\n <span\n class=\"bg-primary text-primary-foreground inline-flex h-5 min-w-5 items-center justify-center rounded-(--radius-pill) px-1.5 text-xs font-semibold\">\n {{ item.tab.badge }}\n </span>\n }\n @if (item.isActive) {\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:visible;overflow-y:visible;scrollbar-width:none;-ms-overflow-style:none;scroll-behavior:smooth}.z-tabs-scroll-wrapper::-webkit-scrollbar{display:none}.z-tabs-scroll-wrapper.vertical{overflow:visible}.z-tabs-scroll-wrapper.vertical.z-tabs-scroll-wrapper-limited{height:var(--z-tabs-vertical-max-height, min(22rem, 60vh));max-height:var(--z-tabs-vertical-max-height, min(22rem, 60vh));overflow:hidden auto}.z-tabs-scroll-wrapper.z-tabs-scroll-wrapper-scrollable{overflow-x:auto}.z-tabs-scroll-wrapper.z-tabs-scroll-wrapper-fade-left{mask-image:linear-gradient(to right,transparent 0,black var(--z-tabs-fade-width),black 100%);-webkit-mask-image:linear-gradient(to right,transparent 0,black var(--z-tabs-fade-width),black 100%)}.z-tabs-scroll-wrapper.z-tabs-scroll-wrapper-fade-right{mask-image:linear-gradient(to left,transparent 0,black var(--z-tabs-fade-width),black 100%);-webkit-mask-image:linear-gradient(to left,transparent 0,black var(--z-tabs-fade-width),black 100%)}.z-tabs-scroll-wrapper.z-tabs-scroll-wrapper-fade-left.z-tabs-scroll-wrapper-fade-right{mask-image:linear-gradient(to right,transparent 0,black var(--z-tabs-fade-width),black calc(100% - var(--z-tabs-fade-width)),transparent 100%);-webkit-mask-image:linear-gradient(to right,transparent 0,black var(--z-tabs-fade-width),black calc(100% - var(--z-tabs-fade-width)),transparent 100%)}.z-tabs-scrollbar{--scrollbar-padding: .125rem;--z-tabs-scrollbar-gutter: .75rem;--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in oklab, var(--muted-foreground) 35%, transparent);--scrollbar-thumb-hover-color: color-mix(in oklab, var(--muted-foreground) 55%, transparent);--scrollbar-size: .375rem;display:block}.z-tabs-scrollbar .ng-scroll-viewport,.z-tabs-scrollbar .ng-scroll-content{max-width:100%}.z-tabs-scrollbar.z-tabs-scroll-wrapper-limited .ng-scroll-viewport{height:100%;max-height:100%}.z-tabs-scrollbar .ng-scroll-content{box-sizing:border-box;padding-right:var(--z-tabs-scrollbar-gutter)}.z-tabs-scroll-container{isolation:isolate;--z-tabs-fade-width: 2rem}.z-tabs-container:is([data-type=segment],[data-type=segment-solid],[data-type=pill-solid],[data-type=pill-blur])>.z-tabs-nav>.z-tabs-scroll-container-surface{background:color-mix(in oklab,var(--background) 72%,var(--muted));border:.0625rem solid color-mix(in oklab,var(--background) 88%,var(--border));box-shadow:0 .0625rem .1875rem #0000000f,0 .125rem .5rem #00000014;backdrop-filter:blur(.75rem) saturate(140%);-webkit-backdrop-filter:blur(.75rem) saturate(140%)}.z-tabs-container:is([data-type=segment],[data-type=segment-solid],[data-type=pill-solid],[data-type=pill-blur])>.z-tabs-nav>.z-tabs-scroll-container-surface .z-tabs{background:transparent}.z-tabs-container:is([data-type=segment],[data-type=segment-solid])>.z-tabs-nav>.z-tabs-scroll-container-surface{border-radius:var(--radius-sm);overflow:hidden}.z-tabs-container:is([data-type=pill-solid],[data-type=pill-blur])>.z-tabs-nav>.z-tabs-scroll-container-surface{border-radius:9999px;overflow:hidden}.dark .z-tabs-container:is([data-type=segment],[data-type=segment-solid],[data-type=pill-solid],[data-type=pill-blur])>.z-tabs-nav>.z-tabs-scroll-container-surface{background:color-mix(in oklab,var(--muted) 35%,transparent);border-color:color-mix(in oklab,var(--border) 65%,transparent);box-shadow:0 .0625rem .1875rem #0000002e,0 .125rem .5rem #0000003d}.z-tabs{align-items:stretch;min-height:2.5rem}.z-tabs.flex-col{width:100%}.z-tabs.flex-col.border-r{border-right:.0625rem solid hsl(var(--border));padding-right:.5rem}.z-tabs-nav-control{transition:color .2s ease,background-color .2s ease,border-color .2s ease}.z-tabs-nav-surface{border:0;border-radius:var(--radius-sm);padding-block:0;box-shadow:0 0 0 .0625rem color-mix(in oklab,oklch(95% 0 0deg) 88%,var(--border)),0 .0625rem .1875rem #0000000f,0 .125rem .5rem #00000014}.z-tabs-container:is([data-type=pill-solid],[data-type=pill-blur],[data-type=pill-float],[data-type=pill-primary],[data-type=assistant]) .z-tabs-nav-surface{border-radius:9999px}.dark .z-tabs-nav-surface{box-shadow:0 0 0 .0625rem color-mix(in oklab,var(--border) 65%,transparent),0 .0625rem .1875rem #0000002e,0 .125rem .5rem #0000003d}.z-tab-item{-webkit-tap-highlight-color:transparent;position:relative}.z-tab-item[data-active=true]{position:relative}.z-tab-item:disabled{pointer-events:none}.z-tabs-panels{border:.0625rem solid var(--border);border-radius:var(--radius-xs);padding:1rem}.z-tabs-panels [role=tabpanel][data-state=inactive]{content-visibility:hidden}@supports not (content-visibility: hidden){.z-tabs-panels [role=tabpanel][data-state=inactive]{display:none}}.z-tabs-panels-unwrapped{border:0;border-radius:0;padding:0}.z-tabs-wrapper .z-tabs.flex-row+.z-tabs-panels{margin-top:.875rem}.z-tabs-wrapper .z-tabs.flex-col+.z-tabs-panels{margin-top:0;margin-left:0}.z-tabs-container[data-orientation=horizontal]{gap:0}.z-tabs-container[data-orientation=horizontal] .z-tabs-scroll-container{z-index:1}.z-tabs-container[data-orientation=horizontal] .z-tabs-panels{margin-top:0}.z-tabs-container[data-content-fit=screen]{height:var(--z-tabs-screen-height, calc(100dvh - var(--z-tabs-screen-offset, 0rem)));max-height:var(--z-tabs-screen-height, calc(100dvh - var(--z-tabs-screen-offset, 0rem)));min-height:0;overflow:hidden}.z-tabs-container[data-content-fit=screen] .z-tabs-nav{flex:none;min-height:0}.z-tabs-container[data-content-fit=screen] .z-tabs-panels{flex:1 1 auto;min-height:0;overflow:auto}.z-tabs-container[data-content-fit=screen] [role=tabpanel]{min-height:0}.z-tabs-container[data-type=line][data-orientation=horizontal] .z-tabs{isolation:isolate;position:relative}.z-tabs-container[data-type=line][data-orientation=horizontal] .z-tabs .z-tab-item[data-active=true]{z-index:1}.z-tabs-container[data-type=line][data-orientation=horizontal] .z-tabs .z-tab-item[data-active=true]:after{z-index:1}.z-tabs-container[data-type=line][data-orientation=horizontal] .z-tabs:after{content:\"\";position:absolute;right:0;bottom:0;left:0;height:.0625rem;background:color-mix(in oklab,var(--border) 80%,transparent);pointer-events:none;z-index:0}.z-tabs-container:is([data-type=outline],[data-type=soft],[data-type=segment],[data-type=folder],[data-type=folder-soft],[data-type=folder-solid],[data-type=underline],[data-type=underlined],[data-type=badge],[data-type=sharp],[data-type=sharp-line],[data-type=sharp-line-filled],[data-type=square],[data-type=code-line])[data-orientation=horizontal] .z-tabs-scroll-wrapper{padding-inline:0}.z-tabs-container:is([data-type=outline],[data-type=soft],[data-type=segment],[data-type=folder],[data-type=folder-soft],[data-type=folder-solid],[data-type=underline],[data-type=underlined],[data-type=badge],[data-type=sharp],[data-type=sharp-line],[data-type=sharp-line-filled],[data-type=square],[data-type=code-line])[data-orientation=horizontal] .z-tabs-panels{border-radius:0 0 var(--radius-xs) var(--radius-xs)}.z-tabs-container:is([data-type=outline],[data-type=soft],[data-type=segment],[data-type=folder],[data-type=folder-soft],[data-type=folder-solid],[data-type=underline],[data-type=underlined],[data-type=badge],[data-type=sharp],[data-type=sharp-line],[data-type=sharp-line-filled],[data-type=square],[data-type=code-line])[data-orientation=horizontal] .z-tabs-panels-unwrapped{border:0;border-radius:0}.z-tabs-container:is([data-type=folder],[data-type=folder-soft],[data-type=folder-solid])[data-orientation=horizontal] .z-tabs-nav{position:relative}.z-tabs-container:is([data-type=folder],[data-type=folder-soft],[data-type=folder-solid])[data-orientation=horizontal] .z-tabs-nav:after{content:\"\";position:absolute;right:0;bottom:0;left:0;height:.0625rem;background:var(--border);pointer-events:none;z-index:0}.z-tabs-container:is([data-type=folder],[data-type=folder-soft],[data-type=folder-solid])[data-orientation=horizontal] .z-tabs-panels{border-top:0}.z-tabs-container[data-type=folder-solid][data-orientation=horizontal] .z-tab-item[data-active=true][data-last=true]{box-shadow:inset .0625rem 0 0 var(--primary),inset -.0625rem 0 0 var(--border),inset 0 .0625rem 0 var(--primary)}.z-tabs-container:is([data-type=segment],[data-type=segment-solid],[data-type=pill-solid],[data-type=pill-blur],[data-type=pill-float]) .z-tabs{align-items:center}.z-tabs-container:is([data-type=pill-primary],[data-type=assistant],[data-type=bar])[data-orientation=horizontal] .z-tabs{align-items:center}.z-tabs-container[data-type=pill-float][data-orientation=horizontal] .z-tabs-nav{position:relative;gap:0}.z-tabs-container[data-type=pill-float][data-orientation=horizontal] .z-tabs-scroll-container{--z-tabs-fade-width: 2.75rem}.z-tabs-container[data-type=pill-float][data-orientation=horizontal] .z-tabs-nav-control{position:absolute;top:50%;z-index:2;width:1.5rem;min-width:1.5rem;height:1.5rem;min-height:1.5rem;padding:0;border-radius:9999px;transform:translateY(-50%);background:color-mix(in oklab,var(--muted) 90%,var(--background));color:var(--foreground)}.z-tabs-container[data-type=pill-float][data-orientation=horizontal] .z-tabs-nav-control:hover{background:color-mix(in oklab,var(--muted) 70%,var(--foreground) 12%)}.z-tabs-container[data-type=pill-float][data-orientation=horizontal] .z-tabs-nav-prev{left:0}.z-tabs-container[data-type=pill-float][data-orientation=horizontal] .z-tabs-nav-next{right:0}.z-tabs-container[data-type=pill-float][data-orientation=horizontal] .z-tabs-nav-menu{display:none}.z-tabs-glide-indicator{transition:none;transform-origin:0 0;opacity:0;will-change:transform}.z-tabs-glide-indicator[data-type=segment],.z-tabs-glide-indicator[data-type=segment-solid]{border-radius:var(--radius-sm);overflow:hidden;background:var(--background);box-shadow:0 .0625rem .1875rem #00000014,0 .0625rem .125rem #0000000f}.z-tabs-glide-indicator[data-type=pill-solid],.z-tabs-glide-indicator[data-type=pill-blur],.z-tabs-glide-indicator[data-type=pill-float],.z-tabs-glide-indicator[data-type=pill-primary]{border-radius:9999px;overflow:hidden}.z-tabs-glide-indicator:is([data-type=pill-float],[data-type=pill-primary]){background:var(--primary);box-shadow:0 .0625rem .1875rem #0000001a,0 .0625rem .125rem #00000014}.z-tabs-glide-indicator[data-type=assistant]{border-radius:var(--radius-sm);background:var(--primary);box-shadow:0 .0625rem .125rem #0000000d}.z-tabs-glide-indicator[data-type=bar]{border-radius:var(--radius-sm);background:color-mix(in oklab,var(--primary) 10%,transparent);box-shadow:inset 0 0 0 .0625rem var(--background),0 .0625rem .1875rem #0000001a,0 .0625rem .125rem -.0625rem #0000001a}.dark .z-tabs-glide-indicator[data-type=bar]{box-shadow:inset 0 0 0 .0625rem color-mix(in oklab,white 12%,transparent),0 .125rem .5rem #00000059,0 .0625rem .125rem #0003}.z-tabs-glide-indicator[data-type=underline-hover]{background:transparent}.z-tabs-glide-indicator:is([data-type=bar],[data-type=underline-hover]):before{content:\"\";position:absolute;background:var(--primary);border-radius:9999px}.z-tabs-glide-indicator[data-type=pill-solid]{background:var(--background);box-shadow:0 .0625rem .1875rem #00000014,0 .0625rem .125rem #0000000f}.z-tabs-glide-indicator[data-type=segment-solid]{background:var(--primary)}.z-tabs-glide-indicator[data-type=pill-blur]{background:linear-gradient(to bottom,color-mix(in oklab,white 22%,transparent) 0%,color-mix(in oklab,white 6%,transparent) 45%,transparent 100%),color-mix(in oklab,var(--background) 55%,transparent);box-shadow:inset 0 0 0 1px color-mix(in oklab,white 25%,transparent),inset 0 .0625rem color-mix(in oklab,white 45%,transparent),0 .125rem .5rem #0000001a,0 .0625rem .125rem #0000000f;backdrop-filter:blur(.75rem) saturate(180%);-webkit-backdrop-filter:blur(.75rem) saturate(180%)}.dark .z-tabs-glide-indicator[data-type=pill-blur]{background:linear-gradient(to bottom,color-mix(in oklab,white 12%,transparent) 0%,color-mix(in oklab,white 3%,transparent) 45%,transparent 100%),color-mix(in oklab,var(--background) 45%,transparent);box-shadow:inset 0 0 0 1px color-mix(in oklab,white 10%,transparent),inset 0 .0625rem color-mix(in oklab,white 16%,transparent),0 .125rem .5rem #00000059,0 .0625rem .125rem #0003}.z-tabs-container[data-orientation=horizontal] .z-tabs-glide-indicator[data-type=bar]:before{right:25%;bottom:0;left:25%;height:.25rem;border-radius:9999px 9999px 0 0}.z-tabs-container[data-orientation=horizontal] .z-tabs-glide-indicator[data-type=underline-hover]:before{right:0;bottom:0;left:0;height:.125rem;border-radius:0}.z-tabs-container[data-orientation=vertical] .z-tabs-glide-indicator[data-type=bar]:before{inset:25% auto auto 0;width:.25rem;height:50%;border-radius:0 9999px 9999px 0}.z-tabs-container[data-orientation=vertical] .z-tabs-glide-indicator[data-type=underline-hover]:before{inset:0 0 auto auto;width:.125rem;height:100%;border-radius:0}.z-tabs-container:is([data-type=pill-primary],[data-type=assistant],[data-type=bar]) .z-tab-item:hover:not([data-active=true]):not(:disabled){background:color-mix(in oklab,var(--muted) 50%,transparent)}.z-tabs-container:is([data-type=pill-primary],[data-type=assistant],[data-type=underline-hover],[data-type=bar]) .z-tab-item:focus-visible{box-shadow:0 0 0 .1875rem color-mix(in oklab,var(--ring) 50%,transparent)!important}.z-tabs-hover-indicator{transform-origin:0 0;opacity:0;border-radius:var(--radius-sm);background:color-mix(in oklab,var(--muted) 70%,transparent);transition:transform .18s cubic-bezier(.22,1,.36,1),width .18s cubic-bezier(.22,1,.36,1),height .18s cubic-bezier(.22,1,.36,1),opacity .15s ease-out}.z-tabs-container[data-type=underline-hover] .z-tabs:after{content:\"\";position:absolute;background:color-mix(in oklab,var(--border) 80%,transparent);pointer-events:none;z-index:0}.z-tabs-container[data-type=underline-hover][data-orientation=horizontal] .z-tabs:after{right:0;bottom:0;left:0;height:.0625rem}.z-tabs-container[data-type=underline-hover][data-orientation=vertical] .z-tabs:after{top:0;right:0;bottom:0;width:.0625rem}.z-tabs-container[data-type=assistant][data-orientation=horizontal] .z-tab-item{transition:background-color .3s cubic-bezier(.4,0,.2,1),box-shadow .3s cubic-bezier(.4,0,.2,1),color .2s ease}.z-tabs-container[data-type=assistant][data-orientation=horizontal] .z-tab-item[data-active=true]{background:var(--primary);box-shadow:0 .0625rem .125rem #0000000d}.z-tabs-container[data-type=assistant][data-orientation=horizontal] .z-tab-item{gap:0}.z-tabs-container[data-type=assistant][data-orientation=horizontal] .z-tab-item.z-tab-item-has-icon .z-tab-item-label{flex:none;overflow:hidden;text-overflow:clip;margin-inline-start:.375rem;opacity:1;transition:width .3s cubic-bezier(.4,0,.2,1),margin-inline-start .3s cubic-bezier(.4,0,.2,1),opacity .2s ease-out}.z-tabs-container[data-type=assistant][data-orientation=horizontal] .z-tab-item.z-tab-item-has-icon[data-active=false] .z-tab-item-label{margin-inline-start:0;opacity:0}@keyframes z-tab-icon-bounce{0%{transform:scale(1)}35%{transform:scale(.97)}to{transform:scale(1)}}.z-tab-icon-bounce{animation:z-tab-icon-bounce .32s cubic-bezier(.34,1.56,.64,1)}.z-tabs-container[data-orientation=vertical] .z-tabs-nav{align-items:stretch}.z-tabs-container[data-orientation=vertical] .z-tabs-scroll-container{width:min(12rem,40vw);flex:none}.z-tabs-container[data-orientation=vertical] .z-tabs-panels,.z-tabs-container[data-orientation=vertical] .z-tab-item{min-width:0}@media(prefers-reduced-motion:reduce){.z-tab-item,.z-tabs-nav-control,.z-tabs-hover-indicator,.z-tabs-container[data-type=assistant] .z-tab-item,.z-tabs-container[data-type=assistant] .z-tab-item-label{transition:none!important}.z-tabs-scroll-wrapper{scroll-behavior:auto}.z-tab-icon-bounce{animation:none!important}}\n"], dependencies: [{ kind: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zAnimatedType", "zAnimate", "zAnimationTrigger", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "directive", type: ZHoverGlideDirective, selector: "[zHoverGlide]", inputs: ["zHoverGlideSelector", "zHoverGlideClass", "zHoverGlideDisabled"] }, { kind: "component", type: ZButtonComponent, selector: "z-button, button[z-button], a[z-button]", inputs: ["class", "zType", "zSize", "zShape", "zLabel", "zLoading", "zDisabled", "zTypeIcon", "zAnimatedTypeIcon", "zAnimateIcon", "zAnimationTriggerIcon", "zSizeIcon", "zStrokeWidthIcon", "zWave"], exportAs: ["zButton"] }, { kind: "directive", type: ZTooltipDirective, selector: "[z-tooltip], [zTooltip]", inputs: ["zContent", "zContext", "zPosition", "zTooltipPosition", "zTrigger", "zTooltipTrigger", "zTooltipType", "zTooltipSize", "zClass", "zTooltipClass", "zShowDelay", "zTooltipShowDelay", "zHideDelay", "zTooltipHideDelay", "zArrow", "zTooltipArrow", "zDisabled", "zTooltipDisabled", "zOffset", "zTooltipOffset", "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", "zPopoverTrigger", "zClass", "zShowDelay", "zHideDelay", "zDisabled", "zOffset", "zPopoverWidth", "zTriggerRef", "zManualClose", "zOutsideClickClose", "zScrollClose", "zSticky", "zShowArrow", "zKeyboardSafe"], outputs: ["zShow", "zHide", "zHideStart", "zControl", "zPositionChange", "zOutsideClick"], exportAs: ["zPopover"] }, { kind: "component", type: NgScrollbar, selector: "ng-scrollbar:not([externalViewport]), [ngScrollbar]", exportAs: ["ngScrollbar"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1080
+ }
1081
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ZTabsComponent, decorators: [{
1082
+ type: Component,
1083
+ args: [{ selector: 'z-tabs', imports: [
1084
+ ZIconComponent,
1085
+ ZHoverGlideDirective,
1086
+ ZButtonComponent,
1087
+ ZTooltipDirective,
1088
+ NgTemplateOutlet,
1089
+ ZPopoverDirective,
1090
+ TranslatePipe,
1091
+ NgScrollbar,
1092
+ ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
1093
+ class: 'z-tabs-wrapper block',
1094
+ }, template: "<div\n class=\"z-tabs-container flex gap-1\"\n [attr.data-type]=\"zType()\"\n [attr.data-orientation]=\"zOrientation()\"\n [attr.data-content-fit]=\"zContentFit()\"\n [class.flex-col]=\"!zTabsOnly()\"\n [class.flex-row]=\"zOrientation() === 'vertical'\"\n [class.gap-4]=\"zOrientation() === 'vertical'\">\n <!-- Tabs Navigation (Left/Scroll/Tabs/Right/Dropdown) -->\n <div\n [class]=\"navClasses()\"\n [class.z-tabs-nav-surface]=\"zShowNavWrapper() && isGlideType()\"\n [class.w-full]=\"zOrientation() === 'horizontal' && (!zShowNavWrapper() || zNavFullWidth())\"\n [class.w-fit]=\"zOrientation() === 'horizontal' && zShowNavWrapper() && !zNavFullWidth()\"\n [class.max-w-full]=\"zOrientation() === 'horizontal' && zShowNavWrapper() && !zNavFullWidth()\"\n [class.w-auto]=\"zOrientation() === 'vertical'\"\n [class.shrink-0]=\"zOrientation() === 'vertical'\">\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=\"z-tabs-nav-control z-tabs-nav-prev 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\n class=\"z-tabs-scroll-container relative min-w-0 flex-1\"\n [class.z-tabs-scroll-container-surface]=\"(canScrollLeft() || canScrollRight()) && !zShowNavWrapper()\"\n [attr.data-type]=\"zType()\">\n @if (zOrientation() === 'vertical') {\n <ng-scrollbar\n class=\"z-tabs-scroll-wrapper z-tabs-scrollbar vertical\"\n [class.z-tabs-scroll-wrapper-limited]=\"verticalTabsScrollable()\"\n track=\"vertical\"\n orientation=\"vertical\"\n appearance=\"compact\"\n visibility=\"hover\">\n <ng-container *ngTemplateOutlet=\"tabsListTpl\" />\n </ng-scrollbar>\n } @else {\n <div\n #tabsListContainer\n class=\"z-tabs-scroll-wrapper\"\n [class.z-tabs-scroll-wrapper-scrollable]=\"canScrollLeft() || canScrollRight()\"\n [class.z-tabs-scroll-wrapper-fade-left]=\"canScrollLeft()\"\n [class.z-tabs-scroll-wrapper-fade-right]=\"canScrollRight()\"\n (scroll)=\"onTabsScroll()\">\n <ng-container *ngTemplateOutlet=\"tabsListTpl\" />\n </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=\"z-tabs-nav-control z-tabs-nav-next shrink-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=\"z-tabs-nav-control z-tabs-nav-menu shrink-0\"\n z-popover\n [zPopoverContent]=\"dropdownTpl\"\n zPosition=\"bottom-right\"\n [zWave]=\"false\"\n zClass=\"min-w-[6.25rem] max-w-[12.5rem]\"\n (zShow)=\"scrollToActiveDropdownItem()\"\n aria-label=\"Select tab\">\n <z-icon zType=\"lucideChevronDown\" zSize=\"16\" />\n </z-button>\n }\n </div>\n\n <ng-template #tabsListTpl>\n <!-- Tab List -->\n <div\n #tabsList\n [class]=\"tabsClasses()\"\n [class.pb-0.5]=\"tabsListHasBottomPadding()\"\n role=\"tablist\"\n [attr.aria-orientation]=\"zOrientation()\"\n [attr.data-type]=\"zType()\">\n @if (isHoverGlideType()) {\n <div\n #hoverIndicator\n class=\"z-tabs-hover-indicator pointer-events-none absolute top-0 left-0 z-[5]\"\n [attr.data-type]=\"zType()\"\n aria-hidden=\"true\"></div>\n }\n @if (isGlideType()) {\n <div\n #glideIndicator\n class=\"z-tabs-glide-indicator pointer-events-none absolute top-0 left-0 z-[6]\"\n [attr.data-type]=\"zType()\"\n aria-hidden=\"true\"></div>\n }\n @for (item of tabItems(); track item.tab.value; let idx = $index; let last = $last) {\n <button\n #tabButton\n type=\"button\"\n role=\"tab\"\n [class]=\"item.classes\"\n [class.z-tab-item-has-icon]=\"!!item.tab.icon || !!item.tab.iconTemplate\"\n [attr.data-active]=\"item.isActive\"\n [attr.data-state]=\"item.isActive ? 'active' : 'inactive'\"\n [attr.data-type]=\"zType()\"\n [attr.data-orientation]=\"zOrientation()\"\n [attr.data-last]=\"last\"\n [attr.aria-selected]=\"item.isActive\"\n [attr.aria-controls]=\"'panel-' + item.tab.value\"\n [disabled]=\"item.tab.disabled\"\n [tabindex]=\"item.isActive ? 0 : -1\"\n z-tooltip\n [zContent]=\"showsTabTooltip() ? (item.tab.label | translate) : ''\"\n zPosition=\"top\"\n [zHideDelay]=\"0\"\n [zOffset]=\"5\"\n [zArrow]=\"false\"\n (click)=\"selectTab(item.tab)\"\n (keydown)=\"onTabKeydown($event, idx)\"\n (mouseenter)=\"onTabHover(item.tab)\"\n (mouseleave)=\"onTabHoverEnd()\"\n (focus)=\"onTabHover(item.tab)\"\n (blur)=\"onTabHoverEnd()\">\n @if (item.tab.iconTemplate) {\n <span class=\"shrink-0\" [class.z-tab-icon-bounce]=\"isGlideType() && bouncingTab() === item.tab.value\">\n <ng-container *ngTemplateOutlet=\"item.tab.iconTemplate; context: { $implicit: item.tab }\" />\n </span>\n } @else if (item.tab.icon) {\n <z-icon\n [zType]=\"item.tab.icon\"\n zSize=\"16\"\n class=\"shrink-0\"\n [class.z-tab-icon-bounce]=\"isGlideType() && bouncingTab() === item.tab.value\" />\n }\n <span\n class=\"z-tab-item-label min-w-0 flex-1 truncate text-left\"\n [class.z-tab-icon-bounce]=\"isGlideType() && bouncingTab() === item.tab.value\">\n {{ item.tab.label | translate }}\n </span>\n @if (item.tab.badge) {\n <span\n class=\"ring-background ml-1.5 inline-flex h-5 min-w-5 items-center justify-center rounded-(--radius-pill) px-1.5 text-xs font-semibold ring-2\"\n [class.bg-primary]=\"zType() !== 'badge'\"\n [class.text-primary-foreground]=\"zType() !== 'badge'\"\n [class.bg-primary!]=\"zType() === 'badge'\"\n [class.text-primary-foreground!]=\"zType() === 'badge'\">\n {{ item.tab.badge }}\n </span>\n }\n </button>\n }\n </div>\n </ng-template>\n\n <!-- Tab Panels -->\n @if (!zTabsOnly()) {\n <div\n #panelsHost\n class=\"z-tabs-panels min-h-0\"\n [class.flex-1]=\"zOrientation() === 'vertical'\"\n [class.shadow-xs]=\"contentWrapperFramed()\"\n [class.z-tabs-panels-unwrapped]=\"!contentWrapperFramed()\">\n @if (!zLazy()) {\n @for (panel of tabPanels(); track panel.zTabPanel()) {\n <div\n role=\"tabpanel\"\n [id]=\"'panel-' + panel.zTabPanel()\"\n [attr.aria-labelledby]=\"panel.zTabPanel()\"\n [attr.data-state]=\"activeTab() === panel.zTabPanel() ? 'active' : 'inactive'\"\n [attr.inert]=\"activeTab() === panel.zTabPanel() ? null : ''\">\n <ng-container *ngTemplateOutlet=\"panel.template\" />\n </div>\n }\n } @else if (renderedTab()) {\n <div role=\"tabpanel\" [id]=\"'panel-' + renderedTab()\" [attr.aria-labelledby]=\"renderedTab()\" data-state=\"active\">\n <ng-container #panelHost />\n </div>\n }\n </div>\n }\n</div>\n\n<!-- Dropdown Menu Template -->\n<ng-template #dropdownTpl let-close=\"close\">\n <div\n zHoverGlide\n zHoverGlideClass=\"bg-muted/70 rounded-(--radius-sm)\"\n class=\"z-tabs-dropdown-menu flex max-h-[18.75rem] flex-col gap-0.5 overflow-y-auto p-1\"\n [style.width]=\"zWithDropdown()\"\n [style.min-width]=\"zWithDropdown()\"\n [style.max-width]=\"zWithDropdown()\">\n @for (item of tabItems(); track item.tab.value) {\n <button\n #dropdownItem\n type=\"button\"\n class=\"relative z-[1] flex w-full cursor-pointer items-center justify-start gap-2 rounded-sm px-2 py-1.5 text-left text-sm font-medium transition-colors outline-none disabled:pointer-events-none disabled:opacity-50\"\n data-glide-item\n [class.hover:text-foreground]=\"!item.isActive\"\n [class.focus:bg-primary/10]=\"!item.isActive\"\n [class.bg-primary/15]=\"item.isActive\"\n [class.text-primary]=\"item.isActive\"\n [disabled]=\"item.tab.disabled\"\n (click)=\"selectTab(item.tab, true); close()\">\n @if (item.tab.icon) {\n <z-icon [zType]=\"item.tab.icon\" zSize=\"16\" class=\"text-muted-foreground shrink-0\" />\n }\n <span\n class=\"min-w-0 flex-1 truncate\"\n z-tooltip\n [zContent]=\"item.tab.label | translate\"\n zPosition=\"top\"\n [zHideDelay]=\"0\"\n [zOffset]=\"5\"\n [zArrow]=\"false\"\n [zTriggerElement]=\"dropdownItem\">\n {{ item.tab.label | translate }}\n </span>\n @if (item.tab.badge) {\n <span\n class=\"bg-primary text-primary-foreground inline-flex h-5 min-w-5 items-center justify-center rounded-(--radius-pill) px-1.5 text-xs font-semibold\">\n {{ item.tab.badge }}\n </span>\n }\n @if (item.isActive) {\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:visible;overflow-y:visible;scrollbar-width:none;-ms-overflow-style:none;scroll-behavior:smooth}.z-tabs-scroll-wrapper::-webkit-scrollbar{display:none}.z-tabs-scroll-wrapper.vertical{overflow:visible}.z-tabs-scroll-wrapper.vertical.z-tabs-scroll-wrapper-limited{height:var(--z-tabs-vertical-max-height, min(22rem, 60vh));max-height:var(--z-tabs-vertical-max-height, min(22rem, 60vh));overflow:hidden auto}.z-tabs-scroll-wrapper.z-tabs-scroll-wrapper-scrollable{overflow-x:auto}.z-tabs-scroll-wrapper.z-tabs-scroll-wrapper-fade-left{mask-image:linear-gradient(to right,transparent 0,black var(--z-tabs-fade-width),black 100%);-webkit-mask-image:linear-gradient(to right,transparent 0,black var(--z-tabs-fade-width),black 100%)}.z-tabs-scroll-wrapper.z-tabs-scroll-wrapper-fade-right{mask-image:linear-gradient(to left,transparent 0,black var(--z-tabs-fade-width),black 100%);-webkit-mask-image:linear-gradient(to left,transparent 0,black var(--z-tabs-fade-width),black 100%)}.z-tabs-scroll-wrapper.z-tabs-scroll-wrapper-fade-left.z-tabs-scroll-wrapper-fade-right{mask-image:linear-gradient(to right,transparent 0,black var(--z-tabs-fade-width),black calc(100% - var(--z-tabs-fade-width)),transparent 100%);-webkit-mask-image:linear-gradient(to right,transparent 0,black var(--z-tabs-fade-width),black calc(100% - var(--z-tabs-fade-width)),transparent 100%)}.z-tabs-scrollbar{--scrollbar-padding: .125rem;--z-tabs-scrollbar-gutter: .75rem;--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in oklab, var(--muted-foreground) 35%, transparent);--scrollbar-thumb-hover-color: color-mix(in oklab, var(--muted-foreground) 55%, transparent);--scrollbar-size: .375rem;display:block}.z-tabs-scrollbar .ng-scroll-viewport,.z-tabs-scrollbar .ng-scroll-content{max-width:100%}.z-tabs-scrollbar.z-tabs-scroll-wrapper-limited .ng-scroll-viewport{height:100%;max-height:100%}.z-tabs-scrollbar .ng-scroll-content{box-sizing:border-box;padding-right:var(--z-tabs-scrollbar-gutter)}.z-tabs-scroll-container{isolation:isolate;--z-tabs-fade-width: 2rem}.z-tabs-container:is([data-type=segment],[data-type=segment-solid],[data-type=pill-solid],[data-type=pill-blur])>.z-tabs-nav>.z-tabs-scroll-container-surface{background:color-mix(in oklab,var(--background) 72%,var(--muted));border:.0625rem solid color-mix(in oklab,var(--background) 88%,var(--border));box-shadow:0 .0625rem .1875rem #0000000f,0 .125rem .5rem #00000014;backdrop-filter:blur(.75rem) saturate(140%);-webkit-backdrop-filter:blur(.75rem) saturate(140%)}.z-tabs-container:is([data-type=segment],[data-type=segment-solid],[data-type=pill-solid],[data-type=pill-blur])>.z-tabs-nav>.z-tabs-scroll-container-surface .z-tabs{background:transparent}.z-tabs-container:is([data-type=segment],[data-type=segment-solid])>.z-tabs-nav>.z-tabs-scroll-container-surface{border-radius:var(--radius-sm);overflow:hidden}.z-tabs-container:is([data-type=pill-solid],[data-type=pill-blur])>.z-tabs-nav>.z-tabs-scroll-container-surface{border-radius:9999px;overflow:hidden}.dark .z-tabs-container:is([data-type=segment],[data-type=segment-solid],[data-type=pill-solid],[data-type=pill-blur])>.z-tabs-nav>.z-tabs-scroll-container-surface{background:color-mix(in oklab,var(--muted) 35%,transparent);border-color:color-mix(in oklab,var(--border) 65%,transparent);box-shadow:0 .0625rem .1875rem #0000002e,0 .125rem .5rem #0000003d}.z-tabs{align-items:stretch;min-height:2.5rem}.z-tabs.flex-col{width:100%}.z-tabs.flex-col.border-r{border-right:.0625rem solid hsl(var(--border));padding-right:.5rem}.z-tabs-nav-control{transition:color .2s ease,background-color .2s ease,border-color .2s ease}.z-tabs-nav-surface{border:0;border-radius:var(--radius-sm);padding-block:0;box-shadow:0 0 0 .0625rem color-mix(in oklab,oklch(95% 0 0deg) 88%,var(--border)),0 .0625rem .1875rem #0000000f,0 .125rem .5rem #00000014}.z-tabs-container:is([data-type=pill-solid],[data-type=pill-blur],[data-type=pill-float],[data-type=pill-primary],[data-type=assistant]) .z-tabs-nav-surface{border-radius:9999px}.dark .z-tabs-nav-surface{box-shadow:0 0 0 .0625rem color-mix(in oklab,var(--border) 65%,transparent),0 .0625rem .1875rem #0000002e,0 .125rem .5rem #0000003d}.z-tab-item{-webkit-tap-highlight-color:transparent;position:relative}.z-tab-item[data-active=true]{position:relative}.z-tab-item:disabled{pointer-events:none}.z-tabs-panels{border:.0625rem solid var(--border);border-radius:var(--radius-xs);padding:1rem}.z-tabs-panels [role=tabpanel][data-state=inactive]{content-visibility:hidden}@supports not (content-visibility: hidden){.z-tabs-panels [role=tabpanel][data-state=inactive]{display:none}}.z-tabs-panels-unwrapped{border:0;border-radius:0;padding:0}.z-tabs-wrapper .z-tabs.flex-row+.z-tabs-panels{margin-top:.875rem}.z-tabs-wrapper .z-tabs.flex-col+.z-tabs-panels{margin-top:0;margin-left:0}.z-tabs-container[data-orientation=horizontal]{gap:0}.z-tabs-container[data-orientation=horizontal] .z-tabs-scroll-container{z-index:1}.z-tabs-container[data-orientation=horizontal] .z-tabs-panels{margin-top:0}.z-tabs-container[data-content-fit=screen]{height:var(--z-tabs-screen-height, calc(100dvh - var(--z-tabs-screen-offset, 0rem)));max-height:var(--z-tabs-screen-height, calc(100dvh - var(--z-tabs-screen-offset, 0rem)));min-height:0;overflow:hidden}.z-tabs-container[data-content-fit=screen] .z-tabs-nav{flex:none;min-height:0}.z-tabs-container[data-content-fit=screen] .z-tabs-panels{flex:1 1 auto;min-height:0;overflow:auto}.z-tabs-container[data-content-fit=screen] [role=tabpanel]{min-height:0}.z-tabs-container[data-type=line][data-orientation=horizontal] .z-tabs{isolation:isolate;position:relative}.z-tabs-container[data-type=line][data-orientation=horizontal] .z-tabs .z-tab-item[data-active=true]{z-index:1}.z-tabs-container[data-type=line][data-orientation=horizontal] .z-tabs .z-tab-item[data-active=true]:after{z-index:1}.z-tabs-container[data-type=line][data-orientation=horizontal] .z-tabs:after{content:\"\";position:absolute;right:0;bottom:0;left:0;height:.0625rem;background:color-mix(in oklab,var(--border) 80%,transparent);pointer-events:none;z-index:0}.z-tabs-container:is([data-type=outline],[data-type=soft],[data-type=segment],[data-type=folder],[data-type=folder-soft],[data-type=folder-solid],[data-type=underline],[data-type=underlined],[data-type=badge],[data-type=sharp],[data-type=sharp-line],[data-type=sharp-line-filled],[data-type=square],[data-type=code-line])[data-orientation=horizontal] .z-tabs-scroll-wrapper{padding-inline:0}.z-tabs-container:is([data-type=outline],[data-type=soft],[data-type=segment],[data-type=folder],[data-type=folder-soft],[data-type=folder-solid],[data-type=underline],[data-type=underlined],[data-type=badge],[data-type=sharp],[data-type=sharp-line],[data-type=sharp-line-filled],[data-type=square],[data-type=code-line])[data-orientation=horizontal] .z-tabs-panels{border-radius:0 0 var(--radius-xs) var(--radius-xs)}.z-tabs-container:is([data-type=outline],[data-type=soft],[data-type=segment],[data-type=folder],[data-type=folder-soft],[data-type=folder-solid],[data-type=underline],[data-type=underlined],[data-type=badge],[data-type=sharp],[data-type=sharp-line],[data-type=sharp-line-filled],[data-type=square],[data-type=code-line])[data-orientation=horizontal] .z-tabs-panels-unwrapped{border:0;border-radius:0}.z-tabs-container:is([data-type=folder],[data-type=folder-soft],[data-type=folder-solid])[data-orientation=horizontal] .z-tabs-nav{position:relative}.z-tabs-container:is([data-type=folder],[data-type=folder-soft],[data-type=folder-solid])[data-orientation=horizontal] .z-tabs-nav:after{content:\"\";position:absolute;right:0;bottom:0;left:0;height:.0625rem;background:var(--border);pointer-events:none;z-index:0}.z-tabs-container:is([data-type=folder],[data-type=folder-soft],[data-type=folder-solid])[data-orientation=horizontal] .z-tabs-panels{border-top:0}.z-tabs-container[data-type=folder-solid][data-orientation=horizontal] .z-tab-item[data-active=true][data-last=true]{box-shadow:inset .0625rem 0 0 var(--primary),inset -.0625rem 0 0 var(--border),inset 0 .0625rem 0 var(--primary)}.z-tabs-container:is([data-type=segment],[data-type=segment-solid],[data-type=pill-solid],[data-type=pill-blur],[data-type=pill-float]) .z-tabs{align-items:center}.z-tabs-container:is([data-type=pill-primary],[data-type=assistant],[data-type=bar])[data-orientation=horizontal] .z-tabs{align-items:center}.z-tabs-container[data-type=pill-float][data-orientation=horizontal] .z-tabs-nav{position:relative;gap:0}.z-tabs-container[data-type=pill-float][data-orientation=horizontal] .z-tabs-scroll-container{--z-tabs-fade-width: 2.75rem}.z-tabs-container[data-type=pill-float][data-orientation=horizontal] .z-tabs-nav-control{position:absolute;top:50%;z-index:2;width:1.5rem;min-width:1.5rem;height:1.5rem;min-height:1.5rem;padding:0;border-radius:9999px;transform:translateY(-50%);background:color-mix(in oklab,var(--muted) 90%,var(--background));color:var(--foreground)}.z-tabs-container[data-type=pill-float][data-orientation=horizontal] .z-tabs-nav-control:hover{background:color-mix(in oklab,var(--muted) 70%,var(--foreground) 12%)}.z-tabs-container[data-type=pill-float][data-orientation=horizontal] .z-tabs-nav-prev{left:0}.z-tabs-container[data-type=pill-float][data-orientation=horizontal] .z-tabs-nav-next{right:0}.z-tabs-container[data-type=pill-float][data-orientation=horizontal] .z-tabs-nav-menu{display:none}.z-tabs-glide-indicator{transition:none;transform-origin:0 0;opacity:0;will-change:transform}.z-tabs-glide-indicator[data-type=segment],.z-tabs-glide-indicator[data-type=segment-solid]{border-radius:var(--radius-sm);overflow:hidden;background:var(--background);box-shadow:0 .0625rem .1875rem #00000014,0 .0625rem .125rem #0000000f}.z-tabs-glide-indicator[data-type=pill-solid],.z-tabs-glide-indicator[data-type=pill-blur],.z-tabs-glide-indicator[data-type=pill-float],.z-tabs-glide-indicator[data-type=pill-primary]{border-radius:9999px;overflow:hidden}.z-tabs-glide-indicator:is([data-type=pill-float],[data-type=pill-primary]){background:var(--primary);box-shadow:0 .0625rem .1875rem #0000001a,0 .0625rem .125rem #00000014}.z-tabs-glide-indicator[data-type=assistant]{border-radius:var(--radius-sm);background:var(--primary);box-shadow:0 .0625rem .125rem #0000000d}.z-tabs-glide-indicator[data-type=bar]{border-radius:var(--radius-sm);background:color-mix(in oklab,var(--primary) 10%,transparent);box-shadow:inset 0 0 0 .0625rem var(--background),0 .0625rem .1875rem #0000001a,0 .0625rem .125rem -.0625rem #0000001a}.dark .z-tabs-glide-indicator[data-type=bar]{box-shadow:inset 0 0 0 .0625rem color-mix(in oklab,white 12%,transparent),0 .125rem .5rem #00000059,0 .0625rem .125rem #0003}.z-tabs-glide-indicator[data-type=underline-hover]{background:transparent}.z-tabs-glide-indicator:is([data-type=bar],[data-type=underline-hover]):before{content:\"\";position:absolute;background:var(--primary);border-radius:9999px}.z-tabs-glide-indicator[data-type=pill-solid]{background:var(--background);box-shadow:0 .0625rem .1875rem #00000014,0 .0625rem .125rem #0000000f}.z-tabs-glide-indicator[data-type=segment-solid]{background:var(--primary)}.z-tabs-glide-indicator[data-type=pill-blur]{background:linear-gradient(to bottom,color-mix(in oklab,white 22%,transparent) 0%,color-mix(in oklab,white 6%,transparent) 45%,transparent 100%),color-mix(in oklab,var(--background) 55%,transparent);box-shadow:inset 0 0 0 1px color-mix(in oklab,white 25%,transparent),inset 0 .0625rem color-mix(in oklab,white 45%,transparent),0 .125rem .5rem #0000001a,0 .0625rem .125rem #0000000f;backdrop-filter:blur(.75rem) saturate(180%);-webkit-backdrop-filter:blur(.75rem) saturate(180%)}.dark .z-tabs-glide-indicator[data-type=pill-blur]{background:linear-gradient(to bottom,color-mix(in oklab,white 12%,transparent) 0%,color-mix(in oklab,white 3%,transparent) 45%,transparent 100%),color-mix(in oklab,var(--background) 45%,transparent);box-shadow:inset 0 0 0 1px color-mix(in oklab,white 10%,transparent),inset 0 .0625rem color-mix(in oklab,white 16%,transparent),0 .125rem .5rem #00000059,0 .0625rem .125rem #0003}.z-tabs-container[data-orientation=horizontal] .z-tabs-glide-indicator[data-type=bar]:before{right:25%;bottom:0;left:25%;height:.25rem;border-radius:9999px 9999px 0 0}.z-tabs-container[data-orientation=horizontal] .z-tabs-glide-indicator[data-type=underline-hover]:before{right:0;bottom:0;left:0;height:.125rem;border-radius:0}.z-tabs-container[data-orientation=vertical] .z-tabs-glide-indicator[data-type=bar]:before{inset:25% auto auto 0;width:.25rem;height:50%;border-radius:0 9999px 9999px 0}.z-tabs-container[data-orientation=vertical] .z-tabs-glide-indicator[data-type=underline-hover]:before{inset:0 0 auto auto;width:.125rem;height:100%;border-radius:0}.z-tabs-container:is([data-type=pill-primary],[data-type=assistant],[data-type=bar]) .z-tab-item:hover:not([data-active=true]):not(:disabled){background:color-mix(in oklab,var(--muted) 50%,transparent)}.z-tabs-container:is([data-type=pill-primary],[data-type=assistant],[data-type=underline-hover],[data-type=bar]) .z-tab-item:focus-visible{box-shadow:0 0 0 .1875rem color-mix(in oklab,var(--ring) 50%,transparent)!important}.z-tabs-hover-indicator{transform-origin:0 0;opacity:0;border-radius:var(--radius-sm);background:color-mix(in oklab,var(--muted) 70%,transparent);transition:transform .18s cubic-bezier(.22,1,.36,1),width .18s cubic-bezier(.22,1,.36,1),height .18s cubic-bezier(.22,1,.36,1),opacity .15s ease-out}.z-tabs-container[data-type=underline-hover] .z-tabs:after{content:\"\";position:absolute;background:color-mix(in oklab,var(--border) 80%,transparent);pointer-events:none;z-index:0}.z-tabs-container[data-type=underline-hover][data-orientation=horizontal] .z-tabs:after{right:0;bottom:0;left:0;height:.0625rem}.z-tabs-container[data-type=underline-hover][data-orientation=vertical] .z-tabs:after{top:0;right:0;bottom:0;width:.0625rem}.z-tabs-container[data-type=assistant][data-orientation=horizontal] .z-tab-item{transition:background-color .3s cubic-bezier(.4,0,.2,1),box-shadow .3s cubic-bezier(.4,0,.2,1),color .2s ease}.z-tabs-container[data-type=assistant][data-orientation=horizontal] .z-tab-item[data-active=true]{background:var(--primary);box-shadow:0 .0625rem .125rem #0000000d}.z-tabs-container[data-type=assistant][data-orientation=horizontal] .z-tab-item{gap:0}.z-tabs-container[data-type=assistant][data-orientation=horizontal] .z-tab-item.z-tab-item-has-icon .z-tab-item-label{flex:none;overflow:hidden;text-overflow:clip;margin-inline-start:.375rem;opacity:1;transition:width .3s cubic-bezier(.4,0,.2,1),margin-inline-start .3s cubic-bezier(.4,0,.2,1),opacity .2s ease-out}.z-tabs-container[data-type=assistant][data-orientation=horizontal] .z-tab-item.z-tab-item-has-icon[data-active=false] .z-tab-item-label{margin-inline-start:0;opacity:0}@keyframes z-tab-icon-bounce{0%{transform:scale(1)}35%{transform:scale(.97)}to{transform:scale(1)}}.z-tab-icon-bounce{animation:z-tab-icon-bounce .32s cubic-bezier(.34,1.56,.64,1)}.z-tabs-container[data-orientation=vertical] .z-tabs-nav{align-items:stretch}.z-tabs-container[data-orientation=vertical] .z-tabs-scroll-container{width:min(12rem,40vw);flex:none}.z-tabs-container[data-orientation=vertical] .z-tabs-panels,.z-tabs-container[data-orientation=vertical] .z-tab-item{min-width:0}@media(prefers-reduced-motion:reduce){.z-tab-item,.z-tabs-nav-control,.z-tabs-hover-indicator,.z-tabs-container[data-type=assistant] .z-tab-item,.z-tabs-container[data-type=assistant] .z-tab-item-label{transition:none!important}.z-tabs-scroll-wrapper{scroll-behavior:auto}.z-tab-icon-bounce{animation:none!important}}\n"] }]
1095
+ }], 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 }] }], glideIndicator: [{ type: i0.ViewChild, args: ['glideIndicator', { isSignal: true }] }], hoverIndicator: [{ type: i0.ViewChild, args: ['hoverIndicator', { isSignal: true }] }], tabsList: [{ type: i0.ViewChild, args: ['tabsList', { isSignal: true }] }], panelsHost: [{ type: i0.ViewChild, args: ['panelsHost', { isSignal: true }] }], panelHost: [{ type: i0.ViewChild, args: ['panelHost', { ...{ read: ViewContainerRef }, isSignal: true }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], zTabs: [{ type: i0.Input, args: [{ isSignal: true, alias: "zTabs", required: true }] }], zType: [{ type: i0.Input, args: [{ isSignal: true, alias: "zType", required: false }] }], zSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSize", required: false }] }], zOrientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "zOrientation", required: false }] }], zContentFit: [{ type: i0.Input, args: [{ isSignal: true, alias: "zContentFit", required: false }] }], zContentAnimation: [{ type: i0.Input, args: [{ isSignal: true, alias: "zContentAnimation", required: false }] }], zLazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLazy", required: false }] }], zTabsOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "zTabsOnly", required: false }] }], zShowNavWrapper: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowNavWrapper", required: false }] }], zNavFullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "zNavFullWidth", required: false }] }], zClassContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "zClassContent", required: false }] }], zShowContentWrapper: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowContentWrapper", required: false }] }], zReloadable: [{ type: i0.Input, args: [{ isSignal: true, alias: "zReloadable", required: false }] }], zEmitOnActiveClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "zEmitOnActiveClick", required: false }] }], zCache: [{ type: i0.Input, args: [{ isSignal: true, alias: "zCache", required: false }] }], zCacheKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "zCacheKey", required: false }] }], zWithDropdown: [{ type: i0.Input, args: [{ isSignal: true, alias: "zWithDropdown", required: false }] }], activeTab: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeTab", required: false }] }, { type: i0.Output, args: ["activeTabChange"] }], zTabChange: [{ type: i0.Output, args: ["zTabChange"] }] } });
1096
+
1097
+ /**
1098
+ * Generated bundle index. Do not edit.
1099
+ */
1100
+
1101
+ export { ZTabPanelDirective, ZTabsComponent, zTabItemVariants, zTabsVariants };
1102
+ //# sourceMappingURL=shival99-z-ui-components-z-tabs.mjs.map