@ionic/core 8.7.17-dev.11771959013.18adabe2 → 8.7.17-dev.11772030258.1ee4f499
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/action-sheet.js +561 -1
- package/components/alert.js +610 -1
- package/components/animation.js +817 -1
- package/components/backdrop.js +72 -1
- package/components/button-active.js +64 -1
- package/components/button.js +303 -1
- package/components/buttons.js +56 -1
- package/components/capacitor.js +10 -1
- package/components/checkbox.js +261 -1
- package/components/config.js +192 -1
- package/components/content.js +475 -1
- package/components/cubic-bezier.js +87 -1
- package/components/data.js +1635 -1
- package/components/dir.js +15 -1
- package/components/focus-visible.js +72 -1
- package/components/framework-delegate.js +137 -1
- package/components/gesture-controller.js +192 -1
- package/components/haptic.js +155 -1
- package/components/hardware-back-button.js +112 -1
- package/components/header.js +417 -1
- package/components/helpers.js +336 -1
- package/components/icon.js +456 -1
- package/components/index.d.ts +0 -2
- package/components/index.js +115 -1
- package/components/index2.js +416 -1
- package/components/index3.js +452 -1
- package/components/index4.js +118 -1
- package/components/index5.js +303 -1
- package/components/index6.js +29 -1
- package/components/index7.js +164 -1
- package/components/index8.js +125 -1
- package/components/index9.js +4 -1
- package/components/input-shims.js +624 -1
- package/components/input.utils.js +144 -1
- package/components/ion-accordion-group.js +269 -1
- package/components/ion-accordion.js +457 -1
- package/components/ion-action-sheet.js +6 -1
- package/components/ion-alert.js +6 -1
- package/components/ion-app.js +128 -1
- package/components/ion-avatar.js +41 -1
- package/components/ion-back-button.js +131 -1
- package/components/ion-backdrop.js +6 -1
- package/components/ion-badge.js +47 -1
- package/components/ion-breadcrumb.js +137 -1
- package/components/ion-breadcrumbs.js +164 -1
- package/components/ion-button.js +6 -1
- package/components/ion-buttons.js +6 -1
- package/components/ion-card-content.js +45 -1
- package/components/ion-card-header.js +56 -1
- package/components/ion-card-subtitle.js +48 -1
- package/components/ion-card-title.js +48 -1
- package/components/ion-card.js +107 -1
- package/components/ion-checkbox.js +6 -1
- package/components/ion-chip.js +66 -1
- package/components/ion-col.js +163 -1
- package/components/ion-content.js +6 -1
- package/components/ion-datetime-button.js +384 -1
- package/components/ion-datetime.js +2046 -1
- package/components/ion-fab-button.js +151 -1
- package/components/ion-fab-list.js +66 -1
- package/components/ion-fab.js +101 -1
- package/components/ion-footer.js +159 -1
- package/components/ion-grid.js +46 -1
- package/components/ion-header.js +6 -1
- package/components/ion-icon.js +6 -1
- package/components/ion-img.js +124 -1
- package/components/ion-infinite-scroll-content.js +70 -1
- package/components/ion-infinite-scroll.js +236 -1
- package/components/ion-input-otp.js +683 -1
- package/components/ion-input-password-toggle.js +129 -1
- package/components/ion-input.js +617 -1
- package/components/ion-item-divider.js +59 -1
- package/components/ion-item-group.js +46 -1
- package/components/ion-item-option.js +91 -1
- package/components/ion-item-options.js +73 -1
- package/components/ion-item-sliding.js +458 -1
- package/components/ion-item.js +6 -1
- package/components/ion-label.js +6 -1
- package/components/ion-list-header.js +6 -1
- package/components/ion-list.js +6 -1
- package/components/ion-loading.js +344 -1
- package/components/ion-menu-button.js +110 -1
- package/components/ion-menu-toggle.js +64 -1
- package/components/ion-menu.js +745 -1
- package/components/ion-modal.js +6 -1
- package/components/ion-nav-link.js +64 -1
- package/components/ion-nav.js +956 -1
- package/components/ion-note.js +47 -1
- package/components/ion-picker-column-option.js +6 -1
- package/components/ion-picker-column.js +6 -1
- package/components/ion-picker-legacy-column.js +6 -1
- package/components/ion-picker-legacy.js +343 -1
- package/components/ion-picker.js +6 -1
- package/components/ion-popover.js +6 -1
- package/components/ion-progress-bar.js +101 -1
- package/components/ion-radio-group.js +6 -1
- package/components/ion-radio.js +6 -1
- package/components/ion-range.js +853 -1
- package/components/ion-refresher-content.js +89 -1
- package/components/ion-refresher.js +751 -1
- package/components/ion-reorder-group.js +322 -1
- package/components/ion-reorder.js +60 -1
- package/components/ion-ripple-effect.js +6 -1
- package/components/ion-route-redirect.js +45 -1
- package/components/ion-route.js +74 -1
- package/components/ion-router-link.js +61 -1
- package/components/ion-router-outlet.js +227 -1
- package/components/ion-router.js +841 -1
- package/components/ion-row.js +36 -1
- package/components/ion-searchbar.js +530 -1
- package/components/ion-segment-button.js +174 -1
- package/components/ion-segment-content.js +35 -1
- package/components/ion-segment-view.js +148 -1
- package/components/ion-segment.js +602 -1
- package/components/ion-select-modal.js +6 -1
- package/components/ion-select-option.js +46 -1
- package/components/ion-select-popover.js +6 -1
- package/components/ion-select.js +1037 -1
- package/components/ion-skeleton-text.js +65 -1
- package/components/ion-spinner.js +6 -1
- package/components/ion-split-pane.js +197 -1
- package/components/ion-tab-bar.js +115 -1
- package/components/ion-tab-button.js +128 -1
- package/components/ion-tab.js +91 -1
- package/components/ion-tabs.js +205 -1
- package/components/ion-text.js +42 -1
- package/components/ion-textarea.js +554 -1
- package/components/ion-thumbnail.js +36 -1
- package/components/ion-title.js +6 -1
- package/components/ion-toast.js +941 -1
- package/components/ion-toggle.js +361 -1
- package/components/ion-toolbar.js +6 -1
- package/components/ionic-global.js +144 -1
- package/components/ios.transition.js +672 -1
- package/components/item.js +302 -1
- package/components/keyboard-controller.js +162 -1
- package/components/keyboard.js +141 -1
- package/components/keyboard2.js +76 -1
- package/components/label.js +100 -1
- package/components/list-header.js +47 -1
- package/components/list.js +68 -1
- package/components/lock-controller.js +35 -1
- package/components/md.transition.js +51 -1
- package/components/menu-toggle-util.js +9 -1
- package/components/modal.js +2674 -1
- package/components/notch-controller.js +150 -1
- package/components/overlays.js +912 -1
- package/components/picker-column-option.js +136 -1
- package/components/picker-column.js +595 -1
- package/components/picker-column2.js +377 -1
- package/components/picker.js +498 -1
- package/components/popover.js +1502 -1
- package/components/radio-group.js +287 -1
- package/components/radio.js +229 -1
- package/components/refresher.utils.js +193 -1
- package/components/ripple-effect.js +109 -1
- package/components/select-modal.js +196 -1
- package/components/select-popover.js +189 -1
- package/components/spinner.js +224 -1
- package/components/status-tap.js +36 -1
- package/components/swipe-back.js +75 -1
- package/components/theme.js +40 -1
- package/components/title.js +70 -1
- package/components/toolbar.js +89 -1
- package/components/validity.js +14 -1
- package/components/watch-options.js +44 -1
- package/dist/cjs/{animation-Dg4yiuR2.js → animation-Bt3H9L1C.js} +1 -1
- package/dist/cjs/app-globals-Ciccnk9_.js +10 -0
- package/dist/cjs/{button-active-FscMI17-.js → button-active-CMc8cD90.js} +1 -1
- package/dist/cjs/{config-BukYi_pW.js → config-C5fsO43a.js} +1 -1
- package/dist/cjs/{data-BYlBjkMU.js → data-JwZKaIQB.js} +1 -1
- package/dist/cjs/{framework-delegate-CRgp8o_p.js → framework-delegate-DMJRBuDi.js} +1 -1
- package/dist/cjs/{hardware-back-button-C4rMJ5uI.js → hardware-back-button-VCK4V3mG.js} +1 -1
- package/dist/cjs/{helpers-CxTYJdbT.js → helpers-DrTqNghc.js} +1 -1
- package/dist/cjs/{index-C845Ti6K.js → index-094mMFB-.js} +4 -4
- package/dist/cjs/{index-YcSftOMz.js → index-C534ULug.js} +2 -2
- package/dist/cjs/{index-MbaBbWXk.js → index-CO6eryBo.js} +2 -2
- package/dist/cjs/{index-CqT-2gKy.js → index-D6Wc6v08.js} +382 -503
- package/dist/cjs/{index-CFUwM5x_.js → index-DrMUZJj6.js} +5 -5
- package/dist/cjs/index.cjs.js +12 -12
- package/dist/cjs/{input-shims-DlFhYYTs.js → input-shims-CW0KUFTQ.js} +3 -3
- package/dist/cjs/{input.utils-DmeJ8dmo.js → input.utils-B_QROI2g.js} +2 -2
- package/dist/cjs/ion-accordion_2.cjs.entry.js +15 -23
- package/dist/cjs/ion-action-sheet.cjs.entry.js +15 -21
- package/dist/cjs/ion-alert.cjs.entry.js +17 -25
- package/dist/cjs/ion-app_8.cjs.entry.js +40 -44
- package/dist/cjs/ion-avatar_3.cjs.entry.js +12 -12
- package/dist/cjs/ion-back-button.cjs.entry.js +7 -7
- package/dist/cjs/ion-backdrop.cjs.entry.js +6 -6
- package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +14 -20
- package/dist/cjs/ion-button_2.cjs.entry.js +18 -36
- package/dist/cjs/ion-card_5.cjs.entry.js +23 -23
- package/dist/cjs/ion-checkbox.cjs.entry.js +7 -7
- package/dist/cjs/ion-chip.cjs.entry.js +6 -6
- package/dist/cjs/ion-col_3.cjs.entry.js +8 -8
- package/dist/cjs/ion-datetime-button.cjs.entry.js +8 -8
- package/dist/cjs/ion-datetime_3.cjs.entry.js +39 -67
- package/dist/cjs/ion-fab_3.cjs.entry.js +13 -17
- package/dist/cjs/ion-img.cjs.entry.js +6 -8
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +13 -17
- package/dist/cjs/ion-input-otp.cjs.entry.js +10 -16
- package/dist/cjs/ion-input-password-toggle.cjs.entry.js +7 -9
- package/dist/cjs/ion-input.cjs.entry.js +13 -21
- package/dist/cjs/ion-item-option_3.cjs.entry.js +15 -17
- package/dist/cjs/ion-item_8.cjs.entry.js +36 -42
- package/dist/cjs/ion-loading.cjs.entry.js +14 -18
- package/dist/cjs/ion-menu_3.cjs.entry.js +22 -30
- package/dist/cjs/ion-modal.cjs.entry.js +221 -62
- package/dist/cjs/ion-nav_2.cjs.entry.js +10 -14
- package/dist/cjs/ion-picker-column-option.cjs.entry.js +8 -10
- package/dist/cjs/ion-picker-column.cjs.entry.js +7 -11
- package/dist/cjs/ion-picker.cjs.entry.js +6 -6
- package/dist/cjs/ion-popover.cjs.entry.js +15 -21
- package/dist/cjs/ion-progress-bar.cjs.entry.js +7 -7
- package/dist/cjs/ion-radio_2.cjs.entry.js +13 -17
- package/dist/cjs/ion-range.cjs.entry.js +54 -180
- package/dist/cjs/ion-refresher_2.cjs.entry.js +14 -45
- package/dist/cjs/ion-reorder_2.cjs.entry.js +11 -13
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +4 -4
- package/dist/cjs/ion-route_4.cjs.entry.js +10 -20
- package/dist/cjs/ion-searchbar.cjs.entry.js +12 -22
- package/dist/cjs/ion-segment-content.cjs.entry.js +3 -3
- package/dist/cjs/ion-segment-view.cjs.entry.js +5 -5
- package/dist/cjs/ion-segment_2.cjs.entry.js +16 -26
- package/dist/cjs/ion-select-modal.cjs.entry.js +12 -12
- package/dist/cjs/ion-select_3.cjs.entry.js +21 -29
- package/dist/cjs/ion-spinner.cjs.entry.js +4 -4
- package/dist/cjs/ion-split-pane.cjs.entry.js +9 -15
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +12 -14
- package/dist/cjs/ion-tab_2.cjs.entry.js +8 -10
- package/dist/cjs/ion-text.cjs.entry.js +4 -4
- package/dist/cjs/ion-textarea.cjs.entry.js +12 -18
- package/dist/cjs/ion-toast.cjs.entry.js +15 -21
- package/dist/cjs/ion-toggle.cjs.entry.js +8 -10
- package/dist/cjs/{ionic-global-Bc3kJi1Z.js → ionic-global-HMVqOFGO.js} +1 -1
- package/dist/cjs/ionic.cjs.js +5 -5
- package/dist/cjs/{ios.transition-trBiC95R.js → ios.transition-BOt_uW73.js} +4 -4
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{md.transition-CUQECuvD.js → md.transition-Dt968VXB.js} +4 -4
- package/dist/cjs/{notch-controller-sD-lTpdc.js → notch-controller-Bzqhjm4f.js} +1 -1
- package/dist/cjs/{overlays-C2jiBSNQ.js → overlays-B2b-TTbl.js} +5 -5
- package/dist/cjs/{status-tap-CCJk5VgT.js → status-tap-g0sWWkXk.js} +3 -3
- package/dist/cjs/{swipe-back-BGhTQ1CU.js → swipe-back-BIayeNOD.js} +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/accordion-group/accordion-group.js +2 -4
- package/dist/collection/components/action-sheet/action-sheet.js +10 -20
- package/dist/collection/components/alert/alert.js +12 -24
- package/dist/collection/components/back-button/back-button.js +2 -4
- package/dist/collection/components/badge/badge.js +1 -2
- package/dist/collection/components/breadcrumb/breadcrumb.js +4 -8
- package/dist/collection/components/breadcrumbs/breadcrumbs.js +2 -4
- package/dist/collection/components/button/button.js +3 -6
- package/dist/collection/components/card/card.js +3 -6
- package/dist/collection/components/card-header/card-header.js +1 -2
- package/dist/collection/components/card-subtitle/card-subtitle.js +1 -2
- package/dist/collection/components/card-title/card-title.js +1 -2
- package/dist/collection/components/checkbox/checkbox.js +2 -4
- package/dist/collection/components/chip/chip.js +1 -2
- package/dist/collection/components/content/content.js +4 -8
- package/dist/collection/components/datetime/datetime.js +15 -34
- package/dist/collection/components/datetime-button/datetime-button.js +1 -2
- package/dist/collection/components/fab-button/fab-button.js +3 -6
- package/dist/collection/components/infinite-scroll-content/infinite-scroll-content.js +2 -4
- package/dist/collection/components/input/input.js +6 -11
- package/dist/collection/components/input-otp/input-otp.js +4 -8
- package/dist/collection/components/input-password-toggle/input-password-toggle.js +2 -4
- package/dist/collection/components/item/item.js +3 -6
- package/dist/collection/components/item-divider/item-divider.js +1 -2
- package/dist/collection/components/item-option/item-option.js +1 -2
- package/dist/collection/components/item-options/item-options.js +1 -2
- package/dist/collection/components/item-sliding/item-sliding.js +1 -2
- package/dist/collection/components/label/label.js +3 -6
- package/dist/collection/components/list-header/list-header.js +1 -2
- package/dist/collection/components/loading/loading.js +11 -22
- package/dist/collection/components/menu/menu.js +5 -10
- package/dist/collection/components/menu-button/menu-button.js +1 -2
- package/dist/collection/components/modal/gestures/sheet.js +108 -11
- package/dist/collection/components/modal/gestures/swipe-to-close.js +54 -1
- package/dist/collection/components/modal/modal.js +112 -58
- package/dist/collection/components/nav/nav.js +45 -89
- package/dist/collection/components/nav-link/nav-link.js +5 -9
- package/dist/collection/components/note/note.js +1 -2
- package/dist/collection/components/picker/picker.js +1 -2
- package/dist/collection/components/picker-column/picker-column.js +3 -6
- package/dist/collection/components/picker-column-option/picker-column-option.js +1 -2
- package/dist/collection/components/picker-legacy/picker.js +12 -24
- package/dist/collection/components/picker-legacy-column/picker-column.js +2 -4
- package/dist/collection/components/popover/popover.js +17 -33
- package/dist/collection/components/progress-bar/progress-bar.js +1 -2
- package/dist/collection/components/radio/radio.js +1 -2
- package/dist/collection/components/radio-group/radio-group.js +3 -6
- package/dist/collection/components/range/range.js +50 -189
- package/dist/collection/components/refresher/refresher.js +5 -73
- package/dist/collection/components/refresher-content/refresher-content.js +4 -8
- package/dist/collection/components/reorder-group/reorder-group.js +3 -6
- package/dist/collection/components/route/route.js +2 -4
- package/dist/collection/components/router/router.js +5 -10
- package/dist/collection/components/router-link/router-link.js +3 -6
- package/dist/collection/components/router-outlet/router-outlet.js +9 -18
- package/dist/collection/components/searchbar/searchbar.js +6 -11
- package/dist/collection/components/segment/segment.js +5 -10
- package/dist/collection/components/segment-button/segment-button.js +2 -4
- package/dist/collection/components/segment-view/segment-view.js +1 -2
- package/dist/collection/components/select/select.js +5 -10
- package/dist/collection/components/select-modal/select-modal.js +1 -2
- package/dist/collection/components/select-popover/select-popover.js +1 -2
- package/dist/collection/components/skeleton-text/skeleton-text.js +1 -2
- package/dist/collection/components/spinner/spinner.js +2 -4
- package/dist/collection/components/tab/tab.js +2 -4
- package/dist/collection/components/tab-bar/tab-bar.js +2 -4
- package/dist/collection/components/tab-button/tab-button.js +2 -4
- package/dist/collection/components/tabs/tabs.js +2 -4
- package/dist/collection/components/text/text.js +1 -2
- package/dist/collection/components/textarea/textarea.js +3 -6
- package/dist/collection/components/title/title.js +2 -4
- package/dist/collection/components/toast/toast.js +17 -34
- package/dist/collection/components/toggle/toggle.js +2 -4
- package/dist/collection/components/toolbar/toolbar.js +1 -2
- package/dist/docs.d.ts +0 -37
- package/dist/docs.json +442 -971
- package/dist/esm/{animation-CnGMT4ji.js → animation-Dt8bGnA-.js} +1 -1
- package/dist/esm/app-globals-BDSf8fOA.js +8 -0
- package/dist/esm/{button-active-BBx21brx.js → button-active-L570Swow.js} +1 -1
- package/dist/esm/{config-TO1rZH52.js → config-mCdtaoPe.js} +1 -1
- package/dist/esm/{data-B9iGR5YO.js → data-DCORV9FH.js} +1 -1
- package/dist/esm/{framework-delegate-CyxE1S_P.js → framework-delegate-BYawdMXj.js} +1 -1
- package/dist/esm/{hardware-back-button-CTe4XmL7.js → hardware-back-button-CPLxO-Ev.js} +1 -1
- package/dist/esm/{helpers-Tl8jw6S2.js → helpers-DEn3pfjm.js} +1 -1
- package/dist/esm/{index-hW6eNZ3o.js → index-Bs3kT4bc.js} +2 -2
- package/dist/esm/{index-IGIE5vDm.js → index-C8IsBmNU.js} +382 -503
- package/dist/esm/{index-B2KwgBLx.js → index-CvDIirVx.js} +5 -5
- package/dist/esm/{index-BtUdxPjv.js → index-ceb5RaMT.js} +2 -2
- package/dist/esm/{index-B-hkiOUh.js → index-r2D9DEro.js} +4 -4
- package/dist/esm/index.js +12 -12
- package/dist/esm/{input-shims-C1hAaHcP.js → input-shims-DyOpfTg6.js} +3 -3
- package/dist/esm/{input.utils-Bxa_DQ7-.js → input.utils-DrvTa8gz.js} +2 -2
- package/dist/esm/ion-accordion_2.entry.js +15 -23
- package/dist/esm/ion-action-sheet.entry.js +15 -21
- package/dist/esm/ion-alert.entry.js +17 -25
- package/dist/esm/ion-app_8.entry.js +40 -44
- package/dist/esm/ion-avatar_3.entry.js +12 -12
- package/dist/esm/ion-back-button.entry.js +7 -7
- package/dist/esm/ion-backdrop.entry.js +6 -6
- package/dist/esm/ion-breadcrumb_2.entry.js +14 -20
- package/dist/esm/ion-button_2.entry.js +18 -36
- package/dist/esm/ion-card_5.entry.js +23 -23
- package/dist/esm/ion-checkbox.entry.js +7 -7
- package/dist/esm/ion-chip.entry.js +6 -6
- package/dist/esm/ion-col_3.entry.js +8 -8
- package/dist/esm/ion-datetime-button.entry.js +8 -8
- package/dist/esm/ion-datetime_3.entry.js +39 -67
- package/dist/esm/ion-fab_3.entry.js +13 -17
- package/dist/esm/ion-img.entry.js +6 -8
- package/dist/esm/ion-infinite-scroll_2.entry.js +13 -17
- package/dist/esm/ion-input-otp.entry.js +10 -16
- package/dist/esm/ion-input-password-toggle.entry.js +7 -9
- package/dist/esm/ion-input.entry.js +13 -21
- package/dist/esm/ion-item-option_3.entry.js +15 -17
- package/dist/esm/ion-item_8.entry.js +36 -42
- package/dist/esm/ion-loading.entry.js +14 -18
- package/dist/esm/ion-menu_3.entry.js +22 -30
- package/dist/esm/ion-modal.entry.js +221 -62
- package/dist/esm/ion-nav_2.entry.js +10 -14
- package/dist/esm/ion-picker-column-option.entry.js +8 -10
- package/dist/esm/ion-picker-column.entry.js +7 -11
- package/dist/esm/ion-picker.entry.js +6 -6
- package/dist/esm/ion-popover.entry.js +15 -21
- package/dist/esm/ion-progress-bar.entry.js +7 -7
- package/dist/esm/ion-radio_2.entry.js +13 -17
- package/dist/esm/ion-range.entry.js +54 -180
- package/dist/esm/ion-refresher_2.entry.js +14 -45
- package/dist/esm/ion-reorder_2.entry.js +11 -13
- package/dist/esm/ion-ripple-effect.entry.js +4 -4
- package/dist/esm/ion-route_4.entry.js +10 -20
- package/dist/esm/ion-searchbar.entry.js +12 -22
- package/dist/esm/ion-segment-content.entry.js +3 -3
- package/dist/esm/ion-segment-view.entry.js +5 -5
- package/dist/esm/ion-segment_2.entry.js +16 -26
- package/dist/esm/ion-select-modal.entry.js +12 -12
- package/dist/esm/ion-select_3.entry.js +21 -29
- package/dist/esm/ion-spinner.entry.js +4 -4
- package/dist/esm/ion-split-pane.entry.js +9 -15
- package/dist/esm/ion-tab-bar_2.entry.js +12 -14
- package/dist/esm/ion-tab_2.entry.js +8 -10
- package/dist/esm/ion-text.entry.js +4 -4
- package/dist/esm/ion-textarea.entry.js +12 -18
- package/dist/esm/ion-toast.entry.js +15 -21
- package/dist/esm/ion-toggle.entry.js +8 -10
- package/dist/esm/{ionic-global-DfbeLwcV.js → ionic-global-CDrldh-5.js} +1 -1
- package/dist/esm/ionic.js +6 -6
- package/dist/esm/{ios.transition--aMF-pDH.js → ios.transition-BDzw0_Hm.js} +4 -4
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{md.transition-BEVbfm8j.js → md.transition-BzDYi3qq.js} +4 -4
- package/dist/esm/{notch-controller-DAcvKU57.js → notch-controller-BwelN_JM.js} +1 -1
- package/dist/esm/{overlays-F8GHPo-e.js → overlays-D5YkFThA.js} +5 -5
- package/dist/esm/{status-tap-BfJqFSLF.js → status-tap-5DQ7Fc4V.js} +3 -3
- package/dist/esm/{swipe-back-BZBFwTQV.js → swipe-back-BKw2CAHc.js} +2 -2
- package/dist/html.html-data.json +109 -109
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-012212e4.entry.js +4 -0
- package/dist/ionic/p-074839fc.entry.js +4 -0
- package/dist/ionic/p-0dfa5a37.entry.js +4 -0
- package/dist/ionic/p-0f418a37.entry.js +4 -0
- package/dist/ionic/p-11518b31.entry.js +4 -0
- package/dist/ionic/{p-80cac7a2.entry.js → p-11aa58d6.entry.js} +1 -1
- package/dist/ionic/p-1838bed5.entry.js +4 -0
- package/dist/ionic/p-29721c43.entry.js +4 -0
- package/dist/ionic/{p-b67a2114.entry.js → p-2a939845.entry.js} +1 -1
- package/dist/ionic/{p-025d2d32.entry.js → p-316c0420.entry.js} +1 -1
- package/dist/ionic/p-31f7095f.entry.js +4 -0
- package/dist/ionic/p-34642fa1.entry.js +4 -0
- package/dist/ionic/p-35696017.entry.js +4 -0
- package/dist/ionic/{p-074344b8.entry.js → p-370e4237.entry.js} +1 -1
- package/dist/ionic/{p-964090ef.entry.js → p-3a6caca9.entry.js} +1 -1
- package/dist/ionic/p-40c261a3.entry.js +4 -0
- package/dist/ionic/{p-1fd588a7.entry.js → p-46d74291.entry.js} +1 -1
- package/dist/ionic/{p-301c43f8.entry.js → p-49d06882.entry.js} +1 -1
- package/dist/ionic/p-4e41ea20.entry.js +4 -0
- package/dist/ionic/{p-7c72d482.entry.js → p-51a60e0f.entry.js} +1 -1
- package/dist/ionic/{p-9833cf63.entry.js → p-582824c5.entry.js} +1 -1
- package/dist/ionic/p-6241ce47.entry.js +4 -0
- package/dist/ionic/p-639dd543.entry.js +4 -0
- package/dist/ionic/p-6444c606.entry.js +4 -0
- package/dist/ionic/{p-9fae83d8.entry.js → p-675b1a31.entry.js} +1 -1
- package/dist/ionic/p-6d070558.entry.js +4 -0
- package/dist/ionic/p-7268efa5.entry.js +4 -0
- package/dist/ionic/{p-b4d52b58.entry.js → p-72c38b88.entry.js} +1 -1
- package/dist/ionic/{p-370a60ee.entry.js → p-79bd78f9.entry.js} +1 -1
- package/dist/ionic/p-7babec72.entry.js +4 -0
- package/dist/ionic/{p-a287e18e.entry.js → p-86f53961.entry.js} +1 -1
- package/dist/ionic/{p-277abec1.entry.js → p-94de5cfa.entry.js} +1 -1
- package/dist/ionic/{p-e663bc5a.entry.js → p-9575b654.entry.js} +1 -1
- package/dist/ionic/{p-c1c9b2bb.entry.js → p-9a2d390d.entry.js} +1 -1
- package/dist/ionic/{p-DB_iPQC-.js → p-B0q1YL7N.js} +1 -1
- package/dist/ionic/{p-NFFyoJ4Q.js → p-BFvmZNyx.js} +1 -1
- package/dist/ionic/p-BKc55Xev.js +4 -0
- package/dist/ionic/{p-CYbRmDdy.js → p-BOVrCkpJ.js} +1 -1
- package/dist/ionic/{p-C0JvVFMv.js → p-BYEqWnSg.js} +1 -1
- package/dist/ionic/p-Bmgaetn_.js +4 -0
- package/dist/ionic/{p-BAt5H1ac.js → p-C7hRNDhM.js} +1 -1
- package/dist/ionic/p-C8IsBmNU.js +5 -0
- package/dist/ionic/p-CJxh_yLS.js +4 -0
- package/dist/ionic/{p-CGmVTdWh.js → p-CTfR9YZG.js} +1 -1
- package/dist/ionic/{p-B8xlpH8p.js → p-CwgG81ZD.js} +1 -1
- package/dist/ionic/{p-CmFz1Mjc.js → p-D-eFFUkA.js} +1 -1
- package/dist/ionic/{p-BvFYtOdE.js → p-D0dMcSkw.js} +1 -1
- package/dist/ionic/{p-DjriolRs.js → p-DCv9sLH2.js} +1 -1
- package/dist/ionic/{p-Bum7H1fw.js → p-DDb5r57F.js} +1 -1
- package/dist/ionic/{p-DLbbmF9h.js → p-DNcfiJwE.js} +1 -1
- package/dist/ionic/p-DUt5fQmA.js +4 -0
- package/dist/ionic/p-DZRJwG4S.js +4 -0
- package/dist/ionic/{p-gbVXD275.js → p-DbQ5QkTP.js} +1 -1
- package/dist/ionic/{p-BxIcPWoV.js → p-Dc45iWE4.js} +1 -1
- package/dist/ionic/{p-DTPR1Wpn.js → p-DdR6rpbR.js} +1 -1
- package/dist/ionic/{p-GWUGgWx6.js → p-QHYY4sjU.js} +1 -1
- package/dist/ionic/p-a127bee2.entry.js +4 -0
- package/dist/ionic/{p-f5dfb9a3.entry.js → p-ac4eb91d.entry.js} +1 -1
- package/dist/ionic/{p-ca31010f.entry.js → p-b0a7585c.entry.js} +1 -1
- package/dist/ionic/p-b3d44509.entry.js +4 -0
- package/dist/ionic/{p-bced1f3e.entry.js → p-c73627c8.entry.js} +1 -1
- package/dist/ionic/p-cc45bcbc.entry.js +4 -0
- package/dist/ionic/p-d0a2a1ab.entry.js +4 -0
- package/dist/ionic/{p-9745651b.entry.js → p-d126e8d3.entry.js} +1 -1
- package/dist/ionic/{p-b440381f.entry.js → p-d1f54e28.entry.js} +1 -1
- package/dist/ionic/{p-1fa1406c.entry.js → p-d2489bf2.entry.js} +1 -1
- package/dist/ionic/p-d3014190.entry.js +4 -0
- package/dist/ionic/{p-a84f2d21.entry.js → p-da7d04cc.entry.js} +1 -1
- package/dist/ionic/p-db82892c.entry.js +4 -0
- package/dist/ionic/{p-b2d5238b.entry.js → p-dbbe606a.entry.js} +1 -1
- package/dist/ionic/{p-28d7852f.entry.js → p-dd1aef77.entry.js} +1 -1
- package/dist/ionic/p-e1d1f3cc.entry.js +4 -0
- package/dist/ionic/{p-c3e65e45.entry.js → p-f8f22cc0.entry.js} +1 -1
- package/dist/ionic/{p-9802c88e.entry.js → p-f9061316.entry.js} +1 -1
- package/dist/types/components/datetime/datetime.d.ts +0 -9
- package/dist/types/components/header/header.utils.d.ts +1 -2
- package/dist/types/components/modal/gestures/sheet.d.ts +2 -2
- package/dist/types/components/modal/gestures/swipe-to-close.d.ts +2 -2
- package/dist/types/components/modal/modal-interface.d.ts +7 -0
- package/dist/types/components/modal/modal.d.ts +17 -1
- package/dist/types/components/range/range-interface.d.ts +0 -1
- package/dist/types/components/range/range.d.ts +4 -33
- package/dist/types/components/refresher/refresher-interface.d.ts +0 -7
- package/dist/types/components/refresher/refresher.d.ts +3 -16
- package/dist/types/components.d.ts +206 -929
- package/dist/types/interface.d.ts +2 -2
- package/dist/types/stencil-public-runtime.d.ts +14 -126
- package/dist/types/utils/gesture/listener.d.ts +1 -2
- package/hydrate/index.d.ts +0 -12
- package/hydrate/index.js +1550 -5375
- package/hydrate/index.mjs +1551 -5374
- package/package.json +2 -2
- package/dist/cjs/app-globals-CLI8xCmk.js +0 -11
- package/dist/esm/app-globals-DhZjtldk.js +0 -9
- package/dist/ionic/p-02acdef4.entry.js +0 -4
- package/dist/ionic/p-04e2c388.entry.js +0 -4
- package/dist/ionic/p-13ade5c8.entry.js +0 -4
- package/dist/ionic/p-1b02923f.entry.js +0 -4
- package/dist/ionic/p-1bd477a9.entry.js +0 -4
- package/dist/ionic/p-239a27a4.entry.js +0 -4
- package/dist/ionic/p-3e143d1d.entry.js +0 -4
- package/dist/ionic/p-4431ef7e.entry.js +0 -4
- package/dist/ionic/p-463767ce.entry.js +0 -4
- package/dist/ionic/p-4f888343.entry.js +0 -4
- package/dist/ionic/p-51c11c47.entry.js +0 -4
- package/dist/ionic/p-56050077.entry.js +0 -4
- package/dist/ionic/p-6a3a5aae.entry.js +0 -4
- package/dist/ionic/p-6b97f2a3.entry.js +0 -4
- package/dist/ionic/p-77de9c60.entry.js +0 -4
- package/dist/ionic/p-7d20f4f8.entry.js +0 -4
- package/dist/ionic/p-91fc7352.entry.js +0 -4
- package/dist/ionic/p-93845421.entry.js +0 -4
- package/dist/ionic/p-96a2e768.entry.js +0 -4
- package/dist/ionic/p-9d1676bb.entry.js +0 -4
- package/dist/ionic/p-BW_TRJm8.js +0 -4
- package/dist/ionic/p-CtA-yJYy.js +0 -4
- package/dist/ionic/p-D8HJQ1qq.js +0 -4
- package/dist/ionic/p-DtVZDHlS.js +0 -4
- package/dist/ionic/p-IGIE5vDm.js +0 -5
- package/dist/ionic/p-a805674e.entry.js +0 -4
- package/dist/ionic/p-a81ae2cd.entry.js +0 -4
- package/dist/ionic/p-cbf245b5.entry.js +0 -4
- package/dist/ionic/p-d68b665a.entry.js +0 -4
- package/dist/ionic/p-efe86ed9.entry.js +0 -4
- package/dist/ionic/p-hNN3VvaC.js +0 -4
package/components/alert.js
CHANGED
|
@@ -1,4 +1,613 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{proxyCustomElement as t,HTMLElement as e,createEvent as i,forceUpdate as r,h as o,Host as a,transformTag as n}from"@stencil/core/internal/client";import{E as l,a as s}from"./config.js";import{c as d}from"./button-active.js";import{r as c}from"./helpers.js";import{c as p}from"./lock-controller.js";import{c as b,p as h}from"./index4.js";import{d as m,e as g,B as x,i as u,j as f,k as v,f as w,g as k,h as y,s as z}from"./overlays.js";import{g as j}from"./theme.js";import{b as C}from"./ionic-global.js";import{c as A}from"./animation.js";import{d as O}from"./backdrop.js";import{d as D}from"./ripple-effect.js";const I=t=>{const e=A(),i=A(),r=A();return i.addElement(t.querySelector("ion-backdrop")).fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),r.addElement(t.querySelector(".alert-wrapper")).keyframes([{offset:0,opacity:"0.01",transform:"scale(1.1)"},{offset:1,opacity:"1",transform:"scale(1)"}]),e.addElement(t).easing("ease-in-out").duration(200).addAnimation([i,r])},$=t=>{const e=A(),i=A(),r=A();return i.addElement(t.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)",0),r.addElement(t.querySelector(".alert-wrapper")).keyframes([{offset:0,opacity:.99,transform:"scale(1)"},{offset:1,opacity:0,transform:"scale(0.9)"}]),e.addElement(t).easing("ease-in-out").duration(200).addAnimation([i,r])},E=t=>{const e=A(),i=A(),r=A();return i.addElement(t.querySelector("ion-backdrop")).fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),r.addElement(t.querySelector(".alert-wrapper")).keyframes([{offset:0,opacity:"0.01",transform:"scale(0.9)"},{offset:1,opacity:"1",transform:"scale(1)"}]),e.addElement(t).easing("ease-in-out").duration(150).addAnimation([i,r])},L=t=>{const e=A(),i=A(),r=A();return i.addElement(t.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)",0),r.addElement(t.querySelector(".alert-wrapper")).fromTo("opacity",.99,0),e.addElement(t).easing("ease-in-out").duration(150).addAnimation([i,r])},W=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.didPresent=i(this,"ionAlertDidPresent",7),this.willPresent=i(this,"ionAlertWillPresent",7),this.willDismiss=i(this,"ionAlertWillDismiss",7),this.didDismiss=i(this,"ionAlertDidDismiss",7),this.didPresentShorthand=i(this,"didPresent",7),this.willPresentShorthand=i(this,"willPresent",7),this.willDismissShorthand=i(this,"willDismiss",7),this.didDismissShorthand=i(this,"didDismiss",7),this.delegateController=m(this),this.lockController=p(),this.triggerController=g(),this.customHTMLEnabled=b.get("innerHTMLTemplatesEnabled",l),this.processedInputs=[],this.processedButtons=[],this.presented=!1,this.hasController=!1,this.keyboardClose=!0,this.buttons=[],this.inputs=[],this.backdropDismiss=!0,this.translucent=!1,this.animated=!0,this.isOpen=!1,this.onBackdropTap=()=>{this.dismiss(void 0,x)},this.dispatchCancelHandler=t=>{if(u(t.detail.role)){const t=this.processedButtons.find((t=>"cancel"===t.role));this.callButtonHandler(t)}}}onIsOpenChange(t,e){!0===t&&!1===e?this.present():!1===t&&!0===e&&this.dismiss()}triggerChanged(){const{trigger:t,el:e,triggerController:i}=this;t&&i.addClickListener(e,t)}onKeydown(t){var e;const i=new Set(this.processedInputs.map((t=>t.type)));if(i.has("checkbox")&&"Enter"===t.key)return void t.preventDefault();if(t.target.classList.contains("alert-wrapper")&&"Tab"===t.key&&t.shiftKey)return t.preventDefault(),void(null===(e=this.wrapperEl)||void 0===e?void 0:e.querySelector(".alert-button:last-child")).focus();if(!i.has("radio")||t.target&&!this.el.contains(t.target)||t.target.classList.contains("alert-button"))return;const r=this.el.querySelectorAll(".alert-radio"),o=Array.from(r).filter((t=>!t.disabled)),a=o.findIndex((e=>e.id===t.target.id));let n;if(["ArrowDown","ArrowRight"].includes(t.key)&&(n=a===o.length-1?o[0]:o[a+1]),["ArrowUp","ArrowLeft"].includes(t.key)&&(n=0===a?o[o.length-1]:o[a-1]),n&&o.includes(n)){const t=this.processedInputs.find((t=>t.id===(null==n?void 0:n.id)));t&&(this.rbClick(t),n.focus())}}buttonsChanged(){this.processedButtons=this.buttons.map((t=>"string"==typeof t?{text:t,role:"cancel"===t.toLowerCase()?"cancel":void 0}:t))}inputsChanged(){const t=this.inputs,e=t.find((t=>!t.disabled)),i=t.find((t=>t.checked&&!t.disabled))||e,r=new Set(t.map((t=>t.type)));r.has("checkbox")&&r.has("radio")&&h(`[ion-alert] - Alert cannot mix input types: ${Array.from(r.values()).join("/")}. Please see alert docs for more info.`),this.inputType=r.values().next().value,this.processedInputs=t.map(((t,e)=>{var r;return{type:t.type||"text",name:t.name||`${e}`,placeholder:t.placeholder||"",value:t.value,label:t.label,checked:!!t.checked,disabled:!!t.disabled,id:t.id||`alert-input-${this.overlayIndex}-${e}`,handler:t.handler,min:t.min,max:t.max,cssClass:null!==(r=t.cssClass)&&void 0!==r?r:"",attributes:t.attributes||{},tabindex:"radio"===t.type&&t!==i?-1:0}}))}connectedCallback(){f(this.el),this.triggerChanged()}componentWillLoad(){var t;(null===(t=this.htmlAttributes)||void 0===t?void 0:t.id)||v(this.el),this.inputsChanged(),this.buttonsChanged()}disconnectedCallback(){this.triggerController.removeClickListener(),this.gesture&&(this.gesture.destroy(),this.gesture=void 0)}componentDidLoad(){!this.gesture&&"ios"===C(this)&&this.wrapperEl&&(this.gesture=d(this.wrapperEl,(t=>t.classList.contains("alert-button"))),this.gesture.enable(!0)),!0===this.isOpen&&c((()=>this.present())),this.triggerChanged()}async present(){const t=await this.lockController.lock();await this.delegateController.attachViewToDom(),await w(this,"alertEnter",I,E).then((()=>{var t,e;1===this.buttons.length&&0===this.inputs.length?(null===(t=this.wrapperEl)||void 0===t?void 0:t.querySelector(".alert-button")).focus():null===(e=this.wrapperEl)||void 0===e||e.focus()})),t()}async dismiss(t,e){const i=await this.lockController.lock(),r=await k(this,t,e,"alertLeave",$,L);return r&&this.delegateController.removeViewFromDom(),i(),r}onDidDismiss(){return y(this.el,"ionAlertDidDismiss")}onWillDismiss(){return y(this.el,"ionAlertWillDismiss")}rbClick(t){for(const e of this.processedInputs)e.checked=e===t,e.tabindex=e===t?0:-1;this.activeId=t.id,z(t.handler,t),r(this)}cbClick(t){t.checked=!t.checked,z(t.handler,t),r(this)}async buttonClick(t){const e=t.role,i=this.getValues();if(u(e))return this.dismiss({values:i},e);const r=await this.callButtonHandler(t,i);return!1!==r&&this.dismiss(Object.assign({values:i},r),t.role)}async callButtonHandler(t,e){if(null==t?void 0:t.handler){const i=await z(t.handler,e);if(!1===i)return!1;if("object"==typeof i)return i}return{}}getValues(){if(0===this.processedInputs.length)return;if("radio"===this.inputType){const t=this.processedInputs.find((t=>!!t.checked));return t?t.value:void 0}if("checkbox"===this.inputType)return this.processedInputs.filter((t=>t.checked)).map((t=>t.value));const t={};return this.processedInputs.forEach((e=>{t[e.name]=e.value||""})),t}renderAlertInputs(){switch(this.inputType){case"checkbox":return this.renderCheckbox();case"radio":return this.renderRadio();default:return this.renderInput()}}renderCheckbox(){const t=this.processedInputs,e=C(this);return 0===t.length?null:o("div",{class:"alert-checkbox-group"},t.map((t=>o("button",{type:"button",onClick:()=>this.cbClick(t),"aria-checked":`${t.checked}`,id:t.id,disabled:t.disabled,tabIndex:t.tabindex,role:"checkbox",class:Object.assign(Object.assign({},j(t.cssClass)),{"alert-tappable":!0,"alert-checkbox":!0,"alert-checkbox-button":!0,"ion-focusable":!0,"alert-checkbox-button-disabled":t.disabled||!1})},o("div",{class:"alert-button-inner"},o("div",{class:"alert-checkbox-icon"},o("div",{class:"alert-checkbox-inner"})),o("div",{class:"alert-checkbox-label"},t.label)),"md"===e&&o("ion-ripple-effect",null)))))}renderRadio(){const t=this.processedInputs;return 0===t.length?null:o("div",{class:"alert-radio-group",role:"radiogroup","aria-activedescendant":this.activeId},t.map((t=>o("button",{type:"button",onClick:()=>this.rbClick(t),"aria-checked":`${t.checked}`,disabled:t.disabled,id:t.id,tabIndex:t.tabindex,class:Object.assign(Object.assign({},j(t.cssClass)),{"alert-radio-button":!0,"alert-tappable":!0,"alert-radio":!0,"ion-focusable":!0,"alert-radio-button-disabled":t.disabled||!1}),role:"radio"},o("div",{class:"alert-button-inner"},o("div",{class:"alert-radio-icon"},o("div",{class:"alert-radio-inner"})),o("div",{class:"alert-radio-label"},t.label))))))}renderInput(){const t=this.processedInputs;return 0===t.length?null:o("div",{class:"alert-input-group"},t.map((t=>{var e,i,r,a;return o("div",{class:"alert-input-wrapper"},"textarea"===t.type?o("textarea",Object.assign({placeholder:t.placeholder,value:t.value,id:t.id,tabIndex:t.tabindex},t.attributes,{disabled:null!==(i=null===(e=t.attributes)||void 0===e?void 0:e.disabled)&&void 0!==i?i:t.disabled,class:H(t),onInput:e=>{var i;t.value=e.target.value,(null===(i=t.attributes)||void 0===i?void 0:i.onInput)&&t.attributes.onInput(e)}})):o("input",Object.assign({placeholder:t.placeholder,type:t.type,min:t.min,max:t.max,value:t.value,id:t.id,tabIndex:t.tabindex},t.attributes,{disabled:null!==(a=null===(r=t.attributes)||void 0===r?void 0:r.disabled)&&void 0!==a?a:t.disabled,class:H(t),onInput:e=>{var i;t.value=e.target.value,(null===(i=t.attributes)||void 0===i?void 0:i.onInput)&&t.attributes.onInput(e)}})))})))}renderAlertButtons(){const t=this.processedButtons,e=C(this);return o("div",{class:{"alert-button-group":!0,"alert-button-group-vertical":t.length>2}},t.map((t=>o("button",Object.assign({},t.htmlAttributes,{type:"button",id:t.id,class:T(t),tabIndex:0,onClick:()=>this.buttonClick(t)}),o("span",{class:"alert-button-inner"},t.text),"md"===e&&o("ion-ripple-effect",null)))))}renderAlertMessage(t){const{customHTMLEnabled:e,message:i}=this;return e?o("div",{id:t,class:"alert-message",innerHTML:s(i)}):o("div",{id:t,class:"alert-message"},i)}render(){const{overlayIndex:t,header:e,subHeader:i,message:r,htmlAttributes:n}=this,l=C(this),s=`alert-${t}-hdr`,d=`alert-${t}-msg`,c=`alert-${t}-sub-hdr`,p=this.inputs.length>0||this.buttons.length>0?"alertdialog":"alert",b=e&&i?`${s} ${c}`:e?s:i?c:null;return o(a,{key:"6025440b9cd369d4fac89e7e4296c84a10a0b8e0",tabindex:"-1",style:{zIndex:`${2e4+t}`},class:Object.assign(Object.assign({},j(this.cssClass)),{[l]:!0,"overlay-hidden":!0,"alert-translucent":this.translucent}),onIonAlertWillDismiss:this.dispatchCancelHandler,onIonBackdropTap:this.onBackdropTap},o("ion-backdrop",{key:"3cd5ca8b99cb95b11dd22ab41a820d841142896f",tappable:this.backdropDismiss}),o("div",{key:"4cc62ae6e21424057d22aeef1e8fc77011e77cd5",tabindex:"0","aria-hidden":"true"}),o("div",Object.assign({key:"364057a69f25aa88904df17bdcf7e5bf714e7830",class:"alert-wrapper ion-overlay-wrapper",role:p,"aria-modal":"true","aria-labelledby":b,"aria-describedby":void 0!==r?d:null,tabindex:"0",ref:t=>this.wrapperEl=t},n),o("div",{key:"78694e3c0db2d408df3899fb1a90859bcc8d14cc",class:"alert-head"},e&&o("h2",{key:"ec88ff3e4e1ea871b5975133fdcf4cac38b05e0f",id:s,class:"alert-title"},e),i&&!e&&o("h2",{key:"9b09bc8bb68af255ef8b7d22587acc946148e544",id:c,class:"alert-sub-title"},i),i&&e&&o("h3",{key:"99abe815f75d2df7f1b77c0df9f3436724fea76f",id:c,class:"alert-sub-title"},i)),this.renderAlertMessage(d),this.renderAlertInputs(),this.renderAlertButtons()),o("div",{key:"a43d0c22c0e46b1ef911f92ffeb253d7911b85f7",tabindex:"0","aria-hidden":"true"}))}get el(){return this}static get watchers(){return{isOpen:[{onIsOpenChange:0}],trigger:[{triggerChanged:0}],buttons:[{buttonsChanged:0}],inputs:[{inputsChanged:0}]}}static get style(){return{ios:".sc-ion-alert-ios-h{--min-width:250px;--width:auto;--min-height:auto;--height:auto;--max-height:90%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-alert-ios-h{display:none}.alert-top.sc-ion-alert-ios-h{padding-top:50px;-ms-flex-align:start;align-items:flex-start}.alert-wrapper.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:content;opacity:0;z-index:10}.alert-title.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-sub-title.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-weight:normal}.alert-message.sc-ion-alert-ios,.alert-input-group.sc-ion-alert-ios{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:touch;overflow-y:auto;overscroll-behavior-y:contain}.alert-checkbox-label.sc-ion-alert-ios,.alert-radio-label.sc-ion-alert-ios{overflow-wrap:anywhere}@media (any-pointer: coarse){.alert-checkbox-group.sc-ion-alert-ios::-webkit-scrollbar,.alert-radio-group.sc-ion-alert-ios::-webkit-scrollbar,.alert-message.sc-ion-alert-ios::-webkit-scrollbar{display:none}}.alert-input.sc-ion-alert-ios{padding-left:0;padding-right:0;padding-top:10px;padding-bottom:10px;width:100%;border:0;background:inherit;font:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.alert-button-group.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%}.alert-button-group-vertical.sc-ion-alert-ios{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.alert-button.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;border:0;font-size:0.875rem;line-height:1.25rem;z-index:0}.alert-button.ion-focused.sc-ion-alert-ios,.alert-tappable.ion-focused.sc-ion-alert-ios{background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.alert-button-inner.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;min-height:inherit}.alert-input-disabled.sc-ion-alert-ios,.alert-checkbox-button-disabled.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios,.alert-radio-button-disabled.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios{cursor:default;opacity:0.5;pointer-events:none}.alert-tappable.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:-ms-flexbox;display:flex;width:100%;border:0;background:transparent;font-size:inherit;line-height:initial;text-align:start;-webkit-appearance:none;-moz-appearance:none;appearance:none;contain:content}.alert-button.sc-ion-alert-ios,.alert-checkbox.sc-ion-alert-ios,.alert-input.sc-ion-alert-ios,.alert-radio.sc-ion-alert-ios{outline:none}.alert-radio-icon.sc-ion-alert-ios,.alert-checkbox-icon.sc-ion-alert-ios,.alert-checkbox-inner.sc-ion-alert-ios{-webkit-box-sizing:border-box;box-sizing:border-box}textarea.alert-input.sc-ion-alert-ios{min-height:37px;resize:none}.sc-ion-alert-ios-h{--background:var(--ion-overlay-background-color, var(--ion-color-step-100, var(--ion-background-color-step-100, #f9f9f9)));--max-width:clamp(270px, 16.875rem, 324px);--backdrop-opacity:var(--ion-backdrop-opacity, 0.3);font-size:max(14px, 0.875rem)}.alert-wrapper.sc-ion-alert-ios{border-radius:13px;-webkit-box-shadow:none;box-shadow:none;overflow:hidden}.alert-button.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios{pointer-events:none}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.alert-translucent.sc-ion-alert-ios-h .alert-wrapper.sc-ion-alert-ios{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.9);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}}.alert-head.sc-ion-alert-ios{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:12px;padding-bottom:7px;text-align:center}.alert-title.sc-ion-alert-ios{margin-top:8px;color:var(--ion-text-color, #000);font-size:max(17px, 1.0625rem);font-weight:600}.alert-sub-title.sc-ion-alert-ios{color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666));font-size:max(14px, 0.875rem)}.alert-message.sc-ion-alert-ios,.alert-input-group.sc-ion-alert-ios{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0;padding-bottom:21px;color:var(--ion-text-color, #000);font-size:max(13px, 0.8125rem);text-align:center}.alert-message.sc-ion-alert-ios{max-height:240px}.alert-message.sc-ion-alert-ios:empty{padding-left:0;padding-right:0;padding-top:0;padding-bottom:12px}.alert-input.sc-ion-alert-ios{border-radius:7px;margin-top:10px;-webkit-padding-start:7px;padding-inline-start:7px;-webkit-padding-end:7px;padding-inline-end:7px;padding-top:7px;padding-bottom:7px;border:0.55px solid var(--ion-color-step-250, var(--ion-background-color-step-250, #bfbfbf));background-color:var(--ion-background-color, #fff);-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:1rem}.alert-input.sc-ion-alert-ios::-webkit-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-moz-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios:-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-ms-clear{display:none}.alert-input.sc-ion-alert-ios::-webkit-date-and-time-value{height:18px}.alert-radio-group.sc-ion-alert-ios,.alert-checkbox-group.sc-ion-alert-ios{-ms-scroll-chaining:none;overscroll-behavior:contain;max-height:240px;border-top:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);overflow-y:auto;-webkit-overflow-scrolling:touch}.alert-tappable.sc-ion-alert-ios{min-height:44px}.alert-radio-label.sc-ion-alert-ios{-webkit-padding-start:13px;padding-inline-start:13px;-webkit-padding-end:13px;padding-inline-end:13px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;-ms-flex-order:0;order:0;color:var(--ion-text-color, #000)}[aria-checked=true].sc-ion-alert-ios .alert-radio-label.sc-ion-alert-ios{color:var(--ion-color-primary, #0054e9)}.alert-radio-icon.sc-ion-alert-ios{position:relative;-ms-flex-order:1;order:1;min-width:30px}[aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios{top:-7px;position:absolute;width:6px;height:12px;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios{inset-inline-start:7px}.alert-checkbox-label.sc-ion-alert-ios{-webkit-padding-start:13px;padding-inline-start:13px;-webkit-padding-end:13px;padding-inline-end:13px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;color:var(--ion-text-color, #000)}.alert-checkbox-icon.sc-ion-alert-ios{border-radius:50%;-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:6px;margin-inline-end:6px;margin-top:10px;margin-bottom:10px;position:relative;width:min(1.375rem, 55.836px);height:min(1.375rem, 55.836px);border-width:0.125rem;border-style:solid;border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));background-color:var(--ion-item-background, var(--ion-background-color, #fff));contain:strict}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-icon.sc-ion-alert-ios{border-color:var(--ion-color-primary, #0054e9);background-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios{top:calc(min(1.375rem, 55.836px) / 8);position:absolute;width:calc(min(1.375rem, 55.836px) / 6 + 1px);height:calc(min(1.375rem, 55.836px) * 0.5);-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:0.125rem;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-background-color, #fff)}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios{inset-inline-start:calc(min(1.375rem, 55.836px) / 3)}.alert-button-group.sc-ion-alert-ios{-webkit-margin-end:-0.55px;margin-inline-end:-0.55px;-ms-flex-wrap:wrap;flex-wrap:wrap}.alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios{border-right:none}[dir=rtl].sc-ion-alert-ios-h .alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child{border-right:none}[dir=rtl].sc-ion-alert-ios .alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child{border-right:none}@supports selector(:dir(rtl)){.alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child:dir(rtl){border-right:none}}.alert-button.sc-ion-alert-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;border-radius:0;-ms-flex:1 1 auto;flex:1 1 auto;min-width:50%;height:max(44px, 2.75rem);border-top:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);background-color:transparent;color:var(--ion-color-primary, #0054e9);font-size:max(17px, 1.0625rem);overflow:hidden}[dir=rtl].sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:first-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:first-child{border-right:0}[dir=rtl].sc-ion-alert-ios .alert-button.sc-ion-alert-ios:first-child{border-right:0}@supports selector(:dir(rtl)){.alert-button.sc-ion-alert-ios:first-child:dir(rtl){border-right:0}}.alert-button.sc-ion-alert-ios:last-child{border-right:0;font-weight:bold}[dir=rtl].sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:last-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:last-child{border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}[dir=rtl].sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child{border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}@supports selector(:dir(rtl)){.alert-button.sc-ion-alert-ios:last-child:dir(rtl){border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}}.alert-button.ion-activated.sc-ion-alert-ios{background-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.1)}.alert-button-role-destructive.sc-ion-alert-ios,.alert-button-role-destructive.ion-activated.sc-ion-alert-ios,.alert-button-role-destructive.ion-focused.sc-ion-alert-ios{color:var(--ion-color-danger, #c5000f)}",md:".sc-ion-alert-md-h{--min-width:250px;--width:auto;--min-height:auto;--height:auto;--max-height:90%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-alert-md-h{display:none}.alert-top.sc-ion-alert-md-h{padding-top:50px;-ms-flex-align:start;align-items:flex-start}.alert-wrapper.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:content;opacity:0;z-index:10}.alert-title.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-sub-title.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-weight:normal}.alert-message.sc-ion-alert-md,.alert-input-group.sc-ion-alert-md{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:touch;overflow-y:auto;overscroll-behavior-y:contain}.alert-checkbox-label.sc-ion-alert-md,.alert-radio-label.sc-ion-alert-md{overflow-wrap:anywhere}@media (any-pointer: coarse){.alert-checkbox-group.sc-ion-alert-md::-webkit-scrollbar,.alert-radio-group.sc-ion-alert-md::-webkit-scrollbar,.alert-message.sc-ion-alert-md::-webkit-scrollbar{display:none}}.alert-input.sc-ion-alert-md{padding-left:0;padding-right:0;padding-top:10px;padding-bottom:10px;width:100%;border:0;background:inherit;font:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.alert-button-group.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%}.alert-button-group-vertical.sc-ion-alert-md{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.alert-button.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;border:0;font-size:0.875rem;line-height:1.25rem;z-index:0}.alert-button.ion-focused.sc-ion-alert-md,.alert-tappable.ion-focused.sc-ion-alert-md{background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.alert-button-inner.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;min-height:inherit}.alert-input-disabled.sc-ion-alert-md,.alert-checkbox-button-disabled.sc-ion-alert-md .alert-button-inner.sc-ion-alert-md,.alert-radio-button-disabled.sc-ion-alert-md .alert-button-inner.sc-ion-alert-md{cursor:default;opacity:0.5;pointer-events:none}.alert-tappable.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:-ms-flexbox;display:flex;width:100%;border:0;background:transparent;font-size:inherit;line-height:initial;text-align:start;-webkit-appearance:none;-moz-appearance:none;appearance:none;contain:content}.alert-button.sc-ion-alert-md,.alert-checkbox.sc-ion-alert-md,.alert-input.sc-ion-alert-md,.alert-radio.sc-ion-alert-md{outline:none}.alert-radio-icon.sc-ion-alert-md,.alert-checkbox-icon.sc-ion-alert-md,.alert-checkbox-inner.sc-ion-alert-md{-webkit-box-sizing:border-box;box-sizing:border-box}textarea.alert-input.sc-ion-alert-md{min-height:37px;resize:none}.sc-ion-alert-md-h{--background:var(--ion-overlay-background-color, var(--ion-background-color, #fff));--max-width:280px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.32);font-size:0.875rem}.alert-wrapper.sc-ion-alert-md{border-radius:4px;-webkit-box-shadow:0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12);box-shadow:0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12)}.alert-head.sc-ion-alert-md{-webkit-padding-start:23px;padding-inline-start:23px;-webkit-padding-end:23px;padding-inline-end:23px;padding-top:20px;padding-bottom:15px;text-align:start}.alert-title.sc-ion-alert-md{color:var(--ion-text-color, #000);font-size:1.25rem;font-weight:500}.alert-sub-title.sc-ion-alert-md{color:var(--ion-text-color, #000);font-size:1rem}.alert-message.sc-ion-alert-md,.alert-input-group.sc-ion-alert-md{-webkit-padding-start:24px;padding-inline-start:24px;-webkit-padding-end:24px;padding-inline-end:24px;padding-top:20px;padding-bottom:20px;color:var(--ion-color-step-550, var(--ion-text-color-step-450, #737373))}.alert-message.sc-ion-alert-md{font-size:1rem}@media screen and (max-width: 767px){.alert-message.sc-ion-alert-md{max-height:266px}}.alert-message.sc-ion-alert-md:empty{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-head.sc-ion-alert-md+.alert-message.sc-ion-alert-md{padding-top:0}.alert-input.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:5px;border-bottom:1px solid var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));color:var(--ion-text-color, #000)}.alert-input.sc-ion-alert-md::-webkit-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-moz-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md:-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-ms-clear{display:none}.alert-input.sc-ion-alert-md:focus{margin-bottom:4px;border-bottom:2px solid var(--ion-color-primary, #0054e9)}.alert-radio-group.sc-ion-alert-md,.alert-checkbox-group.sc-ion-alert-md{position:relative;border-top:1px solid var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));border-bottom:1px solid var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));overflow:auto}@media screen and (max-width: 767px){.alert-radio-group.sc-ion-alert-md,.alert-checkbox-group.sc-ion-alert-md{max-height:266px}}.alert-tappable.sc-ion-alert-md{position:relative;min-height:48px}.alert-radio-label.sc-ion-alert-md{-webkit-padding-start:52px;padding-inline-start:52px;-webkit-padding-end:26px;padding-inline-end:26px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));font-size:1rem}.alert-radio-icon.sc-ion-alert-md{top:0;border-radius:50%;display:block;position:relative;width:20px;height:20px;border-width:2px;border-style:solid;border-color:var(--ion-color-step-550, var(--ion-background-color-step-550, #737373))}.alert-radio-icon.sc-ion-alert-md{inset-inline-start:26px}.alert-radio-inner.sc-ion-alert-md{top:3px;border-radius:50%;position:absolute;width:10px;height:10px;-webkit-transform:scale3d(0, 0, 0);transform:scale3d(0, 0, 0);-webkit-transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:var(--ion-color-primary, #0054e9)}.alert-radio-inner.sc-ion-alert-md{inset-inline-start:3px}[aria-checked=true].sc-ion-alert-md .alert-radio-label.sc-ion-alert-md{color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626))}[aria-checked=true].sc-ion-alert-md .alert-radio-icon.sc-ion-alert-md{border-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-md .alert-radio-inner.sc-ion-alert-md{-webkit-transform:scale3d(1, 1, 1);transform:scale3d(1, 1, 1)}.alert-checkbox-label.sc-ion-alert-md{-webkit-padding-start:53px;padding-inline-start:53px;-webkit-padding-end:26px;padding-inline-end:26px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;width:calc(100% - 53px);color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));font-size:1rem}.alert-checkbox-icon.sc-ion-alert-md{top:0;border-radius:2px;position:relative;width:16px;height:16px;border-width:2px;border-style:solid;border-color:var(--ion-color-step-550, var(--ion-background-color-step-550, #737373));contain:strict}.alert-checkbox-icon.sc-ion-alert-md{inset-inline-start:26px}[aria-checked=true].sc-ion-alert-md .alert-checkbox-icon.sc-ion-alert-md{border-color:var(--ion-color-primary, #0054e9);background-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{top:0;position:absolute;width:6px;height:10px;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-color-primary-contrast, #fff)}[aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{inset-inline-start:3px}.alert-button-group.sc-ion-alert-md{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse;-ms-flex-pack:end;justify-content:flex-end}.alert-button.sc-ion-alert-md{border-radius:2px;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px;margin-top:0;margin-bottom:0;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:10px;padding-bottom:10px;position:relative;background-color:transparent;color:var(--ion-color-primary, #0054e9);font-weight:500;text-align:end;text-transform:uppercase;overflow:hidden}.alert-button-inner.sc-ion-alert-md{-ms-flex-pack:end;justify-content:flex-end}@media screen and (min-width: 768px){.sc-ion-alert-md-h{--max-width:min(100vw - 96px, 560px);--max-height:min(100vh - 96px, 560px)}}"}}},[34,"ion-alert",{overlayIndex:[2,"overlay-index"],delegate:[16],hasController:[4,"has-controller"],keyboardClose:[4,"keyboard-close"],enterAnimation:[16],leaveAnimation:[16],cssClass:[1,"css-class"],header:[1],subHeader:[1,"sub-header"],message:[1],buttons:[16],inputs:[1040],backdropDismiss:[4,"backdrop-dismiss"],translucent:[4],animated:[4],htmlAttributes:[16],isOpen:[4,"is-open"],trigger:[1],present:[64],dismiss:[64],onDidDismiss:[64],onWillDismiss:[64]},[[4,"keydown","onKeydown"]],{isOpen:[{onIsOpenChange:0}],trigger:[{triggerChanged:0}],buttons:[{buttonsChanged:0}],inputs:[{inputsChanged:0}]}]),H=t=>{var e,i,r;return Object.assign(Object.assign({"alert-input":!0,"alert-input-disabled":(null!==(i=null===(e=t.attributes)||void 0===e?void 0:e.disabled)&&void 0!==i?i:t.disabled)||!1},j(t.cssClass)),j(t.attributes?null===(r=t.attributes.class)||void 0===r?void 0:r.toString():""))},T=t=>Object.assign({"alert-button":!0,"ion-focusable":!0,"ion-activatable":!0,[`alert-button-role-${t.role}`]:void 0!==t.role},j(t.cssClass));function P(){"undefined"!=typeof customElements&&["ion-alert","ion-backdrop","ion-ripple-effect"].forEach((t=>{switch(t){case"ion-alert":customElements.get(n(t))||customElements.define(n(t),W);break;case"ion-backdrop":customElements.get(n(t))||O();break;case"ion-ripple-effect":customElements.get(n(t))||D()}}))}export{W as A,P as d}
|
|
4
|
+
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host } from '@stencil/core/internal/client';
|
|
5
|
+
import { E as ENABLE_HTML_CONTENT_DEFAULT, a as sanitizeDOMString } from './config.js';
|
|
6
|
+
import { c as createButtonActiveGesture } from './button-active.js';
|
|
7
|
+
import { r as raf } from './helpers.js';
|
|
8
|
+
import { c as createLockController } from './lock-controller.js';
|
|
9
|
+
import { c as config, p as printIonWarning } from './index4.js';
|
|
10
|
+
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall } from './overlays.js';
|
|
11
|
+
import { g as getClassMap } from './theme.js';
|
|
12
|
+
import { b as getIonMode } from './ionic-global.js';
|
|
13
|
+
import { c as createAnimation } from './animation.js';
|
|
14
|
+
import { d as defineCustomElement$2 } from './backdrop.js';
|
|
15
|
+
import { d as defineCustomElement$1 } from './ripple-effect.js';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* iOS Alert Enter Animation
|
|
19
|
+
*/
|
|
20
|
+
const iosEnterAnimation = (baseEl) => {
|
|
21
|
+
const baseAnimation = createAnimation();
|
|
22
|
+
const backdropAnimation = createAnimation();
|
|
23
|
+
const wrapperAnimation = createAnimation();
|
|
24
|
+
backdropAnimation
|
|
25
|
+
.addElement(baseEl.querySelector('ion-backdrop'))
|
|
26
|
+
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
|
27
|
+
.beforeStyles({
|
|
28
|
+
'pointer-events': 'none',
|
|
29
|
+
})
|
|
30
|
+
.afterClearStyles(['pointer-events']);
|
|
31
|
+
wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper')).keyframes([
|
|
32
|
+
{ offset: 0, opacity: '0.01', transform: 'scale(1.1)' },
|
|
33
|
+
{ offset: 1, opacity: '1', transform: 'scale(1)' },
|
|
34
|
+
]);
|
|
35
|
+
return baseAnimation
|
|
36
|
+
.addElement(baseEl)
|
|
37
|
+
.easing('ease-in-out')
|
|
38
|
+
.duration(200)
|
|
39
|
+
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* iOS Alert Leave Animation
|
|
44
|
+
*/
|
|
45
|
+
const iosLeaveAnimation = (baseEl) => {
|
|
46
|
+
const baseAnimation = createAnimation();
|
|
47
|
+
const backdropAnimation = createAnimation();
|
|
48
|
+
const wrapperAnimation = createAnimation();
|
|
49
|
+
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
|
|
50
|
+
wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper')).keyframes([
|
|
51
|
+
{ offset: 0, opacity: 0.99, transform: 'scale(1)' },
|
|
52
|
+
{ offset: 1, opacity: 0, transform: 'scale(0.9)' },
|
|
53
|
+
]);
|
|
54
|
+
return baseAnimation
|
|
55
|
+
.addElement(baseEl)
|
|
56
|
+
.easing('ease-in-out')
|
|
57
|
+
.duration(200)
|
|
58
|
+
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Md Alert Enter Animation
|
|
63
|
+
*/
|
|
64
|
+
const mdEnterAnimation = (baseEl) => {
|
|
65
|
+
const baseAnimation = createAnimation();
|
|
66
|
+
const backdropAnimation = createAnimation();
|
|
67
|
+
const wrapperAnimation = createAnimation();
|
|
68
|
+
backdropAnimation
|
|
69
|
+
.addElement(baseEl.querySelector('ion-backdrop'))
|
|
70
|
+
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
|
71
|
+
.beforeStyles({
|
|
72
|
+
'pointer-events': 'none',
|
|
73
|
+
})
|
|
74
|
+
.afterClearStyles(['pointer-events']);
|
|
75
|
+
wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper')).keyframes([
|
|
76
|
+
{ offset: 0, opacity: '0.01', transform: 'scale(0.9)' },
|
|
77
|
+
{ offset: 1, opacity: '1', transform: 'scale(1)' },
|
|
78
|
+
]);
|
|
79
|
+
return baseAnimation
|
|
80
|
+
.addElement(baseEl)
|
|
81
|
+
.easing('ease-in-out')
|
|
82
|
+
.duration(150)
|
|
83
|
+
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Md Alert Leave Animation
|
|
88
|
+
*/
|
|
89
|
+
const mdLeaveAnimation = (baseEl) => {
|
|
90
|
+
const baseAnimation = createAnimation();
|
|
91
|
+
const backdropAnimation = createAnimation();
|
|
92
|
+
const wrapperAnimation = createAnimation();
|
|
93
|
+
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
|
|
94
|
+
wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper')).fromTo('opacity', 0.99, 0);
|
|
95
|
+
return baseAnimation
|
|
96
|
+
.addElement(baseEl)
|
|
97
|
+
.easing('ease-in-out')
|
|
98
|
+
.duration(150)
|
|
99
|
+
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const alertIosCss = ".sc-ion-alert-ios-h{--min-width:250px;--width:auto;--min-height:auto;--height:auto;--max-height:90%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-alert-ios-h{display:none}.alert-top.sc-ion-alert-ios-h{padding-top:50px;-ms-flex-align:start;align-items:flex-start}.alert-wrapper.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:content;opacity:0;z-index:10}.alert-title.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-sub-title.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-weight:normal}.alert-message.sc-ion-alert-ios,.alert-input-group.sc-ion-alert-ios{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:touch;overflow-y:auto;overscroll-behavior-y:contain}.alert-checkbox-label.sc-ion-alert-ios,.alert-radio-label.sc-ion-alert-ios{overflow-wrap:anywhere}@media (any-pointer: coarse){.alert-checkbox-group.sc-ion-alert-ios::-webkit-scrollbar,.alert-radio-group.sc-ion-alert-ios::-webkit-scrollbar,.alert-message.sc-ion-alert-ios::-webkit-scrollbar{display:none}}.alert-input.sc-ion-alert-ios{padding-left:0;padding-right:0;padding-top:10px;padding-bottom:10px;width:100%;border:0;background:inherit;font:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.alert-button-group.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%}.alert-button-group-vertical.sc-ion-alert-ios{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.alert-button.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;border:0;font-size:0.875rem;line-height:1.25rem;z-index:0}.alert-button.ion-focused.sc-ion-alert-ios,.alert-tappable.ion-focused.sc-ion-alert-ios{background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.alert-button-inner.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;min-height:inherit}.alert-input-disabled.sc-ion-alert-ios,.alert-checkbox-button-disabled.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios,.alert-radio-button-disabled.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios{cursor:default;opacity:0.5;pointer-events:none}.alert-tappable.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:-ms-flexbox;display:flex;width:100%;border:0;background:transparent;font-size:inherit;line-height:initial;text-align:start;-webkit-appearance:none;-moz-appearance:none;appearance:none;contain:content}.alert-button.sc-ion-alert-ios,.alert-checkbox.sc-ion-alert-ios,.alert-input.sc-ion-alert-ios,.alert-radio.sc-ion-alert-ios{outline:none}.alert-radio-icon.sc-ion-alert-ios,.alert-checkbox-icon.sc-ion-alert-ios,.alert-checkbox-inner.sc-ion-alert-ios{-webkit-box-sizing:border-box;box-sizing:border-box}textarea.alert-input.sc-ion-alert-ios{min-height:37px;resize:none}.sc-ion-alert-ios-h{--background:var(--ion-overlay-background-color, var(--ion-color-step-100, var(--ion-background-color-step-100, #f9f9f9)));--max-width:clamp(270px, 16.875rem, 324px);--backdrop-opacity:var(--ion-backdrop-opacity, 0.3);font-size:max(14px, 0.875rem)}.alert-wrapper.sc-ion-alert-ios{border-radius:13px;-webkit-box-shadow:none;box-shadow:none;overflow:hidden}.alert-button.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios{pointer-events:none}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.alert-translucent.sc-ion-alert-ios-h .alert-wrapper.sc-ion-alert-ios{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.9);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}}.alert-head.sc-ion-alert-ios{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:12px;padding-bottom:7px;text-align:center}.alert-title.sc-ion-alert-ios{margin-top:8px;color:var(--ion-text-color, #000);font-size:max(17px, 1.0625rem);font-weight:600}.alert-sub-title.sc-ion-alert-ios{color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666));font-size:max(14px, 0.875rem)}.alert-message.sc-ion-alert-ios,.alert-input-group.sc-ion-alert-ios{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0;padding-bottom:21px;color:var(--ion-text-color, #000);font-size:max(13px, 0.8125rem);text-align:center}.alert-message.sc-ion-alert-ios{max-height:240px}.alert-message.sc-ion-alert-ios:empty{padding-left:0;padding-right:0;padding-top:0;padding-bottom:12px}.alert-input.sc-ion-alert-ios{border-radius:7px;margin-top:10px;-webkit-padding-start:7px;padding-inline-start:7px;-webkit-padding-end:7px;padding-inline-end:7px;padding-top:7px;padding-bottom:7px;border:0.55px solid var(--ion-color-step-250, var(--ion-background-color-step-250, #bfbfbf));background-color:var(--ion-background-color, #fff);-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:1rem}.alert-input.sc-ion-alert-ios::-webkit-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-moz-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios:-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-ms-clear{display:none}.alert-input.sc-ion-alert-ios::-webkit-date-and-time-value{height:18px}.alert-radio-group.sc-ion-alert-ios,.alert-checkbox-group.sc-ion-alert-ios{-ms-scroll-chaining:none;overscroll-behavior:contain;max-height:240px;border-top:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);overflow-y:auto;-webkit-overflow-scrolling:touch}.alert-tappable.sc-ion-alert-ios{min-height:44px}.alert-radio-label.sc-ion-alert-ios{-webkit-padding-start:13px;padding-inline-start:13px;-webkit-padding-end:13px;padding-inline-end:13px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;-ms-flex-order:0;order:0;color:var(--ion-text-color, #000)}[aria-checked=true].sc-ion-alert-ios .alert-radio-label.sc-ion-alert-ios{color:var(--ion-color-primary, #0054e9)}.alert-radio-icon.sc-ion-alert-ios{position:relative;-ms-flex-order:1;order:1;min-width:30px}[aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios{top:-7px;position:absolute;width:6px;height:12px;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios{inset-inline-start:7px}.alert-checkbox-label.sc-ion-alert-ios{-webkit-padding-start:13px;padding-inline-start:13px;-webkit-padding-end:13px;padding-inline-end:13px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;color:var(--ion-text-color, #000)}.alert-checkbox-icon.sc-ion-alert-ios{border-radius:50%;-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:6px;margin-inline-end:6px;margin-top:10px;margin-bottom:10px;position:relative;width:min(1.375rem, 55.836px);height:min(1.375rem, 55.836px);border-width:0.125rem;border-style:solid;border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));background-color:var(--ion-item-background, var(--ion-background-color, #fff));contain:strict}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-icon.sc-ion-alert-ios{border-color:var(--ion-color-primary, #0054e9);background-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios{top:calc(min(1.375rem, 55.836px) / 8);position:absolute;width:calc(min(1.375rem, 55.836px) / 6 + 1px);height:calc(min(1.375rem, 55.836px) * 0.5);-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:0.125rem;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-background-color, #fff)}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios{inset-inline-start:calc(min(1.375rem, 55.836px) / 3)}.alert-button-group.sc-ion-alert-ios{-webkit-margin-end:-0.55px;margin-inline-end:-0.55px;-ms-flex-wrap:wrap;flex-wrap:wrap}.alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios{border-right:none}[dir=rtl].sc-ion-alert-ios-h .alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child{border-right:none}[dir=rtl].sc-ion-alert-ios .alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child{border-right:none}@supports selector(:dir(rtl)){.alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child:dir(rtl){border-right:none}}.alert-button.sc-ion-alert-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;border-radius:0;-ms-flex:1 1 auto;flex:1 1 auto;min-width:50%;height:max(44px, 2.75rem);border-top:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);background-color:transparent;color:var(--ion-color-primary, #0054e9);font-size:max(17px, 1.0625rem);overflow:hidden}[dir=rtl].sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:first-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:first-child{border-right:0}[dir=rtl].sc-ion-alert-ios .alert-button.sc-ion-alert-ios:first-child{border-right:0}@supports selector(:dir(rtl)){.alert-button.sc-ion-alert-ios:first-child:dir(rtl){border-right:0}}.alert-button.sc-ion-alert-ios:last-child{border-right:0;font-weight:bold}[dir=rtl].sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:last-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:last-child{border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}[dir=rtl].sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child{border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}@supports selector(:dir(rtl)){.alert-button.sc-ion-alert-ios:last-child:dir(rtl){border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}}.alert-button.ion-activated.sc-ion-alert-ios{background-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.1)}.alert-button-role-destructive.sc-ion-alert-ios,.alert-button-role-destructive.ion-activated.sc-ion-alert-ios,.alert-button-role-destructive.ion-focused.sc-ion-alert-ios{color:var(--ion-color-danger, #c5000f)}";
|
|
103
|
+
|
|
104
|
+
const alertMdCss = ".sc-ion-alert-md-h{--min-width:250px;--width:auto;--min-height:auto;--height:auto;--max-height:90%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-alert-md-h{display:none}.alert-top.sc-ion-alert-md-h{padding-top:50px;-ms-flex-align:start;align-items:flex-start}.alert-wrapper.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:content;opacity:0;z-index:10}.alert-title.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-sub-title.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-weight:normal}.alert-message.sc-ion-alert-md,.alert-input-group.sc-ion-alert-md{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:touch;overflow-y:auto;overscroll-behavior-y:contain}.alert-checkbox-label.sc-ion-alert-md,.alert-radio-label.sc-ion-alert-md{overflow-wrap:anywhere}@media (any-pointer: coarse){.alert-checkbox-group.sc-ion-alert-md::-webkit-scrollbar,.alert-radio-group.sc-ion-alert-md::-webkit-scrollbar,.alert-message.sc-ion-alert-md::-webkit-scrollbar{display:none}}.alert-input.sc-ion-alert-md{padding-left:0;padding-right:0;padding-top:10px;padding-bottom:10px;width:100%;border:0;background:inherit;font:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.alert-button-group.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%}.alert-button-group-vertical.sc-ion-alert-md{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.alert-button.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;border:0;font-size:0.875rem;line-height:1.25rem;z-index:0}.alert-button.ion-focused.sc-ion-alert-md,.alert-tappable.ion-focused.sc-ion-alert-md{background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.alert-button-inner.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;min-height:inherit}.alert-input-disabled.sc-ion-alert-md,.alert-checkbox-button-disabled.sc-ion-alert-md .alert-button-inner.sc-ion-alert-md,.alert-radio-button-disabled.sc-ion-alert-md .alert-button-inner.sc-ion-alert-md{cursor:default;opacity:0.5;pointer-events:none}.alert-tappable.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:-ms-flexbox;display:flex;width:100%;border:0;background:transparent;font-size:inherit;line-height:initial;text-align:start;-webkit-appearance:none;-moz-appearance:none;appearance:none;contain:content}.alert-button.sc-ion-alert-md,.alert-checkbox.sc-ion-alert-md,.alert-input.sc-ion-alert-md,.alert-radio.sc-ion-alert-md{outline:none}.alert-radio-icon.sc-ion-alert-md,.alert-checkbox-icon.sc-ion-alert-md,.alert-checkbox-inner.sc-ion-alert-md{-webkit-box-sizing:border-box;box-sizing:border-box}textarea.alert-input.sc-ion-alert-md{min-height:37px;resize:none}.sc-ion-alert-md-h{--background:var(--ion-overlay-background-color, var(--ion-background-color, #fff));--max-width:280px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.32);font-size:0.875rem}.alert-wrapper.sc-ion-alert-md{border-radius:4px;-webkit-box-shadow:0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12);box-shadow:0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12)}.alert-head.sc-ion-alert-md{-webkit-padding-start:23px;padding-inline-start:23px;-webkit-padding-end:23px;padding-inline-end:23px;padding-top:20px;padding-bottom:15px;text-align:start}.alert-title.sc-ion-alert-md{color:var(--ion-text-color, #000);font-size:1.25rem;font-weight:500}.alert-sub-title.sc-ion-alert-md{color:var(--ion-text-color, #000);font-size:1rem}.alert-message.sc-ion-alert-md,.alert-input-group.sc-ion-alert-md{-webkit-padding-start:24px;padding-inline-start:24px;-webkit-padding-end:24px;padding-inline-end:24px;padding-top:20px;padding-bottom:20px;color:var(--ion-color-step-550, var(--ion-text-color-step-450, #737373))}.alert-message.sc-ion-alert-md{font-size:1rem}@media screen and (max-width: 767px){.alert-message.sc-ion-alert-md{max-height:266px}}.alert-message.sc-ion-alert-md:empty{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-head.sc-ion-alert-md+.alert-message.sc-ion-alert-md{padding-top:0}.alert-input.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:5px;border-bottom:1px solid var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));color:var(--ion-text-color, #000)}.alert-input.sc-ion-alert-md::-webkit-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-moz-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md:-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-ms-clear{display:none}.alert-input.sc-ion-alert-md:focus{margin-bottom:4px;border-bottom:2px solid var(--ion-color-primary, #0054e9)}.alert-radio-group.sc-ion-alert-md,.alert-checkbox-group.sc-ion-alert-md{position:relative;border-top:1px solid var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));border-bottom:1px solid var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));overflow:auto}@media screen and (max-width: 767px){.alert-radio-group.sc-ion-alert-md,.alert-checkbox-group.sc-ion-alert-md{max-height:266px}}.alert-tappable.sc-ion-alert-md{position:relative;min-height:48px}.alert-radio-label.sc-ion-alert-md{-webkit-padding-start:52px;padding-inline-start:52px;-webkit-padding-end:26px;padding-inline-end:26px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));font-size:1rem}.alert-radio-icon.sc-ion-alert-md{top:0;border-radius:50%;display:block;position:relative;width:20px;height:20px;border-width:2px;border-style:solid;border-color:var(--ion-color-step-550, var(--ion-background-color-step-550, #737373))}.alert-radio-icon.sc-ion-alert-md{inset-inline-start:26px}.alert-radio-inner.sc-ion-alert-md{top:3px;border-radius:50%;position:absolute;width:10px;height:10px;-webkit-transform:scale3d(0, 0, 0);transform:scale3d(0, 0, 0);-webkit-transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:var(--ion-color-primary, #0054e9)}.alert-radio-inner.sc-ion-alert-md{inset-inline-start:3px}[aria-checked=true].sc-ion-alert-md .alert-radio-label.sc-ion-alert-md{color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626))}[aria-checked=true].sc-ion-alert-md .alert-radio-icon.sc-ion-alert-md{border-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-md .alert-radio-inner.sc-ion-alert-md{-webkit-transform:scale3d(1, 1, 1);transform:scale3d(1, 1, 1)}.alert-checkbox-label.sc-ion-alert-md{-webkit-padding-start:53px;padding-inline-start:53px;-webkit-padding-end:26px;padding-inline-end:26px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;width:calc(100% - 53px);color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));font-size:1rem}.alert-checkbox-icon.sc-ion-alert-md{top:0;border-radius:2px;position:relative;width:16px;height:16px;border-width:2px;border-style:solid;border-color:var(--ion-color-step-550, var(--ion-background-color-step-550, #737373));contain:strict}.alert-checkbox-icon.sc-ion-alert-md{inset-inline-start:26px}[aria-checked=true].sc-ion-alert-md .alert-checkbox-icon.sc-ion-alert-md{border-color:var(--ion-color-primary, #0054e9);background-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{top:0;position:absolute;width:6px;height:10px;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-color-primary-contrast, #fff)}[aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{inset-inline-start:3px}.alert-button-group.sc-ion-alert-md{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse;-ms-flex-pack:end;justify-content:flex-end}.alert-button.sc-ion-alert-md{border-radius:2px;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px;margin-top:0;margin-bottom:0;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:10px;padding-bottom:10px;position:relative;background-color:transparent;color:var(--ion-color-primary, #0054e9);font-weight:500;text-align:end;text-transform:uppercase;overflow:hidden}.alert-button-inner.sc-ion-alert-md{-ms-flex-pack:end;justify-content:flex-end}@media screen and (min-width: 768px){.sc-ion-alert-md-h{--max-width:min(100vw - 96px, 560px);--max-height:min(100vh - 96px, 560px)}}";
|
|
105
|
+
|
|
106
|
+
const Alert = /*@__PURE__*/ proxyCustomElement(class Alert extends HTMLElement {
|
|
107
|
+
constructor(registerHost) {
|
|
108
|
+
super();
|
|
109
|
+
if (registerHost !== false) {
|
|
110
|
+
this.__registerHost();
|
|
111
|
+
}
|
|
112
|
+
this.didPresent = createEvent(this, "ionAlertDidPresent", 7);
|
|
113
|
+
this.willPresent = createEvent(this, "ionAlertWillPresent", 7);
|
|
114
|
+
this.willDismiss = createEvent(this, "ionAlertWillDismiss", 7);
|
|
115
|
+
this.didDismiss = createEvent(this, "ionAlertDidDismiss", 7);
|
|
116
|
+
this.didPresentShorthand = createEvent(this, "didPresent", 7);
|
|
117
|
+
this.willPresentShorthand = createEvent(this, "willPresent", 7);
|
|
118
|
+
this.willDismissShorthand = createEvent(this, "willDismiss", 7);
|
|
119
|
+
this.didDismissShorthand = createEvent(this, "didDismiss", 7);
|
|
120
|
+
this.delegateController = createDelegateController(this);
|
|
121
|
+
this.lockController = createLockController();
|
|
122
|
+
this.triggerController = createTriggerController();
|
|
123
|
+
this.customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
|
|
124
|
+
this.processedInputs = [];
|
|
125
|
+
this.processedButtons = [];
|
|
126
|
+
this.presented = false;
|
|
127
|
+
/** @internal */
|
|
128
|
+
this.hasController = false;
|
|
129
|
+
/**
|
|
130
|
+
* If `true`, the keyboard will be automatically dismissed when the overlay is presented.
|
|
131
|
+
*/
|
|
132
|
+
this.keyboardClose = true;
|
|
133
|
+
/**
|
|
134
|
+
* Array of buttons to be added to the alert.
|
|
135
|
+
*/
|
|
136
|
+
this.buttons = [];
|
|
137
|
+
/**
|
|
138
|
+
* Array of input to show in the alert.
|
|
139
|
+
*/
|
|
140
|
+
this.inputs = [];
|
|
141
|
+
/**
|
|
142
|
+
* If `true`, the alert will be dismissed when the backdrop is clicked.
|
|
143
|
+
*/
|
|
144
|
+
this.backdropDismiss = true;
|
|
145
|
+
/**
|
|
146
|
+
* If `true`, the alert will be translucent.
|
|
147
|
+
* Only applies when the mode is `"ios"` and the device supports
|
|
148
|
+
* [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).
|
|
149
|
+
*/
|
|
150
|
+
this.translucent = false;
|
|
151
|
+
/**
|
|
152
|
+
* If `true`, the alert will animate.
|
|
153
|
+
*/
|
|
154
|
+
this.animated = true;
|
|
155
|
+
/**
|
|
156
|
+
* If `true`, the alert will open. If `false`, the alert will close.
|
|
157
|
+
* Use this if you need finer grained control over presentation, otherwise
|
|
158
|
+
* just use the alertController or the `trigger` property.
|
|
159
|
+
* Note: `isOpen` will not automatically be set back to `false` when
|
|
160
|
+
* the alert dismisses. You will need to do that in your code.
|
|
161
|
+
*/
|
|
162
|
+
this.isOpen = false;
|
|
163
|
+
this.onBackdropTap = () => {
|
|
164
|
+
this.dismiss(undefined, BACKDROP);
|
|
165
|
+
};
|
|
166
|
+
this.dispatchCancelHandler = (ev) => {
|
|
167
|
+
const role = ev.detail.role;
|
|
168
|
+
if (isCancel(role)) {
|
|
169
|
+
const cancelButton = this.processedButtons.find((b) => b.role === 'cancel');
|
|
170
|
+
this.callButtonHandler(cancelButton);
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
onIsOpenChange(newValue, oldValue) {
|
|
175
|
+
if (newValue === true && oldValue === false) {
|
|
176
|
+
this.present();
|
|
177
|
+
}
|
|
178
|
+
else if (newValue === false && oldValue === true) {
|
|
179
|
+
this.dismiss();
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
triggerChanged() {
|
|
183
|
+
const { trigger, el, triggerController } = this;
|
|
184
|
+
if (trigger) {
|
|
185
|
+
triggerController.addClickListener(el, trigger);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
onKeydown(ev) {
|
|
189
|
+
var _a;
|
|
190
|
+
const inputTypes = new Set(this.processedInputs.map((i) => i.type));
|
|
191
|
+
/**
|
|
192
|
+
* Based on keyboard navigation requirements, the
|
|
193
|
+
* checkbox should not respond to the enter keydown event.
|
|
194
|
+
*/
|
|
195
|
+
if (inputTypes.has('checkbox') && ev.key === 'Enter') {
|
|
196
|
+
ev.preventDefault();
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Ensure when alert container is being focused, and the user presses the tab + shift keys, the focus will be set to the last alert button.
|
|
201
|
+
*/
|
|
202
|
+
if (ev.target.classList.contains('alert-wrapper')) {
|
|
203
|
+
if (ev.key === 'Tab' && ev.shiftKey) {
|
|
204
|
+
ev.preventDefault();
|
|
205
|
+
const lastChildBtn = (_a = this.wrapperEl) === null || _a === void 0 ? void 0 : _a.querySelector('.alert-button:last-child');
|
|
206
|
+
lastChildBtn.focus();
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
// The only inputs we want to navigate between using arrow keys are the radios
|
|
211
|
+
// ignore the keydown event if it is not on a radio button
|
|
212
|
+
if (!inputTypes.has('radio') ||
|
|
213
|
+
(ev.target && !this.el.contains(ev.target)) ||
|
|
214
|
+
ev.target.classList.contains('alert-button')) {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
// Get all radios inside of the radio group and then
|
|
218
|
+
// filter out disabled radios since we need to skip those
|
|
219
|
+
const query = this.el.querySelectorAll('.alert-radio');
|
|
220
|
+
const radios = Array.from(query).filter((radio) => !radio.disabled);
|
|
221
|
+
// The focused radio is the one that shares the same id as
|
|
222
|
+
// the event target
|
|
223
|
+
const index = radios.findIndex((radio) => radio.id === ev.target.id);
|
|
224
|
+
// We need to know what the next radio element should
|
|
225
|
+
// be in order to change the focus
|
|
226
|
+
let nextEl;
|
|
227
|
+
// If hitting arrow down or arrow right, move to the next radio
|
|
228
|
+
// If we're on the last radio, move to the first radio
|
|
229
|
+
if (['ArrowDown', 'ArrowRight'].includes(ev.key)) {
|
|
230
|
+
nextEl = index === radios.length - 1 ? radios[0] : radios[index + 1];
|
|
231
|
+
}
|
|
232
|
+
// If hitting arrow up or arrow left, move to the previous radio
|
|
233
|
+
// If we're on the first radio, move to the last radio
|
|
234
|
+
if (['ArrowUp', 'ArrowLeft'].includes(ev.key)) {
|
|
235
|
+
nextEl = index === 0 ? radios[radios.length - 1] : radios[index - 1];
|
|
236
|
+
}
|
|
237
|
+
if (nextEl && radios.includes(nextEl)) {
|
|
238
|
+
const nextProcessed = this.processedInputs.find((input) => input.id === (nextEl === null || nextEl === void 0 ? void 0 : nextEl.id));
|
|
239
|
+
if (nextProcessed) {
|
|
240
|
+
this.rbClick(nextProcessed);
|
|
241
|
+
nextEl.focus();
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
buttonsChanged() {
|
|
246
|
+
const buttons = this.buttons;
|
|
247
|
+
this.processedButtons = buttons.map((btn) => {
|
|
248
|
+
return typeof btn === 'string' ? { text: btn, role: btn.toLowerCase() === 'cancel' ? 'cancel' : undefined } : btn;
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
inputsChanged() {
|
|
252
|
+
const inputs = this.inputs;
|
|
253
|
+
// Get the first input that is not disabled and the checked one
|
|
254
|
+
// If an enabled checked input exists, set it to be the focusable input
|
|
255
|
+
// otherwise we default to focus the first input
|
|
256
|
+
// This will only be used when the input is type radio
|
|
257
|
+
const first = inputs.find((input) => !input.disabled);
|
|
258
|
+
const checked = inputs.find((input) => input.checked && !input.disabled);
|
|
259
|
+
const focusable = checked || first;
|
|
260
|
+
// An alert can be created with several different inputs. Radios,
|
|
261
|
+
// checkboxes and inputs are all accepted, but they cannot be mixed.
|
|
262
|
+
const inputTypes = new Set(inputs.map((i) => i.type));
|
|
263
|
+
if (inputTypes.has('checkbox') && inputTypes.has('radio')) {
|
|
264
|
+
printIonWarning(`[ion-alert] - Alert cannot mix input types: ${Array.from(inputTypes.values()).join('/')}. Please see alert docs for more info.`);
|
|
265
|
+
}
|
|
266
|
+
this.inputType = inputTypes.values().next().value;
|
|
267
|
+
this.processedInputs = inputs.map((i, index) => {
|
|
268
|
+
var _a;
|
|
269
|
+
return ({
|
|
270
|
+
type: i.type || 'text',
|
|
271
|
+
name: i.name || `${index}`,
|
|
272
|
+
placeholder: i.placeholder || '',
|
|
273
|
+
value: i.value,
|
|
274
|
+
label: i.label,
|
|
275
|
+
checked: !!i.checked,
|
|
276
|
+
disabled: !!i.disabled,
|
|
277
|
+
id: i.id || `alert-input-${this.overlayIndex}-${index}`,
|
|
278
|
+
handler: i.handler,
|
|
279
|
+
min: i.min,
|
|
280
|
+
max: i.max,
|
|
281
|
+
cssClass: (_a = i.cssClass) !== null && _a !== void 0 ? _a : '',
|
|
282
|
+
attributes: i.attributes || {},
|
|
283
|
+
tabindex: i.type === 'radio' && i !== focusable ? -1 : 0,
|
|
284
|
+
});
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
connectedCallback() {
|
|
288
|
+
prepareOverlay(this.el);
|
|
289
|
+
this.triggerChanged();
|
|
290
|
+
}
|
|
291
|
+
componentWillLoad() {
|
|
292
|
+
var _a;
|
|
293
|
+
if (!((_a = this.htmlAttributes) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
294
|
+
setOverlayId(this.el);
|
|
295
|
+
}
|
|
296
|
+
this.inputsChanged();
|
|
297
|
+
this.buttonsChanged();
|
|
298
|
+
}
|
|
299
|
+
disconnectedCallback() {
|
|
300
|
+
this.triggerController.removeClickListener();
|
|
301
|
+
if (this.gesture) {
|
|
302
|
+
this.gesture.destroy();
|
|
303
|
+
this.gesture = undefined;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
componentDidLoad() {
|
|
307
|
+
/**
|
|
308
|
+
* Only create gesture if:
|
|
309
|
+
* 1. A gesture does not already exist
|
|
310
|
+
* 2. App is running in iOS mode
|
|
311
|
+
* 3. A wrapper ref exists
|
|
312
|
+
*/
|
|
313
|
+
if (!this.gesture && getIonMode(this) === 'ios' && this.wrapperEl) {
|
|
314
|
+
this.gesture = createButtonActiveGesture(this.wrapperEl, (refEl) => refEl.classList.contains('alert-button'));
|
|
315
|
+
this.gesture.enable(true);
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* If alert was rendered with isOpen="true"
|
|
319
|
+
* then we should open alert immediately.
|
|
320
|
+
*/
|
|
321
|
+
if (this.isOpen === true) {
|
|
322
|
+
raf(() => this.present());
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* When binding values in frameworks such as Angular
|
|
326
|
+
* it is possible for the value to be set after the Web Component
|
|
327
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
328
|
+
* As a result, the watcher callback may not be fired.
|
|
329
|
+
* We work around this by manually calling the watcher
|
|
330
|
+
* callback when the component has loaded and the watcher
|
|
331
|
+
* is configured.
|
|
332
|
+
*/
|
|
333
|
+
this.triggerChanged();
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Present the alert overlay after it has been created.
|
|
337
|
+
*/
|
|
338
|
+
async present() {
|
|
339
|
+
const unlock = await this.lockController.lock();
|
|
340
|
+
await this.delegateController.attachViewToDom();
|
|
341
|
+
await present(this, 'alertEnter', iosEnterAnimation, mdEnterAnimation).then(() => {
|
|
342
|
+
var _a, _b;
|
|
343
|
+
/**
|
|
344
|
+
* Check if alert has only one button and no inputs.
|
|
345
|
+
* If so, then focus on the button. Otherwise, focus the alert wrapper.
|
|
346
|
+
* This will map to the default native alert behavior.
|
|
347
|
+
*/
|
|
348
|
+
if (this.buttons.length === 1 && this.inputs.length === 0) {
|
|
349
|
+
const queryBtn = (_a = this.wrapperEl) === null || _a === void 0 ? void 0 : _a.querySelector('.alert-button');
|
|
350
|
+
queryBtn.focus();
|
|
351
|
+
}
|
|
352
|
+
else {
|
|
353
|
+
(_b = this.wrapperEl) === null || _b === void 0 ? void 0 : _b.focus();
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
unlock();
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Dismiss the alert overlay after it has been presented.
|
|
360
|
+
* This is a no-op if the overlay has not been presented yet. If you want
|
|
361
|
+
* to remove an overlay from the DOM that was never presented, use the
|
|
362
|
+
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
363
|
+
*
|
|
364
|
+
* @param data Any data to emit in the dismiss events.
|
|
365
|
+
* @param role The role of the element that is dismissing the alert.
|
|
366
|
+
* This can be useful in a button handler for determining which button was
|
|
367
|
+
* clicked to dismiss the alert. Some examples include:
|
|
368
|
+
* `"cancel"`, `"destructive"`, `"selected"`, and `"backdrop"`.
|
|
369
|
+
*/
|
|
370
|
+
async dismiss(data, role) {
|
|
371
|
+
const unlock = await this.lockController.lock();
|
|
372
|
+
const dismissed = await dismiss(this, data, role, 'alertLeave', iosLeaveAnimation, mdLeaveAnimation);
|
|
373
|
+
if (dismissed) {
|
|
374
|
+
this.delegateController.removeViewFromDom();
|
|
375
|
+
}
|
|
376
|
+
unlock();
|
|
377
|
+
return dismissed;
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Returns a promise that resolves when the alert did dismiss.
|
|
381
|
+
*/
|
|
382
|
+
onDidDismiss() {
|
|
383
|
+
return eventMethod(this.el, 'ionAlertDidDismiss');
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Returns a promise that resolves when the alert will dismiss.
|
|
387
|
+
*/
|
|
388
|
+
onWillDismiss() {
|
|
389
|
+
return eventMethod(this.el, 'ionAlertWillDismiss');
|
|
390
|
+
}
|
|
391
|
+
rbClick(selectedInput) {
|
|
392
|
+
for (const input of this.processedInputs) {
|
|
393
|
+
input.checked = input === selectedInput;
|
|
394
|
+
input.tabindex = input === selectedInput ? 0 : -1;
|
|
395
|
+
}
|
|
396
|
+
this.activeId = selectedInput.id;
|
|
397
|
+
safeCall(selectedInput.handler, selectedInput);
|
|
398
|
+
forceUpdate(this);
|
|
399
|
+
}
|
|
400
|
+
cbClick(selectedInput) {
|
|
401
|
+
selectedInput.checked = !selectedInput.checked;
|
|
402
|
+
safeCall(selectedInput.handler, selectedInput);
|
|
403
|
+
forceUpdate(this);
|
|
404
|
+
}
|
|
405
|
+
async buttonClick(button) {
|
|
406
|
+
const role = button.role;
|
|
407
|
+
const values = this.getValues();
|
|
408
|
+
if (isCancel(role)) {
|
|
409
|
+
return this.dismiss({ values }, role);
|
|
410
|
+
}
|
|
411
|
+
const returnData = await this.callButtonHandler(button, values);
|
|
412
|
+
if (returnData !== false) {
|
|
413
|
+
return this.dismiss(Object.assign({ values }, returnData), button.role);
|
|
414
|
+
}
|
|
415
|
+
return false;
|
|
416
|
+
}
|
|
417
|
+
async callButtonHandler(button, data) {
|
|
418
|
+
if (button === null || button === void 0 ? void 0 : button.handler) {
|
|
419
|
+
// a handler has been provided, execute it
|
|
420
|
+
// pass the handler the values from the inputs
|
|
421
|
+
const returnData = await safeCall(button.handler, data);
|
|
422
|
+
if (returnData === false) {
|
|
423
|
+
// if the return value of the handler is false then do not dismiss
|
|
424
|
+
return false;
|
|
425
|
+
}
|
|
426
|
+
if (typeof returnData === 'object') {
|
|
427
|
+
return returnData;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
return {};
|
|
431
|
+
}
|
|
432
|
+
getValues() {
|
|
433
|
+
if (this.processedInputs.length === 0) {
|
|
434
|
+
// this is an alert without any options/inputs at all
|
|
435
|
+
return undefined;
|
|
436
|
+
}
|
|
437
|
+
if (this.inputType === 'radio') {
|
|
438
|
+
// this is an alert with radio buttons (single value select)
|
|
439
|
+
// return the one value which is checked, otherwise undefined
|
|
440
|
+
const checkedInput = this.processedInputs.find((i) => !!i.checked);
|
|
441
|
+
return checkedInput ? checkedInput.value : undefined;
|
|
442
|
+
}
|
|
443
|
+
if (this.inputType === 'checkbox') {
|
|
444
|
+
// this is an alert with checkboxes (multiple value select)
|
|
445
|
+
// return an array of all the checked values
|
|
446
|
+
return this.processedInputs.filter((i) => i.checked).map((i) => i.value);
|
|
447
|
+
}
|
|
448
|
+
// this is an alert with text inputs
|
|
449
|
+
// return an object of all the values with the input name as the key
|
|
450
|
+
const values = {};
|
|
451
|
+
this.processedInputs.forEach((i) => {
|
|
452
|
+
values[i.name] = i.value || '';
|
|
453
|
+
});
|
|
454
|
+
return values;
|
|
455
|
+
}
|
|
456
|
+
renderAlertInputs() {
|
|
457
|
+
switch (this.inputType) {
|
|
458
|
+
case 'checkbox':
|
|
459
|
+
return this.renderCheckbox();
|
|
460
|
+
case 'radio':
|
|
461
|
+
return this.renderRadio();
|
|
462
|
+
default:
|
|
463
|
+
return this.renderInput();
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
renderCheckbox() {
|
|
467
|
+
const inputs = this.processedInputs;
|
|
468
|
+
const mode = getIonMode(this);
|
|
469
|
+
if (inputs.length === 0) {
|
|
470
|
+
return null;
|
|
471
|
+
}
|
|
472
|
+
return (h("div", { class: "alert-checkbox-group" }, inputs.map((i) => (h("button", { type: "button", onClick: () => this.cbClick(i), "aria-checked": `${i.checked}`, id: i.id, disabled: i.disabled, tabIndex: i.tabindex, role: "checkbox", class: Object.assign(Object.assign({}, getClassMap(i.cssClass)), { 'alert-tappable': true, 'alert-checkbox': true, 'alert-checkbox-button': true, 'ion-focusable': true, 'alert-checkbox-button-disabled': i.disabled || false }) }, h("div", { class: "alert-button-inner" }, h("div", { class: "alert-checkbox-icon" }, h("div", { class: "alert-checkbox-inner" })), h("div", { class: "alert-checkbox-label" }, i.label)), mode === 'md' && h("ion-ripple-effect", null))))));
|
|
473
|
+
}
|
|
474
|
+
renderRadio() {
|
|
475
|
+
const inputs = this.processedInputs;
|
|
476
|
+
if (inputs.length === 0) {
|
|
477
|
+
return null;
|
|
478
|
+
}
|
|
479
|
+
return (h("div", { class: "alert-radio-group", role: "radiogroup", "aria-activedescendant": this.activeId }, inputs.map((i) => (h("button", { type: "button", onClick: () => this.rbClick(i), "aria-checked": `${i.checked}`, disabled: i.disabled, id: i.id, tabIndex: i.tabindex, class: Object.assign(Object.assign({}, getClassMap(i.cssClass)), { 'alert-radio-button': true, 'alert-tappable': true, 'alert-radio': true, 'ion-focusable': true, 'alert-radio-button-disabled': i.disabled || false }), role: "radio" }, h("div", { class: "alert-button-inner" }, h("div", { class: "alert-radio-icon" }, h("div", { class: "alert-radio-inner" })), h("div", { class: "alert-radio-label" }, i.label)))))));
|
|
480
|
+
}
|
|
481
|
+
renderInput() {
|
|
482
|
+
const inputs = this.processedInputs;
|
|
483
|
+
if (inputs.length === 0) {
|
|
484
|
+
return null;
|
|
485
|
+
}
|
|
486
|
+
return (h("div", { class: "alert-input-group" }, inputs.map((i) => {
|
|
487
|
+
var _a, _b, _c, _d;
|
|
488
|
+
if (i.type === 'textarea') {
|
|
489
|
+
return (h("div", { class: "alert-input-wrapper" }, h("textarea", Object.assign({ placeholder: i.placeholder, value: i.value, id: i.id, tabIndex: i.tabindex }, i.attributes, { disabled: (_b = (_a = i.attributes) === null || _a === void 0 ? void 0 : _a.disabled) !== null && _b !== void 0 ? _b : i.disabled, class: inputClass(i), onInput: (e) => {
|
|
490
|
+
var _a;
|
|
491
|
+
i.value = e.target.value;
|
|
492
|
+
if ((_a = i.attributes) === null || _a === void 0 ? void 0 : _a.onInput) {
|
|
493
|
+
i.attributes.onInput(e);
|
|
494
|
+
}
|
|
495
|
+
} }))));
|
|
496
|
+
}
|
|
497
|
+
else {
|
|
498
|
+
return (h("div", { class: "alert-input-wrapper" }, h("input", Object.assign({ placeholder: i.placeholder, type: i.type, min: i.min, max: i.max, value: i.value, id: i.id, tabIndex: i.tabindex }, i.attributes, { disabled: (_d = (_c = i.attributes) === null || _c === void 0 ? void 0 : _c.disabled) !== null && _d !== void 0 ? _d : i.disabled, class: inputClass(i), onInput: (e) => {
|
|
499
|
+
var _a;
|
|
500
|
+
i.value = e.target.value;
|
|
501
|
+
if ((_a = i.attributes) === null || _a === void 0 ? void 0 : _a.onInput) {
|
|
502
|
+
i.attributes.onInput(e);
|
|
503
|
+
}
|
|
504
|
+
} }))));
|
|
505
|
+
}
|
|
506
|
+
})));
|
|
507
|
+
}
|
|
508
|
+
renderAlertButtons() {
|
|
509
|
+
const buttons = this.processedButtons;
|
|
510
|
+
const mode = getIonMode(this);
|
|
511
|
+
const alertButtonGroupClass = {
|
|
512
|
+
'alert-button-group': true,
|
|
513
|
+
'alert-button-group-vertical': buttons.length > 2,
|
|
514
|
+
};
|
|
515
|
+
return (h("div", { class: alertButtonGroupClass }, buttons.map((button) => (h("button", Object.assign({}, button.htmlAttributes, { type: "button", id: button.id, class: buttonClass(button), tabIndex: 0, onClick: () => this.buttonClick(button) }), h("span", { class: "alert-button-inner" }, button.text), mode === 'md' && h("ion-ripple-effect", null))))));
|
|
516
|
+
}
|
|
517
|
+
renderAlertMessage(msgId) {
|
|
518
|
+
const { customHTMLEnabled, message } = this;
|
|
519
|
+
if (customHTMLEnabled) {
|
|
520
|
+
return h("div", { id: msgId, class: "alert-message", innerHTML: sanitizeDOMString(message) });
|
|
521
|
+
}
|
|
522
|
+
return (h("div", { id: msgId, class: "alert-message" }, message));
|
|
523
|
+
}
|
|
524
|
+
render() {
|
|
525
|
+
const { overlayIndex, header, subHeader, message, htmlAttributes } = this;
|
|
526
|
+
const mode = getIonMode(this);
|
|
527
|
+
const hdrId = `alert-${overlayIndex}-hdr`;
|
|
528
|
+
const msgId = `alert-${overlayIndex}-msg`;
|
|
529
|
+
const subHdrId = `alert-${overlayIndex}-sub-hdr`;
|
|
530
|
+
const role = this.inputs.length > 0 || this.buttons.length > 0 ? 'alertdialog' : 'alert';
|
|
531
|
+
/**
|
|
532
|
+
* Use both the header and subHeader ids if they are defined.
|
|
533
|
+
* If only the header is defined, use the header id.
|
|
534
|
+
* If only the subHeader is defined, use the subHeader id.
|
|
535
|
+
* If neither are defined, do not set aria-labelledby.
|
|
536
|
+
*/
|
|
537
|
+
const ariaLabelledBy = header && subHeader ? `${hdrId} ${subHdrId}` : header ? hdrId : subHeader ? subHdrId : null;
|
|
538
|
+
return (h(Host, { key: '6025440b9cd369d4fac89e7e4296c84a10a0b8e0', tabindex: "-1", style: {
|
|
539
|
+
zIndex: `${20000 + overlayIndex}`,
|
|
540
|
+
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, h("ion-backdrop", { key: '3cd5ca8b99cb95b11dd22ab41a820d841142896f', tappable: this.backdropDismiss }), h("div", { key: '4cc62ae6e21424057d22aeef1e8fc77011e77cd5', tabindex: "0", "aria-hidden": "true" }), h("div", Object.assign({ key: '364057a69f25aa88904df17bdcf7e5bf714e7830', class: "alert-wrapper ion-overlay-wrapper", role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "0", ref: (el) => (this.wrapperEl = el) }, htmlAttributes), h("div", { key: '78694e3c0db2d408df3899fb1a90859bcc8d14cc', class: "alert-head" }, header && (h("h2", { key: 'ec88ff3e4e1ea871b5975133fdcf4cac38b05e0f', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (h("h2", { key: '9b09bc8bb68af255ef8b7d22587acc946148e544', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (h("h3", { key: '99abe815f75d2df7f1b77c0df9f3436724fea76f', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), h("div", { key: 'a43d0c22c0e46b1ef911f92ffeb253d7911b85f7', tabindex: "0", "aria-hidden": "true" })));
|
|
541
|
+
}
|
|
542
|
+
get el() { return this; }
|
|
543
|
+
static get watchers() { return {
|
|
544
|
+
"isOpen": ["onIsOpenChange"],
|
|
545
|
+
"trigger": ["triggerChanged"],
|
|
546
|
+
"buttons": ["buttonsChanged"],
|
|
547
|
+
"inputs": ["inputsChanged"]
|
|
548
|
+
}; }
|
|
549
|
+
static get style() { return {
|
|
550
|
+
ios: alertIosCss,
|
|
551
|
+
md: alertMdCss
|
|
552
|
+
}; }
|
|
553
|
+
}, [290, "ion-alert", {
|
|
554
|
+
"overlayIndex": [2, "overlay-index"],
|
|
555
|
+
"delegate": [16],
|
|
556
|
+
"hasController": [4, "has-controller"],
|
|
557
|
+
"keyboardClose": [4, "keyboard-close"],
|
|
558
|
+
"enterAnimation": [16],
|
|
559
|
+
"leaveAnimation": [16],
|
|
560
|
+
"cssClass": [1, "css-class"],
|
|
561
|
+
"header": [1],
|
|
562
|
+
"subHeader": [1, "sub-header"],
|
|
563
|
+
"message": [1],
|
|
564
|
+
"buttons": [16],
|
|
565
|
+
"inputs": [1040],
|
|
566
|
+
"backdropDismiss": [4, "backdrop-dismiss"],
|
|
567
|
+
"translucent": [4],
|
|
568
|
+
"animated": [4],
|
|
569
|
+
"htmlAttributes": [16],
|
|
570
|
+
"isOpen": [4, "is-open"],
|
|
571
|
+
"trigger": [1],
|
|
572
|
+
"present": [64],
|
|
573
|
+
"dismiss": [64],
|
|
574
|
+
"onDidDismiss": [64],
|
|
575
|
+
"onWillDismiss": [64]
|
|
576
|
+
}, [[4, "keydown", "onKeydown"]], {
|
|
577
|
+
"isOpen": ["onIsOpenChange"],
|
|
578
|
+
"trigger": ["triggerChanged"],
|
|
579
|
+
"buttons": ["buttonsChanged"],
|
|
580
|
+
"inputs": ["inputsChanged"]
|
|
581
|
+
}]);
|
|
582
|
+
const inputClass = (input) => {
|
|
583
|
+
var _a, _b, _c;
|
|
584
|
+
return Object.assign(Object.assign({ 'alert-input': true, 'alert-input-disabled': ((_b = (_a = input.attributes) === null || _a === void 0 ? void 0 : _a.disabled) !== null && _b !== void 0 ? _b : input.disabled) || false }, getClassMap(input.cssClass)), getClassMap(input.attributes ? (_c = input.attributes.class) === null || _c === void 0 ? void 0 : _c.toString() : ''));
|
|
585
|
+
};
|
|
586
|
+
const buttonClass = (button) => {
|
|
587
|
+
return Object.assign({ 'alert-button': true, 'ion-focusable': true, 'ion-activatable': true, [`alert-button-role-${button.role}`]: button.role !== undefined }, getClassMap(button.cssClass));
|
|
588
|
+
};
|
|
589
|
+
function defineCustomElement() {
|
|
590
|
+
if (typeof customElements === "undefined") {
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
593
|
+
const components = ["ion-alert", "ion-backdrop", "ion-ripple-effect"];
|
|
594
|
+
components.forEach(tagName => { switch (tagName) {
|
|
595
|
+
case "ion-alert":
|
|
596
|
+
if (!customElements.get(tagName)) {
|
|
597
|
+
customElements.define(tagName, Alert);
|
|
598
|
+
}
|
|
599
|
+
break;
|
|
600
|
+
case "ion-backdrop":
|
|
601
|
+
if (!customElements.get(tagName)) {
|
|
602
|
+
defineCustomElement$2();
|
|
603
|
+
}
|
|
604
|
+
break;
|
|
605
|
+
case "ion-ripple-effect":
|
|
606
|
+
if (!customElements.get(tagName)) {
|
|
607
|
+
defineCustomElement$1();
|
|
608
|
+
}
|
|
609
|
+
break;
|
|
610
|
+
} });
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
export { Alert as A, defineCustomElement as d };
|