@ionic/core 8.7.12-dev.11764961567.138743ff → 8.7.12-dev.11765219790.17cbe2e9
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 +4 -78
- package/components/overlays.js +11 -15
- 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 +5 -79
- 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-D3xMmZCY.js → overlays-DxIZwUXI.js} +11 -15
- package/dist/collection/components/modal/modal.js +4 -78
- package/dist/collection/utils/overlays.js +11 -15
- 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 +5 -79
- 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-DYKBVm6h.js → overlays-BymNv-BL.js} +11 -15
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-3fad4ab5.entry.js → p-0b80d700.entry.js} +1 -1
- package/dist/ionic/{p-a480563a.entry.js → p-15193d01.entry.js} +1 -1
- package/dist/ionic/{p-1cf19c5a.entry.js → p-510d86e1.entry.js} +1 -1
- package/dist/ionic/{p-ede27a66.entry.js → p-7380261c.entry.js} +1 -1
- package/dist/ionic/{p-b4b6513a.entry.js → p-7da39a4d.entry.js} +1 -1
- package/dist/ionic/{p-caa8efa1.entry.js → p-83be404e.entry.js} +1 -1
- package/dist/ionic/{p-7928cc4d.entry.js → p-98fc09eb.entry.js} +1 -1
- package/dist/ionic/p-D87hU-Ly.js +4 -0
- package/dist/ionic/p-a80f1b04.entry.js +4 -0
- package/dist/ionic/{p-985f02a8.entry.js → p-cb93126d.entry.js} +1 -1
- package/dist/ionic/{p-038f3a87.entry.js → p-e16b69e1.entry.js} +1 -1
- package/dist/types/components/modal/modal.d.ts +0 -13
- package/hydrate/index.js +15 -93
- package/hydrate/index.mjs +15 -93
- package/package.json +1 -2
- package/dist/ionic/p-90969bdf.entry.js +0 -4
- package/dist/ionic/p-CHK505Co.js +0 -4
package/hydrate/index.js
CHANGED
|
@@ -6254,7 +6254,7 @@ const setRootAriaHidden = (hidden = false) => {
|
|
|
6254
6254
|
}
|
|
6255
6255
|
};
|
|
6256
6256
|
const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts) => {
|
|
6257
|
-
var _a, _b
|
|
6257
|
+
var _a, _b;
|
|
6258
6258
|
if (overlay.presented) {
|
|
6259
6259
|
return;
|
|
6260
6260
|
}
|
|
@@ -6288,10 +6288,9 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
6288
6288
|
*/
|
|
6289
6289
|
const overlayEl = overlay.el;
|
|
6290
6290
|
const shouldTrapFocus = overlayEl.tagName !== 'ION-TOAST' && overlayEl.focusTrap !== false;
|
|
6291
|
-
// Only lock out root content when backdrop is
|
|
6292
|
-
//
|
|
6293
|
-
const
|
|
6294
|
-
const shouldLockRoot = shouldTrapFocus && backdropAlwaysActive;
|
|
6291
|
+
// Only lock out root content when backdrop is active. Developers relying on showBackdrop=false
|
|
6292
|
+
// expect background interaction to remain enabled.
|
|
6293
|
+
const shouldLockRoot = shouldTrapFocus && overlayEl.showBackdrop !== false;
|
|
6295
6294
|
overlay.presented = true;
|
|
6296
6295
|
overlay.willPresent.emit();
|
|
6297
6296
|
if (shouldLockRoot) {
|
|
@@ -6303,7 +6302,7 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
6303
6302
|
}
|
|
6304
6303
|
document.body.classList.add(BACKDROP_NO_SCROLL);
|
|
6305
6304
|
}
|
|
6306
|
-
(
|
|
6305
|
+
(_a = overlay.willPresentShorthand) === null || _a === void 0 ? void 0 : _a.emit();
|
|
6307
6306
|
const mode = getIonMode$1(overlay);
|
|
6308
6307
|
// get the user's animation fn if one was provided
|
|
6309
6308
|
const animationBuilder = overlay.enterAnimation
|
|
@@ -6312,7 +6311,7 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
6312
6311
|
const completed = await overlayAnimation(overlay, animationBuilder, overlay.el, opts);
|
|
6313
6312
|
if (completed) {
|
|
6314
6313
|
overlay.didPresent.emit();
|
|
6315
|
-
(
|
|
6314
|
+
(_b = overlay.didPresentShorthand) === null || _b === void 0 ? void 0 : _b.emit();
|
|
6316
6315
|
}
|
|
6317
6316
|
/**
|
|
6318
6317
|
* If the focused element is already
|
|
@@ -6390,7 +6389,7 @@ const restoreElementFocus = async (overlayEl) => {
|
|
|
6390
6389
|
}
|
|
6391
6390
|
};
|
|
6392
6391
|
const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnimation, opts) => {
|
|
6393
|
-
var _a, _b
|
|
6392
|
+
var _a, _b;
|
|
6394
6393
|
if (!overlay.presented) {
|
|
6395
6394
|
return false;
|
|
6396
6395
|
}
|
|
@@ -6406,14 +6405,11 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
|
|
|
6406
6405
|
* is dismissed.
|
|
6407
6406
|
*/
|
|
6408
6407
|
const overlaysLockingRoot = presentedOverlays.filter((o) => {
|
|
6409
|
-
var _a;
|
|
6410
6408
|
const el = o;
|
|
6411
|
-
|
|
6412
|
-
return el.tagName !== 'ION-TOAST' && el.focusTrap !== false && backdropAlwaysActive;
|
|
6409
|
+
return el.tagName !== 'ION-TOAST' && el.focusTrap !== false && el.showBackdrop !== false;
|
|
6413
6410
|
});
|
|
6414
6411
|
const overlayEl = overlay.el;
|
|
6415
|
-
const
|
|
6416
|
-
const locksRoot = overlayEl.tagName !== 'ION-TOAST' && overlayEl.focusTrap !== false && backdropAlwaysActive;
|
|
6412
|
+
const locksRoot = overlayEl.tagName !== 'ION-TOAST' && overlayEl.focusTrap !== false && overlayEl.showBackdrop !== false;
|
|
6417
6413
|
/**
|
|
6418
6414
|
* If this is the last visible overlay that is trapping focus
|
|
6419
6415
|
* then we want to re-add the root to the accessibility tree.
|
|
@@ -6428,7 +6424,7 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
|
|
|
6428
6424
|
// Overlay contents should not be clickable during dismiss
|
|
6429
6425
|
overlay.el.style.setProperty('pointer-events', 'none');
|
|
6430
6426
|
overlay.willDismiss.emit({ data, role });
|
|
6431
|
-
(
|
|
6427
|
+
(_a = overlay.willDismissShorthand) === null || _a === void 0 ? void 0 : _a.emit({ data, role });
|
|
6432
6428
|
const mode = getIonMode$1(overlay);
|
|
6433
6429
|
const animationBuilder = overlay.leaveAnimation
|
|
6434
6430
|
? overlay.leaveAnimation
|
|
@@ -6438,7 +6434,7 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
|
|
|
6438
6434
|
await overlayAnimation(overlay, animationBuilder, overlay.el, opts);
|
|
6439
6435
|
}
|
|
6440
6436
|
overlay.didDismiss.emit({ data, role });
|
|
6441
|
-
(
|
|
6437
|
+
(_b = overlay.didDismissShorthand) === null || _b === void 0 ? void 0 : _b.emit({ data, role });
|
|
6442
6438
|
// Get a reference to all animations currently assigned to this overlay
|
|
6443
6439
|
// Then tear them down to return the overlay to its initial visual state
|
|
6444
6440
|
const animations = activeAnimations.get(overlay) || [];
|
|
@@ -23101,79 +23097,6 @@ class Modal {
|
|
|
23101
23097
|
this.gesture = gesture;
|
|
23102
23098
|
this.moveSheetToBreakpoint = moveSheetToBreakpoint;
|
|
23103
23099
|
this.gesture.enable(true);
|
|
23104
|
-
/**
|
|
23105
|
-
* When backdrop interaction is allowed, nested router outlets from child routes
|
|
23106
|
-
* may block pointer events to parent content. Apply passthrough styles only when
|
|
23107
|
-
* the modal was the sole content of a child route page.
|
|
23108
|
-
* See https://github.com/ionic-team/ionic-framework/issues/30700
|
|
23109
|
-
*/
|
|
23110
|
-
const backdropNotBlocking = this.showBackdrop === false || this.focusTrap === false || backdropBreakpoint > 0;
|
|
23111
|
-
if (backdropNotBlocking) {
|
|
23112
|
-
this.setupChildRoutePassthrough();
|
|
23113
|
-
}
|
|
23114
|
-
}
|
|
23115
|
-
/**
|
|
23116
|
-
* For sheet modals that allow background interaction, sets up pointer-events
|
|
23117
|
-
* passthrough on child route page wrappers and nested router outlets.
|
|
23118
|
-
*/
|
|
23119
|
-
setupChildRoutePassthrough() {
|
|
23120
|
-
var _a;
|
|
23121
|
-
const pageParent = this.getOriginalPageParent();
|
|
23122
|
-
// Skip ion-app (controller modals) and pages with other content (inline modals)
|
|
23123
|
-
if (!pageParent || pageParent.tagName === 'ION-APP') {
|
|
23124
|
-
return;
|
|
23125
|
-
}
|
|
23126
|
-
const hasVisibleContent = Array.from(pageParent.children).some((child) => {
|
|
23127
|
-
var _a;
|
|
23128
|
-
if (child === this.el)
|
|
23129
|
-
return false;
|
|
23130
|
-
if (child instanceof HTMLElement && window.getComputedStyle(child).display === 'none')
|
|
23131
|
-
return false;
|
|
23132
|
-
if (child.tagName === 'TEMPLATE' || child.tagName === 'SLOT')
|
|
23133
|
-
return false;
|
|
23134
|
-
if (child.nodeType === Node.TEXT_NODE && !((_a = child.textContent) === null || _a === void 0 ? void 0 : _a.trim()))
|
|
23135
|
-
return false;
|
|
23136
|
-
return true;
|
|
23137
|
-
});
|
|
23138
|
-
if (hasVisibleContent) {
|
|
23139
|
-
return;
|
|
23140
|
-
}
|
|
23141
|
-
// Child route case: page only contained the modal
|
|
23142
|
-
pageParent.classList.add('ion-page-overlay-passthrough');
|
|
23143
|
-
// Also make nested router outlets passthrough
|
|
23144
|
-
const routerOutlet = pageParent.parentElement;
|
|
23145
|
-
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') {
|
|
23146
|
-
routerOutlet.style.setProperty('pointer-events', 'none');
|
|
23147
|
-
routerOutlet.setAttribute('data-overlay-passthrough', 'true');
|
|
23148
|
-
}
|
|
23149
|
-
}
|
|
23150
|
-
/**
|
|
23151
|
-
* Finds the ion-page ancestor of the modal's original parent location.
|
|
23152
|
-
*/
|
|
23153
|
-
getOriginalPageParent() {
|
|
23154
|
-
if (!this.cachedOriginalParent) {
|
|
23155
|
-
return null;
|
|
23156
|
-
}
|
|
23157
|
-
let pageParent = this.cachedOriginalParent;
|
|
23158
|
-
while (pageParent && !pageParent.classList.contains('ion-page')) {
|
|
23159
|
-
pageParent = pageParent.parentElement;
|
|
23160
|
-
}
|
|
23161
|
-
return pageParent;
|
|
23162
|
-
}
|
|
23163
|
-
/**
|
|
23164
|
-
* Removes passthrough styles added by setupChildRoutePassthrough.
|
|
23165
|
-
*/
|
|
23166
|
-
cleanupChildRoutePassthrough() {
|
|
23167
|
-
const pageParent = this.getOriginalPageParent();
|
|
23168
|
-
if (!pageParent) {
|
|
23169
|
-
return;
|
|
23170
|
-
}
|
|
23171
|
-
pageParent.classList.remove('ion-page-overlay-passthrough');
|
|
23172
|
-
const routerOutlet = pageParent.parentElement;
|
|
23173
|
-
if (routerOutlet === null || routerOutlet === void 0 ? void 0 : routerOutlet.hasAttribute('data-overlay-passthrough')) {
|
|
23174
|
-
routerOutlet.style.removeProperty('pointer-events');
|
|
23175
|
-
routerOutlet.removeAttribute('data-overlay-passthrough');
|
|
23176
|
-
}
|
|
23177
23100
|
}
|
|
23178
23101
|
sheetOnDismiss() {
|
|
23179
23102
|
/**
|
|
@@ -23263,7 +23186,6 @@ class Modal {
|
|
|
23263
23186
|
}
|
|
23264
23187
|
this.cleanupViewTransitionListener();
|
|
23265
23188
|
this.cleanupParentRemovalObserver();
|
|
23266
|
-
this.cleanupChildRoutePassthrough();
|
|
23267
23189
|
}
|
|
23268
23190
|
this.currentBreakpoint = undefined;
|
|
23269
23191
|
this.animation = undefined;
|
|
@@ -23501,20 +23423,20 @@ class Modal {
|
|
|
23501
23423
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
23502
23424
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
23503
23425
|
const isSheetModalWithHandle = isSheetModal && showHandle;
|
|
23504
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
23426
|
+
return (hAsync(Host, Object.assign({ key: '9e9a7bd591eb17a225a00b4fa2e379e94601d17f', "no-router": true,
|
|
23505
23427
|
// Allow the modal to be navigable when the handle is focusable
|
|
23506
23428
|
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
23507
23429
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
23508
|
-
}, 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 }), hAsync("ion-backdrop", { key: '
|
|
23430
|
+
}, 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 }), hAsync("ion-backdrop", { key: 'e5eae2c14f830f75e308fcd7f4c10c86fac5b962', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { key: 'e268f9cd310c3cf4e051b5b92524ce4fb70d005e', class: "modal-shadow" }), hAsync("div", Object.assign({ key: '9c380f36c18144c153077b15744d1c3346bce63e',
|
|
23509
23431
|
/*
|
|
23510
23432
|
role and aria-modal must be used on the
|
|
23511
23433
|
same element. They must also be set inside the
|
|
23512
23434
|
shadow DOM otherwise ion-button will not be highlighted
|
|
23513
23435
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
23514
23436
|
*/
|
|
23515
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '
|
|
23437
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '2d5ee6d5959d97309c306e8ce72eb0f2c19be144', class: "modal-handle",
|
|
23516
23438
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
23517
|
-
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) })), hAsync("slot", { key: '
|
|
23439
|
+
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) })), hAsync("slot", { key: '5590434c35ea04c42fc006498bc189038e15a298', onSlotchange: this.onSlotChange }))));
|
|
23518
23440
|
}
|
|
23519
23441
|
get el() { return getElement(this); }
|
|
23520
23442
|
static get watchers() { return {
|
package/hydrate/index.mjs
CHANGED
|
@@ -6252,7 +6252,7 @@ const setRootAriaHidden = (hidden = false) => {
|
|
|
6252
6252
|
}
|
|
6253
6253
|
};
|
|
6254
6254
|
const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts) => {
|
|
6255
|
-
var _a, _b
|
|
6255
|
+
var _a, _b;
|
|
6256
6256
|
if (overlay.presented) {
|
|
6257
6257
|
return;
|
|
6258
6258
|
}
|
|
@@ -6286,10 +6286,9 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
6286
6286
|
*/
|
|
6287
6287
|
const overlayEl = overlay.el;
|
|
6288
6288
|
const shouldTrapFocus = overlayEl.tagName !== 'ION-TOAST' && overlayEl.focusTrap !== false;
|
|
6289
|
-
// Only lock out root content when backdrop is
|
|
6290
|
-
//
|
|
6291
|
-
const
|
|
6292
|
-
const shouldLockRoot = shouldTrapFocus && backdropAlwaysActive;
|
|
6289
|
+
// Only lock out root content when backdrop is active. Developers relying on showBackdrop=false
|
|
6290
|
+
// expect background interaction to remain enabled.
|
|
6291
|
+
const shouldLockRoot = shouldTrapFocus && overlayEl.showBackdrop !== false;
|
|
6293
6292
|
overlay.presented = true;
|
|
6294
6293
|
overlay.willPresent.emit();
|
|
6295
6294
|
if (shouldLockRoot) {
|
|
@@ -6301,7 +6300,7 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
6301
6300
|
}
|
|
6302
6301
|
document.body.classList.add(BACKDROP_NO_SCROLL);
|
|
6303
6302
|
}
|
|
6304
|
-
(
|
|
6303
|
+
(_a = overlay.willPresentShorthand) === null || _a === void 0 ? void 0 : _a.emit();
|
|
6305
6304
|
const mode = getIonMode$1(overlay);
|
|
6306
6305
|
// get the user's animation fn if one was provided
|
|
6307
6306
|
const animationBuilder = overlay.enterAnimation
|
|
@@ -6310,7 +6309,7 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
6310
6309
|
const completed = await overlayAnimation(overlay, animationBuilder, overlay.el, opts);
|
|
6311
6310
|
if (completed) {
|
|
6312
6311
|
overlay.didPresent.emit();
|
|
6313
|
-
(
|
|
6312
|
+
(_b = overlay.didPresentShorthand) === null || _b === void 0 ? void 0 : _b.emit();
|
|
6314
6313
|
}
|
|
6315
6314
|
/**
|
|
6316
6315
|
* If the focused element is already
|
|
@@ -6388,7 +6387,7 @@ const restoreElementFocus = async (overlayEl) => {
|
|
|
6388
6387
|
}
|
|
6389
6388
|
};
|
|
6390
6389
|
const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnimation, opts) => {
|
|
6391
|
-
var _a, _b
|
|
6390
|
+
var _a, _b;
|
|
6392
6391
|
if (!overlay.presented) {
|
|
6393
6392
|
return false;
|
|
6394
6393
|
}
|
|
@@ -6404,14 +6403,11 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
|
|
|
6404
6403
|
* is dismissed.
|
|
6405
6404
|
*/
|
|
6406
6405
|
const overlaysLockingRoot = presentedOverlays.filter((o) => {
|
|
6407
|
-
var _a;
|
|
6408
6406
|
const el = o;
|
|
6409
|
-
|
|
6410
|
-
return el.tagName !== 'ION-TOAST' && el.focusTrap !== false && backdropAlwaysActive;
|
|
6407
|
+
return el.tagName !== 'ION-TOAST' && el.focusTrap !== false && el.showBackdrop !== false;
|
|
6411
6408
|
});
|
|
6412
6409
|
const overlayEl = overlay.el;
|
|
6413
|
-
const
|
|
6414
|
-
const locksRoot = overlayEl.tagName !== 'ION-TOAST' && overlayEl.focusTrap !== false && backdropAlwaysActive;
|
|
6410
|
+
const locksRoot = overlayEl.tagName !== 'ION-TOAST' && overlayEl.focusTrap !== false && overlayEl.showBackdrop !== false;
|
|
6415
6411
|
/**
|
|
6416
6412
|
* If this is the last visible overlay that is trapping focus
|
|
6417
6413
|
* then we want to re-add the root to the accessibility tree.
|
|
@@ -6426,7 +6422,7 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
|
|
|
6426
6422
|
// Overlay contents should not be clickable during dismiss
|
|
6427
6423
|
overlay.el.style.setProperty('pointer-events', 'none');
|
|
6428
6424
|
overlay.willDismiss.emit({ data, role });
|
|
6429
|
-
(
|
|
6425
|
+
(_a = overlay.willDismissShorthand) === null || _a === void 0 ? void 0 : _a.emit({ data, role });
|
|
6430
6426
|
const mode = getIonMode$1(overlay);
|
|
6431
6427
|
const animationBuilder = overlay.leaveAnimation
|
|
6432
6428
|
? overlay.leaveAnimation
|
|
@@ -6436,7 +6432,7 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
|
|
|
6436
6432
|
await overlayAnimation(overlay, animationBuilder, overlay.el, opts);
|
|
6437
6433
|
}
|
|
6438
6434
|
overlay.didDismiss.emit({ data, role });
|
|
6439
|
-
(
|
|
6435
|
+
(_b = overlay.didDismissShorthand) === null || _b === void 0 ? void 0 : _b.emit({ data, role });
|
|
6440
6436
|
// Get a reference to all animations currently assigned to this overlay
|
|
6441
6437
|
// Then tear them down to return the overlay to its initial visual state
|
|
6442
6438
|
const animations = activeAnimations.get(overlay) || [];
|
|
@@ -23099,79 +23095,6 @@ class Modal {
|
|
|
23099
23095
|
this.gesture = gesture;
|
|
23100
23096
|
this.moveSheetToBreakpoint = moveSheetToBreakpoint;
|
|
23101
23097
|
this.gesture.enable(true);
|
|
23102
|
-
/**
|
|
23103
|
-
* When backdrop interaction is allowed, nested router outlets from child routes
|
|
23104
|
-
* may block pointer events to parent content. Apply passthrough styles only when
|
|
23105
|
-
* the modal was the sole content of a child route page.
|
|
23106
|
-
* See https://github.com/ionic-team/ionic-framework/issues/30700
|
|
23107
|
-
*/
|
|
23108
|
-
const backdropNotBlocking = this.showBackdrop === false || this.focusTrap === false || backdropBreakpoint > 0;
|
|
23109
|
-
if (backdropNotBlocking) {
|
|
23110
|
-
this.setupChildRoutePassthrough();
|
|
23111
|
-
}
|
|
23112
|
-
}
|
|
23113
|
-
/**
|
|
23114
|
-
* For sheet modals that allow background interaction, sets up pointer-events
|
|
23115
|
-
* passthrough on child route page wrappers and nested router outlets.
|
|
23116
|
-
*/
|
|
23117
|
-
setupChildRoutePassthrough() {
|
|
23118
|
-
var _a;
|
|
23119
|
-
const pageParent = this.getOriginalPageParent();
|
|
23120
|
-
// Skip ion-app (controller modals) and pages with other content (inline modals)
|
|
23121
|
-
if (!pageParent || pageParent.tagName === 'ION-APP') {
|
|
23122
|
-
return;
|
|
23123
|
-
}
|
|
23124
|
-
const hasVisibleContent = Array.from(pageParent.children).some((child) => {
|
|
23125
|
-
var _a;
|
|
23126
|
-
if (child === this.el)
|
|
23127
|
-
return false;
|
|
23128
|
-
if (child instanceof HTMLElement && window.getComputedStyle(child).display === 'none')
|
|
23129
|
-
return false;
|
|
23130
|
-
if (child.tagName === 'TEMPLATE' || child.tagName === 'SLOT')
|
|
23131
|
-
return false;
|
|
23132
|
-
if (child.nodeType === Node.TEXT_NODE && !((_a = child.textContent) === null || _a === void 0 ? void 0 : _a.trim()))
|
|
23133
|
-
return false;
|
|
23134
|
-
return true;
|
|
23135
|
-
});
|
|
23136
|
-
if (hasVisibleContent) {
|
|
23137
|
-
return;
|
|
23138
|
-
}
|
|
23139
|
-
// Child route case: page only contained the modal
|
|
23140
|
-
pageParent.classList.add('ion-page-overlay-passthrough');
|
|
23141
|
-
// Also make nested router outlets passthrough
|
|
23142
|
-
const routerOutlet = pageParent.parentElement;
|
|
23143
|
-
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') {
|
|
23144
|
-
routerOutlet.style.setProperty('pointer-events', 'none');
|
|
23145
|
-
routerOutlet.setAttribute('data-overlay-passthrough', 'true');
|
|
23146
|
-
}
|
|
23147
|
-
}
|
|
23148
|
-
/**
|
|
23149
|
-
* Finds the ion-page ancestor of the modal's original parent location.
|
|
23150
|
-
*/
|
|
23151
|
-
getOriginalPageParent() {
|
|
23152
|
-
if (!this.cachedOriginalParent) {
|
|
23153
|
-
return null;
|
|
23154
|
-
}
|
|
23155
|
-
let pageParent = this.cachedOriginalParent;
|
|
23156
|
-
while (pageParent && !pageParent.classList.contains('ion-page')) {
|
|
23157
|
-
pageParent = pageParent.parentElement;
|
|
23158
|
-
}
|
|
23159
|
-
return pageParent;
|
|
23160
|
-
}
|
|
23161
|
-
/**
|
|
23162
|
-
* Removes passthrough styles added by setupChildRoutePassthrough.
|
|
23163
|
-
*/
|
|
23164
|
-
cleanupChildRoutePassthrough() {
|
|
23165
|
-
const pageParent = this.getOriginalPageParent();
|
|
23166
|
-
if (!pageParent) {
|
|
23167
|
-
return;
|
|
23168
|
-
}
|
|
23169
|
-
pageParent.classList.remove('ion-page-overlay-passthrough');
|
|
23170
|
-
const routerOutlet = pageParent.parentElement;
|
|
23171
|
-
if (routerOutlet === null || routerOutlet === void 0 ? void 0 : routerOutlet.hasAttribute('data-overlay-passthrough')) {
|
|
23172
|
-
routerOutlet.style.removeProperty('pointer-events');
|
|
23173
|
-
routerOutlet.removeAttribute('data-overlay-passthrough');
|
|
23174
|
-
}
|
|
23175
23098
|
}
|
|
23176
23099
|
sheetOnDismiss() {
|
|
23177
23100
|
/**
|
|
@@ -23261,7 +23184,6 @@ class Modal {
|
|
|
23261
23184
|
}
|
|
23262
23185
|
this.cleanupViewTransitionListener();
|
|
23263
23186
|
this.cleanupParentRemovalObserver();
|
|
23264
|
-
this.cleanupChildRoutePassthrough();
|
|
23265
23187
|
}
|
|
23266
23188
|
this.currentBreakpoint = undefined;
|
|
23267
23189
|
this.animation = undefined;
|
|
@@ -23499,20 +23421,20 @@ class Modal {
|
|
|
23499
23421
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
23500
23422
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
23501
23423
|
const isSheetModalWithHandle = isSheetModal && showHandle;
|
|
23502
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
23424
|
+
return (hAsync(Host, Object.assign({ key: '9e9a7bd591eb17a225a00b4fa2e379e94601d17f', "no-router": true,
|
|
23503
23425
|
// Allow the modal to be navigable when the handle is focusable
|
|
23504
23426
|
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
23505
23427
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
23506
|
-
}, 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 }), hAsync("ion-backdrop", { key: '
|
|
23428
|
+
}, 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 }), hAsync("ion-backdrop", { key: 'e5eae2c14f830f75e308fcd7f4c10c86fac5b962', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { key: 'e268f9cd310c3cf4e051b5b92524ce4fb70d005e', class: "modal-shadow" }), hAsync("div", Object.assign({ key: '9c380f36c18144c153077b15744d1c3346bce63e',
|
|
23507
23429
|
/*
|
|
23508
23430
|
role and aria-modal must be used on the
|
|
23509
23431
|
same element. They must also be set inside the
|
|
23510
23432
|
shadow DOM otherwise ion-button will not be highlighted
|
|
23511
23433
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
23512
23434
|
*/
|
|
23513
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '
|
|
23435
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '2d5ee6d5959d97309c306e8ce72eb0f2c19be144', class: "modal-handle",
|
|
23514
23436
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
23515
|
-
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) })), hAsync("slot", { key: '
|
|
23437
|
+
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) })), hAsync("slot", { key: '5590434c35ea04c42fc006498bc189038e15a298', onSlotchange: this.onSlotChange }))));
|
|
23516
23438
|
}
|
|
23517
23439
|
get el() { return getElement(this); }
|
|
23518
23440
|
static get watchers() { return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ionic/core",
|
|
3
|
-
"version": "8.7.12-dev.
|
|
3
|
+
"version": "8.7.12-dev.11765219790.17cbe2e9",
|
|
4
4
|
"description": "Base components for Ionic",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ionic",
|
|
@@ -65,7 +65,6 @@
|
|
|
65
65
|
"fs-extra": "^9.0.1",
|
|
66
66
|
"jest": "^29.7.0",
|
|
67
67
|
"jest-cli": "^29.7.0",
|
|
68
|
-
"playwright-core": "^1.56.1",
|
|
69
68
|
"prettier": "^2.6.1",
|
|
70
69
|
"rollup": "^2.26.4",
|
|
71
70
|
"sass": "^1.33.0",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{r as t,c as o,f as i,w as a,e,h as r,d as s,g as n}from"./p-C8IsBmNU.js";import{f as d,i as h,d as l,r as p,a as c,p as m}from"./p-CwgG81ZD.js";import{C as f,a as b,d as u}from"./p-D-eFFUkA.js";import{e as v,g as x,r as w,b as g,h as k}from"./p-CTfR9YZG.js";import{c as y}from"./p-B-hirT0v.js";import{g as A}from"./p-CIGNaXM1.js";import{G as Y,O as D,F as E,e as B,B as T,j as C,k as S,f as O,g as M,h as j}from"./p-CHK505Co.js";import{g as P}from"./p-DiVJyqlX.js";import{e as L,w as R}from"./p-DUt5fQmA.js";import{b as $}from"./p-BFvmZNyx.js";import{KEYBOARD_DID_OPEN as I}from"./p-9eeaBrnk.js";import{c as N}from"./p-DDb5r57F.js";import{g as z}from"./p-hHmYLOfE.js";import{createGesture as W}from"./p-Cl0B-RWe.js";import{w as H}from"./p-ZjP4CjeZ.js";import"./p-B0q1YL7N.js";import"./p-BTEOs1at.js";import"./p-D13Eaw-8.js";var F;!function(t){t.Dark="DARK",t.Light="LIGHT",t.Default="DEFAULT"}(F||(F={}));const Z={getEngine(){const t=A();if(null==t?void 0:t.isPluginAvailable("StatusBar"))return t.Plugins.StatusBar},setStyle(t){const o=this.getEngine();o&&o.setStyle(t)},getStyle:async function(){const t=this.getEngine();if(!t)return F.Default;const{style:o}=await t.getInfo();return o}},V=(t,o)=>{if(1===o)return 0;const i=1/(1-o);return t*i+-o*i},G=()=>{!H||H.innerWidth>=768||Z.setStyle({style:F.Dark})},K=(t=F.Default)=>{!H||H.innerWidth>=768||Z.setStyle({style:t})},U=async(t,o)=>{"function"==typeof t.canDismiss&&await t.canDismiss(void 0,Y)&&(o.isRunning()?o.onFinish((()=>{t.dismiss(void 0,"handler")}),{oneTimeCallback:!0}):t.dismiss(void 0,"handler"))},_=t=>.00255275*2.71828**(-14.9619*t)-1.00255*2.71828**(-.0380968*t)+1,q=.915,X=(t,o)=>v(400,t/Math.abs(1.1*o),500),J=t=>{const{currentBreakpoint:o,backdropBreakpoint:i,expandToScroll:a}=t,e=void 0===i||i<o,r=e?`calc(var(--backdrop-opacity) * ${o})`:"0",s=N("backdropAnimation").fromTo("opacity",0,r);return e&&s.beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),{wrapperAnimation:N("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:"translateY(100%)"},{offset:1,opacity:1,transform:`translateY(${100-100*o}%)`}]),backdropAnimation:s,contentAnimation:a?void 0:N("contentAnimation").keyframes([{offset:0,opacity:1,maxHeight:100*(1-o)+"%"},{offset:1,opacity:1,maxHeight:100*o+"%"}])}},Q=t=>{const{currentBreakpoint:o,backdropBreakpoint:i}=t,a=`calc(var(--backdrop-opacity) * ${V(o,i)})`,e=[{offset:0,opacity:a},{offset:1,opacity:0}],r=[{offset:0,opacity:a},{offset:i,opacity:0},{offset:1,opacity:0}],s=N("backdropAnimation").keyframes(0!==i?r:e);return{wrapperAnimation:N("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:`translateY(${100-100*o}%)`},{offset:1,opacity:1,transform:"translateY(100%)"}]),backdropAnimation:s}},tt=(t,o)=>{const{presentingEl:i,currentBreakpoint:a,expandToScroll:e}=o,r=x(t),{wrapperAnimation:s,backdropAnimation:n,contentAnimation:d}=void 0!==a?J(o):{backdropAnimation:N().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:N().fromTo("transform","translateY(100vh)","translateY(0vh)"),contentAnimation:void 0};n.addElement(r.querySelector("ion-backdrop")),s.addElement(r.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1}),!e&&(null==d||d.addElement(t.querySelector(".ion-page")));const h=N("entering-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(500).addAnimation([s]);if(d&&h.addAnimation(d),i){const t=window.innerWidth<768,o="ION-MODAL"===i.tagName&&void 0!==i.presentingElement,a=x(i),e=N().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"}),r=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",a=`translateY(${o?"-10px":t}) scale(0.915)`;e.afterStyles({transform:a}).beforeAddWrite((()=>r.style.setProperty("background-color","black"))).addElement(i).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"},{offset:1,filter:"contrast(0.85)",transform:a,borderRadius:"10px 10px 0 0"}]),h.addAnimation(e)}else if(h.addAnimation(n),o){const t=`translateY(-10px) scale(${o?q:1})`;e.afterStyles({transform:t}).addElement(a.querySelector(".modal-wrapper")).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0) scale(1)"},{offset:1,filter:"contrast(0.85)",transform:t}]);const i=N().afterStyles({transform:t}).addElement(a.querySelector(".modal-shadow")).keyframes([{offset:0,opacity:"1",transform:"translateY(0) scale(1)"},{offset:1,opacity:"0",transform:t}]);h.addAnimation([e,i])}else s.fromTo("opacity","0","1")}else h.addAnimation(n);return h},ot=(t,o,i=500)=>{const{presentingEl:a,currentBreakpoint:e}=o,r=x(t),{wrapperAnimation:s,backdropAnimation:n}=void 0!==e?Q(o):{backdropAnimation:N().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:N().fromTo("transform","translateY(0vh)","translateY(100vh)")};n.addElement(r.querySelector("ion-backdrop")),s.addElement(r.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});const d=N("leaving-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(i).addAnimation(s);if(a){const t=window.innerWidth<768,o="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,i=x(a),e=N().beforeClearStyles(["transform"]).afterClearStyles(["transform"]).onFinish((t=>{1===t&&(a.style.setProperty("overflow",""),Array.from(r.querySelectorAll("ion-modal:not(.overlay-hidden)")).filter((t=>void 0!==t.presentingElement)).length<=1&&r.style.setProperty("background-color",""))})),r=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",i=`translateY(${o?"-10px":t}) scale(0.915)`;e.addElement(a).keyframes([{offset:0,filter:"contrast(0.85)",transform:i,borderRadius:"10px 10px 0 0"},{offset:1,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"}]),d.addAnimation(e)}else if(d.addAnimation(n),o){const t=`translateY(-10px) scale(${o?q:1})`;e.addElement(i.querySelector(".modal-wrapper")).afterStyles({transform:"translate3d(0, 0, 0)"}).keyframes([{offset:0,filter:"contrast(0.85)",transform:t},{offset:1,filter:"contrast(1)",transform:"translateY(0) scale(1)"}]);const a=N().addElement(i.querySelector(".modal-shadow")).afterStyles({transform:"translateY(0) scale(1)"}).keyframes([{offset:0,opacity:"0",transform:t},{offset:1,opacity:"1",transform:"translateY(0) scale(1)"}]);d.addAnimation([e,a])}else s.fromTo("opacity","1","0")}else d.addAnimation(n);return d},it=(t,o)=>{const{currentBreakpoint:i,expandToScroll:a}=o,e=x(t),{wrapperAnimation:r,backdropAnimation:s,contentAnimation:n}=void 0!==i?J(o):{backdropAnimation:N().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:N().keyframes([{offset:0,opacity:.01,transform:"translateY(40px)"},{offset:1,opacity:1,transform:"translateY(0px)"}]),contentAnimation:void 0};s.addElement(e.querySelector("ion-backdrop")),r.addElement(e.querySelector(".modal-wrapper")),!a&&(null==n||n.addElement(t.querySelector(".ion-page")));const d=N().addElement(t).easing("cubic-bezier(0.36,0.66,0.04,1)").duration(280).addAnimation([s,r]);return n&&d.addAnimation(n),d},at=(t,o)=>{const{currentBreakpoint:i}=o,a=x(t),{wrapperAnimation:e,backdropAnimation:r}=void 0!==i?Q(o):{backdropAnimation:N().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:N().keyframes([{offset:0,opacity:.99,transform:"translateY(0px)"},{offset:1,opacity:0,transform:"translateY(40px)"}])};return r.addElement(a.querySelector("ion-backdrop")),e.addElement(a.querySelector(".modal-wrapper")),N().easing("cubic-bezier(0.47,0,0.745,0.715)").duration(200).addAnimation([r,e])},et=class{constructor(i){t(this,i),this.didPresent=o(this,"ionModalDidPresent",7),this.willPresent=o(this,"ionModalWillPresent",7),this.willDismiss=o(this,"ionModalWillDismiss",7),this.didDismiss=o(this,"ionModalDidDismiss",7),this.ionBreakpointDidChange=o(this,"ionBreakpointDidChange",7),this.didPresentShorthand=o(this,"didPresent",7),this.willPresentShorthand=o(this,"willPresent",7),this.willDismissShorthand=o(this,"willDismiss",7),this.didDismissShorthand=o(this,"didDismiss",7),this.ionMount=o(this,"ionMount",7),this.lockController=y(),this.triggerController=B(),this.coreDelegate=f(),this.isSheetModal=!1,this.inheritedAttributes={},this.inline=!1,this.gestureAnimationDismissing=!1,this.presented=!1,this.hasController=!1,this.keyboardClose=!0,this.expandToScroll=!0,this.backdropBreakpoint=0,this.handleBehavior="none",this.backdropDismiss=!0,this.showBackdrop=!0,this.animated=!0,this.isOpen=!1,this.keepContentsMounted=!1,this.focusTrap=!0,this.canDismiss=!0,this.onHandleClick=()=>{const{sheetTransition:t,handleBehavior:o}=this;"cycle"===o&&void 0===t&&this.moveToNextBreakpoint()},this.onBackdropTap=()=>{const{sheetTransition:t}=this;void 0===t&&this.dismiss(void 0,T)},this.onLifecycle=t=>{const o=this.usersElement,i=rt[t.type];if(o&&i){const a=new CustomEvent(i,{bubbles:!1,cancelable:!1,detail:t.detail});o.dispatchEvent(a)}},this.onModalFocus=t=>{const{dragHandleEl:o,el:i}=this;t.target===i&&o&&-1!==o.tabIndex&&o.focus()},this.onSlotChange=({target:t})=>{t.assignedElements().forEach((t=>{t.querySelectorAll("ion-modal").forEach((t=>{null===t.getAttribute("data-parent-ion-modal")&&t.setAttribute("data-parent-ion-modal",this.el.id)}))}))}}onIsOpenChange(t,o){!0===t&&!1===o?this.present():!1===t&&!0===o&&this.dismiss()}triggerChanged(){const{trigger:t,el:o,triggerController:i}=this;t&&i.addClickListener(o,t)}onWindowResize(){"ios"!==$(this)||!this.presentingElement||this.enterAnimation||this.leaveAnimation||(clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((()=>{this.handleViewTransition()}),50))}breakpointsChanged(t){void 0!==t&&(this.sortedBreakpoints=t.sort(((t,o)=>t-o)))}connectedCallback(){const{el:t}=this;C(t),this.triggerChanged()}disconnectedCallback(){this.triggerController.removeClickListener(),this.cleanupViewTransitionListener(),this.cleanupParentRemovalObserver()}componentWillLoad(){var t;const{breakpoints:o,initialBreakpoint:a,el:e,htmlAttributes:r}=this,s=this.isSheetModal=void 0!==o&&void 0!==a,n=["aria-label","role"];this.inheritedAttributes=g(e,n),e.parentNode&&(this.cachedOriginalParent=e.parentNode),void 0!==r&&n.forEach((t=>{r[t]&&(this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:r[t]}),delete r[t])})),s&&(this.currentBreakpoint=this.initialBreakpoint),void 0===o||void 0===a||o.includes(a)||i("[ion-modal] - Your breakpoints array must include the initialBreakpoint value."),(null===(t=this.htmlAttributes)||void 0===t?void 0:t.id)||S(this.el)}componentDidLoad(){!0===this.isOpen&&w((()=>this.present())),this.breakpointsChanged(this.breakpoints),this.triggerChanged()}getDelegate(t=!1){if(this.workingDelegate&&!t)return{delegate:this.workingDelegate,inline:this.inline};const o=this.inline=null!==this.el.parentNode&&!this.hasController;return{inline:o,delegate:this.workingDelegate=o?this.delegate||this.coreDelegate:this.delegate}}async checkCanDismiss(t,o){const{canDismiss:i}=this;return"function"==typeof i?i(t,o):i}async present(){const t=await this.lockController.lock();if(this.presented)return void t();const{presentingElement:o,el:i}=this;this.currentBreakpoint=this.initialBreakpoint;const{inline:e,delegate:r}=this.getDelegate(!0);this.ionMount.emit(),this.usersElement=await b(r,i,this.component,["ion-page"],this.componentProps,e),k(i)?await L(this.usersElement):this.keepContentsMounted||await R(),a((()=>this.el.classList.add("show-modal")));const s=void 0!==o;s&&"ios"===$(this)&&(this.statusBarStyle=await Z.getStyle(),G()),await O(this,"modalEnter",tt,it,{presentingEl:o,currentBreakpoint:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll}),"undefined"!=typeof window&&(this.keyboardOpenCallback=()=>{this.gesture&&(this.gesture.enable(!1),w((()=>{this.gesture&&this.gesture.enable(!0)})))},window.addEventListener(I,this.keyboardOpenCallback)),this.isSheetModal?this.initSheetGesture():s&&this.initSwipeToClose(),this.initViewTransitionListener(),this.initParentRemovalObserver(),t()}initSwipeToClose(){var t;if("ios"!==$(this))return;const{el:o}=this,i=this.leaveAnimation||e.get("modalLeave",ot),a=this.animation=i(o,{presentingEl:this.presentingElement,expandToScroll:this.expandToScroll});if(!c(o))return void m(o);const r=null!==(t=this.statusBarStyle)&&void 0!==t?t:F.Default;this.gesture=((t,o,i,a)=>{const e=.5,r=t.offsetHeight;let s=!1,n=!1,c=null,m=null,f=!0,b=0;const u=W({el:t,gestureName:"modalSwipeToClose",gesturePriority:D,direction:"y",threshold:10,canStart:t=>{const o=t.event.target;if(null===o||!o.closest)return!0;if(c=d(o),c){if(h(c)){const t=x(c);m=t.querySelector(".inner-scroll")}else m=c;return!c.querySelector("ion-refresher")&&0===m.scrollTop}return null===o.closest("ion-footer")},onStart:i=>{const{deltaY:a}=i;f=!c||!h(c)||c.scrollY,n=void 0!==t.canDismiss&&!0!==t.canDismiss,a>0&&c&&l(c),o.progressStart(!0,s?1:0)},onMove:t=>{const{deltaY:a}=t;a>0&&c&&l(c);const s=t.deltaY/r,d=s>=0&&n,h=d?.2:.9999,p=d?_(s/h):s,m=v(1e-4,p,h);o.progressStep(m),m>=e&&b<e?K(i):m<e&&b>=e&&G(),b=m},onEnd:i=>{const d=i.velocityY,h=i.deltaY/r,l=h>=0&&n,m=l?.2:.9999,b=l?_(h/m):h,x=v(1e-4,b,m),w=!l&&(i.deltaY+1e3*d)/r>=e;let g=w?-.001:.001;w?(o.easing("cubic-bezier(0.32, 0.72, 0, 1)"),g+=z([0,0],[.32,.72],[0,1],[1,1],x)[0]):(o.easing("cubic-bezier(1, 0, 0.68, 0.28)"),g+=z([0,0],[1,0],[.68,.28],[1,1],x)[0]);const k=X(w?h*r:(1-x)*r,d);s=w,u.enable(!1),c&&p(c,f),o.onFinish((()=>{w||u.enable(!0)})).progressEnd(w?1:0,g,k),l&&x>m/4?U(t,o):w&&a()}});return u})(o,a,r,(()=>{this.gestureAnimationDismissing=!0,K(this.statusBarStyle),this.animation.onFinish((async()=>{await this.dismiss(void 0,Y),this.gestureAnimationDismissing=!1}))})),this.gesture.enable(!0)}initSheetGesture(){const{wrapperEl:t,initialBreakpoint:o,backdropBreakpoint:i}=this;if(!t||void 0===o)return;const a=this.enterAnimation||e.get("modalEnter",tt),r=this.animation=a(this.el,{presentingEl:this.presentingElement,currentBreakpoint:o,backdropBreakpoint:i,expandToScroll:this.expandToScroll});r.progressStart(!0,1);const{gesture:s,moveSheetToBreakpoint:n}=((t,o,i,a,e,r,s=[],n,l,p,c)=>{const m={WRAPPER_KEYFRAMES:[{offset:0,transform:"translateY(0%)"},{offset:1,transform:"translateY(100%)"}],BACKDROP_KEYFRAMES:0!==e?[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1-e,opacity:0},{offset:1,opacity:0}]:[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1,opacity:.01}],CONTENT_KEYFRAMES:[{offset:0,maxHeight:"100%"},{offset:1,maxHeight:"0%"}]},f=t.querySelector("ion-content"),b=i.clientHeight;let u=a,g=0,k=!1,y=null,A=null,Y=null,D=null;const B=s[s.length-1],T=s[0],C=r.childAnimations.find((t=>"wrapperAnimation"===t.id)),S=r.childAnimations.find((t=>"backdropAnimation"===t.id)),O=r.childAnimations.find((t=>"contentAnimation"===t.id)),M=()=>{!1!==t.focusTrap&&!1!==t.showBackdrop&&(t.style.setProperty("pointer-events","auto"),o.style.setProperty("pointer-events","auto"),t.classList.remove(E))},j=()=>{t.style.setProperty("pointer-events","none"),o.style.setProperty("pointer-events","none"),t.classList.add(E)},P=o=>{if(!A&&(A=Array.from(t.querySelectorAll("ion-footer")),!A.length))return;const i=t.querySelector(".ion-page");if(D=o,"stationary"===o)A.forEach((t=>{t.classList.remove("modal-footer-moving"),t.style.removeProperty("position"),t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("top"),t.style.removeProperty("left"),null==i||i.style.removeProperty("padding-bottom"),null==i||i.appendChild(t)}));else{let o=0;A.forEach(((i,a)=>{const e=i.getBoundingClientRect(),r=document.body.getBoundingClientRect();o+=i.clientHeight;const s=e.top-r.top,n=e.left-r.left;if(i.style.setProperty("--pinned-width",`${i.clientWidth}px`),i.style.setProperty("--pinned-height",`${i.clientHeight}px`),i.style.setProperty("--pinned-top",`${s}px`),i.style.setProperty("--pinned-left",`${n}px`),0===a){Y=s;const o=t.querySelector("ion-header");o&&(Y-=o.clientHeight)}})),A.forEach((t=>{null==i||i.style.setProperty("padding-bottom",`${o}px`),t.classList.add("modal-footer-moving"),t.style.setProperty("position","absolute"),t.style.setProperty("width","var(--pinned-width)"),t.style.setProperty("height","var(--pinned-height)"),t.style.setProperty("top","var(--pinned-top)"),t.style.setProperty("left","var(--pinned-left)"),document.body.appendChild(t)}))}};C&&S&&(C.keyframes([...m.WRAPPER_KEYFRAMES]),S.keyframes([...m.BACKDROP_KEYFRAMES]),null==O||O.keyframes([...m.CONTENT_KEYFRAMES]),r.progressStart(!0,1-u),u>e&&!1!==t.focusTrap&&!1!==t.showBackdrop?M():j()),f&&u!==B&&n&&(f.scrollY=!1);const L=o=>{const{breakpoint:i,canDismiss:a,breakpointOffset:d,animated:h}=o,l=a&&0===i,b=l?u:i,v=0!==b;return u=0,C&&S&&(C.keyframes([{offset:0,transform:`translateY(${100*d}%)`},{offset:1,transform:`translateY(${100*(1-b)}%)`}]),S.keyframes([{offset:0,opacity:`calc(var(--backdrop-opacity) * ${V(1-d,e)})`},{offset:1,opacity:`calc(var(--backdrop-opacity) * ${V(b,e)})`}]),O&&O.keyframes([{offset:0,maxHeight:100*(1-d)+"%"},{offset:1,maxHeight:100*b+"%"}]),r.progressStep(0)),R.enable(!1),l?U(t,r):v||p(),!f||b!==s[s.length-1]&&n||(f.scrollY=!0),n||0!==b||P("stationary"),new Promise((o=>{r.onFinish((()=>{v?(n||P("stationary"),C&&S?w((()=>{C.keyframes([...m.WRAPPER_KEYFRAMES]),S.keyframes([...m.BACKDROP_KEYFRAMES]),null==O||O.keyframes([...m.CONTENT_KEYFRAMES]),r.progressStart(!0,1-b),u=b,c(u),u>e&&!1!==t.focusTrap&&!1!==t.showBackdrop?M():j(),R.enable(!0),o()})):(R.enable(!0),o())):o()}),{oneTimeCallback:!0}).progressEnd(1,0,h?500:0)}))},R=W({el:i,gestureName:"modalSheet",gesturePriority:40,direction:"y",threshold:10,canStart:t=>{const o=d(t.event.target);if(u=l(),!n&&o)return 0===(h(o)?x(o).querySelector(".inner-scroll"):o).scrollTop;if(1===u&&o){const t=h(o)?x(o).querySelector(".inner-scroll"):o;return!o.querySelector("ion-refresher")&&0===t.scrollTop}return!0},onStart:o=>{if(k=void 0!==t.canDismiss&&!0!==t.canDismiss&&0===T,!n){const t=d(o.event.target);y=t&&h(t)?x(t).querySelector(".inner-scroll"):t}n||P("moving"),o.deltaY>0&&f&&(f.scrollY=!1),w((()=>{t.focus()})),r.progressStart(!0,1-u)},onMove:t=>{if(n||null===Y||null===D||(t.currentY>=Y&&"moving"===D?P("stationary"):t.currentY<Y&&"stationary"===D&&P("moving")),!n&&t.deltaY<=0&&y)return;t.deltaY>0&&f&&(f.scrollY=!1);const o=s.length>1?1-s[1]:void 0,i=1-u+t.deltaY/b,a=void 0!==o&&i>=o&&k,e=a?.95:.9999,d=a&&void 0!==o?o+_((i-o)/(e-o)):i;g=v(1e-4,d,e),r.progressStep(g)},onEnd:t=>{if(!n&&t.deltaY<=0&&y&&y.scrollTop>0)return void P("stationary");const o=u-(t.deltaY+350*t.velocityY)/b,i=s.reduce(((t,i)=>Math.abs(i-o)<Math.abs(t-o)?i:t));L({breakpoint:i,breakpointOffset:g,canDismiss:k,animated:!0})}});return{gesture:R,moveSheetToBreakpoint:L}})(this.el,this.backdropEl,t,o,i,r,this.sortedBreakpoints,this.expandToScroll,(()=>{var t;return null!==(t=this.currentBreakpoint)&&void 0!==t?t:0}),(()=>this.sheetOnDismiss()),(t=>{this.currentBreakpoint!==t&&(this.currentBreakpoint=t,this.ionBreakpointDidChange.emit({breakpoint:t}))}));this.gesture=s,this.moveSheetToBreakpoint=n,this.gesture.enable(!0),(!1===this.showBackdrop||!1===this.focusTrap||i>0)&&this.setupChildRoutePassthrough()}setupChildRoutePassthrough(){var t;const o=this.getOriginalPageParent();if(!o||"ION-APP"===o.tagName)return;const i=Array.from(o.children).some((t=>{var o;return!(t===this.el||t instanceof HTMLElement&&"none"===window.getComputedStyle(t).display||"TEMPLATE"===t.tagName||"SLOT"===t.tagName||t.nodeType===Node.TEXT_NODE&&!(null===(o=t.textContent)||void 0===o?void 0:o.trim()))}));if(i)return;o.classList.add("ion-page-overlay-passthrough");const a=o.parentElement;"ION-ROUTER-OUTLET"===(null==a?void 0:a.tagName)&&"ION-APP"!==(null===(t=a.parentElement)||void 0===t?void 0:t.tagName)&&(a.style.setProperty("pointer-events","none"),a.setAttribute("data-overlay-passthrough","true"))}getOriginalPageParent(){if(!this.cachedOriginalParent)return null;let t=this.cachedOriginalParent;for(;t&&!t.classList.contains("ion-page");)t=t.parentElement;return t}cleanupChildRoutePassthrough(){const t=this.getOriginalPageParent();if(!t)return;t.classList.remove("ion-page-overlay-passthrough");const o=t.parentElement;(null==o?void 0:o.hasAttribute("data-overlay-passthrough"))&&(o.style.removeProperty("pointer-events"),o.removeAttribute("data-overlay-passthrough"))}sheetOnDismiss(){this.gestureAnimationDismissing=!0,this.animation.onFinish((async()=>{this.currentBreakpoint=0,this.ionBreakpointDidChange.emit({breakpoint:this.currentBreakpoint}),await this.dismiss(void 0,Y),this.gestureAnimationDismissing=!1}))}async dismiss(t,o){var i;if(this.gestureAnimationDismissing&&o!==Y)return!1;const e=await this.lockController.lock();if(await this.dismissNestedModals(),"handler"!==o&&!await this.checkCanDismiss(t,o))return e(),!1;const{presentingElement:r}=this;void 0!==r&&"ios"===$(this)&&K(this.statusBarStyle),"undefined"!=typeof window&&this.keyboardOpenCallback&&(window.removeEventListener(I,this.keyboardOpenCallback),this.keyboardOpenCallback=void 0);const s=await M(this,t,o,"modalLeave",ot,at,{presentingEl:r,currentBreakpoint:null!==(i=this.currentBreakpoint)&&void 0!==i?i:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll});if(s){const{delegate:t}=this.getDelegate();await u(t,this.usersElement),a((()=>this.el.classList.remove("show-modal"))),this.animation&&this.animation.destroy(),this.gesture&&this.gesture.destroy(),this.cleanupViewTransitionListener(),this.cleanupParentRemovalObserver(),this.cleanupChildRoutePassthrough()}return this.currentBreakpoint=void 0,this.animation=void 0,e(),s}onDidDismiss(){return j(this.el,"ionModalDidDismiss")}onWillDismiss(){return j(this.el,"ionModalWillDismiss")}async setCurrentBreakpoint(t){if(!this.isSheetModal)return void i("[ion-modal] - setCurrentBreakpoint is only supported on sheet modals.");if(!this.breakpoints.includes(t))return void i(`[ion-modal] - Attempted to set invalid breakpoint value ${t}. Please double check that the breakpoint value is part of your defined breakpoints.`);const{currentBreakpoint:o,moveSheetToBreakpoint:a,canDismiss:e,breakpoints:r,animated:s}=this;o!==t&&a&&(this.sheetTransition=a({breakpoint:t,breakpointOffset:1-o,canDismiss:void 0!==e&&!0!==e&&0===r[0],animated:s}),await this.sheetTransition,this.sheetTransition=void 0)}async getCurrentBreakpoint(){return this.currentBreakpoint}async moveToNextBreakpoint(){const{breakpoints:t,currentBreakpoint:o}=this;if(!t||null==o)return!1;const i=t.filter((t=>0!==t)),a=i.indexOf(o),e=i[(a+1)%i.length];return await this.setCurrentBreakpoint(e),!0}initViewTransitionListener(){"ios"!==$(this)||!this.presentingElement||this.enterAnimation||this.leaveAnimation||(this.currentViewIsPortrait=window.innerWidth<768)}handleViewTransition(){const t=window.innerWidth<768;if(this.currentViewIsPortrait===t)return;this.viewTransitionAnimation&&(this.viewTransitionAnimation.destroy(),this.viewTransitionAnimation=void 0);const{presentingElement:o}=this;if(!o)return;let i;i=this.currentViewIsPortrait&&!t?((t,o,i=300)=>{const{presentingEl:a}=o;if(!a)return N("portrait-to-landscape-transition");const e="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,r=x(a),s=document.body,n=N("portrait-to-landscape-transition").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(i),d=N().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"});if(e){const t="translateY(-10px) scale(0.915)",o="translateY(0px) scale(1)";d.addElement(a).afterStyles({transform:o}).fromTo("transform",t,o).fromTo("filter","contrast(0.85)","contrast(1)");const i=N().addElement(r.querySelector(".modal-shadow")).afterStyles({transform:o,opacity:"0"}).fromTo("transform",t,o);n.addAnimation([d,i])}else{const o=x(t),i=N().addElement(o.querySelectorAll(".modal-wrapper, .modal-shadow")).fromTo("opacity","1","1"),e=N().addElement(o.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)","var(--backdrop-opacity)"),r=`translateY(${CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px"}) scale(0.915)`;d.addElement(a).afterStyles({transform:"translateY(0px) scale(1)","border-radius":"0px"}).beforeAddWrite((()=>s.style.setProperty("background-color",""))).fromTo("transform",r,"translateY(0px) scale(1)").fromTo("filter","contrast(0.85)","contrast(1)").fromTo("border-radius","10px 10px 0 0","0px"),n.addAnimation([d,i,e])}return n})(this.el,{presentingEl:o}):((t,o,i=300)=>{const{presentingEl:a}=o;if(!a)return N("landscape-to-portrait-transition");const e="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,r=x(a),s=document.body,n=N("landscape-to-portrait-transition").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(i),d=N().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"});if(e){const t="translateY(-10px) scale(0.915)",o="translateY(0) scale(1)";d.addElement(a).afterStyles({transform:o}).fromTo("transform",t,o);const i=N().addElement(r.querySelector(".modal-shadow")).afterStyles({transform:o,opacity:"0"}).fromTo("transform",t,o);n.addAnimation([d,i])}else{const o=x(t),i=N().addElement(o.querySelectorAll(".modal-wrapper, .modal-shadow")).fromTo("opacity","1","1"),e=N().addElement(o.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)","var(--backdrop-opacity)"),r=`translateY(${CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px"}) scale(0.915)`;d.addElement(a).afterStyles({transform:r}).beforeAddWrite((()=>s.style.setProperty("background-color","black"))).keyframes([{offset:0,transform:"translateY(0px) scale(1)",filter:"contrast(1)",borderRadius:"0px"},{offset:.2,transform:"translateY(0px) scale(1)",filter:"contrast(1)",borderRadius:"10px 10px 0 0"},{offset:1,transform:r,filter:"contrast(0.85)",borderRadius:"10px 10px 0 0"}]),n.addAnimation([d,i,e])}return n})(this.el,{presentingEl:o}),this.currentViewIsPortrait=t,this.viewTransitionAnimation=i,i.play().then((()=>{this.viewTransitionAnimation=void 0,this.reinitSwipeToClose()}))}cleanupViewTransitionListener(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0),this.viewTransitionAnimation&&(this.viewTransitionAnimation.destroy(),this.viewTransitionAnimation=void 0)}reinitSwipeToClose(){"ios"===$(this)&&this.presentingElement&&(this.gesture&&(this.gesture.destroy(),this.gesture=void 0),this.animation&&(this.animation.progressEnd(0,0,0),this.animation.destroy(),this.animation=void 0),w((()=>{this.ensureCorrectModalPosition(),this.initSwipeToClose()})))}ensureCorrectModalPosition(){const{el:t,presentingElement:o}=this,i=x(t).querySelector(".modal-wrapper");if(i&&(i.style.transform="translateY(0vh)",i.style.opacity="1"),"ION-MODAL"===(null==o?void 0:o.tagName))if(window.innerWidth<768){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px";o.style.transform=`translateY(${t}) scale(0.915)`}else o.style.transform="translateY(0px) scale(1)"}async dismissNestedModals(){const t=document.querySelectorAll(`ion-modal[data-parent-ion-modal="${this.el.id}"]`);null==t||t.forEach((async t=>{await t.dismiss(void 0,"parent-dismissed")}))}initParentRemovalObserver(){"undefined"!=typeof MutationObserver&&"undefined"!=typeof window&&this.cachedOriginalParent&&this.cachedOriginalParent.nodeType!==Node.DOCUMENT_NODE&&this.cachedOriginalParent.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&(this.parentRemovalObserver=new MutationObserver((t=>{t.forEach((t=>{"childList"===t.type&&t.removedNodes.length>0&&(Array.from(t.removedNodes).some((t=>{var o,i;const a=t===this.cachedOriginalParent,e=!!this.cachedOriginalParent&&(null===(i=(o=t).contains)||void 0===i?void 0:i.call(o,this.cachedOriginalParent));return a||e}))||this.cachedOriginalParent&&!this.cachedOriginalParent.isConnected)&&(this.dismiss(void 0,"parent-removed"),this.cachedOriginalParent=void 0)}))})),this.parentRemovalObserver.observe(document.body,{childList:!0,subtree:!0}))}cleanupParentRemovalObserver(){var t;null===(t=this.parentRemovalObserver)||void 0===t||t.disconnect(),this.parentRemovalObserver=void 0}render(){const{handle:t,isSheetModal:o,presentingElement:i,htmlAttributes:a,handleBehavior:e,inheritedAttributes:n,focusTrap:d,expandToScroll:h}=this,l=!1!==t&&o,p=$(this),c=void 0!==i&&"ios"===p,m="cycle"===e;return r(s,Object.assign({key:"3bdb8abb1c5bccc9d3b20ed419c85144ccf4d209","no-router":!0,tabIndex:m&&o&&l?0:-1},a,{style:{zIndex:`${2e4+this.overlayIndex}`},class:Object.assign({[p]:!0,"modal-default":!c&&!o,"modal-card":c,"modal-sheet":o,"modal-no-expand-scroll":o&&!h,"overlay-hidden":!0,[E]:!1===d},P(this.cssClass)),onIonBackdropTap:this.onBackdropTap,onIonModalDidPresent:this.onLifecycle,onIonModalWillPresent:this.onLifecycle,onIonModalWillDismiss:this.onLifecycle,onIonModalDidDismiss:this.onLifecycle,onFocus:this.onModalFocus}),r("ion-backdrop",{key:"7d15fea01ca56670cfdfcfe1e3b86b6e6353ee65",ref:t=>this.backdropEl=t,visible:this.showBackdrop,tappable:this.backdropDismiss,part:"backdrop"}),"ios"===p&&r("div",{key:"875ed586a3c55dc19ba5ab97c37da8e09dc2afbe",class:"modal-shadow"}),r("div",Object.assign({key:"4fc03a83d5b827c2aaaeaea386a966290f43eb99",role:"dialog"},n,{"aria-modal":"true",class:"modal-wrapper ion-overlay-wrapper",part:"content",ref:t=>this.wrapperEl=t}),l&&r("button",{key:"dbae13fa667f3c974e3c88da7067d6426a92e83a",class:"modal-handle",tabIndex:m?0:-1,"aria-label":"Activate to adjust the size of the dialog overlaying the screen",onClick:m?this.onHandleClick:void 0,part:"handle",ref:t=>this.dragHandleEl=t}),r("slot",{key:"0284e13c0dd87ba76e6b9982f25d1b41a1766bfc",onSlotchange:this.onSlotChange})))}get el(){return n(this)}static get watchers(){return{isOpen:["onIsOpenChange"],trigger:["triggerChanged"]}}},rt={ionModalDidPresent:"ionViewDidEnter",ionModalWillPresent:"ionViewWillEnter",ionModalWillDismiss:"ionViewWillLeave",ionModalDidDismiss:"ionViewDidLeave"};et.style={ios:':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}',md:':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}'};export{et as ion_modal}
|
package/dist/ionic/p-CHK505Co.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{d as n}from"./p-ZjP4CjeZ.js";import{n as o,c as e,f as t,m as i,g as a}from"./p-CTfR9YZG.js";import{OVERLAY_BACK_BUTTON_PRIORITY as r,shouldUseCloseWatcher as s}from"./p-B0q1YL7N.js";import{e as d,j as l,f as c}from"./p-C8IsBmNU.js";import{b as u}from"./p-BFvmZNyx.js";import{C as m}from"./p-D-eFFUkA.js";import{B as p}from"./p-BTEOs1at.js";const v='[tabindex]:not([tabindex^="-"]):not([hidden]):not([disabled]), input:not([type=hidden]):not([tabindex^="-"]):not([hidden]):not([disabled]), textarea:not([tabindex^="-"]):not([hidden]):not([disabled]), button:not([tabindex^="-"]):not([hidden]):not([disabled]), select:not([tabindex^="-"]):not([hidden]):not([disabled]), ion-checkbox:not([tabindex^="-"]):not([hidden]):not([disabled]), ion-radio:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable[disabled="false"]:not([tabindex^="-"]):not([hidden])',f=(n,o)=>{const e=n.querySelector(v);b(e,null!=o?o:n)},h=(n,o)=>{const e=Array.from(n.querySelectorAll(v));b(e.length>0?e[e.length-1]:null,null!=o?o:n)},b=(n,e)=>{let t=n;const i=null==n?void 0:n.shadowRoot;if(i&&(t=i.querySelector(v)||n),t){const n=t.closest("ion-radio-group");n?n.setFocus():o(t)}else e.focus()};let y=0,w=0;const g=new WeakMap,O=n=>({create:o=>D(n,o),dismiss:(o,e,t)=>P(document,o,e,n,t),getTop:async()=>E(document,n)}),T=O("ion-alert"),k=O("ion-action-sheet"),x=O("ion-loading"),j=O("ion-modal"),A=O("ion-picker-legacy"),C=O("ion-popover"),N=O("ion-toast"),B=n=>{"undefined"!=typeof document&&F(document);const o=y++;n.overlayIndex=o},I=n=>(n.hasAttribute("id")||(n.id="ion-overlay-"+ ++w),n.id),D=(n,o)=>"undefined"!=typeof window&&void 0!==window.customElements?window.customElements.whenDefined(n).then((()=>{const t=document.createElement(n);return t.classList.add("overlay-hidden"),Object.assign(t,Object.assign(Object.assign({},o),{hasController:!0})),q(document).appendChild(t),new Promise((n=>e(t,n)))})):Promise.resolve(),S=(n,e)=>{let t=n;const i=null==n?void 0:n.shadowRoot;i&&(t=i.querySelector(v)||n),t?o(t):e.focus()},F=n=>{0===y&&(y=1,n.addEventListener("focus",(o=>{((n,o)=>{const e=E(o,"ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover"),t=n.target;e&&t&&(e.classList.contains(X)||(e.shadowRoot?(()=>{if(e.contains(t))e.lastFocus=t;else if("ION-TOAST"===t.tagName)S(e.lastFocus,e);else{const n=e.lastFocus;f(e),n===o.activeElement&&h(e),e.lastFocus=o.activeElement}})():(()=>{if(e===t)e.lastFocus=void 0;else if("ION-TOAST"===t.tagName)S(e.lastFocus,e);else{const n=a(e);if(!n.contains(t))return;const i=n.querySelector(".ion-overlay-wrapper");if(!i)return;if(i.contains(t)||t===n.querySelector("ion-backdrop"))e.lastFocus=t;else{const n=e.lastFocus;f(i,e),n===o.activeElement&&h(i,e),e.lastFocus=o.activeElement}}})()))})(o,n)}),!0),n.addEventListener("ionBackButton",(o=>{const e=E(n);(null==e?void 0:e.backdropDismiss)&&o.detail.register(r,(()=>{e.dismiss(void 0,_)}))})),s()||n.addEventListener("keydown",(o=>{if("Escape"===o.key){const o=E(n);(null==o?void 0:o.backdropDismiss)&&o.dismiss(void 0,_)}})))},P=(n,o,e,t,i)=>{const a=E(n,t,i);return a?a.dismiss(o,e):Promise.reject("overlay does not exist")},Z=(n,o)=>((n,o)=>(void 0===o&&(o="ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover,ion-toast"),Array.from(n.querySelectorAll(o)).filter((n=>n.overlayIndex>0))))(n,o).filter((n=>!n.classList.contains("overlay-hidden"))),E=(n,o,e)=>{const t=Z(n,o);return void 0===e?t[t.length-1]:t.find((n=>n.id===e))},G=(n=!1)=>{const o=q(document).querySelector("ion-router-outlet, #ion-view-container-root");o&&(n?o.setAttribute("aria-hidden","true"):o.removeAttribute("aria-hidden"))},L=async(n,o,e,t,i)=>{var a,r,s;if(n.presented)return;"ION-TOAST"!==n.el.tagName&&M(n.el);const l=n.el,c=!1!==l.showBackdrop&&!((null!==(a=l.backdropBreakpoint)&&void 0!==a?a:0)>0),m="ION-TOAST"!==l.tagName&&!1!==l.focusTrap&&c;if(n.presented=!0,n.willPresent.emit(),m){const n=q(document).querySelector("ion-router-outlet, #ion-view-container-root");!!n&&n.contains(l)||G(!0),document.body.classList.add(p)}null===(r=n.willPresentShorthand)||void 0===r||r.emit();const v=u(n),f=n.enterAnimation?n.enterAnimation:d.get(o,"ios"===v?e:t);await U(n,f,n.el,i)&&(n.didPresent.emit(),null===(s=n.didPresentShorthand)||void 0===s||s.emit()),!n.keyboardClose||null!==document.activeElement&&n.el.contains(document.activeElement)||n.el.focus(),n.el.removeAttribute("aria-hidden"),n.el.removeAttribute("inert")},M=async n=>{let o=document.activeElement;if(!o)return;o.blur();const e=null==o?void 0:o.shadowRoot;e&&(o=e.querySelector(v)||o),await n.onDidDismiss(),null!==document.activeElement&&document.activeElement!==document.body||o.focus()},$=async(o,e,t,i,a,r,s)=>{var c,m,v;if(!o.presented)return!1;const f=(void 0!==n?Z(n):[]).filter((n=>{var o;const e=!1!==n.showBackdrop&&!((null!==(o=n.backdropBreakpoint)&&void 0!==o?o:0)>0);return"ION-TOAST"!==n.tagName&&!1!==n.focusTrap&&e})),h=o.el,b=!1!==h.showBackdrop&&!((null!==(c=h.backdropBreakpoint)&&void 0!==c?c:0)>0);"ION-TOAST"!==h.tagName&&!1!==h.focusTrap&&b&&1===f.length&&f[0].id===h.id&&(G(!1),document.body.classList.remove(p)),o.presented=!1;try{o.el.style.setProperty("pointer-events","none"),o.willDismiss.emit({data:e,role:t}),null===(m=o.willDismissShorthand)||void 0===m||m.emit({data:e,role:t});const n=u(o),l=o.leaveAnimation?o.leaveAnimation:d.get(i,"ios"===n?a:r);t!==H&&await U(o,l,o.el,s),o.didDismiss.emit({data:e,role:t}),null===(v=o.didDismissShorthand)||void 0===v||v.emit({data:e,role:t}),(g.get(o)||[]).forEach((n=>n.destroy())),g.delete(o),o.el.classList.add("overlay-hidden"),o.el.style.removeProperty("pointer-events"),void 0!==o.el.lastFocus&&(o.el.lastFocus=void 0)}catch(n){l(`[${o.el.tagName.toLowerCase()}] - `,n)}return o.el.remove(),!0},q=n=>n.querySelector("ion-app")||n.body,U=async(n,o,e,t)=>{e.classList.remove("overlay-hidden");const i=o(n.el,t);n.animated&&d.getBoolean("animated",!0)||i.duration(0),n.keyboardClose&&i.beforeAddWrite((()=>{const n=e.ownerDocument.activeElement;(null==n?void 0:n.matches("input,ion-input, ion-textarea"))&&n.blur()}));const a=g.get(n)||[];return g.set(n,[...a,i]),await i.play(),!0},V=(n,o)=>{let e;const t=new Promise((n=>e=n));return Y(n,o,(n=>{e(n.detail)})),t},Y=(n,o,e)=>{const a=t=>{i(n,o,a),e(t)};t(n,o,a)},z=n=>"cancel"===n||n===_,R=n=>n(),W=(n,o)=>{if("function"==typeof n)return d.get("_zoneGate",R)((()=>{try{return n(o)}catch(n){throw n}}))},_="backdrop",H="gesture",J=39,K=n=>{let o,e=!1;const t=m(),i=(i=!1)=>{if(o&&!i)return{delegate:o,inline:e};const{el:a,hasController:r,delegate:s}=n;return e=null!==a.parentNode&&!r,o=e?s||t:s,{inline:e,delegate:o}};return{attachViewToDom:async o=>{const{delegate:e}=i(!0);if(e)return await e.attachViewToDom(n.el,o);const{hasController:t}=n;if(t&&void 0!==o)throw new Error("framework delegate is missing");return null},removeViewFromDom:()=>{const{delegate:o}=i();o&&void 0!==n.el&&o.removeViewFromDom(n.el.parentElement,n.el)}}},Q=()=>{let n;const o=()=>{n&&(n(),n=void 0)};return{addClickListener:(e,t)=>{o();const i=void 0!==t?document.getElementById(t):null;i?n=((n,o)=>{const e=()=>{o.present()};return n.addEventListener("click",e),()=>{n.removeEventListener("click",e)}})(i,e):c(`[${e.tagName.toLowerCase()}] - A trigger element with the ID "${t}" was not found in the DOM. The trigger element must be in the DOM when the "trigger" property is set on an overlay component.`,e)},removeClickListener:o}},X="ion-disable-focus-trap";export{_ as B,X as F,H as G,J as O,T as a,k as b,C as c,K as d,Q as e,L as f,$ as g,V as h,z as i,B as j,I as k,x as l,j as m,f as n,E as o,A as p,h as q,W as s,N as t}
|