@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,374 +1,714 @@
1
- import * as i0 from '@angular/core';
2
- import { input, booleanAttribute, output, viewChildren, computed, isDevMode, effect, forwardRef, Component } from '@angular/core';
3
- import { NgTemplateOutlet } from '@angular/common';
4
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
5
- import { BaseFieldControl, createOptionResolver, warnMissingAccessibleName } from '@4sh/ui-kit/forms';
6
- import { UiIcon } from '@4sh/ui-kit/base/ui-icon';
7
-
8
- /** @ignore */
1
+ import * as i0 from "@angular/core";
2
+ import { Component, booleanAttribute, computed, effect, forwardRef, input, isDevMode, output, viewChildren } from "@angular/core";
3
+ import { NgTemplateOutlet } from "@angular/common";
4
+ import { NG_VALUE_ACCESSOR } from "@angular/forms";
5
+ import { BaseFieldControl, createOptionResolver, warnMissingAccessibleName } from "@4sh/ui-kit/forms";
6
+ import { UiIcon } from "@4sh/ui-kit/base/ui-icon";
9
7
  function isRecord(value) {
10
- return typeof value === 'object' && value !== null;
11
- }
12
- /**
13
- * ui-toggle-button — a button that holds a pressed state.
14
- *
15
- * Two modes, one component:
16
- * - **single** (default): one native `<button aria-pressed>` backing a boolean
17
- * (or the `trueValue`/`falseValue` pair). Labels and icons may differ per
18
- * state (`onLabel`/`offLabel`, `onIcon`/`offIcon`).
19
- * - **group** (`options` set): one button per option, `role="group"` on the
20
- * host, model = the array of pressed values. Deliberately always
21
- * multi-select: an exclusive choice is `ui-segment-control`'s job, which says
22
- * it with `radiogroup` semantics instead of `aria-pressed`.
23
- *
24
- * `level` colours the pressed state, `variant` draws the released one, both
25
- * from the `actions.*` token sets. Interactive states (hover/focus/pressed/
26
- * disabled) are pure CSS.
27
- *
28
- * Works standalone, with `[(ngModel)]`, reactive forms, or signal forms
29
- * (`[formField]`) — it is a `ControlValueAccessor`.
30
- *
31
- * @example
32
- * ```html
33
- * <ui-toggle-button [(ngModel)]="bold" label="Gras" icon="bold" />
34
- * <ui-toggle-button [(ngModel)]="days" [options]="dayOptions" ariaLabel="Jours ouvrés" />
35
- * ```
36
- */
37
- class UiToggleButton extends BaseFieldControl {
38
- constructor() {
39
- super();
40
- // --- Single mode ------------------------------------------------------
41
- /** Label shown in both states (fallback of `onLabel` / `offLabel`). */
42
- this.label = input(/* @ts-ignore */
43
- ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
44
- /** Label shown while pressed. */
45
- this.onLabel = input(/* @ts-ignore */
46
- ...(ngDevMode ? [undefined, { debugName: "onLabel" }] : /* istanbul ignore next */ []));
47
- /** Label shown while released. */
48
- this.offLabel = input(/* @ts-ignore */
49
- ...(ngDevMode ? [undefined, { debugName: "offLabel" }] : /* istanbul ignore next */ []));
50
- /** Icon shown in both states (fallback of `onIcon` / `offIcon`). */
51
- this.icon = input(/* @ts-ignore */
52
- ...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
53
- /** Icon shown while pressed. */
54
- this.onIcon = input(/* @ts-ignore */
55
- ...(ngDevMode ? [undefined, { debugName: "onIcon" }] : /* istanbul ignore next */ []));
56
- /** Icon shown while released. */
57
- this.offIcon = input(/* @ts-ignore */
58
- ...(ngDevMode ? [undefined, { debugName: "offIcon" }] : /* istanbul ignore next */ []));
59
- /** Side of the label the icon sits on. */
60
- this.iconPos = input('left', /* @ts-ignore */
61
- ...(ngDevMode ? [{ debugName: "iconPos" }] : /* istanbul ignore next */ []));
62
- /** Model value emitted when pressed. */
63
- this.trueValue = input(true, /* @ts-ignore */
64
- ...(ngDevMode ? [{ debugName: "trueValue" }] : /* istanbul ignore next */ []));
65
- /** Model value emitted when released. */
66
- this.falseValue = input(false, /* @ts-ignore */
67
- ...(ngDevMode ? [{ debugName: "falseValue" }] : /* istanbul ignore next */ []));
68
- // --- Group mode -------------------------------------------------------
69
- /** Options to display, one button each. Presence switches the host to group mode. */
70
- this.options = input(/* @ts-ignore */
71
- ...(ngDevMode ? [undefined, { debugName: "options" }] : /* istanbul ignore next */ []));
72
- /** Field name to read a label from, when options are objects. */
73
- this.optionLabel = input(/* @ts-ignore */
74
- ...(ngDevMode ? [undefined, { debugName: "optionLabel" }] : /* istanbul ignore next */ []));
75
- /** Field name to read the value from, when options are objects. */
76
- this.optionValue = input(/* @ts-ignore */
77
- ...(ngDevMode ? [undefined, { debugName: "optionValue" }] : /* istanbul ignore next */ []));
78
- /** Field name to read the disabled flag from, when options are objects. */
79
- this.optionDisabled = input(/* @ts-ignore */
80
- ...(ngDevMode ? [undefined, { debugName: "optionDisabled" }] : /* istanbul ignore next */ []));
81
- /** Field name to read an icon name from, when options are objects. */
82
- this.optionIcon = input(/* @ts-ignore */
83
- ...(ngDevMode ? [undefined, { debugName: "optionIcon" }] : /* istanbul ignore next */ []));
84
- /** Property used to compare object values for equality (selection matching). */
85
- this.dataKey = input(/* @ts-ignore */
86
- ...(ngDevMode ? [undefined, { debugName: "dataKey" }] : /* istanbul ignore next */ []));
87
- /** Layout axis of the group. */
88
- this.orientation = input('horizontal', /* @ts-ignore */
89
- ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
90
- // --- Shared -----------------------------------------------------------
91
- /** Colour family of the pressed state. */
92
- this.level = input('high', /* @ts-ignore */
93
- ...(ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []));
94
- /** How the released state is drawn. */
95
- this.variant = input('outlined', /* @ts-ignore */
96
- ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
97
- /** Size. */
98
- this.size = input('default', /* @ts-ignore */
99
- ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
100
- /** Span the full width of the parent (group buttons share the width evenly). */
101
- this.fluid = input(false, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
102
- /** Ripple Effect */
103
- this.ripple = input(true, { ...(ngDevMode ? { debugName: "ripple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
104
- /** Pill shape. */
105
- this.rounded = input(false, { ...(ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
106
- /** Whether the last pressed button can be released (single), or the group emptied. */
107
- this.allowEmpty = input(true, { ...(ngDevMode ? { debugName: "allowEmpty" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
108
- // --- Templates --------------------------------------------------------
109
- /** Replaces the icon, single mode (receives `{ $implicit, checked }`). */
110
- this.iconTemplate = input(/* @ts-ignore */
111
- ...(ngDevMode ? [undefined, { debugName: "iconTemplate" }] : /* istanbul ignore next */ []));
112
- /** Replaces the whole button content, single mode (receives `{ $implicit, checked }`). */
113
- this.contentTemplate = input(/* @ts-ignore */
114
- ...(ngDevMode ? [undefined, { debugName: "contentTemplate" }] : /* istanbul ignore next */ []));
115
- /** Replaces a group button's content (receives `{ $implicit, option, selected, index }`). */
116
- this.itemTemplate = input(/* @ts-ignore */
117
- ...(ngDevMode ? [undefined, { debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
118
- /** Emitted on user interaction with the new model value. */
119
- this.toggleChange = output();
120
- /** Emitted when a group button is clicked (even if it does not change the value). */
121
- this.optionClick = output();
122
- /** Emitted when a button receives focus. */
123
- this.toggleFocus = output();
124
- /** Emitted when a button loses focus. */
125
- this.toggleBlur = output();
126
- /** @ignore */
127
- this.buttons = viewChildren('itemEl', /* @ts-ignore */
128
- ...(ngDevMode ? [{ debugName: "buttons" }] : /* istanbul ignore next */ []));
129
- /** @ignore */
130
- this.resolver = createOptionResolver({
131
- optionValue: this.optionValue,
132
- optionLabel: this.optionLabel,
133
- optionDisabled: this.optionDisabled,
134
- dataKey: this.dataKey,
135
- });
136
- /** @ignore Group mode: an `options` list was provided. */
137
- this.isGroup = computed(() => !!this.options(), /* @ts-ignore */
138
- ...(ngDevMode ? [{ debugName: "isGroup" }] : /* istanbul ignore next */ []));
139
- /** @ignore */
140
- this.iconSize = computed(() => {
141
- const size = this.size();
142
- if (size === 'small')
143
- return 'sm';
144
- return size === 'large' ? 'lg' : 'default';
145
- }, /* @ts-ignore */
146
- ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
147
- /** @ignore */
148
- this.hostClasses = computed(() => {
149
- const c = ['ui-toggle-button', `_${this.level()}`];
150
- if (this.size() !== 'default')
151
- c.push(`_${this.size()}`);
152
- if (this.variant() !== 'outlined')
153
- c.push(`_${this.variant()}`);
154
- if (this.rounded())
155
- c.push('_rounded');
156
- if (this.fluid())
157
- c.push('_fluid');
158
- if (this.isGroup()) {
159
- c.push('_group');
160
- if (this.orientation() === 'vertical')
161
- c.push('_vertical');
162
- }
163
- if (this.readonly())
164
- c.push('_readonly');
165
- if (this.isDisabled())
166
- c.push('_disabled');
167
- if (this.isInvalid())
168
- c.push('_invalid');
169
- return c.join(' ');
170
- }, /* @ts-ignore */
171
- ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
172
- /** @ignore Only the group carries the group-level ARIA naming. */
173
- this.groupAriaLabel = computed(() => this.isGroup() ? this.ariaLabel() || null : null, /* @ts-ignore */
174
- ...(ngDevMode ? [{ debugName: "groupAriaLabel" }] : /* istanbul ignore next */ []));
175
- /** @ignore */
176
- this.groupAriaLabelledBy = computed(() => this.isGroup() ? this.ariaLabelledBy() || null : null, /* @ts-ignore */
177
- ...(ngDevMode ? [{ debugName: "groupAriaLabelledBy" }] : /* istanbul ignore next */ []));
178
- // --- Single mode ------------------------------------------------------
179
- /** @ignore */
180
- this.checked = computed(() => this.modelValue() === this.trueValue(), /* @ts-ignore */
181
- ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
182
- /** @ignore */
183
- this.hasStateLabels = computed(() => !!this.onLabel() && !!this.offLabel() && this.onLabel() !== this.offLabel(), /* @ts-ignore */
184
- ...(ngDevMode ? [{ debugName: "hasStateLabels" }] : /* istanbul ignore next */ []));
185
- /** @ignore Label of the current state, falling back to the shared one. */
186
- this.currentLabel = computed(() => (this.checked() ? this.onLabel() : this.offLabel()) ?? this.label() ?? null, /* @ts-ignore */
187
- ...(ngDevMode ? [{ debugName: "currentLabel" }] : /* istanbul ignore next */ []));
188
- /** @ignore Icon of the current state, falling back to the shared one. */
189
- this.currentIcon = computed(() => (this.checked() ? this.onIcon() : this.offIcon()) ?? this.icon() ?? null, /* @ts-ignore */
190
- ...(ngDevMode ? [{ debugName: "currentIcon" }] : /* istanbul ignore next */ []));
191
- /** @ignore Square button: an icon, no text. */
192
- this.isIconOnly = computed(() => !this.contentTemplate() && !this.currentLabel() && !!this.currentIcon(), /* @ts-ignore */
193
- ...(ngDevMode ? [{ debugName: "isIconOnly" }] : /* istanbul ignore next */ []));
194
- /** @ignore */
195
- this.iconBefore = computed(() => this.iconPos() === 'left', /* @ts-ignore */
196
- ...(ngDevMode ? [{ debugName: "iconBefore" }] : /* istanbul ignore next */ []));
197
- /** @ignore */
198
- this.stateContext = computed(() => ({
199
- $implicit: this.checked(),
200
- checked: this.checked(),
201
- }), /* @ts-ignore */
202
- ...(ngDevMode ? [{ debugName: "stateContext" }] : /* istanbul ignore next */ []));
203
- /** @ignore Accessible name of the single button (never empty-stringed). */
204
- this.buttonAriaLabel = computed(() => this.ariaLabel() || (this.isIconOnly() ? this.currentLabel() : null), /* @ts-ignore */
205
- ...(ngDevMode ? [{ debugName: "buttonAriaLabel" }] : /* istanbul ignore next */ []));
206
- // --- Group mode -------------------------------------------------------
207
- /** @ignore Options resolved to a flat, render-ready shape. */
208
- this.normalizedOptions = computed(() => {
209
- const raw = this.options() ?? [];
210
- const model = this.modelValue();
211
- const groupDisabled = this.isDisabled();
212
- return raw.map((option, index) => {
213
- const value = this.resolveValue(option);
214
- const selected = this.isPressed(value, model);
215
- const label = this.resolveLabel(option);
216
- const icon = this.resolveIcon(option, selected);
217
- return {
218
- key: `${this.uid}-${index}`,
219
- index,
220
- value,
221
- label,
222
- icon,
223
- ariaLabel: isRecord(option) ? this.resolver.asText(option['ariaLabel']) : null,
224
- disabled: groupDisabled || this.resolver.resolveDisabled(option),
225
- selected,
226
- iconOnly: !label && !!icon,
227
- original: option,
228
- };
229
- });
230
- }, /* @ts-ignore */
231
- ...(ngDevMode ? [{ debugName: "normalizedOptions" }] : /* istanbul ignore next */ []));
232
- if (isDevMode()) {
233
- effect(() => {
234
- if (this.isGroup()) {
235
- if (!this.ariaLabel() && !this.ariaLabelledBy()) {
236
- warnMissingAccessibleName('ui-toggle-button', 'Group has no accessible name: provide `ariaLabel` (or `ariaLabelledBy`).');
237
- }
238
- if (this.normalizedOptions().some((o) => o.iconOnly && !o.ariaLabel)) {
239
- warnMissingAccessibleName('ui-toggle-button', 'Icon-only option has no accessible name: add `ariaLabel` on the option.');
240
- }
241
- return;
242
- }
243
- if (this.isIconOnly() && !this.ariaLabel()) {
244
- warnMissingAccessibleName('ui-toggle-button', 'Icon-only button has no accessible name: provide `ariaLabel`.');
245
- }
246
- // A name that changes with the state is re-announced on focus, so the
247
- // control sounds like a different button depending on its value.
248
- if (this.hasStateLabels() && !this.ariaLabel() && !this.ariaLabelledBy()) {
249
- warnMissingAccessibleName('ui-toggle-button', '`onLabel`/`offLabel` differ: provide a state-independent `ariaLabel` (or `ariaLabelledBy`).');
250
- }
251
- });
252
- }
253
- }
254
- /** @ignore */
255
- itemContext(item) {
256
- return {
257
- $implicit: item.original,
258
- option: item.original,
259
- selected: item.selected,
260
- index: item.index,
261
- };
262
- }
263
- /** @ignore */
264
- uidPrefix() {
265
- return 'ui-toggle-button';
266
- }
267
- /** Focus the button (the first enabled one in group mode). */
268
- focus(options) {
269
- const target = this.buttons().find((ref) => !ref.nativeElement.disabled);
270
- target?.nativeElement.focus(options);
271
- }
272
- /** @ignore Single mode: flip the boolean pair. */
273
- toggle() {
274
- if (this.isDisabled() || this.readonly())
275
- return;
276
- if (this.checked() && !this.allowEmpty())
277
- return;
278
- const next = this.checked() ? this.falseValue() : this.trueValue();
279
- this.modelValue.set(next);
280
- this.emitChange(next);
281
- this.toggleChange.emit(next);
282
- }
283
- /** @ignore Group mode: press / release one option. */
284
- toggleOption(item, event) {
285
- if (item.disabled || this.readonly())
286
- return;
287
- const value = item.value;
288
- const model = this.modelValue();
289
- const next = Array.isArray(model) ? [...model] : [];
290
- const at = next.findIndex((v) => this.resolver.equals(v, value));
291
- let selected;
292
- if (at !== -1) {
293
- if (!this.allowEmpty() && next.length === 1)
294
- return;
295
- next.splice(at, 1);
296
- selected = false;
297
- }
298
- else {
299
- next.push(value);
300
- selected = true;
301
- }
302
- this.modelValue.set(next);
303
- this.emitChange(next);
304
- this.toggleChange.emit(next);
305
- this.optionClick.emit({
306
- option: item.original,
307
- value,
308
- index: item.index,
309
- selected,
310
- originalEvent: event,
311
- });
312
- }
313
- /** @ignore */
314
- onBlur(event) {
315
- this.emitTouch();
316
- this.toggleBlur.emit(event);
317
- }
318
- /** @ignore Rich option shape (`{ value }`) resolves without a field mapping. */
319
- resolveValue(option) {
320
- if (!this.optionValue() && isRecord(option) && 'value' in option)
321
- return option['value'];
322
- return this.resolver.resolveValue(option);
323
- }
324
- /** @ignore An option object with no label key stays label-less (icon-only button). */
325
- resolveLabel(option) {
326
- if (!this.optionLabel() && isRecord(option) && !('label' in option))
327
- return null;
328
- return this.resolver.resolveLabel(option);
329
- }
330
- /** @ignore */
331
- resolveIcon(option, selected) {
332
- if (selected && isRecord(option)) {
333
- const swapped = this.resolver.asText(option['selectedIcon']);
334
- if (swapped)
335
- return swapped;
336
- }
337
- const field = this.optionIcon();
338
- if (field)
339
- return this.resolver.asText(this.resolver.getField(option, field));
340
- if (isRecord(option))
341
- return this.resolver.asText(option['icon']);
342
- return null;
343
- }
344
- /** @ignore A group's model is the array of pressed values. */
345
- isPressed(value, model) {
346
- return Array.isArray(model) && model.some((v) => this.resolver.equals(v, value));
347
- }
348
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiToggleButton, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
349
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: UiToggleButton, isStandalone: true, selector: "ui-toggle-button", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, onLabel: { classPropertyName: "onLabel", publicName: "onLabel", isSignal: true, isRequired: false, transformFunction: null }, offLabel: { classPropertyName: "offLabel", publicName: "offLabel", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, onIcon: { classPropertyName: "onIcon", publicName: "onIcon", isSignal: true, isRequired: false, transformFunction: null }, offIcon: { classPropertyName: "offIcon", publicName: "offIcon", isSignal: true, isRequired: false, transformFunction: null }, iconPos: { classPropertyName: "iconPos", publicName: "iconPos", isSignal: true, isRequired: false, transformFunction: null }, trueValue: { classPropertyName: "trueValue", publicName: "trueValue", isSignal: true, isRequired: false, transformFunction: null }, falseValue: { classPropertyName: "falseValue", publicName: "falseValue", isSignal: true, isRequired: false, transformFunction: null }, 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 }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, allowEmpty: { classPropertyName: "allowEmpty", publicName: "allowEmpty", isSignal: true, isRequired: false, transformFunction: null }, iconTemplate: { classPropertyName: "iconTemplate", publicName: "iconTemplate", isSignal: true, isRequired: false, transformFunction: null }, contentTemplate: { classPropertyName: "contentTemplate", publicName: "contentTemplate", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggleChange: "toggleChange", optionClick: "optionClick", toggleFocus: "toggleFocus", toggleBlur: "toggleBlur" }, host: { properties: { "class": "hostClasses()", "attr.role": "isGroup() ? 'group' : null", "attr.aria-label": "groupAriaLabel()", "attr.aria-labelledby": "groupAriaLabelledBy()" } }, providers: [
350
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiToggleButton), multi: true },
351
- ], viewQueries: [{ propertyName: "buttons", predicate: ["itemEl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (isGroup()) {\n @for (item of normalizedOptions(); track item.key) {\n <button\n #itemEl\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-toggle-button-item\"\n [class._selected]=\"item.selected\"\n [class._icon-only]=\"item.iconOnly\"\n [disabled]=\"item.disabled\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-pressed]=\"item.selected\"\n [attr.aria-label]=\"item.ariaLabel\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (click)=\"toggleOption(item, $event)\"\n (focus)=\"toggleFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n >\n @if (itemTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"itemContext(item)\" />\n } @else {\n @if (iconBefore() && item.icon) {\n <ui-icon class=\"ui-toggle-button-icon\" [name]=\"item.icon\" [size]=\"iconSize()\" />\n }\n @if (item.label) {\n <span class=\"ui-toggle-button-label\">{{ item.label }}</span>\n }\n @if (!iconBefore() && item.icon) {\n <ui-icon class=\"ui-toggle-button-icon\" [name]=\"item.icon\" [size]=\"iconSize()\" />\n }\n }\n </button>\n }\n} @else {\n <button\n #itemEl\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-toggle-button-item\"\n [class._selected]=\"checked()\"\n [class._icon-only]=\"isIconOnly()\"\n [id]=\"resolvedId()\"\n [disabled]=\"isDisabled()\"\n [attr.name]=\"name()\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-pressed]=\"checked()\"\n [attr.aria-label]=\"buttonAriaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (click)=\"toggle()\"\n (focus)=\"toggleFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n >\n @if (contentTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n } @else {\n @if (iconBefore()) {\n <ng-container [ngTemplateOutlet]=\"singleIcon\" />\n }\n @if (currentLabel()) {\n <span class=\"ui-toggle-button-label\">{{ currentLabel() }}</span>\n }\n @if (!iconBefore()) {\n <ng-container [ngTemplateOutlet]=\"singleIcon\" />\n }\n }\n </button>\n}\n\n<ng-template #singleIcon>\n @if (iconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n } @else if (currentIcon(); as iconName) {\n <ui-icon class=\"ui-toggle-button-icon\" [name]=\"iconName\" [size]=\"iconSize()\" />\n }\n</ng-template>\n", styles: [":host{display:inline-flex;gap:var(--ui-toggle-button-group-gap, var(--units-sm));font-family:var(--ui-toggle-button-font-family, var(--fontfamily-base));vertical-align:middle}:host .ui-toggle-button-item{height:var(--ui-toggle-button-height, var(--size-components-default));padding:0 var(--ui-toggle-button-padding-x, var(--units-default));font-size:var(--ui-toggle-button-font-size, var(--size-typography-text-default))}:host .ui-toggle-button-item._icon-only{width:var(--ui-toggle-button-height, var(--size-components-default));padding:0}:host._small .ui-toggle-button-item{height:var(--ui-toggle-button-height-small, var(--size-components-sm));padding:0 var(--ui-toggle-button-padding-x-small, var(--units-md));font-size:var(--ui-toggle-button-font-size-small, var(--size-typography-text-md))}:host._small .ui-toggle-button-item._icon-only{width:var(--ui-toggle-button-height-small, var(--size-components-sm));padding:0}:host._large .ui-toggle-button-item{height:var(--ui-toggle-button-height-large, var(--size-components-lg));padding:0 var(--ui-toggle-button-padding-x-large, var(--units-lg));font-size:var(--ui-toggle-button-font-size-large, var(--size-typography-text-lg))}:host._large .ui-toggle-button-item._icon-only{width:var(--ui-toggle-button-height-large, var(--size-components-lg));padding:0}.ui-toggle-button-item{display:inline-flex;align-items:center;justify-content:center;gap:var(--ui-toggle-button-gap, var(--units-sm));box-sizing:border-box;border:var(--ui-toggle-button-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--_invalid-stroke, var(--_stroke));border-radius:var(--ui-toggle-button-radius, var(--radius-sm));background-color:var(--_surface);color:var(--_content);font-family:inherit;font-weight:var(--ui-toggle-button-weight, var(--weight-bold));line-height:1.2;white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none;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))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-toggle-button-item:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-toggle-button-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--_invalid-stroke, var(--_ring))}.ui-toggle-button-item:disabled{cursor:not-allowed}.ui-toggle-button-item:not(._selected){--_surface: var(--ui-toggle-button-surface, var(--actions-lowoutlined-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-lowoutlined-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-lowoutlined-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-lowoutlined-stroke-focused))}.ui-toggle-button-item:not(._selected):hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-lowoutlined-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-lowoutlined-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-lowoutlined-stroke-hover))}.ui-toggle-button-item:not(._selected):active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-lowoutlined-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-lowoutlined-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-lowoutlined-stroke-pressed))}.ui-toggle-button-item:not(._selected):disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-lowoutlined-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-lowoutlined-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-lowoutlined-stroke-disabled))}.ui-toggle-button-icon{line-height:0}.ui-toggle-button-label{display:inline-block}:host._filled .ui-toggle-button-item:not(._selected){--_surface: var(--ui-toggle-button-surface, var(--actions-low-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-low-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-low-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-low-stroke-focused))}:host._filled .ui-toggle-button-item:not(._selected):hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-low-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-low-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-low-stroke-hover))}:host._filled .ui-toggle-button-item:not(._selected):active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-low-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-low-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-low-stroke-pressed))}:host._filled .ui-toggle-button-item:not(._selected):disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-low-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-low-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-low-stroke-disabled))}:host._ghost .ui-toggle-button-item:not(._selected){--_surface: var(--ui-toggle-button-surface, var(--actions-lowghost-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-lowghost-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-lowghost-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-lowghost-stroke-focused))}:host._ghost .ui-toggle-button-item:not(._selected):hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-lowghost-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-lowghost-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-lowghost-stroke-hover))}:host._ghost .ui-toggle-button-item:not(._selected):active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-lowghost-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-lowghost-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-lowghost-stroke-pressed))}:host._ghost .ui-toggle-button-item:not(._selected):disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-lowghost-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-lowghost-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-lowghost-stroke-disabled))}:host._high .ui-toggle-button-item._selected{--_surface: var(--ui-toggle-button-surface, var(--actions-high-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-high-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-high-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-high-stroke-focused))}:host._high .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-high-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-high-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-high-stroke-hover))}:host._high .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-high-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-high-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-high-stroke-pressed))}:host._high .ui-toggle-button-item._selected:disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-high-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-high-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-high-stroke-disabled))}:host._low .ui-toggle-button-item._selected{--_surface: var(--ui-toggle-button-surface, var(--actions-low-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-low-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-low-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-low-stroke-focused))}:host._low .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-low-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-low-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-low-stroke-hover))}:host._low .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-low-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-low-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-low-stroke-pressed))}:host._low .ui-toggle-button-item._selected:disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-low-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-low-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-low-stroke-disabled))}:host._success .ui-toggle-button-item._selected{--_surface: var(--ui-toggle-button-surface, var(--actions-success-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-success-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-success-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-success-stroke-focused))}:host._success .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-success-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-success-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-success-stroke-hover))}:host._success .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-success-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-success-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-success-stroke-pressed))}:host._success .ui-toggle-button-item._selected:disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-success-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-success-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-success-stroke-disabled))}:host._warning .ui-toggle-button-item._selected{--_surface: var(--ui-toggle-button-surface, var(--actions-warning-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-warning-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-warning-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-warning-stroke-focused))}:host._warning .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-warning-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-warning-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-warning-stroke-hover))}:host._warning .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-warning-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-warning-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-warning-stroke-pressed))}:host._warning .ui-toggle-button-item._selected:disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-warning-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-warning-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-warning-stroke-disabled))}:host._error .ui-toggle-button-item._selected{--_surface: var(--ui-toggle-button-surface, var(--actions-error-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-error-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-error-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-error-stroke-focused))}:host._error .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-error-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-error-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-error-stroke-hover))}:host._error .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-error-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-error-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-error-stroke-pressed))}:host._error .ui-toggle-button-item._selected:disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-error-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-error-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-error-stroke-disabled))}:host._rounded .ui-toggle-button-item{border-radius:var(--ui-toggle-button-radius-rounded, var(--radius-full))}:host._fluid{display:flex;width:100%}:host._fluid .ui-toggle-button-item{flex:1 1 0;min-width:0}:host._vertical{flex-direction:column;align-items:stretch}:host._readonly .ui-toggle-button-item{cursor:default}:host._invalid{--_invalid-stroke: var(--ui-toggle-button-stroke-invalid, var(--form-error-stroke-default))}\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"] }] }); }
8
+ return typeof value === "object" && value !== null;
352
9
  }
353
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiToggleButton, decorators: [{
354
- type: Component,
355
- args: [{ selector: 'ui-toggle-button', imports: [UiIcon, NgTemplateOutlet], providers: [
356
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiToggleButton), multi: true },
357
- ], host: {
358
- '[class]': 'hostClasses()',
359
- '[attr.role]': "isGroup() ? 'group' : null",
360
- '[attr.aria-label]': 'groupAriaLabel()',
361
- '[attr.aria-labelledby]': 'groupAriaLabelledBy()',
362
- }, template: "@if (isGroup()) {\n @for (item of normalizedOptions(); track item.key) {\n <button\n #itemEl\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-toggle-button-item\"\n [class._selected]=\"item.selected\"\n [class._icon-only]=\"item.iconOnly\"\n [disabled]=\"item.disabled\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-pressed]=\"item.selected\"\n [attr.aria-label]=\"item.ariaLabel\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (click)=\"toggleOption(item, $event)\"\n (focus)=\"toggleFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n >\n @if (itemTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"itemContext(item)\" />\n } @else {\n @if (iconBefore() && item.icon) {\n <ui-icon class=\"ui-toggle-button-icon\" [name]=\"item.icon\" [size]=\"iconSize()\" />\n }\n @if (item.label) {\n <span class=\"ui-toggle-button-label\">{{ item.label }}</span>\n }\n @if (!iconBefore() && item.icon) {\n <ui-icon class=\"ui-toggle-button-icon\" [name]=\"item.icon\" [size]=\"iconSize()\" />\n }\n }\n </button>\n }\n} @else {\n <button\n #itemEl\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-toggle-button-item\"\n [class._selected]=\"checked()\"\n [class._icon-only]=\"isIconOnly()\"\n [id]=\"resolvedId()\"\n [disabled]=\"isDisabled()\"\n [attr.name]=\"name()\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-pressed]=\"checked()\"\n [attr.aria-label]=\"buttonAriaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (click)=\"toggle()\"\n (focus)=\"toggleFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n >\n @if (contentTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n } @else {\n @if (iconBefore()) {\n <ng-container [ngTemplateOutlet]=\"singleIcon\" />\n }\n @if (currentLabel()) {\n <span class=\"ui-toggle-button-label\">{{ currentLabel() }}</span>\n }\n @if (!iconBefore()) {\n <ng-container [ngTemplateOutlet]=\"singleIcon\" />\n }\n }\n </button>\n}\n\n<ng-template #singleIcon>\n @if (iconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n } @else if (currentIcon(); as iconName) {\n <ui-icon class=\"ui-toggle-button-icon\" [name]=\"iconName\" [size]=\"iconSize()\" />\n }\n</ng-template>\n", styles: [":host{display:inline-flex;gap:var(--ui-toggle-button-group-gap, var(--units-sm));font-family:var(--ui-toggle-button-font-family, var(--fontfamily-base));vertical-align:middle}:host .ui-toggle-button-item{height:var(--ui-toggle-button-height, var(--size-components-default));padding:0 var(--ui-toggle-button-padding-x, var(--units-default));font-size:var(--ui-toggle-button-font-size, var(--size-typography-text-default))}:host .ui-toggle-button-item._icon-only{width:var(--ui-toggle-button-height, var(--size-components-default));padding:0}:host._small .ui-toggle-button-item{height:var(--ui-toggle-button-height-small, var(--size-components-sm));padding:0 var(--ui-toggle-button-padding-x-small, var(--units-md));font-size:var(--ui-toggle-button-font-size-small, var(--size-typography-text-md))}:host._small .ui-toggle-button-item._icon-only{width:var(--ui-toggle-button-height-small, var(--size-components-sm));padding:0}:host._large .ui-toggle-button-item{height:var(--ui-toggle-button-height-large, var(--size-components-lg));padding:0 var(--ui-toggle-button-padding-x-large, var(--units-lg));font-size:var(--ui-toggle-button-font-size-large, var(--size-typography-text-lg))}:host._large .ui-toggle-button-item._icon-only{width:var(--ui-toggle-button-height-large, var(--size-components-lg));padding:0}.ui-toggle-button-item{display:inline-flex;align-items:center;justify-content:center;gap:var(--ui-toggle-button-gap, var(--units-sm));box-sizing:border-box;border:var(--ui-toggle-button-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--_invalid-stroke, var(--_stroke));border-radius:var(--ui-toggle-button-radius, var(--radius-sm));background-color:var(--_surface);color:var(--_content);font-family:inherit;font-weight:var(--ui-toggle-button-weight, var(--weight-bold));line-height:1.2;white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none;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))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-toggle-button-item:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-toggle-button-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--_invalid-stroke, var(--_ring))}.ui-toggle-button-item:disabled{cursor:not-allowed}.ui-toggle-button-item:not(._selected){--_surface: var(--ui-toggle-button-surface, var(--actions-lowoutlined-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-lowoutlined-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-lowoutlined-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-lowoutlined-stroke-focused))}.ui-toggle-button-item:not(._selected):hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-lowoutlined-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-lowoutlined-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-lowoutlined-stroke-hover))}.ui-toggle-button-item:not(._selected):active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-lowoutlined-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-lowoutlined-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-lowoutlined-stroke-pressed))}.ui-toggle-button-item:not(._selected):disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-lowoutlined-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-lowoutlined-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-lowoutlined-stroke-disabled))}.ui-toggle-button-icon{line-height:0}.ui-toggle-button-label{display:inline-block}:host._filled .ui-toggle-button-item:not(._selected){--_surface: var(--ui-toggle-button-surface, var(--actions-low-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-low-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-low-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-low-stroke-focused))}:host._filled .ui-toggle-button-item:not(._selected):hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-low-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-low-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-low-stroke-hover))}:host._filled .ui-toggle-button-item:not(._selected):active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-low-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-low-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-low-stroke-pressed))}:host._filled .ui-toggle-button-item:not(._selected):disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-low-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-low-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-low-stroke-disabled))}:host._ghost .ui-toggle-button-item:not(._selected){--_surface: var(--ui-toggle-button-surface, var(--actions-lowghost-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-lowghost-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-lowghost-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-lowghost-stroke-focused))}:host._ghost .ui-toggle-button-item:not(._selected):hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-lowghost-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-lowghost-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-lowghost-stroke-hover))}:host._ghost .ui-toggle-button-item:not(._selected):active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-lowghost-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-lowghost-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-lowghost-stroke-pressed))}:host._ghost .ui-toggle-button-item:not(._selected):disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-lowghost-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-lowghost-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-lowghost-stroke-disabled))}:host._high .ui-toggle-button-item._selected{--_surface: var(--ui-toggle-button-surface, var(--actions-high-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-high-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-high-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-high-stroke-focused))}:host._high .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-high-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-high-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-high-stroke-hover))}:host._high .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-high-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-high-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-high-stroke-pressed))}:host._high .ui-toggle-button-item._selected:disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-high-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-high-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-high-stroke-disabled))}:host._low .ui-toggle-button-item._selected{--_surface: var(--ui-toggle-button-surface, var(--actions-low-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-low-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-low-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-low-stroke-focused))}:host._low .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-low-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-low-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-low-stroke-hover))}:host._low .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-low-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-low-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-low-stroke-pressed))}:host._low .ui-toggle-button-item._selected:disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-low-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-low-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-low-stroke-disabled))}:host._success .ui-toggle-button-item._selected{--_surface: var(--ui-toggle-button-surface, var(--actions-success-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-success-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-success-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-success-stroke-focused))}:host._success .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-success-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-success-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-success-stroke-hover))}:host._success .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-success-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-success-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-success-stroke-pressed))}:host._success .ui-toggle-button-item._selected:disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-success-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-success-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-success-stroke-disabled))}:host._warning .ui-toggle-button-item._selected{--_surface: var(--ui-toggle-button-surface, var(--actions-warning-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-warning-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-warning-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-warning-stroke-focused))}:host._warning .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-warning-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-warning-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-warning-stroke-hover))}:host._warning .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-warning-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-warning-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-warning-stroke-pressed))}:host._warning .ui-toggle-button-item._selected:disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-warning-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-warning-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-warning-stroke-disabled))}:host._error .ui-toggle-button-item._selected{--_surface: var(--ui-toggle-button-surface, var(--actions-error-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-error-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-error-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-error-stroke-focused))}:host._error .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-error-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-error-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-error-stroke-hover))}:host._error .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-error-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-error-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-error-stroke-pressed))}:host._error .ui-toggle-button-item._selected:disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-error-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-error-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-error-stroke-disabled))}:host._rounded .ui-toggle-button-item{border-radius:var(--ui-toggle-button-radius-rounded, var(--radius-full))}:host._fluid{display:flex;width:100%}:host._fluid .ui-toggle-button-item{flex:1 1 0;min-width:0}:host._vertical{flex-direction:column;align-items:stretch}:host._readonly .ui-toggle-button-item{cursor:default}:host._invalid{--_invalid-stroke: var(--ui-toggle-button-stroke-invalid, var(--form-error-stroke-default))}\n"] }]
363
- }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], onLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "onLabel", required: false }] }], offLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "offLabel", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], onIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "onIcon", required: false }] }], offIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "offIcon", required: false }] }], iconPos: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPos", required: false }] }], trueValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "trueValue", required: false }] }], falseValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "falseValue", required: false }] }], 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 }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], ripple: [{ type: i0.Input, args: [{ isSignal: true, alias: "ripple", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], allowEmpty: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowEmpty", required: false }] }], iconTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconTemplate", required: false }] }], contentTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentTemplate", required: false }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], toggleChange: [{ type: i0.Output, args: ["toggleChange"] }], optionClick: [{ type: i0.Output, args: ["optionClick"] }], toggleFocus: [{ type: i0.Output, args: ["toggleFocus"] }], toggleBlur: [{ type: i0.Output, args: ["toggleBlur"] }], buttons: [{ type: i0.ViewChildren, args: ['itemEl', { isSignal: true }] }] } });
364
-
365
- /*
366
- * Public API Surface of ui-kit/ui-toggle-button
367
- */
368
-
369
- /**
370
- * Generated bundle index. Do not edit.
371
- */
372
-
10
+ var UiToggleButton = class UiToggleButton extends BaseFieldControl {
11
+ constructor() {
12
+ super();
13
+ this.label = input(...ngDevMode ? [void 0, { debugName: "label" }] : /* istanbul ignore next */ []);
14
+ this.onLabel = input(...ngDevMode ? [void 0, { debugName: "onLabel" }] : /* istanbul ignore next */ []);
15
+ this.offLabel = input(...ngDevMode ? [void 0, { debugName: "offLabel" }] : /* istanbul ignore next */ []);
16
+ this.icon = input(...ngDevMode ? [void 0, { debugName: "icon" }] : /* istanbul ignore next */ []);
17
+ this.onIcon = input(...ngDevMode ? [void 0, { debugName: "onIcon" }] : /* istanbul ignore next */ []);
18
+ this.offIcon = input(...ngDevMode ? [void 0, { debugName: "offIcon" }] : /* istanbul ignore next */ []);
19
+ this.iconPos = input("left", ...ngDevMode ? [{ debugName: "iconPos" }] : /* istanbul ignore next */ []);
20
+ this.trueValue = input(true, ...ngDevMode ? [{ debugName: "trueValue" }] : /* istanbul ignore next */ []);
21
+ this.falseValue = input(false, ...ngDevMode ? [{ debugName: "falseValue" }] : /* istanbul ignore next */ []);
22
+ this.options = input(...ngDevMode ? [void 0, { debugName: "options" }] : /* istanbul ignore next */ []);
23
+ this.optionLabel = input(...ngDevMode ? [void 0, { debugName: "optionLabel" }] : /* istanbul ignore next */ []);
24
+ this.optionValue = input(...ngDevMode ? [void 0, { debugName: "optionValue" }] : /* istanbul ignore next */ []);
25
+ this.optionDisabled = input(...ngDevMode ? [void 0, { debugName: "optionDisabled" }] : /* istanbul ignore next */ []);
26
+ this.optionIcon = input(...ngDevMode ? [void 0, { debugName: "optionIcon" }] : /* istanbul ignore next */ []);
27
+ this.dataKey = input(...ngDevMode ? [void 0, { debugName: "dataKey" }] : /* istanbul ignore next */ []);
28
+ this.orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
29
+ this.level = input("high", ...ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []);
30
+ this.variant = input("outlined", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
31
+ this.size = input("default", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
32
+ this.fluid = input(false, {
33
+ ...ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {},
34
+ transform: booleanAttribute
35
+ });
36
+ this.ripple = input(true, {
37
+ ...ngDevMode ? { debugName: "ripple" } : /* istanbul ignore next */ {},
38
+ transform: booleanAttribute
39
+ });
40
+ this.rounded = input(false, {
41
+ ...ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {},
42
+ transform: booleanAttribute
43
+ });
44
+ this.allowEmpty = input(true, {
45
+ ...ngDevMode ? { debugName: "allowEmpty" } : /* istanbul ignore next */ {},
46
+ transform: booleanAttribute
47
+ });
48
+ this.iconTemplate = input(...ngDevMode ? [void 0, { debugName: "iconTemplate" }] : /* istanbul ignore next */ []);
49
+ this.contentTemplate = input(...ngDevMode ? [void 0, { debugName: "contentTemplate" }] : /* istanbul ignore next */ []);
50
+ this.itemTemplate = input(...ngDevMode ? [void 0, { debugName: "itemTemplate" }] : /* istanbul ignore next */ []);
51
+ this.toggleChange = output();
52
+ this.optionClick = output();
53
+ this.toggleFocus = output();
54
+ this.toggleBlur = output();
55
+ this.buttons = viewChildren("itemEl", ...ngDevMode ? [{ debugName: "buttons" }] : /* istanbul ignore next */ []);
56
+ this.resolver = createOptionResolver({
57
+ optionValue: this.optionValue,
58
+ optionLabel: this.optionLabel,
59
+ optionDisabled: this.optionDisabled,
60
+ dataKey: this.dataKey
61
+ });
62
+ this.isGroup = computed(() => !!this.options(), ...ngDevMode ? [{ debugName: "isGroup" }] : /* istanbul ignore next */ []);
63
+ this.iconSize = computed(() => {
64
+ const size = this.size();
65
+ if (size === "small") return "sm";
66
+ return size === "large" ? "lg" : "default";
67
+ }, ...ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []);
68
+ this.hostClasses = computed(() => {
69
+ const c = ["ui-toggle-button", `_${this.level()}`];
70
+ if (this.size() !== "default") c.push(`_${this.size()}`);
71
+ if (this.variant() !== "outlined") c.push(`_${this.variant()}`);
72
+ if (this.rounded()) c.push("_rounded");
73
+ if (this.fluid()) c.push("_fluid");
74
+ if (this.isGroup()) {
75
+ c.push("_group");
76
+ if (this.orientation() === "vertical") c.push("_vertical");
77
+ }
78
+ if (this.readonly()) c.push("_readonly");
79
+ if (this.isDisabled()) c.push("_disabled");
80
+ if (this.isInvalid()) c.push("_invalid");
81
+ return c.join(" ");
82
+ }, ...ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []);
83
+ this.groupAriaLabel = computed(() => this.isGroup() ? this.ariaLabel() || null : null, ...ngDevMode ? [{ debugName: "groupAriaLabel" }] : /* istanbul ignore next */ []);
84
+ this.groupAriaLabelledBy = computed(() => this.isGroup() ? this.ariaLabelledBy() || null : null, ...ngDevMode ? [{ debugName: "groupAriaLabelledBy" }] : /* istanbul ignore next */ []);
85
+ this.checked = computed(() => this.modelValue() === this.trueValue(), ...ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []);
86
+ this.hasStateLabels = computed(() => !!this.onLabel() && !!this.offLabel() && this.onLabel() !== this.offLabel(), ...ngDevMode ? [{ debugName: "hasStateLabels" }] : /* istanbul ignore next */ []);
87
+ this.currentLabel = computed(() => (this.checked() ? this.onLabel() : this.offLabel()) ?? this.label() ?? null, ...ngDevMode ? [{ debugName: "currentLabel" }] : /* istanbul ignore next */ []);
88
+ this.currentIcon = computed(() => (this.checked() ? this.onIcon() : this.offIcon()) ?? this.icon() ?? null, ...ngDevMode ? [{ debugName: "currentIcon" }] : /* istanbul ignore next */ []);
89
+ this.isIconOnly = computed(() => !this.contentTemplate() && !this.currentLabel() && !!this.currentIcon(), ...ngDevMode ? [{ debugName: "isIconOnly" }] : /* istanbul ignore next */ []);
90
+ this.iconBefore = computed(() => this.iconPos() === "left", ...ngDevMode ? [{ debugName: "iconBefore" }] : /* istanbul ignore next */ []);
91
+ this.stateContext = computed(() => ({
92
+ $implicit: this.checked(),
93
+ checked: this.checked()
94
+ }), ...ngDevMode ? [{ debugName: "stateContext" }] : /* istanbul ignore next */ []);
95
+ this.buttonAriaLabel = computed(() => this.ariaLabel() || (this.isIconOnly() ? this.currentLabel() : null), ...ngDevMode ? [{ debugName: "buttonAriaLabel" }] : /* istanbul ignore next */ []);
96
+ this.normalizedOptions = computed(() => {
97
+ const raw = this.options() ?? [];
98
+ const model = this.modelValue();
99
+ const groupDisabled = this.isDisabled();
100
+ return raw.map((option, index) => {
101
+ const value = this.resolveValue(option);
102
+ const selected = this.isPressed(value, model);
103
+ const label = this.resolveLabel(option);
104
+ const icon = this.resolveIcon(option, selected);
105
+ return {
106
+ key: `${this.uid}-${index}`,
107
+ index,
108
+ value,
109
+ label,
110
+ icon,
111
+ ariaLabel: isRecord(option) ? this.resolver.asText(option["ariaLabel"]) : null,
112
+ disabled: groupDisabled || this.resolver.resolveDisabled(option),
113
+ selected,
114
+ iconOnly: !label && !!icon,
115
+ original: option
116
+ };
117
+ });
118
+ }, ...ngDevMode ? [{ debugName: "normalizedOptions" }] : /* istanbul ignore next */ []);
119
+ if (isDevMode()) effect(() => {
120
+ if (this.isGroup()) {
121
+ if (!this.ariaLabel() && !this.ariaLabelledBy()) warnMissingAccessibleName("ui-toggle-button", "Group has no accessible name: provide `ariaLabel` (or `ariaLabelledBy`).");
122
+ if (this.normalizedOptions().some((o) => o.iconOnly && !o.ariaLabel)) warnMissingAccessibleName("ui-toggle-button", "Icon-only option has no accessible name: add `ariaLabel` on the option.");
123
+ return;
124
+ }
125
+ if (this.isIconOnly() && !this.ariaLabel()) warnMissingAccessibleName("ui-toggle-button", "Icon-only button has no accessible name: provide `ariaLabel`.");
126
+ if (this.hasStateLabels() && !this.ariaLabel() && !this.ariaLabelledBy()) warnMissingAccessibleName("ui-toggle-button", "`onLabel`/`offLabel` differ: provide a state-independent `ariaLabel` (or `ariaLabelledBy`).");
127
+ });
128
+ }
129
+ itemContext(item) {
130
+ return {
131
+ $implicit: item.original,
132
+ option: item.original,
133
+ selected: item.selected,
134
+ index: item.index
135
+ };
136
+ }
137
+ uidPrefix() {
138
+ return "ui-toggle-button";
139
+ }
140
+ focus(options) {
141
+ this.buttons().find((ref) => !ref.nativeElement.disabled)?.nativeElement.focus(options);
142
+ }
143
+ toggle() {
144
+ if (this.isDisabled() || this.readonly()) return;
145
+ if (this.checked() && !this.allowEmpty()) return;
146
+ const next = this.checked() ? this.falseValue() : this.trueValue();
147
+ this.modelValue.set(next);
148
+ this.emitChange(next);
149
+ this.toggleChange.emit(next);
150
+ }
151
+ toggleOption(item, event) {
152
+ if (item.disabled || this.readonly()) return;
153
+ const value = item.value;
154
+ const model = this.modelValue();
155
+ const next = Array.isArray(model) ? [...model] : [];
156
+ const at = next.findIndex((v) => this.resolver.equals(v, value));
157
+ let selected;
158
+ if (at !== -1) {
159
+ if (!this.allowEmpty() && next.length === 1) return;
160
+ next.splice(at, 1);
161
+ selected = false;
162
+ } else {
163
+ next.push(value);
164
+ selected = true;
165
+ }
166
+ this.modelValue.set(next);
167
+ this.emitChange(next);
168
+ this.toggleChange.emit(next);
169
+ this.optionClick.emit({
170
+ option: item.original,
171
+ value,
172
+ index: item.index,
173
+ selected,
174
+ originalEvent: event
175
+ });
176
+ }
177
+ onBlur(event) {
178
+ this.emitTouch();
179
+ this.toggleBlur.emit(event);
180
+ }
181
+ resolveValue(option) {
182
+ if (!this.optionValue() && isRecord(option) && "value" in option) return option["value"];
183
+ return this.resolver.resolveValue(option);
184
+ }
185
+ resolveLabel(option) {
186
+ if (!this.optionLabel() && isRecord(option) && !("label" in option)) return null;
187
+ return this.resolver.resolveLabel(option);
188
+ }
189
+ resolveIcon(option, selected) {
190
+ if (selected && isRecord(option)) {
191
+ const swapped = this.resolver.asText(option["selectedIcon"]);
192
+ if (swapped) return swapped;
193
+ }
194
+ const field = this.optionIcon();
195
+ if (field) return this.resolver.asText(this.resolver.getField(option, field));
196
+ if (isRecord(option)) return this.resolver.asText(option["icon"]);
197
+ return null;
198
+ }
199
+ isPressed(value, model) {
200
+ return Array.isArray(model) && model.some((v) => this.resolver.equals(v, value));
201
+ }
202
+ static {
203
+ this.ɵfac = i0.ɵɵngDeclareFactory({
204
+ minVersion: "12.0.0",
205
+ version: "22.3.0",
206
+ ngImport: i0,
207
+ type: UiToggleButton,
208
+ deps: [],
209
+ target: i0.ɵɵFactoryTarget.Component
210
+ });
211
+ }
212
+ static {
213
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
214
+ minVersion: "17.0.0",
215
+ version: "22.3.0",
216
+ type: UiToggleButton,
217
+ isStandalone: true,
218
+ selector: "ui-toggle-button",
219
+ inputs: {
220
+ label: {
221
+ classPropertyName: "label",
222
+ publicName: "label",
223
+ isSignal: true,
224
+ isRequired: false,
225
+ transformFunction: null
226
+ },
227
+ onLabel: {
228
+ classPropertyName: "onLabel",
229
+ publicName: "onLabel",
230
+ isSignal: true,
231
+ isRequired: false,
232
+ transformFunction: null
233
+ },
234
+ offLabel: {
235
+ classPropertyName: "offLabel",
236
+ publicName: "offLabel",
237
+ isSignal: true,
238
+ isRequired: false,
239
+ transformFunction: null
240
+ },
241
+ icon: {
242
+ classPropertyName: "icon",
243
+ publicName: "icon",
244
+ isSignal: true,
245
+ isRequired: false,
246
+ transformFunction: null
247
+ },
248
+ onIcon: {
249
+ classPropertyName: "onIcon",
250
+ publicName: "onIcon",
251
+ isSignal: true,
252
+ isRequired: false,
253
+ transformFunction: null
254
+ },
255
+ offIcon: {
256
+ classPropertyName: "offIcon",
257
+ publicName: "offIcon",
258
+ isSignal: true,
259
+ isRequired: false,
260
+ transformFunction: null
261
+ },
262
+ iconPos: {
263
+ classPropertyName: "iconPos",
264
+ publicName: "iconPos",
265
+ isSignal: true,
266
+ isRequired: false,
267
+ transformFunction: null
268
+ },
269
+ trueValue: {
270
+ classPropertyName: "trueValue",
271
+ publicName: "trueValue",
272
+ isSignal: true,
273
+ isRequired: false,
274
+ transformFunction: null
275
+ },
276
+ falseValue: {
277
+ classPropertyName: "falseValue",
278
+ publicName: "falseValue",
279
+ isSignal: true,
280
+ isRequired: false,
281
+ transformFunction: null
282
+ },
283
+ options: {
284
+ classPropertyName: "options",
285
+ publicName: "options",
286
+ isSignal: true,
287
+ isRequired: false,
288
+ transformFunction: null
289
+ },
290
+ optionLabel: {
291
+ classPropertyName: "optionLabel",
292
+ publicName: "optionLabel",
293
+ isSignal: true,
294
+ isRequired: false,
295
+ transformFunction: null
296
+ },
297
+ optionValue: {
298
+ classPropertyName: "optionValue",
299
+ publicName: "optionValue",
300
+ isSignal: true,
301
+ isRequired: false,
302
+ transformFunction: null
303
+ },
304
+ optionDisabled: {
305
+ classPropertyName: "optionDisabled",
306
+ publicName: "optionDisabled",
307
+ isSignal: true,
308
+ isRequired: false,
309
+ transformFunction: null
310
+ },
311
+ optionIcon: {
312
+ classPropertyName: "optionIcon",
313
+ publicName: "optionIcon",
314
+ isSignal: true,
315
+ isRequired: false,
316
+ transformFunction: null
317
+ },
318
+ dataKey: {
319
+ classPropertyName: "dataKey",
320
+ publicName: "dataKey",
321
+ isSignal: true,
322
+ isRequired: false,
323
+ transformFunction: null
324
+ },
325
+ orientation: {
326
+ classPropertyName: "orientation",
327
+ publicName: "orientation",
328
+ isSignal: true,
329
+ isRequired: false,
330
+ transformFunction: null
331
+ },
332
+ level: {
333
+ classPropertyName: "level",
334
+ publicName: "level",
335
+ isSignal: true,
336
+ isRequired: false,
337
+ transformFunction: null
338
+ },
339
+ variant: {
340
+ classPropertyName: "variant",
341
+ publicName: "variant",
342
+ isSignal: true,
343
+ isRequired: false,
344
+ transformFunction: null
345
+ },
346
+ size: {
347
+ classPropertyName: "size",
348
+ publicName: "size",
349
+ isSignal: true,
350
+ isRequired: false,
351
+ transformFunction: null
352
+ },
353
+ fluid: {
354
+ classPropertyName: "fluid",
355
+ publicName: "fluid",
356
+ isSignal: true,
357
+ isRequired: false,
358
+ transformFunction: null
359
+ },
360
+ ripple: {
361
+ classPropertyName: "ripple",
362
+ publicName: "ripple",
363
+ isSignal: true,
364
+ isRequired: false,
365
+ transformFunction: null
366
+ },
367
+ rounded: {
368
+ classPropertyName: "rounded",
369
+ publicName: "rounded",
370
+ isSignal: true,
371
+ isRequired: false,
372
+ transformFunction: null
373
+ },
374
+ allowEmpty: {
375
+ classPropertyName: "allowEmpty",
376
+ publicName: "allowEmpty",
377
+ isSignal: true,
378
+ isRequired: false,
379
+ transformFunction: null
380
+ },
381
+ iconTemplate: {
382
+ classPropertyName: "iconTemplate",
383
+ publicName: "iconTemplate",
384
+ isSignal: true,
385
+ isRequired: false,
386
+ transformFunction: null
387
+ },
388
+ contentTemplate: {
389
+ classPropertyName: "contentTemplate",
390
+ publicName: "contentTemplate",
391
+ isSignal: true,
392
+ isRequired: false,
393
+ transformFunction: null
394
+ },
395
+ itemTemplate: {
396
+ classPropertyName: "itemTemplate",
397
+ publicName: "itemTemplate",
398
+ isSignal: true,
399
+ isRequired: false,
400
+ transformFunction: null
401
+ }
402
+ },
403
+ outputs: {
404
+ toggleChange: "toggleChange",
405
+ optionClick: "optionClick",
406
+ toggleFocus: "toggleFocus",
407
+ toggleBlur: "toggleBlur"
408
+ },
409
+ host: { properties: {
410
+ "class": "hostClasses()",
411
+ "attr.role": "isGroup() ? 'group' : null",
412
+ "attr.aria-label": "groupAriaLabel()",
413
+ "attr.aria-labelledby": "groupAriaLabelledBy()"
414
+ } },
415
+ providers: [{
416
+ provide: NG_VALUE_ACCESSOR,
417
+ useExisting: forwardRef(() => UiToggleButton),
418
+ multi: true
419
+ }],
420
+ viewQueries: [{
421
+ propertyName: "buttons",
422
+ predicate: ["itemEl"],
423
+ descendants: true,
424
+ isSignal: true
425
+ }],
426
+ usesInheritance: true,
427
+ ngImport: i0,
428
+ template: "@if (isGroup()) {\n @for (item of normalizedOptions(); track item.key) {\n <button\n #itemEl\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-toggle-button-item\"\n [class._selected]=\"item.selected\"\n [class._icon-only]=\"item.iconOnly\"\n [disabled]=\"item.disabled\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-pressed]=\"item.selected\"\n [attr.aria-label]=\"item.ariaLabel\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (click)=\"toggleOption(item, $event)\"\n (focus)=\"toggleFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n >\n @if (itemTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"itemContext(item)\" />\n } @else {\n @if (iconBefore() && item.icon) {\n <ui-icon class=\"ui-toggle-button-icon\" [name]=\"item.icon\" [size]=\"iconSize()\" />\n }\n @if (item.label) {\n <span class=\"ui-toggle-button-label\">{{ item.label }}</span>\n }\n @if (!iconBefore() && item.icon) {\n <ui-icon class=\"ui-toggle-button-icon\" [name]=\"item.icon\" [size]=\"iconSize()\" />\n }\n }\n </button>\n }\n} @else {\n <button\n #itemEl\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-toggle-button-item\"\n [class._selected]=\"checked()\"\n [class._icon-only]=\"isIconOnly()\"\n [id]=\"resolvedId()\"\n [disabled]=\"isDisabled()\"\n [attr.name]=\"name()\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-pressed]=\"checked()\"\n [attr.aria-label]=\"buttonAriaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (click)=\"toggle()\"\n (focus)=\"toggleFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n >\n @if (contentTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n } @else {\n @if (iconBefore()) {\n <ng-container [ngTemplateOutlet]=\"singleIcon\" />\n }\n @if (currentLabel()) {\n <span class=\"ui-toggle-button-label\">{{ currentLabel() }}</span>\n }\n @if (!iconBefore()) {\n <ng-container [ngTemplateOutlet]=\"singleIcon\" />\n }\n }\n </button>\n}\n\n<ng-template #singleIcon>\n @if (iconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n } @else if (currentIcon(); as iconName) {\n <ui-icon class=\"ui-toggle-button-icon\" [name]=\"iconName\" [size]=\"iconSize()\" />\n }\n</ng-template>\n",
429
+ styles: [":host{display:inline-flex;gap:var(--ui-toggle-button-group-gap, var(--units-sm));font-family:var(--ui-toggle-button-font-family, var(--fontfamily-base));vertical-align:middle}:host .ui-toggle-button-item{height:var(--ui-toggle-button-height, var(--size-components-default));padding:0 var(--ui-toggle-button-padding-x, var(--units-default));font-size:var(--ui-toggle-button-font-size, var(--size-typography-text-default))}:host .ui-toggle-button-item._icon-only{width:var(--ui-toggle-button-height, var(--size-components-default));padding:0}:host._small .ui-toggle-button-item{height:var(--ui-toggle-button-height-small, var(--size-components-sm));padding:0 var(--ui-toggle-button-padding-x-small, var(--units-md));font-size:var(--ui-toggle-button-font-size-small, var(--size-typography-text-md))}:host._small .ui-toggle-button-item._icon-only{width:var(--ui-toggle-button-height-small, var(--size-components-sm));padding:0}:host._large .ui-toggle-button-item{height:var(--ui-toggle-button-height-large, var(--size-components-lg));padding:0 var(--ui-toggle-button-padding-x-large, var(--units-lg));font-size:var(--ui-toggle-button-font-size-large, var(--size-typography-text-lg))}:host._large .ui-toggle-button-item._icon-only{width:var(--ui-toggle-button-height-large, var(--size-components-lg));padding:0}.ui-toggle-button-item{display:inline-flex;align-items:center;justify-content:center;gap:var(--ui-toggle-button-gap, var(--units-sm));box-sizing:border-box;border:var(--ui-toggle-button-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--_invalid-stroke, var(--_stroke));border-radius:var(--ui-toggle-button-radius, var(--radius-sm));background-color:var(--_surface);color:var(--_content);font-family:inherit;font-weight:var(--ui-toggle-button-weight, var(--weight-bold));line-height:1.2;white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none;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))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-toggle-button-item:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-toggle-button-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--_invalid-stroke, var(--_ring))}.ui-toggle-button-item:disabled{cursor:not-allowed}.ui-toggle-button-item:not(._selected){--_surface: var(--ui-toggle-button-surface, var(--actions-lowoutlined-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-lowoutlined-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-lowoutlined-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-lowoutlined-stroke-focused))}.ui-toggle-button-item:not(._selected):hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-lowoutlined-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-lowoutlined-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-lowoutlined-stroke-hover))}.ui-toggle-button-item:not(._selected):active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-lowoutlined-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-lowoutlined-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-lowoutlined-stroke-pressed))}.ui-toggle-button-item:not(._selected):disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-lowoutlined-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-lowoutlined-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-lowoutlined-stroke-disabled))}.ui-toggle-button-icon{line-height:0}.ui-toggle-button-label{display:inline-block}:host._filled .ui-toggle-button-item:not(._selected){--_surface: var(--ui-toggle-button-surface, var(--actions-low-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-low-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-low-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-low-stroke-focused))}:host._filled .ui-toggle-button-item:not(._selected):hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-low-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-low-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-low-stroke-hover))}:host._filled .ui-toggle-button-item:not(._selected):active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-low-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-low-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-low-stroke-pressed))}:host._filled .ui-toggle-button-item:not(._selected):disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-low-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-low-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-low-stroke-disabled))}:host._ghost .ui-toggle-button-item:not(._selected){--_surface: var(--ui-toggle-button-surface, var(--actions-lowghost-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-lowghost-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-lowghost-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-lowghost-stroke-focused))}:host._ghost .ui-toggle-button-item:not(._selected):hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-lowghost-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-lowghost-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-lowghost-stroke-hover))}:host._ghost .ui-toggle-button-item:not(._selected):active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-lowghost-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-lowghost-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-lowghost-stroke-pressed))}:host._ghost .ui-toggle-button-item:not(._selected):disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-lowghost-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-lowghost-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-lowghost-stroke-disabled))}:host._high .ui-toggle-button-item._selected{--_surface: var(--ui-toggle-button-surface, var(--actions-high-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-high-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-high-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-high-stroke-focused))}:host._high .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-high-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-high-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-high-stroke-hover))}:host._high .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-high-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-high-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-high-stroke-pressed))}:host._high .ui-toggle-button-item._selected:disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-high-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-high-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-high-stroke-disabled))}:host._low .ui-toggle-button-item._selected{--_surface: var(--ui-toggle-button-surface, var(--actions-low-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-low-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-low-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-low-stroke-focused))}:host._low .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-low-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-low-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-low-stroke-hover))}:host._low .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-low-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-low-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-low-stroke-pressed))}:host._low .ui-toggle-button-item._selected:disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-low-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-low-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-low-stroke-disabled))}:host._success .ui-toggle-button-item._selected{--_surface: var(--ui-toggle-button-surface, var(--actions-success-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-success-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-success-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-success-stroke-focused))}:host._success .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-success-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-success-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-success-stroke-hover))}:host._success .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-success-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-success-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-success-stroke-pressed))}:host._success .ui-toggle-button-item._selected:disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-success-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-success-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-success-stroke-disabled))}:host._warning .ui-toggle-button-item._selected{--_surface: var(--ui-toggle-button-surface, var(--actions-warning-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-warning-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-warning-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-warning-stroke-focused))}:host._warning .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-warning-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-warning-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-warning-stroke-hover))}:host._warning .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-warning-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-warning-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-warning-stroke-pressed))}:host._warning .ui-toggle-button-item._selected:disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-warning-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-warning-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-warning-stroke-disabled))}:host._error .ui-toggle-button-item._selected{--_surface: var(--ui-toggle-button-surface, var(--actions-error-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-error-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-error-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-error-stroke-focused))}:host._error .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-error-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-error-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-error-stroke-hover))}:host._error .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-error-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-error-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-error-stroke-pressed))}:host._error .ui-toggle-button-item._selected:disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-error-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-error-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-error-stroke-disabled))}:host._rounded .ui-toggle-button-item{border-radius:var(--ui-toggle-button-radius-rounded, var(--radius-full))}:host._fluid{display:flex;width:100%}:host._fluid .ui-toggle-button-item{flex:1 1 0;min-width:0}:host._vertical{flex-direction:column;align-items:stretch}:host._readonly .ui-toggle-button-item{cursor:default}:host._invalid{--_invalid-stroke: var(--ui-toggle-button-stroke-invalid, var(--form-error-stroke-default))}\n"],
430
+ dependencies: [{
431
+ kind: "component",
432
+ type: UiIcon,
433
+ selector: "ui-icon",
434
+ inputs: [
435
+ "name",
436
+ "size",
437
+ "type",
438
+ "family",
439
+ "decorative",
440
+ "ariaLabel"
441
+ ]
442
+ }, {
443
+ kind: "directive",
444
+ type: NgTemplateOutlet,
445
+ selector: "[ngTemplateOutlet]",
446
+ inputs: [
447
+ "ngTemplateOutletContext",
448
+ "ngTemplateOutlet",
449
+ "ngTemplateOutletInjector"
450
+ ]
451
+ }]
452
+ });
453
+ }
454
+ };
455
+ i0.ɵɵngDeclareClassMetadata({
456
+ minVersion: "12.0.0",
457
+ version: "22.3.0",
458
+ ngImport: i0,
459
+ type: UiToggleButton,
460
+ decorators: [{
461
+ type: Component,
462
+ args: [{
463
+ selector: "ui-toggle-button",
464
+ imports: [UiIcon, NgTemplateOutlet],
465
+ providers: [{
466
+ provide: NG_VALUE_ACCESSOR,
467
+ useExisting: forwardRef(() => UiToggleButton),
468
+ multi: true
469
+ }],
470
+ host: {
471
+ "[class]": "hostClasses()",
472
+ "[attr.role]": "isGroup() ? 'group' : null",
473
+ "[attr.aria-label]": "groupAriaLabel()",
474
+ "[attr.aria-labelledby]": "groupAriaLabelledBy()"
475
+ },
476
+ template: "@if (isGroup()) {\n @for (item of normalizedOptions(); track item.key) {\n <button\n #itemEl\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-toggle-button-item\"\n [class._selected]=\"item.selected\"\n [class._icon-only]=\"item.iconOnly\"\n [disabled]=\"item.disabled\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-pressed]=\"item.selected\"\n [attr.aria-label]=\"item.ariaLabel\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (click)=\"toggleOption(item, $event)\"\n (focus)=\"toggleFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n >\n @if (itemTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"itemContext(item)\" />\n } @else {\n @if (iconBefore() && item.icon) {\n <ui-icon class=\"ui-toggle-button-icon\" [name]=\"item.icon\" [size]=\"iconSize()\" />\n }\n @if (item.label) {\n <span class=\"ui-toggle-button-label\">{{ item.label }}</span>\n }\n @if (!iconBefore() && item.icon) {\n <ui-icon class=\"ui-toggle-button-icon\" [name]=\"item.icon\" [size]=\"iconSize()\" />\n }\n }\n </button>\n }\n} @else {\n <button\n #itemEl\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-toggle-button-item\"\n [class._selected]=\"checked()\"\n [class._icon-only]=\"isIconOnly()\"\n [id]=\"resolvedId()\"\n [disabled]=\"isDisabled()\"\n [attr.name]=\"name()\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-pressed]=\"checked()\"\n [attr.aria-label]=\"buttonAriaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (click)=\"toggle()\"\n (focus)=\"toggleFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n >\n @if (contentTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n } @else {\n @if (iconBefore()) {\n <ng-container [ngTemplateOutlet]=\"singleIcon\" />\n }\n @if (currentLabel()) {\n <span class=\"ui-toggle-button-label\">{{ currentLabel() }}</span>\n }\n @if (!iconBefore()) {\n <ng-container [ngTemplateOutlet]=\"singleIcon\" />\n }\n }\n </button>\n}\n\n<ng-template #singleIcon>\n @if (iconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n } @else if (currentIcon(); as iconName) {\n <ui-icon class=\"ui-toggle-button-icon\" [name]=\"iconName\" [size]=\"iconSize()\" />\n }\n</ng-template>\n",
477
+ styles: [":host{display:inline-flex;gap:var(--ui-toggle-button-group-gap, var(--units-sm));font-family:var(--ui-toggle-button-font-family, var(--fontfamily-base));vertical-align:middle}:host .ui-toggle-button-item{height:var(--ui-toggle-button-height, var(--size-components-default));padding:0 var(--ui-toggle-button-padding-x, var(--units-default));font-size:var(--ui-toggle-button-font-size, var(--size-typography-text-default))}:host .ui-toggle-button-item._icon-only{width:var(--ui-toggle-button-height, var(--size-components-default));padding:0}:host._small .ui-toggle-button-item{height:var(--ui-toggle-button-height-small, var(--size-components-sm));padding:0 var(--ui-toggle-button-padding-x-small, var(--units-md));font-size:var(--ui-toggle-button-font-size-small, var(--size-typography-text-md))}:host._small .ui-toggle-button-item._icon-only{width:var(--ui-toggle-button-height-small, var(--size-components-sm));padding:0}:host._large .ui-toggle-button-item{height:var(--ui-toggle-button-height-large, var(--size-components-lg));padding:0 var(--ui-toggle-button-padding-x-large, var(--units-lg));font-size:var(--ui-toggle-button-font-size-large, var(--size-typography-text-lg))}:host._large .ui-toggle-button-item._icon-only{width:var(--ui-toggle-button-height-large, var(--size-components-lg));padding:0}.ui-toggle-button-item{display:inline-flex;align-items:center;justify-content:center;gap:var(--ui-toggle-button-gap, var(--units-sm));box-sizing:border-box;border:var(--ui-toggle-button-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--_invalid-stroke, var(--_stroke));border-radius:var(--ui-toggle-button-radius, var(--radius-sm));background-color:var(--_surface);color:var(--_content);font-family:inherit;font-weight:var(--ui-toggle-button-weight, var(--weight-bold));line-height:1.2;white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none;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))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-toggle-button-item:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-toggle-button-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--_invalid-stroke, var(--_ring))}.ui-toggle-button-item:disabled{cursor:not-allowed}.ui-toggle-button-item:not(._selected){--_surface: var(--ui-toggle-button-surface, var(--actions-lowoutlined-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-lowoutlined-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-lowoutlined-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-lowoutlined-stroke-focused))}.ui-toggle-button-item:not(._selected):hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-lowoutlined-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-lowoutlined-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-lowoutlined-stroke-hover))}.ui-toggle-button-item:not(._selected):active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-lowoutlined-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-lowoutlined-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-lowoutlined-stroke-pressed))}.ui-toggle-button-item:not(._selected):disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-lowoutlined-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-lowoutlined-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-lowoutlined-stroke-disabled))}.ui-toggle-button-icon{line-height:0}.ui-toggle-button-label{display:inline-block}:host._filled .ui-toggle-button-item:not(._selected){--_surface: var(--ui-toggle-button-surface, var(--actions-low-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-low-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-low-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-low-stroke-focused))}:host._filled .ui-toggle-button-item:not(._selected):hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-low-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-low-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-low-stroke-hover))}:host._filled .ui-toggle-button-item:not(._selected):active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-low-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-low-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-low-stroke-pressed))}:host._filled .ui-toggle-button-item:not(._selected):disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-low-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-low-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-low-stroke-disabled))}:host._ghost .ui-toggle-button-item:not(._selected){--_surface: var(--ui-toggle-button-surface, var(--actions-lowghost-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-lowghost-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-lowghost-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-lowghost-stroke-focused))}:host._ghost .ui-toggle-button-item:not(._selected):hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-lowghost-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-lowghost-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-lowghost-stroke-hover))}:host._ghost .ui-toggle-button-item:not(._selected):active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-lowghost-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-lowghost-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-lowghost-stroke-pressed))}:host._ghost .ui-toggle-button-item:not(._selected):disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-lowghost-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-lowghost-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-lowghost-stroke-disabled))}:host._high .ui-toggle-button-item._selected{--_surface: var(--ui-toggle-button-surface, var(--actions-high-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-high-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-high-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-high-stroke-focused))}:host._high .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-high-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-high-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-high-stroke-hover))}:host._high .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-high-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-high-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-high-stroke-pressed))}:host._high .ui-toggle-button-item._selected:disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-high-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-high-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-high-stroke-disabled))}:host._low .ui-toggle-button-item._selected{--_surface: var(--ui-toggle-button-surface, var(--actions-low-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-low-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-low-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-low-stroke-focused))}:host._low .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-low-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-low-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-low-stroke-hover))}:host._low .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-low-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-low-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-low-stroke-pressed))}:host._low .ui-toggle-button-item._selected:disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-low-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-low-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-low-stroke-disabled))}:host._success .ui-toggle-button-item._selected{--_surface: var(--ui-toggle-button-surface, var(--actions-success-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-success-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-success-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-success-stroke-focused))}:host._success .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-success-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-success-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-success-stroke-hover))}:host._success .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-success-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-success-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-success-stroke-pressed))}:host._success .ui-toggle-button-item._selected:disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-success-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-success-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-success-stroke-disabled))}:host._warning .ui-toggle-button-item._selected{--_surface: var(--ui-toggle-button-surface, var(--actions-warning-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-warning-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-warning-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-warning-stroke-focused))}:host._warning .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-warning-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-warning-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-warning-stroke-hover))}:host._warning .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-warning-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-warning-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-warning-stroke-pressed))}:host._warning .ui-toggle-button-item._selected:disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-warning-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-warning-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-warning-stroke-disabled))}:host._error .ui-toggle-button-item._selected{--_surface: var(--ui-toggle-button-surface, var(--actions-error-surface-default));--_content: var(--ui-toggle-button-color, var(--actions-error-content-default));--_stroke: var(--ui-toggle-button-stroke, var(--actions-error-stroke-default));--_ring: var(--ui-toggle-button-focus-ring-color, var(--actions-error-stroke-focused))}:host._error .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--ui-toggle-button-surface-hover, var(--actions-error-surface-hover));--_content: var(--ui-toggle-button-color-hover, var(--actions-error-content-hover));--_stroke: var(--ui-toggle-button-stroke-hover, var(--actions-error-stroke-hover))}:host._error .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--ui-toggle-button-surface-pressed, var(--actions-error-surface-pressed));--_content: var(--ui-toggle-button-color-pressed, var(--actions-error-content-pressed));--_stroke: var(--ui-toggle-button-stroke-pressed, var(--actions-error-stroke-pressed))}:host._error .ui-toggle-button-item._selected:disabled{--_surface: var(--ui-toggle-button-surface-disabled, var(--actions-error-surface-disabled));--_content: var(--ui-toggle-button-color-disabled, var(--actions-error-content-disabled));--_stroke: var(--ui-toggle-button-stroke-disabled, var(--actions-error-stroke-disabled))}:host._rounded .ui-toggle-button-item{border-radius:var(--ui-toggle-button-radius-rounded, var(--radius-full))}:host._fluid{display:flex;width:100%}:host._fluid .ui-toggle-button-item{flex:1 1 0;min-width:0}:host._vertical{flex-direction:column;align-items:stretch}:host._readonly .ui-toggle-button-item{cursor:default}:host._invalid{--_invalid-stroke: var(--ui-toggle-button-stroke-invalid, var(--form-error-stroke-default))}\n"]
478
+ }]
479
+ }],
480
+ ctorParameters: () => [],
481
+ propDecorators: {
482
+ label: [{
483
+ type: i0.Input,
484
+ args: [{
485
+ isSignal: true,
486
+ alias: "label",
487
+ required: false
488
+ }]
489
+ }],
490
+ onLabel: [{
491
+ type: i0.Input,
492
+ args: [{
493
+ isSignal: true,
494
+ alias: "onLabel",
495
+ required: false
496
+ }]
497
+ }],
498
+ offLabel: [{
499
+ type: i0.Input,
500
+ args: [{
501
+ isSignal: true,
502
+ alias: "offLabel",
503
+ required: false
504
+ }]
505
+ }],
506
+ icon: [{
507
+ type: i0.Input,
508
+ args: [{
509
+ isSignal: true,
510
+ alias: "icon",
511
+ required: false
512
+ }]
513
+ }],
514
+ onIcon: [{
515
+ type: i0.Input,
516
+ args: [{
517
+ isSignal: true,
518
+ alias: "onIcon",
519
+ required: false
520
+ }]
521
+ }],
522
+ offIcon: [{
523
+ type: i0.Input,
524
+ args: [{
525
+ isSignal: true,
526
+ alias: "offIcon",
527
+ required: false
528
+ }]
529
+ }],
530
+ iconPos: [{
531
+ type: i0.Input,
532
+ args: [{
533
+ isSignal: true,
534
+ alias: "iconPos",
535
+ required: false
536
+ }]
537
+ }],
538
+ trueValue: [{
539
+ type: i0.Input,
540
+ args: [{
541
+ isSignal: true,
542
+ alias: "trueValue",
543
+ required: false
544
+ }]
545
+ }],
546
+ falseValue: [{
547
+ type: i0.Input,
548
+ args: [{
549
+ isSignal: true,
550
+ alias: "falseValue",
551
+ required: false
552
+ }]
553
+ }],
554
+ options: [{
555
+ type: i0.Input,
556
+ args: [{
557
+ isSignal: true,
558
+ alias: "options",
559
+ required: false
560
+ }]
561
+ }],
562
+ optionLabel: [{
563
+ type: i0.Input,
564
+ args: [{
565
+ isSignal: true,
566
+ alias: "optionLabel",
567
+ required: false
568
+ }]
569
+ }],
570
+ optionValue: [{
571
+ type: i0.Input,
572
+ args: [{
573
+ isSignal: true,
574
+ alias: "optionValue",
575
+ required: false
576
+ }]
577
+ }],
578
+ optionDisabled: [{
579
+ type: i0.Input,
580
+ args: [{
581
+ isSignal: true,
582
+ alias: "optionDisabled",
583
+ required: false
584
+ }]
585
+ }],
586
+ optionIcon: [{
587
+ type: i0.Input,
588
+ args: [{
589
+ isSignal: true,
590
+ alias: "optionIcon",
591
+ required: false
592
+ }]
593
+ }],
594
+ dataKey: [{
595
+ type: i0.Input,
596
+ args: [{
597
+ isSignal: true,
598
+ alias: "dataKey",
599
+ required: false
600
+ }]
601
+ }],
602
+ orientation: [{
603
+ type: i0.Input,
604
+ args: [{
605
+ isSignal: true,
606
+ alias: "orientation",
607
+ required: false
608
+ }]
609
+ }],
610
+ level: [{
611
+ type: i0.Input,
612
+ args: [{
613
+ isSignal: true,
614
+ alias: "level",
615
+ required: false
616
+ }]
617
+ }],
618
+ variant: [{
619
+ type: i0.Input,
620
+ args: [{
621
+ isSignal: true,
622
+ alias: "variant",
623
+ required: false
624
+ }]
625
+ }],
626
+ size: [{
627
+ type: i0.Input,
628
+ args: [{
629
+ isSignal: true,
630
+ alias: "size",
631
+ required: false
632
+ }]
633
+ }],
634
+ fluid: [{
635
+ type: i0.Input,
636
+ args: [{
637
+ isSignal: true,
638
+ alias: "fluid",
639
+ required: false
640
+ }]
641
+ }],
642
+ ripple: [{
643
+ type: i0.Input,
644
+ args: [{
645
+ isSignal: true,
646
+ alias: "ripple",
647
+ required: false
648
+ }]
649
+ }],
650
+ rounded: [{
651
+ type: i0.Input,
652
+ args: [{
653
+ isSignal: true,
654
+ alias: "rounded",
655
+ required: false
656
+ }]
657
+ }],
658
+ allowEmpty: [{
659
+ type: i0.Input,
660
+ args: [{
661
+ isSignal: true,
662
+ alias: "allowEmpty",
663
+ required: false
664
+ }]
665
+ }],
666
+ iconTemplate: [{
667
+ type: i0.Input,
668
+ args: [{
669
+ isSignal: true,
670
+ alias: "iconTemplate",
671
+ required: false
672
+ }]
673
+ }],
674
+ contentTemplate: [{
675
+ type: i0.Input,
676
+ args: [{
677
+ isSignal: true,
678
+ alias: "contentTemplate",
679
+ required: false
680
+ }]
681
+ }],
682
+ itemTemplate: [{
683
+ type: i0.Input,
684
+ args: [{
685
+ isSignal: true,
686
+ alias: "itemTemplate",
687
+ required: false
688
+ }]
689
+ }],
690
+ toggleChange: [{
691
+ type: i0.Output,
692
+ args: ["toggleChange"]
693
+ }],
694
+ optionClick: [{
695
+ type: i0.Output,
696
+ args: ["optionClick"]
697
+ }],
698
+ toggleFocus: [{
699
+ type: i0.Output,
700
+ args: ["toggleFocus"]
701
+ }],
702
+ toggleBlur: [{
703
+ type: i0.Output,
704
+ args: ["toggleBlur"]
705
+ }],
706
+ buttons: [{
707
+ type: i0.ViewChildren,
708
+ args: ["itemEl", { isSignal: true }]
709
+ }]
710
+ }
711
+ });
373
712
  export { UiToggleButton };
374
- //# sourceMappingURL=4sh-ui-kit-forms-ui-toggle-button.mjs.map
713
+
714
+ //# sourceMappingURL=4sh-ui-kit-forms-ui-toggle-button.mjs.map