@12-apps/ui 6.100.0 → 6.101.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 (367) hide show
  1. package/NATIVE.md +2 -1
  2. package/components-catalog.md +2 -1
  3. package/dist/_internal/components/data-display/Alert/Alert.content.js +2 -2
  4. package/dist/_internal/components/data-display/Alert/Alert.js +4 -4
  5. package/dist/_internal/components/data-display/Avatar/Avatar.js +2 -2
  6. package/dist/_internal/components/data-display/Badge/Badge.js +2 -2
  7. package/dist/_internal/components/data-display/CardKit/card-actions-context.js +5 -5
  8. package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +6 -6
  9. package/dist/_internal/components/data-display/Carousel/Carousel.js +3 -3
  10. package/dist/_internal/components/data-display/Chart/Chart.js +4 -4
  11. package/dist/_internal/components/data-display/Chart/SpecChart.js +6 -6
  12. package/dist/_internal/components/data-display/Chart/chart-context.js +2 -2
  13. package/dist/_internal/components/data-display/Chart/chart-renderers.js +3 -3
  14. package/dist/_internal/components/data-display/DataGrid/DataGrid.js +3 -3
  15. package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +45 -45
  16. package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +60 -60
  17. package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +4 -4
  18. package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +4 -4
  19. package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +4 -4
  20. package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +4 -4
  21. package/dist/_internal/components/data-display/DataViews/base-list-card-layout.js +4 -4
  22. package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +3 -3
  23. package/dist/_internal/components/data-display/DataViews/base-list-card.js +5 -5
  24. package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +8 -8
  25. package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +1 -1
  26. package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +20 -20
  27. package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +9 -9
  28. package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +42 -42
  29. package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +24 -24
  30. package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +21 -21
  31. package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +22 -22
  32. package/dist/_internal/components/data-display/DataViews/data-views-range-bounds.js +9 -9
  33. package/dist/_internal/components/data-display/DataViews/data-views-range-calendar.js +6 -6
  34. package/dist/_internal/components/data-display/DataViews/data-views-range-pill.js +11 -11
  35. package/dist/_internal/components/data-display/DataViews/data-views-scope-tabs.js +2 -2
  36. package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +4 -4
  37. package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +10 -10
  38. package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +3 -3
  39. package/dist/_internal/components/data-display/DataViews/list-card-rails.js +3 -3
  40. package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +2 -2
  41. package/dist/_internal/components/data-display/DayRuler/DayRuler.footer.js +3 -3
  42. package/dist/_internal/components/data-display/DayRuler/DayRuler.js +10 -10
  43. package/dist/_internal/components/data-display/DayRuler/DayRuler.keyboard.js +2 -2
  44. package/dist/_internal/components/data-display/DayRuler/DayRuler.labels.js +2 -2
  45. package/dist/_internal/components/data-display/DayRuler/DayRuler.parts.js +3 -3
  46. package/dist/_internal/components/data-display/DayRuler/useRulerDrag.js +2 -2
  47. package/dist/_internal/components/data-display/FleetMap/FleetBody.js +10 -10
  48. package/dist/_internal/components/data-display/FleetMap/FleetCanvas.js +9 -9
  49. package/dist/_internal/components/data-display/FleetMap/FleetMap.js +12 -12
  50. package/dist/_internal/components/data-display/HoverCard/HoverCard.js +2 -2
  51. package/dist/_internal/components/data-display/Lightbox/Lightbox.js +7 -7
  52. package/dist/_internal/components/data-display/Lightbox/LightboxControls.js +2 -2
  53. package/dist/_internal/components/data-display/Lightbox/LightboxOverlay.js +3 -3
  54. package/dist/_internal/components/data-display/Lightbox/LightboxThumbnails.js +2 -2
  55. package/dist/_internal/components/data-display/MapPreview/MapLayers.js +3 -3
  56. package/dist/_internal/components/data-display/MapPreview/MapMarkers.js +2 -2
  57. package/dist/_internal/components/data-display/MapPreview/MapPreview.js +8 -8
  58. package/dist/_internal/components/data-display/Progress/Progress.js +2 -2
  59. package/dist/_internal/components/data-display/RegionMap/RegionMap.js +1 -1
  60. package/dist/_internal/components/data-display/ScheduleGrid/ScheduleGrid.js +8 -8
  61. package/dist/_internal/components/data-display/ScheduleGrid/ScheduleGrid.parts.js +3 -3
  62. package/dist/_internal/components/data-display/Sheet/Sheet.js +2 -2
  63. package/dist/_internal/components/data-display/Table/Table.js +3 -3
  64. package/dist/_internal/components/data-display/index.js +72 -72
  65. package/dist/_internal/components/feedback/Dialog/Dialog.js +3 -3
  66. package/dist/_internal/components/feedback/Modal/Modal.js +2 -2
  67. package/dist/_internal/components/feedback/NotificationStatusNotice/NotificationStatusNotice.js +5 -5
  68. package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.frame.js +8 -8
  69. package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.header.js +4 -4
  70. package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.js +16 -16
  71. package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.overview.js +6 -6
  72. package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.parts.js +5 -5
  73. package/dist/_internal/components/feedback/TutorialOverlay/TutorialOverlay.js +2 -2
  74. package/dist/_internal/components/feedback/UsableModal/UsableModal.js +1 -1
  75. package/dist/_internal/components/feedback/UsableModal/UsableModal.sheet.js +2 -2
  76. package/dist/_internal/components/feedback/index.js +21 -21
  77. package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.hooks.js +2 -2
  78. package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.js +7 -7
  79. package/dist/_internal/components/form/AddressAutocomplete/AddressAutocompleteField.js +2 -2
  80. package/dist/_internal/components/form/Autocomplete/Autocomplete.js +1 -1
  81. package/dist/_internal/components/form/Calendar/Calendar.js +5 -5
  82. package/dist/_internal/components/form/Calendar/CalendarSelectorsMonth.js +3 -3
  83. package/dist/_internal/components/form/CategorySelect/CategoryPanel.js +4 -4
  84. package/dist/_internal/components/form/CategorySelect/CategorySelect.js +7 -7
  85. package/dist/_internal/components/form/CodeEditor/CodeEditor.js +2 -2
  86. package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +8 -8
  87. package/dist/_internal/components/form/InputOTP/InputOTP.base.js +1 -0
  88. package/dist/_internal/components/form/InputOTP/InputOTP.base.js.map +1 -0
  89. package/dist/_internal/components/form/InputOTP/InputOTP.core.js +16 -0
  90. package/dist/_internal/components/form/InputOTP/InputOTP.core.js.map +1 -0
  91. package/dist/_internal/components/form/InputOTP/InputOTP.hooks.js +2 -1
  92. package/dist/_internal/components/form/InputOTP/InputOTP.js +5 -3
  93. package/dist/_internal/components/form/InputOTP/InputOTP.metrics.js +12 -0
  94. package/dist/_internal/components/form/InputOTP/InputOTP.metrics.js.map +1 -0
  95. package/dist/_internal/components/form/InputOTP/InputOTP.styles.js +2 -1
  96. package/dist/_internal/components/form/index.js +25 -23
  97. package/dist/_internal/components/form/total-form/Fields/CategoryField.js +8 -8
  98. package/dist/_internal/components/form/total-form/Fields/index.js +9 -9
  99. package/dist/_internal/components/index.js +120 -118
  100. package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +6 -6
  101. package/dist/_internal/components/navigation/SectionNav/SectionNav.bar.js +6 -6
  102. package/dist/_internal/components/navigation/SectionNav/SectionNav.js +9 -9
  103. package/dist/_internal/components/navigation/SectionNav/SectionNav.parts.js +3 -3
  104. package/dist/_internal/components/navigation/SectionNav/SectionNav.primary.js +4 -4
  105. package/dist/_internal/components/navigation/SectionNav/SectionNav.rail.js +5 -5
  106. package/dist/_internal/components/navigation/SectionNav/SectionNav.railCreate.js +4 -4
  107. package/dist/_internal/components/navigation/SectionNav/SectionNav.sheet.js +4 -4
  108. package/dist/_internal/components/navigation/index.js +15 -15
  109. package/dist/_internal/user-avatar/user-avatar.js +3 -3
  110. package/dist/charts.js +6 -6
  111. package/dist/{chunk-37MJZLQU.js → chunk-24OFA44S.js} +4 -4
  112. package/dist/{chunk-R775ISK6.js → chunk-2L6TANRY.js} +5 -5
  113. package/dist/{chunk-B4OZU7J4.js → chunk-423A7NUP.js} +7 -7
  114. package/dist/{chunk-LFECE4R7.js → chunk-4EDCF7TC.js} +2 -2
  115. package/dist/{chunk-HI7JPDD6.js → chunk-5357QUVE.js} +2 -2
  116. package/dist/{chunk-F7JRQ2EI.js → chunk-5YX2VQFP.js} +7 -7
  117. package/dist/{chunk-QZOQVJ5L.js → chunk-645GGNTW.js} +3 -3
  118. package/dist/{chunk-N5PVD4J5.js → chunk-6DO672AG.js} +7 -7
  119. package/dist/{chunk-PGJIWCQR.js → chunk-6EZQLNPK.js} +4 -4
  120. package/dist/{chunk-YQMJJ7AL.js → chunk-6G2RAZTS.js} +5 -5
  121. package/dist/{chunk-KNW63H63.js → chunk-6PQZIZMN.js} +5 -5
  122. package/dist/{chunk-FZZMNKVF.js → chunk-6TAPAIRR.js} +8 -8
  123. package/dist/{chunk-ERAMSYPR.js → chunk-7N4O632I.js} +2 -2
  124. package/dist/{chunk-XFOKLWJZ.js → chunk-7S5PXEO7.js} +2 -2
  125. package/dist/{chunk-UIJLDAV7.js → chunk-AA6YMOEK.js} +2 -2
  126. package/dist/{chunk-CRD2WCU7.js → chunk-AFWUQJ4P.js} +8 -8
  127. package/dist/{chunk-SNWCT6JN.js → chunk-AMIUZRDQ.js} +3 -3
  128. package/dist/{chunk-NQYC7V5N.js → chunk-BAYCMSMI.js} +5 -9
  129. package/dist/chunk-BAYCMSMI.js.map +1 -0
  130. package/dist/{chunk-3I7KE2N6.js → chunk-BNV7P52K.js} +2 -2
  131. package/dist/{chunk-64UNVW6D.js → chunk-BP3ZKIPE.js} +4 -4
  132. package/dist/{chunk-3V7OTBUZ.js → chunk-BQ2SFA27.js} +2 -2
  133. package/dist/{chunk-Q5SCBQLY.js → chunk-BXLC3TBQ.js} +8 -8
  134. package/dist/{chunk-Z5V5E3JW.js → chunk-COKPPU42.js} +11 -11
  135. package/dist/{chunk-QADTI63U.js → chunk-CZVAVX5L.js} +4 -4
  136. package/dist/{chunk-WDEVKND3.js → chunk-D2YJPZMU.js} +9 -9
  137. package/dist/{chunk-OA6T2ME3.js → chunk-DYHOBKPU.js} +5 -5
  138. package/dist/{chunk-6WAP7BJS.js → chunk-E6SPWZRN.js} +2 -2
  139. package/dist/{chunk-UTIYB6VE.js → chunk-E73PAU4U.js} +19 -19
  140. package/dist/{chunk-XR474YYX.js → chunk-EDVAFY76.js} +2 -2
  141. package/dist/{chunk-MEMVZW64.js → chunk-EPNZQWS4.js} +3 -3
  142. package/dist/{chunk-GZITNT7O.js → chunk-FGZIEZEP.js} +11 -11
  143. package/dist/{chunk-4X2TOMK6.js → chunk-FKUVFPQZ.js} +4 -4
  144. package/dist/{chunk-UN5WU2OX.js → chunk-GDWU7WF4.js} +4 -4
  145. package/dist/{chunk-643YFWNK.js → chunk-GPWDP5FF.js} +3 -3
  146. package/dist/{chunk-XA5ES25V.js → chunk-HKQWFICM.js} +2 -2
  147. package/dist/chunk-IH6DZXTG.js +22 -0
  148. package/dist/chunk-IH6DZXTG.js.map +1 -0
  149. package/dist/{chunk-255WTBZ5.js → chunk-IWSTMVCA.js} +4 -4
  150. package/dist/{chunk-TZC6KIK2.js → chunk-JG733RMP.js} +5 -5
  151. package/dist/{chunk-7MLT66DE.js → chunk-K33X3PDT.js} +2 -2
  152. package/dist/{chunk-K3PMMW23.js → chunk-K6VEN5VN.js} +4 -4
  153. package/dist/{chunk-HOWAMSUY.js → chunk-KAWVH3AA.js} +3 -3
  154. package/dist/{chunk-IJVBLU25.js → chunk-KJZ4PINO.js} +3 -3
  155. package/dist/{chunk-REHGWN5M.js → chunk-KXDLLS62.js} +4 -4
  156. package/dist/{chunk-YQ5GQ32T.js → chunk-KZP5YTE7.js} +2 -2
  157. package/dist/{chunk-3V3Z4EML.js → chunk-L4FWEI2P.js} +5 -5
  158. package/dist/{chunk-UKUGSU3Y.js → chunk-L4V7FZJI.js} +2 -2
  159. package/dist/{chunk-W56KN53D.js → chunk-L6IDPTNX.js} +6 -6
  160. package/dist/{chunk-24HHUCWB.js → chunk-LDCZPZPD.js} +2 -2
  161. package/dist/{chunk-KV7LTOWC.js → chunk-M225SD4H.js} +13 -13
  162. package/dist/{chunk-R6L376KR.js → chunk-M6R32IBO.js} +8 -13
  163. package/dist/chunk-M6R32IBO.js.map +1 -0
  164. package/dist/{chunk-FQMLTCXT.js → chunk-MAHY7PK3.js} +4 -4
  165. package/dist/{chunk-Z2J4MRTF.js → chunk-MKNW4FRR.js} +4 -4
  166. package/dist/{chunk-ILJ3FXIC.js → chunk-MM3QESLI.js} +2 -2
  167. package/dist/{chunk-FYJL432J.js → chunk-MQPUS773.js} +6 -6
  168. package/dist/{chunk-VRSW7PIO.js → chunk-NKBSWAP3.js} +4 -4
  169. package/dist/{chunk-ULC4SCFC.js → chunk-NLJ7LL6H.js} +4 -4
  170. package/dist/{chunk-RAQD5QCM.js → chunk-NQ6JP5CC.js} +6 -6
  171. package/dist/{chunk-IFOHCY4O.js → chunk-OF3KG5EV.js} +2 -2
  172. package/dist/{chunk-W676GY42.js → chunk-P772HCHI.js} +4 -4
  173. package/dist/{chunk-CWRQGA2T.js → chunk-POIENBXE.js} +7 -7
  174. package/dist/{chunk-FW5GTAUY.js → chunk-Q4AX4FOK.js} +11 -11
  175. package/dist/{chunk-XQAFSC66.js → chunk-Q4FNCT4C.js} +2 -2
  176. package/dist/{chunk-PIELY4BJ.js → chunk-Q5Z66LKI.js} +1 -1
  177. package/dist/{chunk-4Y3QLISA.js → chunk-Q7AONB4G.js} +4 -4
  178. package/dist/{chunk-EZBBLLEU.js → chunk-QQBYZ3B3.js} +4 -4
  179. package/dist/{chunk-FT3LJZWZ.js → chunk-RWUXMBSO.js} +4 -4
  180. package/dist/{chunk-KWBMM6MJ.js → chunk-RZKKWIGQ.js} +9 -9
  181. package/dist/{chunk-RVBLOR32.js → chunk-S7CXVIEF.js} +2 -2
  182. package/dist/{chunk-WLLUARTC.js → chunk-T2G4LDU5.js} +2 -2
  183. package/dist/{chunk-OFRQMFWD.js → chunk-T5D3DYVN.js} +2 -2
  184. package/dist/{chunk-O4UXH7BM.js → chunk-TP6KZ2YR.js} +7 -7
  185. package/dist/{chunk-HAWOS4SF.js → chunk-TPDN3B5T.js} +2 -2
  186. package/dist/{chunk-54DOLCJ3.js → chunk-TXIIJW6C.js} +5 -5
  187. package/dist/{chunk-HN36UVOE.js → chunk-U4Z6GZDW.js} +4 -4
  188. package/dist/{chunk-J2IQ6FJ5.js → chunk-UKLNLWTP.js} +3 -3
  189. package/dist/chunk-VAHJCRNW.js +17 -0
  190. package/dist/chunk-VAHJCRNW.js.map +1 -0
  191. package/dist/{chunk-MKHNLRVX.js → chunk-VPPD2AJN.js} +7 -7
  192. package/dist/{chunk-TIM4PXWN.js → chunk-VWRXSBT2.js} +2 -2
  193. package/dist/{chunk-KVP5A3YK.js → chunk-WDWZKTGA.js} +2 -2
  194. package/dist/{chunk-FYSS2PYA.js → chunk-WH5ZEBKS.js} +7 -7
  195. package/dist/{chunk-KAGXV3ID.js → chunk-WMMXOSZG.js} +7 -7
  196. package/dist/{chunk-4RSFYS2V.js → chunk-X6D5JEUV.js} +6 -6
  197. package/dist/{chunk-GFYDOH7D.js → chunk-XEPNAU3T.js} +2 -2
  198. package/dist/{chunk-VMACQT3T.js → chunk-XH7UDC5Y.js} +3 -3
  199. package/dist/{chunk-PDWQJFMK.js → chunk-XHMHHP7B.js} +10 -10
  200. package/dist/{chunk-SA3KLZDZ.js → chunk-XNAI7QGU.js} +5 -5
  201. package/dist/{chunk-7TENMQNQ.js → chunk-XZMSRHFD.js} +4 -4
  202. package/dist/{chunk-HBHBRRSW.js → chunk-YBAK2WN5.js} +7 -7
  203. package/dist/{chunk-QLKUWDMQ.js → chunk-YDJ5GAGL.js} +13 -13
  204. package/dist/{chunk-LOLYBFYY.js → chunk-ZCNR4DN5.js} +5 -5
  205. package/dist/data-display/Alert.js +4 -4
  206. package/dist/data-display/Avatar.js +2 -2
  207. package/dist/data-display/Badge.js +2 -2
  208. package/dist/data-display/CardKit.js +14 -14
  209. package/dist/data-display/Carousel.js +3 -3
  210. package/dist/data-display/Chart.js +6 -6
  211. package/dist/data-display/DataGrid.js +3 -3
  212. package/dist/data-display/DataViews.js +74 -74
  213. package/dist/data-display/DayRuler.js +12 -12
  214. package/dist/data-display/FleetMap.js +12 -12
  215. package/dist/data-display/HoverCard.js +2 -2
  216. package/dist/data-display/Lightbox.js +7 -7
  217. package/dist/data-display/MapPreview.js +8 -8
  218. package/dist/data-display/Progress.js +2 -2
  219. package/dist/data-display/RegionMap.js +4 -4
  220. package/dist/data-display/ScheduleGrid.js +10 -10
  221. package/dist/data-display/Sheet.js +2 -2
  222. package/dist/data-display/Table.js +3 -3
  223. package/dist/feedback/Dialog.js +3 -3
  224. package/dist/feedback/Modal.js +2 -2
  225. package/dist/feedback/NotificationStatusNotice.js +5 -5
  226. package/dist/feedback/SequenceResolver.js +16 -16
  227. package/dist/feedback/TutorialOverlay.js +2 -2
  228. package/dist/feedback/UsableModal.js +1 -1
  229. package/dist/form/AddressAutocomplete.js +7 -7
  230. package/dist/form/Autocomplete.js +1 -1
  231. package/dist/form/Calendar.js +5 -5
  232. package/dist/form/CategorySelect.js +7 -7
  233. package/dist/form/CodeEditor.js +2 -2
  234. package/dist/form/DateRangePicker.js +10 -10
  235. package/dist/form/InputOTP.js +5 -3
  236. package/dist/form/total-form.js +9 -9
  237. package/dist/native/form/InputOTP.js +192 -0
  238. package/dist/native/form/InputOTP.js.map +1 -0
  239. package/dist/navigation/AppHeader.js +6 -6
  240. package/dist/navigation/SectionNav.js +9 -9
  241. package/dist/types/components/form/InputOTP/InputOTP.base.d.ts +63 -0
  242. package/dist/types/components/form/InputOTP/InputOTP.base.d.ts.map +1 -0
  243. package/dist/types/components/form/InputOTP/InputOTP.core.d.ts +38 -0
  244. package/dist/types/components/form/InputOTP/InputOTP.core.d.ts.map +1 -0
  245. package/dist/types/components/form/InputOTP/InputOTP.d.ts +1 -2
  246. package/dist/types/components/form/InputOTP/InputOTP.d.ts.map +1 -1
  247. package/dist/types/components/form/InputOTP/InputOTP.hooks.d.ts.map +1 -1
  248. package/dist/types/components/form/InputOTP/InputOTP.metrics.d.ts +15 -0
  249. package/dist/types/components/form/InputOTP/InputOTP.metrics.d.ts.map +1 -0
  250. package/dist/types/components/form/InputOTP/InputOTP.styles.d.ts.map +1 -1
  251. package/dist/types/components/form/InputOTP/InputOTP.types.d.ts +3 -56
  252. package/dist/types/components/form/InputOTP/InputOTP.types.d.ts.map +1 -1
  253. package/dist/types-native/components/form/InputOTP/InputOTP.base.d.ts +63 -0
  254. package/dist/types-native/components/form/InputOTP/InputOTP.base.d.ts.map +1 -0
  255. package/dist/types-native/components/form/InputOTP/InputOTP.core.d.ts +38 -0
  256. package/dist/types-native/components/form/InputOTP/InputOTP.core.d.ts.map +1 -0
  257. package/dist/types-native/components/form/InputOTP/InputOTP.hooks.native.d.ts +28 -0
  258. package/dist/types-native/components/form/InputOTP/InputOTP.hooks.native.d.ts.map +1 -0
  259. package/dist/types-native/components/form/InputOTP/InputOTP.metrics.d.ts +15 -0
  260. package/dist/types-native/components/form/InputOTP/InputOTP.metrics.d.ts.map +1 -0
  261. package/dist/types-native/components/form/InputOTP/InputOTP.native.d.ts +14 -0
  262. package/dist/types-native/components/form/InputOTP/InputOTP.native.d.ts.map +1 -0
  263. package/dist/types-native/components/form/InputOTP/InputOTP.types.native.d.ts +14 -0
  264. package/dist/types-native/components/form/InputOTP/InputOTP.types.native.d.ts.map +1 -0
  265. package/dist/types-native/components/form/InputOTP/index.native.d.ts +3 -0
  266. package/dist/types-native/components/form/InputOTP/index.native.d.ts.map +1 -0
  267. package/dist/user-avatar.js +3 -3
  268. package/package.json +5 -1
  269. package/src/components/form/InputOTP/InputOTP.base.ts +76 -0
  270. package/src/components/form/InputOTP/InputOTP.core.ts +51 -0
  271. package/src/components/form/InputOTP/InputOTP.hooks.native.ts +84 -0
  272. package/src/components/form/InputOTP/InputOTP.hooks.ts +1 -46
  273. package/src/components/form/InputOTP/InputOTP.metrics.ts +19 -0
  274. package/src/components/form/InputOTP/InputOTP.native.tsx +154 -0
  275. package/src/components/form/InputOTP/InputOTP.styles.ts +4 -11
  276. package/src/components/form/InputOTP/InputOTP.types.native.ts +15 -0
  277. package/src/components/form/InputOTP/InputOTP.types.ts +3 -68
  278. package/src/components/form/InputOTP/NATIVE-NOTES.md +8 -0
  279. package/src/components/form/InputOTP/index.native.ts +2 -0
  280. package/dist/chunk-NQYC7V5N.js.map +0 -1
  281. package/dist/chunk-R6L376KR.js.map +0 -1
  282. /package/dist/{chunk-37MJZLQU.js.map → chunk-24OFA44S.js.map} +0 -0
  283. /package/dist/{chunk-R775ISK6.js.map → chunk-2L6TANRY.js.map} +0 -0
  284. /package/dist/{chunk-B4OZU7J4.js.map → chunk-423A7NUP.js.map} +0 -0
  285. /package/dist/{chunk-LFECE4R7.js.map → chunk-4EDCF7TC.js.map} +0 -0
  286. /package/dist/{chunk-HI7JPDD6.js.map → chunk-5357QUVE.js.map} +0 -0
  287. /package/dist/{chunk-F7JRQ2EI.js.map → chunk-5YX2VQFP.js.map} +0 -0
  288. /package/dist/{chunk-QZOQVJ5L.js.map → chunk-645GGNTW.js.map} +0 -0
  289. /package/dist/{chunk-N5PVD4J5.js.map → chunk-6DO672AG.js.map} +0 -0
  290. /package/dist/{chunk-PGJIWCQR.js.map → chunk-6EZQLNPK.js.map} +0 -0
  291. /package/dist/{chunk-YQMJJ7AL.js.map → chunk-6G2RAZTS.js.map} +0 -0
  292. /package/dist/{chunk-KNW63H63.js.map → chunk-6PQZIZMN.js.map} +0 -0
  293. /package/dist/{chunk-FZZMNKVF.js.map → chunk-6TAPAIRR.js.map} +0 -0
  294. /package/dist/{chunk-ERAMSYPR.js.map → chunk-7N4O632I.js.map} +0 -0
  295. /package/dist/{chunk-XFOKLWJZ.js.map → chunk-7S5PXEO7.js.map} +0 -0
  296. /package/dist/{chunk-UIJLDAV7.js.map → chunk-AA6YMOEK.js.map} +0 -0
  297. /package/dist/{chunk-CRD2WCU7.js.map → chunk-AFWUQJ4P.js.map} +0 -0
  298. /package/dist/{chunk-SNWCT6JN.js.map → chunk-AMIUZRDQ.js.map} +0 -0
  299. /package/dist/{chunk-3I7KE2N6.js.map → chunk-BNV7P52K.js.map} +0 -0
  300. /package/dist/{chunk-64UNVW6D.js.map → chunk-BP3ZKIPE.js.map} +0 -0
  301. /package/dist/{chunk-3V7OTBUZ.js.map → chunk-BQ2SFA27.js.map} +0 -0
  302. /package/dist/{chunk-Q5SCBQLY.js.map → chunk-BXLC3TBQ.js.map} +0 -0
  303. /package/dist/{chunk-Z5V5E3JW.js.map → chunk-COKPPU42.js.map} +0 -0
  304. /package/dist/{chunk-QADTI63U.js.map → chunk-CZVAVX5L.js.map} +0 -0
  305. /package/dist/{chunk-WDEVKND3.js.map → chunk-D2YJPZMU.js.map} +0 -0
  306. /package/dist/{chunk-OA6T2ME3.js.map → chunk-DYHOBKPU.js.map} +0 -0
  307. /package/dist/{chunk-6WAP7BJS.js.map → chunk-E6SPWZRN.js.map} +0 -0
  308. /package/dist/{chunk-UTIYB6VE.js.map → chunk-E73PAU4U.js.map} +0 -0
  309. /package/dist/{chunk-XR474YYX.js.map → chunk-EDVAFY76.js.map} +0 -0
  310. /package/dist/{chunk-MEMVZW64.js.map → chunk-EPNZQWS4.js.map} +0 -0
  311. /package/dist/{chunk-GZITNT7O.js.map → chunk-FGZIEZEP.js.map} +0 -0
  312. /package/dist/{chunk-4X2TOMK6.js.map → chunk-FKUVFPQZ.js.map} +0 -0
  313. /package/dist/{chunk-UN5WU2OX.js.map → chunk-GDWU7WF4.js.map} +0 -0
  314. /package/dist/{chunk-643YFWNK.js.map → chunk-GPWDP5FF.js.map} +0 -0
  315. /package/dist/{chunk-XA5ES25V.js.map → chunk-HKQWFICM.js.map} +0 -0
  316. /package/dist/{chunk-255WTBZ5.js.map → chunk-IWSTMVCA.js.map} +0 -0
  317. /package/dist/{chunk-TZC6KIK2.js.map → chunk-JG733RMP.js.map} +0 -0
  318. /package/dist/{chunk-7MLT66DE.js.map → chunk-K33X3PDT.js.map} +0 -0
  319. /package/dist/{chunk-K3PMMW23.js.map → chunk-K6VEN5VN.js.map} +0 -0
  320. /package/dist/{chunk-HOWAMSUY.js.map → chunk-KAWVH3AA.js.map} +0 -0
  321. /package/dist/{chunk-IJVBLU25.js.map → chunk-KJZ4PINO.js.map} +0 -0
  322. /package/dist/{chunk-REHGWN5M.js.map → chunk-KXDLLS62.js.map} +0 -0
  323. /package/dist/{chunk-YQ5GQ32T.js.map → chunk-KZP5YTE7.js.map} +0 -0
  324. /package/dist/{chunk-3V3Z4EML.js.map → chunk-L4FWEI2P.js.map} +0 -0
  325. /package/dist/{chunk-UKUGSU3Y.js.map → chunk-L4V7FZJI.js.map} +0 -0
  326. /package/dist/{chunk-W56KN53D.js.map → chunk-L6IDPTNX.js.map} +0 -0
  327. /package/dist/{chunk-24HHUCWB.js.map → chunk-LDCZPZPD.js.map} +0 -0
  328. /package/dist/{chunk-KV7LTOWC.js.map → chunk-M225SD4H.js.map} +0 -0
  329. /package/dist/{chunk-FQMLTCXT.js.map → chunk-MAHY7PK3.js.map} +0 -0
  330. /package/dist/{chunk-Z2J4MRTF.js.map → chunk-MKNW4FRR.js.map} +0 -0
  331. /package/dist/{chunk-ILJ3FXIC.js.map → chunk-MM3QESLI.js.map} +0 -0
  332. /package/dist/{chunk-FYJL432J.js.map → chunk-MQPUS773.js.map} +0 -0
  333. /package/dist/{chunk-VRSW7PIO.js.map → chunk-NKBSWAP3.js.map} +0 -0
  334. /package/dist/{chunk-ULC4SCFC.js.map → chunk-NLJ7LL6H.js.map} +0 -0
  335. /package/dist/{chunk-RAQD5QCM.js.map → chunk-NQ6JP5CC.js.map} +0 -0
  336. /package/dist/{chunk-IFOHCY4O.js.map → chunk-OF3KG5EV.js.map} +0 -0
  337. /package/dist/{chunk-W676GY42.js.map → chunk-P772HCHI.js.map} +0 -0
  338. /package/dist/{chunk-CWRQGA2T.js.map → chunk-POIENBXE.js.map} +0 -0
  339. /package/dist/{chunk-FW5GTAUY.js.map → chunk-Q4AX4FOK.js.map} +0 -0
  340. /package/dist/{chunk-XQAFSC66.js.map → chunk-Q4FNCT4C.js.map} +0 -0
  341. /package/dist/{chunk-PIELY4BJ.js.map → chunk-Q5Z66LKI.js.map} +0 -0
  342. /package/dist/{chunk-4Y3QLISA.js.map → chunk-Q7AONB4G.js.map} +0 -0
  343. /package/dist/{chunk-EZBBLLEU.js.map → chunk-QQBYZ3B3.js.map} +0 -0
  344. /package/dist/{chunk-FT3LJZWZ.js.map → chunk-RWUXMBSO.js.map} +0 -0
  345. /package/dist/{chunk-KWBMM6MJ.js.map → chunk-RZKKWIGQ.js.map} +0 -0
  346. /package/dist/{chunk-RVBLOR32.js.map → chunk-S7CXVIEF.js.map} +0 -0
  347. /package/dist/{chunk-WLLUARTC.js.map → chunk-T2G4LDU5.js.map} +0 -0
  348. /package/dist/{chunk-OFRQMFWD.js.map → chunk-T5D3DYVN.js.map} +0 -0
  349. /package/dist/{chunk-O4UXH7BM.js.map → chunk-TP6KZ2YR.js.map} +0 -0
  350. /package/dist/{chunk-HAWOS4SF.js.map → chunk-TPDN3B5T.js.map} +0 -0
  351. /package/dist/{chunk-54DOLCJ3.js.map → chunk-TXIIJW6C.js.map} +0 -0
  352. /package/dist/{chunk-HN36UVOE.js.map → chunk-U4Z6GZDW.js.map} +0 -0
  353. /package/dist/{chunk-J2IQ6FJ5.js.map → chunk-UKLNLWTP.js.map} +0 -0
  354. /package/dist/{chunk-MKHNLRVX.js.map → chunk-VPPD2AJN.js.map} +0 -0
  355. /package/dist/{chunk-TIM4PXWN.js.map → chunk-VWRXSBT2.js.map} +0 -0
  356. /package/dist/{chunk-KVP5A3YK.js.map → chunk-WDWZKTGA.js.map} +0 -0
  357. /package/dist/{chunk-FYSS2PYA.js.map → chunk-WH5ZEBKS.js.map} +0 -0
  358. /package/dist/{chunk-KAGXV3ID.js.map → chunk-WMMXOSZG.js.map} +0 -0
  359. /package/dist/{chunk-4RSFYS2V.js.map → chunk-X6D5JEUV.js.map} +0 -0
  360. /package/dist/{chunk-GFYDOH7D.js.map → chunk-XEPNAU3T.js.map} +0 -0
  361. /package/dist/{chunk-VMACQT3T.js.map → chunk-XH7UDC5Y.js.map} +0 -0
  362. /package/dist/{chunk-PDWQJFMK.js.map → chunk-XHMHHP7B.js.map} +0 -0
  363. /package/dist/{chunk-SA3KLZDZ.js.map → chunk-XNAI7QGU.js.map} +0 -0
  364. /package/dist/{chunk-7TENMQNQ.js.map → chunk-XZMSRHFD.js.map} +0 -0
  365. /package/dist/{chunk-HBHBRRSW.js.map → chunk-YBAK2WN5.js.map} +0 -0
  366. /package/dist/{chunk-QLKUWDMQ.js.map → chunk-YDJ5GAGL.js.map} +0 -0
  367. /package/dist/{chunk-LOLYBFYY.js.map → chunk-ZCNR4DN5.js.map} +0 -0
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The numbers both renderers read (see `NATIVE.md`, "Numbers").
3
+ *
4
+ * Each box's type size, in design px, per size step; its side is the theme's
5
+ * field height for that step (a square), its weight 600.
6
+ */
7
+ export declare const OTP_FONT_PX: Record<'xs' | 'sm' | 'md' | 'lg' | 'xl', number>;
8
+ /** The gap between two boxes: MUI's `gap: 1`, one 8px spacing unit. */
9
+ export declare const OTP_GAP_PX = 8;
10
+ /** The border: 1px at rest, 2px focused (MUI's focused outline). */
11
+ export declare const OTP_BORDER: {
12
+ readonly rest: 1;
13
+ readonly focused: 2;
14
+ };
15
+ //# sourceMappingURL=InputOTP.metrics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputOTP.metrics.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/InputOTP/InputOTP.metrics.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,EAAE,MAAM,CAMxE,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,UAAU,IAAI,CAAC;AAE5B,oEAAoE;AACpE,eAAO,MAAM,UAAU;;;CAAmC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"InputOTP.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/InputOTP/InputOTP.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AA2DtE,MAAM,WAAW,YAAY;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,SAAS,GAAI,OAAO,KAAK,EAAE,OAAO,YAAY,KAAG,SAkC7D,CAAC"}
1
+ {"version":3,"file":"InputOTP.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/InputOTP/InputOTP.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAoDtE,MAAM,WAAW,YAAY;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,SAAS,GAAI,OAAO,KAAK,EAAE,OAAO,YAAY,KAAG,SAkC7D,CAAC"}
@@ -1,57 +1,4 @@
1
- import type { ColorValue, SizeValue } from '../../../tokens/scales';
2
- export interface InputOTPProps {
3
- /**
4
- * The variant of the OTP input
5
- */
6
- variant?: 'numeric' | 'alphanumeric' | 'masked';
7
- /**
8
- * The color theme of the OTP input
9
- */
10
- color?: ColorValue;
11
- /**
12
- * The size of the OTP input
13
- */
14
- size?: SizeValue;
15
- /**
16
- * Number of OTP digits
17
- */
18
- length?: number;
19
- /**
20
- * Current value
21
- */
22
- value?: string;
23
- /**
24
- * Called when value changes
25
- */
26
- onChange?: (value: string) => void;
27
- /**
28
- * Called when OTP is complete
29
- */
30
- onComplete?: (value: string) => void;
31
- /**
32
- * Whether the input should have glass morphism effect
33
- */
34
- glass?: boolean;
35
- /**
36
- * Whether the input should have gradient effects
37
- */
38
- gradient?: boolean;
39
- /**
40
- * Whether to auto-focus first input
41
- */
42
- autoFocus?: boolean;
43
- /**
44
- * Error state
45
- */
46
- error?: boolean;
47
- /**
48
- * Disabled state
49
- */
50
- disabled?: boolean;
51
- /**
52
- * Test ID for automated testing
53
- * Container will have this ID, and individual slots will have {dataTestId}-slot-{index}
54
- */
55
- dataTestId?: string;
56
- }
1
+ import type { InputOTPBaseProps } from './InputOTP.base';
2
+ /** The web `InputOTP`'s props: the shared contract, nothing MUI adds. */
3
+ export type InputOTPProps = InputOTPBaseProps;
57
4
  //# sourceMappingURL=InputOTP.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InputOTP.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/InputOTP/InputOTP.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEpE,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,cAAc,GAAG,QAAQ,CAAC;IAEhD;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEnC;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAErC;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
