@shival99/z-ui 2.4.3 → 2.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/assets/css/base.css +2 -1
- package/assets/css/global.css +23 -2
- package/assets/css/tailwind.css +7 -4
- package/assets/css/themes/gray.css +1 -1
- package/assets/css/themes/green.css +1 -1
- package/assets/css/themes/hospital.css +1 -1
- package/assets/css/themes/neutral.css +1 -1
- package/assets/css/themes/orange.css +1 -1
- package/assets/css/themes/slate.css +1 -1
- package/assets/css/themes/stone.css +1 -1
- package/assets/css/themes/violet.css +1 -1
- package/assets/css/themes/zinc.css +1 -1
- package/fesm2022/shival99-z-ui-components-z-accordion.mjs +6 -6
- package/fesm2022/shival99-z-ui-components-z-accordion.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-audio-player.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-audio-player.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs +27 -12
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-avatar.mjs +6 -6
- package/fesm2022/shival99-z-ui-components-z-avatar.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-breadcrumb.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-breadcrumb.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-button-group.mjs +12 -12
- package/fesm2022/shival99-z-ui-components-z-button-group.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-button.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-button.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs +40 -40
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-card.mjs +7 -7
- package/fesm2022/shival99-z-ui-components-z-card.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-chat.mjs +4 -4
- package/fesm2022/shival99-z-ui-components-z-chat.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-checkbox.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-checkbox.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-code.mjs +58 -19
- package/fesm2022/shival99-z-ui-components-z-code.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-command.mjs +6 -5
- package/fesm2022/shival99-z-ui-components-z-command.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-drawer.mjs +17 -17
- package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs +12 -4
- package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-editor.mjs +6 -6
- package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-empty.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-empty.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-filter.mjs +27 -27
- package/fesm2022/shival99-z-ui-components-z-filter.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-gallery.mjs +42 -34
- package/fesm2022/shival99-z-ui-components-z-gallery.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-hover-glide.mjs +221 -0
- package/fesm2022/shival99-z-ui-components-z-hover-glide.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-icon.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-icon.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-input.mjs +5 -5
- package/fesm2022/shival99-z-ui-components-z-input.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-kanban.mjs +4 -4
- package/fesm2022/shival99-z-ui-components-z-kanban.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-loading.mjs +18 -4
- package/fesm2022/shival99-z-ui-components-z-loading.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-marquee.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-marquee.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-media-player.mjs +346 -956
- package/fesm2022/shival99-z-ui-components-z-media-player.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-menu.mjs +8 -8
- package/fesm2022/shival99-z-ui-components-z-menu.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-metric-card.mjs +5 -5
- package/fesm2022/shival99-z-ui-components-z-metric-card.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-modal.mjs +17 -17
- package/fesm2022/shival99-z-ui-components-z-modal.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-number-ticker.mjs +352 -0
- package/fesm2022/shival99-z-ui-components-z-number-ticker.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-overlay.mjs +9 -9
- package/fesm2022/shival99-z-ui-components-z-overlay.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs +4 -4
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-popover.mjs +14 -14
- package/fesm2022/shival99-z-ui-components-z-popover.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-qrcode.mjs +32 -8
- package/fesm2022/shival99-z-ui-components-z-qrcode.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-radio.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-radio.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-select.mjs +181 -26
- package/fesm2022/shival99-z-ui-components-z-select.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-show-more.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-show-more.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-skeleton-auto.mjs +4 -4
- package/fesm2022/shival99-z-ui-components-z-skeleton-auto.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-skeleton.mjs +5 -5
- package/fesm2022/shival99-z-ui-components-z-skeleton.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-steps.mjs +4 -4
- package/fesm2022/shival99-z-ui-components-z-steps.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-switch.mjs +5 -5
- package/fesm2022/shival99-z-ui-components-z-switch.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-table.mjs +107 -105
- package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs +327 -31
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-tags.mjs +15 -15
- package/fesm2022/shival99-z-ui-components-z-tags.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-timeline.mjs +4 -4
- package/fesm2022/shival99-z-ui-components-z-timeline.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-toast.mjs +10 -9
- package/fesm2022/shival99-z-ui-components-z-toast.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-tooltip.mjs +11 -11
- package/fesm2022/shival99-z-ui-components-z-tooltip.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-upload.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-upload.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-i18n.mjs +6 -26
- package/fesm2022/shival99-z-ui-i18n.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-pipes.mjs +18 -18
- package/fesm2022/shival99-z-ui-pipes.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-services.mjs +31 -31
- package/fesm2022/shival99-z-ui-services.mjs.map +1 -1
- package/package.json +21 -1
- package/types/shival99-z-ui-components-z-autocomplete.d.ts +6 -2
- package/types/shival99-z-ui-components-z-calendar.d.ts +4 -4
- package/types/shival99-z-ui-components-z-card.d.ts +21 -21
- package/types/shival99-z-ui-components-z-code.d.ts +16 -3
- package/types/shival99-z-ui-components-z-drawer.d.ts +1 -1
- package/types/shival99-z-ui-components-z-editor.d.ts +8 -8
- package/types/shival99-z-ui-components-z-gallery.d.ts +4 -1
- package/types/shival99-z-ui-components-z-hover-glide.d.ts +48 -0
- package/types/shival99-z-ui-components-z-icon.d.ts +1 -1
- package/types/shival99-z-ui-components-z-loading.d.ts +9 -2
- package/types/shival99-z-ui-components-z-media-player.d.ts +102 -172
- package/types/shival99-z-ui-components-z-metric-card.d.ts +19 -19
- package/types/shival99-z-ui-components-z-modal.d.ts +2 -2
- package/types/shival99-z-ui-components-z-number-ticker.d.ts +110 -0
- package/types/shival99-z-ui-components-z-overlay.d.ts +3 -3
- package/types/shival99-z-ui-components-z-popover.d.ts +11 -8
- package/types/shival99-z-ui-components-z-qrcode.d.ts +5 -2
- package/types/shival99-z-ui-components-z-select.d.ts +45 -7
- package/types/shival99-z-ui-components-z-switch.d.ts +22 -21
- package/types/shival99-z-ui-components-z-table.d.ts +1 -1
- package/types/shival99-z-ui-components-z-tabs.d.ts +59 -7
- package/types/shival99-z-ui-components-z-toast.d.ts +1 -1
- package/types/shival99-z-ui-components-z-tooltip.d.ts +2 -2
- package/types/shival99-z-ui-components-z-upload.d.ts +3 -3
- package/types/shival99-z-ui-services.d.ts +10 -10
|
@@ -120,10 +120,10 @@ class ZShowMoreComponent {
|
|
|
120
120
|
this._isExpanded.set(nextState);
|
|
121
121
|
this.zExpandChange.emit(nextState);
|
|
122
122
|
}
|
|
123
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
124
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
123
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ZShowMoreComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
124
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: ZShowMoreComponent, isStandalone: true, selector: "z-show-more", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zMaxHeight: { classPropertyName: "zMaxHeight", publicName: "zMaxHeight", isSignal: true, isRequired: false, transformFunction: null }, zShowMoreLabel: { classPropertyName: "zShowMoreLabel", publicName: "zShowMoreLabel", isSignal: true, isRequired: false, transformFunction: null }, zShowLessLabel: { classPropertyName: "zShowLessLabel", publicName: "zShowLessLabel", isSignal: true, isRequired: false, transformFunction: null }, zShowLessButton: { classPropertyName: "zShowLessButton", publicName: "zShowLessButton", isSignal: true, isRequired: false, transformFunction: null }, zButtonType: { classPropertyName: "zButtonType", publicName: "zButtonType", isSignal: true, isRequired: false, transformFunction: null }, zButtonSize: { classPropertyName: "zButtonSize", publicName: "zButtonSize", isSignal: true, isRequired: false, transformFunction: null }, zWave: { classPropertyName: "zWave", publicName: "zWave", isSignal: true, isRequired: false, transformFunction: null }, zBlurHeight: { classPropertyName: "zBlurHeight", publicName: "zBlurHeight", isSignal: true, isRequired: false, transformFunction: null }, zBlurColor: { classPropertyName: "zBlurColor", publicName: "zBlurColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zExpandChange: "zExpandChange" }, host: { properties: { "class": "zClasses()" } }, viewQueries: [{ propertyName: "_contentContainer", first: true, predicate: ["contentContainer"], descendants: true, isSignal: true }, { propertyName: "_contentInner", first: true, predicate: ["contentInner"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"z-show-more flex h-full min-h-0 w-full flex-col\">\n <div\n #contentContainer\n class=\"z-show-more-content relative min-h-0 flex-1 overflow-hidden transition-[max-height] duration-300 ease-out\"\n [style.max-height]=\"computedMaxHeight()\">\n <div #contentInner>\n <ng-content />\n </div>\n\n @if (!isExpanded() && isOverflowing()) {\n <div\n class=\"pointer-events-none absolute right-0 bottom-0 left-0 transition-opacity duration-300\"\n [style]=\"blurGradientStyle()\"></div>\n }\n </div>\n\n @if (isOverflowing() && (zShowLessButton() || !isExpanded())) {\n <div class=\"z-show-more-actions mt-2 flex justify-center\">\n <button z-button [zType]=\"zButtonType()\" [zSize]=\"zButtonSize()\" [zWave]=\"zWave()\" (click)=\"toggle()\">\n <span>\n {{\n isExpanded()\n ? zShowLessLabel() || ('i18n_z_ui_show_more_collapse' | translate)\n : zShowMoreLabel() || ('i18n_z_ui_show_more_expand' | translate)\n }}\n </span>\n <z-icon [zType]=\"isExpanded() ? 'lucideChevronUp' : 'lucideChevronDown'\" zSize=\"16\" class=\"ml-1\" />\n </button>\n </div>\n }\n</div>\n", styles: [".z-show-more-content{will-change:max-height}\n"], dependencies: [{ 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: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zAnimatedType", "zAnimate", "zAnimationTrigger", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
125
125
|
}
|
|
126
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ZShowMoreComponent, decorators: [{
|
|
127
127
|
type: Component,
|
|
128
128
|
args: [{ selector: 'z-show-more', imports: [ZButtonComponent, ZIconComponent, TranslatePipe], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
129
129
|
'[class]': 'zClasses()',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shival99-z-ui-components-z-show-more.mjs","sources":["../../../../libs/core-ui/components/z-show-more/z-show-more.component.ts","../../../../libs/core-ui/components/z-show-more/z-show-more.component.html","../../../../libs/core-ui/components/z-show-more/shival99-z-ui-components-z-show-more.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n inject,\n input,\n signal,\n viewChild,\n afterNextRender,\n ViewEncapsulation,\n output,\n} from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { ZButtonComponent, type ZButtonVariants } from '@shival99/z-ui/components/z-button';\nimport { ZIconComponent } from '@shival99/z-ui/components/z-icon';\nimport { zMergeClasses, zTransform } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\n\n@Component({\n selector: 'z-show-more',\n imports: [ZButtonComponent, ZIconComponent, TranslatePipe],\n standalone: true,\n templateUrl: './z-show-more.component.html',\n styleUrl: './z-show-more.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'zClasses()',\n },\n})\nexport class ZShowMoreComponent {\n private readonly _destroyRef = inject(DestroyRef);\n\n // Inputs\n public readonly class = input<ClassValue>('');\n public readonly zMaxHeight = input<number | string>(150);\n public readonly zShowMoreLabel = input<string | undefined>(undefined);\n public readonly zShowLessLabel = input<string | undefined>(undefined);\n public readonly zShowLessButton = input<boolean>(true);\n public readonly zButtonType = input<ZButtonVariants['zType']>('ghost-primary');\n public readonly zButtonSize = input<ZButtonVariants['zSize']>('sm');\n public readonly zWave = input(false, { transform: zTransform });\n public readonly zBlurHeight = input<number>(64);\n public readonly zBlurColor = input<string | undefined>(undefined);\n\n // Outputs\n public readonly zExpandChange = output<boolean>();\n\n // Queries\n private readonly _contentContainer = viewChild<ElementRef<HTMLElement>>('contentContainer');\n private readonly _contentInner = viewChild<ElementRef<HTMLElement>>('contentInner');\n\n // State\n private readonly _isExpanded = signal(false);\n private readonly _isOverflowing = signal(false);\n private readonly _scrollHeight = signal(0);\n\n // Readonly bindings for template\n protected readonly isExpanded = this._isExpanded.asReadonly();\n protected readonly isOverflowing = this._isOverflowing.asReadonly();\n\n protected readonly zClasses = computed(() => zMergeClasses('block w-full', this.class()));\n\n protected readonly computedMaxHeight = computed(() => {\n if (!this._isOverflowing()) {\n return 'none';\n }\n if (this._isExpanded()) {\n return `${this._scrollHeight()}px`;\n }\n const maxH = this.zMaxHeight();\n return typeof maxH === 'number' ? `${maxH}px` : maxH;\n });\n\n // Tạo linear gradient mờ dần xuống nền (card/page)\n protected readonly blurGradientStyle = computed(() => {\n const bg = this.zBlurColor() || 'var(--card, var(--background, #fff))';\n return {\n 'background-image': `linear-gradient(to top, ${bg} 0%, transparent 100%)`,\n height: `${this.zBlurHeight()}px`,\n };\n });\n\n constructor() {\n afterNextRender(() => {\n const innerEl = this._contentInner()?.nativeElement;\n if (!innerEl) {\n return;\n }\n\n // Kiểm tra chiều cao nội dung thực tế so với chiều cao tối đa giới hạn\n const checkOverflow = () => {\n const { scrollHeight } = innerEl;\n this._scrollHeight.set(scrollHeight);\n\n const maxH = this.zMaxHeight();\n if (typeof maxH === 'number') {\n this._isOverflowing.set(scrollHeight > maxH);\n return;\n }\n\n // Nếu zMaxHeight là string (ví dụ: '100%', 'calc(100% - 40px)')\n const contentEl = this._contentContainer()?.nativeElement;\n if (!contentEl) {\n return;\n }\n\n // Tạm thời tắt transition để đo chiều cao chính xác mà không bị ảnh hưởng bởi chuyển động\n const originalTransition = contentEl.style.transition;\n const originalMaxHeight = contentEl.style.maxHeight;\n\n contentEl.style.transition = 'none';\n contentEl.style.maxHeight = maxH;\n\n // Force reflow để trình duyệt tính toán lại layout\n const collapsedClientHeight = contentEl.clientHeight;\n\n // Khôi phục lại trạng thái ban đầu\n contentEl.style.maxHeight = originalMaxHeight;\n // Force reflow để tránh giật lag khi phục hồi transition\n void contentEl.offsetHeight;\n contentEl.style.transition = originalTransition;\n\n // Nếu phần tử đang ẩn (display: none) thì bỏ qua\n if (collapsedClientHeight === 0 && contentEl.offsetWidth === 0) {\n return;\n }\n\n this._isOverflowing.set(scrollHeight > collapsedClientHeight);\n };\n\n checkOverflow();\n\n // Sử dụng ResizeObserver để lắng nghe thay đổi kích thước của phần tử nội dung bên trong\n const resizeObserver = new ResizeObserver(() => {\n checkOverflow();\n });\n\n resizeObserver.observe(innerEl);\n\n this._destroyRef.onDestroy(() => {\n resizeObserver.disconnect();\n });\n });\n }\n\n protected toggle(): void {\n const nextState = !this._isExpanded();\n this._isExpanded.set(nextState);\n this.zExpandChange.emit(nextState);\n }\n}\n","<div class=\"z-show-more flex h-full min-h-0 w-full flex-col\">\n <div\n #contentContainer\n class=\"z-show-more-content relative min-h-0 flex-1 overflow-hidden transition-[max-height] duration-300 ease-out\"\n [style.max-height]=\"computedMaxHeight()\">\n <div #contentInner>\n <ng-content />\n </div>\n\n @if (!isExpanded() && isOverflowing()) {\n <div\n class=\"pointer-events-none absolute right-0 bottom-0 left-0 transition-opacity duration-300\"\n [style]=\"blurGradientStyle()\"></div>\n }\n </div>\n\n @if (isOverflowing() && (zShowLessButton() || !isExpanded())) {\n <div class=\"z-show-more-actions mt-2 flex justify-center\">\n <button z-button [zType]=\"zButtonType()\" [zSize]=\"zButtonSize()\" [zWave]=\"zWave()\" (click)=\"toggle()\">\n <span>\n {{\n isExpanded()\n ? zShowLessLabel() || ('i18n_z_ui_show_more_collapse' | translate)\n : zShowMoreLabel() || ('i18n_z_ui_show_more_expand' | translate)\n }}\n </span>\n <z-icon [zType]=\"isExpanded() ? 'lucideChevronUp' : 'lucideChevronDown'\" zSize=\"16\" class=\"ml-1\" />\n </button>\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAgCa,kBAAkB,CAAA;AACZ,IAAA,W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AAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,aAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,YAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,eAAA,CAAA,EAAA,CAAA,EAAA,iBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,kBAAkB,uEACtB,cAAc,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEpDpF;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"shival99-z-ui-components-z-show-more.mjs","sources":["../../../../libs/core-ui/components/z-show-more/z-show-more.component.ts","../../../../libs/core-ui/components/z-show-more/z-show-more.component.html","../../../../libs/core-ui/components/z-show-more/shival99-z-ui-components-z-show-more.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n inject,\n input,\n signal,\n viewChild,\n afterNextRender,\n ViewEncapsulation,\n output,\n} from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { ZButtonComponent, type ZButtonVariants } from '@shival99/z-ui/components/z-button';\nimport { ZIconComponent } from '@shival99/z-ui/components/z-icon';\nimport { zMergeClasses, zTransform } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\n\n@Component({\n selector: 'z-show-more',\n imports: [ZButtonComponent, ZIconComponent, TranslatePipe],\n standalone: true,\n templateUrl: './z-show-more.component.html',\n styleUrl: './z-show-more.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'zClasses()',\n },\n})\nexport class ZShowMoreComponent {\n private readonly _destroyRef = inject(DestroyRef);\n\n // Inputs\n public readonly class = input<ClassValue>('');\n public readonly zMaxHeight = input<number | string>(150);\n public readonly zShowMoreLabel = input<string | undefined>(undefined);\n public readonly zShowLessLabel = input<string | undefined>(undefined);\n public readonly zShowLessButton = input<boolean>(true);\n public readonly zButtonType = input<ZButtonVariants['zType']>('ghost-primary');\n public readonly zButtonSize = input<ZButtonVariants['zSize']>('sm');\n public readonly zWave = input(false, { transform: zTransform });\n public readonly zBlurHeight = input<number>(64);\n public readonly zBlurColor = input<string | undefined>(undefined);\n\n // Outputs\n public readonly zExpandChange = output<boolean>();\n\n // Queries\n private readonly _contentContainer = viewChild<ElementRef<HTMLElement>>('contentContainer');\n private readonly _contentInner = viewChild<ElementRef<HTMLElement>>('contentInner');\n\n // State\n private readonly _isExpanded = signal(false);\n private readonly _isOverflowing = signal(false);\n private readonly _scrollHeight = signal(0);\n\n // Readonly bindings for template\n protected readonly isExpanded = this._isExpanded.asReadonly();\n protected readonly isOverflowing = this._isOverflowing.asReadonly();\n\n protected readonly zClasses = computed(() => zMergeClasses('block w-full', this.class()));\n\n protected readonly computedMaxHeight = computed(() => {\n if (!this._isOverflowing()) {\n return 'none';\n }\n if (this._isExpanded()) {\n return `${this._scrollHeight()}px`;\n }\n const maxH = this.zMaxHeight();\n return typeof maxH === 'number' ? `${maxH}px` : maxH;\n });\n\n // Tạo linear gradient mờ dần xuống nền (card/page)\n protected readonly blurGradientStyle = computed(() => {\n const bg = this.zBlurColor() || 'var(--card, var(--background, #fff))';\n return {\n 'background-image': `linear-gradient(to top, ${bg} 0%, transparent 100%)`,\n height: `${this.zBlurHeight()}px`,\n };\n });\n\n constructor() {\n afterNextRender(() => {\n const innerEl = this._contentInner()?.nativeElement;\n if (!innerEl) {\n return;\n }\n\n // Kiểm tra chiều cao nội dung thực tế so với chiều cao tối đa giới hạn\n const checkOverflow = () => {\n const { scrollHeight } = innerEl;\n this._scrollHeight.set(scrollHeight);\n\n const maxH = this.zMaxHeight();\n if (typeof maxH === 'number') {\n this._isOverflowing.set(scrollHeight > maxH);\n return;\n }\n\n // Nếu zMaxHeight là string (ví dụ: '100%', 'calc(100% - 40px)')\n const contentEl = this._contentContainer()?.nativeElement;\n if (!contentEl) {\n return;\n }\n\n // Tạm thời tắt transition để đo chiều cao chính xác mà không bị ảnh hưởng bởi chuyển động\n const originalTransition = contentEl.style.transition;\n const originalMaxHeight = contentEl.style.maxHeight;\n\n contentEl.style.transition = 'none';\n contentEl.style.maxHeight = maxH;\n\n // Force reflow để trình duyệt tính toán lại layout\n const collapsedClientHeight = contentEl.clientHeight;\n\n // Khôi phục lại trạng thái ban đầu\n contentEl.style.maxHeight = originalMaxHeight;\n // Force reflow để tránh giật lag khi phục hồi transition\n void contentEl.offsetHeight;\n contentEl.style.transition = originalTransition;\n\n // Nếu phần tử đang ẩn (display: none) thì bỏ qua\n if (collapsedClientHeight === 0 && contentEl.offsetWidth === 0) {\n return;\n }\n\n this._isOverflowing.set(scrollHeight > collapsedClientHeight);\n };\n\n checkOverflow();\n\n // Sử dụng ResizeObserver để lắng nghe thay đổi kích thước của phần tử nội dung bên trong\n const resizeObserver = new ResizeObserver(() => {\n checkOverflow();\n });\n\n resizeObserver.observe(innerEl);\n\n this._destroyRef.onDestroy(() => {\n resizeObserver.disconnect();\n });\n });\n }\n\n protected toggle(): void {\n const nextState = !this._isExpanded();\n this._isExpanded.set(nextState);\n this.zExpandChange.emit(nextState);\n }\n}\n","<div class=\"z-show-more flex h-full min-h-0 w-full flex-col\">\n <div\n #contentContainer\n class=\"z-show-more-content relative min-h-0 flex-1 overflow-hidden transition-[max-height] duration-300 ease-out\"\n [style.max-height]=\"computedMaxHeight()\">\n <div #contentInner>\n <ng-content />\n </div>\n\n @if (!isExpanded() && isOverflowing()) {\n <div\n class=\"pointer-events-none absolute right-0 bottom-0 left-0 transition-opacity duration-300\"\n [style]=\"blurGradientStyle()\"></div>\n }\n </div>\n\n @if (isOverflowing() && (zShowLessButton() || !isExpanded())) {\n <div class=\"z-show-more-actions mt-2 flex justify-center\">\n <button z-button [zType]=\"zButtonType()\" [zSize]=\"zButtonSize()\" [zWave]=\"zWave()\" (click)=\"toggle()\">\n <span>\n {{\n isExpanded()\n ? zShowLessLabel() || ('i18n_z_ui_show_more_collapse' | translate)\n : zShowMoreLabel() || ('i18n_z_ui_show_more_expand' | translate)\n }}\n </span>\n <z-icon [zType]=\"isExpanded() ? 'lucideChevronUp' : 'lucideChevronDown'\" zSize=\"16\" class=\"ml-1\" />\n </button>\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAgCa,kBAAkB,CAAA;AACZ,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;;IAGjC,KAAK,GAAG,KAAK,CAAa,EAAE;8EAAC;IAC7B,UAAU,GAAG,KAAK,CAAkB,GAAG;mFAAC;IACxC,cAAc,GAAG,KAAK,CAAqB,SAAS;uFAAC;IACrD,cAAc,GAAG,KAAK,CAAqB,SAAS;uFAAC;IACrD,eAAe,GAAG,KAAK,CAAU,IAAI;wFAAC;IACtC,WAAW,GAAG,KAAK,CAA2B,eAAe;oFAAC;IAC9D,WAAW,GAAG,KAAK,CAA2B,IAAI;oFAAC;IACnD,KAAK,GAAG,KAAK,CAAC,KAAK,6EAAI,SAAS,EAAE,UAAU,EAAA,CAAG;IAC/C,WAAW,GAAG,KAAK,CAAS,EAAE;oFAAC;IAC/B,UAAU,GAAG,KAAK,CAAqB,SAAS;mFAAC;;IAGjD,aAAa,GAAG,MAAM,EAAW;;IAGhC,iBAAiB,GAAG,SAAS,CAA0B,kBAAkB;0FAA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kB,uEACtB,cAAc,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEpDpF;;AAEG;;"}
|
|
@@ -34,7 +34,7 @@ class ZSkeletonAutoComponent {
|
|
|
34
34
|
...(ngDevMode ? [{ debugName: "zFallbackGap" }] : /* istanbul ignore next */ []));
|
|
35
35
|
zFallbackRowHeight = input('12px', /* @ts-ignore */
|
|
36
36
|
...(ngDevMode ? [{ debugName: "zFallbackRowHeight" }] : /* istanbul ignore next */ []));
|
|
37
|
-
zFallbackRadius = input('
|
|
37
|
+
zFallbackRadius = input('var(--radius-sm)', /* @ts-ignore */
|
|
38
38
|
...(ngDevMode ? [{ debugName: "zFallbackRadius" }] : /* istanbul ignore next */ []));
|
|
39
39
|
containerClass = computed(() => zMergeClasses('block w-full', this.class()), /* @ts-ignore */
|
|
40
40
|
...(ngDevMode ? [{ debugName: "containerClass" }] : /* istanbul ignore next */ []));
|
|
@@ -62,10 +62,10 @@ class ZSkeletonAutoComponent {
|
|
|
62
62
|
return merged;
|
|
63
63
|
}, /* @ts-ignore */
|
|
64
64
|
...(ngDevMode ? [{ debugName: "resolvedBoneClass" }] : /* istanbul ignore next */ []));
|
|
65
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
66
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.
|
|
65
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ZSkeletonAutoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
66
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: ZSkeletonAutoComponent, isStandalone: true, selector: "z-skeleton-auto", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zLoading: { classPropertyName: "zLoading", publicName: "zLoading", isSignal: true, isRequired: false, transformFunction: null }, zName: { classPropertyName: "zName", publicName: "zName", isSignal: true, isRequired: false, transformFunction: null }, zColor: { classPropertyName: "zColor", publicName: "zColor", isSignal: true, isRequired: false, transformFunction: null }, zDarkColor: { classPropertyName: "zDarkColor", publicName: "zDarkColor", isSignal: true, isRequired: false, transformFunction: null }, zAnimate: { classPropertyName: "zAnimate", publicName: "zAnimate", isSignal: true, isRequired: false, transformFunction: null }, zWavePreset: { classPropertyName: "zWavePreset", publicName: "zWavePreset", isSignal: true, isRequired: false, transformFunction: null }, zWaveDuration: { classPropertyName: "zWaveDuration", publicName: "zWaveDuration", isSignal: true, isRequired: false, transformFunction: null }, zInitialBones: { classPropertyName: "zInitialBones", publicName: "zInitialBones", isSignal: true, isRequired: false, transformFunction: null }, zStagger: { classPropertyName: "zStagger", publicName: "zStagger", isSignal: true, isRequired: false, transformFunction: null }, zTransition: { classPropertyName: "zTransition", publicName: "zTransition", isSignal: true, isRequired: false, transformFunction: null }, zBoneClass: { classPropertyName: "zBoneClass", publicName: "zBoneClass", isSignal: true, isRequired: false, transformFunction: null }, zFallbackRows: { classPropertyName: "zFallbackRows", publicName: "zFallbackRows", isSignal: true, isRequired: false, transformFunction: null }, zFallbackGap: { classPropertyName: "zFallbackGap", publicName: "zFallbackGap", isSignal: true, isRequired: false, transformFunction: null }, zFallbackRowHeight: { classPropertyName: "zFallbackRowHeight", publicName: "zFallbackRowHeight", isSignal: true, isRequired: false, transformFunction: null }, zFallbackRadius: { classPropertyName: "zFallbackRadius", publicName: "zFallbackRadius", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--z-skeleton-auto-wave-duration": "waveDurationStyle()" } }, ngImport: i0, template: "<boneyard-skeleton\n [loading]=\"zLoading()\"\n [name]=\"zName()\"\n [initialBones]=\"zInitialBones()\"\n [color]=\"zColor()\"\n [darkColor]=\"zDarkColor()\"\n [animate]=\"effectiveAnimate()\"\n [stagger]=\"zStagger()\"\n [transition]=\"zTransition()\"\n [boneClass]=\"resolvedBoneClass()\"\n [cssClass]=\"containerClass()\">\n <ng-content />\n\n <div fallback class=\"w-full\">\n <z-skeleton\n zType=\"text\"\n class=\"w-full\"\n [zRows]=\"zFallbackRows()\"\n [zGap]=\"zFallbackGap()\"\n [zHeight]=\"zFallbackRowHeight()\"\n [zRadius]=\"zFallbackRadius()\" />\n </div>\n</boneyard-skeleton>\n", styles: [":host{display:block}:host ::ng-deep .z-skeleton-auto-bone-legacy{position:relative;overflow:hidden}:host ::ng-deep .z-skeleton-auto-bone-legacy:after{content:\"\";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.42) 50%,transparent 100%);animation:z-skeleton-auto-legacy-wave var(--z-skeleton-auto-wave-duration, 1.5s) infinite}:host-context(.dark) ::ng-deep .z-skeleton-auto-bone-legacy:after{background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.24) 50%,transparent 100%)}@keyframes z-skeleton-auto-legacy-wave{0%{transform:translate(-100%)}to{transform:translate(100%)}}\n"], dependencies: [{ kind: "component", type: SkeletonComponent, selector: "boneyard-skeleton", inputs: ["loading", "name", "initialBones", "color", "darkColor", "animate", "stagger", "transition", "boneClass", "cssClass", "snapshotConfig", "select"] }, { kind: "component", type: ZSkeletonComponent, selector: "z-skeleton", inputs: ["class", "zType", "zSize", "zWidth", "zHeight", "zRows", "zGap", "zAnimated", "zRadius"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
67
67
|
}
|
|
68
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ZSkeletonAutoComponent, decorators: [{
|
|
69
69
|
type: Component,
|
|
70
70
|
args: [{ selector: 'z-skeleton-auto', imports: [SkeletonComponent, ZSkeletonComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
71
71
|
'[style.--z-skeleton-auto-wave-duration]': 'waveDurationStyle()',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shival99-z-ui-components-z-skeleton-auto.mjs","sources":["../../../../libs/core-ui/components/z-skeleton-auto/z-skeleton-auto.component.ts","../../../../libs/core-ui/components/z-skeleton-auto/z-skeleton-auto.component.html","../../../../libs/core-ui/components/z-skeleton-auto/shival99-z-ui-components-z-skeleton-auto.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { ZSkeletonComponent } from '@shival99/z-ui/components/z-skeleton';\nimport { zMergeClasses, zTransform } from '@shival99/z-ui/utils';\nimport { SkeletonComponent as BoneyardSkeletonComponent } from 'boneyard-js/angular';\nimport type { ClassValue } from 'clsx';\nimport type { ZSkeletonAutoAnimate, ZSkeletonAutoBones } from './z-skeleton-auto.types';\n\n@Component({\n selector: 'z-skeleton-auto',\n imports: [BoneyardSkeletonComponent, ZSkeletonComponent],\n standalone: true,\n templateUrl: './z-skeleton-auto.component.html',\n styleUrl: './z-skeleton-auto.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.--z-skeleton-auto-wave-duration]': 'waveDurationStyle()',\n },\n})\nexport class ZSkeletonAutoComponent {\n public readonly class = input<ClassValue>('');\n public readonly zLoading = input(false, { transform: zTransform });\n public readonly zName = input<string>('z-skeleton-auto');\n\n public readonly zColor = input<string | undefined>('#e0e0e0');\n public readonly zDarkColor = input<string | undefined>('#374151');\n public readonly zAnimate = input<ZSkeletonAutoAnimate>('shimmer');\n public readonly zWavePreset = input<'boneyard' | 'legacy-strong'>('legacy-strong');\n public readonly zWaveDuration = input<number>(1.5);\n public readonly zInitialBones = input<ZSkeletonAutoBones | undefined>(undefined);\n public readonly zStagger = input<number | boolean>(false);\n public readonly zTransition = input<number | boolean>(false);\n public readonly zBoneClass = input<string>('');\n\n public readonly zFallbackRows = input<number>(3);\n public readonly zFallbackGap = input<number>(8);\n public readonly zFallbackRowHeight = input<string>('12px');\n public readonly zFallbackRadius = input<string>('
|
|
1
|
+
{"version":3,"file":"shival99-z-ui-components-z-skeleton-auto.mjs","sources":["../../../../libs/core-ui/components/z-skeleton-auto/z-skeleton-auto.component.ts","../../../../libs/core-ui/components/z-skeleton-auto/z-skeleton-auto.component.html","../../../../libs/core-ui/components/z-skeleton-auto/shival99-z-ui-components-z-skeleton-auto.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { ZSkeletonComponent } from '@shival99/z-ui/components/z-skeleton';\nimport { zMergeClasses, zTransform } from '@shival99/z-ui/utils';\nimport { SkeletonComponent as BoneyardSkeletonComponent } from 'boneyard-js/angular';\nimport type { ClassValue } from 'clsx';\nimport type { ZSkeletonAutoAnimate, ZSkeletonAutoBones } from './z-skeleton-auto.types';\n\n@Component({\n selector: 'z-skeleton-auto',\n imports: [BoneyardSkeletonComponent, ZSkeletonComponent],\n standalone: true,\n templateUrl: './z-skeleton-auto.component.html',\n styleUrl: './z-skeleton-auto.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.--z-skeleton-auto-wave-duration]': 'waveDurationStyle()',\n },\n})\nexport class ZSkeletonAutoComponent {\n public readonly class = input<ClassValue>('');\n public readonly zLoading = input(false, { transform: zTransform });\n public readonly zName = input<string>('z-skeleton-auto');\n\n public readonly zColor = input<string | undefined>('#e0e0e0');\n public readonly zDarkColor = input<string | undefined>('#374151');\n public readonly zAnimate = input<ZSkeletonAutoAnimate>('shimmer');\n public readonly zWavePreset = input<'boneyard' | 'legacy-strong'>('legacy-strong');\n public readonly zWaveDuration = input<number>(1.5);\n public readonly zInitialBones = input<ZSkeletonAutoBones | undefined>(undefined);\n public readonly zStagger = input<number | boolean>(false);\n public readonly zTransition = input<number | boolean>(false);\n public readonly zBoneClass = input<string>('');\n\n public readonly zFallbackRows = input<number>(3);\n public readonly zFallbackGap = input<number>(8);\n public readonly zFallbackRowHeight = input<string>('12px');\n public readonly zFallbackRadius = input<string>('var(--radius-sm)');\n\n protected readonly containerClass = computed(() => zMergeClasses('block w-full', this.class()));\n protected readonly effectiveAnimate = computed<ZSkeletonAutoAnimate>(() => {\n if (this.zWavePreset() === 'legacy-strong') {\n return false;\n }\n\n return this.zAnimate();\n });\n\n protected readonly waveDurationStyle = computed(() => {\n const seconds = this.zWaveDuration();\n if (seconds <= 0) {\n return '1.5s';\n }\n\n return `${seconds}s`;\n });\n\n protected readonly resolvedBoneClass = computed(() => {\n const presetClass = this.zWavePreset() === 'legacy-strong' ? 'z-skeleton-auto-bone-legacy' : '';\n const merged = zMergeClasses(presetClass, this.zBoneClass());\n if (!merged) {\n return undefined;\n }\n\n return merged;\n });\n}\n","<boneyard-skeleton\n [loading]=\"zLoading()\"\n [name]=\"zName()\"\n [initialBones]=\"zInitialBones()\"\n [color]=\"zColor()\"\n [darkColor]=\"zDarkColor()\"\n [animate]=\"effectiveAnimate()\"\n [stagger]=\"zStagger()\"\n [transition]=\"zTransition()\"\n [boneClass]=\"resolvedBoneClass()\"\n [cssClass]=\"containerClass()\">\n <ng-content />\n\n <div fallback class=\"w-full\">\n <z-skeleton\n zType=\"text\"\n class=\"w-full\"\n [zRows]=\"zFallbackRows()\"\n [zGap]=\"zFallbackGap()\"\n [zHeight]=\"zFallbackRowHeight()\"\n [zRadius]=\"zFallbackRadius()\" />\n </div>\n</boneyard-skeleton>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["BoneyardSkeletonComponent"],"mappings":";;;;;;MAkBa,sBAAsB,CAAA;IACjB,KAAK,GAAG,KAAK,CAAa,EAAE;8EAAC;IAC7B,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,UAAU,EAAA,CAAG;IAClD,KAAK,GAAG,KAAK,CAAS,iBAAiB;8EAAC;IAExC,MAAM,GAAG,KAAK,CAAqB,SAAS;+EAAC;IAC7C,UAAU,GAAG,KAAK,CAAqB,SAAS;mFAAC;IACjD,QAAQ,GAAG,KAAK,CAAuB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Mode ? [{ debugName: "zGap" }] : /* istanbul ignore next */ []));
|
|
63
63
|
zAnimated = input(true, /* @ts-ignore */
|
|
64
64
|
...(ngDevMode ? [{ debugName: "zAnimated" }] : /* istanbul ignore next */ []));
|
|
65
|
-
zRadius = input('
|
|
65
|
+
zRadius = input('var(--radius-sm)', /* @ts-ignore */
|
|
66
66
|
...(ngDevMode ? [{ debugName: "zRadius" }] : /* istanbul ignore next */ []));
|
|
67
67
|
_calculatedRows = signal(1, /* @ts-ignore */
|
|
68
68
|
...(ngDevMode ? [{ debugName: "_calculatedRows" }] : /* istanbul ignore next */ []));
|
|
@@ -128,17 +128,17 @@ class ZSkeletonComponent {
|
|
|
128
128
|
}
|
|
129
129
|
this._calculatedRows.set(1);
|
|
130
130
|
}
|
|
131
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
132
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
131
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ZSkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
132
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: ZSkeletonComponent, isStandalone: true, selector: "z-skeleton", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zType: { classPropertyName: "zType", publicName: "zType", isSignal: true, isRequired: false, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zWidth: { classPropertyName: "zWidth", publicName: "zWidth", isSignal: true, isRequired: false, transformFunction: null }, zHeight: { classPropertyName: "zHeight", publicName: "zHeight", isSignal: true, isRequired: false, transformFunction: null }, zRows: { classPropertyName: "zRows", publicName: "zRows", isSignal: true, isRequired: false, transformFunction: null }, zGap: { classPropertyName: "zGap", publicName: "zGap", isSignal: true, isRequired: false, transformFunction: null }, zAnimated: { classPropertyName: "zAnimated", publicName: "zAnimated", isSignal: true, isRequired: false, transformFunction: null }, zRadius: { classPropertyName: "zRadius", publicName: "zRadius", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.display": "hostDisplay()", "style.width": "hostWidth()", "style.height": "hostHeight()" }, classAttribute: "z-skeleton-host" }, ngImport: i0, template: "<div class=\"z-skeleton-container\" [class]=\"containerClass()\">\n @if (zType() === 'circle') {\n <div [class]=\"skeletonClasses()\" [style]=\"circleStyles()\"></div>\n } @else if (zType() === 'bar' || zType() === 'text') {\n @if (shouldShowMultipleRows()) {\n @for (row of rowsArray(); track row.index) {\n <div\n class=\"z-skeleton-row\"\n [class]=\"skeletonClasses()\"\n [style.margin-bottom.px]=\"row.index === rowsArray().length - 1 ? 0 : zGap()\"\n [style.height]=\"row.height\"\n [style.width]=\"zWidth()\"\n [style.border-radius]=\"zRadius()\"></div>\n }\n } @else {\n <div\n [class]=\"skeletonClasses()\"\n [style.width]=\"zWidth()\"\n [style.height]=\"zHeight() || '100%'\"\n [style.border-radius]=\"zRadius()\"></div>\n }\n }\n</div>\n", styles: [".z-skeleton-container{display:block;width:100%;height:100%}.z-skeleton{background-color:var(--muted);position:relative;overflow:hidden}.z-skeleton-bar,.z-skeleton-text{width:100%;height:100%}.z-skeleton-row{width:100%}.z-skeleton-circle{border-radius:50%;aspect-ratio:1/1}.z-skeleton-circle-sm{width:2rem;height:2rem}.z-skeleton-circle-default{width:3rem;height:3rem}.z-skeleton-circle-lg{width:4rem;height:4rem}.z-skeleton-text{height:1rem}.z-skeleton-animated:after{content:\"\";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,color-mix(in oklab,var(--foreground) 10%,transparent) 50%,transparent 100%);animation:z-skeleton-shimmer 1.5s infinite}@media(prefers-reduced-motion:reduce){.z-skeleton-animated:after{animation:none}}@keyframes z-skeleton-shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}:host{display:block;width:100%;height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
133
133
|
}
|
|
134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ZSkeletonComponent, decorators: [{
|
|
135
135
|
type: Component,
|
|
136
136
|
args: [{ selector: 'z-skeleton', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
137
137
|
class: 'z-skeleton-host',
|
|
138
138
|
'[style.display]': 'hostDisplay()',
|
|
139
139
|
'[style.width]': 'hostWidth()',
|
|
140
140
|
'[style.height]': 'hostHeight()',
|
|
141
|
-
}, template: "<div class=\"z-skeleton-container\" [class]=\"containerClass()\">\n @if (zType() === 'circle') {\n <div [class]=\"skeletonClasses()\" [style]=\"circleStyles()\"></div>\n } @else if (zType() === 'bar' || zType() === 'text') {\n @if (shouldShowMultipleRows()) {\n @for (row of rowsArray(); track row.index) {\n <div\n class=\"z-skeleton-row\"\n [class]=\"skeletonClasses()\"\n [style.margin-bottom.px]=\"row.index === rowsArray().length - 1 ? 0 : zGap()\"\n [style.height]=\"row.height\"\n [style.width]=\"zWidth()\"\n [style.border-radius]=\"zRadius()\"></div>\n }\n } @else {\n <div\n [class]=\"skeletonClasses()\"\n [style.width]=\"zWidth()\"\n [style.height]=\"zHeight() || '100%'\"\n [style.border-radius]=\"zRadius()\"></div>\n }\n }\n</div>\n", styles: [".z-skeleton-container{display:block;width:100%;height:100%}.z-skeleton{background-color
|
|
141
|
+
}, template: "<div class=\"z-skeleton-container\" [class]=\"containerClass()\">\n @if (zType() === 'circle') {\n <div [class]=\"skeletonClasses()\" [style]=\"circleStyles()\"></div>\n } @else if (zType() === 'bar' || zType() === 'text') {\n @if (shouldShowMultipleRows()) {\n @for (row of rowsArray(); track row.index) {\n <div\n class=\"z-skeleton-row\"\n [class]=\"skeletonClasses()\"\n [style.margin-bottom.px]=\"row.index === rowsArray().length - 1 ? 0 : zGap()\"\n [style.height]=\"row.height\"\n [style.width]=\"zWidth()\"\n [style.border-radius]=\"zRadius()\"></div>\n }\n } @else {\n <div\n [class]=\"skeletonClasses()\"\n [style.width]=\"zWidth()\"\n [style.height]=\"zHeight() || '100%'\"\n [style.border-radius]=\"zRadius()\"></div>\n }\n }\n</div>\n", styles: [".z-skeleton-container{display:block;width:100%;height:100%}.z-skeleton{background-color:var(--muted);position:relative;overflow:hidden}.z-skeleton-bar,.z-skeleton-text{width:100%;height:100%}.z-skeleton-row{width:100%}.z-skeleton-circle{border-radius:50%;aspect-ratio:1/1}.z-skeleton-circle-sm{width:2rem;height:2rem}.z-skeleton-circle-default{width:3rem;height:3rem}.z-skeleton-circle-lg{width:4rem;height:4rem}.z-skeleton-text{height:1rem}.z-skeleton-animated:after{content:\"\";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,color-mix(in oklab,var(--foreground) 10%,transparent) 50%,transparent 100%);animation:z-skeleton-shimmer 1.5s infinite}@media(prefers-reduced-motion:reduce){.z-skeleton-animated:after{animation:none}}@keyframes z-skeleton-shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}:host{display:block;width:100%;height:100%}\n"] }]
|
|
142
142
|
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], zType: [{ type: i0.Input, args: [{ isSignal: true, alias: "zType", required: false }] }], zSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSize", required: false }] }], zWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "zWidth", required: false }] }], zHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "zHeight", required: false }] }], zRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "zRows", required: false }] }], zGap: [{ type: i0.Input, args: [{ isSignal: true, alias: "zGap", required: false }] }], zAnimated: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAnimated", required: false }] }], zRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "zRadius", required: false }] }] } });
|
|
143
143
|
|
|
144
144
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shival99-z-ui-components-z-skeleton.mjs","sources":["../../../../libs/core-ui/components/z-skeleton/z-skeleton.variants.ts","../../../../libs/core-ui/components/z-skeleton/z-skeleton.component.ts","../../../../libs/core-ui/components/z-skeleton/z-skeleton.component.html","../../../../libs/core-ui/components/z-skeleton/shival99-z-ui-components-z-skeleton.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\nexport const zSkeletonVariants = cva('z-skeleton', {\n variants: {\n type: {\n bar: 'z-skeleton-bar',\n circle: 'z-skeleton-circle',\n text: 'z-skeleton-text',\n },\n size: {\n sm: '',\n default: '',\n lg: '',\n },\n animated: {\n true: 'z-skeleton-animated',\n false: '',\n },\n },\n compoundVariants: [\n {\n type: 'circle',\n size: 'sm',\n class: 'z-skeleton-circle-sm',\n },\n {\n type: 'circle',\n size: 'default',\n class: 'z-skeleton-circle-default',\n },\n {\n type: 'circle',\n size: 'lg',\n class: 'z-skeleton-circle-lg',\n },\n ],\n defaultVariants: {\n type: 'bar',\n size: 'default',\n animated: true,\n },\n});\n\nexport type ZSkeletonVariants = VariantProps<typeof zSkeletonVariants>;\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { zMergeClasses } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\nimport { ZSkeletonRowItem, ZSkeletonSize, ZSkeletonType } from './z-skeleton.types';\nimport { zSkeletonVariants } from './z-skeleton.variants';\n\n@Component({\n selector: 'z-skeleton',\n standalone: true,\n templateUrl: './z-skeleton.component.html',\n styleUrl: './z-skeleton.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'z-skeleton-host',\n '[style.display]': 'hostDisplay()',\n '[style.width]': 'hostWidth()',\n '[style.height]': 'hostHeight()',\n },\n})\nexport class ZSkeletonComponent implements AfterViewInit {\n private readonly _elementRef = inject(ElementRef);\n\n public readonly class = input<ClassValue>('');\n public readonly zType = input<ZSkeletonType>('bar');\n public readonly zSize = input<ZSkeletonSize>('default');\n public readonly zWidth = input<string>('100%');\n public readonly zHeight = input<string | undefined>(undefined);\n public readonly zRows = input<number>(1);\n public readonly zGap = input<number>(8);\n public readonly zAnimated = input<boolean>(true);\n public readonly zRadius = input<string>('4px');\n\n private readonly _calculatedRows = signal<number>(1);\n\n ngAfterViewInit(): void {\n if (this.zType() === 'bar') {\n this._calculateBarRows();\n }\n }\n\n protected readonly containerClass = computed(() => zMergeClasses(this.class()));\n protected readonly hostDisplay = computed(() => (this.zType() === 'circle' ? 'inline-block' : 'block'));\n protected readonly hostWidth = computed(() => {\n if (this.zType() === 'circle' && this.zWidth() === '100%') {\n return undefined;\n }\n return this.zWidth();\n });\n\n protected readonly hostHeight = computed(() => {\n const type = this.zType();\n if (type !== 'text' || this.zRows() <= 1) {\n return this.zHeight();\n }\n\n const rowHeight = this.zHeight() ?? '1rem';\n const totalGap = (this.zRows() - 1) * this.zGap();\n\n return `calc(${rowHeight} * ${this.zRows()} + ${totalGap}px)`;\n });\n\n protected readonly skeletonClasses = computed(() =>\n zSkeletonVariants({ type: this.zType(), size: this.zSize(), animated: this.zAnimated() })\n );\n\n protected readonly circleStyles = computed(() => {\n if (this.zHeight() || this.zWidth() !== '100%') {\n return { width: this.zWidth(), height: this.zHeight() || this.zWidth() };\n }\n return {};\n });\n\n protected readonly shouldShowMultipleRows = computed(\n () => (this.zType() === 'bar' || this.zType() === 'text') && this.zRows() > 1\n );\n\n protected readonly rowsArray = computed<ZSkeletonRowItem[]>(() => {\n const type = this.zType();\n if (type !== 'bar' && type !== 'text') {\n return [{ index: 0, height: '0rem' }];\n }\n const rowCount = this.zRows() || this._calculatedRows();\n const gapBetweenRows = this.zGap();\n const totalGapSpace = (rowCount - 1) * gapBetweenRows;\n const height = this.zHeight();\n const rowHeight = height ?? `calc((100% - ${totalGapSpace}px) / ${rowCount})`;\n return Array.from({ length: rowCount }, (_, i) => ({ index: i, height: rowHeight }));\n });\n\n private _calculateBarRows(): void {\n const { parentElement } = this._elementRef.nativeElement || {};\n if (!parentElement) {\n return;\n }\n const rows = this.zRows();\n if (rows && rows > 0) {\n this._calculatedRows.set(rows);\n return;\n }\n this._calculatedRows.set(1);\n }\n}\n","<div class=\"z-skeleton-container\" [class]=\"containerClass()\">\n @if (zType() === 'circle') {\n <div [class]=\"skeletonClasses()\" [style]=\"circleStyles()\"></div>\n } @else if (zType() === 'bar' || zType() === 'text') {\n @if (shouldShowMultipleRows()) {\n @for (row of rowsArray(); track row.index) {\n <div\n class=\"z-skeleton-row\"\n [class]=\"skeletonClasses()\"\n [style.margin-bottom.px]=\"row.index === rowsArray().length - 1 ? 0 : zGap()\"\n [style.height]=\"row.height\"\n [style.width]=\"zWidth()\"\n [style.border-radius]=\"zRadius()\"></div>\n }\n } @else {\n <div\n [class]=\"skeletonClasses()\"\n [style.width]=\"zWidth()\"\n [style.height]=\"zHeight() || '100%'\"\n [style.border-radius]=\"zRadius()\"></div>\n }\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAEO,MAAM,iBAAiB,GAAG,GAAG,CAAC,YAAY,EAAE;AACjD,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,GAAG,EAAE,gBAAgB;AACrB,YAAA,MAAM,EAAE,mBAAmB;AAC3B,YAAA,IAAI,EAAE,iBAAiB;AACxB,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,EAAE;AACN,YAAA,OAAO,EAAE,EAAE;AACX,YAAA,EAAE,EAAE,EAAE;AACP,SAAA;AACD,QAAA,QAAQ,EAAE;AACR,YAAA,IAAI,EAAE,qBAAqB;AAC3B,YAAA,KAAK,EAAE,EAAE;AACV,SAAA;AACF,KAAA;AACD,IAAA,gBAAgB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AC9D,IAAI,CAAC,aAAa,EAAE;YAClB;QACF;AACA,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,EAAE;AACzB,QAAA,IAAI,IAAI,IAAI,IAAI,GAAG,CAAC,EAAE;AACpB,YAAA,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC;YAC9B;QACF;AACA,QAAA,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B;uGAjFW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,+zCC5B/B,o2BAuBA,EAAA,MAAA,EAAA,CAAA,o1BAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FDKa,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAb9B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,cACV,IAAI,EAAA,eAAA,EAGC,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,KAAK,EAAE,iBAAiB;AACxB,wBAAA,iBAAiB,EAAE,eAAe;AAClC,wBAAA,eAAe,EAAE,aAAa;AAC9B,wBAAA,gBAAgB,EAAE,cAAc;AACjC,qBAAA,EAAA,QAAA,EAAA,o2BAAA,EAAA,MAAA,EAAA,CAAA,o1BAAA,CAAA,EAAA;;;AE1BH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"shival99-z-ui-components-z-skeleton.mjs","sources":["../../../../libs/core-ui/components/z-skeleton/z-skeleton.variants.ts","../../../../libs/core-ui/components/z-skeleton/z-skeleton.component.ts","../../../../libs/core-ui/components/z-skeleton/z-skeleton.component.html","../../../../libs/core-ui/components/z-skeleton/shival99-z-ui-components-z-skeleton.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\nexport const zSkeletonVariants = cva('z-skeleton', {\n variants: {\n type: {\n bar: 'z-skeleton-bar',\n circle: 'z-skeleton-circle',\n text: 'z-skeleton-text',\n },\n size: {\n sm: '',\n default: '',\n lg: '',\n },\n animated: {\n true: 'z-skeleton-animated',\n false: '',\n },\n },\n compoundVariants: [\n {\n type: 'circle',\n size: 'sm',\n class: 'z-skeleton-circle-sm',\n },\n {\n type: 'circle',\n size: 'default',\n class: 'z-skeleton-circle-default',\n },\n {\n type: 'circle',\n size: 'lg',\n class: 'z-skeleton-circle-lg',\n },\n ],\n defaultVariants: {\n type: 'bar',\n size: 'default',\n animated: true,\n },\n});\n\nexport type ZSkeletonVariants = VariantProps<typeof zSkeletonVariants>;\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { zMergeClasses } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\nimport { ZSkeletonRowItem, ZSkeletonSize, ZSkeletonType } from './z-skeleton.types';\nimport { zSkeletonVariants } from './z-skeleton.variants';\n\n@Component({\n selector: 'z-skeleton',\n standalone: true,\n templateUrl: './z-skeleton.component.html',\n styleUrl: './z-skeleton.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'z-skeleton-host',\n '[style.display]': 'hostDisplay()',\n '[style.width]': 'hostWidth()',\n '[style.height]': 'hostHeight()',\n },\n})\nexport class ZSkeletonComponent implements AfterViewInit {\n private readonly _elementRef = inject(ElementRef);\n\n public readonly class = input<ClassValue>('');\n public readonly zType = input<ZSkeletonType>('bar');\n public readonly zSize = input<ZSkeletonSize>('default');\n public readonly zWidth = input<string>('100%');\n public readonly zHeight = input<string | undefined>(undefined);\n public readonly zRows = input<number>(1);\n public readonly zGap = input<number>(8);\n public readonly zAnimated = input<boolean>(true);\n public readonly zRadius = input<string>('var(--radius-sm)');\n\n private readonly _calculatedRows = signal<number>(1);\n\n ngAfterViewInit(): void {\n if (this.zType() === 'bar') {\n this._calculateBarRows();\n }\n }\n\n protected readonly containerClass = computed(() => zMergeClasses(this.class()));\n protected readonly hostDisplay = computed(() => (this.zType() === 'circle' ? 'inline-block' : 'block'));\n protected readonly hostWidth = computed(() => {\n if (this.zType() === 'circle' && this.zWidth() === '100%') {\n return undefined;\n }\n return this.zWidth();\n });\n\n protected readonly hostHeight = computed(() => {\n const type = this.zType();\n if (type !== 'text' || this.zRows() <= 1) {\n return this.zHeight();\n }\n\n const rowHeight = this.zHeight() ?? '1rem';\n const totalGap = (this.zRows() - 1) * this.zGap();\n\n return `calc(${rowHeight} * ${this.zRows()} + ${totalGap}px)`;\n });\n\n protected readonly skeletonClasses = computed(() =>\n zSkeletonVariants({ type: this.zType(), size: this.zSize(), animated: this.zAnimated() })\n );\n\n protected readonly circleStyles = computed(() => {\n if (this.zHeight() || this.zWidth() !== '100%') {\n return { width: this.zWidth(), height: this.zHeight() || this.zWidth() };\n }\n return {};\n });\n\n protected readonly shouldShowMultipleRows = computed(\n () => (this.zType() === 'bar' || this.zType() === 'text') && this.zRows() > 1\n );\n\n protected readonly rowsArray = computed<ZSkeletonRowItem[]>(() => {\n const type = this.zType();\n if (type !== 'bar' && type !== 'text') {\n return [{ index: 0, height: '0rem' }];\n }\n const rowCount = this.zRows() || this._calculatedRows();\n const gapBetweenRows = this.zGap();\n const totalGapSpace = (rowCount - 1) * gapBetweenRows;\n const height = this.zHeight();\n const rowHeight = height ?? `calc((100% - ${totalGapSpace}px) / ${rowCount})`;\n return Array.from({ length: rowCount }, (_, i) => ({ index: i, height: rowHeight }));\n });\n\n private _calculateBarRows(): void {\n const { parentElement } = this._elementRef.nativeElement || {};\n if (!parentElement) {\n return;\n }\n const rows = this.zRows();\n if (rows && rows > 0) {\n this._calculatedRows.set(rows);\n return;\n }\n this._calculatedRows.set(1);\n }\n}\n","<div class=\"z-skeleton-container\" [class]=\"containerClass()\">\n @if (zType() === 'circle') {\n <div [class]=\"skeletonClasses()\" [style]=\"circleStyles()\"></div>\n } @else if (zType() === 'bar' || zType() === 'text') {\n @if (shouldShowMultipleRows()) {\n @for (row of rowsArray(); track row.index) {\n <div\n class=\"z-skeleton-row\"\n [class]=\"skeletonClasses()\"\n [style.margin-bottom.px]=\"row.index === rowsArray().length - 1 ? 0 : zGap()\"\n [style.height]=\"row.height\"\n [style.width]=\"zWidth()\"\n [style.border-radius]=\"zRadius()\"></div>\n }\n } @else {\n <div\n [class]=\"skeletonClasses()\"\n [style.width]=\"zWidth()\"\n [style.height]=\"zHeight() || '100%'\"\n [style.border-radius]=\"zRadius()\"></div>\n }\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAEO,MAAM,iBAAiB,GAAG,GAAG,CAAC,YAAY,EAAE;AACjD,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,GAAG,EAAE,gBAAgB;AACrB,YAAA,MAAM,EAAE,mBAAmB;AAC3B,YAAA,IAAI,EAAE,iBAAiB;AACxB,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,EAAE;AACN,YAAA,OAAO,EAAE,EAAE;AACX,YAAA,EAAE,EAAE,EAAE;AACP,SAAA;AACD,QAAA,QAAQ,EAAE;AACR,YAAA,IAAI,EAAE,qBAAqB;AAC3B,YAAA,KAAK,EAAE,EAAE;AACV,SAAA;AACF,KAAA;AACD,IAAA,gBAAgB,EAAE;AAChB,QAAA;AACE,YAAA,IAAI,EAAE,QAAQ;AACd,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,KAAK,EAAE,sBAAsB;AAC9B,SAAA;AACD,QAAA;AACE,YAAA,IAAI,EAAE,QAAQ;AACd,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,KAAK,EAAE,2BAA2B;AACnC,SAAA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AAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B;uGAjFW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,+zCC5B/B,o2BAuBA,EAAA,MAAA,EAAA,CAAA,43BAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FDKa,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAb9B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,cACV,IAAI,EAAA,eAAA,EAGC,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,KAAK,EAAE,iBAAiB;AACxB,wBAAA,iBAAiB,EAAE,eAAe;AAClC,wBAAA,eAAe,EAAE,aAAa;AAC9B,wBAAA,gBAAgB,EAAE,cAAc;AACjC,qBAAA,EAAA,QAAA,EAAA,o2BAAA,EAAA,MAAA,EAAA,CAAA,43BAAA,CAAA,EAAA;;;AE1BH;;AAEG;;"}
|
|
@@ -402,14 +402,14 @@ class ZStepsComponent {
|
|
|
402
402
|
}
|
|
403
403
|
this.zOnStepClick.emit(index);
|
|
404
404
|
}
|
|
405
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
406
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: ZStepsComponent, isStandalone: true, selector: "z-steps", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zSteps: { classPropertyName: "zSteps", publicName: "zSteps", isSignal: true, isRequired: true, transformFunction: null }, zCurrent: { classPropertyName: "zCurrent", publicName: "zCurrent", isSignal: true, isRequired: false, transformFunction: null }, zOrientation: { classPropertyName: "zOrientation", publicName: "zOrientation", isSignal: true, isRequired: false, transformFunction: null }, zType: { classPropertyName: "zType", publicName: "zType", isSignal: true, isRequired: false, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zClickable: { classPropertyName: "zClickable", publicName: "zClickable", isSignal: true, isRequired: false, transformFunction: null }, zShowNumber: { classPropertyName: "zShowNumber", publicName: "zShowNumber", isSignal: true, isRequired: false, transformFunction: null }, zResponsive: { classPropertyName: "zResponsive", publicName: "zResponsive", isSignal: true, isRequired: false, transformFunction: null }, zDisabled: { classPropertyName: "zDisabled", publicName: "zDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zOnStepClick: "zOnStepClick", zControl: "zControl" }, host: { classAttribute: "block" }, ngImport: i0, template: "<ol\n [class]=\"containerClasses()\"\n [class.rounded-md]=\"effectiveOrientation() === 'horizontal' && (zType() === 'inline' || zType() === 'dot')\"\n [class.border]=\"effectiveOrientation() === 'horizontal' && (zType() === 'inline' || zType() === 'dot')\"\n [class.border-border/70]=\"effectiveOrientation() === 'horizontal' && (zType() === 'inline' || zType() === 'dot')\"\n [class.bg-muted/20]=\"effectiveOrientation() === 'horizontal' && (zType() === 'inline' || zType() === 'dot')\"\n [class.p-2]=\"effectiveOrientation() === 'horizontal' && (zType() === 'inline' || zType() === 'dot')\">\n @for (step of mergedSteps(); track $index; let i = $index; let last = $last) {\n @if (effectiveOrientation() === 'vertical') {\n @if (zType() === 'dot') {\n <!-- Vertical Dot Layout -->\n <li\n class=\"flex items-start gap-3\"\n [class.cursor-pointer]=\"zClickable() && !step.disabled\"\n [class.cursor-not-allowed]=\"step.disabled\"\n [class.opacity-50]=\"step.disabled\"\n (click)=\"onStepClick(i)\">\n <!-- Dot + Line Column -->\n <div class=\"flex w-10 shrink-0 flex-col items-center\">\n <!-- Dot -->\n <span [class]=\"getDotClassesByIndex()[i]\" class=\"shrink-0\"></span>\n <!-- Vertical Line -->\n @if (!last) {\n <div\n class=\"my-1 h-10 w-[0.125rem] rounded-full\"\n [class.bg-primary]=\"stepStatuses()[i] === 'completed'\"\n [class.bg-destructive/40]=\"stepStatuses()[i] === 'error'\"\n [class.bg-muted-foreground/30]=\"\n stepStatuses()[i] !== 'completed' && stepStatuses()[i] !== 'error'\n \"></div>\n }\n </div>\n\n <!-- Content (optional) -->\n @if (step.title) {\n <span\n class=\"pt-0.5 text-sm\"\n [class.text-foreground]=\"stepStatuses()[i] === 'current'\"\n [class.font-medium]=\"stepStatuses()[i] === 'current'\"\n [class.text-muted-foreground]=\"stepStatuses()[i] !== 'current'\">\n {{ step.title }}\n </span>\n }\n </li>\n } @else {\n <!-- Vertical Layout -->\n <li\n class=\"flex items-start gap-3\"\n [class.cursor-pointer]=\"zClickable() && !step.disabled\"\n [class.cursor-not-allowed]=\"step.disabled\"\n [class.opacity-50]=\"step.disabled\"\n (click)=\"onStepClick(i)\">\n <div class=\"flex w-10 shrink-0 flex-col items-center\">\n <!-- Step Icon -->\n <span [class]=\"iconClassesMap().get(i)\" class=\"relative! start-auto!\">\n @switch (stepStatuses()[i]) {\n @case ('completed') {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else {\n <z-icon zType=\"lucideCheck\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n }\n @case ('error') {\n <z-icon zType=\"lucideX\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n @default {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else if (zShowNumber()) {\n <span class=\"font-medium\">{{ i + 1 }}</span>\n }\n }\n }\n </span>\n\n <!-- Vertical Line -->\n @if (!last) {\n <div\n class=\"my-1 h-10 w-[0.125rem] rounded-full\"\n [class.bg-primary]=\"stepStatuses()[i] === 'completed'\"\n [class.bg-destructive/40]=\"stepStatuses()[i] === 'error'\"\n [class.bg-muted-foreground/30]=\"\n stepStatuses()[i] !== 'completed' && stepStatuses()[i] !== 'error'\n \"></div>\n }\n </div>\n\n <!-- Content -->\n @if (step.title || step.description) {\n <div class=\"min-w-0 flex-1 pt-1 pb-3\">\n @if (step.title) {\n <h3 class=\"leading-tight font-medium\">{{ step.title }}</h3>\n }\n @if (step.description) {\n <p class=\"text-muted-foreground mt-1 text-sm\">{{ step.description }}</p>\n }\n </div>\n }\n </li>\n }\n } @else {\n <!-- Horizontal Layout -->\n <li\n [class]=\"zType() === 'arrow' ? 'flex-1' : 'flex-1 last:flex-none'\"\n [class.cursor-pointer]=\"zClickable() && !step.disabled\"\n [class.cursor-not-allowed]=\"step.disabled\"\n [class.opacity-50]=\"step.disabled\"\n (click)=\"onStepClick(i)\">\n @if (zType() === 'arrow') {\n <!-- Arrow Style -->\n <div [class]=\"getArrowClassesByIndex()[i]\">\n <div class=\"flex items-center gap-3.5\">\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" class=\"shrink-0\" />\n }\n <div class=\"flex min-w-0 flex-col\">\n @if (step.title) {\n <h3\n z-tooltip\n [zContent]=\"step.title\"\n [zAutoDetect]=\"true\"\n zPosition=\"top\"\n class=\"truncate text-sm leading-tight font-semibold whitespace-nowrap\">\n {{ step.title }}\n </h3>\n }\n @if (step.description) {\n <p\n z-tooltip\n [zContent]=\"step.description\"\n [zAutoDetect]=\"true\"\n zPosition=\"bottom\"\n class=\"mt-1 truncate text-xs whitespace-nowrap opacity-80\">\n {{ step.description }}\n </p>\n }\n </div>\n </div>\n </div>\n } @else if (zType() === 'dot') {\n <!-- Dot Style: Simple dots with optional labels -->\n <div class=\"flex items-center\">\n <!-- Dot -->\n <span [class]=\"getDotClassesByIndex()[i]\"></span>\n\n <!-- Content (optional) -->\n @if (step.title) {\n <span\n z-tooltip\n [zContent]=\"step.title\"\n [zAutoDetect]=\"true\"\n zPosition=\"top\"\n class=\"ms-2 max-w-24 truncate text-sm whitespace-nowrap\"\n [class.text-foreground]=\"stepStatuses()[i] === 'current'\"\n [class.font-medium]=\"stepStatuses()[i] === 'current'\"\n [class.text-muted-foreground]=\"stepStatuses()[i] !== 'current'\">\n {{ step.title }}\n </span>\n }\n\n <!-- Horizontal Line -->\n @if (!last) {\n <div\n class=\"mx-3 h-[0.1875rem] min-w-8 flex-1 rounded-full\"\n [class.bg-primary]=\"stepStatuses()[i] === 'completed'\"\n [class.bg-destructive/40]=\"stepStatuses()[i] === 'error'\"\n [class.bg-muted-foreground/25]=\"\n stepStatuses()[i] !== 'completed' && stepStatuses()[i] !== 'error'\n \"></div>\n }\n </div>\n } @else if (zType() === 'inline') {\n <!-- Inline: Icon + Content + Line in one row -->\n <div class=\"flex items-center\">\n <div class=\"flex min-w-0 flex-1 items-center gap-2.5 px-2.5 py-2\">\n <!-- Step Icon -->\n <span [class]=\"iconClassesMap().get(i)\" class=\"relative! start-auto! shrink-0\">\n @switch (stepStatuses()[i]) {\n @case ('completed') {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else {\n <z-icon zType=\"lucideCheck\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n }\n @case ('error') {\n <z-icon zType=\"lucideX\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n @default {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else if (zShowNumber()) {\n <span class=\"font-medium\">{{ i + 1 }}</span>\n }\n }\n }\n </span>\n\n <!-- Content Inline -->\n @if (step.title || step.description) {\n <div class=\"min-w-0 flex-1\">\n @if (step.title) {\n <h3\n z-tooltip\n [zContent]=\"step.title\"\n [zAutoDetect]=\"true\"\n zPosition=\"top\"\n class=\"truncate text-sm leading-tight font-medium whitespace-nowrap\">\n {{ step.title }}\n </h3>\n }\n @if (step.description) {\n <p\n z-tooltip\n [zContent]=\"step.description\"\n [zAutoDetect]=\"true\"\n zPosition=\"bottom\"\n class=\"text-muted-foreground mt-1 truncate text-xs whitespace-nowrap\">\n {{ step.description }}\n </p>\n }\n </div>\n }\n </div>\n\n <!-- Horizontal Line -->\n @if (!last) {\n <div\n class=\"mx-3 h-[0.1875rem] min-w-8 flex-1 rounded-full\"\n [class.bg-primary]=\"stepStatuses()[i] === 'completed'\"\n [class.bg-destructive/40]=\"stepStatuses()[i] === 'error'\"\n [class.bg-muted-foreground/25]=\"\n stepStatuses()[i] !== 'completed' && stepStatuses()[i] !== 'error'\n \"></div>\n }\n </div>\n } @else {\n <!-- Default: Icon + Line row, Content below -->\n <div class=\"flex items-center\">\n <!-- Step Icon -->\n <span [class]=\"iconClassesMap().get(i)\" class=\"relative! start-auto! shrink-0\">\n @switch (stepStatuses()[i]) {\n @case ('completed') {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else {\n <z-icon zType=\"lucideCheck\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n }\n @case ('error') {\n <z-icon zType=\"lucideX\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n @default {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else if (zShowNumber()) {\n <span class=\"font-medium\">{{ i + 1 }}</span>\n }\n }\n }\n </span>\n\n <!-- Horizontal Line -->\n @if (!last) {\n <div [class]=\"getConnectorClassesByIndex()[i]\"></div>\n }\n </div>\n\n <!-- Content Below -->\n @if (step.title || step.description) {\n <div\n class=\"z-steps-content mt-3 flex flex-col text-center\"\n [style.width.px]=\"150\"\n [style.margin-left.px]=\"(iconWidth() - 150) / 2\">\n @if (step.title) {\n <h3\n z-tooltip\n [zContent]=\"step.title\"\n [zAutoDetect]=\"true\"\n zPosition=\"top\"\n class=\"truncate text-sm leading-tight font-medium whitespace-nowrap\">\n {{ step.title }}\n </h3>\n }\n @if (step.description) {\n <p\n z-tooltip\n [zContent]=\"step.description\"\n [zAutoDetect]=\"true\"\n zPosition=\"bottom\"\n class=\"text-muted-foreground mt-1 truncate text-xs whitespace-nowrap\">\n {{ step.description }}\n </p>\n }\n </div>\n }\n }\n </li>\n }\n }\n</ol>\n", styles: ["z-steps ol li:not(:last-child)>div[class*=border-s]{height:calc(100% + 2rem)}z-steps ol li[class*=mb-6]:not(:last-child)>div[class*=border-s]{height:calc(100% + 1.5rem)}z-steps ol li[class*=mb-10]:not(:last-child)>div[class*=border-s]{height:calc(100% + 2.5rem)}z-steps .z-steps-arrow-item{position:relative;display:flex;flex-direction:column;justify-content:center;transition:all .2s ease-out}z-steps .z-steps-arrow-item:hover{filter:brightness(.92)}z-steps .z-steps-arrow-first{border-radius:.375rem 0 0 .375rem;clip-path:polygon(0 0,calc(100% - 16px) 0,100% 50%,calc(100% - 16px) 100%,0 100%)}z-steps .z-steps-arrow-middle{margin-left:-.5rem;padding-left:2rem;clip-path:polygon(0 0,calc(100% - 16px) 0,100% 50%,calc(100% - 16px) 100%,0 100%,16px 50%)}z-steps .z-steps-arrow-last{margin-left:-.5rem;padding-left:2rem;border-radius:0 .375rem .375rem 0;clip-path:polygon(0 0,100% 0,100% 100%,0 100%,16px 50%)}\n"], dependencies: [{ kind: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zAnimatedType", "zAnimate", "zAnimationTrigger", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "directive", type: ZTooltipDirective, selector: "[z-tooltip], [zTooltip]", inputs: ["zContent", "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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
405
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ZStepsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
406
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: ZStepsComponent, isStandalone: true, selector: "z-steps", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zSteps: { classPropertyName: "zSteps", publicName: "zSteps", isSignal: true, isRequired: true, transformFunction: null }, zCurrent: { classPropertyName: "zCurrent", publicName: "zCurrent", isSignal: true, isRequired: false, transformFunction: null }, zOrientation: { classPropertyName: "zOrientation", publicName: "zOrientation", isSignal: true, isRequired: false, transformFunction: null }, zType: { classPropertyName: "zType", publicName: "zType", isSignal: true, isRequired: false, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zClickable: { classPropertyName: "zClickable", publicName: "zClickable", isSignal: true, isRequired: false, transformFunction: null }, zShowNumber: { classPropertyName: "zShowNumber", publicName: "zShowNumber", isSignal: true, isRequired: false, transformFunction: null }, zResponsive: { classPropertyName: "zResponsive", publicName: "zResponsive", isSignal: true, isRequired: false, transformFunction: null }, zDisabled: { classPropertyName: "zDisabled", publicName: "zDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zOnStepClick: "zOnStepClick", zControl: "zControl" }, host: { classAttribute: "block" }, ngImport: i0, template: "<ol\n [class]=\"containerClasses()\"\n [class.rounded-md]=\"effectiveOrientation() === 'horizontal' && (zType() === 'inline' || zType() === 'dot')\"\n [class.border]=\"effectiveOrientation() === 'horizontal' && (zType() === 'inline' || zType() === 'dot')\"\n [class.border-border/70]=\"effectiveOrientation() === 'horizontal' && (zType() === 'inline' || zType() === 'dot')\"\n [class.bg-muted/20]=\"effectiveOrientation() === 'horizontal' && (zType() === 'inline' || zType() === 'dot')\"\n [class.p-2]=\"effectiveOrientation() === 'horizontal' && (zType() === 'inline' || zType() === 'dot')\">\n @for (step of mergedSteps(); track $index; let i = $index; let last = $last) {\n @if (effectiveOrientation() === 'vertical') {\n @if (zType() === 'dot') {\n <!-- Vertical Dot Layout -->\n <li\n class=\"flex items-start gap-3\"\n [class.cursor-pointer]=\"zClickable() && !step.disabled\"\n [class.cursor-not-allowed]=\"step.disabled\"\n [class.opacity-50]=\"step.disabled\"\n (click)=\"onStepClick(i)\">\n <!-- Dot + Line Column -->\n <div class=\"flex w-10 shrink-0 flex-col items-center\">\n <!-- Dot -->\n <span [class]=\"getDotClassesByIndex()[i]\" class=\"shrink-0\"></span>\n <!-- Vertical Line -->\n @if (!last) {\n <div\n class=\"my-1 h-10 w-[0.125rem] rounded-full\"\n [class.bg-primary]=\"stepStatuses()[i] === 'completed'\"\n [class.bg-destructive/40]=\"stepStatuses()[i] === 'error'\"\n [class.bg-muted-foreground/30]=\"\n stepStatuses()[i] !== 'completed' && stepStatuses()[i] !== 'error'\n \"></div>\n }\n </div>\n\n <!-- Content (optional) -->\n @if (step.title) {\n <span\n class=\"pt-0.5 text-sm\"\n [class.text-foreground]=\"stepStatuses()[i] === 'current'\"\n [class.font-medium]=\"stepStatuses()[i] === 'current'\"\n [class.text-muted-foreground]=\"stepStatuses()[i] !== 'current'\">\n {{ step.title }}\n </span>\n }\n </li>\n } @else {\n <!-- Vertical Layout -->\n <li\n class=\"flex items-start gap-3\"\n [class.cursor-pointer]=\"zClickable() && !step.disabled\"\n [class.cursor-not-allowed]=\"step.disabled\"\n [class.opacity-50]=\"step.disabled\"\n (click)=\"onStepClick(i)\">\n <div class=\"flex w-10 shrink-0 flex-col items-center\">\n <!-- Step Icon -->\n <span [class]=\"iconClassesMap().get(i)\" class=\"relative! start-auto!\">\n @switch (stepStatuses()[i]) {\n @case ('completed') {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else {\n <z-icon zType=\"lucideCheck\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n }\n @case ('error') {\n <z-icon zType=\"lucideX\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n @default {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else if (zShowNumber()) {\n <span class=\"font-medium\">{{ i + 1 }}</span>\n }\n }\n }\n </span>\n\n <!-- Vertical Line -->\n @if (!last) {\n <div\n class=\"my-1 h-10 w-[0.125rem] rounded-full\"\n [class.bg-primary]=\"stepStatuses()[i] === 'completed'\"\n [class.bg-destructive/40]=\"stepStatuses()[i] === 'error'\"\n [class.bg-muted-foreground/30]=\"\n stepStatuses()[i] !== 'completed' && stepStatuses()[i] !== 'error'\n \"></div>\n }\n </div>\n\n <!-- Content -->\n @if (step.title || step.description) {\n <div class=\"min-w-0 flex-1 pt-1 pb-3\">\n @if (step.title) {\n <h3 class=\"leading-tight font-medium\">{{ step.title }}</h3>\n }\n @if (step.description) {\n <p class=\"text-muted-foreground mt-1 text-sm\">{{ step.description }}</p>\n }\n </div>\n }\n </li>\n }\n } @else {\n <!-- Horizontal Layout -->\n <li\n [class]=\"zType() === 'arrow' ? 'flex-1' : 'flex-1 last:flex-none'\"\n [class.cursor-pointer]=\"zClickable() && !step.disabled\"\n [class.cursor-not-allowed]=\"step.disabled\"\n [class.opacity-50]=\"step.disabled\"\n (click)=\"onStepClick(i)\">\n @if (zType() === 'arrow') {\n <!-- Arrow Style -->\n <div [class]=\"getArrowClassesByIndex()[i]\">\n <div class=\"flex items-center gap-3.5\">\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" class=\"shrink-0\" />\n }\n <div class=\"flex min-w-0 flex-col\">\n @if (step.title) {\n <h3\n z-tooltip\n [zContent]=\"step.title\"\n [zAutoDetect]=\"true\"\n zPosition=\"top\"\n class=\"truncate text-sm leading-tight font-semibold whitespace-nowrap\">\n {{ step.title }}\n </h3>\n }\n @if (step.description) {\n <p\n z-tooltip\n [zContent]=\"step.description\"\n [zAutoDetect]=\"true\"\n zPosition=\"bottom\"\n class=\"mt-1 truncate text-xs whitespace-nowrap opacity-80\">\n {{ step.description }}\n </p>\n }\n </div>\n </div>\n </div>\n } @else if (zType() === 'dot') {\n <!-- Dot Style: Simple dots with optional labels -->\n <div class=\"flex items-center\">\n <!-- Dot -->\n <span [class]=\"getDotClassesByIndex()[i]\"></span>\n\n <!-- Content (optional) -->\n @if (step.title) {\n <span\n z-tooltip\n [zContent]=\"step.title\"\n [zAutoDetect]=\"true\"\n zPosition=\"top\"\n class=\"ms-2 max-w-24 truncate text-sm whitespace-nowrap\"\n [class.text-foreground]=\"stepStatuses()[i] === 'current'\"\n [class.font-medium]=\"stepStatuses()[i] === 'current'\"\n [class.text-muted-foreground]=\"stepStatuses()[i] !== 'current'\">\n {{ step.title }}\n </span>\n }\n\n <!-- Horizontal Line -->\n @if (!last) {\n <div\n class=\"mx-3 h-[0.1875rem] min-w-8 flex-1 rounded-full\"\n [class.bg-primary]=\"stepStatuses()[i] === 'completed'\"\n [class.bg-destructive/40]=\"stepStatuses()[i] === 'error'\"\n [class.bg-muted-foreground/25]=\"\n stepStatuses()[i] !== 'completed' && stepStatuses()[i] !== 'error'\n \"></div>\n }\n </div>\n } @else if (zType() === 'inline') {\n <!-- Inline: Icon + Content + Line in one row -->\n <div class=\"flex items-center\">\n <div class=\"flex min-w-0 flex-1 items-center gap-2.5 px-2.5 py-2\">\n <!-- Step Icon -->\n <span [class]=\"iconClassesMap().get(i)\" class=\"relative! start-auto! shrink-0\">\n @switch (stepStatuses()[i]) {\n @case ('completed') {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else {\n <z-icon zType=\"lucideCheck\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n }\n @case ('error') {\n <z-icon zType=\"lucideX\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n @default {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else if (zShowNumber()) {\n <span class=\"font-medium\">{{ i + 1 }}</span>\n }\n }\n }\n </span>\n\n <!-- Content Inline -->\n @if (step.title || step.description) {\n <div class=\"min-w-0 flex-1\">\n @if (step.title) {\n <h3\n z-tooltip\n [zContent]=\"step.title\"\n [zAutoDetect]=\"true\"\n zPosition=\"top\"\n class=\"truncate text-sm leading-tight font-medium whitespace-nowrap\">\n {{ step.title }}\n </h3>\n }\n @if (step.description) {\n <p\n z-tooltip\n [zContent]=\"step.description\"\n [zAutoDetect]=\"true\"\n zPosition=\"bottom\"\n class=\"text-muted-foreground mt-1 truncate text-xs whitespace-nowrap\">\n {{ step.description }}\n </p>\n }\n </div>\n }\n </div>\n\n <!-- Horizontal Line -->\n @if (!last) {\n <div\n class=\"mx-3 h-[0.1875rem] min-w-8 flex-1 rounded-full\"\n [class.bg-primary]=\"stepStatuses()[i] === 'completed'\"\n [class.bg-destructive/40]=\"stepStatuses()[i] === 'error'\"\n [class.bg-muted-foreground/25]=\"\n stepStatuses()[i] !== 'completed' && stepStatuses()[i] !== 'error'\n \"></div>\n }\n </div>\n } @else {\n <!-- Default: Icon + Line row, Content below -->\n <div class=\"flex items-center\">\n <!-- Step Icon -->\n <span [class]=\"iconClassesMap().get(i)\" class=\"relative! start-auto! shrink-0\">\n @switch (stepStatuses()[i]) {\n @case ('completed') {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else {\n <z-icon zType=\"lucideCheck\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n }\n @case ('error') {\n <z-icon zType=\"lucideX\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n @default {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else if (zShowNumber()) {\n <span class=\"font-medium\">{{ i + 1 }}</span>\n }\n }\n }\n </span>\n\n <!-- Horizontal Line -->\n @if (!last) {\n <div [class]=\"getConnectorClassesByIndex()[i]\"></div>\n }\n </div>\n\n <!-- Content Below -->\n @if (step.title || step.description) {\n <div\n class=\"z-steps-content mt-3 flex flex-col text-center\"\n [style.width.px]=\"150\"\n [style.margin-left.px]=\"(iconWidth() - 150) / 2\">\n @if (step.title) {\n <h3\n z-tooltip\n [zContent]=\"step.title\"\n [zAutoDetect]=\"true\"\n zPosition=\"top\"\n class=\"truncate text-sm leading-tight font-medium whitespace-nowrap\">\n {{ step.title }}\n </h3>\n }\n @if (step.description) {\n <p\n z-tooltip\n [zContent]=\"step.description\"\n [zAutoDetect]=\"true\"\n zPosition=\"bottom\"\n class=\"text-muted-foreground mt-1 truncate text-xs whitespace-nowrap\">\n {{ step.description }}\n </p>\n }\n </div>\n }\n }\n </li>\n }\n }\n</ol>\n", styles: ["z-steps ol li:not(:last-child)>div[class*=border-s]{height:calc(100% + 2rem)}z-steps ol li[class*=mb-6]:not(:last-child)>div[class*=border-s]{height:calc(100% + 1.5rem)}z-steps ol li[class*=mb-10]:not(:last-child)>div[class*=border-s]{height:calc(100% + 2.5rem)}z-steps .z-steps-arrow-item{position:relative;display:flex;flex-direction:column;justify-content:center;transition:all .2s ease-out}z-steps .z-steps-arrow-item:hover{filter:brightness(.92)}z-steps .z-steps-arrow-first{border-radius:var(--radius-md) 0 0 var(--radius-md);clip-path:polygon(0 0,calc(100% - 16px) 0,100% 50%,calc(100% - 16px) 100%,0 100%)}z-steps .z-steps-arrow-middle{margin-left:-.5rem;padding-left:2rem;clip-path:polygon(0 0,calc(100% - 16px) 0,100% 50%,calc(100% - 16px) 100%,0 100%,16px 50%)}z-steps .z-steps-arrow-last{margin-left:-.5rem;padding-left:2rem;border-radius:0 var(--radius-md) var(--radius-md) 0;clip-path:polygon(0 0,100% 0,100% 100%,0 100%,16px 50%)}\n"], dependencies: [{ kind: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zAnimatedType", "zAnimate", "zAnimationTrigger", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "directive", type: ZTooltipDirective, selector: "[z-tooltip], [zTooltip]", inputs: ["zContent", "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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
407
407
|
}
|
|
408
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
408
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ZStepsComponent, decorators: [{
|
|
409
409
|
type: Component,
|
|
410
410
|
args: [{ selector: 'z-steps', imports: [ZIconComponent, ZTooltipDirective], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
411
411
|
class: 'block',
|
|
412
|
-
}, template: "<ol\n [class]=\"containerClasses()\"\n [class.rounded-md]=\"effectiveOrientation() === 'horizontal' && (zType() === 'inline' || zType() === 'dot')\"\n [class.border]=\"effectiveOrientation() === 'horizontal' && (zType() === 'inline' || zType() === 'dot')\"\n [class.border-border/70]=\"effectiveOrientation() === 'horizontal' && (zType() === 'inline' || zType() === 'dot')\"\n [class.bg-muted/20]=\"effectiveOrientation() === 'horizontal' && (zType() === 'inline' || zType() === 'dot')\"\n [class.p-2]=\"effectiveOrientation() === 'horizontal' && (zType() === 'inline' || zType() === 'dot')\">\n @for (step of mergedSteps(); track $index; let i = $index; let last = $last) {\n @if (effectiveOrientation() === 'vertical') {\n @if (zType() === 'dot') {\n <!-- Vertical Dot Layout -->\n <li\n class=\"flex items-start gap-3\"\n [class.cursor-pointer]=\"zClickable() && !step.disabled\"\n [class.cursor-not-allowed]=\"step.disabled\"\n [class.opacity-50]=\"step.disabled\"\n (click)=\"onStepClick(i)\">\n <!-- Dot + Line Column -->\n <div class=\"flex w-10 shrink-0 flex-col items-center\">\n <!-- Dot -->\n <span [class]=\"getDotClassesByIndex()[i]\" class=\"shrink-0\"></span>\n <!-- Vertical Line -->\n @if (!last) {\n <div\n class=\"my-1 h-10 w-[0.125rem] rounded-full\"\n [class.bg-primary]=\"stepStatuses()[i] === 'completed'\"\n [class.bg-destructive/40]=\"stepStatuses()[i] === 'error'\"\n [class.bg-muted-foreground/30]=\"\n stepStatuses()[i] !== 'completed' && stepStatuses()[i] !== 'error'\n \"></div>\n }\n </div>\n\n <!-- Content (optional) -->\n @if (step.title) {\n <span\n class=\"pt-0.5 text-sm\"\n [class.text-foreground]=\"stepStatuses()[i] === 'current'\"\n [class.font-medium]=\"stepStatuses()[i] === 'current'\"\n [class.text-muted-foreground]=\"stepStatuses()[i] !== 'current'\">\n {{ step.title }}\n </span>\n }\n </li>\n } @else {\n <!-- Vertical Layout -->\n <li\n class=\"flex items-start gap-3\"\n [class.cursor-pointer]=\"zClickable() && !step.disabled\"\n [class.cursor-not-allowed]=\"step.disabled\"\n [class.opacity-50]=\"step.disabled\"\n (click)=\"onStepClick(i)\">\n <div class=\"flex w-10 shrink-0 flex-col items-center\">\n <!-- Step Icon -->\n <span [class]=\"iconClassesMap().get(i)\" class=\"relative! start-auto!\">\n @switch (stepStatuses()[i]) {\n @case ('completed') {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else {\n <z-icon zType=\"lucideCheck\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n }\n @case ('error') {\n <z-icon zType=\"lucideX\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n @default {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else if (zShowNumber()) {\n <span class=\"font-medium\">{{ i + 1 }}</span>\n }\n }\n }\n </span>\n\n <!-- Vertical Line -->\n @if (!last) {\n <div\n class=\"my-1 h-10 w-[0.125rem] rounded-full\"\n [class.bg-primary]=\"stepStatuses()[i] === 'completed'\"\n [class.bg-destructive/40]=\"stepStatuses()[i] === 'error'\"\n [class.bg-muted-foreground/30]=\"\n stepStatuses()[i] !== 'completed' && stepStatuses()[i] !== 'error'\n \"></div>\n }\n </div>\n\n <!-- Content -->\n @if (step.title || step.description) {\n <div class=\"min-w-0 flex-1 pt-1 pb-3\">\n @if (step.title) {\n <h3 class=\"leading-tight font-medium\">{{ step.title }}</h3>\n }\n @if (step.description) {\n <p class=\"text-muted-foreground mt-1 text-sm\">{{ step.description }}</p>\n }\n </div>\n }\n </li>\n }\n } @else {\n <!-- Horizontal Layout -->\n <li\n [class]=\"zType() === 'arrow' ? 'flex-1' : 'flex-1 last:flex-none'\"\n [class.cursor-pointer]=\"zClickable() && !step.disabled\"\n [class.cursor-not-allowed]=\"step.disabled\"\n [class.opacity-50]=\"step.disabled\"\n (click)=\"onStepClick(i)\">\n @if (zType() === 'arrow') {\n <!-- Arrow Style -->\n <div [class]=\"getArrowClassesByIndex()[i]\">\n <div class=\"flex items-center gap-3.5\">\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" class=\"shrink-0\" />\n }\n <div class=\"flex min-w-0 flex-col\">\n @if (step.title) {\n <h3\n z-tooltip\n [zContent]=\"step.title\"\n [zAutoDetect]=\"true\"\n zPosition=\"top\"\n class=\"truncate text-sm leading-tight font-semibold whitespace-nowrap\">\n {{ step.title }}\n </h3>\n }\n @if (step.description) {\n <p\n z-tooltip\n [zContent]=\"step.description\"\n [zAutoDetect]=\"true\"\n zPosition=\"bottom\"\n class=\"mt-1 truncate text-xs whitespace-nowrap opacity-80\">\n {{ step.description }}\n </p>\n }\n </div>\n </div>\n </div>\n } @else if (zType() === 'dot') {\n <!-- Dot Style: Simple dots with optional labels -->\n <div class=\"flex items-center\">\n <!-- Dot -->\n <span [class]=\"getDotClassesByIndex()[i]\"></span>\n\n <!-- Content (optional) -->\n @if (step.title) {\n <span\n z-tooltip\n [zContent]=\"step.title\"\n [zAutoDetect]=\"true\"\n zPosition=\"top\"\n class=\"ms-2 max-w-24 truncate text-sm whitespace-nowrap\"\n [class.text-foreground]=\"stepStatuses()[i] === 'current'\"\n [class.font-medium]=\"stepStatuses()[i] === 'current'\"\n [class.text-muted-foreground]=\"stepStatuses()[i] !== 'current'\">\n {{ step.title }}\n </span>\n }\n\n <!-- Horizontal Line -->\n @if (!last) {\n <div\n class=\"mx-3 h-[0.1875rem] min-w-8 flex-1 rounded-full\"\n [class.bg-primary]=\"stepStatuses()[i] === 'completed'\"\n [class.bg-destructive/40]=\"stepStatuses()[i] === 'error'\"\n [class.bg-muted-foreground/25]=\"\n stepStatuses()[i] !== 'completed' && stepStatuses()[i] !== 'error'\n \"></div>\n }\n </div>\n } @else if (zType() === 'inline') {\n <!-- Inline: Icon + Content + Line in one row -->\n <div class=\"flex items-center\">\n <div class=\"flex min-w-0 flex-1 items-center gap-2.5 px-2.5 py-2\">\n <!-- Step Icon -->\n <span [class]=\"iconClassesMap().get(i)\" class=\"relative! start-auto! shrink-0\">\n @switch (stepStatuses()[i]) {\n @case ('completed') {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else {\n <z-icon zType=\"lucideCheck\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n }\n @case ('error') {\n <z-icon zType=\"lucideX\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n @default {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else if (zShowNumber()) {\n <span class=\"font-medium\">{{ i + 1 }}</span>\n }\n }\n }\n </span>\n\n <!-- Content Inline -->\n @if (step.title || step.description) {\n <div class=\"min-w-0 flex-1\">\n @if (step.title) {\n <h3\n z-tooltip\n [zContent]=\"step.title\"\n [zAutoDetect]=\"true\"\n zPosition=\"top\"\n class=\"truncate text-sm leading-tight font-medium whitespace-nowrap\">\n {{ step.title }}\n </h3>\n }\n @if (step.description) {\n <p\n z-tooltip\n [zContent]=\"step.description\"\n [zAutoDetect]=\"true\"\n zPosition=\"bottom\"\n class=\"text-muted-foreground mt-1 truncate text-xs whitespace-nowrap\">\n {{ step.description }}\n </p>\n }\n </div>\n }\n </div>\n\n <!-- Horizontal Line -->\n @if (!last) {\n <div\n class=\"mx-3 h-[0.1875rem] min-w-8 flex-1 rounded-full\"\n [class.bg-primary]=\"stepStatuses()[i] === 'completed'\"\n [class.bg-destructive/40]=\"stepStatuses()[i] === 'error'\"\n [class.bg-muted-foreground/25]=\"\n stepStatuses()[i] !== 'completed' && stepStatuses()[i] !== 'error'\n \"></div>\n }\n </div>\n } @else {\n <!-- Default: Icon + Line row, Content below -->\n <div class=\"flex items-center\">\n <!-- Step Icon -->\n <span [class]=\"iconClassesMap().get(i)\" class=\"relative! start-auto! shrink-0\">\n @switch (stepStatuses()[i]) {\n @case ('completed') {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else {\n <z-icon zType=\"lucideCheck\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n }\n @case ('error') {\n <z-icon zType=\"lucideX\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n @default {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else if (zShowNumber()) {\n <span class=\"font-medium\">{{ i + 1 }}</span>\n }\n }\n }\n </span>\n\n <!-- Horizontal Line -->\n @if (!last) {\n <div [class]=\"getConnectorClassesByIndex()[i]\"></div>\n }\n </div>\n\n <!-- Content Below -->\n @if (step.title || step.description) {\n <div\n class=\"z-steps-content mt-3 flex flex-col text-center\"\n [style.width.px]=\"150\"\n [style.margin-left.px]=\"(iconWidth() - 150) / 2\">\n @if (step.title) {\n <h3\n z-tooltip\n [zContent]=\"step.title\"\n [zAutoDetect]=\"true\"\n zPosition=\"top\"\n class=\"truncate text-sm leading-tight font-medium whitespace-nowrap\">\n {{ step.title }}\n </h3>\n }\n @if (step.description) {\n <p\n z-tooltip\n [zContent]=\"step.description\"\n [zAutoDetect]=\"true\"\n zPosition=\"bottom\"\n class=\"text-muted-foreground mt-1 truncate text-xs whitespace-nowrap\">\n {{ step.description }}\n </p>\n }\n </div>\n }\n }\n </li>\n }\n }\n</ol>\n", styles: ["z-steps ol li:not(:last-child)>div[class*=border-s]{height:calc(100% + 2rem)}z-steps ol li[class*=mb-6]:not(:last-child)>div[class*=border-s]{height:calc(100% + 1.5rem)}z-steps ol li[class*=mb-10]:not(:last-child)>div[class*=border-s]{height:calc(100% + 2.5rem)}z-steps .z-steps-arrow-item{position:relative;display:flex;flex-direction:column;justify-content:center;transition:all .2s ease-out}z-steps .z-steps-arrow-item:hover{filter:brightness(.92)}z-steps .z-steps-arrow-first{border-radius:.375rem 0 0 .375rem;clip-path:polygon(0 0,calc(100% - 16px) 0,100% 50%,calc(100% - 16px) 100%,0 100%)}z-steps .z-steps-arrow-middle{margin-left:-.5rem;padding-left:2rem;clip-path:polygon(0 0,calc(100% - 16px) 0,100% 50%,calc(100% - 16px) 100%,0 100%,16px 50%)}z-steps .z-steps-arrow-last{margin-left:-.5rem;padding-left:2rem;border-radius:0 .375rem .375rem 0;clip-path:polygon(0 0,100% 0,100% 100%,0 100%,16px 50%)}\n"] }]
|
|
412
|
+
}, template: "<ol\n [class]=\"containerClasses()\"\n [class.rounded-md]=\"effectiveOrientation() === 'horizontal' && (zType() === 'inline' || zType() === 'dot')\"\n [class.border]=\"effectiveOrientation() === 'horizontal' && (zType() === 'inline' || zType() === 'dot')\"\n [class.border-border/70]=\"effectiveOrientation() === 'horizontal' && (zType() === 'inline' || zType() === 'dot')\"\n [class.bg-muted/20]=\"effectiveOrientation() === 'horizontal' && (zType() === 'inline' || zType() === 'dot')\"\n [class.p-2]=\"effectiveOrientation() === 'horizontal' && (zType() === 'inline' || zType() === 'dot')\">\n @for (step of mergedSteps(); track $index; let i = $index; let last = $last) {\n @if (effectiveOrientation() === 'vertical') {\n @if (zType() === 'dot') {\n <!-- Vertical Dot Layout -->\n <li\n class=\"flex items-start gap-3\"\n [class.cursor-pointer]=\"zClickable() && !step.disabled\"\n [class.cursor-not-allowed]=\"step.disabled\"\n [class.opacity-50]=\"step.disabled\"\n (click)=\"onStepClick(i)\">\n <!-- Dot + Line Column -->\n <div class=\"flex w-10 shrink-0 flex-col items-center\">\n <!-- Dot -->\n <span [class]=\"getDotClassesByIndex()[i]\" class=\"shrink-0\"></span>\n <!-- Vertical Line -->\n @if (!last) {\n <div\n class=\"my-1 h-10 w-[0.125rem] rounded-full\"\n [class.bg-primary]=\"stepStatuses()[i] === 'completed'\"\n [class.bg-destructive/40]=\"stepStatuses()[i] === 'error'\"\n [class.bg-muted-foreground/30]=\"\n stepStatuses()[i] !== 'completed' && stepStatuses()[i] !== 'error'\n \"></div>\n }\n </div>\n\n <!-- Content (optional) -->\n @if (step.title) {\n <span\n class=\"pt-0.5 text-sm\"\n [class.text-foreground]=\"stepStatuses()[i] === 'current'\"\n [class.font-medium]=\"stepStatuses()[i] === 'current'\"\n [class.text-muted-foreground]=\"stepStatuses()[i] !== 'current'\">\n {{ step.title }}\n </span>\n }\n </li>\n } @else {\n <!-- Vertical Layout -->\n <li\n class=\"flex items-start gap-3\"\n [class.cursor-pointer]=\"zClickable() && !step.disabled\"\n [class.cursor-not-allowed]=\"step.disabled\"\n [class.opacity-50]=\"step.disabled\"\n (click)=\"onStepClick(i)\">\n <div class=\"flex w-10 shrink-0 flex-col items-center\">\n <!-- Step Icon -->\n <span [class]=\"iconClassesMap().get(i)\" class=\"relative! start-auto!\">\n @switch (stepStatuses()[i]) {\n @case ('completed') {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else {\n <z-icon zType=\"lucideCheck\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n }\n @case ('error') {\n <z-icon zType=\"lucideX\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n @default {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else if (zShowNumber()) {\n <span class=\"font-medium\">{{ i + 1 }}</span>\n }\n }\n }\n </span>\n\n <!-- Vertical Line -->\n @if (!last) {\n <div\n class=\"my-1 h-10 w-[0.125rem] rounded-full\"\n [class.bg-primary]=\"stepStatuses()[i] === 'completed'\"\n [class.bg-destructive/40]=\"stepStatuses()[i] === 'error'\"\n [class.bg-muted-foreground/30]=\"\n stepStatuses()[i] !== 'completed' && stepStatuses()[i] !== 'error'\n \"></div>\n }\n </div>\n\n <!-- Content -->\n @if (step.title || step.description) {\n <div class=\"min-w-0 flex-1 pt-1 pb-3\">\n @if (step.title) {\n <h3 class=\"leading-tight font-medium\">{{ step.title }}</h3>\n }\n @if (step.description) {\n <p class=\"text-muted-foreground mt-1 text-sm\">{{ step.description }}</p>\n }\n </div>\n }\n </li>\n }\n } @else {\n <!-- Horizontal Layout -->\n <li\n [class]=\"zType() === 'arrow' ? 'flex-1' : 'flex-1 last:flex-none'\"\n [class.cursor-pointer]=\"zClickable() && !step.disabled\"\n [class.cursor-not-allowed]=\"step.disabled\"\n [class.opacity-50]=\"step.disabled\"\n (click)=\"onStepClick(i)\">\n @if (zType() === 'arrow') {\n <!-- Arrow Style -->\n <div [class]=\"getArrowClassesByIndex()[i]\">\n <div class=\"flex items-center gap-3.5\">\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" class=\"shrink-0\" />\n }\n <div class=\"flex min-w-0 flex-col\">\n @if (step.title) {\n <h3\n z-tooltip\n [zContent]=\"step.title\"\n [zAutoDetect]=\"true\"\n zPosition=\"top\"\n class=\"truncate text-sm leading-tight font-semibold whitespace-nowrap\">\n {{ step.title }}\n </h3>\n }\n @if (step.description) {\n <p\n z-tooltip\n [zContent]=\"step.description\"\n [zAutoDetect]=\"true\"\n zPosition=\"bottom\"\n class=\"mt-1 truncate text-xs whitespace-nowrap opacity-80\">\n {{ step.description }}\n </p>\n }\n </div>\n </div>\n </div>\n } @else if (zType() === 'dot') {\n <!-- Dot Style: Simple dots with optional labels -->\n <div class=\"flex items-center\">\n <!-- Dot -->\n <span [class]=\"getDotClassesByIndex()[i]\"></span>\n\n <!-- Content (optional) -->\n @if (step.title) {\n <span\n z-tooltip\n [zContent]=\"step.title\"\n [zAutoDetect]=\"true\"\n zPosition=\"top\"\n class=\"ms-2 max-w-24 truncate text-sm whitespace-nowrap\"\n [class.text-foreground]=\"stepStatuses()[i] === 'current'\"\n [class.font-medium]=\"stepStatuses()[i] === 'current'\"\n [class.text-muted-foreground]=\"stepStatuses()[i] !== 'current'\">\n {{ step.title }}\n </span>\n }\n\n <!-- Horizontal Line -->\n @if (!last) {\n <div\n class=\"mx-3 h-[0.1875rem] min-w-8 flex-1 rounded-full\"\n [class.bg-primary]=\"stepStatuses()[i] === 'completed'\"\n [class.bg-destructive/40]=\"stepStatuses()[i] === 'error'\"\n [class.bg-muted-foreground/25]=\"\n stepStatuses()[i] !== 'completed' && stepStatuses()[i] !== 'error'\n \"></div>\n }\n </div>\n } @else if (zType() === 'inline') {\n <!-- Inline: Icon + Content + Line in one row -->\n <div class=\"flex items-center\">\n <div class=\"flex min-w-0 flex-1 items-center gap-2.5 px-2.5 py-2\">\n <!-- Step Icon -->\n <span [class]=\"iconClassesMap().get(i)\" class=\"relative! start-auto! shrink-0\">\n @switch (stepStatuses()[i]) {\n @case ('completed') {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else {\n <z-icon zType=\"lucideCheck\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n }\n @case ('error') {\n <z-icon zType=\"lucideX\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n @default {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else if (zShowNumber()) {\n <span class=\"font-medium\">{{ i + 1 }}</span>\n }\n }\n }\n </span>\n\n <!-- Content Inline -->\n @if (step.title || step.description) {\n <div class=\"min-w-0 flex-1\">\n @if (step.title) {\n <h3\n z-tooltip\n [zContent]=\"step.title\"\n [zAutoDetect]=\"true\"\n zPosition=\"top\"\n class=\"truncate text-sm leading-tight font-medium whitespace-nowrap\">\n {{ step.title }}\n </h3>\n }\n @if (step.description) {\n <p\n z-tooltip\n [zContent]=\"step.description\"\n [zAutoDetect]=\"true\"\n zPosition=\"bottom\"\n class=\"text-muted-foreground mt-1 truncate text-xs whitespace-nowrap\">\n {{ step.description }}\n </p>\n }\n </div>\n }\n </div>\n\n <!-- Horizontal Line -->\n @if (!last) {\n <div\n class=\"mx-3 h-[0.1875rem] min-w-8 flex-1 rounded-full\"\n [class.bg-primary]=\"stepStatuses()[i] === 'completed'\"\n [class.bg-destructive/40]=\"stepStatuses()[i] === 'error'\"\n [class.bg-muted-foreground/25]=\"\n stepStatuses()[i] !== 'completed' && stepStatuses()[i] !== 'error'\n \"></div>\n }\n </div>\n } @else {\n <!-- Default: Icon + Line row, Content below -->\n <div class=\"flex items-center\">\n <!-- Step Icon -->\n <span [class]=\"iconClassesMap().get(i)\" class=\"relative! start-auto! shrink-0\">\n @switch (stepStatuses()[i]) {\n @case ('completed') {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else {\n <z-icon zType=\"lucideCheck\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n }\n @case ('error') {\n <z-icon zType=\"lucideX\" [zSize]=\"getIconSizeByIndex()[i]\" />\n }\n @default {\n @if (step.icon) {\n <z-icon [zType]=\"step.icon\" [zSize]=\"getIconSizeByIndex()[i]\" />\n } @else if (zShowNumber()) {\n <span class=\"font-medium\">{{ i + 1 }}</span>\n }\n }\n }\n </span>\n\n <!-- Horizontal Line -->\n @if (!last) {\n <div [class]=\"getConnectorClassesByIndex()[i]\"></div>\n }\n </div>\n\n <!-- Content Below -->\n @if (step.title || step.description) {\n <div\n class=\"z-steps-content mt-3 flex flex-col text-center\"\n [style.width.px]=\"150\"\n [style.margin-left.px]=\"(iconWidth() - 150) / 2\">\n @if (step.title) {\n <h3\n z-tooltip\n [zContent]=\"step.title\"\n [zAutoDetect]=\"true\"\n zPosition=\"top\"\n class=\"truncate text-sm leading-tight font-medium whitespace-nowrap\">\n {{ step.title }}\n </h3>\n }\n @if (step.description) {\n <p\n z-tooltip\n [zContent]=\"step.description\"\n [zAutoDetect]=\"true\"\n zPosition=\"bottom\"\n class=\"text-muted-foreground mt-1 truncate text-xs whitespace-nowrap\">\n {{ step.description }}\n </p>\n }\n </div>\n }\n }\n </li>\n }\n }\n</ol>\n", styles: ["z-steps ol li:not(:last-child)>div[class*=border-s]{height:calc(100% + 2rem)}z-steps ol li[class*=mb-6]:not(:last-child)>div[class*=border-s]{height:calc(100% + 1.5rem)}z-steps ol li[class*=mb-10]:not(:last-child)>div[class*=border-s]{height:calc(100% + 2.5rem)}z-steps .z-steps-arrow-item{position:relative;display:flex;flex-direction:column;justify-content:center;transition:all .2s ease-out}z-steps .z-steps-arrow-item:hover{filter:brightness(.92)}z-steps .z-steps-arrow-first{border-radius:var(--radius-md) 0 0 var(--radius-md);clip-path:polygon(0 0,calc(100% - 16px) 0,100% 50%,calc(100% - 16px) 100%,0 100%)}z-steps .z-steps-arrow-middle{margin-left:-.5rem;padding-left:2rem;clip-path:polygon(0 0,calc(100% - 16px) 0,100% 50%,calc(100% - 16px) 100%,0 100%,16px 50%)}z-steps .z-steps-arrow-last{margin-left:-.5rem;padding-left:2rem;border-radius:0 var(--radius-md) var(--radius-md) 0;clip-path:polygon(0 0,100% 0,100% 100%,0 100%,16px 50%)}\n"] }]
|
|
413
413
|
}], propDecorators: { zOnStepClick: [{ type: i0.Output, args: ["zOnStepClick"] }], zControl: [{ type: i0.Output, args: ["zControl"] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], zSteps: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSteps", required: true }] }], zCurrent: [{ type: i0.Input, args: [{ isSignal: true, alias: "zCurrent", required: false }] }], zOrientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "zOrientation", required: false }] }], zType: [{ type: i0.Input, args: [{ isSignal: true, alias: "zType", required: false }] }], zSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSize", required: false }] }], zClickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "zClickable", required: false }] }], zShowNumber: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowNumber", required: false }] }], zResponsive: [{ type: i0.Input, args: [{ isSignal: true, alias: "zResponsive", required: false }] }], zDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDisabled", required: false }] }] } });
|
|
414
414
|
|
|
415
415
|
/**
|