@ionic/core 8.7.18-dev.11770916502.174efd7f → 8.7.18-dev.11771365900.125bf49c
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/index.js +13 -14
- package/components/ion-accordion-group.js +3 -4
- package/components/ion-accordion.js +6 -7
- package/components/ion-action-sheet.js +1 -1
- package/components/ion-alert.js +1 -1
- package/components/ion-app.js +11 -12
- package/components/ion-avatar.js +3 -3
- package/components/ion-back-button.js +8 -9
- package/components/ion-backdrop.js +1 -1
- package/components/ion-badge.js +4 -4
- package/components/ion-breadcrumb.js +7 -7
- package/components/ion-breadcrumbs.js +4 -4
- package/components/ion-button.js +1 -1
- package/components/ion-buttons.js +1 -1
- package/components/ion-card-content.js +3 -3
- package/components/ion-card-header.js +4 -4
- package/components/ion-card-subtitle.js +4 -4
- package/components/ion-card-title.js +4 -4
- package/components/ion-card.js +6 -6
- package/components/ion-checkbox.js +1 -1
- package/components/ion-chip.js +5 -5
- package/components/ion-col.js +3 -3
- package/components/ion-content.js +1 -1
- package/components/ion-datetime-button.js +7 -8
- package/components/ion-datetime.js +19 -20
- package/components/ion-fab-button.js +8 -8
- package/components/ion-fab-list.js +3 -3
- package/components/ion-fab.js +3 -3
- package/components/ion-footer.js +6 -6
- package/components/ion-grid.js +3 -3
- package/components/ion-header.js +1 -1
- package/components/ion-icon.js +1 -1
- package/components/ion-img.js +4 -4
- package/components/ion-infinite-scroll-content.js +5 -6
- package/components/ion-infinite-scroll.js +4 -4
- package/components/ion-input-otp.js +6 -7
- package/components/ion-input-password-toggle.js +8 -9
- package/components/ion-input.js +13 -13
- package/components/ion-item-divider.js +6 -6
- package/components/ion-item-group.js +4 -4
- package/components/ion-item-option.js +7 -7
- package/components/ion-item-options.js +5 -5
- package/components/ion-item-sliding.js +8 -9
- package/components/ion-item.js +1 -1
- package/components/ion-label.js +1 -1
- package/components/ion-list-header.js +1 -1
- package/components/ion-list.js +1 -1
- package/components/ion-loading.js +13 -14
- package/components/ion-menu-button.js +12 -13
- package/components/ion-menu-toggle.js +7 -7
- package/components/ion-menu.js +14 -18
- package/components/ion-modal.js +1 -1
- package/components/ion-nav-link.js +3 -3
- package/components/ion-nav.js +9 -14
- package/components/ion-note.js +6 -6
- package/components/ion-picker-column-option.js +1 -1
- package/components/ion-picker-column.js +1 -1
- package/components/ion-picker-legacy-column.js +1 -1
- package/components/ion-picker-legacy.js +12 -13
- package/components/ion-picker.js +1 -1
- package/components/ion-popover.js +1 -1
- package/components/ion-progress-bar.js +6 -7
- package/components/ion-radio-group.js +1 -1
- package/components/ion-radio.js +1 -1
- package/components/ion-range.js +11 -12
- package/components/ion-refresher-content.js +9 -10
- package/components/ion-refresher.js +12 -13
- package/components/ion-reorder-group.js +8 -8
- package/components/ion-reorder.js +6 -6
- package/components/ion-ripple-effect.js +1 -1
- package/components/ion-route-redirect.js +2 -2
- package/components/ion-route.js +2 -2
- package/components/ion-router-link.js +6 -6
- package/components/ion-router-outlet.js +10 -11
- package/components/ion-router.js +3 -4
- package/components/ion-row.js +4 -4
- package/components/ion-searchbar.js +12 -13
- package/components/ion-segment-button.js +8 -9
- package/components/ion-segment-content.js +3 -3
- package/components/ion-segment-view.js +5 -5
- package/components/ion-segment.js +9 -9
- package/components/ion-select-modal.js +1 -1
- package/components/ion-select-option.js +4 -4
- package/components/ion-select-popover.js +1 -1
- package/components/ion-select.js +36 -37
- package/components/ion-skeleton-text.js +6 -7
- package/components/ion-spinner.js +1 -1
- package/components/ion-split-pane.js +5 -12
- package/components/ion-tab-bar.js +7 -7
- package/components/ion-tab-button.js +7 -8
- package/components/ion-tab.js +5 -14
- package/components/ion-tabs.js +3 -4
- package/components/ion-text.js +6 -6
- package/components/ion-textarea.js +13 -13
- package/components/ion-thumbnail.js +4 -4
- package/components/ion-title.js +1 -1
- package/components/ion-toast.js +17 -20
- package/components/ion-toggle.js +15 -16
- package/components/ion-toolbar.js +1 -1
- package/components/{list.js → p-B25GjpND.js} +3 -3
- package/components/{buttons.js → p-BBFQmhcD.js} +3 -3
- package/components/{index5.js → p-BC-awmYt.js} +6 -6
- package/components/{picker.js → p-BHbOsu99.js} +3 -3
- package/components/{title.js → p-BTlwXR9e.js} +6 -6
- package/components/{alert.js → p-BcazQttQ.js} +12 -13
- package/components/{spinner.js → p-BdGshsIJ.js} +5 -6
- package/components/{input.utils.js → p-BfS7vSpC.js} +3 -3
- package/components/{ios.transition.js → p-BhRFCLuX.js} +2 -2
- package/components/{backdrop.js → p-Bhnhnzjz.js} +3 -3
- package/components/{notch-controller.js → p-BmcqD0EN.js} +2 -2
- package/components/{radio-group.js → p-BnpDIASH.js} +7 -7
- package/components/{hardware-back-button.js → p-Boi6hecl.js} +2 -2
- package/components/{radio.js → p-Bt_moUyl.js} +8 -8
- package/components/{ionic-global.js → p-Bxl5etF4.js} +1 -2
- package/components/{picker-column-option.js → p-ByjmWt3s.js} +7 -7
- package/components/{md.transition.js → p-C04oPyjT.js} +2 -2
- package/components/{capacitor.js → p-CIGNaXM1.js} +1 -1
- package/components/{config.js → p-CIJwkzL6.js} +1 -1
- package/components/{select-modal.js → p-CJrGvZ1Z.js} +19 -19
- package/components/{animation.js → p-CL12ApCQ.js} +2 -2
- package/components/{label.js → p-CUfY9DTD.js} +6 -6
- package/components/{action-sheet.js → p-CXJR56Oq.js} +12 -12
- package/components/{index3.js → p-Cl0B-RWe.js} +1 -1
- package/components/{keyboard-controller.js → p-CtWGkNnJ.js} +2 -2
- package/components/{index7.js → p-Cyd00tgZ.js} +2 -2
- package/components/{picker-column2.js → p-CzAJ3ArC.js} +9 -9
- package/components/{menu-toggle-util.js → p-CzW34QBh.js} +1 -1
- package/components/{refresher.utils.js → p-D0zXRwcr.js} +3 -3
- package/components/{keyboard2.js → p-D13Eaw-8.js} +1 -1
- package/components/{select-popover.js → p-D3KEyQ8e.js} +15 -15
- package/components/{helpers.js → p-D5hF6rwn.js} +1 -1
- package/components/{keyboard.js → p-D6Ynv7Xh.js} +1 -1
- package/components/{button-active.js → p-D8eD2iBA.js} +3 -3
- package/components/{button.js → p-DK2Bn1Mc.js} +6 -7
- package/components/{picker-column.js → p-DKRQWlK2.js} +7 -7
- package/components/{index8.js → p-DNDUsygf.js} +2 -2
- package/components/{content.js → p-DPm73mCi.js} +7 -7
- package/components/{popover.js → p-DRHwNkVo.js} +43 -166
- package/components/{index2.js → p-DTWZF6wg.js} +4 -5
- package/components/p-DWoUQeZ3.js +3012 -0
- package/components/{header.js → p-DX0w75a9.js} +6 -6
- package/components/{toolbar.js → p-Dt8zaCLQ.js} +6 -6
- package/components/{checkbox.js → p-DyFBFrV7.js} +7 -7
- package/components/{status-tap.js → p-DyHPCMyn.js} +3 -3
- package/components/{modal.js → p-IHgAGzvW.js} +35 -345
- package/components/{ripple-effect.js → p-LgLeKTkH.js} +4 -4
- package/components/{list-header.js → p-NhiRFRn9.js} +6 -6
- package/components/{input-shims.js → p-OuiHmXO5.js} +4 -4
- package/components/{icon.js → p-Wro9IPHE.js} +6 -6
- package/components/{item.js → p-aIWC4ZEV.js} +8 -8
- package/components/{overlays.js → p-c-XJ9XhZ.js} +7 -7
- package/components/{haptic.js → p-cyNmxje6.js} +1 -1
- package/components/{swipe-back.js → p-fVuFT3Wd.js} +3 -3
- package/components/{framework-delegate.js → p-l_lso3Zl.js} +1 -1
- package/components/{data.js → p-mQp4lwQD.js} +2 -2
- package/dist/cjs/ion-app_8.cjs.entry.js +5 -5
- package/dist/cjs/ion-avatar_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-col_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-datetime_3.cjs.entry.js +4 -4
- package/dist/cjs/ion-item-option_3.cjs.entry.js +4 -4
- package/dist/cjs/ion-item_8.cjs.entry.js +11 -11
- package/dist/cjs/ion-loading.cjs.entry.js +2 -2
- package/dist/cjs/ion-menu_3.cjs.entry.js +6 -6
- package/dist/cjs/ion-modal.cjs.entry.js +17 -326
- package/dist/cjs/ion-nav_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-picker-column-option.cjs.entry.js +2 -2
- package/dist/cjs/ion-popover.cjs.entry.js +32 -154
- package/dist/cjs/ion-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/ion-radio_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-range.cjs.entry.js +3 -3
- package/dist/cjs/ion-refresher_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +1 -1
- package/dist/cjs/ion-route_4.cjs.entry.js +2 -2
- package/dist/cjs/ion-searchbar.cjs.entry.js +4 -4
- package/dist/cjs/ion-segment-content.cjs.entry.js +1 -1
- package/dist/cjs/ion-segment-view.cjs.entry.js +2 -2
- package/dist/cjs/ion-segment_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-select-modal.cjs.entry.js +1 -1
- package/dist/cjs/ion-select_3.cjs.entry.js +4 -4
- package/dist/cjs/ion-spinner.cjs.entry.js +1 -1
- package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-tab_2.cjs.entry.js +3 -3
- 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 +2 -2
- package/dist/cjs/ion-toggle.cjs.entry.js +3 -3
- package/dist/collection/components/item-divider/item-divider.js +2 -2
- package/dist/collection/components/item-group/item-group.js +1 -1
- package/dist/collection/components/item-option/item-option.js +2 -2
- package/dist/collection/components/item-options/item-options.js +1 -1
- package/dist/collection/components/item-sliding/item-sliding.js +1 -1
- package/dist/collection/components/label/label.js +2 -2
- package/dist/collection/components/list-header/list-header.js +2 -2
- package/dist/collection/components/loading/loading.js +2 -2
- package/dist/collection/components/menu/menu.js +2 -2
- package/dist/collection/components/menu-button/menu-button.js +2 -2
- package/dist/collection/components/menu-toggle/menu-toggle.js +2 -2
- package/dist/collection/components/modal/modal.ios.css +5 -6
- package/dist/collection/components/modal/modal.js +15 -164
- package/dist/collection/components/modal/modal.md.css +5 -6
- package/dist/collection/components/nav/nav.js +1 -1
- package/dist/collection/components/nav-link/nav-link.js +1 -1
- package/dist/collection/components/note/note.js +2 -2
- package/dist/collection/components/picker-column-option/picker-column-option.js +2 -2
- package/dist/collection/components/picker-legacy/picker.js +2 -2
- package/dist/collection/components/picker-legacy-column/picker-column.js +2 -2
- package/dist/collection/components/popover/animations/ios.enter.js +8 -33
- package/dist/collection/components/popover/animations/md.enter.js +6 -26
- package/dist/collection/components/popover/popover.js +2 -2
- package/dist/collection/components/popover/utils.js +19 -96
- package/dist/collection/components/progress-bar/progress-bar.js +1 -1
- package/dist/collection/components/radio/radio.js +3 -3
- package/dist/collection/components/radio-group/radio-group.js +1 -1
- package/dist/collection/components/range/range.js +3 -3
- package/dist/collection/components/refresher/refresher.js +1 -1
- package/dist/collection/components/refresher-content/refresher-content.js +1 -1
- package/dist/collection/components/reorder/reorder.js +1 -1
- package/dist/collection/components/reorder-group/reorder-group.js +1 -1
- package/dist/collection/components/ripple-effect/ripple-effect.js +1 -1
- package/dist/collection/components/router-link/router-link.js +2 -2
- package/dist/collection/components/router-outlet/router-outlet.js +1 -1
- package/dist/collection/components/row/row.js +1 -1
- package/dist/collection/components/searchbar/searchbar.js +4 -4
- package/dist/collection/components/segment/segment.js +2 -2
- package/dist/collection/components/segment-button/segment-button.js +2 -2
- package/dist/collection/components/segment-content/segment-content.js +1 -1
- package/dist/collection/components/segment-view/segment-view.js +2 -2
- package/dist/collection/components/select/select.js +2 -2
- package/dist/collection/components/select-modal/select-modal.js +1 -1
- package/dist/collection/components/select-option/select-option.js +1 -1
- package/dist/collection/components/select-popover/select-popover.js +1 -1
- package/dist/collection/components/skeleton-text/skeleton-text.js +2 -2
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/split-pane/split-pane.js +2 -2
- package/dist/collection/components/tab/tab.js +2 -2
- package/dist/collection/components/tab-bar/tab-bar.js +2 -2
- package/dist/collection/components/tab-button/tab-button.js +2 -2
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/text/text.js +2 -2
- package/dist/collection/components/textarea/textarea.js +2 -2
- package/dist/collection/components/thumbnail/thumbnail.js +1 -1
- package/dist/collection/components/title/title.js +2 -2
- package/dist/collection/components/toast/toast.js +2 -2
- package/dist/collection/components/toggle/toggle.js +3 -3
- package/dist/collection/components/toolbar/toolbar.js +2 -2
- package/dist/docs.json +1 -1
- package/dist/esm/ion-app_8.entry.js +5 -5
- package/dist/esm/ion-avatar_3.entry.js +1 -1
- package/dist/esm/ion-col_3.entry.js +1 -1
- package/dist/esm/ion-datetime_3.entry.js +4 -4
- package/dist/esm/ion-item-option_3.entry.js +4 -4
- package/dist/esm/ion-item_8.entry.js +11 -11
- package/dist/esm/ion-loading.entry.js +2 -2
- package/dist/esm/ion-menu_3.entry.js +6 -6
- package/dist/esm/ion-modal.entry.js +17 -326
- package/dist/esm/ion-nav_2.entry.js +2 -2
- package/dist/esm/ion-picker-column-option.entry.js +2 -2
- package/dist/esm/ion-popover.entry.js +32 -154
- package/dist/esm/ion-progress-bar.entry.js +1 -1
- package/dist/esm/ion-radio_2.entry.js +4 -4
- package/dist/esm/ion-range.entry.js +3 -3
- package/dist/esm/ion-refresher_2.entry.js +2 -2
- package/dist/esm/ion-reorder_2.entry.js +2 -2
- package/dist/esm/ion-ripple-effect.entry.js +1 -1
- package/dist/esm/ion-route_4.entry.js +2 -2
- package/dist/esm/ion-searchbar.entry.js +4 -4
- package/dist/esm/ion-segment-content.entry.js +1 -1
- package/dist/esm/ion-segment-view.entry.js +2 -2
- package/dist/esm/ion-segment_2.entry.js +4 -4
- package/dist/esm/ion-select-modal.entry.js +1 -1
- package/dist/esm/ion-select_3.entry.js +4 -4
- package/dist/esm/ion-spinner.entry.js +1 -1
- package/dist/esm/ion-split-pane.entry.js +2 -2
- package/dist/esm/ion-tab-bar_2.entry.js +4 -4
- package/dist/esm/ion-tab_2.entry.js +3 -3
- 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 +2 -2
- package/dist/esm/ion-toggle.entry.js +3 -3
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-074839fc.entry.js → p-01e27965.entry.js} +1 -1
- package/dist/ionic/p-0ca0fe9c.entry.js +4 -0
- package/dist/ionic/{p-316c0420.entry.js → p-221a3d8c.entry.js} +1 -1
- package/dist/ionic/{p-3a6caca9.entry.js → p-2668188b.entry.js} +1 -1
- package/dist/ionic/{p-d3014190.entry.js → p-2bd1ea35.entry.js} +1 -1
- package/dist/ionic/{p-a127bee2.entry.js → p-30333874.entry.js} +1 -1
- package/dist/ionic/{p-0e8c8a10.entry.js → p-31db96da.entry.js} +1 -1
- package/dist/ionic/{p-1647c46c.entry.js → p-363d1209.entry.js} +1 -1
- package/dist/ionic/p-3ec563c1.entry.js +4 -0
- package/dist/ionic/{p-c19af093.entry.js → p-42db6404.entry.js} +1 -1
- package/dist/ionic/{p-db82892c.entry.js → p-46a38cfd.entry.js} +1 -1
- package/dist/ionic/{p-eb024a5b.entry.js → p-4eec1a5e.entry.js} +1 -1
- package/dist/ionic/{p-0dfa5a37.entry.js → p-530fcd71.entry.js} +1 -1
- package/dist/ionic/{p-72c38b88.entry.js → p-5c8f7253.entry.js} +1 -1
- package/dist/ionic/{p-172a579f.entry.js → p-5d6fb6e3.entry.js} +1 -1
- package/dist/ionic/{p-dbbe606a.entry.js → p-652318c3.entry.js} +1 -1
- package/dist/ionic/{p-2a939845.entry.js → p-6f37536a.entry.js} +1 -1
- package/dist/ionic/{p-4e41ea20.entry.js → p-72af946b.entry.js} +1 -1
- package/dist/ionic/p-7f98e710.entry.js +4 -0
- package/dist/ionic/{p-6d070558.entry.js → p-82d5bb3d.entry.js} +1 -1
- package/dist/ionic/p-906bb44d.entry.js +4 -0
- package/dist/ionic/{p-2dbb90cb.entry.js → p-97eb0812.entry.js} +1 -1
- package/dist/ionic/{p-31f7095f.entry.js → p-a4a9f5ae.entry.js} +1 -1
- package/dist/ionic/{p-86f53961.entry.js → p-b8551510.entry.js} +1 -1
- package/dist/ionic/p-bc293244.entry.js +4 -0
- package/dist/ionic/{p-d126e8d3.entry.js → p-bce86e56.entry.js} +1 -1
- package/dist/ionic/{p-02d76786.entry.js → p-be263062.entry.js} +1 -1
- package/dist/ionic/{p-639dd543.entry.js → p-c175d792.entry.js} +1 -1
- package/dist/ionic/{p-020af078.entry.js → p-cc2a9936.entry.js} +1 -1
- package/dist/ionic/{p-1ccd6829.entry.js → p-e338f669.entry.js} +1 -1
- package/dist/ionic/{p-6241ce47.entry.js → p-eaf3f5ff.entry.js} +1 -1
- package/dist/ionic/{p-f8f22cc0.entry.js → p-fb0271ae.entry.js} +1 -1
- package/dist/ionic/{p-370e4237.entry.js → p-fbb00634.entry.js} +1 -1
- package/dist/types/components/modal/modal.d.ts +0 -35
- package/dist/types/components/popover/utils.d.ts +1 -23
- package/hydrate/index.js +137 -568
- package/hydrate/index.mjs +137 -568
- package/package.json +1 -1
- package/components/index4.js +0 -121
- package/dist/collection/components/modal/safe-area-utils.js +0 -165
- package/dist/ionic/p-3e69999d.entry.js +0 -4
- package/dist/ionic/p-51a60e0f.entry.js +0 -4
- package/dist/ionic/p-94de5cfa.entry.js +0 -4
- package/dist/ionic/p-cc3446d5.entry.js +0 -4
- package/dist/ionic/p-dd1aef77.entry.js +0 -4
- package/dist/types/components/modal/safe-area-utils.d.ts +0 -66
- /package/components/{lock-controller.js → p-B-hirT0v.js} +0 -0
- /package/components/{gesture-controller.js → p-BTEOs1at.js} +0 -0
- /package/components/{focus-visible.js → p-BmVRXR1y.js} +0 -0
- /package/components/{dir.js → p-C53feagD.js} +0 -0
- /package/components/{index6.js → p-CO7fmmxt.js} +0 -0
- /package/components/{validity.js → p-DJztqcrH.js} +0 -0
- /package/components/{theme.js → p-DiVJyqlX.js} +0 -0
- /package/components/{watch-options.js → p-Dtdm8lKC.js} +0 -0
- /package/components/{index9.js → p-ZjP4CjeZ.js} +0 -0
- /package/components/{cubic-bezier.js → p-hHmYLOfE.js} +0 -0
|
@@ -21,7 +21,6 @@ import { mdEnterAnimation } from "./animations/md.enter";
|
|
|
21
21
|
import { mdLeaveAnimation } from "./animations/md.leave";
|
|
22
22
|
import { createSheetGesture } from "./gestures/sheet";
|
|
23
23
|
import { createSwipeToCloseGesture, SwipeToCloseDefaults } from "./gestures/swipe-to-close";
|
|
24
|
-
import { getInitialSafeAreaConfig, getPositionBasedSafeAreaConfig, applySafeAreaOverrides, clearSafeAreaOverrides, getRootSafeAreaTop, } from "./safe-area-utils";
|
|
25
24
|
import { setCardStatusBarDark, setCardStatusBarDefault } from "./utils";
|
|
26
25
|
// TODO(FW-2832): types
|
|
27
26
|
/**
|
|
@@ -233,31 +232,13 @@ export class Modal {
|
|
|
233
232
|
}
|
|
234
233
|
}
|
|
235
234
|
onWindowResize() {
|
|
236
|
-
|
|
235
|
+
// Only handle resize for iOS card modals when no custom animations are provided
|
|
236
|
+
if (getIonMode(this) !== 'ios' || !this.presentingElement || this.enterAnimation || this.leaveAnimation) {
|
|
237
237
|
return;
|
|
238
|
+
}
|
|
238
239
|
clearTimeout(this.resizeTimeout);
|
|
239
240
|
this.resizeTimeout = setTimeout(() => {
|
|
240
|
-
|
|
241
|
-
// iOS card modals: handle portrait/landscape view transitions
|
|
242
|
-
if (context.isCardModal && !this.enterAnimation && !this.leaveAnimation) {
|
|
243
|
-
this.handleViewTransition();
|
|
244
|
-
}
|
|
245
|
-
// Sheet modals: re-compute the internal offset property since safe-area
|
|
246
|
-
// values may change on device rotation (e.g., portrait notch vs landscape).
|
|
247
|
-
if (context.isSheetModal) {
|
|
248
|
-
this.updateSheetOffsetTop();
|
|
249
|
-
}
|
|
250
|
-
// Regular (non-sheet, non-card) modals: update safe-area overrides
|
|
251
|
-
// since the viewport may have crossed the centered-dialog breakpoint.
|
|
252
|
-
if (!context.isSheetModal && !context.isCardModal) {
|
|
253
|
-
this.updateSafeAreaOverrides();
|
|
254
|
-
// Re-evaluate fullscreen safe-area padding: clear first, then re-apply
|
|
255
|
-
if (this.wrapperEl) {
|
|
256
|
-
this.wrapperEl.style.removeProperty('height');
|
|
257
|
-
this.wrapperEl.style.removeProperty('padding-bottom');
|
|
258
|
-
}
|
|
259
|
-
this.applyFullscreenSafeArea();
|
|
260
|
-
}
|
|
241
|
+
this.handleViewTransition();
|
|
261
242
|
}, 50); // Debounce to avoid excessive calls during active resizing
|
|
262
243
|
}
|
|
263
244
|
breakpointsChanged(breakpoints) {
|
|
@@ -274,9 +255,6 @@ export class Modal {
|
|
|
274
255
|
this.triggerController.removeClickListener();
|
|
275
256
|
this.cleanupViewTransitionListener();
|
|
276
257
|
this.cleanupParentRemovalObserver();
|
|
277
|
-
// Also called in dismiss() — intentional dual cleanup covers both
|
|
278
|
-
// dismiss-then-remove and direct DOM removal without dismiss.
|
|
279
|
-
this.cleanupSafeAreaOverrides();
|
|
280
258
|
}
|
|
281
259
|
componentWillLoad() {
|
|
282
260
|
var _a;
|
|
@@ -437,11 +415,6 @@ export class Modal {
|
|
|
437
415
|
await waitForMount();
|
|
438
416
|
}
|
|
439
417
|
writeTask(() => this.el.classList.add('show-modal'));
|
|
440
|
-
// Recalculate isSheetModal before safe-area setup because framework
|
|
441
|
-
// bindings (e.g., Angular) may not have been applied when componentWillLoad ran.
|
|
442
|
-
this.isSheetModal = this.breakpoints !== undefined && this.initialBreakpoint !== undefined;
|
|
443
|
-
// Set initial safe-area overrides before animation
|
|
444
|
-
this.setInitialSafeAreaOverrides();
|
|
445
418
|
const hasCardModal = presentingElement !== undefined;
|
|
446
419
|
/**
|
|
447
420
|
* We need to change the status bar at the
|
|
@@ -459,10 +432,6 @@ export class Modal {
|
|
|
459
432
|
backdropBreakpoint: this.backdropBreakpoint,
|
|
460
433
|
expandToScroll: this.expandToScroll,
|
|
461
434
|
});
|
|
462
|
-
// Update safe-area based on actual position after animation
|
|
463
|
-
this.updateSafeAreaOverrides();
|
|
464
|
-
// Apply fullscreen safe-area padding if needed
|
|
465
|
-
this.applyFullscreenSafeArea();
|
|
466
435
|
/* tslint:disable-next-line */
|
|
467
436
|
if (typeof window !== 'undefined') {
|
|
468
437
|
/**
|
|
@@ -494,7 +463,13 @@ export class Modal {
|
|
|
494
463
|
};
|
|
495
464
|
window.addEventListener(KEYBOARD_DID_OPEN, this.keyboardOpenCallback);
|
|
496
465
|
}
|
|
497
|
-
|
|
466
|
+
/**
|
|
467
|
+
* Recalculate isSheetModal because framework bindings (e.g., Angular)
|
|
468
|
+
* may not have been applied when componentWillLoad ran.
|
|
469
|
+
*/
|
|
470
|
+
const isSheetModal = this.breakpoints !== undefined && this.initialBreakpoint !== undefined;
|
|
471
|
+
this.isSheetModal = isSheetModal;
|
|
472
|
+
if (isSheetModal) {
|
|
498
473
|
this.initSheetGesture();
|
|
499
474
|
}
|
|
500
475
|
else if (hasCardModal) {
|
|
@@ -684,9 +659,6 @@ export class Modal {
|
|
|
684
659
|
if (this.gestureAnimationDismissing && role !== GESTURE) {
|
|
685
660
|
return false;
|
|
686
661
|
}
|
|
687
|
-
// Cancel any pending resize timeout to prevent stale updates during dismiss
|
|
688
|
-
clearTimeout(this.resizeTimeout);
|
|
689
|
-
this.resizeTimeout = undefined;
|
|
690
662
|
/**
|
|
691
663
|
* Because the canDismiss check below is async,
|
|
692
664
|
* we need to claim a lock before the check happens,
|
|
@@ -741,7 +713,6 @@ export class Modal {
|
|
|
741
713
|
}
|
|
742
714
|
this.cleanupViewTransitionListener();
|
|
743
715
|
this.cleanupParentRemovalObserver();
|
|
744
|
-
this.cleanupSafeAreaOverrides();
|
|
745
716
|
this.cleanupChildRoutePassthrough();
|
|
746
717
|
}
|
|
747
718
|
this.currentBreakpoint = undefined;
|
|
@@ -870,9 +841,6 @@ export class Modal {
|
|
|
870
841
|
this.viewTransitionAnimation = transitionAnimation;
|
|
871
842
|
transitionAnimation.play().then(() => {
|
|
872
843
|
this.viewTransitionAnimation = undefined;
|
|
873
|
-
// Wait for a layout pass after the transition so getBoundingClientRect()
|
|
874
|
-
// in getPositionBasedSafeAreaConfig() reflects the new dimensions.
|
|
875
|
-
raf(() => this.updateSafeAreaOverrides());
|
|
876
844
|
// After orientation transition, recreate the swipe-to-close gesture
|
|
877
845
|
// with updated animation that reflects the new presenting element state
|
|
878
846
|
this.reinitSwipeToClose();
|
|
@@ -999,123 +967,6 @@ export class Modal {
|
|
|
999
967
|
(_a = this.parentRemovalObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
1000
968
|
this.parentRemovalObserver = undefined;
|
|
1001
969
|
}
|
|
1002
|
-
/**
|
|
1003
|
-
* Creates the context object for safe-area utilities.
|
|
1004
|
-
*/
|
|
1005
|
-
getSafeAreaContext() {
|
|
1006
|
-
return {
|
|
1007
|
-
isSheetModal: this.isSheetModal,
|
|
1008
|
-
isCardModal: this.presentingElement !== undefined && getIonMode(this) === 'ios',
|
|
1009
|
-
presentingElement: this.presentingElement,
|
|
1010
|
-
breakpoints: this.breakpoints,
|
|
1011
|
-
currentBreakpoint: this.currentBreakpoint,
|
|
1012
|
-
};
|
|
1013
|
-
}
|
|
1014
|
-
/**
|
|
1015
|
-
* Sets initial safe-area overrides before modal animation.
|
|
1016
|
-
* Called in present() before animation starts.
|
|
1017
|
-
*
|
|
1018
|
-
* For sheet modals, the SCSS --height formula uses --ion-modal-offset-top
|
|
1019
|
-
* (an internal property) instead of --ion-safe-area-top. We resolve the
|
|
1020
|
-
* root safe-area-top to pixels and set --ion-modal-offset-top, decoupling
|
|
1021
|
-
* the height calculation from --ion-safe-area-top (which is zeroed for
|
|
1022
|
-
* sheets to prevent header content from getting double-offset padding).
|
|
1023
|
-
*/
|
|
1024
|
-
setInitialSafeAreaOverrides() {
|
|
1025
|
-
const context = this.getSafeAreaContext();
|
|
1026
|
-
const safeAreaConfig = getInitialSafeAreaConfig(context);
|
|
1027
|
-
applySafeAreaOverrides(this.el, safeAreaConfig);
|
|
1028
|
-
// Set the internal offset property with the resolved root safe-area-top value
|
|
1029
|
-
if (context.isSheetModal) {
|
|
1030
|
-
this.updateSheetOffsetTop();
|
|
1031
|
-
}
|
|
1032
|
-
}
|
|
1033
|
-
/**
|
|
1034
|
-
* Resolves the current root --ion-safe-area-top value and sets the
|
|
1035
|
-
* internal --ion-modal-offset-top property on the host element.
|
|
1036
|
-
* Called on present and on resize (e.g., device rotation changes safe-area).
|
|
1037
|
-
*/
|
|
1038
|
-
updateSheetOffsetTop() {
|
|
1039
|
-
const safeAreaTop = getRootSafeAreaTop();
|
|
1040
|
-
this.el.style.setProperty('--ion-modal-offset-top', `${safeAreaTop}px`);
|
|
1041
|
-
}
|
|
1042
|
-
/**
|
|
1043
|
-
* Updates safe-area overrides during dynamic state changes.
|
|
1044
|
-
* Called after animations, during gestures, and on orientation changes.
|
|
1045
|
-
*/
|
|
1046
|
-
updateSafeAreaOverrides() {
|
|
1047
|
-
const { wrapperEl, el } = this;
|
|
1048
|
-
const context = this.getSafeAreaContext();
|
|
1049
|
-
// Sheet modals: safe-area is fully determined at presentation time
|
|
1050
|
-
// (top is always 0px, height is frozen). Nothing to update.
|
|
1051
|
-
if (context.isSheetModal)
|
|
1052
|
-
return;
|
|
1053
|
-
// Card modals have fixed safe-area requirements set by initial prediction.
|
|
1054
|
-
if (context.isCardModal)
|
|
1055
|
-
return;
|
|
1056
|
-
// wrapperEl is required for position-based detection below
|
|
1057
|
-
if (!wrapperEl)
|
|
1058
|
-
return;
|
|
1059
|
-
// Regular modals: use position-based detection to correctly handle both
|
|
1060
|
-
// fullscreen modals and centered dialogs with custom dimensions.
|
|
1061
|
-
const safeAreaConfig = getPositionBasedSafeAreaConfig(wrapperEl);
|
|
1062
|
-
applySafeAreaOverrides(el, safeAreaConfig);
|
|
1063
|
-
}
|
|
1064
|
-
/**
|
|
1065
|
-
* Applies padding-bottom to fullscreen modal wrapper to prevent
|
|
1066
|
-
* content from overlapping system navigation bar.
|
|
1067
|
-
*/
|
|
1068
|
-
applyFullscreenSafeArea() {
|
|
1069
|
-
const { wrapperEl, el } = this;
|
|
1070
|
-
if (!wrapperEl)
|
|
1071
|
-
return;
|
|
1072
|
-
const context = this.getSafeAreaContext();
|
|
1073
|
-
if (context.isSheetModal || context.isCardModal)
|
|
1074
|
-
return;
|
|
1075
|
-
// Check for standard Ionic layout children (ion-content, ion-footer),
|
|
1076
|
-
// searching one level deep for wrapped components (e.g.,
|
|
1077
|
-
// <app-footer><ion-footer>...</ion-footer></app-footer>).
|
|
1078
|
-
// Note: uses a manual loop instead of querySelector(':scope > ...') because
|
|
1079
|
-
// Stencil's mock-doc (used in spec tests) does not support :scope.
|
|
1080
|
-
let hasContent = false;
|
|
1081
|
-
let hasFooter = false;
|
|
1082
|
-
for (const child of Array.from(el.children)) {
|
|
1083
|
-
if (child.tagName === 'ION-CONTENT')
|
|
1084
|
-
hasContent = true;
|
|
1085
|
-
if (child.tagName === 'ION-FOOTER')
|
|
1086
|
-
hasFooter = true;
|
|
1087
|
-
for (const grandchild of Array.from(child.children)) {
|
|
1088
|
-
if (grandchild.tagName === 'ION-CONTENT')
|
|
1089
|
-
hasContent = true;
|
|
1090
|
-
if (grandchild.tagName === 'ION-FOOTER')
|
|
1091
|
-
hasFooter = true;
|
|
1092
|
-
}
|
|
1093
|
-
}
|
|
1094
|
-
// Only apply wrapper padding for standard Ionic layouts (has ion-content
|
|
1095
|
-
// but no ion-footer). Custom modals with raw HTML are fully
|
|
1096
|
-
// developer-controlled and should not be modified.
|
|
1097
|
-
if (!hasContent || hasFooter)
|
|
1098
|
-
return;
|
|
1099
|
-
// Reduce wrapper height by safe-area and add equivalent padding so the
|
|
1100
|
-
// total visual size stays the same but the flex content area shrinks.
|
|
1101
|
-
// Using height + padding instead of box-sizing: border-box avoids
|
|
1102
|
-
// breaking custom modals that set --border-width (border-box would
|
|
1103
|
-
// include the border inside the height, changing the layout).
|
|
1104
|
-
wrapperEl.style.setProperty('height', 'calc(var(--height) - var(--ion-safe-area-bottom, 0px))');
|
|
1105
|
-
wrapperEl.style.setProperty('padding-bottom', 'var(--ion-safe-area-bottom, 0px)');
|
|
1106
|
-
}
|
|
1107
|
-
/**
|
|
1108
|
-
* Clears all safe-area overrides and padding from wrapper.
|
|
1109
|
-
*/
|
|
1110
|
-
cleanupSafeAreaOverrides() {
|
|
1111
|
-
clearSafeAreaOverrides(this.el);
|
|
1112
|
-
// Remove internal sheet offset property
|
|
1113
|
-
this.el.style.removeProperty('--ion-modal-offset-top');
|
|
1114
|
-
if (this.wrapperEl) {
|
|
1115
|
-
this.wrapperEl.style.removeProperty('height');
|
|
1116
|
-
this.wrapperEl.style.removeProperty('padding-bottom');
|
|
1117
|
-
}
|
|
1118
|
-
}
|
|
1119
970
|
render() {
|
|
1120
971
|
const { handle, isSheetModal, presentingElement, htmlAttributes, handleBehavior, inheritedAttributes, focusTrap, expandToScroll, } = this;
|
|
1121
972
|
const showHandle = handle !== false && isSheetModal;
|
|
@@ -1123,20 +974,20 @@ export class Modal {
|
|
|
1123
974
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
1124
975
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
1125
976
|
const isSheetModalWithHandle = isSheetModal && showHandle;
|
|
1126
|
-
return (h(Host, Object.assign({ key: '
|
|
977
|
+
return (h(Host, Object.assign({ key: '978ba9cc81464b2d9b4caaf36285d5f7bf7e568d', "no-router": true,
|
|
1127
978
|
// Allow the modal to be navigable when the handle is focusable
|
|
1128
979
|
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
1129
980
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
1130
|
-
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, '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, onFocus: this.onModalFocus }), h("ion-backdrop", { key: '
|
|
981
|
+
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, '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, onFocus: this.onModalFocus }), h("ion-backdrop", { key: '9f95566d8e0c06bb9607f514484848c250f35f1f', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { key: '91ff26d4f3ab4367f3a2940f51c6a5a3d4c972c3', class: "modal-shadow" }), h("div", Object.assign({ key: '064b2dba13854505a4eb1f5e54296ac79cb7a2bd',
|
|
1131
982
|
/*
|
|
1132
983
|
role and aria-modal must be used on the
|
|
1133
984
|
same element. They must also be set inside the
|
|
1134
985
|
shadow DOM otherwise ion-button will not be highlighted
|
|
1135
986
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
1136
987
|
*/
|
|
1137
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: '
|
|
988
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: 'b579b08b114022032d078a527111456ceefc7b35', class: "modal-handle",
|
|
1138
989
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
1139
|
-
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), h("slot", { key: '
|
|
990
|
+
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), h("slot", { key: 'dacea58475b72d9c0209934ff31f3be6b9ac8c85', onSlotchange: this.onSlotChange }))));
|
|
1140
991
|
}
|
|
1141
992
|
static get is() { return "ion-modal"; }
|
|
1142
993
|
static get encapsulation() { return "shadow"; }
|
|
@@ -135,6 +135,10 @@ ion-backdrop {
|
|
|
135
135
|
:host {
|
|
136
136
|
--width: 600px;
|
|
137
137
|
--height: 500px;
|
|
138
|
+
--ion-safe-area-top: 0px;
|
|
139
|
+
--ion-safe-area-bottom: 0px;
|
|
140
|
+
--ion-safe-area-right: 0px;
|
|
141
|
+
--ion-safe-area-left: 0px;
|
|
138
142
|
}
|
|
139
143
|
}
|
|
140
144
|
@media only screen and (min-width: 768px) and (min-height: 768px) {
|
|
@@ -186,14 +190,9 @@ ion-backdrop {
|
|
|
186
190
|
/**
|
|
187
191
|
* Ensure that the sheet modal does not
|
|
188
192
|
* completely cover the content.
|
|
189
|
-
*
|
|
190
|
-
* --ion-modal-offset-top is an internal property set by modal.tsx
|
|
191
|
-
* with the resolved root safe-area-top pixel value. This decouples
|
|
192
|
-
* the height calculation from --ion-safe-area-top (which is zeroed
|
|
193
|
-
* for sheet modals to prevent header double-padding).
|
|
194
193
|
*/
|
|
195
194
|
:host(.modal-sheet) {
|
|
196
|
-
--height: calc(100% - (var(--ion-
|
|
195
|
+
--height: calc(100% - (var(--ion-safe-area-top) + 10px));
|
|
197
196
|
}
|
|
198
197
|
|
|
199
198
|
:host(.modal-sheet) .modal-wrapper,
|
|
@@ -828,7 +828,7 @@ export class Nav {
|
|
|
828
828
|
}
|
|
829
829
|
}
|
|
830
830
|
render() {
|
|
831
|
-
return h("slot", { key: '
|
|
831
|
+
return h("slot", { key: 'a549286b51b1bb23c9ef51f71148452228d0ab14' });
|
|
832
832
|
}
|
|
833
833
|
static get is() { return "ion-nav"; }
|
|
834
834
|
static get encapsulation() { return "shadow"; }
|
|
@@ -14,7 +14,7 @@ export class NavLink {
|
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
|
-
return h(Host, { key: '
|
|
17
|
+
return h(Host, { key: 'd4d80feb51c0d92b0bedf6952c892f9df3002046', onClick: this.onClick });
|
|
18
18
|
}
|
|
19
19
|
static get is() { return "ion-nav-link"; }
|
|
20
20
|
static get properties() {
|
|
@@ -10,9 +10,9 @@ import { getIonMode } from "../../global/ionic-global";
|
|
|
10
10
|
export class Note {
|
|
11
11
|
render() {
|
|
12
12
|
const mode = getIonMode(this);
|
|
13
|
-
return (h(Host, { key: '
|
|
13
|
+
return (h(Host, { key: 'b86a6acc9274df6528d224d4c11ab826a0f84dbc', class: createColorClasses(this.color, {
|
|
14
14
|
[mode]: true,
|
|
15
|
-
}) }, h("slot", { key: '
|
|
15
|
+
}) }, h("slot", { key: '5de76567ed7713827cd277a42db102faf34190c8' })));
|
|
16
16
|
}
|
|
17
17
|
static get is() { return "ion-note"; }
|
|
18
18
|
static get encapsulation() { return "shadow"; }
|
|
@@ -91,10 +91,10 @@ export class PickerColumnOption {
|
|
|
91
91
|
render() {
|
|
92
92
|
const { color, disabled, ariaLabel } = this;
|
|
93
93
|
const mode = getIonMode(this);
|
|
94
|
-
return (h(Host, { key: '
|
|
94
|
+
return (h(Host, { key: 'c45a1c14a351bf57d7113671164852349be5aa8a', class: createColorClasses(color, {
|
|
95
95
|
[mode]: true,
|
|
96
96
|
['option-disabled']: disabled,
|
|
97
|
-
}) }, h("div", { key: '
|
|
97
|
+
}) }, h("div", { key: '824930b658c6e3fb493ac4c6c2451d38c6bc4829', class: 'picker-column-option-button', role: "button", "aria-label": ariaLabel, onClick: () => this.onClick() }, h("slot", { key: '019df4dcf46e629bdbebcd46ed3ab29669feab27' }))));
|
|
98
98
|
}
|
|
99
99
|
static get is() { return "ion-picker-column-option"; }
|
|
100
100
|
static get encapsulation() { return "shadow"; }
|
|
@@ -207,11 +207,11 @@ export class Picker {
|
|
|
207
207
|
render() {
|
|
208
208
|
const { htmlAttributes } = this;
|
|
209
209
|
const mode = getIonMode(this);
|
|
210
|
-
return (h(Host, Object.assign({ key: '
|
|
210
|
+
return (h(Host, Object.assign({ key: '80f66d33780d8a1352d24be9cb63a0cc03d01ab5', "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
|
|
211
211
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
212
212
|
}, class: Object.assign({ [mode]: true,
|
|
213
213
|
// Used internally for styling
|
|
214
|
-
[`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), h("ion-backdrop", { key: '
|
|
214
|
+
[`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), h("ion-backdrop", { key: '97fb8e10ba08b197610cb8c0cdea61103883d55f', visible: this.showBackdrop, tappable: this.backdropDismiss }), h("div", { key: 'b3969cb6fbf7153623d14e3ca1493d3370efb211', tabindex: "0", "aria-hidden": "true" }), h("div", { key: '299268483c3727e698d9135bfdf40349a7050ac1', class: "picker-wrapper ion-overlay-wrapper", role: "dialog" }, h("div", { key: '95394de3ef691899b7dbf416f56fd3e86bbdce3f', class: "picker-toolbar" }, this.buttons.map((b) => (h("div", { class: buttonWrapperClass(b) }, h("button", { type: "button", onClick: () => this.buttonClick(b), class: buttonClass(b) }, b.text))))), h("div", { key: '05f18bb8d00dc0e22f691b7e41f90f729a6c66d7', class: "picker-columns" }, h("div", { key: '4a8fdf224effc0af67fd413e2e6aca8a78d1cf43', class: "picker-above-highlight" }), this.presented && this.columns.map((c) => h("ion-picker-legacy-column", { col: c })), h("div", { key: 'e50a31db45e3f39e9d0fed36a21be9257eec09bf', class: "picker-below-highlight" }))), h("div", { key: '5a78cb2176ac807ea0c195c6b76cd0e8eef9d4c0', tabindex: "0", "aria-hidden": "true" })));
|
|
215
215
|
}
|
|
216
216
|
static get is() { return "ion-picker-legacy"; }
|
|
217
217
|
static get encapsulation() { return "scoped"; }
|
|
@@ -335,9 +335,9 @@ export class PickerColumnCmp {
|
|
|
335
335
|
render() {
|
|
336
336
|
const col = this.col;
|
|
337
337
|
const mode = getIonMode(this);
|
|
338
|
-
return (h(Host, { key: '
|
|
338
|
+
return (h(Host, { key: '86125e95f18837dfd021db01777d72a1562d8ee3', class: Object.assign({ [mode]: true, 'picker-col': true, 'picker-opts-left': this.col.align === 'left', 'picker-opts-right': this.col.align === 'right' }, getClassMap(col.cssClass)), style: {
|
|
339
339
|
'max-width': this.col.columnWidth,
|
|
340
|
-
} }, col.prefix && (h("div", { key: '
|
|
340
|
+
} }, col.prefix && (h("div", { key: 'b0f3d39e0bd128781066ffefb7a1e40d12a9e76d', class: "picker-prefix", style: { width: col.prefixWidth } }, col.prefix)), h("div", { key: '0b106ac4d56916eaaa7f09d1b68348b3754b7bba', class: "picker-opts", style: { maxWidth: col.optionsWidth }, ref: (el) => (this.optsEl = el) }, col.options.map((o, index) => (h("button", { "aria-label": o.ariaLabel, class: { 'picker-opt': true, 'picker-opt-disabled': !!o.disabled }, "opt-index": index }, o.text)))), col.suffix && (h("div", { key: '00ff2f9dbb4561787e5a5223327c6a2a33f8362e', class: "picker-suffix", style: { width: col.suffixWidth } }, col.suffix))));
|
|
341
341
|
}
|
|
342
342
|
static get is() { return "ion-picker-legacy-column"; }
|
|
343
343
|
static get originalStyleUrls() {
|
|
@@ -3,17 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { createAnimation } from "../../../utils/animation/animation";
|
|
5
5
|
import { getElementRoot } from "../../../utils/helpers";
|
|
6
|
-
import { calculateWindowAdjustment, getArrowDimensions, getPopoverDimensions, getPopoverPosition,
|
|
6
|
+
import { calculateWindowAdjustment, getArrowDimensions, getPopoverDimensions, getPopoverPosition, shouldShowArrow, } from "../utils";
|
|
7
7
|
const POPOVER_IOS_BODY_PADDING = 5;
|
|
8
|
-
/**
|
|
9
|
-
* Minimum edge margin for iOS popovers ensures visual spacing from screen
|
|
10
|
-
* edges on devices without safe areas (e.g., older iPhones without notches).
|
|
11
|
-
* Previously this was a hardcoded `safeAreaMargin = 25` that served dual
|
|
12
|
-
* purpose: safe-area avoidance AND visual spacing. Now that actual safe-area
|
|
13
|
-
* insets are read dynamically, this floor preserves the visual spacing when
|
|
14
|
-
* safe-area values are 0.
|
|
15
|
-
*/
|
|
16
|
-
const POPOVER_IOS_MIN_EDGE_MARGIN = 25;
|
|
17
8
|
/**
|
|
18
9
|
* iOS Popover Enter Animation
|
|
19
10
|
*/
|
|
@@ -39,16 +30,8 @@ export const iosEnterAnimation = (baseEl, opts) => {
|
|
|
39
30
|
};
|
|
40
31
|
const results = getPopoverPosition(isRTL, contentWidth, contentHeight, arrowWidth, arrowHeight, reference, side, align, defaultPosition, trigger, ev);
|
|
41
32
|
const padding = size === 'cover' ? 0 : POPOVER_IOS_BODY_PADDING;
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
? { top: 0, bottom: 0, left: 0, right: 0 }
|
|
45
|
-
: {
|
|
46
|
-
top: Math.max(rawSafeArea.top, POPOVER_IOS_MIN_EDGE_MARGIN),
|
|
47
|
-
bottom: Math.max(rawSafeArea.bottom, POPOVER_IOS_MIN_EDGE_MARGIN),
|
|
48
|
-
left: Math.max(rawSafeArea.left, POPOVER_IOS_MIN_EDGE_MARGIN),
|
|
49
|
-
right: Math.max(rawSafeArea.right, POPOVER_IOS_MIN_EDGE_MARGIN),
|
|
50
|
-
};
|
|
51
|
-
const { originX, originY, top, left, bottom, checkSafeAreaLeft, checkSafeAreaRight, checkSafeAreaTop, checkSafeAreaBottom, arrowTop, arrowLeft, addPopoverBottomClass, hideArrow, } = calculateWindowAdjustment(side, results.top, results.left, padding, bodyWidth, bodyHeight, contentWidth, contentHeight, safeArea, results.originX, results.originY, results.referenceCoordinates, results.arrowTop, results.arrowLeft, arrowHeight);
|
|
33
|
+
const margin = size === 'cover' ? 0 : 25;
|
|
34
|
+
const { originX, originY, top, left, bottom, checkSafeAreaLeft, checkSafeAreaRight, arrowTop, arrowLeft, addPopoverBottomClass, } = calculateWindowAdjustment(side, results.top, results.left, padding, bodyWidth, bodyHeight, contentWidth, contentHeight, margin, results.originX, results.originY, results.referenceCoordinates, results.arrowTop, results.arrowLeft, arrowHeight);
|
|
52
35
|
const baseAnimation = createAnimation();
|
|
53
36
|
const backdropAnimation = createAnimation();
|
|
54
37
|
const contentAnimation = createAnimation();
|
|
@@ -79,14 +62,10 @@ export const iosEnterAnimation = (baseEl, opts) => {
|
|
|
79
62
|
baseEl.classList.add('popover-bottom');
|
|
80
63
|
}
|
|
81
64
|
if (bottom !== undefined) {
|
|
82
|
-
|
|
83
|
-
if (checkSafeAreaBottom) {
|
|
84
|
-
bottomValue = `${bottom}px + var(--ion-safe-area-bottom, 0px)`;
|
|
85
|
-
}
|
|
86
|
-
contentEl.style.setProperty('bottom', `calc(${bottomValue})`);
|
|
65
|
+
contentEl.style.setProperty('bottom', `${bottom}px`);
|
|
87
66
|
}
|
|
88
|
-
const safeAreaLeft = ' + var(--ion-safe-area-left,
|
|
89
|
-
const safeAreaRight = ' - var(--ion-safe-area-right,
|
|
67
|
+
const safeAreaLeft = ' + var(--ion-safe-area-left, 0)';
|
|
68
|
+
const safeAreaRight = ' - var(--ion-safe-area-right, 0)';
|
|
90
69
|
let leftValue = `${left}px`;
|
|
91
70
|
if (checkSafeAreaLeft) {
|
|
92
71
|
leftValue = `${left}px${safeAreaLeft}`;
|
|
@@ -94,16 +73,12 @@ export const iosEnterAnimation = (baseEl, opts) => {
|
|
|
94
73
|
if (checkSafeAreaRight) {
|
|
95
74
|
leftValue = `${left}px${safeAreaRight}`;
|
|
96
75
|
}
|
|
97
|
-
|
|
98
|
-
if (checkSafeAreaTop) {
|
|
99
|
-
topValue = `${top}px + var(--ion-safe-area-top, 0px)`;
|
|
100
|
-
}
|
|
101
|
-
contentEl.style.setProperty('top', `calc(${topValue} + var(--offset-y, 0))`);
|
|
76
|
+
contentEl.style.setProperty('top', `calc(${top}px + var(--offset-y, 0))`);
|
|
102
77
|
contentEl.style.setProperty('left', `calc(${leftValue} + var(--offset-x, 0))`);
|
|
103
78
|
contentEl.style.setProperty('transform-origin', `${originY} ${originX}`);
|
|
104
79
|
if (arrowEl !== null) {
|
|
105
80
|
const didAdjustBounds = results.top !== top || results.left !== left;
|
|
106
|
-
const showArrow =
|
|
81
|
+
const showArrow = shouldShowArrow(side, didAdjustBounds, ev, trigger);
|
|
107
82
|
if (showArrow) {
|
|
108
83
|
arrowEl.style.setProperty('top', `calc(${arrowTop}px + var(--offset-y, 0))`);
|
|
109
84
|
arrowEl.style.setProperty('left', `calc(${arrowLeft}px + var(--offset-x, 0))`);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { createAnimation } from "../../../utils/animation/animation";
|
|
5
5
|
import { getElementRoot } from "../../../utils/helpers";
|
|
6
|
-
import { calculateWindowAdjustment, getPopoverDimensions, getPopoverPosition
|
|
6
|
+
import { calculateWindowAdjustment, getPopoverDimensions, getPopoverPosition } from "../utils";
|
|
7
7
|
const POPOVER_MD_BODY_PADDING = 12;
|
|
8
8
|
/**
|
|
9
9
|
* Md Popover Enter Animation
|
|
@@ -28,23 +28,7 @@ export const mdEnterAnimation = (baseEl, opts) => {
|
|
|
28
28
|
};
|
|
29
29
|
const results = getPopoverPosition(isRTL, contentWidth, contentHeight, 0, 0, reference, side, align, defaultPosition, trigger, ev);
|
|
30
30
|
const padding = size === 'cover' ? 0 : POPOVER_MD_BODY_PADDING;
|
|
31
|
-
|
|
32
|
-
// This is needed for Android edge-to-edge (API 36+) where system bars overlap content.
|
|
33
|
-
const safeArea = size === 'cover' ? { top: 0, bottom: 0, left: 0, right: 0 } : getSafeAreaInsets(doc);
|
|
34
|
-
const { originX, originY, top, left, bottom, checkSafeAreaLeft, checkSafeAreaRight, checkSafeAreaTop, checkSafeAreaBottom, addPopoverBottomClass, } = calculateWindowAdjustment(side, results.top, results.left, padding, bodyWidth, bodyHeight, contentWidth, contentHeight, safeArea, results.originX, results.originY, results.referenceCoordinates);
|
|
35
|
-
const safeAreaLeftCalc = ' + var(--ion-safe-area-left, 0px)';
|
|
36
|
-
const safeAreaRightCalc = ' - var(--ion-safe-area-right, 0px)';
|
|
37
|
-
let leftValue = `${left}px`;
|
|
38
|
-
if (checkSafeAreaLeft) {
|
|
39
|
-
leftValue = `${left}px${safeAreaLeftCalc}`;
|
|
40
|
-
}
|
|
41
|
-
if (checkSafeAreaRight) {
|
|
42
|
-
leftValue = `${left}px${safeAreaRightCalc}`;
|
|
43
|
-
}
|
|
44
|
-
let topValue = `${top}px`;
|
|
45
|
-
if (checkSafeAreaTop) {
|
|
46
|
-
topValue = `${top}px + var(--ion-safe-area-top, 0px)`;
|
|
47
|
-
}
|
|
31
|
+
const { originX, originY, top, left, bottom } = calculateWindowAdjustment(side, results.top, results.left, padding, bodyWidth, bodyHeight, contentWidth, contentHeight, 0, results.originX, results.originY, results.referenceCoordinates);
|
|
48
32
|
const baseAnimation = createAnimation();
|
|
49
33
|
const backdropAnimation = createAnimation();
|
|
50
34
|
const wrapperAnimation = createAnimation();
|
|
@@ -61,17 +45,13 @@ export const mdEnterAnimation = (baseEl, opts) => {
|
|
|
61
45
|
contentAnimation
|
|
62
46
|
.addElement(contentEl)
|
|
63
47
|
.beforeStyles({
|
|
64
|
-
top: `calc(${
|
|
65
|
-
left: `calc(${
|
|
48
|
+
top: `calc(${top}px + var(--offset-y, 0px))`,
|
|
49
|
+
left: `calc(${left}px + var(--offset-x, 0px))`,
|
|
66
50
|
'transform-origin': `${originY} ${originX}`,
|
|
67
51
|
})
|
|
68
52
|
.beforeAddWrite(() => {
|
|
69
53
|
if (bottom !== undefined) {
|
|
70
|
-
|
|
71
|
-
if (checkSafeAreaBottom) {
|
|
72
|
-
bottomValue = `${bottom}px + var(--ion-safe-area-bottom, 0px)`;
|
|
73
|
-
}
|
|
74
|
-
contentEl.style.setProperty('bottom', `calc(${bottomValue})`);
|
|
54
|
+
contentEl.style.setProperty('bottom', `${bottom}px`);
|
|
75
55
|
}
|
|
76
56
|
})
|
|
77
57
|
.fromTo('transform', 'scale(0.8)', 'scale(1)');
|
|
@@ -83,7 +63,7 @@ export const mdEnterAnimation = (baseEl, opts) => {
|
|
|
83
63
|
if (size === 'cover') {
|
|
84
64
|
baseEl.style.setProperty('--width', `${contentWidth}px`);
|
|
85
65
|
}
|
|
86
|
-
if (
|
|
66
|
+
if (originY === 'bottom') {
|
|
87
67
|
baseEl.classList.add('popover-bottom');
|
|
88
68
|
}
|
|
89
69
|
})
|
|
@@ -467,9 +467,9 @@ export class Popover {
|
|
|
467
467
|
const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes, focusTrap } = this;
|
|
468
468
|
const desktop = isPlatform('desktop');
|
|
469
469
|
const enableArrow = arrow && !parentPopover;
|
|
470
|
-
return (h(Host, Object.assign({ key: '
|
|
470
|
+
return (h(Host, Object.assign({ key: '2edd8333c630efbce59071f8a383e4326e928dbc', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
471
471
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
472
|
-
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && h("ion-backdrop", { key: '
|
|
472
|
+
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && h("ion-backdrop", { key: 'aac4e68b08197534375e8ea3f8c9ea0c10ab2af4', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), h("div", { key: 'b7f4ebf57d4148b32856b0075d286f454be8de5d', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && h("div", { key: '607d94c28d73e8e957175a7c0f6e8a99ec4dcd53', class: "popover-arrow", part: "arrow" }), h("div", { key: '4366a5a5de550c09895e923f345583508e1ec30c', class: "popover-content", part: "content" }, h("slot", { key: 'eb7886fbc99c15b667b7d825d24f1c12d9380f03' })))));
|
|
473
473
|
}
|
|
474
474
|
static get is() { return "ion-popover"; }
|
|
475
475
|
static get encapsulation() { return "shadow"; }
|