@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,393 +1,583 @@
1
- import * as i0 from '@angular/core';
2
- import { input, booleanAttribute, output, inject, ElementRef, DestroyRef, viewChildren, signal, computed, afterNextRender, afterRenderEffect, untracked, isDevMode, effect, forwardRef, Component } from '@angular/core';
3
- import { NgTemplateOutlet } from '@angular/common';
4
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
5
- import { BaseFieldControl } from '@4sh/ui-kit/forms';
6
- import { UiIcon } from '@4sh/ui-kit/base/ui-icon';
7
-
8
- /**
9
- * ui-segment-control — headless segmented control for choosing one (or, with
10
- * `multiple`, several) value(s) from a short list of inline buttons.
11
- *
12
- * Each segment is a real native `<button>`; the group carries WAI-ARIA semantics
13
- * (`radiogroup`/`radio` in single mode with roving arrow-key navigation and
14
- * select-on-arrow, `group`/`aria-pressed` in `multiple` mode) so keyboard and
15
- * screen-reader support come for free. Interactive states (hover/focus/pressed/
16
- * disabled) are pure CSS driven by the `actions.*` design tokens.
17
- *
18
- * In single mode a sliding indicator glides under the selected segment, timed by
19
- * the shared motion system (honours reduced-motion and the `motion` opt-out).
20
- *
21
- * Works standalone, with `[(ngModel)]`, reactive forms, or signal forms
22
- * (`[formField]`) — it is a `ControlValueAccessor`.
23
- *
24
- * @example
25
- * ```html
26
- * <ui-segment-control [(ngModel)]="view" [options]="['Liste', 'Grille']" />
27
- * ```
28
- */
29
- class UiSegmentControl extends BaseFieldControl {
30
- constructor() {
31
- super();
32
- /** Options to display, one button each. Primitives, objects, or `SegmentControlOption`. */
33
- this.options = input([], /* @ts-ignore */
34
- ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
35
- /** Field name to read a label from, when options are objects. */
36
- this.optionLabel = input(/* @ts-ignore */
37
- ...(ngDevMode ? [undefined, { debugName: "optionLabel" }] : /* istanbul ignore next */ []));
38
- /** Field name to read the value from, when options are objects. */
39
- this.optionValue = input(/* @ts-ignore */
40
- ...(ngDevMode ? [undefined, { debugName: "optionValue" }] : /* istanbul ignore next */ []));
41
- /** Field name to read the disabled flag from, when options are objects. */
42
- this.optionDisabled = input(/* @ts-ignore */
43
- ...(ngDevMode ? [undefined, { debugName: "optionDisabled" }] : /* istanbul ignore next */ []));
44
- /** Field name to read an icon name from, when options are objects. */
45
- this.optionIcon = input(/* @ts-ignore */
46
- ...(ngDevMode ? [undefined, { debugName: "optionIcon" }] : /* istanbul ignore next */ []));
47
- /** Property used to compare object values for equality (selection matching). */
48
- this.dataKey = input(/* @ts-ignore */
49
- ...(ngDevMode ? [undefined, { debugName: "dataKey" }] : /* istanbul ignore next */ []));
50
- /** Allow selecting several values at once (the model becomes an array). */
51
- this.multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
52
- /** Ripple Effect */
53
- this.ripple = input(true, { ...(ngDevMode ? { debugName: "ripple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
54
- /** Whether the selection can be fully cleared (single) / emptied (multiple). */
55
- this.allowEmpty = input(true, { ...(ngDevMode ? { debugName: "allowEmpty" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
56
- /** Size. */
57
- this.size = input('default', /* @ts-ignore */
58
- ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
59
- /** Layout axis (drives which arrow keys navigate). */
60
- this.orientation = input('horizontal', /* @ts-ignore */
61
- ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
62
- /** Span the full width of the parent (segments share the width evenly). */
63
- this.fluid = input(false, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
64
- /** Animate the sliding indicator (honours reduced-motion regardless). */
65
- this.motion = input(true, { ...(ngDevMode ? { debugName: "motion" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
66
- /** Custom template for a segment's content (receives `{ $implicit, option, selected, index }`). */
67
- this.itemTemplate = input(/* @ts-ignore */
68
- ...(ngDevMode ? [undefined, { debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
69
- /** Emitted on user selection with the new model value. */
70
- this.selectionChange = output();
71
- /** Emitted when a segment is clicked (even if it does not change the value). */
72
- this.optionClick = output();
73
- /** @ignore */
74
- this.host = inject(ElementRef);
75
- /** @ignore */
76
- this.hostDestroyRef = inject(DestroyRef);
77
- /** @ignore Native segment buttons (for roving focus + indicator measurement). */
78
- this.optionEls = viewChildren('optionBtn', /* @ts-ignore */
79
- ...(ngDevMode ? [{ debugName: "optionEls" }] : /* istanbul ignore next */ []));
80
- /** @ignore Current model value (written by the form or by user selection).
81
- * Redeclared over the base signal to keep `null` (not `undefined`) as the empty value. */
82
- this.modelValue = signal(null, /* @ts-ignore */
83
- ...(ngDevMode ? [{ debugName: "modelValue" }] : /* istanbul ignore next */ []));
84
- /** @ignore Index the roving focus last landed on. */
85
- this.focusedIndex = signal(0, /* @ts-ignore */
86
- ...(ngDevMode ? [{ debugName: "focusedIndex" }] : /* istanbul ignore next */ []));
87
- /** @ignore Measured geometry of the sliding indicator (null until first measure). */
88
- this.thumb = signal(null, /* @ts-ignore */
89
- ...(ngDevMode ? [{ debugName: "thumb" }] : /* istanbul ignore next */ []));
90
- /** @ignore Bumped by the ResizeObserver to re-measure the indicator. */
91
- this.resizeTick = signal(0, /* @ts-ignore */
92
- ...(ngDevMode ? [{ debugName: "resizeTick" }] : /* istanbul ignore next */ []));
93
- /** @ignore Icon size derived from the control size. */
94
- this.iconSize = computed(() => (this.size() === 'small' ? 'sm' : 'default'), /* @ts-ignore */
95
- ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
96
- /** @ignore Options resolved to a flat, render-ready shape. */
97
- this.normalizedOptions = computed(() => {
98
- const raw = this.options() ?? [];
99
- const model = this.modelValue();
100
- const groupDisabled = this.isDisabled();
101
- return raw.map((option, index) => {
102
- const value = this.resolveValue(option);
103
- const label = this.resolveLabel(option);
104
- return {
105
- key: `${this.uid}-${index}`,
106
- index,
107
- value,
108
- label,
109
- icon: this.resolveIcon(option),
110
- ariaLabel: this.resolveAriaLabel(option),
111
- disabled: groupDisabled || this.resolveDisabled(option),
112
- selected: this.isValueSelected(value, model),
113
- original: option,
114
- };
115
- });
116
- }, /* @ts-ignore */
117
- ...(ngDevMode ? [{ debugName: "normalizedOptions" }] : /* istanbul ignore next */ []));
118
- /** @ignore Index of the selected segment in single mode (-1 if none / multiple). */
119
- this.selectedIndex = computed(() => this.multiple() ? -1 : this.normalizedOptions().findIndex((o) => o.selected), /* @ts-ignore */
120
- ...(ngDevMode ? [{ debugName: "selectedIndex" }] : /* istanbul ignore next */ []));
121
- /** @ignore Whether the sliding indicator should render. */
122
- this.showThumb = computed(() => !this.multiple() && this.selectedIndex() !== -1 && this.thumb() !== null, /* @ts-ignore */
123
- ...(ngDevMode ? [{ debugName: "showThumb" }] : /* istanbul ignore next */ []));
124
- /** @ignore CSS transform positioning the indicator over the selected segment. */
125
- this.thumbTransform = computed(() => {
126
- const t = this.thumb();
127
- return t ? `translate(${t.x}px, ${t.y}px)` : null;
128
- }, /* @ts-ignore */
129
- ...(ngDevMode ? [{ debugName: "thumbTransform" }] : /* istanbul ignore next */ []));
130
- /** @ignore Segment that owns the group's single tab stop (roving tabindex). */
131
- this.rovingIndex = computed(() => {
132
- const opts = this.normalizedOptions();
133
- if (!opts.length)
134
- return -1;
135
- if (!this.multiple()) {
136
- const selected = opts.findIndex((o) => o.selected && !o.disabled);
137
- if (selected !== -1)
138
- return selected;
139
- }
140
- const focused = this.focusedIndex();
141
- if (opts[focused] && !opts[focused].disabled)
142
- return focused;
143
- return opts.findIndex((o) => !o.disabled);
144
- }, /* @ts-ignore */
145
- ...(ngDevMode ? [{ debugName: "rovingIndex" }] : /* istanbul ignore next */ []));
146
- // Re-measure the sliding indicator whenever the observed geometry changes.
147
- afterNextRender(() => {
148
- const ro = new ResizeObserver(() => this.resizeTick.update((v) => v + 1));
149
- ro.observe(this.host.nativeElement);
150
- this.hostDestroyRef.onDestroy(() => ro.disconnect());
151
- });
152
- // Track the selected segment with the indicator (single mode only).
153
- afterRenderEffect(() => {
154
- const index = this.selectedIndex();
155
- this.resizeTick();
156
- // Track layout-affecting inputs so the indicator follows re-layouts.
157
- this.size();
158
- this.orientation();
159
- this.fluid();
160
- this.normalizedOptions();
161
- if (this.multiple() || index === -1)
162
- return;
163
- const el = this.optionEls()[index]?.nativeElement;
164
- const track = this.host.nativeElement;
165
- if (!el)
166
- return;
167
- const next = {
168
- x: el.offsetLeft - track.clientLeft,
169
- y: el.offsetTop - track.clientTop,
170
- w: el.offsetWidth,
171
- h: el.offsetHeight,
172
- };
173
- const cur = untracked(this.thumb);
174
- if (!cur || cur.x !== next.x || cur.y !== next.y || cur.w !== next.w || cur.h !== next.h) {
175
- this.thumb.set(next);
176
- }
177
- });
178
- // A11y safeguards (dev only).
179
- if (isDevMode()) {
180
- effect(() => {
181
- if (!this.ariaLabel() && !this.ariaLabelledBy()) {
182
- console.warn('[ui-segment-control] Group has no accessible name: provide `ariaLabel` (or `ariaLabelledBy`).');
183
- }
184
- const iconOnly = this.normalizedOptions().some((o) => o.icon && !o.label && !o.ariaLabel);
185
- if (iconOnly) {
186
- console.warn('[ui-segment-control] Icon-only segment has no accessible name: add `ariaLabel` on the option.');
187
- }
188
- });
189
- }
190
- }
191
- /** @ignore */
192
- uidPrefix() {
193
- return 'ui-segment-control';
194
- }
195
- /** Move focus to the group's current tab stop. */
196
- focus(options) {
197
- const index = this.rovingIndex();
198
- if (index !== -1)
199
- this.optionEls()[index]?.nativeElement.focus(options);
200
- }
201
- /** @ignore The tabindex for a given segment (roving: one 0, the rest -1). */
202
- tabindexFor(index) {
203
- return index === this.rovingIndex() ? 0 : -1;
204
- }
205
- /** @ignore Select (or toggle / clear) a segment on user interaction. */
206
- select(option, event) {
207
- if (option.disabled || this.readonly())
208
- return;
209
- const value = option.value;
210
- let next;
211
- if (this.multiple()) {
212
- const current = Array.isArray(this.modelValue()) ? [...this.modelValue()] : [];
213
- const at = current.findIndex((v) => this.equals(v, value));
214
- if (at !== -1) {
215
- if (!this.allowEmpty() && current.length === 1)
216
- return; // keep at least one
217
- current.splice(at, 1);
218
- }
219
- else {
220
- current.push(value);
221
- }
222
- next = current;
223
- }
224
- else {
225
- if (option.selected) {
226
- if (!this.allowEmpty())
227
- return; // cannot clear the selection
228
- next = null;
229
- }
230
- else {
231
- next = value;
232
- }
233
- }
234
- this.focusedIndex.set(option.index);
235
- this.modelValue.set(next);
236
- this.emitChange(next);
237
- this.selectionChange.emit(next);
238
- this.optionClick.emit({
239
- option: option.original,
240
- value,
241
- index: option.index,
242
- originalEvent: event,
243
- });
244
- }
245
- /** @ignore */
246
- onOptionFocus(index) {
247
- this.focusedIndex.set(index);
248
- }
249
- /** @ignore Roving focus (and select-on-arrow in single mode). */
250
- onKeydown(event) {
251
- const horizontal = this.orientation() === 'horizontal';
252
- const nextKey = horizontal ? 'ArrowRight' : 'ArrowDown';
253
- const prevKey = horizontal ? 'ArrowLeft' : 'ArrowUp';
254
- if (![nextKey, prevKey, 'Home', 'End'].includes(event.key))
255
- return;
256
- const opts = this.normalizedOptions();
257
- const enabled = opts.filter((o) => !o.disabled);
258
- if (!enabled.length)
259
- return;
260
- event.preventDefault();
261
- let pos = enabled.findIndex((o) => o.index === this.focusedIndex());
262
- if (pos === -1)
263
- pos = 0;
264
- switch (event.key) {
265
- case nextKey:
266
- pos = (pos + 1) % enabled.length;
267
- break;
268
- case prevKey:
269
- pos = (pos - 1 + enabled.length) % enabled.length;
270
- break;
271
- case 'Home':
272
- pos = 0;
273
- break;
274
- case 'End':
275
- pos = enabled.length - 1;
276
- break;
277
- }
278
- const target = enabled[pos];
279
- this.focusedIndex.set(target.index);
280
- this.optionEls()[target.index]?.nativeElement.focus();
281
- // Single mode follows the radio pattern: arrows move AND select.
282
- if (!this.multiple())
283
- this.select(target, event);
284
- }
285
- /** @ignore Mark touched when focus leaves the whole group. */
286
- onFocusOut(event) {
287
- const next = event.relatedTarget;
288
- if (!next || !this.host.nativeElement.contains(next))
289
- this.emitTouch();
290
- }
291
- // --- Option resolution -------------------------------------------------
292
- /** @ignore */
293
- isObject(option) {
294
- return typeof option === 'object' && option !== null;
295
- }
296
- /** @ignore */
297
- resolveValue(option) {
298
- const field = this.optionValue();
299
- if (field && this.isObject(option))
300
- return option[field];
301
- if (this.isObject(option) && 'value' in option)
302
- return option['value'];
303
- return option;
304
- }
305
- /** @ignore */
306
- resolveLabel(option) {
307
- const field = this.optionLabel();
308
- if (field && this.isObject(option))
309
- return this.asText(option[field]);
310
- if (this.isObject(option))
311
- return 'label' in option ? this.asText(option['label']) : null;
312
- return this.asText(option);
313
- }
314
- /** @ignore */
315
- resolveIcon(option) {
316
- const field = this.optionIcon();
317
- if (field && this.isObject(option))
318
- return this.asText(option[field]);
319
- if (this.isObject(option) && 'icon' in option)
320
- return this.asText(option['icon']);
321
- return null;
322
- }
323
- /** @ignore */
324
- resolveAriaLabel(option) {
325
- if (this.isObject(option) && 'ariaLabel' in option)
326
- return this.asText(option['ariaLabel']);
327
- return null;
328
- }
329
- /** @ignore */
330
- resolveDisabled(option) {
331
- const field = this.optionDisabled();
332
- if (field && this.isObject(option))
333
- return !!option[field];
334
- if (this.isObject(option) && 'disabled' in option)
335
- return !!option['disabled'];
336
- return false;
337
- }
338
- /** @ignore */
339
- asText(value) {
340
- return value === null || value === undefined ? null : String(value);
341
- }
342
- /** @ignore Whether a resolved value is part of the current model. */
343
- isValueSelected(value, model) {
344
- if (this.multiple()) {
345
- return Array.isArray(model) && model.some((v) => this.equals(v, value));
346
- }
347
- return this.equals(model, value);
348
- }
349
- /** @ignore Value equality — by `dataKey` for objects, strict otherwise. */
350
- equals(a, b) {
351
- const key = this.dataKey();
352
- if (key && this.isObject(a) && this.isObject(b))
353
- return a[key] === b[key];
354
- return a === b;
355
- }
356
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiSegmentControl, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
357
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: UiSegmentControl, isStandalone: true, selector: "ui-segment-control", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, optionIcon: { classPropertyName: "optionIcon", publicName: "optionIcon", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null }, allowEmpty: { classPropertyName: "allowEmpty", publicName: "allowEmpty", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, motion: { classPropertyName: "motion", publicName: "motion", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectionChange: "selectionChange", optionClick: "optionClick" }, host: { listeners: { "keydown": "onKeydown($event)", "focusout": "onFocusOut($event)" }, properties: { "class._small": "size() === 'small'", "class._vertical": "orientation() === 'vertical'", "class._fluid": "fluid()", "class._multiple": "multiple()", "class._disabled": "isDisabled()", "class._invalid": "isInvalid()", "class._no-motion": "!motion()", "attr.role": "multiple() ? 'group' : 'radiogroup'", "attr.aria-label": "ariaLabel() || null", "attr.aria-labelledby": "ariaLabelledBy() || null", "attr.aria-invalid": "isInvalid() ? 'true' : null", "attr.aria-disabled": "isDisabled() ? 'true' : null" }, classAttribute: "ui-segment-control" }, providers: [
358
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiSegmentControl), multi: true },
359
- ], viewQueries: [{ propertyName: "optionEls", predicate: ["optionBtn"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (showThumb()) {\n <span\n class=\"ui-segment-control-thumb\"\n aria-hidden=\"true\"\n [style.transform]=\"thumbTransform()\"\n [style.width.px]=\"thumb()?.w\"\n [style.height.px]=\"thumb()?.h\"\n ></span>\n}\n\n@for (option of normalizedOptions(); track option.key) {\n <button\n #optionBtn\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-segment-control-option\"\n [class._selected]=\"option.selected\"\n [disabled]=\"option.disabled\"\n [attr.role]=\"multiple() ? null : 'radio'\"\n [attr.aria-checked]=\"multiple() ? null : option.selected\"\n [attr.aria-pressed]=\"multiple() ? option.selected : null\"\n [attr.aria-label]=\"option.ariaLabel\"\n [attr.tabindex]=\"tabindexFor(option.index)\"\n (click)=\"select(option, $event)\"\n (focus)=\"onOptionFocus(option.index)\"\n >\n @if (itemTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: option.original,\n option: option.original,\n selected: option.selected,\n index: option.index,\n }\"\n />\n } @else {\n @if (option.icon) {\n <ui-icon class=\"ui-segment-control-icon\" [name]=\"option.icon\" [size]=\"iconSize()\" />\n }\n @if (option.label) {\n <span class=\"ui-segment-control-label\" [attr.data-label]=\"option.label\">{{\n option.label\n }}</span>\n }\n }\n </button>\n}\n", styles: [":host{position:relative;display:inline-flex;align-items:stretch;box-sizing:border-box;padding:var(--ui-segment-control-padding, var(--units-xs));gap:var(--ui-segment-control-gap, 0);border-radius:var(--ui-segment-control-radius, var(--radius-md));box-shadow:inset 0 0 0 var(--ui-segment-control-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) var(--ui-segment-control-stroke, var(--global-border-default));font-family:var(--ui-segment-control-font-family, var(--fontfamily-base));-webkit-user-select:none;user-select:none;vertical-align:middle;min-height:var(--ui-segment-control-min-height, 2.75rem)}:host .ui-segment-control-option{min-height:var(--ui-segment-control-option-min-height, 2.25rem);min-width:var(--ui-segment-control-option-min-width, 2.25rem);padding:0 var(--ui-segment-control-option-padding-x, var(--units-default));font-size:var(--ui-segment-control-font-size, var(--size-typography-text-default))}:host._small{min-height:var(--ui-segment-control-min-height-small, 2.5rem)}:host._small .ui-segment-control-option{min-height:var(--ui-segment-control-option-min-height-small, 2rem);min-width:var(--ui-segment-control-option-min-width-small, 2rem);padding:0 var(--ui-segment-control-option-padding-x-small, var(--units-md));font-size:var(--ui-segment-control-font-size-small, var(--size-typography-text-md))}.ui-segment-control-thumb{position:absolute;top:0;left:0;z-index:0;border-radius:var(--ui-segment-control-thumb-radius, var(--radius-sm));background-color:var(--ui-segment-control-thumb-surface, var(--actions-high-surface-default));pointer-events:none;transition:transform 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),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),height 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)}@media(prefers-reduced-motion:reduce){.ui-segment-control-thumb{transition:none}}:root[data-motion=off] .ui-segment-control-thumb{transition:none}:host._no-motion .ui-segment-control-thumb{transition:none}.ui-segment-control-icon{line-height:0}.ui-segment-control-label{display:inline-flex;flex-direction:column;align-items:center}.ui-segment-control-label:after{content:attr(data-label);height:0;overflow:hidden;font-weight:var(--ui-segment-control-weight-selected, var(--weight-bold));visibility:hidden;pointer-events:none;-webkit-user-select:none;user-select:none}.ui-segment-control-option{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;gap:var(--ui-segment-control-option-gap, var(--units-sm));box-sizing:border-box;border:0;border-radius:var(--ui-segment-control-option-radius, var(--radius-sm));background-color:transparent;color:var(--ui-segment-control-option-color, var(--actions-low-content-default));font-family:inherit;font-weight:var(--ui-segment-control-weight, var(--weight-regular));line-height:1.2;white-space:nowrap;cursor:pointer;transition: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))),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-segment-control-option:hover:not(:disabled):not(._selected){background-color:var(--ui-segment-control-option-surface-hover, var(--actions-low-surface-hover));color:var(--ui-segment-control-option-color-hover, var(--actions-low-content-hover))}.ui-segment-control-option:active:not(:disabled):not(._selected){background-color:var(--ui-segment-control-option-surface-pressed, var(--actions-low-surface-pressed));color:var(--ui-segment-control-option-color-pressed, var(--actions-low-content-pressed))}.ui-segment-control-option:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-segment-control-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-segment-control-option-focus-ring-color, var(--actions-low-stroke-focused))}.ui-segment-control-option._selected{color:var(--ui-segment-control-option-color-selected, var(--actions-high-content-default));font-weight:var(--ui-segment-control-weight-selected, var(--weight-bold))}.ui-segment-control-option._selected:focus-visible{box-shadow:0 0 0 var(--ui-segment-control-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-segment-control-option-focus-ring-color, var(--actions-high-stroke-focused))}.ui-segment-control-option:disabled{cursor:not-allowed;color:var(--ui-segment-control-option-color-disabled, var(--actions-low-content-disabled))}.ui-segment-control-option:disabled._selected{color:var(--ui-segment-control-option-color-selected-disabled, var(--actions-high-content-disabled))}:host._multiple .ui-segment-control-option._selected{background-color:var(--ui-segment-control-option-surface-selected, var(--actions-high-surface-default))}:host._multiple .ui-segment-control-option._selected:hover:not(:disabled){background-color:var(--ui-segment-control-option-surface-hover, var(--actions-high-surface-hover));color:var(--ui-segment-control-option-color-hover, var(--actions-high-content-hover))}:host._multiple .ui-segment-control-option._selected:active:not(:disabled){background-color:var(--ui-segment-control-option-surface-pressed, var(--actions-high-surface-pressed));color:var(--ui-segment-control-option-color-pressed, var(--actions-high-content-pressed))}:host._multiple .ui-segment-control-option._selected:disabled{background-color:var(--ui-segment-control-option-surface-disabled, var(--actions-high-surface-disabled))}:host._fluid{display:flex;width:100%}:host._fluid .ui-segment-control-option{flex:1 1 0}:host._vertical{flex-direction:column;align-items:stretch}:host._vertical .ui-segment-control-option{width:100%}:host._invalid{box-shadow:inset 0 0 0 var(--ui-segment-control-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) var(--ui-segment-control-stroke-invalid, var(--form-error-stroke-default))}:host._disabled{cursor:not-allowed}:host._disabled .ui-segment-control-thumb{background-color:var(--ui-segment-control-thumb-surface-disabled, var(--actions-high-surface-disabled))}\n"], dependencies: [{ kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
360
- }
361
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiSegmentControl, decorators: [{
362
- type: Component,
363
- args: [{ selector: 'ui-segment-control', imports: [UiIcon, NgTemplateOutlet], providers: [
364
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiSegmentControl), multi: true },
365
- ], host: {
366
- class: 'ui-segment-control',
367
- '[class._small]': "size() === 'small'",
368
- '[class._vertical]': "orientation() === 'vertical'",
369
- '[class._fluid]': 'fluid()',
370
- '[class._multiple]': 'multiple()',
371
- '[class._disabled]': 'isDisabled()',
372
- '[class._invalid]': 'isInvalid()',
373
- '[class._no-motion]': '!motion()',
374
- '[attr.role]': "multiple() ? 'group' : 'radiogroup'",
375
- '[attr.aria-label]': 'ariaLabel() || null',
376
- '[attr.aria-labelledby]': 'ariaLabelledBy() || null',
377
- '[attr.aria-invalid]': "isInvalid() ? 'true' : null",
378
- '[attr.aria-disabled]': "isDisabled() ? 'true' : null",
379
- '(keydown)': 'onKeydown($event)',
380
- '(focusout)': 'onFocusOut($event)',
381
- }, template: "@if (showThumb()) {\n <span\n class=\"ui-segment-control-thumb\"\n aria-hidden=\"true\"\n [style.transform]=\"thumbTransform()\"\n [style.width.px]=\"thumb()?.w\"\n [style.height.px]=\"thumb()?.h\"\n ></span>\n}\n\n@for (option of normalizedOptions(); track option.key) {\n <button\n #optionBtn\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-segment-control-option\"\n [class._selected]=\"option.selected\"\n [disabled]=\"option.disabled\"\n [attr.role]=\"multiple() ? null : 'radio'\"\n [attr.aria-checked]=\"multiple() ? null : option.selected\"\n [attr.aria-pressed]=\"multiple() ? option.selected : null\"\n [attr.aria-label]=\"option.ariaLabel\"\n [attr.tabindex]=\"tabindexFor(option.index)\"\n (click)=\"select(option, $event)\"\n (focus)=\"onOptionFocus(option.index)\"\n >\n @if (itemTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: option.original,\n option: option.original,\n selected: option.selected,\n index: option.index,\n }\"\n />\n } @else {\n @if (option.icon) {\n <ui-icon class=\"ui-segment-control-icon\" [name]=\"option.icon\" [size]=\"iconSize()\" />\n }\n @if (option.label) {\n <span class=\"ui-segment-control-label\" [attr.data-label]=\"option.label\">{{\n option.label\n }}</span>\n }\n }\n </button>\n}\n", styles: [":host{position:relative;display:inline-flex;align-items:stretch;box-sizing:border-box;padding:var(--ui-segment-control-padding, var(--units-xs));gap:var(--ui-segment-control-gap, 0);border-radius:var(--ui-segment-control-radius, var(--radius-md));box-shadow:inset 0 0 0 var(--ui-segment-control-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) var(--ui-segment-control-stroke, var(--global-border-default));font-family:var(--ui-segment-control-font-family, var(--fontfamily-base));-webkit-user-select:none;user-select:none;vertical-align:middle;min-height:var(--ui-segment-control-min-height, 2.75rem)}:host .ui-segment-control-option{min-height:var(--ui-segment-control-option-min-height, 2.25rem);min-width:var(--ui-segment-control-option-min-width, 2.25rem);padding:0 var(--ui-segment-control-option-padding-x, var(--units-default));font-size:var(--ui-segment-control-font-size, var(--size-typography-text-default))}:host._small{min-height:var(--ui-segment-control-min-height-small, 2.5rem)}:host._small .ui-segment-control-option{min-height:var(--ui-segment-control-option-min-height-small, 2rem);min-width:var(--ui-segment-control-option-min-width-small, 2rem);padding:0 var(--ui-segment-control-option-padding-x-small, var(--units-md));font-size:var(--ui-segment-control-font-size-small, var(--size-typography-text-md))}.ui-segment-control-thumb{position:absolute;top:0;left:0;z-index:0;border-radius:var(--ui-segment-control-thumb-radius, var(--radius-sm));background-color:var(--ui-segment-control-thumb-surface, var(--actions-high-surface-default));pointer-events:none;transition:transform 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),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),height 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)}@media(prefers-reduced-motion:reduce){.ui-segment-control-thumb{transition:none}}:root[data-motion=off] .ui-segment-control-thumb{transition:none}:host._no-motion .ui-segment-control-thumb{transition:none}.ui-segment-control-icon{line-height:0}.ui-segment-control-label{display:inline-flex;flex-direction:column;align-items:center}.ui-segment-control-label:after{content:attr(data-label);height:0;overflow:hidden;font-weight:var(--ui-segment-control-weight-selected, var(--weight-bold));visibility:hidden;pointer-events:none;-webkit-user-select:none;user-select:none}.ui-segment-control-option{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;gap:var(--ui-segment-control-option-gap, var(--units-sm));box-sizing:border-box;border:0;border-radius:var(--ui-segment-control-option-radius, var(--radius-sm));background-color:transparent;color:var(--ui-segment-control-option-color, var(--actions-low-content-default));font-family:inherit;font-weight:var(--ui-segment-control-weight, var(--weight-regular));line-height:1.2;white-space:nowrap;cursor:pointer;transition: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))),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-segment-control-option:hover:not(:disabled):not(._selected){background-color:var(--ui-segment-control-option-surface-hover, var(--actions-low-surface-hover));color:var(--ui-segment-control-option-color-hover, var(--actions-low-content-hover))}.ui-segment-control-option:active:not(:disabled):not(._selected){background-color:var(--ui-segment-control-option-surface-pressed, var(--actions-low-surface-pressed));color:var(--ui-segment-control-option-color-pressed, var(--actions-low-content-pressed))}.ui-segment-control-option:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-segment-control-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-segment-control-option-focus-ring-color, var(--actions-low-stroke-focused))}.ui-segment-control-option._selected{color:var(--ui-segment-control-option-color-selected, var(--actions-high-content-default));font-weight:var(--ui-segment-control-weight-selected, var(--weight-bold))}.ui-segment-control-option._selected:focus-visible{box-shadow:0 0 0 var(--ui-segment-control-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-segment-control-option-focus-ring-color, var(--actions-high-stroke-focused))}.ui-segment-control-option:disabled{cursor:not-allowed;color:var(--ui-segment-control-option-color-disabled, var(--actions-low-content-disabled))}.ui-segment-control-option:disabled._selected{color:var(--ui-segment-control-option-color-selected-disabled, var(--actions-high-content-disabled))}:host._multiple .ui-segment-control-option._selected{background-color:var(--ui-segment-control-option-surface-selected, var(--actions-high-surface-default))}:host._multiple .ui-segment-control-option._selected:hover:not(:disabled){background-color:var(--ui-segment-control-option-surface-hover, var(--actions-high-surface-hover));color:var(--ui-segment-control-option-color-hover, var(--actions-high-content-hover))}:host._multiple .ui-segment-control-option._selected:active:not(:disabled){background-color:var(--ui-segment-control-option-surface-pressed, var(--actions-high-surface-pressed));color:var(--ui-segment-control-option-color-pressed, var(--actions-high-content-pressed))}:host._multiple .ui-segment-control-option._selected:disabled{background-color:var(--ui-segment-control-option-surface-disabled, var(--actions-high-surface-disabled))}:host._fluid{display:flex;width:100%}:host._fluid .ui-segment-control-option{flex:1 1 0}:host._vertical{flex-direction:column;align-items:stretch}:host._vertical .ui-segment-control-option{width:100%}:host._invalid{box-shadow:inset 0 0 0 var(--ui-segment-control-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) var(--ui-segment-control-stroke-invalid, var(--form-error-stroke-default))}:host._disabled{cursor:not-allowed}:host._disabled .ui-segment-control-thumb{background-color:var(--ui-segment-control-thumb-surface-disabled, var(--actions-high-surface-disabled))}\n"] }]
382
- }], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], optionIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionIcon", required: false }] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], ripple: [{ type: i0.Input, args: [{ isSignal: true, alias: "ripple", required: false }] }], allowEmpty: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowEmpty", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], motion: [{ type: i0.Input, args: [{ isSignal: true, alias: "motion", required: false }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], optionClick: [{ type: i0.Output, args: ["optionClick"] }], optionEls: [{ type: i0.ViewChildren, args: ['optionBtn', { isSignal: true }] }] } });
383
-
384
- /*
385
- * Public API Surface of ui-kit/ui-segment-control
386
- */
387
-
388
- /**
389
- * Generated bundle index. Do not edit.
390
- */
391
-
1
+ import * as i0 from "@angular/core";
2
+ import { Component, DestroyRef, ElementRef, afterNextRender, afterRenderEffect, booleanAttribute, computed, effect, forwardRef, inject, input, isDevMode, output, signal, untracked, viewChildren } from "@angular/core";
3
+ import { NgTemplateOutlet } from "@angular/common";
4
+ import { NG_VALUE_ACCESSOR } from "@angular/forms";
5
+ import { BaseFieldControl } from "@4sh/ui-kit/forms";
6
+ import { UiIcon } from "@4sh/ui-kit/base/ui-icon";
7
+ var UiSegmentControl = class UiSegmentControl extends BaseFieldControl {
8
+ constructor() {
9
+ super();
10
+ this.options = input([], ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
11
+ this.optionLabel = input(...ngDevMode ? [void 0, { debugName: "optionLabel" }] : /* istanbul ignore next */ []);
12
+ this.optionValue = input(...ngDevMode ? [void 0, { debugName: "optionValue" }] : /* istanbul ignore next */ []);
13
+ this.optionDisabled = input(...ngDevMode ? [void 0, { debugName: "optionDisabled" }] : /* istanbul ignore next */ []);
14
+ this.optionIcon = input(...ngDevMode ? [void 0, { debugName: "optionIcon" }] : /* istanbul ignore next */ []);
15
+ this.dataKey = input(...ngDevMode ? [void 0, { debugName: "dataKey" }] : /* istanbul ignore next */ []);
16
+ this.multiple = input(false, {
17
+ ...ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {},
18
+ transform: booleanAttribute
19
+ });
20
+ this.ripple = input(true, {
21
+ ...ngDevMode ? { debugName: "ripple" } : /* istanbul ignore next */ {},
22
+ transform: booleanAttribute
23
+ });
24
+ this.allowEmpty = input(true, {
25
+ ...ngDevMode ? { debugName: "allowEmpty" } : /* istanbul ignore next */ {},
26
+ transform: booleanAttribute
27
+ });
28
+ this.size = input("default", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
29
+ this.orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
30
+ this.fluid = input(false, {
31
+ ...ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {},
32
+ transform: booleanAttribute
33
+ });
34
+ this.motion = input(true, {
35
+ ...ngDevMode ? { debugName: "motion" } : /* istanbul ignore next */ {},
36
+ transform: booleanAttribute
37
+ });
38
+ this.itemTemplate = input(...ngDevMode ? [void 0, { debugName: "itemTemplate" }] : /* istanbul ignore next */ []);
39
+ this.selectionChange = output();
40
+ this.optionClick = output();
41
+ this.host = inject(ElementRef);
42
+ this.hostDestroyRef = inject(DestroyRef);
43
+ this.optionEls = viewChildren("optionBtn", ...ngDevMode ? [{ debugName: "optionEls" }] : /* istanbul ignore next */ []);
44
+ this.modelValue = signal(null, ...ngDevMode ? [{ debugName: "modelValue" }] : /* istanbul ignore next */ []);
45
+ this.focusedIndex = signal(0, ...ngDevMode ? [{ debugName: "focusedIndex" }] : /* istanbul ignore next */ []);
46
+ this.thumb = signal(null, ...ngDevMode ? [{ debugName: "thumb" }] : /* istanbul ignore next */ []);
47
+ this.resizeTick = signal(0, ...ngDevMode ? [{ debugName: "resizeTick" }] : /* istanbul ignore next */ []);
48
+ this.iconSize = computed(() => this.size() === "small" ? "sm" : "default", ...ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []);
49
+ this.normalizedOptions = computed(() => {
50
+ const raw = this.options() ?? [];
51
+ const model = this.modelValue();
52
+ const groupDisabled = this.isDisabled();
53
+ return raw.map((option, index) => {
54
+ const value = this.resolveValue(option);
55
+ const label = this.resolveLabel(option);
56
+ return {
57
+ key: `${this.uid}-${index}`,
58
+ index,
59
+ value,
60
+ label,
61
+ icon: this.resolveIcon(option),
62
+ ariaLabel: this.resolveAriaLabel(option),
63
+ disabled: groupDisabled || this.resolveDisabled(option),
64
+ selected: this.isValueSelected(value, model),
65
+ original: option
66
+ };
67
+ });
68
+ }, ...ngDevMode ? [{ debugName: "normalizedOptions" }] : /* istanbul ignore next */ []);
69
+ this.selectedIndex = computed(() => this.multiple() ? -1 : this.normalizedOptions().findIndex((o) => o.selected), ...ngDevMode ? [{ debugName: "selectedIndex" }] : /* istanbul ignore next */ []);
70
+ this.showThumb = computed(() => !this.multiple() && this.selectedIndex() !== -1 && this.thumb() !== null, ...ngDevMode ? [{ debugName: "showThumb" }] : /* istanbul ignore next */ []);
71
+ this.thumbTransform = computed(() => {
72
+ const t = this.thumb();
73
+ return t ? `translate(${t.x}px, ${t.y}px)` : null;
74
+ }, ...ngDevMode ? [{ debugName: "thumbTransform" }] : /* istanbul ignore next */ []);
75
+ this.rovingIndex = computed(() => {
76
+ const opts = this.normalizedOptions();
77
+ if (!opts.length) return -1;
78
+ if (!this.multiple()) {
79
+ const selected = opts.findIndex((o) => o.selected && !o.disabled);
80
+ if (selected !== -1) return selected;
81
+ }
82
+ const focused = this.focusedIndex();
83
+ if (opts[focused] && !opts[focused].disabled) return focused;
84
+ return opts.findIndex((o) => !o.disabled);
85
+ }, ...ngDevMode ? [{ debugName: "rovingIndex" }] : /* istanbul ignore next */ []);
86
+ afterNextRender(() => {
87
+ const ro = new ResizeObserver(() => this.resizeTick.update((v) => v + 1));
88
+ ro.observe(this.host.nativeElement);
89
+ this.hostDestroyRef.onDestroy(() => ro.disconnect());
90
+ });
91
+ afterRenderEffect(() => {
92
+ const index = this.selectedIndex();
93
+ this.resizeTick();
94
+ this.size();
95
+ this.orientation();
96
+ this.fluid();
97
+ this.normalizedOptions();
98
+ if (this.multiple() || index === -1) return;
99
+ const el = this.optionEls()[index]?.nativeElement;
100
+ const track = this.host.nativeElement;
101
+ if (!el) return;
102
+ const next = {
103
+ x: el.offsetLeft - track.clientLeft,
104
+ y: el.offsetTop - track.clientTop,
105
+ w: el.offsetWidth,
106
+ h: el.offsetHeight
107
+ };
108
+ const cur = untracked(this.thumb);
109
+ if (!cur || cur.x !== next.x || cur.y !== next.y || cur.w !== next.w || cur.h !== next.h) this.thumb.set(next);
110
+ });
111
+ if (isDevMode()) effect(() => {
112
+ if (!this.ariaLabel() && !this.ariaLabelledBy()) console.warn("[ui-segment-control] Group has no accessible name: provide `ariaLabel` (or `ariaLabelledBy`).");
113
+ if (this.normalizedOptions().some((o) => o.icon && !o.label && !o.ariaLabel)) console.warn("[ui-segment-control] Icon-only segment has no accessible name: add `ariaLabel` on the option.");
114
+ });
115
+ }
116
+ uidPrefix() {
117
+ return "ui-segment-control";
118
+ }
119
+ focus(options) {
120
+ const index = this.rovingIndex();
121
+ if (index !== -1) this.optionEls()[index]?.nativeElement.focus(options);
122
+ }
123
+ tabindexFor(index) {
124
+ return index === this.rovingIndex() ? 0 : -1;
125
+ }
126
+ select(option, event) {
127
+ if (option.disabled || this.readonly()) return;
128
+ const value = option.value;
129
+ let next;
130
+ if (this.multiple()) {
131
+ const current = Array.isArray(this.modelValue()) ? [...this.modelValue()] : [];
132
+ const at = current.findIndex((v) => this.equals(v, value));
133
+ if (at !== -1) {
134
+ if (!this.allowEmpty() && current.length === 1) return;
135
+ current.splice(at, 1);
136
+ } else current.push(value);
137
+ next = current;
138
+ } else if (option.selected) {
139
+ if (!this.allowEmpty()) return;
140
+ next = null;
141
+ } else next = value;
142
+ this.focusedIndex.set(option.index);
143
+ this.modelValue.set(next);
144
+ this.emitChange(next);
145
+ this.selectionChange.emit(next);
146
+ this.optionClick.emit({
147
+ option: option.original,
148
+ value,
149
+ index: option.index,
150
+ originalEvent: event
151
+ });
152
+ }
153
+ onOptionFocus(index) {
154
+ this.focusedIndex.set(index);
155
+ }
156
+ onKeydown(event) {
157
+ const horizontal = this.orientation() === "horizontal";
158
+ const nextKey = horizontal ? "ArrowRight" : "ArrowDown";
159
+ const prevKey = horizontal ? "ArrowLeft" : "ArrowUp";
160
+ if (![
161
+ nextKey,
162
+ prevKey,
163
+ "Home",
164
+ "End"
165
+ ].includes(event.key)) return;
166
+ const enabled = this.normalizedOptions().filter((o) => !o.disabled);
167
+ if (!enabled.length) return;
168
+ event.preventDefault();
169
+ let pos = enabled.findIndex((o) => o.index === this.focusedIndex());
170
+ if (pos === -1) pos = 0;
171
+ switch (event.key) {
172
+ case nextKey:
173
+ pos = (pos + 1) % enabled.length;
174
+ break;
175
+ case prevKey:
176
+ pos = (pos - 1 + enabled.length) % enabled.length;
177
+ break;
178
+ case "Home":
179
+ pos = 0;
180
+ break;
181
+ case "End": pos = enabled.length - 1;
182
+ }
183
+ const target = enabled[pos];
184
+ this.focusedIndex.set(target.index);
185
+ this.optionEls()[target.index]?.nativeElement.focus();
186
+ if (!this.multiple()) this.select(target, event);
187
+ }
188
+ onFocusOut(event) {
189
+ const next = event.relatedTarget;
190
+ if (!next || !this.host.nativeElement.contains(next)) this.emitTouch();
191
+ }
192
+ isObject(option) {
193
+ return typeof option === "object" && option !== null;
194
+ }
195
+ resolveValue(option) {
196
+ const field = this.optionValue();
197
+ if (field && this.isObject(option)) return option[field];
198
+ if (this.isObject(option) && "value" in option) return option["value"];
199
+ return option;
200
+ }
201
+ resolveLabel(option) {
202
+ const field = this.optionLabel();
203
+ if (field && this.isObject(option)) return this.asText(option[field]);
204
+ if (this.isObject(option)) return "label" in option ? this.asText(option["label"]) : null;
205
+ return this.asText(option);
206
+ }
207
+ resolveIcon(option) {
208
+ const field = this.optionIcon();
209
+ if (field && this.isObject(option)) return this.asText(option[field]);
210
+ if (this.isObject(option) && "icon" in option) return this.asText(option["icon"]);
211
+ return null;
212
+ }
213
+ resolveAriaLabel(option) {
214
+ if (this.isObject(option) && "ariaLabel" in option) return this.asText(option["ariaLabel"]);
215
+ return null;
216
+ }
217
+ resolveDisabled(option) {
218
+ const field = this.optionDisabled();
219
+ if (field && this.isObject(option)) return !!option[field];
220
+ if (this.isObject(option) && "disabled" in option) return !!option["disabled"];
221
+ return false;
222
+ }
223
+ asText(value) {
224
+ return value === null || value === void 0 ? null : String(value);
225
+ }
226
+ isValueSelected(value, model) {
227
+ if (this.multiple()) return Array.isArray(model) && model.some((v) => this.equals(v, value));
228
+ return this.equals(model, value);
229
+ }
230
+ equals(a, b) {
231
+ const key = this.dataKey();
232
+ if (key && this.isObject(a) && this.isObject(b)) return a[key] === b[key];
233
+ return a === b;
234
+ }
235
+ static {
236
+ this.ɵfac = i0.ɵɵngDeclareFactory({
237
+ minVersion: "12.0.0",
238
+ version: "22.3.0",
239
+ ngImport: i0,
240
+ type: UiSegmentControl,
241
+ deps: [],
242
+ target: i0.ɵɵFactoryTarget.Component
243
+ });
244
+ }
245
+ static {
246
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
247
+ minVersion: "17.0.0",
248
+ version: "22.3.0",
249
+ type: UiSegmentControl,
250
+ isStandalone: true,
251
+ selector: "ui-segment-control",
252
+ inputs: {
253
+ options: {
254
+ classPropertyName: "options",
255
+ publicName: "options",
256
+ isSignal: true,
257
+ isRequired: false,
258
+ transformFunction: null
259
+ },
260
+ optionLabel: {
261
+ classPropertyName: "optionLabel",
262
+ publicName: "optionLabel",
263
+ isSignal: true,
264
+ isRequired: false,
265
+ transformFunction: null
266
+ },
267
+ optionValue: {
268
+ classPropertyName: "optionValue",
269
+ publicName: "optionValue",
270
+ isSignal: true,
271
+ isRequired: false,
272
+ transformFunction: null
273
+ },
274
+ optionDisabled: {
275
+ classPropertyName: "optionDisabled",
276
+ publicName: "optionDisabled",
277
+ isSignal: true,
278
+ isRequired: false,
279
+ transformFunction: null
280
+ },
281
+ optionIcon: {
282
+ classPropertyName: "optionIcon",
283
+ publicName: "optionIcon",
284
+ isSignal: true,
285
+ isRequired: false,
286
+ transformFunction: null
287
+ },
288
+ dataKey: {
289
+ classPropertyName: "dataKey",
290
+ publicName: "dataKey",
291
+ isSignal: true,
292
+ isRequired: false,
293
+ transformFunction: null
294
+ },
295
+ multiple: {
296
+ classPropertyName: "multiple",
297
+ publicName: "multiple",
298
+ isSignal: true,
299
+ isRequired: false,
300
+ transformFunction: null
301
+ },
302
+ ripple: {
303
+ classPropertyName: "ripple",
304
+ publicName: "ripple",
305
+ isSignal: true,
306
+ isRequired: false,
307
+ transformFunction: null
308
+ },
309
+ allowEmpty: {
310
+ classPropertyName: "allowEmpty",
311
+ publicName: "allowEmpty",
312
+ isSignal: true,
313
+ isRequired: false,
314
+ transformFunction: null
315
+ },
316
+ size: {
317
+ classPropertyName: "size",
318
+ publicName: "size",
319
+ isSignal: true,
320
+ isRequired: false,
321
+ transformFunction: null
322
+ },
323
+ orientation: {
324
+ classPropertyName: "orientation",
325
+ publicName: "orientation",
326
+ isSignal: true,
327
+ isRequired: false,
328
+ transformFunction: null
329
+ },
330
+ fluid: {
331
+ classPropertyName: "fluid",
332
+ publicName: "fluid",
333
+ isSignal: true,
334
+ isRequired: false,
335
+ transformFunction: null
336
+ },
337
+ motion: {
338
+ classPropertyName: "motion",
339
+ publicName: "motion",
340
+ isSignal: true,
341
+ isRequired: false,
342
+ transformFunction: null
343
+ },
344
+ itemTemplate: {
345
+ classPropertyName: "itemTemplate",
346
+ publicName: "itemTemplate",
347
+ isSignal: true,
348
+ isRequired: false,
349
+ transformFunction: null
350
+ }
351
+ },
352
+ outputs: {
353
+ selectionChange: "selectionChange",
354
+ optionClick: "optionClick"
355
+ },
356
+ host: {
357
+ listeners: {
358
+ "keydown": "onKeydown($event)",
359
+ "focusout": "onFocusOut($event)"
360
+ },
361
+ properties: {
362
+ "class._small": "size() === 'small'",
363
+ "class._vertical": "orientation() === 'vertical'",
364
+ "class._fluid": "fluid()",
365
+ "class._multiple": "multiple()",
366
+ "class._disabled": "isDisabled()",
367
+ "class._invalid": "isInvalid()",
368
+ "class._no-motion": "!motion()",
369
+ "attr.role": "multiple() ? 'group' : 'radiogroup'",
370
+ "attr.aria-label": "ariaLabel() || null",
371
+ "attr.aria-labelledby": "ariaLabelledBy() || null",
372
+ "attr.aria-invalid": "isInvalid() ? 'true' : null",
373
+ "attr.aria-disabled": "isDisabled() ? 'true' : null"
374
+ },
375
+ classAttribute: "ui-segment-control"
376
+ },
377
+ providers: [{
378
+ provide: NG_VALUE_ACCESSOR,
379
+ useExisting: forwardRef(() => UiSegmentControl),
380
+ multi: true
381
+ }],
382
+ viewQueries: [{
383
+ propertyName: "optionEls",
384
+ predicate: ["optionBtn"],
385
+ descendants: true,
386
+ isSignal: true
387
+ }],
388
+ usesInheritance: true,
389
+ ngImport: i0,
390
+ template: "@if (showThumb()) {\n <span\n class=\"ui-segment-control-thumb\"\n aria-hidden=\"true\"\n [style.transform]=\"thumbTransform()\"\n [style.width.px]=\"thumb()?.w\"\n [style.height.px]=\"thumb()?.h\"\n ></span>\n}\n\n@for (option of normalizedOptions(); track option.key) {\n <button\n #optionBtn\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-segment-control-option\"\n [class._selected]=\"option.selected\"\n [disabled]=\"option.disabled\"\n [attr.role]=\"multiple() ? null : 'radio'\"\n [attr.aria-checked]=\"multiple() ? null : option.selected\"\n [attr.aria-pressed]=\"multiple() ? option.selected : null\"\n [attr.aria-label]=\"option.ariaLabel\"\n [attr.tabindex]=\"tabindexFor(option.index)\"\n (click)=\"select(option, $event)\"\n (focus)=\"onOptionFocus(option.index)\"\n >\n @if (itemTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: option.original,\n option: option.original,\n selected: option.selected,\n index: option.index,\n }\"\n />\n } @else {\n @if (option.icon) {\n <ui-icon class=\"ui-segment-control-icon\" [name]=\"option.icon\" [size]=\"iconSize()\" />\n }\n @if (option.label) {\n <span class=\"ui-segment-control-label\" [attr.data-label]=\"option.label\">{{\n option.label\n }}</span>\n }\n }\n </button>\n}\n",
391
+ styles: [":host{position:relative;display:inline-flex;align-items:stretch;box-sizing:border-box;padding:var(--ui-segment-control-padding, var(--units-xs));gap:var(--ui-segment-control-gap, 0);border-radius:var(--ui-segment-control-radius, var(--radius-md));box-shadow:inset 0 0 0 var(--ui-segment-control-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) var(--ui-segment-control-stroke, var(--global-border-default));font-family:var(--ui-segment-control-font-family, var(--fontfamily-base));-webkit-user-select:none;user-select:none;vertical-align:middle;min-height:var(--ui-segment-control-min-height, 2.75rem)}:host .ui-segment-control-option{min-height:var(--ui-segment-control-option-min-height, 2.25rem);min-width:var(--ui-segment-control-option-min-width, 2.25rem);padding:0 var(--ui-segment-control-option-padding-x, var(--units-default));font-size:var(--ui-segment-control-font-size, var(--size-typography-text-default))}:host._small{min-height:var(--ui-segment-control-min-height-small, 2.5rem)}:host._small .ui-segment-control-option{min-height:var(--ui-segment-control-option-min-height-small, 2rem);min-width:var(--ui-segment-control-option-min-width-small, 2rem);padding:0 var(--ui-segment-control-option-padding-x-small, var(--units-md));font-size:var(--ui-segment-control-font-size-small, var(--size-typography-text-md))}.ui-segment-control-thumb{position:absolute;top:0;left:0;z-index:0;border-radius:var(--ui-segment-control-thumb-radius, var(--radius-sm));background-color:var(--ui-segment-control-thumb-surface, var(--actions-high-surface-default));pointer-events:none;transition:transform 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),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),height 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)}@media(prefers-reduced-motion:reduce){.ui-segment-control-thumb{transition:none}}:root[data-motion=off] .ui-segment-control-thumb{transition:none}:host._no-motion .ui-segment-control-thumb{transition:none}.ui-segment-control-icon{line-height:0}.ui-segment-control-label{display:inline-flex;flex-direction:column;align-items:center}.ui-segment-control-label:after{content:attr(data-label);height:0;overflow:hidden;font-weight:var(--ui-segment-control-weight-selected, var(--weight-bold));visibility:hidden;pointer-events:none;-webkit-user-select:none;user-select:none}.ui-segment-control-option{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;gap:var(--ui-segment-control-option-gap, var(--units-sm));box-sizing:border-box;border:0;border-radius:var(--ui-segment-control-option-radius, var(--radius-sm));background-color:transparent;color:var(--ui-segment-control-option-color, var(--actions-low-content-default));font-family:inherit;font-weight:var(--ui-segment-control-weight, var(--weight-regular));line-height:1.2;white-space:nowrap;cursor:pointer;transition: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))),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-segment-control-option:hover:not(:disabled):not(._selected){background-color:var(--ui-segment-control-option-surface-hover, var(--actions-low-surface-hover));color:var(--ui-segment-control-option-color-hover, var(--actions-low-content-hover))}.ui-segment-control-option:active:not(:disabled):not(._selected){background-color:var(--ui-segment-control-option-surface-pressed, var(--actions-low-surface-pressed));color:var(--ui-segment-control-option-color-pressed, var(--actions-low-content-pressed))}.ui-segment-control-option:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-segment-control-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-segment-control-option-focus-ring-color, var(--actions-low-stroke-focused))}.ui-segment-control-option._selected{color:var(--ui-segment-control-option-color-selected, var(--actions-high-content-default));font-weight:var(--ui-segment-control-weight-selected, var(--weight-bold))}.ui-segment-control-option._selected:focus-visible{box-shadow:0 0 0 var(--ui-segment-control-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-segment-control-option-focus-ring-color, var(--actions-high-stroke-focused))}.ui-segment-control-option:disabled{cursor:not-allowed;color:var(--ui-segment-control-option-color-disabled, var(--actions-low-content-disabled))}.ui-segment-control-option:disabled._selected{color:var(--ui-segment-control-option-color-selected-disabled, var(--actions-high-content-disabled))}:host._multiple .ui-segment-control-option._selected{background-color:var(--ui-segment-control-option-surface-selected, var(--actions-high-surface-default))}:host._multiple .ui-segment-control-option._selected:hover:not(:disabled){background-color:var(--ui-segment-control-option-surface-hover, var(--actions-high-surface-hover));color:var(--ui-segment-control-option-color-hover, var(--actions-high-content-hover))}:host._multiple .ui-segment-control-option._selected:active:not(:disabled){background-color:var(--ui-segment-control-option-surface-pressed, var(--actions-high-surface-pressed));color:var(--ui-segment-control-option-color-pressed, var(--actions-high-content-pressed))}:host._multiple .ui-segment-control-option._selected:disabled{background-color:var(--ui-segment-control-option-surface-disabled, var(--actions-high-surface-disabled))}:host._fluid{display:flex;width:100%}:host._fluid .ui-segment-control-option{flex:1 1 0}:host._vertical{flex-direction:column;align-items:stretch}:host._vertical .ui-segment-control-option{width:100%}:host._invalid{box-shadow:inset 0 0 0 var(--ui-segment-control-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) var(--ui-segment-control-stroke-invalid, var(--form-error-stroke-default))}:host._disabled{cursor:not-allowed}:host._disabled .ui-segment-control-thumb{background-color:var(--ui-segment-control-thumb-surface-disabled, var(--actions-high-surface-disabled))}\n"],
392
+ dependencies: [{
393
+ kind: "component",
394
+ type: UiIcon,
395
+ selector: "ui-icon",
396
+ inputs: [
397
+ "name",
398
+ "size",
399
+ "type",
400
+ "family",
401
+ "decorative",
402
+ "ariaLabel"
403
+ ]
404
+ }, {
405
+ kind: "directive",
406
+ type: NgTemplateOutlet,
407
+ selector: "[ngTemplateOutlet]",
408
+ inputs: [
409
+ "ngTemplateOutletContext",
410
+ "ngTemplateOutlet",
411
+ "ngTemplateOutletInjector"
412
+ ]
413
+ }]
414
+ });
415
+ }
416
+ };
417
+ i0.ɵɵngDeclareClassMetadata({
418
+ minVersion: "12.0.0",
419
+ version: "22.3.0",
420
+ ngImport: i0,
421
+ type: UiSegmentControl,
422
+ decorators: [{
423
+ type: Component,
424
+ args: [{
425
+ selector: "ui-segment-control",
426
+ imports: [UiIcon, NgTemplateOutlet],
427
+ providers: [{
428
+ provide: NG_VALUE_ACCESSOR,
429
+ useExisting: forwardRef(() => UiSegmentControl),
430
+ multi: true
431
+ }],
432
+ host: {
433
+ class: "ui-segment-control",
434
+ "[class._small]": "size() === 'small'",
435
+ "[class._vertical]": "orientation() === 'vertical'",
436
+ "[class._fluid]": "fluid()",
437
+ "[class._multiple]": "multiple()",
438
+ "[class._disabled]": "isDisabled()",
439
+ "[class._invalid]": "isInvalid()",
440
+ "[class._no-motion]": "!motion()",
441
+ "[attr.role]": "multiple() ? 'group' : 'radiogroup'",
442
+ "[attr.aria-label]": "ariaLabel() || null",
443
+ "[attr.aria-labelledby]": "ariaLabelledBy() || null",
444
+ "[attr.aria-invalid]": "isInvalid() ? 'true' : null",
445
+ "[attr.aria-disabled]": "isDisabled() ? 'true' : null",
446
+ "(keydown)": "onKeydown($event)",
447
+ "(focusout)": "onFocusOut($event)"
448
+ },
449
+ template: "@if (showThumb()) {\n <span\n class=\"ui-segment-control-thumb\"\n aria-hidden=\"true\"\n [style.transform]=\"thumbTransform()\"\n [style.width.px]=\"thumb()?.w\"\n [style.height.px]=\"thumb()?.h\"\n ></span>\n}\n\n@for (option of normalizedOptions(); track option.key) {\n <button\n #optionBtn\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-segment-control-option\"\n [class._selected]=\"option.selected\"\n [disabled]=\"option.disabled\"\n [attr.role]=\"multiple() ? null : 'radio'\"\n [attr.aria-checked]=\"multiple() ? null : option.selected\"\n [attr.aria-pressed]=\"multiple() ? option.selected : null\"\n [attr.aria-label]=\"option.ariaLabel\"\n [attr.tabindex]=\"tabindexFor(option.index)\"\n (click)=\"select(option, $event)\"\n (focus)=\"onOptionFocus(option.index)\"\n >\n @if (itemTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: option.original,\n option: option.original,\n selected: option.selected,\n index: option.index,\n }\"\n />\n } @else {\n @if (option.icon) {\n <ui-icon class=\"ui-segment-control-icon\" [name]=\"option.icon\" [size]=\"iconSize()\" />\n }\n @if (option.label) {\n <span class=\"ui-segment-control-label\" [attr.data-label]=\"option.label\">{{\n option.label\n }}</span>\n }\n }\n </button>\n}\n",
450
+ styles: [":host{position:relative;display:inline-flex;align-items:stretch;box-sizing:border-box;padding:var(--ui-segment-control-padding, var(--units-xs));gap:var(--ui-segment-control-gap, 0);border-radius:var(--ui-segment-control-radius, var(--radius-md));box-shadow:inset 0 0 0 var(--ui-segment-control-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) var(--ui-segment-control-stroke, var(--global-border-default));font-family:var(--ui-segment-control-font-family, var(--fontfamily-base));-webkit-user-select:none;user-select:none;vertical-align:middle;min-height:var(--ui-segment-control-min-height, 2.75rem)}:host .ui-segment-control-option{min-height:var(--ui-segment-control-option-min-height, 2.25rem);min-width:var(--ui-segment-control-option-min-width, 2.25rem);padding:0 var(--ui-segment-control-option-padding-x, var(--units-default));font-size:var(--ui-segment-control-font-size, var(--size-typography-text-default))}:host._small{min-height:var(--ui-segment-control-min-height-small, 2.5rem)}:host._small .ui-segment-control-option{min-height:var(--ui-segment-control-option-min-height-small, 2rem);min-width:var(--ui-segment-control-option-min-width-small, 2rem);padding:0 var(--ui-segment-control-option-padding-x-small, var(--units-md));font-size:var(--ui-segment-control-font-size-small, var(--size-typography-text-md))}.ui-segment-control-thumb{position:absolute;top:0;left:0;z-index:0;border-radius:var(--ui-segment-control-thumb-radius, var(--radius-sm));background-color:var(--ui-segment-control-thumb-surface, var(--actions-high-surface-default));pointer-events:none;transition:transform 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),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),height 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)}@media(prefers-reduced-motion:reduce){.ui-segment-control-thumb{transition:none}}:root[data-motion=off] .ui-segment-control-thumb{transition:none}:host._no-motion .ui-segment-control-thumb{transition:none}.ui-segment-control-icon{line-height:0}.ui-segment-control-label{display:inline-flex;flex-direction:column;align-items:center}.ui-segment-control-label:after{content:attr(data-label);height:0;overflow:hidden;font-weight:var(--ui-segment-control-weight-selected, var(--weight-bold));visibility:hidden;pointer-events:none;-webkit-user-select:none;user-select:none}.ui-segment-control-option{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;gap:var(--ui-segment-control-option-gap, var(--units-sm));box-sizing:border-box;border:0;border-radius:var(--ui-segment-control-option-radius, var(--radius-sm));background-color:transparent;color:var(--ui-segment-control-option-color, var(--actions-low-content-default));font-family:inherit;font-weight:var(--ui-segment-control-weight, var(--weight-regular));line-height:1.2;white-space:nowrap;cursor:pointer;transition: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))),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-segment-control-option:hover:not(:disabled):not(._selected){background-color:var(--ui-segment-control-option-surface-hover, var(--actions-low-surface-hover));color:var(--ui-segment-control-option-color-hover, var(--actions-low-content-hover))}.ui-segment-control-option:active:not(:disabled):not(._selected){background-color:var(--ui-segment-control-option-surface-pressed, var(--actions-low-surface-pressed));color:var(--ui-segment-control-option-color-pressed, var(--actions-low-content-pressed))}.ui-segment-control-option:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-segment-control-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-segment-control-option-focus-ring-color, var(--actions-low-stroke-focused))}.ui-segment-control-option._selected{color:var(--ui-segment-control-option-color-selected, var(--actions-high-content-default));font-weight:var(--ui-segment-control-weight-selected, var(--weight-bold))}.ui-segment-control-option._selected:focus-visible{box-shadow:0 0 0 var(--ui-segment-control-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-segment-control-option-focus-ring-color, var(--actions-high-stroke-focused))}.ui-segment-control-option:disabled{cursor:not-allowed;color:var(--ui-segment-control-option-color-disabled, var(--actions-low-content-disabled))}.ui-segment-control-option:disabled._selected{color:var(--ui-segment-control-option-color-selected-disabled, var(--actions-high-content-disabled))}:host._multiple .ui-segment-control-option._selected{background-color:var(--ui-segment-control-option-surface-selected, var(--actions-high-surface-default))}:host._multiple .ui-segment-control-option._selected:hover:not(:disabled){background-color:var(--ui-segment-control-option-surface-hover, var(--actions-high-surface-hover));color:var(--ui-segment-control-option-color-hover, var(--actions-high-content-hover))}:host._multiple .ui-segment-control-option._selected:active:not(:disabled){background-color:var(--ui-segment-control-option-surface-pressed, var(--actions-high-surface-pressed));color:var(--ui-segment-control-option-color-pressed, var(--actions-high-content-pressed))}:host._multiple .ui-segment-control-option._selected:disabled{background-color:var(--ui-segment-control-option-surface-disabled, var(--actions-high-surface-disabled))}:host._fluid{display:flex;width:100%}:host._fluid .ui-segment-control-option{flex:1 1 0}:host._vertical{flex-direction:column;align-items:stretch}:host._vertical .ui-segment-control-option{width:100%}:host._invalid{box-shadow:inset 0 0 0 var(--ui-segment-control-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) var(--ui-segment-control-stroke-invalid, var(--form-error-stroke-default))}:host._disabled{cursor:not-allowed}:host._disabled .ui-segment-control-thumb{background-color:var(--ui-segment-control-thumb-surface-disabled, var(--actions-high-surface-disabled))}\n"]
451
+ }]
452
+ }],
453
+ ctorParameters: () => [],
454
+ propDecorators: {
455
+ options: [{
456
+ type: i0.Input,
457
+ args: [{
458
+ isSignal: true,
459
+ alias: "options",
460
+ required: false
461
+ }]
462
+ }],
463
+ optionLabel: [{
464
+ type: i0.Input,
465
+ args: [{
466
+ isSignal: true,
467
+ alias: "optionLabel",
468
+ required: false
469
+ }]
470
+ }],
471
+ optionValue: [{
472
+ type: i0.Input,
473
+ args: [{
474
+ isSignal: true,
475
+ alias: "optionValue",
476
+ required: false
477
+ }]
478
+ }],
479
+ optionDisabled: [{
480
+ type: i0.Input,
481
+ args: [{
482
+ isSignal: true,
483
+ alias: "optionDisabled",
484
+ required: false
485
+ }]
486
+ }],
487
+ optionIcon: [{
488
+ type: i0.Input,
489
+ args: [{
490
+ isSignal: true,
491
+ alias: "optionIcon",
492
+ required: false
493
+ }]
494
+ }],
495
+ dataKey: [{
496
+ type: i0.Input,
497
+ args: [{
498
+ isSignal: true,
499
+ alias: "dataKey",
500
+ required: false
501
+ }]
502
+ }],
503
+ multiple: [{
504
+ type: i0.Input,
505
+ args: [{
506
+ isSignal: true,
507
+ alias: "multiple",
508
+ required: false
509
+ }]
510
+ }],
511
+ ripple: [{
512
+ type: i0.Input,
513
+ args: [{
514
+ isSignal: true,
515
+ alias: "ripple",
516
+ required: false
517
+ }]
518
+ }],
519
+ allowEmpty: [{
520
+ type: i0.Input,
521
+ args: [{
522
+ isSignal: true,
523
+ alias: "allowEmpty",
524
+ required: false
525
+ }]
526
+ }],
527
+ size: [{
528
+ type: i0.Input,
529
+ args: [{
530
+ isSignal: true,
531
+ alias: "size",
532
+ required: false
533
+ }]
534
+ }],
535
+ orientation: [{
536
+ type: i0.Input,
537
+ args: [{
538
+ isSignal: true,
539
+ alias: "orientation",
540
+ required: false
541
+ }]
542
+ }],
543
+ fluid: [{
544
+ type: i0.Input,
545
+ args: [{
546
+ isSignal: true,
547
+ alias: "fluid",
548
+ required: false
549
+ }]
550
+ }],
551
+ motion: [{
552
+ type: i0.Input,
553
+ args: [{
554
+ isSignal: true,
555
+ alias: "motion",
556
+ required: false
557
+ }]
558
+ }],
559
+ itemTemplate: [{
560
+ type: i0.Input,
561
+ args: [{
562
+ isSignal: true,
563
+ alias: "itemTemplate",
564
+ required: false
565
+ }]
566
+ }],
567
+ selectionChange: [{
568
+ type: i0.Output,
569
+ args: ["selectionChange"]
570
+ }],
571
+ optionClick: [{
572
+ type: i0.Output,
573
+ args: ["optionClick"]
574
+ }],
575
+ optionEls: [{
576
+ type: i0.ViewChildren,
577
+ args: ["optionBtn", { isSignal: true }]
578
+ }]
579
+ }
580
+ });
392
581
  export { UiSegmentControl };
393
- //# sourceMappingURL=4sh-ui-kit-forms-ui-segment-control.mjs.map
582
+
583
+ //# sourceMappingURL=4sh-ui-kit-forms-ui-segment-control.mjs.map