@4sh/ui-kit 0.16.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 (219) hide show
  1. package/README.fr.md +10 -10
  2. package/README.md +10 -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 -1000
  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 -2048
  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 -138
  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 -257
  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 -312
  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 -199
  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 -137
  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 +721 -638
  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 +299 -2
  143. package/mcp/data/text-search-docs.json +149 -9
  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/types/4sh-ui-kit-actions-ui-button-split.d.ts +198 -87
  150. package/types/4sh-ui-kit-actions-ui-button.d.ts +240 -116
  151. package/types/4sh-ui-kit-actions-ui-link.d.ts +136 -67
  152. package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +287 -180
  153. package/types/4sh-ui-kit-base-ui-icon.d.ts +92 -58
  154. package/types/4sh-ui-kit-base-ui-image.d.ts +406 -205
  155. package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +573 -376
  156. package/types/4sh-ui-kit-forms-ui-checkbox.d.ts +77 -42
  157. package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +953 -700
  158. package/types/4sh-ui-kit-forms-ui-editor.d.ts +374 -340
  159. package/types/4sh-ui-kit-forms-ui-field-sign.d.ts +325 -0
  160. package/types/4sh-ui-kit-forms-ui-field.d.ts +150 -64
  161. package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +583 -241
  162. package/types/4sh-ui-kit-forms-ui-input-date.d.ts +152 -103
  163. package/types/4sh-ui-kit-forms-ui-input-group.d.ts +109 -63
  164. package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +93 -59
  165. package/types/4sh-ui-kit-forms-ui-input-number.d.ts +171 -96
  166. package/types/4sh-ui-kit-forms-ui-input-otp.d.ts +137 -104
  167. package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +469 -309
  168. package/types/4sh-ui-kit-forms-ui-input.d.ts +198 -118
  169. package/types/4sh-ui-kit-forms-ui-knob.d.ts +132 -80
  170. package/types/4sh-ui-kit-forms-ui-label.d.ts +47 -22
  171. package/types/4sh-ui-kit-forms-ui-nudger.d.ts +134 -67
  172. package/types/4sh-ui-kit-forms-ui-radio.d.ts +48 -33
  173. package/types/4sh-ui-kit-forms-ui-rating.d.ts +120 -86
  174. package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +221 -147
  175. package/types/4sh-ui-kit-forms-ui-select.d.ts +561 -357
  176. package/types/4sh-ui-kit-forms-ui-slider.d.ts +156 -105
  177. package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +133 -97
  178. package/types/4sh-ui-kit-forms-ui-textarea.d.ts +90 -56
  179. package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +158 -94
  180. package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +314 -178
  181. package/types/4sh-ui-kit-forms-ui-toggle.d.ts +88 -54
  182. package/types/4sh-ui-kit-forms.d.ts +275 -194
  183. package/types/4sh-ui-kit-informative-ui-accordion.d.ts +162 -92
  184. package/types/4sh-ui-kit-informative-ui-alert.d.ts +128 -62
  185. package/types/4sh-ui-kit-informative-ui-avatar-group.d.ts +8 -8
  186. package/types/4sh-ui-kit-informative-ui-avatar.d.ts +81 -44
  187. package/types/4sh-ui-kit-informative-ui-badge.d.ts +71 -41
  188. package/types/4sh-ui-kit-informative-ui-chip.d.ts +194 -99
  189. package/types/4sh-ui-kit-informative-ui-empty-state.d.ts +105 -65
  190. package/types/4sh-ui-kit-informative-ui-helper.d.ts +64 -34
  191. package/types/4sh-ui-kit-informative-ui-progress-bar.d.ts +120 -65
  192. package/types/4sh-ui-kit-informative-ui-read-only.d.ts +147 -67
  193. package/types/4sh-ui-kit-informative-ui-separator.d.ts +65 -35
  194. package/types/4sh-ui-kit-informative-ui-skeleton.d.ts +62 -32
  195. package/types/4sh-ui-kit-informative-ui-spinner.d.ts +111 -50
  196. package/types/4sh-ui-kit-informative-ui-tag.d.ts +77 -37
  197. package/types/4sh-ui-kit-informative-ui-toast.d.ts +300 -180
  198. package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +269 -141
  199. package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +360 -221
  200. package/types/4sh-ui-kit-layout-ui-card.d.ts +119 -79
  201. package/types/4sh-ui-kit-layout-ui-drawer.d.ts +244 -120
  202. package/types/4sh-ui-kit-layout-ui-modal.d.ts +409 -222
  203. package/types/4sh-ui-kit-layout-ui-popover.d.ts +149 -91
  204. package/types/4sh-ui-kit-motion.d.ts +117 -67
  205. package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +279 -145
  206. package/types/4sh-ui-kit-navigation-ui-breadcrumb.d.ts +134 -96
  207. package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +148 -89
  208. package/types/4sh-ui-kit-navigation-ui-menu.d.ts +282 -201
  209. package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +425 -261
  210. package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +279 -183
  211. package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +275 -173
  212. package/types/4sh-ui-kit-overlay.d.ts +6 -6
  213. package/types/4sh-ui-kit-ripple.d.ts +99 -74
  214. package/types/4sh-ui-kit-table-ui-paginator.d.ts +237 -133
  215. package/types/4sh-ui-kit-table-ui-table.d.ts +769 -470
  216. package/types/4sh-ui-kit-theming.d.ts +27 -29
  217. package/types/4sh-ui-kit-types.d.ts +6 -5
  218. package/types/4sh-ui-kit.d.ts +4 -3
  219. package/fesm2022/4sh-ui-kit-types.mjs.map +0 -1