1
+ {"version":3,"file":"InputOTP.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/InputOTP/InputOTP.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,yEAAyE;AACzE,MAAM,MAAM,aAAa,GAAG,iBAAiB,CAAC"}
@@ -0,0 +1,63 @@
1
+ import type { ColorValue, SizeValue } from '../../../tokens/vocabulary';
2
+ /**
3
+ * THE CONTRACT BOTH RENDERERS HONOUR (see `Button.base.ts`).
4
+ *
5
+ * No MUI and no react-native here: this file ships in both declaration
6
+ * outputs, and a native consumer has no `@mui/material` to resolve against.
7
+ */
8
+ export interface InputOTPBaseProps {
9
+ /**
10
+ * The variant of the OTP input
11
+ */
12
+ variant?: 'numeric' | 'alphanumeric' | 'masked';
13
+ /**
14
+ * The color theme of the OTP input
15
+ */
16
+ color?: ColorValue;
17
+ /**
18
+ * The size of the OTP input
19
+ */
20
+ size?: SizeValue;
21
+ /**
22
+ * Number of OTP digits
23
+ */
24
+ length?: number;
25
+ /**
26
+ * Current value
27
+ */
28
+ value?: string;
29
+ /**
30
+ * Called when value changes
31
+ */
32
+ onChange?: (value: string) => void;
33
+ /**
34
+ * Called when OTP is complete
35
+ */
36
+ onComplete?: (value: string) => void;
37
+ /**
38
+ * Whether the input should have glass morphism effect
39
+ */
40
+ glass?: boolean;
41
+ /**
42
+ * Whether the input should have gradient effects
43
+ */
44
+ gradient?: boolean;
45
+ /**
46
+ * Whether to auto-focus first input
47
+ */
48
+ autoFocus?: boolean;
49
+ /**
50
+ * Error state
51
+ */
52
+ error?: boolean;
53
+ /**
54
+ * Disabled state
55
+ */
56
+ disabled?: boolean;
57
+ /**
58
+ * Test ID for automated testing
59
+ * Container will have this ID, and individual slots will have {dataTestId}-slot-{index}
60
+ */
61
+ dataTestId?: string;
62
+ }
63
+ //# sourceMappingURL=InputOTP.base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputOTP.base.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/InputOTP/InputOTP.base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAExE;;;;;GAKG;AAEH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,cAAc,GAAG,QAAQ,CAAC;IAEhD;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEnC;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAErC;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * The digits' arithmetic, shared by both renderers' hooks (`InputOTP.hooks.ts`
3
+ * on the web, `InputOTP.hooks.native.ts` on React Native). Pure: no React, no
4
+ * DOM, no react-native.
5
+ */
6
+ /**
7
+ * What each variant accepts. `masked` constrains nothing — it only changes what
8
+ * is drawn — so it has no pattern here.
9
+ */
10
+ export declare const PATTERNS: Record<string, RegExp>;
11
+ /** Whether `text` is something this variant will take. */
12
+ export declare const isAllowed: (variant: string, text: string) => boolean;
13
+ /** The digit array is always `length` long, blank-padded on the right. */
14
+ export declare const padTo: (digits: string[], length: number) => string[];
15
+ /**
16
+ * What a change to the numeric FIRST slot is, now that its `maxLength` is the
17
+ * code's length rather than 1 (FUT-4144).
18
+ *
19
+ * That slot carries `one-time-code`, and the phone's SMS fill (or a password
20
+ * manager) writes the WHOLE code into it as one change, not a paste — kept to
21
+ * one character, the code lost every digit but the last. So:
22
+ *
23
+ * - `overtype`: a keystroke into the already-filled slot (its old character
24
+ * plus the new one). Ignored, exactly as `maxLength={1}` refused it before.
25
+ * - `code`: anything else longer than one character, written in one go.
26
+ * Spread across the slots like a paste.
27
+ *
28
+ * Every other slot and variant keeps `maxLength={1}` and never gets here.
29
+ */
30
+ export declare function firstSlotFill(variant: string, index: number, inputValue: string, current: string): "overtype" | "code" | null;
31
+ /**
32
+ * The code inside a first-slot fill. A phone that INSERTS the SMS code at the
33
+ * caret rather than replacing the slot leaves the digit already there in
34
+ * front: `4` + `482913` arrives as `4482913`, which spread as-is would give
35
+ * `448291`. Longer than the code and led by that digit: the digit is dropped.
36
+ */
37
+ export declare const codeOfFill: (inputValue: string, current: string, length: number) => string;
38
+ //# sourceMappingURL=InputOTP.core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputOTP.core.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/InputOTP/InputOTP.core.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAG3C,CAAC;AAEF,0DAA0D;AAC1D,eAAO,MAAM,SAAS,GAAI,SAAS,MAAM,EAAE,MAAM,MAAM,YAA2C,CAAC;AAEnG,0EAA0E;AAC1E,eAAO,MAAM,KAAK,GAAI,QAAQ,MAAM,EAAE,EAAE,QAAQ,MAAM,aACH,CAAC;AAEpD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,8BAIhG;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,YAAY,MAAM,EAAE,SAAS,MAAM,EAAE,QAAQ,MAAM,KAAG,MACkC,CAAC"}
@@ -0,0 +1,28 @@
1
+ /** What a box needs from the element behind it: to take the focus. */
2
+ interface Focusable {
3
+ focus: () => void;
4
+ }
5
+ interface NativeOtpInput {
6
+ variant: string;
7
+ length: number;
8
+ value: string;
9
+ onChange?: (value: string) => void;
10
+ onComplete?: (value: string) => void;
11
+ }
12
+ /**
13
+ * The native boxes' digits — the web hook's rules (`InputOTP.hooks.ts`) over
14
+ * React Native's events: `onChangeText` carries the box's whole new text and
15
+ * `onKeyPress` carries only the key's name, and there is no paste event at
16
+ * all. A pasted or SMS-filled code arrives as a change of the FIRST box, whose
17
+ * `maxLength` is the code's length plus one for exactly that reason, and is
18
+ * spread across the boxes by the same `firstSlotFill` / `codeOfFill` the web
19
+ * uses.
20
+ */
21
+ export declare const useNativeOtpDigits: ({ variant, length, value, onChange, onComplete }: NativeOtpInput) => {
22
+ digits: string[];
23
+ boxRefs: import("react").RefObject<(Focusable | null)[]>;
24
+ handleChangeText: (index: number, text: string) => void;
25
+ handleKey: (index: number, key: string) => void;
26
+ };
27
+ export {};
28
+ //# sourceMappingURL=InputOTP.hooks.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputOTP.hooks.native.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/InputOTP/InputOTP.hooks.native.ts"],"names":[],"mappings":"AAIA,sEAAsE;AACtE,UAAU,SAAS;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,UAAU,cAAc;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,GAAI,kDAAkD,cAAc;;;8BA+BvF,MAAM,QAAQ,MAAM;uBAmBpB,MAAM,OAAO,MAAM;CAO9B,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The numbers both renderers read (see `NATIVE.md`, "Numbers").
3
+ *
4
+ * Each box's type size, in design px, per size step; its side is the theme's
5
+ * field height for that step (a square), its weight 600.
6
+ */
7
+ export declare const OTP_FONT_PX: Record<'xs' | 'sm' | 'md' | 'lg' | 'xl', number>;
8
+ /** The gap between two boxes: MUI's `gap: 1`, one 8px spacing unit. */
9
+ export declare const OTP_GAP_PX = 8;
10
+ /** The border: 1px at rest, 2px focused (MUI's focused outline). */
11
+ export declare const OTP_BORDER: {
12
+ readonly rest: 1;
13
+ readonly focused: 2;
14
+ };
15
+ //# sourceMappingURL=InputOTP.metrics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputOTP.metrics.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/InputOTP/InputOTP.metrics.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,EAAE,MAAM,CAMxE,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,UAAU,IAAI,CAAC;AAE5B,oEAAoE;AACpE,eAAO,MAAM,UAAU;;;CAAmC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import { View } from 'react-native';
3
+ import type { InputOTPProps } from './InputOTP.types.native';
4
+ /**
5
+ * The native `InputOTP`: one row of boxes, one character each, that moves
6
+ * forward as it is typed, steps back on Backspace in an empty box, and spreads
7
+ * a code the phone fills (or a paste) across every box from the first.
8
+ *
9
+ * The same props as the web one; the row is a `group` named by `aria-label`,
10
+ * each box is `${dataTestId}-slot-${index}`. Gaps against the web:
11
+ * `NATIVE-NOTES.md`.
12
+ */
13
+ export declare const InputOTP: React.ForwardRefExoticComponent<InputOTPProps & React.RefAttributes<View>>;
14
+ //# sourceMappingURL=InputOTP.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputOTP.native.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/InputOTP/InputOTP.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAmC,IAAI,EAAuC,MAAM,cAAc,CAAC;AAI1G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AA0E7D;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,4EAsDnB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { StyleProp, ViewStyle } from 'react-native';
2
+ import type { InputOTPBaseProps } from './InputOTP.base';
3
+ /**
4
+ * The native `InputOTP`'s props: the shared contract, plus the group's
5
+ * accessible name (the web takes it as a plain `aria-label` attribute) and the
6
+ * row's `style`.
7
+ */
8
+ export interface InputOTPProps extends InputOTPBaseProps {
9
+ /** Names the boxes together, as one group. */
10
+ 'aria-label'?: string;
11
+ /** The row's own style; the boxes keep theirs. */
12
+ style?: StyleProp<ViewStyle>;
13
+ }
14
+ //# sourceMappingURL=InputOTP.types.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputOTP.types.native.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/InputOTP/InputOTP.types.native.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;GAIG;AACH,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD,8CAA8C;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kDAAkD;IAClD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B"}
@@ -0,0 +1,3 @@
1
+ export { InputOTP } from './InputOTP.native';
2
+ export type { InputOTPProps } from './InputOTP.types.native';
3
+ //# sourceMappingURL=index.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/InputOTP/index.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC"}
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  UserAvatar,
3
3
  UserMenu
