@4sh/ui-kit 0.15.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/README.fr.md +18 -10
  2. package/README.md +18 -10
  3. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +542 -150
  4. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
  5. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +622 -248
  6. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
  7. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +385 -152
  8. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
  9. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +748 -433
  10. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
  11. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +227 -135
  12. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
  13. package/fesm2022/4sh-ui-kit-base-ui-image.mjs +1200 -633
  14. package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
  15. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +1675 -953
  16. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
  17. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +243 -117
  18. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
  19. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +2294 -2039
  20. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
  21. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +1058 -1113
  22. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
  23. package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs +1108 -0
  24. package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs.map +1 -0
  25. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +397 -141
  26. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
  27. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +1529 -583
  28. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
  29. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs +383 -224
  30. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs.map +1 -1
  31. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +345 -177
  32. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
  33. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +280 -130
  34. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
  35. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +507 -246
  36. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
  37. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +401 -291
  38. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
  39. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +1277 -697
  40. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
  41. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +467 -194
  42. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
  43. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +394 -270
  44. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -1
  45. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +140 -60
  46. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
  47. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +386 -167
  48. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
  49. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +150 -87
  50. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
  51. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +345 -180
  52. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
  53. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +582 -392
  54. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
  55. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +1552 -888
  56. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
  57. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +485 -338
  58. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
  59. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +503 -311
  60. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
  61. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +271 -131
  62. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
  63. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +457 -214
  64. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -1
  65. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +711 -371
  66. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
  67. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +235 -121
  68. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
  69. package/fesm2022/4sh-ui-kit-forms.mjs +723 -596
  70. package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
  71. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +546 -242
  72. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
  73. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +335 -157
  74. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
  75. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +53 -33
  76. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
  77. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +218 -121
  78. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
  79. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +192 -100
  80. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
  81. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +456 -204
  82. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
  83. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +314 -147
  84. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
  85. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +179 -82
  86. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
  87. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +268 -123
  88. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
  89. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +391 -146
  90. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
  91. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +158 -76
  92. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
  93. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +159 -80
  94. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
  95. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +295 -131
  96. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
  97. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +211 -83
  98. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
  99. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +784 -414
  100. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
  101. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +822 -476
  102. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
  103. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +1014 -599
  104. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -1
  105. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +403 -189
  106. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
  107. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +707 -272
  108. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
  109. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +1146 -568
  110. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
  111. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +519 -308
  112. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
  113. package/fesm2022/4sh-ui-kit-motion.mjs +252 -150
  114. package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
  115. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +793 -341
  116. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -1
  117. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +351 -194
  118. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
  119. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +511 -220
  120. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
  121. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +910 -548
  122. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
  123. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +1128 -555
  124. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
  125. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +915 -470
  126. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
  127. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +931 -474
  128. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
  129. package/fesm2022/4sh-ui-kit-overlay.mjs +26 -109
  130. package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
  131. package/fesm2022/4sh-ui-kit-ripple.mjs +329 -290
  132. package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -1
  133. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +709 -248
  134. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
  135. package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2633 -1370
  136. package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
  137. package/fesm2022/4sh-ui-kit-theming.mjs +112 -113
  138. package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
  139. package/fesm2022/4sh-ui-kit-types.mjs +0 -12
  140. package/fesm2022/4sh-ui-kit.mjs +3 -15
  141. package/fesm2022/4sh-ui-kit.mjs.map +1 -1
  142. package/mcp/data/component-api.json +313 -2
  143. package/mcp/data/text-search-docs.json +177 -17
  144. package/mcp/data/ui-config.json +378 -1
  145. package/mcp/index.js +8190 -2876
  146. package/mcp/package.json +1 -1
  147. package/package.json +5 -1
  148. package/styles/component-vars.scss +22 -1
  149. package/styles/utils/_mixins.scss +11 -0
  150. package/types/4sh-ui-kit-actions-ui-button-split.d.ts +198 -87
  151. package/types/4sh-ui-kit-actions-ui-button.d.ts +240 -116
  152. package/types/4sh-ui-kit-actions-ui-link.d.ts +136 -67
  153. package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +287 -180
  154. package/types/4sh-ui-kit-base-ui-icon.d.ts +92 -58
  155. package/types/4sh-ui-kit-base-ui-image.d.ts +406 -205
  156. package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +577 -367
  157. package/types/4sh-ui-kit-forms-ui-checkbox.d.ts +77 -42
  158. package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +953 -700
  159. package/types/4sh-ui-kit-forms-ui-editor.d.ts +374 -340
  160. package/types/4sh-ui-kit-forms-ui-field-sign.d.ts +325 -0
  161. package/types/4sh-ui-kit-forms-ui-field.d.ts +150 -64
  162. package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +583 -241
  163. package/types/4sh-ui-kit-forms-ui-input-date.d.ts +152 -103
  164. package/types/4sh-ui-kit-forms-ui-input-group.d.ts +109 -63
  165. package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +93 -57
  166. package/types/4sh-ui-kit-forms-ui-input-number.d.ts +171 -93
  167. package/types/4sh-ui-kit-forms-ui-input-otp.d.ts +137 -100
  168. package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +469 -309
  169. package/types/4sh-ui-kit-forms-ui-input.d.ts +198 -116
  170. package/types/4sh-ui-kit-forms-ui-knob.d.ts +132 -80
  171. package/types/4sh-ui-kit-forms-ui-label.d.ts +47 -22
  172. package/types/4sh-ui-kit-forms-ui-nudger.d.ts +134 -67
  173. package/types/4sh-ui-kit-forms-ui-radio.d.ts +48 -33
  174. package/types/4sh-ui-kit-forms-ui-rating.d.ts +120 -86
  175. package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +221 -147
  176. package/types/4sh-ui-kit-forms-ui-select.d.ts +561 -357
  177. package/types/4sh-ui-kit-forms-ui-slider.d.ts +156 -105
  178. package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +133 -97
  179. package/types/4sh-ui-kit-forms-ui-textarea.d.ts +90 -54
  180. package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +158 -94
  181. package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +314 -178
  182. package/types/4sh-ui-kit-forms-ui-toggle.d.ts +88 -54
  183. package/types/4sh-ui-kit-forms.d.ts +291 -186
  184. package/types/4sh-ui-kit-informative-ui-accordion.d.ts +162 -92
  185. package/types/4sh-ui-kit-informative-ui-alert.d.ts +128 -62
  186. package/types/4sh-ui-kit-informative-ui-avatar-group.d.ts +8 -8
  187. package/types/4sh-ui-kit-informative-ui-avatar.d.ts +81 -44
  188. package/types/4sh-ui-kit-informative-ui-badge.d.ts +71 -41
  189. package/types/4sh-ui-kit-informative-ui-chip.d.ts +194 -99
  190. package/types/4sh-ui-kit-informative-ui-empty-state.d.ts +105 -65
  191. package/types/4sh-ui-kit-informative-ui-helper.d.ts +64 -34
  192. package/types/4sh-ui-kit-informative-ui-progress-bar.d.ts +120 -65
  193. package/types/4sh-ui-kit-informative-ui-read-only.d.ts +147 -67
  194. package/types/4sh-ui-kit-informative-ui-separator.d.ts +65 -35
  195. package/types/4sh-ui-kit-informative-ui-skeleton.d.ts +62 -32
  196. package/types/4sh-ui-kit-informative-ui-spinner.d.ts +111 -50
  197. package/types/4sh-ui-kit-informative-ui-tag.d.ts +77 -37
  198. package/types/4sh-ui-kit-informative-ui-toast.d.ts +300 -180
  199. package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +269 -141
  200. package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +360 -221
  201. package/types/4sh-ui-kit-layout-ui-card.d.ts +119 -79
  202. package/types/4sh-ui-kit-layout-ui-drawer.d.ts +244 -120
  203. package/types/4sh-ui-kit-layout-ui-modal.d.ts +409 -222
  204. package/types/4sh-ui-kit-layout-ui-popover.d.ts +149 -91
  205. package/types/4sh-ui-kit-motion.d.ts +117 -67
  206. package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +279 -145
  207. package/types/4sh-ui-kit-navigation-ui-breadcrumb.d.ts +134 -96
  208. package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +148 -89
  209. package/types/4sh-ui-kit-navigation-ui-menu.d.ts +282 -201
  210. package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +425 -261
  211. package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +279 -183
  212. package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +275 -173
  213. package/types/4sh-ui-kit-overlay.d.ts +6 -6
  214. package/types/4sh-ui-kit-ripple.d.ts +99 -74
  215. package/types/4sh-ui-kit-table-ui-paginator.d.ts +237 -133
  216. package/types/4sh-ui-kit-table-ui-table.d.ts +769 -470
  217. package/types/4sh-ui-kit-theming.d.ts +27 -29
  218. package/types/4sh-ui-kit-types.d.ts +6 -5
  219. package/types/4sh-ui-kit.d.ts +4 -3
  220. package/fesm2022/4sh-ui-kit-types.mjs.map +0 -1
@@ -1,145 +1,266 @@
1
- import * as i0 from '@angular/core';
2
- import { model, input, booleanAttribute, inject, ElementRef, viewChild, computed, Component, contentChild, signal, effect, contentChildren, afterRenderEffect, numberAttribute, output, forwardRef } from '@angular/core';
3
- import { NgTemplateOutlet } from '@angular/common';
4
- import { UiIcon } from '@4sh/ui-kit/base/ui-icon';
5
-
6
- /** Process-wide counter for unique step/panel ids (aria wiring). */
1
+ import * as i0 from "@angular/core";
2
+ import { Component, ElementRef, afterRenderEffect, booleanAttribute, computed, contentChild, contentChildren, effect, forwardRef, inject, input, model, numberAttribute, output, signal, viewChild } from "@angular/core";
3
+ import { NgTemplateOutlet } from "@angular/common";
4
+ import { UiIcon } from "@4sh/ui-kit/base/ui-icon";
7
5
  let nextUid = 0;
