@4sh/ui-kit 0.7.0 → 0.9.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 (158) hide show
  1. package/README.fr.md +12 -11
  2. package/README.md +12 -11
  3. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +3 -3
  4. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
  5. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +7 -5
  6. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
  7. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +4 -4
  8. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
  9. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +3 -3
  10. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
  11. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +6 -6
  12. package/fesm2022/4sh-ui-kit-base-ui-image.mjs +4 -4
  13. package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
  14. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +8 -6
  15. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
  16. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +5 -5
  17. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
  18. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +211 -27
  19. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
  20. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +4 -4
  21. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
  22. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +18 -5
  23. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
  24. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +11 -9
  25. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
  26. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +7 -7
  27. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
  28. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +5 -5
  29. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
  30. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +5 -5
  31. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
  32. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +5 -5
  33. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
  34. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +5 -5
  35. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
  36. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +4 -4
  37. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
  38. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +282 -0
  39. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -0
  40. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +4 -4
  41. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
  42. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +4 -4
  43. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
  44. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +4 -4
  45. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
  46. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +4 -4
  47. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
  48. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +8 -6
  49. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
  50. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +7 -5
  51. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
  52. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +4 -4
  53. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
  54. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +4 -4
  55. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
  56. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +5 -5
  57. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
  58. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +215 -0
  59. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -0
  60. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +8 -6
  61. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
  62. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +4 -4
  63. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
  64. package/fesm2022/4sh-ui-kit-forms.mjs +12 -7
  65. package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
  66. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +13 -13
  67. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
  68. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +4 -4
  69. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
  70. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +3 -3
  71. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +4 -4
  72. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
  73. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +4 -4
  74. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
  75. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +4 -4
  76. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
  77. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +10 -10
  78. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
  79. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +4 -4
  80. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
  81. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +4 -4
  82. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
  83. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +4 -4
  84. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
  85. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +4 -4
  86. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
  87. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +3 -3
  88. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +4 -4
  89. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
  90. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +4 -4
  91. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
  92. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +10 -10
  93. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
  94. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +45 -26
  95. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
  96. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +629 -0
  97. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -0
  98. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +16 -16
  99. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
  100. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +4 -4
  101. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
  102. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +4 -4
  103. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
  104. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +4 -4
  105. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
  106. package/fesm2022/4sh-ui-kit-motion.mjs +3 -3
  107. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +370 -0
  108. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -0
  109. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +4 -4
  110. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
  111. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +7 -5
  112. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
  113. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +7 -5
  114. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
  115. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +14 -12
  116. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
  117. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +22 -22
  118. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
  119. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +25 -21
  120. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
  121. package/fesm2022/4sh-ui-kit-ripple.mjs +298 -0
  122. package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -0
  123. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +7 -5
  124. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
  125. package/fesm2022/4sh-ui-kit-table-ui-table.mjs +34 -34
  126. package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
  127. package/fesm2022/4sh-ui-kit-theming.mjs +6 -6
  128. package/mcp/data/text-search-docs.json +741 -71
  129. package/mcp/data/ui-config.json +25927 -11496
  130. package/mcp/package.json +1 -1
  131. package/package.json +21 -1
  132. package/styles/base/_ripple.scss +53 -0
  133. package/styles/component-vars.scss +1426 -687
  134. package/styles/index.scss +1 -0
  135. package/styles/settings/_ui-config.scss +54 -2
  136. package/styles/utils/_mixins.scss +32 -30
  137. package/styles/utils/_overlay.scss +1 -1
  138. package/styles.css +1 -1
  139. package/types/4sh-ui-kit-actions-ui-button.d.ts +3 -1
  140. package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +3 -1
  141. package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +59 -2
  142. package/types/4sh-ui-kit-forms-ui-field.d.ts +13 -1
  143. package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +3 -1
  144. package/types/4sh-ui-kit-forms-ui-knob.d.ts +93 -0
  145. package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +3 -1
  146. package/types/4sh-ui-kit-forms-ui-select.d.ts +3 -1
  147. package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +114 -0
  148. package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +3 -1
  149. package/types/4sh-ui-kit-forms.d.ts +5 -1
  150. package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +4 -4
  151. package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +256 -0
  152. package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +201 -0
  153. package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +3 -1
  154. package/types/4sh-ui-kit-navigation-ui-menu.d.ts +3 -1
  155. package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +3 -1
  156. package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +3 -1
  157. package/types/4sh-ui-kit-ripple.d.ts +156 -0
  158. package/types/4sh-ui-kit-table-ui-paginator.d.ts +3 -1
