@4sh/ui-kit 0.15.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/README.fr.md +18 -10
  2. package/README.md +18 -10
  3. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +542 -150
  4. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
  5. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +622 -248
  6. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
  7. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +385 -152
  8. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
  9. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +748 -433
  10. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
  11. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +227 -135
  12. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
  13. package/fesm2022/4sh-ui-kit-base-ui-image.mjs +1200 -633
  14. package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
  15. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +1675 -953
  16. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
  17. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +243 -117
  18. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
  19. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +2294 -2039
  20. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
  21. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +1058 -1113
  22. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
  23. package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs +1108 -0
  24. package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs.map +1 -0
  25. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +397 -141
  26. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
  27. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +1529 -583
  28. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
  29. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs +383 -224
  30. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs.map +1 -1
  31. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +345 -177
  32. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
  33. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +280 -130
  34. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
  35. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +507 -246
  36. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
  37. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +401 -291
  38. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
  39. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +1277 -697
  40. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
  41. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +467 -194
  42. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
  43. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +394 -270
  44. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -1
  45. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +140 -60
  46. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
  47. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +386 -167
  48. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
  49. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +150 -87
  50. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
  51. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +345 -180
  52. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
  53. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +582 -392
  54. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
  55. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +1552 -888
  56. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
  57. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +485 -338
  58. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
  59. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +503 -311
  60. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
  61. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +271 -131
  62. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
  63. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +457 -214
  64. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -1
  65. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +711 -371
  66. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
  67. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +235 -121
  68. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
  69. package/fesm2022/4sh-ui-kit-forms.mjs +723 -596
  70. package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
  71. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +546 -242
  72. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
  73. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +335 -157
  74. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
  75. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +53 -33
  76. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
  77. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +218 -121
  78. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
  79. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +192 -100
  80. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
  81. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +456 -204
  82. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
  83. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +314 -147
  84. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
  85. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +179 -82
  86. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
  87. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +268 -123
  88. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
  89. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +391 -146
  90. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
  91. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +158 -76
  92. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
  93. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +159 -80
  94. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
  95. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +295 -131
  96. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
  97. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +211 -83
  98. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
  99. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +784 -414
  100. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
  101. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +822 -476
  102. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
  103. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +1014 -599
  104. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -1
  105. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +403 -189
  106. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
  107. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +707 -272
  108. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
  109. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +1146 -568
  110. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
  111. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +519 -308
  112. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
  113. package/fesm2022/4sh-ui-kit-motion.mjs +252 -150
  114. package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
  115. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +793 -341
  116. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -1
  117. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +351 -194
  118. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
  119. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +511 -220
  120. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
  121. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +910 -548
  122. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
  123. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +1128 -555
  124. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
  125. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +915 -470
  126. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
  127. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +931 -474
  128. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
  129. package/fesm2022/4sh-ui-kit-overlay.mjs +26 -109
  130. package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
  131. package/fesm2022/4sh-ui-kit-ripple.mjs +329 -290
  132. package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -1
  133. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +709 -248
  134. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
  135. package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2633 -1370
  136. package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
  137. package/fesm2022/4sh-ui-kit-theming.mjs +112 -113
  138. package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
  139. package/fesm2022/4sh-ui-kit-types.mjs +0 -12
  140. package/fesm2022/4sh-ui-kit.mjs +3 -15
  141. package/fesm2022/4sh-ui-kit.mjs.map +1 -1
  142. package/mcp/data/component-api.json +313 -2
  143. package/mcp/data/text-search-docs.json +177 -17
  144. package/mcp/data/ui-config.json +378 -1
  145. package/mcp/index.js +8190 -2876
  146. package/mcp/package.json +1 -1
  147. package/package.json +5 -1
  148. package/styles/component-vars.scss +22 -1
  149. package/styles/utils/_mixins.scss +11 -0
  150. package/types/4sh-ui-kit-actions-ui-button-split.d.ts +198 -87
  151. package/types/4sh-ui-kit-actions-ui-button.d.ts +240 -116
  152. package/types/4sh-ui-kit-actions-ui-link.d.ts +136 -67
  153. package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +287 -180
  154. package/types/4sh-ui-kit-base-ui-icon.d.ts +92 -58
  155. package/types/4sh-ui-kit-base-ui-image.d.ts +406 -205
  156. package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +577 -367
  157. package/types/4sh-ui-kit-forms-ui-checkbox.d.ts +77 -42
  158. package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +953 -700
  159. package/types/4sh-ui-kit-forms-ui-editor.d.ts +374 -340
  160. package/types/4sh-ui-kit-forms-ui-field-sign.d.ts +325 -0
  161. package/types/4sh-ui-kit-forms-ui-field.d.ts +150 -64
  162. package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +583 -241
  163. package/types/4sh-ui-kit-forms-ui-input-date.d.ts +152 -103
  164. package/types/4sh-ui-kit-forms-ui-input-group.d.ts +109 -63
  165. package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +93 -57
  166. package/types/4sh-ui-kit-forms-ui-input-number.d.ts +171 -93
  167. package/types/4sh-ui-kit-forms-ui-input-otp.d.ts +137 -100
  168. package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +469 -309
  169. package/types/4sh-ui-kit-forms-ui-input.d.ts +198 -116
  170. package/types/4sh-ui-kit-forms-ui-knob.d.ts +132 -80
  171. package/types/4sh-ui-kit-forms-ui-label.d.ts +47 -22
  172. package/types/4sh-ui-kit-forms-ui-nudger.d.ts +134 -67
  173. package/types/4sh-ui-kit-forms-ui-radio.d.ts +48 -33
  174. package/types/4sh-ui-kit-forms-ui-rating.d.ts +120 -86
  175. package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +221 -147
  176. package/types/4sh-ui-kit-forms-ui-select.d.ts +561 -357
  177. package/types/4sh-ui-kit-forms-ui-slider.d.ts +156 -105
  178. package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +133 -97
  179. package/types/4sh-ui-kit-forms-ui-textarea.d.ts +90 -54
  180. package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +158 -94
  181. package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +314 -178
  182. package/types/4sh-ui-kit-forms-ui-toggle.d.ts +88 -54
  183. package/types/4sh-ui-kit-forms.d.ts +291 -186
  184. package/types/4sh-ui-kit-informative-ui-accordion.d.ts +162 -92
  185. package/types/4sh-ui-kit-informative-ui-alert.d.ts +128 -62
  186. package/types/4sh-ui-kit-informative-ui-avatar-group.d.ts +8 -8
  187. package/types/4sh-ui-kit-informative-ui-avatar.d.ts +81 -44
  188. package/types/4sh-ui-kit-informative-ui-badge.d.ts +71 -41
  189. package/types/4sh-ui-kit-informative-ui-chip.d.ts +194 -99
  190. package/types/4sh-ui-kit-informative-ui-empty-state.d.ts +105 -65
  191. package/types/4sh-ui-kit-informative-ui-helper.d.ts +64 -34
  192. package/types/4sh-ui-kit-informative-ui-progress-bar.d.ts +120 -65
  193. package/types/4sh-ui-kit-informative-ui-read-only.d.ts +147 -67
  194. package/types/4sh-ui-kit-informative-ui-separator.d.ts +65 -35
  195. package/types/4sh-ui-kit-informative-ui-skeleton.d.ts +62 -32
  196. package/types/4sh-ui-kit-informative-ui-spinner.d.ts +111 -50
  197. package/types/4sh-ui-kit-informative-ui-tag.d.ts +77 -37
  198. package/types/4sh-ui-kit-informative-ui-toast.d.ts +300 -180
  199. package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +269 -141
  200. package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +360 -221
  201. package/types/4sh-ui-kit-layout-ui-card.d.ts +119 -79
  202. package/types/4sh-ui-kit-layout-ui-drawer.d.ts +244 -120
  203. package/types/4sh-ui-kit-layout-ui-modal.d.ts +409 -222
  204. package/types/4sh-ui-kit-layout-ui-popover.d.ts +149 -91
  205. package/types/4sh-ui-kit-motion.d.ts +117 -67
  206. package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +279 -145
  207. package/types/4sh-ui-kit-navigation-ui-breadcrumb.d.ts +134 -96
  208. package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +148 -89
  209. package/types/4sh-ui-kit-navigation-ui-menu.d.ts +282 -201
  210. package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +425 -261
  211. package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +279 -183
  212. package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +275 -173
  213. package/types/4sh-ui-kit-overlay.d.ts +6 -6
  214. package/types/4sh-ui-kit-ripple.d.ts +99 -74
  215. package/types/4sh-ui-kit-table-ui-paginator.d.ts +237 -133
  216. package/types/4sh-ui-kit-table-ui-table.d.ts +769 -470
  217. package/types/4sh-ui-kit-theming.d.ts +27 -29
  218. package/types/4sh-ui-kit-types.d.ts +6 -5
  219. package/types/4sh-ui-kit.d.ts +4 -3
  220. package/fesm2022/4sh-ui-kit-types.mjs.map +0 -1
