@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,625 @@
1
+ /*!
2
+ * (C) Ionic http://ionicframework.com - MIT License
3
+ */
4
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host, Fragment } from '@stencil/core/internal/client';
5
+ import { i as inheritAriaAttributes } from './helpers.js';
6
+ import { p as printIonWarning } from './index4.js';
7
+ import { i as isRTL } from './dir.js';
8
+ import { c as createColorClasses } from './theme.js';
9
+ import { b as getIonMode } from './ionic-global.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 = /*@__PURE__*/ proxyCustomElement(class InputOTP extends HTMLElement {
16
+ constructor() {
17
+ super();
18
+ this.__registerHost();
19
+ this.ionInput = createEvent(this, "ionInput", 7);
20
+ this.ionChange = createEvent(this, "ionChange", 7);
21
+ this.ionComplete = createEvent(this, "ionComplete", 7);
22
+ this.ionBlur = createEvent(this, "ionBlur", 7);
23
+ this.ionFocus = createEvent(this, "ionFocus", 7);
24
+ this.inheritedAttributes = {};
25
+ this.inputRefs = [];
26
+ this.inputId = `ion-input-otp-${inputIds++}`;
27
+ this.parsedSeparators = [];
28
+ /**
29
+ * Tracks whether the user is navigating through input boxes using keyboard navigation
30
+ * (arrow keys, tab) versus mouse clicks. This is used to determine the appropriate
31
+ * focus behavior when an input box is focused.
32
+ */
33
+ this.isKeyboardNavigation = false;
34
+ this.inputValues = [];
35
+ this.hasFocus = false;
36
+ /**
37
+ * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.
38
+ * Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
39
+ */
40
+ this.autocapitalize = 'off';
41
+ /**
42
+ * If `true`, the user cannot interact with the input.
43
+ */
44
+ this.disabled = false;
45
+ /**
46
+ * The fill for the input boxes. If `"solid"` the input boxes will have a background. If
47
+ * `"outline"` the input boxes will be transparent with a border.
48
+ */
49
+ this.fill = 'outline';
50
+ /**
51
+ * The number of input boxes to display.
52
+ */
53
+ this.length = 4;
54
+ /**
55
+ * If `true`, the user cannot modify the value.
56
+ */
57
+ this.readonly = false;
58
+ /**
59
+ * The shape of the input boxes.
60
+ * If "round" they will have an increased border radius.
61
+ * If "rectangular" they will have no border radius.
62
+ * If "soft" they will have a soft border radius.
63
+ */
64
+ this.shape = 'round';
65
+ /**
66
+ * The size of the input boxes.
67
+ */
68
+ this.size = 'medium';
69
+ /**
70
+ * The type of input allowed in the input boxes.
71
+ */
72
+ this.type = 'number';
73
+ /**
74
+ * The value of the input group.
75
+ */
76
+ this.value = '';
77
+ /**
78
+ * Handles the focus behavior for the input OTP component.
79
+ *
80
+ * Focus behavior:
81
+ * 1. Keyboard navigation: Allow normal focus movement
82
+ * 2. Mouse click:
83
+ * - If clicked box has value: Focus that box
84
+ * - If clicked box is empty: Focus first empty box
85
+ *
86
+ * Emits the `ionFocus` event when the input group gains focus.
87
+ */
88
+ this.onFocus = (index) => (event) => {
89
+ var _a;
90
+ const { inputRefs } = this;
91
+ // Only emit ionFocus and set the focusedValue when the
92
+ // component first gains focus
93
+ if (!this.hasFocus) {
94
+ this.ionFocus.emit(event);
95
+ this.focusedValue = this.value;
96
+ }
97
+ this.hasFocus = true;
98
+ let finalIndex = index;
99
+ if (!this.isKeyboardNavigation) {
100
+ // If the clicked box has a value, focus it
101
+ // Otherwise focus the first empty box
102
+ const targetIndex = this.inputValues[index] ? index : this.getFirstEmptyIndex();
103
+ finalIndex = targetIndex === -1 ? this.length - 1 : targetIndex;
104
+ // Focus the target box
105
+ (_a = this.inputRefs[finalIndex]) === null || _a === void 0 ? void 0 : _a.focus();
106
+ }
107
+ // Update tabIndexes to match the focused box
108
+ inputRefs.forEach((input, i) => {
109
+ input.tabIndex = i === finalIndex ? 0 : -1;
110
+ });
111
+ // Reset the keyboard navigation flag
112
+ this.isKeyboardNavigation = false;
113
+ };
114
+ /**
115
+ * Handles the blur behavior for the input OTP component.
116
+ * Emits the `ionBlur` event when the input group loses focus.
117
+ */
118
+ this.onBlur = (event) => {
119
+ const { inputRefs } = this;
120
+ const relatedTarget = event.relatedTarget;
121
+ // Do not emit blur if we're moving to another input box in the same component
122
+ const isInternalFocus = relatedTarget != null && inputRefs.includes(relatedTarget);
123
+ if (!isInternalFocus) {
124
+ this.hasFocus = false;
125
+ // Reset tabIndexes when focus leaves the component
126
+ this.updateTabIndexes();
127
+ // Always emit ionBlur when focus leaves the component
128
+ this.ionBlur.emit(event);
129
+ // Only emit ionChange if the value has actually changed
130
+ if (this.focusedValue !== this.value) {
131
+ this.emitIonChange(event);
132
+ }
133
+ }
134
+ };
135
+ /**
136
+ * Handles keyboard navigation and input for the OTP component.
137
+ *
138
+ * Navigation:
139
+ * - Backspace: Clears current input and moves to previous box if empty
140
+ * - Arrow Left/Right: Moves focus between input boxes
141
+ * - Tab: Allows normal tab navigation between components
142
+ *
143
+ * Input Behavior:
144
+ * - Validates input against the allowed pattern
145
+ * - When entering a key in a filled box:
146
+ * - Shifts existing values right if there is room
147
+ * - Updates the value of the input group
148
+ * - Prevents default behavior to avoid automatic focus shift
149
+ */
150
+ this.onKeyDown = (index) => (event) => {
151
+ const { length } = this;
152
+ const rtl = isRTL(this.el);
153
+ const input = event.target;
154
+ const isPasteShortcut = (event.metaKey || event.ctrlKey) && event.key.toLowerCase() === 'v';
155
+ const isTextSelection = input.selectionStart !== input.selectionEnd;
156
+ // Return if the key is the paste shortcut or the input value
157
+ // text is selected and let the onPaste / onInput handler manage it
158
+ if (isPasteShortcut || isTextSelection) {
159
+ return;
160
+ }
161
+ if (event.key === 'Backspace') {
162
+ if (this.inputValues[index]) {
163
+ // Shift all values to the right of the current index left by one
164
+ for (let i = index; i < length - 1; i++) {
165
+ this.inputValues[i] = this.inputValues[i + 1];
166
+ }
167
+ // Clear the last box
168
+ this.inputValues[length - 1] = '';
169
+ // Update all inputRefs to match inputValues
170
+ for (let i = 0; i < length; i++) {
171
+ this.inputRefs[i].value = this.inputValues[i] || '';
172
+ }
173
+ this.updateValue(event);
174
+ event.preventDefault();
175
+ }
176
+ else if (!this.inputValues[index] && index > 0) {
177
+ // If current input is empty, move to previous input
178
+ this.focusPrevious(index);
179
+ }
180
+ }
181
+ else if (event.key === 'ArrowLeft' || event.key === 'ArrowRight') {
182
+ this.isKeyboardNavigation = true;
183
+ event.preventDefault();
184
+ const isLeft = event.key === 'ArrowLeft';
185
+ const shouldMoveNext = (isLeft && rtl) || (!isLeft && !rtl);
186
+ // Only allow moving to the next input if the current has a value
187
+ if (shouldMoveNext) {
188
+ if (this.inputValues[index] && index < length - 1) {
189
+ this.focusNext(index);
190
+ }
191
+ }
192
+ else {
193
+ this.focusPrevious(index);
194
+ }
195
+ }
196
+ else if (event.key === 'Tab') {
197
+ this.isKeyboardNavigation = true;
198
+ // Let all tab events proceed normally
199
+ return;
200
+ }
201
+ // If the input box contains a value and the key being
202
+ // entered is a valid key for the input box update the value
203
+ // and shift the values to the right if there is room.
204
+ if (this.inputValues[index] && this.validKeyPattern.test(event.key)) {
205
+ if (!this.inputValues[length - 1]) {
206
+ for (let i = length - 1; i > index; i--) {
207
+ this.inputValues[i] = this.inputValues[i - 1];
208
+ this.inputRefs[i].value = this.inputValues[i] || '';
209
+ }
210
+ }
211
+ this.inputValues[index] = event.key;
212
+ this.inputRefs[index].value = event.key;
213
+ this.updateValue(event);
214
+ // Prevent default to avoid the browser from
215
+ // automatically moving the focus to the next input
216
+ event.preventDefault();
217
+ }
218
+ };
219
+ this.onInput = (index) => (event) => {
220
+ const { validKeyPattern } = this;
221
+ const value = event.target.value;
222
+ // Only allow input if it's a single character and matches the pattern
223
+ if (value.length > 1 || (value.length > 0 && !validKeyPattern.test(value))) {
224
+ // Reset the input value if not valid
225
+ this.inputRefs[index].value = '';
226
+ this.inputValues[index] = '';
227
+ return;
228
+ }
229
+ // Find the first empty box before or at the current index
230
+ let targetIndex = index;
231
+ for (let i = 0; i < index; i++) {
232
+ if (!this.inputValues[i] || this.inputValues[i] === '') {
233
+ targetIndex = i;
234
+ break;
235
+ }
236
+ }
237
+ // Set the value at the target index
238
+ this.inputValues[targetIndex] = value;
239
+ // If the value was entered in a later box, clear the current box
240
+ if (targetIndex !== index) {
241
+ this.inputRefs[index].value = '';
242
+ }
243
+ if (value.length > 0) {
244
+ this.focusNext(targetIndex);
245
+ }
246
+ this.updateValue(event);
247
+ };
248
+ /**
249
+ * Handles pasting text into the input OTP component.
250
+ * This function prevents the default paste behavior and
251
+ * validates the pasted text against the allowed pattern.
252
+ * It then updates the value of the input group and focuses
253
+ * the next empty input after pasting.
254
+ */
255
+ this.onPaste = (event) => {
256
+ var _a, _b, _c;
257
+ const { inputRefs, length, validKeyPattern } = this;
258
+ event.preventDefault();
259
+ const pastedText = (_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text');
260
+ // If there is no pasted text, still emit the input change event
261
+ // because this is how the native input element behaves
262
+ // but return early because there is nothing to paste.
263
+ if (!pastedText) {
264
+ this.emitIonInput(event);
265
+ return;
266
+ }
267
+ const validChars = pastedText
268
+ .split('')
269
+ .filter((char) => validKeyPattern.test(char))
270
+ .slice(0, length);
271
+ // Always paste starting at the first box
272
+ validChars.forEach((char, index) => {
273
+ if (index < length) {
274
+ this.inputRefs[index].value = char;
275
+ this.inputValues[index] = char;
276
+ }
277
+ });
278
+ // Update the value so that all input boxes are updated
279
+ this.value = validChars.join('');
280
+ this.updateValue(event);
281
+ // Focus the next empty input after pasting
282
+ // If all boxes are filled, focus the last input
283
+ const nextEmptyIndex = validChars.length;
284
+ if (nextEmptyIndex < length) {
285
+ (_b = inputRefs[nextEmptyIndex]) === null || _b === void 0 ? void 0 : _b.focus();
286
+ }
287
+ else {
288
+ (_c = inputRefs[length - 1]) === null || _c === void 0 ? void 0 : _c.focus();
289
+ }
290
+ };
291
+ }
292
+ /**
293
+ * Resets the value and focus state.
294
+ */
295
+ async reset() {
296
+ this.value = '';
297
+ this.focusedValue = null;
298
+ this.hasFocus = false;
299
+ this.inputRefs.forEach((input) => {
300
+ input.blur();
301
+ });
302
+ this.updateTabIndexes();
303
+ }
304
+ /**
305
+ * Sets focus to an input box.
306
+ * @param index - The index of the input box to focus (0-based).
307
+ * If provided and the input box has a value, the input box at that index will be focused.
308
+ * Otherwise, the first empty input box or the last input if all are filled will be focused.
309
+ */
310
+ async setFocus(index) {
311
+ var _a, _b;
312
+ if (typeof index === 'number') {
313
+ const validIndex = Math.max(0, Math.min(index, this.length - 1));
314
+ (_a = this.inputRefs[validIndex]) === null || _a === void 0 ? void 0 : _a.focus();
315
+ }
316
+ else {
317
+ const tabbableIndex = this.getTabbableIndex();
318
+ (_b = this.inputRefs[tabbableIndex]) === null || _b === void 0 ? void 0 : _b.focus();
319
+ }
320
+ }
321
+ valueChanged() {
322
+ this.initializeValues();
323
+ }
324
+ /**
325
+ * Processes the separators prop into an array of numbers.
326
+ *
327
+ * If the separators prop is not provided, returns an empty array.
328
+ * If the separators prop is 'all', returns an array of all valid positions (1 to length-1).
329
+ * If the separators prop is an array, returns it as is.
330
+ * If the separators prop is a string, splits it by commas and parses each part as a number.
331
+ *
332
+ * If the separators are greater than the input length, it will warn and ignore the separators.
333
+ */
334
+ processSeparators() {
335
+ const { separators, length } = this;
336
+ if (separators === undefined) {
337
+ this.parsedSeparators = [];
338
+ return;
339
+ }
340
+ if (typeof separators === 'string' && separators !== 'all') {
341
+ const isValidFormat = /^(\d+)(,\d+)*$/.test(separators);
342
+ if (!isValidFormat) {
343
+ printIonWarning(`[ion-input-otp] - Invalid separators format. Expected a comma-separated list of numbers, an array of numbers, or "all". Received: ${separators}`, this.el);
344
+ this.parsedSeparators = [];
345
+ return;
346
+ }
347
+ }
348
+ let separatorValues;
349
+ if (separators === 'all') {
350
+ separatorValues = Array.from({ length: length - 1 }, (_, i) => i + 1);
351
+ }
352
+ else if (Array.isArray(separators)) {
353
+ separatorValues = separators;
354
+ }
355
+ else {
356
+ separatorValues = separators
357
+ .split(',')
358
+ .map((pos) => parseInt(pos, 10))
359
+ .filter((pos) => !isNaN(pos));
360
+ }
361
+ // Check for duplicate separator positions
362
+ const duplicates = separatorValues.filter((pos, index) => separatorValues.indexOf(pos) !== index);
363
+ if (duplicates.length > 0) {
364
+ printIonWarning(`[ion-input-otp] - Duplicate separator positions are not allowed. Received: ${separators}`, this.el);
365
+ }
366
+ const invalidSeparators = separatorValues.filter((pos) => pos > length);
367
+ if (invalidSeparators.length > 0) {
368
+ printIonWarning(`[ion-input-otp] - The following separator positions are greater than the input length (${length}): ${invalidSeparators.join(', ')}. These separators will be ignored.`, this.el);
369
+ }
370
+ this.parsedSeparators = separatorValues.filter((pos) => pos <= length);
371
+ }
372
+ componentWillLoad() {
373
+ this.inheritedAttributes = inheritAriaAttributes(this.el);
374
+ this.processSeparators();
375
+ this.initializeValues();
376
+ }
377
+ componentDidLoad() {
378
+ this.updateTabIndexes();
379
+ }
380
+ /**
381
+ * Get the regex pattern for allowed characters.
382
+ * If a pattern is provided, use it to create a regex pattern
383
+ * Otherwise, use the default regex pattern based on type
384
+ */
385
+ get validKeyPattern() {
386
+ return new RegExp(`^${this.getPattern()}$`, 'u');
387
+ }
388
+ /**
389
+ * Gets the string pattern to pass to the input element
390
+ * and use in the regex for allowed characters.
391
+ */
392
+ getPattern() {
393
+ const { pattern, type } = this;
394
+ if (pattern) {
395
+ return pattern;
396
+ }
397
+ return type === 'number' ? '[\\p{N}]' : '[\\p{L}\\p{N}]';
398
+ }
399
+ /**
400
+ * Get the default value for inputmode.
401
+ * If inputmode is provided, use it.
402
+ * Otherwise, use the default inputmode based on type
403
+ */
404
+ getInputmode() {
405
+ const { inputmode } = this;
406
+ if (inputmode) {
407
+ return inputmode;
408
+ }
409
+ if (this.type == 'number') {
410
+ return 'numeric';
411
+ }
412
+ else {
413
+ return 'text';
414
+ }
415
+ }
416
+ /**
417
+ * Initializes the input values array based on the current value prop.
418
+ * This splits the value into individual characters and validates them against
419
+ * the allowed pattern. The values are then used as the values in the native
420
+ * input boxes and the value of the input group is updated.
421
+ */
422
+ initializeValues() {
423
+ // Clear all input values
424
+ this.inputValues = Array(this.length).fill('');
425
+ // If the value is null, undefined, or an empty string, return
426
+ if (this.value == null || String(this.value).length === 0) {
427
+ return;
428
+ }
429
+ // Split the value into individual characters and validate
430
+ // them against the allowed pattern
431
+ const chars = String(this.value).split('').slice(0, this.length);
432
+ chars.forEach((char, index) => {
433
+ if (this.validKeyPattern.test(char)) {
434
+ this.inputValues[index] = char;
435
+ }
436
+ });
437
+ // Update the value without emitting events
438
+ this.value = this.inputValues.join('');
439
+ }
440
+ /**
441
+ * Updates the value of the input group.
442
+ * This updates the value of the input group and emits an `ionChange` event.
443
+ * If all of the input boxes are filled, it emits an `ionComplete` event.
444
+ */
445
+ updateValue(event) {
446
+ const { inputValues, length } = this;
447
+ const newValue = inputValues.join('');
448
+ this.value = newValue;
449
+ this.emitIonInput(event);
450
+ if (newValue.length === length) {
451
+ this.ionComplete.emit({ value: newValue });
452
+ }
453
+ this.updateTabIndexes();
454
+ }
455
+ /**
456
+ * Emits an `ionChange` event.
457
+ * This API should be called for user committed changes.
458
+ * This API should not be used for external value changes.
459
+ */
460
+ emitIonChange(event) {
461
+ const { value } = this;
462
+ // Checks for both null and undefined values
463
+ const newValue = value == null ? value : value.toString();
464
+ this.ionChange.emit({ value: newValue, event });
465
+ }
466
+ /**
467
+ * Emits an `ionInput` event.
468
+ * This is used to emit the input value when the user types,
469
+ * backspaces, or pastes.
470
+ */
471
+ emitIonInput(event) {
472
+ const { value } = this;
473
+ // Checks for both null and undefined values
474
+ const newValue = value == null ? value : value.toString();
475
+ this.ionInput.emit({ value: newValue, event });
476
+ }
477
+ /**
478
+ * Focuses the next input box.
479
+ */
480
+ focusNext(currentIndex) {
481
+ var _a;
482
+ const { inputRefs, length } = this;
483
+ if (currentIndex < length - 1) {
484
+ (_a = inputRefs[currentIndex + 1]) === null || _a === void 0 ? void 0 : _a.focus();
485
+ }
486
+ }
487
+ /**
488
+ * Focuses the previous input box.
489
+ */
490
+ focusPrevious(currentIndex) {
491
+ var _a;
492
+ const { inputRefs } = this;
493
+ if (currentIndex > 0) {
494
+ (_a = inputRefs[currentIndex - 1]) === null || _a === void 0 ? void 0 : _a.focus();
495
+ }
496
+ }
497
+ /**
498
+ * Searches through the input values and returns the index
499
+ * of the first empty input.
500
+ * Returns -1 if all inputs are filled.
501
+ */
502
+ getFirstEmptyIndex() {
503
+ var _a;
504
+ const { inputValues, length } = this;
505
+ // Create an array of the same length as the input OTP
506
+ // and fill it with the input values
507
+ const values = Array.from({ length }, (_, i) => inputValues[i] || '');
508
+ return (_a = values.findIndex((value) => !value || value === '')) !== null && _a !== void 0 ? _a : -1;
509
+ }
510
+ /**
511
+ * Returns the index of the input that should be tabbed to.
512
+ * If all inputs are filled, returns the last input's index.
513
+ * Otherwise, returns the index of the first empty input.
514
+ */
515
+ getTabbableIndex() {
516
+ const { length } = this;
517
+ const firstEmptyIndex = this.getFirstEmptyIndex();
518
+ return firstEmptyIndex === -1 ? length - 1 : firstEmptyIndex;
519
+ }
520
+ /**
521
+ * Updates the tabIndexes for the input boxes.
522
+ * This is used to ensure that the correct input is
523
+ * focused when the user navigates using the tab key.
524
+ */
525
+ updateTabIndexes() {
526
+ const { inputRefs, inputValues, length } = this;
527
+ // Find first empty index after any filled boxes
528
+ let firstEmptyIndex = -1;
529
+ for (let i = 0; i < length; i++) {
530
+ if (!inputValues[i] || inputValues[i] === '') {
531
+ firstEmptyIndex = i;
532
+ break;
533
+ }
534
+ }
535
+ // Update tabIndex and aria-hidden for all inputs
536
+ inputRefs.forEach((input, index) => {
537
+ const shouldBeTabbable = firstEmptyIndex === -1 ? index === length - 1 : firstEmptyIndex === index;
538
+ input.tabIndex = shouldBeTabbable ? 0 : -1;
539
+ // If the input is empty and not the first empty input,
540
+ // it should be hidden from screen readers.
541
+ const isEmpty = !inputValues[index] || inputValues[index] === '';
542
+ input.setAttribute('aria-hidden', isEmpty && !shouldBeTabbable ? 'true' : 'false');
543
+ });
544
+ }
545
+ /**
546
+ * Determines if a separator should be shown for a given index by
547
+ * checking if the index is included in the parsed separators array.
548
+ */
549
+ showSeparator(index) {
550
+ const { length } = this;
551
+ return this.parsedSeparators.includes(index + 1) && index < length - 1;
552
+ }
553
+ render() {
554
+ var _a, _b;
555
+ const { autocapitalize, color, disabled, el, fill, hasFocus, inheritedAttributes, inputId, inputRefs, inputValues, length, readonly, shape, size, } = this;
556
+ const mode = getIonMode(this);
557
+ const inputmode = this.getInputmode();
558
+ const tabbableIndex = this.getTabbableIndex();
559
+ const pattern = this.getPattern();
560
+ 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()) !== '';
561
+ return (h(Host, { key: '973743fa99d77dbdaaf9b630b64180a189b5d778', class: createColorClasses(color, {
562
+ [mode]: true,
563
+ 'has-focus': hasFocus,
564
+ [`input-otp-size-${size}`]: true,
565
+ [`input-otp-shape-${shape}`]: true,
566
+ [`input-otp-fill-${fill}`]: true,
567
+ 'input-otp-disabled': disabled,
568
+ 'input-otp-readonly': readonly,
569
+ }) }, 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: {
570
+ 'input-otp-description': true,
571
+ 'input-otp-description-hidden': !hasDescription,
572
+ } }, h("slot", { key: '13c3f795956749ccdf396bfb0ff882a9c9e9ce81' }))));
573
+ }
574
+ get el() { return this; }
575
+ static get watchers() { return {
576
+ "value": ["valueChanged"],
577
+ "separators": ["processSeparators"],
578
+ "length": ["processSeparators"]
579
+ }; }
580
+ static get style() { return {
581
+ ios: inputOtpIosCss,
582
+ md: inputOtpMdCss
583
+ }; }
584
+ }, [38, "ion-input-otp", {
585
+ "autocapitalize": [1],
586
+ "color": [513],
587
+ "disabled": [516],
588
+ "fill": [1],
589
+ "inputmode": [1],
590
+ "length": [2],
591
+ "pattern": [1],
592
+ "readonly": [516],
593
+ "separators": [1],
594
+ "shape": [1],
595
+ "size": [1],
596
+ "type": [1],
597
+ "value": [1032],
598
+ "inputValues": [32],
599
+ "hasFocus": [32],
600
+ "reset": [64],
601
+ "setFocus": [64]
602
+ }, undefined, {
603
+ "value": ["valueChanged"],
604
+ "separators": ["processSeparators"],
605
+ "length": ["processSeparators"]
606
+ }]);
607
+ let inputIds = 0;
608
+ function defineCustomElement$1() {
609
+ if (typeof customElements === "undefined") {
610
+ return;
611
+ }
612
+ const components = ["ion-input-otp"];
613
+ components.forEach(tagName => { switch (tagName) {
614
+ case "ion-input-otp":
615
+ if (!customElements.get(tagName)) {
616
+ customElements.define(tagName, InputOTP);
617
+ }
618
+ break;
619
+ } });
620
+ }
621
+
622
+ const IonInputOtp = InputOTP;
623
+ const defineCustomElement = defineCustomElement$1;
624
+
625
+ export { IonInputOtp, defineCustomElement };
@@ -68,16 +68,16 @@ const InputPasswordToggle = /*@__PURE__*/ proxyCustomElement(class InputPassword
68
68
  const showPasswordIcon = (_a = this.showIcon) !== null && _a !== void 0 ? _a : eye;
69
69
  const hidePasswordIcon = (_b = this.hideIcon) !== null && _b !== void 0 ? _b : eyeOff;
70
70
  const isPasswordVisible = type === 'text';
71
- return (h(Host, { key: '1a28e078c83e74c72d8bb8189ece93ec2e3fa3d0', class: createColorClasses(color, {
71
+ return (h(Host, { key: '91bc55664d496fe457518bd112865dd7811d0c17', class: createColorClasses(color, {
72
72
  [mode]: true,
73
- }) }, 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) => {
73
+ }) }, 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) => {
74
74
  /**
75
75
  * This prevents mobile browsers from
76
76
  * blurring the input when the password toggle
77
77
  * button is activated.
78
78
  */
79
79
  ev.preventDefault();
80
- }, onClick: this.togglePasswordVisibility }, h("ion-icon", { key: '26477ee97b808c3d79944bf5e33d4e05f1ae0b3f', slot: "icon-only", "aria-hidden": "true", icon: isPasswordVisible ? hidePasswordIcon : showPasswordIcon }))));
80
+ }, onClick: this.togglePasswordVisibility }, h("ion-icon", { key: 'e7656040b08c6a394d56f1fc41d6ca34225287d2', slot: "icon-only", "aria-hidden": "true", icon: isPasswordVisible ? hidePasswordIcon : showPasswordIcon }))));
81
81
  }
82
82
  get el() { return this; }
83
83
  static get watchers() { return {