yukit-web 0.5.1 → 0.6.0

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.
@@ -1,7 +1,7 @@
1
1
  import { clsx } from 'clsx';
2
2
  import { twMerge } from 'tailwind-merge';
3
3
  import * as i0 from '@angular/core';
4
- import { input, Directive, inject, ElementRef, NgZone, DestroyRef, forwardRef, booleanAttribute, signal, computed, model, output, linkedSignal, effect, untracked, ChangeDetectionStrategy, Component, TemplateRef, contentChildren, Injectable, viewChild, contentChild, Injector, afterNextRender, numberAttribute, runInInjectionContext, DOCUMENT as DOCUMENT$1 } from '@angular/core';
4
+ import { input, Directive, inject, ElementRef, NgZone, DestroyRef, forwardRef, booleanAttribute, signal, computed, model, output, linkedSignal, effect, untracked, ChangeDetectionStrategy, Component, TemplateRef, contentChildren, Injectable, viewChild, contentChild, Injector, afterNextRender, numberAttribute, afterRenderEffect, runInInjectionContext, DOCUMENT as DOCUMENT$1 } from '@angular/core';
5
5
  import { classes, hlm } from 'yukit-web/helm/utils';
6
6
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
7
7
  import { toSignal, toObservable, outputFromObservable } from '@angular/core/rxjs-interop';
@@ -15,7 +15,7 @@ import * as i1 from '@spartan-ng/brain/tooltip';
15
15
  import { provideBrnTooltipDefaultOptions, BrnTooltip } from '@spartan-ng/brain/tooltip';
16
16
  import { tooltipPositionVariants, DEFAULT_TOOLTIP_CONTENT_CLASSES, DEFAULT_TOOLTIP_SVG_CLASS } from 'yukit-web/helm/tooltip';
17
17
  import { NgIcon, provideIcons } from '@ng-icons/core';
18
- import { lucideX, lucideChevronRight, lucideChevronLeft, lucideUpload, lucideSearch, lucideEyeOff, lucideEye, lucideChevronsUpDown, lucideChevronUp, lucideChevronDown, lucidePencil, lucideMinus, lucideCheck, lucideCopy, lucideTrash2, lucideSave, lucideArrowLeft, lucideArchiveRestore, lucidePlus, lucideSettings2, lucideList, lucideLayoutGrid, lucideDownload, lucideEllipsis, lucideStar } from '@ng-icons/lucide';
18
+ import { lucideX, lucideChevronRight, lucideChevronLeft, lucideUpload, lucideSearch, lucideEyeOff, lucideEye, lucideChevronsUpDown, lucideChevronUp, lucideChevronDown, lucidePencil, lucideCheck, lucideMinus, lucideCopy, lucideTrash2, lucideSave, lucideArrowLeft, lucideArchiveRestore, lucidePlus, lucideSettings2, lucideList, lucideLayoutGrid, lucideDownload, lucideEllipsis, lucideStar } from '@ng-icons/lucide';
19
19
  import * as i1$1 from 'yukit-web/helm/badge';
20
20
  import { HlmBadge } from 'yukit-web/helm/badge';
21
21
  import * as i1$2 from 'yukit-web/helm/breadcrumb';
@@ -85,6 +85,7 @@ import * as i1$n from '@spartan-ng/brain/alert-dialog';
85
85
  import { BrnAlertDialogTrigger } from '@spartan-ng/brain/alert-dialog';
86
86
  import * as i1$p from 'yukit-web/helm/tabs';
87
87
  import { HlmTabsImports } from 'yukit-web/helm/tabs';
88
+ import { _IdGenerator } from '@angular/cdk/a11y';
88
89
  import * as i1$q from 'yukit-web/helm/attachment';
89
90
  import { HlmAttachment, HlmAttachmentGroup, HlmAttachmentMedia, HlmAttachmentContent, HlmAttachmentTitle, HlmAttachmentDescription, HlmAttachmentActions, HlmAttachmentAction, HlmAttachmentTrigger } from 'yukit-web/helm/attachment';
90
91
  import { map as map$1, distinctUntilChanged as distinctUntilChanged$1 } from 'rxjs/operators';
@@ -5084,6 +5085,268 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
5084
5085
  }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<hlm-tabs\n [tab]=\"activeTab()\"\n [orientation]=\"orientation()\"\n [activationMode]=\"activationMode()\"\n (tabActivated)=\"onTabActivated($event)\"\n>\n <hlm-tabs-list [variant]=\"variant()\" [class]=\"_listClass()\">\n @for (tab of _resolved(); track tab.id) {\n <button [hlmTabsTrigger]=\"tab.id\" [disabled]=\"tab.disabled ?? false\">\n @if (tab.template) {\n <ng-container [ngTemplateOutlet]=\"tab.template\" />\n } @else {\n {{ tab.label }}\n }\n </button>\n }\n </hlm-tabs-list>\n\n @for (panel of panels(); track panel.tabId()) {\n <div [hlmTabsContent]=\"panel.tabId()\">\n <ng-template hlmTabsContentLazy>\n <ng-container [ngTemplateOutlet]=\"panel.templateRef\" />\n </ng-template>\n </div>\n }\n</hlm-tabs>\n" }]
