@cdevhub/ngx-tw 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/fesm2022/cdevhub-ngx-tw-alert.mjs.map +1 -1
  2. package/fesm2022/cdevhub-ngx-tw-button.mjs +11 -7
  3. package/fesm2022/cdevhub-ngx-tw-button.mjs.map +1 -1
  4. package/fesm2022/cdevhub-ngx-tw-calendar.mjs +8 -1
  5. package/fesm2022/cdevhub-ngx-tw-calendar.mjs.map +1 -1
  6. package/fesm2022/cdevhub-ngx-tw-carousel.mjs +8 -2
  7. package/fesm2022/cdevhub-ngx-tw-carousel.mjs.map +1 -1
  8. package/fesm2022/cdevhub-ngx-tw-code-block.mjs +8 -9
  9. package/fesm2022/cdevhub-ngx-tw-code-block.mjs.map +1 -1
  10. package/fesm2022/cdevhub-ngx-tw-collapsible.mjs.map +1 -1
  11. package/fesm2022/cdevhub-ngx-tw-combobox.mjs +10 -0
  12. package/fesm2022/cdevhub-ngx-tw-combobox.mjs.map +1 -1
  13. package/fesm2022/cdevhub-ngx-tw-command-palette.mjs +2 -2
  14. package/fesm2022/cdevhub-ngx-tw-command-palette.mjs.map +1 -1
  15. package/fesm2022/cdevhub-ngx-tw-core.mjs.map +1 -1
  16. package/fesm2022/cdevhub-ngx-tw-date-picker.mjs +2 -0
  17. package/fesm2022/cdevhub-ngx-tw-date-picker.mjs.map +1 -1
  18. package/fesm2022/cdevhub-ngx-tw-dialog.mjs.map +1 -1
  19. package/fesm2022/cdevhub-ngx-tw-paginator.mjs +6 -2
  20. package/fesm2022/cdevhub-ngx-tw-paginator.mjs.map +1 -1
  21. package/fesm2022/cdevhub-ngx-tw-popover.mjs.map +1 -1
  22. package/fesm2022/cdevhub-ngx-tw-select.mjs +10 -0
  23. package/fesm2022/cdevhub-ngx-tw-select.mjs.map +1 -1
  24. package/fesm2022/cdevhub-ngx-tw-sort.mjs +3 -0
  25. package/fesm2022/cdevhub-ngx-tw-sort.mjs.map +1 -1
  26. package/fesm2022/cdevhub-ngx-tw-stepper.mjs +2 -2
  27. package/fesm2022/cdevhub-ngx-tw-stepper.mjs.map +1 -1
  28. package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs.map +1 -1
  29. package/fesm2022/cdevhub-ngx-tw-tabs.mjs +2 -2
  30. package/fesm2022/cdevhub-ngx-tw-tabs.mjs.map +1 -1
  31. package/fesm2022/cdevhub-ngx-tw-textarea.mjs +5 -1
  32. package/fesm2022/cdevhub-ngx-tw-textarea.mjs.map +1 -1
  33. package/fesm2022/cdevhub-ngx-tw-toast.mjs +11 -0
  34. package/fesm2022/cdevhub-ngx-tw-toast.mjs.map +1 -1
  35. package/package.json +4 -1
  36. package/theme/_dark.css +16 -12
  37. package/theme/_semantic.css +3 -2
  38. package/types/cdevhub-ngx-tw-code-block.d.ts +8 -7
  39. package/types/cdevhub-ngx-tw-select.d.ts +1 -1
  40. package/types/cdevhub-ngx-tw-toast.d.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"cdevhub-ngx-tw-sort.mjs","sources":["../../../projects/ngx-tw/sort/sort.ts","../../../projects/ngx-tw/sort/sort-header.ts","../../../projects/ngx-tw/sort/sort-header.html","../../../projects/ngx-tw/sort/cdevhub-ngx-tw-sort.ts"],"sourcesContent":["import {\n Directive,\n input,\n isDevMode,\n model,\n output,\n} from '@angular/core';\nimport { TW_SORT_HANDLE } from '@cdevhub/ngx-tw/core';\n\n/** Sort direction. `null` represents the cleared (unsorted) state. */\nexport type SortDirection = 'asc' | 'desc' | null;\n\n/** Shape that `SortHeaderComponent` implements when registering with a parent `SortDirective`. */\nexport interface TwSortable {\n /** Unique id identifying the column or field this header sorts. */\n readonly id: string;\n /** Header-level starting direction. `undefined` falls back to the parent directive's `start`. */\n readonly start: 'asc' | 'desc' | undefined;\n /** Header-level override for disabling the cleared state in the cycle. `undefined` falls back to the parent directive's `disableClear`. */\n readonly disableClear: boolean | undefined;\n /** Whether this header is disabled. */\n readonly disabled: boolean;\n}\n\n/** Payload emitted by `SortDirective.sortChange` whenever a user interaction changes the sort state. */\nexport interface TwSortEvent {\n /** The new active header id, or `null` when the sort was cleared. */\n active: string | null;\n /** The new sort direction. */\n direction: SortDirection;\n /** Snapshot of the previous state, before this change. */\n previous: {\n /** Previous active header id. */\n active: string | null;\n /** Previous sort direction. */\n direction: SortDirection;\n };\n}\n\n/**\n * Returns the direction cycle for a given starting direction and disable-clear flag.\n * @internal Exported for unit tests; not part of the public API.\n */\nexport function getSortDirectionCycle(\n start: 'asc' | 'desc',\n disableClear: boolean,\n): SortDirection[] {\n const cycle: SortDirection[] = start === 'desc' ? ['desc', 'asc'] : ['asc', 'desc'];\n if (!disableClear) cycle.push(null);\n return cycle;\n}\n\n/**\n * Container directive that holds the current sort state (`active` id + `direction`) and\n * coordinates with child `SortHeaderComponent` instances. Compose with any rendering layer —\n * tables, lists, custom grids — by placing child headers inside an element marked `[twSort]`.\n *\n * @remarks\n * **`tw*` input/output aliases.** Every `input()` / `output()` / `model()` on this directive\n * carries a `tw*` alias (e.g. `'twSortActive'`, `'twSortDirection'`, `'twSortChange'`). The\n * aliases namespace bindings under the directive selector so they cannot collide with\n * attributes the host element already owns (a `<table>` consumer binding `[active]` would\n * otherwise be ambiguous). This mirrors Angular Material's `mat*` aliasing precedent on\n * `MatSort`. Compodoc surfaces both the field name and the alias; consumer templates MUST\n * bind via the aliased name (`[twSortActive]`, `(twSortChange)`, …). Removing an alias is a\n * breaking API change requiring a major version bump.\n */\n@Directive({\n selector: '[twSort]',\n exportAs: 'twSort',\n host: {\n 'class': 'tw-sort',\n },\n providers: [{ provide: TW_SORT_HANDLE, useExisting: SortDirective }],\n})\nexport class SortDirective {\n /** The id of the currently sorted header, or `null` when nothing is sorted. Two-way bindable via `[(twSortActive)]`. Defaults to `null`. */\n readonly active = model<string | null>(null, { alias: 'twSortActive' });\n\n /** Current sort direction. `null` represents the cleared state. Two-way bindable via `[(twSortDirection)]`. Defaults to `null`. */\n readonly direction = model<SortDirection>(null, { alias: 'twSortDirection' });\n\n /** Starting direction used when a header becomes active for the first time. Per-header `start` overrides this. Defaults to `'asc'`. */\n readonly start = input<'asc' | 'desc'>('asc', { alias: 'twSortStart' });\n\n /** When true, the direction cycle skips the cleared (`null`) state — headers toggle between `'asc'` and `'desc'` only. Per-header `disableClear` overrides this. Defaults to `false`. */\n readonly disableClear = input<boolean>(false, { alias: 'twSortDisableClear' });\n\n /** When true, all child sort headers are disabled. Defaults to `false`. */\n readonly disabled = input<boolean>(false, { alias: 'twSortDisabled' });\n\n /** Fires whenever the user changes `active` or `direction` by interacting with a header. Programmatic writes to `[(twSortActive)]` / `[(twSortDirection)]` do NOT emit. */\n readonly sortChange = output<TwSortEvent>({ alias: 'twSortChange' });\n\n private readonly sortableIds = new Set<string>();\n\n /** Registers a header id so duplicates can be detected. Called by `SortHeaderComponent` on init. Throws in dev mode if another header with the same id is already registered. */\n register(id: string): void {\n if (isDevMode()) {\n if (!id) {\n throw new Error('tw-sort-header must be provided with a unique id.');\n }\n if (this.sortableIds.has(id)) {\n throw new Error(\n `Cannot have two tw-sort-header elements with the same id (${id}).`,\n );\n }\n }\n this.sortableIds.add(id);\n }\n\n /** Deregisters a header id. Called on destroy. */\n deregister(id: string): void {\n this.sortableIds.delete(id);\n }\n\n /** Cycles the direction for the given header and emits `sortChange`. No-op when the directive or the header is disabled. */\n sort(sortable: TwSortable): void {\n if (this.disabled() || sortable.disabled) return;\n\n const previousActive = this.active();\n const previousDirection = this.direction();\n\n let nextActive: string | null;\n let nextDirection: SortDirection;\n\n if (previousActive !== sortable.id) {\n nextActive = sortable.id;\n nextDirection = sortable.start ?? this.start();\n } else {\n nextDirection = this.getNextSortDirection(sortable);\n nextActive = nextDirection === null ? null : sortable.id;\n }\n\n this.active.set(nextActive);\n this.direction.set(nextDirection);\n\n this.sortChange.emit({\n active: nextActive,\n direction: nextDirection,\n previous: {\n active: previousActive,\n direction: previousDirection,\n },\n });\n }\n\n /** Returns the next direction in the cycle for the given header, based on the current state and header/parent overrides. */\n getNextSortDirection(sortable: TwSortable): SortDirection {\n const start = sortable.start ?? this.start();\n const disableClear = sortable.disableClear ?? this.disableClear();\n const cycle = getSortDirectionCycle(start, disableClear);\n\n // If the header is not currently active, the next direction is the starting one.\n if (this.active() !== sortable.id) {\n return start;\n }\n\n const currentIndex = cycle.indexOf(this.direction());\n if (currentIndex < 0) {\n return start;\n }\n return cycle[(currentIndex + 1) % cycle.length] as SortDirection;\n }\n}\n","import {\n type AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n type ElementRef,\n inject,\n input,\n isDevMode,\n type OnDestroy,\n type OnInit,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { AriaDescriber, FocusMonitor } from '@angular/cdk/a11y';\nimport { tv } from 'tailwind-variants';\nimport type { TwColor, TwSize } from '@cdevhub/ngx-tw/core';\nimport { SortDirective, type SortDirection, type TwSortable } from './sort';\n\nfunction snapshot(self: SortHeaderComponent): TwSortable {\n return {\n id: self.id(),\n start: self.start(),\n disableClear: self.disableClear(),\n disabled: self.isDisabled(),\n };\n}\n\n/** Position of the sort arrow relative to the header label. */\nexport type TwSortArrowPosition = 'before' | 'after';\n\n// ── Static per-color maps (Tailwind v4 requires literal class strings for its JIT scanner). ──\n\nconst ARROW_ACTIVE_COLOR: Record<TwColor, string> = {\n primary: 'text-primary-600',\n secondary: 'text-secondary-600',\n accent: 'text-accent-600',\n neutral: 'text-fg',\n info: 'text-info-600',\n success: 'text-success-600',\n warning: 'text-warning-600',\n error: 'text-error-600',\n};\n\n// ── tv() config ──\n\nconst sortHeaderVariants = tv(\n {\n slots: {\n host: 'group select-none',\n container:\n 'inline-flex items-center gap-1.5 cursor-pointer rounded-md font-medium text-fg transition-colors duration-normal motion-reduce:transition-none hover:bg-surface-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500',\n label: 'min-w-0',\n arrow:\n 'inline-flex shrink-0 items-center justify-center transition-opacity duration-normal motion-reduce:transition-none',\n arrowIcon:\n 'shrink-0 transition-transform duration-normal motion-reduce:transition-none',\n },\n variants: {\n size: {\n xs: {\n container: 'px-2 py-1 text-xs',\n // `size-3.5` half-step: only icon size aligning with text-xs without\n // dominating it; codified per CLAUDE.md.\n arrowIcon: 'size-3.5',\n },\n sm: {\n container: 'px-2.5 py-1.5 text-sm',\n arrowIcon: 'size-4',\n },\n md: {\n container: 'px-3 py-2 text-sm',\n arrowIcon: 'size-4',\n },\n lg: {\n container: 'px-4 py-2.5 text-base',\n arrowIcon: 'size-5',\n },\n xl: {\n container: 'px-5 py-3 text-base',\n arrowIcon: 'size-5',\n },\n },\n active: {\n true: {\n container: 'text-fg',\n arrow: 'opacity-100',\n },\n false: {\n container: 'text-fg-muted',\n arrow:\n 'opacity-0 group-hover:opacity-50 group-focus-within:opacity-50',\n },\n },\n direction: {\n asc: { arrowIcon: 'rotate-180' },\n desc: { arrowIcon: 'rotate-0' },\n none: { arrowIcon: 'rotate-0' },\n },\n disabled: {\n true: {\n host: 'opacity-50 pointer-events-none',\n container: 'cursor-not-allowed',\n },\n false: {},\n },\n },\n defaultVariants: {\n size: 'md',\n active: false,\n direction: 'none',\n disabled: false,\n },\n },\n { twMerge: true },\n);\n\n/**\n * Turns any element (e.g., `<th>`, `<div>`, `<button>`) into a sortable header under a parent\n * `SortDirective`. Renders the projected label plus an arrow that reflects the current direction.\n * Triggers a sort cycle on click or Enter/Space.\n */\n@Component({\n selector: '[tw-sort-header]',\n exportAs: 'twSortHeader',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet],\n templateUrl: './sort-header.html',\n host: {\n '[class]': 'hostClasses()',\n '[attr.aria-sort]': 'ariaSort()',\n '[attr.aria-disabled]': 'isDisabled() ? \"true\" : null',\n '(click)': 'handleClick()',\n '(keydown)': 'handleKeydown($event)',\n },\n})\nexport class SortHeaderComponent implements OnInit, AfterViewInit, OnDestroy {\n /** Unique id for this header. Required — identifies the field/column this header sorts. */\n readonly id = input.required<string>();\n\n /** Overrides the parent directive's `start` for this header only. `undefined` inherits from the parent. */\n readonly start = input<'asc' | 'desc' | undefined>(undefined);\n\n /** Overrides the parent directive's `disableClear` for this header only. `undefined` inherits from the parent. */\n readonly disableClear = input<boolean | undefined>(undefined);\n\n /** When true, this header is disabled — clicks and keyboard activation are ignored. Defaults to `false`. */\n readonly headerDisabled = input<boolean>(false, { alias: 'disabled' });\n\n /** Whether the sort arrow renders `'before'` or `'after'` the projected label. Defaults to `'after'`. */\n readonly arrowPosition = input<TwSortArrowPosition>('after');\n\n /** Semantic color used to tint the arrow when this header is active. Defaults to `'primary'`. */\n readonly color = input<TwColor>('primary');\n\n /** Controls padding and font size. Uses the shared `TwSize` scale. Defaults to `'md'`. */\n readonly size = input<TwSize>('md');\n\n /** Accessible description applied via `AriaDescriber` so screen readers announce the sort action alongside the header text. Defaults to `'Sort'`. */\n readonly sortActionDescription = input<string>('Sort');\n\n private readonly parent = inject(SortDirective, { optional: true });\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly ariaDescriber = inject(AriaDescriber, { optional: true });\n\n private readonly containerRef =\n viewChild<ElementRef<HTMLElement>>('container');\n\n private _describedBy: string | null = null;\n\n constructor() {\n if (!this.parent && isDevMode()) {\n throw new Error(\n 'tw-sort-header must be placed within a parent element with the twSort directive.',\n );\n }\n\n // Reactive: re-tags the host whenever `sortActionDescription` (a public\n // signal input) changes; consumers may swap the description at runtime for\n // i18n / state-driven copy. Cleanup runs in `ngOnDestroy`. Not a one-shot\n // `afterNextRender`: that would freeze the description at first render and\n // silently ignore subsequent rebinds.\n effect(() => {\n const description = this.sortActionDescription();\n const el = this.containerRef()?.nativeElement;\n if (!el || !this.ariaDescriber) return;\n if (this._describedBy) {\n this.ariaDescriber.removeDescription(el, this._describedBy);\n }\n this.ariaDescriber.describe(el, description);\n this._describedBy = description;\n });\n }\n\n // ── Derived signals ──\n\n /** Whether this header is currently the active (sorted) header. */\n readonly isActive = computed(\n () => this.parent?.active() === this.id(),\n );\n\n /** Whether this header is disabled via its own input or the parent directive's `disabled`. */\n readonly isDisabled = computed(\n () => this.headerDisabled() || (this.parent?.disabled() ?? false),\n );\n\n /** Active direction for *this* header (null when not active). */\n readonly effectiveDirection = computed<SortDirection>(() =>\n this.isActive() ? (this.parent?.direction() ?? null) : null,\n );\n\n /** `aria-sort` value: `'ascending' | 'descending' | 'none'`. */\n readonly ariaSort = computed(() => {\n const d = this.effectiveDirection();\n if (d === 'asc') return 'ascending';\n if (d === 'desc') return 'descending';\n return 'none';\n });\n\n /** Whether the arrow element should render. Active headers always render; inactive render when not disabled so hover reveals the affordance. */\n readonly renderArrow = computed(() => this.isActive() || !this.isDisabled());\n\n // ── Variant class computation ──\n\n private readonly variantResult = computed(() =>\n sortHeaderVariants({\n size: this.size(),\n active: this.isActive(),\n direction: this.effectiveDirection() ?? 'none',\n disabled: this.isDisabled(),\n }),\n );\n\n /** @internal */\n readonly hostClasses = computed(() => this.variantResult().host());\n\n /** @internal */\n readonly containerClasses = computed(() => this.variantResult().container());\n\n /** @internal */\n readonly labelClasses = computed(() => this.variantResult().label());\n\n /** @internal */\n readonly arrowClasses = computed(() => {\n const base = this.variantResult().arrow();\n if (!this.isActive()) return base;\n return `${base} ${ARROW_ACTIVE_COLOR[this.color()]}`;\n });\n\n /** @internal */\n readonly arrowIconClasses = computed(() => this.variantResult().arrowIcon());\n\n // ── Lifecycle ──\n\n ngOnInit(): void {\n this.parent?.register(this.id());\n }\n\n ngAfterViewInit(): void {\n const el = this.containerRef()?.nativeElement;\n if (el) {\n this.focusMonitor.monitor(el, true);\n }\n }\n\n ngOnDestroy(): void {\n const el = this.containerRef()?.nativeElement;\n if (el) {\n this.focusMonitor.stopMonitoring(el);\n if (this._describedBy && this.ariaDescriber) {\n this.ariaDescriber.removeDescription(el, this._describedBy);\n }\n }\n this.parent?.deregister(this.id());\n }\n\n // ── Event handlers ──\n\n /** @internal */\n handleClick(): void {\n if (this.isDisabled()) return;\n this.parent?.sort(snapshot(this));\n }\n\n /** @internal */\n handleKeydown(event: KeyboardEvent): void {\n if (this.isDisabled()) return;\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.parent?.sort(snapshot(this));\n }\n }\n}\n","<div\n #container\n [class]=\"containerClasses()\"\n [attr.role]=\"isDisabled() ? null : 'button'\"\n [attr.tabindex]=\"isDisabled() ? null : 0\"\n>\n @if (arrowPosition() === 'before' && renderArrow()) {\n <ng-container *ngTemplateOutlet=\"arrow\" />\n }\n <span [class]=\"labelClasses()\"><ng-content /></span>\n @if (arrowPosition() === 'after' && renderArrow()) {\n <ng-container *ngTemplateOutlet=\"arrow\" />\n }\n</div>\n\n<ng-template #arrow>\n <span [class]=\"arrowClasses()\" data-tw-sort-arrow>\n <ng-content select=\"[twSortHeaderIcon]\">\n <svg\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n [class]=\"arrowIconClasses()\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </ng-content>\n </span>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAuCA;;;AAGG;AACG,SAAU,qBAAqB,CACnC,KAAqB,EACrB,YAAqB,EAAA;IAErB,MAAM,KAAK,GAAoB,KAAK,KAAK,MAAM,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC;AACnF,IAAA,IAAI,CAAC,YAAY;AAAE,QAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;AACnC,IAAA,OAAO,KAAK;AACd;AAEA;;;;;;;;;;;;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EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,WAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,cAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECzIhC,ugCAiCA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,ED8FY,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAUf,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAd/B,SAAS;+BACE,kBAAkB,EAAA,QAAA,EAClB,cAAc,EAAA,eAAA,EACP,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,gBAAgB,CAAC,EAAA,IAAA,EAErB;AACJ,wBAAA,SAAS,EAAE,eAAe;AAC1B,wBAAA,kBAAkB,EAAE,YAAY;AAChC,wBAAA,sBAAsB,EAAE,8BAA8B;AACtD,wBAAA,SAAS,EAAE,eAAe;AAC1B,wBAAA,WAAW,EAAE,uBAAuB;AACrC,qBAAA,EAAA,QAAA,EAAA,ugCAAA,EAAA;q3BAgCoC,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEvKlD;;AAEG;;;;"}
