@ionic/core 8.5.7-dev.11747949628.1b740070 → 8.5.7-dev.11748466845.12de1519

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 (336) hide show
  1. package/components/input-shims.js +23 -0
  2. package/components/ion-input-otp.d.ts +11 -0
  3. package/components/ion-input-otp.js +625 -0
  4. package/components/ion-input-password-toggle.js +3 -3
  5. package/components/ion-input.js +2 -10
  6. package/components/ion-item-divider.js +2 -2
  7. package/components/ion-item-group.js +1 -1
  8. package/components/ion-item-option.js +2 -2
  9. package/components/ion-item-options.js +1 -1
  10. package/components/ion-item-sliding.js +1 -1
  11. package/components/ion-loading.js +2 -2
  12. package/components/ion-menu-button.js +2 -2
  13. package/components/ion-menu-toggle.js +2 -2
  14. package/components/ion-menu.js +2 -2
  15. package/components/ion-nav-link.js +1 -1
  16. package/components/ion-nav.js +1 -1
  17. package/components/ion-note.js +2 -2
  18. package/components/ion-picker-legacy.js +2 -2
  19. package/components/ion-progress-bar.js +1 -1
  20. package/components/ion-range.js +3 -3
  21. package/components/ion-refresher-content.js +1 -1
  22. package/components/ion-refresher.js +1 -1
  23. package/components/ion-reorder-group.js +1 -1
  24. package/components/ion-reorder.js +1 -1
  25. package/components/ion-router-link.js +2 -2
  26. package/components/ion-router-outlet.js +1 -1
  27. package/components/ion-row.js +1 -1
  28. package/components/ion-searchbar.js +4 -4
  29. package/components/ion-segment-button.js +2 -2
  30. package/components/ion-segment-content.js +1 -1
  31. package/components/ion-segment-view.js +2 -2
  32. package/components/ion-segment.js +2 -2
  33. package/components/ion-select-option.js +1 -1
  34. package/components/ion-select.js +2 -2
  35. package/components/ion-skeleton-text.js +2 -2
  36. package/components/ion-split-pane.js +2 -2
  37. package/components/ion-tab-bar.js +2 -2
  38. package/components/ion-tab-button.js +2 -2
  39. package/components/ion-tab.js +2 -2
  40. package/components/ion-tabs.js +1 -1
  41. package/components/ion-text.js +2 -2
  42. package/components/ion-textarea.js +2 -2
  43. package/components/ion-thumbnail.js +1 -1
  44. package/components/ion-toast.js +2 -2
  45. package/components/ion-toggle.js +3 -3
  46. package/components/label.js +2 -2
  47. package/components/list-header.js +2 -2
  48. package/components/list.js +1 -1
  49. package/components/modal.js +4 -4
  50. package/components/picker-column-option.js +2 -2
  51. package/components/picker-column2.js +2 -2
  52. package/components/popover.js +2 -2
  53. package/components/radio-group.js +1 -1
  54. package/components/radio.js +3 -3
  55. package/components/ripple-effect.js +1 -1
  56. package/components/select-modal.js +1 -1
  57. package/components/select-popover.js +1 -1
  58. package/components/spinner.js +1 -1
  59. package/components/title.js +2 -2
  60. package/components/toolbar.js +2 -2
  61. package/dist/cjs/{app-globals-CWtQHdcK.js → app-globals-DvwumQAI.js} +1 -1
  62. package/dist/cjs/{button-active-BzpKQ5zN.js → button-active-Du_YCFSd.js} +1 -1
  63. package/dist/cjs/{index-qOuhvt-6.js → index-B6-BlKCh.js} +4 -0
  64. package/dist/cjs/{index-CrE5792q.js → index-DCB2XSaQ.js} +1 -1
  65. package/dist/cjs/{index-C6GLB0dQ.js → index-QuFS9UpQ.js} +3 -3
  66. package/dist/cjs/index.cjs.js +7 -7
  67. package/dist/cjs/{input-shims-DGvxKeWy.js → input-shims-CQQtxW4l.js} +23 -0
  68. package/dist/cjs/ion-accordion_2.cjs.entry.js +2 -2
  69. package/dist/cjs/ion-action-sheet.cjs.entry.js +4 -4
  70. package/dist/cjs/ion-alert.cjs.entry.js +4 -4
  71. package/dist/cjs/ion-app_8.cjs.entry.js +10 -10
  72. package/dist/cjs/ion-avatar_3.cjs.entry.js +3 -3
  73. package/dist/cjs/ion-back-button.cjs.entry.js +2 -2
  74. package/dist/cjs/ion-backdrop.cjs.entry.js +2 -2
  75. package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +2 -2
  76. package/dist/cjs/ion-button_2.cjs.entry.js +2 -2
  77. package/dist/cjs/ion-card_5.cjs.entry.js +2 -2
  78. package/dist/cjs/ion-checkbox.cjs.entry.js +2 -2
  79. package/dist/cjs/ion-chip.cjs.entry.js +2 -2
  80. package/dist/cjs/ion-col_3.cjs.entry.js +3 -3
  81. package/dist/cjs/ion-datetime-button.cjs.entry.js +2 -2
  82. package/dist/cjs/ion-datetime_3.cjs.entry.js +7 -7
  83. package/dist/cjs/ion-fab_3.cjs.entry.js +2 -2
  84. package/dist/cjs/ion-img.cjs.entry.js +2 -2
  85. package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +2 -2
  86. package/dist/cjs/ion-input-otp.cjs.entry.js +588 -0
  87. package/dist/cjs/ion-input-password-toggle.cjs.entry.js +5 -5
  88. package/dist/cjs/ion-input.cjs.entry.js +4 -12
  89. package/dist/cjs/ion-item-option_3.cjs.entry.js +6 -6
  90. package/dist/cjs/ion-item_8.cjs.entry.js +14 -14
  91. package/dist/cjs/ion-loading.cjs.entry.js +5 -5
  92. package/dist/cjs/ion-menu_3.cjs.entry.js +10 -10
  93. package/dist/cjs/ion-modal.cjs.entry.js +8 -8
  94. package/dist/cjs/ion-nav_2.cjs.entry.js +5 -5
  95. package/dist/cjs/ion-picker-column-option.cjs.entry.js +4 -4
  96. package/dist/cjs/ion-picker-column.cjs.entry.js +2 -2
  97. package/dist/cjs/ion-picker.cjs.entry.js +1 -1
  98. package/dist/cjs/ion-popover.cjs.entry.js +6 -6
  99. package/dist/cjs/ion-progress-bar.cjs.entry.js +3 -3
  100. package/dist/cjs/ion-radio_2.cjs.entry.js +6 -6
  101. package/dist/cjs/ion-range.cjs.entry.js +5 -5
  102. package/dist/cjs/ion-refresher_2.cjs.entry.js +4 -4
  103. package/dist/cjs/ion-reorder_2.cjs.entry.js +4 -4
  104. package/dist/cjs/ion-ripple-effect.cjs.entry.js +3 -3
  105. package/dist/cjs/ion-route_4.cjs.entry.js +4 -4
  106. package/dist/cjs/ion-searchbar.cjs.entry.js +6 -6
  107. package/dist/cjs/ion-segment-content.cjs.entry.js +2 -2
  108. package/dist/cjs/ion-segment-view.cjs.entry.js +3 -3
  109. package/dist/cjs/ion-segment_2.cjs.entry.js +6 -6
  110. package/dist/cjs/ion-select-modal.cjs.entry.js +4 -4
  111. package/dist/cjs/ion-select_3.cjs.entry.js +7 -7
  112. package/dist/cjs/ion-spinner.cjs.entry.js +3 -3
  113. package/dist/cjs/ion-split-pane.cjs.entry.js +4 -4
  114. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +6 -6
  115. package/dist/cjs/ion-tab_2.cjs.entry.js +4 -4
  116. package/dist/cjs/ion-text.cjs.entry.js +4 -4
  117. package/dist/cjs/ion-textarea.cjs.entry.js +4 -4
  118. package/dist/cjs/ion-toast.cjs.entry.js +5 -5
  119. package/dist/cjs/ion-toggle.cjs.entry.js +5 -5
  120. package/dist/cjs/{ionic-global-BC3ee-Wa.js → ionic-global-C3I6b0Is.js} +1 -1
  121. package/dist/cjs/ionic.cjs.js +4 -4
  122. package/dist/cjs/{ios.transition-C9J4bBGV.js → ios.transition-CL8Q2_Bi.js} +2 -2
  123. package/dist/cjs/loader.cjs.js +4 -4
  124. package/dist/cjs/{md.transition-DT8PB4eS.js → md.transition-D1Ast6la.js} +2 -2
  125. package/dist/cjs/{overlays-B4rlyxhY.js → overlays-Ci3nLg5M.js} +1 -1
  126. package/dist/cjs/{status-tap-B8fjNFjq.js → status-tap-Bx_wzOTo.js} +1 -1
  127. package/dist/collection/collection-manifest.json +1 -0
  128. package/dist/collection/components/input/input.js +2 -10
  129. package/dist/collection/components/input-otp/input-otp-interface.js +1 -0
  130. package/dist/collection/components/input-otp/input-otp.ios.css +381 -0
  131. package/dist/collection/components/input-otp/input-otp.js +1013 -0
  132. package/dist/collection/components/input-otp/input-otp.md.css +381 -0
  133. package/dist/collection/components/input-password-toggle/input-password-toggle.js +3 -3
  134. package/dist/collection/components/item-divider/item-divider.js +2 -2
  135. package/dist/collection/components/item-group/item-group.js +1 -1
  136. package/dist/collection/components/item-option/item-option.js +2 -2
  137. package/dist/collection/components/item-options/item-options.js +1 -1
  138. package/dist/collection/components/item-sliding/item-sliding.js +1 -1
  139. package/dist/collection/components/label/label.js +2 -2
  140. package/dist/collection/components/list/list.js +1 -1
  141. package/dist/collection/components/list-header/list-header.js +2 -2
  142. package/dist/collection/components/loading/loading.js +2 -2
  143. package/dist/collection/components/menu/menu.js +2 -2
  144. package/dist/collection/components/menu-button/menu-button.js +2 -2
  145. package/dist/collection/components/menu-toggle/menu-toggle.js +2 -2
  146. package/dist/collection/components/modal/modal.js +4 -4
  147. package/dist/collection/components/nav/nav.js +1 -1
  148. package/dist/collection/components/nav-link/nav-link.js +1 -1
  149. package/dist/collection/components/note/note.js +2 -2
  150. package/dist/collection/components/picker-column-option/picker-column-option.js +2 -2
  151. package/dist/collection/components/picker-legacy/picker.js +2 -2
  152. package/dist/collection/components/picker-legacy-column/picker-column.js +2 -2
  153. package/dist/collection/components/popover/popover.js +2 -2
  154. package/dist/collection/components/progress-bar/progress-bar.js +1 -1
  155. package/dist/collection/components/radio/radio.js +3 -3
  156. package/dist/collection/components/radio-group/radio-group.js +1 -1
  157. package/dist/collection/components/range/range.js +3 -3
  158. package/dist/collection/components/refresher/refresher.js +1 -1
  159. package/dist/collection/components/refresher-content/refresher-content.js +1 -1
  160. package/dist/collection/components/reorder/reorder.js +1 -1
  161. package/dist/collection/components/reorder-group/reorder-group.js +1 -1
  162. package/dist/collection/components/ripple-effect/ripple-effect.js +1 -1
  163. package/dist/collection/components/router-link/router-link.js +2 -2
  164. package/dist/collection/components/router-outlet/router-outlet.js +1 -1
  165. package/dist/collection/components/row/row.js +1 -1
  166. package/dist/collection/components/searchbar/searchbar.js +4 -4
  167. package/dist/collection/components/segment/segment.js +2 -2
  168. package/dist/collection/components/segment-button/segment-button.js +2 -2
  169. package/dist/collection/components/segment-content/segment-content.js +1 -1
  170. package/dist/collection/components/segment-view/segment-view.js +2 -2
  171. package/dist/collection/components/select/select.js +2 -2
  172. package/dist/collection/components/select-modal/select-modal.js +1 -1
  173. package/dist/collection/components/select-option/select-option.js +1 -1
  174. package/dist/collection/components/select-popover/select-popover.js +1 -1
  175. package/dist/collection/components/skeleton-text/skeleton-text.js +2 -2
  176. package/dist/collection/components/spinner/spinner.js +1 -1
  177. package/dist/collection/components/split-pane/split-pane.js +2 -2
  178. package/dist/collection/components/tab/tab.js +2 -2
  179. package/dist/collection/components/tab-bar/tab-bar.js +2 -2
  180. package/dist/collection/components/tab-button/tab-button.js +2 -2
  181. package/dist/collection/components/tabs/tabs.js +1 -1
  182. package/dist/collection/components/text/text.js +2 -2
  183. package/dist/collection/components/textarea/textarea.js +2 -2
  184. package/dist/collection/components/thumbnail/thumbnail.js +1 -1
  185. package/dist/collection/components/title/title.js +2 -2
  186. package/dist/collection/components/toast/toast.js +2 -2
  187. package/dist/collection/components/toggle/toggle.js +3 -3
  188. package/dist/collection/components/toolbar/toolbar.js +2 -2
  189. package/dist/collection/utils/input-shims/hacks/scroll-assist.js +23 -0
  190. package/dist/docs.json +907 -1
  191. package/dist/esm/{app-globals-Ts_E1ch0.js → app-globals-C74-VMUb.js} +1 -1
  192. package/dist/esm/{button-active-BQqkZ_sm.js → button-active-DRCPpzqj.js} +1 -1
  193. package/dist/esm/{index-EP3pwcdb.js → index-3GtB1kQI.js} +4 -1
  194. package/dist/esm/{index-B83thFnh.js → index-lgeUQ6qY.js} +3 -3
  195. package/dist/esm/{index-RyWq7qIc.js → index-lp0kQfoC.js} +1 -1
  196. package/dist/esm/index.js +7 -7
  197. package/dist/esm/{input-shims-qlIPzMSm.js → input-shims-Km36_5AQ.js} +23 -0
  198. package/dist/esm/ion-accordion_2.entry.js +2 -2
  199. package/dist/esm/ion-action-sheet.entry.js +4 -4
  200. package/dist/esm/ion-alert.entry.js +4 -4
  201. package/dist/esm/ion-app_8.entry.js +10 -10
  202. package/dist/esm/ion-avatar_3.entry.js +3 -3
  203. package/dist/esm/ion-back-button.entry.js +2 -2
  204. package/dist/esm/ion-backdrop.entry.js +2 -2
  205. package/dist/esm/ion-breadcrumb_2.entry.js +2 -2
  206. package/dist/esm/ion-button_2.entry.js +2 -2
  207. package/dist/esm/ion-card_5.entry.js +2 -2
  208. package/dist/esm/ion-checkbox.entry.js +2 -2
  209. package/dist/esm/ion-chip.entry.js +2 -2
  210. package/dist/esm/ion-col_3.entry.js +3 -3
  211. package/dist/esm/ion-datetime-button.entry.js +2 -2
  212. package/dist/esm/ion-datetime_3.entry.js +7 -7
  213. package/dist/esm/ion-fab_3.entry.js +2 -2
  214. package/dist/esm/ion-img.entry.js +2 -2
  215. package/dist/esm/ion-infinite-scroll_2.entry.js +2 -2
  216. package/dist/esm/ion-input-otp.entry.js +586 -0
  217. package/dist/esm/ion-input-password-toggle.entry.js +5 -5
  218. package/dist/esm/ion-input.entry.js +4 -12
  219. package/dist/esm/ion-item-option_3.entry.js +6 -6
  220. package/dist/esm/ion-item_8.entry.js +14 -14
  221. package/dist/esm/ion-loading.entry.js +5 -5
  222. package/dist/esm/ion-menu_3.entry.js +10 -10
  223. package/dist/esm/ion-modal.entry.js +8 -8
  224. package/dist/esm/ion-nav_2.entry.js +5 -5
  225. package/dist/esm/ion-picker-column-option.entry.js +4 -4
  226. package/dist/esm/ion-picker-column.entry.js +2 -2
  227. package/dist/esm/ion-picker.entry.js +1 -1
  228. package/dist/esm/ion-popover.entry.js +6 -6
  229. package/dist/esm/ion-progress-bar.entry.js +3 -3
  230. package/dist/esm/ion-radio_2.entry.js +6 -6
  231. package/dist/esm/ion-range.entry.js +5 -5
  232. package/dist/esm/ion-refresher_2.entry.js +4 -4
  233. package/dist/esm/ion-reorder_2.entry.js +4 -4
  234. package/dist/esm/ion-ripple-effect.entry.js +3 -3
  235. package/dist/esm/ion-route_4.entry.js +4 -4
  236. package/dist/esm/ion-searchbar.entry.js +6 -6
  237. package/dist/esm/ion-segment-content.entry.js +2 -2
  238. package/dist/esm/ion-segment-view.entry.js +3 -3
  239. package/dist/esm/ion-segment_2.entry.js +6 -6
  240. package/dist/esm/ion-select-modal.entry.js +4 -4
  241. package/dist/esm/ion-select_3.entry.js +7 -7
  242. package/dist/esm/ion-spinner.entry.js +3 -3
  243. package/dist/esm/ion-split-pane.entry.js +4 -4
  244. package/dist/esm/ion-tab-bar_2.entry.js +6 -6
  245. package/dist/esm/ion-tab_2.entry.js +4 -4
  246. package/dist/esm/ion-text.entry.js +4 -4
  247. package/dist/esm/ion-textarea.entry.js +4 -4
  248. package/dist/esm/ion-toast.entry.js +5 -5
  249. package/dist/esm/ion-toggle.entry.js +5 -5
  250. package/dist/esm/{ionic-global-DapnXdYs.js → ionic-global-Dw-MNnQB.js} +1 -1
  251. package/dist/esm/ionic.js +5 -5
  252. package/dist/esm/{ios.transition-DN6Dy4K4.js → ios.transition-Doo_7Vid.js} +2 -2
  253. package/dist/esm/loader.js +5 -5
  254. package/dist/esm/{md.transition-DR8zuFnL.js → md.transition-BbcCfRk9.js} +2 -2
  255. package/dist/esm/{overlays-Blhb_0oI.js → overlays-Pn0MyOv4.js} +1 -1
  256. package/dist/esm/{status-tap-CZEjiztV.js → status-tap-Cn5uETrs.js} +1 -1
  257. package/dist/html.html-data.json +160 -0
  258. package/dist/ionic/index.esm.js +1 -1
  259. package/dist/ionic/ionic.esm.js +1 -1
  260. package/dist/ionic/{p-d9c08f93.entry.js → p-05427be9.entry.js} +1 -1
  261. package/dist/ionic/{p-9a0bde6e.entry.js → p-0bc3d6d0.entry.js} +1 -1
  262. package/dist/ionic/{p-38921e2f.entry.js → p-0bcd3299.entry.js} +1 -1
  263. package/dist/ionic/{p-030daf32.entry.js → p-14d26301.entry.js} +1 -1
  264. package/dist/ionic/{p-3edb2346.entry.js → p-1da92348.entry.js} +1 -1
  265. package/dist/ionic/{p-12b44c66.entry.js → p-1e9ea564.entry.js} +1 -1
  266. package/dist/ionic/p-1fe35f29.entry.js +4 -0
  267. package/dist/ionic/{p-f0c5ea4c.entry.js → p-2438054c.entry.js} +1 -1
  268. package/dist/ionic/{p-b2b0f539.entry.js → p-250c972f.entry.js} +1 -1
  269. package/dist/ionic/{p-306eab7a.entry.js → p-2517fcdf.entry.js} +1 -1
  270. package/dist/ionic/{p-61f52724.entry.js → p-29186993.entry.js} +1 -1
  271. package/dist/ionic/{p-89e3b3c6.entry.js → p-2c6931ed.entry.js} +1 -1
  272. package/dist/ionic/{p-112af08b.entry.js → p-2e42fa68.entry.js} +1 -1
  273. package/dist/ionic/{p-EP3pwcdb.js → p-3GtB1kQI.js} +2 -2
  274. package/dist/ionic/{p-e2e4b1f1.entry.js → p-3ca63859.entry.js} +1 -1
  275. package/dist/ionic/{p-bc9feb4b.entry.js → p-3fa87259.entry.js} +1 -1
  276. package/dist/ionic/{p-08232f2d.entry.js → p-43f012a4.entry.js} +1 -1
  277. package/dist/ionic/{p-ff362ebc.entry.js → p-5756b724.entry.js} +1 -1
  278. package/dist/ionic/{p-4a5cf7ac.entry.js → p-592db4a8.entry.js} +1 -1
  279. package/dist/ionic/{p-a9997b1b.entry.js → p-691fa8c7.entry.js} +1 -1
  280. package/dist/ionic/{p-38598652.entry.js → p-6bd192d8.entry.js} +1 -1
  281. package/dist/ionic/{p-d887000e.entry.js → p-7a6c96ca.entry.js} +1 -1
  282. package/dist/ionic/p-8c496d65.entry.js +4 -0
  283. package/dist/ionic/{p-46c15fe2.entry.js → p-8d7afec5.entry.js} +1 -1
  284. package/dist/ionic/{p-93996b12.entry.js → p-920540c6.entry.js} +1 -1
  285. package/dist/ionic/{p-e471e1e5.entry.js → p-9262223a.entry.js} +1 -1
  286. package/dist/ionic/{p-5fb997f8.entry.js → p-96d912f5.entry.js} +1 -1
  287. package/dist/ionic/{p-49122d48.entry.js → p-98f759e4.entry.js} +1 -1
  288. package/dist/ionic/{p-c19bc276.entry.js → p-99cc16fb.entry.js} +1 -1
  289. package/dist/ionic/{p-46a1ce99.entry.js → p-9c7d7711.entry.js} +1 -1
  290. package/dist/ionic/p-B7Khsp7D.js +4 -0
  291. package/dist/ionic/{p-DCstKNei.js → p-BBMlbfDQ.js} +1 -1
  292. package/dist/ionic/{p-LpklIrOy.js → p-BC2IYr2c.js} +1 -1
  293. package/dist/ionic/p-BcSCNsNs.js +4 -0
  294. package/dist/ionic/{p-Uz6zKimy.js → p-CGyDG2ar.js} +1 -1
  295. package/dist/ionic/p-CO_y91jJ.js +4 -0
  296. package/dist/ionic/{p-DPhSdjFK.js → p-CjUUcfjC.js} +1 -1
  297. package/dist/ionic/{p-Dnc554yu.js → p-CuVupNFU.js} +1 -1
  298. package/dist/ionic/{p-BSMFLyVh.js → p-DYqTiW2v.js} +1 -1
  299. package/dist/ionic/{p-484073b5.entry.js → p-a20a15cc.entry.js} +1 -1
  300. package/dist/ionic/{p-5b8abc2f.entry.js → p-a22fe54d.entry.js} +1 -1
  301. package/dist/ionic/{p-38dcbd40.entry.js → p-b18a4590.entry.js} +1 -1
  302. package/dist/ionic/{p-c9bca536.entry.js → p-b9fc80d5.entry.js} +1 -1
  303. package/dist/ionic/{p-aeb7297a.entry.js → p-bc84650a.entry.js} +1 -1
  304. package/dist/ionic/p-bf6b00ab.entry.js +4 -0
  305. package/dist/ionic/{p-a26637b1.entry.js → p-c1b0e3b6.entry.js} +1 -1
  306. package/dist/ionic/p-cc51b53c.entry.js +4 -0
  307. package/dist/ionic/{p-4119d144.entry.js → p-cde545fa.entry.js} +1 -1
  308. package/dist/ionic/{p-ce26cd7d.entry.js → p-d4742f5c.entry.js} +1 -1
  309. package/dist/ionic/p-d7a74bde.entry.js +4 -0
  310. package/dist/ionic/{p-e426331f.entry.js → p-da105dce.entry.js} +1 -1
  311. package/dist/ionic/{p-a4bcf305.entry.js → p-e2d9c488.entry.js} +1 -1
  312. package/dist/ionic/{p-8dda7cd4.entry.js → p-e5495b3b.entry.js} +1 -1
  313. package/dist/ionic/{p-1a19090e.entry.js → p-e83ead65.entry.js} +1 -1
  314. package/dist/ionic/{p-a178af33.entry.js → p-ed36aee8.entry.js} +1 -1
  315. package/dist/ionic/{p-e5e82fa5.entry.js → p-ee504ce4.entry.js} +1 -1
  316. package/dist/ionic/{p-ade7bda6.entry.js → p-eec040ff.entry.js} +1 -1
  317. package/dist/ionic/{p-0434efbb.entry.js → p-f331dda5.entry.js} +1 -1
  318. package/dist/ionic/{p-d77d0b41.entry.js → p-f35cb090.entry.js} +1 -1
  319. package/dist/ionic/{p-99c93730.entry.js → p-fb714eec.entry.js} +1 -1
  320. package/dist/ionic/{p-c3abde95.entry.js → p-fd156864.entry.js} +1 -1
  321. package/dist/ionic/{p-0c2a069d.entry.js → p-ff88b250.entry.js} +1 -1
  322. package/dist/ionic/{p-CgRZM5_E.js → p-wsLGfiE0.js} +1 -1
  323. package/dist/types/components/input-otp/input-otp-interface.d.ts +21 -0
  324. package/dist/types/components/input-otp/input-otp.d.ts +272 -0
  325. package/dist/types/components.d.ts +167 -0
  326. package/dist/types/interface.d.ts +1 -0
  327. package/hydrate/index.js +706 -109
  328. package/hydrate/index.mjs +706 -109
  329. package/package.json +1 -1
  330. package/dist/ionic/p-07a47eb6.entry.js +0 -4
  331. package/dist/ionic/p-46f82b82.entry.js +0 -4
  332. package/dist/ionic/p-5459e444.entry.js +0 -4
  333. package/dist/ionic/p-94375099.entry.js +0 -4
  334. package/dist/ionic/p-CqNf-A5G.js +0 -4
  335. package/dist/ionic/p-DjV8cNim.js +0 -4
  336. package/dist/ionic/p-EglNvYQn.js +0 -4
