@ionic/core 8.4.4-dev.11741046329.16b83b14 → 8.4.4-dev.11741048645.1fe58d92
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/checkbox.js +6 -40
- package/components/helpers.js +11 -1
- package/components/index6.js +3 -11
- package/components/index7.js +2 -2
- package/components/index9.js +1 -1
- package/components/ion-segment-button.js +40 -9
- package/components/ion-select.js +41 -16
- package/components/ion-toggle.js +4 -6
- package/components/modal.js +35 -259
- package/components/toolbar.js +2 -2
- package/css/core.css +1 -1
- package/css/core.css.map +1 -1
- package/css/global.bundle.css +1 -1
- package/css/global.bundle.css.map +1 -1
- package/css/ionic.bundle.css +1 -1
- package/css/ionic.bundle.css.map +1 -1
- package/css/palettes/dark.always.css +1 -1
- package/css/palettes/dark.always.css.map +1 -1
- package/css/palettes/dark.class.css +1 -1
- package/css/palettes/dark.class.css.map +1 -1
- package/css/palettes/dark.system.css +1 -1
- package/css/palettes/dark.system.css.map +1 -1
- package/css/palettes/high-contrast-dark.always.css +1 -1
- package/css/palettes/high-contrast-dark.always.css.map +1 -1
- package/css/palettes/high-contrast-dark.class.css +1 -1
- package/css/palettes/high-contrast-dark.class.css.map +1 -1
- package/css/palettes/high-contrast-dark.system.css +1 -1
- package/css/palettes/high-contrast-dark.system.css.map +1 -1
- package/css/palettes/high-contrast.always.css +1 -1
- package/css/palettes/high-contrast.always.css.map +1 -1
- package/css/palettes/high-contrast.class.css +1 -1
- package/css/palettes/high-contrast.class.css.map +1 -1
- package/css/palettes/high-contrast.system.css +1 -1
- package/css/palettes/high-contrast.system.css.map +1 -1
- package/css/structure.css +1 -1
- package/css/structure.css.map +1 -1
- package/css/typography.css +1 -1
- package/css/typography.css.map +1 -1
- package/dist/cjs/{data-108e531d.js → data-21dc0f81.js} +1 -1
- package/dist/cjs/{framework-delegate-55f5683a.js → framework-delegate-05579976.js} +1 -1
- package/dist/cjs/{helpers-afaa9001.js → helpers-4be3f90d.js} +11 -0
- package/dist/cjs/{index-073c7cdc.js → index-0e360e93.js} +2 -2
- package/dist/cjs/{index-3652c918.js → index-1ae3f40a.js} +2 -2
- package/dist/cjs/{index-e975c92b.js → index-4e14a46e.js} +4 -4
- package/dist/cjs/{index-2a46a047.js → index-5915f9b3.js} +3 -11
- package/dist/cjs/{index-9509ecad.js → index-ad7a712e.js} +1 -1
- package/dist/cjs/{index-0d762bba.js → index-c441c903.js} +2 -2
- package/dist/cjs/index.cjs.js +8 -8
- package/dist/cjs/{input-shims-cd05268a.js → input-shims-e748a364.js} +3 -5
- package/dist/cjs/{input.utils-ffb2f81b.js → input.utils-74e4ec28.js} +2 -2
- package/dist/cjs/ion-accordion_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-action-sheet.cjs.entry.js +4 -4
- package/dist/cjs/ion-alert.cjs.entry.js +4 -4
- package/dist/cjs/ion-app_8.cjs.entry.js +11 -11
- package/dist/cjs/ion-back-button.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 +1 -1
- package/dist/cjs/ion-checkbox.cjs.entry.js +7 -38
- package/dist/cjs/ion-datetime-button.cjs.entry.js +3 -3
- package/dist/cjs/ion-datetime_3.cjs.entry.js +6 -6
- package/dist/cjs/ion-fab_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-img.cjs.entry.js +1 -1
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-input-password-toggle.cjs.entry.js +2 -2
- package/dist/cjs/ion-input.cjs.entry.js +5 -5
- package/dist/cjs/ion-item-option_3.cjs.entry.js +3 -3
- package/dist/cjs/ion-item_8.cjs.entry.js +2 -2
- package/dist/cjs/ion-loading.cjs.entry.js +4 -4
- package/dist/cjs/ion-menu_3.cjs.entry.js +6 -6
- package/dist/cjs/ion-modal.cjs.entry.js +41 -264
- package/dist/cjs/ion-nav_2.cjs.entry.js +5 -5
- package/dist/cjs/ion-picker-column-option.cjs.entry.js +1 -1
- package/dist/cjs/ion-picker-column.cjs.entry.js +1 -1
- package/dist/cjs/ion-picker.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +5 -5
- package/dist/cjs/ion-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/ion-radio_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-range.cjs.entry.js +3 -3
- package/dist/cjs/ion-refresher_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-reorder_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-route_4.cjs.entry.js +1 -1
- package/dist/cjs/ion-searchbar.cjs.entry.js +2 -2
- package/dist/cjs/ion-segment_2.cjs.entry.js +40 -9
- package/dist/cjs/ion-select-modal.cjs.entry.js +4 -4
- package/dist/cjs/ion-select_3.cjs.entry.js +46 -20
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-tab_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-textarea.cjs.entry.js +4 -4
- package/dist/cjs/ion-toast.cjs.entry.js +4 -4
- package/dist/cjs/ion-toggle.cjs.entry.js +6 -7
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/{ios.transition-0e664e88.js → ios.transition-afdec89f.js} +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{md.transition-2e8aef2c.js → md.transition-9f0d3db5.js} +3 -3
- package/dist/cjs/{notch-controller-d69150f5.js → notch-controller-a0c464d1.js} +1 -1
- package/dist/cjs/{overlays-65fdaff6.js → overlays-76b29cd4.js} +3 -3
- package/dist/cjs/{status-tap-d74f1429.js → status-tap-fb807fad.js} +3 -4
- package/dist/cjs/{swipe-back-0303a5e4.js → swipe-back-47a52b83.js} +1 -1
- package/dist/collection/components/checkbox/checkbox.ios.css +15 -52
- package/dist/collection/components/checkbox/checkbox.js +4 -90
- package/dist/collection/components/checkbox/checkbox.md.css +15 -52
- package/dist/collection/components/modal/animations/ios.enter.js +4 -50
- package/dist/collection/components/modal/animations/ios.leave.js +2 -24
- package/dist/collection/components/modal/animations/md.enter.js +5 -52
- package/dist/collection/components/modal/animations/md.leave.js +3 -26
- package/dist/collection/components/modal/animations/sheet.js +2 -11
- package/dist/collection/components/modal/gestures/sheet.js +10 -79
- package/dist/collection/components/modal/modal.ios.css +0 -16
- package/dist/collection/components/modal/modal.js +7 -32
- package/dist/collection/components/modal/modal.md.css +0 -6
- package/dist/collection/components/segment-button/segment-button.js +40 -9
- package/dist/collection/components/select/select.js +40 -32
- package/dist/collection/components/toggle/toggle.js +4 -23
- package/dist/collection/components/toolbar/toolbar.js +2 -6
- package/dist/collection/utils/helpers.js +10 -0
- package/dist/collection/utils/logging/index.js +3 -10
- package/dist/docs.json +2 -187
- package/dist/esm/{data-b3284b5e.js → data-ae11fd43.js} +1 -1
- package/dist/esm/{framework-delegate-63d1a679.js → framework-delegate-f683816e.js} +1 -1
- package/dist/esm/{helpers-da915de8.js → helpers-9b49d7d2.js} +11 -1
- package/dist/esm/{index-e2cf2ceb.js → index-10f4ed65.js} +2 -2
- package/dist/esm/{index-efb8ecdf.js → index-33f7e3ff.js} +2 -2
- package/dist/esm/{index-79b30591.js → index-5a0f5fd0.js} +1 -1
- package/dist/esm/{index-2f7fde3d.js → index-7ec5519a.js} +4 -4
- package/dist/esm/{index-cb21eccb.js → index-8785a9c6.js} +2 -2
- package/dist/esm/{index-6ad967f3.js → index-9b0d46f4.js} +3 -11
- package/dist/esm/index.js +8 -8
- package/dist/esm/{input-shims-2fd7c6ef.js → input-shims-0e65111b.js} +3 -5
- package/dist/esm/{input.utils-961c9f17.js → input.utils-1ad8dafc.js} +2 -2
- package/dist/esm/ion-accordion_2.entry.js +3 -3
- package/dist/esm/ion-action-sheet.entry.js +4 -4
- package/dist/esm/ion-alert.entry.js +4 -4
- package/dist/esm/ion-app_8.entry.js +11 -11
- package/dist/esm/ion-back-button.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 +1 -1
- package/dist/esm/ion-checkbox.entry.js +7 -38
- package/dist/esm/ion-datetime-button.entry.js +3 -3
- package/dist/esm/ion-datetime_3.entry.js +6 -6
- package/dist/esm/ion-fab_3.entry.js +2 -2
- package/dist/esm/ion-img.entry.js +1 -1
- package/dist/esm/ion-infinite-scroll_2.entry.js +3 -3
- package/dist/esm/ion-input-password-toggle.entry.js +2 -2
- package/dist/esm/ion-input.entry.js +5 -5
- package/dist/esm/ion-item-option_3.entry.js +3 -3
- package/dist/esm/ion-item_8.entry.js +2 -2
- package/dist/esm/ion-loading.entry.js +4 -4
- package/dist/esm/ion-menu_3.entry.js +6 -6
- package/dist/esm/ion-modal.entry.js +41 -264
- package/dist/esm/ion-nav_2.entry.js +5 -5
- package/dist/esm/ion-picker-column-option.entry.js +1 -1
- package/dist/esm/ion-picker-column.entry.js +1 -1
- package/dist/esm/ion-picker.entry.js +1 -1
- package/dist/esm/ion-popover.entry.js +5 -5
- package/dist/esm/ion-progress-bar.entry.js +1 -1
- package/dist/esm/ion-radio_2.entry.js +1 -1
- package/dist/esm/ion-range.entry.js +3 -3
- package/dist/esm/ion-refresher_2.entry.js +4 -4
- package/dist/esm/ion-reorder_2.entry.js +4 -4
- package/dist/esm/ion-route_4.entry.js +1 -1
- package/dist/esm/ion-searchbar.entry.js +2 -2
- package/dist/esm/ion-segment_2.entry.js +40 -9
- package/dist/esm/ion-select-modal.entry.js +4 -4
- package/dist/esm/ion-select_3.entry.js +46 -20
- package/dist/esm/ion-tab-bar_2.entry.js +1 -1
- package/dist/esm/ion-tab_2.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +4 -4
- package/dist/esm/ion-toast.entry.js +4 -4
- package/dist/esm/ion-toggle.entry.js +6 -7
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/{ios.transition-b1da3753.js → ios.transition-085853ff.js} +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{md.transition-571b3859.js → md.transition-33826623.js} +3 -3
- package/dist/esm/{notch-controller-55b09e11.js → notch-controller-3dc61260.js} +1 -1
- package/dist/esm/{overlays-5deab4de.js → overlays-e3d0d356.js} +3 -3
- package/dist/esm/{status-tap-79eac0ac.js → status-tap-163e8128.js} +3 -4
- package/dist/esm/{swipe-back-e5394307.js → swipe-back-23ee7ab1.js} +1 -1
- package/dist/esm-es5/{data-b3284b5e.js → data-ae11fd43.js} +1 -1
- package/dist/esm-es5/{framework-delegate-63d1a679.js → framework-delegate-f683816e.js} +1 -1
- package/dist/esm-es5/{helpers-da915de8.js → helpers-9b49d7d2.js} +1 -1
- package/dist/esm-es5/{index-e2cf2ceb.js → index-10f4ed65.js} +1 -1
- package/dist/esm-es5/{index-efb8ecdf.js → index-33f7e3ff.js} +1 -1
- package/dist/esm-es5/{index-79b30591.js → index-5a0f5fd0.js} +1 -1
- package/dist/esm-es5/{index-2f7fde3d.js → index-7ec5519a.js} +1 -1
- package/dist/esm-es5/{index-cb21eccb.js → index-8785a9c6.js} +1 -1
- package/dist/esm-es5/index-9b0d46f4.js +4 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/input-shims-0e65111b.js +4 -0
- package/dist/esm-es5/{input.utils-961c9f17.js → input.utils-1ad8dafc.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-back-button.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-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-password-toggle.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-option.entry.js +1 -1
- package/dist/esm-es5/ion-picker-column.entry.js +1 -1
- package/dist/esm-es5/ion-picker.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-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-modal.entry.js +1 -1
- package/dist/esm-es5/ion-select_3.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-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.js +1 -1
- package/dist/esm-es5/{ios.transition-b1da3753.js → ios.transition-085853ff.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/md.transition-33826623.js +4 -0
- package/dist/esm-es5/{notch-controller-55b09e11.js → notch-controller-3dc61260.js} +1 -1
- package/dist/esm-es5/{overlays-5deab4de.js → overlays-e3d0d356.js} +1 -1
- package/dist/esm-es5/status-tap-163e8128.js +4 -0
- package/dist/esm-es5/{swipe-back-e5394307.js → swipe-back-23ee7ab1.js} +1 -1
- package/dist/html.html-data.json +0 -24
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-f1c4dcd4.js → p-02e1ebd9.js} +1 -1
- package/dist/ionic/{p-937a7e21.entry.js → p-02e23f26.entry.js} +1 -1
- package/dist/ionic/{p-15e76dd1.entry.js → p-03ee25cb.entry.js} +1 -1
- package/dist/ionic/p-06fee233.js +4 -0
- package/dist/ionic/p-075a94bd.js +4 -0
- package/dist/ionic/{p-8cfba7e9.system.entry.js → p-085a5dd6.system.entry.js} +1 -1
- package/dist/ionic/p-0a59f4fa.entry.js +4 -0
- package/dist/ionic/p-0e43be1b.entry.js +4 -0
- package/dist/ionic/{p-7ed1657c.system.entry.js → p-0eb2553a.system.entry.js} +1 -1
- package/dist/ionic/p-0ee3b5a2.system.js +4 -0
- package/dist/ionic/{p-2b838f86.system.entry.js → p-0f191cbe.system.entry.js} +1 -1
- package/dist/ionic/p-135e5731.js +4 -0
- package/dist/ionic/{p-b6efeab8.js → p-13dc21b0.js} +1 -1
- package/dist/ionic/{p-9b428d25.entry.js → p-1693cbc4.entry.js} +1 -1
- package/dist/ionic/{p-567de071.system.entry.js → p-17ba2b14.system.entry.js} +1 -1
- package/dist/ionic/{p-a88dec0d.system.js → p-1a790eef.system.js} +2 -2
- package/dist/ionic/{p-a0eb506c.system.entry.js → p-1bc65aec.system.entry.js} +1 -1
- package/dist/ionic/p-1f405274.js +4 -0
- package/dist/ionic/{p-120fb79a.entry.js → p-203633d1.entry.js} +1 -1
- package/dist/ionic/{p-9f364443.system.entry.js → p-23b73db1.system.entry.js} +1 -1
- package/dist/ionic/p-25fa1d30.system.entry.js +4 -0
- package/dist/ionic/{p-f1060cd8.entry.js → p-26194519.entry.js} +1 -1
- package/dist/ionic/{p-de930745.entry.js → p-265939f0.entry.js} +1 -1
- package/dist/ionic/{p-16188af7.entry.js → p-2aebc4a0.entry.js} +1 -1
- package/dist/ionic/{p-34b11c24.js → p-2bc73fb5.js} +1 -1
- package/dist/ionic/p-2c9eb774.system.js +4 -0
- package/dist/ionic/{p-1e67b266.system.entry.js → p-2cf2db18.system.entry.js} +1 -1
- package/dist/ionic/{p-2e46590d.system.entry.js → p-2ef3c7ee.system.entry.js} +1 -1
- package/dist/ionic/p-322c5fb4.system.js +1 -1
- package/dist/ionic/{p-1e955a45.system.js → p-32be7b07.system.js} +1 -1
- package/dist/ionic/{p-f63c2d12.entry.js → p-32e99b0a.entry.js} +1 -1
- package/dist/ionic/{p-61db139d.entry.js → p-337a61d5.entry.js} +1 -1
- package/dist/ionic/{p-c4238c12.system.js → p-340e3f24.system.js} +1 -1
- package/dist/ionic/{p-a090bce8.system.entry.js → p-3572f86a.system.entry.js} +1 -1
- package/dist/ionic/{p-ab674093.system.entry.js → p-3df889b3.system.entry.js} +1 -1
- package/dist/ionic/{p-05b74e45.system.entry.js → p-3eaf1444.system.entry.js} +1 -1
- package/dist/ionic/{p-1ab13b2b.js → p-42808996.js} +1 -1
- package/dist/ionic/{p-744c8672.system.entry.js → p-4346c79d.system.entry.js} +1 -1
- package/dist/ionic/{p-a15ddedb.system.js → p-4452a8ac.system.js} +1 -1
- package/dist/ionic/{p-63b0abde.system.entry.js → p-45accc62.system.entry.js} +1 -1
- package/dist/ionic/{p-b1eb86fd.entry.js → p-45de8d2a.entry.js} +1 -1
- package/dist/ionic/p-48a8d9b4.system.entry.js +4 -0
- package/dist/ionic/{p-52d7a191.entry.js → p-4ad78edc.entry.js} +1 -1
- package/dist/ionic/{p-2da9c8a7.entry.js → p-4c252070.entry.js} +1 -1
- package/dist/ionic/{p-19ea7bff.system.js → p-5126cf1e.system.js} +1 -1
- package/dist/ionic/{p-cb13696c.js → p-51dec25d.js} +1 -1
- package/dist/ionic/{p-bdf2cb2e.system.entry.js → p-551e8ff7.system.entry.js} +1 -1
- package/dist/ionic/{p-933727f9.system.entry.js → p-561ddcd4.system.entry.js} +2 -2
- package/dist/ionic/p-56da53ad.system.entry.js +4 -0
- package/dist/ionic/{p-948e6c6a.entry.js → p-57379000.entry.js} +1 -1
- package/dist/ionic/{p-e06057c9.entry.js → p-57ceead7.entry.js} +1 -1
- package/dist/ionic/{p-6d6cedc5.entry.js → p-6190d0d6.entry.js} +1 -1
- package/dist/ionic/p-68dc53a5.js +4 -0
- package/dist/ionic/{p-74e3f0af.system.entry.js → p-697b4a5e.system.entry.js} +2 -2
- package/dist/ionic/{p-248318e0.system.entry.js → p-6a2d9764.system.entry.js} +1 -1
- package/dist/ionic/{p-15d18206.entry.js → p-702caed7.entry.js} +1 -1
- package/dist/ionic/{p-7ddc46c3.system.entry.js → p-70ccc275.system.entry.js} +1 -1
- package/dist/ionic/{p-98ff6b32.entry.js → p-76446a85.entry.js} +1 -1
- package/dist/ionic/{p-2346ab53.system.entry.js → p-77036bbd.system.entry.js} +1 -1
- package/dist/ionic/{p-98231c01.system.entry.js → p-77e7b7b6.system.entry.js} +1 -1
- package/dist/ionic/{p-72812e99.js → p-7a1766d6.js} +1 -1
- package/dist/ionic/{p-cba1f9bc.system.entry.js → p-7b96e5c1.system.entry.js} +1 -1
- package/dist/ionic/{p-7b9a2b23.entry.js → p-7bac3d83.entry.js} +1 -1
- package/dist/ionic/{p-9df2c6fb.entry.js → p-7c1f8b94.entry.js} +1 -1
- package/dist/ionic/{p-8694928f.entry.js → p-803f0bc2.entry.js} +1 -1
- package/dist/ionic/p-83810019.entry.js +4 -0
- package/dist/ionic/{p-7a6eaf9e.entry.js → p-85fee58d.entry.js} +1 -1
- package/dist/ionic/{p-d22e2a38.system.js → p-881d9e52.system.js} +1 -1
- package/dist/ionic/{p-9b122e3c.system.entry.js → p-8922be26.system.entry.js} +1 -1
- package/dist/ionic/p-8a836849.entry.js +4 -0
- package/dist/ionic/p-8d5472fb.entry.js +4 -0
- package/dist/ionic/{p-e09d6392.system.entry.js → p-91f17b25.system.entry.js} +2 -2
- package/dist/ionic/{p-d7aa6b00.entry.js → p-955c3eb8.entry.js} +1 -1
- package/dist/ionic/{p-8635f5e6.system.js → p-95da3ae2.system.js} +1 -1
- package/dist/ionic/{p-b9d7015f.entry.js → p-9b3bb24e.entry.js} +1 -1
- package/dist/ionic/{p-d6eaffb1.system.entry.js → p-9be5f3ee.system.entry.js} +2 -2
- package/dist/ionic/{p-5c08627a.system.js → p-9eee4de1.system.js} +1 -1
- package/dist/ionic/{p-cac0e0b3.system.entry.js → p-a0f3846e.system.entry.js} +1 -1
- package/dist/ionic/{p-7de1e42c.system.js → p-a2b6dd57.system.js} +1 -1
- package/dist/ionic/{p-6933c482.system.entry.js → p-a4575db1.system.entry.js} +1 -1
- package/dist/ionic/{p-01186920.system.entry.js → p-a9e24ae2.system.entry.js} +1 -1
- package/dist/ionic/{p-0eb35a7f.system.js → p-aa63b365.system.js} +1 -1
- package/dist/ionic/p-af09741c.entry.js +4 -0
- package/dist/ionic/{p-a8f2c254.entry.js → p-b0d8bbee.entry.js} +1 -1
- package/dist/ionic/{p-3ad285e3.system.js → p-b3680e2f.system.js} +1 -1
- package/dist/ionic/p-b7433d7d.js +4 -0
- package/dist/ionic/{p-585b455c.system.entry.js → p-b91acf8d.system.entry.js} +1 -1
- package/dist/ionic/{p-b51e4004.js → p-bb11d9fb.js} +1 -1
- package/dist/ionic/{p-ada36597.system.js → p-c1b51537.system.js} +1 -1
- package/dist/ionic/{p-bb0db172.entry.js → p-c32644d7.entry.js} +1 -1
- package/dist/ionic/{p-c41ac815.entry.js → p-c8d645b3.entry.js} +1 -1
- package/dist/ionic/{p-5c9eb9af.entry.js → p-cc700b6b.entry.js} +1 -1
- package/dist/ionic/{p-3cc276f4.js → p-d4ca0475.js} +1 -1
- package/dist/ionic/{p-1a5bc5f7.js → p-d60342e3.js} +1 -1
- package/dist/ionic/{p-081a4ce4.entry.js → p-d9b3fa7e.entry.js} +1 -1
- package/dist/ionic/{p-58d5df0c.system.entry.js → p-da8ef548.system.entry.js} +1 -1
- package/dist/ionic/{p-985a7e17.system.entry.js → p-dc146a2a.system.entry.js} +1 -1
- package/dist/ionic/p-df862603.entry.js +4 -0
- package/dist/ionic/{p-eef505e8.entry.js → p-e1bbacb7.entry.js} +1 -1
- package/dist/ionic/{p-302b50bb.system.entry.js → p-e265ae18.system.entry.js} +1 -1
- package/dist/ionic/{p-2172893e.system.entry.js → p-e2e19375.system.entry.js} +1 -1
- package/dist/ionic/p-e308de5b.system.js +4 -0
- package/dist/ionic/{p-a4a2420e.system.entry.js → p-e456ee59.system.entry.js} +1 -1
- package/dist/ionic/{p-da2b833b.js → p-e6200d13.js} +1 -1
- package/dist/ionic/{p-b3c60433.system.js → p-e8232807.system.js} +1 -1
- package/dist/ionic/{p-f1120724.system.entry.js → p-e8aed00f.system.entry.js} +1 -1
- package/dist/ionic/{p-fceec762.entry.js → p-e97a3f44.entry.js} +1 -1
- package/dist/ionic/{p-89bf08c7.entry.js → p-ed882fb1.entry.js} +1 -1
- package/dist/ionic/{p-6dfb0f39.system.entry.js → p-f2c19415.system.entry.js} +1 -1
- package/dist/ionic/{p-e4ee80be.system.entry.js → p-f301a694.system.entry.js} +1 -1
- package/dist/ionic/{p-7a02f476.entry.js → p-f3269679.entry.js} +1 -1
- package/dist/ionic/{p-92763d3d.entry.js → p-f4066aa9.entry.js} +1 -1
- package/dist/ionic/{p-e76dae93.entry.js → p-f42743d1.entry.js} +1 -1
- package/dist/ionic/{p-28706c6f.js → p-f5035354.js} +1 -1
- package/dist/ionic/{p-343b6b1d.system.js → p-f687573e.system.js} +1 -1
- package/dist/ionic/{p-797eeea8.system.entry.js → p-f78af648.system.entry.js} +1 -1
- package/dist/ionic/p-ff4b7e40.system.js +4 -0
- package/dist/ionic/{p-fbd41a7e.system.entry.js → p-ffc48bc5.system.entry.js} +1 -1
- package/dist/ionic/svg/accessibility-outline.svg +1 -1
- package/dist/ionic/svg/accessibility-sharp.svg +1 -1
- package/dist/ionic/svg/accessibility.svg +1 -1
- package/dist/ionic/svg/arrow-down-left-box-outline.svg +1 -0
- package/dist/ionic/svg/arrow-down-left-box-sharp.svg +1 -0
- package/dist/ionic/svg/arrow-down-left-box.svg +1 -0
- package/dist/ionic/svg/arrow-down-right-box-outline.svg +1 -0
- package/dist/ionic/svg/arrow-down-right-box-sharp.svg +1 -0
- package/dist/ionic/svg/arrow-down-right-box.svg +1 -0
- package/dist/ionic/svg/arrow-up-left-box-outline.svg +1 -0
- package/dist/ionic/svg/arrow-up-left-box-sharp.svg +1 -0
- package/dist/ionic/svg/arrow-up-left-box.svg +1 -0
- package/dist/ionic/svg/arrow-up-right-box-outline.svg +1 -0
- package/dist/ionic/svg/arrow-up-right-box-sharp.svg +1 -0
- package/dist/ionic/svg/arrow-up-right-box.svg +1 -0
- package/dist/ionic/svg/bag-add-outline.svg +1 -1
- package/dist/ionic/svg/bag-add-sharp.svg +1 -1
- package/dist/ionic/svg/bag-add.svg +1 -1
- package/dist/ionic/svg/bag-check-outline.svg +1 -1
- package/dist/ionic/svg/bag-check-sharp.svg +1 -1
- package/dist/ionic/svg/bag-check.svg +1 -1
- package/dist/ionic/svg/bag-handle-outline.svg +1 -1
- package/dist/ionic/svg/bag-handle-sharp.svg +1 -1
- package/dist/ionic/svg/bag-handle.svg +1 -1
- package/dist/ionic/svg/bag-outline.svg +1 -1
- package/dist/ionic/svg/bag-remove-outline.svg +1 -1
- package/dist/ionic/svg/bag-remove-sharp.svg +1 -1
- package/dist/ionic/svg/bag-remove.svg +1 -1
- package/dist/ionic/svg/bag-sharp.svg +1 -1
- package/dist/ionic/svg/bag.svg +1 -1
- package/dist/ionic/svg/balloon-outline.svg +1 -1
- package/dist/ionic/svg/balloon-sharp.svg +1 -1
- package/dist/ionic/svg/balloon.svg +1 -1
- package/dist/ionic/svg/ban-outline.svg +1 -1
- package/dist/ionic/svg/ban-sharp.svg +1 -1
- package/dist/ionic/svg/ban.svg +1 -1
- package/dist/ionic/svg/binoculars-outline.svg +1 -0
- package/dist/ionic/svg/binoculars-sharp.svg +1 -0
- package/dist/ionic/svg/binoculars.svg +1 -0
- package/dist/ionic/svg/body-outline.svg +1 -1
- package/dist/ionic/svg/bowling-ball-outline.svg +1 -1
- package/dist/ionic/svg/bowling-ball-sharp.svg +1 -1
- package/dist/ionic/svg/bowling-ball.svg +1 -1
- package/dist/ionic/svg/calendar-clear-outline.svg +1 -1
- package/dist/ionic/svg/calendar-clear-sharp.svg +1 -1
- package/dist/ionic/svg/calendar-clear.svg +1 -1
- package/dist/ionic/svg/calendar-number-outline.svg +1 -1
- package/dist/ionic/svg/calendar-number-sharp.svg +1 -1
- package/dist/ionic/svg/calendar-number.svg +1 -1
- package/dist/ionic/svg/calendar-outline.svg +1 -1
- package/dist/ionic/svg/calendar-sharp.svg +1 -1
- package/dist/ionic/svg/calendar.svg +1 -1
- package/dist/ionic/svg/chevron-collapse-outline.svg +1 -1
- package/dist/ionic/svg/chevron-collapse-sharp.svg +1 -1
- package/dist/ionic/svg/chevron-collapse.svg +1 -1
- package/dist/ionic/svg/chevron-expand-outline.svg +1 -1
- package/dist/ionic/svg/chevron-expand-sharp.svg +1 -1
- package/dist/ionic/svg/chevron-expand.svg +1 -1
- package/dist/ionic/svg/color-wand-outline.svg +1 -1
- package/dist/ionic/svg/color-wand.svg +1 -1
- package/dist/ionic/svg/diamond-outline.svg +1 -1
- package/dist/ionic/svg/diamond-sharp.svg +1 -1
- package/dist/ionic/svg/diamond.svg +1 -1
- package/dist/ionic/svg/dice-outline.svg +1 -1
- package/dist/ionic/svg/dice-sharp.svg +1 -1
- package/dist/ionic/svg/dice.svg +1 -1
- package/dist/ionic/svg/document-lock-outline.svg +1 -1
- package/dist/ionic/svg/document-lock-sharp.svg +1 -1
- package/dist/ionic/svg/document-lock.svg +1 -1
- package/dist/ionic/svg/extension-puzzle-outline.svg +1 -1
- package/dist/ionic/svg/extension-puzzle-sharp.svg +1 -1
- package/dist/ionic/svg/extension-puzzle.svg +1 -1
- package/dist/ionic/svg/filter-circle-outline.svg +1 -1
- package/dist/ionic/svg/filter-circle-sharp.svg +1 -1
- package/dist/ionic/svg/filter-circle.svg +1 -1
- package/dist/ionic/svg/fish-outline.svg +1 -1
- package/dist/ionic/svg/fish-sharp.svg +1 -1
- package/dist/ionic/svg/fish.svg +1 -1
- package/dist/ionic/svg/footsteps-outline.svg +1 -1
- package/dist/ionic/svg/footsteps-sharp.svg +1 -1
- package/dist/ionic/svg/footsteps.svg +1 -1
- package/dist/ionic/svg/id-card-outline.svg +1 -1
- package/dist/ionic/svg/id-card-sharp.svg +1 -1
- package/dist/ionic/svg/id-card.svg +1 -1
- package/dist/ionic/svg/invert-mode-outline.svg +1 -1
- package/dist/ionic/svg/invert-mode-sharp.svg +1 -1
- package/dist/ionic/svg/invert-mode.svg +1 -1
- package/dist/ionic/svg/logo-alipay.svg +1 -1
- package/dist/ionic/svg/logo-android.svg +1 -1
- package/dist/ionic/svg/logo-appflow.svg +1 -0
- package/dist/ionic/svg/logo-apple-ar.svg +1 -1
- package/dist/ionic/svg/logo-behance.svg +1 -1
- package/dist/ionic/svg/logo-bitbucket.svg +1 -1
- package/dist/ionic/svg/logo-deviantart.svg +1 -1
- package/dist/ionic/svg/logo-discord.svg +1 -1
- package/dist/ionic/svg/logo-docker.svg +1 -1
- package/dist/ionic/svg/logo-edge.svg +1 -1
- package/dist/ionic/svg/logo-facebook.svg +1 -1
- package/dist/ionic/svg/logo-figma.svg +1 -1
- package/dist/ionic/svg/logo-firebase.svg +1 -1
- package/dist/ionic/svg/logo-gitlab.svg +1 -1
- package/dist/ionic/svg/logo-ionic.svg +1 -1
- package/dist/ionic/svg/logo-mastodon.svg +1 -1
- package/dist/ionic/svg/logo-medium.svg +1 -1
- package/dist/ionic/svg/logo-microsoft.svg +1 -1
- package/dist/ionic/svg/logo-npm.svg +1 -1
- package/dist/ionic/svg/logo-paypal.svg +1 -1
- package/dist/ionic/svg/logo-soundcloud.svg +1 -1
- package/dist/ionic/svg/logo-tableau.svg +1 -1
- package/dist/ionic/svg/logo-tiktok.svg +1 -1
- package/dist/ionic/svg/logo-trapeze.svg +1 -0
- package/dist/ionic/svg/logo-venmo.svg +1 -1
- package/dist/ionic/svg/logo-vercel.svg +1 -1
- package/dist/ionic/svg/logo-wechat.svg +1 -1
- package/dist/ionic/svg/logo-x.svg +1 -0
- package/dist/ionic/svg/logo-yahoo.svg +1 -1
- package/dist/ionic/svg/prism-outline.svg +1 -1
- package/dist/ionic/svg/prism-sharp.svg +1 -1
- package/dist/ionic/svg/prism.svg +1 -1
- package/dist/ionic/svg/scale-outline.svg +1 -1
- package/dist/ionic/svg/scale-sharp.svg +1 -1
- package/dist/ionic/svg/scale.svg +1 -1
- package/dist/ionic/svg/server-outline.svg +1 -1
- package/dist/ionic/svg/server-sharp.svg +1 -1
- package/dist/ionic/svg/server.svg +1 -1
- package/dist/ionic/svg/shield-half-outline.svg +1 -1
- package/dist/ionic/svg/shield-half-sharp.svg +1 -1
- package/dist/ionic/svg/shield-half.svg +1 -1
- package/dist/ionic/svg/sparkles-outline.svg +1 -1
- package/dist/ionic/svg/sparkles-sharp.svg +1 -1
- package/dist/ionic/svg/sparkles.svg +1 -1
- package/dist/ionic/svg/storefront-outline.svg +1 -1
- package/dist/ionic/svg/storefront-sharp.svg +1 -1
- package/dist/ionic/svg/storefront.svg +1 -1
- package/dist/ionic/svg/telescope-outline.svg +1 -1
- package/dist/ionic/svg/telescope-sharp.svg +1 -1
- package/dist/ionic/svg/telescope.svg +1 -1
- package/dist/ionic/svg/ticket-outline.svg +1 -1
- package/dist/ionic/svg/ticket-sharp.svg +1 -1
- package/dist/ionic/svg/ticket.svg +1 -1
- package/dist/ionic/svg/today-outline.svg +1 -1
- package/dist/ionic/svg/today-sharp.svg +1 -1
- package/dist/ionic/svg/today.svg +1 -1
- package/dist/ionic/svg/unlink-outline.svg +1 -1
- package/dist/ionic/svg/unlink-sharp.svg +1 -1
- package/dist/ionic/svg/unlink.svg +1 -1
- package/dist/ionic/svg/videocam-off-outline.svg +1 -1
- package/dist/ionic/svg/videocam-off-sharp.svg +1 -1
- package/dist/ionic/svg/videocam-off.svg +1 -1
- package/dist/ionic/svg/wifi-outline.svg +1 -1
- package/dist/ionic/svg/wifi-sharp.svg +1 -1
- package/dist/ionic/svg/wifi.svg +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +0 -25
- package/dist/types/components/modal/animations/sheet.d.ts +0 -1
- package/dist/types/components/modal/gestures/sheet.d.ts +1 -1
- package/dist/types/components/modal/modal-interface.d.ts +0 -1
- package/dist/types/components/modal/modal.d.ts +0 -11
- package/dist/types/components/segment-button/segment-button.d.ts +2 -1
- package/dist/types/components/select/select.d.ts +0 -6
- package/dist/types/components/toggle/toggle.d.ts +0 -6
- package/dist/types/components/toolbar/toolbar.d.ts +0 -4
- package/dist/types/components.d.ts +0 -48
- package/dist/types/utils/config.d.ts +0 -9
- package/dist/types/utils/helpers.d.ts +1 -0
- package/dist/types/utils/logging/index.d.ts +1 -13
- package/hydrate/index.js +141 -348
- package/hydrate/index.mjs +141 -348
- package/package.json +5 -5
- package/dist/esm-es5/index-6ad967f3.js +0 -4
- package/dist/esm-es5/input-shims-2fd7c6ef.js +0 -4
- package/dist/esm-es5/md.transition-571b3859.js +0 -4
- package/dist/esm-es5/status-tap-79eac0ac.js +0 -4
- package/dist/ionic/p-0430c2e0.entry.js +0 -4
- package/dist/ionic/p-0af823e1.js +0 -4
- package/dist/ionic/p-1132ffee.entry.js +0 -4
- package/dist/ionic/p-4c2d5b80.system.js +0 -4
- package/dist/ionic/p-4c98e2cf.system.js +0 -4
- package/dist/ionic/p-4ec778aa.entry.js +0 -4
- package/dist/ionic/p-577bc414.entry.js +0 -4
- package/dist/ionic/p-67222c16.system.js +0 -4
- package/dist/ionic/p-72bc8a1c.js +0 -4
- package/dist/ionic/p-7513b0c4.js +0 -4
- package/dist/ionic/p-9343a445.js +0 -4
- package/dist/ionic/p-a3db8ee3.js +0 -4
- package/dist/ionic/p-c4b53b16.system.entry.js +0 -4
- package/dist/ionic/p-cdc83025.entry.js +0 -4
- package/dist/ionic/p-d1c5b60e.system.js +0 -4
- package/dist/ionic/p-d7dd8fb1.entry.js +0 -4
- package/dist/ionic/p-e3171ff3.entry.js +0 -4
- package/dist/ionic/p-e4fde4fb.system.entry.js +0 -4
- package/dist/ionic/p-e6376b93.system.entry.js +0 -4
- package/dist/ionic/p-e8d56122.js +0 -4
|
@@ -7,7 +7,7 @@ import { clamp, raf, getElementRoot } from "../../../utils/helpers";
|
|
|
7
7
|
import { FOCUS_TRAP_DISABLE_CLASS } from "../../../utils/overlays";
|
|
8
8
|
import { getBackdropValueForSheet } from "../utils";
|
|
9
9
|
import { calculateSpringStep, handleCanDismiss } from "./utils";
|
|
10
|
-
export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [],
|
|
10
|
+
export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], getCurrentBreakpoint, onDismiss, onBreakpointChange) => {
|
|
11
11
|
// Defaults for the sheet swipe animation
|
|
12
12
|
const defaultBackdrop = [
|
|
13
13
|
{ offset: 0, opacity: 'var(--backdrop-opacity)' },
|
|
@@ -24,10 +24,6 @@ export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpo
|
|
|
24
24
|
{ offset: 1, transform: 'translateY(100%)' },
|
|
25
25
|
],
|
|
26
26
|
BACKDROP_KEYFRAMES: backdropBreakpoint !== 0 ? customBackdrop : defaultBackdrop,
|
|
27
|
-
CONTENT_KEYFRAMES: [
|
|
28
|
-
{ offset: 0, maxHeight: '100%' },
|
|
29
|
-
{ offset: 1, maxHeight: '0%' },
|
|
30
|
-
],
|
|
31
27
|
};
|
|
32
28
|
const contentEl = baseEl.querySelector('ion-content');
|
|
33
29
|
const height = wrapperEl.clientHeight;
|
|
@@ -35,11 +31,10 @@ export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpo
|
|
|
35
31
|
let offset = 0;
|
|
36
32
|
let canDismissBlocksGesture = false;
|
|
37
33
|
const canDismissMaxStep = 0.95;
|
|
38
|
-
const maxBreakpoint = breakpoints[breakpoints.length - 1];
|
|
39
|
-
const minBreakpoint = breakpoints[0];
|
|
40
34
|
const wrapperAnimation = animation.childAnimations.find((ani) => ani.id === 'wrapperAnimation');
|
|
41
35
|
const backdropAnimation = animation.childAnimations.find((ani) => ani.id === 'backdropAnimation');
|
|
42
|
-
const
|
|
36
|
+
const maxBreakpoint = breakpoints[breakpoints.length - 1];
|
|
37
|
+
const minBreakpoint = breakpoints[0];
|
|
43
38
|
const enableBackdrop = () => {
|
|
44
39
|
baseEl.style.setProperty('pointer-events', 'auto');
|
|
45
40
|
backdropEl.style.setProperty('pointer-events', 'auto');
|
|
@@ -62,31 +57,6 @@ export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpo
|
|
|
62
57
|
*/
|
|
63
58
|
baseEl.classList.add(FOCUS_TRAP_DISABLE_CLASS);
|
|
64
59
|
};
|
|
65
|
-
/**
|
|
66
|
-
* Toggles the visible modal footer when `expandToScroll` is disabled.
|
|
67
|
-
* @param footer The footer to show.
|
|
68
|
-
*/
|
|
69
|
-
const swapFooterVisibility = (footer) => {
|
|
70
|
-
const originalFooter = baseEl.querySelector('ion-footer');
|
|
71
|
-
if (!originalFooter) {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
const clonedFooter = wrapperEl.nextElementSibling;
|
|
75
|
-
const footerToHide = footer === 'original' ? clonedFooter : originalFooter;
|
|
76
|
-
const footerToShow = footer === 'original' ? originalFooter : clonedFooter;
|
|
77
|
-
footerToShow.style.removeProperty('display');
|
|
78
|
-
footerToShow.removeAttribute('aria-hidden');
|
|
79
|
-
const page = baseEl.querySelector('.ion-page');
|
|
80
|
-
if (footer === 'original') {
|
|
81
|
-
page.style.removeProperty('padding-bottom');
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
const pagePadding = footerToShow.clientHeight;
|
|
85
|
-
page.style.setProperty('padding-bottom', `${pagePadding}px`);
|
|
86
|
-
}
|
|
87
|
-
footerToHide.style.setProperty('display', 'none');
|
|
88
|
-
footerToHide.setAttribute('aria-hidden', 'true');
|
|
89
|
-
};
|
|
90
60
|
/**
|
|
91
61
|
* After the entering animation completes,
|
|
92
62
|
* we need to set the animation to go from
|
|
@@ -98,7 +68,6 @@ export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpo
|
|
|
98
68
|
if (wrapperAnimation && backdropAnimation) {
|
|
99
69
|
wrapperAnimation.keyframes([...SheetDefaults.WRAPPER_KEYFRAMES]);
|
|
100
70
|
backdropAnimation.keyframes([...SheetDefaults.BACKDROP_KEYFRAMES]);
|
|
101
|
-
contentAnimation === null || contentAnimation === void 0 ? void 0 : contentAnimation.keyframes([...SheetDefaults.CONTENT_KEYFRAMES]);
|
|
102
71
|
animation.progressStart(true, 1 - currentBreakpoint);
|
|
103
72
|
/**
|
|
104
73
|
* If backdrop is not enabled, then content
|
|
@@ -115,7 +84,7 @@ export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpo
|
|
|
115
84
|
disableBackdrop();
|
|
116
85
|
}
|
|
117
86
|
}
|
|
118
|
-
if (contentEl && currentBreakpoint !== maxBreakpoint
|
|
87
|
+
if (contentEl && currentBreakpoint !== maxBreakpoint) {
|
|
119
88
|
contentEl.scrollY = false;
|
|
120
89
|
}
|
|
121
90
|
const canStart = (detail) => {
|
|
@@ -129,13 +98,6 @@ export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpo
|
|
|
129
98
|
*/
|
|
130
99
|
const contentEl = findClosestIonContent(detail.event.target);
|
|
131
100
|
currentBreakpoint = getCurrentBreakpoint();
|
|
132
|
-
/**
|
|
133
|
-
* If we have expandToScroll disabled, we should not allow the swipe gesture to start
|
|
134
|
-
* if the content is being swiped.
|
|
135
|
-
*/
|
|
136
|
-
if (!expandToScroll && contentEl) {
|
|
137
|
-
return false;
|
|
138
|
-
}
|
|
139
101
|
if (currentBreakpoint === 1 && contentEl) {
|
|
140
102
|
/**
|
|
141
103
|
* The modal should never swipe to close on the content with a refresher.
|
|
@@ -166,15 +128,6 @@ export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpo
|
|
|
166
128
|
* Remove undefined check
|
|
167
129
|
*/
|
|
168
130
|
canDismissBlocksGesture = baseEl.canDismiss !== undefined && baseEl.canDismiss !== true && minBreakpoint === 0;
|
|
169
|
-
/**
|
|
170
|
-
* If expandToScroll is disabled, we need to swap
|
|
171
|
-
* the footer visibility to the original, so if the modal
|
|
172
|
-
* is dismissed, the footer dismisses with the modal
|
|
173
|
-
* and doesn't stay on the screen after the modal is gone.
|
|
174
|
-
*/
|
|
175
|
-
if (!expandToScroll) {
|
|
176
|
-
swapFooterVisibility('original');
|
|
177
|
-
}
|
|
178
131
|
/**
|
|
179
132
|
* If we are pulling down, then it is possible we are pulling on the content.
|
|
180
133
|
* We do not want scrolling to happen at the same time as the gesture.
|
|
@@ -290,19 +243,6 @@ export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpo
|
|
|
290
243
|
opacity: `calc(var(--backdrop-opacity) * ${getBackdropValueForSheet(snapToBreakpoint, backdropBreakpoint)})`,
|
|
291
244
|
},
|
|
292
245
|
]);
|
|
293
|
-
if (contentAnimation) {
|
|
294
|
-
/**
|
|
295
|
-
* The modal content should scroll at any breakpoint when expandToScroll
|
|
296
|
-
* is disabled. In order to do this, the content needs to be completely
|
|
297
|
-
* viewable so scrolling can access everything. Otherwise, the default
|
|
298
|
-
* behavior would show the content off the screen and only allow
|
|
299
|
-
* scrolling when the sheet is fully expanded.
|
|
300
|
-
*/
|
|
301
|
-
contentAnimation.keyframes([
|
|
302
|
-
{ offset: 0, maxHeight: `${(1 - breakpointOffset) * 100}%` },
|
|
303
|
-
{ offset: 1, maxHeight: `${snapToBreakpoint * 100}%` },
|
|
304
|
-
]);
|
|
305
|
-
}
|
|
306
246
|
animation.progressStep(0);
|
|
307
247
|
}
|
|
308
248
|
/**
|
|
@@ -310,14 +250,6 @@ export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpo
|
|
|
310
250
|
* snapping animation completes.
|
|
311
251
|
*/
|
|
312
252
|
gesture.enable(false);
|
|
313
|
-
/**
|
|
314
|
-
* If expandToScroll is disabled, we need to swap
|
|
315
|
-
* the footer visibility to the cloned one so the footer
|
|
316
|
-
* doesn't flicker when the sheet's height is animated.
|
|
317
|
-
*/
|
|
318
|
-
if (!expandToScroll && shouldRemainOpen) {
|
|
319
|
-
swapFooterVisibility('cloned');
|
|
320
|
-
}
|
|
321
253
|
if (shouldPreventDismiss) {
|
|
322
254
|
handleCanDismiss(baseEl, animation);
|
|
323
255
|
}
|
|
@@ -325,13 +257,13 @@ export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpo
|
|
|
325
257
|
onDismiss();
|
|
326
258
|
}
|
|
327
259
|
/**
|
|
328
|
-
*
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
*
|
|
332
|
-
* released, so we align with that
|
|
260
|
+
* If the sheet is going to be fully expanded then we should enable
|
|
261
|
+
* scrolling immediately. The sheet modal animation takes ~500ms to finish
|
|
262
|
+
* so if we wait until then there is a visible delay for when scrolling is
|
|
263
|
+
* re-enabled. Native iOS allows for scrolling on the sheet modal as soon
|
|
264
|
+
* as the gesture is released, so we align with that.
|
|
333
265
|
*/
|
|
334
|
-
if (contentEl &&
|
|
266
|
+
if (contentEl && snapToBreakpoint === breakpoints[breakpoints.length - 1]) {
|
|
335
267
|
contentEl.scrollY = true;
|
|
336
268
|
}
|
|
337
269
|
return new Promise((resolve) => {
|
|
@@ -349,7 +281,6 @@ export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpo
|
|
|
349
281
|
raf(() => {
|
|
350
282
|
wrapperAnimation.keyframes([...SheetDefaults.WRAPPER_KEYFRAMES]);
|
|
351
283
|
backdropAnimation.keyframes([...SheetDefaults.BACKDROP_KEYFRAMES]);
|
|
352
|
-
contentAnimation === null || contentAnimation === void 0 ? void 0 : contentAnimation.keyframes([...SheetDefaults.CONTENT_KEYFRAMES]);
|
|
353
284
|
animation.progressStart(true, 1 - snapToBreakpoint);
|
|
354
285
|
currentBreakpoint = snapToBreakpoint;
|
|
355
286
|
onBreakpointChange(currentBreakpoint);
|
|
@@ -201,12 +201,6 @@ ion-backdrop {
|
|
|
201
201
|
bottom: 0;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
:host(.modal-sheet.modal-no-expand-scroll) ion-footer {
|
|
205
|
-
position: absolute;
|
|
206
|
-
bottom: 0;
|
|
207
|
-
width: var(--width);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
204
|
/**
|
|
211
205
|
* Convert a font size to a dynamic font size.
|
|
212
206
|
* Fonts that participate in Dynamic Type should use
|
|
@@ -331,14 +325,4 @@ ion-backdrop {
|
|
|
331
325
|
border-start-end-radius: var(--border-radius);
|
|
332
326
|
border-end-end-radius: 0;
|
|
333
327
|
border-end-start-radius: 0;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* Sheet modals require an additional padding as mentioned in the
|
|
338
|
-
* `core.scss` file. However, there's a workaround that requires
|
|
339
|
-
* a cloned footer to be added to the modal. This is only necessary
|
|
340
|
-
* because the core styles are not being applied to the cloned footer.
|
|
341
|
-
*/
|
|
342
|
-
:host(.modal-sheet.modal-no-expand-scroll) ion-footer ion-toolbar:first-of-type {
|
|
343
|
-
padding-top: 6px;
|
|
344
328
|
}
|
|
@@ -86,7 +86,6 @@ export class Modal {
|
|
|
86
86
|
this.enterAnimation = undefined;
|
|
87
87
|
this.leaveAnimation = undefined;
|
|
88
88
|
this.breakpoints = undefined;
|
|
89
|
-
this.expandToScroll = true;
|
|
90
89
|
this.initialBreakpoint = undefined;
|
|
91
90
|
this.backdropBreakpoint = 0;
|
|
92
91
|
this.handle = undefined;
|
|
@@ -302,7 +301,6 @@ export class Modal {
|
|
|
302
301
|
presentingEl: presentingElement,
|
|
303
302
|
currentBreakpoint: this.initialBreakpoint,
|
|
304
303
|
backdropBreakpoint: this.backdropBreakpoint,
|
|
305
|
-
expandToScroll: this.expandToScroll,
|
|
306
304
|
});
|
|
307
305
|
/* tslint:disable-next-line */
|
|
308
306
|
if (typeof window !== 'undefined') {
|
|
@@ -353,10 +351,7 @@ export class Modal {
|
|
|
353
351
|
// should be in the DOM and referenced by now, except
|
|
354
352
|
// for the presenting el
|
|
355
353
|
const animationBuilder = this.leaveAnimation || config.get('modalLeave', iosLeaveAnimation);
|
|
356
|
-
const ani = (this.animation = animationBuilder(el, {
|
|
357
|
-
presentingEl: this.presentingElement,
|
|
358
|
-
expandToScroll: this.expandToScroll,
|
|
359
|
-
}));
|
|
354
|
+
const ani = (this.animation = animationBuilder(el, { presentingEl: this.presentingElement }));
|
|
360
355
|
const contentEl = findIonContent(el);
|
|
361
356
|
if (!contentEl) {
|
|
362
357
|
printIonContentErrorMsg(el);
|
|
@@ -401,10 +396,9 @@ export class Modal {
|
|
|
401
396
|
presentingEl: this.presentingElement,
|
|
402
397
|
currentBreakpoint: initialBreakpoint,
|
|
403
398
|
backdropBreakpoint,
|
|
404
|
-
expandToScroll: this.expandToScroll,
|
|
405
399
|
}));
|
|
406
400
|
ani.progressStart(true, 1);
|
|
407
|
-
const { gesture, moveSheetToBreakpoint } = createSheetGesture(this.el, this.backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, ani, this.sortedBreakpoints,
|
|
401
|
+
const { gesture, moveSheetToBreakpoint } = createSheetGesture(this.el, this.backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, ani, this.sortedBreakpoints, () => { var _a; return (_a = this.currentBreakpoint) !== null && _a !== void 0 ? _a : 0; }, () => this.sheetOnDismiss(), (breakpoint) => {
|
|
408
402
|
if (this.currentBreakpoint !== breakpoint) {
|
|
409
403
|
this.currentBreakpoint = breakpoint;
|
|
410
404
|
this.ionBreakpointDidChange.emit({ breakpoint });
|
|
@@ -482,7 +476,6 @@ export class Modal {
|
|
|
482
476
|
presentingEl: presentingElement,
|
|
483
477
|
currentBreakpoint: (_a = this.currentBreakpoint) !== null && _a !== void 0 ? _a : this.initialBreakpoint,
|
|
484
478
|
backdropBreakpoint: this.backdropBreakpoint,
|
|
485
|
-
expandToScroll: this.expandToScroll,
|
|
486
479
|
});
|
|
487
480
|
if (dismissed) {
|
|
488
481
|
const { delegate } = this.getDelegate();
|
|
@@ -568,23 +561,23 @@ export class Modal {
|
|
|
568
561
|
return true;
|
|
569
562
|
}
|
|
570
563
|
render() {
|
|
571
|
-
const { handle, isSheetModal, presentingElement, htmlAttributes, handleBehavior, inheritedAttributes, focusTrap
|
|
564
|
+
const { handle, isSheetModal, presentingElement, htmlAttributes, handleBehavior, inheritedAttributes, focusTrap } = this;
|
|
572
565
|
const showHandle = handle !== false && isSheetModal;
|
|
573
566
|
const mode = getIonMode(this);
|
|
574
567
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
575
568
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
576
|
-
return (h(Host, Object.assign({ key: '
|
|
569
|
+
return (h(Host, Object.assign({ key: 'b4da5111fe4719fa450c39b2d4bd884a302a7924', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
577
570
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
578
|
-
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal,
|
|
571
|
+
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle }), h("ion-backdrop", { key: 'c12dbf747e0eb914eaf1331798548ffc7e147763', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { key: 'da546ee80c6576b5acc66e959fd5009e0b9a8160', class: "modal-shadow" }), h("div", Object.assign({ key: '306ebe6427440ad5f7ed36d590e562d15a503b75',
|
|
579
572
|
/*
|
|
580
573
|
role and aria-modal must be used on the
|
|
581
574
|
same element. They must also be set inside the
|
|
582
575
|
shadow DOM otherwise ion-button will not be highlighted
|
|
583
576
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
584
577
|
*/
|
|
585
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: '
|
|
578
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: 'c5d17e346fe255a7c0cacbbf15c0083f2d09c488', class: "modal-handle",
|
|
586
579
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
587
|
-
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle" })), h("slot", { key: '
|
|
580
|
+
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle" })), h("slot", { key: '5cc714170a00b67f3eda0cd1d6f37c1489a99c83' }))));
|
|
588
581
|
}
|
|
589
582
|
static get is() { return "ion-modal"; }
|
|
590
583
|
static get encapsulation() { return "shadow"; }
|
|
@@ -742,24 +735,6 @@ export class Modal {
|
|
|
742
735
|
"text": "The breakpoints to use when creating a sheet modal. Each value in the\narray must be a decimal between 0 and 1 where 0 indicates the modal is fully\nclosed and 1 indicates the modal is fully open. Values are relative\nto the height of the modal, not the height of the screen. One of the values in this\narray must be the value of the `initialBreakpoint` property.\nFor example: [0, .25, .5, 1]"
|
|
743
736
|
}
|
|
744
737
|
},
|
|
745
|
-
"expandToScroll": {
|
|
746
|
-
"type": "boolean",
|
|
747
|
-
"mutable": false,
|
|
748
|
-
"complexType": {
|
|
749
|
-
"original": "boolean",
|
|
750
|
-
"resolved": "boolean",
|
|
751
|
-
"references": {}
|
|
752
|
-
},
|
|
753
|
-
"required": false,
|
|
754
|
-
"optional": false,
|
|
755
|
-
"docs": {
|
|
756
|
-
"tags": [],
|
|
757
|
-
"text": "Controls whether scrolling or dragging within the sheet modal expands\nit to a larger breakpoint. This only takes effect when `breakpoints`\nand `initialBreakpoint` are set.\n\nIf `true`, scrolling or dragging anywhere in the modal will first expand\nit to the next breakpoint. Once fully expanded, scrolling will affect the content.\nIf `false`, scrolling will always affect the content, and the modal will only expand\nwhen dragging the header or handle."
|
|
758
|
-
},
|
|
759
|
-
"attribute": "expand-to-scroll",
|
|
760
|
-
"reflect": false,
|
|
761
|
-
"defaultValue": "true"
|
|
762
|
-
},
|
|
763
738
|
"initialBreakpoint": {
|
|
764
739
|
"type": "number",
|
|
765
740
|
"mutable": false,
|
|
@@ -201,12 +201,6 @@ ion-backdrop {
|
|
|
201
201
|
bottom: 0;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
:host(.modal-sheet.modal-no-expand-scroll) ion-footer {
|
|
205
|
-
position: absolute;
|
|
206
|
-
bottom: 0;
|
|
207
|
-
width: var(--width);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
204
|
/**
|
|
211
205
|
* Convert a font size to a dynamic font size.
|
|
212
206
|
* Fonts that participate in Dynamic Type should use
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { Host, forceUpdate, h } from "@stencil/core";
|
|
5
|
-
import { addEventListener, removeEventListener, inheritAttributes } from "../../utils/helpers";
|
|
5
|
+
import { addEventListener, removeEventListener, inheritAttributes, getNextSiblingOfType } from "../../utils/helpers";
|
|
6
6
|
import { hostContext } from "../../utils/theme";
|
|
7
7
|
import { getIonMode } from "../../global/ionic-global";
|
|
8
8
|
let ids = 0;
|
|
@@ -39,7 +39,35 @@ export class SegmentButton {
|
|
|
39
39
|
valueChanged() {
|
|
40
40
|
this.updateState();
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
waitForSegmentContent(ionSegment, contentId) {
|
|
43
|
+
return new Promise((resolve, reject) => {
|
|
44
|
+
let timeoutId = undefined;
|
|
45
|
+
let animationFrameId;
|
|
46
|
+
const check = () => {
|
|
47
|
+
if (!ionSegment) {
|
|
48
|
+
reject(new Error(`Segment not found when looking for Segment Content`));
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const segmentView = getNextSiblingOfType(ionSegment); // Skip the text nodes
|
|
52
|
+
const segmentContent = segmentView === null || segmentView === void 0 ? void 0 : segmentView.querySelector(`ion-segment-content[id="${contentId}"]`);
|
|
53
|
+
if (segmentContent && timeoutId) {
|
|
54
|
+
clearTimeout(timeoutId); // Clear the timeout if the segmentContent is found
|
|
55
|
+
cancelAnimationFrame(animationFrameId);
|
|
56
|
+
resolve(segmentContent);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
animationFrameId = requestAnimationFrame(check); // Keep checking on the next animation frame
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
check();
|
|
63
|
+
// Set a timeout to reject the promise
|
|
64
|
+
timeoutId = setTimeout(() => {
|
|
65
|
+
cancelAnimationFrame(animationFrameId);
|
|
66
|
+
reject(new Error(`Unable to find Segment Content with id="${contentId} within 1000 ms`));
|
|
67
|
+
}, 1000);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
async connectedCallback() {
|
|
43
71
|
const segmentEl = (this.segmentEl = this.el.closest('ion-segment'));
|
|
44
72
|
if (segmentEl) {
|
|
45
73
|
this.updateState();
|
|
@@ -49,11 +77,14 @@ export class SegmentButton {
|
|
|
49
77
|
// Return if there is no contentId defined
|
|
50
78
|
if (!this.contentId)
|
|
51
79
|
return;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
80
|
+
let segmentContent;
|
|
81
|
+
try {
|
|
82
|
+
// Attempt to find the Segment Content by its contentId
|
|
83
|
+
segmentContent = await this.waitForSegmentContent(segmentEl, this.contentId);
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
// If no associated Segment Content exists, log an error and return
|
|
87
|
+
console.error('Segment Button: ', error.message);
|
|
57
88
|
return;
|
|
58
89
|
}
|
|
59
90
|
// Ensure the found element is a valid ION-SEGMENT-CONTENT
|
|
@@ -99,7 +130,7 @@ export class SegmentButton {
|
|
|
99
130
|
const { checked, type, disabled, hasIcon, hasLabel, layout, segmentEl } = this;
|
|
100
131
|
const mode = getIonMode(this);
|
|
101
132
|
const hasSegmentColor = () => (segmentEl === null || segmentEl === void 0 ? void 0 : segmentEl.color) !== undefined;
|
|
102
|
-
return (h(Host, { key: '
|
|
133
|
+
return (h(Host, { key: 'f9da656c8eccb80e4ef30e3fa977f2dbbefbc988', class: {
|
|
103
134
|
[mode]: true,
|
|
104
135
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
105
136
|
'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
|
|
@@ -115,7 +146,7 @@ export class SegmentButton {
|
|
|
115
146
|
'ion-activatable': true,
|
|
116
147
|
'ion-activatable-instant': true,
|
|
117
148
|
'ion-focusable': true,
|
|
118
|
-
} }, h("button", Object.assign({ key: '
|
|
149
|
+
} }, h("button", Object.assign({ key: '00dbcdbd81cd74abdd39803f6840a6e477cc7b0c', "aria-selected": checked ? 'true' : 'false', role: "tab", ref: (el) => (this.nativeEl = el), type: type, class: "button-native", part: "native", disabled: disabled }, this.inheritedAttributes), h("span", { key: '5200c082a9c4788010c4fc33fe75e2b2ad28364a', class: "button-inner" }, h("slot", { key: 'cf3fce2b5d22436b84cd4367a5885df7d6a2715f' })), mode === 'md' && h("ion-ripple-effect", { key: 'f1a2816465f4c2c06644be07315bff2da77e2342' })), h("div", { key: 'aaf31c0ed39641fca698ee98d0773131f4eea6bd', part: "indicator", class: "segment-button-indicator segment-button-indicator-animated" }, h("div", { key: 'fc556651361b7ac305aaedd25ea4afe3173abd20', part: "indicator-background", class: "segment-button-indicator-background" }))));
|
|
119
150
|
}
|
|
120
151
|
static get is() { return "ion-segment-button"; }
|
|
121
152
|
static get encapsulation() { return "shadow"; }
|
|
@@ -91,7 +91,6 @@ export class Select {
|
|
|
91
91
|
this.expandedIcon = undefined;
|
|
92
92
|
this.shape = undefined;
|
|
93
93
|
this.value = undefined;
|
|
94
|
-
this.required = false;
|
|
95
94
|
}
|
|
96
95
|
styleChanged() {
|
|
97
96
|
this.emitStyle();
|
|
@@ -154,15 +153,8 @@ export class Select {
|
|
|
154
153
|
}
|
|
155
154
|
this.isExpanded = true;
|
|
156
155
|
const overlay = (this.overlay = await this.createOverlay(event));
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
this.isExpanded = false;
|
|
160
|
-
this.ionDismiss.emit();
|
|
161
|
-
this.setFocus();
|
|
162
|
-
});
|
|
163
|
-
await overlay.present();
|
|
164
|
-
// focus selected option for popovers and modals
|
|
165
|
-
if (this.interface === 'popover' || this.interface === 'modal') {
|
|
156
|
+
// Add logic to scroll selected item into view before presenting
|
|
157
|
+
const scrollSelectedIntoView = () => {
|
|
166
158
|
const indexOfSelected = this.childOpts.findIndex((o) => o.value === this.value);
|
|
167
159
|
if (indexOfSelected > -1) {
|
|
168
160
|
const selectedItem = overlay.querySelector(`.select-interface-option:nth-child(${indexOfSelected + 1})`);
|
|
@@ -180,6 +172,7 @@ export class Select {
|
|
|
180
172
|
*/
|
|
181
173
|
const interactiveEl = selectedItem.querySelector('ion-radio, ion-checkbox');
|
|
182
174
|
if (interactiveEl) {
|
|
175
|
+
selectedItem.scrollIntoView({ block: 'nearest' });
|
|
183
176
|
// Needs to be called before `focusVisibleElement` to prevent issue with focus event bubbling
|
|
184
177
|
// and removing `ion-focused` style
|
|
185
178
|
interactiveEl.setFocus();
|
|
@@ -203,7 +196,40 @@ export class Select {
|
|
|
203
196
|
focusVisibleElement(firstEnabledOption.closest('ion-item'));
|
|
204
197
|
}
|
|
205
198
|
}
|
|
199
|
+
};
|
|
200
|
+
// For modals and popovers, we can scroll before they're visible
|
|
201
|
+
if (this.interface === 'modal') {
|
|
202
|
+
overlay.addEventListener('ionModalWillPresent', scrollSelectedIntoView, { once: true });
|
|
206
203
|
}
|
|
204
|
+
else if (this.interface === 'popover') {
|
|
205
|
+
overlay.addEventListener('ionPopoverWillPresent', scrollSelectedIntoView, { once: true });
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
/**
|
|
209
|
+
* For alerts and action sheets, we need to wait a frame after willPresent
|
|
210
|
+
* because these overlays don't have their content in the DOM immediately
|
|
211
|
+
* when willPresent fires. By waiting a frame, we ensure the content is
|
|
212
|
+
* rendered and can be properly scrolled into view.
|
|
213
|
+
*/
|
|
214
|
+
const scrollAfterRender = () => {
|
|
215
|
+
requestAnimationFrame(() => {
|
|
216
|
+
scrollSelectedIntoView();
|
|
217
|
+
});
|
|
218
|
+
};
|
|
219
|
+
if (this.interface === 'alert') {
|
|
220
|
+
overlay.addEventListener('ionAlertWillPresent', scrollAfterRender, { once: true });
|
|
221
|
+
}
|
|
222
|
+
else if (this.interface === 'action-sheet') {
|
|
223
|
+
overlay.addEventListener('ionActionSheetWillPresent', scrollAfterRender, { once: true });
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
overlay.onDidDismiss().then(() => {
|
|
227
|
+
this.overlay = undefined;
|
|
228
|
+
this.isExpanded = false;
|
|
229
|
+
this.ionDismiss.emit();
|
|
230
|
+
this.setFocus();
|
|
231
|
+
});
|
|
232
|
+
await overlay.present();
|
|
207
233
|
return overlay;
|
|
208
234
|
}
|
|
209
235
|
createOverlay(ev) {
|
|
@@ -629,8 +655,8 @@ export class Select {
|
|
|
629
655
|
return renderedLabel;
|
|
630
656
|
}
|
|
631
657
|
renderListbox() {
|
|
632
|
-
const { disabled, inputId, isExpanded
|
|
633
|
-
return (h("button", { disabled: disabled, id: inputId, "aria-label": this.ariaLabel, "aria-haspopup": "dialog", "aria-expanded": `${isExpanded}`,
|
|
658
|
+
const { disabled, inputId, isExpanded } = this;
|
|
659
|
+
return (h("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) }));
|
|
634
660
|
}
|
|
635
661
|
render() {
|
|
636
662
|
const { disabled, el, isExpanded, expandedIcon, labelPlacement, justify, placeholder, fill, shape, name, value } = this;
|
|
@@ -661,7 +687,7 @@ export class Select {
|
|
|
661
687
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
662
688
|
*/
|
|
663
689
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
|
|
664
|
-
return (h(Host, { key: '
|
|
690
|
+
return (h(Host, { key: 'b2dca9ae25d88e4d9fdb55003041a66be5668fcf', onClick: this.onClick, class: createColorClasses(this.color, {
|
|
665
691
|
[mode]: true,
|
|
666
692
|
'in-item': inItem,
|
|
667
693
|
'in-item-color': hostContext('ion-item.ion-color', el),
|
|
@@ -677,7 +703,7 @@ export class Select {
|
|
|
677
703
|
[`select-justify-${justify}`]: justifyEnabled,
|
|
678
704
|
[`select-shape-${shape}`]: shape !== undefined,
|
|
679
705
|
[`select-label-placement-${labelPlacement}`]: true,
|
|
680
|
-
}) }, h("label", { key: '
|
|
706
|
+
}) }, h("label", { key: 'c22fe9aee8cd448223497ef143e89529fcef8af6', class: "select-wrapper", id: "select-label" }, this.renderLabelContainer(), h("div", { key: '601972df4579f4fa6a9c2c12865593e807decb72', class: "select-wrapper-inner" }, h("slot", { key: '5f7b1261862f74b978b26f026533e3fd1cc666ba', name: "start" }), h("div", { key: '39616da89f4b4b78432f6da85116a7de2ca589e7', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), h("slot", { key: '1d7b3601b73af7c05b3627cfc8e5147ea379bb03', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && h("div", { key: 'b0344f0ac15003e22fee66d3d7ed03a07da7e8b7', class: "select-highlight" }))));
|
|
681
707
|
}
|
|
682
708
|
static get is() { return "ion-select"; }
|
|
683
709
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1043,24 +1069,6 @@ export class Select {
|
|
|
1043
1069
|
},
|
|
1044
1070
|
"attribute": "value",
|
|
1045
1071
|
"reflect": false
|
|
1046
|
-
},
|
|
1047
|
-
"required": {
|
|
1048
|
-
"type": "boolean",
|
|
1049
|
-
"mutable": false,
|
|
1050
|
-
"complexType": {
|
|
1051
|
-
"original": "boolean",
|
|
1052
|
-
"resolved": "boolean",
|
|
1053
|
-
"references": {}
|
|
1054
|
-
},
|
|
1055
|
-
"required": false,
|
|
1056
|
-
"optional": false,
|
|
1057
|
-
"docs": {
|
|
1058
|
-
"tags": [],
|
|
1059
|
-
"text": "If true, screen readers will announce it as a required field. This property\nworks only for accessibility purposes, it will not prevent the form from\nsubmitting if the value is invalid."
|
|
1060
|
-
},
|
|
1061
|
-
"attribute": "required",
|
|
1062
|
-
"reflect": false,
|
|
1063
|
-
"defaultValue": "false"
|
|
1064
1072
|
}
|
|
1065
1073
|
};
|
|
1066
1074
|
}
|
|
@@ -71,7 +71,6 @@ export class Toggle {
|
|
|
71
71
|
this.labelPlacement = 'start';
|
|
72
72
|
this.justify = undefined;
|
|
73
73
|
this.alignment = undefined;
|
|
74
|
-
this.required = false;
|
|
75
74
|
}
|
|
76
75
|
disabledChanged() {
|
|
77
76
|
if (this.gesture) {
|
|
@@ -153,12 +152,12 @@ export class Toggle {
|
|
|
153
152
|
return this.el.textContent !== '';
|
|
154
153
|
}
|
|
155
154
|
render() {
|
|
156
|
-
const { activated, color, checked, disabled, el, justify, labelPlacement, inputId, name, alignment
|
|
155
|
+
const { activated, color, checked, disabled, el, justify, labelPlacement, inputId, name, alignment } = this;
|
|
157
156
|
const mode = getIonMode(this);
|
|
158
157
|
const value = this.getValue();
|
|
159
158
|
const rtl = isRTL(el) ? 'rtl' : 'ltr';
|
|
160
159
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
161
|
-
return (h(Host, { key: '
|
|
160
|
+
return (h(Host, { key: 'f52195ec3bc14c024647cb41319c32a4cd330e19', onClick: this.onClick, class: createColorClasses(color, {
|
|
162
161
|
[mode]: true,
|
|
163
162
|
'in-item': hostContext('ion-item', el),
|
|
164
163
|
'toggle-activated': activated,
|
|
@@ -168,10 +167,10 @@ export class Toggle {
|
|
|
168
167
|
[`toggle-alignment-${alignment}`]: alignment !== undefined,
|
|
169
168
|
[`toggle-label-placement-${labelPlacement}`]: true,
|
|
170
169
|
[`toggle-${rtl}`]: true,
|
|
171
|
-
}) }, h("label", { key: '
|
|
170
|
+
}) }, h("label", { key: 'f8b3a215ad85b2cee611ad63449b584e1640f27f', class: "toggle-wrapper" }, h("input", Object.assign({ key: 'f387b1ea840737a9737917e516834c887be99c09', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl) }, this.inheritedAttributes)), h("div", { key: '936af880db59fe377cd2de9101eb28a1c4fb8914', class: {
|
|
172
171
|
'label-text-wrapper': true,
|
|
173
172
|
'label-text-wrapper-hidden': !this.hasLabel,
|
|
174
|
-
}, part: "label" }, h("slot", { key: '
|
|
173
|
+
}, part: "label" }, h("slot", { key: '80a6672e2e792c15011a9496dcd75363cdba31c6' })), h("div", { key: '2b2b318b38ab27b194c0dab4cecd77d9d780f2ca', class: "native-wrapper" }, this.renderToggleControl()))));
|
|
175
174
|
}
|
|
176
175
|
static get is() { return "ion-toggle"; }
|
|
177
176
|
static get encapsulation() { return "shadow"; }
|
|
@@ -353,24 +352,6 @@ export class Toggle {
|
|
|
353
352
|
},
|
|
354
353
|
"attribute": "alignment",
|
|
355
354
|
"reflect": false
|
|
356
|
-
},
|
|
357
|
-
"required": {
|
|
358
|
-
"type": "boolean",
|
|
359
|
-
"mutable": false,
|
|
360
|
-
"complexType": {
|
|
361
|
-
"original": "boolean",
|
|
362
|
-
"resolved": "boolean",
|
|
363
|
-
"references": {}
|
|
364
|
-
},
|
|
365
|
-
"required": false,
|
|
366
|
-
"optional": false,
|
|
367
|
-
"docs": {
|
|
368
|
-
"tags": [],
|
|
369
|
-
"text": "If true, screen readers will announce it as a required field. This property\nworks only for accessibility purposes, it will not prevent the form from\nsubmitting if the value is invalid."
|
|
370
|
-
},
|
|
371
|
-
"attribute": "required",
|
|
372
|
-
"reflect": false,
|
|
373
|
-
"defaultValue": "false"
|
|
374
355
|
}
|
|
375
356
|
};
|
|
376
357
|
}
|
|
@@ -12,10 +12,6 @@ import { getIonMode } from "../../global/ionic-global";
|
|
|
12
12
|
* @slot secondary - Content is placed to the left of the toolbar text in `ios` mode, and directly to the right in `md` mode.
|
|
13
13
|
* @slot primary - Content is placed to the right of the toolbar text in `ios` mode, and to the far right in `md` mode.
|
|
14
14
|
* @slot end - Content is placed to the right of the toolbar text in LTR, and to the left in RTL.
|
|
15
|
-
*
|
|
16
|
-
* @part background - The background of the toolbar, covering the entire area behind the toolbar content.
|
|
17
|
-
* @part container - The container that wraps all toolbar content, including the default slot and named slot content.
|
|
18
|
-
* @part content - The container for the default slot, wrapping content provided without a named slot.
|
|
19
15
|
*/
|
|
20
16
|
export class Toolbar {
|
|
21
17
|
constructor() {
|
|
@@ -66,10 +62,10 @@ export class Toolbar {
|
|
|
66
62
|
this.childrenStyles.forEach((value) => {
|
|
67
63
|
Object.assign(childStyles, value);
|
|
68
64
|
});
|
|
69
|
-
return (h(Host, { key: '
|
|
65
|
+
return (h(Host, { key: '462538a5ecd01baf3cde116c9f029aeda26c81be', class: Object.assign(Object.assign({}, childStyles), createColorClasses(this.color, {
|
|
70
66
|
[mode]: true,
|
|
71
67
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
72
|
-
})) }, h("div", { key: '
|
|
68
|
+
})) }, h("div", { key: 'c0b4415d3b2472de643a9be7cb3b13b3b628621b', class: "toolbar-background" }), h("div", { key: '0ccb8a2dbeaa28d8f9bed87629c0c097446690c2', class: "toolbar-container" }, h("slot", { key: '3e726dac359e923df21d80301651f16063a3de20', name: "start" }), h("slot", { key: 'cd799330b56a7f8833bc61bb2807aafb21846f71', name: "secondary" }), h("div", { key: '395282e6ac8c53576922dcdb5f08c25d34638c86', class: "toolbar-content" }, h("slot", { key: 'a437c60e4ba5aae65e55169ae82a6f379868ec1d' })), h("slot", { key: '711af9b9d321a7b31ede924c9bdcad767aa9a1ca', name: "primary" }), h("slot", { key: 'ecc02edeaf80a837890bcb08d5096df1e22a0b9a', name: "end" }))));
|
|
73
69
|
}
|
|
74
70
|
static get is() { return "ion-toolbar"; }
|
|
75
71
|
static get encapsulation() { return "shadow"; }
|
|
@@ -364,3 +364,13 @@ export const shallowEqualStringMap = (map1, map2) => {
|
|
|
364
364
|
}
|
|
365
365
|
return true;
|
|
366
366
|
};
|
|
367
|
+
export const getNextSiblingOfType = (element) => {
|
|
368
|
+
let sibling = element.nextSibling;
|
|
369
|
+
while (sibling) {
|
|
370
|
+
if (sibling.nodeType === Node.ELEMENT_NODE && sibling !== null) {
|
|
371
|
+
return sibling;
|
|
372
|
+
}
|
|
373
|
+
sibling = sibling.nextSibling;
|
|
374
|
+
}
|
|
375
|
+
return null;
|
|
376
|
+
};
|