1
+ {"version":3,"file":"cdevhub-ngx-tw-sort.mjs","sources":["../../../projects/ngx-tw/sort/sort.ts","../../../projects/ngx-tw/sort/sort-header.ts","../../../projects/ngx-tw/sort/sort-header.html","../../../projects/ngx-tw/sort/cdevhub-ngx-tw-sort.ts"],"sourcesContent":["import {\n Directive,\n input,\n isDevMode,\n model,\n output,\n} from '@angular/core';\nimport { TW_SORT_HANDLE } from '@cdevhub/ngx-tw/core';\n\n/** Sort direction. `null` represents the cleared (unsorted) state. */\nexport type SortDirection = 'asc' | 'desc' | null;\n\n/** Shape that `SortHeaderComponent` implements when registering with a parent `SortDirective`. */\nexport interface TwSortable {\n /** Unique id identifying the column or field this header sorts. */\n readonly id: string;\n /** Header-level starting direction. `undefined` falls back to the parent directive's `start`. */\n readonly start: 'asc' | 'desc' | undefined;\n /** Header-level override for disabling the cleared state in the cycle. `undefined` falls back to the parent directive's `disableClear`. */\n readonly disableClear: boolean | undefined;\n /** Whether this header is disabled. */\n readonly disabled: boolean;\n}\n\n/** Payload emitted by `SortDirective.sortChange` whenever a user interaction changes the sort state. */\nexport interface TwSortEvent {\n /** The new active header id, or `null` when the sort was cleared. */\n active: string | null;\n /** The new sort direction. */\n direction: SortDirection;\n /** Snapshot of the previous state, before this change. */\n previous: {\n /** Previous active header id. */\n active: string | null;\n /** Previous sort direction. */\n direction: SortDirection;\n };\n}\n\n/**\n * Returns the direction cycle for a given starting direction and disable-clear flag.\n * @internal Exported for unit tests; not part of the public API.\n */\nexport function getSortDirectionCycle(\n start: 'asc' | 'desc',\n disableClear: boolean,\n): SortDirection[] {\n const cycle: SortDirection[] = start === 'desc' ? ['desc', 'asc'] : ['asc', 'desc'];\n if (!disableClear) cycle.push(null);\n return cycle;\n}\n\n/**\n * Container directive that holds the current sort state (`active` id + `direction`) and\n * coordinates with child `SortHeaderComponent` instances. Compose with any rendering layer —\n * tables, lists, custom grids — by placing child headers inside an element marked `[twSort]`.\n *\n * @remarks\n * **`tw*` input/output aliases.** Every `input()` / `output()` / `model()` on this directive\n * carries a `tw*` alias (e.g. `'twSortActive'`, `'twSortDirection'`, `'twSortChange'`). The\n * aliases namespace bindings under the directive selector so they cannot collide with\n * attributes the host element already owns (a `<table>` consumer binding `[active]` would\n * otherwise be ambiguous). This mirrors Angular Material's `mat*` aliasing precedent on\n * `MatSort`. Compodoc surfaces both the field name and the alias; consumer templates MUST\n * bind via the aliased name (`[twSortActive]`, `(twSortChange)`, …). Removing an alias is a\n * breaking API change requiring a major version bump.\n */\n@Directive({\n selector: '[twSort]',\n exportAs: 'twSort',\n host: {\n 'class': 'tw-sort',\n },\n providers: [{ provide: TW_SORT_HANDLE, useExisting: SortDirective }],\n})\nexport class SortDirective {\n /** The id of the currently sorted header, or `null` when nothing is sorted. Two-way bindable via `[(twSortActive)]`. Defaults to `null`. */\n readonly active = model<string | null>(null, { alias: 'twSortActive' });\n\n /** Current sort direction. `null` represents the cleared state. Two-way bindable via `[(twSortDirection)]`. Defaults to `null`. */\n readonly direction = model<SortDirection>(null, { alias: 'twSortDirection' });\n\n /** Starting direction used when a header becomes active for the first time. Per-header `start` overrides this. Defaults to `'asc'`. */\n readonly start = input<'asc' | 'desc'>('asc', { alias: 'twSortStart' });\n\n /** When true, the direction cycle skips the cleared (`null`) state — headers toggle between `'asc'` and `'desc'` only. Per-header `disableClear` overrides this. Defaults to `false`. */\n readonly disableClear = input<boolean>(false, { alias: 'twSortDisableClear' });\n\n /** When true, all child sort headers are disabled. Defaults to `false`. */\n readonly disabled = input<boolean>(false, { alias: 'twSortDisabled' });\n\n /** Fires whenever the user changes `active` or `direction` by interacting with a header. Programmatic writes to `[(twSortActive)]` / `[(twSortDirection)]` do NOT emit. */\n readonly sortChange = output<TwSortEvent>({ alias: 'twSortChange' });\n\n private readonly sortableIds = new Set<string>();\n\n /** Registers a header id so duplicates can be detected. Called by `SortHeaderComponent` on init. Throws in dev mode if another header with the same id is already registered. */\n register(id: string): void {\n if (isDevMode()) {\n if (!id) {\n throw new Error('tw-sort-header must be provided with a unique id.');\n }\n if (this.sortableIds.has(id)) {\n throw new Error(\n `Cannot have two tw-sort-header elements with the same id (${id}).`,\n );\n }\n }\n this.sortableIds.add(id);\n }\n\n /** Deregisters a header id. Called on destroy. */\n deregister(id: string): void {\n this.sortableIds.delete(id);\n }\n\n /** Cycles the direction for the given header and emits `sortChange`. No-op when the directive or the header is disabled. */\n sort(sortable: TwSortable): void {\n if (this.disabled() || sortable.disabled) return;\n\n const previousActive = this.active();\n const previousDirection = this.direction();\n\n let nextActive: string | null;\n let nextDirection: SortDirection;\n\n if (previousActive !== sortable.id) {\n nextActive = sortable.id;\n nextDirection = sortable.start ?? this.start();\n } else {\n nextDirection = this.getNextSortDirection(sortable);\n nextActive = nextDirection === null ? null : sortable.id;\n }\n\n this.active.set(nextActive);\n this.direction.set(nextDirection);\n\n this.sortChange.emit({\n active: nextActive,\n direction: nextDirection,\n previous: {\n active: previousActive,\n direction: previousDirection,\n },\n });\n }\n\n /** Returns the next direction in the cycle for the given header, based on the current state and header/parent overrides. */\n getNextSortDirection(sortable: TwSortable): SortDirection {\n const start = sortable.start ?? this.start();\n const disableClear = sortable.disableClear ?? this.disableClear();\n const cycle = getSortDirectionCycle(start, disableClear);\n\n // If the header is not currently active, the next direction is the starting one.\n if (this.active() !== sortable.id) {\n return start;\n }\n\n const currentIndex = cycle.indexOf(this.direction());\n if (currentIndex < 0) {\n return start;\n }\n return cycle[(currentIndex + 1) % cycle.length] as SortDirection;\n }\n}\n","import {\n type AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n type ElementRef,\n inject,\n input,\n isDevMode,\n type OnDestroy,\n type OnInit,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { AriaDescriber, FocusMonitor } from '@angular/cdk/a11y';\nimport { tv } from 'tailwind-variants';\nimport type { TwColor, TwSize } from '@cdevhub/ngx-tw/core';\nimport { SortDirective, type SortDirection, type TwSortable } from './sort';\n\nfunction snapshot(self: SortHeaderComponent): TwSortable {\n return {\n id: self.id(),\n start: self.start(),\n disableClear: self.disableClear(),\n disabled: self.isDisabled(),\n };\n}\n\n/** Position of the sort arrow relative to the header label. */\nexport type TwSortArrowPosition = 'before' | 'after';\n\n// ── Static per-color maps (Tailwind v4 requires literal class strings for its JIT scanner). ──\n\nconst ARROW_ACTIVE_COLOR: Record<TwColor, string> = {\n primary: 'text-primary-600',\n secondary: 'text-secondary-600',\n accent: 'text-accent-600',\n neutral: 'text-fg',\n info: 'text-info-600',\n success: 'text-success-600',\n warning: 'text-warning-600',\n error: 'text-error-600',\n};\n\n// ── tv() config ──\n\nconst sortHeaderVariants = tv(\n {\n slots: {\n host: 'group select-none',\n container:\n 'inline-flex items-center gap-1.5 cursor-pointer rounded-md font-medium text-fg transition-colors duration-normal motion-reduce:transition-none hover:bg-surface-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500',\n label: 'min-w-0',\n arrow:\n 'inline-flex shrink-0 items-center justify-center transition-opacity duration-normal motion-reduce:transition-none',\n arrowIcon:\n 'shrink-0 transition-transform duration-normal motion-reduce:transition-none',\n },\n variants: {\n size: {\n xs: {\n container: 'px-2 py-1 text-xs',\n // `size-3.5` half-step: only icon size aligning with text-xs without\n // dominating it; codified per CLAUDE.md.\n arrowIcon: 'size-3.5',\n },\n sm: {\n container: 'px-2.5 py-1.5 text-sm',\n arrowIcon: 'size-4',\n },\n md: {\n container: 'px-3 py-2 text-sm',\n arrowIcon: 'size-4',\n },\n lg: {\n container: 'px-4 py-2.5 text-base',\n arrowIcon: 'size-5',\n },\n xl: {\n container: 'px-5 py-3 text-base',\n arrowIcon: 'size-5',\n },\n },\n active: {\n true: {\n container: 'text-fg',\n arrow: 'opacity-100',\n },\n false: {\n container: 'text-fg-muted',\n arrow:\n 'opacity-0 group-hover:opacity-50 group-focus-within:opacity-50',\n },\n },\n direction: {\n asc: { arrowIcon: 'rotate-180' },\n desc: { arrowIcon: 'rotate-0' },\n none: { arrowIcon: 'rotate-0' },\n },\n disabled: {\n true: {\n host: 'opacity-50 pointer-events-none',\n container: 'cursor-not-allowed',\n },\n false: {},\n },\n },\n defaultVariants: {\n size: 'md',\n active: false,\n direction: 'none',\n disabled: false,\n },\n },\n { twMerge: true },\n);\n\n/**\n * Turns any element (e.g., `<th>`, `<div>`, `<button>`) into a sortable header under a parent\n * `SortDirective`. Renders the projected label plus an arrow that reflects the current direction.\n * Triggers a sort cycle on click or Enter/Space.\n */\n// Selector is deliberately kebab-case to read naturally as an HTML attribute on\n// host elements (e.g. `<th tw-sort-header>`). Camelcasing it to `twSortHeader`\n// would break the public API and ~20 demo usages.\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[tw-sort-header]',\n exportAs: 'twSortHeader',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet],\n templateUrl: './sort-header.html',\n host: {\n '[class]': 'hostClasses()',\n '[attr.aria-sort]': 'ariaSort()',\n '[attr.aria-disabled]': 'isDisabled() ? \"true\" : null',\n '(click)': 'handleClick()',\n '(keydown)': 'handleKeydown($event)',\n },\n})\nexport class SortHeaderComponent implements OnInit, AfterViewInit, OnDestroy {\n /** Unique id for this header. Required — identifies the field/column this header sorts. */\n readonly id = input.required<string>();\n\n /** Overrides the parent directive's `start` for this header only. `undefined` inherits from the parent. */\n readonly start = input<'asc' | 'desc' | undefined>(undefined);\n\n /** Overrides the parent directive's `disableClear` for this header only. `undefined` inherits from the parent. */\n readonly disableClear = input<boolean | undefined>(undefined);\n\n /** When true, this header is disabled — clicks and keyboard activation are ignored. Defaults to `false`. */\n readonly headerDisabled = input<boolean>(false, { alias: 'disabled' });\n\n /** Whether the sort arrow renders `'before'` or `'after'` the projected label. Defaults to `'after'`. */\n readonly arrowPosition = input<TwSortArrowPosition>('after');\n\n /** Semantic color used to tint the arrow when this header is active. Defaults to `'primary'`. */\n readonly color = input<TwColor>('primary');\n\n /** Controls padding and font size. Uses the shared `TwSize` scale. Defaults to `'md'`. */\n readonly size = input<TwSize>('md');\n\n /** Accessible description applied via `AriaDescriber` so screen readers announce the sort action alongside the header text. Defaults to `'Sort'`. */\n readonly sortActionDescription = input<string>('Sort');\n\n private readonly parent = inject(SortDirective, { optional: true });\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly ariaDescriber = inject(AriaDescriber, { optional: true });\n\n private readonly containerRef =\n viewChild<ElementRef<HTMLElement>>('container');\n\n private _describedBy: string | null = null;\n\n constructor() {\n if (!this.parent && isDevMode()) {\n throw new Error(\n 'tw-sort-header must be placed within a parent element with the twSort directive.',\n );\n }\n\n // Reactive: re-tags the host whenever `sortActionDescription` (a public\n // signal input) changes; consumers may swap the description at runtime for\n // i18n / state-driven copy. Cleanup runs in `ngOnDestroy`. Not a one-shot\n // `afterNextRender`: that would freeze the description at first render and\n // silently ignore subsequent rebinds.\n effect(() => {\n const description = this.sortActionDescription();\n const el = this.containerRef()?.nativeElement;\n if (!el || !this.ariaDescriber) return;\n if (this._describedBy) {\n this.ariaDescriber.removeDescription(el, this._describedBy);\n }\n this.ariaDescriber.describe(el, description);\n this._describedBy = description;\n });\n }\n\n // ── Derived signals ──\n\n /** Whether this header is currently the active (sorted) header. */\n readonly isActive = computed(\n () => this.parent?.active() === this.id(),\n );\n\n /** Whether this header is disabled via its own input or the parent directive's `disabled`. */\n readonly isDisabled = computed(\n () => this.headerDisabled() || (this.parent?.disabled() ?? false),\n );\n\n /** Active direction for *this* header (null when not active). */\n readonly effectiveDirection = computed<SortDirection>(() =>\n this.isActive() ? (this.parent?.direction() ?? null) : null,\n );\n\n /** `aria-sort` value: `'ascending' | 'descending' | 'none'`. */\n readonly ariaSort = computed(() => {\n const d = this.effectiveDirection();\n if (d === 'asc') return 'ascending';\n if (d === 'desc') return 'descending';\n return 'none';\n });\n\n /** Whether the arrow element should render. Active headers always render; inactive render when not disabled so hover reveals the affordance. */\n readonly renderArrow = computed(() => this.isActive() || !this.isDisabled());\n\n // ── Variant class computation ──\n\n private readonly variantResult = computed(() =>\n sortHeaderVariants({\n size: this.size(),\n active: this.isActive(),\n direction: this.effectiveDirection() ?? 'none',\n disabled: this.isDisabled(),\n }),\n );\n\n /** @internal */\n readonly hostClasses = computed(() => this.variantResult().host());\n\n /** @internal */\n readonly containerClasses = computed(() => this.variantResult().container());\n\n /** @internal */\n readonly labelClasses = computed(() => this.variantResult().label());\n\n /** @internal */\n readonly arrowClasses = computed(() => {\n const base = this.variantResult().arrow();\n if (!this.isActive()) return base;\n return `${base} ${ARROW_ACTIVE_COLOR[this.color()]}`;\n });\n\n /** @internal */\n readonly arrowIconClasses = computed(() => this.variantResult().arrowIcon());\n\n // ── Lifecycle ──\n\n ngOnInit(): void {\n this.parent?.register(this.id());\n }\n\n ngAfterViewInit(): void {\n const el = this.containerRef()?.nativeElement;\n if (el) {\n this.focusMonitor.monitor(el, true);\n }\n }\n\n ngOnDestroy(): void {\n const el = this.containerRef()?.nativeElement;\n if (el) {\n this.focusMonitor.stopMonitoring(el);\n if (this._describedBy && this.ariaDescriber) {\n this.ariaDescriber.removeDescription(el, this._describedBy);\n }\n }\n this.parent?.deregister(this.id());\n }\n\n // ── Event handlers ──\n\n /** @internal */\n handleClick(): void {\n if (this.isDisabled()) return;\n this.parent?.sort(snapshot(this));\n }\n\n /** @internal */\n handleKeydown(event: KeyboardEvent): void {\n if (this.isDisabled()) return;\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.parent?.sort(snapshot(this));\n }\n }\n}\n","<div\n #container\n [class]=\"containerClasses()\"\n [attr.role]=\"isDisabled() ? null : 'button'\"\n [attr.tabindex]=\"isDisabled() ? null : 0\"\n>\n @if (arrowPosition() === 'before' && renderArrow()) {\n <ng-container *ngTemplateOutlet=\"arrow\" />\n }\n <span [class]=\"labelClasses()\"><ng-content /></span>\n @if (arrowPosition() === 'after' && renderArrow()) {\n <ng-container *ngTemplateOutlet=\"arrow\" />\n }\n</div>\n\n<ng-template #arrow>\n <span [class]=\"arrowClasses()\" data-tw-sort-arrow>\n <ng-content select=\"[twSortHeaderIcon]\">\n <svg\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n [class]=\"arrowIconClasses()\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </ng-content>\n </span>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAuCA;;;AAGG;AACG,SAAU,qBAAqB,CACnC,KAAqB,EACrB,YAAqB,EAAA;IAErB,MAAM,KAAK,GAAoB,KAAK,KAAK,MAAM,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC;AACnF,IAAA,IAAI,CAAC,YAAY;AAAE,QAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;AACnC,IAAA,OAAO,KAAK;AACd;AAEA;;;;;;;;;;;;;;AAcG;MASU,aAAa,CAAA;;IAEf,MAAM,GAAG,KAAK,CAAgB,IAAI,8EAAI,KAAK,EAAE,cAAc,EAAA,CAAG;;IAG9D,SAAS,GAAG,KAAK,CAAgB,IAAI,iFAAI,KAAK,EAAE,iBAAiB,EAAA,CAAG;;IAGpE,KAAK,GAAG,KAAK,CAAiB,KAAK,6EAAI,KAAK,EAAE,aAAa,EAAA,CAAG;;IAG9D,YAAY,GAAG,KAAK,CAAU,KAAK,oFAAI,KAAK,EAAE,oBAAoB,EAAA,CAAG;;IAGrE,QAAQ,GAAG,KAAK,CAAU,KAAK,gFAAI,KAAK,EAAE,gBAAgB,EAAA,CAAG;;IAG7D,UAAU,GAAG,MAAM,CAAc,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;AAEnD,IAAA,WAAW,GAAG,IAAI,GAAG,EAAU;;AAGhD,IAAA,QAAQ,CAAC,EAAU,EAAA;QACjB,IAAI,SAAS,EAAE,EAAE;YACf,IAAI,CAAC,EAAE,EAAE;AACP,gBAAA,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC;YACtE;YACA,IAAI,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;AAC5B,gBAAA,MAAM,IAAI,KAAK,CACb,6DAA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WAAW,EAAE,uBAAuB;AACrC,qBAAA,EAAA,QAAA,EAAA,ugCAAA,EAAA;q3BAgCoC,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE3KlD;;AAEG;;;;"}
@@ -398,13 +398,13 @@ class StepperComponent extends CdkStepper {
398
398
  return step.hasError;
399
399
  }
400
400
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: StepperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
401
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: StepperComponent, isStandalone: true, selector: "tw-stepper", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, showError: { classPropertyName: "showError", publicName: "showError", isSignal: true, isRequired: false, transformFunction: null }, headerInteractive: { classPropertyName: "headerInteractive", publicName: "headerInteractive", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "rootClasses()" } }, providers: [{ provide: CdkStepper, useExisting: StepperComponent }], exportAs: ["twStepper"], usesInheritance: true, ngImport: i0, template: "<!-- Header strip + inline panels (vertical) / header-only (horizontal) -->\n<div\n [class]=\"headerClasses()\"\n role=\"tablist\"\n [attr.aria-orientation]=\"orientationValue()\"\n (keydown)=\"_onKeydown($event)\"\n>\n @for (step of twSteps; track $index; let i = $index; let last = $last) {\n <div [class]=\"stepItemClasses()\">\n <!-- Step header button -->\n <button\n type=\"button\"\n cdkStepHeader\n role=\"tab\"\n [class]=\"stepHeaderClasses()\"\n [class.pointer-events-none]=\"!headerInteractive() || !step.isNavigable()\"\n [class.opacity-60]=\"!step.isNavigable()\"\n [id]=\"_getStepLabelId(i)\"\n [attr.aria-controls]=\"_getStepContentId(i)\"\n [attr.aria-selected]=\"selectedIndexValue() === i\"\n [attr.aria-current]=\"selectedIndexValue() === i ? 'step' : null\"\n [attr.aria-disabled]=\"!step.isNavigable() || null\"\n [attr.aria-invalid]=\"shouldRenderError(step) || null\"\n [attr.aria-label]=\"step.ariaLabel || null\"\n [attr.aria-labelledby]=\"step.ariaLabelledby || null\"\n (click)=\"onHeaderClick(step, i)\"\n >\n <!-- Indicator (number / icon / dot) -->\n <span [class]=\"getIndicatorClass(step, i)\">\n @let indicatorType = getIndicatorType(step);\n @let customIcon = resolveIconTemplate(step, indicatorType);\n\n @if (customIcon) {\n <span [class]=\"stepIconSlotClasses()\">\n <ng-container\n [ngTemplateOutlet]=\"customIcon\"\n [ngTemplateOutletContext]=\"iconContext(i)\"\n />\n </span>\n } @else {\n @switch (indicatorType) {\n @case ('number') {\n <span [class]=\"stepNumberClasses()\">{{ i + 1 }}</span>\n }\n @case ('done') {\n <span [class]=\"stepIconSlotClasses()\">\n <svg\n class=\"size-3/5 shrink-0\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </span>\n }\n @case ('edit') {\n <span [class]=\"stepIconSlotClasses()\">\n <svg\n class=\"size-3/5 shrink-0\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M13.586 3.586a2 2 0 1 1 2.828 2.828l-.793.793-2.828-2.828.793-.793Zm-2.207 2.207 2.828 2.828-7.07 7.071a2 2 0 0 1-.83.5l-3.086.926a.5.5 0 0 1-.62-.621l.926-3.086a2 2 0 0 1 .5-.83l7.352-7.788Z\"\n />\n </svg>\n </span>\n }\n @case ('error') {\n <span [class]=\"stepIconSlotClasses()\">\n <svg\n class=\"size-3/5 shrink-0\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm.75-11.25a.75.75 0 0 0-1.5 0v4.5a.75.75 0 0 0 1.5 0v-4.5ZM10 15a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </span>\n }\n }\n }\n </span>\n\n <!-- Label + description -->\n <span [class]=\"stepLabelWrapperClasses()\">\n <span [class]=\"getLabelClass(step, i)\">\n @if (step.stepLabel) {\n <ng-container [ngTemplateOutlet]=\"step.stepLabel.template\" />\n } @else {\n {{ step.label }}\n }\n @if (step.optional && !step.completed) {\n <span [class]=\"stepOptionalHintClasses()\">(Optional)</span>\n }\n </span>\n\n @if (step.description() && variant() === 'default') {\n <span [class]=\"stepDescriptionClasses()\">{{ step.description() }}</span>\n }\n\n @if (shouldRenderError(step) && step.errorMessage) {\n <span class=\"sr-only\">{{ step.errorMessage }}</span>\n }\n </span>\n </button>\n\n <!-- Connector (between step i and i+1) -->\n @if (!last) {\n <span\n [class]=\"getConnectorClass(step, i)\"\n aria-hidden=\"true\"\n ></span>\n }\n\n <!-- Vertical: panel is rendered inline under each selected step -->\n @if (orientationValue() === 'vertical' && selectedIndexValue() === i && step.content) {\n <div\n role=\"tabpanel\"\n [id]=\"_getStepContentId(i)\"\n [attr.aria-labelledby]=\"_getStepLabelId(i)\"\n [class]=\"stepPanelClasses()\"\n tabindex=\"0\"\n >\n <ng-container [ngTemplateOutlet]=\"step.content\" />\n </div>\n }\n </div>\n }\n</div>\n\n<!-- Horizontal: single panel rendered below the strip -->\n@if (orientationValue() === 'horizontal') {\n @let activeStep = twSteps[selectedIndexValue()];\n @if (activeStep && activeStep.content) {\n <div\n role=\"tabpanel\"\n [id]=\"_getStepContentId(selectedIndexValue())\"\n [attr.aria-labelledby]=\"_getStepLabelId(selectedIndexValue())\"\n [class]=\"stepPanelClasses()\"\n [animate.enter]=\"panelAnimationClass()\"\n tabindex=\"0\"\n >\n <ng-container [ngTemplateOutlet]=\"activeStep.content\" />\n </div>\n }\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdkStepHeader, selector: "[cdkStepHeader]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
401
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: StepperComponent, isStandalone: true, selector: "tw-stepper", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, showError: { classPropertyName: "showError", publicName: "showError", isSignal: true, isRequired: false, transformFunction: null }, headerInteractive: { classPropertyName: "headerInteractive", publicName: "headerInteractive", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "rootClasses()" } }, providers: [{ provide: CdkStepper, useExisting: StepperComponent }], exportAs: ["twStepper"], usesInheritance: true, ngImport: i0, template: "<!-- Header strip + inline panels (vertical) / header-only (horizontal) -->\n<!-- WAI-ARIA tablist pattern: the tablist relays keydown to the FocusKeyManager\n but does not itself receive focus \u2014 each step header is the focus target. -->\n<!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n<div\n [class]=\"headerClasses()\"\n role=\"tablist\"\n [attr.aria-orientation]=\"orientationValue()\"\n (keydown)=\"_onKeydown($event)\"\n>\n @for (step of twSteps; track $index; let i = $index; let last = $last) {\n <div [class]=\"stepItemClasses()\">\n <!-- Step header button -->\n <button\n type=\"button\"\n cdkStepHeader\n role=\"tab\"\n [class]=\"stepHeaderClasses()\"\n [class.pointer-events-none]=\"!headerInteractive() || !step.isNavigable()\"\n [class.opacity-60]=\"!step.isNavigable()\"\n [id]=\"_getStepLabelId(i)\"\n [attr.aria-controls]=\"_getStepContentId(i)\"\n [attr.aria-selected]=\"selectedIndexValue() === i\"\n [attr.aria-current]=\"selectedIndexValue() === i ? 'step' : null\"\n [attr.aria-disabled]=\"!step.isNavigable() || null\"\n [attr.aria-invalid]=\"shouldRenderError(step) || null\"\n [attr.aria-label]=\"step.ariaLabel || null\"\n [attr.aria-labelledby]=\"step.ariaLabelledby || null\"\n (click)=\"onHeaderClick(step, i)\"\n >\n <!-- Indicator (number / icon / dot) -->\n <span [class]=\"getIndicatorClass(step, i)\">\n @let indicatorType = getIndicatorType(step);\n @let customIcon = resolveIconTemplate(step, indicatorType);\n\n @if (customIcon) {\n <span [class]=\"stepIconSlotClasses()\">\n <ng-container\n [ngTemplateOutlet]=\"customIcon\"\n [ngTemplateOutletContext]=\"iconContext(i)\"\n />\n </span>\n } @else {\n @switch (indicatorType) {\n @case ('number') {\n <span [class]=\"stepNumberClasses()\">{{ i + 1 }}</span>\n }\n @case ('done') {\n <span [class]=\"stepIconSlotClasses()\">\n <svg\n class=\"size-3/5 shrink-0\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </span>\n }\n @case ('edit') {\n <span [class]=\"stepIconSlotClasses()\">\n <svg\n class=\"size-3/5 shrink-0\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M13.586 3.586a2 2 0 1 1 2.828 2.828l-.793.793-2.828-2.828.793-.793Zm-2.207 2.207 2.828 2.828-7.07 7.071a2 2 0 0 1-.83.5l-3.086.926a.5.5 0 0 1-.62-.621l.926-3.086a2 2 0 0 1 .5-.83l7.352-7.788Z\"\n />\n </svg>\n </span>\n }\n @case ('error') {\n <span [class]=\"stepIconSlotClasses()\">\n <svg\n class=\"size-3/5 shrink-0\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm.75-11.25a.75.75 0 0 0-1.5 0v4.5a.75.75 0 0 0 1.5 0v-4.5ZM10 15a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </span>\n }\n }\n }\n </span>\n\n <!-- Label + description -->\n <span [class]=\"stepLabelWrapperClasses()\">\n <span [class]=\"getLabelClass(step, i)\">\n @if (step.stepLabel) {\n <ng-container [ngTemplateOutlet]=\"step.stepLabel.template\" />\n } @else {\n {{ step.label }}\n }\n @if (step.optional && !step.completed) {\n <span [class]=\"stepOptionalHintClasses()\">(Optional)</span>\n }\n </span>\n\n @if (step.description() && variant() === 'default') {\n <span [class]=\"stepDescriptionClasses()\">{{ step.description() }}</span>\n }\n\n @if (shouldRenderError(step) && step.errorMessage) {\n <span class=\"sr-only\">{{ step.errorMessage }}</span>\n }\n </span>\n </button>\n\n <!-- Connector (between step i and i+1) -->\n @if (!last) {\n <span\n [class]=\"getConnectorClass(step, i)\"\n aria-hidden=\"true\"\n ></span>\n }\n\n <!-- Vertical: panel is rendered inline under each selected step -->\n @if (orientationValue() === 'vertical' && selectedIndexValue() === i && step.content) {\n <div\n role=\"tabpanel\"\n [id]=\"_getStepContentId(i)\"\n [attr.aria-labelledby]=\"_getStepLabelId(i)\"\n [class]=\"stepPanelClasses()\"\n tabindex=\"0\"\n >\n <ng-container [ngTemplateOutlet]=\"step.content\" />\n </div>\n }\n </div>\n }\n</div>\n\n<!-- Horizontal: single panel rendered below the strip -->\n@if (orientationValue() === 'horizontal') {\n @let activeStep = twSteps[selectedIndexValue()];\n @if (activeStep && activeStep.content) {\n <div\n role=\"tabpanel\"\n [id]=\"_getStepContentId(selectedIndexValue())\"\n [attr.aria-labelledby]=\"_getStepLabelId(selectedIndexValue())\"\n [class]=\"stepPanelClasses()\"\n [animate.enter]=\"panelAnimationClass()\"\n tabindex=\"0\"\n >\n <ng-container [ngTemplateOutlet]=\"activeStep.content\" />\n </div>\n }\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdkStepHeader, selector: "[cdkStepHeader]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
402
402
  }
