@ionic/core 8.7.16-dev.11767018329.15d3ae73 → 8.7.16-dev.11767019759.14b7f2fa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/modal.js +5 -50
- package/dist/cjs/ion-modal.cjs.entry.js +5 -50
- package/dist/collection/components/modal/modal.js +5 -50
- package/dist/docs.json +1 -1
- package/dist/esm/ion-modal.entry.js +5 -50
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-88b087a9.entry.js +4 -0
- package/hydrate/index.js +5 -50
- package/hydrate/index.mjs +5 -50
- package/package.json +1 -1
- package/dist/ionic/p-bf396166.entry.js +0 -4
package/components/modal.js
CHANGED
|
@@ -1695,7 +1695,6 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
1695
1695
|
}
|
|
1696
1696
|
onWindowResize() {
|
|
1697
1697
|
// Update safe-area overrides for all modal types on resize
|
|
1698
|
-
console.log('[onWindowResize] calling updateSafeAreaOverrides');
|
|
1699
1698
|
this.updateSafeAreaOverrides();
|
|
1700
1699
|
// Only handle view transition for iOS card modals when no custom animations are provided
|
|
1701
1700
|
if (getIonMode(this) !== 'ios' || !this.presentingElement || this.enterAnimation || this.leaveAnimation) {
|
|
@@ -1943,7 +1942,6 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
1943
1942
|
this.initSwipeToClose();
|
|
1944
1943
|
}
|
|
1945
1944
|
// Now that animation is complete, update safe-area based on actual position
|
|
1946
|
-
console.log('[present animation complete] calling updateSafeAreaOverrides');
|
|
1947
1945
|
this.updateSafeAreaOverrides();
|
|
1948
1946
|
// Initialize view transition listener for iOS card modals
|
|
1949
1947
|
this.initViewTransitionListener();
|
|
@@ -2106,18 +2104,8 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
2106
2104
|
const isSheetModal = this.breakpoints !== undefined && this.initialBreakpoint !== undefined;
|
|
2107
2105
|
const isCardModal = presentingElement !== undefined;
|
|
2108
2106
|
const isTablet = window.innerWidth >= 768;
|
|
2109
|
-
console.log('[setInitialSafeAreaOverrides] called', {
|
|
2110
|
-
isSheetModal,
|
|
2111
|
-
isCardModal,
|
|
2112
|
-
isTablet,
|
|
2113
|
-
breakpoints: this.breakpoints,
|
|
2114
|
-
initialBreakpoint: this.initialBreakpoint,
|
|
2115
|
-
presentingElement: !!presentingElement,
|
|
2116
|
-
innerWidth: window.innerWidth,
|
|
2117
|
-
});
|
|
2118
2107
|
// Sheet modals: always touch bottom, top depends on breakpoint
|
|
2119
2108
|
if (isSheetModal) {
|
|
2120
|
-
console.log('[setInitialSafeAreaOverrides] Sheet modal path - setting top/left/right to 0, leaving bottom alone');
|
|
2121
2109
|
style.setProperty('--ion-safe-area-top', '0px');
|
|
2122
2110
|
// Don't override bottom - sheet always touches bottom
|
|
2123
2111
|
style.setProperty('--ion-safe-area-left', '0px');
|
|
@@ -2126,7 +2114,6 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
2126
2114
|
}
|
|
2127
2115
|
// Card modals are inset from edges (rounded corners), no safe areas needed
|
|
2128
2116
|
if (isCardModal) {
|
|
2129
|
-
console.log('[setInitialSafeAreaOverrides] Card modal path - setting all to 0');
|
|
2130
2117
|
style.setProperty('--ion-safe-area-top', '0px');
|
|
2131
2118
|
style.setProperty('--ion-safe-area-bottom', '0px');
|
|
2132
2119
|
style.setProperty('--ion-safe-area-left', '0px');
|
|
@@ -2135,7 +2122,6 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
2135
2122
|
}
|
|
2136
2123
|
// Phone modals are fullscreen, need all safe areas
|
|
2137
2124
|
if (!isTablet) {
|
|
2138
|
-
console.log('[setInitialSafeAreaOverrides] Phone modal path - not setting any overrides');
|
|
2139
2125
|
// Don't set any overrides - inherit from :root
|
|
2140
2126
|
return;
|
|
2141
2127
|
}
|
|
@@ -2144,14 +2130,11 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
2144
2130
|
const computedStyle = getComputedStyle(this.el);
|
|
2145
2131
|
const width = computedStyle.getPropertyValue('--width').trim();
|
|
2146
2132
|
const height = computedStyle.getPropertyValue('--height').trim();
|
|
2147
|
-
console.log('[setInitialSafeAreaOverrides] Tablet modal path', { width, height });
|
|
2148
2133
|
if (width === '100%' && height === '100%') {
|
|
2149
|
-
console.log('[setInitialSafeAreaOverrides] Fullscreen tablet modal - not setting overrides');
|
|
2150
2134
|
// Fullscreen modal - need safe areas, don't override
|
|
2151
2135
|
return;
|
|
2152
2136
|
}
|
|
2153
2137
|
// Centered dialog - zero out all safe areas
|
|
2154
|
-
console.log('[setInitialSafeAreaOverrides] Centered tablet dialog - setting all to 0');
|
|
2155
2138
|
style.setProperty('--ion-safe-area-top', '0px');
|
|
2156
2139
|
style.setProperty('--ion-safe-area-bottom', '0px');
|
|
2157
2140
|
style.setProperty('--ion-safe-area-left', '0px');
|
|
@@ -2164,50 +2147,22 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
2164
2147
|
*/
|
|
2165
2148
|
updateSafeAreaOverrides() {
|
|
2166
2149
|
const wrapper = this.wrapperEl;
|
|
2167
|
-
if (!wrapper)
|
|
2168
|
-
console.log('[updateSafeAreaOverrides] No wrapper element, returning early');
|
|
2150
|
+
if (!wrapper)
|
|
2169
2151
|
return;
|
|
2170
|
-
}
|
|
2171
2152
|
const rect = wrapper.getBoundingClientRect();
|
|
2172
2153
|
const threshold = 2; // Account for subpixel rendering
|
|
2173
2154
|
const touchingTop = rect.top <= threshold;
|
|
2174
2155
|
const touchingBottom = rect.bottom >= window.innerHeight - threshold;
|
|
2175
2156
|
const touchingLeft = rect.left <= threshold;
|
|
2176
2157
|
const touchingRight = rect.right >= window.innerWidth - threshold;
|
|
2177
|
-
console.log('[updateSafeAreaOverrides] called', {
|
|
2178
|
-
isSheetModal: this.isSheetModal,
|
|
2179
|
-
rect: { top: rect.top, bottom: rect.bottom, left: rect.left, right: rect.right },
|
|
2180
|
-
innerHeight: window.innerHeight,
|
|
2181
|
-
innerWidth: window.innerWidth,
|
|
2182
|
-
threshold,
|
|
2183
|
-
touchingTop,
|
|
2184
|
-
touchingBottom,
|
|
2185
|
-
touchingLeft,
|
|
2186
|
-
touchingRight,
|
|
2187
|
-
bottomCalc: `${rect.bottom} >= ${window.innerHeight - threshold} = ${touchingBottom}`,
|
|
2188
|
-
});
|
|
2189
2158
|
// Remove override when touching edge (allow inheritance), set to 0 when not touching
|
|
2190
2159
|
const style = this.el.style;
|
|
2191
|
-
const actions = {
|
|
2192
|
-
top: touchingTop ? 'removeProperty' : 'setProperty 0px',
|
|
2193
|
-
bottom: touchingBottom ? 'removeProperty' : 'setProperty 0px',
|
|
2194
|
-
left: touchingLeft ? 'removeProperty' : 'setProperty 0px',
|
|
2195
|
-
right: touchingRight ? 'removeProperty' : 'setProperty 0px',
|
|
2196
|
-
};
|
|
2197
|
-
console.log('[updateSafeAreaOverrides] actions:', actions);
|
|
2198
2160
|
touchingTop ? style.removeProperty('--ion-safe-area-top') : style.setProperty('--ion-safe-area-top', '0px');
|
|
2199
2161
|
touchingBottom
|
|
2200
2162
|
? style.removeProperty('--ion-safe-area-bottom')
|
|
2201
2163
|
: style.setProperty('--ion-safe-area-bottom', '0px');
|
|
2202
2164
|
touchingLeft ? style.removeProperty('--ion-safe-area-left') : style.setProperty('--ion-safe-area-left', '0px');
|
|
2203
2165
|
touchingRight ? style.removeProperty('--ion-safe-area-right') : style.setProperty('--ion-safe-area-right', '0px');
|
|
2204
|
-
// Log the actual style values after setting
|
|
2205
|
-
console.log('[updateSafeAreaOverrides] after setting, inline styles:', {
|
|
2206
|
-
top: style.getPropertyValue('--ion-safe-area-top'),
|
|
2207
|
-
bottom: style.getPropertyValue('--ion-safe-area-bottom'),
|
|
2208
|
-
left: style.getPropertyValue('--ion-safe-area-left'),
|
|
2209
|
-
right: style.getPropertyValue('--ion-safe-area-right'),
|
|
2210
|
-
});
|
|
2211
2166
|
}
|
|
2212
2167
|
sheetOnDismiss() {
|
|
2213
2168
|
/**
|
|
@@ -2546,20 +2501,20 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
2546
2501
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
2547
2502
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
2548
2503
|
const isSheetModalWithHandle = isSheetModal && showHandle;
|
|
2549
|
-
return (h(Host, Object.assign({ key: '
|
|
2504
|
+
return (h(Host, Object.assign({ key: 'e80cac8f52f1056eaf63112eafcfdcd029aa31e8', "no-router": true,
|
|
2550
2505
|
// Allow the modal to be navigable when the handle is focusable
|
|
2551
2506
|
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
2552
2507
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
2553
|
-
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), h("ion-backdrop", { key: '
|
|
2508
|
+
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), h("ion-backdrop", { key: 'dcc24085006dd1e41c47a55031d78bd55ddeb622', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { key: '74c4ff6bdc87f8c29ee8ba0592c97db2c597d876', class: "modal-shadow" }), h("div", Object.assign({ key: '79f3b01bdadc0d830e5707026aa2055d62714274',
|
|
2554
2509
|
/*
|
|
2555
2510
|
role and aria-modal must be used on the
|
|
2556
2511
|
same element. They must also be set inside the
|
|
2557
2512
|
shadow DOM otherwise ion-button will not be highlighted
|
|
2558
2513
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
2559
2514
|
*/
|
|
2560
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: '
|
|
2515
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: 'b250920bad86e23269f900353d531975a95662af', class: "modal-handle",
|
|
2561
2516
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
2562
|
-
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), h("slot", { key: '
|
|
2517
|
+
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), h("slot", { key: '2ba83c0f0a92784cac127c6581f12ea06b201b97', onSlotchange: this.onSlotChange }))));
|
|
2563
2518
|
}
|
|
2564
2519
|
get el() { return this; }
|
|
2565
2520
|
static get watchers() { return {
|
|
@@ -1694,7 +1694,6 @@ const Modal = class {
|
|
|
1694
1694
|
}
|
|
1695
1695
|
onWindowResize() {
|
|
1696
1696
|
// Update safe-area overrides for all modal types on resize
|
|
1697
|
-
console.log('[onWindowResize] calling updateSafeAreaOverrides');
|
|
1698
1697
|
this.updateSafeAreaOverrides();
|
|
1699
1698
|
// Only handle view transition for iOS card modals when no custom animations are provided
|
|
1700
1699
|
if (ionicGlobal.getIonMode(this) !== 'ios' || !this.presentingElement || this.enterAnimation || this.leaveAnimation) {
|
|
@@ -1942,7 +1941,6 @@ const Modal = class {
|
|
|
1942
1941
|
this.initSwipeToClose();
|
|
1943
1942
|
}
|
|
1944
1943
|
// Now that animation is complete, update safe-area based on actual position
|
|
1945
|
-
console.log('[present animation complete] calling updateSafeAreaOverrides');
|
|
1946
1944
|
this.updateSafeAreaOverrides();
|
|
1947
1945
|
// Initialize view transition listener for iOS card modals
|
|
1948
1946
|
this.initViewTransitionListener();
|
|
@@ -2105,18 +2103,8 @@ const Modal = class {
|
|
|
2105
2103
|
const isSheetModal = this.breakpoints !== undefined && this.initialBreakpoint !== undefined;
|
|
2106
2104
|
const isCardModal = presentingElement !== undefined;
|
|
2107
2105
|
const isTablet = window.innerWidth >= 768;
|
|
2108
|
-
console.log('[setInitialSafeAreaOverrides] called', {
|
|
2109
|
-
isSheetModal,
|
|
2110
|
-
isCardModal,
|
|
2111
|
-
isTablet,
|
|
2112
|
-
breakpoints: this.breakpoints,
|
|
2113
|
-
initialBreakpoint: this.initialBreakpoint,
|
|
2114
|
-
presentingElement: !!presentingElement,
|
|
2115
|
-
innerWidth: window.innerWidth,
|
|
2116
|
-
});
|
|
2117
2106
|
// Sheet modals: always touch bottom, top depends on breakpoint
|
|
2118
2107
|
if (isSheetModal) {
|
|
2119
|
-
console.log('[setInitialSafeAreaOverrides] Sheet modal path - setting top/left/right to 0, leaving bottom alone');
|
|
2120
2108
|
style.setProperty('--ion-safe-area-top', '0px');
|
|
2121
2109
|
// Don't override bottom - sheet always touches bottom
|
|
2122
2110
|
style.setProperty('--ion-safe-area-left', '0px');
|
|
@@ -2125,7 +2113,6 @@ const Modal = class {
|
|
|
2125
2113
|
}
|
|
2126
2114
|
// Card modals are inset from edges (rounded corners), no safe areas needed
|
|
2127
2115
|
if (isCardModal) {
|
|
2128
|
-
console.log('[setInitialSafeAreaOverrides] Card modal path - setting all to 0');
|
|
2129
2116
|
style.setProperty('--ion-safe-area-top', '0px');
|
|
2130
2117
|
style.setProperty('--ion-safe-area-bottom', '0px');
|
|
2131
2118
|
style.setProperty('--ion-safe-area-left', '0px');
|
|
@@ -2134,7 +2121,6 @@ const Modal = class {
|
|
|
2134
2121
|
}
|
|
2135
2122
|
// Phone modals are fullscreen, need all safe areas
|
|
2136
2123
|
if (!isTablet) {
|
|
2137
|
-
console.log('[setInitialSafeAreaOverrides] Phone modal path - not setting any overrides');
|
|
2138
2124
|
// Don't set any overrides - inherit from :root
|
|
2139
2125
|
return;
|
|
2140
2126
|
}
|
|
@@ -2143,14 +2129,11 @@ const Modal = class {
|
|
|
2143
2129
|
const computedStyle = getComputedStyle(this.el);
|
|
2144
2130
|
const width = computedStyle.getPropertyValue('--width').trim();
|
|
2145
2131
|
const height = computedStyle.getPropertyValue('--height').trim();
|
|
2146
|
-
console.log('[setInitialSafeAreaOverrides] Tablet modal path', { width, height });
|
|
2147
2132
|
if (width === '100%' && height === '100%') {
|
|
2148
|
-
console.log('[setInitialSafeAreaOverrides] Fullscreen tablet modal - not setting overrides');
|
|
2149
2133
|
// Fullscreen modal - need safe areas, don't override
|
|
2150
2134
|
return;
|
|
2151
2135
|
}
|
|
2152
2136
|
// Centered dialog - zero out all safe areas
|
|
2153
|
-
console.log('[setInitialSafeAreaOverrides] Centered tablet dialog - setting all to 0');
|
|
2154
2137
|
style.setProperty('--ion-safe-area-top', '0px');
|
|
2155
2138
|
style.setProperty('--ion-safe-area-bottom', '0px');
|
|
2156
2139
|
style.setProperty('--ion-safe-area-left', '0px');
|
|
@@ -2163,50 +2146,22 @@ const Modal = class {
|
|
|
2163
2146
|
*/
|
|
2164
2147
|
updateSafeAreaOverrides() {
|
|
2165
2148
|
const wrapper = this.wrapperEl;
|
|
2166
|
-
if (!wrapper)
|
|
2167
|
-
console.log('[updateSafeAreaOverrides] No wrapper element, returning early');
|
|
2149
|
+
if (!wrapper)
|
|
2168
2150
|
return;
|
|
2169
|
-
}
|
|
2170
2151
|
const rect = wrapper.getBoundingClientRect();
|
|
2171
2152
|
const threshold = 2; // Account for subpixel rendering
|
|
2172
2153
|
const touchingTop = rect.top <= threshold;
|
|
2173
2154
|
const touchingBottom = rect.bottom >= window.innerHeight - threshold;
|
|
2174
2155
|
const touchingLeft = rect.left <= threshold;
|
|
2175
2156
|
const touchingRight = rect.right >= window.innerWidth - threshold;
|
|
2176
|
-
console.log('[updateSafeAreaOverrides] called', {
|
|
2177
|
-
isSheetModal: this.isSheetModal,
|
|
2178
|
-
rect: { top: rect.top, bottom: rect.bottom, left: rect.left, right: rect.right },
|
|
2179
|
-
innerHeight: window.innerHeight,
|
|
2180
|
-
innerWidth: window.innerWidth,
|
|
2181
|
-
threshold,
|
|
2182
|
-
touchingTop,
|
|
2183
|
-
touchingBottom,
|
|
2184
|
-
touchingLeft,
|
|
2185
|
-
touchingRight,
|
|
2186
|
-
bottomCalc: `${rect.bottom} >= ${window.innerHeight - threshold} = ${touchingBottom}`,
|
|
2187
|
-
});
|
|
2188
2157
|
// Remove override when touching edge (allow inheritance), set to 0 when not touching
|
|
2189
2158
|
const style = this.el.style;
|
|
2190
|
-
const actions = {
|
|
2191
|
-
top: touchingTop ? 'removeProperty' : 'setProperty 0px',
|
|
2192
|
-
bottom: touchingBottom ? 'removeProperty' : 'setProperty 0px',
|
|
2193
|
-
left: touchingLeft ? 'removeProperty' : 'setProperty 0px',
|
|
2194
|
-
right: touchingRight ? 'removeProperty' : 'setProperty 0px',
|
|
2195
|
-
};
|
|
2196
|
-
console.log('[updateSafeAreaOverrides] actions:', actions);
|
|
2197
2159
|
touchingTop ? style.removeProperty('--ion-safe-area-top') : style.setProperty('--ion-safe-area-top', '0px');
|
|
2198
2160
|
touchingBottom
|
|
2199
2161
|
? style.removeProperty('--ion-safe-area-bottom')
|
|
2200
2162
|
: style.setProperty('--ion-safe-area-bottom', '0px');
|
|
2201
2163
|
touchingLeft ? style.removeProperty('--ion-safe-area-left') : style.setProperty('--ion-safe-area-left', '0px');
|
|
2202
2164
|
touchingRight ? style.removeProperty('--ion-safe-area-right') : style.setProperty('--ion-safe-area-right', '0px');
|
|
2203
|
-
// Log the actual style values after setting
|
|
2204
|
-
console.log('[updateSafeAreaOverrides] after setting, inline styles:', {
|
|
2205
|
-
top: style.getPropertyValue('--ion-safe-area-top'),
|
|
2206
|
-
bottom: style.getPropertyValue('--ion-safe-area-bottom'),
|
|
2207
|
-
left: style.getPropertyValue('--ion-safe-area-left'),
|
|
2208
|
-
right: style.getPropertyValue('--ion-safe-area-right'),
|
|
2209
|
-
});
|
|
2210
2165
|
}
|
|
2211
2166
|
sheetOnDismiss() {
|
|
2212
2167
|
/**
|
|
@@ -2545,20 +2500,20 @@ const Modal = class {
|
|
|
2545
2500
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
2546
2501
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
2547
2502
|
const isSheetModalWithHandle = isSheetModal && showHandle;
|
|
2548
|
-
return (index$3.h(index$3.Host, Object.assign({ key: '
|
|
2503
|
+
return (index$3.h(index$3.Host, Object.assign({ key: 'e80cac8f52f1056eaf63112eafcfdcd029aa31e8', "no-router": true,
|
|
2549
2504
|
// Allow the modal to be navigable when the handle is focusable
|
|
2550
2505
|
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
2551
2506
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
2552
|
-
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [overlays.FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, theme.getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), index$3.h("ion-backdrop", { key: '
|
|
2507
|
+
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [overlays.FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, theme.getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), index$3.h("ion-backdrop", { key: 'dcc24085006dd1e41c47a55031d78bd55ddeb622', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && index$3.h("div", { key: '74c4ff6bdc87f8c29ee8ba0592c97db2c597d876', class: "modal-shadow" }), index$3.h("div", Object.assign({ key: '79f3b01bdadc0d830e5707026aa2055d62714274',
|
|
2553
2508
|
/*
|
|
2554
2509
|
role and aria-modal must be used on the
|
|
2555
2510
|
same element. They must also be set inside the
|
|
2556
2511
|
shadow DOM otherwise ion-button will not be highlighted
|
|
2557
2512
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
2558
2513
|
*/
|
|
2559
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (index$3.h("button", { key: '
|
|
2514
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (index$3.h("button", { key: 'b250920bad86e23269f900353d531975a95662af', class: "modal-handle",
|
|
2560
2515
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
2561
|
-
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) })), index$3.h("slot", { key: '
|
|
2516
|
+
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) })), index$3.h("slot", { key: '2ba83c0f0a92784cac127c6581f12ea06b201b97', onSlotchange: this.onSlotChange }))));
|
|
2562
2517
|
}
|
|
2563
2518
|
get el() { return index$3.getElement(this); }
|
|
2564
2519
|
static get watchers() { return {
|
|
@@ -233,7 +233,6 @@ export class Modal {
|
|
|
233
233
|
}
|
|
234
234
|
onWindowResize() {
|
|
235
235
|
// Update safe-area overrides for all modal types on resize
|
|
236
|
-
console.log('[onWindowResize] calling updateSafeAreaOverrides');
|
|
237
236
|
this.updateSafeAreaOverrides();
|
|
238
237
|
// Only handle view transition for iOS card modals when no custom animations are provided
|
|
239
238
|
if (getIonMode(this) !== 'ios' || !this.presentingElement || this.enterAnimation || this.leaveAnimation) {
|
|
@@ -481,7 +480,6 @@ export class Modal {
|
|
|
481
480
|
this.initSwipeToClose();
|
|
482
481
|
}
|
|
483
482
|
// Now that animation is complete, update safe-area based on actual position
|
|
484
|
-
console.log('[present animation complete] calling updateSafeAreaOverrides');
|
|
485
483
|
this.updateSafeAreaOverrides();
|
|
486
484
|
// Initialize view transition listener for iOS card modals
|
|
487
485
|
this.initViewTransitionListener();
|
|
@@ -644,18 +642,8 @@ export class Modal {
|
|
|
644
642
|
const isSheetModal = this.breakpoints !== undefined && this.initialBreakpoint !== undefined;
|
|
645
643
|
const isCardModal = presentingElement !== undefined;
|
|
646
644
|
const isTablet = window.innerWidth >= 768;
|
|
647
|
-
console.log('[setInitialSafeAreaOverrides] called', {
|
|
648
|
-
isSheetModal,
|
|
649
|
-
isCardModal,
|
|
650
|
-
isTablet,
|
|
651
|
-
breakpoints: this.breakpoints,
|
|
652
|
-
initialBreakpoint: this.initialBreakpoint,
|
|
653
|
-
presentingElement: !!presentingElement,
|
|
654
|
-
innerWidth: window.innerWidth,
|
|
655
|
-
});
|
|
656
645
|
// Sheet modals: always touch bottom, top depends on breakpoint
|
|
657
646
|
if (isSheetModal) {
|
|
658
|
-
console.log('[setInitialSafeAreaOverrides] Sheet modal path - setting top/left/right to 0, leaving bottom alone');
|
|
659
647
|
style.setProperty('--ion-safe-area-top', '0px');
|
|
660
648
|
// Don't override bottom - sheet always touches bottom
|
|
661
649
|
style.setProperty('--ion-safe-area-left', '0px');
|
|
@@ -664,7 +652,6 @@ export class Modal {
|
|
|
664
652
|
}
|
|
665
653
|
// Card modals are inset from edges (rounded corners), no safe areas needed
|
|
666
654
|
if (isCardModal) {
|
|
667
|
-
console.log('[setInitialSafeAreaOverrides] Card modal path - setting all to 0');
|
|
668
655
|
style.setProperty('--ion-safe-area-top', '0px');
|
|
669
656
|
style.setProperty('--ion-safe-area-bottom', '0px');
|
|
670
657
|
style.setProperty('--ion-safe-area-left', '0px');
|
|
@@ -673,7 +660,6 @@ export class Modal {
|
|
|
673
660
|
}
|
|
674
661
|
// Phone modals are fullscreen, need all safe areas
|
|
675
662
|
if (!isTablet) {
|
|
676
|
-
console.log('[setInitialSafeAreaOverrides] Phone modal path - not setting any overrides');
|
|
677
663
|
// Don't set any overrides - inherit from :root
|
|
678
664
|
return;
|
|
679
665
|
}
|
|
@@ -682,14 +668,11 @@ export class Modal {
|
|
|
682
668
|
const computedStyle = getComputedStyle(this.el);
|
|
683
669
|
const width = computedStyle.getPropertyValue('--width').trim();
|
|
684
670
|
const height = computedStyle.getPropertyValue('--height').trim();
|
|
685
|
-
console.log('[setInitialSafeAreaOverrides] Tablet modal path', { width, height });
|
|
686
671
|
if (width === '100%' && height === '100%') {
|
|
687
|
-
console.log('[setInitialSafeAreaOverrides] Fullscreen tablet modal - not setting overrides');
|
|
688
672
|
// Fullscreen modal - need safe areas, don't override
|
|
689
673
|
return;
|
|
690
674
|
}
|
|
691
675
|
// Centered dialog - zero out all safe areas
|
|
692
|
-
console.log('[setInitialSafeAreaOverrides] Centered tablet dialog - setting all to 0');
|
|
693
676
|
style.setProperty('--ion-safe-area-top', '0px');
|
|
694
677
|
style.setProperty('--ion-safe-area-bottom', '0px');
|
|
695
678
|
style.setProperty('--ion-safe-area-left', '0px');
|
|
@@ -702,50 +685,22 @@ export class Modal {
|
|
|
702
685
|
*/
|
|
703
686
|
updateSafeAreaOverrides() {
|
|
704
687
|
const wrapper = this.wrapperEl;
|
|
705
|
-
if (!wrapper)
|
|
706
|
-
console.log('[updateSafeAreaOverrides] No wrapper element, returning early');
|
|
688
|
+
if (!wrapper)
|
|
707
689
|
return;
|
|
708
|
-
}
|
|
709
690
|
const rect = wrapper.getBoundingClientRect();
|
|
710
691
|
const threshold = 2; // Account for subpixel rendering
|
|
711
692
|
const touchingTop = rect.top <= threshold;
|
|
712
693
|
const touchingBottom = rect.bottom >= window.innerHeight - threshold;
|
|
713
694
|
const touchingLeft = rect.left <= threshold;
|
|
714
695
|
const touchingRight = rect.right >= window.innerWidth - threshold;
|
|
715
|
-
console.log('[updateSafeAreaOverrides] called', {
|
|
716
|
-
isSheetModal: this.isSheetModal,
|
|
717
|
-
rect: { top: rect.top, bottom: rect.bottom, left: rect.left, right: rect.right },
|
|
718
|
-
innerHeight: window.innerHeight,
|
|
719
|
-
innerWidth: window.innerWidth,
|
|
720
|
-
threshold,
|
|
721
|
-
touchingTop,
|
|
722
|
-
touchingBottom,
|
|
723
|
-
touchingLeft,
|
|
724
|
-
touchingRight,
|
|
725
|
-
bottomCalc: `${rect.bottom} >= ${window.innerHeight - threshold} = ${touchingBottom}`,
|
|
726
|
-
});
|
|
727
696
|
// Remove override when touching edge (allow inheritance), set to 0 when not touching
|
|
728
697
|
const style = this.el.style;
|
|
729
|
-
const actions = {
|
|
730
|
-
top: touchingTop ? 'removeProperty' : 'setProperty 0px',
|
|
731
|
-
bottom: touchingBottom ? 'removeProperty' : 'setProperty 0px',
|
|
732
|
-
left: touchingLeft ? 'removeProperty' : 'setProperty 0px',
|
|
733
|
-
right: touchingRight ? 'removeProperty' : 'setProperty 0px',
|
|
734
|
-
};
|
|
735
|
-
console.log('[updateSafeAreaOverrides] actions:', actions);
|
|
736
698
|
touchingTop ? style.removeProperty('--ion-safe-area-top') : style.setProperty('--ion-safe-area-top', '0px');
|
|
737
699
|
touchingBottom
|
|
738
700
|
? style.removeProperty('--ion-safe-area-bottom')
|
|
739
701
|
: style.setProperty('--ion-safe-area-bottom', '0px');
|
|
740
702
|
touchingLeft ? style.removeProperty('--ion-safe-area-left') : style.setProperty('--ion-safe-area-left', '0px');
|
|
741
703
|
touchingRight ? style.removeProperty('--ion-safe-area-right') : style.setProperty('--ion-safe-area-right', '0px');
|
|
742
|
-
// Log the actual style values after setting
|
|
743
|
-
console.log('[updateSafeAreaOverrides] after setting, inline styles:', {
|
|
744
|
-
top: style.getPropertyValue('--ion-safe-area-top'),
|
|
745
|
-
bottom: style.getPropertyValue('--ion-safe-area-bottom'),
|
|
746
|
-
left: style.getPropertyValue('--ion-safe-area-left'),
|
|
747
|
-
right: style.getPropertyValue('--ion-safe-area-right'),
|
|
748
|
-
});
|
|
749
704
|
}
|
|
750
705
|
sheetOnDismiss() {
|
|
751
706
|
/**
|
|
@@ -1092,20 +1047,20 @@ export class Modal {
|
|
|
1092
1047
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
1093
1048
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
1094
1049
|
const isSheetModalWithHandle = isSheetModal && showHandle;
|
|
1095
|
-
return (h(Host, Object.assign({ key: '
|
|
1050
|
+
return (h(Host, Object.assign({ key: 'e80cac8f52f1056eaf63112eafcfdcd029aa31e8', "no-router": true,
|
|
1096
1051
|
// Allow the modal to be navigable when the handle is focusable
|
|
1097
1052
|
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
1098
1053
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
1099
|
-
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), h("ion-backdrop", { key: '
|
|
1054
|
+
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), h("ion-backdrop", { key: 'dcc24085006dd1e41c47a55031d78bd55ddeb622', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { key: '74c4ff6bdc87f8c29ee8ba0592c97db2c597d876', class: "modal-shadow" }), h("div", Object.assign({ key: '79f3b01bdadc0d830e5707026aa2055d62714274',
|
|
1100
1055
|
/*
|
|
1101
1056
|
role and aria-modal must be used on the
|
|
1102
1057
|
same element. They must also be set inside the
|
|
1103
1058
|
shadow DOM otherwise ion-button will not be highlighted
|
|
1104
1059
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
1105
1060
|
*/
|
|
1106
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: '
|
|
1061
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: 'b250920bad86e23269f900353d531975a95662af', class: "modal-handle",
|
|
1107
1062
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
1108
|
-
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), h("slot", { key: '
|
|
1063
|
+
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), h("slot", { key: '2ba83c0f0a92784cac127c6581f12ea06b201b97', onSlotchange: this.onSlotChange }))));
|
|
1109
1064
|
}
|
|
1110
1065
|
static get is() { return "ion-modal"; }
|
|
1111
1066
|
static get encapsulation() { return "shadow"; }
|
package/dist/docs.json
CHANGED
|
@@ -1692,7 +1692,6 @@ const Modal = class {
|
|
|
1692
1692
|
}
|
|
1693
1693
|
onWindowResize() {
|
|
1694
1694
|
// Update safe-area overrides for all modal types on resize
|
|
1695
|
-
console.log('[onWindowResize] calling updateSafeAreaOverrides');
|
|
1696
1695
|
this.updateSafeAreaOverrides();
|
|
1697
1696
|
// Only handle view transition for iOS card modals when no custom animations are provided
|
|
1698
1697
|
if (getIonMode(this) !== 'ios' || !this.presentingElement || this.enterAnimation || this.leaveAnimation) {
|
|
@@ -1940,7 +1939,6 @@ const Modal = class {
|
|
|
1940
1939
|
this.initSwipeToClose();
|
|
1941
1940
|
}
|
|
1942
1941
|
// Now that animation is complete, update safe-area based on actual position
|
|
1943
|
-
console.log('[present animation complete] calling updateSafeAreaOverrides');
|
|
1944
1942
|
this.updateSafeAreaOverrides();
|
|
1945
1943
|
// Initialize view transition listener for iOS card modals
|
|
1946
1944
|
this.initViewTransitionListener();
|
|
@@ -2103,18 +2101,8 @@ const Modal = class {
|
|
|
2103
2101
|
const isSheetModal = this.breakpoints !== undefined && this.initialBreakpoint !== undefined;
|
|
2104
2102
|
const isCardModal = presentingElement !== undefined;
|
|
2105
2103
|
const isTablet = window.innerWidth >= 768;
|
|
2106
|
-
console.log('[setInitialSafeAreaOverrides] called', {
|
|
2107
|
-
isSheetModal,
|
|
2108
|
-
isCardModal,
|
|
2109
|
-
isTablet,
|
|
2110
|
-
breakpoints: this.breakpoints,
|
|
2111
|
-
initialBreakpoint: this.initialBreakpoint,
|
|
2112
|
-
presentingElement: !!presentingElement,
|
|
2113
|
-
innerWidth: window.innerWidth,
|
|
2114
|
-
});
|
|
2115
2104
|
// Sheet modals: always touch bottom, top depends on breakpoint
|
|
2116
2105
|
if (isSheetModal) {
|
|
2117
|
-
console.log('[setInitialSafeAreaOverrides] Sheet modal path - setting top/left/right to 0, leaving bottom alone');
|
|
2118
2106
|
style.setProperty('--ion-safe-area-top', '0px');
|
|
2119
2107
|
// Don't override bottom - sheet always touches bottom
|
|
2120
2108
|
style.setProperty('--ion-safe-area-left', '0px');
|
|
@@ -2123,7 +2111,6 @@ const Modal = class {
|
|
|
2123
2111
|
}
|
|
2124
2112
|
// Card modals are inset from edges (rounded corners), no safe areas needed
|
|
2125
2113
|
if (isCardModal) {
|
|
2126
|
-
console.log('[setInitialSafeAreaOverrides] Card modal path - setting all to 0');
|
|
2127
2114
|
style.setProperty('--ion-safe-area-top', '0px');
|
|
2128
2115
|
style.setProperty('--ion-safe-area-bottom', '0px');
|
|
2129
2116
|
style.setProperty('--ion-safe-area-left', '0px');
|
|
@@ -2132,7 +2119,6 @@ const Modal = class {
|
|
|
2132
2119
|
}
|
|
2133
2120
|
// Phone modals are fullscreen, need all safe areas
|
|
2134
2121
|
if (!isTablet) {
|
|
2135
|
-
console.log('[setInitialSafeAreaOverrides] Phone modal path - not setting any overrides');
|
|
2136
2122
|
// Don't set any overrides - inherit from :root
|
|
2137
2123
|
return;
|
|
2138
2124
|
}
|
|
@@ -2141,14 +2127,11 @@ const Modal = class {
|
|
|
2141
2127
|
const computedStyle = getComputedStyle(this.el);
|
|
2142
2128
|
const width = computedStyle.getPropertyValue('--width').trim();
|
|
2143
2129
|
const height = computedStyle.getPropertyValue('--height').trim();
|
|
2144
|
-
console.log('[setInitialSafeAreaOverrides] Tablet modal path', { width, height });
|
|
2145
2130
|
if (width === '100%' && height === '100%') {
|
|
2146
|
-
console.log('[setInitialSafeAreaOverrides] Fullscreen tablet modal - not setting overrides');
|
|
2147
2131
|
// Fullscreen modal - need safe areas, don't override
|
|
2148
2132
|
return;
|
|
2149
2133
|
}
|
|
2150
2134
|
// Centered dialog - zero out all safe areas
|
|
2151
|
-
console.log('[setInitialSafeAreaOverrides] Centered tablet dialog - setting all to 0');
|
|
2152
2135
|
style.setProperty('--ion-safe-area-top', '0px');
|
|
2153
2136
|
style.setProperty('--ion-safe-area-bottom', '0px');
|
|
2154
2137
|
style.setProperty('--ion-safe-area-left', '0px');
|
|
@@ -2161,50 +2144,22 @@ const Modal = class {
|
|
|
2161
2144
|
*/
|
|
2162
2145
|
updateSafeAreaOverrides() {
|
|
2163
2146
|
const wrapper = this.wrapperEl;
|
|
2164
|
-
if (!wrapper)
|
|
2165
|
-
console.log('[updateSafeAreaOverrides] No wrapper element, returning early');
|
|
2147
|
+
if (!wrapper)
|
|
2166
2148
|
return;
|
|
2167
|
-
}
|
|
2168
2149
|
const rect = wrapper.getBoundingClientRect();
|
|
2169
2150
|
const threshold = 2; // Account for subpixel rendering
|
|
2170
2151
|
const touchingTop = rect.top <= threshold;
|
|
2171
2152
|
const touchingBottom = rect.bottom >= window.innerHeight - threshold;
|
|
2172
2153
|
const touchingLeft = rect.left <= threshold;
|
|
2173
2154
|
const touchingRight = rect.right >= window.innerWidth - threshold;
|
|
2174
|
-
console.log('[updateSafeAreaOverrides] called', {
|
|
2175
|
-
isSheetModal: this.isSheetModal,
|
|
2176
|
-
rect: { top: rect.top, bottom: rect.bottom, left: rect.left, right: rect.right },
|
|
2177
|
-
innerHeight: window.innerHeight,
|
|
2178
|
-
innerWidth: window.innerWidth,
|
|
2179
|
-
threshold,
|
|
2180
|
-
touchingTop,
|
|
2181
|
-
touchingBottom,
|
|
2182
|
-
touchingLeft,
|
|
2183
|
-
touchingRight,
|
|
2184
|
-
bottomCalc: `${rect.bottom} >= ${window.innerHeight - threshold} = ${touchingBottom}`,
|
|
2185
|
-
});
|
|
2186
2155
|
// Remove override when touching edge (allow inheritance), set to 0 when not touching
|
|
2187
2156
|
const style = this.el.style;
|
|
2188
|
-
const actions = {
|
|
2189
|
-
top: touchingTop ? 'removeProperty' : 'setProperty 0px',
|
|
2190
|
-
bottom: touchingBottom ? 'removeProperty' : 'setProperty 0px',
|
|
2191
|
-
left: touchingLeft ? 'removeProperty' : 'setProperty 0px',
|
|
2192
|
-
right: touchingRight ? 'removeProperty' : 'setProperty 0px',
|
|
2193
|
-
};
|
|
2194
|
-
console.log('[updateSafeAreaOverrides] actions:', actions);
|
|
2195
2157
|
touchingTop ? style.removeProperty('--ion-safe-area-top') : style.setProperty('--ion-safe-area-top', '0px');
|
|
2196
2158
|
touchingBottom
|
|
2197
2159
|
? style.removeProperty('--ion-safe-area-bottom')
|
|
2198
2160
|
: style.setProperty('--ion-safe-area-bottom', '0px');
|
|
2199
2161
|
touchingLeft ? style.removeProperty('--ion-safe-area-left') : style.setProperty('--ion-safe-area-left', '0px');
|
|
2200
2162
|
touchingRight ? style.removeProperty('--ion-safe-area-right') : style.setProperty('--ion-safe-area-right', '0px');
|
|
2201
|
-
// Log the actual style values after setting
|
|
2202
|
-
console.log('[updateSafeAreaOverrides] after setting, inline styles:', {
|
|
2203
|
-
top: style.getPropertyValue('--ion-safe-area-top'),
|
|
2204
|
-
bottom: style.getPropertyValue('--ion-safe-area-bottom'),
|
|
2205
|
-
left: style.getPropertyValue('--ion-safe-area-left'),
|
|
2206
|
-
right: style.getPropertyValue('--ion-safe-area-right'),
|
|
2207
|
-
});
|
|
2208
2163
|
}
|
|
2209
2164
|
sheetOnDismiss() {
|
|
2210
2165
|
/**
|
|
@@ -2543,20 +2498,20 @@ const Modal = class {
|
|
|
2543
2498
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
2544
2499
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
2545
2500
|
const isSheetModalWithHandle = isSheetModal && showHandle;
|
|
2546
|
-
return (h(Host, Object.assign({ key: '
|
|
2501
|
+
return (h(Host, Object.assign({ key: 'e80cac8f52f1056eaf63112eafcfdcd029aa31e8', "no-router": true,
|
|
2547
2502
|
// Allow the modal to be navigable when the handle is focusable
|
|
2548
2503
|
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
2549
2504
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
2550
|
-
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), h("ion-backdrop", { key: '
|
|
2505
|
+
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), h("ion-backdrop", { key: 'dcc24085006dd1e41c47a55031d78bd55ddeb622', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { key: '74c4ff6bdc87f8c29ee8ba0592c97db2c597d876', class: "modal-shadow" }), h("div", Object.assign({ key: '79f3b01bdadc0d830e5707026aa2055d62714274',
|
|
2551
2506
|
/*
|
|
2552
2507
|
role and aria-modal must be used on the
|
|
2553
2508
|
same element. They must also be set inside the
|
|
2554
2509
|
shadow DOM otherwise ion-button will not be highlighted
|
|
2555
2510
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
2556
2511
|
*/
|
|
2557
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: '
|
|
2512
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: 'b250920bad86e23269f900353d531975a95662af', class: "modal-handle",
|
|
2558
2513
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
2559
|
-
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), h("slot", { key: '
|
|
2514
|
+
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), h("slot", { key: '2ba83c0f0a92784cac127c6581f12ea06b201b97', onSlotchange: this.onSlotChange }))));
|
|
2560
2515
|
}
|
|
2561
2516
|
get el() { return getElement(this); }
|
|
2562
2517
|
static get watchers() { return {
|