@@ -1,124 +1,269 @@
1
- import * as i0 from '@angular/core';
2
- import { input, numberAttribute, booleanAttribute, computed, Component } from '@angular/core';
3
- import { NgTemplateOutlet } from '@angular/common';
4
-
5
- /**
6
- * ui-progress-bar — process status indicator (headless).
7
- *
8
- * Renders a token-coloured track filled to `value`% (`determinate`), a looping
9
- * animation with no tracked value (`indeterminate`), or a set of discrete
10
- * segments when `steps` is provided. The completion value can be shown next to
11
- * (`right`) or below (`bottom`) the bar, formatted freely through a custom
12
- * `valueTemplate`. The fill colour is overridable per instance via `color`
13
- * (or the `--ui-progress-bar-color` CSS hook).
14
- *
15
- * Accessible: the track carries `role="progressbar"` with `aria-valuemin`,
16
- * `aria-valuemax` and (when determinate) `aria-valuenow`; name it with
17
- * `ariaLabel` / `ariaLabelledBy`. Motion honours the OS reduced-motion
18
- * preference and the kit-wide `data-motion="off"` switch.
19
- */
20
- class UiProgressBar {
21
- constructor() {
22
- /** Current progress, 0–100 (clamped). Ignored when `mode="indeterminate"`. */
23
- this.value = input(0, { ...(ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {}), transform: numberAttribute });
24
- /** `determinate` tracks a value; `indeterminate` loops with no value. */
25
- this.mode = input('determinate', /* @ts-ignore */
26
- ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
27
- /** Show the completion value beside/below the bar (determinate, non-steps). */
28
- this.showValue = input(true, { ...(ngDevMode ? { debugName: "showValue" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
29
- /** Unit appended to the numeric value (e.g. "%"). */
30
- this.unit = input('%', /* @ts-ignore */
31
- ...(ngDevMode ? [{ debugName: "unit" }] : /* istanbul ignore next */ []));
32
- /** Size preset. */
33
- this.size = input('default', /* @ts-ignore */
34
- ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
35
- /**
36
- * Where the value label sits: beside (`right`), below (`bottom`), or centered
37
- * within the filled portion of the bar itself (`inside`).
38
- */
39
- this.valuePosition = input('right', /* @ts-ignore */
40
- ...(ngDevMode ? [{ debugName: "valuePosition" }] : /* istanbul ignore next */ []));
41
- /**
42
- * When > 0, render the bar as this many discrete segments; the number of
43
- * filled segments is derived from `value`. Hides the numeric label.
44
- */
45
- this.steps = input(0, { ...(ngDevMode ? { debugName: "steps" } : /* istanbul ignore next */ {}), transform: numberAttribute });
46
- /** Fill colour override (any CSS colour). Sets `--ui-progress-bar-color`. */
47
- this.color = input(/* @ts-ignore */
48
- ...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
49
- /** Custom label content; context `{ $implicit: value }`. */
50
- this.valueTemplate = input(/* @ts-ignore */
51
- ...(ngDevMode ? [undefined, { debugName: "valueTemplate" }] : /* istanbul ignore next */ []));
52
- /** Accessible name of the progress bar. */
53
- this.ariaLabel = input(/* @ts-ignore */
54
- ...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
55
- /** Id of the element labelling the progress bar. */
56
- this.ariaLabelledBy = input(/* @ts-ignore */
57
- ...(ngDevMode ? [undefined, { debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
58
- /** @ignore Value clamped to the 0–100 range. */
59
- this.clampedValue = computed(() => {
60
- const v = this.value() ?? 0;
61
- return Math.min(100, Math.max(0, v));
62
- }, /* @ts-ignore */
63
- ...(ngDevMode ? [{ debugName: "clampedValue" }] : /* istanbul ignore next */ []));
64
- /** @ignore */
65
- this.isIndeterminate = computed(() => this.mode() === 'indeterminate', /* @ts-ignore */
66
- ...(ngDevMode ? [{ debugName: "isIndeterminate" }] : /* istanbul ignore next */ []));
67
- /** @ignore Whole number of segments requested (0 = continuous bar). */
68
- this.stepCount = computed(() => Math.max(0, Math.floor(this.steps() ?? 0)), /* @ts-ignore */
69
- ...(ngDevMode ? [{ debugName: "stepCount" }] : /* istanbul ignore next */ []));
70
- /** @ignore Steps mode is active. */
71
- this.isSteps = computed(() => this.stepCount() > 0, /* @ts-ignore */
72
- ...(ngDevMode ? [{ debugName: "isSteps" }] : /* istanbul ignore next */ []));
73
- /** @ignore Number of filled segments, derived from the value. */
74
- this.filledSteps = computed(() => Math.round((this.clampedValue() / 100) * this.stepCount()), /* @ts-ignore */
75
- ...(ngDevMode ? [{ debugName: "filledSteps" }] : /* istanbul ignore next */ []));
76
- /** @ignore One boolean (active?) per segment. */
77
- this.segments = computed(() => {
78
- const filled = this.filledSteps();
79
- return Array.from({ length: this.stepCount() }, (_, i) => i < filled);
80
- }, /* @ts-ignore */
81
- ...(ngDevMode ? [{ debugName: "segments" }] : /* istanbul ignore next */ []));
82
- /** @ignore The numeric label is rendered (not indeterminate, not steps). */
83
- this.showLabel = computed(() => this.showValue() && !this.isIndeterminate() && !this.isSteps(), /* @ts-ignore */
84
- ...(ngDevMode ? [{ debugName: "showLabel" }] : /* istanbul ignore next */ []));
85
- /** @ignore Label sits inside the filled portion of the bar. */
86
- this.labelInside = computed(() => this.showLabel() && this.valuePosition() === 'inside', /* @ts-ignore */
87
- ...(ngDevMode ? [{ debugName: "labelInside" }] : /* istanbul ignore next */ []));
88
- /** @ignore `aria-valuenow`: the value when tracked, otherwise omitted. */
89
- this.ariaValueNow = computed(() => this.isIndeterminate() ? null : this.clampedValue(), /* @ts-ignore */
90
- ...(ngDevMode ? [{ debugName: "ariaValueNow" }] : /* istanbul ignore next */ []));
91
- /** @ignore Human-readable value for steps ("3 / 5"); omitted otherwise. */
92
- this.ariaValueText = computed(() => this.isSteps() ? `${this.filledSteps()} / ${this.stepCount()}` : null, /* @ts-ignore */
93
- ...(ngDevMode ? [{ debugName: "ariaValueText" }] : /* istanbul ignore next */ []));
94
- /** @ignore */
95
- this.classes = computed(() => {
96
- const c = ['ui-progress-bar', `_${this.valuePosition()}`];
97
- if (this.size() !== 'default')
98
- c.push(`_${this.size()}`);
99
- if (this.isIndeterminate())
100
- c.push('_indeterminate');
101
- if (this.isSteps())
102
- c.push('_steps');
103
- return c.join(' ');
104
- }, /* @ts-ignore */
105
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
106
- }
107
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiProgressBar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
108
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: UiProgressBar, isStandalone: true, selector: "ui-progress-bar", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, showValue: { classPropertyName: "showValue", publicName: "showValue", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, valuePosition: { classPropertyName: "valuePosition", publicName: "valuePosition", isSignal: true, isRequired: false, transformFunction: null }, steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, valueTemplate: { classPropertyName: "valueTemplate", publicName: "valueTemplate", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [class]=\"classes()\" [style.--ui-progress-bar-color]=\"color() ?? null\">\n <div\n class=\"ui-progress-bar-track\"\n role=\"progressbar\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-valuenow]=\"ariaValueNow()\"\n [attr.aria-valuetext]=\"ariaValueText()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n >\n @if (isSteps()) {\n @for (active of segments(); track $index) {\n <span class=\"ui-progress-bar-segment\" [class._active]=\"active\"></span>\n }\n } @else if (isIndeterminate()) {\n <div class=\"ui-progress-bar-value _indeterminate\"></div>\n } @else {\n <div class=\"ui-progress-bar-value\" [style.width.%]=\"clampedValue()\">\n @if (labelInside()) {\n <span class=\"ui-progress-bar-value-label\">\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\n </span>\n }\n </div>\n }\n </div>\n\n @if (showLabel() && !labelInside()) {\n <div class=\"ui-progress-bar-label\">\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\n </div>\n }\n</div>\n\n<ng-template #labelTpl>\n @if (valueTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: clampedValue() }\"\n />\n } @else {\n {{ clampedValue() }}{{ unit() }}\n }\n</ng-template>\n", styles: [":host{display:block;width:100%}.ui-progress-bar{display:flex;align-items:center;gap:var(--units-md);width:100%}.ui-progress-bar-track{position:relative;display:flex;flex:1 1 auto;overflow:hidden;height:var(--ui-progress-bar-track-height, .5rem);border-radius:var(--ui-progress-bar-track-radius, var(--radius-xs));background-color:var(--ui-progress-bar-track-surface, var(--global-border-default))}.ui-progress-bar-value{height:100%;border-radius:inherit;background-color:var(--ui-progress-bar-color, var(--informative-highlighthigh-surface-default));transition:width 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-progress-bar-segment{flex:1 1 0;height:100%;border-radius:var(--radius-2xs);background-color:var(--ui-progress-bar-track-surface, var(--global-border-default))}.ui-progress-bar-segment._active{background-color:var(--ui-progress-bar-color, var(--informative-highlighthigh-surface-default))}.ui-progress-bar-label{flex:0 0 auto;color:var(--ui-progress-bar-label-color, var(--global-text-default));font-family:var(--ui-progress-bar-font-family, var(--fontfamily-base));font-weight:var(--ui-progress-bar-label-weight, var(--weight-regular));font-size:var(--size-typography-text-default);line-height:1.2;white-space:nowrap}.ui-progress-bar._bottom{flex-direction:column;align-items:stretch;gap:var(--units-sm)}.ui-progress-bar._bottom .ui-progress-bar-label{align-self:flex-end}.ui-progress-bar._inside .ui-progress-bar-track{height:var(--size-components-xs);border-radius:var(--radius-sm)}.ui-progress-bar._inside .ui-progress-bar-value{display:flex;align-items:center;justify-content:center;overflow:hidden}.ui-progress-bar-value-label{padding-inline:var(--units-sm);color:var(--ui-progress-bar-value-label-color, var(--informative-highlighthigh-content-default));font-family:var(--ui-progress-bar-font-family, var(--fontfamily-base));font-weight:var(--ui-progress-bar-value-label-weight, var(--weight-bold));font-size:var(--size-typography-text-md);line-height:1.2;white-space:nowrap}.ui-progress-bar._steps .ui-progress-bar-track{gap:var(--units-2xs);overflow:visible;border-radius:0;background-color:transparent}.ui-progress-bar._small .ui-progress-bar-track{height:var(--ui-progress-bar-track-height-small, .25rem);border-radius:var(--ui-progress-bar-track-radius-small, var(--radius-2xs))}.ui-progress-bar._indeterminate .ui-progress-bar-value{position:absolute;inset-block:0;inset-inline-start:0;width:40%;animation:ui-progress-bar-indeterminate var(--ui-progress-bar-indeterminate-duration, 1.6s) var(--transition-easeinout) infinite}@keyframes ui-progress-bar-indeterminate{0%{inset-inline-start:-40%;width:40%}50%{inset-inline-start:30%;width:60%}to{inset-inline-start:100%;width:40%}}@media(prefers-reduced-motion:reduce){.ui-progress-bar-value{transition:none;animation:none}.ui-progress-bar._indeterminate .ui-progress-bar-value{inset-inline-start:0;width:100%;opacity:.6}}:host-context([data-motion=off]) .ui-progress-bar-value{transition:none;animation:none}:host-context([data-motion=off]) .ui-progress-bar._indeterminate .ui-progress-bar-value{inset-inline-start:0;width:100%;opacity:.6}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
109
- }
110
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiProgressBar, decorators: [{
111
- type: Component,
112
- args: [{ selector: 'ui-progress-bar', imports: [NgTemplateOutlet], template: "<div [class]=\"classes()\" [style.--ui-progress-bar-color]=\"color() ?? null\">\n <div\n class=\"ui-progress-bar-track\"\n role=\"progressbar\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-valuenow]=\"ariaValueNow()\"\n [attr.aria-valuetext]=\"ariaValueText()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n >\n @if (isSteps()) {\n @for (active of segments(); track $index) {\n <span class=\"ui-progress-bar-segment\" [class._active]=\"active\"></span>\n }\n } @else if (isIndeterminate()) {\n <div class=\"ui-progress-bar-value _indeterminate\"></div>\n } @else {\n <div class=\"ui-progress-bar-value\" [style.width.%]=\"clampedValue()\">\n @if (labelInside()) {\n <span class=\"ui-progress-bar-value-label\">\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\n </span>\n }\n </div>\n }\n </div>\n\n @if (showLabel() && !labelInside()) {\n <div class=\"ui-progress-bar-label\">\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\n </div>\n }\n</div>\n\n<ng-template #labelTpl>\n @if (valueTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: clampedValue() }\"\n />\n } @else {\n {{ clampedValue() }}{{ unit() }}\n }\n</ng-template>\n", styles: [":host{display:block;width:100%}.ui-progress-bar{display:flex;align-items:center;gap:var(--units-md);width:100%}.ui-progress-bar-track{position:relative;display:flex;flex:1 1 auto;overflow:hidden;height:var(--ui-progress-bar-track-height, .5rem);border-radius:var(--ui-progress-bar-track-radius, var(--radius-xs));background-color:var(--ui-progress-bar-track-surface, var(--global-border-default))}.ui-progress-bar-value{height:100%;border-radius:inherit;background-color:var(--ui-progress-bar-color, var(--informative-highlighthigh-surface-default));transition:width 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-progress-bar-segment{flex:1 1 0;height:100%;border-radius:var(--radius-2xs);background-color:var(--ui-progress-bar-track-surface, var(--global-border-default))}.ui-progress-bar-segment._active{background-color:var(--ui-progress-bar-color, var(--informative-highlighthigh-surface-default))}.ui-progress-bar-label{flex:0 0 auto;color:var(--ui-progress-bar-label-color, var(--global-text-default));font-family:var(--ui-progress-bar-font-family, var(--fontfamily-base));font-weight:var(--ui-progress-bar-label-weight, var(--weight-regular));font-size:var(--size-typography-text-default);line-height:1.2;white-space:nowrap}.ui-progress-bar._bottom{flex-direction:column;align-items:stretch;gap:var(--units-sm)}.ui-progress-bar._bottom .ui-progress-bar-label{align-self:flex-end}.ui-progress-bar._inside .ui-progress-bar-track{height:var(--size-components-xs);border-radius:var(--radius-sm)}.ui-progress-bar._inside .ui-progress-bar-value{display:flex;align-items:center;justify-content:center;overflow:hidden}.ui-progress-bar-value-label{padding-inline:var(--units-sm);color:var(--ui-progress-bar-value-label-color, var(--informative-highlighthigh-content-default));font-family:var(--ui-progress-bar-font-family, var(--fontfamily-base));font-weight:var(--ui-progress-bar-value-label-weight, var(--weight-bold));font-size:var(--size-typography-text-md);line-height:1.2;white-space:nowrap}.ui-progress-bar._steps .ui-progress-bar-track{gap:var(--units-2xs);overflow:visible;border-radius:0;background-color:transparent}.ui-progress-bar._small .ui-progress-bar-track{height:var(--ui-progress-bar-track-height-small, .25rem);border-radius:var(--ui-progress-bar-track-radius-small, var(--radius-2xs))}.ui-progress-bar._indeterminate .ui-progress-bar-value{position:absolute;inset-block:0;inset-inline-start:0;width:40%;animation:ui-progress-bar-indeterminate var(--ui-progress-bar-indeterminate-duration, 1.6s) var(--transition-easeinout) infinite}@keyframes ui-progress-bar-indeterminate{0%{inset-inline-start:-40%;width:40%}50%{inset-inline-start:30%;width:60%}to{inset-inline-start:100%;width:40%}}@media(prefers-reduced-motion:reduce){.ui-progress-bar-value{transition:none;animation:none}.ui-progress-bar._indeterminate .ui-progress-bar-value{inset-inline-start:0;width:100%;opacity:.6}}:host-context([data-motion=off]) .ui-progress-bar-value{transition:none;animation:none}:host-context([data-motion=off]) .ui-progress-bar._indeterminate .ui-progress-bar-value{inset-inline-start:0;width:100%;opacity:.6}\n"] }]
113
- }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], showValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValue", required: false }] }], unit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unit", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], valuePosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "valuePosition", required: false }] }], steps: [{ type: i0.Input, args: [{ isSignal: true, alias: "steps", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], valueTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueTemplate", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }] } });
114
-
115
- /*
116
- * Public API Surface of ui-kit/ui-progress-bar
117
- */
118
-
119
- /**
120
- * Generated bundle index. Do not edit.
121
- */
122
-
1
+ import * as i0 from "@angular/core";
2
+ import { Component, booleanAttribute, computed, input, numberAttribute } from "@angular/core";
3
+ import { NgTemplateOutlet } from "@angular/common";
4
+ var UiProgressBar = class UiProgressBar {
5
+ constructor() {
6
+ this.value = input(0, {
7
+ ...ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {},
8
+ transform: numberAttribute
9
+ });
10
+ this.mode = input("determinate", ...ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []);
11
+ this.showValue = input(true, {
12
+ ...ngDevMode ? { debugName: "showValue" } : /* istanbul ignore next */ {},
13
+ transform: booleanAttribute
14
+ });
15
+ this.unit = input("%", ...ngDevMode ? [{ debugName: "unit" }] : /* istanbul ignore next */ []);
16
+ this.size = input("default", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
17
+ this.valuePosition = input("right", ...ngDevMode ? [{ debugName: "valuePosition" }] : /* istanbul ignore next */ []);
18
+ this.steps = input(0, {
19
+ ...ngDevMode ? { debugName: "steps" } : /* istanbul ignore next */ {},
20
+ transform: numberAttribute
21
+ });
22
+ this.color = input(...ngDevMode ? [void 0, { debugName: "color" }] : /* istanbul ignore next */ []);
23
+ this.valueTemplate = input(...ngDevMode ? [void 0, { debugName: "valueTemplate" }] : /* istanbul ignore next */ []);
24
+ this.ariaLabel = input(...ngDevMode ? [void 0, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
25
+ this.ariaLabelledBy = input(...ngDevMode ? [void 0, { debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
26
+ this.clampedValue = computed(() => {
27
+ const v = this.value() ?? 0;
28
+ return Math.min(100, Math.max(0, v));
29
+ }, ...ngDevMode ? [{ debugName: "clampedValue" }] : /* istanbul ignore next */ []);
30
+ this.isIndeterminate = computed(() => this.mode() === "indeterminate", ...ngDevMode ? [{ debugName: "isIndeterminate" }] : /* istanbul ignore next */ []);
31
+ this.stepCount = computed(() => Math.max(0, Math.floor(this.steps() ?? 0)), ...ngDevMode ? [{ debugName: "stepCount" }] : /* istanbul ignore next */ []);
32
+ this.isSteps = computed(() => this.stepCount() > 0, ...ngDevMode ? [{ debugName: "isSteps" }] : /* istanbul ignore next */ []);
33
+ this.filledSteps = computed(() => Math.round(this.clampedValue() / 100 * this.stepCount()), ...ngDevMode ? [{ debugName: "filledSteps" }] : /* istanbul ignore next */ []);
34
+ this.segments = computed(() => {
35
+ const filled = this.filledSteps();
36
+ return Array.from({ length: this.stepCount() }, (_, i) => i < filled);
37
+ }, ...ngDevMode ? [{ debugName: "segments" }] : /* istanbul ignore next */ []);
38
+ this.showLabel = computed(() => this.showValue() && !this.isIndeterminate() && !this.isSteps(), ...ngDevMode ? [{ debugName: "showLabel" }] : /* istanbul ignore next */ []);
39
+ this.labelInside = computed(() => this.showLabel() && this.valuePosition() === "inside", ...ngDevMode ? [{ debugName: "labelInside" }] : /* istanbul ignore next */ []);
40
+ this.ariaValueNow = computed(() => this.isIndeterminate() ? null : this.clampedValue(), ...ngDevMode ? [{ debugName: "ariaValueNow" }] : /* istanbul ignore next */ []);
41
+ this.ariaValueText = computed(() => this.isSteps() ? `${this.filledSteps()} / ${this.stepCount()}` : null, ...ngDevMode ? [{ debugName: "ariaValueText" }] : /* istanbul ignore next */ []);
42
+ this.classes = computed(() => {
43
+ const c = ["ui-progress-bar", `_${this.valuePosition()}`];
44
+ if (this.size() !== "default") c.push(`_${this.size()}`);
45
+ if (this.isIndeterminate()) c.push("_indeterminate");
46
+ if (this.isSteps()) c.push("_steps");
47
+ return c.join(" ");
48
+ }, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
49
+ }
50
+ static {
51
+ this.ɵfac = i0.ɵɵngDeclareFactory({
52
+ minVersion: "12.0.0",
53
+ version: "22.3.0",
54
+ ngImport: i0,
55
+ type: UiProgressBar,
56
+ deps: [],
57
+ target: i0.ɵɵFactoryTarget.Component
58
+ });
59
+ }
60
+ static {
61
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
62
+ minVersion: "17.0.0",
63
+ version: "22.3.0",
64
+ type: UiProgressBar,
65
+ isStandalone: true,
66
+ selector: "ui-progress-bar",
67
+ inputs: {
68
+ value: {
69
+ classPropertyName: "value",
70
+ publicName: "value",
71
+ isSignal: true,
72
+ isRequired: false,
73
+ transformFunction: null
74
+ },
75
+ mode: {
76
+ classPropertyName: "mode",
77
+ publicName: "mode",
78
+ isSignal: true,
79
+ isRequired: false,
80
+ transformFunction: null
81
+ },
82
+ showValue: {
83
+ classPropertyName: "showValue",
84
+ publicName: "showValue",
85
+ isSignal: true,
86
+ isRequired: false,
87
+ transformFunction: null
88
+ },
89
+ unit: {
90
+ classPropertyName: "unit",
91
+ publicName: "unit",
92
+ isSignal: true,
93
+ isRequired: false,
94
+ transformFunction: null
95
+ },
96
+ size: {
97
+ classPropertyName: "size",
98
+ publicName: "size",
99
+ isSignal: true,
100
+ isRequired: false,
101
+ transformFunction: null
102
+ },
103
+ valuePosition: {
104
+ classPropertyName: "valuePosition",
105
+ publicName: "valuePosition",
106
+ isSignal: true,
107
+ isRequired: false,
108
+ transformFunction: null
109
+ },
110
+ steps: {
111
+ classPropertyName: "steps",
112
+ publicName: "steps",
113
+ isSignal: true,
114
+ isRequired: false,
115
+ transformFunction: null
116
+ },
117
+ color: {
118
+ classPropertyName: "color",
119
+ publicName: "color",
120
+ isSignal: true,
121
+ isRequired: false,
122
+ transformFunction: null
123
+ },
124
+ valueTemplate: {
125
+ classPropertyName: "valueTemplate",
126
+ publicName: "valueTemplate",
127
+ isSignal: true,
128
+ isRequired: false,
129
+ transformFunction: null
130
+ },
131
+ ariaLabel: {
132
+ classPropertyName: "ariaLabel",
133
+ publicName: "ariaLabel",
134
+ isSignal: true,
135
+ isRequired: false,
136
+ transformFunction: null
137
+ },
138
+ ariaLabelledBy: {
139
+ classPropertyName: "ariaLabelledBy",
140
+ publicName: "ariaLabelledBy",
141
+ isSignal: true,
142
+ isRequired: false,
143
+ transformFunction: null
144
+ }
145
+ },
146
+ ngImport: i0,
147
+ template: "<div [class]=\"classes()\" [style.--ui-progress-bar-color]=\"color() ?? null\">\n <div\n class=\"ui-progress-bar-track\"\n role=\"progressbar\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-valuenow]=\"ariaValueNow()\"\n [attr.aria-valuetext]=\"ariaValueText()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n >\n @if (isSteps()) {\n @for (active of segments(); track $index) {\n <span class=\"ui-progress-bar-segment\" [class._active]=\"active\"></span>\n }\n } @else if (isIndeterminate()) {\n <div class=\"ui-progress-bar-value _indeterminate\"></div>\n } @else {\n <div class=\"ui-progress-bar-value\" [style.width.%]=\"clampedValue()\">\n @if (labelInside()) {\n <span class=\"ui-progress-bar-value-label\">\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\n </span>\n }\n </div>\n }\n </div>\n\n @if (showLabel() && !labelInside()) {\n <div class=\"ui-progress-bar-label\">\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\n </div>\n }\n</div>\n\n<ng-template #labelTpl>\n @if (valueTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: clampedValue() }\"\n />\n } @else {\n {{ clampedValue() }}{{ unit() }}\n }\n</ng-template>\n",
148
+ styles: [":host{display:block;width:100%}.ui-progress-bar{display:flex;align-items:center;gap:var(--units-md);width:100%}.ui-progress-bar-track{position:relative;display:flex;flex:1 1 auto;overflow:hidden;height:var(--ui-progress-bar-track-height, .5rem);border-radius:var(--ui-progress-bar-track-radius, var(--radius-xs));background-color:var(--ui-progress-bar-track-surface, var(--global-border-default))}.ui-progress-bar-value{height:100%;border-radius:inherit;background-color:var(--ui-progress-bar-color, var(--informative-highlighthigh-surface-default));transition:width 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-progress-bar-segment{flex:1 1 0;height:100%;border-radius:var(--radius-2xs);background-color:var(--ui-progress-bar-track-surface, var(--global-border-default))}.ui-progress-bar-segment._active{background-color:var(--ui-progress-bar-color, var(--informative-highlighthigh-surface-default))}.ui-progress-bar-label{flex:0 0 auto;color:var(--ui-progress-bar-label-color, var(--global-text-default));font-family:var(--ui-progress-bar-font-family, var(--fontfamily-base));font-weight:var(--ui-progress-bar-label-weight, var(--weight-regular));font-size:var(--size-typography-text-default);line-height:1.2;white-space:nowrap}.ui-progress-bar._bottom{flex-direction:column;align-items:stretch;gap:var(--units-sm)}.ui-progress-bar._bottom .ui-progress-bar-label{align-self:flex-end}.ui-progress-bar._inside .ui-progress-bar-track{height:var(--size-components-xs);border-radius:var(--radius-sm)}.ui-progress-bar._inside .ui-progress-bar-value{display:flex;align-items:center;justify-content:center;overflow:hidden}.ui-progress-bar-value-label{padding-inline:var(--units-sm);color:var(--ui-progress-bar-value-label-color, var(--informative-highlighthigh-content-default));font-family:var(--ui-progress-bar-font-family, var(--fontfamily-base));font-weight:var(--ui-progress-bar-value-label-weight, var(--weight-bold));font-size:var(--size-typography-text-md);line-height:1.2;white-space:nowrap}.ui-progress-bar._steps .ui-progress-bar-track{gap:var(--units-2xs);overflow:visible;border-radius:0;background-color:transparent}.ui-progress-bar._small .ui-progress-bar-track{height:var(--ui-progress-bar-track-height-small, .25rem);border-radius:var(--ui-progress-bar-track-radius-small, var(--radius-2xs))}.ui-progress-bar._indeterminate .ui-progress-bar-value{position:absolute;inset-block:0;inset-inline-start:0;width:40%;animation:ui-progress-bar-indeterminate var(--ui-progress-bar-indeterminate-duration, 1.6s) var(--transition-easeinout) infinite}@keyframes ui-progress-bar-indeterminate{0%{inset-inline-start:-40%;width:40%}50%{inset-inline-start:30%;width:60%}to{inset-inline-start:100%;width:40%}}@media(prefers-reduced-motion:reduce){.ui-progress-bar-value{transition:none;animation:none}.ui-progress-bar._indeterminate .ui-progress-bar-value{inset-inline-start:0;width:100%;opacity:.6}}:host-context([data-motion=off]) .ui-progress-bar-value{transition:none;animation:none}:host-context([data-motion=off]) .ui-progress-bar._indeterminate .ui-progress-bar-value{inset-inline-start:0;width:100%;opacity:.6}\n"],
149
+ dependencies: [{
150
+ kind: "directive",
151
+ type: NgTemplateOutlet,
152
+ selector: "[ngTemplateOutlet]",
153
+ inputs: [
154
+ "ngTemplateOutletContext",
155
+ "ngTemplateOutlet",
156
+ "ngTemplateOutletInjector"
157
+ ]
158
+ }]
159
+ });
160
+ }
161
+ };
162
+ i0.ɵɵngDeclareClassMetadata({
163
+ minVersion: "12.0.0",
164
+ version: "22.3.0",
165
+ ngImport: i0,
166
+ type: UiProgressBar,
167
+ decorators: [{
168
+ type: Component,
169
+ args: [{
170
+ selector: "ui-progress-bar",
171
+ imports: [NgTemplateOutlet],
172
+ template: "<div [class]=\"classes()\" [style.--ui-progress-bar-color]=\"color() ?? null\">\n <div\n class=\"ui-progress-bar-track\"\n role=\"progressbar\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-valuenow]=\"ariaValueNow()\"\n [attr.aria-valuetext]=\"ariaValueText()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n >\n @if (isSteps()) {\n @for (active of segments(); track $index) {\n <span class=\"ui-progress-bar-segment\" [class._active]=\"active\"></span>\n }\n } @else if (isIndeterminate()) {\n <div class=\"ui-progress-bar-value _indeterminate\"></div>\n } @else {\n <div class=\"ui-progress-bar-value\" [style.width.%]=\"clampedValue()\">\n @if (labelInside()) {\n <span class=\"ui-progress-bar-value-label\">\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\n </span>\n }\n </div>\n }\n </div>\n\n @if (showLabel() && !labelInside()) {\n <div class=\"ui-progress-bar-label\">\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\n </div>\n }\n</div>\n\n<ng-template #labelTpl>\n @if (valueTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: clampedValue() }\"\n />\n } @else {\n {{ clampedValue() }}{{ unit() }}\n }\n</ng-template>\n",
173
+ styles: [":host{display:block;width:100%}.ui-progress-bar{display:flex;align-items:center;gap:var(--units-md);width:100%}.ui-progress-bar-track{position:relative;display:flex;flex:1 1 auto;overflow:hidden;height:var(--ui-progress-bar-track-height, .5rem);border-radius:var(--ui-progress-bar-track-radius, var(--radius-xs));background-color:var(--ui-progress-bar-track-surface, var(--global-border-default))}.ui-progress-bar-value{height:100%;border-radius:inherit;background-color:var(--ui-progress-bar-color, var(--informative-highlighthigh-surface-default));transition:width 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-progress-bar-segment{flex:1 1 0;height:100%;border-radius:var(--radius-2xs);background-color:var(--ui-progress-bar-track-surface, var(--global-border-default))}.ui-progress-bar-segment._active{background-color:var(--ui-progress-bar-color, var(--informative-highlighthigh-surface-default))}.ui-progress-bar-label{flex:0 0 auto;color:var(--ui-progress-bar-label-color, var(--global-text-default));font-family:var(--ui-progress-bar-font-family, var(--fontfamily-base));font-weight:var(--ui-progress-bar-label-weight, var(--weight-regular));font-size:var(--size-typography-text-default);line-height:1.2;white-space:nowrap}.ui-progress-bar._bottom{flex-direction:column;align-items:stretch;gap:var(--units-sm)}.ui-progress-bar._bottom .ui-progress-bar-label{align-self:flex-end}.ui-progress-bar._inside .ui-progress-bar-track{height:var(--size-components-xs);border-radius:var(--radius-sm)}.ui-progress-bar._inside .ui-progress-bar-value{display:flex;align-items:center;justify-content:center;overflow:hidden}.ui-progress-bar-value-label{padding-inline:var(--units-sm);color:var(--ui-progress-bar-value-label-color, var(--informative-highlighthigh-content-default));font-family:var(--ui-progress-bar-font-family, var(--fontfamily-base));font-weight:var(--ui-progress-bar-value-label-weight, var(--weight-bold));font-size:var(--size-typography-text-md);line-height:1.2;white-space:nowrap}.ui-progress-bar._steps .ui-progress-bar-track{gap:var(--units-2xs);overflow:visible;border-radius:0;background-color:transparent}.ui-progress-bar._small .ui-progress-bar-track{height:var(--ui-progress-bar-track-height-small, .25rem);border-radius:var(--ui-progress-bar-track-radius-small, var(--radius-2xs))}.ui-progress-bar._indeterminate .ui-progress-bar-value{position:absolute;inset-block:0;inset-inline-start:0;width:40%;animation:ui-progress-bar-indeterminate var(--ui-progress-bar-indeterminate-duration, 1.6s) var(--transition-easeinout) infinite}@keyframes ui-progress-bar-indeterminate{0%{inset-inline-start:-40%;width:40%}50%{inset-inline-start:30%;width:60%}to{inset-inline-start:100%;width:40%}}@media(prefers-reduced-motion:reduce){.ui-progress-bar-value{transition:none;animation:none}.ui-progress-bar._indeterminate .ui-progress-bar-value{inset-inline-start:0;width:100%;opacity:.6}}:host-context([data-motion=off]) .ui-progress-bar-value{transition:none;animation:none}:host-context([data-motion=off]) .ui-progress-bar._indeterminate .ui-progress-bar-value{inset-inline-start:0;width:100%;opacity:.6}\n"]
174
+ }]
175
+ }],
176
+ propDecorators: {
177
+ value: [{
178
+ type: i0.Input,
179
+ args: [{
180
+ isSignal: true,
181
+ alias: "value",
182
+ required: false
183
+ }]
184
+ }],
185
+ mode: [{
186
+ type: i0.Input,
187
+ args: [{
188
+ isSignal: true,
189
+ alias: "mode",
190
+ required: false
191
+ }]
192
+ }],
193
+ showValue: [{
194
+ type: i0.Input,
195
+ args: [{
196
+ isSignal: true,
197
+ alias: "showValue",
198
+ required: false
199
+ }]
200
+ }],
201
+ unit: [{
202
+ type: i0.Input,
203
+ args: [{
204
+ isSignal: true,
205
+ alias: "unit",
206
+ required: false
207
+ }]
208
+ }],
209
+ size: [{
210
+ type: i0.Input,
211
+ args: [{
212
+ isSignal: true,
213
+ alias: "size",
214
+ required: false
215
+ }]
216
+ }],
217
+ valuePosition: [{
218
+ type: i0.Input,
219
+ args: [{
220
+ isSignal: true,
221
+ alias: "valuePosition",
222
+ required: false
223
+ }]
224
+ }],
225
+ steps: [{
226
+ type: i0.Input,
227
+ args: [{
228
+ isSignal: true,
229
+ alias: "steps",
230
+ required: false
231
+ }]
232
+ }],
233
+ color: [{
234
+ type: i0.Input,
235
+ args: [{
236
+ isSignal: true,
237
+ alias: "color",
238
+ required: false
239
+ }]
240
+ }],
241
+ valueTemplate: [{
242
+ type: i0.Input,
243
+ args: [{
244
+ isSignal: true,
245
+ alias: "valueTemplate",
246
+ required: false
247
+ }]
248
+ }],
249
+ ariaLabel: [{
250
+ type: i0.Input,
251
+ args: [{
252
+ isSignal: true,
253
+ alias: "ariaLabel",
254
+ required: false
255
+ }]
256
+ }],
257
+ ariaLabelledBy: [{
258
+ type: i0.Input,
259
+ args: [{
260
+ isSignal: true,
261
+ alias: "ariaLabelledBy",
262
+ required: false
263
+ }]
264
+ }]
265
+ }
266
+ });
123
267
  export { UiProgressBar };
124
- //# sourceMappingURL=4sh-ui-kit-informative-ui-progress-bar.mjs.map
268
+
269
+ //# sourceMappingURL=4sh-ui-kit-informative-ui-progress-bar.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"4sh-ui-kit-informative-ui-progress-bar.mjs","sources":["../../../projects/ui-kit/informative/ui-progress-bar/src/lib/ui-progress-bar.ts","../../../projects/ui-kit/informative/ui-progress-bar/src/lib/ui-progress-bar.html","../../../projects/ui-kit/informative/ui-progress-bar/src/public-api.ts","../../../projects/ui-kit/informative/ui-progress-bar/src/4sh-ui-kit-informative-ui-progress-bar.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n input,\n numberAttribute,\n TemplateRef,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\n\nexport type UiProgressBarSize = 'default' | 'small';\nexport type UiProgressBarMode = 'determinate' | 'indeterminate';\nexport type UiProgressBarValuePosition = 'right' | 'bottom' | 'inside';\n\n/** Context passed to a custom value template. */\nexport interface UiProgressBarValueContext {\n $implicit: number;\n}\n\n/**\n * ui-progress-bar — process status indicator (headless).\n *\n * Renders a token-coloured track filled to `value`% (`determinate`), a looping\n * animation with no tracked value (`indeterminate`), or a set of discrete\n * segments when `steps` is provided. The completion value can be shown next to\n * (`right`) or below (`bottom`) the bar, formatted freely through a custom\n * `valueTemplate`. The fill colour is overridable per instance via `color`\n * (or the `--ui-progress-bar-color` CSS hook).\n *\n * Accessible: the track carries `role=\"progressbar\"` with `aria-valuemin`,\n * `aria-valuemax` and (when determinate) `aria-valuenow`; name it with\n * `ariaLabel` / `ariaLabelledBy`. Motion honours the OS reduced-motion\n * preference and the kit-wide `data-motion=\"off\"` switch.\n */\n@Component({\n selector: 'ui-progress-bar',\n imports: [NgTemplateOutlet],\n templateUrl: './ui-progress-bar.html',\n styleUrl: './ui-progress-bar.scss',\n})\nexport class UiProgressBar {\n /** Current progress, 0–100 (clamped). Ignored when `mode=\"indeterminate\"`. */\n value = input(0, { transform: numberAttribute });\n /** `determinate` tracks a value; `indeterminate` loops with no value. */\n mode = input<UiProgressBarMode>('determinate');\n /** Show the completion value beside/below the bar (determinate, non-steps). */\n showValue = input(true, { transform: booleanAttribute });\n /** Unit appended to the numeric value (e.g. \"%\"). */\n unit = input('%');\n /** Size preset. */\n size = input<UiProgressBarSize>('default');\n /**\n * Where the value label sits: beside (`right`), below (`bottom`), or centered\n * within the filled portion of the bar itself (`inside`).\n */\n valuePosition = input<UiProgressBarValuePosition>('right');\n /**\n * When > 0, render the bar as this many discrete segments; the number of\n * filled segments is derived from `value`. Hides the numeric label.\n */\n steps = input(0, { transform: numberAttribute });\n /** Fill colour override (any CSS colour). Sets `--ui-progress-bar-color`. */\n color = input<string>();\n /** Custom label content; context `{ $implicit: value }`. */\n valueTemplate = input<TemplateRef<UiProgressBarValueContext>>();\n /** Accessible name of the progress bar. */\n ariaLabel = input<string>();\n /** Id of the element labelling the progress bar. */\n ariaLabelledBy = input<string>();\n\n /** @ignore Value clamped to the 0–100 range. */\n protected readonly clampedValue = computed(() => {\n const v = this.value() ?? 0;\n return Math.min(100, Math.max(0, v));\n });\n\n /** @ignore */\n protected readonly isIndeterminate = computed(() => this.mode() === 'indeterminate');\n\n /** @ignore Whole number of segments requested (0 = continuous bar). */\n protected readonly stepCount = computed(() => Math.max(0, Math.floor(this.steps() ?? 0)));\n\n /** @ignore Steps mode is active. */\n protected readonly isSteps = computed(() => this.stepCount() > 0);\n\n /** @ignore Number of filled segments, derived from the value. */\n protected readonly filledSteps = computed(() =>\n Math.round((this.clampedValue() / 100) * this.stepCount()),\n );\n\n /** @ignore One boolean (active?) per segment. */\n protected readonly segments = computed(() => {\n const filled = this.filledSteps();\n return Array.from({ length: this.stepCount() }, (_, i) => i < filled);\n });\n\n /** @ignore The numeric label is rendered (not indeterminate, not steps). */\n protected readonly showLabel = computed(\n () => this.showValue() && !this.isIndeterminate() && !this.isSteps(),\n );\n\n /** @ignore Label sits inside the filled portion of the bar. */\n protected readonly labelInside = computed(\n () => this.showLabel() && this.valuePosition() === 'inside',\n );\n\n /** @ignore `aria-valuenow`: the value when tracked, otherwise omitted. */\n protected readonly ariaValueNow = computed(() =>\n this.isIndeterminate() ? null : this.clampedValue(),\n );\n\n /** @ignore Human-readable value for steps (\"3 / 5\"); omitted otherwise. */\n protected readonly ariaValueText = computed(() =>\n this.isSteps() ? `${this.filledSteps()} / ${this.stepCount()}` : null,\n );\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-progress-bar', `_${this.valuePosition()}`];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.isIndeterminate()) c.push('_indeterminate');\n if (this.isSteps()) c.push('_steps');\n return c.join(' ');\n });\n}\n","<div [class]=\"classes()\" [style.--ui-progress-bar-color]=\"color() ?? null\">\n <div\n class=\"ui-progress-bar-track\"\n role=\"progressbar\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-valuenow]=\"ariaValueNow()\"\n [attr.aria-valuetext]=\"ariaValueText()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n >\n @if (isSteps()) {\n @for (active of segments(); track $index) {\n <span class=\"ui-progress-bar-segment\" [class._active]=\"active\"></span>\n }\n } @else if (isIndeterminate()) {\n <div class=\"ui-progress-bar-value _indeterminate\"></div>\n } @else {\n <div class=\"ui-progress-bar-value\" [style.width.%]=\"clampedValue()\">\n @if (labelInside()) {\n <span class=\"ui-progress-bar-value-label\">\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\n </span>\n }\n </div>\n }\n </div>\n\n @if (showLabel() && !labelInside()) {\n <div class=\"ui-progress-bar-label\">\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\n </div>\n }\n</div>\n\n<ng-template #labelTpl>\n @if (valueTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: clampedValue() }\"\n />\n } @else {\n {{ clampedValue() }}{{ unit() }}\n }\n</ng-template>\n","/*\n * Public API Surface of ui-kit/ui-progress-bar\n */\n\nexport * from './lib/ui-progress-bar';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAmBA;;;;;;;;;;;;;;AAcG;MAOU,aAAa,CAAA;AAN1B,IAAA,WAAA,GAAA;;QAQE,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,CAAC,6EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;;QAEhD,IAAA,CAAA,IAAI,GAAG,KAAK,CAAoB,aAAa;iFAAC;;QAE9C,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,IAAI,iFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;QAExD,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,GAAG;iFAAC;;QAEjB,IAAA,CAAA,IAAI,GAAG,KAAK,CAAoB,SA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":3,"file":"4sh-ui-kit-informative-ui-progress-bar.mjs","names":[],"sources":["../../../projects/ui-kit/informative/ui-progress-bar/src/lib/ui-progress-bar.ts","../../../projects/ui-kit/informative/ui-progress-bar/src/lib/ui-progress-bar.html"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n input,\n numberAttribute,\n TemplateRef,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\n\nexport type UiProgressBarSize = 'default' | 'small';\nexport type UiProgressBarMode = 'determinate' | 'indeterminate';\nexport type UiProgressBarValuePosition = 'right' | 'bottom' | 'inside';\n\n/** Context passed to a custom value template. */\nexport interface UiProgressBarValueContext {\n $implicit: number;\n}\n\n/**\n * ui-progress-bar — process status indicator (headless).\n *\n * Renders a token-coloured track filled to `value`% (`determinate`), a looping\n * animation with no tracked value (`indeterminate`), or a set of discrete\n * segments when `steps` is provided. The completion value can be shown next to\n * (`right`) or below (`bottom`) the bar, formatted freely through a custom\n * `valueTemplate`. The fill colour is overridable per instance via `color`\n * (or the `--ui-progress-bar-color` CSS hook).\n *\n * Accessible: the track carries `role=\"progressbar\"` with `aria-valuemin`,\n * `aria-valuemax` and (when determinate) `aria-valuenow`; name it with\n * `ariaLabel` / `ariaLabelledBy`. Motion honours the OS reduced-motion\n * preference and the kit-wide `data-motion=\"off\"` switch.\n */\n@Component({\n selector: 'ui-progress-bar',\n imports: [NgTemplateOutlet],\n templateUrl: './ui-progress-bar.html',\n styleUrl: './ui-progress-bar.scss',\n})\nexport class UiProgressBar {\n /** Current progress, 0–100 (clamped). Ignored when `mode=\"indeterminate\"`. */\n value = input(0, { transform: numberAttribute });\n /** `determinate` tracks a value; `indeterminate` loops with no value. */\n mode = input<UiProgressBarMode>('determinate');\n /** Show the completion value beside/below the bar (determinate, non-steps). */\n showValue = input(true, { transform: booleanAttribute });\n /** Unit appended to the numeric value (e.g. \"%\"). */\n unit = input('%');\n /** Size preset. */\n size = input<UiProgressBarSize>('default');\n /**\n * Where the value label sits: beside (`right`), below (`bottom`), or centered\n * within the filled portion of the bar itself (`inside`).\n */\n valuePosition = input<UiProgressBarValuePosition>('right');\n /**\n * When > 0, render the bar as this many discrete segments; the number of\n * filled segments is derived from `value`. Hides the numeric label.\n */\n steps = input(0, { transform: numberAttribute });\n /** Fill colour override (any CSS colour). Sets `--ui-progress-bar-color`. */\n color = input<string>();\n /** Custom label content; context `{ $implicit: value }`. */\n valueTemplate = input<TemplateRef<UiProgressBarValueContext>>();\n /** Accessible name of the progress bar. */\n ariaLabel = input<string>();\n /** Id of the element labelling the progress bar. */\n ariaLabelledBy = input<string>();\n\n /** @ignore Value clamped to the 0–100 range. */\n protected readonly clampedValue = computed(() => {\n const v = this.value() ?? 0;\n return Math.min(100, Math.max(0, v));\n });\n\n /** @ignore */\n protected readonly isIndeterminate = computed(() => this.mode() === 'indeterminate');\n\n /** @ignore Whole number of segments requested (0 = continuous bar). */\n protected readonly stepCount = computed(() => Math.max(0, Math.floor(this.steps() ?? 0)));\n\n /** @ignore Steps mode is active. */\n protected readonly isSteps = computed(() => this.stepCount() > 0);\n\n /** @ignore Number of filled segments, derived from the value. */\n protected readonly filledSteps = computed(() =>\n Math.round((this.clampedValue() / 100) * this.stepCount()),\n );\n\n /** @ignore One boolean (active?) per segment. */\n protected readonly segments = computed(() => {\n const filled = this.filledSteps();\n return Array.from({ length: this.stepCount() }, (_, i) => i < filled);\n });\n\n /** @ignore The numeric label is rendered (not indeterminate, not steps). */\n protected readonly showLabel = computed(\n () => this.showValue() && !this.isIndeterminate() && !this.isSteps(),\n );\n\n /** @ignore Label sits inside the filled portion of the bar. */\n protected readonly labelInside = computed(\n () => this.showLabel() && this.valuePosition() === 'inside',\n );\n\n /** @ignore `aria-valuenow`: the value when tracked, otherwise omitted. */\n protected readonly ariaValueNow = computed(() =>\n this.isIndeterminate() ? null : this.clampedValue(),\n );\n\n /** @ignore Human-readable value for steps (\"3 / 5\"); omitted otherwise. */\n protected readonly ariaValueText = computed(() =>\n this.isSteps() ? `${this.filledSteps()} / ${this.stepCount()}` : null,\n );\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-progress-bar', `_${this.valuePosition()}`];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.isIndeterminate()) c.push('_indeterminate');\n if (this.isSteps()) c.push('_steps');\n return c.join(' ');\n });\n}\n","<div [class]=\"classes()\" [style.--ui-progress-bar-color]=\"color() ?? null\">\n <div\n class=\"ui-progress-bar-track\"\n role=\"progressbar\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-valuenow]=\"ariaValueNow()\"\n [attr.aria-valuetext]=\"ariaValueText()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n >\n @if (isSteps()) {\n @for (active of segments(); track $index) {\n <span class=\"ui-progress-bar-segment\" [class._active]=\"active\"></span>\n }\n } @else if (isIndeterminate()) {\n <div class=\"ui-progress-bar-value _indeterminate\"></div>\n } @else {\n <div class=\"ui-progress-bar-value\" [style.width.%]=\"clampedValue()\">\n @if (labelInside()) {\n <span class=\"ui-progress-bar-value-label\">\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\n </span>\n }\n </div>\n }\n </div>\n\n @if (showLabel() && !labelInside()) {\n <div class=\"ui-progress-bar-label\">\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\n </div>\n }\n</div>\n\n<ng-template #labelTpl>\n @if (valueTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: clampedValue() }\"\n />\n } @else {\n {{ clampedValue() }}{{ unit() }}\n }\n</ng-template>\n"],"mappings":";;;AAwCA,IAAa,gBAAb,MAAa,cAAa;CAN1B,cAAA;EAQE,KAAA,QAAQ,MAAM,GAAC;GAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;GAAI,WAAW;EAAe,CAAA;EAE7C,KAAA,OAAO,MA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