@4sh/ui-kit 0.16.0 → 0.17.1

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,313 +1,402 @@
1
- import * as i0 from '@angular/core';
2
- import { input, numberAttribute, booleanAttribute, output, contentChild, inject, ElementRef, signal, computed, afterNextRender, isDevMode, effect, forwardRef, Component } from '@angular/core';
3
- import { NgTemplateOutlet } from '@angular/common';
4
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
5
- import { BaseFieldControl, warnMissingAccessibleName, hasFocus, UiBrowserFill } from '@4sh/ui-kit/forms';
6
-
7
- /**
8
- * ui-input-otp — headless one-time-password field: a row of single-character
9
- * cells backing a single string value.
10
- *
11
- * Each cell is a real native `<input maxlength="1">`; the group carries
12
- * `role="group"` and a **roving tabindex** so `Tab` enters/leaves the field as a
13
- * whole while `←`/`→` move between cells (`Backspace` clears and steps
14
- * back). Typing auto-advances, and pasting a code distributes it across the
15
- * cells. Interactive states (hover/focus/disabled) are pure CSS driven by the
16
- * `form.*` design tokens.
17
- *
18
- * - `mask` hides the characters (`type="password"`).
19
- * - `integerOnly` restricts input to digits (`inputmode="numeric"`).
20
- * - a `#input` template replaces the default cell with your own control (it
21
- * receives the value, index, roving tabindex and the event handlers to bind).
22
- *
23
- * Works standalone, with `[(ngModel)]`, reactive forms, or signal forms
24
- * (`[formField]`, Angular 22) — it is a `ControlValueAccessor` (interop handled by
25
- * `BaseControlValueAccessor`).
26
- *
27
- * @example
28
- * ```html
29
- * <ui-input-otp [(ngModel)]="code" [length]="6" [integerOnly]="true" ariaLabel="Code de vérification" />
30
- * ```
31
- */
32
- class UiInputOtp extends BaseFieldControl {
33
- constructor() {
34
- super();
35
- /** Number of cells (characters) to enter. */
36
- this.length = input(4, { ...(ngDevMode ? { debugName: "length" } : /* istanbul ignore next */ {}), transform: numberAttribute });
37
- /** Hide the characters (renders `type="password"`). */
38
- this.mask = input(false, { ...(ngDevMode ? { debugName: "mask" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
39
- /** Restrict input to integers (`inputmode="numeric"`, non-digits rejected). */
40
- this.integerOnly = input(false, { ...(ngDevMode ? { debugName: "integerOnly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
41
- /** Cell size. */
42
- this.size = input('default', /* @ts-ignore */
43
- ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
44
- /** Accessible-name prefix of each cell ("<prefix> N"). Falls back to `ariaLabel`. */
45
- this.charAriaLabel = input('Caractère', /* @ts-ignore */
46
- ...(ngDevMode ? [{ debugName: "charAriaLabel" }] : /* istanbul ignore next */ []));
47
- /** Focus the first cell on init. */
48
- this.autofocus = input(false, { ...(ngDevMode ? { debugName: "autofocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
49
- /** Emitted with the joined value on every change. */
50
- this.valueChange = output();
51
- /** Emitted with the value once every cell is filled. */
52
- this.completed = output();
53
- /** Custom cell template (`<ng-template #input let-value let-i="index" let-events="events">`). */
54
- this.inputTemplate = contentChild('input', /* @ts-ignore */
55
- ...(ngDevMode ? [{ debugName: "inputTemplate" }] : /* istanbul ignore next */ []));
56
- /** @ignore */
57
- this.host = inject(ElementRef);
58
- /** @ignore Per-cell characters (source of truth for the view). */
59
- this.tokens = signal([], /* @ts-ignore */
60
- ...(ngDevMode ? [{ debugName: "tokens" }] : /* istanbul ignore next */ []));
61
- /** @ignore Cell that owns the group's single tab stop (roving tabindex). */
62
- this.focusedIndex = signal(0, /* @ts-ignore */
63
- ...(ngDevMode ? [{ debugName: "focusedIndex" }] : /* istanbul ignore next */ []));
64
- /** @ignore Native input type (masked → password). */
65
- this.inputType = computed(() => (this.mask() ? 'password' : 'text'), /* @ts-ignore */
66
- ...(ngDevMode ? [{ debugName: "inputType" }] : /* istanbul ignore next */ []));
67
- /** @ignore Hint for the on-screen keyboard. */
68
- this.inputMode = computed(() => (this.integerOnly() ? 'numeric' : 'text'), /* @ts-ignore */
69
- ...(ngDevMode ? [{ debugName: "inputMode" }] : /* istanbul ignore next */ []));
70
- /** @ignore Render-ready list of cells (index + current value). */
71
- this.cells = computed(() => {
72
- const tokens = this.tokens();
73
- return Array.from({ length: Math.max(0, this.length()) }, (_, index) => ({
74
- index,
75
- id: `${this.uid}-${index}`,
76
- value: tokens[index] ?? '',
77
- }));
78
- }, /* @ts-ignore */
79
- ...(ngDevMode ? [{ debugName: "cells" }] : /* istanbul ignore next */ []));
80
- // Optional autofocus on the first cell after the view exists.
81
- afterNextRender(() => {
82
- if (this.autofocus() && !this.isDisabled())
83
- this.focusCell(0);
84
- });
85
- // A11y safeguard (dev only): the group needs an accessible name.
86
- if (isDevMode()) {
87
- effect(() => {
88
- if (!this.ariaLabel() && !this.ariaLabelledBy()) {
89
- warnMissingAccessibleName('ui-input-otp', 'Group has no accessible name: provide `ariaLabel` (or `ariaLabelledBy`).');
90
- }
91
- });
92
- }
93
- }
94
- writeValue(value) {
95
- this.tokens.set(this.toTokens(value));
96
- }
97
- /** @ignore */
98
- uidPrefix() {
99
- return 'ui-input-otp';
100
- }
101
- /** Move focus to the first cell. */
102
- focus(options) {
103
- this.focusCell(0, options);
104
- }
105
- /** @ignore Roving tabindex for a given cell (one `0`, the rest `-1`). */
106
- tabindexFor(index) {
107
- const active = Math.min(this.focusedIndex(), this.length() - 1);
108
- return index === Math.max(0, active) ? 0 : -1;
109
- }
110
- /** @ignore Value shown in a cell. */
111
- cellValue(index) {
112
- return this.tokens()[index] ?? '';
113
- }
114
- /** @ignore Handlers exposed to a custom `#input` template. */
115
- cellEvents(index) {
116
- return {
117
- input: (event) => this.onInput(event, index),
118
- keydown: (event) => this.onKeydown(event, index),
119
- focus: (event) => this.onFocus(event, index),
120
- blur: () => {
121
- /* touched is emitted on group focusout */
122
- },
123
- paste: (event) => this.onPaste(event, index),
124
- browserFill: (event) => this.onBrowserFill(event, index),
125
- };
126
- }
127
- /** @ignore Cell input: single source of the per-cell value (view → form). */
128
- onInput(event, index) {
129
- if (this.readonly())
130
- return;
131
- const target = event.target;
132
- const raw = this.sanitize(target.value);
133
- // A value written by the browser into a cell without focus must not pull the focus in.
134
- const typed = hasFocus(target);
135
- // Multi-char (autofill / paste into a cell) → distribute across cells.
136
- if (raw.length > 1) {
137
- target.value = raw.charAt(0);
138
- this.setFromIndex(index, raw, typed);
139
- return;
140
- }
141
- const tokens = [...this.tokens()];
142
- tokens[index] = raw;
143
- target.value = raw; // reflect the sanitised value
144
- this.commit(tokens);
145
- if (!typed)
146
- return;
147
- const inputType = event.inputType;
148
- if (raw)
149
- this.focusCell(index + 1);
150
- else if (inputType === 'deleteContentBackward')
151
- this.focusCell(index - 1);
152
- }
153
- /** @ignore Value written by the browser into a cell without an `input` event. */
154
- onBrowserFill(event, index) {
155
- if (event.target.value !== this.cellValue(index)) {
156
- this.onInput(event, index);
157
- }
158
- }
159
- /** @ignore Keyboard navigation + input guards. */
160
- onKeydown(event, index) {
161
- // Chrome's autofill dispatches a bare `Event`, without `key`.
162
- if (!(event instanceof KeyboardEvent))
163
- return;
164
- if (event.altKey || event.ctrlKey || event.metaKey)
165
- return;
166
- const target = event.target;
167
- switch (event.key) {
168
- case 'ArrowLeft':
169
- event.preventDefault();
170
- this.focusCell(index - 1);
171
- return;
172
- case 'ArrowRight':
173
- event.preventDefault();
174
- this.focusCell(index + 1);
175
- return;
176
- case 'Home':
177
- event.preventDefault();
178
- this.focusCell(0);
179
- return;
180
- case 'End':
181
- event.preventDefault();
182
- this.focusCell(this.length() - 1);
183
- return;
184
- case 'ArrowUp':
185
- case 'ArrowDown':
186
- event.preventDefault();
187
- return;
188
- case 'Backspace':
189
- // Empty cell → clear + step back (a filled cell clears via native input).
190
- if (!target.value && !this.readonly()) {
191
- event.preventDefault();
192
- const tokens = [...this.tokens()];
193
- if (tokens[index - 1] !== undefined)
194
- tokens[index - 1] = '';
195
- this.commit(tokens);
196
- this.focusCell(index - 1);
197
- }
198
- return;
199
- default: {
200
- if (event.key.length !== 1)
201
- return; // let control keys through
202
- // Reject non-digits when integer-only.
203
- if (this.integerOnly() && !/^\d$/.test(event.key))
204
- event.preventDefault();
205
- }
206
- }
207
- }
208
- /** @ignore Select the cell content on focus + track the roving index. */
209
- onFocus(event, index) {
210
- const cell = event.target;
211
- // Chrome's autofill sends a focus event to a cell it fills without focusing it,
212
- // and `select()` would pull the focus in.
213
- if (!hasFocus(cell))
214
- return;
215
- this.focusedIndex.set(index);
216
- cell.select?.();
217
- }
218
- /** @ignore Distribute a pasted code across the cells from `index`. */
219
- onPaste(event, index) {
220
- if (this.isDisabled() || this.readonly())
221
- return;
222
- event.preventDefault();
223
- const pasted = this.sanitize(event.clipboardData?.getData('text') ?? '');
224
- if (pasted)
225
- this.setFromIndex(index, pasted);
226
- }
227
- /** @ignore Mark touched when focus leaves the whole group. */
228
- onFocusOut(event) {
229
- const next = event.relatedTarget;
230
- if (!next || !this.host.nativeElement.contains(next))
231
- this.emitTouch();
232
- }
233
- /** @ignore Write `chars` into the cells starting at `from`, then commit (+ focus). */
234
- setFromIndex(from, chars, moveFocus = true) {
235
- const tokens = [...this.tokens()];
236
- const max = this.length();
237
- let i = from;
238
- for (const ch of chars) {
239
- if (i >= max)
240
- break;
241
- tokens[i++] = ch;
242
- }
243
- this.commit(tokens);
244
- if (moveFocus)
245
- this.focusCell(Math.min(i, max - 1));
246
- }
247
- /** @ignore Persist the tokens, emit the joined value (+ `completed` when full). */
248
- commit(tokens) {
249
- const trimmed = tokens.slice(0, this.length());
250
- this.tokens.set(trimmed);
251
- const value = trimmed.join('');
252
- this.emitChange(value);
253
- this.valueChange.emit(value);
254
- if (value.length === this.length() && trimmed.every((c) => c !== '')) {
255
- this.completed.emit(value);
256
- }
257
- }
258
- /** @ignore Focus (and select) the cell at `index`, if it exists. */
259
- focusCell(index, options) {
260
- if (index < 0 || index >= this.length())
261
- return;
262
- this.focusedIndex.set(index);
263
- const el = this.host.nativeElement.querySelectorAll('input')[index];
264
- if (el) {
265
- el.focus(options);
266
- el.select();
267
- }
268
- }
269
- /** @ignore Split a form value into an array of single characters (bounded). */
270
- toTokens(value) {
271
- if (value === null || value === undefined || value === '')
272
- return [];
273
- return String(value).split('').slice(0, this.length());
274
- }
275
- /** @ignore Drop non-digits when integer-only, otherwise pass through. */
276
- sanitize(value) {
277
- return this.integerOnly() ? value.replace(/\D/g, '') : value;
278
- }
279
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiInputOtp, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
280
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: UiInputOtp, isStandalone: true, selector: "ui-input-otp", inputs: { length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null }, mask: { classPropertyName: "mask", publicName: "mask", isSignal: true, isRequired: false, transformFunction: null }, integerOnly: { classPropertyName: "integerOnly", publicName: "integerOnly", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, charAriaLabel: { classPropertyName: "charAriaLabel", publicName: "charAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", completed: "completed" }, host: { attributes: { "role": "group" }, listeners: { "focusout": "onFocusOut($event)" }, properties: { "class._small": "size() === 'small'", "class._large": "size() === 'large'", "class._disabled": "isDisabled()", "class._readonly": "readonly()", "class._invalid": "isInvalid()", "attr.aria-label": "ariaLabel() || null", "attr.aria-labelledby": "ariaLabelledBy() || null", "attr.aria-invalid": "isInvalid() ? 'true' : null", "attr.aria-disabled": "isDisabled() ? 'true' : null" }, classAttribute: "ui-input-otp" }, providers: [
281
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputOtp), multi: true },
282
- ], queries: [{ propertyName: "inputTemplate", first: true, predicate: ["input"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@for (cell of cells(); track cell.index) {\n @if (inputTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: cell.value,\n value: cell.value,\n index: cell.index,\n events: cellEvents(cell.index),\n tabindex: tabindexFor(cell.index),\n }\"\n />\n } @else {\n <input\n uiBrowserFill\n class=\"ui-input-otp-cell\"\n [id]=\"cell.id\"\n [type]=\"inputType()\"\n [value]=\"cell.value\"\n maxlength=\"1\"\n autocomplete=\"one-time-code\"\n [attr.inputmode]=\"inputMode()\"\n [attr.name]=\"name() ? name() + '-' + cell.index : null\"\n [attr.tabindex]=\"tabindexFor(cell.index)\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [attr.aria-label]=\"(ariaLabel() || charAriaLabel()) + ' ' + (cell.index + 1)\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (input)=\"onInput($event, cell.index)\"\n (browserFill)=\"onBrowserFill($event, cell.index)\"\n (keydown)=\"onKeydown($event, cell.index)\"\n (focus)=\"onFocus($event, cell.index)\"\n (paste)=\"onPaste($event, cell.index)\"\n />\n }\n}\n", styles: [":host{display:inline-flex;align-items:center;gap:var(--ui-input-otp-gap, var(--units-sm));font-family:var(--ui-input-otp-font-family, var(--fontfamily-base))}:host .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size, var(--size-components-default));block-size:var(--ui-input-otp-cell-size, var(--size-components-default));font-size:var(--ui-input-otp-font-size, var(--size-typography-text-default))}:host._small .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size-small, var(--size-components-sm));block-size:var(--ui-input-otp-cell-size-small, var(--size-components-sm));font-size:var(--ui-input-otp-font-size-small, var(--size-typography-text-md))}:host._large .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size-large, var(--size-components-xl));block-size:var(--ui-input-otp-cell-size-large, var(--size-components-xl));font-size:var(--ui-input-otp-font-size-large, var(--size-typography-text-lg))}@keyframes ui-browser-fill{0%{opacity:1}}.ui-browser-fill:-webkit-autofill{animation:ui-browser-fill 0s}.ui-input-otp-cell{--_stroke: var(--ui-input-otp-cell-stroke, var(--form-high-stroke-default));--_stroke-hover: var(--ui-input-otp-cell-stroke-hover, var(--form-high-stroke-hover));--_stroke-focus: var(--ui-input-otp-cell-stroke-focus, var(--form-high-stroke-focused));box-sizing:border-box;min-inline-size:0;margin:0;padding:0;border:var(--ui-input-otp-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--_stroke);border-radius:var(--ui-input-otp-radius, var(--ui-form-field-radius, var(--radius-sm)));background-color:var(--ui-input-otp-cell-surface, var(--form-high-surface-default));color:var(--ui-input-otp-cell-color, var(--form-high-content-default));font-family:inherit;font-weight:var(--ui-input-otp-weight, var(--weight-bold));text-align:center;caret-color:var(--ui-input-otp-cell-color, var(--form-high-content-default));transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-input-otp-cell:hover:not(:disabled):not(:focus){border-color:var(--_stroke-hover)}.ui-input-otp-cell:focus,.ui-input-otp-cell:focus-visible{outline:none;border-color:var(--_stroke-focus);box-shadow:0 0 0 var(--ui-input-otp-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--_stroke-focus) r g b/50%)}.ui-input-otp-cell:disabled{border-color:var(--ui-input-otp-cell-stroke-disabled, var(--form-high-stroke-disabled));background-color:var(--ui-input-otp-cell-surface-disabled, var(--form-high-surface-disabled));color:var(--ui-input-otp-cell-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}:host._readonly .ui-input-otp-cell{cursor:default}:host._invalid .ui-input-otp-cell{--_stroke: var(--ui-input-otp-cell-stroke-invalid, var(--form-error-stroke-default));--_stroke-hover: var(--ui-input-otp-cell-stroke-hover-invalid, var(--form-error-stroke-hover));--_stroke-focus: var(--ui-input-otp-cell-stroke-focus-invalid, var(--form-error-stroke-focused))}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: UiBrowserFill, selector: "[uiBrowserFill]", outputs: ["browserFill"] }] }); }
283
- }
284
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiInputOtp, decorators: [{
285
- type: Component,
286
- args: [{ selector: 'ui-input-otp', imports: [NgTemplateOutlet, UiBrowserFill], providers: [
287
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputOtp), multi: true },
288
- ], host: {
289
- class: 'ui-input-otp',
290
- role: 'group',
291
- '[class._small]': "size() === 'small'",
292
- '[class._large]': "size() === 'large'",
293
- '[class._disabled]': 'isDisabled()',
294
- '[class._readonly]': 'readonly()',
295
- '[class._invalid]': 'isInvalid()',
296
- '[attr.aria-label]': 'ariaLabel() || null',
297
- '[attr.aria-labelledby]': 'ariaLabelledBy() || null',
298
- '[attr.aria-invalid]': "isInvalid() ? 'true' : null",
299
- '[attr.aria-disabled]': "isDisabled() ? 'true' : null",
300
- '(focusout)': 'onFocusOut($event)',
301
- }, template: "@for (cell of cells(); track cell.index) {\n @if (inputTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: cell.value,\n value: cell.value,\n index: cell.index,\n events: cellEvents(cell.index),\n tabindex: tabindexFor(cell.index),\n }\"\n />\n } @else {\n <input\n uiBrowserFill\n class=\"ui-input-otp-cell\"\n [id]=\"cell.id\"\n [type]=\"inputType()\"\n [value]=\"cell.value\"\n maxlength=\"1\"\n autocomplete=\"one-time-code\"\n [attr.inputmode]=\"inputMode()\"\n [attr.name]=\"name() ? name() + '-' + cell.index : null\"\n [attr.tabindex]=\"tabindexFor(cell.index)\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [attr.aria-label]=\"(ariaLabel() || charAriaLabel()) + ' ' + (cell.index + 1)\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (input)=\"onInput($event, cell.index)\"\n (browserFill)=\"onBrowserFill($event, cell.index)\"\n (keydown)=\"onKeydown($event, cell.index)\"\n (focus)=\"onFocus($event, cell.index)\"\n (paste)=\"onPaste($event, cell.index)\"\n />\n }\n}\n", styles: [":host{display:inline-flex;align-items:center;gap:var(--ui-input-otp-gap, var(--units-sm));font-family:var(--ui-input-otp-font-family, var(--fontfamily-base))}:host .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size, var(--size-components-default));block-size:var(--ui-input-otp-cell-size, var(--size-components-default));font-size:var(--ui-input-otp-font-size, var(--size-typography-text-default))}:host._small .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size-small, var(--size-components-sm));block-size:var(--ui-input-otp-cell-size-small, var(--size-components-sm));font-size:var(--ui-input-otp-font-size-small, var(--size-typography-text-md))}:host._large .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size-large, var(--size-components-xl));block-size:var(--ui-input-otp-cell-size-large, var(--size-components-xl));font-size:var(--ui-input-otp-font-size-large, var(--size-typography-text-lg))}@keyframes ui-browser-fill{0%{opacity:1}}.ui-browser-fill:-webkit-autofill{animation:ui-browser-fill 0s}.ui-input-otp-cell{--_stroke: var(--ui-input-otp-cell-stroke, var(--form-high-stroke-default));--_stroke-hover: var(--ui-input-otp-cell-stroke-hover, var(--form-high-stroke-hover));--_stroke-focus: var(--ui-input-otp-cell-stroke-focus, var(--form-high-stroke-focused));box-sizing:border-box;min-inline-size:0;margin:0;padding:0;border:var(--ui-input-otp-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--_stroke);border-radius:var(--ui-input-otp-radius, var(--ui-form-field-radius, var(--radius-sm)));background-color:var(--ui-input-otp-cell-surface, var(--form-high-surface-default));color:var(--ui-input-otp-cell-color, var(--form-high-content-default));font-family:inherit;font-weight:var(--ui-input-otp-weight, var(--weight-bold));text-align:center;caret-color:var(--ui-input-otp-cell-color, var(--form-high-content-default));transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-input-otp-cell:hover:not(:disabled):not(:focus){border-color:var(--_stroke-hover)}.ui-input-otp-cell:focus,.ui-input-otp-cell:focus-visible{outline:none;border-color:var(--_stroke-focus);box-shadow:0 0 0 var(--ui-input-otp-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--_stroke-focus) r g b/50%)}.ui-input-otp-cell:disabled{border-color:var(--ui-input-otp-cell-stroke-disabled, var(--form-high-stroke-disabled));background-color:var(--ui-input-otp-cell-surface-disabled, var(--form-high-surface-disabled));color:var(--ui-input-otp-cell-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}:host._readonly .ui-input-otp-cell{cursor:default}:host._invalid .ui-input-otp-cell{--_stroke: var(--ui-input-otp-cell-stroke-invalid, var(--form-error-stroke-default));--_stroke-hover: var(--ui-input-otp-cell-stroke-hover-invalid, var(--form-error-stroke-hover));--_stroke-focus: var(--ui-input-otp-cell-stroke-focus-invalid, var(--form-error-stroke-focused))}\n"] }]
302
- }], ctorParameters: () => [], propDecorators: { length: [{ type: i0.Input, args: [{ isSignal: true, alias: "length", required: false }] }], mask: [{ type: i0.Input, args: [{ isSignal: true, alias: "mask", required: false }] }], integerOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "integerOnly", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], charAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "charAriaLabel", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], completed: [{ type: i0.Output, args: ["completed"] }], inputTemplate: [{ type: i0.ContentChild, args: ['input', { isSignal: true }] }] } });
303
-
304
- /*
305
- * Public API Surface of ui-kit/ui-input-otp
306
- */
307
-
308
- /**
309
- * Generated bundle index. Do not edit.
310
- */
311
-
1
+ import * as i0 from "@angular/core";
2
+ import { Component, ElementRef, afterNextRender, booleanAttribute, computed, contentChild, effect, forwardRef, inject, input, isDevMode, numberAttribute, output, signal } from "@angular/core";
3
+ import { NgTemplateOutlet } from "@angular/common";
4
+ import { NG_VALUE_ACCESSOR } from "@angular/forms";
5
+ import { BaseFieldControl, UiBrowserFill, hasFocus, warnMissingAccessibleName } from "@4sh/ui-kit/forms";
6
+ var UiInputOtp = class UiInputOtp extends BaseFieldControl {
7
+ constructor() {
8
+ super();
9
+ this.length = input(4, {
10
+ ...ngDevMode ? { debugName: "length" } : /* istanbul ignore next */ {},
11
+ transform: numberAttribute
12
+ });
13
+ this.mask = input(false, {
14
+ ...ngDevMode ? { debugName: "mask" } : /* istanbul ignore next */ {},
15
+ transform: booleanAttribute
16
+ });
17
+ this.integerOnly = input(false, {
18
+ ...ngDevMode ? { debugName: "integerOnly" } : /* istanbul ignore next */ {},
19
+ transform: booleanAttribute
20
+ });
21
+ this.size = input("default", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
22
+ this.charAriaLabel = input("Caractère", ...ngDevMode ? [{ debugName: "charAriaLabel" }] : /* istanbul ignore next */ []);
23
+ this.autofocus = input(false, {
24
+ ...ngDevMode ? { debugName: "autofocus" } : /* istanbul ignore next */ {},
25
+ transform: booleanAttribute
26
+ });
27
+ this.valueChange = output();
28
+ this.completed = output();
29
+ this.inputTemplate = contentChild("input", ...ngDevMode ? [{ debugName: "inputTemplate" }] : /* istanbul ignore next */ []);
30
+ this.host = inject(ElementRef);
31
+ this.tokens = signal([], ...ngDevMode ? [{ debugName: "tokens" }] : /* istanbul ignore next */ []);
32
+ this.focusedIndex = signal(0, ...ngDevMode ? [{ debugName: "focusedIndex" }] : /* istanbul ignore next */ []);
33
+ this.inputType = computed(() => this.mask() ? "password" : "text", ...ngDevMode ? [{ debugName: "inputType" }] : /* istanbul ignore next */ []);
34
+ this.inputMode = computed(() => this.integerOnly() ? "numeric" : "text", ...ngDevMode ? [{ debugName: "inputMode" }] : /* istanbul ignore next */ []);
35
+ this.cells = computed(() => {
36
+ const tokens = this.tokens();
37
+ return Array.from({ length: Math.max(0, this.length()) }, (_, index) => ({
38
+ index,
39
+ id: `${this.uid}-${index}`,
40
+ value: tokens[index] ?? ""
41
+ }));
42
+ }, ...ngDevMode ? [{ debugName: "cells" }] : /* istanbul ignore next */ []);
43
+ afterNextRender(() => {
44
+ if (this.autofocus() && !this.isDisabled()) this.focusCell(0);
45
+ });
46
+ if (isDevMode()) effect(() => {
47
+ if (!this.ariaLabel() && !this.ariaLabelledBy()) warnMissingAccessibleName("ui-input-otp", "Group has no accessible name: provide `ariaLabel` (or `ariaLabelledBy`).");
48
+ });
49
+ }
50
+ writeValue(value) {
51
+ this.tokens.set(this.toTokens(value));
52
+ }
53
+ uidPrefix() {
54
+ return "ui-input-otp";
55
+ }
56
+ focus(options) {
57
+ this.focusCell(0, options);
58
+ }
59
+ tabindexFor(index) {
60
+ const active = Math.min(this.focusedIndex(), this.length() - 1);
61
+ return index === Math.max(0, active) ? 0 : -1;
62
+ }
63
+ cellValue(index) {
64
+ return this.tokens()[index] ?? "";
65
+ }
66
+ cellEvents(index) {
67
+ return {
68
+ input: (event) => this.onInput(event, index),
69
+ keydown: (event) => this.onKeydown(event, index),
70
+ focus: (event) => this.onFocus(event, index),
71
+ blur: () => {},
72
+ paste: (event) => this.onPaste(event, index),
73
+ browserFill: (event) => this.onBrowserFill(event, index)
74
+ };
75
+ }
76
+ onInput(event, index) {
77
+ if (this.readonly()) return;
78
+ const target = event.target;
79
+ const raw = this.sanitize(target.value);
80
+ const typed = hasFocus(target);
81
+ if (raw.length > 1) {
82
+ target.value = raw.charAt(0);
83
+ this.setFromIndex(index, raw, typed);
84
+ return;
85
+ }
86
+ const tokens = [...this.tokens()];
87
+ tokens[index] = raw;
88
+ target.value = raw;
89
+ this.commit(tokens);
90
+ if (!typed) return;
91
+ const inputType = event.inputType;
92
+ if (raw) this.focusCell(index + 1);
93
+ else if (inputType === "deleteContentBackward") this.focusCell(index - 1);
94
+ }
95
+ onBrowserFill(event, index) {
96
+ if (event.target.value !== this.cellValue(index)) this.onInput(event, index);
97
+ }
98
+ onKeydown(event, index) {
99
+ if (!(event instanceof KeyboardEvent)) return;
100
+ if (event.altKey || event.ctrlKey || event.metaKey) return;
101
+ const target = event.target;
102
+ switch (event.key) {
103
+ case "ArrowLeft":
104
+ event.preventDefault();
105
+ this.focusCell(index - 1);
106
+ return;
107
+ case "ArrowRight":
108
+ event.preventDefault();
109
+ this.focusCell(index + 1);
110
+ return;
111
+ case "Home":
112
+ event.preventDefault();
113
+ this.focusCell(0);
114
+ return;
115
+ case "End":
116
+ event.preventDefault();
117
+ this.focusCell(this.length() - 1);
118
+ return;
119
+ case "ArrowUp":
120
+ case "ArrowDown":
121
+ event.preventDefault();
122
+ return;
123
+ case "Backspace":
124
+ if (!target.value && !this.readonly()) {
125
+ event.preventDefault();
126
+ const tokens = [...this.tokens()];
127
+ if (tokens[index - 1] !== void 0) tokens[index - 1] = "";
128
+ this.commit(tokens);
129
+ this.focusCell(index - 1);
130
+ }
131
+ return;
132
+ default:
133
+ if (event.key.length !== 1) return;
134
+ if (this.integerOnly() && !/^\d$/.test(event.key)) event.preventDefault();
135
+ }
136
+ }
137
+ onFocus(event, index) {
138
+ const cell = event.target;
139
+ if (!hasFocus(cell)) return;
140
+ this.focusedIndex.set(index);
141
+ cell.select?.();
142
+ }
143
+ onPaste(event, index) {
144
+ if (this.isDisabled() || this.readonly()) return;
145
+ event.preventDefault();
146
+ const pasted = this.sanitize(event.clipboardData?.getData("text") ?? "");
147
+ if (pasted) this.setFromIndex(index, pasted);
148
+ }
149
+ onFocusOut(event) {
150
+ const next = event.relatedTarget;
151
+ if (!next || !this.host.nativeElement.contains(next)) this.emitTouch();
152
+ }
153
+ setFromIndex(from, chars, moveFocus = true) {
154
+ const tokens = [...this.tokens()];
155
+ const max = this.length();
156
+ let i = from;
157
+ for (const ch of chars) {
158
+ if (i >= max) break;
159
+ tokens[i++] = ch;
160
+ }
161
+ this.commit(tokens);
162
+ if (moveFocus) this.focusCell(Math.min(i, max - 1));
163
+ }
164
+ commit(tokens) {
165
+ const trimmed = tokens.slice(0, this.length());
166
+ this.tokens.set(trimmed);
167
+ const value = trimmed.join("");
168
+ this.emitChange(value);
169
+ this.valueChange.emit(value);
170
+ if (value.length === this.length() && trimmed.every((c) => c !== "")) this.completed.emit(value);
171
+ }
172
+ focusCell(index, options) {
173
+ if (index < 0 || index >= this.length()) return;
174
+ this.focusedIndex.set(index);
175
+ const el = this.host.nativeElement.querySelectorAll("input")[index];
176
+ if (el) {
177
+ el.focus(options);
178
+ el.select();
179
+ }
180
+ }
181
+ toTokens(value) {
182
+ if (value === null || value === void 0 || value === "") return [];
183
+ return String(value).split("").slice(0, this.length());
184
+ }
185
+ sanitize(value) {
186
+ return this.integerOnly() ? value.replace(/\D/g, "") : value;
187
+ }
188
+ static {
189
+ this.ɵfac = i0.ɵɵngDeclareFactory({
190
+ minVersion: "12.0.0",
191
+ version: "22.3.0",
192
+ ngImport: i0,
193
+ type: UiInputOtp,
194
+ deps: [],
195
+ target: i0.ɵɵFactoryTarget.Component
196
+ });
197
+ }
198
+ static {
199
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
200
+ minVersion: "17.0.0",
201
+ version: "22.3.0",
202
+ type: UiInputOtp,
203
+ isStandalone: true,
204
+ selector: "ui-input-otp",
205
+ inputs: {
206
+ length: {
207
+ classPropertyName: "length",
208
+ publicName: "length",
209
+ isSignal: true,
210
+ isRequired: false,
211
+ transformFunction: null
212
+ },
213
+ mask: {
214
+ classPropertyName: "mask",
215
+ publicName: "mask",
216
+ isSignal: true,
217
+ isRequired: false,
218
+ transformFunction: null
219
+ },
220
+ integerOnly: {
221
+ classPropertyName: "integerOnly",
222
+ publicName: "integerOnly",
223
+ isSignal: true,
224
+ isRequired: false,
225
+ transformFunction: null
226
+ },
227
+ size: {
228
+ classPropertyName: "size",
229
+ publicName: "size",
230
+ isSignal: true,
231
+ isRequired: false,
232
+ transformFunction: null
233
+ },
234
+ charAriaLabel: {
235
+ classPropertyName: "charAriaLabel",
236
+ publicName: "charAriaLabel",
237
+ isSignal: true,
238
+ isRequired: false,
239
+ transformFunction: null
240
+ },
241
+ autofocus: {
242
+ classPropertyName: "autofocus",
243
+ publicName: "autofocus",
244
+ isSignal: true,
245
+ isRequired: false,
246
+ transformFunction: null
247
+ }
248
+ },
249
+ outputs: {
250
+ valueChange: "valueChange",
251
+ completed: "completed"
252
+ },
253
+ host: {
254
+ attributes: { "role": "group" },
255
+ listeners: { "focusout": "onFocusOut($event)" },
256
+ properties: {
257
+ "class._small": "size() === 'small'",
258
+ "class._large": "size() === 'large'",
259
+ "class._disabled": "isDisabled()",
260
+ "class._readonly": "readonly()",
261
+ "class._invalid": "isInvalid()",
262
+ "attr.aria-label": "ariaLabel() || null",
263
+ "attr.aria-labelledby": "ariaLabelledBy() || null",
264
+ "attr.aria-invalid": "isInvalid() ? 'true' : null",
265
+ "attr.aria-disabled": "isDisabled() ? 'true' : null"
266
+ },
267
+ classAttribute: "ui-input-otp"
268
+ },
269
+ providers: [{
270
+ provide: NG_VALUE_ACCESSOR,
271
+ useExisting: forwardRef(() => UiInputOtp),
272
+ multi: true
273
+ }],
274
+ queries: [{
275
+ propertyName: "inputTemplate",
276
+ first: true,
277
+ predicate: ["input"],
278
+ descendants: true,
279
+ isSignal: true
280
+ }],
281
+ usesInheritance: true,
282
+ ngImport: i0,
283
+ template: "@for (cell of cells(); track cell.index) {\n @if (inputTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: cell.value,\n value: cell.value,\n index: cell.index,\n events: cellEvents(cell.index),\n tabindex: tabindexFor(cell.index),\n }\"\n />\n } @else {\n <input\n uiBrowserFill\n class=\"ui-input-otp-cell\"\n [id]=\"cell.id\"\n [type]=\"inputType()\"\n [value]=\"cell.value\"\n maxlength=\"1\"\n autocomplete=\"one-time-code\"\n [attr.inputmode]=\"inputMode()\"\n [attr.name]=\"name() ? name() + '-' + cell.index : null\"\n [attr.tabindex]=\"tabindexFor(cell.index)\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [attr.aria-label]=\"(ariaLabel() || charAriaLabel()) + ' ' + (cell.index + 1)\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (input)=\"onInput($event, cell.index)\"\n (browserFill)=\"onBrowserFill($event, cell.index)\"\n (keydown)=\"onKeydown($event, cell.index)\"\n (focus)=\"onFocus($event, cell.index)\"\n (paste)=\"onPaste($event, cell.index)\"\n />\n }\n}\n",
284
+ styles: [":host{display:inline-flex;align-items:center;gap:var(--ui-input-otp-gap, var(--units-sm));font-family:var(--ui-input-otp-font-family, var(--fontfamily-base))}:host .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size, var(--size-components-default));block-size:var(--ui-input-otp-cell-size, var(--size-components-default));font-size:var(--ui-input-otp-font-size, var(--size-typography-text-default))}:host._small .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size-small, var(--size-components-sm));block-size:var(--ui-input-otp-cell-size-small, var(--size-components-sm));font-size:var(--ui-input-otp-font-size-small, var(--size-typography-text-md))}:host._large .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size-large, var(--size-components-xl));block-size:var(--ui-input-otp-cell-size-large, var(--size-components-xl));font-size:var(--ui-input-otp-font-size-large, var(--size-typography-text-lg))}@keyframes ui-browser-fill{0%{opacity:1}}.ui-browser-fill:-webkit-autofill{animation:ui-browser-fill 0s}.ui-input-otp-cell{--_stroke: var(--ui-input-otp-cell-stroke, var(--form-high-stroke-default));--_stroke-hover: var(--ui-input-otp-cell-stroke-hover, var(--form-high-stroke-hover));--_stroke-focus: var(--ui-input-otp-cell-stroke-focus, var(--form-high-stroke-focused));box-sizing:border-box;min-inline-size:0;margin:0;padding:0;border:var(--ui-input-otp-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--_stroke);border-radius:var(--ui-input-otp-radius, var(--ui-form-field-radius, var(--radius-sm)));background-color:var(--ui-input-otp-cell-surface, var(--form-high-surface-default));color:var(--ui-input-otp-cell-color, var(--form-high-content-default));font-family:inherit;font-weight:var(--ui-input-otp-weight, var(--weight-bold));text-align:center;caret-color:var(--ui-input-otp-cell-color, var(--form-high-content-default));transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-input-otp-cell:hover:not(:disabled):not(:focus){border-color:var(--_stroke-hover)}.ui-input-otp-cell:focus,.ui-input-otp-cell:focus-visible{outline:none;border-color:var(--_stroke-focus);box-shadow:0 0 0 var(--ui-input-otp-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--_stroke-focus) r g b/50%)}.ui-input-otp-cell:disabled{border-color:var(--ui-input-otp-cell-stroke-disabled, var(--form-high-stroke-disabled));background-color:var(--ui-input-otp-cell-surface-disabled, var(--form-high-surface-disabled));color:var(--ui-input-otp-cell-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}:host._readonly .ui-input-otp-cell{cursor:default}:host._invalid .ui-input-otp-cell{--_stroke: var(--ui-input-otp-cell-stroke-invalid, var(--form-error-stroke-default));--_stroke-hover: var(--ui-input-otp-cell-stroke-hover-invalid, var(--form-error-stroke-hover));--_stroke-focus: var(--ui-input-otp-cell-stroke-focus-invalid, var(--form-error-stroke-focused))}\n"],
285
+ dependencies: [{
286
+ kind: "directive",
287
+ type: NgTemplateOutlet,
288
+ selector: "[ngTemplateOutlet]",
289
+ inputs: [
290
+ "ngTemplateOutletContext",
291
+ "ngTemplateOutlet",
292
+ "ngTemplateOutletInjector"
293
+ ]
294
+ }, {
295
+ kind: "directive",
296
+ type: UiBrowserFill,
297
+ selector: "[uiBrowserFill]",
298
+ outputs: ["browserFill"]
299
+ }]
300
+ });
301
+ }
302
+ };
303
+ i0.ɵɵngDeclareClassMetadata({
304
+ minVersion: "12.0.0",
305
+ version: "22.3.0",
306
+ ngImport: i0,
307
+ type: UiInputOtp,
308
+ decorators: [{
309
+ type: Component,
310
+ args: [{
311
+ selector: "ui-input-otp",
312
+ imports: [NgTemplateOutlet, UiBrowserFill],
313
+ providers: [{
314
+ provide: NG_VALUE_ACCESSOR,
315
+ useExisting: forwardRef(() => UiInputOtp),
316
+ multi: true
317
+ }],
318
+ host: {
319
+ class: "ui-input-otp",
320
+ role: "group",
321
+ "[class._small]": "size() === 'small'",
322
+ "[class._large]": "size() === 'large'",
323
+ "[class._disabled]": "isDisabled()",
324
+ "[class._readonly]": "readonly()",
325
+ "[class._invalid]": "isInvalid()",
326
+ "[attr.aria-label]": "ariaLabel() || null",
327
+ "[attr.aria-labelledby]": "ariaLabelledBy() || null",
328
+ "[attr.aria-invalid]": "isInvalid() ? 'true' : null",
329
+ "[attr.aria-disabled]": "isDisabled() ? 'true' : null",
330
+ "(focusout)": "onFocusOut($event)"
331
+ },
332
+ template: "@for (cell of cells(); track cell.index) {\n @if (inputTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: cell.value,\n value: cell.value,\n index: cell.index,\n events: cellEvents(cell.index),\n tabindex: tabindexFor(cell.index),\n }\"\n />\n } @else {\n <input\n uiBrowserFill\n class=\"ui-input-otp-cell\"\n [id]=\"cell.id\"\n [type]=\"inputType()\"\n [value]=\"cell.value\"\n maxlength=\"1\"\n autocomplete=\"one-time-code\"\n [attr.inputmode]=\"inputMode()\"\n [attr.name]=\"name() ? name() + '-' + cell.index : null\"\n [attr.tabindex]=\"tabindexFor(cell.index)\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [attr.aria-label]=\"(ariaLabel() || charAriaLabel()) + ' ' + (cell.index + 1)\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (input)=\"onInput($event, cell.index)\"\n (browserFill)=\"onBrowserFill($event, cell.index)\"\n (keydown)=\"onKeydown($event, cell.index)\"\n (focus)=\"onFocus($event, cell.index)\"\n (paste)=\"onPaste($event, cell.index)\"\n />\n }\n}\n",
333
+ styles: [":host{display:inline-flex;align-items:center;gap:var(--ui-input-otp-gap, var(--units-sm));font-family:var(--ui-input-otp-font-family, var(--fontfamily-base))}:host .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size, var(--size-components-default));block-size:var(--ui-input-otp-cell-size, var(--size-components-default));font-size:var(--ui-input-otp-font-size, var(--size-typography-text-default))}:host._small .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size-small, var(--size-components-sm));block-size:var(--ui-input-otp-cell-size-small, var(--size-components-sm));font-size:var(--ui-input-otp-font-size-small, var(--size-typography-text-md))}:host._large .ui-input-otp-cell{inline-size:var(--ui-input-otp-cell-size-large, var(--size-components-xl));block-size:var(--ui-input-otp-cell-size-large, var(--size-components-xl));font-size:var(--ui-input-otp-font-size-large, var(--size-typography-text-lg))}@keyframes ui-browser-fill{0%{opacity:1}}.ui-browser-fill:-webkit-autofill{animation:ui-browser-fill 0s}.ui-input-otp-cell{--_stroke: var(--ui-input-otp-cell-stroke, var(--form-high-stroke-default));--_stroke-hover: var(--ui-input-otp-cell-stroke-hover, var(--form-high-stroke-hover));--_stroke-focus: var(--ui-input-otp-cell-stroke-focus, var(--form-high-stroke-focused));box-sizing:border-box;min-inline-size:0;margin:0;padding:0;border:var(--ui-input-otp-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--_stroke);border-radius:var(--ui-input-otp-radius, var(--ui-form-field-radius, var(--radius-sm)));background-color:var(--ui-input-otp-cell-surface, var(--form-high-surface-default));color:var(--ui-input-otp-cell-color, var(--form-high-content-default));font-family:inherit;font-weight:var(--ui-input-otp-weight, var(--weight-bold));text-align:center;caret-color:var(--ui-input-otp-cell-color, var(--form-high-content-default));transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-input-otp-cell:hover:not(:disabled):not(:focus){border-color:var(--_stroke-hover)}.ui-input-otp-cell:focus,.ui-input-otp-cell:focus-visible{outline:none;border-color:var(--_stroke-focus);box-shadow:0 0 0 var(--ui-input-otp-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--_stroke-focus) r g b/50%)}.ui-input-otp-cell:disabled{border-color:var(--ui-input-otp-cell-stroke-disabled, var(--form-high-stroke-disabled));background-color:var(--ui-input-otp-cell-surface-disabled, var(--form-high-surface-disabled));color:var(--ui-input-otp-cell-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}:host._readonly .ui-input-otp-cell{cursor:default}:host._invalid .ui-input-otp-cell{--_stroke: var(--ui-input-otp-cell-stroke-invalid, var(--form-error-stroke-default));--_stroke-hover: var(--ui-input-otp-cell-stroke-hover-invalid, var(--form-error-stroke-hover));--_stroke-focus: var(--ui-input-otp-cell-stroke-focus-invalid, var(--form-error-stroke-focused))}\n"]
334
+ }]
335
+ }],
336
+ ctorParameters: () => [],
337
+ propDecorators: {
338
+ length: [{
339
+ type: i0.Input,
340
+ args: [{
341
+ isSignal: true,
342
+ alias: "length",
343
+ required: false
344
+ }]
345
+ }],
346
+ mask: [{
347
+ type: i0.Input,
348
+ args: [{
349
+ isSignal: true,
350
+ alias: "mask",
351
+ required: false
352
+ }]
353
+ }],
354
+ integerOnly: [{
355
+ type: i0.Input,
356
+ args: [{
357
+ isSignal: true,
358
+ alias: "integerOnly",
359
+ required: false
360
+ }]
361
+ }],
362
+ size: [{
363
+ type: i0.Input,
364
+ args: [{
365
+ isSignal: true,
366
+ alias: "size",
367
+ required: false
368
+ }]
369
+ }],
370
+ charAriaLabel: [{
371
+ type: i0.Input,
372
+ args: [{
373
+ isSignal: true,
374
+ alias: "charAriaLabel",
375
+ required: false
376
+ }]
377
+ }],
378
+ autofocus: [{
379
+ type: i0.Input,
380
+ args: [{
381
+ isSignal: true,
382
+ alias: "autofocus",
383
+ required: false
384
+ }]
385
+ }],
386
+ valueChange: [{
387
+ type: i0.Output,
388
+ args: ["valueChange"]
389
+ }],
390
+ completed: [{
391
+ type: i0.Output,
392
+ args: ["completed"]
393
+ }],
394
+ inputTemplate: [{
395
+ type: i0.ContentChild,
396
+ args: ["input", { isSignal: true }]
397
+ }]
398
+ }
399
+ });
312
400
  export { UiInputOtp };
313
- //# sourceMappingURL=4sh-ui-kit-forms-ui-input-otp.mjs.map
401
+
402
+ //# sourceMappingURL=4sh-ui-kit-forms-ui-input-otp.mjs.map