@ionic/core 8.7.17-dev.11768239180.18ee1069 → 8.7.17-dev.11768943212.1b316931
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/ion-range.js +12 -4
- package/components/modal.js +12 -213
- package/components/popover.js +11 -83
- package/dist/cjs/ion-modal.cjs.entry.js +12 -213
- package/dist/cjs/ion-popover.cjs.entry.js +11 -83
- package/dist/cjs/ion-range.cjs.entry.js +12 -4
- package/dist/collection/components/modal/gestures/sheet.js +1 -3
- package/dist/collection/components/modal/gestures/swipe-to-close.js +1 -3
- package/dist/collection/components/modal/modal.ios.css +4 -0
- package/dist/collection/components/modal/modal.js +7 -205
- package/dist/collection/components/modal/modal.md.css +4 -0
- package/dist/collection/components/popover/animations/ios.enter.js +5 -21
- package/dist/collection/components/popover/animations/md.enter.js +5 -30
- package/dist/collection/components/popover/utils.js +1 -32
- package/dist/collection/components/range/range.js +12 -4
- package/dist/docs.json +1 -1
- package/dist/esm/ion-modal.entry.js +12 -213
- package/dist/esm/ion-popover.entry.js +11 -83
- package/dist/esm/ion-range.entry.js +12 -4
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-91840a80.entry.js +4 -0
- package/dist/ionic/p-c58cbf72.entry.js +4 -0
- package/dist/ionic/p-f9061316.entry.js +4 -0
- package/dist/types/components/modal/gestures/sheet.d.ts +1 -1
- package/dist/types/components/modal/gestures/swipe-to-close.d.ts +1 -1
- package/dist/types/components/modal/modal.d.ts +0 -45
- package/dist/types/components/popover/utils.d.ts +0 -2
- package/hydrate/index.js +34 -299
- package/hydrate/index.mjs +34 -299
- package/package.json +1 -1
- package/dist/ionic/p-1647c46c.entry.js +0 -4
- package/dist/ionic/p-968a55d1.entry.js +0 -4
- package/dist/ionic/p-ec9ca3fe.entry.js +0 -4
package/hydrate/index.js
CHANGED
|
@@ -21533,7 +21533,7 @@ const calculateSpringStep = (t) => {
|
|
|
21533
21533
|
const SwipeToCloseDefaults = {
|
|
21534
21534
|
MIN_PRESENTING_SCALE: 0.915,
|
|
21535
21535
|
};
|
|
21536
|
-
const createSwipeToCloseGesture = (el, animation, statusBarStyle, onDismiss
|
|
21536
|
+
const createSwipeToCloseGesture = (el, animation, statusBarStyle, onDismiss) => {
|
|
21537
21537
|
/**
|
|
21538
21538
|
* The step value at which a card modal
|
|
21539
21539
|
* is eligible for dismissing via gesture.
|
|
@@ -21690,8 +21690,6 @@ const createSwipeToCloseGesture = (el, animation, statusBarStyle, onDismiss, onG
|
|
|
21690
21690
|
const processedStep = isAttemptingDismissWithCanDismiss ? calculateSpringStep(step / maxStep) : step;
|
|
21691
21691
|
const clampedStep = clamp(0.0001, processedStep, maxStep);
|
|
21692
21692
|
animation.progressStep(clampedStep);
|
|
21693
|
-
// Notify modal of position change for safe-area updates
|
|
21694
|
-
onGestureMove === null || onGestureMove === void 0 ? void 0 : onGestureMove();
|
|
21695
21693
|
/**
|
|
21696
21694
|
* When swiping down half way, the status bar style
|
|
21697
21695
|
* should be reset to its default value.
|
|
@@ -22235,7 +22233,7 @@ const mdLeaveAnimation$2 = (baseEl, opts) => {
|
|
|
22235
22233
|
return baseAnimation;
|
|
22236
22234
|
};
|
|
22237
22235
|
|
|
22238
|
-
const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], expandToScroll, getCurrentBreakpoint, onDismiss, onBreakpointChange
|
|
22236
|
+
const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], expandToScroll, getCurrentBreakpoint, onDismiss, onBreakpointChange) => {
|
|
22239
22237
|
// Defaults for the sheet swipe animation
|
|
22240
22238
|
const defaultBackdrop = [
|
|
22241
22239
|
{ offset: 0, opacity: 'var(--backdrop-opacity)' },
|
|
@@ -22566,8 +22564,6 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
22566
22564
|
: step;
|
|
22567
22565
|
offset = clamp(0.0001, processedStep, maxStep);
|
|
22568
22566
|
animation.progressStep(offset);
|
|
22569
|
-
// Notify modal of position change for safe-area updates
|
|
22570
|
-
onGestureMove === null || onGestureMove === void 0 ? void 0 : onGestureMove();
|
|
22571
22567
|
};
|
|
22572
22568
|
const onEnd = (detail) => {
|
|
22573
22569
|
/**
|
|
@@ -22762,9 +22758,9 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
22762
22758
|
};
|
|
22763
22759
|
};
|
|
22764
22760
|
|
|
22765
|
-
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}}@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}";
|
|
22761
|
+
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}";
|
|
22766
22762
|
|
|
22767
|
-
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}}@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}";
|
|
22763
|
+
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}";
|
|
22768
22764
|
|
|
22769
22765
|
// TODO(FW-2832): types
|
|
22770
22766
|
/**
|
|
@@ -22797,10 +22793,6 @@ class Modal {
|
|
|
22797
22793
|
this.inline = false;
|
|
22798
22794
|
// Whether or not modal is being dismissed via gesture
|
|
22799
22795
|
this.gestureAnimationDismissing = false;
|
|
22800
|
-
// Whether to skip coordinate-based safe-area detection (for fullscreen phone modals)
|
|
22801
|
-
this.skipSafeAreaCoordinateDetection = false;
|
|
22802
|
-
// Track previous safe-area state to avoid redundant DOM writes
|
|
22803
|
-
this.prevSafeAreaState = { top: false, bottom: false, left: false, right: false };
|
|
22804
22796
|
this.presented = false;
|
|
22805
22797
|
/** @internal */
|
|
22806
22798
|
this.hasController = false;
|
|
@@ -22991,10 +22983,7 @@ class Modal {
|
|
|
22991
22983
|
}
|
|
22992
22984
|
}
|
|
22993
22985
|
onWindowResize() {
|
|
22994
|
-
//
|
|
22995
|
-
this.cachedSafeAreas = undefined;
|
|
22996
|
-
this.updateSafeAreaOverrides();
|
|
22997
|
-
// Only handle view transition for iOS card modals when no custom animations are provided
|
|
22986
|
+
// Only handle resize for iOS card modals when no custom animations are provided
|
|
22998
22987
|
if (getIonMode$1(this) !== 'ios' || !this.presentingElement || this.enterAnimation || this.leaveAnimation) {
|
|
22999
22988
|
return;
|
|
23000
22989
|
}
|
|
@@ -23017,8 +23006,6 @@ class Modal {
|
|
|
23017
23006
|
this.triggerController.removeClickListener();
|
|
23018
23007
|
this.cleanupViewTransitionListener();
|
|
23019
23008
|
this.cleanupParentRemovalObserver();
|
|
23020
|
-
// Reset safe-area state to handle removal without dismiss (e.g., framework unmount)
|
|
23021
|
-
this.resetSafeAreaState();
|
|
23022
23009
|
}
|
|
23023
23010
|
componentWillLoad() {
|
|
23024
23011
|
var _a;
|
|
@@ -23178,8 +23165,6 @@ class Modal {
|
|
|
23178
23165
|
else if (!this.keepContentsMounted) {
|
|
23179
23166
|
await waitForMount();
|
|
23180
23167
|
}
|
|
23181
|
-
// Predict safe-area needs based on modal configuration to avoid visual snap
|
|
23182
|
-
this.setInitialSafeAreaOverrides(presentingElement);
|
|
23183
23168
|
writeTask(() => this.el.classList.add('show-modal'));
|
|
23184
23169
|
const hasCardModal = presentingElement !== undefined;
|
|
23185
23170
|
/**
|
|
@@ -23241,8 +23226,6 @@ class Modal {
|
|
|
23241
23226
|
else if (hasCardModal) {
|
|
23242
23227
|
this.initSwipeToClose();
|
|
23243
23228
|
}
|
|
23244
|
-
// Now that animation is complete, update safe-area based on actual position
|
|
23245
|
-
this.updateSafeAreaOverrides();
|
|
23246
23229
|
// Initialize view transition listener for iOS card modals
|
|
23247
23230
|
this.initViewTransitionListener();
|
|
23248
23231
|
// Initialize parent removal observer
|
|
@@ -23294,7 +23277,7 @@ class Modal {
|
|
|
23294
23277
|
await this.dismiss(undefined, GESTURE);
|
|
23295
23278
|
this.gestureAnimationDismissing = false;
|
|
23296
23279
|
});
|
|
23297
|
-
}
|
|
23280
|
+
});
|
|
23298
23281
|
this.gesture.enable(true);
|
|
23299
23282
|
}
|
|
23300
23283
|
initSheetGesture() {
|
|
@@ -23315,8 +23298,7 @@ class Modal {
|
|
|
23315
23298
|
this.currentBreakpoint = breakpoint;
|
|
23316
23299
|
this.ionBreakpointDidChange.emit({ breakpoint });
|
|
23317
23300
|
}
|
|
23318
|
-
|
|
23319
|
-
}, () => this.updateSafeAreaOverrides());
|
|
23301
|
+
});
|
|
23320
23302
|
this.gesture = gesture;
|
|
23321
23303
|
this.moveSheetToBreakpoint = moveSheetToBreakpoint;
|
|
23322
23304
|
this.gesture.enable(true);
|
|
@@ -23394,187 +23376,6 @@ class Modal {
|
|
|
23394
23376
|
// Clear the cached reference
|
|
23395
23377
|
this.cachedPageParent = undefined;
|
|
23396
23378
|
}
|
|
23397
|
-
/**
|
|
23398
|
-
* Sets initial safe-area overrides based on modal configuration before
|
|
23399
|
-
* the modal becomes visible. This predicts whether the modal will touch
|
|
23400
|
-
* screen edges to avoid a visual snap after animation completes.
|
|
23401
|
-
*/
|
|
23402
|
-
setInitialSafeAreaOverrides(presentingElement) {
|
|
23403
|
-
const style = this.el.style;
|
|
23404
|
-
const mode = getIonMode$1(this);
|
|
23405
|
-
const isSheetModal = this.breakpoints !== undefined && this.initialBreakpoint !== undefined;
|
|
23406
|
-
// Card modals only exist in iOS mode - in MD mode, presentingElement is ignored
|
|
23407
|
-
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
23408
|
-
const isTablet = window.innerWidth >= 768;
|
|
23409
|
-
// Sheet modals always touch bottom edge, never top/left/right
|
|
23410
|
-
if (isSheetModal) {
|
|
23411
|
-
style.setProperty('--ion-safe-area-top', '0px');
|
|
23412
|
-
style.setProperty('--ion-safe-area-left', '0px');
|
|
23413
|
-
style.setProperty('--ion-safe-area-right', '0px');
|
|
23414
|
-
return;
|
|
23415
|
-
}
|
|
23416
|
-
// Card modals have rounded top corners
|
|
23417
|
-
if (isCardModal) {
|
|
23418
|
-
style.setProperty('--ion-safe-area-top', '0px');
|
|
23419
|
-
if (isTablet) {
|
|
23420
|
-
// On tablets, card modals are inset from all edges
|
|
23421
|
-
this.zeroAllSafeAreas();
|
|
23422
|
-
}
|
|
23423
|
-
else {
|
|
23424
|
-
// On phones, card modals still extend to the bottom edge
|
|
23425
|
-
style.setProperty('--ion-safe-area-left', '0px');
|
|
23426
|
-
style.setProperty('--ion-safe-area-right', '0px');
|
|
23427
|
-
this.applyFullscreenSafeArea();
|
|
23428
|
-
}
|
|
23429
|
-
return;
|
|
23430
|
-
}
|
|
23431
|
-
// Phone-sized fullscreen modals inherit safe areas and use wrapper padding
|
|
23432
|
-
if (!isTablet) {
|
|
23433
|
-
this.applyFullscreenSafeArea();
|
|
23434
|
-
return;
|
|
23435
|
-
}
|
|
23436
|
-
// Check if tablet modal is fullscreen via CSS custom properties
|
|
23437
|
-
const computedStyle = getComputedStyle(this.el);
|
|
23438
|
-
const width = computedStyle.getPropertyValue('--width').trim();
|
|
23439
|
-
const height = computedStyle.getPropertyValue('--height').trim();
|
|
23440
|
-
const isFullscreen = width === '100%' && height === '100%';
|
|
23441
|
-
if (isFullscreen) {
|
|
23442
|
-
this.applyFullscreenSafeArea();
|
|
23443
|
-
}
|
|
23444
|
-
else {
|
|
23445
|
-
// Centered dialog doesn't touch edges
|
|
23446
|
-
this.zeroAllSafeAreas();
|
|
23447
|
-
}
|
|
23448
|
-
}
|
|
23449
|
-
/**
|
|
23450
|
-
* Applies safe-area handling for fullscreen modals.
|
|
23451
|
-
* Adds wrapper padding when no footer is present to prevent
|
|
23452
|
-
* content from overlapping system navigation areas.
|
|
23453
|
-
*/
|
|
23454
|
-
applyFullscreenSafeArea() {
|
|
23455
|
-
this.skipSafeAreaCoordinateDetection = true;
|
|
23456
|
-
this.updateFooterPadding();
|
|
23457
|
-
// Watch for dynamic footer additions/removals (e.g., async data loading)
|
|
23458
|
-
// Use subtree:true to support wrapped footers in framework components
|
|
23459
|
-
// (e.g., <my-footer><ion-footer>...</ion-footer></my-footer>)
|
|
23460
|
-
if (!this.footerObserver && win$1 !== undefined && 'MutationObserver' in win$1) {
|
|
23461
|
-
this.footerObserver = new MutationObserver(() => this.updateFooterPadding());
|
|
23462
|
-
this.footerObserver.observe(this.el, { childList: true, subtree: true });
|
|
23463
|
-
}
|
|
23464
|
-
}
|
|
23465
|
-
/**
|
|
23466
|
-
* Updates wrapper padding based on footer presence.
|
|
23467
|
-
* Called initially and when footer is dynamically added/removed.
|
|
23468
|
-
*/
|
|
23469
|
-
updateFooterPadding() {
|
|
23470
|
-
if (!this.wrapperEl)
|
|
23471
|
-
return;
|
|
23472
|
-
const hasFooter = this.el.querySelector('ion-footer') !== null;
|
|
23473
|
-
if (hasFooter) {
|
|
23474
|
-
this.wrapperEl.style.removeProperty('padding-bottom');
|
|
23475
|
-
this.wrapperEl.style.removeProperty('box-sizing');
|
|
23476
|
-
}
|
|
23477
|
-
else {
|
|
23478
|
-
this.wrapperEl.style.setProperty('padding-bottom', 'var(--ion-safe-area-bottom, 0px)');
|
|
23479
|
-
this.wrapperEl.style.setProperty('box-sizing', 'border-box');
|
|
23480
|
-
}
|
|
23481
|
-
}
|
|
23482
|
-
/**
|
|
23483
|
-
* Sets all safe-area CSS variables to 0px for modals that
|
|
23484
|
-
* don't touch screen edges.
|
|
23485
|
-
*/
|
|
23486
|
-
zeroAllSafeAreas() {
|
|
23487
|
-
const style = this.el.style;
|
|
23488
|
-
style.setProperty('--ion-safe-area-top', '0px');
|
|
23489
|
-
style.setProperty('--ion-safe-area-bottom', '0px');
|
|
23490
|
-
style.setProperty('--ion-safe-area-left', '0px');
|
|
23491
|
-
style.setProperty('--ion-safe-area-right', '0px');
|
|
23492
|
-
}
|
|
23493
|
-
/**
|
|
23494
|
-
* Resets all safe-area related state and styles.
|
|
23495
|
-
* Called during dismiss and disconnectedCallback to ensure clean state
|
|
23496
|
-
* for re-presentation of inline modals.
|
|
23497
|
-
*/
|
|
23498
|
-
resetSafeAreaState() {
|
|
23499
|
-
var _a;
|
|
23500
|
-
this.skipSafeAreaCoordinateDetection = false;
|
|
23501
|
-
this.cachedSafeAreas = undefined;
|
|
23502
|
-
this.prevSafeAreaState = { top: false, bottom: false, left: false, right: false };
|
|
23503
|
-
(_a = this.footerObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
23504
|
-
this.footerObserver = undefined;
|
|
23505
|
-
// Clear wrapper styles that may have been set for safe-area handling
|
|
23506
|
-
if (this.wrapperEl) {
|
|
23507
|
-
this.wrapperEl.style.removeProperty('padding-bottom');
|
|
23508
|
-
this.wrapperEl.style.removeProperty('box-sizing');
|
|
23509
|
-
}
|
|
23510
|
-
// Clear safe-area CSS variable overrides
|
|
23511
|
-
const style = this.el.style;
|
|
23512
|
-
style.removeProperty('--ion-safe-area-top');
|
|
23513
|
-
style.removeProperty('--ion-safe-area-bottom');
|
|
23514
|
-
style.removeProperty('--ion-safe-area-left');
|
|
23515
|
-
style.removeProperty('--ion-safe-area-right');
|
|
23516
|
-
}
|
|
23517
|
-
/**
|
|
23518
|
-
* Gets the root safe-area values from the document element.
|
|
23519
|
-
* Uses cached values during gestures to avoid getComputedStyle calls.
|
|
23520
|
-
*/
|
|
23521
|
-
getSafeAreaValues() {
|
|
23522
|
-
if (!this.cachedSafeAreas) {
|
|
23523
|
-
const rootStyle = getComputedStyle(document.documentElement);
|
|
23524
|
-
this.cachedSafeAreas = {
|
|
23525
|
-
top: parseFloat(rootStyle.getPropertyValue('--ion-safe-area-top')) || 0,
|
|
23526
|
-
bottom: parseFloat(rootStyle.getPropertyValue('--ion-safe-area-bottom')) || 0,
|
|
23527
|
-
left: parseFloat(rootStyle.getPropertyValue('--ion-safe-area-left')) || 0,
|
|
23528
|
-
right: parseFloat(rootStyle.getPropertyValue('--ion-safe-area-right')) || 0,
|
|
23529
|
-
};
|
|
23530
|
-
}
|
|
23531
|
-
return this.cachedSafeAreas;
|
|
23532
|
-
}
|
|
23533
|
-
/**
|
|
23534
|
-
* Updates safe-area CSS variable overrides based on whether the modal
|
|
23535
|
-
* extends into each safe-area region. Called after animation
|
|
23536
|
-
* and during gestures to handle dynamic position changes.
|
|
23537
|
-
*
|
|
23538
|
-
* Optimized to avoid redundant DOM writes by tracking previous state.
|
|
23539
|
-
*/
|
|
23540
|
-
updateSafeAreaOverrides() {
|
|
23541
|
-
if (this.skipSafeAreaCoordinateDetection) {
|
|
23542
|
-
return;
|
|
23543
|
-
}
|
|
23544
|
-
const wrapper = this.wrapperEl;
|
|
23545
|
-
if (!wrapper) {
|
|
23546
|
-
return;
|
|
23547
|
-
}
|
|
23548
|
-
const rect = wrapper.getBoundingClientRect();
|
|
23549
|
-
const safeAreas = this.getSafeAreaValues();
|
|
23550
|
-
const extendsIntoTop = rect.top < safeAreas.top;
|
|
23551
|
-
const extendsIntoBottom = rect.bottom > window.innerHeight - safeAreas.bottom;
|
|
23552
|
-
const extendsIntoLeft = rect.left < safeAreas.left;
|
|
23553
|
-
const extendsIntoRight = rect.right > window.innerWidth - safeAreas.right;
|
|
23554
|
-
// Only update DOM when state actually changes
|
|
23555
|
-
const prev = this.prevSafeAreaState;
|
|
23556
|
-
const style = this.el.style;
|
|
23557
|
-
if (extendsIntoTop !== prev.top) {
|
|
23558
|
-
extendsIntoTop ? style.removeProperty('--ion-safe-area-top') : style.setProperty('--ion-safe-area-top', '0px');
|
|
23559
|
-
prev.top = extendsIntoTop;
|
|
23560
|
-
}
|
|
23561
|
-
if (extendsIntoBottom !== prev.bottom) {
|
|
23562
|
-
extendsIntoBottom
|
|
23563
|
-
? style.removeProperty('--ion-safe-area-bottom')
|
|
23564
|
-
: style.setProperty('--ion-safe-area-bottom', '0px');
|
|
23565
|
-
prev.bottom = extendsIntoBottom;
|
|
23566
|
-
}
|
|
23567
|
-
if (extendsIntoLeft !== prev.left) {
|
|
23568
|
-
extendsIntoLeft ? style.removeProperty('--ion-safe-area-left') : style.setProperty('--ion-safe-area-left', '0px');
|
|
23569
|
-
prev.left = extendsIntoLeft;
|
|
23570
|
-
}
|
|
23571
|
-
if (extendsIntoRight !== prev.right) {
|
|
23572
|
-
extendsIntoRight
|
|
23573
|
-
? style.removeProperty('--ion-safe-area-right')
|
|
23574
|
-
: style.setProperty('--ion-safe-area-right', '0px');
|
|
23575
|
-
prev.right = extendsIntoRight;
|
|
23576
|
-
}
|
|
23577
|
-
}
|
|
23578
23379
|
sheetOnDismiss() {
|
|
23579
23380
|
/**
|
|
23580
23381
|
* While the gesture animation is finishing
|
|
@@ -23667,8 +23468,6 @@ class Modal {
|
|
|
23667
23468
|
}
|
|
23668
23469
|
this.currentBreakpoint = undefined;
|
|
23669
23470
|
this.animation = undefined;
|
|
23670
|
-
// Reset safe-area state for potential re-presentation
|
|
23671
|
-
this.resetSafeAreaState();
|
|
23672
23471
|
unlock();
|
|
23673
23472
|
return dismissed;
|
|
23674
23473
|
}
|
|
@@ -23918,20 +23717,20 @@ class Modal {
|
|
|
23918
23717
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
23919
23718
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
23920
23719
|
const isSheetModalWithHandle = isSheetModal && showHandle;
|
|
23921
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
23720
|
+
return (hAsync(Host, Object.assign({ key: '87328006ea6c75ebc518ace300438492a567223e', "no-router": true,
|
|
23922
23721
|
// Allow the modal to be navigable when the handle is focusable
|
|
23923
23722
|
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
23924
23723
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
23925
|
-
}, 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: '
|
|
23724
|
+
}, 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: 'ee94ff8e09b691dd4ad4e4db1720f06bc3c5a469', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { key: 'bffd69b4635c22d9f249725bd952c1e93d5615c7', class: "modal-shadow" }), hAsync("div", Object.assign({ key: '1d394d3c68916e464ff1fbf5242419f4a3d3cca1',
|
|
23926
23725
|
/*
|
|
23927
23726
|
role and aria-modal must be used on the
|
|
23928
23727
|
same element. They must also be set inside the
|
|
23929
23728
|
shadow DOM otherwise ion-button will not be highlighted
|
|
23930
23729
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
23931
23730
|
*/
|
|
23932
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '
|
|
23731
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '2dcf58792018e557e0c323baad2d672bc99c0bb1', class: "modal-handle",
|
|
23933
23732
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
23934
|
-
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: '
|
|
23733
|
+
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: '44164b1e8710c3895400ad9f44ecd99873874ad5', onSlotchange: this.onSlotChange }))));
|
|
23935
23734
|
}
|
|
23936
23735
|
get el() { return getElement(this); }
|
|
23937
23736
|
static get watchers() { return {
|
|
@@ -27509,8 +27308,6 @@ const calculateWindowAdjustment = (side, coordTop, coordLeft, bodyPadding, bodyW
|
|
|
27509
27308
|
let bottom;
|
|
27510
27309
|
let originX = contentOriginX;
|
|
27511
27310
|
let originY = contentOriginY;
|
|
27512
|
-
let checkSafeAreaTop = false;
|
|
27513
|
-
let checkSafeAreaBottom = false;
|
|
27514
27311
|
let checkSafeAreaLeft = false;
|
|
27515
27312
|
let checkSafeAreaRight = false;
|
|
27516
27313
|
const triggerTop = triggerCoordinates
|
|
@@ -27555,18 +27352,10 @@ const calculateWindowAdjustment = (side, coordTop, coordLeft, bodyPadding, bodyW
|
|
|
27555
27352
|
* We chose 12 here so that the popover position looks a bit nicer as
|
|
27556
27353
|
* it is not right up against the edge of the screen.
|
|
27557
27354
|
*/
|
|
27558
|
-
top = Math.max(
|
|
27355
|
+
top = Math.max(12, triggerTop - contentHeight - triggerHeight - (arrowHeight - 1));
|
|
27559
27356
|
arrowTop = top + contentHeight;
|
|
27560
27357
|
originY = 'bottom';
|
|
27561
27358
|
addPopoverBottomClass = true;
|
|
27562
|
-
/**
|
|
27563
|
-
* If the popover is positioned near the top edge, account for safe area.
|
|
27564
|
-
* This ensures the popover doesn't overlap with status bars or notches.
|
|
27565
|
-
*/
|
|
27566
|
-
if (top <= bodyPadding + safeAreaMargin) {
|
|
27567
|
-
checkSafeAreaTop = true;
|
|
27568
|
-
top = bodyPadding;
|
|
27569
|
-
}
|
|
27570
27359
|
/**
|
|
27571
27360
|
* If not enough room for popover to appear
|
|
27572
27361
|
* above trigger, then cut it off.
|
|
@@ -27574,35 +27363,14 @@ const calculateWindowAdjustment = (side, coordTop, coordLeft, bodyPadding, bodyW
|
|
|
27574
27363
|
}
|
|
27575
27364
|
else {
|
|
27576
27365
|
bottom = bodyPadding;
|
|
27577
|
-
/**
|
|
27578
|
-
* When the popover is pinned to the bottom, account for safe area.
|
|
27579
|
-
* This ensures the popover doesn't overlap with home indicators
|
|
27580
|
-
* or navigation bars (e.g., Android API 36+ edge-to-edge).
|
|
27581
|
-
*/
|
|
27582
|
-
checkSafeAreaBottom = true;
|
|
27583
27366
|
}
|
|
27584
27367
|
}
|
|
27585
|
-
/**
|
|
27586
|
-
* Final check: If the popover extends into any safe-area region,
|
|
27587
|
-
* ensure the corresponding flag is set regardless of side.
|
|
27588
|
-
* This handles cases where a side-positioned popover (left/right)
|
|
27589
|
-
* still needs bottom safe-area padding because it extends into that region.
|
|
27590
|
-
*/
|
|
27591
|
-
const popoverBottom = bottom !== undefined ? bodyHeight - bottom : top + contentHeight;
|
|
27592
|
-
if (popoverBottom + safeAreaMargin > bodyHeight) {
|
|
27593
|
-
checkSafeAreaBottom = true;
|
|
27594
|
-
}
|
|
27595
|
-
if (top < safeAreaMargin) {
|
|
27596
|
-
checkSafeAreaTop = true;
|
|
27597
|
-
}
|
|
27598
27368
|
return {
|
|
27599
27369
|
top,
|
|
27600
27370
|
left,
|
|
27601
27371
|
bottom,
|
|
27602
27372
|
originX,
|
|
27603
27373
|
originY,
|
|
27604
|
-
checkSafeAreaTop,
|
|
27605
|
-
checkSafeAreaBottom,
|
|
27606
27374
|
checkSafeAreaLeft,
|
|
27607
27375
|
checkSafeAreaRight,
|
|
27608
27376
|
arrowTop,
|
|
@@ -27663,7 +27431,7 @@ const iosEnterAnimation$1 = (baseEl, opts) => {
|
|
|
27663
27431
|
const results = getPopoverPosition(isRTL, contentWidth, contentHeight, arrowWidth, arrowHeight, reference, side, align, defaultPosition, trigger, ev);
|
|
27664
27432
|
const padding = size === 'cover' ? 0 : POPOVER_IOS_BODY_PADDING;
|
|
27665
27433
|
const margin = size === 'cover' ? 0 : 25;
|
|
27666
|
-
const { originX, originY, top, left, bottom,
|
|
27434
|
+
const { originX, originY, top, left, bottom, checkSafeAreaLeft, checkSafeAreaRight, arrowTop, arrowLeft, addPopoverBottomClass, } = calculateWindowAdjustment(side, results.top, results.left, padding, bodyWidth, bodyHeight, contentWidth, contentHeight, margin, results.originX, results.originY, results.referenceCoordinates, results.arrowTop, results.arrowLeft, arrowHeight);
|
|
27667
27435
|
const baseAnimation = createAnimation();
|
|
27668
27436
|
const backdropAnimation = createAnimation();
|
|
27669
27437
|
const contentAnimation = createAnimation();
|
|
@@ -27693,35 +27461,19 @@ const iosEnterAnimation$1 = (baseEl, opts) => {
|
|
|
27693
27461
|
if (addPopoverBottomClass) {
|
|
27694
27462
|
baseEl.classList.add('popover-bottom');
|
|
27695
27463
|
}
|
|
27696
|
-
|
|
27697
|
-
|
|
27698
|
-
|
|
27699
|
-
* safe-area inset to ensure the popover doesn't overlap with system UI
|
|
27700
|
-
* (status bars, home indicators, navigation bars on Android API 36+, etc.)
|
|
27701
|
-
*/
|
|
27702
|
-
const safeAreaTop = ' + var(--ion-safe-area-top, 0)';
|
|
27703
|
-
const safeAreaBottom = ' + var(--ion-safe-area-bottom, 0)';
|
|
27464
|
+
if (bottom !== undefined) {
|
|
27465
|
+
contentEl.style.setProperty('bottom', `${bottom}px`);
|
|
27466
|
+
}
|
|
27704
27467
|
const safeAreaLeft = ' + var(--ion-safe-area-left, 0)';
|
|
27705
27468
|
const safeAreaRight = ' - var(--ion-safe-area-right, 0)';
|
|
27706
|
-
let topValue = `${top}px`;
|
|
27707
|
-
let bottomValue = bottom !== undefined ? `${bottom}px` : undefined;
|
|
27708
27469
|
let leftValue = `${left}px`;
|
|
27709
|
-
if (checkSafeAreaTop) {
|
|
27710
|
-
topValue = `${top}px${safeAreaTop}`;
|
|
27711
|
-
}
|
|
27712
|
-
if (checkSafeAreaBottom && bottomValue !== undefined) {
|
|
27713
|
-
bottomValue = `${bottom}px${safeAreaBottom}`;
|
|
27714
|
-
}
|
|
27715
27470
|
if (checkSafeAreaLeft) {
|
|
27716
27471
|
leftValue = `${left}px${safeAreaLeft}`;
|
|
27717
27472
|
}
|
|
27718
27473
|
if (checkSafeAreaRight) {
|
|
27719
27474
|
leftValue = `${left}px${safeAreaRight}`;
|
|
27720
27475
|
}
|
|
27721
|
-
|
|
27722
|
-
contentEl.style.setProperty('bottom', `calc(${bottomValue})`);
|
|
27723
|
-
}
|
|
27724
|
-
contentEl.style.setProperty('top', `calc(${topValue} + var(--offset-y, 0))`);
|
|
27476
|
+
contentEl.style.setProperty('top', `calc(${top}px + var(--offset-y, 0))`);
|
|
27725
27477
|
contentEl.style.setProperty('left', `calc(${leftValue} + var(--offset-x, 0))`);
|
|
27726
27478
|
contentEl.style.setProperty('transform-origin', `${originY} ${originX}`);
|
|
27727
27479
|
if (arrowEl !== null) {
|
|
@@ -27797,32 +27549,7 @@ const mdEnterAnimation$1 = (baseEl, opts) => {
|
|
|
27797
27549
|
};
|
|
27798
27550
|
const results = getPopoverPosition(isRTL, contentWidth, contentHeight, 0, 0, reference, side, align, defaultPosition, trigger, ev);
|
|
27799
27551
|
const padding = size === 'cover' ? 0 : POPOVER_MD_BODY_PADDING;
|
|
27800
|
-
const { originX, originY, top, left, bottom
|
|
27801
|
-
/**
|
|
27802
|
-
* Safe area CSS variable adjustments.
|
|
27803
|
-
* When the popover is positioned near an edge, we add the corresponding
|
|
27804
|
-
* safe-area inset to ensure the popover doesn't overlap with system UI
|
|
27805
|
-
* (status bars, home indicators, navigation bars on Android API 36+, etc.)
|
|
27806
|
-
*/
|
|
27807
|
-
const safeAreaTop = ' + var(--ion-safe-area-top, 0)';
|
|
27808
|
-
const safeAreaBottom = ' + var(--ion-safe-area-bottom, 0)';
|
|
27809
|
-
const safeAreaLeft = ' + var(--ion-safe-area-left, 0)';
|
|
27810
|
-
const safeAreaRight = ' - var(--ion-safe-area-right, 0)';
|
|
27811
|
-
let topValue = `${top}px`;
|
|
27812
|
-
let bottomValue = bottom !== undefined ? `${bottom}px` : undefined;
|
|
27813
|
-
let leftValue = `${left}px`;
|
|
27814
|
-
if (checkSafeAreaTop) {
|
|
27815
|
-
topValue = `${top}px${safeAreaTop}`;
|
|
27816
|
-
}
|
|
27817
|
-
if (checkSafeAreaBottom && bottomValue !== undefined) {
|
|
27818
|
-
bottomValue = `${bottom}px${safeAreaBottom}`;
|
|
27819
|
-
}
|
|
27820
|
-
if (checkSafeAreaLeft) {
|
|
27821
|
-
leftValue = `${left}px${safeAreaLeft}`;
|
|
27822
|
-
}
|
|
27823
|
-
if (checkSafeAreaRight) {
|
|
27824
|
-
leftValue = `${left}px${safeAreaRight}`;
|
|
27825
|
-
}
|
|
27552
|
+
const { originX, originY, top, left, bottom } = calculateWindowAdjustment(side, results.top, results.left, padding, bodyWidth, bodyHeight, contentWidth, contentHeight, 0, results.originX, results.originY, results.referenceCoordinates);
|
|
27826
27553
|
const baseAnimation = createAnimation();
|
|
27827
27554
|
const backdropAnimation = createAnimation();
|
|
27828
27555
|
const wrapperAnimation = createAnimation();
|
|
@@ -27839,13 +27566,13 @@ const mdEnterAnimation$1 = (baseEl, opts) => {
|
|
|
27839
27566
|
contentAnimation
|
|
27840
27567
|
.addElement(contentEl)
|
|
27841
27568
|
.beforeStyles({
|
|
27842
|
-
top: `calc(${
|
|
27843
|
-
left: `calc(${
|
|
27569
|
+
top: `calc(${top}px + var(--offset-y, 0px))`,
|
|
27570
|
+
left: `calc(${left}px + var(--offset-x, 0px))`,
|
|
27844
27571
|
'transform-origin': `${originY} ${originX}`,
|
|
27845
27572
|
})
|
|
27846
27573
|
.beforeAddWrite(() => {
|
|
27847
|
-
if (
|
|
27848
|
-
contentEl.style.setProperty('bottom',
|
|
27574
|
+
if (bottom !== undefined) {
|
|
27575
|
+
contentEl.style.setProperty('bottom', `${bottom}px`);
|
|
27849
27576
|
}
|
|
27850
27577
|
})
|
|
27851
27578
|
.fromTo('transform', 'scale(0.8)', 'scale(1)');
|
|
@@ -29642,7 +29369,7 @@ class Range {
|
|
|
29642
29369
|
})));
|
|
29643
29370
|
}
|
|
29644
29371
|
render() {
|
|
29645
|
-
const { disabled, el, hasLabel, rangeId, pin, pressedKnob, labelPlacement, label } = this;
|
|
29372
|
+
const { disabled, el, hasLabel, rangeId, pin, pressedKnob, labelPlacement, label, min, max, dualKnobs } = this;
|
|
29646
29373
|
const inItem = hostContext('ion-item', el);
|
|
29647
29374
|
/**
|
|
29648
29375
|
* If there is no start content then the knob at
|
|
@@ -29657,8 +29384,14 @@ class Range {
|
|
|
29657
29384
|
const hasEndContent = (hasLabel && labelPlacement === 'end') || this.hasEndSlotContent;
|
|
29658
29385
|
const needsEndAdjustment = inItem && !hasEndContent;
|
|
29659
29386
|
const mode = getIonMode$1(this);
|
|
29387
|
+
/**
|
|
29388
|
+
* Determine if any knob is at the min or max value to
|
|
29389
|
+
* apply Host classes for styling.
|
|
29390
|
+
*/
|
|
29391
|
+
const valueAtMin = dualKnobs ? this.valA === min || this.valB === min : this.valA === min;
|
|
29392
|
+
const valueAtMax = dualKnobs ? this.valA === max || this.valB === max : this.valA === max;
|
|
29660
29393
|
renderHiddenInput(true, el, this.name, JSON.stringify(this.getValue()), disabled);
|
|
29661
|
-
return (hAsync(Host, { key: '
|
|
29394
|
+
return (hAsync(Host, { key: 'ed646a42d51b8fe22012198c354cbcf5a389c108', onFocusin: this.onFocus, onFocusout: this.onBlur, id: rangeId, class: createColorClasses$1(this.color, {
|
|
29662
29395
|
[mode]: true,
|
|
29663
29396
|
'in-item': inItem,
|
|
29664
29397
|
'range-disabled': disabled,
|
|
@@ -29667,10 +29400,12 @@ class Range {
|
|
|
29667
29400
|
[`range-label-placement-${labelPlacement}`]: true,
|
|
29668
29401
|
'range-item-start-adjustment': needsStartAdjustment,
|
|
29669
29402
|
'range-item-end-adjustment': needsEndAdjustment,
|
|
29670
|
-
|
|
29403
|
+
'range-value-min': valueAtMin,
|
|
29404
|
+
'range-value-max': valueAtMax,
|
|
29405
|
+
}) }, hAsync("label", { key: '3083e4f2a624e3b268396acb4415f7c6ac44d851', class: "range-wrapper", id: "range-label" }, hAsync("div", { key: '47b92f94d2a0381dd7c5cd3dda54ed2942096715', class: {
|
|
29671
29406
|
'label-text-wrapper': true,
|
|
29672
29407
|
'label-text-wrapper-hidden': !hasLabel,
|
|
29673
|
-
}, part: "label" }, label !== undefined ? hAsync("div", { class: "label-text" }, label) : hAsync("slot", { name: "label" })), hAsync("div", { key: '
|
|
29408
|
+
}, part: "label" }, label !== undefined ? hAsync("div", { class: "label-text" }, label) : hAsync("slot", { name: "label" })), hAsync("div", { key: '5341da8d19eb29091df680978a0e20cc8f2eec65', class: "native-wrapper" }, hAsync("slot", { key: '09f1437078032676695442d8c827a16faa7dffe2', name: "start" }), this.renderRangeSlider(), hAsync("slot", { key: '02b7781970ea4d44f10b5f4627a2ca36eca45f85', name: "end" })))));
|
|
29674
29409
|
}
|
|
29675
29410
|
get el() { return getElement(this); }
|
|
29676
29411
|
static get watchers() { return {
|