4
- } from "./chunk-LFECE4R7.js";
4
+ } from "./chunk-4EDCF7TC.js";
5
5
  import "./chunk-DQ22UKMZ.js";
6
6
  import "./chunk-UDQSIRAP.js";
7
- import "./chunk-W56KN53D.js";
8
- import "./chunk-3ZVUNSFF.js";
7
+ import "./chunk-L6IDPTNX.js";
9
8
  import "./chunk-EOQ6EKTS.js";
10
9
  import "./chunk-6ZZGK5DT.js";
10
+ import "./chunk-3ZVUNSFF.js";
11
11
  import "./chunk-MTEQEPNY.js";
12
12
  import "./chunk-VUHLNYAE.js";
13
13
  import "./chunk-2GSIEDGN.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@12-apps/ui",
3
- "version": "6.100.0",
3
+ "version": "6.101.0",
4
4
  "license": "MIT",
5
5
  "packageManager": "pnpm@10.34.5",
6
6
  "type": "module",
@@ -433,6 +433,10 @@
433
433
  "default": "./dist/form/Input/outlined.js"
434
434
  },
435
435
  "./form/InputOTP": {
436
+ "react-native": {
437
+ "types": "./dist/types-native/components/form/InputOTP/index.native.d.ts",
438
+ "default": "./dist/native/form/InputOTP.js"
439
+ },
436
440
  "types": "./dist/types/components/form/InputOTP/index.d.ts",
437
441
  "default": "./dist/form/InputOTP.js"
438
442
  },
