@4sh/ui-kit 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/README.fr.md +10 -10
  2. package/README.md +10 -10
  3. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +542 -150
  4. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
  5. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +622 -248
  6. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
  7. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +385 -152
  8. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
  9. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +748 -433
  10. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
  11. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +227 -135
  12. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
  13. package/fesm2022/4sh-ui-kit-base-ui-image.mjs +1200 -633
  14. package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
  15. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +1675 -1000
  16. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
  17. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +243 -117
  18. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
  19. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +2294 -2048
  20. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
  21. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +1058 -1113
  22. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
  23. package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs +1108 -0
  24. package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs.map +1 -0
  25. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +397 -141
  26. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
  27. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +1529 -583
  28. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
  29. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs +383 -224
  30. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs.map +1 -1
  31. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +345 -177
  32. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
  33. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +280 -138
  34. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
  35. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +507 -257
  36. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
  37. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +401 -312
  38. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
  39. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +1277 -697
  40. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
  41. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +467 -199
  42. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
  43. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +394 -270
  44. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -1
  45. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +140 -60
  46. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
  47. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +386 -167
  48. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
  49. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +150 -87
  50. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
  51. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +345 -180
  52. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
  53. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +582 -392
  54. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
  55. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +1552 -888
  56. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
  57. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +485 -338
  58. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
  59. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +503 -311
  60. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
  61. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +271 -137
  62. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
  63. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +457 -214
  64. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -1
  65. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +711 -371
  66. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
  67. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +235 -121
  68. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
  69. package/fesm2022/4sh-ui-kit-forms.mjs +721 -638
  70. package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
  71. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +546 -242
  72. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
  73. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +335 -157
  74. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
  75. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +53 -33
  76. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
  77. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +218 -121
  78. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
  79. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +192 -100
  80. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
  81. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +456 -204
  82. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
  83. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +314 -147
  84. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
  85. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +179 -82
  86. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
  87. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +268 -123
  88. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
  89. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +391 -146
  90. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
  91. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +158 -76
  92. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
  93. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +159 -80
  94. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
  95. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +295 -131
  96. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
  97. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +211 -83
  98. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
  99. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +784 -414
  100. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
  101. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +822 -476
  102. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
  103. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +1014 -599
  104. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -1
  105. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +403 -189
  106. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
  107. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +707 -272
  108. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
  109. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +1146 -568
  110. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
  111. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +519 -308
  112. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
  113. package/fesm2022/4sh-ui-kit-motion.mjs +252 -150
  114. package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
  115. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +793 -341
  116. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -1
  117. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +351 -194
  118. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
  119. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +511 -220
  120. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
  121. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +910 -548
  122. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
  123. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +1128 -555
  124. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
  125. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +915 -470
  126. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
  127. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +931 -474
  128. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
  129. package/fesm2022/4sh-ui-kit-overlay.mjs +26 -109
  130. package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
  131. package/fesm2022/4sh-ui-kit-ripple.mjs +329 -290
  132. package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -1
  133. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +709 -248
  134. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
  135. package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2633 -1370
  136. package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
  137. package/fesm2022/4sh-ui-kit-theming.mjs +112 -113
  138. package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
  139. package/fesm2022/4sh-ui-kit-types.mjs +0 -12
  140. package/fesm2022/4sh-ui-kit.mjs +3 -15
  141. package/fesm2022/4sh-ui-kit.mjs.map +1 -1
  142. package/mcp/data/component-api.json +299 -2
  143. package/mcp/data/text-search-docs.json +149 -9
  144. package/mcp/data/ui-config.json +378 -1
  145. package/mcp/index.js +8190 -2876
  146. package/mcp/package.json +1 -1
  147. package/package.json +5 -1
  148. package/styles/component-vars.scss +22 -1
  149. package/types/4sh-ui-kit-actions-ui-button-split.d.ts +198 -87
  150. package/types/4sh-ui-kit-actions-ui-button.d.ts +240 -116
  151. package/types/4sh-ui-kit-actions-ui-link.d.ts +136 -67
  152. package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +287 -180
  153. package/types/4sh-ui-kit-base-ui-icon.d.ts +92 -58
  154. package/types/4sh-ui-kit-base-ui-image.d.ts +406 -205
  155. package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +573 -376
  156. package/types/4sh-ui-kit-forms-ui-checkbox.d.ts +77 -42
  157. package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +953 -700
  158. package/types/4sh-ui-kit-forms-ui-editor.d.ts +374 -340
  159. package/types/4sh-ui-kit-forms-ui-field-sign.d.ts +325 -0
  160. package/types/4sh-ui-kit-forms-ui-field.d.ts +150 -64
  161. package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +583 -241
  162. package/types/4sh-ui-kit-forms-ui-input-date.d.ts +152 -103
  163. package/types/4sh-ui-kit-forms-ui-input-group.d.ts +109 -63
  164. package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +93 -59
  165. package/types/4sh-ui-kit-forms-ui-input-number.d.ts +171 -96
  166. package/types/4sh-ui-kit-forms-ui-input-otp.d.ts +137 -104
  167. package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +469 -309
  168. package/types/4sh-ui-kit-forms-ui-input.d.ts +198 -118
  169. package/types/4sh-ui-kit-forms-ui-knob.d.ts +132 -80
  170. package/types/4sh-ui-kit-forms-ui-label.d.ts +47 -22
  171. package/types/4sh-ui-kit-forms-ui-nudger.d.ts +134 -67
  172. package/types/4sh-ui-kit-forms-ui-radio.d.ts +48 -33
  173. package/types/4sh-ui-kit-forms-ui-rating.d.ts +120 -86
  174. package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +221 -147
  175. package/types/4sh-ui-kit-forms-ui-select.d.ts +561 -357
  176. package/types/4sh-ui-kit-forms-ui-slider.d.ts +156 -105
  177. package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +133 -97
  178. package/types/4sh-ui-kit-forms-ui-textarea.d.ts +90 -56
  179. package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +158 -94
  180. package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +314 -178
  181. package/types/4sh-ui-kit-forms-ui-toggle.d.ts +88 -54
  182. package/types/4sh-ui-kit-forms.d.ts +275 -194
  183. package/types/4sh-ui-kit-informative-ui-accordion.d.ts +162 -92
  184. package/types/4sh-ui-kit-informative-ui-alert.d.ts +128 -62
  185. package/types/4sh-ui-kit-informative-ui-avatar-group.d.ts +8 -8
  186. package/types/4sh-ui-kit-informative-ui-avatar.d.ts +81 -44
  187. package/types/4sh-ui-kit-informative-ui-badge.d.ts +71 -41
  188. package/types/4sh-ui-kit-informative-ui-chip.d.ts +194 -99
  189. package/types/4sh-ui-kit-informative-ui-empty-state.d.ts +105 -65
  190. package/types/4sh-ui-kit-informative-ui-helper.d.ts +64 -34
  191. package/types/4sh-ui-kit-informative-ui-progress-bar.d.ts +120 -65
  192. package/types/4sh-ui-kit-informative-ui-read-only.d.ts +147 -67
  193. package/types/4sh-ui-kit-informative-ui-separator.d.ts +65 -35
  194. package/types/4sh-ui-kit-informative-ui-skeleton.d.ts +62 -32
  195. package/types/4sh-ui-kit-informative-ui-spinner.d.ts +111 -50
  196. package/types/4sh-ui-kit-informative-ui-tag.d.ts +77 -37
  197. package/types/4sh-ui-kit-informative-ui-toast.d.ts +300 -180
  198. package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +269 -141
  199. package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +360 -221
  200. package/types/4sh-ui-kit-layout-ui-card.d.ts +119 -79
  201. package/types/4sh-ui-kit-layout-ui-drawer.d.ts +244 -120
  202. package/types/4sh-ui-kit-layout-ui-modal.d.ts +409 -222
  203. package/types/4sh-ui-kit-layout-ui-popover.d.ts +149 -91
  204. package/types/4sh-ui-kit-motion.d.ts +117 -67
  205. package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +279 -145
  206. package/types/4sh-ui-kit-navigation-ui-breadcrumb.d.ts +134 -96
  207. package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +148 -89
  208. package/types/4sh-ui-kit-navigation-ui-menu.d.ts +282 -201
  209. package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +425 -261
  210. package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +279 -183
  211. package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +275 -173
  212. package/types/4sh-ui-kit-overlay.d.ts +6 -6
  213. package/types/4sh-ui-kit-ripple.d.ts +99 -74
  214. package/types/4sh-ui-kit-table-ui-paginator.d.ts +237 -133
  215. package/types/4sh-ui-kit-table-ui-table.d.ts +769 -470
  216. package/types/4sh-ui-kit-theming.d.ts +27 -29
  217. package/types/4sh-ui-kit-types.d.ts +6 -5
  218. package/types/4sh-ui-kit.d.ts +4 -3
  219. package/fesm2022/4sh-ui-kit-types.mjs.map +0 -1
