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