@ionic/core 8.7.12-dev.11764957130.14454872 → 8.7.12-dev.11764961567.138743ff
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/modal.js +77 -63
- package/components/overlays.js +15 -11
- package/css/core.css +1 -1
- package/css/core.css.map +1 -1
- package/css/ionic.bundle.css +1 -1
- package/css/ionic.bundle.css.map +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/ion-action-sheet.cjs.entry.js +1 -1
- package/dist/cjs/ion-alert.cjs.entry.js +1 -1
- package/dist/cjs/ion-datetime_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-loading.cjs.entry.js +1 -1
- package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-modal.cjs.entry.js +78 -64
- package/dist/cjs/ion-popover.cjs.entry.js +1 -1
- package/dist/cjs/ion-select-modal.cjs.entry.js +1 -1
- package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-toast.cjs.entry.js +1 -1
- package/dist/cjs/{overlays-DxIZwUXI.js → overlays-D3xMmZCY.js} +15 -11
- package/dist/collection/components/modal/modal.ios.css +0 -14
- package/dist/collection/components/modal/modal.js +75 -61
- package/dist/collection/components/modal/modal.md.css +0 -14
- package/dist/collection/utils/overlays.js +15 -11
- package/dist/docs.json +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/ion-action-sheet.entry.js +1 -1
- package/dist/esm/ion-alert.entry.js +1 -1
- package/dist/esm/ion-datetime_3.entry.js +1 -1
- package/dist/esm/ion-loading.entry.js +1 -1
- package/dist/esm/ion-menu_3.entry.js +1 -1
- package/dist/esm/ion-modal.entry.js +78 -64
- package/dist/esm/ion-popover.entry.js +1 -1
- package/dist/esm/ion-select-modal.entry.js +1 -1
- package/dist/esm/ion-select_3.entry.js +1 -1
- package/dist/esm/ion-toast.entry.js +1 -1
- package/dist/esm/{overlays-BymNv-BL.js → overlays-DYKBVm6h.js} +15 -11
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-e16b69e1.entry.js → p-038f3a87.entry.js} +1 -1
- package/dist/ionic/{p-510d86e1.entry.js → p-1cf19c5a.entry.js} +1 -1
- package/dist/ionic/{p-0b80d700.entry.js → p-3fad4ab5.entry.js} +1 -1
- package/dist/ionic/{p-98fc09eb.entry.js → p-7928cc4d.entry.js} +1 -1
- package/dist/ionic/p-90969bdf.entry.js +4 -0
- package/dist/ionic/{p-cb93126d.entry.js → p-985f02a8.entry.js} +1 -1
- package/dist/ionic/p-CHK505Co.js +4 -0
- package/dist/ionic/{p-15193d01.entry.js → p-a480563a.entry.js} +1 -1
- package/dist/ionic/{p-7da39a4d.entry.js → p-b4b6513a.entry.js} +1 -1
- package/dist/ionic/{p-83be404e.entry.js → p-caa8efa1.entry.js} +1 -1
- package/dist/ionic/{p-7380261c.entry.js → p-ede27a66.entry.js} +1 -1
- package/dist/types/components/modal/modal.d.ts +13 -1
- package/hydrate/index.js +92 -74
- package/hydrate/index.mjs +92 -74
- package/package.json +1 -1
- package/dist/ionic/p-1b1cb250.entry.js +0 -4
- package/dist/ionic/p-D87hU-Ly.js +0 -4
|
@@ -423,7 +423,7 @@ export const setRootAriaHidden = (hidden = false) => {
|
|
|
423
423
|
}
|
|
424
424
|
};
|
|
425
425
|
export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts) => {
|
|
426
|
-
var _a, _b;
|
|
426
|
+
var _a, _b, _c;
|
|
427
427
|
if (overlay.presented) {
|
|
428
428
|
return;
|
|
429
429
|
}
|
|
@@ -457,9 +457,10 @@ export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation
|
|
|
457
457
|
*/
|
|
458
458
|
const overlayEl = overlay.el;
|
|
459
459
|
const shouldTrapFocus = overlayEl.tagName !== 'ION-TOAST' && overlayEl.focusTrap !== false;
|
|
460
|
-
// Only lock out root content when backdrop is active. Developers relying on
|
|
461
|
-
// expect background interaction
|
|
462
|
-
const
|
|
460
|
+
// Only lock out root content when backdrop is always active. Developers relying on
|
|
461
|
+
// showBackdrop=false or backdropBreakpoint expect background interaction at some point.
|
|
462
|
+
const backdropAlwaysActive = overlayEl.showBackdrop !== false && !(((_a = overlayEl.backdropBreakpoint) !== null && _a !== void 0 ? _a : 0) > 0);
|
|
463
|
+
const shouldLockRoot = shouldTrapFocus && backdropAlwaysActive;
|
|
463
464
|
overlay.presented = true;
|
|
464
465
|
overlay.willPresent.emit();
|
|
465
466
|
if (shouldLockRoot) {
|
|
@@ -471,7 +472,7 @@ export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation
|
|
|
471
472
|
}
|
|
472
473
|
document.body.classList.add(BACKDROP_NO_SCROLL);
|
|
473
474
|
}
|
|
474
|
-
(
|
|
475
|
+
(_b = overlay.willPresentShorthand) === null || _b === void 0 ? void 0 : _b.emit();
|
|
475
476
|
const mode = getIonMode(overlay);
|
|
476
477
|
// get the user's animation fn if one was provided
|
|
477
478
|
const animationBuilder = overlay.enterAnimation
|
|
@@ -480,7 +481,7 @@ export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation
|
|
|
480
481
|
const completed = await overlayAnimation(overlay, animationBuilder, overlay.el, opts);
|
|
481
482
|
if (completed) {
|
|
482
483
|
overlay.didPresent.emit();
|
|
483
|
-
(
|
|
484
|
+
(_c = overlay.didPresentShorthand) === null || _c === void 0 ? void 0 : _c.emit();
|
|
484
485
|
}
|
|
485
486
|
/**
|
|
486
487
|
* If the focused element is already
|
|
@@ -558,7 +559,7 @@ const restoreElementFocus = async (overlayEl) => {
|
|
|
558
559
|
}
|
|
559
560
|
};
|
|
560
561
|
export const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnimation, opts) => {
|
|
561
|
-
var _a, _b;
|
|
562
|
+
var _a, _b, _c;
|
|
562
563
|
if (!overlay.presented) {
|
|
563
564
|
return false;
|
|
564
565
|
}
|
|
@@ -574,11 +575,14 @@ export const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLe
|
|
|
574
575
|
* is dismissed.
|
|
575
576
|
*/
|
|
576
577
|
const overlaysLockingRoot = presentedOverlays.filter((o) => {
|
|
578
|
+
var _a;
|
|
577
579
|
const el = o;
|
|
578
|
-
|
|
580
|
+
const backdropAlwaysActive = el.showBackdrop !== false && !(((_a = el.backdropBreakpoint) !== null && _a !== void 0 ? _a : 0) > 0);
|
|
581
|
+
return el.tagName !== 'ION-TOAST' && el.focusTrap !== false && backdropAlwaysActive;
|
|
579
582
|
});
|
|
580
583
|
const overlayEl = overlay.el;
|
|
581
|
-
const
|
|
584
|
+
const backdropAlwaysActive = overlayEl.showBackdrop !== false && !(((_a = overlayEl.backdropBreakpoint) !== null && _a !== void 0 ? _a : 0) > 0);
|
|
585
|
+
const locksRoot = overlayEl.tagName !== 'ION-TOAST' && overlayEl.focusTrap !== false && backdropAlwaysActive;
|
|
582
586
|
/**
|
|
583
587
|
* If this is the last visible overlay that is trapping focus
|
|
584
588
|
* then we want to re-add the root to the accessibility tree.
|
|
@@ -593,7 +597,7 @@ export const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLe
|
|
|
593
597
|
// Overlay contents should not be clickable during dismiss
|
|
594
598
|
overlay.el.style.setProperty('pointer-events', 'none');
|
|
595
599
|
overlay.willDismiss.emit({ data, role });
|
|
596
|
-
(
|
|
600
|
+
(_b = overlay.willDismissShorthand) === null || _b === void 0 ? void 0 : _b.emit({ data, role });
|
|
597
601
|
const mode = getIonMode(overlay);
|
|
598
602
|
const animationBuilder = overlay.leaveAnimation
|
|
599
603
|
? overlay.leaveAnimation
|
|
@@ -603,7 +607,7 @@ export const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLe
|
|
|
603
607
|
await overlayAnimation(overlay, animationBuilder, overlay.el, opts);
|
|
604
608
|
}
|
|
605
609
|
overlay.didDismiss.emit({ data, role });
|
|
606
|
-
(
|
|
610
|
+
(_c = overlay.didDismissShorthand) === null || _c === void 0 ? void 0 : _c.emit({ data, role });
|
|
607
611
|
// Get a reference to all animations currently assigned to this overlay
|
|
608
612
|
// Then tear them down to return the overlay to its initial visual state
|
|
609
613
|
const animations = activeAnimations.get(overlay) || [];
|
package/dist/docs.json
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -13,7 +13,7 @@ export { L as LogLevel } from './index-C8IsBmNU.js';
|
|
|
13
13
|
export { I as IonicSafeString, g as getMode, s as setupConfig } from './config-mCdtaoPe.js';
|
|
14
14
|
export { o as openURL } from './theme-DiVJyqlX.js';
|
|
15
15
|
export { m as menuController } from './index-CvDIirVx.js';
|
|
16
|
-
export { b as actionSheetController, a as alertController, l as loadingController, m as modalController, p as pickerController, c as popoverController, t as toastController } from './overlays-
|
|
16
|
+
export { b as actionSheetController, a as alertController, l as loadingController, m as modalController, p as pickerController, c as popoverController, t as toastController } from './overlays-DYKBVm6h.js';
|
|
17
17
|
import './index-ZjP4CjeZ.js';
|
|
18
18
|
import './gesture-controller-BTEOs1at.js';
|
|
19
19
|
import './hardware-back-button-CPLxO-Ev.js';
|
|
@@ -5,7 +5,7 @@ import { r as registerInstance, c as createEvent, a as readTask, h, d as Host, g
|
|
|
5
5
|
import { c as createButtonActiveGesture } from './button-active-L570Swow.js';
|
|
6
6
|
import { r as raf } from './helpers-DEn3pfjm.js';
|
|
7
7
|
import { c as createLockController } from './lock-controller-B-hirT0v.js';
|
|
8
|
-
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, f as present, g as dismiss, h as eventMethod, s as safeCall, j as prepareOverlay, k as setOverlayId } from './overlays-
|
|
8
|
+
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, f as present, g as dismiss, h as eventMethod, s as safeCall, j as prepareOverlay, k as setOverlayId } from './overlays-DYKBVm6h.js';
|
|
9
9
|
import { g as getClassMap } from './theme-DiVJyqlX.js';
|
|
10
10
|
import { b as getIonMode } from './ionic-global-CDrldh-5.js';
|
|
11
11
|
import { c as createAnimation } from './animation-Dt8bGnA-.js';
|
|
@@ -6,7 +6,7 @@ import { E as ENABLE_HTML_CONTENT_DEFAULT, a as sanitizeDOMString } from './conf
|
|
|
6
6
|
import { c as createButtonActiveGesture } from './button-active-L570Swow.js';
|
|
7
7
|
import { r as raf } from './helpers-DEn3pfjm.js';
|
|
8
8
|
import { c as createLockController } from './lock-controller-B-hirT0v.js';
|
|
9
|
-
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall } from './overlays-
|
|
9
|
+
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall } from './overlays-DYKBVm6h.js';
|
|
10
10
|
import { g as getClassMap } from './theme-DiVJyqlX.js';
|
|
11
11
|
import { b as getIonMode } from './ionic-global-CDrldh-5.js';
|
|
12
12
|
import { c as createAnimation } from './animation-Dt8bGnA-.js';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { j as printIonError, f as printIonWarning, r as registerInstance, c as createEvent, w as writeTask, h, d as Host, g as getElement } from './index-C8IsBmNU.js';
|
|
5
5
|
import { startFocusVisible } from './focus-visible-BmVRXR1y.js';
|
|
6
6
|
import { r as raf, g as getElementRoot, a as renderHiddenInput, e as clamp } from './helpers-DEn3pfjm.js';
|
|
7
|
-
import { F as FOCUS_TRAP_DISABLE_CLASS, d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall } from './overlays-
|
|
7
|
+
import { F as FOCUS_TRAP_DISABLE_CLASS, d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall } from './overlays-DYKBVm6h.js';
|
|
8
8
|
import { i as isRTL } from './dir-C53feagD.js';
|
|
9
9
|
import { c as createColorClasses, g as getClassMap } from './theme-DiVJyqlX.js';
|
|
10
10
|
import { l as chevronDown, o as caretUpSharp, p as chevronForward, q as caretDownSharp, c as chevronBack } from './index-DV3sJJW8.js';
|
|
@@ -5,7 +5,7 @@ import { r as registerInstance, c as createEvent, e as config, h, d as Host, g a
|
|
|
5
5
|
import { E as ENABLE_HTML_CONTENT_DEFAULT, a as sanitizeDOMString } from './config-mCdtaoPe.js';
|
|
6
6
|
import { r as raf } from './helpers-DEn3pfjm.js';
|
|
7
7
|
import { c as createLockController } from './lock-controller-B-hirT0v.js';
|
|
8
|
-
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod } from './overlays-
|
|
8
|
+
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod } from './overlays-DYKBVm6h.js';
|
|
9
9
|
import { g as getClassMap } from './theme-DiVJyqlX.js';
|
|
10
10
|
import { b as getIonMode } from './ionic-global-CDrldh-5.js';
|
|
11
11
|
import { c as createAnimation } from './animation-Dt8bGnA-.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, c as createEvent, e as config, j as printIonError, h, d as Host, g as getElement } from './index-C8IsBmNU.js';
|
|
5
5
|
import { g as getTimeGivenProgression } from './cubic-bezier-hHmYLOfE.js';
|
|
6
|
-
import { o as getPresentedOverlay, B as BACKDROP, n as focusFirstDescendant, q as focusLastDescendant, G as GESTURE } from './overlays-
|
|
6
|
+
import { o as getPresentedOverlay, B as BACKDROP, n as focusFirstDescendant, q as focusLastDescendant, G as GESTURE } from './overlays-DYKBVm6h.js';
|
|
7
7
|
import { G as GESTURE_CONTROLLER } from './gesture-controller-BTEOs1at.js';
|
|
8
8
|
import { shouldUseCloseWatcher } from './hardware-back-button-CPLxO-Ev.js';
|
|
9
9
|
import { o as isEndSide, i as inheritAriaAttributes, l as assert, e as clamp } from './helpers-DEn3pfjm.js';
|
|
@@ -7,7 +7,7 @@ import { C as CoreDelegate, a as attachComponent, d as detachComponent } from '.
|
|
|
7
7
|
import { e as clamp, g as getElementRoot, r as raf, b as inheritAttributes, h as hasLazyBuild } from './helpers-DEn3pfjm.js';
|
|
8
8
|
import { c as createLockController } from './lock-controller-B-hirT0v.js';
|
|
9
9
|
import { g as getCapacitor } from './capacitor-CFERIeaU.js';
|
|
10
|
-
import { G as GESTURE, O as OVERLAY_GESTURE_PRIORITY, F as FOCUS_TRAP_DISABLE_CLASS, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod } from './overlays-
|
|
10
|
+
import { G as GESTURE, O as OVERLAY_GESTURE_PRIORITY, F as FOCUS_TRAP_DISABLE_CLASS, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod } from './overlays-DYKBVm6h.js';
|
|
11
11
|
import { g as getClassMap } from './theme-DiVJyqlX.js';
|
|
12
12
|
import { e as deepReady, w as waitForMount } from './index-r2D9DEro.js';
|
|
13
13
|
import { b as getIonMode } from './ionic-global-CDrldh-5.js';
|
|
@@ -1472,9 +1472,9 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
1472
1472
|
};
|
|
1473
1473
|
};
|
|
1474
1474
|
|
|
1475
|
-
const modalIosCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.
|
|
1475
|
+
const modalIosCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:\"\"}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}";
|
|
1476
1476
|
|
|
1477
|
-
const modalMdCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.
|
|
1477
|
+
const modalMdCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:\"\"}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}";
|
|
1478
1478
|
|
|
1479
1479
|
const Modal = class {
|
|
1480
1480
|
constructor(hostRef) {
|
|
@@ -1497,8 +1497,6 @@ const Modal = class {
|
|
|
1497
1497
|
this.inline = false;
|
|
1498
1498
|
// Whether or not modal is being dismissed via gesture
|
|
1499
1499
|
this.gestureAnimationDismissing = false;
|
|
1500
|
-
// Elements that had pointer-events disabled for background interaction
|
|
1501
|
-
this.pointerEventsDisabledElements = [];
|
|
1502
1500
|
this.presented = false;
|
|
1503
1501
|
/** @internal */
|
|
1504
1502
|
this.hasController = false;
|
|
@@ -1920,13 +1918,7 @@ const Modal = class {
|
|
|
1920
1918
|
};
|
|
1921
1919
|
window.addEventListener(KEYBOARD_DID_OPEN, this.keyboardOpenCallback);
|
|
1922
1920
|
}
|
|
1923
|
-
|
|
1924
|
-
* Recalculate isSheetModal here because framework bindings (e.g., Angular)
|
|
1925
|
-
* may not have been applied when componentWillLoad ran.
|
|
1926
|
-
*/
|
|
1927
|
-
const isSheetModal = this.breakpoints !== undefined && this.initialBreakpoint !== undefined;
|
|
1928
|
-
this.isSheetModal = isSheetModal;
|
|
1929
|
-
if (isSheetModal) {
|
|
1921
|
+
if (this.isSheetModal) {
|
|
1930
1922
|
this.initSheetGesture();
|
|
1931
1923
|
}
|
|
1932
1924
|
else if (hasCardModal) {
|
|
@@ -2009,49 +2001,77 @@ const Modal = class {
|
|
|
2009
2001
|
this.moveSheetToBreakpoint = moveSheetToBreakpoint;
|
|
2010
2002
|
this.gesture.enable(true);
|
|
2011
2003
|
/**
|
|
2012
|
-
* When
|
|
2013
|
-
*
|
|
2014
|
-
*
|
|
2015
|
-
* applies when the modal is in a child route (detected by the modal being
|
|
2016
|
-
* inside a route wrapper like ion-page). Disable pointer-events on the child
|
|
2017
|
-
* route's wrapper elements up to (and including) the first ion-router-outlet.
|
|
2018
|
-
* We stop there because parent elements may contain sibling content that
|
|
2019
|
-
* should remain interactive.
|
|
2004
|
+
* When backdrop interaction is allowed, nested router outlets from child routes
|
|
2005
|
+
* may block pointer events to parent content. Apply passthrough styles only when
|
|
2006
|
+
* the modal was the sole content of a child route page.
|
|
2020
2007
|
* See https://github.com/ionic-team/ionic-framework/issues/30700
|
|
2021
2008
|
*/
|
|
2022
|
-
const backdropNotBlocking = this.showBackdrop === false || this.focusTrap === false ||
|
|
2023
|
-
if (backdropNotBlocking
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2009
|
+
const backdropNotBlocking = this.showBackdrop === false || this.focusTrap === false || backdropBreakpoint > 0;
|
|
2010
|
+
if (backdropNotBlocking) {
|
|
2011
|
+
this.setupChildRoutePassthrough();
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
|
+
/**
|
|
2015
|
+
* For sheet modals that allow background interaction, sets up pointer-events
|
|
2016
|
+
* passthrough on child route page wrappers and nested router outlets.
|
|
2017
|
+
*/
|
|
2018
|
+
setupChildRoutePassthrough() {
|
|
2019
|
+
var _a;
|
|
2020
|
+
const pageParent = this.getOriginalPageParent();
|
|
2021
|
+
// Skip ion-app (controller modals) and pages with other content (inline modals)
|
|
2022
|
+
if (!pageParent || pageParent.tagName === 'ION-APP') {
|
|
2023
|
+
return;
|
|
2024
|
+
}
|
|
2025
|
+
const hasVisibleContent = Array.from(pageParent.children).some((child) => {
|
|
2026
|
+
var _a;
|
|
2027
|
+
if (child === this.el)
|
|
2028
|
+
return false;
|
|
2029
|
+
if (child instanceof HTMLElement && window.getComputedStyle(child).display === 'none')
|
|
2030
|
+
return false;
|
|
2031
|
+
if (child.tagName === 'TEMPLATE' || child.tagName === 'SLOT')
|
|
2032
|
+
return false;
|
|
2033
|
+
if (child.nodeType === Node.TEXT_NODE && !((_a = child.textContent) === null || _a === void 0 ? void 0 : _a.trim()))
|
|
2034
|
+
return false;
|
|
2035
|
+
return true;
|
|
2036
|
+
});
|
|
2037
|
+
if (hasVisibleContent) {
|
|
2038
|
+
return;
|
|
2039
|
+
}
|
|
2040
|
+
// Child route case: page only contained the modal
|
|
2041
|
+
pageParent.classList.add('ion-page-overlay-passthrough');
|
|
2042
|
+
// Also make nested router outlets passthrough
|
|
2043
|
+
const routerOutlet = pageParent.parentElement;
|
|
2044
|
+
if ((routerOutlet === null || routerOutlet === void 0 ? void 0 : routerOutlet.tagName) === 'ION-ROUTER-OUTLET' && ((_a = routerOutlet.parentElement) === null || _a === void 0 ? void 0 : _a.tagName) !== 'ION-APP') {
|
|
2045
|
+
routerOutlet.style.setProperty('pointer-events', 'none');
|
|
2046
|
+
routerOutlet.setAttribute('data-overlay-passthrough', 'true');
|
|
2047
|
+
}
|
|
2048
|
+
}
|
|
2049
|
+
/**
|
|
2050
|
+
* Finds the ion-page ancestor of the modal's original parent location.
|
|
2051
|
+
*/
|
|
2052
|
+
getOriginalPageParent() {
|
|
2053
|
+
if (!this.cachedOriginalParent) {
|
|
2054
|
+
return null;
|
|
2055
|
+
}
|
|
2056
|
+
let pageParent = this.cachedOriginalParent;
|
|
2057
|
+
while (pageParent && !pageParent.classList.contains('ion-page')) {
|
|
2058
|
+
pageParent = pageParent.parentElement;
|
|
2059
|
+
}
|
|
2060
|
+
return pageParent;
|
|
2061
|
+
}
|
|
2062
|
+
/**
|
|
2063
|
+
* Removes passthrough styles added by setupChildRoutePassthrough.
|
|
2064
|
+
*/
|
|
2065
|
+
cleanupChildRoutePassthrough() {
|
|
2066
|
+
const pageParent = this.getOriginalPageParent();
|
|
2067
|
+
if (!pageParent) {
|
|
2068
|
+
return;
|
|
2069
|
+
}
|
|
2070
|
+
pageParent.classList.remove('ion-page-overlay-passthrough');
|
|
2071
|
+
const routerOutlet = pageParent.parentElement;
|
|
2072
|
+
if (routerOutlet === null || routerOutlet === void 0 ? void 0 : routerOutlet.hasAttribute('data-overlay-passthrough')) {
|
|
2073
|
+
routerOutlet.style.removeProperty('pointer-events');
|
|
2074
|
+
routerOutlet.removeAttribute('data-overlay-passthrough');
|
|
2055
2075
|
}
|
|
2056
2076
|
}
|
|
2057
2077
|
sheetOnDismiss() {
|
|
@@ -2142,13 +2162,7 @@ const Modal = class {
|
|
|
2142
2162
|
}
|
|
2143
2163
|
this.cleanupViewTransitionListener();
|
|
2144
2164
|
this.cleanupParentRemovalObserver();
|
|
2145
|
-
|
|
2146
|
-
* Clean up pointer-events changes made in initSheetGesture.
|
|
2147
|
-
*/
|
|
2148
|
-
for (const element of this.pointerEventsDisabledElements) {
|
|
2149
|
-
element.style.removeProperty('pointer-events');
|
|
2150
|
-
}
|
|
2151
|
-
this.pointerEventsDisabledElements = [];
|
|
2165
|
+
this.cleanupChildRoutePassthrough();
|
|
2152
2166
|
}
|
|
2153
2167
|
this.currentBreakpoint = undefined;
|
|
2154
2168
|
this.animation = undefined;
|
|
@@ -2386,20 +2400,20 @@ const Modal = class {
|
|
|
2386
2400
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
2387
2401
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
2388
2402
|
const isSheetModalWithHandle = isSheetModal && showHandle;
|
|
2389
|
-
return (h(Host, Object.assign({ key: '
|
|
2403
|
+
return (h(Host, Object.assign({ key: '3bdb8abb1c5bccc9d3b20ed419c85144ccf4d209', "no-router": true,
|
|
2390
2404
|
// Allow the modal to be navigable when the handle is focusable
|
|
2391
2405
|
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
2392
2406
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
2393
|
-
}, 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: '
|
|
2407
|
+
}, 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: '7d15fea01ca56670cfdfcfe1e3b86b6e6353ee65', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { key: '875ed586a3c55dc19ba5ab97c37da8e09dc2afbe', class: "modal-shadow" }), h("div", Object.assign({ key: '4fc03a83d5b827c2aaaeaea386a966290f43eb99',
|
|
2394
2408
|
/*
|
|
2395
2409
|
role and aria-modal must be used on the
|
|
2396
2410
|
same element. They must also be set inside the
|
|
2397
2411
|
shadow DOM otherwise ion-button will not be highlighted
|
|
2398
2412
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
2399
2413
|
*/
|
|
2400
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: '
|
|
2414
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: 'dbae13fa667f3c974e3c88da7067d6426a92e83a', class: "modal-handle",
|
|
2401
2415
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
2402
|
-
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: '
|
|
2416
|
+
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: '0284e13c0dd87ba76e6b9982f25d1b41a1766bfc', onSlotchange: this.onSlotChange }))));
|
|
2403
2417
|
}
|
|
2404
2418
|
get el() { return getElement(this); }
|
|
2405
2419
|
static get watchers() { return {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, c as createEvent, f as printIonWarning, h, d as Host, g as getElement } from './index-C8IsBmNU.js';
|
|
5
|
-
import { B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, n as focusFirstDescendant, g as dismiss, h as eventMethod, F as FOCUS_TRAP_DISABLE_CLASS } from './overlays-
|
|
5
|
+
import { B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, n as focusFirstDescendant, g as dismiss, h as eventMethod, F as FOCUS_TRAP_DISABLE_CLASS } from './overlays-DYKBVm6h.js';
|
|
6
6
|
import { C as CoreDelegate, a as attachComponent, d as detachComponent } from './framework-delegate-BYawdMXj.js';
|
|
7
7
|
import { g as getElementRoot, r as raf, f as addEventListener, h as hasLazyBuild } from './helpers-DEn3pfjm.js';
|
|
8
8
|
import { c as createLockController } from './lock-controller-B-hirT0v.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, h, i as forceUpdate, d as Host, g as getElement } from './index-C8IsBmNU.js';
|
|
5
5
|
import { b as getIonMode } from './ionic-global-CDrldh-5.js';
|
|
6
|
-
import { s as safeCall } from './overlays-
|
|
6
|
+
import { s as safeCall } from './overlays-DYKBVm6h.js';
|
|
7
7
|
import { g as getClassMap } from './theme-DiVJyqlX.js';
|
|
8
8
|
import './index-ZjP4CjeZ.js';
|
|
9
9
|
import './helpers-DEn3pfjm.js';
|
|
@@ -6,7 +6,7 @@ import { c as createNotchController } from './notch-controller-BwelN_JM.js';
|
|
|
6
6
|
import { i as isOptionSelected, c as compareOptions } from './compare-with-utils-sObYyvOy.js';
|
|
7
7
|
import { c as checkInvalidState } from './validity-DJztqcrH.js';
|
|
8
8
|
import { b as inheritAttributes, a as renderHiddenInput, n as focusVisibleElement } from './helpers-DEn3pfjm.js';
|
|
9
|
-
import { c as popoverController, b as actionSheetController, a as alertController, m as modalController, s as safeCall } from './overlays-
|
|
9
|
+
import { c as popoverController, b as actionSheetController, a as alertController, m as modalController, s as safeCall } from './overlays-DYKBVm6h.js';
|
|
10
10
|
import { i as isRTL } from './dir-C53feagD.js';
|
|
11
11
|
import { h as hostContext, c as createColorClasses, g as getClassMap } from './theme-DiVJyqlX.js';
|
|
12
12
|
import { w as watchForOptions } from './watch-options-Dtdm8lKC.js';
|
|
@@ -5,7 +5,7 @@ import { f as printIonWarning, r as registerInstance, c as createEvent, e as con
|
|
|
5
5
|
import { E as ENABLE_HTML_CONTENT_DEFAULT, a as sanitizeDOMString } from './config-mCdtaoPe.js';
|
|
6
6
|
import { g as getElementRoot, r as raf } from './helpers-DEn3pfjm.js';
|
|
7
7
|
import { c as createLockController } from './lock-controller-B-hirT0v.js';
|
|
8
|
-
import { O as OVERLAY_GESTURE_PRIORITY, d as createDelegateController, e as createTriggerController, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall, G as GESTURE } from './overlays-
|
|
8
|
+
import { O as OVERLAY_GESTURE_PRIORITY, d as createDelegateController, e as createTriggerController, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall, G as GESTURE } from './overlays-DYKBVm6h.js';
|
|
9
9
|
import { c as createColorClasses, g as getClassMap } from './theme-DiVJyqlX.js';
|
|
10
10
|
import { b as getIonMode } from './ionic-global-CDrldh-5.js';
|
|
11
11
|
import { c as createAnimation } from './animation-Dt8bGnA-.js';
|
|
@@ -502,7 +502,7 @@ const setRootAriaHidden = (hidden = false) => {
|
|
|
502
502
|
}
|
|
503
503
|
};
|
|
504
504
|
const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts) => {
|
|
505
|
-
var _a, _b;
|
|
505
|
+
var _a, _b, _c;
|
|
506
506
|
if (overlay.presented) {
|
|
507
507
|
return;
|
|
508
508
|
}
|
|
@@ -536,9 +536,10 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
536
536
|
*/
|
|
537
537
|
const overlayEl = overlay.el;
|
|
538
538
|
const shouldTrapFocus = overlayEl.tagName !== 'ION-TOAST' && overlayEl.focusTrap !== false;
|
|
539
|
-
// Only lock out root content when backdrop is active. Developers relying on
|
|
540
|
-
// expect background interaction
|
|
541
|
-
const
|
|
539
|
+
// Only lock out root content when backdrop is always active. Developers relying on
|
|
540
|
+
// showBackdrop=false or backdropBreakpoint expect background interaction at some point.
|
|
541
|
+
const backdropAlwaysActive = overlayEl.showBackdrop !== false && !(((_a = overlayEl.backdropBreakpoint) !== null && _a !== void 0 ? _a : 0) > 0);
|
|
542
|
+
const shouldLockRoot = shouldTrapFocus && backdropAlwaysActive;
|
|
542
543
|
overlay.presented = true;
|
|
543
544
|
overlay.willPresent.emit();
|
|
544
545
|
if (shouldLockRoot) {
|
|
@@ -550,7 +551,7 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
550
551
|
}
|
|
551
552
|
document.body.classList.add(BACKDROP_NO_SCROLL);
|
|
552
553
|
}
|
|
553
|
-
(
|
|
554
|
+
(_b = overlay.willPresentShorthand) === null || _b === void 0 ? void 0 : _b.emit();
|
|
554
555
|
const mode = getIonMode(overlay);
|
|
555
556
|
// get the user's animation fn if one was provided
|
|
556
557
|
const animationBuilder = overlay.enterAnimation
|
|
@@ -559,7 +560,7 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
559
560
|
const completed = await overlayAnimation(overlay, animationBuilder, overlay.el, opts);
|
|
560
561
|
if (completed) {
|
|
561
562
|
overlay.didPresent.emit();
|
|
562
|
-
(
|
|
563
|
+
(_c = overlay.didPresentShorthand) === null || _c === void 0 ? void 0 : _c.emit();
|
|
563
564
|
}
|
|
564
565
|
/**
|
|
565
566
|
* If the focused element is already
|
|
@@ -637,7 +638,7 @@ const restoreElementFocus = async (overlayEl) => {
|
|
|
637
638
|
}
|
|
638
639
|
};
|
|
639
640
|
const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnimation, opts) => {
|
|
640
|
-
var _a, _b;
|
|
641
|
+
var _a, _b, _c;
|
|
641
642
|
if (!overlay.presented) {
|
|
642
643
|
return false;
|
|
643
644
|
}
|
|
@@ -653,11 +654,14 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
|
|
|
653
654
|
* is dismissed.
|
|
654
655
|
*/
|
|
655
656
|
const overlaysLockingRoot = presentedOverlays.filter((o) => {
|
|
657
|
+
var _a;
|
|
656
658
|
const el = o;
|
|
657
|
-
|
|
659
|
+
const backdropAlwaysActive = el.showBackdrop !== false && !(((_a = el.backdropBreakpoint) !== null && _a !== void 0 ? _a : 0) > 0);
|
|
660
|
+
return el.tagName !== 'ION-TOAST' && el.focusTrap !== false && backdropAlwaysActive;
|
|
658
661
|
});
|
|
659
662
|
const overlayEl = overlay.el;
|
|
660
|
-
const
|
|
663
|
+
const backdropAlwaysActive = overlayEl.showBackdrop !== false && !(((_a = overlayEl.backdropBreakpoint) !== null && _a !== void 0 ? _a : 0) > 0);
|
|
664
|
+
const locksRoot = overlayEl.tagName !== 'ION-TOAST' && overlayEl.focusTrap !== false && backdropAlwaysActive;
|
|
661
665
|
/**
|
|
662
666
|
* If this is the last visible overlay that is trapping focus
|
|
663
667
|
* then we want to re-add the root to the accessibility tree.
|
|
@@ -672,7 +676,7 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
|
|
|
672
676
|
// Overlay contents should not be clickable during dismiss
|
|
673
677
|
overlay.el.style.setProperty('pointer-events', 'none');
|
|
674
678
|
overlay.willDismiss.emit({ data, role });
|
|
675
|
-
(
|
|
679
|
+
(_b = overlay.willDismissShorthand) === null || _b === void 0 ? void 0 : _b.emit({ data, role });
|
|
676
680
|
const mode = getIonMode(overlay);
|
|
677
681
|
const animationBuilder = overlay.leaveAnimation
|
|
678
682
|
? overlay.leaveAnimation
|
|
@@ -682,7 +686,7 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
|
|
|
682
686
|
await overlayAnimation(overlay, animationBuilder, overlay.el, opts);
|
|
683
687
|
}
|
|
684
688
|
overlay.didDismiss.emit({ data, role });
|
|
685
|
-
(
|
|
689
|
+
(_c = overlay.didDismissShorthand) === null || _c === void 0 ? void 0 : _c.emit({ data, role });
|
|
686
690
|
// Get a reference to all animations currently assigned to this overlay
|
|
687
691
|
// Then tear them down to return the overlay to its initial visual state
|
|
688
692
|
const animations = activeAnimations.get(overlay) || [];
|
package/dist/ionic/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
export{c as createAnimation}from"./p-DDb5r57F.js";export{a as LIFECYCLE_DID_ENTER,c as LIFECYCLE_DID_LEAVE,L as LIFECYCLE_WILL_ENTER,b as LIFECYCLE_WILL_LEAVE,d as LIFECYCLE_WILL_UNLOAD,g as getIonPageElement}from"./p-DUt5fQmA.js";export{iosTransitionAnimation}from"./p-C7hRNDhM.js";export{mdTransitionAnimation}from"./p-DZRJwG4S.js";export{g as getTimeGivenProgression}from"./p-hHmYLOfE.js";export{createGesture}from"./p-Cl0B-RWe.js";export{g as getPlatforms,i as initialize,a as isPlatform}from"./p-BFvmZNyx.js";export{c as componentOnReady}from"./p-CTfR9YZG.js";export{L as LogLevel}from"./p-C8IsBmNU.js";export{I as IonicSafeString,g as getMode,s as setupConfig}from"./p-DbQ5QkTP.js";export{o as openURL}from"./p-DiVJyqlX.js";export{m as menuController}from"./p-DNcfiJwE.js";export{b as actionSheetController,a as alertController,l as loadingController,m as modalController,p as pickerController,c as popoverController,t as toastController}from"./p-
|
|
4
|
+
export{c as createAnimation}from"./p-DDb5r57F.js";export{a as LIFECYCLE_DID_ENTER,c as LIFECYCLE_DID_LEAVE,L as LIFECYCLE_WILL_ENTER,b as LIFECYCLE_WILL_LEAVE,d as LIFECYCLE_WILL_UNLOAD,g as getIonPageElement}from"./p-DUt5fQmA.js";export{iosTransitionAnimation}from"./p-C7hRNDhM.js";export{mdTransitionAnimation}from"./p-DZRJwG4S.js";export{g as getTimeGivenProgression}from"./p-hHmYLOfE.js";export{createGesture}from"./p-Cl0B-RWe.js";export{g as getPlatforms,i as initialize,a as isPlatform}from"./p-BFvmZNyx.js";export{c as componentOnReady}from"./p-CTfR9YZG.js";export{L as LogLevel}from"./p-C8IsBmNU.js";export{I as IonicSafeString,g as getMode,s as setupConfig}from"./p-DbQ5QkTP.js";export{o as openURL}from"./p-DiVJyqlX.js";export{m as menuController}from"./p-DNcfiJwE.js";export{b as actionSheetController,a as alertController,l as loadingController,m as modalController,p as pickerController,c as popoverController,t as toastController}from"./p-CHK505Co.js";import"./p-ZjP4CjeZ.js";import"./p-BTEOs1at.js";import"./p-B0q1YL7N.js";import"./p-D-eFFUkA.js";const e=e=>{const{swiper:o,extendParams:s}=e,t={effect:void 0,direction:"horizontal",initialSlide:0,loop:!1,parallax:!1,slidesPerView:1,spaceBetween:0,speed:300,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,touchEventsTarget:"container",freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,zoom:{maxRatio:3,minRatio:1,toggle:!1},touchRatio:1,touchAngle:45,simulateTouch:!0,touchStartPreventDefault:!1,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,threshold:0,touchMoveStopPropagation:!0,touchReleaseOnEdges:!1,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold:20,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loopAdditionalSlides:0,noSwiping:!0,runCallbacksOnInit:!0,coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0},flipEffect:{slideShadows:!0,limitRotation:!0},cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94},fadeEffect:{crossFade:!1},a11y:{prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide"}};o.pagination&&(t.pagination={type:"bullets",clickable:!1,hideOnClick:!1}),o.scrollbar&&(t.scrollbar={hide:!0}),s(t)};export{e as IonicSlides}
|