403
403
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: StepperComponent, decorators: [{
404
404
  type: Component,
405
405
  args: [{ selector: 'tw-stepper', exportAs: 'twStepper', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgTemplateOutlet, CdkStepHeader], providers: [{ provide: CdkStepper, useExisting: StepperComponent }], host: {
406
406
  '[class]': 'rootClasses()',
407
- }, template: "<!-- Header strip + inline panels (vertical) / header-only (horizontal) -->\n<div\n [class]=\"headerClasses()\"\n role=\"tablist\"\n [attr.aria-orientation]=\"orientationValue()\"\n (keydown)=\"_onKeydown($event)\"\n>\n @for (step of twSteps; track $index; let i = $index; let last = $last) {\n <div [class]=\"stepItemClasses()\">\n <!-- Step header button -->\n <button\n type=\"button\"\n cdkStepHeader\n role=\"tab\"\n [class]=\"stepHeaderClasses()\"\n [class.pointer-events-none]=\"!headerInteractive() || !step.isNavigable()\"\n [class.opacity-60]=\"!step.isNavigable()\"\n [id]=\"_getStepLabelId(i)\"\n [attr.aria-controls]=\"_getStepContentId(i)\"\n [attr.aria-selected]=\"selectedIndexValue() === i\"\n [attr.aria-current]=\"selectedIndexValue() === i ? 'step' : null\"\n [attr.aria-disabled]=\"!step.isNavigable() || null\"\n [attr.aria-invalid]=\"shouldRenderError(step) || null\"\n [attr.aria-label]=\"step.ariaLabel || null\"\n [attr.aria-labelledby]=\"step.ariaLabelledby || null\"\n (click)=\"onHeaderClick(step, i)\"\n >\n <!-- Indicator (number / icon / dot) -->\n <span [class]=\"getIndicatorClass(step, i)\">\n @let indicatorType = getIndicatorType(step);\n @let customIcon = resolveIconTemplate(step, indicatorType);\n\n @if (customIcon) {\n <span [class]=\"stepIconSlotClasses()\">\n <ng-container\n [ngTemplateOutlet]=\"customIcon\"\n [ngTemplateOutletContext]=\"iconContext(i)\"\n />\n </span>\n } @else {\n @switch (indicatorType) {\n @case ('number') {\n <span [class]=\"stepNumberClasses()\">{{ i + 1 }}</span>\n }\n @case ('done') {\n <span [class]=\"stepIconSlotClasses()\">\n <svg\n class=\"size-3/5 shrink-0\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </span>\n }\n @case ('edit') {\n <span [class]=\"stepIconSlotClasses()\">\n <svg\n class=\"size-3/5 shrink-0\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M13.586 3.586a2 2 0 1 1 2.828 2.828l-.793.793-2.828-2.828.793-.793Zm-2.207 2.207 2.828 2.828-7.07 7.071a2 2 0 0 1-.83.5l-3.086.926a.5.5 0 0 1-.62-.621l.926-3.086a2 2 0 0 1 .5-.83l7.352-7.788Z\"\n />\n </svg>\n </span>\n }\n @case ('error') {\n <span [class]=\"stepIconSlotClasses()\">\n <svg\n class=\"size-3/5 shrink-0\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm.75-11.25a.75.75 0 0 0-1.5 0v4.5a.75.75 0 0 0 1.5 0v-4.5ZM10 15a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </span>\n }\n }\n }\n </span>\n\n <!-- Label + description -->\n <span [class]=\"stepLabelWrapperClasses()\">\n <span [class]=\"getLabelClass(step, i)\">\n @if (step.stepLabel) {\n <ng-container [ngTemplateOutlet]=\"step.stepLabel.template\" />\n } @else {\n {{ step.label }}\n }\n @if (step.optional && !step.completed) {\n <span [class]=\"stepOptionalHintClasses()\">(Optional)</span>\n }\n </span>\n\n @if (step.description() && variant() === 'default') {\n <span [class]=\"stepDescriptionClasses()\">{{ step.description() }}</span>\n }\n\n @if (shouldRenderError(step) && step.errorMessage) {\n <span class=\"sr-only\">{{ step.errorMessage }}</span>\n }\n </span>\n </button>\n\n <!-- Connector (between step i and i+1) -->\n @if (!last) {\n <span\n [class]=\"getConnectorClass(step, i)\"\n aria-hidden=\"true\"\n ></span>\n }\n\n <!-- Vertical: panel is rendered inline under each selected step -->\n @if (orientationValue() === 'vertical' && selectedIndexValue() === i && step.content) {\n <div\n role=\"tabpanel\"\n [id]=\"_getStepContentId(i)\"\n [attr.aria-labelledby]=\"_getStepLabelId(i)\"\n [class]=\"stepPanelClasses()\"\n tabindex=\"0\"\n >\n <ng-container [ngTemplateOutlet]=\"step.content\" />\n </div>\n }\n </div>\n }\n</div>\n\n<!-- Horizontal: single panel rendered below the strip -->\n@if (orientationValue() === 'horizontal') {\n @let activeStep = twSteps[selectedIndexValue()];\n @if (activeStep && activeStep.content) {\n <div\n role=\"tabpanel\"\n [id]=\"_getStepContentId(selectedIndexValue())\"\n [attr.aria-labelledby]=\"_getStepLabelId(selectedIndexValue())\"\n [class]=\"stepPanelClasses()\"\n [animate.enter]=\"panelAnimationClass()\"\n tabindex=\"0\"\n >\n <ng-container [ngTemplateOutlet]=\"activeStep.content\" />\n </div>\n }\n}\n" }]
407
+ }, template: "<!-- Header strip + inline panels (vertical) / header-only (horizontal) -->\n<!-- WAI-ARIA tablist pattern: the tablist relays keydown to the FocusKeyManager\n but does not itself receive focus \u2014 each step header is the focus target. -->\n<!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n<div\n [class]=\"headerClasses()\"\n role=\"tablist\"\n [attr.aria-orientation]=\"orientationValue()\"\n (keydown)=\"_onKeydown($event)\"\n>\n @for (step of twSteps; track $index; let i = $index; let last = $last) {\n <div [class]=\"stepItemClasses()\">\n <!-- Step header button -->\n <button\n type=\"button\"\n cdkStepHeader\n role=\"tab\"\n [class]=\"stepHeaderClasses()\"\n [class.pointer-events-none]=\"!headerInteractive() || !step.isNavigable()\"\n [class.opacity-60]=\"!step.isNavigable()\"\n [id]=\"_getStepLabelId(i)\"\n [attr.aria-controls]=\"_getStepContentId(i)\"\n [attr.aria-selected]=\"selectedIndexValue() === i\"\n [attr.aria-current]=\"selectedIndexValue() === i ? 'step' : null\"\n [attr.aria-disabled]=\"!step.isNavigable() || null\"\n [attr.aria-invalid]=\"shouldRenderError(step) || null\"\n [attr.aria-label]=\"step.ariaLabel || null\"\n [attr.aria-labelledby]=\"step.ariaLabelledby || null\"\n (click)=\"onHeaderClick(step, i)\"\n >\n <!-- Indicator (number / icon / dot) -->\n <span [class]=\"getIndicatorClass(step, i)\">\n @let indicatorType = getIndicatorType(step);\n @let customIcon = resolveIconTemplate(step, indicatorType);\n\n @if (customIcon) {\n <span [class]=\"stepIconSlotClasses()\">\n <ng-container\n [ngTemplateOutlet]=\"customIcon\"\n [ngTemplateOutletContext]=\"iconContext(i)\"\n />\n </span>\n } @else {\n @switch (indicatorType) {\n @case ('number') {\n <span [class]=\"stepNumberClasses()\">{{ i + 1 }}</span>\n }\n @case ('done') {\n <span [class]=\"stepIconSlotClasses()\">\n <svg\n class=\"size-3/5 shrink-0\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </span>\n }\n @case ('edit') {\n <span [class]=\"stepIconSlotClasses()\">\n <svg\n class=\"size-3/5 shrink-0\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M13.586 3.586a2 2 0 1 1 2.828 2.828l-.793.793-2.828-2.828.793-.793Zm-2.207 2.207 2.828 2.828-7.07 7.071a2 2 0 0 1-.83.5l-3.086.926a.5.5 0 0 1-.62-.621l.926-3.086a2 2 0 0 1 .5-.83l7.352-7.788Z\"\n />\n </svg>\n </span>\n }\n @case ('error') {\n <span [class]=\"stepIconSlotClasses()\">\n <svg\n class=\"size-3/5 shrink-0\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm.75-11.25a.75.75 0 0 0-1.5 0v4.5a.75.75 0 0 0 1.5 0v-4.5ZM10 15a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </span>\n }\n }\n }\n </span>\n\n <!-- Label + description -->\n <span [class]=\"stepLabelWrapperClasses()\">\n <span [class]=\"getLabelClass(step, i)\">\n @if (step.stepLabel) {\n <ng-container [ngTemplateOutlet]=\"step.stepLabel.template\" />\n } @else {\n {{ step.label }}\n }\n @if (step.optional && !step.completed) {\n <span [class]=\"stepOptionalHintClasses()\">(Optional)</span>\n }\n </span>\n\n @if (step.description() && variant() === 'default') {\n <span [class]=\"stepDescriptionClasses()\">{{ step.description() }}</span>\n }\n\n @if (shouldRenderError(step) && step.errorMessage) {\n <span class=\"sr-only\">{{ step.errorMessage }}</span>\n }\n </span>\n </button>\n\n <!-- Connector (between step i and i+1) -->\n @if (!last) {\n <span\n [class]=\"getConnectorClass(step, i)\"\n aria-hidden=\"true\"\n ></span>\n }\n\n <!-- Vertical: panel is rendered inline under each selected step -->\n @if (orientationValue() === 'vertical' && selectedIndexValue() === i && step.content) {\n <div\n role=\"tabpanel\"\n [id]=\"_getStepContentId(i)\"\n [attr.aria-labelledby]=\"_getStepLabelId(i)\"\n [class]=\"stepPanelClasses()\"\n tabindex=\"0\"\n >\n <ng-container [ngTemplateOutlet]=\"step.content\" />\n </div>\n }\n </div>\n }\n</div>\n\n<!-- Horizontal: single panel rendered below the strip -->\n@if (orientationValue() === 'horizontal') {\n @let activeStep = twSteps[selectedIndexValue()];\n @if (activeStep && activeStep.content) {\n <div\n role=\"tabpanel\"\n [id]=\"_getStepContentId(selectedIndexValue())\"\n [attr.aria-labelledby]=\"_getStepLabelId(selectedIndexValue())\"\n [class]=\"stepPanelClasses()\"\n [animate.enter]=\"panelAnimationClass()\"\n tabindex=\"0\"\n >\n <ng-container [ngTemplateOutlet]=\"activeStep.content\" />\n </div>\n }\n}\n" }]
408
408
  }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], showError: [{ type: i0.Input, args: [{ isSignal: true, alias: "showError", required: false }] }], headerInteractive: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerInteractive", required: false }] }] } });
