@ionic/core 8.5.7-dev.11747180955.1e468923 → 8.5.7-dev.11747676931.1d53b808

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 +0 -18
  2. package/components/ion-input-otp.d.ts +11 -0
  3. package/components/ion-input-otp.js +611 -0
  4. package/components/ion-input-password-toggle.js +3 -3
  5. package/components/ion-input.js +10 -2
  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-BIfSj_O3.js → input-shims-DGvxKeWy.js} +0 -18
  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 +574 -0
  87. package/dist/cjs/ion-input-password-toggle.cjs.entry.js +5 -5
  88. package/dist/cjs/ion-input.cjs.entry.js +12 -4
  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 +10 -2
  129. package/dist/collection/components/input-otp/input-otp-interface.js +1 -0
  130. package/dist/collection/components/input-otp/input-otp.ios.css +377 -0
  131. package/dist/collection/components/input-otp/input-otp.js +999 -0
  132. package/dist/collection/components/input-otp/input-otp.md.css +377 -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 +0 -18
  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-BbXgvAcA.js → input-shims-qlIPzMSm.js} +0 -18
  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 +572 -0
  217. package/dist/esm/ion-input-password-toggle.entry.js +5 -5
  218. package/dist/esm/ion-input.entry.js +12 -4
  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-178084cb.entry.js +4 -0
  265. package/dist/ionic/{p-3edb2346.entry.js → p-1da92348.entry.js} +1 -1
  266. package/dist/ionic/{p-12b44c66.entry.js → p-1e9ea564.entry.js} +1 -1
  267. package/dist/ionic/p-1fe35f29.entry.js +4 -0
  268. package/dist/ionic/{p-f0c5ea4c.entry.js → p-2438054c.entry.js} +1 -1
  269. package/dist/ionic/{p-b2b0f539.entry.js → p-250c972f.entry.js} +1 -1
  270. package/dist/ionic/{p-306eab7a.entry.js → p-2517fcdf.entry.js} +1 -1
  271. package/dist/ionic/{p-61f52724.entry.js → p-29186993.entry.js} +1 -1
  272. package/dist/ionic/{p-89e3b3c6.entry.js → p-2c6931ed.entry.js} +1 -1
  273. package/dist/ionic/{p-112af08b.entry.js → p-2e42fa68.entry.js} +1 -1
  274. package/dist/ionic/{p-EP3pwcdb.js → p-3GtB1kQI.js} +2 -2
  275. package/dist/ionic/{p-e2e4b1f1.entry.js → p-3ca63859.entry.js} +1 -1
  276. package/dist/ionic/{p-bc9feb4b.entry.js → p-3fa87259.entry.js} +1 -1
  277. package/dist/ionic/{p-08232f2d.entry.js → p-43f012a4.entry.js} +1 -1
  278. package/dist/ionic/{p-ff362ebc.entry.js → p-5756b724.entry.js} +1 -1
  279. package/dist/ionic/{p-4a5cf7ac.entry.js → p-592db4a8.entry.js} +1 -1
  280. package/dist/ionic/{p-a9997b1b.entry.js → p-691fa8c7.entry.js} +1 -1
  281. package/dist/ionic/{p-38598652.entry.js → p-6bd192d8.entry.js} +1 -1
  282. package/dist/ionic/{p-d887000e.entry.js → p-7a6c96ca.entry.js} +1 -1
  283. package/dist/ionic/{p-df87cf2d.entry.js → p-832b6c90.entry.js} +1 -1
  284. package/dist/ionic/p-8c496d65.entry.js +4 -0
  285. package/dist/ionic/{p-46c15fe2.entry.js → p-8d7afec5.entry.js} +1 -1
  286. package/dist/ionic/{p-93996b12.entry.js → p-920540c6.entry.js} +1 -1
  287. package/dist/ionic/{p-e471e1e5.entry.js → p-9262223a.entry.js} +1 -1
  288. package/dist/ionic/{p-5fb997f8.entry.js → p-96d912f5.entry.js} +1 -1
  289. package/dist/ionic/{p-49122d48.entry.js → p-98f759e4.entry.js} +1 -1
  290. package/dist/ionic/{p-c19bc276.entry.js → p-99cc16fb.entry.js} +1 -1
  291. package/dist/ionic/{p-46a1ce99.entry.js → p-9c7d7711.entry.js} +1 -1
  292. package/dist/ionic/p-B7Khsp7D.js +4 -0
  293. package/dist/ionic/{p-DCstKNei.js → p-BBMlbfDQ.js} +1 -1
  294. package/dist/ionic/{p-LpklIrOy.js → p-BC2IYr2c.js} +1 -1
  295. package/dist/ionic/{p-Uz6zKimy.js → p-CGyDG2ar.js} +1 -1
  296. package/dist/ionic/p-CO_y91jJ.js +4 -0
  297. package/dist/ionic/{p-DPhSdjFK.js → p-CjUUcfjC.js} +1 -1
  298. package/dist/ionic/{p-Dnc554yu.js → p-CuVupNFU.js} +1 -1
  299. package/dist/ionic/{p-BSMFLyVh.js → p-DYqTiW2v.js} +1 -1
  300. package/dist/ionic/p-DjV8cNim.js +4 -0
  301. package/dist/ionic/{p-484073b5.entry.js → p-a20a15cc.entry.js} +1 -1
  302. package/dist/ionic/{p-5b8abc2f.entry.js → p-a22fe54d.entry.js} +1 -1
  303. package/dist/ionic/p-a6db87e1.entry.js +4 -0
  304. package/dist/ionic/{p-38dcbd40.entry.js → p-b18a4590.entry.js} +1 -1
  305. package/dist/ionic/{p-aeb7297a.entry.js → p-bc84650a.entry.js} +1 -1
  306. package/dist/ionic/p-bf6b00ab.entry.js +4 -0
  307. package/dist/ionic/{p-a26637b1.entry.js → p-c1b0e3b6.entry.js} +1 -1
  308. package/dist/ionic/{p-4119d144.entry.js → p-cde545fa.entry.js} +1 -1
  309. package/dist/ionic/{p-ce26cd7d.entry.js → p-d4742f5c.entry.js} +1 -1
  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 +270 -0
  325. package/dist/types/components.d.ts +167 -0
  326. package/dist/types/interface.d.ts +1 -0
  327. package/hydrate/index.js +701 -101
  328. package/hydrate/index.mjs +701 -101
  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-83fdd9f6.entry.js +0 -4
  334. package/dist/ionic/p-CqNf-A5G.js +0 -4
  335. package/dist/ionic/p-DWFxQD6t.js +0 -4
  336. package/dist/ionic/p-EglNvYQn.js +0 -4