@@ -1,79 +1,81 @@
1
- import * as _angular_core from '@angular/core';
2
- import { TemplateRef } from '@angular/core';
3
- import { BaseFieldControl } from '@4sh/ui-kit/forms';
4
- import { UiIconSize } from '@4sh/ui-kit/base/ui-icon';
5
- import { UiLevel } from '@4sh/ui-kit/types';
6
-
7
- type ToggleButtonSize = 'default' | 'small' | 'large';
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ import * as i0 from "@angular/core";
5
+ import { TemplateRef } from "@angular/core";
6
+ import { BaseFieldControl } from "@4sh/ui-kit/forms";
7
+ import { UiIconSize } from "@4sh/ui-kit/base/ui-icon";
8
+ import { UiLevel } from "@4sh/ui-kit/types";
9
+ export type ToggleButtonSize = 'default' | 'small' | 'large';
8
10
  /** Habillage de l'état **non** sélectionné (l'état sélectionné est toujours plein). */
9
- type ToggleButtonVariant = 'outlined' | 'filled' | 'ghost';
10
- type ToggleButtonIconPos = 'left' | 'right';
11
- type ToggleButtonOrientation = 'horizontal' | 'vertical';
11
+ export type ToggleButtonVariant = 'outlined' | 'filled' | 'ghost';
12
+ export type ToggleButtonIconPos = 'left' | 'right';
13
+ export type ToggleButtonOrientation = 'horizontal' | 'vertical';
12
14
  /** Model value: one of the `trueValue`/`falseValue` pair (single), or the array of pressed option values (group). */
