@ionic/core 8.7.6-dev.11759345401.165fca78 → 8.7.6-dev.11759412372.1f332f62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ion-tab-bar.js +7 -20
- package/components/ion-tabs.js +22 -21
- package/components/modal.js +25 -11
- package/components/overlays.js +23 -10
- package/components/popover.js +3 -2
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/ion-action-sheet.cjs.entry.js +1 -1
- package/dist/cjs/ion-alert.cjs.entry.js +1 -1
- package/dist/cjs/ion-datetime_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-loading.cjs.entry.js +1 -1
- package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-modal.cjs.entry.js +26 -12
- package/dist/cjs/ion-popover.cjs.entry.js +4 -3
- package/dist/cjs/ion-select-modal.cjs.entry.js +1 -1
- package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +7 -20
- package/dist/cjs/ion-tab_2.cjs.entry.js +22 -21
- package/dist/cjs/ion-toast.cjs.entry.js +1 -1
- package/dist/cjs/{overlays-czPyT6xP.js → overlays-CnXxzdUE.js} +23 -10
- package/dist/collection/components/modal/gestures/sheet.js +20 -7
- package/dist/collection/components/modal/modal.js +5 -4
- package/dist/collection/components/popover/popover.js +3 -2
- package/dist/collection/components/tab-bar/tab-bar.js +7 -20
- package/dist/collection/components/tabs/tabs.js +22 -21
- package/dist/collection/utils/overlays.js +23 -10
- package/dist/docs.json +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/ion-action-sheet.entry.js +1 -1
- package/dist/esm/ion-alert.entry.js +1 -1
- package/dist/esm/ion-datetime_3.entry.js +1 -1
- package/dist/esm/ion-loading.entry.js +1 -1
- package/dist/esm/ion-menu_3.entry.js +1 -1
- package/dist/esm/ion-modal.entry.js +26 -12
- package/dist/esm/ion-popover.entry.js +4 -3
- package/dist/esm/ion-select-modal.entry.js +1 -1
- package/dist/esm/ion-select_3.entry.js +1 -1
- package/dist/esm/ion-tab-bar_2.entry.js +7 -20
- package/dist/esm/ion-tab_2.entry.js +22 -21
- package/dist/esm/ion-toast.entry.js +1 -1
- package/dist/esm/{overlays-BYcYBCrx.js → overlays-C6lqoZ8M.js} +23 -10
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-0793aea6.entry.js → p-24cfbd94.entry.js} +1 -1
- package/dist/ionic/{p-746cd400.entry.js → p-2d199573.entry.js} +1 -1
- package/dist/ionic/{p-117e7a3f.entry.js → p-37074de0.entry.js} +1 -1
- package/dist/ionic/{p-568efea2.entry.js → p-3ea6a927.entry.js} +1 -1
- package/dist/ionic/{p-90f4cc71.entry.js → p-4cc97550.entry.js} +1 -1
- package/dist/ionic/p-55ea7dfc.entry.js +4 -0
- package/dist/ionic/{p-25e5e5cc.entry.js → p-56a91276.entry.js} +1 -1
- package/dist/ionic/{p-1f68cb59.entry.js → p-5a1f919a.entry.js} +1 -1
- package/dist/ionic/p-BW3pge-V.js +4 -0
- package/dist/ionic/{p-63852736.entry.js → p-b21fce9d.entry.js} +1 -1
- package/dist/ionic/{p-0e1904a0.entry.js → p-b7c1a16e.entry.js} +1 -1
- package/dist/ionic/p-e6c3214c.entry.js +4 -0
- package/dist/ionic/p-ec76fec4.entry.js +4 -0
- package/dist/types/components/tab-bar/tab-bar.d.ts +2 -2
- package/dist/types/components/tabs/tabs.d.ts +1 -3
- package/hydrate/index.js +80 -64
- package/hydrate/index.mjs +80 -64
- package/package.json +1 -1
- package/dist/ionic/p-2135be78.entry.js +0 -4
- package/dist/ionic/p-6e43c86a.entry.js +0 -4
- package/dist/ionic/p-Cnh7O81W.js +0 -4
- package/dist/ionic/p-e3cacac2.entry.js +0 -4
|
@@ -18,7 +18,6 @@ const TabBar = /*@__PURE__*/ proxyCustomElement(class TabBar extends HTMLElement
|
|
|
18
18
|
this.ionTabBarChanged = createEvent(this, "ionTabBarChanged", 7);
|
|
19
19
|
this.ionTabBarLoaded = createEvent(this, "ionTabBarLoaded", 7);
|
|
20
20
|
this.keyboardCtrl = null;
|
|
21
|
-
this.didLoad = false;
|
|
22
21
|
this.keyboardVisible = false;
|
|
23
22
|
/**
|
|
24
23
|
* If `true`, the tab bar will be translucent.
|
|
@@ -28,29 +27,14 @@ const TabBar = /*@__PURE__*/ proxyCustomElement(class TabBar extends HTMLElement
|
|
|
28
27
|
this.translucent = false;
|
|
29
28
|
}
|
|
30
29
|
selectedTabChanged() {
|
|
31
|
-
// Skip the initial watcher call that happens during component load
|
|
32
|
-
// We handle that in componentDidLoad to ensure children are ready
|
|
33
|
-
if (!this.didLoad) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
30
|
if (this.selectedTab !== undefined) {
|
|
37
31
|
this.ionTabBarChanged.emit({
|
|
38
32
|
tab: this.selectedTab,
|
|
39
33
|
});
|
|
40
34
|
}
|
|
41
35
|
}
|
|
42
|
-
|
|
43
|
-
this.
|
|
44
|
-
// Set the flag to indicate the component has loaded
|
|
45
|
-
// This allows the watcher to emit changes from this point forward
|
|
46
|
-
this.didLoad = true;
|
|
47
|
-
// Emit the initial selected tab after the component is fully loaded
|
|
48
|
-
// This ensures all child components (ion-tab-button) are ready
|
|
49
|
-
if (this.selectedTab !== undefined) {
|
|
50
|
-
this.ionTabBarChanged.emit({
|
|
51
|
-
tab: this.selectedTab,
|
|
52
|
-
});
|
|
53
|
-
}
|
|
36
|
+
componentWillLoad() {
|
|
37
|
+
this.selectedTabChanged();
|
|
54
38
|
}
|
|
55
39
|
async connectedCallback() {
|
|
56
40
|
this.keyboardCtrl = await createKeyboardController(async (keyboardOpen, waitForResize) => {
|
|
@@ -70,15 +54,18 @@ const TabBar = /*@__PURE__*/ proxyCustomElement(class TabBar extends HTMLElement
|
|
|
70
54
|
this.keyboardCtrl.destroy();
|
|
71
55
|
}
|
|
72
56
|
}
|
|
57
|
+
componentDidLoad() {
|
|
58
|
+
this.ionTabBarLoaded.emit();
|
|
59
|
+
}
|
|
73
60
|
render() {
|
|
74
61
|
const { color, translucent, keyboardVisible } = this;
|
|
75
62
|
const mode = getIonMode(this);
|
|
76
63
|
const shouldHide = keyboardVisible && this.el.getAttribute('slot') !== 'top';
|
|
77
|
-
return (h(Host, { key: '
|
|
64
|
+
return (h(Host, { key: '275dc6c1b30f6928ce9039b2f445208bb3500ddc', role: "tablist", "aria-hidden": shouldHide ? 'true' : null, class: createColorClasses(color, {
|
|
78
65
|
[mode]: true,
|
|
79
66
|
'tab-bar-translucent': translucent,
|
|
80
67
|
'tab-bar-hidden': shouldHide,
|
|
81
|
-
}) }, h("slot", { key: '
|
|
68
|
+
}) }, h("slot", { key: 'ceac20128d75c6a4a0f445f2df8deb8cc71fc4da' })));
|
|
82
69
|
}
|
|
83
70
|
get el() { return this; }
|
|
84
71
|
static get watchers() { return {
|
package/components/ion-tabs.js
CHANGED
|
@@ -52,27 +52,29 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
52
52
|
}
|
|
53
53
|
this.ionNavWillLoad.emit();
|
|
54
54
|
}
|
|
55
|
-
|
|
56
|
-
this.updateTabBar();
|
|
57
|
-
}
|
|
58
|
-
componentDidUpdate() {
|
|
59
|
-
this.updateTabBar();
|
|
60
|
-
}
|
|
61
|
-
updateTabBar() {
|
|
55
|
+
componentWillRender() {
|
|
62
56
|
const tabBar = this.el.querySelector('ion-tab-bar');
|
|
63
|
-
if (
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
57
|
+
if (tabBar) {
|
|
58
|
+
let tab = this.selectedTab ? this.selectedTab.tab : undefined;
|
|
59
|
+
// Fallback: if no selectedTab is set but we're using router mode,
|
|
60
|
+
// determine the active tab from the current URL. This works around
|
|
61
|
+
// timing issues in React Router integration where setRouteId may not
|
|
62
|
+
// be called in time for the initial render.
|
|
63
|
+
// TODO(FW-6724): Remove this with React Router upgrade
|
|
64
|
+
if (!tab && this.useRouter && typeof window !== 'undefined') {
|
|
65
|
+
const currentPath = window.location.pathname;
|
|
66
|
+
const tabButtons = this.el.querySelectorAll('ion-tab-button');
|
|
67
|
+
// Look for a tab button that matches the current path pattern
|
|
68
|
+
for (const tabButton of tabButtons) {
|
|
69
|
+
const tabId = tabButton.getAttribute('tab');
|
|
70
|
+
if (tabId && currentPath.includes(tabId)) {
|
|
71
|
+
tab = tabId;
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
tabBar.selectedTab = tab;
|
|
74
77
|
}
|
|
75
|
-
tabBar.selectedTab = tab;
|
|
76
78
|
}
|
|
77
79
|
/**
|
|
78
80
|
* Select a tab by the value of its `tab` property or an element reference. This method is only available for vanilla JavaScript projects. The Angular, React, and Vue implementations of tabs are coupled to each framework's router.
|
|
@@ -131,7 +133,6 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
131
133
|
this.selectedTab = selectedTab;
|
|
132
134
|
this.ionTabsWillChange.emit({ tab: selectedTab.tab });
|
|
133
135
|
selectedTab.active = true;
|
|
134
|
-
this.updateTabBar();
|
|
135
136
|
return Promise.resolve();
|
|
136
137
|
}
|
|
137
138
|
tabSwitch() {
|
|
@@ -166,7 +167,7 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
166
167
|
return Array.from(this.el.querySelectorAll('ion-tab'));
|
|
167
168
|
}
|
|
168
169
|
render() {
|
|
169
|
-
return (h(Host, { key: '
|
|
170
|
+
return (h(Host, { key: '6dd1d17cc5a7aff4b910303006b4478080ca97af', onIonTabButtonClick: this.onTabClicked }, h("slot", { key: 'db54a692d1a825498a116f090eb305f7cceceb5a', name: "top" }), h("div", { key: 'e1b7d49ba7032e9071de2029695254e2a8303be9', class: "tabs-inner" }, h("slot", { key: '4c3b58d5292c8c834e7532c51de0861068943d79' })), h("slot", { key: 'dd59c0b9b217dfbfb0fccdbc6896b593278549cc', name: "bottom" })));
|
|
170
171
|
}
|
|
171
172
|
get el() { return this; }
|
|
172
173
|
static get style() { return tabsCss; }
|
package/components/modal.js
CHANGED
|
@@ -947,6 +947,7 @@ const mdLeaveAnimation = (baseEl, opts) => {
|
|
|
947
947
|
};
|
|
948
948
|
|
|
949
949
|
const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], expandToScroll, getCurrentBreakpoint, onDismiss, onBreakpointChange) => {
|
|
950
|
+
var _a, _b;
|
|
950
951
|
// Defaults for the sheet swipe animation
|
|
951
952
|
const defaultBackdrop = [
|
|
952
953
|
{ offset: 0, opacity: 'var(--backdrop-opacity)' },
|
|
@@ -984,10 +985,15 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
984
985
|
const backdropAnimation = animation.childAnimations.find((ani) => ani.id === 'backdropAnimation');
|
|
985
986
|
const contentAnimation = animation.childAnimations.find((ani) => ani.id === 'contentAnimation');
|
|
986
987
|
const enableBackdrop = () => {
|
|
988
|
+
var _a, _b;
|
|
987
989
|
// Respect explicit opt-out of focus trapping/backdrop interactions
|
|
988
990
|
// If focusTrap is false or showBackdrop is false, do not enable the backdrop or re-enable focus trap
|
|
989
991
|
const el = baseEl;
|
|
990
|
-
|
|
992
|
+
const focusTrapAttr = (_a = el.getAttribute) === null || _a === void 0 ? void 0 : _a.call(el, 'focus-trap');
|
|
993
|
+
const showBackdropAttr = (_b = el.getAttribute) === null || _b === void 0 ? void 0 : _b.call(el, 'show-backdrop');
|
|
994
|
+
const focusTrapDisabled = el.focusTrap === false || focusTrapAttr === 'false';
|
|
995
|
+
const backdropDisabled = el.showBackdrop === false || showBackdropAttr === 'false';
|
|
996
|
+
if (focusTrapDisabled || backdropDisabled) {
|
|
991
997
|
return;
|
|
992
998
|
}
|
|
993
999
|
baseEl.style.setProperty('pointer-events', 'auto');
|
|
@@ -1114,9 +1120,12 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
1114
1120
|
* ion-backdrop and .modal-wrapper always have pointer-events: auto
|
|
1115
1121
|
* applied, so the modal content can still be interacted with.
|
|
1116
1122
|
*/
|
|
1117
|
-
const
|
|
1118
|
-
|
|
1119
|
-
|
|
1123
|
+
const modalEl = baseEl;
|
|
1124
|
+
const focusTrapAttr = (_a = modalEl.getAttribute) === null || _a === void 0 ? void 0 : _a.call(modalEl, 'focus-trap');
|
|
1125
|
+
const showBackdropAttr = (_b = modalEl.getAttribute) === null || _b === void 0 ? void 0 : _b.call(modalEl, 'show-backdrop');
|
|
1126
|
+
const focusTrapDisabled = modalEl.focusTrap === false || focusTrapAttr === 'false';
|
|
1127
|
+
const backdropDisabled = modalEl.showBackdrop === false || showBackdropAttr === 'false';
|
|
1128
|
+
const shouldEnableBackdrop = currentBreakpoint > backdropBreakpoint && !focusTrapDisabled && !backdropDisabled;
|
|
1120
1129
|
if (shouldEnableBackdrop) {
|
|
1121
1130
|
enableBackdrop();
|
|
1122
1131
|
}
|
|
@@ -1414,6 +1423,7 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
1414
1423
|
*/
|
|
1415
1424
|
if (wrapperAnimation && backdropAnimation) {
|
|
1416
1425
|
raf(() => {
|
|
1426
|
+
var _a, _b;
|
|
1417
1427
|
wrapperAnimation.keyframes([...SheetDefaults.WRAPPER_KEYFRAMES]);
|
|
1418
1428
|
backdropAnimation.keyframes([...SheetDefaults.BACKDROP_KEYFRAMES]);
|
|
1419
1429
|
contentAnimation === null || contentAnimation === void 0 ? void 0 : contentAnimation.keyframes([...SheetDefaults.CONTENT_KEYFRAMES]);
|
|
@@ -1424,9 +1434,12 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
1424
1434
|
* Backdrop should become enabled
|
|
1425
1435
|
* after the backdropBreakpoint value
|
|
1426
1436
|
*/
|
|
1427
|
-
const
|
|
1428
|
-
|
|
1429
|
-
|
|
1437
|
+
const modalEl = baseEl;
|
|
1438
|
+
const focusTrapAttr = (_a = modalEl.getAttribute) === null || _a === void 0 ? void 0 : _a.call(modalEl, 'focus-trap');
|
|
1439
|
+
const showBackdropAttr = (_b = modalEl.getAttribute) === null || _b === void 0 ? void 0 : _b.call(modalEl, 'show-backdrop');
|
|
1440
|
+
const focusTrapDisabled = modalEl.focusTrap === false || focusTrapAttr === 'false';
|
|
1441
|
+
const backdropDisabled = modalEl.showBackdrop === false || showBackdropAttr === 'false';
|
|
1442
|
+
const shouldEnableBackdrop = currentBreakpoint > backdropBreakpoint && !focusTrapDisabled && !backdropDisabled;
|
|
1430
1443
|
if (shouldEnableBackdrop) {
|
|
1431
1444
|
enableBackdrop();
|
|
1432
1445
|
}
|
|
@@ -2327,20 +2340,21 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
2327
2340
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
2328
2341
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
2329
2342
|
const isSheetModalWithHandle = isSheetModal && showHandle;
|
|
2330
|
-
|
|
2343
|
+
const focusTrapAttr = this.el.getAttribute('focus-trap');
|
|
2344
|
+
return (h(Host, Object.assign({ key: '5cb4c73e060f5bc0fdc9728cb8029665a08b4187', "no-router": true,
|
|
2331
2345
|
// Allow the modal to be navigable when the handle is focusable
|
|
2332
2346
|
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
2333
2347
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
2334
|
-
}, 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: '
|
|
2348
|
+
}, 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 || focusTrapAttr === '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: '7697171f861e148d3ef7e35460dd8d3df2d4f3ac', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { key: 'd71a7ca23e1aa2048af82959f902ea0fc92d6fba', class: "modal-shadow" }), h("div", Object.assign({ key: '9543fdf222f35bd22ded828f60a1345e3b3da65c',
|
|
2335
2349
|
/*
|
|
2336
2350
|
role and aria-modal must be used on the
|
|
2337
2351
|
same element. They must also be set inside the
|
|
2338
2352
|
shadow DOM otherwise ion-button will not be highlighted
|
|
2339
2353
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
2340
2354
|
*/
|
|
2341
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: '
|
|
2355
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: '411f1e52935485e2791afd9a97d6685c994bf44a', class: "modal-handle",
|
|
2342
2356
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
2343
|
-
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: '
|
|
2357
|
+
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: '8dac500e345dfd66f3a3fa62cd94570682b1083e', onSlotchange: this.onSlotChange }))));
|
|
2344
2358
|
}
|
|
2345
2359
|
get el() { return this; }
|
|
2346
2360
|
static get watchers() { return {
|
package/components/overlays.js
CHANGED
|
@@ -502,7 +502,7 @@ const setRootAriaHidden = (hidden = false) => {
|
|
|
502
502
|
}
|
|
503
503
|
};
|
|
504
504
|
const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts) => {
|
|
505
|
-
var _a, _b;
|
|
505
|
+
var _a, _b, _c, _d;
|
|
506
506
|
if (overlay.presented) {
|
|
507
507
|
return;
|
|
508
508
|
}
|
|
@@ -535,10 +535,14 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
535
535
|
* to avoid disabling the overlay.
|
|
536
536
|
*/
|
|
537
537
|
const overlayEl = overlay.el;
|
|
538
|
-
const
|
|
538
|
+
const focusTrapAttr = (_a = overlayEl.getAttribute) === null || _a === void 0 ? void 0 : _a.call(overlayEl, 'focus-trap');
|
|
539
|
+
const showBackdropAttr = (_b = overlayEl.getAttribute) === null || _b === void 0 ? void 0 : _b.call(overlayEl, 'show-backdrop');
|
|
540
|
+
const focusTrapDisabled = overlayEl.focusTrap === false || focusTrapAttr === 'false';
|
|
541
|
+
const backdropDisabled = overlayEl.showBackdrop === false || showBackdropAttr === 'false';
|
|
542
|
+
const shouldTrapFocus = overlayEl.tagName !== 'ION-TOAST' && !focusTrapDisabled;
|
|
539
543
|
// Only lock out root content when backdrop is active. Developers relying on showBackdrop=false
|
|
540
544
|
// expect background interaction to remain enabled.
|
|
541
|
-
const shouldLockRoot = shouldTrapFocus &&
|
|
545
|
+
const shouldLockRoot = shouldTrapFocus && !backdropDisabled;
|
|
542
546
|
overlay.presented = true;
|
|
543
547
|
overlay.willPresent.emit();
|
|
544
548
|
if (shouldLockRoot) {
|
|
@@ -550,7 +554,7 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
550
554
|
}
|
|
551
555
|
document.body.classList.add(BACKDROP_NO_SCROLL);
|
|
552
556
|
}
|
|
553
|
-
(
|
|
557
|
+
(_c = overlay.willPresentShorthand) === null || _c === void 0 ? void 0 : _c.emit();
|
|
554
558
|
const mode = getIonMode(overlay);
|
|
555
559
|
// get the user's animation fn if one was provided
|
|
556
560
|
const animationBuilder = overlay.enterAnimation
|
|
@@ -559,7 +563,7 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
559
563
|
const completed = await overlayAnimation(overlay, animationBuilder, overlay.el, opts);
|
|
560
564
|
if (completed) {
|
|
561
565
|
overlay.didPresent.emit();
|
|
562
|
-
(
|
|
566
|
+
(_d = overlay.didPresentShorthand) === null || _d === void 0 ? void 0 : _d.emit();
|
|
563
567
|
}
|
|
564
568
|
/**
|
|
565
569
|
* If the focused element is already
|
|
@@ -637,7 +641,7 @@ const restoreElementFocus = async (overlayEl) => {
|
|
|
637
641
|
}
|
|
638
642
|
};
|
|
639
643
|
const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnimation, opts) => {
|
|
640
|
-
var _a, _b;
|
|
644
|
+
var _a, _b, _c, _d;
|
|
641
645
|
if (!overlay.presented) {
|
|
642
646
|
return false;
|
|
643
647
|
}
|
|
@@ -653,11 +657,20 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
|
|
|
653
657
|
* is dismissed.
|
|
654
658
|
*/
|
|
655
659
|
const overlaysLockingRoot = presentedOverlays.filter((o) => {
|
|
660
|
+
var _a, _b;
|
|
656
661
|
const el = o;
|
|
657
|
-
|
|
662
|
+
const focusTrapAttr = (_a = el.getAttribute) === null || _a === void 0 ? void 0 : _a.call(el, 'focus-trap');
|
|
663
|
+
const showBackdropAttr = (_b = el.getAttribute) === null || _b === void 0 ? void 0 : _b.call(el, 'show-backdrop');
|
|
664
|
+
const focusTrapDisabled = el.focusTrap === false || focusTrapAttr === 'false';
|
|
665
|
+
const backdropDisabled = el.showBackdrop === false || showBackdropAttr === 'false';
|
|
666
|
+
return el.tagName !== 'ION-TOAST' && !focusTrapDisabled && !backdropDisabled;
|
|
658
667
|
});
|
|
659
668
|
const overlayEl = overlay.el;
|
|
660
|
-
const
|
|
669
|
+
const focusTrapAttr = (_a = overlayEl.getAttribute) === null || _a === void 0 ? void 0 : _a.call(overlayEl, 'focus-trap');
|
|
670
|
+
const showBackdropAttr = (_b = overlayEl.getAttribute) === null || _b === void 0 ? void 0 : _b.call(overlayEl, 'show-backdrop');
|
|
671
|
+
const focusTrapDisabled = overlayEl.focusTrap === false || focusTrapAttr === 'false';
|
|
672
|
+
const backdropDisabled = overlayEl.showBackdrop === false || showBackdropAttr === 'false';
|
|
673
|
+
const locksRoot = overlayEl.tagName !== 'ION-TOAST' && !focusTrapDisabled && !backdropDisabled;
|
|
661
674
|
/**
|
|
662
675
|
* If this is the last visible overlay that is trapping focus
|
|
663
676
|
* then we want to re-add the root to the accessibility tree.
|
|
@@ -672,7 +685,7 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
|
|
|
672
685
|
// Overlay contents should not be clickable during dismiss
|
|
673
686
|
overlay.el.style.setProperty('pointer-events', 'none');
|
|
674
687
|
overlay.willDismiss.emit({ data, role });
|
|
675
|
-
(
|
|
688
|
+
(_c = overlay.willDismissShorthand) === null || _c === void 0 ? void 0 : _c.emit({ data, role });
|
|
676
689
|
const mode = getIonMode(overlay);
|
|
677
690
|
const animationBuilder = overlay.leaveAnimation
|
|
678
691
|
? overlay.leaveAnimation
|
|
@@ -682,7 +695,7 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
|
|
|
682
695
|
await overlayAnimation(overlay, animationBuilder, overlay.el, opts);
|
|
683
696
|
}
|
|
684
697
|
overlay.didDismiss.emit({ data, role });
|
|
685
|
-
(
|
|
698
|
+
(_d = overlay.didDismissShorthand) === null || _d === void 0 ? void 0 : _d.emit({ data, role });
|
|
686
699
|
// Get a reference to all animations currently assigned to this overlay
|
|
687
700
|
// Then tear them down to return the overlay to its initial visual state
|
|
688
701
|
const animations = activeAnimations.get(overlay) || [];
|
package/components/popover.js
CHANGED
|
@@ -1387,9 +1387,10 @@ const Popover = /*@__PURE__*/ proxyCustomElement(class Popover extends HTMLEleme
|
|
|
1387
1387
|
const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes, focusTrap } = this;
|
|
1388
1388
|
const desktop = isPlatform('desktop');
|
|
1389
1389
|
const enableArrow = arrow && !parentPopover;
|
|
1390
|
-
|
|
1390
|
+
const focusTrapAttr = this.el.getAttribute('focus-trap');
|
|
1391
|
+
return (h(Host, Object.assign({ key: 'fe80ce582ef39698a3c11e305df3e8e599e91bdb', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
1391
1392
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
1392
|
-
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && h("ion-backdrop", { key: '
|
|
1393
|
+
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false || focusTrapAttr === 'false', 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && h("ion-backdrop", { key: 'f37d7c8574fded2721311d4f12726e21d830cc54', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), h("div", { key: '1567893f935e1da1cb46b81ea14a76af7895eee5', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && h("div", { key: '456163df03d2b582e07b1f81fa6088125d3308ef', class: "popover-arrow", part: "arrow" }), h("div", { key: '470d257a44fb9532a392bf9f5a89a1531d02323c', class: "popover-content", part: "content" }, h("slot", { key: 'd434289bba55ad9ab169a5092d214f4031511a8f' })))));
|
|
1393
1394
|
}
|
|
1394
1395
|
get el() { return this; }
|
|
1395
1396
|
static get watchers() { return {
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -15,7 +15,7 @@ var index$2 = require('./index-DNh170BW.js');
|
|
|
15
15
|
var config = require('./config-CKhELRRu.js');
|
|
16
16
|
var theme = require('./theme-CeDs6Hcv.js');
|
|
17
17
|
var index$3 = require('./index-D24wggHR.js');
|
|
18
|
-
var overlays = require('./overlays-
|
|
18
|
+
var overlays = require('./overlays-CnXxzdUE.js');
|
|
19
19
|
require('./index-DkNv4J_i.js');
|
|
20
20
|
require('./gesture-controller-dtqlP_q4.js');
|
|
21
21
|
require('./hardware-back-button-BxdNu76F.js');
|
|
@@ -7,7 +7,7 @@ var index = require('./index-DNh170BW.js');
|
|
|
7
7
|
var buttonActive = require('./button-active-BzZenWWH.js');
|
|
8
8
|
var helpers = require('./helpers-DgwmcYAu.js');
|
|
9
9
|
var lockController = require('./lock-controller-aDB9wrEf.js');
|
|
10
|
-
var overlays = require('./overlays-
|
|
10
|
+
var overlays = require('./overlays-CnXxzdUE.js');
|
|
11
11
|
var theme = require('./theme-CeDs6Hcv.js');
|
|
12
12
|
var ionicGlobal = require('./ionic-global-UI5YPSi-.js');
|
|
13
13
|
var animation = require('./animation-ZJ1lAkZD.js');
|
|
@@ -8,7 +8,7 @@ var config = require('./config-CKhELRRu.js');
|
|
|
8
8
|
var buttonActive = require('./button-active-BzZenWWH.js');
|
|
9
9
|
var helpers = require('./helpers-DgwmcYAu.js');
|
|
10
10
|
var lockController = require('./lock-controller-aDB9wrEf.js');
|
|
11
|
-
var overlays = require('./overlays-
|
|
11
|
+
var overlays = require('./overlays-CnXxzdUE.js');
|
|
12
12
|
var theme = require('./theme-CeDs6Hcv.js');
|
|
13
13
|
var ionicGlobal = require('./ionic-global-UI5YPSi-.js');
|
|
14
14
|
var animation = require('./animation-ZJ1lAkZD.js');
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
var index = require('./index-DNh170BW.js');
|
|
7
7
|
var focusVisible = require('./focus-visible-CCvKiLh3.js');
|
|
8
8
|
var helpers = require('./helpers-DgwmcYAu.js');
|
|
9
|
-
var overlays = require('./overlays-
|
|
9
|
+
var overlays = require('./overlays-CnXxzdUE.js');
|
|
10
10
|
var dir = require('./dir-Cn0z1rJH.js');
|
|
11
11
|
var theme = require('./theme-CeDs6Hcv.js');
|
|
12
12
|
var index$1 = require('./index-DqmRDbxg.js');
|
|
@@ -7,7 +7,7 @@ var index = require('./index-DNh170BW.js');
|
|
|
7
7
|
var config = require('./config-CKhELRRu.js');
|
|
8
8
|
var helpers = require('./helpers-DgwmcYAu.js');
|
|
9
9
|
var lockController = require('./lock-controller-aDB9wrEf.js');
|
|
10
|
-
var overlays = require('./overlays-
|
|
10
|
+
var overlays = require('./overlays-CnXxzdUE.js');
|
|
11
11
|
var theme = require('./theme-CeDs6Hcv.js');
|
|
12
12
|
var ionicGlobal = require('./ionic-global-UI5YPSi-.js');
|
|
13
13
|
var animation = require('./animation-ZJ1lAkZD.js');
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
var index = require('./index-DNh170BW.js');
|
|
7
7
|
var cubicBezier = require('./cubic-bezier-DAjy1V-e.js');
|
|
8
|
-
var overlays = require('./overlays-
|
|
8
|
+
var overlays = require('./overlays-CnXxzdUE.js');
|
|
9
9
|
var gestureController = require('./gesture-controller-dtqlP_q4.js');
|
|
10
10
|
var hardwareBackButton = require('./hardware-back-button-BxdNu76F.js');
|
|
11
11
|
var helpers = require('./helpers-DgwmcYAu.js');
|
|
@@ -9,7 +9,7 @@ var frameworkDelegate = require('./framework-delegate-WkyjrnCx.js');
|
|
|
9
9
|
var helpers = require('./helpers-DgwmcYAu.js');
|
|
10
10
|
var lockController = require('./lock-controller-aDB9wrEf.js');
|
|
11
11
|
var capacitor = require('./capacitor-DmA66EwP.js');
|
|
12
|
-
var overlays = require('./overlays-
|
|
12
|
+
var overlays = require('./overlays-CnXxzdUE.js');
|
|
13
13
|
var theme = require('./theme-CeDs6Hcv.js');
|
|
14
14
|
var index$4 = require('./index-BzEyuIww.js');
|
|
15
15
|
var ionicGlobal = require('./ionic-global-UI5YPSi-.js');
|
|
@@ -950,6 +950,7 @@ const mdLeaveAnimation = (baseEl, opts) => {
|
|
|
950
950
|
};
|
|
951
951
|
|
|
952
952
|
const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], expandToScroll, getCurrentBreakpoint, onDismiss, onBreakpointChange) => {
|
|
953
|
+
var _a, _b;
|
|
953
954
|
// Defaults for the sheet swipe animation
|
|
954
955
|
const defaultBackdrop = [
|
|
955
956
|
{ offset: 0, opacity: 'var(--backdrop-opacity)' },
|
|
@@ -987,10 +988,15 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
987
988
|
const backdropAnimation = animation.childAnimations.find((ani) => ani.id === 'backdropAnimation');
|
|
988
989
|
const contentAnimation = animation.childAnimations.find((ani) => ani.id === 'contentAnimation');
|
|
989
990
|
const enableBackdrop = () => {
|
|
991
|
+
var _a, _b;
|
|
990
992
|
// Respect explicit opt-out of focus trapping/backdrop interactions
|
|
991
993
|
// If focusTrap is false or showBackdrop is false, do not enable the backdrop or re-enable focus trap
|
|
992
994
|
const el = baseEl;
|
|
993
|
-
|
|
995
|
+
const focusTrapAttr = (_a = el.getAttribute) === null || _a === void 0 ? void 0 : _a.call(el, 'focus-trap');
|
|
996
|
+
const showBackdropAttr = (_b = el.getAttribute) === null || _b === void 0 ? void 0 : _b.call(el, 'show-backdrop');
|
|
997
|
+
const focusTrapDisabled = el.focusTrap === false || focusTrapAttr === 'false';
|
|
998
|
+
const backdropDisabled = el.showBackdrop === false || showBackdropAttr === 'false';
|
|
999
|
+
if (focusTrapDisabled || backdropDisabled) {
|
|
994
1000
|
return;
|
|
995
1001
|
}
|
|
996
1002
|
baseEl.style.setProperty('pointer-events', 'auto');
|
|
@@ -1117,9 +1123,12 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
1117
1123
|
* ion-backdrop and .modal-wrapper always have pointer-events: auto
|
|
1118
1124
|
* applied, so the modal content can still be interacted with.
|
|
1119
1125
|
*/
|
|
1120
|
-
const
|
|
1121
|
-
|
|
1122
|
-
|
|
1126
|
+
const modalEl = baseEl;
|
|
1127
|
+
const focusTrapAttr = (_a = modalEl.getAttribute) === null || _a === void 0 ? void 0 : _a.call(modalEl, 'focus-trap');
|
|
1128
|
+
const showBackdropAttr = (_b = modalEl.getAttribute) === null || _b === void 0 ? void 0 : _b.call(modalEl, 'show-backdrop');
|
|
1129
|
+
const focusTrapDisabled = modalEl.focusTrap === false || focusTrapAttr === 'false';
|
|
1130
|
+
const backdropDisabled = modalEl.showBackdrop === false || showBackdropAttr === 'false';
|
|
1131
|
+
const shouldEnableBackdrop = currentBreakpoint > backdropBreakpoint && !focusTrapDisabled && !backdropDisabled;
|
|
1123
1132
|
if (shouldEnableBackdrop) {
|
|
1124
1133
|
enableBackdrop();
|
|
1125
1134
|
}
|
|
@@ -1417,6 +1426,7 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
1417
1426
|
*/
|
|
1418
1427
|
if (wrapperAnimation && backdropAnimation) {
|
|
1419
1428
|
helpers.raf(() => {
|
|
1429
|
+
var _a, _b;
|
|
1420
1430
|
wrapperAnimation.keyframes([...SheetDefaults.WRAPPER_KEYFRAMES]);
|
|
1421
1431
|
backdropAnimation.keyframes([...SheetDefaults.BACKDROP_KEYFRAMES]);
|
|
1422
1432
|
contentAnimation === null || contentAnimation === void 0 ? void 0 : contentAnimation.keyframes([...SheetDefaults.CONTENT_KEYFRAMES]);
|
|
@@ -1427,9 +1437,12 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
1427
1437
|
* Backdrop should become enabled
|
|
1428
1438
|
* after the backdropBreakpoint value
|
|
1429
1439
|
*/
|
|
1430
|
-
const
|
|
1431
|
-
|
|
1432
|
-
|
|
1440
|
+
const modalEl = baseEl;
|
|
1441
|
+
const focusTrapAttr = (_a = modalEl.getAttribute) === null || _a === void 0 ? void 0 : _a.call(modalEl, 'focus-trap');
|
|
1442
|
+
const showBackdropAttr = (_b = modalEl.getAttribute) === null || _b === void 0 ? void 0 : _b.call(modalEl, 'show-backdrop');
|
|
1443
|
+
const focusTrapDisabled = modalEl.focusTrap === false || focusTrapAttr === 'false';
|
|
1444
|
+
const backdropDisabled = modalEl.showBackdrop === false || showBackdropAttr === 'false';
|
|
1445
|
+
const shouldEnableBackdrop = currentBreakpoint > backdropBreakpoint && !focusTrapDisabled && !backdropDisabled;
|
|
1433
1446
|
if (shouldEnableBackdrop) {
|
|
1434
1447
|
enableBackdrop();
|
|
1435
1448
|
}
|
|
@@ -2328,20 +2341,21 @@ const Modal = class {
|
|
|
2328
2341
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
2329
2342
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
2330
2343
|
const isSheetModalWithHandle = isSheetModal && showHandle;
|
|
2331
|
-
|
|
2344
|
+
const focusTrapAttr = this.el.getAttribute('focus-trap');
|
|
2345
|
+
return (index$3.h(index$3.Host, Object.assign({ key: '5cb4c73e060f5bc0fdc9728cb8029665a08b4187', "no-router": true,
|
|
2332
2346
|
// Allow the modal to be navigable when the handle is focusable
|
|
2333
2347
|
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
2334
2348
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
2335
|
-
}, 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: '
|
|
2349
|
+
}, 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 || focusTrapAttr === '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: '7697171f861e148d3ef7e35460dd8d3df2d4f3ac', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && index$3.h("div", { key: 'd71a7ca23e1aa2048af82959f902ea0fc92d6fba', class: "modal-shadow" }), index$3.h("div", Object.assign({ key: '9543fdf222f35bd22ded828f60a1345e3b3da65c',
|
|
2336
2350
|
/*
|
|
2337
2351
|
role and aria-modal must be used on the
|
|
2338
2352
|
same element. They must also be set inside the
|
|
2339
2353
|
shadow DOM otherwise ion-button will not be highlighted
|
|
2340
2354
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
2341
2355
|
*/
|
|
2342
|
-
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: '
|
|
2356
|
+
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: '411f1e52935485e2791afd9a97d6685c994bf44a', class: "modal-handle",
|
|
2343
2357
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
2344
|
-
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: '
|
|
2358
|
+
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: '8dac500e345dfd66f3a3fa62cd94570682b1083e', onSlotchange: this.onSlotChange }))));
|
|
2345
2359
|
}
|
|
2346
2360
|
get el() { return index$3.getElement(this); }
|
|
2347
2361
|
static get watchers() { return {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
6
|
var index = require('./index-DNh170BW.js');
|
|
7
|
-
var overlays = require('./overlays-
|
|
7
|
+
var overlays = require('./overlays-CnXxzdUE.js');
|
|
8
8
|
var frameworkDelegate = require('./framework-delegate-WkyjrnCx.js');
|
|
9
9
|
var helpers = require('./helpers-DgwmcYAu.js');
|
|
10
10
|
var lockController = require('./lock-controller-aDB9wrEf.js');
|
|
@@ -1388,9 +1388,10 @@ const Popover = class {
|
|
|
1388
1388
|
const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes, focusTrap } = this;
|
|
1389
1389
|
const desktop = ionicGlobal.isPlatform('desktop');
|
|
1390
1390
|
const enableArrow = arrow && !parentPopover;
|
|
1391
|
-
|
|
1391
|
+
const focusTrapAttr = this.el.getAttribute('focus-trap');
|
|
1392
|
+
return (index.h(index.Host, Object.assign({ key: 'fe80ce582ef39698a3c11e305df3e8e599e91bdb', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
1392
1393
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
1393
|
-
}, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, [overlays.FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && index.h("ion-backdrop", { key: '
|
|
1394
|
+
}, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, [overlays.FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false || focusTrapAttr === 'false', 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && index.h("ion-backdrop", { key: 'f37d7c8574fded2721311d4f12726e21d830cc54', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), index.h("div", { key: '1567893f935e1da1cb46b81ea14a76af7895eee5', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && index.h("div", { key: '456163df03d2b582e07b1f81fa6088125d3308ef', class: "popover-arrow", part: "arrow" }), index.h("div", { key: '470d257a44fb9532a392bf9f5a89a1531d02323c', class: "popover-content", part: "content" }, index.h("slot", { key: 'd434289bba55ad9ab169a5092d214f4031511a8f' })))));
|
|
1394
1395
|
}
|
|
1395
1396
|
get el() { return index.getElement(this); }
|
|
1396
1397
|
static get watchers() { return {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
var index = require('./index-DNh170BW.js');
|
|
7
7
|
var ionicGlobal = require('./ionic-global-UI5YPSi-.js');
|
|
8
|
-
var overlays = require('./overlays-
|
|
8
|
+
var overlays = require('./overlays-CnXxzdUE.js');
|
|
9
9
|
var theme = require('./theme-CeDs6Hcv.js');
|
|
10
10
|
require('./index-DkNv4J_i.js');
|
|
11
11
|
require('./helpers-DgwmcYAu.js');
|
|
@@ -7,7 +7,7 @@ var index = require('./index-DNh170BW.js');
|
|
|
7
7
|
var notchController = require('./notch-controller-Bf5Rr4R5.js');
|
|
8
8
|
var compareWithUtils = require('./compare-with-utils-DSicavqM.js');
|
|
9
9
|
var helpers = require('./helpers-DgwmcYAu.js');
|
|
10
|
-
var overlays = require('./overlays-
|
|
10
|
+
var overlays = require('./overlays-CnXxzdUE.js');
|
|
11
11
|
var dir = require('./dir-Cn0z1rJH.js');
|
|
12
12
|
var theme = require('./theme-CeDs6Hcv.js');
|
|
13
13
|
var watchOptions = require('./watch-options-CviOsrTS.js');
|
|
@@ -22,7 +22,6 @@ 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.didLoad = false;
|
|
26
25
|
this.keyboardVisible = false;
|
|
27
26
|
/**
|
|
28
27
|
* If `true`, the tab bar will be translucent.
|
|
@@ -32,29 +31,14 @@ const TabBar = class {
|
|
|
32
31
|
this.translucent = false;
|
|
33
32
|
}
|
|
34
33
|
selectedTabChanged() {
|
|
35
|
-
// Skip the initial watcher call that happens during component load
|
|
36
|
-
// We handle that in componentDidLoad to ensure children are ready
|
|
37
|
-
if (!this.didLoad) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
34
|
if (this.selectedTab !== undefined) {
|
|
41
35
|
this.ionTabBarChanged.emit({
|
|
42
36
|
tab: this.selectedTab,
|
|
43
37
|
});
|
|
44
38
|
}
|
|
45
39
|
}
|
|
46
|
-
|
|
47
|
-
this.
|
|
48
|
-
// Set the flag to indicate the component has loaded
|
|
49
|
-
// This allows the watcher to emit changes from this point forward
|
|
50
|
-
this.didLoad = true;
|
|
51
|
-
// Emit the initial selected tab after the component is fully loaded
|
|
52
|
-
// This ensures all child components (ion-tab-button) are ready
|
|
53
|
-
if (this.selectedTab !== undefined) {
|
|
54
|
-
this.ionTabBarChanged.emit({
|
|
55
|
-
tab: this.selectedTab,
|
|
56
|
-
});
|
|
57
|
-
}
|
|
40
|
+
componentWillLoad() {
|
|
41
|
+
this.selectedTabChanged();
|
|
58
42
|
}
|
|
59
43
|
async connectedCallback() {
|
|
60
44
|
this.keyboardCtrl = await keyboardController.createKeyboardController(async (keyboardOpen, waitForResize) => {
|
|
@@ -74,15 +58,18 @@ const TabBar = class {
|
|
|
74
58
|
this.keyboardCtrl.destroy();
|
|
75
59
|
}
|
|
76
60
|
}
|
|
61
|
+
componentDidLoad() {
|
|
62
|
+
this.ionTabBarLoaded.emit();
|
|
63
|
+
}
|
|
77
64
|
render() {
|
|
78
65
|
const { color, translucent, keyboardVisible } = this;
|
|
79
66
|
const mode = ionicGlobal.getIonMode(this);
|
|
80
67
|
const shouldHide = keyboardVisible && this.el.getAttribute('slot') !== 'top';
|
|
81
|
-
return (index.h(index.Host, { key: '
|
|
68
|
+
return (index.h(index.Host, { key: '275dc6c1b30f6928ce9039b2f445208bb3500ddc', role: "tablist", "aria-hidden": shouldHide ? 'true' : null, class: theme.createColorClasses(color, {
|
|
82
69
|
[mode]: true,
|
|
83
70
|
'tab-bar-translucent': translucent,
|
|
84
71
|
'tab-bar-hidden': shouldHide,
|
|
85
|
-
}) }, index.h("slot", { key: '
|
|
72
|
+
}) }, index.h("slot", { key: 'ceac20128d75c6a4a0f445f2df8deb8cc71fc4da' })));
|
|
86
73
|
}
|
|
87
74
|
get el() { return index.getElement(this); }
|
|
88
75
|
static get watchers() { return {
|