5085
5086
  }], propDecorators: { _contents: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => YuwTabContentDirective), { isSignal: true }] }], panels: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => YuwTabPanelDirective), { isSignal: true }] }], activationMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "activationMode", required: false }] }], activeTab: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeTab", required: true }] }, { type: i0.Output, args: ["activeTabChange"] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], tabs: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabs", required: true }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
5086
5087
 
5088
+ /**
5089
+ * Replaces the content of every step's indicator circle (the number, or the check once completed).
5090
+ * The circle itself keeps its shape and state colors.
5091
+ *
5092
+ * Usage:
5093
+ * ```html
5094
+ * <ng-template yuwStepIndicator let-state let-step="step">
5095
+ * <ng-icon [name]="icons[step.id]" />
5096
+ * </ng-template>
5097
+ * ```
5098
+ */
5099
+ class YuwStepIndicatorDirective {
5100
+ constructor() {
5101
+ this.templateRef = inject(TemplateRef);
5102
+ }
5103
+ static ngTemplateContextGuard(_dir, _ctx) {
5104
+ return true;
5105
+ }
5106
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwStepIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
5107
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: YuwStepIndicatorDirective, isStandalone: true, selector: "ng-template[yuwStepIndicator]", ngImport: i0 }); }
5108
+ }
5109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwStepIndicatorDirective, decorators: [{
5110
+ type: Directive,
5111
+ args: [{
5112
+ selector: 'ng-template[yuwStepIndicator]',
5113
+ }]
5114
+ }] });
5115
+
5116
+ /**
5117
+ * Declares the content of a single `<yuw-stepper>` step. Apply it to an `<ng-template>` and pass the
5118
+ * id of the step it belongs to, matching an entry in the `steps` input.
5119
+ *
5120
+ * Inputs:
5121
+ * - `yuwStepPanel`: Required string; id of the step this panel renders for.
5122
+ */
5123
+ class YuwStepPanelDirective {
5124
+ constructor() {
5125
+ this.templateRef = inject(TemplateRef);
5126
+ this.stepId = input.required({ ...(ngDevMode ? { debugName: "stepId" } : /* istanbul ignore next */ {}), alias: 'yuwStepPanel' });
5127
+ }
5128
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwStepPanelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
5129
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: YuwStepPanelDirective, isStandalone: true, selector: "ng-template[yuwStepPanel]", inputs: { stepId: { classPropertyName: "stepId", publicName: "yuwStepPanel", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
5130
+ }
5131
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwStepPanelDirective, decorators: [{
5132
+ type: Directive,
5133
+ args: [{
5134
+ selector: 'ng-template[yuwStepPanel]',
5135
+ }]
5136
+ }], propDecorators: { stepId: [{ type: i0.Input, args: [{ isSignal: true, alias: "yuwStepPanel", required: true }] }] } });
5137
+
5138
+ /**
5139
+ * A step counts as completed when the consumer says so, or, when it says nothing, once it lies behind the active one.
5140
+ * In `linear` mode a step ahead of the active one is reachable only when every step before it is explicitly completed;
5141
+ * a disabled step is never reachable.
5142
+ */
5143
+ function resolveSteps(steps, activeIndex, linear) {
5144
+ let gateOpen = true;
5145
+ return steps.map((step, index) => {
5146
+ const completed = step.completed ?? index < activeIndex;
5147
+ const state = index === activeIndex ? 'active' : completed ? 'completed' : 'upcoming';
5148
+ const reachable = !step.disabled && (!linear || index <= activeIndex || gateOpen);
5149
+ gateOpen = gateOpen && step.completed === true;
5150
+ return { step, index, state, reachable, context: { $implicit: state, step, index } };
5151
+ });
5152
+ }
5153
+
5154
+ /**
5155
+ * Accent classes read `--yuw-accent`. Neutral parts name the raw `--neutrals-*` tokens because `data-yuw-color`
5156
+ * remaps `--border` and `--foreground` to the accent.
5157
+ */
5158
+ const yuwStepIndicatorVariants = cva('flex size-8 shrink-0 items-center justify-center rounded-full border text-sm font-medium transition-colors [&_ng-icon]:text-base', {
5159
+ variants: {
5160
+ state: {
5161
+ completed: 'border-(--yuw-accent) bg-(--yuw-accent) text-(--yuw-accent-foreground)',
5162
+ active: 'border-(--yuw-accent) bg-(--yuw-accent) text-(--yuw-accent-foreground) ring-3 ring-(--yuw-accent)/20',
5163
+ upcoming: 'border-(--neutrals-outline) bg-background text-muted-foreground',
5164
+ },
5165
+ },
5166
+ });
5167
+ const yuwStepTriggerVariants = cva('flex items-center gap-3 rounded-md text-left outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-default', {
5168
+ variants: {
5169
+ state: {
5170
+ completed: 'text-(--neutrals-element-high)',
5171
+ active: 'text-(--neutrals-element-high)',
5172
+ upcoming: 'text-muted-foreground',
5173
+ },
5174
+ disabled: {
5175
+ true: 'opacity-50',
5176
+ false: '',
5177
+ },
5178
+ },
5179
+ });
5180
+ const yuwStepSeparatorVariants = cva('shrink-0 transition-colors', {
5181
+ variants: {
5182
+ orientation: {
5183
+ horizontal: 'mx-3 h-px min-w-8 flex-1',
5184
+ vertical: 'my-1 ml-4 min-h-6 w-px flex-1',
5185
+ },
5186
+ done: {
5187
+ true: 'bg-(--yuw-accent)',
5188
+ false: 'bg-(--neutrals-outline)',
5189
+ },
5190
+ },
5191
+ });
5192
+ const yuwStepperLayoutVariants = cva('flex min-w-0 gap-6', {
5193
+ variants: {
5194
+ orientation: {
5195
+ horizontal: 'flex-col',
5196
+ vertical: 'flex-row',
5197
+ },
5198
+ },
5199
+ });
5200
+ const yuwStepListVariants = cva('flex', {
5201
+ variants: {
5202
+ orientation: {
5203
+ horizontal: 'relative flex-row items-center overflow-x-auto p-1 scroll-fade-x [scrollbar-width:none] [&::-webkit-scrollbar]:hidden overscroll-none',
5204
+ vertical: 'flex-col',
5205
+ },
5206
+ },
5207
+ });
5208
+ const yuwStepVariants = cva('flex', {
5209
+ variants: {
5210
+ orientation: {
5211
+ horizontal: 'flex-1 items-center whitespace-nowrap last:flex-none',
5212
+ vertical: 'flex-col',
5213
+ },
5214
+ },
5215
+ });
5216
+
5217
+ const TOOLTIP_POSITION = {
5218
+ horizontal: 'top',
5219
+ vertical: 'right',
5220
+ };
5221
+ /**
5222
+ * Multi-step flow: a header of numbered steps and the panel of the active one.
5223
+ *
5224
+ * Steps come from the `steps` input; each panel is an `<ng-template yuwStepPanel="<id>">` whose id matches a step.
5225
+ * A horizontal header that does not fit scrolls sideways (touch, trackpad, mouse wheel or drag), its edges fading out.
5226
+ * Only the active panel is rendered, so state that must survive a step change belongs to the parent (a form group).
5227
+ * Navigation buttons are the consumer's: grab the stepper with a template reference and call `next()` / `previous()`,
5228
+ * disabling them with `hasNext()` / `hasPrevious()`.
5229
+ *
5230
+ * Inputs / Models:
5231
+ * - `steps`: The step definitions (`YuwStepItemDto[]`), in order.
5232
+ * - `activeStep`: Two-way id of the current step.
5233
+ * - `linear`: A step ahead can only be reached once every step before it has `completed: true`. Default is `false`.
5234
+ * - `orientation`: `'horizontal'` header above the panel, or `'vertical'` header beside it. Default is `'horizontal'`.
5235
+ * - `iconOnly`: Hides each step's label and description visually; they stay announced to screen readers and the label
5236
+ * shows as a tooltip. Pair it with a `yuwStepIndicator` template so the circles carry an icon. Default is `false`.
5237
+ * - `color`: Accent of the active and completed steps (any `YuwColorDto`). Default is `'primary'`.
5238
+ * - `class`: Extra classes merged last onto the root element.
5239
+ *
5240
+ * Content:
5241
+ * - `<ng-template yuwStepIndicator let-state let-step="step" let-index="index">` replaces the number/check inside
5242
+ * every indicator.
5243
+ *
5244
+ * Usage:
5245
+ * ```html
5246
+ * <yuw-stepper #stepper [steps]="steps" [(activeStep)]="current" linear>
5247
+ * <ng-template yuwStepPanel="account">…</ng-template>
5248
+ * <ng-template yuwStepPanel="billing">…</ng-template>
5249
+ * </yuw-stepper>
5250
+ * <yuw-button [disabled]="!stepper.hasNext()" (clicked)="stepper.next()">{{ 'next' | translate }}</yuw-button>
5251
+ * ```
5252
+ */
5253
+ class YuwStepperComponent {
5254
+ constructor() {
5255
+ this._idPrefix = inject(_IdGenerator).getId('yuw-stepper-');
5256
+ this._window = inject(DOCUMENT).defaultView;
5257
+ this._list = viewChild.required('list');
5258
+ this.indicator = contentChild(YuwStepIndicatorDirective, ...(ngDevMode ? [{ debugName: "indicator" }] : /* istanbul ignore next */ []));
5259
+ this.panels = contentChildren(YuwStepPanelDirective, ...(ngDevMode ? [{ debugName: "panels" }] : /* istanbul ignore next */ []));
5260
+ this.activeStep = model.required(...(ngDevMode ? [{ debugName: "activeStep" }] : /* istanbul ignore next */ []));
5261
+ this.color = input('secondary', ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
5262
+ this.iconOnly = input(false, { ...(ngDevMode ? { debugName: "iconOnly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
5263
+ this.linear = input(false, { ...(ngDevMode ? { debugName: "linear" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
5264
+ this.orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
5265
+ this.steps = input.required(...(ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []));
5266
+ this.userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
5267
+ this._activePanel = computed(() => {
5268
+ const active = this.activeStep();
5269
+ return this.panels().find((panel) => panel.stepId() === active)?.templateRef;
5270
+ }, ...(ngDevMode ? [{ debugName: "_activePanel" }] : /* istanbul ignore next */ []));
5271
+ this._activeTriggerId = computed(() => `${this._idPrefix}-${this.activeStep()}`, ...(ngDevMode ? [{ debugName: "_activeTriggerId" }] : /* istanbul ignore next */ []));
5272
+ this.activeIndex = computed(() => this.steps().findIndex((step) => step.id === this.activeStep()), ...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
5273
+ this._items = computed(() => {
5274
+ const orientation = this.orientation();
5275
+ return resolveSteps(this.steps(), this.activeIndex(), this.linear()).map((view) => ({
5276
+ ...view,
5277
+ triggerId: `${this._idPrefix}-${view.step.id}`,
5278
+ ariaCurrent: view.state === 'active' ? 'step' : null,
5279
+ triggerClass: yuwStepTriggerVariants({ state: view.state, disabled: view.step.disabled ?? false }),
5280
+ indicatorClass: yuwStepIndicatorVariants({ state: view.state }),
5281
+ separatorClass: yuwStepSeparatorVariants({ orientation, done: view.state === 'completed' }),
5282
+ }));
5283
+ }, ...(ngDevMode ? [{ debugName: "_items" }] : /* istanbul ignore next */ []));
5284
+ this._labelClass = computed(() => (this.iconOnly() ? 'sr-only' : 'flex flex-col'), ...(ngDevMode ? [{ debugName: "_labelClass" }] : /* istanbul ignore next */ []));
5285
+ this._listClass = computed(() => yuwStepListVariants({ orientation: this.orientation() }), ...(ngDevMode ? [{ debugName: "_listClass" }] : /* istanbul ignore next */ []));
5286
+ this._rootClass = computed(() => cn(yuwStepperLayoutVariants({ orientation: this.orientation() }), this.userClass()), ...(ngDevMode ? [{ debugName: "_rootClass" }] : /* istanbul ignore next */ []));
5287
+ this._stepClass = computed(() => yuwStepVariants({ orientation: this.orientation() }), ...(ngDevMode ? [{ debugName: "_stepClass" }] : /* istanbul ignore next */ []));
5288
+ this._tooltipPosition = computed(() => TOOLTIP_POSITION[this.orientation()], ...(ngDevMode ? [{ debugName: "_tooltipPosition" }] : /* istanbul ignore next */ []));
5289
+ this.hasNext = computed(() => this._neighbour(1) !== undefined, ...(ngDevMode ? [{ debugName: "hasNext" }] : /* istanbul ignore next */ []));
5290
+ this.hasPrevious = computed(() => this._neighbour(-1) !== undefined, ...(ngDevMode ? [{ debugName: "hasPrevious" }] : /* istanbul ignore next */ []));
5291
+ this.isLast = computed(() => this.activeIndex() === this.steps().length - 1, ...(ngDevMode ? [{ debugName: "isLast" }] : /* istanbul ignore next */ []));
5292
+ afterRenderEffect(() => {
5293
+ this.activeStep();
5294
+ this._revealActive();
5295
+ });
5296
+ }
5297
+ next() {
5298
+ this._goTo(this._neighbour(1));
5299
+ }
5300
+ previous() {
5301
+ this._goTo(this._neighbour(-1));
5302
+ }
5303
+ select(id) {
5304
+ this.activeStep.set(id);
5305
+ }
5306
+ _goTo(id) {
5307
+ if (id !== undefined) {
5308
+ this.activeStep.set(id);
5309
+ }
5310
+ }
5311
+ /** Closest reachable step in `direction`, skipping disabled ones. */
5312
+ _neighbour(direction) {
5313
+ const items = this._items();
5314
+ const from = this.activeIndex();
5315
+ for (let index = from + direction; index >= 0 && index < items.length; index += direction) {
5316
+ if (items[index].reachable) {
5317
+ return items[index].step.id;
5318
+ }
5319
+ if (!items[index].step.disabled) {
5320
+ return undefined;
5321
+ }
5322
+ }
5323
+ return undefined;
5324
+ }
5325
+ /**
5326
+ * Centers the active step inside a horizontally overflowing header by scrolling the list itself, never
5327
+ * `scrollIntoView`, which would also scroll the page to a stepper below the fold on first render.
5328
+ */
5329
+ _revealActive() {
5330
+ const list = this._list().nativeElement;
5331
+ const active = list.querySelector('[aria-current="step"]');
5332
+ if (!active || list.scrollWidth <= list.clientWidth) {
5333
+ return;
5334
+ }
5335
+ list.scrollTo({
5336
+ left: active.offsetLeft - (list.clientWidth - active.offsetWidth) / 2,
5337
+ behavior: this._window?.matchMedia('(prefers-reduced-motion: reduce)').matches ? 'auto' : 'smooth',
5338
+ });
5339
+ }
5340
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwStepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5341
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: YuwStepperComponent, isStandalone: true, selector: "yuw-stepper", inputs: { activeStep: { classPropertyName: "activeStep", publicName: "activeStep", isSignal: true, isRequired: true, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: true, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeStep: "activeStepChange" }, host: { classAttribute: "contents" }, providers: [provideIcons({ lucideCheck })], queries: [{ propertyName: "indicator", first: true, predicate: YuwStepIndicatorDirective, descendants: true, isSignal: true }, { propertyName: "panels", predicate: YuwStepPanelDirective, isSignal: true }], viewQueries: [{ propertyName: "_list", first: true, predicate: ["list"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"_rootClass()\">\n <ol #list yuwMouseScrollX [class]=\"_listClass()\" [attr.data-yuw-color]=\"color()\">\n @for (item of _items(); track item.step.id; let last = $last) {\n <li [class]=\"_stepClass()\">\n <button\n type=\"button\"\n [id]=\"item.triggerId\"\n [class]=\"item.triggerClass\"\n [disabled]=\"!item.reachable\"\n [attr.aria-current]=\"item.ariaCurrent\"\n [yuwTooltip]=\"item.step.label\"\n [tooltipDisabled]=\"!iconOnly()\"\n [position]=\"_tooltipPosition()\"\n (click)=\"select(item.step.id)\"\n >\n <span [class]=\"item.indicatorClass\">\n @if (indicator(); as custom) {\n <ng-container [ngTemplateOutlet]=\"custom.templateRef\" [ngTemplateOutletContext]=\"item.context\" />\n } @else if (item.state === 'completed') {\n <ng-icon name=\"lucideCheck\" aria-hidden=\"true\" />\n } @else {\n {{ item.index + 1 }}\n }\n </span>\n <span [class]=\"_labelClass()\">\n <span class=\"text-sm font-medium\">{{ item.step.label }}</span>\n @if (item.step.description) {\n <span class=\"text-xs text-muted-foreground\">{{ item.step.description }}</span>\n }\n </span>\n </button>\n @if (!last) {\n <span [class]=\"item.separatorClass\" aria-hidden=\"true\"></span>\n }\n </li>\n }\n </ol>\n\n @if (_activePanel(); as panel) {\n <div role=\"region\" class=\"min-w-0 flex-1\" [attr.aria-labelledby]=\"_activeTriggerId()\">\n <ng-container [ngTemplateOutlet]=\"panel\" />\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: YuwMouseScrollXDirective, selector: "[yuwMouseScrollX]" }, { kind: "directive", type: YuwTooltipDirective, selector: "[yuwTooltip]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5342
+ }
5343
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwStepperComponent, decorators: [{
5344
+ type: Component,
5345
+ args: [{ selector: 'yuw-stepper', imports: [NgTemplateOutlet, NgIcon, YuwMouseScrollXDirective, YuwTooltipDirective], providers: [provideIcons({ lucideCheck })], host: {
5346
+ class: 'contents',
5347
+ }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"_rootClass()\">\n <ol #list yuwMouseScrollX [class]=\"_listClass()\" [attr.data-yuw-color]=\"color()\">\n @for (item of _items(); track item.step.id; let last = $last) {\n <li [class]=\"_stepClass()\">\n <button\n type=\"button\"\n [id]=\"item.triggerId\"\n [class]=\"item.triggerClass\"\n [disabled]=\"!item.reachable\"\n [attr.aria-current]=\"item.ariaCurrent\"\n [yuwTooltip]=\"item.step.label\"\n [tooltipDisabled]=\"!iconOnly()\"\n [position]=\"_tooltipPosition()\"\n (click)=\"select(item.step.id)\"\n >\n <span [class]=\"item.indicatorClass\">\n @if (indicator(); as custom) {\n <ng-container [ngTemplateOutlet]=\"custom.templateRef\" [ngTemplateOutletContext]=\"item.context\" />\n } @else if (item.state === 'completed') {\n <ng-icon name=\"lucideCheck\" aria-hidden=\"true\" />\n } @else {\n {{ item.index + 1 }}\n }\n </span>\n <span [class]=\"_labelClass()\">\n <span class=\"text-sm font-medium\">{{ item.step.label }}</span>\n @if (item.step.description) {\n <span class=\"text-xs text-muted-foreground\">{{ item.step.description }}</span>\n }\n </span>\n </button>\n @if (!last) {\n <span [class]=\"item.separatorClass\" aria-hidden=\"true\"></span>\n }\n </li>\n }\n </ol>\n\n @if (_activePanel(); as panel) {\n <div role=\"region\" class=\"min-w-0 flex-1\" [attr.aria-labelledby]=\"_activeTriggerId()\">\n <ng-container [ngTemplateOutlet]=\"panel\" />\n </div>\n }\n</div>\n" }]
5348
+ }], ctorParameters: () => [], propDecorators: { _list: [{ type: i0.ViewChild, args: ['list', { isSignal: true }] }], indicator: [{ type: i0.ContentChild, args: [i0.forwardRef(() => YuwStepIndicatorDirective), { isSignal: true }] }], panels: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => YuwStepPanelDirective), { isSignal: true }] }], activeStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeStep", required: true }] }, { type: i0.Output, args: ["activeStepChange"] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], iconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOnly", required: false }] }], linear: [{ type: i0.Input, args: [{ isSignal: true, alias: "linear", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], steps: [{ type: i0.Input, args: [{ isSignal: true, alias: "steps", required: true }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
5349
+
5087
5350
  /**
5088
5351
  * Container directive for a single file attachment card.
5089
5352
  *
@@ -8085,5 +8348,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
8085
8348
  * Generated bundle index. Do not edit.
8086
8349
  */
8087
8350
 
8088
- export { DATATABLE_ALIGN_CLASS, DATATABLE_LAYOUT_CLASS, DATATABLE_WRAP_CONTENT_CLASS, YUWS_NO_DATA_PLACEHOLDER, YUW_DATATABLE_FEATURES, YUW_DATATABLE_WRAP_MIN_WIDTH, YUW_PASSWORD_REVEAL_STATES, YUW_SIDEBAR_RAIL_ICON_SIZE, YUW_SIDEBAR_RAIL_PADDING, YUW_SIDEBAR_RAIL_WIDTH, YuwAccordion, YuwAccordionContentComponent, YuwAccordionImports, YuwAccordionItem, YuwAccordionTriggerComponent, YuwActionsCellComponent, YuwAlertActionDirective, YuwAlertComponent, YuwAlertDescriptionDirective, YuwAlertDialogComponent, YuwAlertDialogMediaDirective, YuwAlertDialogTriggerDirective, YuwAlertImports, YuwAlertTitleDirective, YuwAttachmentActionDirective, YuwAttachmentActionsDirective, YuwAttachmentContentDirective, YuwAttachmentDescriptionDirective, YuwAttachmentDirective, YuwAttachmentGroupDirective, YuwAttachmentMediaDirective, YuwAttachmentTitleDirective, YuwAttachmentTriggerDirective, YuwAvatarComponent, YuwBadgeComponent, YuwBreadcrumbComponent, YuwBreadcrumbTrailService, YuwButtonComponent, YuwButtonGroupComponent, YuwButtonGroupContentDirective, YuwCaptionDirective, YuwCardActionDirective, YuwCardContentDirective, YuwCardDescriptionDirective, YuwCardDirective, YuwCardFooterDirective, YuwCardHeaderDirective, YuwCardImports, YuwCardTitleDirective, YuwCheckboxComponent, YuwClassDirective, YuwComboboxComponent, YuwComboboxItemDirective, YuwComboboxTriggerButtonDirective, YuwComboboxTriggerDirective, YuwCommandComponent, YuwCommandDialogComponent, YuwContextMenuCheckboxDirective, YuwContextMenuCheckboxIndicatorComponent, YuwContextMenuDirective, YuwContextMenuGroupDirective, YuwContextMenuImports, YuwContextMenuItemDirective, YuwContextMenuLabelDirective, YuwContextMenuRadioDirective, YuwContextMenuRadioIndicatorComponent, YuwContextMenuSeparatorDirective, YuwContextMenuShortcutDirective, YuwContextMenuSubDirective, YuwContextMenuSubIndicatorComponent, YuwContextMenuSubTriggerDirective, YuwContextMenuTriggerDirective, YuwDatatableComponent, YuwDatatablePaginationDirective, YuwDatatableRowSelect, YuwDatepickerComponent, YuwDialogCloseDirective, YuwDialogComponent, YuwDialogFooterDirective, YuwDialogImports, YuwDialogTriggerDirective, YuwEmptyContentDirective, YuwEmptyDescriptionDirective, YuwEmptyDirective, YuwEmptyHeaderDirective, YuwEmptyImports, YuwEmptyMediaDirective, YuwEmptyTitleDirective, YuwFieldBase, YuwInputAddonImports, YuwInputComponent, YuwInputFileComponent, YuwInputOtpComponent, YuwItemActionsDirective, YuwItemContentDirective, YuwItemDescriptionDirective, YuwItemDirective, YuwItemFooterDirective, YuwItemGroupDirective, YuwItemHeaderDirective, YuwItemImports, YuwItemMediaDirective, YuwItemSeparatorDirective, YuwItemTitleDirective, YuwLabel, YuwLeftAddonDirective, YuwMouseScrollXDirective, YuwMouseScrollYDirective, YuwPaginationComponent, YuwPasswordInputComponent, YuwPopoverComponent, YuwPopoverTriggerDirective, YuwRadioGroupComponent, YuwRightAddonDirective, YuwSearchInputComponent, YuwSheetCloseDirective, YuwSheetComponent, YuwSheetFooterDirective, YuwSheetHeaderDirective, YuwSheetImports, YuwSheetTriggerDirective, YuwSidebarComponent, YuwSidebarContentDirective, YuwSidebarContentExtraDirective, YuwSidebarFooterDirective, YuwSidebarFooterExtraDirective, YuwSidebarGroupContentDirective, YuwSidebarGroupDirective, YuwSidebarGroupLabelDirective, YuwSidebarHeaderDirective, YuwSidebarInsetDirective, YuwSidebarMenuAvatarButtonDirective, YuwSidebarMenuBadgeDirective, YuwSidebarMenuButtonDirective, YuwSidebarMenuDirective, YuwSidebarMenuItemDirective, YuwSidebarMenuSubButtonDirective, YuwSidebarMenuSubDirective, YuwSidebarMenuSubItemDirective, YuwSidebarRailDirective, YuwSidebarRailService, YuwSidebarSeparatorDirective, YuwSidebarSubmenuService, YuwSidebarTriggerComponent, YuwSidebarWrapperDirective, YuwSkeletonDirective, YuwSpinnerComponent, YuwSwitchComponent, YuwTBodyDirective, YuwTFootDirective, YuwTHeadDirective, YuwTabContentDirective, YuwTabPanelDirective, YuwTableContainerDirective, YuwTableDirective, YuwTableImports, YuwTabsComponent, YuwTdDirective, YuwTextFieldBase, YuwTextareaComponent, YuwThDirective, YuwToasterComponent, YuwTooltipDirective, YuwTrDirective, YuwValueAccessorBase, YuwsActiveStatusCellComponent, YuwsAdvanceOnEnterDirective, YuwsAvatarNameCellComponent, YuwsCardGridComponent, YuwsCardGridItemComponent, YuwsClampedTextCellComponent, YuwsConfirmDialogComponent, YuwsCopyButtonComponent, YuwsFilterComboboxComponent, YuwsFilterContentDirective, YuwsFlagCellComponent, YuwsFormSheetComponent, YuwsIconActionCellComponent, YuwsImageCellComponent, YuwsImageFieldComponent, YuwsImageUploadComponent, YuwsLinkCellComponent, YuwsListPaginationComponent, YuwsListTableComponent, YuwsListToolbarComponent, YuwsPageHeaderComponent, YuwsPageSizeComponent, YuwsStatusToggleCellComponent, YuwsTitleSkeletonDirective, buildInputOtpGroups, buildYuwActionsColumn, buildYuwsActiveStatusColumn, buildYuwsDateTimeColumn, buildYuwsIconActionColumn, buildYuwsOptionalTextColumn, buildYuwsStatusToggleColumn, cn, createPagedList, createYuwsSheetEditor, datatableCellVariants, datatableContainerVariants, datatableHeadVariants, datatableHeaderCellVariants, datatableRowVariants, getPaginationRange, provideValueAccessor, totalInputOtpLength, yuwCommandDefaultFilter, yuwsInitialsOf, yuwsMediaQuerySignal, yuwsPendingRowClass, yuwsReadFileAsDataUrl };
8351
+ export { DATATABLE_ALIGN_CLASS, DATATABLE_LAYOUT_CLASS, DATATABLE_WRAP_CONTENT_CLASS, YUWS_NO_DATA_PLACEHOLDER, YUW_DATATABLE_FEATURES, YUW_DATATABLE_WRAP_MIN_WIDTH, YUW_PASSWORD_REVEAL_STATES, YUW_SIDEBAR_RAIL_ICON_SIZE, YUW_SIDEBAR_RAIL_PADDING, YUW_SIDEBAR_RAIL_WIDTH, YuwAccordion, YuwAccordionContentComponent, YuwAccordionImports, YuwAccordionItem, YuwAccordionTriggerComponent, YuwActionsCellComponent, YuwAlertActionDirective, YuwAlertComponent, YuwAlertDescriptionDirective, YuwAlertDialogComponent, YuwAlertDialogMediaDirective, YuwAlertDialogTriggerDirective, YuwAlertImports, YuwAlertTitleDirective, YuwAttachmentActionDirective, YuwAttachmentActionsDirective, YuwAttachmentContentDirective, YuwAttachmentDescriptionDirective, YuwAttachmentDirective, YuwAttachmentGroupDirective, YuwAttachmentMediaDirective, YuwAttachmentTitleDirective, YuwAttachmentTriggerDirective, YuwAvatarComponent, YuwBadgeComponent, YuwBreadcrumbComponent, YuwBreadcrumbTrailService, YuwButtonComponent, YuwButtonGroupComponent, YuwButtonGroupContentDirective, YuwCaptionDirective, YuwCardActionDirective, YuwCardContentDirective, YuwCardDescriptionDirective, YuwCardDirective, YuwCardFooterDirective, YuwCardHeaderDirective, YuwCardImports, YuwCardTitleDirective, YuwCheckboxComponent, YuwClassDirective, YuwComboboxComponent, YuwComboboxItemDirective, YuwComboboxTriggerButtonDirective, YuwComboboxTriggerDirective, YuwCommandComponent, YuwCommandDialogComponent, YuwContextMenuCheckboxDirective, YuwContextMenuCheckboxIndicatorComponent, YuwContextMenuDirective, YuwContextMenuGroupDirective, YuwContextMenuImports, YuwContextMenuItemDirective, YuwContextMenuLabelDirective, YuwContextMenuRadioDirective, YuwContextMenuRadioIndicatorComponent, YuwContextMenuSeparatorDirective, YuwContextMenuShortcutDirective, YuwContextMenuSubDirective, YuwContextMenuSubIndicatorComponent, YuwContextMenuSubTriggerDirective, YuwContextMenuTriggerDirective, YuwDatatableComponent, YuwDatatablePaginationDirective, YuwDatatableRowSelect, YuwDatepickerComponent, YuwDialogCloseDirective, YuwDialogComponent, YuwDialogFooterDirective, YuwDialogImports, YuwDialogTriggerDirective, YuwEmptyContentDirective, YuwEmptyDescriptionDirective, YuwEmptyDirective, YuwEmptyHeaderDirective, YuwEmptyImports, YuwEmptyMediaDirective, YuwEmptyTitleDirective, YuwFieldBase, YuwInputAddonImports, YuwInputComponent, YuwInputFileComponent, YuwInputOtpComponent, YuwItemActionsDirective, YuwItemContentDirective, YuwItemDescriptionDirective, YuwItemDirective, YuwItemFooterDirective, YuwItemGroupDirective, YuwItemHeaderDirective, YuwItemImports, YuwItemMediaDirective, YuwItemSeparatorDirective, YuwItemTitleDirective, YuwLabel, YuwLeftAddonDirective, YuwMouseScrollXDirective, YuwMouseScrollYDirective, YuwPaginationComponent, YuwPasswordInputComponent, YuwPopoverComponent, YuwPopoverTriggerDirective, YuwRadioGroupComponent, YuwRightAddonDirective, YuwSearchInputComponent, YuwSheetCloseDirective, YuwSheetComponent, YuwSheetFooterDirective, YuwSheetHeaderDirective, YuwSheetImports, YuwSheetTriggerDirective, YuwSidebarComponent, YuwSidebarContentDirective, YuwSidebarContentExtraDirective, YuwSidebarFooterDirective, YuwSidebarFooterExtraDirective, YuwSidebarGroupContentDirective, YuwSidebarGroupDirective, YuwSidebarGroupLabelDirective, YuwSidebarHeaderDirective, YuwSidebarInsetDirective, YuwSidebarMenuAvatarButtonDirective, YuwSidebarMenuBadgeDirective, YuwSidebarMenuButtonDirective, YuwSidebarMenuDirective, YuwSidebarMenuItemDirective, YuwSidebarMenuSubButtonDirective, YuwSidebarMenuSubDirective, YuwSidebarMenuSubItemDirective, YuwSidebarRailDirective, YuwSidebarRailService, YuwSidebarSeparatorDirective, YuwSidebarSubmenuService, YuwSidebarTriggerComponent, YuwSidebarWrapperDirective, YuwSkeletonDirective, YuwSpinnerComponent, YuwStepIndicatorDirective, YuwStepPanelDirective, YuwStepperComponent, YuwSwitchComponent, YuwTBodyDirective, YuwTFootDirective, YuwTHeadDirective, YuwTabContentDirective, YuwTabPanelDirective, YuwTableContainerDirective, YuwTableDirective, YuwTableImports, YuwTabsComponent, YuwTdDirective, YuwTextFieldBase, YuwTextareaComponent, YuwThDirective, YuwToasterComponent, YuwTooltipDirective, YuwTrDirective, YuwValueAccessorBase, YuwsActiveStatusCellComponent, YuwsAdvanceOnEnterDirective, YuwsAvatarNameCellComponent, YuwsCardGridComponent, YuwsCardGridItemComponent, YuwsClampedTextCellComponent, YuwsConfirmDialogComponent, YuwsCopyButtonComponent, YuwsFilterComboboxComponent, YuwsFilterContentDirective, YuwsFlagCellComponent, YuwsFormSheetComponent, YuwsIconActionCellComponent, YuwsImageCellComponent, YuwsImageFieldComponent, YuwsImageUploadComponent, YuwsLinkCellComponent, YuwsListPaginationComponent, YuwsListTableComponent, YuwsListToolbarComponent, YuwsPageHeaderComponent, YuwsPageSizeComponent, YuwsStatusToggleCellComponent, YuwsTitleSkeletonDirective, buildInputOtpGroups, buildYuwActionsColumn, buildYuwsActiveStatusColumn, buildYuwsDateTimeColumn, buildYuwsIconActionColumn, buildYuwsOptionalTextColumn, buildYuwsStatusToggleColumn, cn, createPagedList, createYuwsSheetEditor, datatableCellVariants, datatableContainerVariants, datatableHeadVariants, datatableHeaderCellVariants, datatableRowVariants, getPaginationRange, provideValueAccessor, totalInputOtpLength, yuwCommandDefaultFilter, yuwsInitialsOf, yuwsMediaQuerySignal, yuwsPendingRowClass, yuwsReadFileAsDataUrl };
8089
8352
  //# sourceMappingURL=yukit-web.mjs.map