@@ -0,0 +1,215 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, booleanAttribute, output, viewChild, signal, computed, effect, afterNextRender, forwardRef, Component } from '@angular/core';
3
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
4
+ import { BaseFieldControl, warnMissingAccessibleName } from '@4sh/ui-kit/forms';
5
+ import { UiCheckbox } from '@4sh/ui-kit/forms/ui-checkbox';
6
+ import { UiRadio } from '@4sh/ui-kit/forms/ui-radio';
7
+ import { UiToggle } from '@4sh/ui-kit/forms/ui-toggle';
8
+
9
+ /**
10
+ * ui-toggle-block: selectable block wrapping a checkbox, a radio or a switch.
11
+ *
12
+ * The block is the clickable surface; the selection control is an instance of
13
+ * `ui-checkbox` / `ui-radio` / `ui-toggle`, so the indicator keeps the exact
14
+ * appearance and behaviour it has on its own. A stretched `<label for>` covers
15
+ * the block, which makes the whole surface activate the native input without a
16
+ * click handler; the content region is the control's accessible name
17
+ * (`aria-labelledby`), so any markup can be projected without wrapping it in a
18
+ * `<label>`.
19
+ *
20
+ * `label` / `description` cover the common case; `<ng-content>` composes with
21
+ * them for a fully custom body.
22
+ *
23
+ * Works standalone, with `[(ngModel)]`, reactive forms or Signal Forms
24
+ * (ControlValueAccessor). Blocks form a group the native way: same `name`, same
25
+ * bound model.
26
+ */
27
+ class UiToggleBlock extends BaseFieldControl {
28
+ constructor() {
29
+ super();
30
+ /** Selection control embedded in the block. */
31
+ this.indicator = input('checkbox', /* @ts-ignore */
32
+ ...(ngDevMode ? [{ debugName: "indicator" }] : /* istanbul ignore next */ []));
33
+ /** Side of the block the indicator sits on. */
34
+ this.indicatorPosition = input('start', /* @ts-ignore */
35
+ ...(ngDevMode ? [{ debugName: "indicatorPosition" }] : /* istanbul ignore next */ []));
36
+ /** Vertical alignment of the indicator against the content. */
37
+ this.align = input('center', /* @ts-ignore */
38
+ ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
39
+ /** Keeps the control operable but removes the indicator from view (selection card). */
40
+ this.hideIndicator = input(false, { ...(ngDevMode ? { debugName: "hideIndicator" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
41
+ /** Size. */
42
+ this.size = input('default', /* @ts-ignore */
43
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
44
+ /** Main line of the block. */
45
+ this.label = input(/* @ts-ignore */
46
+ ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
47
+ /** Secondary line under the label. */
48
+ this.description = input(/* @ts-ignore */
49
+ ...(ngDevMode ? [undefined, { debugName: "description" }] : /* istanbul ignore next */ []));
50
+ /** Span the full width of the parent (a flex/grid parent otherwise sizes the block to its content). */
51
+ this.fluid = input(false, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
52
+ /** Ripple Effect */
53
+ this.ripple = input(true, { ...(ngDevMode ? { debugName: "ripple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
54
+ /** Value carried by this block in `radio` mode (the model takes it when selected). */
55
+ this.value = input(/* @ts-ignore */
56
+ ...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
57
+ /** Model value emitted when selected, in `checkbox` / `toggle` mode. */
58
+ this.trueValue = input(true, /* @ts-ignore */
59
+ ...(ngDevMode ? [{ debugName: "trueValue" }] : /* istanbul ignore next */ []));
60
+ /** Model value emitted when cleared, in `checkbox` / `toggle` mode. */
61
+ this.falseValue = input(false, /* @ts-ignore */
62
+ ...(ngDevMode ? [{ debugName: "falseValue" }] : /* istanbul ignore next */ []));
63
+ /** Emitted on user selection with the new model value (never when disabled/readonly). */
64
+ this.blockChange = output();
65
+ /** Emitted when the embedded control receives focus. */
66
+ this.blockFocus = output();
67
+ /** Emitted when the embedded control loses focus. */
68
+ this.blockBlur = output();
69
+ /** @ignore */
70
+ this.checkboxRef = viewChild(UiCheckbox, /* @ts-ignore */
71
+ ...(ngDevMode ? [{ debugName: "checkboxRef" }] : /* istanbul ignore next */ []));
72
+ /** @ignore */
73
+ this.radioRef = viewChild(UiRadio, /* @ts-ignore */
74
+ ...(ngDevMode ? [{ debugName: "radioRef" }] : /* istanbul ignore next */ []));
75
+ /** @ignore */
76
+ this.toggleRef = viewChild(UiToggle, /* @ts-ignore */
77
+ ...(ngDevMode ? [{ debugName: "toggleRef" }] : /* istanbul ignore next */ []));
78
+ /** @ignore */
79
+ this.bodyEl = viewChild.required('bodyEl', /* @ts-ignore */
80
+ ...(ngDevMode ? [{ debugName: "bodyEl" }] : /* istanbul ignore next */ []));
81
+ /** @ignore Keyboard focus only: a pointer press must not ring the block. */
82
+ this.focusVisible = signal(false, /* @ts-ignore */
83
+ ...(ngDevMode ? [{ debugName: "focusVisible" }] : /* istanbul ignore next */ []));
84
+ /** @ignore The embedded control, whichever indicator is rendered. */
85
+ this.control = computed(() => this.checkboxRef() ?? this.radioRef() ?? this.toggleRef(), /* @ts-ignore */
86
+ ...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
87
+ /** @ignore Value this block selects (radio carries its own, the others the `trueValue`). */
88
+ this.selectedValue = computed(() => this.indicator() === 'radio' ? this.value() : this.trueValue(), /* @ts-ignore */
89
+ ...(ngDevMode ? [{ debugName: "selectedValue" }] : /* istanbul ignore next */ []));
90
+ /** @ignore */
91
+ this.checked = computed(() => this.modelValue() === this.selectedValue(), /* @ts-ignore */
92
+ ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
93
+ /** @ignore Id of the region naming the control. */
94
+ this.bodyId = computed(() => `${this.resolvedId()}-body`, /* @ts-ignore */
95
+ ...(ngDevMode ? [{ debugName: "bodyId" }] : /* istanbul ignore next */ []));
96
+ /**
97
+ * @ignore The block content names the control, unless an explicit name is given
98
+ * (`aria-labelledby` outranks `aria-label`, so the two are mutually exclusive).
99
+ */
100
+ this.controlLabelledBy = computed(() => this.ariaLabelledBy() ? this.ariaLabelledBy() : this.ariaLabel() ? undefined : this.bodyId(), /* @ts-ignore */
101
+ ...(ngDevMode ? [{ debugName: "controlLabelledBy" }] : /* istanbul ignore next */ []));
102
+ /** @ignore The switch follows the block density; the box controls keep the form-wide size. */
103
+ this.toggleSize = computed(() => (this.size() === 'small' ? 'small' : 'default'), /* @ts-ignore */
104
+ ...(ngDevMode ? [{ debugName: "toggleSize" }] : /* istanbul ignore next */ []));
105
+ /**
106
+ * @ignore The wave is carried by the block, not by a native control, so the
107
+ * engine's own `disabled` guard never sees it: fold the inert states in here.
108
+ */
109
+ this.rippleEnabled = computed(() => this.ripple() && !this.isDisabled() && !this.readonly(), /* @ts-ignore */
110
+ ...(ngDevMode ? [{ debugName: "rippleEnabled" }] : /* istanbul ignore next */ []));
111
+ /** @ignore */
112
+ this.classes = computed(() => {
113
+ const c = ['ui-toggle-block'];
114
+ if (this.size() !== 'default')
115
+ c.push(`_${this.size()}`);
116
+ if (this.indicatorPosition() === 'end')
117
+ c.push('_indicator-end');
118
+ if (this.align() === 'start')
119
+ c.push('_align-start');
120
+ if (this.hideIndicator())
121
+ c.push('_hide-indicator');
122
+ if (this.checked())
123
+ c.push('_checked');
124
+ if (this.isDisabled())
125
+ c.push('_disabled');
126
+ if (this.readonly())
127
+ c.push('_readonly');
128
+ if (this.isInvalid())
129
+ c.push('_invalid');
130
+ if (this.focusVisible())
131
+ c.push('_focus-visible');
132
+ return c.join(' ');
133
+ }, /* @ts-ignore */
134
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
135
+ // The embedded control owns its own state: push the model into it.
136
+ effect(() => this.control()?.writeValue(this.modelValue()));
137
+ afterNextRender(() => {
138
+ if (this.indicator() === 'radio' && this.value() === undefined) {
139
+ warnMissingAccessibleName('ui-toggle-block', 'indicator="radio" requires a `value`: without it every block of the group shares the same identity.');
140
+ }
141
+ if (!this.hasAccessibleName()) {
142
+ warnMissingAccessibleName('ui-toggle-block', 'no accessible name: provide `label`, projected content, `ariaLabel` or `ariaLabelledBy`.');
143
+ }
144
+ });
145
+ }
146
+ /** @ignore */
147
+ uidPrefix() {
148
+ return 'ui-toggle-block';
149
+ }
150
+ /** Focus the embedded control programmatically. */
151
+ focus(options) {
152
+ this.control()?.focus(options);
153
+ }
154
+ /** @ignore A name reaches assistive tech (explicit, or rendered in the body). */
155
+ hasAccessibleName() {
156
+ if (this.ariaLabel() || this.ariaLabelledBy() || this.label())
157
+ return true;
158
+ return !!this.bodyEl().nativeElement.textContent?.trim();
159
+ }
160
+ /** @ignore User selection, relayed by whichever indicator is rendered. */
161
+ onControlChange(value) {
162
+ if (this.readonly()) {
163
+ this.control()?.writeValue(this.modelValue());
164
+ return;
165
+ }
166
+ this.modelValue.set(value);
167
+ this.emitChange(value);
168
+ this.blockChange.emit(value);
169
+ }
170
+ /** @ignore */
171
+ onControlFocus(event) {
172
+ this.focusVisible.set(event.target.matches(':focus-visible'));
173
+ this.blockFocus.emit(event);
174
+ }
175
+ /** @ignore */
176
+ onControlBlur(event) {
177
+ this.focusVisible.set(false);
178
+ this.emitTouch();
179
+ this.blockBlur.emit(event);
180
+ }
181
+ /**
182
+ * @ignore Read-only blocks stay focusable but must not change value. Pointer
183
+ * activation is already cut off in CSS; this covers the keyboard.
184
+ */
185
+ onKeydown(event) {
186
+ if (!this.readonly())
187
+ return;
188
+ if (event.key === ' ' || event.key.startsWith('Arrow'))
189
+ event.preventDefault();
190
+ }
191
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiToggleBlock, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
192
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: UiToggleBlock, isStandalone: true, selector: "ui-toggle-block", inputs: { indicator: { classPropertyName: "indicator", publicName: "indicator", isSignal: true, isRequired: false, transformFunction: null }, indicatorPosition: { classPropertyName: "indicatorPosition", publicName: "indicatorPosition", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, hideIndicator: { classPropertyName: "hideIndicator", publicName: "hideIndicator", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", 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 }, value: { classPropertyName: "value", publicName: "value", 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 } }, outputs: { blockChange: "blockChange", blockFocus: "blockFocus", blockBlur: "blockBlur" }, host: { listeners: { "keydown": "onKeydown($event)" }, properties: { "class._fluid": "fluid()" } }, providers: [
193
+ { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiToggleBlock), multi: true },
194
+ ], viewQueries: [{ propertyName: "checkboxRef", first: true, predicate: UiCheckbox, descendants: true, isSignal: true }, { propertyName: "radioRef", first: true, predicate: UiRadio, descendants: true, isSignal: true }, { propertyName: "toggleRef", first: true, predicate: UiToggle, descendants: true, isSignal: true }, { propertyName: "bodyEl", first: true, predicate: ["bodyEl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"classes()\" [attr.data-ripple]=\"rippleEnabled() ? 'on' : 'off'\">\n <label class=\"ui-toggle-block-hit\" [attr.for]=\"readonly() ? null : resolvedId()\"></label>\n\n <span class=\"ui-toggle-block-control\">\n @switch (indicator()) {\n @case ('radio') {\n <ui-radio\n [value]=\"selectedValue()\"\n [inputId]=\"resolvedId()\"\n [name]=\"name()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [invalid]=\"isInvalid()\"\n [tabindex]=\"tabindex()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"controlLabelledBy()\"\n (radioChange)=\"onControlChange($event)\"\n (radioFocus)=\"onControlFocus($event)\"\n (radioBlur)=\"onControlBlur($event)\"\n />\n }\n @case ('toggle') {\n <ui-toggle\n [trueValue]=\"trueValue()\"\n [falseValue]=\"falseValue()\"\n [size]=\"toggleSize()\"\n [inputId]=\"resolvedId()\"\n [name]=\"name()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [invalid]=\"isInvalid()\"\n [tabindex]=\"tabindex()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"controlLabelledBy()\"\n (toggleChange)=\"onControlChange($event)\"\n (toggleFocus)=\"onControlFocus($event)\"\n (toggleBlur)=\"onControlBlur($event)\"\n />\n }\n @default {\n <ui-checkbox\n [trueValue]=\"trueValue()\"\n [falseValue]=\"falseValue()\"\n [inputId]=\"resolvedId()\"\n [name]=\"name()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [invalid]=\"isInvalid()\"\n [tabindex]=\"tabindex()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"controlLabelledBy()\"\n (checkboxChange)=\"onControlChange($event)\"\n (checkboxFocus)=\"onControlFocus($event)\"\n (checkboxBlur)=\"onControlBlur($event)\"\n />\n }\n }\n </span>\n\n <div #bodyEl class=\"ui-toggle-block-body\" [id]=\"bodyId()\">\n @if (label()) {\n <span class=\"ui-toggle-block-label\">\n {{ label() }}\n @if (required()) {\n <span class=\"ui-toggle-block-required\" aria-hidden=\"true\">*</span>\n }\n </span>\n }\n @if (description()) {\n <span class=\"ui-toggle-block-description\">{{ description() }}</span>\n }\n <ng-content />\n </div>\n</div>\n", styles: [":host{display:block}:host._fluid{width:100%}.ui-toggle-block{position:relative;display:flex;align-items:center;box-sizing:border-box;background-color:var(--ui-toggle-block-surface, var(--form-high-surface-default));border:var(--ui-toggle-block-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--ui-toggle-block-stroke, var(--form-high-stroke-default));border-radius:var(--ui-toggle-block-radius, var(--radius-md));color:var(--ui-toggle-block-color, var(--form-high-content-default));font-family:var(--ui-toggle-block-font-family, var(--fontfamily-base));cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),border-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout));padding:var(--ui-toggle-block-padding, var(--units-default));gap:var(--ui-toggle-block-gap, var(--units-md))}.ui-toggle-block .ui-toggle-block-label{font-size:var(--ui-toggle-block-label-font-size, var(--size-typography-text-default))}.ui-toggle-block .ui-toggle-block-description{font-size:var(--ui-toggle-block-description-font-size, var(--size-typography-text-md))}.ui-toggle-block._small{padding:var(--ui-toggle-block-padding-small, var(--units-md));gap:var(--ui-toggle-block-gap-small, var(--units-sm))}.ui-toggle-block._small .ui-toggle-block-label{font-size:var(--ui-toggle-block-label-font-size-small, var(--size-typography-text-md))}.ui-toggle-block._small .ui-toggle-block-description{font-size:var(--ui-toggle-block-description-font-size-small, var(--size-typography-text-sm))}.ui-toggle-block._large{padding:var(--ui-toggle-block-padding-large, var(--units-lg));gap:var(--ui-toggle-block-gap-large, var(--units-default))}.ui-toggle-block._large .ui-toggle-block-label{font-size:var(--ui-toggle-block-label-font-size-large, var(--size-typography-text-lg))}.ui-toggle-block._large .ui-toggle-block-description{font-size:var(--ui-toggle-block-description-font-size-large, var(--size-typography-text-default))}.ui-toggle-block-hit{position:absolute;inset:0;z-index:1;border-radius:inherit;cursor:inherit}.ui-toggle-block-control{position:relative;z-index:2;display:inline-flex;flex-shrink:0;--ui-checkbox-focus-ring-width: 0;--ui-radio-focus-ring-width: 0;--ui-toggle-focus-ring-width: 0}.ui-toggle-block-body{display:flex;flex-direction:column;gap:var(--ui-toggle-block-body-gap, var(--units-2xs));flex:1 1 auto;min-width:0}.ui-toggle-block-body ::ng-deep :where(a,button,select,textarea,summary,[role=button],[tabindex]){position:relative;z-index:2}.ui-toggle-block-label{display:inline-flex;align-items:center;gap:var(--ui-toggle-block-label-gap, var(--units-2xs));font-weight:var(--ui-toggle-block-weight, var(--weight-bold));line-height:1.3;color:var(--ui-label-color, var(--form-high-content-default))}.ui-toggle-block-required{color:var(--ui-toggle-block-required-color, var(--informative-errorlow-content-default))}.ui-toggle-block-description{line-height:1.4;color:var(--ui-toggle-block-description-color, var(--form-low-content-default))}.ui-toggle-block._indicator-end{flex-direction:row-reverse}.ui-toggle-block._align-start{align-items:flex-start}.ui-toggle-block._hide-indicator .ui-toggle-block-control{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;pointer-events:none}.ui-toggle-block:hover:not(._disabled):not(._readonly){background-color:var(--ui-toggle-block-surface-hover, var(--form-high-surface-hover));border-color:var(--ui-toggle-block-stroke-hover, var(--form-high-stroke-hover))}.ui-toggle-block._checked{background-color:var(--ui-toggle-block-surface-checked, var(--form-high-surface-checked));border-color:var(--ui-toggle-block-stroke-checked, var(--form-high-stroke-checked))}.ui-toggle-block:focus-within{border-color:var(--ui-toggle-block-stroke-focus, var(--form-high-stroke-focused))}.ui-toggle-block._focus-visible{box-shadow:0 0 0 var(--ui-toggle-block-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-toggle-block-stroke-focus, var(--form-high-stroke-focused)) r g b/50%)}.ui-toggle-block._invalid{border-color:var(--ui-toggle-block-stroke-invalid, var(--form-error-stroke-default))}.ui-toggle-block._invalid._checked{background-color:var(--ui-toggle-block-surface-checked-invalid, var(--form-error-surface-checked));border-color:var(--ui-toggle-block-stroke-checked-invalid, var(--form-error-stroke-checked))}.ui-toggle-block._invalid:focus-within{border-color:var(--ui-toggle-block-stroke-focus-invalid, var(--form-error-stroke-focused))}.ui-toggle-block._invalid._focus-visible{box-shadow:0 0 0 var(--ui-toggle-block-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-toggle-block-stroke-focus-invalid, var(--form-error-stroke-focused)) r g b/50%)}.ui-toggle-block._disabled{background-color:var(--ui-toggle-block-surface-disabled, var(--form-high-surface-disabled));border-color:var(--ui-toggle-block-stroke-disabled, var(--form-high-stroke-disabled));cursor:not-allowed}.ui-toggle-block._disabled .ui-toggle-block-label,.ui-toggle-block._disabled .ui-toggle-block-description{color:var(--ui-label-color-disabled, var(--form-high-content-disabled))}.ui-toggle-block._readonly{cursor:default}.ui-toggle-block._readonly .ui-toggle-block-control{pointer-events:none}\n"], dependencies: [{ kind: "component", type: UiCheckbox, selector: "ui-checkbox", inputs: ["label", "trueValue", "falseValue", "indeterminate", "checkIcon", "indeterminateIcon"], outputs: ["checkboxChange", "checkboxFocus", "checkboxBlur"] }, { kind: "component", type: UiRadio, selector: "ui-radio", inputs: ["value", "label"], outputs: ["radioChange", "radioFocus", "radioBlur"] }, { kind: "component", type: UiToggle, selector: "ui-toggle", inputs: ["label", "labelPosition", "size", "trueValue", "falseValue", "handle"], outputs: ["toggleChange", "toggleFocus", "toggleBlur"] }] }); }
195
+ }
196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiToggleBlock, decorators: [{
197
+ type: Component,
198
+ args: [{ selector: 'ui-toggle-block', imports: [UiCheckbox, UiRadio, UiToggle], providers: [
199
+ { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiToggleBlock), multi: true },
200
+ ], host: {
201
+ '[class._fluid]': 'fluid()',
202
+ '(keydown)': 'onKeydown($event)',
203
+ }, template: "<div [class]=\"classes()\" [attr.data-ripple]=\"rippleEnabled() ? 'on' : 'off'\">\n <label class=\"ui-toggle-block-hit\" [attr.for]=\"readonly() ? null : resolvedId()\"></label>\n\n <span class=\"ui-toggle-block-control\">\n @switch (indicator()) {\n @case ('radio') {\n <ui-radio\n [value]=\"selectedValue()\"\n [inputId]=\"resolvedId()\"\n [name]=\"name()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [invalid]=\"isInvalid()\"\n [tabindex]=\"tabindex()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"controlLabelledBy()\"\n (radioChange)=\"onControlChange($event)\"\n (radioFocus)=\"onControlFocus($event)\"\n (radioBlur)=\"onControlBlur($event)\"\n />\n }\n @case ('toggle') {\n <ui-toggle\n [trueValue]=\"trueValue()\"\n [falseValue]=\"falseValue()\"\n [size]=\"toggleSize()\"\n [inputId]=\"resolvedId()\"\n [name]=\"name()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [invalid]=\"isInvalid()\"\n [tabindex]=\"tabindex()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"controlLabelledBy()\"\n (toggleChange)=\"onControlChange($event)\"\n (toggleFocus)=\"onControlFocus($event)\"\n (toggleBlur)=\"onControlBlur($event)\"\n />\n }\n @default {\n <ui-checkbox\n [trueValue]=\"trueValue()\"\n [falseValue]=\"falseValue()\"\n [inputId]=\"resolvedId()\"\n [name]=\"name()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [invalid]=\"isInvalid()\"\n [tabindex]=\"tabindex()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"controlLabelledBy()\"\n (checkboxChange)=\"onControlChange($event)\"\n (checkboxFocus)=\"onControlFocus($event)\"\n (checkboxBlur)=\"onControlBlur($event)\"\n />\n }\n }\n </span>\n\n <div #bodyEl class=\"ui-toggle-block-body\" [id]=\"bodyId()\">\n @if (label()) {\n <span class=\"ui-toggle-block-label\">\n {{ label() }}\n @if (required()) {\n <span class=\"ui-toggle-block-required\" aria-hidden=\"true\">*</span>\n }\n </span>\n }\n @if (description()) {\n <span class=\"ui-toggle-block-description\">{{ description() }}</span>\n }\n <ng-content />\n </div>\n</div>\n", styles: [":host{display:block}:host._fluid{width:100%}.ui-toggle-block{position:relative;display:flex;align-items:center;box-sizing:border-box;background-color:var(--ui-toggle-block-surface, var(--form-high-surface-default));border:var(--ui-toggle-block-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--ui-toggle-block-stroke, var(--form-high-stroke-default));border-radius:var(--ui-toggle-block-radius, var(--radius-md));color:var(--ui-toggle-block-color, var(--form-high-content-default));font-family:var(--ui-toggle-block-font-family, var(--fontfamily-base));cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),border-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout));padding:var(--ui-toggle-block-padding, var(--units-default));gap:var(--ui-toggle-block-gap, var(--units-md))}.ui-toggle-block .ui-toggle-block-label{font-size:var(--ui-toggle-block-label-font-size, var(--size-typography-text-default))}.ui-toggle-block .ui-toggle-block-description{font-size:var(--ui-toggle-block-description-font-size, var(--size-typography-text-md))}.ui-toggle-block._small{padding:var(--ui-toggle-block-padding-small, var(--units-md));gap:var(--ui-toggle-block-gap-small, var(--units-sm))}.ui-toggle-block._small .ui-toggle-block-label{font-size:var(--ui-toggle-block-label-font-size-small, var(--size-typography-text-md))}.ui-toggle-block._small .ui-toggle-block-description{font-size:var(--ui-toggle-block-description-font-size-small, var(--size-typography-text-sm))}.ui-toggle-block._large{padding:var(--ui-toggle-block-padding-large, var(--units-lg));gap:var(--ui-toggle-block-gap-large, var(--units-default))}.ui-toggle-block._large .ui-toggle-block-label{font-size:var(--ui-toggle-block-label-font-size-large, var(--size-typography-text-lg))}.ui-toggle-block._large .ui-toggle-block-description{font-size:var(--ui-toggle-block-description-font-size-large, var(--size-typography-text-default))}.ui-toggle-block-hit{position:absolute;inset:0;z-index:1;border-radius:inherit;cursor:inherit}.ui-toggle-block-control{position:relative;z-index:2;display:inline-flex;flex-shrink:0;--ui-checkbox-focus-ring-width: 0;--ui-radio-focus-ring-width: 0;--ui-toggle-focus-ring-width: 0}.ui-toggle-block-body{display:flex;flex-direction:column;gap:var(--ui-toggle-block-body-gap, var(--units-2xs));flex:1 1 auto;min-width:0}.ui-toggle-block-body ::ng-deep :where(a,button,select,textarea,summary,[role=button],[tabindex]){position:relative;z-index:2}.ui-toggle-block-label{display:inline-flex;align-items:center;gap:var(--ui-toggle-block-label-gap, var(--units-2xs));font-weight:var(--ui-toggle-block-weight, var(--weight-bold));line-height:1.3;color:var(--ui-label-color, var(--form-high-content-default))}.ui-toggle-block-required{color:var(--ui-toggle-block-required-color, var(--informative-errorlow-content-default))}.ui-toggle-block-description{line-height:1.4;color:var(--ui-toggle-block-description-color, var(--form-low-content-default))}.ui-toggle-block._indicator-end{flex-direction:row-reverse}.ui-toggle-block._align-start{align-items:flex-start}.ui-toggle-block._hide-indicator .ui-toggle-block-control{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;pointer-events:none}.ui-toggle-block:hover:not(._disabled):not(._readonly){background-color:var(--ui-toggle-block-surface-hover, var(--form-high-surface-hover));border-color:var(--ui-toggle-block-stroke-hover, var(--form-high-stroke-hover))}.ui-toggle-block._checked{background-color:var(--ui-toggle-block-surface-checked, var(--form-high-surface-checked));border-color:var(--ui-toggle-block-stroke-checked, var(--form-high-stroke-checked))}.ui-toggle-block:focus-within{border-color:var(--ui-toggle-block-stroke-focus, var(--form-high-stroke-focused))}.ui-toggle-block._focus-visible{box-shadow:0 0 0 var(--ui-toggle-block-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-toggle-block-stroke-focus, var(--form-high-stroke-focused)) r g b/50%)}.ui-toggle-block._invalid{border-color:var(--ui-toggle-block-stroke-invalid, var(--form-error-stroke-default))}.ui-toggle-block._invalid._checked{background-color:var(--ui-toggle-block-surface-checked-invalid, var(--form-error-surface-checked));border-color:var(--ui-toggle-block-stroke-checked-invalid, var(--form-error-stroke-checked))}.ui-toggle-block._invalid:focus-within{border-color:var(--ui-toggle-block-stroke-focus-invalid, var(--form-error-stroke-focused))}.ui-toggle-block._invalid._focus-visible{box-shadow:0 0 0 var(--ui-toggle-block-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-toggle-block-stroke-focus-invalid, var(--form-error-stroke-focused)) r g b/50%)}.ui-toggle-block._disabled{background-color:var(--ui-toggle-block-surface-disabled, var(--form-high-surface-disabled));border-color:var(--ui-toggle-block-stroke-disabled, var(--form-high-stroke-disabled));cursor:not-allowed}.ui-toggle-block._disabled .ui-toggle-block-label,.ui-toggle-block._disabled .ui-toggle-block-description{color:var(--ui-label-color-disabled, var(--form-high-content-disabled))}.ui-toggle-block._readonly{cursor:default}.ui-toggle-block._readonly .ui-toggle-block-control{pointer-events:none}\n"] }]
204
+ }], ctorParameters: () => [], propDecorators: { indicator: [{ type: i0.Input, args: [{ isSignal: true, alias: "indicator", required: false }] }], indicatorPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "indicatorPosition", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], hideIndicator: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideIndicator", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], ripple: [{ type: i0.Input, args: [{ isSignal: true, alias: "ripple", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], trueValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "trueValue", required: false }] }], falseValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "falseValue", required: false }] }], blockChange: [{ type: i0.Output, args: ["blockChange"] }], blockFocus: [{ type: i0.Output, args: ["blockFocus"] }], blockBlur: [{ type: i0.Output, args: ["blockBlur"] }], checkboxRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => UiCheckbox), { isSignal: true }] }], radioRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => UiRadio), { isSignal: true }] }], toggleRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => UiToggle), { isSignal: true }] }], bodyEl: [{ type: i0.ViewChild, args: ['bodyEl', { isSignal: true }] }] } });
205
+
206
+ /*
207
+ * Public API Surface of ui-kit/ui-toggle-block
208
+ */
209
+
210
+ /**
211
+ * Generated bundle index. Do not edit.
212
+ */
213
+
214
+ export { UiToggleBlock };
215
+ //# sourceMappingURL=4sh-ui-kit-forms-ui-toggle-block.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"4sh-ui-kit-forms-ui-toggle-block.mjs","sources":["../../../projects/ui-kit/forms/ui-toggle-block/src/lib/ui-toggle-block.ts","../../../projects/ui-kit/forms/ui-toggle-block/src/lib/ui-toggle-block.html","../../../projects/ui-kit/forms/ui-toggle-block/src/public-api.ts","../../../projects/ui-kit/forms/ui-toggle-block/src/4sh-ui-kit-forms-ui-toggle-block.ts"],"sourcesContent":["import {\n afterNextRender,\n booleanAttribute,\n Component,\n computed,\n effect,\n ElementRef,\n forwardRef,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BaseFieldControl, warnMissingAccessibleName } from '@4sh/ui-kit/forms';\nimport { UiCheckbox } from '@4sh/ui-kit/forms/ui-checkbox';\nimport { UiRadio } from '@4sh/ui-kit/forms/ui-radio';\nimport { UiToggle } from '@4sh/ui-kit/forms/ui-toggle';\n\n/** Selection control embedded in the block. */\nexport type ToggleBlockIndicator = 'checkbox' | 'radio' | 'toggle';\nexport type ToggleBlockSize = 'default' | 'small' | 'large';\nexport type ToggleBlockIndicatorPosition = 'start' | 'end';\n/** Vertical alignment of the indicator against the block content. */\nexport type ToggleBlockAlign = 'center' | 'start';\n\n/** @ignore Surface the three indicator components share. */\ninterface IndicatorControl<T> {\n writeValue(value: T): void;\n focus(options?: FocusOptions): void;\n}\n\n/**\n * ui-toggle-block: selectable block wrapping a checkbox, a radio or a switch.\n *\n * The block is the clickable surface; the selection control is an instance of\n * `ui-checkbox` / `ui-radio` / `ui-toggle`, so the indicator keeps the exact\n * appearance and behaviour it has on its own. A stretched `<label for>` covers\n * the block, which makes the whole surface activate the native input without a\n * click handler; the content region is the control's accessible name\n * (`aria-labelledby`), so any markup can be projected without wrapping it in a\n * `<label>`.\n *\n * `label` / `description` cover the common case; `<ng-content>` composes with\n * them for a fully custom body.\n *\n * Works standalone, with `[(ngModel)]`, reactive forms or Signal Forms\n * (ControlValueAccessor). Blocks form a group the native way: same `name`, same\n * bound model.\n */\n@Component({\n selector: 'ui-toggle-block',\n imports: [UiCheckbox, UiRadio, UiToggle],\n templateUrl: './ui-toggle-block.html',\n styleUrl: './ui-toggle-block.scss',\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiToggleBlock), multi: true },\n ],\n host: {\n '[class._fluid]': 'fluid()',\n '(keydown)': 'onKeydown($event)',\n },\n})\nexport class UiToggleBlock<T = boolean> extends BaseFieldControl<T> {\n /** Selection control embedded in the block. */\n indicator = input<ToggleBlockIndicator>('checkbox');\n /** Side of the block the indicator sits on. */\n indicatorPosition = input<ToggleBlockIndicatorPosition>('start');\n /** Vertical alignment of the indicator against the content. */\n align = input<ToggleBlockAlign>('center');\n /** Keeps the control operable but removes the indicator from view (selection card). */\n hideIndicator = input(false, { transform: booleanAttribute });\n /** Size. */\n size = input<ToggleBlockSize>('default');\n /** Main line of the block. */\n label = input<string>();\n /** Secondary line under the label. */\n description = input<string>();\n /** Span the full width of the parent (a flex/grid parent otherwise sizes the block to its content). */\n fluid = input(false, { transform: booleanAttribute });\n /** Ripple Effect */\n ripple = input(true, { transform: booleanAttribute });\n /** Value carried by this block in `radio` mode (the model takes it when selected). */\n value = input<T>();\n /** Model value emitted when selected, in `checkbox` / `toggle` mode. */\n trueValue = input<T>(true as T);\n /** Model value emitted when cleared, in `checkbox` / `toggle` mode. */\n falseValue = input<T>(false as T);\n\n /** Emitted on user selection with the new model value (never when disabled/readonly). */\n blockChange = output<T>();\n /** Emitted when the embedded control receives focus. */\n blockFocus = output<FocusEvent>();\n /** Emitted when the embedded control loses focus. */\n blockBlur = output<FocusEvent>();\n\n /** @ignore */\n private readonly checkboxRef = viewChild<UiCheckbox<T>>(UiCheckbox);\n /** @ignore */\n private readonly radioRef = viewChild<UiRadio<T>>(UiRadio);\n /** @ignore */\n private readonly toggleRef = viewChild<UiToggle<T>>(UiToggle);\n /** @ignore */\n private readonly bodyEl = viewChild.required<ElementRef<HTMLElement>>('bodyEl');\n\n /** @ignore Keyboard focus only: a pointer press must not ring the block. */\n private readonly focusVisible = signal(false);\n\n constructor() {\n super();\n // The embedded control owns its own state: push the model into it.\n effect(() => this.control()?.writeValue(this.modelValue() as T));\n\n afterNextRender(() => {\n if (this.indicator() === 'radio' && this.value() === undefined) {\n warnMissingAccessibleName(\n 'ui-toggle-block',\n 'indicator=\"radio\" requires a `value`: without it every block of the group shares the same identity.',\n );\n }\n if (!this.hasAccessibleName()) {\n warnMissingAccessibleName(\n 'ui-toggle-block',\n 'no accessible name: provide `label`, projected content, `ariaLabel` or `ariaLabelledBy`.',\n );\n }\n });\n }\n\n /** @ignore The embedded control, whichever indicator is rendered. */\n private readonly control = computed<IndicatorControl<T> | undefined>(\n () => this.checkboxRef() ?? this.radioRef() ?? this.toggleRef(),\n );\n\n /** @ignore Value this block selects (radio carries its own, the others the `trueValue`). */\n protected readonly selectedValue = computed(() =>\n this.indicator() === 'radio' ? (this.value() as T) : this.trueValue(),\n );\n\n /** @ignore */\n protected readonly checked = computed(() => this.modelValue() === this.selectedValue());\n\n /** @ignore Id of the region naming the control. */\n protected readonly bodyId = computed(() => `${this.resolvedId()}-body`);\n /**\n * @ignore The block content names the control, unless an explicit name is given\n * (`aria-labelledby` outranks `aria-label`, so the two are mutually exclusive).\n */\n protected readonly controlLabelledBy = computed(() =>\n this.ariaLabelledBy() ? this.ariaLabelledBy() : this.ariaLabel() ? undefined : this.bodyId(),\n );\n\n /** @ignore The switch follows the block density; the box controls keep the form-wide size. */\n protected readonly toggleSize = computed(() => (this.size() === 'small' ? 'small' : 'default'));\n\n /**\n * @ignore The wave is carried by the block, not by a native control, so the\n * engine's own `disabled` guard never sees it: fold the inert states in here.\n */\n protected readonly rippleEnabled = computed(\n () => this.ripple() && !this.isDisabled() && !this.readonly(),\n );\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-toggle-block'];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.indicatorPosition() === 'end') c.push('_indicator-end');\n if (this.align() === 'start') c.push('_align-start');\n if (this.hideIndicator()) c.push('_hide-indicator');\n if (this.checked()) c.push('_checked');\n if (this.isDisabled()) c.push('_disabled');\n if (this.readonly()) c.push('_readonly');\n if (this.isInvalid()) c.push('_invalid');\n if (this.focusVisible()) c.push('_focus-visible');\n return c.join(' ');\n });\n\n /** @ignore */\n protected override uidPrefix(): string {\n return 'ui-toggle-block';\n }\n\n /** Focus the embedded control programmatically. */\n focus(options?: FocusOptions): void {\n this.control()?.focus(options);\n }\n\n /** @ignore A name reaches assistive tech (explicit, or rendered in the body). */\n private hasAccessibleName(): boolean {\n if (this.ariaLabel() || this.ariaLabelledBy() || this.label()) return true;\n return !!this.bodyEl().nativeElement.textContent?.trim();\n }\n\n /** @ignore User selection, relayed by whichever indicator is rendered. */\n protected onControlChange(value: T): void {\n if (this.readonly()) {\n this.control()?.writeValue(this.modelValue() as T);\n return;\n }\n this.modelValue.set(value);\n this.emitChange(value);\n this.blockChange.emit(value);\n }\n\n /** @ignore */\n protected onControlFocus(event: FocusEvent): void {\n this.focusVisible.set((event.target as HTMLElement).matches(':focus-visible'));\n this.blockFocus.emit(event);\n }\n\n /** @ignore */\n protected onControlBlur(event: FocusEvent): void {\n this.focusVisible.set(false);\n this.emitTouch();\n this.blockBlur.emit(event);\n }\n\n /**\n * @ignore Read-only blocks stay focusable but must not change value. Pointer\n * activation is already cut off in CSS; this covers the keyboard.\n */\n protected onKeydown(event: KeyboardEvent): void {\n if (!this.readonly()) return;\n if (event.key === ' ' || event.key.startsWith('Arrow')) event.preventDefault();\n }\n}\n","<div [class]=\"classes()\" [attr.data-ripple]=\"rippleEnabled() ? 'on' : 'off'\">\n <label class=\"ui-toggle-block-hit\" [attr.for]=\"readonly() ? null : resolvedId()\"></label>\n\n <span class=\"ui-toggle-block-control\">\n @switch (indicator()) {\n @case ('radio') {\n <ui-radio\n [value]=\"selectedValue()\"\n [inputId]=\"resolvedId()\"\n [name]=\"name()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [invalid]=\"isInvalid()\"\n [tabindex]=\"tabindex()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"controlLabelledBy()\"\n (radioChange)=\"onControlChange($event)\"\n (radioFocus)=\"onControlFocus($event)\"\n (radioBlur)=\"onControlBlur($event)\"\n />\n }\n @case ('toggle') {\n <ui-toggle\n [trueValue]=\"trueValue()\"\n [falseValue]=\"falseValue()\"\n [size]=\"toggleSize()\"\n [inputId]=\"resolvedId()\"\n [name]=\"name()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [invalid]=\"isInvalid()\"\n [tabindex]=\"tabindex()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"controlLabelledBy()\"\n (toggleChange)=\"onControlChange($event)\"\n (toggleFocus)=\"onControlFocus($event)\"\n (toggleBlur)=\"onControlBlur($event)\"\n />\n }\n @default {\n <ui-checkbox\n [trueValue]=\"trueValue()\"\n [falseValue]=\"falseValue()\"\n [inputId]=\"resolvedId()\"\n [name]=\"name()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [invalid]=\"isInvalid()\"\n [tabindex]=\"tabindex()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"controlLabelledBy()\"\n (checkboxChange)=\"onControlChange($event)\"\n (checkboxFocus)=\"onControlFocus($event)\"\n (checkboxBlur)=\"onControlBlur($event)\"\n />\n }\n }\n </span>\n\n <div #bodyEl class=\"ui-toggle-block-body\" [id]=\"bodyId()\">\n @if (label()) {\n <span class=\"ui-toggle-block-label\">\n {{ label() }}\n @if (required()) {\n <span class=\"ui-toggle-block-required\" aria-hidden=\"true\">*</span>\n }\n </span>\n }\n @if (description()) {\n <span class=\"ui-toggle-block-description\">{{ description() }}</span>\n }\n <ng-content />\n </div>\n</div>\n","/*\n * Public API Surface of ui-kit/ui-toggle-block\n */\n\nexport * from './lib/ui-toggle-block';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAgCA;;;;;;;;;;;;;;;;;AAiBG;AAcG,MAAO,aAA2B,SAAQ,gBAAmB,CAAA;AA6CjE,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;QA5CT,IAAA,CAAA,SAAS,GAAG,KAAK,CAAuB,UAAU;sFAAC;;QAEnD,IAAA,CAAA,iBAAiB,GAAG,KAAK,CAA+B,OAAO;8FAAC;;QAEhE,IAAA,CAAA,KAAK,GAAG,KAAK,CAAmB,QAAQ;kFAAC;;QAEzC,IAAA,CAAA,aAAa,GAAG,KAAK,CAAC,KAAK,qFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;QAE7D,IAAA,CAAA,IAAI,GAAG,KAAK,CA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;AAEG;;ACFH;;AAEG;;"}
@@ -99,6 +99,8 @@ class UiToggleButton extends BaseFieldControl {
99
99
  ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
100
100
  /** Span the full width of the parent (group buttons share the width evenly). */
101
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 });
102
104
  /** Pill shape. */
103
105
  this.rounded = input(false, { ...(ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
104
106
  /** Whether the last pressed button can be released (single), or the group emptied. */
@@ -343,12 +345,12 @@ class UiToggleButton extends BaseFieldControl {
343
345
  isPressed(value, model) {
344
346
  return Array.isArray(model) && model.some((v) => this.resolver.equals(v, value));
345
347
  }
346
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: UiToggleButton, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
347
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", 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 }, 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: [
348
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiToggleButton, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
349
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", 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: [
348
350
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiToggleButton), multi: true },
349
- ], 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 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 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(--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(--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(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),border-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-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(--actions-lowoutlined-surface-default);--_content: var(--actions-lowoutlined-content-default);--_stroke: var(--actions-lowoutlined-stroke-default);--_ring: var(--actions-lowoutlined-stroke-focused)}.ui-toggle-button-item:not(._selected):hover:not(:disabled){--_surface: var(--actions-lowoutlined-surface-hover);--_content: var(--actions-lowoutlined-content-hover);--_stroke: var(--actions-lowoutlined-stroke-hover)}.ui-toggle-button-item:not(._selected):active:not(:disabled){--_surface: var(--actions-lowoutlined-surface-pressed);--_content: var(--actions-lowoutlined-content-pressed);--_stroke: var(--actions-lowoutlined-stroke-pressed)}.ui-toggle-button-item:not(._selected):disabled{--_surface: var(--actions-lowoutlined-surface-disabled);--_content: var(--actions-lowoutlined-content-disabled);--_stroke: 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(--actions-low-surface-default);--_content: var(--actions-low-content-default);--_stroke: var(--actions-low-stroke-default);--_ring: var(--actions-low-stroke-focused)}:host._filled .ui-toggle-button-item:not(._selected):hover:not(:disabled){--_surface: var(--actions-low-surface-hover);--_content: var(--actions-low-content-hover);--_stroke: var(--actions-low-stroke-hover)}:host._filled .ui-toggle-button-item:not(._selected):active:not(:disabled){--_surface: var(--actions-low-surface-pressed);--_content: var(--actions-low-content-pressed);--_stroke: var(--actions-low-stroke-pressed)}:host._filled .ui-toggle-button-item:not(._selected):disabled{--_surface: var(--actions-low-surface-disabled);--_content: var(--actions-low-content-disabled);--_stroke: var(--actions-low-stroke-disabled)}:host._ghost .ui-toggle-button-item:not(._selected){--_surface: var(--actions-lowghost-surface-default);--_content: var(--actions-lowghost-content-default);--_stroke: var(--actions-lowghost-stroke-default);--_ring: var(--actions-lowghost-stroke-focused)}:host._ghost .ui-toggle-button-item:not(._selected):hover:not(:disabled){--_surface: var(--actions-lowghost-surface-hover);--_content: var(--actions-lowghost-content-hover);--_stroke: var(--actions-lowghost-stroke-hover)}:host._ghost .ui-toggle-button-item:not(._selected):active:not(:disabled){--_surface: var(--actions-lowghost-surface-pressed);--_content: var(--actions-lowghost-content-pressed);--_stroke: var(--actions-lowghost-stroke-pressed)}:host._ghost .ui-toggle-button-item:not(._selected):disabled{--_surface: var(--actions-lowghost-surface-disabled);--_content: var(--actions-lowghost-content-disabled);--_stroke: var(--actions-lowghost-stroke-disabled)}:host._high .ui-toggle-button-item._selected{--_surface: var(--actions-high-surface-default);--_content: var(--actions-high-content-default);--_stroke: var(--actions-high-stroke-default);--_ring: var(--actions-high-stroke-focused)}:host._high .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--actions-high-surface-hover);--_content: var(--actions-high-content-hover);--_stroke: var(--actions-high-stroke-hover)}:host._high .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--actions-high-surface-pressed);--_content: var(--actions-high-content-pressed);--_stroke: var(--actions-high-stroke-pressed)}:host._high .ui-toggle-button-item._selected:disabled{--_surface: var(--actions-high-surface-disabled);--_content: var(--actions-high-content-disabled);--_stroke: var(--actions-high-stroke-disabled)}:host._low .ui-toggle-button-item._selected{--_surface: var(--actions-low-surface-default);--_content: var(--actions-low-content-default);--_stroke: var(--actions-low-stroke-default);--_ring: var(--actions-low-stroke-focused)}:host._low .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--actions-low-surface-hover);--_content: var(--actions-low-content-hover);--_stroke: var(--actions-low-stroke-hover)}:host._low .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--actions-low-surface-pressed);--_content: var(--actions-low-content-pressed);--_stroke: var(--actions-low-stroke-pressed)}:host._low .ui-toggle-button-item._selected:disabled{--_surface: var(--actions-low-surface-disabled);--_content: var(--actions-low-content-disabled);--_stroke: var(--actions-low-stroke-disabled)}:host._success .ui-toggle-button-item._selected{--_surface: var(--actions-success-surface-default);--_content: var(--actions-success-content-default);--_stroke: var(--actions-success-stroke-default);--_ring: var(--actions-success-stroke-focused)}:host._success .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--actions-success-surface-hover);--_content: var(--actions-success-content-hover);--_stroke: var(--actions-success-stroke-hover)}:host._success .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--actions-success-surface-pressed);--_content: var(--actions-success-content-pressed);--_stroke: var(--actions-success-stroke-pressed)}:host._success .ui-toggle-button-item._selected:disabled{--_surface: var(--actions-success-surface-disabled);--_content: var(--actions-success-content-disabled);--_stroke: var(--actions-success-stroke-disabled)}:host._warning .ui-toggle-button-item._selected{--_surface: var(--actions-warning-surface-default);--_content: var(--actions-warning-content-default);--_stroke: var(--actions-warning-stroke-default);--_ring: var(--actions-warning-stroke-focused)}:host._warning .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--actions-warning-surface-hover);--_content: var(--actions-warning-content-hover);--_stroke: var(--actions-warning-stroke-hover)}:host._warning .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--actions-warning-surface-pressed);--_content: var(--actions-warning-content-pressed);--_stroke: var(--actions-warning-stroke-pressed)}:host._warning .ui-toggle-button-item._selected:disabled{--_surface: var(--actions-warning-surface-disabled);--_content: var(--actions-warning-content-disabled);--_stroke: var(--actions-warning-stroke-disabled)}:host._error .ui-toggle-button-item._selected{--_surface: var(--actions-error-surface-default);--_content: var(--actions-error-content-default);--_stroke: var(--actions-error-stroke-default);--_ring: var(--actions-error-stroke-focused)}:host._error .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--actions-error-surface-hover);--_content: var(--actions-error-content-hover);--_stroke: var(--actions-error-stroke-hover)}:host._error .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--actions-error-surface-pressed);--_content: var(--actions-error-content-pressed);--_stroke: var(--actions-error-stroke-pressed)}:host._error .ui-toggle-button-item._selected:disabled{--_surface: var(--actions-error-surface-disabled);--_content: var(--actions-error-content-disabled);--_stroke: 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(--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"] }] }); }
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(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),border-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-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"] }] }); }
350
352
  }
351
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: UiToggleButton, decorators: [{
353
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiToggleButton, decorators: [{
352
354
  type: Component,
353
355
  args: [{ selector: 'ui-toggle-button', imports: [UiIcon, NgTemplateOutlet], providers: [
354
356
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiToggleButton), multi: true },
@@ -357,8 +359,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImpor
357
359
  '[attr.role]': "isGroup() ? 'group' : null",
358
360
  '[attr.aria-label]': 'groupAriaLabel()',
359
361
  '[attr.aria-labelledby]': 'groupAriaLabelledBy()',
360
- }, template: "@if (isGroup()) {\n @for (item of normalizedOptions(); track item.key) {\n <button\n #itemEl\n type=\"button\"\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 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(--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(--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(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),border-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-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(--actions-lowoutlined-surface-default);--_content: var(--actions-lowoutlined-content-default);--_stroke: var(--actions-lowoutlined-stroke-default);--_ring: var(--actions-lowoutlined-stroke-focused)}.ui-toggle-button-item:not(._selected):hover:not(:disabled){--_surface: var(--actions-lowoutlined-surface-hover);--_content: var(--actions-lowoutlined-content-hover);--_stroke: var(--actions-lowoutlined-stroke-hover)}.ui-toggle-button-item:not(._selected):active:not(:disabled){--_surface: var(--actions-lowoutlined-surface-pressed);--_content: var(--actions-lowoutlined-content-pressed);--_stroke: var(--actions-lowoutlined-stroke-pressed)}.ui-toggle-button-item:not(._selected):disabled{--_surface: var(--actions-lowoutlined-surface-disabled);--_content: var(--actions-lowoutlined-content-disabled);--_stroke: 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(--actions-low-surface-default);--_content: var(--actions-low-content-default);--_stroke: var(--actions-low-stroke-default);--_ring: var(--actions-low-stroke-focused)}:host._filled .ui-toggle-button-item:not(._selected):hover:not(:disabled){--_surface: var(--actions-low-surface-hover);--_content: var(--actions-low-content-hover);--_stroke: var(--actions-low-stroke-hover)}:host._filled .ui-toggle-button-item:not(._selected):active:not(:disabled){--_surface: var(--actions-low-surface-pressed);--_content: var(--actions-low-content-pressed);--_stroke: var(--actions-low-stroke-pressed)}:host._filled .ui-toggle-button-item:not(._selected):disabled{--_surface: var(--actions-low-surface-disabled);--_content: var(--actions-low-content-disabled);--_stroke: var(--actions-low-stroke-disabled)}:host._ghost .ui-toggle-button-item:not(._selected){--_surface: var(--actions-lowghost-surface-default);--_content: var(--actions-lowghost-content-default);--_stroke: var(--actions-lowghost-stroke-default);--_ring: var(--actions-lowghost-stroke-focused)}:host._ghost .ui-toggle-button-item:not(._selected):hover:not(:disabled){--_surface: var(--actions-lowghost-surface-hover);--_content: var(--actions-lowghost-content-hover);--_stroke: var(--actions-lowghost-stroke-hover)}:host._ghost .ui-toggle-button-item:not(._selected):active:not(:disabled){--_surface: var(--actions-lowghost-surface-pressed);--_content: var(--actions-lowghost-content-pressed);--_stroke: var(--actions-lowghost-stroke-pressed)}:host._ghost .ui-toggle-button-item:not(._selected):disabled{--_surface: var(--actions-lowghost-surface-disabled);--_content: var(--actions-lowghost-content-disabled);--_stroke: var(--actions-lowghost-stroke-disabled)}:host._high .ui-toggle-button-item._selected{--_surface: var(--actions-high-surface-default);--_content: var(--actions-high-content-default);--_stroke: var(--actions-high-stroke-default);--_ring: var(--actions-high-stroke-focused)}:host._high .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--actions-high-surface-hover);--_content: var(--actions-high-content-hover);--_stroke: var(--actions-high-stroke-hover)}:host._high .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--actions-high-surface-pressed);--_content: var(--actions-high-content-pressed);--_stroke: var(--actions-high-stroke-pressed)}:host._high .ui-toggle-button-item._selected:disabled{--_surface: var(--actions-high-surface-disabled);--_content: var(--actions-high-content-disabled);--_stroke: var(--actions-high-stroke-disabled)}:host._low .ui-toggle-button-item._selected{--_surface: var(--actions-low-surface-default);--_content: var(--actions-low-content-default);--_stroke: var(--actions-low-stroke-default);--_ring: var(--actions-low-stroke-focused)}:host._low .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--actions-low-surface-hover);--_content: var(--actions-low-content-hover);--_stroke: var(--actions-low-stroke-hover)}:host._low .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--actions-low-surface-pressed);--_content: var(--actions-low-content-pressed);--_stroke: var(--actions-low-stroke-pressed)}:host._low .ui-toggle-button-item._selected:disabled{--_surface: var(--actions-low-surface-disabled);--_content: var(--actions-low-content-disabled);--_stroke: var(--actions-low-stroke-disabled)}:host._success .ui-toggle-button-item._selected{--_surface: var(--actions-success-surface-default);--_content: var(--actions-success-content-default);--_stroke: var(--actions-success-stroke-default);--_ring: var(--actions-success-stroke-focused)}:host._success .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--actions-success-surface-hover);--_content: var(--actions-success-content-hover);--_stroke: var(--actions-success-stroke-hover)}:host._success .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--actions-success-surface-pressed);--_content: var(--actions-success-content-pressed);--_stroke: var(--actions-success-stroke-pressed)}:host._success .ui-toggle-button-item._selected:disabled{--_surface: var(--actions-success-surface-disabled);--_content: var(--actions-success-content-disabled);--_stroke: var(--actions-success-stroke-disabled)}:host._warning .ui-toggle-button-item._selected{--_surface: var(--actions-warning-surface-default);--_content: var(--actions-warning-content-default);--_stroke: var(--actions-warning-stroke-default);--_ring: var(--actions-warning-stroke-focused)}:host._warning .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--actions-warning-surface-hover);--_content: var(--actions-warning-content-hover);--_stroke: var(--actions-warning-stroke-hover)}:host._warning .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--actions-warning-surface-pressed);--_content: var(--actions-warning-content-pressed);--_stroke: var(--actions-warning-stroke-pressed)}:host._warning .ui-toggle-button-item._selected:disabled{--_surface: var(--actions-warning-surface-disabled);--_content: var(--actions-warning-content-disabled);--_stroke: var(--actions-warning-stroke-disabled)}:host._error .ui-toggle-button-item._selected{--_surface: var(--actions-error-surface-default);--_content: var(--actions-error-content-default);--_stroke: var(--actions-error-stroke-default);--_ring: var(--actions-error-stroke-focused)}:host._error .ui-toggle-button-item._selected:hover:not(:disabled){--_surface: var(--actions-error-surface-hover);--_content: var(--actions-error-content-hover);--_stroke: var(--actions-error-stroke-hover)}:host._error .ui-toggle-button-item._selected:active:not(:disabled){--_surface: var(--actions-error-surface-pressed);--_content: var(--actions-error-content-pressed);--_stroke: var(--actions-error-stroke-pressed)}:host._error .ui-toggle-button-item._selected:disabled{--_surface: var(--actions-error-surface-disabled);--_content: var(--actions-error-content-disabled);--_stroke: 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(--form-error-stroke-default)}\n"] }]
361
- }], 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 }] }], 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 }] }] } });
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(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),border-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-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 }] }] } });
362
364
 
363
365
  /*
364
366
  * Public API Surface of ui-kit/ui-toggle-button