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