@ionic/core 8.7.17-dev.11767796972.148e4bc4 → 8.7.17-dev.11767895575.16ea7cef
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 +6 -79
- package/components/ion-tab-bar.js +23 -3
- package/components/modal.js +12 -200
- package/components/popover.js +10 -73
- package/dist/cjs/ion-app_8.cjs.entry.js +5 -78
- package/dist/cjs/ion-modal.cjs.entry.js +12 -200
- package/dist/cjs/ion-popover.cjs.entry.js +10 -73
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +23 -3
- package/dist/collection/components/content/content.css +0 -10
- package/dist/collection/components/content/content.js +4 -77
- 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 +8 -192
- 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 +4 -20
- package/dist/collection/components/popover/utils.js +1 -32
- package/dist/collection/components/tab-bar/tab-bar.js +23 -3
- package/dist/docs.json +1 -1
- package/dist/esm/ion-app_8.entry.js +6 -79
- package/dist/esm/ion-modal.entry.js +12 -200
- package/dist/esm/ion-popover.entry.js +10 -73
- package/dist/esm/ion-tab-bar_2.entry.js +23 -3
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-172a579f.entry.js +4 -0
- package/dist/ionic/p-732b2fd6.entry.js +4 -0
- package/dist/ionic/p-91840a80.entry.js +4 -0
- package/dist/ionic/p-f9061316.entry.js +4 -0
- package/dist/types/components/content/content.d.ts +0 -24
- 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 -39
- package/dist/types/components/popover/utils.d.ts +0 -2
- package/dist/types/components/tab-bar/tab-bar.d.ts +1 -0
- package/hydrate/index.js +50 -353
- package/hydrate/index.mjs +50 -353
- package/package.json +1 -1
- package/dist/ionic/p-3830217a.entry.js +0 -4
- package/dist/ionic/p-7268efa5.entry.js +0 -4
- package/dist/ionic/p-a4827773.entry.js +0 -4
- package/dist/ionic/p-cecd141b.entry.js +0 -4
|
@@ -660,8 +660,6 @@ const calculateWindowAdjustment = (side, coordTop, coordLeft, bodyPadding, bodyW
|
|
|
660
660
|
let bottom;
|
|
661
661
|
let originX = contentOriginX;
|
|
662
662
|
let originY = contentOriginY;
|
|
663
|
-
let checkSafeAreaTop = false;
|
|
664
|
-
let checkSafeAreaBottom = false;
|
|
665
663
|
let checkSafeAreaLeft = false;
|
|
666
664
|
let checkSafeAreaRight = false;
|
|
667
665
|
const triggerTop = triggerCoordinates
|
|
@@ -706,18 +704,10 @@ const calculateWindowAdjustment = (side, coordTop, coordLeft, bodyPadding, bodyW
|
|
|
706
704
|
* We chose 12 here so that the popover position looks a bit nicer as
|
|
707
705
|
* it is not right up against the edge of the screen.
|
|
708
706
|
*/
|
|
709
|
-
top = Math.max(
|
|
707
|
+
top = Math.max(12, triggerTop - contentHeight - triggerHeight - (arrowHeight - 1));
|
|
710
708
|
arrowTop = top + contentHeight;
|
|
711
709
|
originY = 'bottom';
|
|
712
710
|
addPopoverBottomClass = true;
|
|
713
|
-
/**
|
|
714
|
-
* If the popover is positioned near the top edge, account for safe area.
|
|
715
|
-
* This ensures the popover doesn't overlap with status bars or notches.
|
|
716
|
-
*/
|
|
717
|
-
if (top <= bodyPadding + safeAreaMargin) {
|
|
718
|
-
checkSafeAreaTop = true;
|
|
719
|
-
top = bodyPadding;
|
|
720
|
-
}
|
|
721
711
|
/**
|
|
722
712
|
* If not enough room for popover to appear
|
|
723
713
|
* above trigger, then cut it off.
|
|
@@ -725,35 +715,14 @@ const calculateWindowAdjustment = (side, coordTop, coordLeft, bodyPadding, bodyW
|
|
|
725
715
|
}
|
|
726
716
|
else {
|
|
727
717
|
bottom = bodyPadding;
|
|
728
|
-
/**
|
|
729
|
-
* When the popover is pinned to the bottom, account for safe area.
|
|
730
|
-
* This ensures the popover doesn't overlap with home indicators
|
|
731
|
-
* or navigation bars (e.g., Android API 36+ edge-to-edge).
|
|
732
|
-
*/
|
|
733
|
-
checkSafeAreaBottom = true;
|
|
734
718
|
}
|
|
735
719
|
}
|
|
736
|
-
/**
|
|
737
|
-
* Final check: If the popover extends into any safe-area region,
|
|
738
|
-
* ensure the corresponding flag is set regardless of side.
|
|
739
|
-
* This handles cases where a side-positioned popover (left/right)
|
|
740
|
-
* still needs bottom safe-area padding because it extends into that region.
|
|
741
|
-
*/
|
|
742
|
-
const popoverBottom = bottom !== undefined ? bodyHeight - bottom : top + contentHeight;
|
|
743
|
-
if (popoverBottom + safeAreaMargin > bodyHeight) {
|
|
744
|
-
checkSafeAreaBottom = true;
|
|
745
|
-
}
|
|
746
|
-
if (top < safeAreaMargin) {
|
|
747
|
-
checkSafeAreaTop = true;
|
|
748
|
-
}
|
|
749
720
|
return {
|
|
750
721
|
top,
|
|
751
722
|
left,
|
|
752
723
|
bottom,
|
|
753
724
|
originX,
|
|
754
725
|
originY,
|
|
755
|
-
checkSafeAreaTop,
|
|
756
|
-
checkSafeAreaBottom,
|
|
757
726
|
checkSafeAreaLeft,
|
|
758
727
|
checkSafeAreaRight,
|
|
759
728
|
arrowTop,
|
|
@@ -814,7 +783,7 @@ const iosEnterAnimation = (baseEl, opts) => {
|
|
|
814
783
|
const results = getPopoverPosition(isRTL, contentWidth, contentHeight, arrowWidth, arrowHeight, reference, side, align, defaultPosition, trigger, ev);
|
|
815
784
|
const padding = size === 'cover' ? 0 : POPOVER_IOS_BODY_PADDING;
|
|
816
785
|
const margin = size === 'cover' ? 0 : 25;
|
|
817
|
-
const { originX, originY, top, left, bottom,
|
|
786
|
+
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);
|
|
818
787
|
const baseAnimation = animation.createAnimation();
|
|
819
788
|
const backdropAnimation = animation.createAnimation();
|
|
820
789
|
const contentAnimation = animation.createAnimation();
|
|
@@ -844,35 +813,19 @@ const iosEnterAnimation = (baseEl, opts) => {
|
|
|
844
813
|
if (addPopoverBottomClass) {
|
|
845
814
|
baseEl.classList.add('popover-bottom');
|
|
846
815
|
}
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
* safe-area inset to ensure the popover doesn't overlap with system UI
|
|
851
|
-
* (status bars, home indicators, navigation bars on Android API 36+, etc.)
|
|
852
|
-
*/
|
|
853
|
-
const safeAreaTop = ' + var(--ion-safe-area-top, 0)';
|
|
854
|
-
const safeAreaBottom = ' + var(--ion-safe-area-bottom, 0)';
|
|
816
|
+
if (bottom !== undefined) {
|
|
817
|
+
contentEl.style.setProperty('bottom', `${bottom}px`);
|
|
818
|
+
}
|
|
855
819
|
const safeAreaLeft = ' + var(--ion-safe-area-left, 0)';
|
|
856
820
|
const safeAreaRight = ' - var(--ion-safe-area-right, 0)';
|
|
857
|
-
let topValue = `${top}px`;
|
|
858
|
-
let bottomValue = bottom !== undefined ? `${bottom}px` : undefined;
|
|
859
821
|
let leftValue = `${left}px`;
|
|
860
|
-
if (checkSafeAreaTop) {
|
|
861
|
-
topValue = `${top}px${safeAreaTop}`;
|
|
862
|
-
}
|
|
863
|
-
if (checkSafeAreaBottom && bottomValue !== undefined) {
|
|
864
|
-
bottomValue = `${bottom}px${safeAreaBottom}`;
|
|
865
|
-
}
|
|
866
822
|
if (checkSafeAreaLeft) {
|
|
867
823
|
leftValue = `${left}px${safeAreaLeft}`;
|
|
868
824
|
}
|
|
869
825
|
if (checkSafeAreaRight) {
|
|
870
826
|
leftValue = `${left}px${safeAreaRight}`;
|
|
871
827
|
}
|
|
872
|
-
|
|
873
|
-
contentEl.style.setProperty('bottom', `calc(${bottomValue})`);
|
|
874
|
-
}
|
|
875
|
-
contentEl.style.setProperty('top', `calc(${topValue} + var(--offset-y, 0))`);
|
|
828
|
+
contentEl.style.setProperty('top', `calc(${top}px + var(--offset-y, 0))`);
|
|
876
829
|
contentEl.style.setProperty('left', `calc(${leftValue} + var(--offset-x, 0))`);
|
|
877
830
|
contentEl.style.setProperty('transform-origin', `${originY} ${originX}`);
|
|
878
831
|
if (arrowEl !== null) {
|
|
@@ -948,23 +901,7 @@ const mdEnterAnimation = (baseEl, opts) => {
|
|
|
948
901
|
};
|
|
949
902
|
const results = getPopoverPosition(isRTL, contentWidth, contentHeight, 0, 0, reference, side, align, defaultPosition, trigger, ev);
|
|
950
903
|
const padding = size === 'cover' ? 0 : POPOVER_MD_BODY_PADDING;
|
|
951
|
-
const { originX, originY, top, left, bottom
|
|
952
|
-
/**
|
|
953
|
-
* Safe area CSS variable adjustments.
|
|
954
|
-
* When the popover is positioned near an edge, we add the corresponding
|
|
955
|
-
* safe-area inset to ensure the popover doesn't overlap with system UI
|
|
956
|
-
* (status bars, home indicators, navigation bars on Android API 36+, etc.)
|
|
957
|
-
*/
|
|
958
|
-
const safeAreaTop = ' + var(--ion-safe-area-top, 0)';
|
|
959
|
-
const safeAreaBottom = ' + var(--ion-safe-area-bottom, 0)';
|
|
960
|
-
let topValue = `${top}px`;
|
|
961
|
-
let bottomValue = bottom !== undefined ? `${bottom}px` : undefined;
|
|
962
|
-
if (checkSafeAreaTop) {
|
|
963
|
-
topValue = `${top}px${safeAreaTop}`;
|
|
964
|
-
}
|
|
965
|
-
if (checkSafeAreaBottom && bottomValue !== undefined) {
|
|
966
|
-
bottomValue = `${bottom}px${safeAreaBottom}`;
|
|
967
|
-
}
|
|
904
|
+
const { originX, originY, top, left, bottom } = calculateWindowAdjustment(side, results.top, results.left, padding, bodyWidth, bodyHeight, contentWidth, contentHeight, 0, results.originX, results.originY, results.referenceCoordinates);
|
|
968
905
|
const baseAnimation = animation.createAnimation();
|
|
969
906
|
const backdropAnimation = animation.createAnimation();
|
|
970
907
|
const wrapperAnimation = animation.createAnimation();
|
|
@@ -981,13 +918,13 @@ const mdEnterAnimation = (baseEl, opts) => {
|
|
|
981
918
|
contentAnimation
|
|
982
919
|
.addElement(contentEl)
|
|
983
920
|
.beforeStyles({
|
|
984
|
-
top: `calc(${
|
|
921
|
+
top: `calc(${top}px + var(--offset-y, 0px))`,
|
|
985
922
|
left: `calc(${left}px + var(--offset-x, 0px))`,
|
|
986
923
|
'transform-origin': `${originY} ${originX}`,
|
|
987
924
|
})
|
|
988
925
|
.beforeAddWrite(() => {
|
|
989
|
-
if (
|
|
990
|
-
contentEl.style.setProperty('bottom',
|
|
926
|
+
if (bottom !== undefined) {
|
|
927
|
+
contentEl.style.setProperty('bottom', `${bottom}px`);
|
|
991
928
|
}
|
|
992
929
|
})
|
|
993
930
|
.fromTo('transform', 'scale(0.8)', 'scale(1)');
|
|
@@ -22,6 +22,7 @@ const TabBar = class {
|
|
|
22
22
|
this.ionTabBarChanged = index.createEvent(this, "ionTabBarChanged", 7);
|
|
23
23
|
this.ionTabBarLoaded = index.createEvent(this, "ionTabBarLoaded", 7);
|
|
24
24
|
this.keyboardCtrl = null;
|
|
25
|
+
this.keyboardCtrlPromise = null;
|
|
25
26
|
this.didLoad = false;
|
|
26
27
|
this.keyboardVisible = false;
|
|
27
28
|
/**
|
|
@@ -57,7 +58,7 @@ const TabBar = class {
|
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
60
|
async connectedCallback() {
|
|
60
|
-
|
|
61
|
+
const promise = keyboardController.createKeyboardController(async (keyboardOpen, waitForResize) => {
|
|
61
62
|
/**
|
|
62
63
|
* If the keyboard is hiding, then we need to wait
|
|
63
64
|
* for the webview to resize. Otherwise, the tab bar
|
|
@@ -68,21 +69,40 @@ const TabBar = class {
|
|
|
68
69
|
}
|
|
69
70
|
this.keyboardVisible = keyboardOpen; // trigger re-render by updating state
|
|
70
71
|
});
|
|
72
|
+
this.keyboardCtrlPromise = promise;
|
|
73
|
+
const keyboardCtrl = await promise;
|
|
74
|
+
/**
|
|
75
|
+
* Only assign if this is still the current promise.
|
|
76
|
+
* Otherwise, a new connectedCallback has started or
|
|
77
|
+
* disconnectedCallback was called, so destroy this instance.
|
|
78
|
+
*/
|
|
79
|
+
if (this.keyboardCtrlPromise === promise) {
|
|
80
|
+
this.keyboardCtrl = keyboardCtrl;
|
|
81
|
+
this.keyboardCtrlPromise = null;
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
keyboardCtrl.destroy();
|
|
85
|
+
}
|
|
71
86
|
}
|
|
72
87
|
disconnectedCallback() {
|
|
88
|
+
if (this.keyboardCtrlPromise) {
|
|
89
|
+
this.keyboardCtrlPromise.then((ctrl) => ctrl.destroy());
|
|
90
|
+
this.keyboardCtrlPromise = null;
|
|
91
|
+
}
|
|
73
92
|
if (this.keyboardCtrl) {
|
|
74
93
|
this.keyboardCtrl.destroy();
|
|
94
|
+
this.keyboardCtrl = null;
|
|
75
95
|
}
|
|
76
96
|
}
|
|
77
97
|
render() {
|
|
78
98
|
const { color, translucent, keyboardVisible } = this;
|
|
79
99
|
const mode = ionicGlobal.getIonMode(this);
|
|
80
100
|
const shouldHide = keyboardVisible && this.el.getAttribute('slot') !== 'top';
|
|
81
|
-
return (index.h(index.Host, { key: '
|
|
101
|
+
return (index.h(index.Host, { key: '9daf4e2acaff6e3ce3878cf9dd5109fb1afbbebe', role: "tablist", "aria-hidden": shouldHide ? 'true' : null, class: theme.createColorClasses(color, {
|
|
82
102
|
[mode]: true,
|
|
83
103
|
'tab-bar-translucent': translucent,
|
|
84
104
|
'tab-bar-hidden': shouldHide,
|
|
85
|
-
}) }, index.h("slot", { key: '
|
|
105
|
+
}) }, index.h("slot", { key: '1d15aa2da8501e8e7eff11ad4a491478be845c43' })));
|
|
86
106
|
}
|
|
87
107
|
get el() { return index.getElement(this); }
|
|
88
108
|
static get watchers() { return {
|
|
@@ -263,16 +263,6 @@
|
|
|
263
263
|
transform: scaleX(-1);
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
:host(.safe-area-top) #background-content,
|
|
267
|
-
:host(.safe-area-top) .inner-scroll {
|
|
268
|
-
top: var(--ion-safe-area-top, 0px);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
:host(.safe-area-bottom) #background-content,
|
|
272
|
-
:host(.safe-area-bottom) .inner-scroll {
|
|
273
|
-
bottom: var(--ion-safe-area-bottom, 0px);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
266
|
::slotted([slot=fixed]) {
|
|
277
267
|
position: absolute;
|
|
278
268
|
/**
|
|
@@ -25,12 +25,6 @@ export class Content {
|
|
|
25
25
|
this.isMainContent = true;
|
|
26
26
|
this.resizeTimeout = null;
|
|
27
27
|
this.inheritedAttributes = {};
|
|
28
|
-
/**
|
|
29
|
-
* Track whether this content has sibling header/footer elements.
|
|
30
|
-
* When absent, we need to apply safe-area padding directly.
|
|
31
|
-
*/
|
|
32
|
-
this.hasHeader = false;
|
|
33
|
-
this.hasFooter = false;
|
|
34
28
|
this.tabsElement = null;
|
|
35
29
|
// Detail is used in a hot loop in the scroll event, by allocating it here
|
|
36
30
|
// V8 will be able to inline any read/write to it since it's a monomorphic class.
|
|
@@ -86,8 +80,6 @@ export class Content {
|
|
|
86
80
|
}
|
|
87
81
|
connectedCallback() {
|
|
88
82
|
this.isMainContent = this.el.closest('ion-menu, ion-popover, ion-modal') === null;
|
|
89
|
-
// Detect sibling header/footer for safe-area handling
|
|
90
|
-
this.detectSiblingElements();
|
|
91
83
|
/**
|
|
92
84
|
* The fullscreen content offsets need to be
|
|
93
85
|
* computed after the tab bar has loaded. Since
|
|
@@ -123,71 +115,8 @@ export class Content {
|
|
|
123
115
|
}
|
|
124
116
|
}
|
|
125
117
|
}
|
|
126
|
-
/**
|
|
127
|
-
* Detects sibling ion-header and ion-footer elements and sets up
|
|
128
|
-
* a mutation observer to handle dynamic changes (e.g., conditional rendering).
|
|
129
|
-
*/
|
|
130
|
-
detectSiblingElements() {
|
|
131
|
-
this.updateSiblingDetection();
|
|
132
|
-
// Watch for dynamic header/footer changes (common in React conditional rendering)
|
|
133
|
-
const parent = this.el.parentElement;
|
|
134
|
-
if (parent && !this.parentMutationObserver) {
|
|
135
|
-
this.parentMutationObserver = new MutationObserver(() => {
|
|
136
|
-
this.updateSiblingDetection();
|
|
137
|
-
forceUpdate(this);
|
|
138
|
-
});
|
|
139
|
-
this.parentMutationObserver.observe(parent, { childList: true });
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Updates hasHeader/hasFooter based on current DOM state.
|
|
144
|
-
* Checks both direct siblings and elements wrapped in custom components
|
|
145
|
-
* (e.g., <my-header><ion-header>...</ion-header></my-header>).
|
|
146
|
-
*/
|
|
147
|
-
updateSiblingDetection() {
|
|
148
|
-
const parent = this.el.parentElement;
|
|
149
|
-
if (parent) {
|
|
150
|
-
// First check for direct ion-header/ion-footer siblings
|
|
151
|
-
this.hasHeader = parent.querySelector(':scope > ion-header') !== null;
|
|
152
|
-
this.hasFooter = parent.querySelector(':scope > ion-footer') !== null;
|
|
153
|
-
// If not found, check if any sibling contains them (wrapped components)
|
|
154
|
-
if (!this.hasHeader) {
|
|
155
|
-
this.hasHeader = this.siblingContainsElement(parent, 'ion-header');
|
|
156
|
-
}
|
|
157
|
-
if (!this.hasFooter) {
|
|
158
|
-
this.hasFooter = this.siblingContainsElement(parent, 'ion-footer');
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
// If no footer found, check if we're inside ion-tabs which has ion-tab-bar
|
|
162
|
-
if (!this.hasFooter) {
|
|
163
|
-
const tabs = this.el.closest('ion-tabs');
|
|
164
|
-
if (tabs) {
|
|
165
|
-
this.hasFooter = tabs.querySelector(':scope > ion-tab-bar') !== null;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Checks if any sibling element of ion-content contains the specified element.
|
|
171
|
-
* Only searches one level deep to avoid finding elements in nested pages.
|
|
172
|
-
*/
|
|
173
|
-
siblingContainsElement(parent, tagName) {
|
|
174
|
-
for (const sibling of parent.children) {
|
|
175
|
-
// Skip ion-content itself
|
|
176
|
-
if (sibling === this.el)
|
|
177
|
-
continue;
|
|
178
|
-
// Check if this sibling contains the target element as an immediate child
|
|
179
|
-
if (sibling.querySelector(`:scope > ${tagName}`) !== null) {
|
|
180
|
-
return true;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
return false;
|
|
184
|
-
}
|
|
185
118
|
disconnectedCallback() {
|
|
186
|
-
var _a;
|
|
187
119
|
this.onScrollEnd();
|
|
188
|
-
// Clean up mutation observer to prevent memory leaks
|
|
189
|
-
(_a = this.parentMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
190
|
-
this.parentMutationObserver = undefined;
|
|
191
120
|
if (hasLazyBuild(this.el)) {
|
|
192
121
|
/**
|
|
193
122
|
* The event listener and tabs caches need to
|
|
@@ -434,28 +363,26 @@ export class Content {
|
|
|
434
363
|
}
|
|
435
364
|
}
|
|
436
365
|
render() {
|
|
437
|
-
const { fixedSlotPlacement,
|
|
366
|
+
const { fixedSlotPlacement, inheritedAttributes, isMainContent, scrollX, scrollY, el } = this;
|
|
438
367
|
const rtl = isRTL(el) ? 'rtl' : 'ltr';
|
|
439
368
|
const mode = getIonMode(this);
|
|
440
369
|
const forceOverscroll = this.shouldForceOverscroll();
|
|
441
370
|
const transitionShadow = mode === 'ios';
|
|
442
371
|
this.resize();
|
|
443
|
-
return (h(Host, Object.assign({ key: '
|
|
372
|
+
return (h(Host, Object.assign({ key: 'cd8781f848d8dc926fe66f43d43c49564425a507', role: isMainContent ? 'main' : undefined, class: createColorClasses(this.color, {
|
|
444
373
|
[mode]: true,
|
|
445
374
|
'content-sizing': hostContext('ion-popover', this.el),
|
|
446
375
|
overscroll: forceOverscroll,
|
|
447
376
|
[`content-${rtl}`]: true,
|
|
448
|
-
'safe-area-top': isMainContent && !hasHeader,
|
|
449
|
-
'safe-area-bottom': isMainContent && !hasFooter,
|
|
450
377
|
}), style: {
|
|
451
378
|
'--offset-top': `${this.cTop}px`,
|
|
452
379
|
'--offset-bottom': `${this.cBottom}px`,
|
|
453
|
-
} }, inheritedAttributes), h("div", { key: '
|
|
380
|
+
} }, inheritedAttributes), h("div", { key: '95b112d7cae30f22ef778ceffb88edb4d941c170', ref: (el) => (this.backgroundContentEl = el), id: "background-content", part: "background" }), fixedSlotPlacement === 'before' ? h("slot", { name: "fixed" }) : null, h("div", { key: '2fdfcbc39fb66f11b6191911f2941c660f4c12e5', class: {
|
|
454
381
|
'inner-scroll': true,
|
|
455
382
|
'scroll-x': scrollX,
|
|
456
383
|
'scroll-y': scrollY,
|
|
457
384
|
overscroll: (scrollX || scrollY) && forceOverscroll,
|
|
458
|
-
}, ref: (scrollEl) => (this.scrollEl = scrollEl), onScroll: this.scrollEvents ? (ev) => this.onScroll(ev) : undefined, part: "scroll" }, h("slot", { key: '
|
|
385
|
+
}, ref: (scrollEl) => (this.scrollEl = scrollEl), onScroll: this.scrollEvents ? (ev) => this.onScroll(ev) : undefined, part: "scroll" }, h("slot", { key: '6bc77e0054ec8e21635a7f2abfe0ca46e0962e03' })), transitionShadow ? (h("div", { class: "transition-effect" }, h("div", { class: "transition-cover" }), h("div", { class: "transition-shadow" }))) : null, fixedSlotPlacement === 'after' ? h("slot", { name: "fixed" }) : null));
|
|
459
386
|
}
|
|
460
387
|
static get is() { return "ion-content"; }
|
|
461
388
|
static get encapsulation() { return "shadow"; }
|
|
@@ -7,7 +7,7 @@ import { clamp, getElementRoot, raf } from "../../../utils/helpers";
|
|
|
7
7
|
import { FOCUS_TRAP_DISABLE_CLASS } from "../../../utils/overlays";
|
|
8
8
|
import { getBackdropValueForSheet } from "../utils";
|
|
9
9
|
import { calculateSpringStep, handleCanDismiss } from "./utils";
|
|
10
|
-
export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], expandToScroll, getCurrentBreakpoint, onDismiss, onBreakpointChange
|
|
10
|
+
export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], expandToScroll, getCurrentBreakpoint, onDismiss, onBreakpointChange) => {
|
|
11
11
|
// Defaults for the sheet swipe animation
|
|
12
12
|
const defaultBackdrop = [
|
|
13
13
|
{ offset: 0, opacity: 'var(--backdrop-opacity)' },
|
|
@@ -338,8 +338,6 @@ export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpo
|
|
|
338
338
|
: step;
|
|
339
339
|
offset = clamp(0.0001, processedStep, maxStep);
|
|
340
340
|
animation.progressStep(offset);
|
|
341
|
-
// Notify modal of position change for safe-area updates
|
|
342
|
-
onGestureMove === null || onGestureMove === void 0 ? void 0 : onGestureMove();
|
|
343
341
|
};
|
|
344
342
|
const onEnd = (detail) => {
|
|
345
343
|
/**
|
|
@@ -12,7 +12,7 @@ import { calculateSpringStep, handleCanDismiss } from "./utils";
|
|
|
12
12
|
export const SwipeToCloseDefaults = {
|
|
13
13
|
MIN_PRESENTING_SCALE: 0.915,
|
|
14
14
|
};
|
|
15
|
-
export const createSwipeToCloseGesture = (el, animation, statusBarStyle, onDismiss
|
|
15
|
+
export const createSwipeToCloseGesture = (el, animation, statusBarStyle, onDismiss) => {
|
|
16
16
|
/**
|
|
17
17
|
* The step value at which a card modal
|
|
18
18
|
* is eligible for dismissing via gesture.
|
|
@@ -169,8 +169,6 @@ export const createSwipeToCloseGesture = (el, animation, statusBarStyle, onDismi
|
|
|
169
169
|
const processedStep = isAttemptingDismissWithCanDismiss ? calculateSpringStep(step / maxStep) : step;
|
|
170
170
|
const clampedStep = clamp(0.0001, processedStep, maxStep);
|
|
171
171
|
animation.progressStep(clampedStep);
|
|
172
|
-
// Notify modal of position change for safe-area updates
|
|
173
|
-
onGestureMove === null || onGestureMove === void 0 ? void 0 : onGestureMove();
|
|
174
172
|
/**
|
|
175
173
|
* When swiping down half way, the status bar style
|
|
176
174
|
* should be reset to its default value.
|
|
@@ -135,6 +135,10 @@ ion-backdrop {
|
|
|
135
135
|
:host {
|
|
136
136
|
--width: 600px;
|
|
137
137
|
--height: 500px;
|
|
138
|
+
--ion-safe-area-top: 0px;
|
|
139
|
+
--ion-safe-area-bottom: 0px;
|
|
140
|
+
--ion-safe-area-right: 0px;
|
|
141
|
+
--ion-safe-area-left: 0px;
|
|
138
142
|
}
|
|
139
143
|
}
|
|
140
144
|
@media only screen and (min-width: 768px) and (min-height: 768px) {
|