13
- type ToggleButtonValue<T> = T | T[] | null;
15
+ export type ToggleButtonValue<T> = T | T[] | null;
14
16
  /**
15
17
  * Rich option shape for the group mode. Options may also be primitives
16
18
  * (`string`/`number`) or any object, in which case `optionLabel` /
17
19
  * `optionValue` / `optionDisabled` / `optionIcon` tell the control how to read
18
20
  * them.
19
21
  */
20
- interface ToggleButtonOption<T = unknown> {
21
- /** Text shown inside the button. */
22
- label?: string;
23
- /** Value carried into the model when the button is pressed. */
24
- value: T;
25
- /** Icon name (design-system icon). */
26
- icon?: string;
27
- /** Icon substituted while the button is pressed. */
28
- selectedIcon?: string;
29
- /** Disables just this button. */
30
- disabled?: boolean;
31
- /** Accessible name (required for an icon-only button). */
32
- ariaLabel?: string;
22
+ export interface ToggleButtonOption<T = unknown> {
23
+ /** Text shown inside the button. */
24
+ label?: string;
25
+ /** Value carried into the model when the button is pressed. */
26
+ value: T;
27
+ /** Icon name (design-system icon). */
28
+ icon?: string;
29
+ /** Icon substituted while the button is pressed. */
30
+ selectedIcon?: string;
31
+ /** Disables just this button. */
32
+ disabled?: boolean;
33
+ /** Accessible name (required for an icon-only button). */
34
+ ariaLabel?: string;
33
35
  }
34
36
  /** Context handed to the `icon` / `content` templates (single mode). */
35
- interface ToggleButtonStateContext {
36
- /** Whether the button is currently pressed (default `$implicit`). */
37
- $implicit: boolean;
38
- /** Same as `$implicit`, named for readability. */
39
- checked: boolean;
37
+ export interface ToggleButtonStateContext {
38
+ /** Whether the button is currently pressed (default `$implicit`). */
39
+ $implicit: boolean;
40
+ /** Same as `$implicit`, named for readability. */
41
+ checked: boolean;
40
42
  }
41
43
  /** Context handed to the `item` template (group mode). */
42
- interface ToggleButtonItemContext<T = unknown> {
43
- /** The original option (default `$implicit`). */
44
- $implicit: T;
45
- /** Same as `$implicit`, named for readability. */
46
- option: T;
47
- /** Whether this button is currently pressed. */
48
- selected: boolean;
49
- /** Index of the option in the list. */
50
- index: number;
44
+ export interface ToggleButtonItemContext<T = unknown> {
45
+ /** The original option (default `$implicit`). */
46
+ $implicit: T;
47
+ /** Same as `$implicit`, named for readability. */
48
+ option: T;
49
+ /** Whether this button is currently pressed. */
50
+ selected: boolean;
51
+ /** Index of the option in the list. */
52
+ index: number;
51
53
  }
52
54
  /** Payload emitted when a group button is clicked. */
53
- interface ToggleButtonOptionClickEvent<T = unknown> {
54
- /** The original option (as passed in `options`). */
55
- option: T;
56
- /** The resolved value of that option. */
57
- value: T;
58
- /** Index of the option in the list. */
59
- index: number;
60
- /** Pressed state after the click. */
61
- selected: boolean;
62
- /** Originating DOM event. */
63
- originalEvent: Event;
55
+ export interface ToggleButtonOptionClickEvent<T = unknown> {
56
+ /** The original option (as passed in `options`). */
57
+ option: T;
58
+ /** The resolved value of that option. */
59
+ value: T;
60
+ /** Index of the option in the list. */
61
+ index: number;
62
+ /** Pressed state after the click. */
63
+ selected: boolean;
64
+ /** Originating DOM event. */
65
+ originalEvent: Event;
64
66
  }
65
67
  /** @ignore Internal, normalized view of a group option. */
66
68
  interface NormalizedToggle {
67
- key: string;
68
- index: number;
69
- value: unknown;
70
- label: string | null;
71
- icon: string | null;
72
- ariaLabel: string | null;
73
- disabled: boolean;
74
- selected: boolean;
75
- iconOnly: boolean;
76
- original: unknown;
69
+ key: string;
70
+ index: number;
71
+ value: unknown;
72
+ label: string | null;
73
+ icon: string | null;
74
+ ariaLabel: string | null;
75
+ disabled: boolean;
76
+ selected: boolean;
77
+ iconOnly: boolean;
78
+ original: unknown;
77
79
  }
78
80
  /**
79
81
  * ui-toggle-button — a button that holds a pressed state.
@@ -100,123 +102,257 @@ interface NormalizedToggle {
100
102
  * <ui-toggle-button [(ngModel)]="days" [options]="dayOptions" ariaLabel="Jours ouvrés" />
101
103
  * ```
102
104
  */
103
- declare class UiToggleButton<T = boolean> extends BaseFieldControl<ToggleButtonValue<T>> {
104
- /** Label shown in both states (fallback of `onLabel` / `offLabel`). */
105
- label: _angular_core.InputSignal<string | undefined>;
106
- /** Label shown while pressed. */
107
- onLabel: _angular_core.InputSignal<string | undefined>;
108
- /** Label shown while released. */
109
- offLabel: _angular_core.InputSignal<string | undefined>;
110
- /** Icon shown in both states (fallback of `onIcon` / `offIcon`). */
111
- icon: _angular_core.InputSignal<string | undefined>;
112
- /** Icon shown while pressed. */
113
- onIcon: _angular_core.InputSignal<string | undefined>;
114
- /** Icon shown while released. */
115
- offIcon: _angular_core.InputSignal<string | undefined>;
116
- /** Side of the label the icon sits on. */
117
- iconPos: _angular_core.InputSignal<ToggleButtonIconPos>;
118
- /** Model value emitted when pressed. */
119
- trueValue: _angular_core.InputSignal<T>;
120
- /** Model value emitted when released. */
121
- falseValue: _angular_core.InputSignal<T>;
122
- /** Options to display, one button each. Presence switches the host to group mode. */
123
- options: _angular_core.InputSignal<readonly (T | ToggleButtonOption<T>)[] | undefined>;
124
- /** Field name to read a label from, when options are objects. */
125
- optionLabel: _angular_core.InputSignal<string | undefined>;
126
- /** Field name to read the value from, when options are objects. */
127
- optionValue: _angular_core.InputSignal<string | undefined>;
128
- /** Field name to read the disabled flag from, when options are objects. */
129
- optionDisabled: _angular_core.InputSignal<string | undefined>;
130
- /** Field name to read an icon name from, when options are objects. */
131
- optionIcon: _angular_core.InputSignal<string | undefined>;
132
- /** Property used to compare object values for equality (selection matching). */
133
- dataKey: _angular_core.InputSignal<string | undefined>;
134
- /** Layout axis of the group. */
135
- orientation: _angular_core.InputSignal<ToggleButtonOrientation>;
136
- /** Colour family of the pressed state. */
137
- level: _angular_core.InputSignal<UiLevel>;
138
- /** How the released state is drawn. */
139
- variant: _angular_core.InputSignal<ToggleButtonVariant>;
140
- /** Size. */
141
- size: _angular_core.InputSignal<ToggleButtonSize>;
142
- /** Span the full width of the parent (group buttons share the width evenly). */
143
- fluid: _angular_core.InputSignalWithTransform<boolean, unknown>;
144
- /** Ripple Effect */
145
- ripple: _angular_core.InputSignalWithTransform<boolean, unknown>;
146
- /** Pill shape. */
147
- rounded: _angular_core.InputSignalWithTransform<boolean, unknown>;
148
- /** Whether the last pressed button can be released (single), or the group emptied. */
149
- allowEmpty: _angular_core.InputSignalWithTransform<boolean, unknown>;
150
- /** Replaces the icon, single mode (receives `{ $implicit, checked }`). */
151
- iconTemplate: _angular_core.InputSignal<TemplateRef<ToggleButtonStateContext> | undefined>;
152
- /** Replaces the whole button content, single mode (receives `{ $implicit, checked }`). */
153
- contentTemplate: _angular_core.InputSignal<TemplateRef<ToggleButtonStateContext> | undefined>;
154
- /** Replaces a group button's content (receives `{ $implicit, option, selected, index }`). */
155
- itemTemplate: _angular_core.InputSignal<TemplateRef<ToggleButtonItemContext<T>> | undefined>;
156
- /** Emitted on user interaction with the new model value. */
157
- toggleChange: _angular_core.OutputEmitterRef<ToggleButtonValue<T>>;
158
- /** Emitted when a group button is clicked (even if it does not change the value). */
159
- optionClick: _angular_core.OutputEmitterRef<ToggleButtonOptionClickEvent<T>>;
160
- /** Emitted when a button receives focus. */
161
- toggleFocus: _angular_core.OutputEmitterRef<FocusEvent>;
162
- /** Emitted when a button loses focus. */
163
- toggleBlur: _angular_core.OutputEmitterRef<FocusEvent>;
164
- /** @ignore */
165
- private readonly buttons;
166
- /** @ignore */
167
- private readonly resolver;
168
- constructor();
169
- /** @ignore Group mode: an `options` list was provided. */
170
- protected readonly isGroup: _angular_core.Signal<boolean>;
171
- /** @ignore */
172
- protected readonly iconSize: _angular_core.Signal<UiIconSize>;
173
- /** @ignore */
174
- protected readonly hostClasses: _angular_core.Signal<string>;
175
- /** @ignore Only the group carries the group-level ARIA naming. */
176
- protected readonly groupAriaLabel: _angular_core.Signal<string | null>;
177
- /** @ignore */
178
- protected readonly groupAriaLabelledBy: _angular_core.Signal<string | null>;
179
- /** @ignore */
180
- protected readonly checked: _angular_core.Signal<boolean>;
181
- /** @ignore */
182
- protected readonly hasStateLabels: _angular_core.Signal<boolean>;
183
- /** @ignore Label of the current state, falling back to the shared one. */
184
- protected readonly currentLabel: _angular_core.Signal<string | null>;
185
- /** @ignore Icon of the current state, falling back to the shared one. */
186
- protected readonly currentIcon: _angular_core.Signal<string | null>;
187
- /** @ignore Square button: an icon, no text. */
188
- protected readonly isIconOnly: _angular_core.Signal<boolean>;
189
- /** @ignore */
190
- protected readonly iconBefore: _angular_core.Signal<boolean>;
191
- /** @ignore */
192
- protected readonly stateContext: _angular_core.Signal<ToggleButtonStateContext>;
193
- /** @ignore Accessible name of the single button (never empty-stringed). */
194
- protected readonly buttonAriaLabel: _angular_core.Signal<string | null>;
195
- /** @ignore Options resolved to a flat, render-ready shape. */
196
- protected readonly normalizedOptions: _angular_core.Signal<NormalizedToggle[]>;
197
- /** @ignore */
198
- protected itemContext(item: NormalizedToggle): ToggleButtonItemContext<T>;
199
- /** @ignore */
200
- protected uidPrefix(): string;
201
- /** Focus the button (the first enabled one in group mode). */
202
- focus(options?: FocusOptions): void;
203
- /** @ignore Single mode: flip the boolean pair. */
204
- protected toggle(): void;
205
- /** @ignore Group mode: press / release one option. */
206
- protected toggleOption(item: NormalizedToggle, event: Event): void;
207
- /** @ignore */
208
- protected onBlur(event: FocusEvent): void;
209
- /** @ignore Rich option shape (`{ value }`) resolves without a field mapping. */
210
- private resolveValue;
211
- /** @ignore An option object with no label key stays label-less (icon-only button). */
212
- private resolveLabel;
213
- /** @ignore */
214
- private resolveIcon;
215
- /** @ignore A group's model is the array of pressed values. */
216
- private isPressed;
217
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiToggleButton<any>, never>;
218
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiToggleButton<any>, "ui-toggle-button", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "onLabel": { "alias": "onLabel"; "required": false; "isSignal": true; }; "offLabel": { "alias": "offLabel"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "onIcon": { "alias": "onIcon"; "required": false; "isSignal": true; }; "offIcon": { "alias": "offIcon"; "required": false; "isSignal": true; }; "iconPos": { "alias": "iconPos"; "required": false; "isSignal": true; }; "trueValue": { "alias": "trueValue"; "required": false; "isSignal": true; }; "falseValue": { "alias": "falseValue"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "optionLabel": { "alias": "optionLabel"; "required": false; "isSignal": true; }; "optionValue": { "alias": "optionValue"; "required": false; "isSignal": true; }; "optionDisabled": { "alias": "optionDisabled"; "required": false; "isSignal": true; }; "optionIcon": { "alias": "optionIcon"; "required": false; "isSignal": true; }; "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "level": { "alias": "level"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; "ripple": { "alias": "ripple"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "allowEmpty": { "alias": "allowEmpty"; "required": false; "isSignal": true; }; "iconTemplate": { "alias": "iconTemplate"; "required": false; "isSignal": true; }; "contentTemplate": { "alias": "contentTemplate"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; }, { "toggleChange": "toggleChange"; "optionClick": "optionClick"; "toggleFocus": "toggleFocus"; "toggleBlur": "toggleBlur"; }, never, never, true, never>;
105
+ export declare class UiToggleButton<T = boolean> extends BaseFieldControl<ToggleButtonValue<T>> {
106
+ /** Label shown in both states (fallback of `onLabel` / `offLabel`). */
107
+ label: import("@angular/core").InputSignal<string | undefined>;
108
+ /** Label shown while pressed. */
109
+ onLabel: import("@angular/core").InputSignal<string | undefined>;
110
+ /** Label shown while released. */
111
+ offLabel: import("@angular/core").InputSignal<string | undefined>;
112
+ /** Icon shown in both states (fallback of `onIcon` / `offIcon`). */
113
+ icon: import("@angular/core").InputSignal<string | undefined>;
114
+ /** Icon shown while pressed. */
115
+ onIcon: import("@angular/core").InputSignal<string | undefined>;
116
+ /** Icon shown while released. */
117
+ offIcon: import("@angular/core").InputSignal<string | undefined>;
118
+ /** Side of the label the icon sits on. */
119
+ iconPos: import("@angular/core").InputSignal<ToggleButtonIconPos>;
120
+ /** Model value emitted when pressed. */
121
+ trueValue: import("@angular/core").InputSignal<T>;
122
+ /** Model value emitted when released. */
123
+ falseValue: import("@angular/core").InputSignal<T>;
124
+ /** Options to display, one button each. Presence switches the host to group mode. */
125
+ options: import("@angular/core").InputSignal<readonly (T | ToggleButtonOption<T>)[] | undefined>;
126
+ /** Field name to read a label from, when options are objects. */
127
+ optionLabel: import("@angular/core").InputSignal<string | undefined>;
128
+ /** Field name to read the value from, when options are objects. */
129
+ optionValue: import("@angular/core").InputSignal<string | undefined>;
130
+ /** Field name to read the disabled flag from, when options are objects. */
131
+ optionDisabled: import("@angular/core").InputSignal<string | undefined>;
132
+ /** Field name to read an icon name from, when options are objects. */
133
+ optionIcon: import("@angular/core").InputSignal<string | undefined>;
134
+ /** Property used to compare object values for equality (selection matching). */
135
+ dataKey: import("@angular/core").InputSignal<string | undefined>;
136
+ /** Layout axis of the group. */
137
+ orientation: import("@angular/core").InputSignal<ToggleButtonOrientation>;
138
+ /** Colour family of the pressed state. */
139
+ level: import("@angular/core").InputSignal<UiLevel>;
140
+ /** How the released state is drawn. */
141
+ variant: import("@angular/core").InputSignal<ToggleButtonVariant>;
142
+ /** Size. */
143
+ size: import("@angular/core").InputSignal<ToggleButtonSize>;
144
+ /** Span the full width of the parent (group buttons share the width evenly). */
145
+ fluid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
146
+ /** Ripple Effect */
147
+ ripple: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
148
+ /** Pill shape. */
149
+ rounded: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
150
+ /** Whether the last pressed button can be released (single), or the group emptied. */
151
+ allowEmpty: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
152
+ /** Replaces the icon, single mode (receives `{ $implicit, checked }`). */
153
+ iconTemplate: import("@angular/core").InputSignal<TemplateRef<ToggleButtonStateContext> | undefined>;
154
+ /** Replaces the whole button content, single mode (receives `{ $implicit, checked }`). */
155
+ contentTemplate: import("@angular/core").InputSignal<TemplateRef<ToggleButtonStateContext> | undefined>;
156
+ /** Replaces a group button's content (receives `{ $implicit, option, selected, index }`). */
157
+ itemTemplate: import("@angular/core").InputSignal<TemplateRef<ToggleButtonItemContext<T>> | undefined>;
158
+ /** Emitted on user interaction with the new model value. */
159
+ toggleChange: import("@angular/core").OutputEmitterRef<ToggleButtonValue<T>>;
160
+ /** Emitted when a group button is clicked (even if it does not change the value). */
161
+ optionClick: import("@angular/core").OutputEmitterRef<ToggleButtonOptionClickEvent<T>>;
162
+ /** Emitted when a button receives focus. */
163
+ toggleFocus: import("@angular/core").OutputEmitterRef<FocusEvent>;
164
+ /** Emitted when a button loses focus. */
165
+ toggleBlur: import("@angular/core").OutputEmitterRef<FocusEvent>;
166
+ /** @ignore */
167
+ private readonly buttons;
168
+ /** @ignore */
169
+ private readonly resolver;
170
+ constructor();
171
+ /** @ignore Group mode: an `options` list was provided. */
172
+ protected readonly isGroup: import("@angular/core").Signal<boolean>;
173
+ /** @ignore */
174
+ protected readonly iconSize: import("@angular/core").Signal<UiIconSize>;
175
+ /** @ignore */
176
+ protected readonly hostClasses: import("@angular/core").Signal<string>;
177
+ /** @ignore Only the group carries the group-level ARIA naming. */
178
+ protected readonly groupAriaLabel: import("@angular/core").Signal<string | null>;
179
+ /** @ignore */
180
+ protected readonly groupAriaLabelledBy: import("@angular/core").Signal<string | null>;
181
+ /** @ignore */
182
+ protected readonly checked: import("@angular/core").Signal<boolean>;
183
+ /** @ignore */
184
+ protected readonly hasStateLabels: import("@angular/core").Signal<boolean>;
185
+ /** @ignore Label of the current state, falling back to the shared one. */
186
+ protected readonly currentLabel: import("@angular/core").Signal<string | null>;
187
+ /** @ignore Icon of the current state, falling back to the shared one. */
188
+ protected readonly currentIcon: import("@angular/core").Signal<string | null>;
189
+ /** @ignore Square button: an icon, no text. */
190
+ protected readonly isIconOnly: import("@angular/core").Signal<boolean>;
191
+ /** @ignore */
192
+ protected readonly iconBefore: import("@angular/core").Signal<boolean>;
193
+ /** @ignore */
194
+ protected readonly stateContext: import("@angular/core").Signal<ToggleButtonStateContext>;
195
+ /** @ignore Accessible name of the single button (never empty-stringed). */
196
+ protected readonly buttonAriaLabel: import("@angular/core").Signal<string | null>;
197
+ /** @ignore Options resolved to a flat, render-ready shape. */
198
+ protected readonly normalizedOptions: import("@angular/core").Signal<NormalizedToggle[]>;
199
+ /** @ignore */
200
+ protected itemContext(item: NormalizedToggle): ToggleButtonItemContext<T>;
201
+ /** @ignore */
202
+ protected uidPrefix(): string;
203
+ /** Focus the button (the first enabled one in group mode). */
204
+ focus(options?: FocusOptions): void;
205
+ /** @ignore Single mode: flip the boolean pair. */
206
+ protected toggle(): void;
207
+ /** @ignore Group mode: press / release one option. */
208
+ protected toggleOption(item: NormalizedToggle, event: Event): void;
209
+ /** @ignore */
210
+ protected onBlur(event: FocusEvent): void;
211
+ /** @ignore Rich option shape (`{ value }`) resolves without a field mapping. */
212
+ private resolveValue;
213
+ /** @ignore An option object with no label key stays label-less (icon-only button). */
214
+ private resolveLabel;
215
+ /** @ignore */
216
+ private resolveIcon;
217
+ /** @ignore A group's model is the array of pressed values. */
218
+ private isPressed;
219
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiToggleButton<any>, never>;
220
+ static ɵcmp: i0.ɵɵComponentDeclaration<UiToggleButton<any>, "ui-toggle-button", never, {
221
+ "label": {
222
+ "alias": "label";
223
+ "required": false;
224
+ "isSignal": true;
225
+ };
226
+ "onLabel": {
227
+ "alias": "onLabel";
228
+ "required": false;
229
+ "isSignal": true;
230
+ };
231
+ "offLabel": {
232
+ "alias": "offLabel";
233
+ "required": false;
234
+ "isSignal": true;
235
+ };
236
+ "icon": {
237
+ "alias": "icon";
238
+ "required": false;
239
+ "isSignal": true;
240
+ };
241
+ "onIcon": {
242
+ "alias": "onIcon";
243
+ "required": false;
244
+ "isSignal": true;
245
+ };
246
+ "offIcon": {
247
+ "alias": "offIcon";
248
+ "required": false;
249
+ "isSignal": true;
250
+ };
251
+ "iconPos": {
252
+ "alias": "iconPos";
253
+ "required": false;
254
+ "isSignal": true;
255
+ };
256
+ "trueValue": {
257
+ "alias": "trueValue";
258
+ "required": false;
259
+ "isSignal": true;
260
+ };
261
+ "falseValue": {
262
+ "alias": "falseValue";
263
+ "required": false;
264
+ "isSignal": true;
265
+ };
266
+ "options": {
267
+ "alias": "options";
268
+ "required": false;
269
+ "isSignal": true;
270
+ };
271
+ "optionLabel": {
272
+ "alias": "optionLabel";
273
+ "required": false;
274
+ "isSignal": true;
275
+ };
276
+ "optionValue": {
277
+ "alias": "optionValue";
278
+ "required": false;
279
+ "isSignal": true;
280
+ };
281
+ "optionDisabled": {
282
+ "alias": "optionDisabled";
283
+ "required": false;
284
+ "isSignal": true;
285
+ };
286
+ "optionIcon": {
287
+ "alias": "optionIcon";
288
+ "required": false;
289
+ "isSignal": true;
290
+ };
291
+ "dataKey": {
292
+ "alias": "dataKey";
293
+ "required": false;
294
+ "isSignal": true;
295
+ };
296
+ "orientation": {
297
+ "alias": "orientation";
298
+ "required": false;
299
+ "isSignal": true;
300
+ };
301
+ "level": {
302
+ "alias": "level";
303
+ "required": false;
304
+ "isSignal": true;
305
+ };
306
+ "variant": {
307
+ "alias": "variant";
308
+ "required": false;
309
+ "isSignal": true;
310
+ };
311
+ "size": {
312
+ "alias": "size";
313
+ "required": false;
314
+ "isSignal": true;
315
+ };
316
+ "fluid": {
317
+ "alias": "fluid";
318
+ "required": false;
319
+ "isSignal": true;
320
+ };
321
+ "ripple": {
322
+ "alias": "ripple";
323
+ "required": false;
324
+ "isSignal": true;
325
+ };
326
+ "rounded": {
327
+ "alias": "rounded";
328
+ "required": false;
329
+ "isSignal": true;
330
+ };
331
+ "allowEmpty": {
332
+ "alias": "allowEmpty";
333
+ "required": false;
334
+ "isSignal": true;
335
+ };
336
+ "iconTemplate": {
337
+ "alias": "iconTemplate";
338
+ "required": false;
339
+ "isSignal": true;
340
+ };
341
+ "contentTemplate": {
342
+ "alias": "contentTemplate";
343
+ "required": false;
344
+ "isSignal": true;
345
+ };
346
+ "itemTemplate": {
347
+ "alias": "itemTemplate";
348
+ "required": false;
349
+ "isSignal": true;
350
+ };
351
+ }, {
352
+ "toggleChange": "toggleChange";
353
+ "optionClick": "optionClick";
354
+ "toggleFocus": "toggleFocus";
355
+ "toggleBlur": "toggleBlur";
356
+ }, never, never, true, never>;
219
357
  }
220
-
221
- export { UiToggleButton };
222
- export type { ToggleButtonIconPos, ToggleButtonItemContext, ToggleButtonOption, ToggleButtonOptionClickEvent, ToggleButtonOrientation, ToggleButtonSize, ToggleButtonStateContext, ToggleButtonValue, ToggleButtonVariant };
358
+ export {};