@@ -0,0 +1,76 @@
1
+ import type { ColorValue, SizeValue } from '../../../tokens/vocabulary';
2
+
3
+ /**
4
+ * THE CONTRACT BOTH RENDERERS HONOUR (see `Button.base.ts`).
5
+ *
6
+ * No MUI and no react-native here: this file ships in both declaration
7
+ * outputs, and a native consumer has no `@mui/material` to resolve against.
8
+ */
9
+
10
+ export interface InputOTPBaseProps {
11
+ /**
12
+ * The variant of the OTP input
13
+ */
14
+ variant?: 'numeric' | 'alphanumeric' | 'masked';
15
+
16
+ /**
17
+ * The color theme of the OTP input
18
+ */
19
+ color?: ColorValue;
20
+
21
+ /**
22
+ * The size of the OTP input
23
+ */
24
+ size?: SizeValue;
25
+
26
+ /**
27
+ * Number of OTP digits
28
+ */
29
+ length?: number;
30
+
31
+ /**
32
+ * Current value
33
+ */
34
+ value?: string;
35
+
36
+ /**
37
+ * Called when value changes
38
+ */
39
+ onChange?: (value: string) => void;
40
+
41
+ /**
42
+ * Called when OTP is complete
43
+ */
44
+ onComplete?: (value: string) => void;
45
+
46
+ /**
47
+ * Whether the input should have glass morphism effect
48
+ */
49
+ glass?: boolean;
50
+
51
+ /**
52
+ * Whether the input should have gradient effects
53
+ */
54
+ gradient?: boolean;
55
+
56
+ /**
57
+ * Whether to auto-focus first input
58
+ */
59
+ autoFocus?: boolean;
60
+
61
+ /**
62
+ * Error state
63
+ */
64
+ error?: boolean;
65
+
66
+ /**
67
+ * Disabled state
68
+ */
69
+ disabled?: boolean;
70
+
71
+ /**
72
+ * Test ID for automated testing
73
+ * Container will have this ID, and individual slots will have {dataTestId}-slot-{index}
74
+ */
75
+ dataTestId?: string;
76
+ }
@@ -0,0 +1,51 @@
1
+ /**
2
+ * The digits' arithmetic, shared by both renderers' hooks (`InputOTP.hooks.ts`
3
+ * on the web, `InputOTP.hooks.native.ts` on React Native). Pure: no React, no
4
+ * DOM, no react-native.
5
+ */
6
+
7
+ /**
8
+ * What each variant accepts. `masked` constrains nothing — it only changes what
9
+ * is drawn — so it has no pattern here.
10
+ */
11
+ export const PATTERNS: Record<string, RegExp> = {
12
+ numeric: /^\d*$/,
13
+ alphanumeric: /^[a-zA-Z0-9]*$/,
14
+ };
15
+
16
+ /** Whether `text` is something this variant will take. */
17
+ export const isAllowed = (variant: string, text: string) => (PATTERNS[variant] ?? /.*/).test(text);
18
+
19
+ /** The digit array is always `length` long, blank-padded on the right. */
20
+ export const padTo = (digits: string[], length: number) =>
21
+ Array.from({ length }, (_, i) => digits[i] ?? '');
22
+
23
+ /**
24
+ * What a change to the numeric FIRST slot is, now that its `maxLength` is the
25
+ * code's length rather than 1 (FUT-4144).
26
+ *
27
+ * That slot carries `one-time-code`, and the phone's SMS fill (or a password
28
+ * manager) writes the WHOLE code into it as one change, not a paste — kept to
29
+ * one character, the code lost every digit but the last. So:
30
+ *
31
+ * - `overtype`: a keystroke into the already-filled slot (its old character
32
+ * plus the new one). Ignored, exactly as `maxLength={1}` refused it before.
33
+ * - `code`: anything else longer than one character, written in one go.
34
+ * Spread across the slots like a paste.
35
+ *
36
+ * Every other slot and variant keeps `maxLength={1}` and never gets here.
37
+ */
38
+ export function firstSlotFill(variant: string, index: number, inputValue: string, current: string) {
39
+ if (variant !== 'numeric' || index !== 0 || inputValue.length < 2) return null;
40
+ const overtype = inputValue.length === 2 && current !== '' && inputValue.includes(current);
41
+ return overtype ? 'overtype' : 'code';
42
+ }
43
+
44
+ /**
45
+ * The code inside a first-slot fill. A phone that INSERTS the SMS code at the
46
+ * caret rather than replacing the slot leaves the digit already there in
47
+ * front: `4` + `482913` arrives as `4482913`, which spread as-is would give
48
+ * `448291`. Longer than the code and led by that digit: the digit is dropped.
49
+ */
50
+ export const codeOfFill = (inputValue: string, current: string, length: number): string =>
51
+ inputValue.length > length && current !== '' && inputValue.startsWith(current) ? inputValue.slice(1) : inputValue;
@@ -0,0 +1,84 @@
1
+ import { useCallback, useEffect, useRef, useState } from 'react';
2
+
3
+ import { codeOfFill, firstSlotFill, isAllowed, padTo } from './InputOTP.core';
4
+
5
+ /** What a box needs from the element behind it: to take the focus. */
6
+ interface Focusable {
7
+ focus: () => void;
8
+ }
9
+
10
+ interface NativeOtpInput {
11
+ variant: string;
12
+ length: number;
13
+ value: string;
14
+ onChange?: (value: string) => void;
15
+ onComplete?: (value: string) => void;
16
+ }
17
+
18
+ /**
19
+ * The native boxes' digits — the web hook's rules (`InputOTP.hooks.ts`) over
20
+ * React Native's events: `onChangeText` carries the box's whole new text and
21
+ * `onKeyPress` carries only the key's name, and there is no paste event at
22
+ * all. A pasted or SMS-filled code arrives as a change of the FIRST box, whose
23
+ * `maxLength` is the code's length plus one for exactly that reason, and is
24
+ * spread across the boxes by the same `firstSlotFill` / `codeOfFill` the web
25
+ * uses.
26
+ */
27
+ export const useNativeOtpDigits = ({ variant, length, value, onChange, onComplete }: NativeOtpInput) => {
28
+ const [digits, setDigits] = useState<string[]>(() => padTo([], length));
29
+ const boxRefs = useRef<(Focusable | null)[]>([]);
30
+
31
+ useEffect(() => {
32
+ setDigits(padTo(value.split('').slice(0, length), length));
33
+ }, [value, length]);
34
+
35
+ const focusBox = useCallback((index: number) => boxRefs.current[index]?.focus(), []);
36
+
37
+ const publish = useCallback(
38
+ (next: string) => {
39
+ onChange?.(next);
40
+ if (next.length === length) onComplete?.(next);
41
+ },
42
+ [length, onChange, onComplete],
43
+ );
44
+
45
+ /** A whole code laid across the boxes from the first one. */
46
+ const spread = useCallback(
47
+ (text: string) => {
48
+ const code = text.slice(0, length);
49
+ if (!code || !isAllowed(variant, code)) return;
50
+ setDigits(padTo(code.split(''), length));
51
+ publish(code);
52
+ focusBox(Math.min(code.length, length - 1));
53
+ },
54
+ [variant, length, publish, focusBox],
55
+ );
56
+
57
+ const handleChangeText = useCallback(
58
+ (index: number, text: string) => {
59
+ // The web's paste spreads a code for EVERY variant; React Native has no
60
+ // paste event, so a code arrives as a change of the first box, read by
61
+ // the numeric rule for `alphanumeric` too (`masked` shows a bullet, whose
62
+ // text no longer holds the digit it hides: it keeps one character a box).
63
+ const fill = firstSlotFill(variant === 'alphanumeric' ? 'numeric' : variant, index, text, digits[0] ?? '');
64
+ if (fill) return fill === 'code' ? spread(codeOfFill(text, digits[0] ?? '', length)) : undefined;
65
+ if (!isAllowed(variant, text)) return;
66
+ const next = [...digits];
67
+ next[index] = text.slice(-1);
68
+ setDigits(next);
69
+ publish(next.join(''));
70
+ if (text && index < length - 1) focusBox(index + 1);
71
+ },
72
+ [variant, digits, length, publish, focusBox, spread],
73
+ );
74
+
75
+ /** Backspace in a box that is already empty steps back to the one before. */
76
+ const handleKey = useCallback(
77
+ (index: number, key: string) => {
78
+ if (key === 'Backspace' && !digits[index] && index > 0) focusBox(index - 1);
79
+ },
80
+ [digits, focusBox],
81
+ );
82
+
83
+ return { digits, boxRefs, handleChangeText, handleKey };
84
+ };
@@ -1,51 +1,6 @@
1
1
  import { useCallback, useEffect, useRef, useState } from 'react';