@@ -1,68 +1,70 @@
1
- import * as _angular_core from '@angular/core';
2
- import { TemplateRef } from '@angular/core';
3
- import { BaseFieldControl } from '@4sh/ui-kit/forms';
4
-
5
- type SegmentControlSize = 'default' | 'small';
6
- type SegmentControlOrientation = 'horizontal' | 'vertical';
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
+ export type SegmentControlSize = 'default' | 'small';
8
+ export type SegmentControlOrientation = 'horizontal' | 'vertical';
7
9
  /** Selected value: a single value (single mode) or an array (`multiple`). */
8
- type SegmentControlValue<T = unknown> = T | T[] | null;
10
+ export type SegmentControlValue<T = unknown> = T | T[] | null;
9
11
  /**
10
12
  * Rich option shape. Options may also be primitives (`string`/`number`) or any
11
13
  * object, in which case the `optionLabel` / `optionValue` / `optionDisabled` /
12
14
  * `optionIcon` field names tell the control how to read them.
13
15
  */
14
- interface SegmentControlOption<T = unknown> {
15
- /** Text shown inside the segment. */
16
- label?: string;
17
- /** Value carried into the model when the segment is selected. */
18
- value: T;
19
- /** Leading icon name (design-system icon). */
20
- icon?: string;
21
- /** Disables just this segment. */
22
- disabled?: boolean;
23
- /** Accessible name (required for an icon-only segment). */
24
- ariaLabel?: string;
16
+ export interface SegmentControlOption<T = unknown> {
17
+ /** Text shown inside the segment. */
18
+ label?: string;
19
+ /** Value carried into the model when the segment is selected. */
20
+ value: T;
21
+ /** Leading icon name (design-system icon). */
22
+ icon?: string;
23
+ /** Disables just this segment. */
24
+ disabled?: boolean;
25
+ /** Accessible name (required for an icon-only segment). */
26
+ ariaLabel?: string;
25
27
  }
26
28
  /** Payload emitted when a segment is clicked. */
27
- interface SegmentControlOptionClickEvent<T = unknown> {
28
- /** The original option (as passed in `options`). */
29
- option: T;
30
- /** The resolved value of that option. */
31
- value: T;
32
- /** Index of the option in the list. */
33
- index: number;
34
- /** Originating DOM event. */
35
- originalEvent: Event;
29
+ export interface SegmentControlOptionClickEvent<T = unknown> {
30
+ /** The original option (as passed in `options`). */
31
+ option: T;
32
+ /** The resolved value of that option. */
33
+ value: T;
34
+ /** Index of the option in the list. */
35
+ index: number;
36
+ /** Originating DOM event. */
37
+ originalEvent: Event;
36
38
  }
37
39
  /** Context handed to a custom item template. */
38
- interface SegmentControlItemContext<T = unknown> {
39
- /** The original option (default `$implicit`). */
40
- $implicit: T;
41
- /** Same as `$implicit`, named for readability. */
42
- option: T;
43
- /** Whether this segment is currently selected. */
44
- selected: boolean;
45
- /** Index of the option in the list. */
46
- index: number;
40
+ export interface SegmentControlItemContext<T = unknown> {
41
+ /** The original option (default `$implicit`). */
42
+ $implicit: T;
43
+ /** Same as `$implicit`, named for readability. */
44
+ option: T;
45
+ /** Whether this segment is currently selected. */
46
+ selected: boolean;
47
+ /** Index of the option in the list. */
48
+ index: number;
47
49
  }
48
50
  /** @ignore Internal, normalized view of an option (template + logic source). */
49
51
  interface NormalizedSegment {
50
- key: string;
51
- index: number;
52
- value: unknown;
53
- label: string | null;
54
- icon: string | null;
55
- ariaLabel: string | null;
56
- disabled: boolean;
57
- selected: boolean;
58
- original: unknown;
52
+ key: string;
53
+ index: number;
54
+ value: unknown;
55
+ label: string | null;
56
+ icon: string | null;
57
+ ariaLabel: string | null;
58
+ disabled: boolean;
59
+ selected: boolean;
60
+ original: unknown;
59
61
  }
60
62
  /** @ignore Measured geometry of the sliding selection indicator. */
61
63
  interface ThumbMetrics {
62
- x: number;
63
- y: number;
64
- w: number;
65
- h: number;
64
+ x: number;
65
+ y: number;
66
+ w: number;
67
+ h: number;
66
68
  }
67
69
  /**
68
70
  * ui-segment-control — headless segmented control for choosing one (or, with
@@ -85,102 +87,174 @@ interface ThumbMetrics {
85
87
  * <ui-segment-control [(ngModel)]="view" [options]="['Liste', 'Grille']" />
86
88
  * ```
87
89
  */
88
- declare class UiSegmentControl<T = unknown> extends BaseFieldControl<SegmentControlValue<T>> {
89
- /** Options to display, one button each. Primitives, objects, or `SegmentControlOption`. */
90
- options: _angular_core.InputSignal<readonly (T | SegmentControlOption<T>)[]>;
91
- /** Field name to read a label from, when options are objects. */
92
- optionLabel: _angular_core.InputSignal<string | undefined>;
93
- /** Field name to read the value from, when options are objects. */
94
- optionValue: _angular_core.InputSignal<string | undefined>;
95
- /** Field name to read the disabled flag from, when options are objects. */
96
- optionDisabled: _angular_core.InputSignal<string | undefined>;
97
- /** Field name to read an icon name from, when options are objects. */
98
- optionIcon: _angular_core.InputSignal<string | undefined>;
99
- /** Property used to compare object values for equality (selection matching). */
100
- dataKey: _angular_core.InputSignal<string | undefined>;
101
- /** Allow selecting several values at once (the model becomes an array). */
102
- multiple: _angular_core.InputSignalWithTransform<boolean, unknown>;
103
- /** Ripple Effect */
104
- ripple: _angular_core.InputSignalWithTransform<boolean, unknown>;
105
- /** Whether the selection can be fully cleared (single) / emptied (multiple). */
106
- allowEmpty: _angular_core.InputSignalWithTransform<boolean, unknown>;
107
- /** Size. */
108
- size: _angular_core.InputSignal<SegmentControlSize>;
109
- /** Layout axis (drives which arrow keys navigate). */
110
- orientation: _angular_core.InputSignal<SegmentControlOrientation>;
111
- /** Span the full width of the parent (segments share the width evenly). */
112
- fluid: _angular_core.InputSignalWithTransform<boolean, unknown>;
113
- /** Animate the sliding indicator (honours reduced-motion regardless). */
114
- motion: _angular_core.InputSignalWithTransform<boolean, unknown>;
115
- /** Custom template for a segment's content (receives `{ $implicit, option, selected, index }`). */
116
- itemTemplate: _angular_core.InputSignal<TemplateRef<SegmentControlItemContext<T>> | undefined>;
117
- /** Emitted on user selection with the new model value. */
118
- selectionChange: _angular_core.OutputEmitterRef<SegmentControlValue<T>>;
119
- /** Emitted when a segment is clicked (even if it does not change the value). */
120
- optionClick: _angular_core.OutputEmitterRef<SegmentControlOptionClickEvent<T>>;
121
- /** @ignore */
122
- private readonly host;
123
- /** @ignore */
124
- private readonly hostDestroyRef;
125
- /** @ignore Native segment buttons (for roving focus + indicator measurement). */
126
- private readonly optionEls;
127
- /** @ignore Current model value (written by the form or by user selection).
128
- * Redeclared over the base signal to keep `null` (not `undefined`) as the empty value. */
129
- protected readonly modelValue: _angular_core.WritableSignal<SegmentControlValue<T>>;
130
- /** @ignore Index the roving focus last landed on. */
131
- private readonly focusedIndex;
132
- /** @ignore Measured geometry of the sliding indicator (null until first measure). */
133
- protected readonly thumb: _angular_core.WritableSignal<ThumbMetrics | null>;
134
- /** @ignore Bumped by the ResizeObserver to re-measure the indicator. */
135
- private readonly resizeTick;
136
- constructor();
137
- /** @ignore Icon size derived from the control size. */
138
- protected readonly iconSize: _angular_core.Signal<"default" | "sm">;
139
- /** @ignore Options resolved to a flat, render-ready shape. */
140
- protected readonly normalizedOptions: _angular_core.Signal<NormalizedSegment[]>;
141
- /** @ignore Index of the selected segment in single mode (-1 if none / multiple). */
142
- protected readonly selectedIndex: _angular_core.Signal<number>;
143
- /** @ignore Whether the sliding indicator should render. */
144
- protected readonly showThumb: _angular_core.Signal<boolean>;
145
- /** @ignore CSS transform positioning the indicator over the selected segment. */
146
- protected readonly thumbTransform: _angular_core.Signal<string | null>;
147
- /** @ignore Segment that owns the group's single tab stop (roving tabindex). */
148
- protected readonly rovingIndex: _angular_core.Signal<number>;
149
- /** @ignore */
150
- protected uidPrefix(): string;
151
- /** Move focus to the group's current tab stop. */
152
- focus(options?: FocusOptions): void;
153
- /** @ignore The tabindex for a given segment (roving: one 0, the rest -1). */
154
- protected tabindexFor(index: number): number;
155
- /** @ignore Select (or toggle / clear) a segment on user interaction. */
156
- protected select(option: NormalizedSegment, event: Event): void;
157
- /** @ignore */
158
- protected onOptionFocus(index: number): void;
159
- /** @ignore Roving focus (and select-on-arrow in single mode). */
160
- protected onKeydown(event: KeyboardEvent): void;
161
- /** @ignore Mark touched when focus leaves the whole group. */
162
- protected onFocusOut(event: FocusEvent): void;
163
- /** @ignore */
164
- private isObject;
165
- /** @ignore */
166
- private resolveValue;
167
- /** @ignore */
168
- private resolveLabel;
169
- /** @ignore */
170
- private resolveIcon;
171
- /** @ignore */
172
- private resolveAriaLabel;
173
- /** @ignore */
174
- private resolveDisabled;
175
- /** @ignore */
176
- private asText;
177
- /** @ignore Whether a resolved value is part of the current model. */
178
- private isValueSelected;
179
- /** @ignore Value equality — by `dataKey` for objects, strict otherwise. */
180
- private equals;
181
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiSegmentControl<any>, never>;
182
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiSegmentControl<any>, "ui-segment-control", never, { "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; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "ripple": { "alias": "ripple"; "required": false; "isSignal": true; }; "allowEmpty": { "alias": "allowEmpty"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; "motion": { "alias": "motion"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; }, { "selectionChange": "selectionChange"; "optionClick": "optionClick"; }, never, never, true, never>;
90
+ export declare class UiSegmentControl<T = unknown> extends BaseFieldControl<SegmentControlValue<T>> {
91
+ /** Options to display, one button each. Primitives, objects, or `SegmentControlOption`. */
92
+ options: import("@angular/core").InputSignal<readonly (T | SegmentControlOption<T>)[]>;
93
+ /** Field name to read a label from, when options are objects. */
94
+ optionLabel: import("@angular/core").InputSignal<string | undefined>;
95
+ /** Field name to read the value from, when options are objects. */
96
+ optionValue: import("@angular/core").InputSignal<string | undefined>;
97
+ /** Field name to read the disabled flag from, when options are objects. */
98
+ optionDisabled: import("@angular/core").InputSignal<string | undefined>;
99
+ /** Field name to read an icon name from, when options are objects. */
100
+ optionIcon: import("@angular/core").InputSignal<string | undefined>;
101
+ /** Property used to compare object values for equality (selection matching). */
102
+ dataKey: import("@angular/core").InputSignal<string | undefined>;
103
+ /** Allow selecting several values at once (the model becomes an array). */
104
+ multiple: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
105
+ /** Ripple Effect */
106
+ ripple: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
107
+ /** Whether the selection can be fully cleared (single) / emptied (multiple). */
108
+ allowEmpty: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
109
+ /** Size. */
110
+ size: import("@angular/core").InputSignal<SegmentControlSize>;
111
+ /** Layout axis (drives which arrow keys navigate). */
112
+ orientation: import("@angular/core").InputSignal<SegmentControlOrientation>;
113
+ /** Span the full width of the parent (segments share the width evenly). */
114
+ fluid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
115
+ /** Animate the sliding indicator (honours reduced-motion regardless). */
116
+ motion: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
117
+ /** Custom template for a segment's content (receives `{ $implicit, option, selected, index }`). */
118
+ itemTemplate: import("@angular/core").InputSignal<TemplateRef<SegmentControlItemContext<T>> | undefined>;
119
+ /** Emitted on user selection with the new model value. */
120
+ selectionChange: import("@angular/core").OutputEmitterRef<SegmentControlValue<T>>;
121
+ /** Emitted when a segment is clicked (even if it does not change the value). */
122
+ optionClick: import("@angular/core").OutputEmitterRef<SegmentControlOptionClickEvent<T>>;
123
+ /** @ignore */
124
+ private readonly host;
125
+ /** @ignore */
126
+ private readonly hostDestroyRef;
127
+ /** @ignore Native segment buttons (for roving focus + indicator measurement). */
128
+ private readonly optionEls;
129
+ /** @ignore Current model value (written by the form or by user selection).
130
+ * Redeclared over the base signal to keep `null` (not `undefined`) as the empty value. */
131
+ protected readonly modelValue: import("@angular/core").WritableSignal<SegmentControlValue<T>>;
132
+ /** @ignore Index the roving focus last landed on. */
133
+ private readonly focusedIndex;
134
+ /** @ignore Measured geometry of the sliding indicator (null until first measure). */
135
+ protected readonly thumb: import("@angular/core").WritableSignal<ThumbMetrics | null>;
136
+ /** @ignore Bumped by the ResizeObserver to re-measure the indicator. */
137
+ private readonly resizeTick;
138
+ constructor();
139
+ /** @ignore Icon size derived from the control size. */
140
+ protected readonly iconSize: import("@angular/core").Signal<"default" | "sm">;
141
+ /** @ignore Options resolved to a flat, render-ready shape. */
142
+ protected readonly normalizedOptions: import("@angular/core").Signal<NormalizedSegment[]>;
143
+ /** @ignore Index of the selected segment in single mode (-1 if none / multiple). */
144
+ protected readonly selectedIndex: import("@angular/core").Signal<number>;
145
+ /** @ignore Whether the sliding indicator should render. */
146
+ protected readonly showThumb: import("@angular/core").Signal<boolean>;
147
+ /** @ignore CSS transform positioning the indicator over the selected segment. */
148
+ protected readonly thumbTransform: import("@angular/core").Signal<string | null>;
149
+ /** @ignore Segment that owns the group's single tab stop (roving tabindex). */
150
+ protected readonly rovingIndex: import("@angular/core").Signal<number>;
151
+ /** @ignore */
152
+ protected uidPrefix(): string;
153
+ /** Move focus to the group's current tab stop. */
154
+ focus(options?: FocusOptions): void;
155
+ /** @ignore The tabindex for a given segment (roving: one 0, the rest -1). */
156
+ protected tabindexFor(index: number): number;
157
+ /** @ignore Select (or toggle / clear) a segment on user interaction. */
158
+ protected select(option: NormalizedSegment, event: Event): void;
159
+ /** @ignore */
160
+ protected onOptionFocus(index: number): void;
161
+ /** @ignore Roving focus (and select-on-arrow in single mode). */
162
+ protected onKeydown(event: KeyboardEvent): void;
163
+ /** @ignore Mark touched when focus leaves the whole group. */
164
+ protected onFocusOut(event: FocusEvent): void;
165
+ /** @ignore */
166
+ private isObject;
167
+ /** @ignore */
168
+ private resolveValue;
169
+ /** @ignore */
170
+ private resolveLabel;
171
+ /** @ignore */
172
+ private resolveIcon;
173
+ /** @ignore */
174
+ private resolveAriaLabel;
175
+ /** @ignore */
176
+ private resolveDisabled;
177
+ /** @ignore */
178
+ private asText;
179
+ /** @ignore Whether a resolved value is part of the current model. */
180
+ private isValueSelected;
181
+ /** @ignore Value equality — by `dataKey` for objects, strict otherwise. */
182
+ private equals;
183
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiSegmentControl<any>, never>;
184
+ static ɵcmp: i0.ɵɵComponentDeclaration<UiSegmentControl<any>, "ui-segment-control", never, {
185
+ "options": {
186
+ "alias": "options";
187
+ "required": false;
188
+ "isSignal": true;
189
+ };
190
+ "optionLabel": {
191
+ "alias": "optionLabel";
192
+ "required": false;
193
+ "isSignal": true;
194
+ };
195
+ "optionValue": {
196
+ "alias": "optionValue";
197
+ "required": false;
198
+ "isSignal": true;
199
+ };
200
+ "optionDisabled": {
201
+ "alias": "optionDisabled";
202
+ "required": false;
203
+ "isSignal": true;
204
+ };
205
+ "optionIcon": {
206
+ "alias": "optionIcon";
207
+ "required": false;
208
+ "isSignal": true;
209
+ };
210
+ "dataKey": {
211
+ "alias": "dataKey";
212
+ "required": false;
213
+ "isSignal": true;
214
+ };
215
+ "multiple": {
216
+ "alias": "multiple";
217
+ "required": false;
218
+ "isSignal": true;
219
+ };
220
+ "ripple": {
221
+ "alias": "ripple";
222
+ "required": false;
223
+ "isSignal": true;
224
+ };
225
+ "allowEmpty": {
226
+ "alias": "allowEmpty";
227
+ "required": false;
228
+ "isSignal": true;
229
+ };
230
+ "size": {
231
+ "alias": "size";
232
+ "required": false;
233
+ "isSignal": true;
234
+ };
235
+ "orientation": {
236
+ "alias": "orientation";
237
+ "required": false;
238
+ "isSignal": true;
239
+ };
240
+ "fluid": {
241
+ "alias": "fluid";
242
+ "required": false;
243
+ "isSignal": true;
244
+ };
245
+ "motion": {
246
+ "alias": "motion";
247
+ "required": false;
248
+ "isSignal": true;
249
+ };
250
+ "itemTemplate": {
251
+ "alias": "itemTemplate";
252
+ "required": false;
253
+ "isSignal": true;
254
+ };
255
+ }, {
256
+ "selectionChange": "selectionChange";
257
+ "optionClick": "optionClick";
258
+ }, never, never, true, never>;
183
259
  }
184
-
185
- export { UiSegmentControl };
186
- export type { SegmentControlItemContext, SegmentControlOption, SegmentControlOptionClickEvent, SegmentControlOrientation, SegmentControlSize, SegmentControlValue };
260
+ export {};