@@ -0,0 +1,574 @@
1
+ /*!
2
+ * (C) Ionic http://ionicframework.com - MIT License
3
+ */
4
+ 'use strict';
5
+
6
+ var index = require('./index-B6-BlKCh.js');
7
+ var index$1 = require('./index-CAT7dkq1.js');
8
+ var dir = require('./dir-Cn0z1rJH.js');
9
+ var theme = require('./theme-CeDs6Hcv.js');
10
+ var ionicGlobal = require('./ionic-global-C3I6b0Is.js');
11
+
12
+ 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-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))))}";
13
+
14
+ 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-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))}";
15
+
16
+ const InputOTP = class {
17
+ constructor(hostRef) {
18
+ index.registerInstance(this, hostRef);
19
+ this.ionInput = index.createEvent(this, "ionInput", 7);
20
+ this.ionChange = index.createEvent(this, "ionChange", 7);
21
+ this.ionComplete = index.createEvent(this, "ionComplete", 7);
22
+ this.ionBlur = index.createEvent(this, "ionBlur", 7);
23
+ this.ionFocus = index.createEvent(this, "ionFocus", 7);
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 size of the input boxes.
59
+ */
60
+ this.size = 'medium';
61
+ /**
62
+ * The shape of the input boxes.
63
+ * If "round" they will have an increased border radius.
64
+ * If "rectangular" they will have no border radius.
65
+ * If "soft" they will have a soft border radius.
66
+ */
67
+ this.shape = 'round';
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
+ this.onInput = (index) => (event) => {
77
+ const { validKeys } = this;
78
+ const value = event.target.value;
79
+ // Only allow input if it's a single character and matches the pattern
80
+ if (value.length > 1 || (value.length > 0 && !validKeys.test(value))) {
81
+ // Reset the input value if not valid
82
+ this.inputRefs[index].value = '';
83
+ this.inputValues[index] = '';
84
+ return;
85
+ }
86
+ // Find the first empty box before or at the current index
87
+ let targetIndex = index;
88
+ for (let i = 0; i < index; i++) {
89
+ if (!this.inputValues[i] || this.inputValues[i] === '') {
90
+ targetIndex = i;
91
+ break;
92
+ }
93
+ }
94
+ // Set the value at the target index
95
+ this.inputValues[targetIndex] = value;
96
+ // If the value was entered in a later box, clear the current box
97
+ if (targetIndex !== index) {
98
+ this.inputRefs[index].value = '';
99
+ }
100
+ if (value.length > 0) {
101
+ this.focusNext(targetIndex);
102
+ }
103
+ this.updateValue(event);
104
+ };
105
+ /**
106
+ * Handles keyboard navigation and input for the OTP component.
107
+ *
108
+ * Navigation:
109
+ * - Backspace: Clears current input and moves to previous box if empty
110
+ * - Arrow Left/Right: Moves focus between input boxes
111
+ * - Tab: Allows normal tab navigation between components
112
+ *
113
+ * Input Behavior:
114
+ * - Validates input against the allowed pattern
115
+ * - When entering a key in a filled box:
116
+ * - Shifts existing values right if there is room
117
+ * - Updates the value of the input group
118
+ * - Prevents default behavior to avoid automatic focus shift
119
+ */
120
+ this.onKeyDown = (index) => (event) => {
121
+ const { length } = this;
122
+ const rtl = dir.isRTL(this.el);
123
+ const input = event.target;
124
+ const isPasteShortcut = (event.metaKey || event.ctrlKey) && event.key.toLowerCase() === 'v';
125
+ const isTextSelection = input.selectionStart !== input.selectionEnd;
126
+ // Return if the key is the paste shortcut or the input value
127
+ // text is selected and let the onPaste / onInput handler manage it
128
+ if (isPasteShortcut || isTextSelection) {
129
+ return;
130
+ }
131
+ if (event.key === 'Backspace') {
132
+ if (this.inputValues[index]) {
133
+ // Remove the value at the current index
134
+ this.inputValues[index] = '';
135
+ // Shift all values to the right of the current index left by one
136
+ for (let i = index; i < length - 1; i++) {
137
+ this.inputValues[i] = this.inputValues[i + 1];
138
+ }
139
+ // Clear the last box
140
+ this.inputValues[length - 1] = '';
141
+ // Update all inputRefs to match inputValues
142
+ for (let i = 0; i < length; i++) {
143
+ this.inputRefs[i].value = this.inputValues[i] || '';
144
+ }
145
+ this.updateValue(event);
146
+ event.preventDefault();
147
+ }
148
+ else if (!this.inputValues[index] && index > 0) {
149
+ // If current input is empty, move to previous input
150
+ this.focusPrevious(index);
151
+ }
152
+ }
153
+ else if (event.key === 'ArrowLeft' || event.key === 'ArrowRight') {
154
+ this.isKeyboardNavigation = true;
155
+ event.preventDefault();
156
+ const isLeft = event.key === 'ArrowLeft';
157
+ const shouldMoveNext = (isLeft && rtl) || (!isLeft && !rtl);
158
+ // Only allow moving to the next input if the current has a value
159
+ if (shouldMoveNext) {
160
+ if (this.inputValues[index] && index < length - 1) {
161
+ this.focusNext(index);
162
+ }
163
+ }
164
+ else {
165
+ this.focusPrevious(index);
166
+ }
167
+ }
168
+ else if (event.key === 'Tab') {
169
+ this.isKeyboardNavigation = true;
170
+ // Let all tab events proceed normally
171
+ return;
172
+ }
173
+ // If the input box contains a value and the key being
174
+ // entered is a valid key for the input box update the value
175
+ // and shift the values to the right if there is room.
176
+ if (this.inputValues[index] && this.validKeys.test(event.key)) {
177
+ if (!this.inputValues[length - 1]) {
178
+ for (let i = length - 1; i > index; i--) {
179
+ this.inputValues[i] = this.inputValues[i - 1];
180
+ this.inputRefs[i].value = this.inputValues[i] || '';
181
+ }
182
+ }
183
+ this.inputValues[index] = event.key;
184
+ this.inputRefs[index].value = event.key;
185
+ this.updateValue(event);
186
+ // Prevent default to avoid the browser from
187
+ // automatically moving the focus to the next input
188
+ event.preventDefault();
189
+ }
190
+ };
191
+ /**
192
+ * Handles pasting text into the input OTP component.
193
+ * This function prevents the default paste behavior and
194
+ * validates the pasted text against the allowed pattern.
195
+ * It then updates the value of the input group and focuses
196
+ * the next empty input after pasting.
197
+ */
198
+ this.onPaste = (event) => {
199
+ var _a, _b, _c;
200
+ const { inputRefs, length, validKeys } = this;
201
+ event.preventDefault();
202
+ const pastedText = (_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text');
203
+ // If there is no pasted text, still emit the input change event
204
+ // because this is how the native input element behaves
205
+ // but return early because there is nothing to paste.
206
+ if (!pastedText) {
207
+ this.emitIonInput(event);
208
+ return;
209
+ }
210
+ const validChars = pastedText
211
+ .split('')
212
+ .filter((char) => validKeys.test(char))
213
+ .slice(0, length);
214
+ // Find the first empty input
215
+ const startIndex = this.getFirstEmptyIndex();
216
+ // If all boxes are filled, start at 0
217
+ const pasteStart = startIndex === -1 ? 0 : startIndex;
218
+ validChars.forEach((char, index) => {
219
+ const targetIndex = pasteStart + index;
220
+ if (targetIndex < length) {
221
+ this.inputRefs[targetIndex].value = char;
222
+ this.inputValues[targetIndex] = char;
223
+ }
224
+ });
225
+ this.updateValue(event);
226
+ // Focus the next empty input after pasting
227
+ // If all boxes are filled, focus the last input
228
+ const nextEmptyIndex = pasteStart + validChars.length;
229
+ if (nextEmptyIndex < length) {
230
+ (_b = inputRefs[nextEmptyIndex]) === null || _b === void 0 ? void 0 : _b.focus();
231
+ }
232
+ else {
233
+ (_c = inputRefs[length - 1]) === null || _c === void 0 ? void 0 : _c.focus();
234
+ }
235
+ };
236
+ /**
237
+ * Handles the focus behavior for the input OTP component.
238
+ *
239
+ * Focus behavior:
240
+ * 1. Keyboard navigation: Allow normal focus movement
241
+ * 2. Mouse click:
242
+ * - If clicked box has value: Focus that box
243
+ * - If clicked box is empty: Focus first empty box
244
+ *
245
+ * Emits the `ionFocus` event when the input group gains focus.
246
+ */
247
+ this.onFocus = (index) => (event) => {
248
+ var _a;
249
+ const { inputRefs } = this;
250
+ // Only emit ionFocus and set the focusedValue when the
251
+ // component first gains focus
252
+ if (!this.hasFocus) {
253
+ this.ionFocus.emit(event);
254
+ this.focusedValue = this.value;
255
+ }
256
+ this.hasFocus = true;
257
+ let finalIndex = index;
258
+ if (!this.isKeyboardNavigation) {
259
+ // If the clicked box has a value, focus it
260
+ // Otherwise focus the first empty box
261
+ const targetIndex = this.inputValues[index] ? index : this.getFirstEmptyIndex();
262
+ finalIndex = targetIndex === -1 ? this.length - 1 : targetIndex;
263
+ // Focus the target box
264
+ (_a = this.inputRefs[finalIndex]) === null || _a === void 0 ? void 0 : _a.focus();
265
+ }
266
+ // Update tabIndexes to match the focused box
267
+ inputRefs.forEach((input, i) => {
268
+ input.tabIndex = i === finalIndex ? 0 : -1;
269
+ });
270
+ // Reset the keyboard navigation flag
271
+ this.isKeyboardNavigation = false;
272
+ };
273
+ /**
274
+ * Handles the blur behavior for the input OTP component.
275
+ * Emits the `ionBlur` event when the input group loses focus.
276
+ */
277
+ this.onBlur = (event) => {
278
+ const { inputRefs } = this;
279
+ const relatedTarget = event.relatedTarget;
280
+ // Do not emit blur if we're moving to another input box in the same component
281
+ const isInternalFocus = relatedTarget != null && inputRefs.includes(relatedTarget);
282
+ if (!isInternalFocus) {
283
+ this.hasFocus = false;
284
+ // Reset tabIndexes when focus leaves the component
285
+ this.updateTabIndexes();
286
+ // Always emit ionBlur when focus leaves the component
287
+ this.ionBlur.emit(event);
288
+ // Only emit ionChange if the value has actually changed
289
+ if (this.focusedValue !== this.value) {
290
+ this.emitIonChange(event);
291
+ }
292
+ }
293
+ };
294
+ }
295
+ valueChanged() {
296
+ this.initializeValues();
297
+ }
298
+ /**
299
+ * Processes the separators prop into an array of numbers.
300
+ *
301
+ * If the separators prop is not provided, returns an empty array.
302
+ * If the separators prop is 'all', returns an array of all valid positions (1 to length-1).
303
+ * If the separators prop is an array, returns it as is.
304
+ * If the separators prop is a string, splits it by commas and parses each part as a number.
305
+ *
306
+ * If the separators are greater than the input length, it will warn and ignore the separators.
307
+ */
308
+ processSeparators() {
309
+ const { separators, length } = this;
310
+ if (separators === undefined) {
311
+ this.parsedSeparators = [];
312
+ return;
313
+ }
314
+ if (typeof separators === 'string' && separators !== 'all') {
315
+ const isValidFormat = /^(\d+)(,\d+)*$/.test(separators);
316
+ if (!isValidFormat) {
317
+ index$1.printIonWarning(`[ion-input-otp] - Invalid separators format. Expected a comma-separated list of numbers, an array of numbers, or "all". Received: ${separators}`, this.el);
318
+ this.parsedSeparators = [];
319
+ return;
320
+ }
321
+ }
322
+ let separatorValues;
323
+ if (separators === 'all') {
324
+ separatorValues = Array.from({ length: length - 1 }, (_, i) => i + 1);
325
+ }
326
+ else if (Array.isArray(separators)) {
327
+ separatorValues = separators;
328
+ }
329
+ else {
330
+ separatorValues = separators
331
+ .split(',')
332
+ .map((pos) => parseInt(pos, 10))
333
+ .filter((pos) => !isNaN(pos));
334
+ }
335
+ // Check for duplicate separator positions
336
+ const duplicates = separatorValues.filter((pos, index) => separatorValues.indexOf(pos) !== index);
337
+ if (duplicates.length > 0) {
338
+ index$1.printIonWarning(`[ion-input-otp] - Duplicate separator positions are not allowed. Received: ${separators}`, this.el);
339
+ }
340
+ const invalidSeparators = separatorValues.filter((pos) => pos > length);
341
+ if (invalidSeparators.length > 0) {
342
+ index$1.printIonWarning(`[ion-input-otp] - The following separator positions are greater than the input length (${length}): ${invalidSeparators.join(', ')}. These separators will be ignored.`, this.el);
343
+ }
344
+ this.parsedSeparators = separatorValues.filter((pos) => pos <= length);
345
+ }
346
+ componentWillLoad() {
347
+ this.processSeparators();
348
+ this.initializeValues();
349
+ }
350
+ /**
351
+ * Initializes the input values array based on the current value prop.
352
+ * This splits the value into individual characters and validates them against
353
+ * the allowed pattern. The values are then used as the values in the native
354
+ * input boxes and the value of the input group is updated.
355
+ */
356
+ initializeValues() {
357
+ if (this.value != null && String(this.value).length > 0) {
358
+ const chars = String(this.value).split('').slice(0, this.length);
359
+ chars.forEach((char, index) => {
360
+ if (this.validKeys.test(char)) {
361
+ this.inputValues[index] = char;
362
+ }
363
+ });
364
+ // Update the value without emitting events
365
+ this.value = this.inputValues.join('');
366
+ }
367
+ }
368
+ /**
369
+ * Resets the input values and focus state.
370
+ */
371
+ async reset() {
372
+ this.inputValues = Array(this.length).fill('');
373
+ this.value = '';
374
+ this.focusedValue = null;
375
+ this.hasFocus = false;
376
+ this.inputRefs.forEach((input) => {
377
+ input.blur();
378
+ });
379
+ this.updateTabIndexes();
380
+ }
381
+ /**
382
+ * Sets focus to an input box.
383
+ * @param index - The index of the input box to focus (0-based).
384
+ * If provided and the input box has a value, the input box at that index will be focused.
385
+ * Otherwise, the first empty input box or the last input if all are filled will be focused.
386
+ */
387
+ async setFocus(index) {
388
+ var _a, _b;
389
+ if (typeof index === 'number') {
390
+ const validIndex = Math.max(0, Math.min(index, this.length - 1));
391
+ (_a = this.inputRefs[validIndex]) === null || _a === void 0 ? void 0 : _a.focus();
392
+ }
393
+ else {
394
+ const tabbableIndex = this.getTabbableIndex();
395
+ (_b = this.inputRefs[tabbableIndex]) === null || _b === void 0 ? void 0 : _b.focus();
396
+ }
397
+ }
398
+ /**
399
+ * Get the regex pattern for allowed characters.
400
+ * If a pattern is provided, use it to create a regex pattern
401
+ * Otherwise, use the default regex pattern based on type
402
+ */
403
+ get validKeys() {
404
+ return new RegExp(`^${this.getPattern()}$`);
405
+ }
406
+ /**
407
+ * Gets the string pattern to pass to the input element
408
+ * and use in the regex for allowed characters.
409
+ */
410
+ getPattern() {
411
+ const { pattern, type } = this;
412
+ if (pattern) {
413
+ return pattern;
414
+ }
415
+ return type === 'number' ? '[0-9]' : '[a-zA-Z0-9]';
416
+ }
417
+ /**
418
+ * Get the default value for inputmode.
419
+ * If inputmode is provided, use it.
420
+ * Otherwise, use the default inputmode based on type
421
+ */
422
+ getInputmode() {
423
+ const { inputmode } = this;
424
+ if (inputmode) {
425
+ return inputmode;
426
+ }
427
+ if (this.type == 'number') {
428
+ return 'numeric';
429
+ }
430
+ else {
431
+ return 'text';
432
+ }
433
+ }
434
+ /**
435
+ * Updates the value of the input group.
436
+ * This updates the value of the input group and emits an `ionChange` event.
437
+ * If all of the input boxes are filled, it emits an `ionComplete` event.
438
+ */
439
+ updateValue(event) {
440
+ const { inputValues, length } = this;
441
+ const newValue = inputValues.join('');
442
+ this.value = newValue;
443
+ this.emitIonInput(event);
444
+ if (newValue.length === length) {
445
+ this.ionComplete.emit({ value: newValue });
446
+ }
447
+ }
448
+ /**
449
+ * Emits an `ionChange` event.
450
+ * This API should be called for user committed changes.
451
+ * This API should not be used for external value changes.
452
+ */
453
+ emitIonChange(event) {
454
+ const { value } = this;
455
+ // Checks for both null and undefined values
456
+ const newValue = value == null ? value : value.toString();
457
+ this.ionChange.emit({ value: newValue, event });
458
+ }
459
+ /**
460
+ * Emits an `ionInput` event.
461
+ * This is used to emit the input value when the user types,
462
+ * backspaces, or pastes.
463
+ */
464
+ emitIonInput(event) {
465
+ const { value } = this;
466
+ // Checks for both null and undefined values
467
+ const newValue = value == null ? value : value.toString();
468
+ this.ionInput.emit({ value: newValue, event });
469
+ }
470
+ /**
471
+ * Focuses the next input box.
472
+ */
473
+ focusNext(currentIndex) {
474
+ var _a;
475
+ const { inputRefs, length } = this;
476
+ if (currentIndex < length - 1) {
477
+ (_a = inputRefs[currentIndex + 1]) === null || _a === void 0 ? void 0 : _a.focus();
478
+ }
479
+ }
480
+ /**
481
+ * Focuses the previous input box.
482
+ */
483
+ focusPrevious(currentIndex) {
484
+ var _a;
485
+ const { inputRefs } = this;
486
+ if (currentIndex > 0) {
487
+ (_a = inputRefs[currentIndex - 1]) === null || _a === void 0 ? void 0 : _a.focus();
488
+ }
489
+ }
490
+ /**
491
+ * Determines if a separator should be shown for a given index by
492
+ * checking if the index is included in the parsed separators array.
493
+ */
494
+ showSeparator(index) {
495
+ const { length } = this;
496
+ return this.parsedSeparators.includes(index + 1) && index < length - 1;
497
+ }
498
+ /**
499
+ * Updates the tabIndexes for the input boxes.
500
+ * This is used to ensure that the correct input is
501
+ * focused when the user navigates using the tab key.
502
+ */
503
+ updateTabIndexes() {
504
+ const { inputRefs, inputValues, length } = this;
505
+ // Find first empty index after any filled boxes
506
+ let firstEmptyIndex = -1;
507
+ for (let i = 0; i < length; i++) {
508
+ if (!inputValues[i] || inputValues[i] === '') {
509
+ firstEmptyIndex = i;
510
+ break;
511
+ }
512
+ }
513
+ // Update tabIndex for all inputs
514
+ inputRefs.forEach((input, index) => {
515
+ // If all boxes are filled, make the last box tabbable
516
+ // Otherwise, make the first empty box tabbable
517
+ const shouldBeTabbable = firstEmptyIndex === -1 ? index === length - 1 : firstEmptyIndex === index;
518
+ input.tabIndex = shouldBeTabbable ? 0 : -1;
519
+ });
520
+ }
521
+ /**
522
+ * Loops through the input values and returns the index
523
+ * of the first empty input.
524
+ * Returns -1 if all inputs are filled.
525
+ */
526
+ getFirstEmptyIndex() {
527
+ const { inputValues, length } = this;
528
+ for (let i = 0; i < length; i++) {
529
+ if (!inputValues[i] || inputValues[i] === '') {
530
+ return i;
531
+ }
532
+ }
533
+ return -1;
534
+ }
535
+ /**
536
+ * Returns the index of the input that should be tabbed to.
537
+ * If all inputs are filled, returns the last input's index.
538
+ * Otherwise, returns the index of the first empty input.
539
+ */
540
+ getTabbableIndex() {
541
+ const { length } = this;
542
+ const firstEmptyIndex = this.getFirstEmptyIndex();
543
+ return firstEmptyIndex === -1 ? length - 1 : firstEmptyIndex;
544
+ }
545
+ render() {
546
+ const { autocapitalize, color, disabled, fill, hasFocus, inputId, inputRefs, inputValues, length, readonly, shape, size, } = this;
547
+ const mode = ionicGlobal.getIonMode(this);
548
+ const inputmode = this.getInputmode();
549
+ const tabbableIndex = this.getTabbableIndex();
550
+ const pattern = this.getPattern();
551
+ return (index.h(index.Host, { key: '74de5578f268fe055f85dd2edae519e744555a2c', class: theme.createColorClasses(color, {
552
+ [mode]: true,
553
+ 'has-focus': hasFocus,
554
+ [`input-otp-size-${size}`]: true,
555
+ [`input-otp-shape-${shape}`]: true,
556
+ [`input-otp-fill-${fill}`]: true,
557
+ 'input-otp-disabled': disabled,
558
+ 'input-otp-readonly': readonly,
559
+ }) }, index.h("div", { key: '0990a8817aac2d540228aeee4c6a42239f4aedaa', role: "group", "aria-label": "One-time password input", class: "input-otp-group" }, Array.from({ length }).map((_, index$1) => (index.h(index.Fragment, null, index.h("div", { class: "native-wrapper" }, index.h("input", { class: "native-input", id: `${inputId}-${index$1}`, "aria-label": `Input ${index$1 + 1} of ${length}`, type: "text", autoCapitalize: autocapitalize, inputmode: inputmode, maxLength: 1, pattern: pattern, disabled: disabled, readOnly: readonly, tabIndex: index$1 === tabbableIndex ? 0 : -1, value: inputValues[index$1] || '', autocomplete: index$1 === 0 ? 'one-time-code' : 'off', ref: (el) => (inputRefs[index$1] = el), onInput: this.onInput(index$1), onBlur: this.onBlur, onFocus: this.onFocus(index$1), onKeyDown: this.onKeyDown(index$1), onPaste: this.onPaste })), this.showSeparator(index$1) && index.h("div", { class: "input-otp-separator" }))))), index.h("div", { key: 'e2c0fcfc7630d58360304d6e7b21b2e9a01971f6', class: "input-otp-description" }, index.h("slot", { key: '9ba61fd056e67d5e1933f0b16f43e8a55de5319d' }))));
560
+ }
561
+ get el() { return index.getElement(this); }
562
+ static get watchers() { return {
563
+ "value": ["valueChanged"],
564
+ "separators": ["processSeparators"],
565
+ "length": ["processSeparators"]
566
+ }; }
567
+ };
568
+ let inputIds = 0;
569
+ InputOTP.style = {
570
+ ios: inputOtpIosCss,
571
+ md: inputOtpMdCss
572
+ };
573
+
574
+ exports.ion_input_otp = InputOTP;
@@ -3,11 +3,11 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-qOuhvt-6.js');
6
+ var index = require('./index-B6-BlKCh.js');
7
7
  var index$1 = require('./index-CAT7dkq1.js');
8
8
  var theme = require('./theme-CeDs6Hcv.js');
9
9
  var index$2 = require('./index-CPbAsnJK.js');
10
- var ionicGlobal = require('./ionic-global-BC3ee-Wa.js');
10
+ var ionicGlobal = require('./ionic-global-C3I6b0Is.js');
11
11
 
12
12
  const iosInputPasswordToggleCss = "";
13
13
 
@@ -65,16 +65,16 @@ const InputPasswordToggle = class {
65
65
  const showPasswordIcon = (_a = this.showIcon) !== null && _a !== void 0 ? _a : index$2.eye;
66
66
  const hidePasswordIcon = (_b = this.hideIcon) !== null && _b !== void 0 ? _b : index$2.eyeOff;
67
67
  const isPasswordVisible = type === 'text';
68
- return (index.h(index.Host, { key: '1a28e078c83e74c72d8bb8189ece93ec2e3fa3d0', class: theme.createColorClasses(color, {
68
+ return (index.h(index.Host, { key: '91bc55664d496fe457518bd112865dd7811d0c17', class: theme.createColorClasses(color, {
69
69
  [mode]: true,
70
- }) }, index.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) => {
70
+ }) }, index.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) => {
71
71
  /**
72
72
  * This prevents mobile browsers from
73
73
  * blurring the input when the password toggle
74
74
  * button is activated.
75
75
  */
76
76
  ev.preventDefault();
77
- }, onClick: this.togglePasswordVisibility }, index.h("ion-icon", { key: '26477ee97b808c3d79944bf5e33d4e05f1ae0b3f', slot: "icon-only", "aria-hidden": "true", icon: isPasswordVisible ? hidePasswordIcon : showPasswordIcon }))));
77
+ }, onClick: this.togglePasswordVisibility }, index.h("ion-icon", { key: 'e7656040b08c6a394d56f1fc41d6ca34225287d2', slot: "icon-only", "aria-hidden": "true", icon: isPasswordVisible ? hidePasswordIcon : showPasswordIcon }))));
78
78
  }
79
79
  get el() { return index.getElement(this); }
80
80
  static get watchers() { return {