8
- /**
9
- * ui-step , a single step header inside a {@link UiStepList} (horizontal) or a
10
- * {@link UiStepItem} (vertical).
11
- *
12
- * Renders a real native `<button role="tab">` with a numbered marker and its
13
- * title. Every enabled header is a natural tab stop, so `Tab` walks through the
14
- * headers and `Enter`/`Space` activate the focused one (native button
15
- * behaviour , no custom key handling). The progression state (upcoming /
16
- * active / completed) is derived by the container from the active value; colours
17
- * come entirely from the `navigation.*` / `informative.*` design tokens.
18
- *
19
- * Declared before {@link UiStepper} so the container's content query can
20
- * reference it without a temporal-dead-zone error at class-definition time.
21
- */
22
- class UiStep {
23
- constructor() {
24
- /** Identifier of this step (matched against the container `value`). */
25
- this.value = model(undefined, /* @ts-ignore */
26
- ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
27
- /** Disable the step (not activatable, skipped by keyboard focus). */
28
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
29
- /** Icon name overriding the numbered marker (any state). */
30
- this.icon = input(/* @ts-ignore */
31
- ...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
32
- /** Accessible name override (falls back to the projected title). */
33
- this.ariaLabel = input(/* @ts-ignore */
34
- ...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
35
- /** @ignore Parent container (owns the active state + progression). */
36
- this.stepper = inject(UiStepper);
37
- /** @ignore */
38
- this.host = inject(ElementRef);
39
- /** @ignore Title text, measured by the scrollable strip (it overflows the marker). */
40
- this.titleEl = viewChild.required('title', /* @ts-ignore */
41
- ...(ngDevMode ? [{ debugName: "titleEl" }] : /* istanbul ignore next */ []));
42
- /** @ignore Progression state of this step. */
43
- this.state = computed(() => this.stepper.stepState(this.value()), /* @ts-ignore */
44
- ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
45
- /** @ignore 1-based position of this step (shown in the marker). */
46
- this.number = computed(() => this.stepper.stepNumber(this.value()), /* @ts-ignore */
47
- ...(ngDevMode ? [{ debugName: "number" }] : /* istanbul ignore next */ []));
48
- /** @ignore Whether a trailing separator is drawn (horizontal, not the last step). */
49
- this.showSeparator = computed(() => this.stepper.orientation() === 'horizontal' && !this.stepper.isLast(this.value()), /* @ts-ignore */
50
- ...(ngDevMode ? [{ debugName: "showSeparator" }] : /* istanbul ignore next */ []));
51
- /** @ignore The separator bridges to the next step once this one is completed. */
52
- this.separatorCompleted = computed(() => this.state() === 'completed', /* @ts-ignore */
53
- ...(ngDevMode ? [{ debugName: "separatorCompleted" }] : /* istanbul ignore next */ []));
54
- /** @ignore Last step in the sequence (no trailing growth in the horizontal strip). */
55
- this.isLastStep = computed(() => this.stepper.isLast(this.value()), /* @ts-ignore */
56
- ...(ngDevMode ? [{ debugName: "isLastStep" }] : /* istanbul ignore next */ []));
57
- /**
58
- * @ignore Disabled when explicitly set, or , in `linear` mode , when the step
59
- * lies ahead of the active one (you cannot skip forward).
60
- */
61
- this.isDisabled = computed(() => this.disabled() || (this.stepper.linear() && this.state() === 'upcoming'), /* @ts-ignore */
62
- ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
63
- /** @ignore Glyph shown in the marker: own icon, else the completed icon, else the number. */
64
- this.markerIcon = computed(() => {
65
- if (this.icon())
66
- return this.icon();
67
- if (this.state() === 'completed')
68
- return this.stepper.completedIcon() ?? null;
69
- return null;
70
- }, /* @ts-ignore */
71
- ...(ngDevMode ? [{ debugName: "markerIcon" }] : /* istanbul ignore next */ []));
72
- }
73
- /** @ignore */
74
- onClick(event) {
75
- const value = this.value();
76
- if (this.isDisabled() || value === undefined)
77
- return;
78
- this.stepper.updateValue(value, event);
79
- }
80
- /**
81
- * @ignore Horizontal extent of the step, in viewport px: its own box (marker and
82
- * trailing connector) united with its title, which overflows the marker on both sides.
83
- */
84
- extent() {
85
- const own = this.host.nativeElement.getBoundingClientRect();
86
- const title = this.titleEl().nativeElement.getBoundingClientRect();
87
- return { left: Math.min(own.left, title.left), right: Math.max(own.right, title.right) };
88
- }
89
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiStep, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
90
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: UiStep, isStandalone: true, selector: "ui-step", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class._active": "state() === 'active'", "class._completed": "state() === 'completed'", "class._vertical": "stepper.orientation() === 'vertical'", "class._disabled": "isDisabled()", "class._last": "isLastStep()", "class._scrollable": "stepper.isScrollable()" }, classAttribute: "ui-step" }, viewQueries: [{ propertyName: "titleEl", first: true, predicate: ["title"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Horizontal: a real tab in the stepper's own tablist (role=\"tab\" + aria-selected).\n Vertical: the panel sits right under its header inside the same ui-step-item, so the\n stepper cannot be a tablist there without a tab containing its own tabpanel \u2014 invalid ARIA.\n Vertical drops the tab semantics for the accordion pattern instead (aria-expanded, no role),\n matching how ui-step-panel switches its own role the same way (see below). -->\n<button\n #stepBtn\n type=\"button\"\n [attr.role]=\"stepper.orientation() === 'vertical' ? null : 'tab'\"\n class=\"ui-step-header\"\n [id]=\"stepper.stepId(value())\"\n [attr.aria-controls]=\"stepper.panelId(value())\"\n [attr.aria-selected]=\"stepper.orientation() === 'vertical' ? null : state() === 'active'\"\n [attr.aria-expanded]=\"stepper.orientation() === 'vertical' ? state() === 'active' : null\"\n [attr.aria-current]=\"state() === 'active' ? 'step' : null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [disabled]=\"isDisabled()\"\n [attr.tabindex]=\"isDisabled() ? null : stepper.tabindex()\"\n (click)=\"onClick($event)\"\n>\n <span class=\"ui-step-marker\" aria-hidden=\"true\">\n @if (markerIcon(); as name) {\n <ui-icon [name]=\"name\" size=\"default\" />\n } @else {\n {{ number() }}\n }\n </span>\n <span class=\"ui-step-title\">\n <span #title class=\"ui-step-title-text\"><ng-content /></span>\n </span>\n</button>\n\n@if (showSeparator()) {\n <span\n class=\"ui-step-separator\"\n aria-hidden=\"true\"\n [class._completed]=\"separatorCompleted()\"\n ></span>\n}\n", styles: [":host{display:flex;flex:1 1 0;align-items:flex-start;min-width:0}:host._scrollable{flex:1 0 var(--ui-stepper-step-min-width, 7.5rem);padding-block:var(--ui-stepper-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs)))}:host._last{flex:0 0 auto}.ui-step-header{display:inline-flex;flex-direction:column;align-items:center;gap:var(--units-sm);flex:0 0 auto;margin:0;padding:0;border:0;background:transparent;cursor:pointer;text-align:center}.ui-step-header:disabled{cursor:not-allowed}.ui-step-header:focus-visible{outline:none}.ui-step-marker{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-stepper-marker-size, 2.75rem);height:var(--ui-stepper-marker-size, 2.75rem);flex:0 0 auto;border:var(--ui-stepper-marker-stroke-width, var(--stroke-sm)) solid var(--ui-stepper-marker-stroke, var(--navigation-high-stroke-default));border-radius:var(--radius-full);background-color:var(--ui-stepper-marker-surface, var(--navigation-high-surface-default));color:var(--ui-stepper-marker-color, var(--navigation-high-content-default));font-family:var(--ui-stepper-marker-font-family, var(--fontfamily-base));font-weight:var(--ui-stepper-marker-weight, var(--weight-bold));font-size:var(--size-typography-text-default);line-height:1;transition:color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-step-title{width:0;display:flex;justify-content:center;white-space:nowrap;color:var(--ui-stepper-title-color, var(--navigation-high-content-default));font-family:var(--ui-stepper-title-font-family, var(--fontfamily-title));font-size:var(--size-typography-title-sm);line-height:1.2;transition:color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-step-header:focus-visible .ui-step-marker{box-shadow:0 0 0 var(--ui-stepper-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-stepper-marker-focus-ring-color, var(--global-border-focus))}.ui-step-separator{flex:1 1 auto;min-width:var(--units-lg);height:0;margin:calc(var(--ui-stepper-marker-size, 2.75rem) / 2 - var(--ui-stepper-separator-stroke-width, var(--stroke-default)) / 2) var(--units-sm) 0;border-top:var(--ui-stepper-separator-stroke-width, var(--stroke-default)) solid var(--ui-stepper-separator-stroke, var(--global-border-default));transition:border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-step-separator._completed{border-top-color:var(--ui-stepper-separator-stroke-completed, var(--navigation-high-stroke-default))}:host._active .ui-step-marker{background-color:var(--ui-stepper-marker-surface-active, var(--navigation-high-surface-active));border-color:var(--ui-stepper-marker-stroke-active, var(--navigation-high-stroke-active));color:var(--ui-stepper-marker-color-active, var(--informative-defaulthigh-content-default))}:host._active .ui-step-title{color:var(--ui-stepper-title-color-active, var(--global-text-default));font-weight:var(--ui-stepper-title-weight, var(--weight-bold))}:host._completed .ui-step-marker{background-color:var(--ui-stepper-marker-surface-completed, var(--informative-defaulthigh-surface-default));color:var(--ui-stepper-marker-color-completed, var(--informative-defaulthigh-content-default))}.ui-step-header:hover:not(:disabled) .ui-step-marker{background-color:var(--ui-stepper-marker-surface-hover, var(--navigation-high-surface-hover));border-color:var(--ui-stepper-marker-stroke-hover, var(--navigation-high-stroke-hover));color:var(--ui-stepper-marker-color-hover, var(--navigation-high-content-hover))}.ui-step-header:hover:not(:disabled) .ui-step-title{color:var(--ui-stepper-title-color-hover, var(--informative-highlightlow-content-hover))}:host._active .ui-step-header:hover:not(:disabled) .ui-step-marker{background-color:var(--ui-stepper-marker-surface-active-hover, var(--navigation-high-surface-active));border-color:var(--ui-stepper-marker-stroke-hover, var(--navigation-high-stroke-hover))}:host._active .ui-step-header:hover:not(:disabled) .ui-step-title{color:var(--ui-stepper-title-color-hover, var(--informative-highlightlow-content-hover))}:host._completed .ui-step-header:hover:not(:disabled) .ui-step-marker{background-color:var(--ui-stepper-marker-surface-completed-hover, var(--informative-defaulthigh-surface-hover));border-color:var(--ui-stepper-marker-stroke-completed-hover, var(--informative-defaulthigh-stroke-hover));color:var(--ui-stepper-marker-color-completed-hover, var(--informative-defaulthigh-content-hover))}:host._completed .ui-step-header:hover:not(:disabled) .ui-step-title{color:var(--ui-stepper-title-color-completed-hover, var(--informative-defaultlow-content-default))}:host._disabled .ui-step-marker{background-color:var(--ui-stepper-marker-surface-disabled, var(--navigation-high-surface-disabled));border-color:var(--ui-stepper-marker-stroke-disabled, var(--navigation-high-stroke-disabled));color:var(--ui-stepper-marker-color-disabled, var(--navigation-high-content-disabled))}:host._disabled .ui-step-title{color:var(--ui-stepper-title-color-disabled, var(--navigation-high-content-disabled))}:host._vertical{display:block}:host._vertical .ui-step-header{flex-direction:row;align-items:center;gap:var(--units-sm);width:100%;text-align:left}:host._vertical .ui-step-title{width:auto;display:block;white-space:normal}\n"], dependencies: [{ kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }] }); }
91
- }
92
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiStep, decorators: [{
93
- type: Component,
94
- args: [{ selector: 'ui-step', imports: [UiIcon], host: {
95
- class: 'ui-step',
96
- '[class._active]': "state() === 'active'",
97
- '[class._completed]': "state() === 'completed'",
98
- '[class._vertical]': "stepper.orientation() === 'vertical'",
99
- '[class._disabled]': 'isDisabled()',
100
- '[class._last]': 'isLastStep()',
101
- '[class._scrollable]': 'stepper.isScrollable()',
102
- }, template: "<!-- Horizontal: a real tab in the stepper's own tablist (role=\"tab\" + aria-selected).\n Vertical: the panel sits right under its header inside the same ui-step-item, so the\n stepper cannot be a tablist there without a tab containing its own tabpanel \u2014 invalid ARIA.\n Vertical drops the tab semantics for the accordion pattern instead (aria-expanded, no role),\n matching how ui-step-panel switches its own role the same way (see below). -->\n<button\n #stepBtn\n type=\"button\"\n [attr.role]=\"stepper.orientation() === 'vertical' ? null : 'tab'\"\n class=\"ui-step-header\"\n [id]=\"stepper.stepId(value())\"\n [attr.aria-controls]=\"stepper.panelId(value())\"\n [attr.aria-selected]=\"stepper.orientation() === 'vertical' ? null : state() === 'active'\"\n [attr.aria-expanded]=\"stepper.orientation() === 'vertical' ? state() === 'active' : null\"\n [attr.aria-current]=\"state() === 'active' ? 'step' : null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [disabled]=\"isDisabled()\"\n [attr.tabindex]=\"isDisabled() ? null : stepper.tabindex()\"\n (click)=\"onClick($event)\"\n>\n <span class=\"ui-step-marker\" aria-hidden=\"true\">\n @if (markerIcon(); as name) {\n <ui-icon [name]=\"name\" size=\"default\" />\n } @else {\n {{ number() }}\n }\n </span>\n <span class=\"ui-step-title\">\n <span #title class=\"ui-step-title-text\"><ng-content /></span>\n </span>\n</button>\n\n@if (showSeparator()) {\n <span\n class=\"ui-step-separator\"\n aria-hidden=\"true\"\n [class._completed]=\"separatorCompleted()\"\n ></span>\n}\n", styles: [":host{display:flex;flex:1 1 0;align-items:flex-start;min-width:0}:host._scrollable{flex:1 0 var(--ui-stepper-step-min-width, 7.5rem);padding-block:var(--ui-stepper-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs)))}:host._last{flex:0 0 auto}.ui-step-header{display:inline-flex;flex-direction:column;align-items:center;gap:var(--units-sm);flex:0 0 auto;margin:0;padding:0;border:0;background:transparent;cursor:pointer;text-align:center}.ui-step-header:disabled{cursor:not-allowed}.ui-step-header:focus-visible{outline:none}.ui-step-marker{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-stepper-marker-size, 2.75rem);height:var(--ui-stepper-marker-size, 2.75rem);flex:0 0 auto;border:var(--ui-stepper-marker-stroke-width, var(--stroke-sm)) solid var(--ui-stepper-marker-stroke, var(--navigation-high-stroke-default));border-radius:var(--radius-full);background-color:var(--ui-stepper-marker-surface, var(--navigation-high-surface-default));color:var(--ui-stepper-marker-color, var(--navigation-high-content-default));font-family:var(--ui-stepper-marker-font-family, var(--fontfamily-base));font-weight:var(--ui-stepper-marker-weight, var(--weight-bold));font-size:var(--size-typography-text-default);line-height:1;transition:color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-step-title{width:0;display:flex;justify-content:center;white-space:nowrap;color:var(--ui-stepper-title-color, var(--navigation-high-content-default));font-family:var(--ui-stepper-title-font-family, var(--fontfamily-title));font-size:var(--size-typography-title-sm);line-height:1.2;transition:color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-step-header:focus-visible .ui-step-marker{box-shadow:0 0 0 var(--ui-stepper-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-stepper-marker-focus-ring-color, var(--global-border-focus))}.ui-step-separator{flex:1 1 auto;min-width:var(--units-lg);height:0;margin:calc(var(--ui-stepper-marker-size, 2.75rem) / 2 - var(--ui-stepper-separator-stroke-width, var(--stroke-default)) / 2) var(--units-sm) 0;border-top:var(--ui-stepper-separator-stroke-width, var(--stroke-default)) solid var(--ui-stepper-separator-stroke, var(--global-border-default));transition:border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-step-separator._completed{border-top-color:var(--ui-stepper-separator-stroke-completed, var(--navigation-high-stroke-default))}:host._active .ui-step-marker{background-color:var(--ui-stepper-marker-surface-active, var(--navigation-high-surface-active));border-color:var(--ui-stepper-marker-stroke-active, var(--navigation-high-stroke-active));color:var(--ui-stepper-marker-color-active, var(--informative-defaulthigh-content-default))}:host._active .ui-step-title{color:var(--ui-stepper-title-color-active, var(--global-text-default));font-weight:var(--ui-stepper-title-weight, var(--weight-bold))}:host._completed .ui-step-marker{background-color:var(--ui-stepper-marker-surface-completed, var(--informative-defaulthigh-surface-default));color:var(--ui-stepper-marker-color-completed, var(--informative-defaulthigh-content-default))}.ui-step-header:hover:not(:disabled) .ui-step-marker{background-color:var(--ui-stepper-marker-surface-hover, var(--navigation-high-surface-hover));border-color:var(--ui-stepper-marker-stroke-hover, var(--navigation-high-stroke-hover));color:var(--ui-stepper-marker-color-hover, var(--navigation-high-content-hover))}.ui-step-header:hover:not(:disabled) .ui-step-title{color:var(--ui-stepper-title-color-hover, var(--informative-highlightlow-content-hover))}:host._active .ui-step-header:hover:not(:disabled) .ui-step-marker{background-color:var(--ui-stepper-marker-surface-active-hover, var(--navigation-high-surface-active));border-color:var(--ui-stepper-marker-stroke-hover, var(--navigation-high-stroke-hover))}:host._active .ui-step-header:hover:not(:disabled) .ui-step-title{color:var(--ui-stepper-title-color-hover, var(--informative-highlightlow-content-hover))}:host._completed .ui-step-header:hover:not(:disabled) .ui-step-marker{background-color:var(--ui-stepper-marker-surface-completed-hover, var(--informative-defaulthigh-surface-hover));border-color:var(--ui-stepper-marker-stroke-completed-hover, var(--informative-defaulthigh-stroke-hover));color:var(--ui-stepper-marker-color-completed-hover, var(--informative-defaulthigh-content-hover))}:host._completed .ui-step-header:hover:not(:disabled) .ui-step-title{color:var(--ui-stepper-title-color-completed-hover, var(--informative-defaultlow-content-default))}:host._disabled .ui-step-marker{background-color:var(--ui-stepper-marker-surface-disabled, var(--navigation-high-surface-disabled));border-color:var(--ui-stepper-marker-stroke-disabled, var(--navigation-high-stroke-disabled));color:var(--ui-stepper-marker-color-disabled, var(--navigation-high-content-disabled))}:host._disabled .ui-step-title{color:var(--ui-stepper-title-color-disabled, var(--navigation-high-content-disabled))}:host._vertical{display:block}:host._vertical .ui-step-header{flex-direction:row;align-items:center;gap:var(--units-sm);width:100%;text-align:left}:host._vertical .ui-step-title{width:auto;display:block;white-space:normal}\n"] }]
103
- }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], titleEl: [{ type: i0.ViewChild, args: ['title', { isSignal: true }] }] } });
104
- /**
105
- * ui-step-panel , the content region tied to a {@link UiStep} by shared `value`.
106
- *
107
- * The panel stays mounted but is `hidden` (and skipped by assistive tech) when
108
- * inactive, so its state is preserved. With `lazy` the content is rendered only
109
- * once the panel is first activated; wrap expensive content in a
110
- * `<ng-template #content>` so it initialises lazily.
111
- */
112
- class UiStepPanel {
113
- constructor() {
114
- /** Identifier of this panel (matched against the step of the same `value`). */
115
- this.value = model(undefined, /* @ts-ignore */
116
- ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
117
- /** Render this panel's content only once it is first activated (overrides the group default). */
118
- this.lazy = input(undefined, { ...(ngDevMode ? { debugName: "lazy" } : /* istanbul ignore next */ {}), transform: (v) => (v == null ? undefined : booleanAttribute(v)) });
119
- /** Optional lazy content template (`<ng-template #content>`). */
120
- this.content = contentChild('content', /* @ts-ignore */
121
- ...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
122
- /** @ignore Parent container (active state + group `lazy` default). */
123
- this.stepper = inject(UiStepper);
124
- /** @ignore */
125
- this.active = computed(() => this.stepper.isActive(this.value()), /* @ts-ignore */
126
- ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
127
- /** @ignore Panel-level `lazy` overrides the group default when explicitly set. */
128
- this.isLazy = computed(() => this.lazy() ?? this.stepper.lazy(), /* @ts-ignore */
129
- ...(ngDevMode ? [{ debugName: "isLazy" }] : /* istanbul ignore next */ []));
130
- /** @ignore Sticks once the panel has been activated at least once. */
131
- this.hasRendered = signal(false, /* @ts-ignore */
132
- ...(ngDevMode ? [{ debugName: "hasRendered" }] : /* istanbul ignore next */ []));
133
- /** @ignore Eager panels always render; lazy ones only after first activation. */
134
- this.shouldRender = computed(() => !this.isLazy() || this.hasRendered() || this.active(), /* @ts-ignore */
135
- ...(ngDevMode ? [{ debugName: "shouldRender" }] : /* istanbul ignore next */ []));
136
- effect(() => {
137
- if (this.active())
138
- this.hasRendered.set(true);
139
- });
140
- }
141
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiStepPanel, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
142
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: UiStepPanel, isStandalone: true, selector: "ui-step-panel", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "attr.role": "stepper.orientation() === 'vertical' ? 'region' : 'tabpanel'", "id": "stepper.panelId(value())", "attr.aria-labelledby": "stepper.stepId(value())", "attr.tabindex": "active() ? 0 : null", "attr.inert": "active() ? null : ''", "class._active": "active()" }, classAttribute: "ui-step-panel" }, queries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, isSignal: true }], ngImport: i0, template: `
6
+ var UiStep = class UiStep {
7
+ constructor() {
8
+ this.value = model(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
9
+ this.disabled = input(false, {
10
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
11
+ transform: booleanAttribute
12
+ });
13
+ this.icon = input(...ngDevMode ? [void 0, { debugName: "icon" }] : /* istanbul ignore next */ []);
14
+ this.ariaLabel = input(...ngDevMode ? [void 0, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
15
+ this.stepper = inject(UiStepper);
16
+ this.host = inject(ElementRef);
17
+ this.titleEl = viewChild.required("title", ...ngDevMode ? [{ debugName: "titleEl" }] : /* istanbul ignore next */ []);
18
+ this.state = computed(() => this.stepper.stepState(this.value()), ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
19
+ this.number = computed(() => this.stepper.stepNumber(this.value()), ...ngDevMode ? [{ debugName: "number" }] : /* istanbul ignore next */ []);
20
+ this.showSeparator = computed(() => this.stepper.orientation() === "horizontal" && !this.stepper.isLast(this.value()), ...ngDevMode ? [{ debugName: "showSeparator" }] : /* istanbul ignore next */ []);
21
+ this.separatorCompleted = computed(() => this.state() === "completed", ...ngDevMode ? [{ debugName: "separatorCompleted" }] : /* istanbul ignore next */ []);
22
+ this.isLastStep = computed(() => this.stepper.isLast(this.value()), ...ngDevMode ? [{ debugName: "isLastStep" }] : /* istanbul ignore next */ []);
23
+ this.isDisabled = computed(() => this.disabled() || this.stepper.linear() && this.state() === "upcoming", ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
24
+ this.markerIcon = computed(() => {
25
+ if (this.icon()) return this.icon();
26
+ if (this.state() === "completed") return this.stepper.completedIcon() ?? null;
27
+ return null;
28
+ }, ...ngDevMode ? [{ debugName: "markerIcon" }] : /* istanbul ignore next */ []);
29
+ }
30
+ onClick(event) {
31
+ const value = this.value();
32
+ if (this.isDisabled() || value === void 0) return;
33
+ this.stepper.updateValue(value, event);
34
+ }
35
+ extent() {
36
+ const own = this.host.nativeElement.getBoundingClientRect();
37
+ const title = this.titleEl().nativeElement.getBoundingClientRect();
38
+ return {
39
+ left: Math.min(own.left, title.left),
40
+ right: Math.max(own.right, title.right)
41
+ };
42
+ }
43
+ static {
44
+ this.ɵfac = i0.ɵɵngDeclareFactory({
45
+ minVersion: "12.0.0",
46
+ version: "22.3.0",
47
+ ngImport: i0,
48
+ type: UiStep,
49
+ deps: [],
50
+ target: i0.ɵɵFactoryTarget.Component
51
+ });
52
+ }
53
+ static {
54
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
55
+ minVersion: "17.0.0",
56
+ version: "22.3.0",
57
+ type: UiStep,
58
+ isStandalone: true,
59
+ selector: "ui-step",
60
+ inputs: {
61
+ value: {
62
+ classPropertyName: "value",
63
+ publicName: "value",
64
+ isSignal: true,
65
+ isRequired: false,
66
+ transformFunction: null
67
+ },
68
+ disabled: {
69
+ classPropertyName: "disabled",
70
+ publicName: "disabled",
71
+ isSignal: true,
72
+ isRequired: false,
73
+ transformFunction: null
74
+ },
75
+ icon: {
76
+ classPropertyName: "icon",
77
+ publicName: "icon",
78
+ isSignal: true,
79
+ isRequired: false,
80
+ transformFunction: null
81
+ },
82
+ ariaLabel: {
83
+ classPropertyName: "ariaLabel",
84
+ publicName: "ariaLabel",
85
+ isSignal: true,
86
+ isRequired: false,
87
+ transformFunction: null
88
+ }
89
+ },
90
+ outputs: { value: "valueChange" },
91
+ host: {
92
+ properties: {
93
+ "class._active": "state() === 'active'",
94
+ "class._completed": "state() === 'completed'",
95
+ "class._vertical": "stepper.orientation() === 'vertical'",
96
+ "class._disabled": "isDisabled()",
97
+ "class._last": "isLastStep()",
98
+ "class._scrollable": "stepper.isScrollable()"
99
+ },
100
+ classAttribute: "ui-step"
101
+ },
102
+ viewQueries: [{
103
+ propertyName: "titleEl",
104
+ first: true,
105
+ predicate: ["title"],
106
+ descendants: true,
107
+ isSignal: true
108
+ }],
109
+ ngImport: i0,
110
+ template: "<!-- Horizontal: a real tab in the stepper's own tablist (role=\"tab\" + aria-selected).\n Vertical: the panel sits right under its header inside the same ui-step-item, so the\n stepper cannot be a tablist there without a tab containing its own tabpanel — invalid ARIA.\n Vertical drops the tab semantics for the accordion pattern instead (aria-expanded, no role),\n matching how ui-step-panel switches its own role the same way (see below). -->\n<button\n #stepBtn\n type=\"button\"\n [attr.role]=\"stepper.orientation() === 'vertical' ? null : 'tab'\"\n class=\"ui-step-header\"\n [id]=\"stepper.stepId(value())\"\n [attr.aria-controls]=\"stepper.panelId(value())\"\n [attr.aria-selected]=\"stepper.orientation() === 'vertical' ? null : state() === 'active'\"\n [attr.aria-expanded]=\"stepper.orientation() === 'vertical' ? state() === 'active' : null\"\n [attr.aria-current]=\"state() === 'active' ? 'step' : null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [disabled]=\"isDisabled()\"\n [attr.tabindex]=\"isDisabled() ? null : stepper.tabindex()\"\n (click)=\"onClick($event)\"\n>\n <span class=\"ui-step-marker\" aria-hidden=\"true\">\n @if (markerIcon(); as name) {\n <ui-icon [name]=\"name\" size=\"default\" />\n } @else {\n {{ number() }}\n }\n </span>\n <span class=\"ui-step-title\">\n <span #title class=\"ui-step-title-text\"><ng-content /></span>\n </span>\n</button>\n\n@if (showSeparator()) {\n <span\n class=\"ui-step-separator\"\n aria-hidden=\"true\"\n [class._completed]=\"separatorCompleted()\"\n ></span>\n}\n",
111
+ styles: [":host{display:flex;flex:1 1 0;align-items:flex-start;min-width:0}:host._scrollable{flex:1 0 var(--ui-stepper-step-min-width, 7.5rem);padding-block:var(--ui-stepper-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs)))}:host._last{flex:0 0 auto}.ui-step-header{display:inline-flex;flex-direction:column;align-items:center;gap:var(--units-sm);flex:0 0 auto;margin:0;padding:0;border:0;background:transparent;cursor:pointer;text-align:center}.ui-step-header:disabled{cursor:not-allowed}.ui-step-header:focus-visible{outline:none}.ui-step-marker{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-stepper-marker-size, 2.75rem);height:var(--ui-stepper-marker-size, 2.75rem);flex:0 0 auto;border:var(--ui-stepper-marker-stroke-width, var(--stroke-sm)) solid var(--ui-stepper-marker-stroke, var(--navigation-high-stroke-default));border-radius:var(--radius-full);background-color:var(--ui-stepper-marker-surface, var(--navigation-high-surface-default));color:var(--ui-stepper-marker-color, var(--navigation-high-content-default));font-family:var(--ui-stepper-marker-font-family, var(--fontfamily-base));font-weight:var(--ui-stepper-marker-weight, var(--weight-bold));font-size:var(--size-typography-text-default);line-height:1;transition:color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-step-title{width:0;display:flex;justify-content:center;white-space:nowrap;color:var(--ui-stepper-title-color, var(--navigation-high-content-default));font-family:var(--ui-stepper-title-font-family, var(--fontfamily-title));font-size:var(--size-typography-title-sm);line-height:1.2;transition:color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-step-header:focus-visible .ui-step-marker{box-shadow:0 0 0 var(--ui-stepper-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-stepper-marker-focus-ring-color, var(--global-border-focus))}.ui-step-separator{flex:1 1 auto;min-width:var(--units-lg);height:0;margin:calc(var(--ui-stepper-marker-size, 2.75rem) / 2 - var(--ui-stepper-separator-stroke-width, var(--stroke-default)) / 2) var(--units-sm) 0;border-top:var(--ui-stepper-separator-stroke-width, var(--stroke-default)) solid var(--ui-stepper-separator-stroke, var(--global-border-default));transition:border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-step-separator._completed{border-top-color:var(--ui-stepper-separator-stroke-completed, var(--navigation-high-stroke-default))}:host._active .ui-step-marker{background-color:var(--ui-stepper-marker-surface-active, var(--navigation-high-surface-active));border-color:var(--ui-stepper-marker-stroke-active, var(--navigation-high-stroke-active));color:var(--ui-stepper-marker-color-active, var(--informative-defaulthigh-content-default))}:host._active .ui-step-title{color:var(--ui-stepper-title-color-active, var(--global-text-default));font-weight:var(--ui-stepper-title-weight, var(--weight-bold))}:host._completed .ui-step-marker{background-color:var(--ui-stepper-marker-surface-completed, var(--informative-defaulthigh-surface-default));color:var(--ui-stepper-marker-color-completed, var(--informative-defaulthigh-content-default))}.ui-step-header:hover:not(:disabled) .ui-step-marker{background-color:var(--ui-stepper-marker-surface-hover, var(--navigation-high-surface-hover));border-color:var(--ui-stepper-marker-stroke-hover, var(--navigation-high-stroke-hover));color:var(--ui-stepper-marker-color-hover, var(--navigation-high-content-hover))}.ui-step-header:hover:not(:disabled) .ui-step-title{color:var(--ui-stepper-title-color-hover, var(--informative-highlightlow-content-hover))}:host._active .ui-step-header:hover:not(:disabled) .ui-step-marker{background-color:var(--ui-stepper-marker-surface-active-hover, var(--navigation-high-surface-active));border-color:var(--ui-stepper-marker-stroke-hover, var(--navigation-high-stroke-hover))}:host._active .ui-step-header:hover:not(:disabled) .ui-step-title{color:var(--ui-stepper-title-color-hover, var(--informative-highlightlow-content-hover))}:host._completed .ui-step-header:hover:not(:disabled) .ui-step-marker{background-color:var(--ui-stepper-marker-surface-completed-hover, var(--informative-defaulthigh-surface-hover));border-color:var(--ui-stepper-marker-stroke-completed-hover, var(--informative-defaulthigh-stroke-hover));color:var(--ui-stepper-marker-color-completed-hover, var(--informative-defaulthigh-content-hover))}:host._completed .ui-step-header:hover:not(:disabled) .ui-step-title{color:var(--ui-stepper-title-color-completed-hover, var(--informative-defaultlow-content-default))}:host._disabled .ui-step-marker{background-color:var(--ui-stepper-marker-surface-disabled, var(--navigation-high-surface-disabled));border-color:var(--ui-stepper-marker-stroke-disabled, var(--navigation-high-stroke-disabled));color:var(--ui-stepper-marker-color-disabled, var(--navigation-high-content-disabled))}:host._disabled .ui-step-title{color:var(--ui-stepper-title-color-disabled, var(--navigation-high-content-disabled))}:host._vertical{display:block}:host._vertical .ui-step-header{flex-direction:row;align-items:center;gap:var(--units-sm);width:100%;text-align:left}:host._vertical .ui-step-title{width:auto;display:block;white-space:normal}\n"],
112
+ dependencies: [{
113
+ kind: "component",
114
+ type: UiIcon,
115
+ selector: "ui-icon",
116
+ inputs: [
117
+ "name",
118
+ "size",
119
+ "type",
120
+ "family",
121
+ "decorative",
122
+ "ariaLabel"
123
+ ]
124
+ }]
125
+ });
126
+ }
127
+ };
128
+ i0.ɵɵngDeclareClassMetadata({
129
+ minVersion: "12.0.0",
130
+ version: "22.3.0",
131
+ ngImport: i0,
132
+ type: UiStep,
133
+ decorators: [{
134
+ type: Component,
135
+ args: [{
136
+ selector: "ui-step",
137
+ imports: [UiIcon],
138
+ host: {
139
+ class: "ui-step",
140
+ "[class._active]": "state() === 'active'",
141
+ "[class._completed]": "state() === 'completed'",
142
+ "[class._vertical]": "stepper.orientation() === 'vertical'",
143
+ "[class._disabled]": "isDisabled()",
144
+ "[class._last]": "isLastStep()",
145
+ "[class._scrollable]": "stepper.isScrollable()"
146
+ },
147
+ template: "<!-- Horizontal: a real tab in the stepper's own tablist (role=\"tab\" + aria-selected).\n Vertical: the panel sits right under its header inside the same ui-step-item, so the\n stepper cannot be a tablist there without a tab containing its own tabpanel — invalid ARIA.\n Vertical drops the tab semantics for the accordion pattern instead (aria-expanded, no role),\n matching how ui-step-panel switches its own role the same way (see below). -->\n<button\n #stepBtn\n type=\"button\"\n [attr.role]=\"stepper.orientation() === 'vertical' ? null : 'tab'\"\n class=\"ui-step-header\"\n [id]=\"stepper.stepId(value())\"\n [attr.aria-controls]=\"stepper.panelId(value())\"\n [attr.aria-selected]=\"stepper.orientation() === 'vertical' ? null : state() === 'active'\"\n [attr.aria-expanded]=\"stepper.orientation() === 'vertical' ? state() === 'active' : null\"\n [attr.aria-current]=\"state() === 'active' ? 'step' : null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [disabled]=\"isDisabled()\"\n [attr.tabindex]=\"isDisabled() ? null : stepper.tabindex()\"\n (click)=\"onClick($event)\"\n>\n <span class=\"ui-step-marker\" aria-hidden=\"true\">\n @if (markerIcon(); as name) {\n <ui-icon [name]=\"name\" size=\"default\" />\n } @else {\n {{ number() }}\n }\n </span>\n <span class=\"ui-step-title\">\n <span #title class=\"ui-step-title-text\"><ng-content /></span>\n </span>\n</button>\n\n@if (showSeparator()) {\n <span\n class=\"ui-step-separator\"\n aria-hidden=\"true\"\n [class._completed]=\"separatorCompleted()\"\n ></span>\n}\n",
148
+ styles: [":host{display:flex;flex:1 1 0;align-items:flex-start;min-width:0}:host._scrollable{flex:1 0 var(--ui-stepper-step-min-width, 7.5rem);padding-block:var(--ui-stepper-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs)))}:host._last{flex:0 0 auto}.ui-step-header{display:inline-flex;flex-direction:column;align-items:center;gap:var(--units-sm);flex:0 0 auto;margin:0;padding:0;border:0;background:transparent;cursor:pointer;text-align:center}.ui-step-header:disabled{cursor:not-allowed}.ui-step-header:focus-visible{outline:none}.ui-step-marker{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-stepper-marker-size, 2.75rem);height:var(--ui-stepper-marker-size, 2.75rem);flex:0 0 auto;border:var(--ui-stepper-marker-stroke-width, var(--stroke-sm)) solid var(--ui-stepper-marker-stroke, var(--navigation-high-stroke-default));border-radius:var(--radius-full);background-color:var(--ui-stepper-marker-surface, var(--navigation-high-surface-default));color:var(--ui-stepper-marker-color, var(--navigation-high-content-default));font-family:var(--ui-stepper-marker-font-family, var(--fontfamily-base));font-weight:var(--ui-stepper-marker-weight, var(--weight-bold));font-size:var(--size-typography-text-default);line-height:1;transition:color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-step-title{width:0;display:flex;justify-content:center;white-space:nowrap;color:var(--ui-stepper-title-color, var(--navigation-high-content-default));font-family:var(--ui-stepper-title-font-family, var(--fontfamily-title));font-size:var(--size-typography-title-sm);line-height:1.2;transition:color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-step-header:focus-visible .ui-step-marker{box-shadow:0 0 0 var(--ui-stepper-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-stepper-marker-focus-ring-color, var(--global-border-focus))}.ui-step-separator{flex:1 1 auto;min-width:var(--units-lg);height:0;margin:calc(var(--ui-stepper-marker-size, 2.75rem) / 2 - var(--ui-stepper-separator-stroke-width, var(--stroke-default)) / 2) var(--units-sm) 0;border-top:var(--ui-stepper-separator-stroke-width, var(--stroke-default)) solid var(--ui-stepper-separator-stroke, var(--global-border-default));transition:border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-step-separator._completed{border-top-color:var(--ui-stepper-separator-stroke-completed, var(--navigation-high-stroke-default))}:host._active .ui-step-marker{background-color:var(--ui-stepper-marker-surface-active, var(--navigation-high-surface-active));border-color:var(--ui-stepper-marker-stroke-active, var(--navigation-high-stroke-active));color:var(--ui-stepper-marker-color-active, var(--informative-defaulthigh-content-default))}:host._active .ui-step-title{color:var(--ui-stepper-title-color-active, var(--global-text-default));font-weight:var(--ui-stepper-title-weight, var(--weight-bold))}:host._completed .ui-step-marker{background-color:var(--ui-stepper-marker-surface-completed, var(--informative-defaulthigh-surface-default));color:var(--ui-stepper-marker-color-completed, var(--informative-defaulthigh-content-default))}.ui-step-header:hover:not(:disabled) .ui-step-marker{background-color:var(--ui-stepper-marker-surface-hover, var(--navigation-high-surface-hover));border-color:var(--ui-stepper-marker-stroke-hover, var(--navigation-high-stroke-hover));color:var(--ui-stepper-marker-color-hover, var(--navigation-high-content-hover))}.ui-step-header:hover:not(:disabled) .ui-step-title{color:var(--ui-stepper-title-color-hover, var(--informative-highlightlow-content-hover))}:host._active .ui-step-header:hover:not(:disabled) .ui-step-marker{background-color:var(--ui-stepper-marker-surface-active-hover, var(--navigation-high-surface-active));border-color:var(--ui-stepper-marker-stroke-hover, var(--navigation-high-stroke-hover))}:host._active .ui-step-header:hover:not(:disabled) .ui-step-title{color:var(--ui-stepper-title-color-hover, var(--informative-highlightlow-content-hover))}:host._completed .ui-step-header:hover:not(:disabled) .ui-step-marker{background-color:var(--ui-stepper-marker-surface-completed-hover, var(--informative-defaulthigh-surface-hover));border-color:var(--ui-stepper-marker-stroke-completed-hover, var(--informative-defaulthigh-stroke-hover));color:var(--ui-stepper-marker-color-completed-hover, var(--informative-defaulthigh-content-hover))}:host._completed .ui-step-header:hover:not(:disabled) .ui-step-title{color:var(--ui-stepper-title-color-completed-hover, var(--informative-defaultlow-content-default))}:host._disabled .ui-step-marker{background-color:var(--ui-stepper-marker-surface-disabled, var(--navigation-high-surface-disabled));border-color:var(--ui-stepper-marker-stroke-disabled, var(--navigation-high-stroke-disabled));color:var(--ui-stepper-marker-color-disabled, var(--navigation-high-content-disabled))}:host._disabled .ui-step-title{color:var(--ui-stepper-title-color-disabled, var(--navigation-high-content-disabled))}:host._vertical{display:block}:host._vertical .ui-step-header{flex-direction:row;align-items:center;gap:var(--units-sm);width:100%;text-align:left}:host._vertical .ui-step-title{width:auto;display:block;white-space:normal}\n"]
149
+ }]
150
+ }],
151
+ propDecorators: {
152
+ value: [{
153
+ type: i0.Input,
154
+ args: [{
155
+ isSignal: true,
156
+ alias: "value",
157
+ required: false
158
+ }]
159
+ }, {
160
+ type: i0.Output,
161
+ args: ["valueChange"]
162
+ }],
163
+ disabled: [{
164
+ type: i0.Input,
165
+ args: [{
166
+ isSignal: true,
167
+ alias: "disabled",
168
+ required: false
169
+ }]
170
+ }],
171
+ icon: [{
172
+ type: i0.Input,
173
+ args: [{
174
+ isSignal: true,
175
+ alias: "icon",
176
+ required: false
177
+ }]
178
+ }],
179
+ ariaLabel: [{
180
+ type: i0.Input,
181
+ args: [{
182
+ isSignal: true,
183
+ alias: "ariaLabel",
184
+ required: false
185
+ }]
186
+ }],
187
+ titleEl: [{
188
+ type: i0.ViewChild,
189
+ args: ["title", { isSignal: true }]
190
+ }]
191
+ }
192
+ });
193
+ var UiStepPanel = class UiStepPanel {
194
+ constructor() {
195
+ this.value = model(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
196
+ this.lazy = input(void 0, {
197
+ ...ngDevMode ? { debugName: "lazy" } : /* istanbul ignore next */ {},
198
+ transform: (v) => v == null ? void 0 : booleanAttribute(v)
199
+ });
200
+ this.content = contentChild("content", ...ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []);
201
+ this.stepper = inject(UiStepper);
202
+ this.active = computed(() => this.stepper.isActive(this.value()), ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
203
+ this.isLazy = computed(() => this.lazy() ?? this.stepper.lazy(), ...ngDevMode ? [{ debugName: "isLazy" }] : /* istanbul ignore next */ []);
204
+ this.hasRendered = signal(false, ...ngDevMode ? [{ debugName: "hasRendered" }] : /* istanbul ignore next */ []);
205
+ this.shouldRender = computed(() => !this.isLazy() || this.hasRendered() || this.active(), ...ngDevMode ? [{ debugName: "shouldRender" }] : /* istanbul ignore next */ []);
206
+ effect(() => {
207
+ if (this.active()) this.hasRendered.set(true);
208
+ });
209
+ }
210
+ static {
211
+ this.ɵfac = i0.ɵɵngDeclareFactory({
212
+ minVersion: "12.0.0",
213
+ version: "22.3.0",
214
+ ngImport: i0,
215
+ type: UiStepPanel,
216
+ deps: [],
217
+ target: i0.ɵɵFactoryTarget.Component
218
+ });
219
+ }
220
+ static {
221
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
222
+ minVersion: "17.0.0",
223
+ version: "22.3.0",
224
+ type: UiStepPanel,
225
+ isStandalone: true,
226
+ selector: "ui-step-panel",
227
+ inputs: {
228
+ value: {
229
+ classPropertyName: "value",
230
+ publicName: "value",
231
+ isSignal: true,
232
+ isRequired: false,
233
+ transformFunction: null
234
+ },
235
+ lazy: {
236
+ classPropertyName: "lazy",
237
+ publicName: "lazy",
238
+ isSignal: true,
239
+ isRequired: false,
240
+ transformFunction: null
241
+ }
242
+ },
243
+ outputs: { value: "valueChange" },
244
+ host: {
245
+ properties: {
246
+ "attr.role": "stepper.orientation() === 'vertical' ? 'region' : 'tabpanel'",
247
+ "id": "stepper.panelId(value())",
248
+ "attr.aria-labelledby": "stepper.stepId(value())",
249
+ "attr.tabindex": "active() ? 0 : null",
250
+ "attr.inert": "active() ? null : ''",
251
+ "class._active": "active()"
252
+ },
253
+ classAttribute: "ui-step-panel"
254
+ },
255
+ queries: [{
256
+ propertyName: "content",
257
+ first: true,
258
+ predicate: ["content"],
259
+ descendants: true,
260
+ isSignal: true
261
+ }],
262
+ ngImport: i0,
263
+ template: `
143
264
  <ng-template #defaultContent><ng-content /></ng-template>