2
2
 
3
-
4
- /**
5
- * What each variant accepts. `masked` constrains nothing — it only changes what
6
- * is drawn — so it has no pattern here.
7
- */
8
- const PATTERNS: Record<string, RegExp> = {
9
- numeric: /^\d*$/,
10
- alphanumeric: /^[a-zA-Z0-9]*$/,
11
- };
12
-
13
- /** Whether `text` is something this variant will take. */
14
- const isAllowed = (variant: string, text: string) => (PATTERNS[variant] ?? /.*/).test(text);
15
-
16
- /** The digit array is always `length` long, blank-padded on the right. */
17
- const padTo = (digits: string[], length: number) =>
18
- Array.from({ length }, (_, i) => digits[i] ?? '');
19
-
20
- /**
21
- * What a change to the numeric FIRST slot is, now that its `maxLength` is the
22
- * code's length rather than 1 (FUT-4144).
23
- *
24
- * That slot carries `one-time-code`, and the phone's SMS fill (or a password
25
- * manager) writes the WHOLE code into it as one change, not a paste — kept to
26
- * one character, the code lost every digit but the last. So:
27
- *
28
- * - `overtype`: a keystroke into the already-filled slot (its old character
29
- * plus the new one). Ignored, exactly as `maxLength={1}` refused it before.
30
- * - `code`: anything else longer than one character, written in one go.
31
- * Spread across the slots like a paste.
32
- *
33
- * Every other slot and variant keeps `maxLength={1}` and never gets here.
34
- */
35
- function firstSlotFill(variant: string, index: number, inputValue: string, current: string) {
36
- if (variant !== 'numeric' || index !== 0 || inputValue.length < 2) return null;
37
- const overtype = inputValue.length === 2 && current !== '' && inputValue.includes(current);
38
- return overtype ? 'overtype' : 'code';
39
- }
40
-
41
- /**
42
- * The code inside a first-slot fill. A phone that INSERTS the SMS code at the
43
- * caret rather than replacing the slot leaves the digit already there in
44
- * front: `4` + `482913` arrives as `4482913`, which spread as-is would give
45
- * `448291`. Longer than the code and led by that digit: the digit is dropped.
46
- */
47
- const codeOfFill = (inputValue: string, current: string, length: number): string =>
48
- inputValue.length > length && current !== '' && inputValue.startsWith(current) ? inputValue.slice(1) : inputValue;
3
+ import { codeOfFill, firstSlotFill, isAllowed, padTo } from './InputOTP.core';
49
4
 
50
5
  interface OtpInput {
51
6
  variant: string;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The numbers both renderers read (see `NATIVE.md`, "Numbers").
3
+ *
4
+ * Each box's type size, in design px, per size step; its side is the theme's
5
+ * field height for that step (a square), its weight 600.
6
+ */
7
+ export const OTP_FONT_PX: Record<'xs' | 'sm' | 'md' | 'lg' | 'xl', number> = {
8
+ xs: 12,
9
+ sm: 14,
10
+ md: 16,
11
+ lg: 18,
12
+ xl: 20,
13
+ };
14
+
15
+ /** The gap between two boxes: MUI's `gap: 1`, one 8px spacing unit. */
16
+ export const OTP_GAP_PX = 8;
17
+
18
+ /** The border: 1px at rest, 2px focused (MUI's focused outline). */
19
+ export const OTP_BORDER = { rest: 1, focused: 2 } as const;