@ionic/core 7.4.3-dev.11696514206.1c9669de → 7.4.3-dev.11699471215.1cfbc6e9
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/alert.js +8 -0
- package/components/data.js +96 -22
- package/components/haptic.js +1 -0
- package/components/index4.js +15 -14
- package/components/ion-datetime-button.js +4 -4
- package/components/ion-datetime.js +3 -3
- package/components/ion-menu.js +12 -0
- package/components/ion-nav.js +1 -0
- package/components/ion-router.js +3 -0
- package/components/ion-select.js +1 -1
- package/components/ion-toast.js +150 -13
- package/components/ios.transition.js +1 -0
- package/components/overlays.js +1 -0
- package/dist/cjs/{app-globals-56164d1a.js → app-globals-84b6a756.js} +1 -1
- package/dist/cjs/{button-active-32f15660.js → button-active-f2147e85.js} +2 -2
- package/dist/cjs/{data-db832785.js → data-c8d21093.js} +96 -22
- package/dist/cjs/{haptic-c5f6b4d5.js → haptic-678abc9f.js} +1 -0
- package/dist/cjs/{index-6f887430.js → index-14a4821e.js} +47 -6
- package/dist/cjs/{index-7c1ae0f0.js → index-97a3eade.js} +16 -15
- package/dist/cjs/{index-b183138a.js → index-e760ab42.js} +3 -3
- package/dist/cjs/index.cjs.js +8 -8
- package/dist/cjs/ion-accordion_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-action-sheet.cjs.entry.js +5 -5
- package/dist/cjs/ion-alert.cjs.entry.js +13 -5
- package/dist/cjs/ion-app_8.cjs.entry.js +4 -4
- package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-back-button.cjs.entry.js +2 -2
- package/dist/cjs/ion-backdrop.cjs.entry.js +2 -2
- package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-button_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-card_5.cjs.entry.js +2 -2
- package/dist/cjs/ion-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ion-chip.cjs.entry.js +2 -2
- package/dist/cjs/ion-col_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-datetime-button.cjs.entry.js +6 -6
- package/dist/cjs/ion-datetime_3.cjs.entry.js +7 -7
- package/dist/cjs/ion-fab_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-img.cjs.entry.js +2 -2
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-input.cjs.entry.js +2 -2
- package/dist/cjs/ion-item-option_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-item_8.cjs.entry.js +2 -2
- package/dist/cjs/ion-loading.cjs.entry.js +3 -3
- package/dist/cjs/ion-menu_3.cjs.entry.js +19 -8
- package/dist/cjs/ion-modal.cjs.entry.js +4 -4
- package/dist/cjs/ion-nav_2.cjs.entry.js +4 -3
- package/dist/cjs/ion-picker-column-internal.cjs.entry.js +3 -3
- package/dist/cjs/ion-picker-internal.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +4 -4
- package/dist/cjs/ion-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/ion-radio_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-range.cjs.entry.js +2 -2
- package/dist/cjs/ion-refresher_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-reorder_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +2 -2
- package/dist/cjs/ion-route_4.cjs.entry.js +5 -2
- package/dist/cjs/ion-searchbar.cjs.entry.js +2 -2
- package/dist/cjs/ion-segment_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-select_3.cjs.entry.js +4 -4
- package/dist/cjs/ion-spinner.cjs.entry.js +2 -2
- package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-text.cjs.entry.js +2 -2
- package/dist/cjs/ion-textarea.cjs.entry.js +2 -2
- package/dist/cjs/ion-toast.cjs.entry.js +168 -33
- package/dist/cjs/ion-toggle.cjs.entry.js +3 -3
- package/dist/cjs/{ionic-global-14a0604b.js → ionic-global-a71608df.js} +1 -1
- package/dist/cjs/ionic.cjs.js +5 -5
- package/dist/cjs/{ios.transition-4b93903d.js → ios.transition-1fec34e9.js} +3 -2
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{md.transition-79f3a215.js → md.transition-cdc3f16f.js} +2 -2
- package/dist/cjs/{overlays-d3a13e61.js → overlays-9cab437c.js} +2 -1
- package/dist/cjs/{status-tap-e2e45ff8.js → status-tap-8c22e017.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/alert/alert.js +8 -0
- package/dist/collection/components/alert/test/a11y/alert.e2e.js +11 -0
- package/dist/collection/components/datetime/datetime.js +12 -6
- package/dist/collection/components/datetime/test/hour-cycle/datetime.e2e.js +14 -0
- package/dist/collection/components/datetime/utils/data.js +33 -7
- package/dist/collection/components/datetime/utils/format.js +27 -10
- package/dist/collection/components/datetime/utils/helpers.js +37 -5
- package/dist/collection/components/datetime-button/datetime-button.js +4 -4
- package/dist/collection/components/menu/menu.js +12 -0
- package/dist/collection/components/nav/nav.js +1 -0
- package/dist/collection/components/router/router.js +2 -0
- package/dist/collection/components/router/utils/path.js +1 -0
- package/dist/collection/components/select/select.js +1 -1
- package/dist/collection/components/toast/animations/ios.enter.js +2 -3
- package/dist/collection/components/toast/animations/ios.leave.js +2 -3
- package/dist/collection/components/toast/animations/md.enter.js +2 -3
- package/dist/collection/components/toast/animations/utils.js +85 -0
- package/dist/collection/components/toast/test/position-anchor/toast.e2e.js +45 -0
- package/dist/collection/components/toast/toast.js +91 -9
- package/dist/collection/utils/menu-controller/index.js +15 -14
- package/dist/collection/utils/native/haptic.js +1 -0
- package/dist/collection/utils/overlays.js +1 -0
- package/dist/collection/utils/transition/ios.transition.js +1 -0
- package/dist/docs.json +75 -12
- package/dist/esm/{app-globals-8ae762aa.js → app-globals-df292a32.js} +1 -1
- package/dist/esm/{button-active-513e9fff.js → button-active-3dd473a1.js} +2 -2
- package/dist/esm/{data-009dbf15.js → data-44d9e816.js} +96 -22
- package/dist/esm/{haptic-6447af60.js → haptic-1243b917.js} +1 -0
- package/dist/esm/{index-c6640d16.js → index-3d6aefa2.js} +16 -15
- package/dist/esm/{index-87684bba.js → index-9f5eacab.js} +3 -3
- package/dist/esm/{index-2d388930.js → index-cb894020.js} +47 -6
- package/dist/esm/index.js +8 -8
- package/dist/esm/ion-accordion_2.entry.js +2 -2
- package/dist/esm/ion-action-sheet.entry.js +5 -5
- package/dist/esm/ion-alert.entry.js +13 -5
- package/dist/esm/ion-app_8.entry.js +4 -4
- package/dist/esm/ion-avatar_3.entry.js +2 -2
- package/dist/esm/ion-back-button.entry.js +2 -2
- package/dist/esm/ion-backdrop.entry.js +2 -2
- package/dist/esm/ion-breadcrumb_2.entry.js +2 -2
- package/dist/esm/ion-button_2.entry.js +2 -2
- package/dist/esm/ion-card_5.entry.js +2 -2
- package/dist/esm/ion-checkbox.entry.js +2 -2
- package/dist/esm/ion-chip.entry.js +2 -2
- package/dist/esm/ion-col_3.entry.js +2 -2
- package/dist/esm/ion-datetime-button.entry.js +6 -6
- package/dist/esm/ion-datetime_3.entry.js +7 -7
- package/dist/esm/ion-fab_3.entry.js +2 -2
- package/dist/esm/ion-img.entry.js +2 -2
- package/dist/esm/ion-infinite-scroll_2.entry.js +2 -2
- package/dist/esm/ion-input.entry.js +2 -2
- package/dist/esm/ion-item-option_3.entry.js +2 -2
- package/dist/esm/ion-item_8.entry.js +2 -2
- package/dist/esm/ion-loading.entry.js +3 -3
- package/dist/esm/ion-menu_3.entry.js +17 -6
- package/dist/esm/ion-modal.entry.js +4 -4
- package/dist/esm/ion-nav_2.entry.js +4 -3
- package/dist/esm/ion-picker-column-internal.entry.js +3 -3
- package/dist/esm/ion-picker-internal.entry.js +1 -1
- package/dist/esm/ion-popover.entry.js +4 -4
- package/dist/esm/ion-progress-bar.entry.js +2 -2
- package/dist/esm/ion-radio_2.entry.js +2 -2
- package/dist/esm/ion-range.entry.js +2 -2
- package/dist/esm/ion-refresher_2.entry.js +3 -3
- package/dist/esm/ion-reorder_2.entry.js +3 -3
- package/dist/esm/ion-ripple-effect.entry.js +2 -2
- package/dist/esm/ion-route_4.entry.js +5 -2
- package/dist/esm/ion-searchbar.entry.js +2 -2
- package/dist/esm/ion-segment_2.entry.js +2 -2
- package/dist/esm/ion-select_3.entry.js +4 -4
- package/dist/esm/ion-spinner.entry.js +2 -2
- package/dist/esm/ion-split-pane.entry.js +2 -2
- package/dist/esm/ion-tab-bar_2.entry.js +2 -2
- package/dist/esm/ion-tab_2.entry.js +1 -1
- package/dist/esm/ion-text.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +2 -2
- package/dist/esm/ion-toast.entry.js +152 -17
- package/dist/esm/ion-toggle.entry.js +3 -3
- package/dist/esm/{ionic-global-b3fc28dd.js → ionic-global-63a8d8c9.js} +1 -1
- package/dist/esm/ionic.js +6 -6
- package/dist/esm/{ios.transition-81e1aed6.js → ios.transition-8ad209ea.js} +3 -2
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{md.transition-5becd8b5.js → md.transition-43193ea7.js} +2 -2
- package/dist/esm/{overlays-8fc6656c.js → overlays-753933fc.js} +2 -1
- package/dist/esm/{status-tap-c5af0dba.js → status-tap-73e982b6.js} +1 -1
- package/dist/esm-es5/app-globals-df292a32.js +4 -0
- package/dist/esm-es5/{button-active-513e9fff.js → button-active-3dd473a1.js} +1 -1
- package/dist/esm-es5/data-44d9e816.js +4 -0
- package/dist/esm-es5/index-3d6aefa2.js +4 -0
- package/dist/esm-es5/{index-87684bba.js → index-9f5eacab.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/ion-accordion_2.entry.js +1 -1
- package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
- package/dist/esm-es5/ion-alert.entry.js +1 -1
- package/dist/esm-es5/ion-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-avatar_3.entry.js +1 -1
- package/dist/esm-es5/ion-back-button.entry.js +1 -1
- package/dist/esm-es5/ion-backdrop.entry.js +1 -1
- package/dist/esm-es5/ion-breadcrumb_2.entry.js +1 -1
- package/dist/esm-es5/ion-button_2.entry.js +1 -1
- package/dist/esm-es5/ion-card_5.entry.js +1 -1
- package/dist/esm-es5/ion-checkbox.entry.js +1 -1
- package/dist/esm-es5/ion-chip.entry.js +1 -1
- package/dist/esm-es5/ion-col_3.entry.js +1 -1
- package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/ion-fab_3.entry.js +1 -1
- package/dist/esm-es5/ion-img.entry.js +1 -1
- package/dist/esm-es5/ion-infinite-scroll_2.entry.js +1 -1
- package/dist/esm-es5/ion-input.entry.js +1 -1
- package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
- package/dist/esm-es5/ion-item_8.entry.js +1 -1
- package/dist/esm-es5/ion-loading.entry.js +1 -1
- package/dist/esm-es5/ion-menu_3.entry.js +1 -1
- package/dist/esm-es5/ion-modal.entry.js +1 -1
- package/dist/esm-es5/ion-nav_2.entry.js +1 -1
- package/dist/esm-es5/ion-picker-column-internal.entry.js +1 -1
- package/dist/esm-es5/ion-picker-internal.entry.js +1 -1
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ion-progress-bar.entry.js +1 -1
- package/dist/esm-es5/ion-radio_2.entry.js +1 -1
- package/dist/esm-es5/ion-range.entry.js +1 -1
- package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
- package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
- package/dist/esm-es5/ion-ripple-effect.entry.js +1 -1
- package/dist/esm-es5/ion-route_4.entry.js +1 -1
- package/dist/esm-es5/ion-searchbar.entry.js +1 -1
- package/dist/esm-es5/ion-segment_2.entry.js +1 -1
- package/dist/esm-es5/ion-select_3.entry.js +1 -1
- package/dist/esm-es5/ion-spinner.entry.js +1 -1
- package/dist/esm-es5/ion-split-pane.entry.js +1 -1
- package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
- package/dist/esm-es5/ion-tab_2.entry.js +1 -1
- package/dist/esm-es5/ion-text.entry.js +1 -1
- package/dist/esm-es5/ion-textarea.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/ion-toggle.entry.js +1 -1
- package/dist/esm-es5/{ionic-global-b3fc28dd.js → ionic-global-63a8d8c9.js} +1 -1
- package/dist/esm-es5/ionic.js +1 -1
- package/dist/esm-es5/{ios.transition-81e1aed6.js → ios.transition-8ad209ea.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{md.transition-5becd8b5.js → md.transition-43193ea7.js} +1 -1
- package/dist/esm-es5/{overlays-8fc6656c.js → overlays-753933fc.js} +1 -1
- package/dist/esm-es5/{status-tap-c5af0dba.js → status-tap-73e982b6.js} +1 -1
- package/dist/html.html-data.json +11 -1
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/ionic.js +1 -1
- package/dist/ionic/{p-5c8c9748.system.entry.js → p-007168b8.system.entry.js} +1 -1
- package/dist/ionic/{p-ce7a651e.js → p-00cf2d6c.js} +1 -1
- package/dist/ionic/{p-6dfeeadf.entry.js → p-018ad59f.entry.js} +1 -1
- package/dist/ionic/{p-e89abe38.system.entry.js → p-037e2738.system.entry.js} +1 -1
- package/dist/ionic/{p-116641fe.entry.js → p-0793ebfd.entry.js} +1 -1
- package/dist/ionic/{p-972763df.js → p-0d198537.js} +1 -1
- package/dist/ionic/{p-37456282.system.entry.js → p-0e024f14.system.entry.js} +1 -1
- package/dist/ionic/{p-60838ce3.system.entry.js → p-10fcb3a3.system.entry.js} +1 -1
- package/dist/ionic/p-11eedecb.system.entry.js +4 -0
- package/dist/ionic/{p-f547e62f.entry.js → p-138e06de.entry.js} +1 -1
- package/dist/ionic/p-17240d90.js +4 -0
- package/dist/ionic/{p-7e9e16bf.system.entry.js → p-17dd92fe.system.entry.js} +1 -1
- package/dist/ionic/p-26c9b9ba.entry.js +4 -0
- package/dist/ionic/{p-6ca0e4b2.system.entry.js → p-28678af4.system.entry.js} +1 -1
- package/dist/ionic/{p-de676d36.system.entry.js → p-2dc6526e.system.entry.js} +1 -1
- package/dist/ionic/{p-c4d08d6d.system.entry.js → p-37fc0d22.system.entry.js} +1 -1
- package/dist/ionic/{p-42a7b112.entry.js → p-3bf7c0dc.entry.js} +1 -1
- package/dist/ionic/{p-e57a38f3.entry.js → p-3db27dec.entry.js} +1 -1
- package/dist/ionic/{p-83b7bbf9.entry.js → p-3dce88bf.entry.js} +1 -1
- package/dist/ionic/{p-ce24ddd7.system.entry.js → p-3e6b0330.system.entry.js} +1 -1
- package/dist/ionic/{p-3ae2faf0.entry.js → p-414a1506.entry.js} +1 -1
- package/dist/ionic/{p-13a91505.entry.js → p-454048da.entry.js} +1 -1
- package/dist/ionic/{p-c7fca267.entry.js → p-45e527e7.entry.js} +1 -1
- package/dist/ionic/{p-13ce151b.entry.js → p-469d6a98.entry.js} +1 -1
- package/dist/ionic/{p-a6d8476b.system.entry.js → p-47242aad.system.entry.js} +1 -1
- package/dist/ionic/p-4965f2d7.entry.js +4 -0
- package/dist/ionic/{p-88ad9cb6.entry.js → p-4c20879c.entry.js} +1 -1
- package/dist/ionic/{p-8fdd4a2f.system.js → p-4d6ea5f9.system.js} +1 -1
- package/dist/ionic/{p-08c5b9f4.system.entry.js → p-4e1b00c5.system.entry.js} +1 -1
- package/dist/ionic/{p-33630008.system.entry.js → p-4e76e29a.system.entry.js} +1 -1
- package/dist/ionic/{p-55b99166.entry.js → p-50327060.entry.js} +1 -1
- package/dist/ionic/{p-e24630f9.entry.js → p-50d83224.entry.js} +1 -1
- package/dist/ionic/p-534a1cbc.system.js +4 -0
- package/dist/ionic/{p-5e2dc8e0.js → p-54b06917.js} +1 -1
- package/dist/ionic/{p-4eab1bb4.entry.js → p-57743e20.entry.js} +1 -1
- package/dist/ionic/p-57c5eca2.system.js +4 -0
- package/dist/ionic/p-5aa99fb8.entry.js +4 -0
- package/dist/ionic/{p-ec102360.system.js → p-5c24c115.system.js} +1 -1
- package/dist/ionic/{p-048d7153.system.entry.js → p-5f13271c.system.entry.js} +1 -1
- package/dist/ionic/{p-cd675d89.system.entry.js → p-5fd0a13e.system.entry.js} +1 -1
- package/dist/ionic/p-6641d7fa.js +4 -0
- package/dist/ionic/{p-8b79baf0.entry.js → p-68b405cc.entry.js} +1 -1
- package/dist/ionic/{p-bf9b1560.entry.js → p-6a49b57e.entry.js} +1 -1
- package/dist/ionic/{p-6522a762.system.entry.js → p-6c7d61b9.system.entry.js} +1 -1
- package/dist/ionic/{p-ebaeeee8.entry.js → p-6ce891b2.entry.js} +1 -1
- package/dist/ionic/{p-ee6d9730.entry.js → p-6d22c339.entry.js} +1 -1
- package/dist/ionic/{p-6bc9c436.system.entry.js → p-6f13b971.system.entry.js} +1 -1
- package/dist/ionic/{p-626f7142.system.entry.js → p-6f3099b6.system.entry.js} +1 -1
- package/dist/ionic/p-73eba881.system.js +4 -0
- package/dist/ionic/p-73f7e775.js +4 -0
- package/dist/ionic/{p-39715fcf.entry.js → p-7887ac7a.entry.js} +1 -1
- package/dist/ionic/{p-6b7e74ba.js → p-7a590a28.js} +1 -1
- package/dist/ionic/p-7b4e392c.js +4 -0
- package/dist/ionic/{p-de0f1af2.system.entry.js → p-7fd0f045.system.entry.js} +1 -1
- package/dist/ionic/{p-7a3caa4e.system.js → p-82c72668.system.js} +1 -1
- package/dist/ionic/{p-62428e04.system.entry.js → p-84549737.system.entry.js} +1 -1
- package/dist/ionic/{p-be321bb6.system.entry.js → p-8957b1de.system.entry.js} +1 -1
- package/dist/ionic/{p-6ba07931.system.entry.js → p-89e3d112.system.entry.js} +1 -1
- package/dist/ionic/{p-5e43aa8b.js → p-8a289322.js} +1 -1
- package/dist/ionic/{p-b5637aeb.system.entry.js → p-8f245bb0.system.entry.js} +1 -1
- package/dist/ionic/{p-70ab8b73.js → p-903c36fe.js} +1 -1
- package/dist/ionic/{p-04ef1ba6.entry.js → p-9201a4d3.entry.js} +1 -1
- package/dist/ionic/{p-a1a2dd4d.entry.js → p-92d72ad8.entry.js} +1 -1
- package/dist/ionic/{p-63a73b69.system.entry.js → p-9736406a.system.entry.js} +1 -1
- package/dist/ionic/{p-4616f20a.system.entry.js → p-98b108e2.system.entry.js} +1 -1
- package/dist/ionic/{p-03e2e541.system.entry.js → p-9a6f6789.system.entry.js} +1 -1
- package/dist/ionic/{p-3730f493.entry.js → p-9b796813.entry.js} +1 -1
- package/dist/ionic/{p-270aa06b.entry.js → p-9bd70bd2.entry.js} +1 -1
- package/dist/ionic/p-9e5bdf1a.entry.js +4 -0
- package/dist/ionic/{p-700a2cb1.system.entry.js → p-9e91c83f.system.entry.js} +1 -1
- package/dist/ionic/{p-93616477.system.js → p-9f9efb31.system.js} +1 -1
- package/dist/ionic/{p-cc3aa152.entry.js → p-a1d7f4ef.entry.js} +1 -1
- package/dist/ionic/{p-65a4c12f.system.entry.js → p-a39e9a0b.system.entry.js} +1 -1
- package/dist/ionic/{p-f920f5ca.entry.js → p-a3ea02d0.entry.js} +1 -1
- package/dist/ionic/{p-abf426cd.system.entry.js → p-a4e95028.system.entry.js} +1 -1
- package/dist/ionic/{p-ea88031d.entry.js → p-a51f5932.entry.js} +1 -1
- package/dist/ionic/{p-4912b933.entry.js → p-a7361c85.entry.js} +1 -1
- package/dist/ionic/{p-486b567b.system.entry.js → p-a9b13f18.system.entry.js} +1 -1
- package/dist/ionic/{p-0bd3cc92.entry.js → p-a9d7f984.entry.js} +1 -1
- package/dist/ionic/{p-53bbd357.system.entry.js → p-aa4b083c.system.entry.js} +1 -1
- package/dist/ionic/{p-6bbf2815.system.entry.js → p-abfd1f2e.system.entry.js} +1 -1
- package/dist/ionic/p-ac32f6ce.entry.js +4 -0
- package/dist/ionic/{p-5e84b718.system.entry.js → p-afafb6bf.system.entry.js} +1 -1
- package/dist/ionic/{p-918d5f19.system.js → p-b10f05b1.system.js} +1 -1
- package/dist/ionic/p-b1cf77e0.system.entry.js +4 -0
- package/dist/ionic/{p-b49fe110.entry.js → p-b2397f35.entry.js} +1 -1
- package/dist/ionic/{p-1bce805b.entry.js → p-b27772bf.entry.js} +1 -1
- package/dist/ionic/{p-568fec78.entry.js → p-b4c0e9ee.entry.js} +1 -1
- package/dist/ionic/{p-bf8224f4.system.entry.js → p-b4daca17.system.entry.js} +1 -1
- package/dist/ionic/{p-7e46b6ab.entry.js → p-b7c158f8.entry.js} +1 -1
- package/dist/ionic/p-b8c3f071.system.js +4 -0
- package/dist/ionic/{p-b0dd4f33.entry.js → p-b9e2aede.entry.js} +1 -1
- package/dist/ionic/{p-8e28945a.system.entry.js → p-c09e1da9.system.entry.js} +1 -1
- package/dist/ionic/{p-4a1ac160.system.entry.js → p-c215a78a.system.entry.js} +1 -1
- package/dist/ionic/{p-d8b2c214.entry.js → p-c42d0ea3.entry.js} +1 -1
- package/dist/ionic/{p-73f50e29.system.js → p-c46fba6d.system.js} +1 -1
- package/dist/ionic/{p-c5729044.system.entry.js → p-c48d177b.system.entry.js} +1 -1
- package/dist/ionic/{p-3e5676b7.entry.js → p-ca655a7c.entry.js} +1 -1
- package/dist/ionic/{p-20e5eb3e.entry.js → p-d2a278b1.entry.js} +1 -1
- package/dist/ionic/{p-bfac43d7.system.entry.js → p-d90f0779.system.entry.js} +1 -1
- package/dist/ionic/{p-95f8cb47.entry.js → p-da024961.entry.js} +1 -1
- package/dist/ionic/{p-327fc1bf.entry.js → p-dd0c00ed.entry.js} +1 -1
- package/dist/ionic/{p-82f58c25.system.entry.js → p-e40b2cb4.system.entry.js} +1 -1
- package/dist/ionic/{p-82da795c.system.entry.js → p-e62d80e5.system.entry.js} +1 -1
- package/dist/ionic/{p-410beeda.system.entry.js → p-e6d2cca2.system.entry.js} +1 -1
- package/dist/ionic/{p-00aed720.system.js → p-ec25d547.system.js} +1 -1
- package/dist/ionic/{p-f0dcf99b.entry.js → p-ec29338e.entry.js} +1 -1
- package/dist/ionic/{p-1c406ee0.system.entry.js → p-ec451ef7.system.entry.js} +1 -1
- package/dist/ionic/{p-f9015336.js → p-ee8881d0.js} +1 -1
- package/dist/ionic/{p-a720dc73.entry.js → p-eff1ce2e.entry.js} +1 -1
- package/dist/ionic/{p-76e8336d.system.entry.js → p-f37d6823.system.entry.js} +1 -1
- package/dist/ionic/{p-c14fb011.system.entry.js → p-f6f4d4bb.system.entry.js} +1 -1
- package/dist/ionic/{p-cd12dcd9.entry.js → p-fa06c407.entry.js} +1 -1
- package/dist/ionic/{p-7dc0ee11.system.entry.js → p-fbc7995a.system.entry.js} +1 -1
- package/dist/ionic/{p-95e6d10b.system.js → p-fe813df6.system.js} +1 -1
- package/dist/types/components/datetime/datetime-interface.d.ts +1 -0
- package/dist/types/components/datetime/datetime.d.ts +2 -2
- package/dist/types/components/datetime/utils/data.d.ts +3 -3
- package/dist/types/components/datetime/utils/format.d.ts +3 -3
- package/dist/types/components/datetime/utils/helpers.d.ts +15 -1
- package/dist/types/components/menu/menu-interface.d.ts +1 -0
- package/dist/types/components/toast/animations/ios.enter.d.ts +2 -1
- package/dist/types/components/toast/animations/ios.leave.d.ts +2 -2
- package/dist/types/components/toast/animations/md.enter.d.ts +2 -1
- package/dist/types/components/toast/animations/utils.d.ts +18 -0
- package/dist/types/components/toast/toast-interface.d.ts +11 -0
- package/dist/types/components/toast/toast.d.ts +21 -1
- package/dist/types/components.d.ts +16 -8
- package/dist/types/utils/menu-controller/index.d.ts +1 -0
- package/hydrate/index.js +292 -54
- package/package.json +6 -7
- package/dist/collection/components/menu/test/multiple/menu.e2e.js +0 -56
- package/dist/esm-es5/app-globals-8ae762aa.js +0 -4
- package/dist/esm-es5/data-009dbf15.js +0 -4
- package/dist/esm-es5/index-c6640d16.js +0 -4
- package/dist/ionic/p-05f10762.entry.js +0 -4
- package/dist/ionic/p-1406c382.system.entry.js +0 -4
- package/dist/ionic/p-1a36bf45.system.entry.js +0 -4
- package/dist/ionic/p-2309dba2.system.js +0 -4
- package/dist/ionic/p-27614d55.entry.js +0 -4
- package/dist/ionic/p-44ef7224.system.js +0 -4
- package/dist/ionic/p-6edbc09b.system.js +0 -4
- package/dist/ionic/p-7129d04e.entry.js +0 -4
- package/dist/ionic/p-72a1cbc7.js +0 -4
- package/dist/ionic/p-78a293a5.js +0 -4
- package/dist/ionic/p-7cea4407.js +0 -4
- package/dist/ionic/p-7cfd253c.js +0 -4
- package/dist/ionic/p-90d892fd.entry.js +0 -4
- package/dist/ionic/p-ad90d46b.system.js +0 -4
- package/dist/ionic/p-b3462f01.entry.js +0 -4
- /package/dist/esm-es5/{haptic-6447af60.js → haptic-1243b917.js} +0 -0
- /package/dist/esm-es5/{index-2d388930.js → index-cb894020.js} +0 -0
- /package/dist/ionic/{p-91546be9.system.js → p-26fbffd4.system.js} +0 -0
- /package/dist/ionic/{p-14d7b7e2.system.js → p-b4b4bb29.system.js} +0 -0
- /package/dist/ionic/{p-bb6f38ed.js → p-b923f3d7.js} +0 -0
package/hydrate/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
/*!
|
|
9
|
-
Stencil Mock Doc v4.
|
|
9
|
+
Stencil Mock Doc v4.4.0 | MIT Licensed | https://stenciljs.com
|
|
10
10
|
*/
|
|
11
11
|
const CONTENT_REF_ID = 'r';
|
|
12
12
|
const ORG_LOCATION_ID = 'o';
|
|
@@ -7149,6 +7149,7 @@ const HapticEngine = {
|
|
|
7149
7149
|
* if the browser does not support the Vibrate API.
|
|
7150
7150
|
*/
|
|
7151
7151
|
if ((capacitor === null || capacitor === void 0 ? void 0 : capacitor.getPlatform()) === 'web') {
|
|
7152
|
+
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
7152
7153
|
return typeof navigator !== 'undefined' && navigator.vibrate !== undefined;
|
|
7153
7154
|
}
|
|
7154
7155
|
return true;
|
|
@@ -8218,6 +8219,7 @@ const setOverlayId = (el) => {
|
|
|
8218
8219
|
return el.id;
|
|
8219
8220
|
};
|
|
8220
8221
|
const createOverlay = (tagName, opts) => {
|
|
8222
|
+
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
8221
8223
|
if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined') {
|
|
8222
8224
|
return window.customElements.whenDefined(tagName).then(() => {
|
|
8223
8225
|
const element = document.createElement(tagName);
|
|
@@ -10487,6 +10489,14 @@ class Alert {
|
|
|
10487
10489
|
}
|
|
10488
10490
|
onKeydown(ev) {
|
|
10489
10491
|
const inputTypes = new Set(this.processedInputs.map((i) => i.type));
|
|
10492
|
+
/**
|
|
10493
|
+
* Based on keyboard navigation requirements, the
|
|
10494
|
+
* checkbox should not respond to the enter keydown event.
|
|
10495
|
+
*/
|
|
10496
|
+
if (inputTypes.has('checkbox') && ev.key === 'Enter') {
|
|
10497
|
+
ev.preventDefault();
|
|
10498
|
+
return;
|
|
10499
|
+
}
|
|
10490
10500
|
// The only inputs we want to navigate between using arrow keys are the radios
|
|
10491
10501
|
// ignore the keydown event if it is not on a radio button
|
|
10492
10502
|
if (!inputTypes.has('radio') ||
|
|
@@ -12967,13 +12977,19 @@ const warnIfValueOutOfBounds = (value, min, max) => {
|
|
|
12967
12977
|
const isLeapYear = (year) => {
|
|
12968
12978
|
return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
|
|
12969
12979
|
};
|
|
12970
|
-
|
|
12980
|
+
/**
|
|
12981
|
+
* Determines the hour cycle for a user.
|
|
12982
|
+
* If the hour cycle is explicitly defined, just use that.
|
|
12983
|
+
* Otherwise, we try to derive it from either the specified
|
|
12984
|
+
* locale extension tags or from Intl.DateTimeFormat directly.
|
|
12985
|
+
*/
|
|
12986
|
+
const getHourCycle = (locale, hourCycle) => {
|
|
12971
12987
|
/**
|
|
12972
|
-
* If developer has explicitly enabled
|
|
12988
|
+
* If developer has explicitly enabled 24-hour time
|
|
12973
12989
|
* then return early and do not look at the system default.
|
|
12974
12990
|
*/
|
|
12975
12991
|
if (hourCycle !== undefined) {
|
|
12976
|
-
return hourCycle
|
|
12992
|
+
return hourCycle;
|
|
12977
12993
|
}
|
|
12978
12994
|
/**
|
|
12979
12995
|
* If hourCycle was not specified, check the locale
|
|
@@ -12984,7 +13000,7 @@ const is24Hour = (locale, hourCycle) => {
|
|
|
12984
13000
|
const formatted = new Intl.DateTimeFormat(locale, { hour: 'numeric' });
|
|
12985
13001
|
const options = formatted.resolvedOptions();
|
|
12986
13002
|
if (options.hourCycle !== undefined) {
|
|
12987
|
-
return options.hourCycle
|
|
13003
|
+
return options.hourCycle;
|
|
12988
13004
|
}
|
|
12989
13005
|
/**
|
|
12990
13006
|
* If hourCycle is not specified (either through lack
|
|
@@ -12997,7 +13013,33 @@ const is24Hour = (locale, hourCycle) => {
|
|
|
12997
13013
|
if (!hour) {
|
|
12998
13014
|
throw new Error('Hour value not found from DateTimeFormat');
|
|
12999
13015
|
}
|
|
13000
|
-
|
|
13016
|
+
/**
|
|
13017
|
+
* Midnight for h11 starts at 0:00am
|
|
13018
|
+
* Midnight for h12 starts at 12:00am
|
|
13019
|
+
* Midnight for h23 starts at 00:00
|
|
13020
|
+
* Midnight for h24 starts at 24:00
|
|
13021
|
+
*/
|
|
13022
|
+
switch (hour.value) {
|
|
13023
|
+
case '0':
|
|
13024
|
+
return 'h11';
|
|
13025
|
+
case '12':
|
|
13026
|
+
return 'h12';
|
|
13027
|
+
case '00':
|
|
13028
|
+
return 'h23';
|
|
13029
|
+
case '24':
|
|
13030
|
+
return 'h24';
|
|
13031
|
+
default:
|
|
13032
|
+
throw new Error(`Invalid hour cycle "${hourCycle}"`);
|
|
13033
|
+
}
|
|
13034
|
+
};
|
|
13035
|
+
/**
|
|
13036
|
+
* Determine if the hour cycle uses a 24-hour format.
|
|
13037
|
+
* Returns true for h23 and h24. Returns false otherwise.
|
|
13038
|
+
* If you don't know the hourCycle, use getHourCycle above
|
|
13039
|
+
* and pass the result into this function.
|
|
13040
|
+
*/
|
|
13041
|
+
const is24Hour = (hourCycle) => {
|
|
13042
|
+
return hourCycle === 'h23' || hourCycle === 'h24';
|
|
13001
13043
|
};
|
|
13002
13044
|
/**
|
|
13003
13045
|
* Given a date object, returns the number
|
|
@@ -13664,7 +13706,7 @@ const getFormattedDayPeriod = (dayPeriod) => {
|
|
|
13664
13706
|
}
|
|
13665
13707
|
return dayPeriod.toUpperCase();
|
|
13666
13708
|
};
|
|
13667
|
-
const getLocalizedTime = (locale, refParts,
|
|
13709
|
+
const getLocalizedTime = (locale, refParts, hourCycle) => {
|
|
13668
13710
|
const timeParts = {
|
|
13669
13711
|
hour: refParts.hour,
|
|
13670
13712
|
minute: refParts.minute,
|
|
@@ -13686,7 +13728,7 @@ const getLocalizedTime = (locale, refParts, use24Hour) => {
|
|
|
13686
13728
|
* We use hourCycle here instead of hour12 due to:
|
|
13687
13729
|
* https://bugs.chromium.org/p/chromium/issues/detail?id=1347316&q=hour12&can=2
|
|
13688
13730
|
*/
|
|
13689
|
-
hourCycle
|
|
13731
|
+
hourCycle,
|
|
13690
13732
|
/**
|
|
13691
13733
|
* Setting Z at the end indicates that this
|
|
13692
13734
|
* date string is in the UTC time zone. This
|
|
@@ -13724,17 +13766,33 @@ const addTimePadding = (value) => {
|
|
|
13724
13766
|
* 12 hour times it ensures that
|
|
13725
13767
|
* hour 0 is formatted as '12'.
|
|
13726
13768
|
*/
|
|
13727
|
-
const getFormattedHour = (hour,
|
|
13728
|
-
if (use24Hour) {
|
|
13729
|
-
return addTimePadding(hour);
|
|
13730
|
-
}
|
|
13769
|
+
const getFormattedHour = (hour, hourCycle) => {
|
|
13731
13770
|
/**
|
|
13732
|
-
*
|
|
13733
|
-
*
|
|
13734
|
-
*
|
|
13771
|
+
* Midnight for h11 starts at 0:00am
|
|
13772
|
+
* Midnight for h12 starts at 12:00am
|
|
13773
|
+
* Midnight for h23 starts at 00:00
|
|
13774
|
+
* Midnight for h24 starts at 24:00
|
|
13735
13775
|
*/
|
|
13736
13776
|
if (hour === 0) {
|
|
13737
|
-
|
|
13777
|
+
switch (hourCycle) {
|
|
13778
|
+
case 'h11':
|
|
13779
|
+
return '0';
|
|
13780
|
+
case 'h12':
|
|
13781
|
+
return '12';
|
|
13782
|
+
case 'h23':
|
|
13783
|
+
return '00';
|
|
13784
|
+
case 'h24':
|
|
13785
|
+
return '24';
|
|
13786
|
+
default:
|
|
13787
|
+
throw new Error(`Invalid hour cycle "${hourCycle}"`);
|
|
13788
|
+
}
|
|
13789
|
+
}
|
|
13790
|
+
const use24Hour = is24Hour(hourCycle);
|
|
13791
|
+
/**
|
|
13792
|
+
* h23 and h24 use 24 hour times.
|
|
13793
|
+
*/
|
|
13794
|
+
if (use24Hour) {
|
|
13795
|
+
return addTimePadding(hour);
|
|
13738
13796
|
}
|
|
13739
13797
|
return hour.toString();
|
|
13740
13798
|
};
|
|
@@ -13969,8 +14027,14 @@ const minutes = [
|
|
|
13969
14027
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
|
13970
14028
|
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
|
|
13971
14029
|
];
|
|
14030
|
+
// h11 hour system uses 0-11. Midnight starts at 0:00am.
|
|
14031
|
+
const hour11 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
|
|
14032
|
+
// h12 hour system uses 0-12. Midnight starts at 12:00am.
|
|
13972
14033
|
const hour12 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
|
|
14034
|
+
// h23 hour system uses 0-23. Midnight starts at 0:00.
|
|
13973
14035
|
const hour23 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23];
|
|
14036
|
+
// h24 hour system uses 1-24. Midnight starts at 24:00.
|
|
14037
|
+
const hour24 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0];
|
|
13974
14038
|
/**
|
|
13975
14039
|
* Given a locale and a mode,
|
|
13976
14040
|
* return an array with formatted days
|
|
@@ -14039,14 +14103,33 @@ const getDaysOfMonth = (month, year, firstDayOfWeek) => {
|
|
|
14039
14103
|
}
|
|
14040
14104
|
return days;
|
|
14041
14105
|
};
|
|
14106
|
+
/**
|
|
14107
|
+
* Returns an array of pre-defined hour
|
|
14108
|
+
* values based on the provided hourCycle.
|
|
14109
|
+
*/
|
|
14110
|
+
const getHourData = (hourCycle) => {
|
|
14111
|
+
switch (hourCycle) {
|
|
14112
|
+
case 'h11':
|
|
14113
|
+
return hour11;
|
|
14114
|
+
case 'h12':
|
|
14115
|
+
return hour12;
|
|
14116
|
+
case 'h23':
|
|
14117
|
+
return hour23;
|
|
14118
|
+
case 'h24':
|
|
14119
|
+
return hour24;
|
|
14120
|
+
default:
|
|
14121
|
+
throw new Error(`Invalid hour cycle "${hourCycle}"`);
|
|
14122
|
+
}
|
|
14123
|
+
};
|
|
14042
14124
|
/**
|
|
14043
14125
|
* Given a local, reference datetime parts and option
|
|
14044
14126
|
* max/min bound datetime parts, calculate the acceptable
|
|
14045
14127
|
* hour and minute values according to the bounds and locale.
|
|
14046
14128
|
*/
|
|
14047
|
-
const generateTime = (refParts, hourCycle = 'h12', minParts, maxParts, hourValues, minuteValues) => {
|
|
14048
|
-
const
|
|
14049
|
-
|
|
14129
|
+
const generateTime = (locale, refParts, hourCycle = 'h12', minParts, maxParts, hourValues, minuteValues) => {
|
|
14130
|
+
const computedHourCycle = getHourCycle(locale, hourCycle);
|
|
14131
|
+
const use24Hour = is24Hour(computedHourCycle);
|
|
14132
|
+
let processedHours = getHourData(computedHourCycle);
|
|
14050
14133
|
let processedMinutes = minutes;
|
|
14051
14134
|
let isAMAllowed = true;
|
|
14052
14135
|
let isPMAllowed = true;
|
|
@@ -14378,11 +14461,12 @@ const getCombinedDateColumnData = (locale, todayParts, minParts, maxParts, dayVa
|
|
|
14378
14461
|
};
|
|
14379
14462
|
};
|
|
14380
14463
|
const getTimeColumnsData = (locale, refParts, hourCycle, minParts, maxParts, allowedHourValues, allowedMinuteValues) => {
|
|
14381
|
-
const
|
|
14382
|
-
const
|
|
14464
|
+
const computedHourCycle = getHourCycle(locale, hourCycle);
|
|
14465
|
+
const use24Hour = is24Hour(computedHourCycle);
|
|
14466
|
+
const { hours, minutes, am, pm } = generateTime(locale, refParts, computedHourCycle, minParts, maxParts, allowedHourValues, allowedMinuteValues);
|
|
14383
14467
|
const hoursItems = hours.map((hour) => {
|
|
14384
14468
|
return {
|
|
14385
|
-
text: getFormattedHour(hour,
|
|
14469
|
+
text: getFormattedHour(hour, computedHourCycle),
|
|
14386
14470
|
value: getInternalHourValue(hour, use24Hour, refParts.ampm),
|
|
14387
14471
|
};
|
|
14388
14472
|
});
|
|
@@ -15945,7 +16029,7 @@ class Datetime {
|
|
|
15945
16029
|
}
|
|
15946
16030
|
renderTimeOverlay() {
|
|
15947
16031
|
const { hourCycle, isTimePopoverOpen, locale } = this;
|
|
15948
|
-
const
|
|
16032
|
+
const computedHourCycle = getHourCycle(locale, hourCycle);
|
|
15949
16033
|
const activePart = this.getActivePartsWithFallback();
|
|
15950
16034
|
return [
|
|
15951
16035
|
hAsync("div", { class: "time-header" }, this.renderTimeLabel()),
|
|
@@ -15964,7 +16048,7 @@ class Datetime {
|
|
|
15964
16048
|
await popoverRef.onWillDismiss();
|
|
15965
16049
|
this.isTimePopoverOpen = false;
|
|
15966
16050
|
}
|
|
15967
|
-
} }, getLocalizedTime(locale, activePart,
|
|
16051
|
+
} }, getLocalizedTime(locale, activePart, computedHourCycle)),
|
|
15968
16052
|
hAsync("ion-popover", { alignment: "center", translucent: true, overlayIndex: 1, arrow: false, onWillPresent: (ev) => {
|
|
15969
16053
|
/**
|
|
15970
16054
|
* Intersection Observers do not consistently fire between Blink and Webkit
|
|
@@ -16229,13 +16313,13 @@ class DatetimeButton {
|
|
|
16229
16313
|
* warning in the console.
|
|
16230
16314
|
*/
|
|
16231
16315
|
const firstParsedDatetime = parsedDatetimes[0];
|
|
16232
|
-
const
|
|
16316
|
+
const computedHourCycle = getHourCycle(locale, hourCycle);
|
|
16233
16317
|
this.dateText = this.timeText = undefined;
|
|
16234
16318
|
switch (datetimePresentation) {
|
|
16235
16319
|
case 'date-time':
|
|
16236
16320
|
case 'time-date':
|
|
16237
16321
|
const dateText = getMonthDayAndYear(locale, firstParsedDatetime);
|
|
16238
|
-
const timeText = getLocalizedTime(locale, firstParsedDatetime,
|
|
16322
|
+
const timeText = getLocalizedTime(locale, firstParsedDatetime, computedHourCycle);
|
|
16239
16323
|
if (preferWheel) {
|
|
16240
16324
|
this.dateText = `${dateText} ${timeText}`;
|
|
16241
16325
|
}
|
|
@@ -16262,7 +16346,7 @@ class DatetimeButton {
|
|
|
16262
16346
|
}
|
|
16263
16347
|
break;
|
|
16264
16348
|
case 'time':
|
|
16265
|
-
this.timeText = getLocalizedTime(locale, firstParsedDatetime,
|
|
16349
|
+
this.timeText = getLocalizedTime(locale, firstParsedDatetime, computedHourCycle);
|
|
16266
16350
|
break;
|
|
16267
16351
|
case 'month-year':
|
|
16268
16352
|
this.dateText = getMonthAndYear(locale, firstParsedDatetime);
|
|
@@ -20369,22 +20453,13 @@ const createMenuController = () => {
|
|
|
20369
20453
|
if (menu === 'start' || menu === 'end') {
|
|
20370
20454
|
// there could be more than one menu on the same side
|
|
20371
20455
|
// so first try to get the enabled one
|
|
20372
|
-
const
|
|
20373
|
-
if (
|
|
20374
|
-
|
|
20375
|
-
printIonWarning(`menuController queried for a menu on the "${menu}" side, but ${menuRefs.length} menus were found. The first menu reference will be used. If this is not the behavior you want then pass the ID of the menu instead of its side.`, menuRefs.map((m) => m.el));
|
|
20376
|
-
}
|
|
20377
|
-
return menuRefs[0].el;
|
|
20456
|
+
const menuRef = find((m) => m.side === menu && !m.disabled);
|
|
20457
|
+
if (menuRef) {
|
|
20458
|
+
return menuRef;
|
|
20378
20459
|
}
|
|
20379
20460
|
// didn't find a menu side that is enabled
|
|
20380
20461
|
// so try to get the first menu side found
|
|
20381
|
-
|
|
20382
|
-
if (sideMenuRefs.length >= 1) {
|
|
20383
|
-
if (sideMenuRefs.length > 1) {
|
|
20384
|
-
printIonWarning(`menuController queried for a menu on the "${menu}" side, but ${sideMenuRefs.length} menus were found. The first menu reference will be used. If this is not the behavior you want then pass the ID of the menu instead of its side.`, sideMenuRefs.map((m) => m.el));
|
|
20385
|
-
}
|
|
20386
|
-
return sideMenuRefs[0].el;
|
|
20387
|
-
}
|
|
20462
|
+
return find((m) => m.side === menu);
|
|
20388
20463
|
}
|
|
20389
20464
|
else if (menu != null) {
|
|
20390
20465
|
// the menuId was not left or right
|
|
@@ -20426,6 +20501,9 @@ const createMenuController = () => {
|
|
|
20426
20501
|
};
|
|
20427
20502
|
const _register = (menu) => {
|
|
20428
20503
|
if (menus.indexOf(menu) < 0) {
|
|
20504
|
+
if (!menu.disabled) {
|
|
20505
|
+
_setActiveMenu(menu);
|
|
20506
|
+
}
|
|
20429
20507
|
menus.push(menu);
|
|
20430
20508
|
}
|
|
20431
20509
|
};
|
|
@@ -20435,6 +20513,13 @@ const createMenuController = () => {
|
|
|
20435
20513
|
menus.splice(index, 1);
|
|
20436
20514
|
}
|
|
20437
20515
|
};
|
|
20516
|
+
const _setActiveMenu = (menu) => {
|
|
20517
|
+
// if this menu should be enabled
|
|
20518
|
+
// then find all the other menus on this same side
|
|
20519
|
+
// and automatically disable other same side menus
|
|
20520
|
+
const side = menu.side;
|
|
20521
|
+
menus.filter((m) => m.side === side && m !== menu).forEach((m) => (m.disabled = true));
|
|
20522
|
+
};
|
|
20438
20523
|
const _setOpen = async (menu, shouldOpen, animated) => {
|
|
20439
20524
|
if (isAnimatingSync()) {
|
|
20440
20525
|
return false;
|
|
@@ -20506,6 +20591,7 @@ const createMenuController = () => {
|
|
|
20506
20591
|
_register,
|
|
20507
20592
|
_unregister,
|
|
20508
20593
|
_setOpen,
|
|
20594
|
+
_setActiveMenu,
|
|
20509
20595
|
};
|
|
20510
20596
|
};
|
|
20511
20597
|
const menuController = /*@__PURE__*/ createMenuController();
|
|
@@ -21021,6 +21107,17 @@ class Menu {
|
|
|
21021
21107
|
// close if this menu is open, and should not be enabled
|
|
21022
21108
|
this.forceClosing();
|
|
21023
21109
|
}
|
|
21110
|
+
if (doc === null || doc === void 0 ? void 0 : doc.contains(this.el)) {
|
|
21111
|
+
/**
|
|
21112
|
+
* Only set the active menu if the menu element is
|
|
21113
|
+
* present in the DOM. Otherwise if it was destructively
|
|
21114
|
+
* re-hydrated (through Angular Universal), then ignore
|
|
21115
|
+
* setting the removed node as the active menu.
|
|
21116
|
+
*/
|
|
21117
|
+
if (!this.disabled) {
|
|
21118
|
+
menuController._setActiveMenu(this);
|
|
21119
|
+
}
|
|
21120
|
+
}
|
|
21024
21121
|
assert(!this.isAnimating, 'can not be animating');
|
|
21025
21122
|
}
|
|
21026
21123
|
forceClosing() {
|
|
@@ -23832,6 +23929,7 @@ class Nav {
|
|
|
23832
23929
|
: undefined;
|
|
23833
23930
|
const mode = getIonMode$1(this);
|
|
23834
23931
|
const enteringEl = enteringView.element;
|
|
23932
|
+
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
23835
23933
|
const leavingEl = leavingView && leavingView.element;
|
|
23836
23934
|
const animationOpts = Object.assign(Object.assign({ mode, showGoBack: this.canGoBackSync(enteringView), baseEl: this.el, progressCallback, animated: this.animated && config.getBoolean('animated', true), enteringEl,
|
|
23837
23935
|
leavingEl }, opts), { animationBuilder: opts.animationBuilder || this.animation || config.get('navAnimation') });
|
|
@@ -29590,6 +29688,7 @@ const chainToSegments = (chain) => {
|
|
|
29590
29688
|
for (const route of chain) {
|
|
29591
29689
|
for (const segment of route.segments) {
|
|
29592
29690
|
if (segment[0] === ':') {
|
|
29691
|
+
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
29593
29692
|
const param = route.params && route.params[segment.slice(1)];
|
|
29594
29693
|
if (!param) {
|
|
29595
29694
|
return null;
|
|
@@ -30285,12 +30384,14 @@ class Router {
|
|
|
30285
30384
|
}
|
|
30286
30385
|
const routes = readRoutes(this.el);
|
|
30287
30386
|
const fromChain = findChainForSegments(from, routes);
|
|
30387
|
+
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
30288
30388
|
const beforeLeaveHook = fromChain && fromChain[fromChain.length - 1].beforeLeave;
|
|
30289
30389
|
const canLeave = beforeLeaveHook ? await beforeLeaveHook() : true;
|
|
30290
30390
|
if (canLeave === false || typeof canLeave === 'object') {
|
|
30291
30391
|
return canLeave;
|
|
30292
30392
|
}
|
|
30293
30393
|
const toChain = findChainForSegments(to, routes);
|
|
30394
|
+
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
30294
30395
|
const beforeEnterHook = toChain && toChain[toChain.length - 1].beforeEnter;
|
|
30295
30396
|
return beforeEnterHook ? beforeEnterHook() : true;
|
|
30296
30397
|
}
|
|
@@ -32174,7 +32275,7 @@ Developers can use the "legacy" property to continue using the legacy form marku
|
|
|
32174
32275
|
}
|
|
32175
32276
|
renderListbox() {
|
|
32176
32277
|
const { disabled, inputId, isExpanded } = this;
|
|
32177
|
-
return (hAsync("button", { disabled: disabled, id: inputId, "aria-label": this.ariaLabel, "aria-haspopup": "
|
|
32278
|
+
return (hAsync("button", { disabled: disabled, id: inputId, "aria-label": this.ariaLabel, "aria-haspopup": "dialog", "aria-expanded": `${isExpanded}`, onFocus: this.onFocus, onBlur: this.onBlur, ref: (focusEl) => (this.focusEl = focusEl) }));
|
|
32178
32279
|
}
|
|
32179
32280
|
render() {
|
|
32180
32281
|
const { legacyFormController } = this;
|
|
@@ -33512,13 +33613,12 @@ class Thumbnail {
|
|
|
33512
33613
|
/**
|
|
33513
33614
|
* iOS Toast Enter Animation
|
|
33514
33615
|
*/
|
|
33515
|
-
const iosEnterAnimation = (baseEl,
|
|
33616
|
+
const iosEnterAnimation = (baseEl, opts) => {
|
|
33516
33617
|
const baseAnimation = createAnimation();
|
|
33517
33618
|
const wrapperAnimation = createAnimation();
|
|
33619
|
+
const { position, top, bottom } = opts;
|
|
33518
33620
|
const root = getElementRoot(baseEl);
|
|
33519
33621
|
const wrapperEl = root.querySelector('.toast-wrapper');
|
|
33520
|
-
const bottom = `calc(-10px - var(--ion-safe-area-bottom, 0px))`;
|
|
33521
|
-
const top = `calc(10px + var(--ion-safe-area-top, 0px))`;
|
|
33522
33622
|
wrapperAnimation.addElement(wrapperEl);
|
|
33523
33623
|
switch (position) {
|
|
33524
33624
|
case 'top':
|
|
@@ -33539,13 +33639,12 @@ const iosEnterAnimation = (baseEl, position) => {
|
|
|
33539
33639
|
/**
|
|
33540
33640
|
* iOS Toast Leave Animation
|
|
33541
33641
|
*/
|
|
33542
|
-
const iosLeaveAnimation = (baseEl,
|
|
33642
|
+
const iosLeaveAnimation = (baseEl, opts) => {
|
|
33543
33643
|
const baseAnimation = createAnimation();
|
|
33544
33644
|
const wrapperAnimation = createAnimation();
|
|
33645
|
+
const { position, top, bottom } = opts;
|
|
33545
33646
|
const root = getElementRoot(baseEl);
|
|
33546
33647
|
const wrapperEl = root.querySelector('.toast-wrapper');
|
|
33547
|
-
const bottom = `calc(-10px - var(--ion-safe-area-bottom, 0px))`;
|
|
33548
|
-
const top = `calc(10px + var(--ion-safe-area-top, 0px))`;
|
|
33549
33648
|
wrapperAnimation.addElement(wrapperEl);
|
|
33550
33649
|
switch (position) {
|
|
33551
33650
|
case 'top':
|
|
@@ -33564,13 +33663,12 @@ const iosLeaveAnimation = (baseEl, position) => {
|
|
|
33564
33663
|
/**
|
|
33565
33664
|
* MD Toast Enter Animation
|
|
33566
33665
|
*/
|
|
33567
|
-
const mdEnterAnimation = (baseEl,
|
|
33666
|
+
const mdEnterAnimation = (baseEl, opts) => {
|
|
33568
33667
|
const baseAnimation = createAnimation();
|
|
33569
33668
|
const wrapperAnimation = createAnimation();
|
|
33669
|
+
const { position, top, bottom } = opts;
|
|
33570
33670
|
const root = getElementRoot(baseEl);
|
|
33571
33671
|
const wrapperEl = root.querySelector('.toast-wrapper');
|
|
33572
|
-
const bottom = `calc(8px + var(--ion-safe-area-bottom, 0px))`;
|
|
33573
|
-
const top = `calc(8px + var(--ion-safe-area-top, 0px))`;
|
|
33574
33672
|
wrapperAnimation.addElement(wrapperEl);
|
|
33575
33673
|
switch (position) {
|
|
33576
33674
|
case 'top':
|
|
@@ -33602,6 +33700,87 @@ const mdLeaveAnimation = (baseEl) => {
|
|
|
33602
33700
|
return baseAnimation.easing('cubic-bezier(.36,.66,.04,1)').duration(300).addAnimation(wrapperAnimation);
|
|
33603
33701
|
};
|
|
33604
33702
|
|
|
33703
|
+
/**
|
|
33704
|
+
* Calculate the CSS top and bottom position of the toast, to be used
|
|
33705
|
+
* as starting points for the animation keyframes.
|
|
33706
|
+
*
|
|
33707
|
+
* Note that MD animates bottom-positioned toasts using style.bottom,
|
|
33708
|
+
* which calculates from the bottom edge of the screen, while iOS uses
|
|
33709
|
+
* translateY, which calculates from the top edge of the screen. This
|
|
33710
|
+
* is why the bottom calculates differ slightly between modes.
|
|
33711
|
+
*
|
|
33712
|
+
* @param position The value of the toast's position prop.
|
|
33713
|
+
* @param positionAnchor The element the toast should be anchored to,
|
|
33714
|
+
* if applicable.
|
|
33715
|
+
* @param mode The toast component's mode (md, ios, etc).
|
|
33716
|
+
* @param toast A reference to the toast element itself.
|
|
33717
|
+
*/
|
|
33718
|
+
function getAnimationPosition(position, positionAnchor, mode, toast) {
|
|
33719
|
+
/**
|
|
33720
|
+
* Start with a predefined offset from the edge the toast will be
|
|
33721
|
+
* positioned relative to, whether on the screen or anchor element.
|
|
33722
|
+
*/
|
|
33723
|
+
let offset;
|
|
33724
|
+
if (mode === 'md') {
|
|
33725
|
+
offset = 8;
|
|
33726
|
+
}
|
|
33727
|
+
else {
|
|
33728
|
+
offset = position === 'top' ? 10 : -10;
|
|
33729
|
+
}
|
|
33730
|
+
/**
|
|
33731
|
+
* If positionAnchor is defined, add in the distance from the target
|
|
33732
|
+
* screen edge to the target anchor edge. For position="top", the
|
|
33733
|
+
* bottom anchor edge is targeted. For position="bottom", the top
|
|
33734
|
+
* anchor edge is targeted.
|
|
33735
|
+
*/
|
|
33736
|
+
if (positionAnchor && win$1) {
|
|
33737
|
+
warnIfAnchorIsHidden(positionAnchor, toast);
|
|
33738
|
+
const box = positionAnchor.getBoundingClientRect();
|
|
33739
|
+
if (position === 'top') {
|
|
33740
|
+
offset += box.bottom;
|
|
33741
|
+
}
|
|
33742
|
+
else if (position === 'bottom') {
|
|
33743
|
+
/**
|
|
33744
|
+
* Just box.top is the distance from the top edge of the screen
|
|
33745
|
+
* to the top edge of the anchor. We want to calculate from the
|
|
33746
|
+
* bottom edge of the screen instead.
|
|
33747
|
+
*/
|
|
33748
|
+
if (mode === 'md') {
|
|
33749
|
+
offset += win$1.innerHeight - box.top;
|
|
33750
|
+
}
|
|
33751
|
+
else {
|
|
33752
|
+
offset -= win$1.innerHeight - box.top;
|
|
33753
|
+
}
|
|
33754
|
+
}
|
|
33755
|
+
/**
|
|
33756
|
+
* We don't include safe area here because that should already be
|
|
33757
|
+
* accounted for when checking the position of the anchor.
|
|
33758
|
+
*/
|
|
33759
|
+
return {
|
|
33760
|
+
top: `${offset}px`,
|
|
33761
|
+
bottom: `${offset}px`,
|
|
33762
|
+
};
|
|
33763
|
+
}
|
|
33764
|
+
else {
|
|
33765
|
+
return {
|
|
33766
|
+
top: `calc(${offset}px + var(--ion-safe-area-top, 0px))`,
|
|
33767
|
+
bottom: mode === 'md'
|
|
33768
|
+
? `calc(${offset}px + var(--ion-safe-area-bottom, 0px))`
|
|
33769
|
+
: `calc(${offset}px - var(--ion-safe-area-bottom, 0px))`,
|
|
33770
|
+
};
|
|
33771
|
+
}
|
|
33772
|
+
}
|
|
33773
|
+
/**
|
|
33774
|
+
* If the anchor element is hidden, getBoundingClientRect()
|
|
33775
|
+
* will return all 0s for it, which can cause unexpected
|
|
33776
|
+
* results in the position calculation when animating.
|
|
33777
|
+
*/
|
|
33778
|
+
function warnIfAnchorIsHidden(positionAnchor, toast) {
|
|
33779
|
+
if (positionAnchor.offsetParent === null) {
|
|
33780
|
+
printIonWarning('The positionAnchor element for ion-toast was found in the DOM, but appears to be hidden. This may lead to unexpected positioning of the toast.', toast);
|
|
33781
|
+
}
|
|
33782
|
+
}
|
|
33783
|
+
|
|
33605
33784
|
const toastIosCss = "/*!@:host*/.sc-ion-toast-ios-h{--border-width:0;--border-style:none;--border-color:initial;--box-shadow:none;--min-width:auto;--width:auto;--min-height:auto;--height:auto;--max-height:auto;--white-space:normal;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);font-family:var(--ion-font-family, inherit);contain:strict;z-index:1001;pointer-events:none}@supports (inset-inline-start: 0){/*!@:host*/.sc-ion-toast-ios-h{inset-inline-start:0}}@supports not (inset-inline-start: 0){/*!@:host*/.sc-ion-toast-ios-h{left:0}/*!@:host-context([dir=rtl])*/[dir=rtl].sc-ion-toast-ios-h,[dir=rtl] .sc-ion-toast-ios-h{left:unset;right:unset;right:0}/*!@@supports selector(:dir(rtl))*/@supports .sc-ion-toast-ios selector(.sc-ion-toast-ios:dir(rtl)){.sc-ion-toast-ios-h:dir(rtl){left:unset;right:unset;right:0}}}/*!@:host(.overlay-hidden)*/.overlay-hidden.sc-ion-toast-ios-h{display:none}/*!@:host(.ion-color)*/.ion-color.sc-ion-toast-ios-h{--button-color:inherit;color:var(--ion-color-contrast)}/*!@:host(.ion-color) .toast-button-cancel*/.ion-color.sc-ion-toast-ios-h .toast-button-cancel.sc-ion-toast-ios{color:inherit}/*!@:host(.ion-color) .toast-wrapper*/.ion-color.sc-ion-toast-ios-h .toast-wrapper.sc-ion-toast-ios{background:var(--ion-color-base)}/*!@.toast-wrapper*/.toast-wrapper.sc-ion-toast-ios{border-radius:var(--border-radius);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);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}@supports (inset-inline-start: 0){/*!@.toast-wrapper*/.toast-wrapper.sc-ion-toast-ios{inset-inline-start:var(--start);inset-inline-end:var(--end)}}@supports not (inset-inline-start: 0){/*!@.toast-wrapper*/.toast-wrapper.sc-ion-toast-ios{left:var(--start);right:var(--end)}/*!@:host-context([dir=rtl]) .toast-wrapper*/[dir=rtl].sc-ion-toast-ios-h .toast-wrapper.sc-ion-toast-ios,[dir=rtl] .sc-ion-toast-ios-h .toast-wrapper.sc-ion-toast-ios{left:unset;right:unset;left:var(--end);right:var(--start)}/*!@[dir=rtl] .toast-wrapper*/[dir=rtl].sc-ion-toast-ios .toast-wrapper.sc-ion-toast-ios{left:unset;right:unset;left:var(--end);right:var(--start)}/*!@@supports selector(:dir(rtl))*/@supports .sc-ion-toast-ios selector(.sc-ion-toast-ios:dir(rtl)){.toast-wrapper:dir(rtl){left:unset;right:unset;left:var(--end);right:var(--start)}}}/*!@.toast-container*/.toast-container.sc-ion-toast-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;pointer-events:auto;height:inherit;min-height:inherit;max-height:inherit;contain:content}/*!@.toast-layout-stacked .toast-container*/.toast-layout-stacked.sc-ion-toast-ios .toast-container.sc-ion-toast-ios{-ms-flex-wrap:wrap;flex-wrap:wrap}/*!@.toast-layout-baseline .toast-content*/.toast-layout-baseline.sc-ion-toast-ios .toast-content.sc-ion-toast-ios{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}/*!@.toast-icon*/.toast-icon.sc-ion-toast-ios{-webkit-margin-start:16px;margin-inline-start:16px}/*!@.toast-message*/.toast-message.sc-ion-toast-ios{-ms-flex:1;flex:1;white-space:var(--white-space)}/*!@.toast-button-group*/.toast-button-group.sc-ion-toast-ios{display:-ms-flexbox;display:flex}/*!@.toast-layout-stacked .toast-button-group*/.toast-layout-stacked.sc-ion-toast-ios .toast-button-group.sc-ion-toast-ios{-ms-flex-pack:end;justify-content:end;width:100%}/*!@.toast-button*/.toast-button.sc-ion-toast-ios{border:0;outline:none;color:var(--button-color);z-index:0}/*!@.toast-icon,\n.toast-button-icon*/.toast-icon.sc-ion-toast-ios,.toast-button-icon.sc-ion-toast-ios{font-size:1.4em}/*!@.toast-button-inner*/.toast-button-inner.sc-ion-toast-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}@media (any-hover: hover){/*!@.toast-button:hover*/.toast-button.sc-ion-toast-ios:hover{cursor:pointer}}/*!@:host*/.sc-ion-toast-ios-h{--background:var(--ion-color-step-50, #f2f2f2);--border-radius:14px;--button-color:var(--ion-color-primary, #3880ff);--color:var(--ion-color-step-850, #262626);--max-width:700px;--start:10px;--end:10px;font-size:14px}/*!@.toast-wrapper*/.toast-wrapper.sc-ion-toast-ios{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;z-index:10}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){/*!@:host(.toast-translucent) .toast-wrapper*/.toast-translucent.sc-ion-toast-ios-h .toast-wrapper.sc-ion-toast-ios{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}/*!@:host(.ion-color.toast-translucent) .toast-wrapper*/.ion-color.toast-translucent.sc-ion-toast-ios-h .toast-wrapper.sc-ion-toast-ios{background:rgba(var(--ion-color-base-rgb), 0.8)}}/*!@.toast-wrapper.toast-top*/.toast-wrapper.toast-top.sc-ion-toast-ios{-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0);top:0}/*!@.toast-wrapper.toast-middle*/.toast-wrapper.toast-middle.sc-ion-toast-ios{opacity:0.01}/*!@.toast-wrapper.toast-bottom*/.toast-wrapper.toast-bottom.sc-ion-toast-ios{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);bottom:0}/*!@.toast-content*/.toast-content.sc-ion-toast-ios{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:15px;padding-bottom:15px}/*!@.toast-header*/.toast-header.sc-ion-toast-ios{margin-bottom:2px;font-weight:500}/*!@.toast-button*/.toast-button.sc-ion-toast-ios{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:10px;padding-bottom:10px;height:44px;-webkit-transition:background-color, opacity 100ms linear;transition:background-color, opacity 100ms linear;border:0;background-color:transparent;font-family:var(--ion-font-family);font-size:17px;font-weight:500;overflow:hidden}/*!@.toast-button.ion-activated*/.toast-button.ion-activated.sc-ion-toast-ios{opacity:0.4}@media (any-hover: hover){/*!@.toast-button:hover*/.toast-button.sc-ion-toast-ios:hover{opacity:0.6}}";
|
|
33606
33785
|
|
|
33607
33786
|
const toastMdCss = "/*!@:host*/.sc-ion-toast-md-h{--border-width:0;--border-style:none;--border-color:initial;--box-shadow:none;--min-width:auto;--width:auto;--min-height:auto;--height:auto;--max-height:auto;--white-space:normal;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);font-family:var(--ion-font-family, inherit);contain:strict;z-index:1001;pointer-events:none}@supports (inset-inline-start: 0){/*!@:host*/.sc-ion-toast-md-h{inset-inline-start:0}}@supports not (inset-inline-start: 0){/*!@:host*/.sc-ion-toast-md-h{left:0}/*!@:host-context([dir=rtl])*/[dir=rtl].sc-ion-toast-md-h,[dir=rtl] .sc-ion-toast-md-h{left:unset;right:unset;right:0}/*!@@supports selector(:dir(rtl))*/@supports .sc-ion-toast-md selector(.sc-ion-toast-md:dir(rtl)){.sc-ion-toast-md-h:dir(rtl){left:unset;right:unset;right:0}}}/*!@:host(.overlay-hidden)*/.overlay-hidden.sc-ion-toast-md-h{display:none}/*!@:host(.ion-color)*/.ion-color.sc-ion-toast-md-h{--button-color:inherit;color:var(--ion-color-contrast)}/*!@:host(.ion-color) .toast-button-cancel*/.ion-color.sc-ion-toast-md-h .toast-button-cancel.sc-ion-toast-md{color:inherit}/*!@:host(.ion-color) .toast-wrapper*/.ion-color.sc-ion-toast-md-h .toast-wrapper.sc-ion-toast-md{background:var(--ion-color-base)}/*!@.toast-wrapper*/.toast-wrapper.sc-ion-toast-md{border-radius:var(--border-radius);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);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}@supports (inset-inline-start: 0){/*!@.toast-wrapper*/.toast-wrapper.sc-ion-toast-md{inset-inline-start:var(--start);inset-inline-end:var(--end)}}@supports not (inset-inline-start: 0){/*!@.toast-wrapper*/.toast-wrapper.sc-ion-toast-md{left:var(--start);right:var(--end)}/*!@:host-context([dir=rtl]) .toast-wrapper*/[dir=rtl].sc-ion-toast-md-h .toast-wrapper.sc-ion-toast-md,[dir=rtl] .sc-ion-toast-md-h .toast-wrapper.sc-ion-toast-md{left:unset;right:unset;left:var(--end);right:var(--start)}/*!@[dir=rtl] .toast-wrapper*/[dir=rtl].sc-ion-toast-md .toast-wrapper.sc-ion-toast-md{left:unset;right:unset;left:var(--end);right:var(--start)}/*!@@supports selector(:dir(rtl))*/@supports .sc-ion-toast-md selector(.sc-ion-toast-md:dir(rtl)){.toast-wrapper:dir(rtl){left:unset;right:unset;left:var(--end);right:var(--start)}}}/*!@.toast-container*/.toast-container.sc-ion-toast-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;pointer-events:auto;height:inherit;min-height:inherit;max-height:inherit;contain:content}/*!@.toast-layout-stacked .toast-container*/.toast-layout-stacked.sc-ion-toast-md .toast-container.sc-ion-toast-md{-ms-flex-wrap:wrap;flex-wrap:wrap}/*!@.toast-layout-baseline .toast-content*/.toast-layout-baseline.sc-ion-toast-md .toast-content.sc-ion-toast-md{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}/*!@.toast-icon*/.toast-icon.sc-ion-toast-md{-webkit-margin-start:16px;margin-inline-start:16px}/*!@.toast-message*/.toast-message.sc-ion-toast-md{-ms-flex:1;flex:1;white-space:var(--white-space)}/*!@.toast-button-group*/.toast-button-group.sc-ion-toast-md{display:-ms-flexbox;display:flex}/*!@.toast-layout-stacked .toast-button-group*/.toast-layout-stacked.sc-ion-toast-md .toast-button-group.sc-ion-toast-md{-ms-flex-pack:end;justify-content:end;width:100%}/*!@.toast-button*/.toast-button.sc-ion-toast-md{border:0;outline:none;color:var(--button-color);z-index:0}/*!@.toast-icon,\n.toast-button-icon*/.toast-icon.sc-ion-toast-md,.toast-button-icon.sc-ion-toast-md{font-size:1.4em}/*!@.toast-button-inner*/.toast-button-inner.sc-ion-toast-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}@media (any-hover: hover){/*!@.toast-button:hover*/.toast-button.sc-ion-toast-md:hover{cursor:pointer}}/*!@:host*/.sc-ion-toast-md-h{--background:var(--ion-color-step-800, #333333);--border-radius:4px;--box-shadow:0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12);--button-color:var(--ion-color-primary, #3880ff);--color:var(--ion-color-step-50, #f2f2f2);--max-width:700px;--start:8px;--end:8px;font-size:14px}/*!@.toast-wrapper*/.toast-wrapper.sc-ion-toast-md{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;opacity:0.01;z-index:10}/*!@.toast-content*/.toast-content.sc-ion-toast-md{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:14px;padding-bottom:14px}/*!@.toast-header*/.toast-header.sc-ion-toast-md{margin-bottom:2px;font-weight:500;line-height:20px}/*!@.toast-message*/.toast-message.sc-ion-toast-md{line-height:20px}/*!@.toast-layout-baseline .toast-button-group-start*/.toast-layout-baseline.sc-ion-toast-md .toast-button-group-start.sc-ion-toast-md{-webkit-margin-start:8px;margin-inline-start:8px}/*!@.toast-layout-stacked .toast-button-group-start*/.toast-layout-stacked.sc-ion-toast-md .toast-button-group-start.sc-ion-toast-md{-webkit-margin-end:8px;margin-inline-end:8px;margin-top:8px}/*!@.toast-layout-baseline .toast-button-group-end*/.toast-layout-baseline.sc-ion-toast-md .toast-button-group-end.sc-ion-toast-md{-webkit-margin-end:8px;margin-inline-end:8px}/*!@.toast-layout-stacked .toast-button-group-end*/.toast-layout-stacked.sc-ion-toast-md .toast-button-group-end.sc-ion-toast-md{-webkit-margin-end:8px;margin-inline-end:8px;margin-bottom:8px}/*!@.toast-button*/.toast-button.sc-ion-toast-md{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:10px;padding-bottom:10px;position:relative;background-color:transparent;font-family:var(--ion-font-family);font-size:14px;font-weight:500;letter-spacing:0.84px;text-transform:uppercase;overflow:hidden}/*!@.toast-button-cancel*/.toast-button-cancel.sc-ion-toast-md{color:var(--ion-color-step-100, #e6e6e6)}/*!@.toast-button-icon-only*/.toast-button-icon-only.sc-ion-toast-md{border-radius:50%;-webkit-padding-start:9px;padding-inline-start:9px;-webkit-padding-end:9px;padding-inline-end:9px;padding-top:9px;padding-bottom:9px;width:36px;height:36px}@media (any-hover: hover){/*!@.toast-button:hover*/.toast-button.sc-ion-toast-md:hover{background-color:rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.08)}/*!@.toast-button-cancel:hover*/.toast-button-cancel.sc-ion-toast-md:hover{background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.08)}}";
|
|
@@ -33654,6 +33833,7 @@ class Toast {
|
|
|
33654
33833
|
this.message = undefined;
|
|
33655
33834
|
this.keyboardClose = false;
|
|
33656
33835
|
this.position = 'bottom';
|
|
33836
|
+
this.positionAnchor = undefined;
|
|
33657
33837
|
this.buttons = undefined;
|
|
33658
33838
|
this.translucent = false;
|
|
33659
33839
|
this.animated = true;
|
|
@@ -33701,7 +33881,19 @@ class Toast {
|
|
|
33701
33881
|
async present() {
|
|
33702
33882
|
const unlock = await this.lockController.lock();
|
|
33703
33883
|
await this.delegateController.attachViewToDom();
|
|
33704
|
-
|
|
33884
|
+
const { el, position } = this;
|
|
33885
|
+
const anchor = this.getAnchorElement();
|
|
33886
|
+
const animationPosition = getAnimationPosition(position, anchor, getIonMode$1(this), el);
|
|
33887
|
+
/**
|
|
33888
|
+
* Cache the calculated position of the toast, so we can re-use it
|
|
33889
|
+
* in the dismiss animation.
|
|
33890
|
+
*/
|
|
33891
|
+
this.lastPresentedPosition = animationPosition;
|
|
33892
|
+
await present(this, 'toastEnter', iosEnterAnimation, mdEnterAnimation, {
|
|
33893
|
+
position,
|
|
33894
|
+
top: animationPosition.top,
|
|
33895
|
+
bottom: animationPosition.bottom,
|
|
33896
|
+
});
|
|
33705
33897
|
/**
|
|
33706
33898
|
* Content is revealed to screen readers after
|
|
33707
33899
|
* the transition to avoid jank since this
|
|
@@ -33723,15 +33915,28 @@ class Toast {
|
|
|
33723
33915
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
33724
33916
|
*/
|
|
33725
33917
|
async dismiss(data, role) {
|
|
33918
|
+
var _a, _b;
|
|
33726
33919
|
const unlock = await this.lockController.lock();
|
|
33727
|
-
|
|
33728
|
-
|
|
33920
|
+
const { durationTimeout, position, lastPresentedPosition } = this;
|
|
33921
|
+
if (durationTimeout) {
|
|
33922
|
+
clearTimeout(durationTimeout);
|
|
33729
33923
|
}
|
|
33730
|
-
const dismissed = await dismiss(this, data, role, 'toastLeave', iosLeaveAnimation, mdLeaveAnimation,
|
|
33924
|
+
const dismissed = await dismiss(this, data, role, 'toastLeave', iosLeaveAnimation, mdLeaveAnimation,
|
|
33925
|
+
/**
|
|
33926
|
+
* Fetch the cached position that was calculated back in the present
|
|
33927
|
+
* animation. We always want to animate the dismiss from the same
|
|
33928
|
+
* position the present stopped at, so the animation looks continuous.
|
|
33929
|
+
*/
|
|
33930
|
+
{
|
|
33931
|
+
position,
|
|
33932
|
+
top: (_a = lastPresentedPosition === null || lastPresentedPosition === void 0 ? void 0 : lastPresentedPosition.top) !== null && _a !== void 0 ? _a : '',
|
|
33933
|
+
bottom: (_b = lastPresentedPosition === null || lastPresentedPosition === void 0 ? void 0 : lastPresentedPosition.bottom) !== null && _b !== void 0 ? _b : '',
|
|
33934
|
+
});
|
|
33731
33935
|
if (dismissed) {
|
|
33732
33936
|
this.delegateController.removeViewFromDom();
|
|
33733
33937
|
this.revealContentToScreenReader = false;
|
|
33734
33938
|
}
|
|
33939
|
+
this.lastPresentedPosition = undefined;
|
|
33735
33940
|
unlock();
|
|
33736
33941
|
return dismissed;
|
|
33737
33942
|
}
|
|
@@ -33755,6 +33960,37 @@ class Toast {
|
|
|
33755
33960
|
: [];
|
|
33756
33961
|
return buttons;
|
|
33757
33962
|
}
|
|
33963
|
+
/**
|
|
33964
|
+
* Returns the element specified by the positionAnchor prop,
|
|
33965
|
+
* or undefined if prop's value is an ID string and the element
|
|
33966
|
+
* is not found in the DOM.
|
|
33967
|
+
*/
|
|
33968
|
+
getAnchorElement() {
|
|
33969
|
+
const { position, positionAnchor, el } = this;
|
|
33970
|
+
if (position === 'middle' && positionAnchor !== undefined) {
|
|
33971
|
+
printIonWarning('The positionAnchor property is ignored when using position="middle".', this.el);
|
|
33972
|
+
return undefined;
|
|
33973
|
+
}
|
|
33974
|
+
if (typeof positionAnchor === 'string') {
|
|
33975
|
+
/**
|
|
33976
|
+
* If the anchor is defined as an ID, find the element.
|
|
33977
|
+
* We do this on every present so the toast doesn't need
|
|
33978
|
+
* to account for the surrounding DOM changing since the
|
|
33979
|
+
* last time it was presented.
|
|
33980
|
+
*/
|
|
33981
|
+
const foundEl = document.getElementById(positionAnchor);
|
|
33982
|
+
if (foundEl === null) {
|
|
33983
|
+
printIonWarning(`An anchor element with an ID of "${positionAnchor}" was not found in the DOM.`, el);
|
|
33984
|
+
return undefined;
|
|
33985
|
+
}
|
|
33986
|
+
return foundEl;
|
|
33987
|
+
}
|
|
33988
|
+
if (positionAnchor instanceof HTMLElement) {
|
|
33989
|
+
return positionAnchor;
|
|
33990
|
+
}
|
|
33991
|
+
printIonWarning('Invalid positionAnchor value:', positionAnchor, el);
|
|
33992
|
+
return undefined;
|
|
33993
|
+
}
|
|
33758
33994
|
async buttonClick(button) {
|
|
33759
33995
|
const role = button.role;
|
|
33760
33996
|
if (isCancel(role)) {
|
|
@@ -33862,6 +34098,7 @@ class Toast {
|
|
|
33862
34098
|
"message": [1],
|
|
33863
34099
|
"keyboardClose": [4, "keyboard-close"],
|
|
33864
34100
|
"position": [1],
|
|
34101
|
+
"positionAnchor": [1, "position-anchor"],
|
|
33865
34102
|
"buttons": [16],
|
|
33866
34103
|
"translucent": [4],
|
|
33867
34104
|
"animated": [4],
|
|
@@ -34579,6 +34816,7 @@ const iosTransitionAnimation = (navEl, opts) => {
|
|
|
34579
34816
|
.easing(opts.easing || EASING)
|
|
34580
34817
|
.fill('both')
|
|
34581
34818
|
.beforeRemoveClass('ion-page-invisible');
|
|
34819
|
+
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
34582
34820
|
if (leavingEl && navEl !== null && navEl !== undefined) {
|
|
34583
34821
|
const navDecorAnimation = createAnimation();
|
|
34584
34822
|
navDecorAnimation.addElement(navEl);
|