144
265
  <div
145
266
  class="ui-step-panel-collapse"
@@ -154,11 +275,33 @@ class UiStepPanel {
154
275
  </div>
155
276
  </div>
156
277
  </div>
157
- `, isInline: true, styles: [":host{display:block;color:var(--ui-stepper-panel-color, var(--global-text-default));font-family:var(--ui-stepper-panel-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);line-height:1.5;outline:none}.ui-step-panel-collapse{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows var(--ui-motion-duration, var(--motion-toggle-duration, var(--transition-default))) var(--ui-motion-easing, var(--motion-toggle-easing, var(--transition-easeinout))) var(--ui-motion-delay, 0ms),opacity var(--ui-motion-duration, var(--motion-toggle-duration, var(--transition-default))) var(--ui-motion-easing, var(--motion-toggle-easing, var(--transition-easeinout))) var(--ui-motion-delay, 0ms)}.ui-step-panel-collapse._open{grid-template-rows:1fr;opacity:1}.ui-step-panel-collapse._no-motion{transition:none}@media(prefers-reduced-motion:reduce){.ui-step-panel-collapse{transition-duration:.01ms}}:root[data-motion=off] .ui-step-panel-collapse{transition-duration:.01ms}.ui-step-panel-inner{overflow:hidden;min-height:0}.ui-step-panel-body{padding:var(--units-default) 0}:host-context(.ui-stepper._vertical){margin-left:calc(var(--ui-stepper-marker-size, 2.75rem) + var(--units-sm))}:host-context(.ui-stepper._vertical) .ui-step-panel-body{padding:var(--units-sm) 0 var(--units-md)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
158
- }
159
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiStepPanel, decorators: [{
160
- type: Component,
161
- args: [{ selector: 'ui-step-panel', imports: [NgTemplateOutlet], template: `
278
+ `,
279
+ isInline: true,
280
+ styles: [":host{display:block;color:var(--ui-stepper-panel-color, var(--global-text-default));font-family:var(--ui-stepper-panel-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);line-height:1.5;outline:none}.ui-step-panel-collapse{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows var(--ui-motion-duration, var(--motion-toggle-duration, var(--transition-default))) var(--ui-motion-easing, var(--motion-toggle-easing, var(--transition-easeinout))) var(--ui-motion-delay, 0ms),opacity var(--ui-motion-duration, var(--motion-toggle-duration, var(--transition-default))) var(--ui-motion-easing, var(--motion-toggle-easing, var(--transition-easeinout))) var(--ui-motion-delay, 0ms)}.ui-step-panel-collapse._open{grid-template-rows:1fr;opacity:1}.ui-step-panel-collapse._no-motion{transition:none}@media(prefers-reduced-motion:reduce){.ui-step-panel-collapse{transition-duration:.01ms}}:root[data-motion=off] .ui-step-panel-collapse{transition-duration:.01ms}.ui-step-panel-inner{overflow:hidden;min-height:0}.ui-step-panel-body{padding:var(--units-default) 0}:host-context(.ui-stepper._vertical){margin-left:calc(var(--ui-stepper-marker-size, 2.75rem) + var(--units-sm))}:host-context(.ui-stepper._vertical) .ui-step-panel-body{padding:var(--units-sm) 0 var(--units-md)}\n"],
281
+ dependencies: [{
282
+ kind: "directive",
283
+ type: NgTemplateOutlet,
284
+ selector: "[ngTemplateOutlet]",
285
+ inputs: [
286
+ "ngTemplateOutletContext",
287
+ "ngTemplateOutlet",
288
+ "ngTemplateOutletInjector"
289
+ ]
290
+ }]
291
+ });
292
+ }
293
+ };
294
+ i0.ɵɵngDeclareClassMetadata({
295
+ minVersion: "12.0.0",
296
+ version: "22.3.0",
297
+ ngImport: i0,
298
+ type: UiStepPanel,
299
+ decorators: [{
300
+ type: Component,
301
+ args: [{
302
+ selector: "ui-step-panel",
303
+ imports: [NgTemplateOutlet],
304
+ template: `
162
305
  <ng-template #defaultContent><ng-content /></ng-template>
163
306
  <div
164
307
  class="ui-step-panel-collapse"
@@ -173,328 +316,630 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
173
316
  </div>
174
317
  </div>
175
318
  </div>
176
- `, host: {
177
- class: 'ui-step-panel',
178
- // Horizontal: a real tabpanel, owned by the stepper's tablist (see ui-step.html).
179
- // Vertical: role="region" instead — matching its header's accordion pattern
180
- // (ui-accordion-panel uses the same role+aria-labelledby pairing) — a tabpanel
181
- // with no tablist ancestor is invalid ARIA, and the vertical layout has none.
182
- '[attr.role]': "stepper.orientation() === 'vertical' ? 'region' : 'tabpanel'",
183
- '[id]': 'stepper.panelId(value())',
184
- '[attr.aria-labelledby]': 'stepper.stepId(value())',
185
- '[attr.tabindex]': 'active() ? 0 : null',
186
- '[attr.inert]': "active() ? null : ''",
187
- '[class._active]': 'active()',
188
- }, styles: [":host{display:block;color:var(--ui-stepper-panel-color, var(--global-text-default));font-family:var(--ui-stepper-panel-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);line-height:1.5;outline:none}.ui-step-panel-collapse{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows var(--ui-motion-duration, var(--motion-toggle-duration, var(--transition-default))) var(--ui-motion-easing, var(--motion-toggle-easing, var(--transition-easeinout))) var(--ui-motion-delay, 0ms),opacity var(--ui-motion-duration, var(--motion-toggle-duration, var(--transition-default))) var(--ui-motion-easing, var(--motion-toggle-easing, var(--transition-easeinout))) var(--ui-motion-delay, 0ms)}.ui-step-panel-collapse._open{grid-template-rows:1fr;opacity:1}.ui-step-panel-collapse._no-motion{transition:none}@media(prefers-reduced-motion:reduce){.ui-step-panel-collapse{transition-duration:.01ms}}:root[data-motion=off] .ui-step-panel-collapse{transition-duration:.01ms}.ui-step-panel-inner{overflow:hidden;min-height:0}.ui-step-panel-body{padding:var(--units-default) 0}:host-context(.ui-stepper._vertical){margin-left:calc(var(--ui-stepper-marker-size, 2.75rem) + var(--units-sm))}:host-context(.ui-stepper._vertical) .ui-step-panel-body{padding:var(--units-sm) 0 var(--units-md)}\n"] }]
189
- }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], content: [{ type: i0.ContentChild, args: ['content', { isSignal: true }] }] } });
190
- /**
191
- * ui-step-list , the horizontal strip of {@link UiStep} headers.
192
- *
193
- * Owns the WAI-ARIA `role="tablist"`. Focus moves through the headers with
194
- * `Tab` (each enabled header is a native tab stop); activation is `Enter` /
195
- * `Space` (native `<button>`). Use it on its own , without panels , for a plain
196
- * progress indicator ("steps only"). When the container is `scrollable`, the
197
- * list itself is the scroll viewport and keeps the active step in view.
198
- */
199
- class UiStepList {
200
- constructor() {
201
- /** Accessible name for the step list (recommended). */
202
- this.ariaLabel = input(/* @ts-ignore */
203
- ...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
204
- /** @ignore Parent container (active value + `scrollable` option). */
205
- this.stepper = inject(UiStepper);
206
- /** @ignore The scroll viewport, when `scrollable`. */
207
- this.host = inject(ElementRef);
208
- /** @ignore Steps projected into this list, in DOM order. */
209
- this.steps = contentChildren(UiStep, /* @ts-ignore */
210
- ...(ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []));
211
- /** @ignore Bumped by the ResizeObserver: a new width may clip the active step. */
212
- this.resizeTick = signal(0, /* @ts-ignore */
213
- ...(ngDevMode ? [{ debugName: "resizeTick" }] : /* istanbul ignore next */ []));
214
- /** @ignore Whether the strip has been measured once (the first reveal does not animate). */
215
- this.settled = false;
216
- // Observe the strip only while it scrolls. The guard also keeps consumers' jsdom
217
- // unit tests working: jsdom has no ResizeObserver.
218
- afterRenderEffect((onCleanup) => {
219
- if (!this.stepper.isScrollable() || typeof ResizeObserver === 'undefined')
220
- return;
221
- const ro = new ResizeObserver(() => this.resizeTick.update((v) => v + 1));
222
- ro.observe(this.host.nativeElement);
223
- onCleanup(() => ro.disconnect());
224
- });
225
- // Keep the active step in view: on activation, on first layout and on resize.
226
- afterRenderEffect(() => {
227
- this.resizeTick();
228
- if (!this.stepper.isScrollable())
229
- return;
230
- const value = this.stepper.value();
231
- const step = this.steps().find((s) => s.value() === value);
232
- if (!step)
233
- return;
234
- // Only a change of step animates: the first reveal and a resize jump straight there.
235
- const animate = this.settled && this.shownValue !== value;
236
- if (this.reveal(step, animate)) {
237
- this.settled = true;
238
- this.shownValue = value;
239
- }
240
- });
241
- }
242
- /**
243
- * @ignore Scroll the strip by the minimum that brings the step fully into view, nothing
244
- * when it already is. Measured against the strip itself: unlike `scrollIntoView()`, it
245
- * never scrolls the page. Returns `false` while the strip is not laid out yet.
246
- */
247
- reveal(step, animate) {
248
- const strip = this.host.nativeElement;
249
- const width = strip.clientWidth;
250
- if (width === 0)
251
- return false;
252
- const origin = strip.getBoundingClientRect().left + strip.clientLeft;
253
- const { left, right } = step.extent();
254
- const start = left - origin;
255
- const end = right - origin;
256
- let delta = 0;
257
- if (start < -1) {
258
- delta = start; // clipped at the start edge: align its start.
259
- }
260
- else if (end > width + 1) {
261
- delta = Math.min(end - width, start); // clipped at the end: align its end, keep its start.
262
- }
263
- if (delta !== 0) {
264
- // `auto` defers to the CSS `scroll-behavior`: smooth, or instant under reduced motion
265
- // and `[motion]="false"`.
266
- strip.scrollTo({ left: strip.scrollLeft + delta, behavior: animate ? 'auto' : 'instant' });
267
- }
268
- return true;
269
- }
270
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiStepList, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
271
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.7", type: UiStepList, isStandalone: true, selector: "ui-step-list", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "tablist", "aria-orientation": "horizontal" }, properties: { "attr.aria-label": "ariaLabel() || null", "class._scrollable": "stepper.isScrollable()", "class._no-motion": "!stepper.motion()" }, classAttribute: "ui-step-list" }, queries: [{ propertyName: "steps", predicate: UiStep, isSignal: true }], ngImport: i0, template: '<ng-content />', isInline: true, styles: [":host{display:flex;flex-direction:row;align-items:flex-start;width:100%;min-width:0}:host._scrollable{box-sizing:border-box;overflow-x:auto;overflow-y:hidden;padding-inline:calc((var(--ui-stepper-step-min-width, 7.5rem) - var(--ui-stepper-marker-size, 2.75rem)) / 2);scroll-behavior:smooth;scrollbar-width:none}:host._scrollable::-webkit-scrollbar{display:none}@media(prefers-reduced-motion:reduce){:host._scrollable{scroll-behavior:auto}}:root[data-motion=off] :host._scrollable{scroll-behavior:auto}:host._scrollable._no-motion{scroll-behavior:auto}\n"] }); }
272
- }
273
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiStepList, decorators: [{
274
- type: Component,
275
- args: [{ selector: 'ui-step-list', template: '<ng-content />', host: {
276
- class: 'ui-step-list',
277
- role: 'tablist',
278
- 'aria-orientation': 'horizontal',
279
- '[attr.aria-label]': 'ariaLabel() || null',
280
- '[class._scrollable]': 'stepper.isScrollable()',
281
- '[class._no-motion]': '!stepper.motion()',
282
- }, styles: [":host{display:flex;flex-direction:row;align-items:flex-start;width:100%;min-width:0}:host._scrollable{box-sizing:border-box;overflow-x:auto;overflow-y:hidden;padding-inline:calc((var(--ui-stepper-step-min-width, 7.5rem) - var(--ui-stepper-marker-size, 2.75rem)) / 2);scroll-behavior:smooth;scrollbar-width:none}:host._scrollable::-webkit-scrollbar{display:none}@media(prefers-reduced-motion:reduce){:host._scrollable{scroll-behavior:auto}}:root[data-motion=off] :host._scrollable{scroll-behavior:auto}:host._scrollable._no-motion{scroll-behavior:auto}\n"] }]
283
- }], ctorParameters: () => [], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], steps: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => UiStep), { isSignal: true }] }] } });
284
- /**
285
- * ui-step-panels , thin wrapper grouping the {@link UiStepPanel}s below the
286
- * horizontal step list.
287
- */
288
- class UiStepPanels {
289
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiStepPanels, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
290
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.7", type: UiStepPanels, isStandalone: true, selector: "ui-step-panels", host: { classAttribute: "ui-step-panels" }, ngImport: i0, template: '<ng-content />', isInline: true, styles: [":host{display:block;width:100%}\n"] }); }
291
- }
292
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiStepPanels, decorators: [{
293
- type: Component,
294
- args: [{ selector: 'ui-step-panels', template: '<ng-content />', host: { class: 'ui-step-panels' }, styles: [":host{display:block;width:100%}\n"] }]
295
- }] });
296
- /**
297
- * ui-step-item , vertical wrapper pairing a {@link UiStep} with its
298
- * {@link UiStepPanel}. Carries the shared `value` and propagates it to both
299
- * children, so the vertical markup stays terse. The connector rail is drawn by
300
- * the item itself, alongside the panel.
301
- */
302
- class UiStepItem {
303
- constructor() {
304
- /** Identifier shared by the wrapped step and panel. */
305
- this.value = input.required(/* @ts-ignore */
306
- ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
307
- /** @ignore Parent container. */
308
- this.stepper = inject(UiStepper);
309
- /** @ignore Wrapped step (value propagated from this item). */
310
- this.step = contentChild(UiStep, /* @ts-ignore */
311
- ...(ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []));
312
- /** @ignore Wrapped panel (value propagated from this item). */
313
- this.panel = contentChild(UiStepPanel, /* @ts-ignore */
314
- ...(ngDevMode ? [{ debugName: "panel" }] : /* istanbul ignore next */ []));
315
- /** @ignore Progression state (drives the connector colour). */
316
- this.state = computed(() => this.stepper.stepState(this.value()), /* @ts-ignore */
317
- ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
318
- /** @ignore Last item hides its connector rail. */
319
- this.isLast = computed(() => this.stepper.isLast(this.value()), /* @ts-ignore */
320
- ...(ngDevMode ? [{ debugName: "isLast" }] : /* istanbul ignore next */ []));
321
- // Propagate the item value down to the wrapped step and panel.
322
- effect(() => {
323
- this.step()?.value.set(this.value());
324
- this.panel()?.value.set(this.value());
325
- });
326
- }
327
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiStepItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
328
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.7", type: UiStepItem, isStandalone: true, selector: "ui-step-item", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class._active": "state() === 'active'", "class._completed": "state() === 'completed'", "class._last": "isLast()" }, classAttribute: "ui-step-item" }, queries: [{ propertyName: "step", first: true, predicate: UiStep, descendants: true, isSignal: true }, { propertyName: "panel", first: true, predicate: UiStepPanel, descendants: true, isSignal: true }], ngImport: i0, template: '<ng-content />', isInline: true, styles: [":host{display:block;position:relative;padding-bottom:var(--units-lg)}:host._last{padding-bottom:0}:host:not(._last):before{content:\"\";position:absolute;left:calc(var(--ui-stepper-marker-size, 2.75rem) / 2 - var(--ui-stepper-rail-stroke-width, var(--stroke-default)) / 2);top:calc(var(--ui-stepper-marker-size, 2.75rem) + var(--units-xs));bottom:0;width:var(--ui-stepper-rail-stroke-width, var(--stroke-default));background-color:var(--ui-stepper-rail-surface, var(--global-border-default))}:host._completed:not(._last):before{background-color:var(--ui-stepper-rail-surface-completed, var(--navigation-high-stroke-default))}\n"] }); }
329
- }
330
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiStepItem, decorators: [{
331
- type: Component,
332
- args: [{ selector: 'ui-step-item', template: '<ng-content />', host: {
333
- class: 'ui-step-item',
334
- '[class._active]': "state() === 'active'",
335
- '[class._completed]': "state() === 'completed'",
336
- '[class._last]': 'isLast()',
337
- }, styles: [":host{display:block;position:relative;padding-bottom:var(--units-lg)}:host._last{padding-bottom:0}:host:not(._last):before{content:\"\";position:absolute;left:calc(var(--ui-stepper-marker-size, 2.75rem) / 2 - var(--ui-stepper-rail-stroke-width, var(--stroke-default)) / 2);top:calc(var(--ui-stepper-marker-size, 2.75rem) + var(--units-xs));bottom:0;width:var(--ui-stepper-rail-stroke-width, var(--stroke-default));background-color:var(--ui-stepper-rail-surface, var(--global-border-default))}:host._completed:not(._last):before{background-color:var(--ui-stepper-rail-surface-completed, var(--navigation-high-stroke-default))}\n"] }]
338
- }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], step: [{ type: i0.ContentChild, args: [i0.forwardRef(() => UiStep), { isSignal: true }] }], panel: [{ type: i0.ContentChild, args: [i0.forwardRef(() => UiStepPanel), { isSignal: true }] }] } });
339
- /**
340
- * ui-stepper , headless container guiding a user through a numbered, multi-step
341
- * progression (wizard). Composition API mirroring `ui-tabs`.
342
- *
343
- * Two layouts. **Horizontal**: a `ui-step-list` of `ui-step` headers on top and
344
- * a `ui-step-panels` holding one `ui-step-panel` per step below (each step and
345
- * its panel paired by `value`). **Vertical**: each `ui-step-item` wraps a
346
- * `ui-step` and its `ui-step-panel`, so the panel appears directly beneath its
347
- * header. With `linear`, steps ahead of the active one are disabled , advance by
348
- * setting `value` (e.g. a "Next" button in the panel). Every colour/metric comes
349
- * from the `navigation.*` / `informative.*` design tokens; the active panel
350
- * fades in via the shared motion system (reduced-motion aware).
351
- *
352
- * @example
353
- * ```html
354
- * <ui-stepper [(value)]="active">
355
- * <ui-step-list ariaLabel="Étapes">
356
- * <ui-step [value]="1">Compte</ui-step>
357
- * <ui-step [value]="2">Profil</ui-step>
358
- * <ui-step [value]="3">Confirmation</ui-step>
359
- * </ui-step-list>
360
- * <ui-step-panels>
361
- * <ui-step-panel [value]="1">…</ui-step-panel>
362
- * <ui-step-panel [value]="2">…</ui-step-panel>
363
- * <ui-step-panel [value]="3">…</ui-step-panel>
364
- * </ui-step-panels>
365
- * </ui-stepper>
366
- * ```
367
- */
368
- class UiStepper {
369
- constructor() {
370
- /** Value of the active step (two-way). `undefined` = no active step. */
371
- this.value = model(undefined, /* @ts-ignore */
372
- ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
373
- /** Layout axis: `horizontal` (list on top, panels below) or `vertical`. */
374
- this.orientation = input('horizontal', /* @ts-ignore */
375
- ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
376
- /** When `true`, steps ahead of the active one are disabled (no skipping forward). */
377
- this.linear = input(false, { ...(ngDevMode ? { debugName: "linear" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
378
- /** Group default: render an inactive panel's content only once it is first activated. */
379
- this.lazy = input(false, { ...(ngDevMode ? { debugName: "lazy" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
380
- /**
381
- * Horizontal only: steps keep a minimum width and the step list scrolls instead of
382
- * squeezing them, following the active step.
383
- */
384
- this.scrollable = input(false, { ...(ngDevMode ? { debugName: "scrollable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
385
- /** Animate the active panel transition (reduced-motion always wins). */
386
- this.motion = input(true, { ...(ngDevMode ? { debugName: "motion" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
387
- /** Icon shown in the marker of completed steps (falls back to the step number). */
388
- this.completedIcon = input(/* @ts-ignore */
389
- ...(ngDevMode ? [undefined, { debugName: "completedIcon" }] : /* istanbul ignore next */ []));
390
- /** Accessible name for the container (used as `aria-label` in vertical layout). */
391
- this.ariaLabel = input(/* @ts-ignore */
392
- ...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
393
- /** Tabindex applied to each enabled step header. */
394
- this.tabindex = input(0, { ...(ngDevMode ? { debugName: "tabindex" } : /* istanbul ignore next */ {}), transform: numberAttribute });
395
- /** Fired whenever the active step changes (user click / keyboard). */
396
- this.stepChange = output();
397
- /** @ignore Unique id root for aria wiring between steps and panels. */
398
- this.id = `ui-stepper-${nextUid++}`;
399
- /** @ignore All steps projected under this container, in DOM order. */
400
- this.steps = contentChildren(forwardRef(() => UiStep), { ...(ngDevMode ? { debugName: "steps" } : /* istanbul ignore next */ {}), descendants: true });
401
- /** @ignore All panels projected under this container — a stepper used as a plain "steps only"
402
- * progress indicator (see `UiStepList` doc) has none at all: `aria-controls` must not point
403
- * at an id that resolves to nothing. */
404
- this.panels = contentChildren(forwardRef(() => UiStepPanel), { ...(ngDevMode ? { debugName: "panels" } : /* istanbul ignore next */ {}), descendants: true });
405
- /** @ignore `scrollable` applies to the horizontal strip only. */
406
- this.isScrollable = computed(() => this.scrollable() && this.orientation() === 'horizontal', /* @ts-ignore */
407
- ...(ngDevMode ? [{ debugName: "isScrollable" }] : /* istanbul ignore next */ []));
408
- /** @ignore Ordered step values (the progression sequence). */
409
- this.orderedValues = computed(() => this.steps().map((s) => s.value()), /* @ts-ignore */
410
- ...(ngDevMode ? [{ debugName: "orderedValues" }] : /* istanbul ignore next */ []));
411
- /** @ignore Index of the active step in the ordered sequence (-1 when none). */
412
- this.activeIndex = computed(() => this.orderedValues().indexOf(this.value()), /* @ts-ignore */
413
- ...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
414
- }
415
- /** @ignore id of the step header for a given value. */
416
- stepId(value) {
417
- return `${this.id}-step-${value}`;
418
- }
419
- /** @ignore id of the panel for a given value — `null` when that panel is not actually
420
- * rendered (see `panels` above), so the step omits `aria-controls` rather than dangle it. */
421
- panelId(value) {
422
- return this.panels().some((p) => p.value() === value) ? `${this.id}-panel-${value}` : null;
423
- }
424
- /** @ignore Whether the given value is the active step. */
425
- isActive(value) {
426
- return value !== undefined && this.value() === value;
427
- }
428
- /** @ignore 1-based position of a step in the progression (0 when unknown). */
429
- stepNumber(value) {
430
- return this.orderedValues().indexOf(value) + 1;
431
- }
432
- /** @ignore Whether the given value is the last step in the sequence. */
433
- isLast(value) {
434
- const values = this.orderedValues();
435
- return values.length > 0 && values[values.length - 1] === value;
436
- }
437
- /**
438
- * @ignore Progression state of a step: before the active one → `completed`,
439
- * the active one → `active`, after it → `upcoming`.
440
- */
441
- stepState(value) {
442
- const index = this.orderedValues().indexOf(value);
443
- const active = this.activeIndex();
444
- if (index === -1 || active === -1)
445
- return 'upcoming';
446
- if (index < active)
447
- return 'completed';
448
- if (index === active)
449
- return 'active';
450
- return 'upcoming';
451
- }
452
- /** @ignore Activate a step (no-op if already active); emits `stepChange`. */
453
- updateValue(value, event) {
454
- if (this.value() === value)
455
- return;
456
- this.value.set(value);
457
- this.stepChange.emit({ value, originalEvent: event });
458
- }
459
- /** Activate the next step in the sequence (respects the sequence bounds). */
460
- next() {
461
- const values = this.orderedValues();
462
- const target = values[this.activeIndex() + 1];
463
- if (target !== undefined)
464
- this.updateValue(target);
465
- }
466
- /** Activate the previous step in the sequence. */
467
- prev() {
468
- const values = this.orderedValues();
469
- const index = this.activeIndex();
470
- if (index > 0)
471
- this.updateValue(values[index - 1]);
472
- }
473
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiStepper, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
474
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.7", type: UiStepper, isStandalone: true, selector: "ui-stepper", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, scrollable: { classPropertyName: "scrollable", publicName: "scrollable", isSignal: true, isRequired: false, transformFunction: null }, motion: { classPropertyName: "motion", publicName: "motion", isSignal: true, isRequired: false, transformFunction: null }, completedIcon: { classPropertyName: "completedIcon", publicName: "completedIcon", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", stepChange: "stepChange" }, host: { properties: { "class._vertical": "orientation() === 'vertical'", "attr.role": "orientation() === 'vertical' ? 'group' : null", "attr.aria-label": "orientation() === 'vertical' ? (ariaLabel() || null) : null", "attr.id": "id" }, classAttribute: "ui-stepper" }, queries: [{ propertyName: "steps", predicate: i0.forwardRef(() => UiStep), descendants: true, isSignal: true }, { propertyName: "panels", predicate: i0.forwardRef(() => UiStepPanel), descendants: true, isSignal: true }], ngImport: i0, template: '<ng-content />', isInline: true, styles: [":host{display:block;width:100%}\n"] }); }
475
- }
476
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiStepper, decorators: [{
477
- type: Component,
478
- args: [{ selector: 'ui-stepper', template: '<ng-content />', host: {
479
- class: 'ui-stepper',
480
- '[class._vertical]': "orientation() === 'vertical'",
481
- // Vertical interleaves each step's panel right under its own header (ui-step-item),
482
- // so the container cannot be a tablist there — a tab containing its own tabpanel is
483
- // invalid ARIA. role="group" instead: same accessible name, no tab semantics implied
484
- // (headers/panels switch to the accordion pattern too, see ui-step.html/ui-step-panel).
485
- '[attr.role]': "orientation() === 'vertical' ? 'group' : null",
486
- '[attr.aria-label]': "orientation() === 'vertical' ? (ariaLabel() || null) : null",
487
- '[attr.id]': 'id',
488
- }, styles: [":host{display:block;width:100%}\n"] }]
489
- }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], linear: [{ type: i0.Input, args: [{ isSignal: true, alias: "linear", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], scrollable: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollable", required: false }] }], motion: [{ type: i0.Input, args: [{ isSignal: true, alias: "motion", required: false }] }], completedIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "completedIcon", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], stepChange: [{ type: i0.Output, args: ["stepChange"] }], steps: [{ type: i0.ContentChildren, args: [forwardRef(() => UiStep), { ...{ descendants: true }, isSignal: true }] }], panels: [{ type: i0.ContentChildren, args: [forwardRef(() => UiStepPanel), { ...{ descendants: true }, isSignal: true }] }] } });
490
-
491
- /*
492
- * Public API Surface of ui-kit/ui-stepper
493
- */
494
-
495
- /**
496
- * Generated bundle index. Do not edit.
497
- */
498
-
319
+ `,
320
+ host: {
321
+ class: "ui-step-panel",
322
+ "[attr.role]": "stepper.orientation() === 'vertical' ? 'region' : 'tabpanel'",
323
+ "[id]": "stepper.panelId(value())",
324
+ "[attr.aria-labelledby]": "stepper.stepId(value())",
325
+ "[attr.tabindex]": "active() ? 0 : null",
326
+ "[attr.inert]": "active() ? null : ''",
327
+ "[class._active]": "active()"
328
+ },
329
+ styles: [":host{display:block;color:var(--ui-stepper-panel-color, var(--global-text-default));font-family:var(--ui-stepper-panel-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);line-height:1.5;outline:none}.ui-step-panel-collapse{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows var(--ui-motion-duration, var(--motion-toggle-duration, var(--transition-default))) var(--ui-motion-easing, var(--motion-toggle-easing, var(--transition-easeinout))) var(--ui-motion-delay, 0ms),opacity var(--ui-motion-duration, var(--motion-toggle-duration, var(--transition-default))) var(--ui-motion-easing, var(--motion-toggle-easing, var(--transition-easeinout))) var(--ui-motion-delay, 0ms)}.ui-step-panel-collapse._open{grid-template-rows:1fr;opacity:1}.ui-step-panel-collapse._no-motion{transition:none}@media(prefers-reduced-motion:reduce){.ui-step-panel-collapse{transition-duration:.01ms}}:root[data-motion=off] .ui-step-panel-collapse{transition-duration:.01ms}.ui-step-panel-inner{overflow:hidden;min-height:0}.ui-step-panel-body{padding:var(--units-default) 0}:host-context(.ui-stepper._vertical){margin-left:calc(var(--ui-stepper-marker-size, 2.75rem) + var(--units-sm))}:host-context(.ui-stepper._vertical) .ui-step-panel-body{padding:var(--units-sm) 0 var(--units-md)}\n"]
330
+ }]
331
+ }],
332
+ ctorParameters: () => [],
333
+ propDecorators: {
334
+ value: [{
335
+ type: i0.Input,
336
+ args: [{
337
+ isSignal: true,
338
+ alias: "value",
339
+ required: false
340
+ }]
341
+ }, {
342
+ type: i0.Output,
343
+ args: ["valueChange"]
344
+ }],
345
+ lazy: [{
346
+ type: i0.Input,
347
+ args: [{
348
+ isSignal: true,
349
+ alias: "lazy",
350
+ required: false
351
+ }]
352
+ }],
353
+ content: [{
354
+ type: i0.ContentChild,
355
+ args: ["content", { isSignal: true }]
356
+ }]
357
+ }
358
+ });
359
+ var UiStepList = class UiStepList {
360
+ constructor() {
361
+ this.ariaLabel = input(...ngDevMode ? [void 0, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
362
+ this.stepper = inject(UiStepper);
363
+ this.host = inject(ElementRef);
364
+ this.steps = contentChildren(UiStep, ...ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []);
365
+ this.resizeTick = signal(0, ...ngDevMode ? [{ debugName: "resizeTick" }] : /* istanbul ignore next */ []);
366
+ this.settled = false;
367
+ afterRenderEffect((onCleanup) => {
368
+ if (!this.stepper.isScrollable() || typeof ResizeObserver === "undefined") return;
369
+ const ro = new ResizeObserver(() => this.resizeTick.update((v) => v + 1));
370
+ ro.observe(this.host.nativeElement);
371
+ onCleanup(() => ro.disconnect());
372
+ });
373
+ afterRenderEffect(() => {
374
+ this.resizeTick();
375
+ if (!this.stepper.isScrollable()) return;
376
+ const value = this.stepper.value();
377
+ const step = this.steps().find((s) => s.value() === value);
378
+ if (!step) return;
379
+ const animate = this.settled && this.shownValue !== value;
380
+ if (this.reveal(step, animate)) {
381
+ this.settled = true;
382
+ this.shownValue = value;
383
+ }
384
+ });
385
+ }
386
+ reveal(step, animate) {
387
+ const strip = this.host.nativeElement;
388
+ const width = strip.clientWidth;
389
+ if (width === 0) return false;
390
+ const origin = strip.getBoundingClientRect().left + strip.clientLeft;
391
+ const { left, right } = step.extent();
392
+ const start = left - origin;
393
+ const end = right - origin;
394
+ let delta = 0;
395
+ if (start < -1) delta = start;
396
+ else if (end > width + 1) delta = Math.min(end - width, start);
397
+ if (delta !== 0) strip.scrollTo({
398
+ left: strip.scrollLeft + delta,
399
+ behavior: animate ? "auto" : "instant"
400
+ });
401
+ return true;
402
+ }
403
+ static {
404
+ this.ɵfac = i0.ɵɵngDeclareFactory({
405
+ minVersion: "12.0.0",
406
+ version: "22.3.0",
407
+ ngImport: i0,
408
+ type: UiStepList,
409
+ deps: [],
410
+ target: i0.ɵɵFactoryTarget.Component
411
+ });
412
+ }
413
+ static {
414
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
415
+ minVersion: "17.2.0",
416
+ version: "22.3.0",
417
+ type: UiStepList,
418
+ isStandalone: true,
419
+ selector: "ui-step-list",
420
+ inputs: { ariaLabel: {
421
+ classPropertyName: "ariaLabel",
422
+ publicName: "ariaLabel",
423
+ isSignal: true,
424
+ isRequired: false,
425
+ transformFunction: null
426
+ } },
427
+ host: {
428
+ attributes: {
429
+ "role": "tablist",
430
+ "aria-orientation": "horizontal"
431
+ },
432
+ properties: {
433
+ "attr.aria-label": "ariaLabel() || null",
434
+ "class._scrollable": "stepper.isScrollable()",
435
+ "class._no-motion": "!stepper.motion()"
436
+ },
437
+ classAttribute: "ui-step-list"
438
+ },
439
+ queries: [{
440
+ propertyName: "steps",
441
+ predicate: UiStep,
442
+ isSignal: true
443
+ }],
444
+ ngImport: i0,
445
+ template: "<ng-content />",
446
+ isInline: true,
447
+ styles: [":host{display:flex;flex-direction:row;align-items:flex-start;width:100%;min-width:0}:host._scrollable{box-sizing:border-box;overflow-x:auto;overflow-y:hidden;padding-inline:calc((var(--ui-stepper-step-min-width, 7.5rem) - var(--ui-stepper-marker-size, 2.75rem)) / 2);scroll-behavior:smooth;scrollbar-width:none}:host._scrollable::-webkit-scrollbar{display:none}@media(prefers-reduced-motion:reduce){:host._scrollable{scroll-behavior:auto}}:root[data-motion=off] :host._scrollable{scroll-behavior:auto}:host._scrollable._no-motion{scroll-behavior:auto}\n"]
448
+ });
449
+ }
450
+ };
451
+ i0.ɵɵngDeclareClassMetadata({
452
+ minVersion: "12.0.0",
453
+ version: "22.3.0",
454
+ ngImport: i0,
455
+ type: UiStepList,
456
+ decorators: [{
457
+ type: Component,
458
+ args: [{
459
+ selector: "ui-step-list",
460
+ template: "<ng-content />",
461
+ host: {
462
+ class: "ui-step-list",
463
+ role: "tablist",
464
+ "aria-orientation": "horizontal",
465
+ "[attr.aria-label]": "ariaLabel() || null",
466
+ "[class._scrollable]": "stepper.isScrollable()",
467
+ "[class._no-motion]": "!stepper.motion()"
468
+ },
469
+ styles: [":host{display:flex;flex-direction:row;align-items:flex-start;width:100%;min-width:0}:host._scrollable{box-sizing:border-box;overflow-x:auto;overflow-y:hidden;padding-inline:calc((var(--ui-stepper-step-min-width, 7.5rem) - var(--ui-stepper-marker-size, 2.75rem)) / 2);scroll-behavior:smooth;scrollbar-width:none}:host._scrollable::-webkit-scrollbar{display:none}@media(prefers-reduced-motion:reduce){:host._scrollable{scroll-behavior:auto}}:root[data-motion=off] :host._scrollable{scroll-behavior:auto}:host._scrollable._no-motion{scroll-behavior:auto}\n"]
470
+ }]
471
+ }],
472
+ ctorParameters: () => [],
473
+ propDecorators: {
474
+ ariaLabel: [{
475
+ type: i0.Input,
476
+ args: [{
477
+ isSignal: true,
478
+ alias: "ariaLabel",
479
+ required: false
480
+ }]
481
+ }],
482
+ steps: [{
483
+ type: i0.ContentChildren,
484
+ args: [i0.forwardRef(() => UiStep), { isSignal: true }]
485
+ }]
486
+ }
487
+ });
488
+ var UiStepPanels = class UiStepPanels {
489
+ static {
490
+ this.ɵfac = i0.ɵɵngDeclareFactory({
491
+ minVersion: "12.0.0",
492
+ version: "22.3.0",
493
+ ngImport: i0,
494
+ type: UiStepPanels,
495
+ deps: [],
496
+ target: i0.ɵɵFactoryTarget.Component
497
+ });
498
+ }
499
+ static {
500
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
501
+ minVersion: "14.0.0",
502
+ version: "22.3.0",
503
+ type: UiStepPanels,
504
+ isStandalone: true,
505
+ selector: "ui-step-panels",
506
+ host: { classAttribute: "ui-step-panels" },
507
+ ngImport: i0,
508
+ template: "<ng-content />",
509
+ isInline: true,
510
+ styles: [":host{display:block;width:100%}\n"]
511
+ });
512
+ }
513
+ };
514
+ i0.ɵɵngDeclareClassMetadata({
515
+ minVersion: "12.0.0",
516
+ version: "22.3.0",
517
+ ngImport: i0,
518
+ type: UiStepPanels,
519
+ decorators: [{
520
+ type: Component,
521
+ args: [{
522
+ selector: "ui-step-panels",
523
+ template: "<ng-content />",
524
+ host: { class: "ui-step-panels" },
525
+ styles: [":host{display:block;width:100%}\n"]
526
+ }]
527
+ }]
528
+ });
529
+ var UiStepItem = class UiStepItem {
530
+ constructor() {
531
+ this.value = input.required(...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
532
+ this.stepper = inject(UiStepper);
533
+ this.step = contentChild(UiStep, ...ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []);
534
+ this.panel = contentChild(UiStepPanel, ...ngDevMode ? [{ debugName: "panel" }] : /* istanbul ignore next */ []);
535
+ this.state = computed(() => this.stepper.stepState(this.value()), ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
536
+ this.isLast = computed(() => this.stepper.isLast(this.value()), ...ngDevMode ? [{ debugName: "isLast" }] : /* istanbul ignore next */ []);
537
+ effect(() => {
538
+ this.step()?.value.set(this.value());
539
+ this.panel()?.value.set(this.value());
540
+ });
541
+ }
542
+ static {
543
+ this.ɵfac = i0.ɵɵngDeclareFactory({
544
+ minVersion: "12.0.0",
545
+ version: "22.3.0",
546
+ ngImport: i0,
547
+ type: UiStepItem,
548
+ deps: [],
549
+ target: i0.ɵɵFactoryTarget.Component
550
+ });
551
+ }
552
+ static {
553
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
554
+ minVersion: "17.2.0",
555
+ version: "22.3.0",
556
+ type: UiStepItem,
557
+ isStandalone: true,
558
+ selector: "ui-step-item",
559
+ inputs: { value: {
560
+ classPropertyName: "value",
561
+ publicName: "value",
562
+ isSignal: true,
563
+ isRequired: true,
564
+ transformFunction: null
565
+ } },
566
+ host: {
567
+ properties: {
568
+ "class._active": "state() === 'active'",
569
+ "class._completed": "state() === 'completed'",
570
+ "class._last": "isLast()"
571
+ },
572
+ classAttribute: "ui-step-item"
573
+ },
574
+ queries: [{
575
+ propertyName: "step",
576
+ first: true,
577
+ predicate: UiStep,
578
+ descendants: true,
579
+ isSignal: true
580
+ }, {
581
+ propertyName: "panel",
582
+ first: true,
583
+ predicate: UiStepPanel,
584
+ descendants: true,
585
+ isSignal: true
586
+ }],
587
+ ngImport: i0,
588
+ template: "<ng-content />",
589
+ isInline: true,
590
+ styles: [":host{display:block;position:relative;padding-bottom:var(--units-lg)}:host._last{padding-bottom:0}:host:not(._last):before{content:\"\";position:absolute;left:calc(var(--ui-stepper-marker-size, 2.75rem) / 2 - var(--ui-stepper-rail-stroke-width, var(--stroke-default)) / 2);top:calc(var(--ui-stepper-marker-size, 2.75rem) + var(--units-xs));bottom:0;width:var(--ui-stepper-rail-stroke-width, var(--stroke-default));background-color:var(--ui-stepper-rail-surface, var(--global-border-default))}:host._completed:not(._last):before{background-color:var(--ui-stepper-rail-surface-completed, var(--navigation-high-stroke-default))}\n"]
591
+ });
592
+ }
593
+ };
594
+ i0.ɵɵngDeclareClassMetadata({
595
+ minVersion: "12.0.0",
596
+ version: "22.3.0",
597
+ ngImport: i0,
598
+ type: UiStepItem,
599
+ decorators: [{
600
+ type: Component,
601
+ args: [{
602
+ selector: "ui-step-item",
603
+ template: "<ng-content />",
604
+ host: {
605
+ class: "ui-step-item",
606
+ "[class._active]": "state() === 'active'",
607
+ "[class._completed]": "state() === 'completed'",
608
+ "[class._last]": "isLast()"
609
+ },
610
+ styles: [":host{display:block;position:relative;padding-bottom:var(--units-lg)}:host._last{padding-bottom:0}:host:not(._last):before{content:\"\";position:absolute;left:calc(var(--ui-stepper-marker-size, 2.75rem) / 2 - var(--ui-stepper-rail-stroke-width, var(--stroke-default)) / 2);top:calc(var(--ui-stepper-marker-size, 2.75rem) + var(--units-xs));bottom:0;width:var(--ui-stepper-rail-stroke-width, var(--stroke-default));background-color:var(--ui-stepper-rail-surface, var(--global-border-default))}:host._completed:not(._last):before{background-color:var(--ui-stepper-rail-surface-completed, var(--navigation-high-stroke-default))}\n"]
611
+ }]
612
+ }],
613
+ ctorParameters: () => [],
614
+ propDecorators: {
615
+ value: [{
616
+ type: i0.Input,
617
+ args: [{
618
+ isSignal: true,
619
+ alias: "value",
620
+ required: true
621
+ }]
622
+ }],
623
+ step: [{
624
+ type: i0.ContentChild,
625
+ args: [i0.forwardRef(() => UiStep), { isSignal: true }]
626
+ }],
627
+ panel: [{
628
+ type: i0.ContentChild,
629
+ args: [i0.forwardRef(() => UiStepPanel), { isSignal: true }]
630
+ }]
631
+ }
632
+ });
633
+ var UiStepper = class UiStepper {
634
+ constructor() {
635
+ this.value = model(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
636
+ this.orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
637
+ this.linear = input(false, {
638
+ ...ngDevMode ? { debugName: "linear" } : /* istanbul ignore next */ {},
639
+ transform: booleanAttribute
640
+ });
641
+ this.lazy = input(false, {
642
+ ...ngDevMode ? { debugName: "lazy" } : /* istanbul ignore next */ {},
643
+ transform: booleanAttribute
644
+ });
645
+ this.scrollable = input(false, {
646
+ ...ngDevMode ? { debugName: "scrollable" } : /* istanbul ignore next */ {},
647
+ transform: booleanAttribute
648
+ });
649
+ this.motion = input(true, {
650
+ ...ngDevMode ? { debugName: "motion" } : /* istanbul ignore next */ {},
651
+ transform: booleanAttribute
652
+ });
653
+ this.completedIcon = input(...ngDevMode ? [void 0, { debugName: "completedIcon" }] : /* istanbul ignore next */ []);
654
+ this.ariaLabel = input(...ngDevMode ? [void 0, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
655
+ this.tabindex = input(0, {
656
+ ...ngDevMode ? { debugName: "tabindex" } : /* istanbul ignore next */ {},
657
+ transform: numberAttribute
658
+ });
659
+ this.stepChange = output();
660
+ this.id = `ui-stepper-${nextUid++}`;
661
+ this.steps = contentChildren(forwardRef(() => UiStep), {
662
+ ...ngDevMode ? { debugName: "steps" } : /* istanbul ignore next */ {},
663
+ descendants: true
664
+ });
665
+ this.panels = contentChildren(forwardRef(() => UiStepPanel), {
666
+ ...ngDevMode ? { debugName: "panels" } : /* istanbul ignore next */ {},
667
+ descendants: true
668
+ });
669
+ this.isScrollable = computed(() => this.scrollable() && this.orientation() === "horizontal", ...ngDevMode ? [{ debugName: "isScrollable" }] : /* istanbul ignore next */ []);
670
+ this.orderedValues = computed(() => this.steps().map((s) => s.value()), ...ngDevMode ? [{ debugName: "orderedValues" }] : /* istanbul ignore next */ []);
671
+ this.activeIndex = computed(() => this.orderedValues().indexOf(this.value()), ...ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []);
672
+ }
673
+ stepId(value) {
674
+ return `${this.id}-step-${value}`;
675
+ }
676
+ panelId(value) {
677
+ return this.panels().some((p) => p.value() === value) ? `${this.id}-panel-${value}` : null;
678
+ }
679
+ isActive(value) {
680
+ return value !== void 0 && this.value() === value;
681
+ }
682
+ stepNumber(value) {
683
+ return this.orderedValues().indexOf(value) + 1;
684
+ }
685
+ isLast(value) {
686
+ const values = this.orderedValues();
687
+ return values.length > 0 && values[values.length - 1] === value;
688
+ }
689
+ stepState(value) {
690
+ const index = this.orderedValues().indexOf(value);
691
+ const active = this.activeIndex();
692
+ if (index === -1 || active === -1) return "upcoming";
693
+ if (index < active) return "completed";
694
+ if (index === active) return "active";
695
+ return "upcoming";
696
+ }
697
+ updateValue(value, event) {
698
+ if (this.value() === value) return;
699
+ this.value.set(value);
700
+ this.stepChange.emit({
701
+ value,
702
+ originalEvent: event
703
+ });
704
+ }
705
+ next() {
706
+ const target = this.orderedValues()[this.activeIndex() + 1];
707
+ if (target !== void 0) this.updateValue(target);
708
+ }
709
+ prev() {
710
+ const values = this.orderedValues();
711
+ const index = this.activeIndex();
712
+ if (index > 0) this.updateValue(values[index - 1]);
713
+ }
714
+ static {
715
+ this.ɵfac = i0.ɵɵngDeclareFactory({
716
+ minVersion: "12.0.0",
717
+ version: "22.3.0",
718
+ ngImport: i0,
719
+ type: UiStepper,
720
+ deps: [],
721
+ target: i0.ɵɵFactoryTarget.Component
722
+ });
723
+ }
724
+ static {
725
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
726
+ minVersion: "17.2.0",
727
+ version: "22.3.0",
728
+ type: UiStepper,
729
+ isStandalone: true,
730
+ selector: "ui-stepper",
731
+ inputs: {
732
+ value: {
733
+ classPropertyName: "value",
734
+ publicName: "value",
735
+ isSignal: true,
736
+ isRequired: false,
737
+ transformFunction: null
738
+ },
739
+ orientation: {
740
+ classPropertyName: "orientation",
741
+ publicName: "orientation",
742
+ isSignal: true,
743
+ isRequired: false,
744
+ transformFunction: null
745
+ },
746
+ linear: {
747
+ classPropertyName: "linear",
748
+ publicName: "linear",
749
+ isSignal: true,
750
+ isRequired: false,
751
+ transformFunction: null
752
+ },
753
+ lazy: {
754
+ classPropertyName: "lazy",
755
+ publicName: "lazy",
756
+ isSignal: true,
757
+ isRequired: false,
758
+ transformFunction: null
759
+ },
760
+ scrollable: {
761
+ classPropertyName: "scrollable",
762
+ publicName: "scrollable",
763
+ isSignal: true,
764
+ isRequired: false,
765
+ transformFunction: null
766
+ },
767
+ motion: {
768
+ classPropertyName: "motion",
769
+ publicName: "motion",
770
+ isSignal: true,
771
+ isRequired: false,
772
+ transformFunction: null
773
+ },
774
+ completedIcon: {
775
+ classPropertyName: "completedIcon",
776
+ publicName: "completedIcon",
777
+ isSignal: true,
778
+ isRequired: false,
779
+ transformFunction: null
780
+ },
781
+ ariaLabel: {
782
+ classPropertyName: "ariaLabel",
783
+ publicName: "ariaLabel",
784
+ isSignal: true,
785
+ isRequired: false,
786
+ transformFunction: null
787
+ },
788
+ tabindex: {
789
+ classPropertyName: "tabindex",
790
+ publicName: "tabindex",
791
+ isSignal: true,
792
+ isRequired: false,
793
+ transformFunction: null
794
+ }
795
+ },
796
+ outputs: {
797
+ value: "valueChange",
798
+ stepChange: "stepChange"
799
+ },
800
+ host: {
801
+ properties: {
802
+ "class._vertical": "orientation() === 'vertical'",
803
+ "attr.role": "orientation() === 'vertical' ? 'group' : null",
804
+ "attr.aria-label": "orientation() === 'vertical' ? (ariaLabel() || null) : null",
805
+ "attr.id": "id"
806
+ },
807
+ classAttribute: "ui-stepper"
808
+ },
809
+ queries: [{
810
+ propertyName: "steps",
811
+ predicate: i0.forwardRef(() => UiStep),
812
+ descendants: true,
813
+ isSignal: true
814
+ }, {
815
+ propertyName: "panels",
816
+ predicate: i0.forwardRef(() => UiStepPanel),
817
+ descendants: true,
818
+ isSignal: true
819
+ }],
820
+ ngImport: i0,
821
+ template: "<ng-content />",
822
+ isInline: true,
823
+ styles: [":host{display:block;width:100%}\n"]
824
+ });
825
+ }
826
+ };
827
+ i0.ɵɵngDeclareClassMetadata({
828
+ minVersion: "12.0.0",
829
+ version: "22.3.0",
830
+ ngImport: i0,
831
+ type: UiStepper,
832
+ decorators: [{
833
+ type: Component,
834
+ args: [{
835
+ selector: "ui-stepper",
836
+ template: "<ng-content />",
837
+ host: {
838
+ class: "ui-stepper",
839
+ "[class._vertical]": "orientation() === 'vertical'",
840
+ "[attr.role]": "orientation() === 'vertical' ? 'group' : null",
841
+ "[attr.aria-label]": "orientation() === 'vertical' ? (ariaLabel() || null) : null",
842
+ "[attr.id]": "id"
843
+ },
844
+ styles: [":host{display:block;width:100%}\n"]
845
+ }]
846
+ }],
847
+ propDecorators: {
848
+ value: [{
849
+ type: i0.Input,
850
+ args: [{
851
+ isSignal: true,
852
+ alias: "value",
853
+ required: false
854
+ }]
855
+ }, {
856
+ type: i0.Output,
857
+ args: ["valueChange"]
858
+ }],
859
+ orientation: [{
860
+ type: i0.Input,
861
+ args: [{
862
+ isSignal: true,
863
+ alias: "orientation",
864
+ required: false
865
+ }]
866
+ }],
867
+ linear: [{
868
+ type: i0.Input,
869
+ args: [{
870
+ isSignal: true,
871
+ alias: "linear",
872
+ required: false
873
+ }]
874
+ }],
875
+ lazy: [{
876
+ type: i0.Input,
877
+ args: [{
878
+ isSignal: true,
879
+ alias: "lazy",
880
+ required: false
881
+ }]
882
+ }],
883
+ scrollable: [{
884
+ type: i0.Input,
885
+ args: [{
886
+ isSignal: true,
887
+ alias: "scrollable",
888
+ required: false
889
+ }]
890
+ }],
891
+ motion: [{
892
+ type: i0.Input,
893
+ args: [{
894
+ isSignal: true,
895
+ alias: "motion",
896
+ required: false
897
+ }]
898
+ }],
899
+ completedIcon: [{
900
+ type: i0.Input,
901
+ args: [{
902
+ isSignal: true,
903
+ alias: "completedIcon",
904
+ required: false
905
+ }]
906
+ }],
907
+ ariaLabel: [{
908
+ type: i0.Input,
909
+ args: [{
910
+ isSignal: true,
911
+ alias: "ariaLabel",
912
+ required: false
913
+ }]
914
+ }],
915
+ tabindex: [{
916
+ type: i0.Input,
917
+ args: [{
918
+ isSignal: true,
919
+ alias: "tabindex",
920
+ required: false
921
+ }]
922
+ }],
923
+ stepChange: [{
924
+ type: i0.Output,
925
+ args: ["stepChange"]
926
+ }],
927
+ steps: [{
928
+ type: i0.ContentChildren,
929
+ args: [forwardRef(() => UiStep), {
930
+ descendants: true,
931
+ isSignal: true
932
+ }]
933
+ }],
934
+ panels: [{
935
+ type: i0.ContentChildren,
936
+ args: [forwardRef(() => UiStepPanel), {
937
+ descendants: true,
938
+ isSignal: true
939
+ }]
940
+ }]
941
+ }
942
+ });
499
943
  export { UiStep, UiStepItem, UiStepList, UiStepPanel, UiStepPanels, UiStepper };
500
- //# sourceMappingURL=4sh-ui-kit-navigation-ui-stepper.mjs.map
944
+
945
+ //# sourceMappingURL=4sh-ui-kit-navigation-ui-stepper.mjs.map