409
409
  // ── Next / Previous directives (hostDirectives over CDK) ──
410
410
  class StepperNextDirective {
@@ -1 +1 @@
1
- {"version":3,"file":"cdevhub-ngx-tw-stepper.mjs","sources":["../../../projects/ngx-tw/stepper/stepper.ts","../../../projects/ngx-tw/stepper/stepper.html","../../../projects/ngx-tw/stepper/cdevhub-ngx-tw-stepper.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChildren,\n DestroyRef,\n Directive,\n inject,\n input,\n signal,\n TemplateRef,\n type AfterViewInit,\n type Provider,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { LiveAnnouncer } from '@angular/cdk/a11y';\nimport {\n CdkStep,\n CdkStepHeader,\n CdkStepLabel,\n CdkStepper,\n CdkStepperNext,\n CdkStepperPrevious,\n STEP_STATE,\n STEPPER_GLOBAL_OPTIONS,\n type StepperOptions,\n type StepperOrientation,\n type StepperSelectionEvent,\n type StepState,\n} from '@angular/cdk/stepper';\nimport { tv } from 'tailwind-variants';\nimport type { TwColor, TwSize } from '@cdevhub/ngx-tw/core';\n\n/** Visual style of the step indicator strip. */\nexport type StepperVariant = 'default' | 'dot' | 'simple';\n\n/** Context passed to custom `*twStepperIcon` templates. */\nexport interface StepperIconContext {\n $implicit: { index: number; active: boolean };\n}\n\n// ── tv() config ──\n\nconst stepperVariants = tv(\n {\n slots: {\n root: 'flex',\n header: 'flex',\n stepItem: 'flex',\n stepHeader:\n 'group relative inline-flex items-center gap-2 cursor-pointer transition-colors duration-normal motion-reduce:transition-none rounded-md focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500 disabled:cursor-not-allowed',\n stepIndicator:\n 'inline-flex items-center justify-center shrink-0 rounded-full font-medium transition-[color,background-color,border-color,box-shadow] duration-normal motion-reduce:transition-none',\n stepNumber: 'leading-none',\n stepIconSlot: 'inline-flex items-center justify-center',\n stepLabelWrapper: 'flex flex-col min-w-0 text-left',\n stepLabel: 'leading-tight',\n stepDescription: 'text-xs text-fg-muted leading-tight mt-0.5',\n stepOptionalHint: 'text-xs text-fg-subtle ml-1 font-normal',\n stepConnector:\n 'shrink-0 transition-colors duration-normal motion-reduce:transition-none',\n stepPanel: 'min-w-0',\n },\n variants: {\n variant: {\n default: {},\n dot: {\n stepNumber: 'hidden',\n stepIconSlot: 'hidden',\n },\n simple: {\n stepLabelWrapper: 'sr-only',\n },\n },\n size: {\n xs: {\n stepIndicator: 'size-6 text-xs',\n stepLabel: 'text-xs',\n },\n sm: {\n stepIndicator: 'size-7 text-xs',\n stepLabel: 'text-sm',\n },\n md: {\n stepIndicator: 'size-8 text-sm',\n stepLabel: 'text-sm',\n },\n // lg/xl step labels use `text-base` per the trigger font-size scale\n // (CLAUDE.md typography). Steps are interactive trigger elements.\n lg: {\n stepIndicator: 'size-10 text-base',\n stepLabel: 'text-base',\n },\n xl: {\n stepIndicator: 'size-12 text-base',\n stepLabel: 'text-base',\n },\n },\n orientation: {\n horizontal: {\n root: 'flex-col w-full',\n header: 'flex-row items-center w-full',\n stepItem: 'flex-row items-center flex-1 last:flex-none',\n stepConnector: 'flex-1 h-px mx-2',\n stepLabelWrapper: 'ml-2',\n stepPanel:\n 'mt-4 rounded-lg outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500 motion-reduce:transition-none',\n },\n vertical: {\n root: 'flex-col',\n header: 'flex-col items-stretch',\n stepItem: 'flex-col items-start w-full',\n stepConnector: 'w-px min-h-6 ml-4 my-1 flex-1',\n stepLabelWrapper: 'ml-3',\n stepPanel:\n 'ml-11 mt-2 mb-4 rounded-lg outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500 motion-reduce:transition-none',\n },\n },\n },\n compoundVariants: [\n // Dot variant indicator sizing\n { variant: 'dot', size: 'xs', class: { stepIndicator: 'size-2' } },\n { variant: 'dot', size: 'sm', class: { stepIndicator: 'size-2.5' } },\n { variant: 'dot', size: 'md', class: { stepIndicator: 'size-2.5' } },\n { variant: 'dot', size: 'lg', class: { stepIndicator: 'size-3' } },\n { variant: 'dot', size: 'xl', class: { stepIndicator: 'size-3' } },\n\n // Thicker connectors for lg / xl\n {\n orientation: 'horizontal',\n size: 'lg',\n class: { stepConnector: 'h-0.5' },\n },\n {\n orientation: 'horizontal',\n size: 'xl',\n class: { stepConnector: 'h-0.5' },\n },\n { orientation: 'vertical', size: 'lg', class: { stepConnector: 'w-0.5' } },\n { orientation: 'vertical', size: 'xl', class: { stepConnector: 'w-0.5' } },\n ],\n defaultVariants: {\n variant: 'default',\n size: 'md',\n orientation: 'horizontal',\n },\n },\n { twMerge: true },\n);\n\n// ── Static class lookups (Tailwind v4 requires statically-written class strings) ──\n\ntype StepStyleState = 'pending' | 'active' | 'completed' | 'error' | 'disabled';\n\nconst INDICATOR_PENDING =\n 'bg-surface-muted text-fg-muted border border-border';\nconst INDICATOR_DISABLED =\n 'bg-surface-muted text-fg-subtle border border-border opacity-60';\nconst INDICATOR_ERROR =\n 'bg-error-solid text-error-solid-fg border border-error-border-strong';\n\n// Slot tokens own light/dark contrast — no `dark:`, no shade picks.\n// The active-state ring uses `{role}-soft` (low-chroma in light, deep-tinted in\n// dark) so the halo reads consistently against the surface in both modes.\nconst INDICATOR_ACTIVE: Record<TwColor, string> = {\n primary: 'bg-primary-solid text-primary-solid-fg border border-primary-border-strong ring-4 ring-primary-soft',\n secondary: 'bg-secondary-solid text-secondary-solid-fg border border-secondary-border-strong ring-4 ring-secondary-soft',\n accent: 'bg-accent-solid text-accent-solid-fg border border-accent-border-strong ring-4 ring-accent-soft',\n neutral: 'bg-neutral-solid text-neutral-solid-fg border border-neutral-border-strong ring-4 ring-neutral-soft',\n info: 'bg-info-solid text-info-solid-fg border border-info-border-strong ring-4 ring-info-soft',\n success: 'bg-success-solid text-success-solid-fg border border-success-border-strong ring-4 ring-success-soft',\n warning: 'bg-warning-solid text-warning-solid-fg border border-warning-border-strong ring-4 ring-warning-soft',\n error: 'bg-error-solid text-error-solid-fg border border-error-border-strong ring-4 ring-error-soft',\n};\n\nconst INDICATOR_COMPLETED: Record<TwColor, string> = {\n primary: 'bg-primary-solid text-primary-solid-fg border border-primary-border-strong',\n secondary: 'bg-secondary-solid text-secondary-solid-fg border border-secondary-border-strong',\n accent: 'bg-accent-solid text-accent-solid-fg border border-accent-border-strong',\n neutral: 'bg-neutral-solid text-neutral-solid-fg border border-neutral-border-strong',\n info: 'bg-info-solid text-info-solid-fg border border-info-border-strong',\n success: 'bg-success-solid text-success-solid-fg border border-success-border-strong',\n warning: 'bg-warning-solid text-warning-solid-fg border border-warning-border-strong',\n error: 'bg-error-solid text-error-solid-fg border border-error-border-strong',\n};\n\nconst LABEL_PENDING = 'text-fg-muted';\nconst LABEL_COMPLETED = 'text-fg';\nconst LABEL_DISABLED = 'text-fg-subtle';\nconst LABEL_ERROR = 'text-error-fg font-semibold';\n\nconst LABEL_ACTIVE: Record<TwColor, string> = {\n primary: 'text-primary-fg font-semibold',\n secondary: 'text-secondary-fg font-semibold',\n accent: 'text-accent-fg font-semibold',\n neutral: 'text-fg font-semibold',\n info: 'text-info-fg font-semibold',\n success: 'text-success-fg font-semibold',\n warning: 'text-warning-fg font-semibold',\n error: 'text-error-fg font-semibold',\n};\n\nconst CONNECTOR_DEFAULT = 'bg-border';\nconst CONNECTOR_ERROR = 'bg-error-border-strong';\nconst CONNECTOR_REACHED: Record<TwColor, string> = {\n primary: 'bg-primary-border-strong',\n secondary: 'bg-secondary-border-strong',\n accent: 'bg-accent-border-strong',\n neutral: 'bg-neutral-border-strong',\n info: 'bg-info-border-strong',\n success: 'bg-success-border-strong',\n warning: 'bg-warning-border-strong',\n error: 'bg-error-border-strong',\n};\n\nfunction resolveIndicatorClasses(state: StepStyleState, color: TwColor): string {\n switch (state) {\n case 'pending':\n return INDICATOR_PENDING;\n case 'disabled':\n return INDICATOR_DISABLED;\n case 'error':\n return INDICATOR_ERROR;\n case 'active':\n return INDICATOR_ACTIVE[color];\n case 'completed':\n return INDICATOR_COMPLETED[color];\n }\n}\n\nfunction resolveLabelClasses(state: StepStyleState, color: TwColor): string {\n switch (state) {\n case 'pending':\n return LABEL_PENDING;\n case 'completed':\n return LABEL_COMPLETED;\n case 'disabled':\n return LABEL_DISABLED;\n case 'error':\n return LABEL_ERROR;\n case 'active':\n return LABEL_ACTIVE[color];\n }\n}\n\nfunction resolveConnectorClasses(state: StepStyleState, color: TwColor): string {\n if (state === 'error') return CONNECTOR_ERROR;\n if (state === 'completed' || state === 'active') return CONNECTOR_REACHED[color];\n return CONNECTOR_DEFAULT;\n}\n\n// ── StepperIconDirective ──\n\n/**\n * Structural-style directive on an `<ng-template>` that replaces the default\n * indicator icon for a given step state.\n */\n@Directive({\n selector: 'ng-template[twStepperIcon]',\n})\nexport class StepperIconDirective {\n /** Step state this template overrides. Matches CDK's `StepState` values (`'number' | 'edit' | 'done' | 'error'`). */\n readonly state = input<StepState | undefined>(undefined);\n\n /** @internal */\n readonly templateRef = inject(TemplateRef<StepperIconContext>);\n}\n\n// ── StepLabelDirective ──\n\n/**\n * Structural-style directive on an `<ng-template>` used as a custom step header\n * label. Consumers write `<ng-template twStepLabel>…</ng-template>` inside `<tw-step>`.\n */\n@Directive({\n selector: 'ng-template[twStepLabel]',\n providers: [{ provide: CdkStepLabel, useExisting: StepLabelDirective }],\n})\nexport class StepLabelDirective extends CdkStepLabel {}\n\n// ── StepComponent ──\n\n@Component({\n selector: 'tw-step',\n template: '<ng-template><ng-content/></ng-template>',\n exportAs: 'twStep',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: CdkStep, useExisting: StepComponent }],\n})\nexport class StepComponent extends CdkStep {\n /** Optional descriptive text shown under the step label in the `'default'` variant. */\n readonly description = input('');\n\n /** @internal Custom indicator icon templates (one per state) projected into this step. */\n readonly iconTemplates = contentChildren(StepperIconDirective);\n}\n\n// ── StepperComponent ──\n\n@Component({\n selector: 'tw-stepper',\n templateUrl: './stepper.html',\n exportAs: 'twStepper',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet, CdkStepHeader],\n providers: [{ provide: CdkStepper, useExisting: StepperComponent }],\n host: {\n '[class]': 'rootClasses()',\n },\n})\nexport class StepperComponent extends CdkStepper implements AfterViewInit {\n /** Visual style of the indicator strip. `'default'` = numbered circles, `'dot'` = compact filled dots, `'simple'` = indicators only (labels hidden visually). Defaults to `'default'`. */\n readonly variant = input<StepperVariant>('default');\n\n /** Semantic color for active and completed indicators and connectors. Defaults to `'primary'`. */\n readonly color = input<TwColor>('primary');\n\n /** Controls indicator size and label typography. Defaults to `'md'`. */\n readonly size = input<TwSize>('md');\n\n /** When true, steps with `hasError` render error styling, icon, and `aria-invalid`. Defaults to `true`. */\n // TRUE-default: error states must be visible by default — silently swallowing\n // a stepped flow's failure state is a UX regression. Consumers opt out per step.\n readonly showError = input(true);\n\n /** When true, clicking a navigable step header selects it. Set to `false` to only allow advancement via `twStepperNext` / `twStepperPrevious`. Defaults to `true`. */\n // TRUE-default: free-navigation is the standard stepper UX; restricted flows\n // (e.g. wizards that must complete in order) explicitly opt out.\n readonly headerInteractive = input(true);\n\n private readonly _liveAnnouncer = inject(LiveAnnouncer);\n private readonly _destroyRef = inject(DestroyRef);\n private readonly _globalOptions = inject(STEPPER_GLOBAL_OPTIONS, { optional: true });\n\n /**\n * CdkStepper exposes its state via class properties (selectedIndex,\n * previousIndex, orientation), not signals. We mirror those into signals so\n * templates can react via @if/@for and OnPush change detection works without\n * manual `markForCheck`. Sync happens in the property setters and lifecycle\n * hooks below — keep these mirrors in lock-step with the CDK fields.\n */\n private readonly _orientationSignal = signal<StepperOrientation>('horizontal');\n private readonly _selectedIndexSignal = signal(0);\n private readonly _previousIndexSignal = signal(0);\n\n /** @internal Reactive mirror of CDK's `orientation` input. */\n readonly orientationValue = this._orientationSignal.asReadonly();\n\n /** @internal Reactive mirror of CDK's `selectedIndex`. */\n readonly selectedIndexValue = this._selectedIndexSignal.asReadonly();\n\n override set orientation(value: StepperOrientation) {\n super.orientation = value;\n this._orientationSignal.set(value);\n }\n override get orientation(): StepperOrientation {\n return super.orientation;\n }\n\n private readonly _variantResult = computed(() =>\n stepperVariants({\n variant: this.variant(),\n size: this.size(),\n orientation: this._orientationSignal(),\n }),\n );\n\n readonly rootClasses = computed(() => this._variantResult().root());\n readonly headerClasses = computed(() => this._variantResult().header());\n readonly stepItemClasses = computed(() => this._variantResult().stepItem());\n readonly stepHeaderClasses = computed(() => this._variantResult().stepHeader());\n readonly stepIndicatorBaseClasses = computed(() => this._variantResult().stepIndicator());\n readonly stepNumberClasses = computed(() => this._variantResult().stepNumber());\n readonly stepIconSlotClasses = computed(() => this._variantResult().stepIconSlot());\n readonly stepLabelWrapperClasses = computed(() => this._variantResult().stepLabelWrapper());\n readonly stepLabelBaseClasses = computed(() => this._variantResult().stepLabel());\n readonly stepDescriptionClasses = computed(() => this._variantResult().stepDescription());\n readonly stepOptionalHintClasses = computed(() => this._variantResult().stepOptionalHint());\n readonly stepConnectorBaseClasses = computed(() => this._variantResult().stepConnector());\n readonly stepPanelClasses = computed(() => this._variantResult().stepPanel());\n\n readonly panelAnimationClass = computed(() => {\n if (this._orientationSignal() === 'vertical') return null;\n return this._selectedIndexSignal() >= this._previousIndexSignal()\n ? 'step-panel-enter-forward'\n : 'step-panel-enter-backward';\n });\n\n override ngAfterViewInit(): void {\n super.ngAfterViewInit();\n this._orientationSignal.set(this.orientation);\n this._selectedIndexSignal.set(this.selectedIndex);\n this._previousIndexSignal.set(this.selectedIndex);\n\n this.selectionChange\n .pipe(takeUntilDestroyed(this._destroyRef))\n .subscribe((event: StepperSelectionEvent) => {\n this._previousIndexSignal.set(event.previouslySelectedIndex);\n this._selectedIndexSignal.set(event.selectedIndex);\n this._orientationSignal.set(this.orientation);\n\n const total = this.steps.length;\n const label =\n event.selectedStep.label || `Step ${event.selectedIndex + 1}`;\n this._liveAnnouncer.announce(\n `${label}, step ${event.selectedIndex + 1} of ${total}`,\n );\n });\n }\n\n /** @internal Typed view of projected steps. */\n get twSteps(): readonly StepComponent[] {\n return this.steps.toArray() as StepComponent[];\n }\n\n /** @internal Resolves the visual state of a step for color/theming purposes. */\n getStepStyleState(step: StepComponent, index: number): StepStyleState {\n if (this.shouldRenderError(step)) return 'error';\n if (index === this._selectedIndexSignal()) return 'active';\n const itype = step.indicatorType();\n if (itype === STEP_STATE.DONE || itype === STEP_STATE.EDIT) return 'completed';\n if (this.linear && !step.isNavigable()) return 'disabled';\n return 'pending';\n }\n\n /** @internal */\n getIndicatorClass(step: StepComponent, index: number): string {\n const state = this.getStepStyleState(step, index);\n return `${this.stepIndicatorBaseClasses()} ${resolveIndicatorClasses(state, this.color())}`;\n }\n\n /** @internal */\n getLabelClass(step: StepComponent, index: number): string {\n const state = this.getStepStyleState(step, index);\n return `${this.stepLabelBaseClasses()} ${resolveLabelClasses(state, this.color())}`;\n }\n\n /** @internal */\n getConnectorClass(step: StepComponent, index: number): string {\n const state = this.getStepStyleState(step, index);\n return `${this.stepConnectorBaseClasses()} ${resolveConnectorClasses(state, this.color())}`;\n }\n\n /** @internal Resolves which indicator glyph to render for a step. */\n getIndicatorType(step: StepComponent): StepState {\n if (this.shouldRenderError(step)) return STEP_STATE.ERROR as StepState;\n return step.indicatorType() as StepState;\n }\n\n /** @internal Looks up a consumer-supplied custom template for a given indicator state. */\n resolveIconTemplate(\n step: StepComponent,\n state: StepState,\n ): TemplateRef<StepperIconContext> | null {\n const templates = step.iconTemplates();\n const match = templates.find((t) => t.state() === state);\n return match ? match.templateRef : null;\n }\n\n /** @internal Context supplied to custom icon templates. */\n iconContext(index: number): StepperIconContext {\n return {\n $implicit: {\n index,\n active: index === this._selectedIndexSignal(),\n },\n };\n }\n\n /** @internal Click handler for the step header button. */\n onHeaderClick(step: StepComponent, index: number): void {\n if (!this.headerInteractive()) return;\n if (!step.isNavigable()) return;\n this.selectedIndex = index;\n }\n\n /** @internal Whether the stepper should render the error state for a step. */\n shouldRenderError(step: StepComponent): boolean {\n if (!this.showError()) return false;\n if (this._globalOptions?.showError === false) return false;\n return step.hasError;\n }\n}\n\n// ── Next / Previous directives (hostDirectives over CDK) ──\n\n@Directive({\n selector: 'button[twStepperNext]',\n hostDirectives: [{ directive: CdkStepperNext, inputs: ['type'] }],\n})\nexport class StepperNextDirective {}\n\n@Directive({\n selector: 'button[twStepperPrevious]',\n hostDirectives: [{ directive: CdkStepperPrevious, inputs: ['type'] }],\n})\nexport class StepperPreviousDirective {}\n\n// ── Provider helper ──\n\n/** Provides app-wide stepper defaults via `STEPPER_GLOBAL_OPTIONS`. */\nexport function provideTwStepperOptions(options: StepperOptions): Provider[] {\n return [{ provide: STEPPER_GLOBAL_OPTIONS, useValue: options }];\n}\n","<!-- Header strip + inline panels (vertical) / header-only (horizontal) -->\n<div\n [class]=\"headerClasses()\"\n role=\"tablist\"\n [attr.aria-orientation]=\"orientationValue()\"\n (keydown)=\"_onKeydown($event)\"\n>\n @for (step of twSteps; track $index; let i = $index; let last = $last) {\n <div [class]=\"stepItemClasses()\">\n <!-- Step header button -->\n <button\n type=\"button\"\n cdkStepHeader\n role=\"tab\"\n [class]=\"stepHeaderClasses()\"\n [class.pointer-events-none]=\"!headerInteractive() || !step.isNavigable()\"\n [class.opacity-60]=\"!step.isNavigable()\"\n [id]=\"_getStepLabelId(i)\"\n [attr.aria-controls]=\"_getStepContentId(i)\"\n [attr.aria-selected]=\"selectedIndexValue() === i\"\n [attr.aria-current]=\"selectedIndexValue() === i ? 'step' : null\"\n [attr.aria-disabled]=\"!step.isNavigable() || null\"\n [attr.aria-invalid]=\"shouldRenderError(step) || null\"\n [attr.aria-label]=\"step.ariaLabel || null\"\n [attr.aria-labelledby]=\"step.ariaLabelledby || null\"\n (click)=\"onHeaderClick(step, i)\"\n >\n <!-- Indicator (number / icon / dot) -->\n <span [class]=\"getIndicatorClass(step, i)\">\n @let indicatorType = getIndicatorType(step);\n @let customIcon = resolveIconTemplate(step, indicatorType);\n\n @if (customIcon) {\n <span [class]=\"stepIconSlotClasses()\">\n <ng-container\n [ngTemplateOutlet]=\"customIcon\"\n [ngTemplateOutletContext]=\"iconContext(i)\"\n />\n </span>\n } @else {\n @switch (indicatorType) {\n @case ('number') {\n <span [class]=\"stepNumberClasses()\">{{ i + 1 }}</span>\n }\n @case ('done') {\n <span [class]=\"stepIconSlotClasses()\">\n <svg\n class=\"size-3/5 shrink-0\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </span>\n }\n @case ('edit') {\n <span [class]=\"stepIconSlotClasses()\">\n <svg\n class=\"size-3/5 shrink-0\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M13.586 3.586a2 2 0 1 1 2.828 2.828l-.793.793-2.828-2.828.793-.793Zm-2.207 2.207 2.828 2.828-7.07 7.071a2 2 0 0 1-.83.5l-3.086.926a.5.5 0 0 1-.62-.621l.926-3.086a2 2 0 0 1 .5-.83l7.352-7.788Z\"\n />\n </svg>\n </span>\n }\n @case ('error') {\n <span [class]=\"stepIconSlotClasses()\">\n <svg\n class=\"size-3/5 shrink-0\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm.75-11.25a.75.75 0 0 0-1.5 0v4.5a.75.75 0 0 0 1.5 0v-4.5ZM10 15a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </span>\n }\n }\n }\n </span>\n\n <!-- Label + description -->\n <span [class]=\"stepLabelWrapperClasses()\">\n <span [class]=\"getLabelClass(step, i)\">\n @if (step.stepLabel) {\n <ng-container [ngTemplateOutlet]=\"step.stepLabel.template\" />\n } @else {\n {{ step.label }}\n }\n @if (step.optional && !step.completed) {\n <span [class]=\"stepOptionalHintClasses()\">(Optional)</span>\n }\n </span>\n\n @if (step.description() && variant() === 'default') {\n <span [class]=\"stepDescriptionClasses()\">{{ step.description() }}</span>\n }\n\n @if (shouldRenderError(step) && step.errorMessage) {\n <span class=\"sr-only\">{{ step.errorMessage }}</span>\n }\n </span>\n </button>\n\n <!-- Connector (between step i and i+1) -->\n @if (!last) {\n <span\n [class]=\"getConnectorClass(step, i)\"\n aria-hidden=\"true\"\n ></span>\n }\n\n <!-- Vertical: panel is rendered inline under each selected step -->\n @if (orientationValue() === 'vertical' && selectedIndexValue() === i && step.content) {\n <div\n role=\"tabpanel\"\n [id]=\"_getStepContentId(i)\"\n [attr.aria-labelledby]=\"_getStepLabelId(i)\"\n [class]=\"stepPanelClasses()\"\n tabindex=\"0\"\n >\n <ng-container [ngTemplateOutlet]=\"step.content\" />\n </div>\n }\n </div>\n }\n</div>\n\n<!-- Horizontal: single panel rendered below the strip -->\n@if (orientationValue() === 'horizontal') {\n @let activeStep = twSteps[selectedIndexValue()];\n @if (activeStep && activeStep.content) {\n <div\n role=\"tabpanel\"\n [id]=\"_getStepContentId(selectedIndexValue())\"\n [attr.aria-labelledby]=\"_getStepLabelId(selectedIndexValue())\"\n [class]=\"stepPanelClasses()\"\n [animate.enter]=\"panelAnimationClass()\"\n tabindex=\"0\"\n >\n <ng-container [ngTemplateOutlet]=\"activeStep.content\" />\n </div>\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AA0CA;AAEA,MAAM,eAAe,GAAG,EAAE,CACxB;AACE,IAAA,KAAK,EAAE;AACL,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,MAAM,EAAE,MAAM;AACd,QAAA,QAAQ,EAAE,MAAM;AAChB,QAAA,UAAU,EACR,8PAA8P;AAChQ,QAAA,aAAa,EACX,qLAAqL;AACvL,QAAA,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C;AACtE,iBAAA;;AAGD;AAEA;AACM,SAAU,uBAAuB,CAAC,OAAuB,EAAA;IAC7D,OAAO,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AACjE;;AExfA;;AAEG;;;;"}
1
+ {"version":3,"file":"cdevhub-ngx-tw-stepper.mjs","sources":["../../../projects/ngx-tw/stepper/stepper.ts","../../../projects/ngx-tw/stepper/stepper.html","../../../projects/ngx-tw/stepper/cdevhub-ngx-tw-stepper.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChildren,\n DestroyRef,\n Directive,\n inject,\n input,\n signal,\n TemplateRef,\n type AfterViewInit,\n type Provider,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { LiveAnnouncer } from '@angular/cdk/a11y';\nimport {\n CdkStep,\n CdkStepHeader,\n CdkStepLabel,\n CdkStepper,\n CdkStepperNext,\n CdkStepperPrevious,\n STEP_STATE,\n STEPPER_GLOBAL_OPTIONS,\n type StepperOptions,\n type StepperOrientation,\n type StepperSelectionEvent,\n type StepState,\n} from '@angular/cdk/stepper';\nimport { tv } from 'tailwind-variants';\nimport type { TwColor, TwSize } from '@cdevhub/ngx-tw/core';\n\n/** Visual style of the step indicator strip. */\nexport type StepperVariant = 'default' | 'dot' | 'simple';\n\n/** Context passed to custom `*twStepperIcon` templates. */\nexport interface StepperIconContext {\n $implicit: { index: number; active: boolean };\n}\n\n// ── tv() config ──\n\nconst stepperVariants = tv(\n {\n slots: {\n root: 'flex',\n header: 'flex',\n stepItem: 'flex',\n stepHeader:\n 'group relative inline-flex items-center gap-2 cursor-pointer transition-colors duration-normal motion-reduce:transition-none rounded-md focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500 disabled:cursor-not-allowed',\n stepIndicator:\n 'inline-flex items-center justify-center shrink-0 rounded-full font-medium transition-[color,background-color,border-color,box-shadow] duration-normal motion-reduce:transition-none',\n stepNumber: 'leading-none',\n stepIconSlot: 'inline-flex items-center justify-center',\n stepLabelWrapper: 'flex flex-col min-w-0 text-left',\n stepLabel: 'leading-tight',\n stepDescription: 'text-xs text-fg-muted leading-tight mt-0.5',\n stepOptionalHint: 'text-xs text-fg-subtle ml-1 font-normal',\n stepConnector:\n 'shrink-0 transition-colors duration-normal motion-reduce:transition-none',\n stepPanel: 'min-w-0',\n },\n variants: {\n variant: {\n default: {},\n dot: {\n stepNumber: 'hidden',\n stepIconSlot: 'hidden',\n },\n simple: {\n stepLabelWrapper: 'sr-only',\n },\n },\n size: {\n xs: {\n stepIndicator: 'size-6 text-xs',\n stepLabel: 'text-xs',\n },\n sm: {\n stepIndicator: 'size-7 text-xs',\n stepLabel: 'text-sm',\n },\n md: {\n stepIndicator: 'size-8 text-sm',\n stepLabel: 'text-sm',\n },\n // lg/xl step labels use `text-base` per the trigger font-size scale\n // (CLAUDE.md typography). Steps are interactive trigger elements.\n lg: {\n stepIndicator: 'size-10 text-base',\n stepLabel: 'text-base',\n },\n xl: {\n stepIndicator: 'size-12 text-base',\n stepLabel: 'text-base',\n },\n },\n orientation: {\n horizontal: {\n root: 'flex-col w-full',\n header: 'flex-row items-center w-full',\n stepItem: 'flex-row items-center flex-1 last:flex-none',\n stepConnector: 'flex-1 h-px mx-2',\n stepLabelWrapper: 'ml-2',\n stepPanel:\n 'mt-4 rounded-lg outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500 motion-reduce:transition-none',\n },\n vertical: {\n root: 'flex-col',\n header: 'flex-col items-stretch',\n stepItem: 'flex-col items-start w-full',\n stepConnector: 'w-px min-h-6 ml-4 my-1 flex-1',\n stepLabelWrapper: 'ml-3',\n stepPanel:\n 'ml-11 mt-2 mb-4 rounded-lg outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500 motion-reduce:transition-none',\n },\n },\n },\n compoundVariants: [\n // Dot variant indicator sizing\n { variant: 'dot', size: 'xs', class: { stepIndicator: 'size-2' } },\n { variant: 'dot', size: 'sm', class: { stepIndicator: 'size-2.5' } },\n { variant: 'dot', size: 'md', class: { stepIndicator: 'size-2.5' } },\n { variant: 'dot', size: 'lg', class: { stepIndicator: 'size-3' } },\n { variant: 'dot', size: 'xl', class: { stepIndicator: 'size-3' } },\n\n // Thicker connectors for lg / xl\n {\n orientation: 'horizontal',\n size: 'lg',\n class: { stepConnector: 'h-0.5' },\n },\n {\n orientation: 'horizontal',\n size: 'xl',\n class: { stepConnector: 'h-0.5' },\n },\n { orientation: 'vertical', size: 'lg', class: { stepConnector: 'w-0.5' } },\n { orientation: 'vertical', size: 'xl', class: { stepConnector: 'w-0.5' } },\n ],\n defaultVariants: {\n variant: 'default',\n size: 'md',\n orientation: 'horizontal',\n },\n },\n { twMerge: true },\n);\n\n// ── Static class lookups (Tailwind v4 requires statically-written class strings) ──\n\ntype StepStyleState = 'pending' | 'active' | 'completed' | 'error' | 'disabled';\n\nconst INDICATOR_PENDING =\n 'bg-surface-muted text-fg-muted border border-border';\nconst INDICATOR_DISABLED =\n 'bg-surface-muted text-fg-subtle border border-border opacity-60';\nconst INDICATOR_ERROR =\n 'bg-error-solid text-error-solid-fg border border-error-border-strong';\n\n// Slot tokens own light/dark contrast — no `dark:`, no shade picks.\n// The active-state ring uses `{role}-soft` (low-chroma in light, deep-tinted in\n// dark) so the halo reads consistently against the surface in both modes.\nconst INDICATOR_ACTIVE: Record<TwColor, string> = {\n primary: 'bg-primary-solid text-primary-solid-fg border border-primary-border-strong ring-4 ring-primary-soft',\n secondary: 'bg-secondary-solid text-secondary-solid-fg border border-secondary-border-strong ring-4 ring-secondary-soft',\n accent: 'bg-accent-solid text-accent-solid-fg border border-accent-border-strong ring-4 ring-accent-soft',\n neutral: 'bg-neutral-solid text-neutral-solid-fg border border-neutral-border-strong ring-4 ring-neutral-soft',\n info: 'bg-info-solid text-info-solid-fg border border-info-border-strong ring-4 ring-info-soft',\n success: 'bg-success-solid text-success-solid-fg border border-success-border-strong ring-4 ring-success-soft',\n warning: 'bg-warning-solid text-warning-solid-fg border border-warning-border-strong ring-4 ring-warning-soft',\n error: 'bg-error-solid text-error-solid-fg border border-error-border-strong ring-4 ring-error-soft',\n};\n\nconst INDICATOR_COMPLETED: Record<TwColor, string> = {\n primary: 'bg-primary-solid text-primary-solid-fg border border-primary-border-strong',\n secondary: 'bg-secondary-solid text-secondary-solid-fg border border-secondary-border-strong',\n accent: 'bg-accent-solid text-accent-solid-fg border border-accent-border-strong',\n neutral: 'bg-neutral-solid text-neutral-solid-fg border border-neutral-border-strong',\n info: 'bg-info-solid text-info-solid-fg border border-info-border-strong',\n success: 'bg-success-solid text-success-solid-fg border border-success-border-strong',\n warning: 'bg-warning-solid text-warning-solid-fg border border-warning-border-strong',\n error: 'bg-error-solid text-error-solid-fg border border-error-border-strong',\n};\n\nconst LABEL_PENDING = 'text-fg-muted';\nconst LABEL_COMPLETED = 'text-fg';\nconst LABEL_DISABLED = 'text-fg-subtle';\nconst LABEL_ERROR = 'text-error-fg font-semibold';\n\nconst LABEL_ACTIVE: Record<TwColor, string> = {\n primary: 'text-primary-fg font-semibold',\n secondary: 'text-secondary-fg font-semibold',\n accent: 'text-accent-fg font-semibold',\n neutral: 'text-fg font-semibold',\n info: 'text-info-fg font-semibold',\n success: 'text-success-fg font-semibold',\n warning: 'text-warning-fg font-semibold',\n error: 'text-error-fg font-semibold',\n};\n\nconst CONNECTOR_DEFAULT = 'bg-border';\nconst CONNECTOR_ERROR = 'bg-error-border-strong';\nconst CONNECTOR_REACHED: Record<TwColor, string> = {\n primary: 'bg-primary-border-strong',\n secondary: 'bg-secondary-border-strong',\n accent: 'bg-accent-border-strong',\n neutral: 'bg-neutral-border-strong',\n info: 'bg-info-border-strong',\n success: 'bg-success-border-strong',\n warning: 'bg-warning-border-strong',\n error: 'bg-error-border-strong',\n};\n\nfunction resolveIndicatorClasses(state: StepStyleState, color: TwColor): string {\n switch (state) {\n case 'pending':\n return INDICATOR_PENDING;\n case 'disabled':\n return INDICATOR_DISABLED;\n case 'error':\n return INDICATOR_ERROR;\n case 'active':\n return INDICATOR_ACTIVE[color];\n case 'completed':\n return INDICATOR_COMPLETED[color];\n }\n}\n\nfunction resolveLabelClasses(state: StepStyleState, color: TwColor): string {\n switch (state) {\n case 'pending':\n return LABEL_PENDING;\n case 'completed':\n return LABEL_COMPLETED;\n case 'disabled':\n return LABEL_DISABLED;\n case 'error':\n return LABEL_ERROR;\n case 'active':\n return LABEL_ACTIVE[color];\n }\n}\n\nfunction resolveConnectorClasses(state: StepStyleState, color: TwColor): string {\n if (state === 'error') return CONNECTOR_ERROR;\n if (state === 'completed' || state === 'active') return CONNECTOR_REACHED[color];\n return CONNECTOR_DEFAULT;\n}\n\n// ── StepperIconDirective ──\n\n/**\n * Structural-style directive on an `<ng-template>` that replaces the default\n * indicator icon for a given step state.\n */\n@Directive({\n selector: 'ng-template[twStepperIcon]',\n})\nexport class StepperIconDirective {\n /** Step state this template overrides. Matches CDK's `StepState` values (`'number' | 'edit' | 'done' | 'error'`). */\n readonly state = input<StepState | undefined>(undefined);\n\n /** @internal */\n readonly templateRef = inject(TemplateRef<StepperIconContext>);\n}\n\n// ── StepLabelDirective ──\n\n/**\n * Structural-style directive on an `<ng-template>` used as a custom step header\n * label. Consumers write `<ng-template twStepLabel>…</ng-template>` inside `<tw-step>`.\n */\n@Directive({\n selector: 'ng-template[twStepLabel]',\n providers: [{ provide: CdkStepLabel, useExisting: StepLabelDirective }],\n})\nexport class StepLabelDirective extends CdkStepLabel {}\n\n// ── StepComponent ──\n\n@Component({\n selector: 'tw-step',\n template: '<ng-template><ng-content/></ng-template>',\n exportAs: 'twStep',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: CdkStep, useExisting: StepComponent }],\n})\nexport class StepComponent extends CdkStep {\n /** Optional descriptive text shown under the step label in the `'default'` variant. */\n readonly description = input('');\n\n /** @internal Custom indicator icon templates (one per state) projected into this step. */\n readonly iconTemplates = contentChildren(StepperIconDirective);\n}\n\n// ── StepperComponent ──\n\n@Component({\n selector: 'tw-stepper',\n templateUrl: './stepper.html',\n exportAs: 'twStepper',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet, CdkStepHeader],\n providers: [{ provide: CdkStepper, useExisting: StepperComponent }],\n host: {\n '[class]': 'rootClasses()',\n },\n})\nexport class StepperComponent extends CdkStepper implements AfterViewInit {\n /** Visual style of the indicator strip. `'default'` = numbered circles, `'dot'` = compact filled dots, `'simple'` = indicators only (labels hidden visually). Defaults to `'default'`. */\n readonly variant = input<StepperVariant>('default');\n\n /** Semantic color for active and completed indicators and connectors. Defaults to `'primary'`. */\n readonly color = input<TwColor>('primary');\n\n /** Controls indicator size and label typography. Defaults to `'md'`. */\n readonly size = input<TwSize>('md');\n\n /** When true, steps with `hasError` render error styling, icon, and `aria-invalid`. Defaults to `true`. */\n // TRUE-default: error states must be visible by default — silently swallowing\n // a stepped flow's failure state is a UX regression. Consumers opt out per step.\n readonly showError = input(true);\n\n /** When true, clicking a navigable step header selects it. Set to `false` to only allow advancement via `twStepperNext` / `twStepperPrevious`. Defaults to `true`. */\n // TRUE-default: free-navigation is the standard stepper UX; restricted flows\n // (e.g. wizards that must complete in order) explicitly opt out.\n readonly headerInteractive = input(true);\n\n private readonly _liveAnnouncer = inject(LiveAnnouncer);\n private readonly _destroyRef = inject(DestroyRef);\n private readonly _globalOptions = inject(STEPPER_GLOBAL_OPTIONS, { optional: true });\n\n /**\n * CdkStepper exposes its state via class properties (selectedIndex,\n * previousIndex, orientation), not signals. We mirror those into signals so\n * templates can react via @if/@for and OnPush change detection works without\n * manual `markForCheck`. Sync happens in the property setters and lifecycle\n * hooks below — keep these mirrors in lock-step with the CDK fields.\n */\n private readonly _orientationSignal = signal<StepperOrientation>('horizontal');\n private readonly _selectedIndexSignal = signal(0);\n private readonly _previousIndexSignal = signal(0);\n\n /** @internal Reactive mirror of CDK's `orientation` input. */\n readonly orientationValue = this._orientationSignal.asReadonly();\n\n /** @internal Reactive mirror of CDK's `selectedIndex`. */\n readonly selectedIndexValue = this._selectedIndexSignal.asReadonly();\n\n override set orientation(value: StepperOrientation) {\n super.orientation = value;\n this._orientationSignal.set(value);\n }\n override get orientation(): StepperOrientation {\n return super.orientation;\n }\n\n private readonly _variantResult = computed(() =>\n stepperVariants({\n variant: this.variant(),\n size: this.size(),\n orientation: this._orientationSignal(),\n }),\n );\n\n readonly rootClasses = computed(() => this._variantResult().root());\n readonly headerClasses = computed(() => this._variantResult().header());\n readonly stepItemClasses = computed(() => this._variantResult().stepItem());\n readonly stepHeaderClasses = computed(() => this._variantResult().stepHeader());\n readonly stepIndicatorBaseClasses = computed(() => this._variantResult().stepIndicator());\n readonly stepNumberClasses = computed(() => this._variantResult().stepNumber());\n readonly stepIconSlotClasses = computed(() => this._variantResult().stepIconSlot());\n readonly stepLabelWrapperClasses = computed(() => this._variantResult().stepLabelWrapper());\n readonly stepLabelBaseClasses = computed(() => this._variantResult().stepLabel());\n readonly stepDescriptionClasses = computed(() => this._variantResult().stepDescription());\n readonly stepOptionalHintClasses = computed(() => this._variantResult().stepOptionalHint());\n readonly stepConnectorBaseClasses = computed(() => this._variantResult().stepConnector());\n readonly stepPanelClasses = computed(() => this._variantResult().stepPanel());\n\n readonly panelAnimationClass = computed(() => {\n if (this._orientationSignal() === 'vertical') return null;\n return this._selectedIndexSignal() >= this._previousIndexSignal()\n ? 'step-panel-enter-forward'\n : 'step-panel-enter-backward';\n });\n\n override ngAfterViewInit(): void {\n super.ngAfterViewInit();\n this._orientationSignal.set(this.orientation);\n this._selectedIndexSignal.set(this.selectedIndex);\n this._previousIndexSignal.set(this.selectedIndex);\n\n this.selectionChange\n .pipe(takeUntilDestroyed(this._destroyRef))\n .subscribe((event: StepperSelectionEvent) => {\n this._previousIndexSignal.set(event.previouslySelectedIndex);\n this._selectedIndexSignal.set(event.selectedIndex);\n this._orientationSignal.set(this.orientation);\n\n const total = this.steps.length;\n const label =\n event.selectedStep.label || `Step ${event.selectedIndex + 1}`;\n this._liveAnnouncer.announce(\n `${label}, step ${event.selectedIndex + 1} of ${total}`,\n );\n });\n }\n\n /** @internal Typed view of projected steps. */\n get twSteps(): readonly StepComponent[] {\n return this.steps.toArray() as StepComponent[];\n }\n\n /** @internal Resolves the visual state of a step for color/theming purposes. */\n getStepStyleState(step: StepComponent, index: number): StepStyleState {\n if (this.shouldRenderError(step)) return 'error';\n if (index === this._selectedIndexSignal()) return 'active';\n const itype = step.indicatorType();\n if (itype === STEP_STATE.DONE || itype === STEP_STATE.EDIT) return 'completed';\n if (this.linear && !step.isNavigable()) return 'disabled';\n return 'pending';\n }\n\n /** @internal */\n getIndicatorClass(step: StepComponent, index: number): string {\n const state = this.getStepStyleState(step, index);\n return `${this.stepIndicatorBaseClasses()} ${resolveIndicatorClasses(state, this.color())}`;\n }\n\n /** @internal */\n getLabelClass(step: StepComponent, index: number): string {\n const state = this.getStepStyleState(step, index);\n return `${this.stepLabelBaseClasses()} ${resolveLabelClasses(state, this.color())}`;\n }\n\n /** @internal */\n getConnectorClass(step: StepComponent, index: number): string {\n const state = this.getStepStyleState(step, index);\n return `${this.stepConnectorBaseClasses()} ${resolveConnectorClasses(state, this.color())}`;\n }\n\n /** @internal Resolves which indicator glyph to render for a step. */\n getIndicatorType(step: StepComponent): StepState {\n if (this.shouldRenderError(step)) return STEP_STATE.ERROR as StepState;\n return step.indicatorType() as StepState;\n }\n\n /** @internal Looks up a consumer-supplied custom template for a given indicator state. */\n resolveIconTemplate(\n step: StepComponent,\n state: StepState,\n ): TemplateRef<StepperIconContext> | null {\n const templates = step.iconTemplates();\n const match = templates.find((t) => t.state() === state);\n return match ? match.templateRef : null;\n }\n\n /** @internal Context supplied to custom icon templates. */\n iconContext(index: number): StepperIconContext {\n return {\n $implicit: {\n index,\n active: index === this._selectedIndexSignal(),\n },\n };\n }\n\n /** @internal Click handler for the step header button. */\n onHeaderClick(step: StepComponent, index: number): void {\n if (!this.headerInteractive()) return;\n if (!step.isNavigable()) return;\n this.selectedIndex = index;\n }\n\n /** @internal Whether the stepper should render the error state for a step. */\n shouldRenderError(step: StepComponent): boolean {\n if (!this.showError()) return false;\n if (this._globalOptions?.showError === false) return false;\n return step.hasError;\n }\n}\n\n// ── Next / Previous directives (hostDirectives over CDK) ──\n\n@Directive({\n selector: 'button[twStepperNext]',\n hostDirectives: [{ directive: CdkStepperNext, inputs: ['type'] }],\n})\nexport class StepperNextDirective {}\n\n@Directive({\n selector: 'button[twStepperPrevious]',\n hostDirectives: [{ directive: CdkStepperPrevious, inputs: ['type'] }],\n})\nexport class StepperPreviousDirective {}\n\n// ── Provider helper ──\n\n/** Provides app-wide stepper defaults via `STEPPER_GLOBAL_OPTIONS`. */\nexport function provideTwStepperOptions(options: StepperOptions): Provider[] {\n return [{ provide: STEPPER_GLOBAL_OPTIONS, useValue: options }];\n}\n","<!-- Header strip + inline panels (vertical) / header-only (horizontal) -->\n<!-- WAI-ARIA tablist pattern: the tablist relays keydown to the FocusKeyManager\n but does not itself receive focus — each step header is the focus target. -->\n<!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n<div\n [class]=\"headerClasses()\"\n role=\"tablist\"\n [attr.aria-orientation]=\"orientationValue()\"\n (keydown)=\"_onKeydown($event)\"\n>\n @for (step of twSteps; track $index; let i = $index; let last = $last) {\n <div [class]=\"stepItemClasses()\">\n <!-- Step header button -->\n <button\n type=\"button\"\n cdkStepHeader\n role=\"tab\"\n [class]=\"stepHeaderClasses()\"\n [class.pointer-events-none]=\"!headerInteractive() || !step.isNavigable()\"\n [class.opacity-60]=\"!step.isNavigable()\"\n [id]=\"_getStepLabelId(i)\"\n [attr.aria-controls]=\"_getStepContentId(i)\"\n [attr.aria-selected]=\"selectedIndexValue() === i\"\n [attr.aria-current]=\"selectedIndexValue() === i ? 'step' : null\"\n [attr.aria-disabled]=\"!step.isNavigable() || null\"\n [attr.aria-invalid]=\"shouldRenderError(step) || null\"\n [attr.aria-label]=\"step.ariaLabel || null\"\n [attr.aria-labelledby]=\"step.ariaLabelledby || null\"\n (click)=\"onHeaderClick(step, i)\"\n >\n <!-- Indicator (number / icon / dot) -->\n <span [class]=\"getIndicatorClass(step, i)\">\n @let indicatorType = getIndicatorType(step);\n @let customIcon = resolveIconTemplate(step, indicatorType);\n\n @if (customIcon) {\n <span [class]=\"stepIconSlotClasses()\">\n <ng-container\n [ngTemplateOutlet]=\"customIcon\"\n [ngTemplateOutletContext]=\"iconContext(i)\"\n />\n </span>\n } @else {\n @switch (indicatorType) {\n @case ('number') {\n <span [class]=\"stepNumberClasses()\">{{ i + 1 }}</span>\n }\n @case ('done') {\n <span [class]=\"stepIconSlotClasses()\">\n <svg\n class=\"size-3/5 shrink-0\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </span>\n }\n @case ('edit') {\n <span [class]=\"stepIconSlotClasses()\">\n <svg\n class=\"size-3/5 shrink-0\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M13.586 3.586a2 2 0 1 1 2.828 2.828l-.793.793-2.828-2.828.793-.793Zm-2.207 2.207 2.828 2.828-7.07 7.071a2 2 0 0 1-.83.5l-3.086.926a.5.5 0 0 1-.62-.621l.926-3.086a2 2 0 0 1 .5-.83l7.352-7.788Z\"\n />\n </svg>\n </span>\n }\n @case ('error') {\n <span [class]=\"stepIconSlotClasses()\">\n <svg\n class=\"size-3/5 shrink-0\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm.75-11.25a.75.75 0 0 0-1.5 0v4.5a.75.75 0 0 0 1.5 0v-4.5ZM10 15a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </span>\n }\n }\n }\n </span>\n\n <!-- Label + description -->\n <span [class]=\"stepLabelWrapperClasses()\">\n <span [class]=\"getLabelClass(step, i)\">\n @if (step.stepLabel) {\n <ng-container [ngTemplateOutlet]=\"step.stepLabel.template\" />\n } @else {\n {{ step.label }}\n }\n @if (step.optional && !step.completed) {\n <span [class]=\"stepOptionalHintClasses()\">(Optional)</span>\n }\n </span>\n\n @if (step.description() && variant() === 'default') {\n <span [class]=\"stepDescriptionClasses()\">{{ step.description() }}</span>\n }\n\n @if (shouldRenderError(step) && step.errorMessage) {\n <span class=\"sr-only\">{{ step.errorMessage }}</span>\n }\n </span>\n </button>\n\n <!-- Connector (between step i and i+1) -->\n @if (!last) {\n <span\n [class]=\"getConnectorClass(step, i)\"\n aria-hidden=\"true\"\n ></span>\n }\n\n <!-- Vertical: panel is rendered inline under each selected step -->\n @if (orientationValue() === 'vertical' && selectedIndexValue() === i && step.content) {\n <div\n role=\"tabpanel\"\n [id]=\"_getStepContentId(i)\"\n [attr.aria-labelledby]=\"_getStepLabelId(i)\"\n [class]=\"stepPanelClasses()\"\n tabindex=\"0\"\n >\n <ng-container [ngTemplateOutlet]=\"step.content\" />\n </div>\n }\n </div>\n }\n</div>\n\n<!-- Horizontal: single panel rendered below the strip -->\n@if (orientationValue() === 'horizontal') {\n @let activeStep = twSteps[selectedIndexValue()];\n @if (activeStep && activeStep.content) {\n <div\n role=\"tabpanel\"\n [id]=\"_getStepContentId(selectedIndexValue())\"\n [attr.aria-labelledby]=\"_getStepLabelId(selectedIndexValue())\"\n [class]=\"stepPanelClasses()\"\n [animate.enter]=\"panelAnimationClass()\"\n tabindex=\"0\"\n >\n <ng-container [ngTemplateOutlet]=\"activeStep.content\" />\n </div>\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AA0CA;AAEA,MAAM,eAAe,GAAG,EAAE,CACxB;AACE,IAAA,KAAK,EAAE;AACL,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,MAAM,EAAE,MAAM;AACd,QAAA,QAAQ,EAAE,MAAM;AAChB,QAAA,UAAU,EACR,8PAA8P;AAChQ,QAAA,aAAa,EACX,qLAAqL;AACvL,QAAA,UAAU,EAAE,cAAc;AAC1B,QAAA,YAAY,EAAE,yCAAyC;AACvD,QAAA,gBAAgB,EAAE,iCAAiC;AACnD,QAAA,SAAS,EAAE,eAAe;AAC1B,QAAA,eAAe,EAAE,4CAA4C;AAC7D,QAAA,gBAAgB,EAAE,yCAAyC;AAC3D,QAAA,aAAa,EACX,0EAA0E;AAC5E,QAAA,SAAS,EAAE,SAAS;AACrB,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,EAAE;AACX,YAAA,GAAG,EAAE;AACH,gBAAA,UAAU,EAAE,QAAQ;AACpB,gBAAA,YAAY,EAAE,QAAQ;AACvB,aAAA;AACD,YAAA,MAAM,EAAE;AACN,gBAAA,gBAAgB,EAAE,SAAS;AAC5B,aAAA;AACF,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE;AACF,gBAAA,aAAa,EAAE,gBAAgB;AAC/B,gBAAA,SAAS,EAAE,SAAS;AACrB,aAAA;AACD,YAAA,EAAE,EAAE;AACF,gBAAA,aAAa,EAAE,gBAAgB;AAC/B,gBAAA,SAAS,EAAE,SAAS;AACrB,aAAA;AACD,YAAA,EAAE,EAAE;AACF,gBAAA,aAAa,EAAE,gBAAgB;AAC/B,gBAAA,SAAS,EAAE,SAAS;AACrB,aAAA;;;AAGD,YAAA,EAAE,EAAE;AACF,gBAAA,aAAa,EAAE,mBAAmB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,CAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,2BAA2B;AACrC,oBAAA,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;AACtE,iBAAA;;AAGD;AAEA;AACM,SAAU,uBAAuB,CAAC,OAAuB,EAAA;IAC7D,OAAO,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AACjE;;AExfA;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"cdevhub-ngx-tw-tab-nav.mjs","sources":["../../../projects/ngx-tw/tab-nav/tab-nav.ts","../../../projects/ngx-tw/tab-nav/cdevhub-ngx-tw-tab-nav.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n ElementRef,\n computed,\n contentChild,\n contentChildren,\n effect,\n inject,\n input,\n signal,\n untracked,\n} from '@angular/core';\nimport { FocusableOption, FocusKeyManager, LiveAnnouncer } from '@angular/cdk/a11y';\nimport { tv } from 'tailwind-variants';\nimport { twMerge } from 'tailwind-merge';\nimport {\n getActiveTriggerClasses,\n getInactiveTriggerClasses,\n tabTriggerVariants,\n type TabTriggerVariant,\n type TwColor,\n type TwSize,\n} from '@cdevhub/ngx-tw/core';\n\n/** Visual style of the tab navigation strip. */\nexport type TabNavVariant = TabTriggerVariant;\n\n/** Optional label overrides for screen-reader announcements emitted by `TabNavComponent`. */\nexport interface TabNavLabels {\n /** Formatter for the LiveAnnouncer message emitted when the active link changes in the ARIA tabs pattern. Receives the link's visible text, its 1-based index, and the total link count. */\n activeTabAnnouncement?: (label: string, index: number, total: number) => string;\n}\n\n// ── tv() config — nav-shell-only slots (trigger config is shared in core) ──\n\nconst tabNavLayoutVariants = tv(\n {\n slots: {\n nav: 'relative flex shrink-0 items-stretch',\n list: 'flex overflow-x-auto items-stretch',\n },\n variants: {\n variant: {\n underline: {\n nav: 'border-b border-border',\n list: 'gap-0',\n },\n enclosed: {\n nav: 'border-b border-border',\n list: 'gap-0',\n },\n pill: {\n nav: 'bg-surface-muted rounded-xl p-1',\n list: 'gap-1',\n },\n },\n },\n defaultVariants: {\n variant: 'underline',\n },\n },\n { twMerge: true },\n);\n\n// ── TabNavPanel ──\n\nlet nextPanelId = 0;\n\n@Component({\n selector: 'tw-tab-nav-panel',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: '<ng-content />',\n host: {\n role: 'tabpanel',\n tabindex: '0',\n '[attr.id]': 'id()',\n '[attr.aria-labelledby]': 'activeTabId()',\n },\n})\nexport class TabNavPanel {\n /** Unique id for this panel. Referenced by the active link's `aria-controls`. Auto-generated when not provided. */\n readonly id = input(`tw-tab-nav-panel-${nextPanelId++}`);\n\n /** @internal Id of the active link — set by the associated TabNavComponent. */\n readonly activeTabId = signal<string | undefined>(undefined);\n}\n\n// ── TabNavComponent ──\n\n@Component({\n selector: 'nav[twTabNav]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: '<ng-content />',\n host: {\n '[class]': 'navClasses()',\n '[attr.role]': 'role()',\n '[attr.aria-orientation]': 'ariaOrientation()',\n '(keydown)': 'onKeydown($event)',\n },\n})\nexport class TabNavComponent {\n /** Visual style of the tab strip. Defaults to `'underline'`. */\n readonly variant = input<TabNavVariant>('underline');\n\n /** Semantic color used for the active link indicator and text. Defaults to `'primary'`. */\n readonly color = input<TwColor>('primary');\n\n /** Controls padding and font size of tab links. Defaults to `'md'`. */\n readonly size = input<TwSize>('md');\n\n /** When true, tab links stretch to fill available width equally. Defaults to `false`. */\n readonly fitted = input(false);\n\n /** Associated panel element. When provided, the nav follows the ARIA tabs pattern (role=tablist). When omitted, it uses the standard navigation landmark pattern with `aria-current=\"page\"` on the active link. A panel projected as a child of the `<nav>` is auto-discovered. */\n readonly tabPanel = input<TabNavPanel | undefined>(undefined);\n\n /** Additional classes merged onto the `<nav>` host. Useful for layout tweaks or borders that the default tv() config does not cover. */\n readonly navClass = input<string>('');\n\n /** Additional classes merged onto every tab link. Applied after base/active/disabled classes so consumer styles always win the cascade. */\n readonly linkClass = input<string>('');\n\n /** Optional label overrides for screen-reader announcements. Only used in the ARIA tabs pattern (i.e. when a panel is associated). */\n readonly labels = input<TabNavLabels>({});\n\n /** @internal Tab links discovered via content projection. */\n readonly links = contentChildren(TabLinkDirective, { descendants: true });\n\n /** @internal Panel discovered as a content child of the nav. */\n readonly projectedPanel = contentChild(TabNavPanel);\n\n /** @internal Resolved panel — explicit `tabPanel` input wins, falls back to a projected `<tw-tab-nav-panel>` inside the nav. */\n readonly resolvedPanel = computed(() => this.tabPanel() ?? this.projectedPanel());\n\n private readonly liveAnnouncer = inject(LiveAnnouncer);\n\n /** Tracks the previously-announced active link id so we only announce on actual changes. `null` = before the first sync. */\n private readonly previousActiveLinkId = signal<string | null | undefined>(null);\n\n private readonly layoutResult = computed(() =>\n tabNavLayoutVariants({\n variant: this.variant(),\n }),\n );\n\n private readonly triggerResult = computed(() =>\n tabTriggerVariants({\n variant: this.variant(),\n color: this.color(),\n size: this.size(),\n fitted: this.fitted(),\n }),\n );\n\n /** @internal Combined classes applied to the `<nav>` host. */\n readonly navClasses = computed(() =>\n twMerge(this.layoutResult().nav(), this.navClass()),\n );\n\n /** @internal Base trigger classes (without active/inactive state). `no-underline` is appended because anchors need to override the default browser underline — tabs (which uses `<div role=\"tab\">`) doesn't need it. */\n readonly linkBaseClasses = computed(() =>\n twMerge(this.triggerResult().trigger(), 'no-underline'),\n );\n\n /** @internal ARIA role — `tablist` when a tabPanel is associated, otherwise inherited from `<nav>`. */\n readonly role = computed(() => (this.resolvedPanel() ? 'tablist' : null));\n\n /** @internal ARIA orientation — only set in the tabs pattern. */\n readonly ariaOrientation = computed(() => (this.resolvedPanel() ? 'horizontal' : null));\n\n /** @internal Classes applied to the active state of a link, based on current variant and color. tab-nav is horizontal-only, so the orientation argument is hard-coded. */\n readonly activeLinkClasses = computed(() =>\n getActiveTriggerClasses(this.variant(), this.color(), 'horizontal'),\n );\n\n /** @internal Classes applied to the inactive state of a link, based on current variant. */\n readonly inactiveLinkClasses = computed(() => getInactiveTriggerClasses(this.variant()));\n\n // Typed as FocusableOption because TabLinkDirective's `disabled` InputSignal\n // is structurally incompatible with FocusableOption.disabled (boolean).\n private keyManager: FocusKeyManager<FocusableOption> | null = null;\n\n constructor() {\n // Keep the associated panel's aria-labelledby in sync with the active link\n // and announce route changes to screen readers when in the ARIA tabs pattern.\n effect(() => {\n const panel = this.resolvedPanel();\n if (!panel) {\n // Reset so the next time a panel is associated we don't fire a stale announcement.\n untracked(() => this.previousActiveLinkId.set(null));\n return;\n }\n const links = this.links();\n const activeLink = links.find((link) => link.active());\n const activeLinkId = activeLink?.linkId() ?? undefined;\n panel.activeTabId.set(activeLinkId);\n\n const prev = untracked(() => this.previousActiveLinkId());\n untracked(() => this.previousActiveLinkId.set(activeLinkId));\n if (prev === null || prev === activeLinkId || !activeLink) {\n return;\n }\n\n const idx = links.indexOf(activeLink);\n const label = activeLink.elementRef.nativeElement.textContent?.trim() ?? '';\n const formatter = this.labels().activeTabAnnouncement;\n const message = formatter\n ? formatter(label, idx + 1, links.length)\n : `${label}, tab ${idx + 1} of ${links.length}`;\n this.liveAnnouncer.announce(message);\n });\n\n // Rebuild FocusKeyManager whenever the link set changes. tab-nav is\n // horizontal-only, so we always configure horizontal orientation.\n effect((onCleanup) => {\n const links = this.links();\n if (links.length === 0) {\n this.keyManager = null;\n return;\n }\n // Cast through unknown because `disabled` on TabLinkDirective is an\n // InputSignal — structurally incompatible with FocusableOption's\n // `disabled?: boolean`. FocusKeyManager only calls `focus()` (which we\n // provide) and the disabled check, which we override via skipPredicate.\n const focusable = links as unknown as readonly FocusableOption[];\n const manager = (new FocusKeyManager(focusable)\n .withWrap()\n .withHomeAndEnd()\n .withHorizontalOrientation('ltr')) as FocusKeyManager<FocusableOption>;\n // The `disabled` field on TabLinkDirective is an InputSignal (always\n // truthy as a function), so we cannot rely on FocusKeyManager's default\n // disabled check. Resolve the signal explicitly here.\n manager.skipPredicate((link) => (link as unknown as TabLinkDirective).disabled());\n this.keyManager = manager;\n\n onCleanup(() => {\n manager.destroy();\n });\n });\n }\n\n /** @internal Handles arrow-key navigation in the ARIA tabs pattern via CDK FocusKeyManager. Manual activation: focus moves, but the link is only activated on Enter/Space (handled by the anchor itself). */\n onKeydown(event: KeyboardEvent): void {\n if (!this.resolvedPanel()) return;\n if (!this.keyManager) return;\n const links = this.links();\n if (links.length === 0) return;\n\n // Sync the manager's active item with whichever link the user has DOM-focused\n // (mirrors the accordion pattern; event.target works under shadow DOM).\n const focusedIdx = links.findIndex(\n (link) => link.elementRef.nativeElement === event.target,\n );\n if (focusedIdx >= 0 && focusedIdx !== this.keyManager.activeItemIndex) {\n this.keyManager.setActiveItem(focusedIdx);\n } else if (focusedIdx < 0) {\n // No focused link inside the nav — nothing to navigate.\n return;\n }\n\n this.keyManager.onKeydown(event);\n }\n}\n\n// ── TabLinkDirective ──\n\nlet nextLinkId = 0;\n\n@Directive({\n selector: 'a[twTabLink]',\n host: {\n '[attr.id]': 'linkId()',\n '[attr.role]': 'linkRole()',\n '[attr.aria-current]': 'ariaCurrent()',\n '[attr.aria-selected]': 'ariaSelected()',\n '[attr.aria-controls]': 'ariaControls()',\n '[attr.aria-disabled]': 'ariaDisabled()',\n '[attr.tabindex]': 'tabIndex()',\n '[class]': 'classes()',\n '(click)': 'onClick($event)',\n '(keydown)': 'onKeydown($event)',\n },\n})\n/**\n * Note: we intentionally do not declare `implements FocusableOption`. The\n * FocusableOption interface requires a `disabled?: boolean` property, but\n * `disabled` here is an InputSignal — a function whose own boolean-coerced\n * value is always truthy. FocusKeyManager only requires a `focus()` method\n * (structurally satisfied below) and we override the disabled check via\n * `.skipPredicate()` when constructing the manager.\n */\nexport class TabLinkDirective {\n /** @internal */\n readonly elementRef = inject<ElementRef<HTMLAnchorElement>>(ElementRef);\n\n private readonly parent = inject(TabNavComponent);\n\n /** Whether the link represents the current active page/tab. Typically bound to router state. Defaults to `false`. */\n readonly active = input(false);\n\n /** When true, the link is visually disabled and cannot be activated by click or keyboard. Defaults to `false`. */\n readonly disabled = input(false);\n\n /** Unique id for this link. Referenced by the panel's `aria-labelledby` when the link is active. Auto-generated when not provided. */\n readonly linkId = input(`tw-tab-link-${nextLinkId++}`);\n\n /**\n * @internal ARIA role — `'tab'` when the nav is wired to a panel (APG\n * tablist pattern requires `role=\"tab\"` on every link); `null` otherwise so\n * the anchor's native `role=\"link\"` wins. Do NOT collapse to a single\n * branch — both are meaningful.\n */\n readonly linkRole = computed(() => (this.parent.resolvedPanel() ? 'tab' : null));\n\n /** @internal `aria-current=\"page\"` on the active link when no tabPanel is associated. */\n readonly ariaCurrent = computed(() => {\n if (this.parent.resolvedPanel()) return null;\n return this.active() ? 'page' : null;\n });\n\n /** @internal `aria-selected` applied only in the tabs pattern. */\n readonly ariaSelected = computed(() => {\n if (!this.parent.resolvedPanel()) return null;\n return this.active() ? 'true' : 'false';\n });\n\n /** @internal `aria-controls` points to the associated panel id. */\n readonly ariaControls = computed(() => this.parent.resolvedPanel()?.id() ?? null);\n\n /** @internal */\n readonly ariaDisabled = computed(() => (this.disabled() ? 'true' : null));\n\n /** @internal Tabindex — roving in the tabs pattern, default for navigation links, always -1 when disabled. */\n readonly tabIndex = computed(() => {\n if (this.disabled()) return -1;\n if (!this.parent.resolvedPanel()) return null;\n return this.active() ? 0 : -1;\n });\n\n /** @internal Combined classes: base + active/inactive state + disabled modifiers + consumer overrides. */\n readonly classes = computed(() => {\n const base = this.parent.linkBaseClasses();\n const state = this.active()\n ? this.parent.activeLinkClasses()\n : this.parent.inactiveLinkClasses();\n const disabled = this.disabled()\n ? 'opacity-50 pointer-events-none cursor-not-allowed'\n : '';\n return twMerge(base, state, disabled, this.parent.linkClass());\n });\n\n /** Programmatically focus this link. */\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n /** @internal Intercepts clicks on disabled links to prevent navigation. */\n onClick(event: MouseEvent): void {\n if (this.disabled()) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n\n /** @internal Handles keyboard activation: blocks Enter/Space on disabled links, and activates the link on Space for enabled ones (anchors do not respond to Space by default). */\n onKeydown(event: KeyboardEvent): void {\n if (this.disabled()) {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n return;\n }\n if (event.key === ' ') {\n event.preventDefault();\n this.elementRef.nativeElement.click();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAmCA;AAEA,MAAM,oBAAoB,GAAG,EAAE,CAC7B;AACE,IAAA,KAAK,EAAE;AACL,QAAA,GAAG,EAAE,sCAAsC;AAC3C,QAAA,IAAI,EAAE,oCAAoC;AAC3C,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,SAAS,EAAE;AACT,gBAAA,GAAG,EAAE,wBAAwB;AAC7B,gBAAA,IAAI,EAAE,OAAO;AACd,aAAA;AACD,YAAA,QAAQ,EAAE;AACR,gBAAA,GAAG,EAAE,wBAAwB;AAC7B,gBAAA,IAAI,EAAE,OAAO;AACd,aAAA;AACD,YAAA,IAAI,EAAE;AACJ,gBAAA,GAAG,EAAE,iCAAiC;AACtC,gBAAA,IAAI,EAAE,OAAO;AACd,aAAA;AACF,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,WAAW;AACrB,KAAA;AACF,CAAA,EACD,EAAE,OAAO,EAAE,IAAI,EAAE,CAClB;AAED;AAEA,IAAI,WAAW,GAAG,CAAC;MAaN,WAAW,CAAA;;IAEb,EAAE,GA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YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,IAAI,EAAE;AACJ,wBAAA,WAAW,EAAE,UAAU;AACvB,wBAAA,aAAa,EAAE,YAAY;AAC3B,wBAAA,qBAAqB,EAAE,eAAe;AACtC,wBAAA,sBAAsB,EAAE,gBAAgB;AACxC,wBAAA,sBAAsB,EAAE,gBAAgB;AACxC,wBAAA,sBAAsB,EAAE,gBAAgB;AACxC,wBAAA,iBAAiB,EAAE,YAAY;AAC/B,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,SAAS,EAAE,iBAAiB;AAC5B,wBAAA,WAAW,EAAE,mBAAmB;AACjC,qBAAA;AACF,iBAAA;;;AC5RD;;AAEG;;;;"}
1
+ {"version":3,"file":"cdevhub-ngx-tw-tab-nav.mjs","sources":["../../../projects/ngx-tw/tab-nav/tab-nav.ts","../../../projects/ngx-tw/tab-nav/cdevhub-ngx-tw-tab-nav.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n ElementRef,\n computed,\n contentChild,\n contentChildren,\n effect,\n inject,\n input,\n signal,\n untracked,\n} from '@angular/core';\nimport { type FocusableOption, FocusKeyManager, LiveAnnouncer } from '@angular/cdk/a11y';\nimport { tv } from 'tailwind-variants';\nimport { twMerge } from 'tailwind-merge';\nimport {\n getActiveTriggerClasses,\n getInactiveTriggerClasses,\n tabTriggerVariants,\n type TabTriggerVariant,\n type TwColor,\n type TwSize,\n} from '@cdevhub/ngx-tw/core';\n\n/** Visual style of the tab navigation strip. */\nexport type TabNavVariant = TabTriggerVariant;\n\n/** Optional label overrides for screen-reader announcements emitted by `TabNavComponent`. */\nexport interface TabNavLabels {\n /** Formatter for the LiveAnnouncer message emitted when the active link changes in the ARIA tabs pattern. Receives the link's visible text, its 1-based index, and the total link count. */\n activeTabAnnouncement?: (label: string, index: number, total: number) => string;\n}\n\n// ── tv() config — nav-shell-only slots (trigger config is shared in core) ──\n\nconst tabNavLayoutVariants = tv(\n {\n slots: {\n nav: 'relative flex shrink-0 items-stretch',\n list: 'flex overflow-x-auto items-stretch',\n },\n variants: {\n variant: {\n underline: {\n nav: 'border-b border-border',\n list: 'gap-0',\n },\n enclosed: {\n nav: 'border-b border-border',\n list: 'gap-0',\n },\n pill: {\n nav: 'bg-surface-muted rounded-xl p-1',\n list: 'gap-1',\n },\n },\n },\n defaultVariants: {\n variant: 'underline',\n },\n },\n { twMerge: true },\n);\n\n// ── TabNavPanel ──\n\nlet nextPanelId = 0;\n\n@Component({\n selector: 'tw-tab-nav-panel',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: '<ng-content />',\n host: {\n role: 'tabpanel',\n tabindex: '0',\n '[attr.id]': 'id()',\n '[attr.aria-labelledby]': 'activeTabId()',\n },\n})\nexport class TabNavPanel {\n /** Unique id for this panel. Referenced by the active link's `aria-controls`. Auto-generated when not provided. */\n readonly id = input(`tw-tab-nav-panel-${nextPanelId++}`);\n\n /** @internal Id of the active link — set by the associated TabNavComponent. */\n readonly activeTabId = signal<string | undefined>(undefined);\n}\n\n// ── TabNavComponent ──\n\n@Component({\n selector: 'nav[twTabNav]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: '<ng-content />',\n host: {\n '[class]': 'navClasses()',\n '[attr.role]': 'role()',\n '[attr.aria-orientation]': 'ariaOrientation()',\n '(keydown)': 'onKeydown($event)',\n },\n})\nexport class TabNavComponent {\n /** Visual style of the tab strip. Defaults to `'underline'`. */\n readonly variant = input<TabNavVariant>('underline');\n\n /** Semantic color used for the active link indicator and text. Defaults to `'primary'`. */\n readonly color = input<TwColor>('primary');\n\n /** Controls padding and font size of tab links. Defaults to `'md'`. */\n readonly size = input<TwSize>('md');\n\n /** When true, tab links stretch to fill available width equally. Defaults to `false`. */\n readonly fitted = input(false);\n\n /** Associated panel element. When provided, the nav follows the ARIA tabs pattern (role=tablist). When omitted, it uses the standard navigation landmark pattern with `aria-current=\"page\"` on the active link. A panel projected as a child of the `<nav>` is auto-discovered. */\n readonly tabPanel = input<TabNavPanel | undefined>(undefined);\n\n /** Additional classes merged onto the `<nav>` host. Useful for layout tweaks or borders that the default tv() config does not cover. */\n readonly navClass = input<string>('');\n\n /** Additional classes merged onto every tab link. Applied after base/active/disabled classes so consumer styles always win the cascade. */\n readonly linkClass = input<string>('');\n\n /** Optional label overrides for screen-reader announcements. Only used in the ARIA tabs pattern (i.e. when a panel is associated). */\n readonly labels = input<TabNavLabels>({});\n\n /** @internal Tab links discovered via content projection. */\n readonly links = contentChildren(TabLinkDirective, { descendants: true });\n\n /** @internal Panel discovered as a content child of the nav. */\n readonly projectedPanel = contentChild(TabNavPanel);\n\n /** @internal Resolved panel — explicit `tabPanel` input wins, falls back to a projected `<tw-tab-nav-panel>` inside the nav. */\n readonly resolvedPanel = computed(() => this.tabPanel() ?? this.projectedPanel());\n\n private readonly liveAnnouncer = inject(LiveAnnouncer);\n\n /** Tracks the previously-announced active link id so we only announce on actual changes. `null` = before the first sync. */\n private readonly previousActiveLinkId = signal<string | null | undefined>(null);\n\n private readonly layoutResult = computed(() =>\n tabNavLayoutVariants({\n variant: this.variant(),\n }),\n );\n\n private readonly triggerResult = computed(() =>\n tabTriggerVariants({\n variant: this.variant(),\n color: this.color(),\n size: this.size(),\n fitted: this.fitted(),\n }),\n );\n\n /** @internal Combined classes applied to the `<nav>` host. */\n readonly navClasses = computed(() =>\n twMerge(this.layoutResult().nav(), this.navClass()),\n );\n\n /** @internal Base trigger classes (without active/inactive state). `no-underline` is appended because anchors need to override the default browser underline — tabs (which uses `<div role=\"tab\">`) doesn't need it. */\n readonly linkBaseClasses = computed(() =>\n twMerge(this.triggerResult().trigger(), 'no-underline'),\n );\n\n /** @internal ARIA role — `tablist` when a tabPanel is associated, otherwise inherited from `<nav>`. */\n readonly role = computed(() => (this.resolvedPanel() ? 'tablist' : null));\n\n /** @internal ARIA orientation — only set in the tabs pattern. */\n readonly ariaOrientation = computed(() => (this.resolvedPanel() ? 'horizontal' : null));\n\n /** @internal Classes applied to the active state of a link, based on current variant and color. tab-nav is horizontal-only, so the orientation argument is hard-coded. */\n readonly activeLinkClasses = computed(() =>\n getActiveTriggerClasses(this.variant(), this.color(), 'horizontal'),\n );\n\n /** @internal Classes applied to the inactive state of a link, based on current variant. */\n readonly inactiveLinkClasses = computed(() => getInactiveTriggerClasses(this.variant()));\n\n // Typed as FocusableOption because TabLinkDirective's `disabled` InputSignal\n // is structurally incompatible with FocusableOption.disabled (boolean).\n private keyManager: FocusKeyManager<FocusableOption> | null = null;\n\n constructor() {\n // Keep the associated panel's aria-labelledby in sync with the active link\n // and announce route changes to screen readers when in the ARIA tabs pattern.\n effect(() => {\n const panel = this.resolvedPanel();\n if (!panel) {\n // Reset so the next time a panel is associated we don't fire a stale announcement.\n untracked(() => this.previousActiveLinkId.set(null));\n return;\n }\n const links = this.links();\n const activeLink = links.find((link) => link.active());\n const activeLinkId = activeLink?.linkId() ?? undefined;\n panel.activeTabId.set(activeLinkId);\n\n const prev = untracked(() => this.previousActiveLinkId());\n untracked(() => this.previousActiveLinkId.set(activeLinkId));\n if (prev === null || prev === activeLinkId || !activeLink) {\n return;\n }\n\n const idx = links.indexOf(activeLink);\n const label = activeLink.elementRef.nativeElement.textContent?.trim() ?? '';\n const formatter = this.labels().activeTabAnnouncement;\n const message = formatter\n ? formatter(label, idx + 1, links.length)\n : `${label}, tab ${idx + 1} of ${links.length}`;\n this.liveAnnouncer.announce(message);\n });\n\n // Rebuild FocusKeyManager whenever the link set changes. tab-nav is\n // horizontal-only, so we always configure horizontal orientation.\n effect((onCleanup) => {\n const links = this.links();\n if (links.length === 0) {\n this.keyManager = null;\n return;\n }\n // Cast through unknown because `disabled` on TabLinkDirective is an\n // InputSignal — structurally incompatible with FocusableOption's\n // `disabled?: boolean`. FocusKeyManager only calls `focus()` (which we\n // provide) and the disabled check, which we override via skipPredicate.\n const focusable = links as unknown as readonly FocusableOption[];\n const manager = (new FocusKeyManager(focusable)\n .withWrap()\n .withHomeAndEnd()\n .withHorizontalOrientation('ltr')) as FocusKeyManager<FocusableOption>;\n // The `disabled` field on TabLinkDirective is an InputSignal (always\n // truthy as a function), so we cannot rely on FocusKeyManager's default\n // disabled check. Resolve the signal explicitly here.\n manager.skipPredicate((link) => (link as unknown as TabLinkDirective).disabled());\n this.keyManager = manager;\n\n onCleanup(() => {\n manager.destroy();\n });\n });\n }\n\n /** @internal Handles arrow-key navigation in the ARIA tabs pattern via CDK FocusKeyManager. Manual activation: focus moves, but the link is only activated on Enter/Space (handled by the anchor itself). */\n onKeydown(event: KeyboardEvent): void {\n if (!this.resolvedPanel()) return;\n if (!this.keyManager) return;\n const links = this.links();\n if (links.length === 0) return;\n\n // Sync the manager's active item with whichever link the user has DOM-focused\n // (mirrors the accordion pattern; event.target works under shadow DOM).\n const focusedIdx = links.findIndex(\n (link) => link.elementRef.nativeElement === event.target,\n );\n if (focusedIdx >= 0 && focusedIdx !== this.keyManager.activeItemIndex) {\n this.keyManager.setActiveItem(focusedIdx);\n } else if (focusedIdx < 0) {\n // No focused link inside the nav — nothing to navigate.\n return;\n }\n\n this.keyManager.onKeydown(event);\n }\n}\n\n// ── TabLinkDirective ──\n\nlet nextLinkId = 0;\n\n@Directive({\n selector: 'a[twTabLink]',\n host: {\n '[attr.id]': 'linkId()',\n '[attr.role]': 'linkRole()',\n '[attr.aria-current]': 'ariaCurrent()',\n '[attr.aria-selected]': 'ariaSelected()',\n '[attr.aria-controls]': 'ariaControls()',\n '[attr.aria-disabled]': 'ariaDisabled()',\n '[attr.tabindex]': 'tabIndex()',\n '[class]': 'classes()',\n '(click)': 'onClick($event)',\n '(keydown)': 'onKeydown($event)',\n },\n})\n/**\n * Note: we intentionally do not declare `implements FocusableOption`. The\n * FocusableOption interface requires a `disabled?: boolean` property, but\n * `disabled` here is an InputSignal — a function whose own boolean-coerced\n * value is always truthy. FocusKeyManager only requires a `focus()` method\n * (structurally satisfied below) and we override the disabled check via\n * `.skipPredicate()` when constructing the manager.\n */\nexport class TabLinkDirective {\n /** @internal */\n readonly elementRef = inject<ElementRef<HTMLAnchorElement>>(ElementRef);\n\n private readonly parent = inject(TabNavComponent);\n\n /** Whether the link represents the current active page/tab. Typically bound to router state. Defaults to `false`. */\n readonly active = input(false);\n\n /** When true, the link is visually disabled and cannot be activated by click or keyboard. Defaults to `false`. */\n readonly disabled = input(false);\n\n /** Unique id for this link. Referenced by the panel's `aria-labelledby` when the link is active. Auto-generated when not provided. */\n readonly linkId = input(`tw-tab-link-${nextLinkId++}`);\n\n /**\n * @internal ARIA role — `'tab'` when the nav is wired to a panel (APG\n * tablist pattern requires `role=\"tab\"` on every link); `null` otherwise so\n * the anchor's native `role=\"link\"` wins. Do NOT collapse to a single\n * branch — both are meaningful.\n */\n readonly linkRole = computed(() => (this.parent.resolvedPanel() ? 'tab' : null));\n\n /** @internal `aria-current=\"page\"` on the active link when no tabPanel is associated. */\n readonly ariaCurrent = computed(() => {\n if (this.parent.resolvedPanel()) return null;\n return this.active() ? 'page' : null;\n });\n\n /** @internal `aria-selected` applied only in the tabs pattern. */\n readonly ariaSelected = computed(() => {\n if (!this.parent.resolvedPanel()) return null;\n return this.active() ? 'true' : 'false';\n });\n\n /** @internal `aria-controls` points to the associated panel id. */\n readonly ariaControls = computed(() => this.parent.resolvedPanel()?.id() ?? null);\n\n /** @internal */\n readonly ariaDisabled = computed(() => (this.disabled() ? 'true' : null));\n\n /** @internal Tabindex — roving in the tabs pattern, default for navigation links, always -1 when disabled. */\n readonly tabIndex = computed(() => {\n if (this.disabled()) return -1;\n if (!this.parent.resolvedPanel()) return null;\n return this.active() ? 0 : -1;\n });\n\n /** @internal Combined classes: base + active/inactive state + disabled modifiers + consumer overrides. */\n readonly classes = computed(() => {\n const base = this.parent.linkBaseClasses();\n const state = this.active()\n ? this.parent.activeLinkClasses()\n : this.parent.inactiveLinkClasses();\n const disabled = this.disabled()\n ? 'opacity-50 pointer-events-none cursor-not-allowed'\n : '';\n return twMerge(base, state, disabled, this.parent.linkClass());\n });\n\n /** Programmatically focus this link. */\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n /** @internal Intercepts clicks on disabled links to prevent navigation. */\n onClick(event: MouseEvent): void {\n if (this.disabled()) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n\n /** @internal Handles keyboard activation: blocks Enter/Space on disabled links, and activates the link on Space for enabled ones (anchors do not respond to Space by default). */\n onKeydown(event: KeyboardEvent): void {\n if (this.disabled()) {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n return;\n }\n if (event.key === ' ') {\n event.preventDefault();\n this.elementRef.nativeElement.click();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAmCA;AAEA,MAAM,oBAAoB,GAAG,EAAE,CAC7B;AACE,IAAA,KAAK,EAAE;AACL,QAAA,GAAG,EAAE,sCAAsC;AAC3C,QAAA,IAAI,EAAE,oCAAoC;AAC3C,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,SAAS,EAAE;AACT,gBAAA,GAAG,EAAE,wBAAwB;AAC7B,gBAAA,IAAI,EAAE,OAAO;AACd,aAAA;AACD,YAAA,QAAQ,EAAE;AACR,gBAAA,GAAG,EAAE,wBAAwB;AAC7B,gBAAA,IAAI,EAAE,OAAO;AACd,aAAA;AACD,YAAA,IAAI,EAAE;AACJ,gBAAA,GAAG,EAAE,iCAAiC;AACtC,gBAAA,IAAI,EAAE,OAAO;AACd,aAAA;AACF,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,WAAW;AACrB,KAAA;AACF,CAAA,EACD,EAAE,OAAO,EAAE,IAAI,EAAE,CAClB;AAED;AAEA,IAAI,WAAW,GAAG,CAAC;MAaN,WAAW,CAAA;;IAEb,EAAE,GAAG,KAAK,CAAC,CAAA,iBAAA,EAAoB,WAAW,EAAE,CAAA,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