@@ -0,0 +1,586 @@
1
+ /*!
2
+ * (C) Ionic http://ionicframework.com - MIT License
3
+ */
4
+ import { r as registerInstance, c as createEvent, h, F as Fragment, d as Host, g as getElement } from './index-3GtB1kQI.js';
5
+ import { i as inheritAriaAttributes } from './helpers-CzIihwFO.js';
6
+ import { p as printIonWarning } from './index-CEo1SqXS.js';
7
+ import { i as isRTL } from './dir-C53feagD.js';
8
+ import { c as createColorClasses } from './theme-DiVJyqlX.js';
9
+ import { b as getIonMode } from './ionic-global-Dw-MNnQB.js';
10
+
11
+ const inputOtpIosCss = ".sc-ion-input-otp-ios-h{--margin-top:0;--margin-end:0;--margin-bottom:0;--margin-start:0;--padding-top:16px;--padding-end:0;--padding-bottom:16px;--padding-start:0;--color:initial;--min-width:40px;--separator-width:8px;--separator-height:var(--separator-width);--separator-border-radius:999px;--separator-color:var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));--highlight-color-focused:var(--ion-color-primary, #0054e9);--highlight-color-valid:var(--ion-color-success, #2dd55b);--highlight-color-invalid:var(--ion-color-danger, #c5000f);--highlight-color:var(--highlight-color-focused);display:block;position:relative;font-size:0.875rem}.input-otp-group.sc-ion-input-otp-ios{-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.native-wrapper.sc-ion-input-otp-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:var(--min-width)}.native-input.sc-ion-input-otp-ios{border-radius:var(--border-radius);width:var(--width);min-width:inherit;height:var(--height);border-width:var(--border-width);border-style:solid;border-color:var(--border-color);background:var(--background);color:var(--color);font-size:inherit;text-align:center;-webkit-appearance:none;-moz-appearance:none;appearance:none}.has-focus.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios{caret-color:var(--highlight-color)}.input-otp-description.sc-ion-input-otp-ios{color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem;line-height:1.25rem;text-align:center}.input-otp-description-hidden.sc-ion-input-otp-ios{display:none}.input-otp-separator.sc-ion-input-otp-ios{border-radius:var(--separator-border-radius);-ms-flex-negative:0;flex-shrink:0;width:var(--separator-width);height:var(--separator-height);background:var(--separator-color)}.input-otp-size-small.sc-ion-input-otp-ios-h{--width:40px;--height:40px}.input-otp-size-small.sc-ion-input-otp-ios-h .input-otp-group.sc-ion-input-otp-ios{gap:8px}.input-otp-size-medium.sc-ion-input-otp-ios-h{--width:48px;--height:48px}.input-otp-size-large.sc-ion-input-otp-ios-h{--width:56px;--height:56px}.input-otp-size-medium.sc-ion-input-otp-ios-h .input-otp-group.sc-ion-input-otp-ios,.input-otp-size-large.sc-ion-input-otp-ios-h .input-otp-group.sc-ion-input-otp-ios{gap:12px}.input-otp-shape-round.sc-ion-input-otp-ios-h{--border-radius:16px}.input-otp-shape-soft.sc-ion-input-otp-ios-h{--border-radius:8px}.input-otp-shape-rectangular.sc-ion-input-otp-ios-h{--border-radius:0}.input-otp-fill-outline.sc-ion-input-otp-ios-h{--background:none}.input-otp-fill-solid.sc-ion-input-otp-ios-h{--border-color:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2))}.input-otp-disabled.sc-ion-input-otp-ios-h{--color:var(--ion-color-step-350, var(--ion-text-color-step-650, #a6a6a6))}.input-otp-fill-outline.input-otp-disabled.sc-ion-input-otp-ios-h{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--border-color:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.input-otp-disabled.sc-ion-input-otp-ios-h,.input-otp-disabled.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios:disabled{cursor:not-allowed}.has-focus.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios:focus{--border-color:var(--highlight-color);outline:none}.input-otp-fill-outline.input-otp-readonly.sc-ion-input-otp-ios-h{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2))}.input-otp-fill-solid.input-otp-disabled.sc-ion-input-otp-ios-h,.input-otp-fill-solid.input-otp-readonly.sc-ion-input-otp-ios-h{--border-color:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6));--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.ion-touched.ion-invalid.sc-ion-input-otp-ios-h{--highlight-color:var(--highlight-color-invalid)}.ion-valid.sc-ion-input-otp-ios-h{--highlight-color:var(--highlight-color-valid)}.has-focus.ion-valid.sc-ion-input-otp-ios-h,.ion-touched.ion-invalid.sc-ion-input-otp-ios-h{--border-color:var(--highlight-color)}.ion-color.sc-ion-input-otp-ios-h{--highlight-color-focused:var(--ion-color-base)}.input-otp-fill-outline.ion-color.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios:focus{border-color:rgba(var(--ion-color-base-rgb), 0.6)}.input-otp-fill-outline.ion-color.ion-invalid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.ion-invalid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-outline.ion-color.has-focus.ion-invalid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.has-focus.ion-invalid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios{border-color:var(--ion-color-danger, #c5000f)}.input-otp-fill-outline.ion-color.ion-valid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.ion-valid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-outline.ion-color.has-focus.ion-valid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.has-focus.ion-valid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios{border-color:var(--ion-color-success, #2dd55b)}.input-otp-fill-outline.input-otp-disabled.ion-color.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios{border-color:rgba(var(--ion-color-base-rgb), 0.3)}.sc-ion-input-otp-ios-h{--border-width:0.55px}.has-focus.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios:focus{--border-width:1px}.input-otp-fill-outline.sc-ion-input-otp-ios-h{--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))))}";
12
+
13
+ const inputOtpMdCss = ".sc-ion-input-otp-md-h{--margin-top:0;--margin-end:0;--margin-bottom:0;--margin-start:0;--padding-top:16px;--padding-end:0;--padding-bottom:16px;--padding-start:0;--color:initial;--min-width:40px;--separator-width:8px;--separator-height:var(--separator-width);--separator-border-radius:999px;--separator-color:var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));--highlight-color-focused:var(--ion-color-primary, #0054e9);--highlight-color-valid:var(--ion-color-success, #2dd55b);--highlight-color-invalid:var(--ion-color-danger, #c5000f);--highlight-color:var(--highlight-color-focused);display:block;position:relative;font-size:0.875rem}.input-otp-group.sc-ion-input-otp-md{-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.native-wrapper.sc-ion-input-otp-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:var(--min-width)}.native-input.sc-ion-input-otp-md{border-radius:var(--border-radius);width:var(--width);min-width:inherit;height:var(--height);border-width:var(--border-width);border-style:solid;border-color:var(--border-color);background:var(--background);color:var(--color);font-size:inherit;text-align:center;-webkit-appearance:none;-moz-appearance:none;appearance:none}.has-focus.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md{caret-color:var(--highlight-color)}.input-otp-description.sc-ion-input-otp-md{color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem;line-height:1.25rem;text-align:center}.input-otp-description-hidden.sc-ion-input-otp-md{display:none}.input-otp-separator.sc-ion-input-otp-md{border-radius:var(--separator-border-radius);-ms-flex-negative:0;flex-shrink:0;width:var(--separator-width);height:var(--separator-height);background:var(--separator-color)}.input-otp-size-small.sc-ion-input-otp-md-h{--width:40px;--height:40px}.input-otp-size-small.sc-ion-input-otp-md-h .input-otp-group.sc-ion-input-otp-md{gap:8px}.input-otp-size-medium.sc-ion-input-otp-md-h{--width:48px;--height:48px}.input-otp-size-large.sc-ion-input-otp-md-h{--width:56px;--height:56px}.input-otp-size-medium.sc-ion-input-otp-md-h .input-otp-group.sc-ion-input-otp-md,.input-otp-size-large.sc-ion-input-otp-md-h .input-otp-group.sc-ion-input-otp-md{gap:12px}.input-otp-shape-round.sc-ion-input-otp-md-h{--border-radius:16px}.input-otp-shape-soft.sc-ion-input-otp-md-h{--border-radius:8px}.input-otp-shape-rectangular.sc-ion-input-otp-md-h{--border-radius:0}.input-otp-fill-outline.sc-ion-input-otp-md-h{--background:none}.input-otp-fill-solid.sc-ion-input-otp-md-h{--border-color:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2))}.input-otp-disabled.sc-ion-input-otp-md-h{--color:var(--ion-color-step-350, var(--ion-text-color-step-650, #a6a6a6))}.input-otp-fill-outline.input-otp-disabled.sc-ion-input-otp-md-h{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--border-color:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.input-otp-disabled.sc-ion-input-otp-md-h,.input-otp-disabled.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md:disabled{cursor:not-allowed}.has-focus.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md:focus{--border-color:var(--highlight-color);outline:none}.input-otp-fill-outline.input-otp-readonly.sc-ion-input-otp-md-h{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2))}.input-otp-fill-solid.input-otp-disabled.sc-ion-input-otp-md-h,.input-otp-fill-solid.input-otp-readonly.sc-ion-input-otp-md-h{--border-color:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6));--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.ion-touched.ion-invalid.sc-ion-input-otp-md-h{--highlight-color:var(--highlight-color-invalid)}.ion-valid.sc-ion-input-otp-md-h{--highlight-color:var(--highlight-color-valid)}.has-focus.ion-valid.sc-ion-input-otp-md-h,.ion-touched.ion-invalid.sc-ion-input-otp-md-h{--border-color:var(--highlight-color)}.ion-color.sc-ion-input-otp-md-h{--highlight-color-focused:var(--ion-color-base)}.input-otp-fill-outline.ion-color.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md:focus{border-color:rgba(var(--ion-color-base-rgb), 0.6)}.input-otp-fill-outline.ion-color.ion-invalid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.ion-invalid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-outline.ion-color.has-focus.ion-invalid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.has-focus.ion-invalid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md{border-color:var(--ion-color-danger, #c5000f)}.input-otp-fill-outline.ion-color.ion-valid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.ion-valid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-outline.ion-color.has-focus.ion-valid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.has-focus.ion-valid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md{border-color:var(--ion-color-success, #2dd55b)}.input-otp-fill-outline.input-otp-disabled.ion-color.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md{border-color:rgba(var(--ion-color-base-rgb), 0.3)}.sc-ion-input-otp-md-h{--border-width:1px}.has-focus.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md:focus{--border-width:2px}.input-otp-fill-outline.sc-ion-input-otp-md-h{--border-color:var(--ion-color-step-300, var(--ion-background-color-step-300, #b3b3b3))}";
14
+
15
+ const InputOTP = class {
16
+ constructor(hostRef) {
17
+ registerInstance(this, hostRef);
18
+ this.ionInput = createEvent(this, "ionInput", 7);
19
+ this.ionChange = createEvent(this, "ionChange", 7);
20
+ this.ionComplete = createEvent(this, "ionComplete", 7);
21
+ this.ionBlur = createEvent(this, "ionBlur", 7);
22
+ this.ionFocus = createEvent(this, "ionFocus", 7);
23
+ this.inheritedAttributes = {};
24
+ this.inputRefs = [];
25
+ this.inputId = `ion-input-otp-${inputIds++}`;
26
+ this.parsedSeparators = [];
27
+ /**
28
+ * Tracks whether the user is navigating through input boxes using keyboard navigation
29
+ * (arrow keys, tab) versus mouse clicks. This is used to determine the appropriate
30
+ * focus behavior when an input box is focused.
31
+ */
32
+ this.isKeyboardNavigation = false;
33
+ this.inputValues = [];
34
+ this.hasFocus = false;
35
+ /**
36
+ * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.
37
+ * Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
38
+ */
39
+ this.autocapitalize = 'off';
40
+ /**
41
+ * If `true`, the user cannot interact with the input.
42
+ */
43
+ this.disabled = false;
44
+ /**
45
+ * The fill for the input boxes. If `"solid"` the input boxes will have a background. If
46
+ * `"outline"` the input boxes will be transparent with a border.
47
+ */
48
+ this.fill = 'outline';
49
+ /**
50
+ * The number of input boxes to display.
51
+ */
52
+ this.length = 4;
53
+ /**
54
+ * If `true`, the user cannot modify the value.
55
+ */
56
+ this.readonly = false;
57
+ /**
58
+ * The shape of the input boxes.
59
+ * If "round" they will have an increased border radius.
60
+ * If "rectangular" they will have no border radius.
61
+ * If "soft" they will have a soft border radius.
62
+ */
63
+ this.shape = 'round';
64
+ /**
65
+ * The size of the input boxes.
66
+ */
67
+ this.size = 'medium';
68
+ /**
69
+ * The type of input allowed in the input boxes.
70
+ */
71
+ this.type = 'number';
72
+ /**
73
+ * The value of the input group.
74
+ */
75
+ this.value = '';
76
+ /**
77
+ * Handles the focus behavior for the input OTP component.
78
+ *
79
+ * Focus behavior:
80
+ * 1. Keyboard navigation: Allow normal focus movement
81
+ * 2. Mouse click:
82
+ * - If clicked box has value: Focus that box
83
+ * - If clicked box is empty: Focus first empty box
84
+ *
85
+ * Emits the `ionFocus` event when the input group gains focus.
86
+ */
87
+ this.onFocus = (index) => (event) => {
88
+ var _a;
89
+ const { inputRefs } = this;
90
+ // Only emit ionFocus and set the focusedValue when the
91
+ // component first gains focus
92
+ if (!this.hasFocus) {
93
+ this.ionFocus.emit(event);
94
+ this.focusedValue = this.value;
95
+ }
96
+ this.hasFocus = true;
97
+ let finalIndex = index;
98
+ if (!this.isKeyboardNavigation) {
99
+ // If the clicked box has a value, focus it
100
+ // Otherwise focus the first empty box
101
+ const targetIndex = this.inputValues[index] ? index : this.getFirstEmptyIndex();
102
+ finalIndex = targetIndex === -1 ? this.length - 1 : targetIndex;
103
+ // Focus the target box
104
+ (_a = this.inputRefs[finalIndex]) === null || _a === void 0 ? void 0 : _a.focus();
105
+ }
106
+ // Update tabIndexes to match the focused box
107
+ inputRefs.forEach((input, i) => {
108
+ input.tabIndex = i === finalIndex ? 0 : -1;
109
+ });
110
+ // Reset the keyboard navigation flag
111
+ this.isKeyboardNavigation = false;
112
+ };
113
+ /**
114
+ * Handles the blur behavior for the input OTP component.
115
+ * Emits the `ionBlur` event when the input group loses focus.
116
+ */
117
+ this.onBlur = (event) => {
118
+ const { inputRefs } = this;
119
+ const relatedTarget = event.relatedTarget;
120
+ // Do not emit blur if we're moving to another input box in the same component
121
+ const isInternalFocus = relatedTarget != null && inputRefs.includes(relatedTarget);
122
+ if (!isInternalFocus) {
123
+ this.hasFocus = false;
124
+ // Reset tabIndexes when focus leaves the component
125
+ this.updateTabIndexes();
126
+ // Always emit ionBlur when focus leaves the component
127
+ this.ionBlur.emit(event);
128
+ // Only emit ionChange if the value has actually changed
129
+ if (this.focusedValue !== this.value) {
130
+ this.emitIonChange(event);
131
+ }
132
+ }
133
+ };
134
+ /**
135
+ * Handles keyboard navigation and input for the OTP component.
136
+ *
137
+ * Navigation:
138
+ * - Backspace: Clears current input and moves to previous box if empty
139
+ * - Arrow Left/Right: Moves focus between input boxes
140
+ * - Tab: Allows normal tab navigation between components
141
+ *
142
+ * Input Behavior:
143
+ * - Validates input against the allowed pattern
144
+ * - When entering a key in a filled box:
145
+ * - Shifts existing values right if there is room
146
+ * - Updates the value of the input group
147
+ * - Prevents default behavior to avoid automatic focus shift
148
+ */
149
+ this.onKeyDown = (index) => (event) => {
150
+ const { length } = this;
151
+ const rtl = isRTL(this.el);
152
+ const input = event.target;
153
+ const isPasteShortcut = (event.metaKey || event.ctrlKey) && event.key.toLowerCase() === 'v';
154
+ const isTextSelection = input.selectionStart !== input.selectionEnd;
155
+ // Return if the key is the paste shortcut or the input value
156
+ // text is selected and let the onPaste / onInput handler manage it
157
+ if (isPasteShortcut || isTextSelection) {
158
+ return;
159
+ }
160
+ if (event.key === 'Backspace') {
161
+ if (this.inputValues[index]) {
162
+ // Shift all values to the right of the current index left by one
163
+ for (let i = index; i < length - 1; i++) {
164
+ this.inputValues[i] = this.inputValues[i + 1];
165
+ }
166
+ // Clear the last box
167
+ this.inputValues[length - 1] = '';
168
+ // Update all inputRefs to match inputValues
169
+ for (let i = 0; i < length; i++) {
170
+ this.inputRefs[i].value = this.inputValues[i] || '';
171
+ }
172
+ this.updateValue(event);
173
+ event.preventDefault();
174
+ }
175
+ else if (!this.inputValues[index] && index > 0) {
176
+ // If current input is empty, move to previous input
177
+ this.focusPrevious(index);
178
+ }
179
+ }
180
+ else if (event.key === 'ArrowLeft' || event.key === 'ArrowRight') {
181
+ this.isKeyboardNavigation = true;
182
+ event.preventDefault();
183
+ const isLeft = event.key === 'ArrowLeft';
184
+ const shouldMoveNext = (isLeft && rtl) || (!isLeft && !rtl);
185
+ // Only allow moving to the next input if the current has a value
186
+ if (shouldMoveNext) {
187
+ if (this.inputValues[index] && index < length - 1) {
188
+ this.focusNext(index);
189
+ }
190
+ }
191
+ else {
192
+ this.focusPrevious(index);
193
+ }
194
+ }
195
+ else if (event.key === 'Tab') {
196
+ this.isKeyboardNavigation = true;
197
+ // Let all tab events proceed normally
198
+ return;
199
+ }
200
+ // If the input box contains a value and the key being
201
+ // entered is a valid key for the input box update the value
202
+ // and shift the values to the right if there is room.
203
+ if (this.inputValues[index] && this.validKeyPattern.test(event.key)) {
204
+ if (!this.inputValues[length - 1]) {
205
+ for (let i = length - 1; i > index; i--) {
206
+ this.inputValues[i] = this.inputValues[i - 1];
207
+ this.inputRefs[i].value = this.inputValues[i] || '';
208
+ }
209
+ }
210
+ this.inputValues[index] = event.key;
211
+ this.inputRefs[index].value = event.key;
212
+ this.updateValue(event);
213
+ // Prevent default to avoid the browser from
214
+ // automatically moving the focus to the next input
215
+ event.preventDefault();
216
+ }
217
+ };
218
+ this.onInput = (index) => (event) => {
219
+ const { validKeyPattern } = this;
220
+ const value = event.target.value;
221
+ // Only allow input if it's a single character and matches the pattern
222
+ if (value.length > 1 || (value.length > 0 && !validKeyPattern.test(value))) {
223
+ // Reset the input value if not valid
224
+ this.inputRefs[index].value = '';
225
+ this.inputValues[index] = '';
226
+ return;
227
+ }
228
+ // Find the first empty box before or at the current index
229
+ let targetIndex = index;
230
+ for (let i = 0; i < index; i++) {
231
+ if (!this.inputValues[i] || this.inputValues[i] === '') {
232
+ targetIndex = i;
233
+ break;
234
+ }
235
+ }
236
+ // Set the value at the target index
237
+ this.inputValues[targetIndex] = value;
238
+ // If the value was entered in a later box, clear the current box
239
+ if (targetIndex !== index) {
240
+ this.inputRefs[index].value = '';
241
+ }
242
+ if (value.length > 0) {
243
+ this.focusNext(targetIndex);
244
+ }
245
+ this.updateValue(event);
246
+ };
247
+ /**
248
+ * Handles pasting text into the input OTP component.
249
+ * This function prevents the default paste behavior and
250
+ * validates the pasted text against the allowed pattern.
251
+ * It then updates the value of the input group and focuses
252
+ * the next empty input after pasting.
253
+ */
254
+ this.onPaste = (event) => {
255
+ var _a, _b, _c;
256
+ const { inputRefs, length, validKeyPattern } = this;
257
+ event.preventDefault();
258
+ const pastedText = (_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text');
259
+ // If there is no pasted text, still emit the input change event
260
+ // because this is how the native input element behaves
261
+ // but return early because there is nothing to paste.
262
+ if (!pastedText) {
263
+ this.emitIonInput(event);
264
+ return;
265
+ }
266
+ const validChars = pastedText
267
+ .split('')
268
+ .filter((char) => validKeyPattern.test(char))
269
+ .slice(0, length);
270
+ // Always paste starting at the first box
271
+ validChars.forEach((char, index) => {
272
+ if (index < length) {
273
+ this.inputRefs[index].value = char;
274
+ this.inputValues[index] = char;
275
+ }
276
+ });
277
+ // Update the value so that all input boxes are updated
278
+ this.value = validChars.join('');
279
+ this.updateValue(event);
280
+ // Focus the next empty input after pasting
281
+ // If all boxes are filled, focus the last input
282
+ const nextEmptyIndex = validChars.length;
283
+ if (nextEmptyIndex < length) {
284
+ (_b = inputRefs[nextEmptyIndex]) === null || _b === void 0 ? void 0 : _b.focus();
285
+ }
286
+ else {
287
+ (_c = inputRefs[length - 1]) === null || _c === void 0 ? void 0 : _c.focus();
288
+ }
289
+ };
290
+ }
291
+ /**
292
+ * Resets the value and focus state.
293
+ */
294
+ async reset() {
295
+ this.value = '';
296
+ this.focusedValue = null;
297
+ this.hasFocus = false;
298
+ this.inputRefs.forEach((input) => {
299
+ input.blur();
300
+ });
301
+ this.updateTabIndexes();
302
+ }
303
+ /**
304
+ * Sets focus to an input box.
305
+ * @param index - The index of the input box to focus (0-based).
306
+ * If provided and the input box has a value, the input box at that index will be focused.
307
+ * Otherwise, the first empty input box or the last input if all are filled will be focused.
308
+ */
309
+ async setFocus(index) {
310
+ var _a, _b;
311
+ if (typeof index === 'number') {
312
+ const validIndex = Math.max(0, Math.min(index, this.length - 1));
313
+ (_a = this.inputRefs[validIndex]) === null || _a === void 0 ? void 0 : _a.focus();
314
+ }
315
+ else {
316
+ const tabbableIndex = this.getTabbableIndex();
317
+ (_b = this.inputRefs[tabbableIndex]) === null || _b === void 0 ? void 0 : _b.focus();
318
+ }
319
+ }
320
+ valueChanged() {
321
+ this.initializeValues();
322
+ }
323
+ /**
324
+ * Processes the separators prop into an array of numbers.
325
+ *
326
+ * If the separators prop is not provided, returns an empty array.
327
+ * If the separators prop is 'all', returns an array of all valid positions (1 to length-1).
328
+ * If the separators prop is an array, returns it as is.
329
+ * If the separators prop is a string, splits it by commas and parses each part as a number.
330
+ *
331
+ * If the separators are greater than the input length, it will warn and ignore the separators.
332
+ */
333
+ processSeparators() {
334
+ const { separators, length } = this;
335
+ if (separators === undefined) {
336
+ this.parsedSeparators = [];
337
+ return;
338
+ }
339
+ if (typeof separators === 'string' && separators !== 'all') {
340
+ const isValidFormat = /^(\d+)(,\d+)*$/.test(separators);
341
+ if (!isValidFormat) {
342
+ printIonWarning(`[ion-input-otp] - Invalid separators format. Expected a comma-separated list of numbers, an array of numbers, or "all". Received: ${separators}`, this.el);
343
+ this.parsedSeparators = [];
344
+ return;
345
+ }
346
+ }
347
+ let separatorValues;
348
+ if (separators === 'all') {
349
+ separatorValues = Array.from({ length: length - 1 }, (_, i) => i + 1);
350
+ }
351
+ else if (Array.isArray(separators)) {
352
+ separatorValues = separators;
353
+ }
354
+ else {
355
+ separatorValues = separators
356
+ .split(',')
357
+ .map((pos) => parseInt(pos, 10))
358
+ .filter((pos) => !isNaN(pos));
359
+ }
360
+ // Check for duplicate separator positions
361
+ const duplicates = separatorValues.filter((pos, index) => separatorValues.indexOf(pos) !== index);
362
+ if (duplicates.length > 0) {
363
+ printIonWarning(`[ion-input-otp] - Duplicate separator positions are not allowed. Received: ${separators}`, this.el);
364
+ }
365
+ const invalidSeparators = separatorValues.filter((pos) => pos > length);
366
+ if (invalidSeparators.length > 0) {
367
+ printIonWarning(`[ion-input-otp] - The following separator positions are greater than the input length (${length}): ${invalidSeparators.join(', ')}. These separators will be ignored.`, this.el);
368
+ }
369
+ this.parsedSeparators = separatorValues.filter((pos) => pos <= length);
370
+ }
371
+ componentWillLoad() {
372
+ this.inheritedAttributes = inheritAriaAttributes(this.el);
373
+ this.processSeparators();
374
+ this.initializeValues();
375
+ }
376
+ componentDidLoad() {
377
+ this.updateTabIndexes();
378
+ }
379
+ /**
380
+ * Get the regex pattern for allowed characters.
381
+ * If a pattern is provided, use it to create a regex pattern
382
+ * Otherwise, use the default regex pattern based on type
383
+ */
384
+ get validKeyPattern() {
385
+ return new RegExp(`^${this.getPattern()}$`, 'u');
386
+ }
387
+ /**
388
+ * Gets the string pattern to pass to the input element
389
+ * and use in the regex for allowed characters.
390
+ */
391
+ getPattern() {
392
+ const { pattern, type } = this;
393
+ if (pattern) {
394
+ return pattern;
395
+ }
396
+ return type === 'number' ? '[\\p{N}]' : '[\\p{L}\\p{N}]';
397
+ }
398
+ /**
399
+ * Get the default value for inputmode.
400
+ * If inputmode is provided, use it.
401
+ * Otherwise, use the default inputmode based on type
402
+ */
403
+ getInputmode() {
404
+ const { inputmode } = this;
405
+ if (inputmode) {
406
+ return inputmode;
407
+ }
408
+ if (this.type == 'number') {
409
+ return 'numeric';
410
+ }
411
+ else {
412
+ return 'text';
413
+ }
414
+ }
415
+ /**
416
+ * Initializes the input values array based on the current value prop.
417
+ * This splits the value into individual characters and validates them against
418
+ * the allowed pattern. The values are then used as the values in the native
419
+ * input boxes and the value of the input group is updated.
420
+ */
421
+ initializeValues() {
422
+ // Clear all input values
423
+ this.inputValues = Array(this.length).fill('');
424
+ // If the value is null, undefined, or an empty string, return
425
+ if (this.value == null || String(this.value).length === 0) {
426
+ return;
427
+ }
428
+ // Split the value into individual characters and validate
429
+ // them against the allowed pattern
430
+ const chars = String(this.value).split('').slice(0, this.length);
431
+ chars.forEach((char, index) => {
432
+ if (this.validKeyPattern.test(char)) {
433
+ this.inputValues[index] = char;
434
+ }
435
+ });
436
+ // Update the value without emitting events
437
+ this.value = this.inputValues.join('');
438
+ }
439
+ /**
440
+ * Updates the value of the input group.
441
+ * This updates the value of the input group and emits an `ionChange` event.
442
+ * If all of the input boxes are filled, it emits an `ionComplete` event.
443
+ */
444
+ updateValue(event) {
445
+ const { inputValues, length } = this;
446
+ const newValue = inputValues.join('');
447
+ this.value = newValue;
448
+ this.emitIonInput(event);
449
+ if (newValue.length === length) {
450
+ this.ionComplete.emit({ value: newValue });
451
+ }
452
+ this.updateTabIndexes();
453
+ }
454
+ /**
455
+ * Emits an `ionChange` event.
456
+ * This API should be called for user committed changes.
457
+ * This API should not be used for external value changes.
458
+ */
459
+ emitIonChange(event) {
460
+ const { value } = this;
461
+ // Checks for both null and undefined values
462
+ const newValue = value == null ? value : value.toString();
463
+ this.ionChange.emit({ value: newValue, event });
464
+ }
465
+ /**
466
+ * Emits an `ionInput` event.
467
+ * This is used to emit the input value when the user types,
468
+ * backspaces, or pastes.
469
+ */
470
+ emitIonInput(event) {
471
+ const { value } = this;
472
+ // Checks for both null and undefined values
473
+ const newValue = value == null ? value : value.toString();
474
+ this.ionInput.emit({ value: newValue, event });
475
+ }
476
+ /**
477
+ * Focuses the next input box.
478
+ */
479
+ focusNext(currentIndex) {
480
+ var _a;
481
+ const { inputRefs, length } = this;
482
+ if (currentIndex < length - 1) {
483
+ (_a = inputRefs[currentIndex + 1]) === null || _a === void 0 ? void 0 : _a.focus();
484
+ }
485
+ }
486
+ /**
487
+ * Focuses the previous input box.
488
+ */
489
+ focusPrevious(currentIndex) {
490
+ var _a;
491
+ const { inputRefs } = this;
492
+ if (currentIndex > 0) {
493
+ (_a = inputRefs[currentIndex - 1]) === null || _a === void 0 ? void 0 : _a.focus();
494
+ }
495
+ }
496
+ /**
497
+ * Searches through the input values and returns the index
498
+ * of the first empty input.
499
+ * Returns -1 if all inputs are filled.
500
+ */
501
+ getFirstEmptyIndex() {
502
+ var _a;
503
+ const { inputValues, length } = this;
504
+ // Create an array of the same length as the input OTP
505
+ // and fill it with the input values
506
+ const values = Array.from({ length }, (_, i) => inputValues[i] || '');
507
+ return (_a = values.findIndex((value) => !value || value === '')) !== null && _a !== void 0 ? _a : -1;
508
+ }
509
+ /**
510
+ * Returns the index of the input that should be tabbed to.
511
+ * If all inputs are filled, returns the last input's index.
512
+ * Otherwise, returns the index of the first empty input.
513
+ */
514
+ getTabbableIndex() {
515
+ const { length } = this;
516
+ const firstEmptyIndex = this.getFirstEmptyIndex();
517
+ return firstEmptyIndex === -1 ? length - 1 : firstEmptyIndex;
518
+ }
519
+ /**
520
+ * Updates the tabIndexes for the input boxes.
521
+ * This is used to ensure that the correct input is
522
+ * focused when the user navigates using the tab key.
523
+ */
524
+ updateTabIndexes() {
525
+ const { inputRefs, inputValues, length } = this;
526
+ // Find first empty index after any filled boxes
527
+ let firstEmptyIndex = -1;
528
+ for (let i = 0; i < length; i++) {
529
+ if (!inputValues[i] || inputValues[i] === '') {
530
+ firstEmptyIndex = i;
531
+ break;
532
+ }
533
+ }
534
+ // Update tabIndex and aria-hidden for all inputs
535
+ inputRefs.forEach((input, index) => {
536
+ const shouldBeTabbable = firstEmptyIndex === -1 ? index === length - 1 : firstEmptyIndex === index;
537
+ input.tabIndex = shouldBeTabbable ? 0 : -1;
538
+ // If the input is empty and not the first empty input,
539
+ // it should be hidden from screen readers.
540
+ const isEmpty = !inputValues[index] || inputValues[index] === '';
541
+ input.setAttribute('aria-hidden', isEmpty && !shouldBeTabbable ? 'true' : 'false');
542
+ });
543
+ }
544
+ /**
545
+ * Determines if a separator should be shown for a given index by
546
+ * checking if the index is included in the parsed separators array.
547
+ */
548
+ showSeparator(index) {
549
+ const { length } = this;
550
+ return this.parsedSeparators.includes(index + 1) && index < length - 1;
551
+ }
552
+ render() {
553
+ var _a, _b;
554
+ const { autocapitalize, color, disabled, el, fill, hasFocus, inheritedAttributes, inputId, inputRefs, inputValues, length, readonly, shape, size, } = this;
555
+ const mode = getIonMode(this);
556
+ const inputmode = this.getInputmode();
557
+ const tabbableIndex = this.getTabbableIndex();
558
+ const pattern = this.getPattern();
559
+ const hasDescription = ((_b = (_a = el.querySelector('.input-otp-description')) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim()) !== '';
560
+ return (h(Host, { key: '973743fa99d77dbdaaf9b630b64180a189b5d778', class: createColorClasses(color, {
561
+ [mode]: true,
562
+ 'has-focus': hasFocus,
563
+ [`input-otp-size-${size}`]: true,
564
+ [`input-otp-shape-${shape}`]: true,
565
+ [`input-otp-fill-${fill}`]: true,
566
+ 'input-otp-disabled': disabled,
567
+ 'input-otp-readonly': readonly,
568
+ }) }, h("div", Object.assign({ key: '3891cbdc07d4fa017ea04590bbb6225ab68deff2', role: "group", "aria-label": "One-time password input", class: "input-otp-group" }, inheritedAttributes), Array.from({ length }).map((_, index) => (h(Fragment, null, h("div", { class: "native-wrapper" }, h("input", { class: "native-input", id: `${inputId}-${index}`, "aria-label": `Input ${index + 1} of ${length}`, type: "text", autoCapitalize: autocapitalize, inputmode: inputmode, maxLength: 1, pattern: pattern, disabled: disabled, readOnly: readonly, tabIndex: index === tabbableIndex ? 0 : -1, value: inputValues[index] || '', autocomplete: index === 0 ? 'one-time-code' : 'off', ref: (el) => (inputRefs[index] = el), onInput: this.onInput(index), onBlur: this.onBlur, onFocus: this.onFocus(index), onKeyDown: this.onKeyDown(index), onPaste: this.onPaste })), this.showSeparator(index) && h("div", { class: "input-otp-separator" }))))), h("div", { key: '0d3cfa8c081552d0c52a544a1c52c0e3d5d4f532', class: {
569
+ 'input-otp-description': true,
570
+ 'input-otp-description-hidden': !hasDescription,
571
+ } }, h("slot", { key: '13c3f795956749ccdf396bfb0ff882a9c9e9ce81' }))));
572
+ }
573
+ get el() { return getElement(this); }
574
+ static get watchers() { return {
575
+ "value": ["valueChanged"],
576
+ "separators": ["processSeparators"],
577
+ "length": ["processSeparators"]
578
+ }; }
579
+ };
580
+ let inputIds = 0;
581
+ InputOTP.style = {
582
+ ios: inputOtpIosCss,
583
+ md: inputOtpMdCss
584
+ };
585
+
586
+ export { InputOTP as ion_input_otp };
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
- import { r as registerInstance, h, d as Host, g as getElement } from './index-EP3pwcdb.js';
4
+ import { r as registerInstance, h, d as Host, g as getElement } from './index-3GtB1kQI.js';
5
5
  import { p as printIonWarning } from './index-CEo1SqXS.js';
6
6
  import { c as createColorClasses } from './theme-DiVJyqlX.js';
7
7
  import { x as eyeOff, y as eye } from './index-BLV6ykCk.js';
8
- import { b as getIonMode } from './ionic-global-DapnXdYs.js';
8
+ import { b as getIonMode } from './ionic-global-Dw-MNnQB.js';
9
9
 
10
10
  const iosInputPasswordToggleCss = "";
11
11
 
@@ -63,16 +63,16 @@ const InputPasswordToggle = class {
63
63
  const showPasswordIcon = (_a = this.showIcon) !== null && _a !== void 0 ? _a : eye;
64
64
  const hidePasswordIcon = (_b = this.hideIcon) !== null && _b !== void 0 ? _b : eyeOff;
65
65
  const isPasswordVisible = type === 'text';
66
- return (h(Host, { key: '1a28e078c83e74c72d8bb8189ece93ec2e3fa3d0', class: createColorClasses(color, {
66
+ return (h(Host, { key: '91bc55664d496fe457518bd112865dd7811d0c17', class: createColorClasses(color, {
67
67
  [mode]: true,
68
- }) }, h("ion-button", { key: '039d1bab764093bb6fe4a34299b0872abda087fd', mode: mode, color: color, fill: "clear", shape: "round", "aria-checked": isPasswordVisible ? 'true' : 'false', "aria-label": "show password", role: "switch", type: "button", onPointerDown: (ev) => {
68
+ }) }, h("ion-button", { key: '99f86e2ee97ffa6dbc74a433df4e22a867889dd7', mode: mode, color: color, fill: "clear", shape: "round", "aria-checked": isPasswordVisible ? 'true' : 'false', "aria-label": "show password", role: "switch", type: "button", onPointerDown: (ev) => {
69
69
  /**
70
70
  * This prevents mobile browsers from
71
71
  * blurring the input when the password toggle
72
72
  * button is activated.
73
73
  */
74
74
  ev.preventDefault();
75
- }, onClick: this.togglePasswordVisibility }, h("ion-icon", { key: '26477ee97b808c3d79944bf5e33d4e05f1ae0b3f', slot: "icon-only", "aria-hidden": "true", icon: isPasswordVisible ? hidePasswordIcon : showPasswordIcon }))));
75
+ }, onClick: this.togglePasswordVisibility }, h("ion-icon", { key: 'e7656040b08c6a394d56f1fc41d6ca34225287d2', slot: "icon-only", "aria-hidden": "true", icon: isPasswordVisible ? hidePasswordIcon : showPasswordIcon }))));
76
76
  }
77
77
  get el() { return getElement(this); }
78
78
  static get watchers() { return {