@ionic/core 7.7.5-nightly.20240312 → 7.7.5
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/hardware-back-button.js +3 -3
- package/components/ion-app.js +4 -4
- package/components/ion-menu.js +3 -3
- package/components/overlays.js +61 -19
- package/dist/cjs/{hardware-back-button-1d378ca9.js → hardware-back-button-b84c0758.js} +3 -3
- package/dist/cjs/{index-04f3624f.js → index-676a122f.js} +1 -1
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/ion-action-sheet.cjs.entry.js +2 -2
- package/dist/cjs/ion-alert.cjs.entry.js +2 -2
- package/dist/cjs/ion-app_8.cjs.entry.js +5 -5
- package/dist/cjs/ion-datetime_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-loading.cjs.entry.js +2 -2
- package/dist/cjs/ion-menu_3.cjs.entry.js +5 -5
- package/dist/cjs/ion-modal.cjs.entry.js +2 -2
- package/dist/cjs/ion-popover.cjs.entry.js +2 -2
- package/dist/cjs/ion-select_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-toast.cjs.entry.js +2 -2
- package/dist/cjs/{overlays-65bdff89.js → overlays-d32575f9.js} +61 -19
- package/dist/collection/components/app/app.js +4 -4
- package/dist/collection/components/menu/menu.js +3 -3
- package/dist/collection/utils/hardware-back-button.js +2 -2
- package/dist/collection/utils/overlays.js +61 -19
- package/dist/collection/utils/test/overlays/overlays.spec.js +53 -0
- package/dist/docs.json +1 -1
- package/dist/esm/{hardware-back-button-adcc28d5.js → hardware-back-button-36f7543b.js} +3 -3
- package/dist/esm/{index-a3478902.js → index-314a9349.js} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/ion-action-sheet.entry.js +2 -2
- package/dist/esm/ion-alert.entry.js +2 -2
- package/dist/esm/ion-app_8.entry.js +5 -5
- package/dist/esm/ion-datetime_3.entry.js +2 -2
- package/dist/esm/ion-loading.entry.js +2 -2
- package/dist/esm/ion-menu_3.entry.js +5 -5
- package/dist/esm/ion-modal.entry.js +2 -2
- package/dist/esm/ion-popover.entry.js +2 -2
- package/dist/esm/ion-select_3.entry.js +2 -2
- package/dist/esm/ion-toast.entry.js +2 -2
- package/dist/esm/{overlays-74ac012a.js → overlays-d99a4d6a.js} +61 -19
- package/dist/esm-es5/hardware-back-button-36f7543b.js +4 -0
- package/dist/esm-es5/{index-a3478902.js → index-314a9349.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
- package/dist/esm-es5/ion-alert.entry.js +1 -1
- package/dist/esm-es5/ion-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/ion-loading.entry.js +1 -1
- package/dist/esm-es5/ion-menu_3.entry.js +1 -1
- package/dist/esm-es5/ion-modal.entry.js +1 -1
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ion-select_3.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/overlays-d99a4d6a.js +4 -0
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-4e867d45.system.entry.js → p-04721936.system.entry.js} +1 -1
- package/dist/ionic/{p-875d7f7f.entry.js → p-08a5d8eb.entry.js} +1 -1
- package/dist/ionic/{p-a1704328.entry.js → p-09fc100a.entry.js} +1 -1
- package/dist/ionic/{p-1d9074d0.entry.js → p-3377236e.entry.js} +1 -1
- package/dist/ionic/{p-cdd09d94.entry.js → p-36a80e5c.entry.js} +1 -1
- package/dist/ionic/{p-03ea4955.entry.js → p-381612c1.entry.js} +1 -1
- package/dist/ionic/{p-05dc41cc.system.js → p-45dad85c.system.js} +1 -1
- package/dist/ionic/{p-f9e1f6aa.system.entry.js → p-4830fae8.system.entry.js} +1 -1
- package/dist/ionic/{p-33d70d46.js → p-49bda910.js} +1 -1
- package/dist/ionic/{p-b5bcde21.system.entry.js → p-4dd988d7.system.entry.js} +1 -1
- package/dist/ionic/p-4f710c57.system.js +4 -0
- package/dist/ionic/p-60c9fd9e.system.js +1 -1
- package/dist/ionic/p-6a0a3e18.system.entry.js +4 -0
- package/dist/ionic/p-7f865669.entry.js +4 -0
- package/dist/ionic/{p-1c36d604.entry.js → p-8ce6d551.entry.js} +1 -1
- package/dist/ionic/{p-1033ab54.system.entry.js → p-9074a84e.system.entry.js} +1 -1
- package/dist/ionic/p-b0ccd173.system.entry.js +4 -0
- package/dist/ionic/{p-2707ca8e.system.entry.js → p-b13b7128.system.entry.js} +1 -1
- package/dist/ionic/{p-a8886f90.entry.js → p-b1ecb683.entry.js} +1 -1
- package/dist/ionic/{p-45aca628.system.js → p-b278184d.system.js} +1 -1
- package/dist/ionic/p-c711b464.entry.js +4 -0
- package/dist/ionic/{p-4c040c1a.system.js → p-cf52f8a2.system.js} +1 -1
- package/dist/ionic/{p-f6d06830.system.entry.js → p-cf88a096.system.entry.js} +1 -1
- package/dist/ionic/p-d899b844.js +4 -0
- package/dist/ionic/{p-8ac5c948.js → p-dbfa5f42.js} +1 -1
- package/dist/ionic/{p-e4ff048f.system.entry.js → p-de0e21c6.system.entry.js} +1 -1
- package/dist/ionic/{p-f12d1787.entry.js → p-e447e552.entry.js} +1 -1
- package/dist/ionic/{p-578895f6.system.entry.js → p-ef269a56.system.entry.js} +1 -1
- package/dist/types/utils/hardware-back-button.d.ts +1 -1
- package/hydrate/index.js +64 -22
- package/package.json +1 -1
- package/dist/esm-es5/hardware-back-button-adcc28d5.js +0 -4
- package/dist/esm-es5/overlays-74ac012a.js +0 -4
- package/dist/ionic/p-6e7d3ff4.system.entry.js +0 -4
- package/dist/ionic/p-768c2327.system.entry.js +0 -4
- package/dist/ionic/p-bbfdc923.js +0 -4
- package/dist/ionic/p-d3a149d6.system.js +0 -4
- package/dist/ionic/p-d72473cc.entry.js +0 -4
- package/dist/ionic/p-e54e332c.entry.js +0 -4
|
@@ -16,7 +16,7 @@ import { c as config } from './ionic-global.js';
|
|
|
16
16
|
* moment this file is evaluated which could be
|
|
17
17
|
* before the config is set.
|
|
18
18
|
*/
|
|
19
|
-
const
|
|
19
|
+
const shouldUseCloseWatcher = () => config.get('experimentalCloseWatcher', false) && win !== undefined && 'CloseWatcher' in win;
|
|
20
20
|
/**
|
|
21
21
|
* When hardwareBackButton: false in config,
|
|
22
22
|
* we need to make sure we also block the default
|
|
@@ -86,7 +86,7 @@ const startHardwareBackButton = () => {
|
|
|
86
86
|
* backbutton event otherwise we may get duplicate
|
|
87
87
|
* events firing.
|
|
88
88
|
*/
|
|
89
|
-
if (
|
|
89
|
+
if (shouldUseCloseWatcher()) {
|
|
90
90
|
let watcher;
|
|
91
91
|
const configureWatcher = () => {
|
|
92
92
|
watcher === null || watcher === void 0 ? void 0 : watcher.destroy();
|
|
@@ -112,4 +112,4 @@ const startHardwareBackButton = () => {
|
|
|
112
112
|
const OVERLAY_BACK_BUTTON_PRIORITY = 100;
|
|
113
113
|
const MENU_BACK_BUTTON_PRIORITY = 99; // 1 less than overlay priority since menu is displayed behind overlays
|
|
114
114
|
|
|
115
|
-
export { MENU_BACK_BUTTON_PRIORITY, OVERLAY_BACK_BUTTON_PRIORITY, blockHardwareBackButton,
|
|
115
|
+
export { MENU_BACK_BUTTON_PRIORITY, OVERLAY_BACK_BUTTON_PRIORITY, blockHardwareBackButton, shouldUseCloseWatcher, startHardwareBackButton };
|
package/components/ion-app.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { proxyCustomElement, HTMLElement, Build, h, Host } from '@stencil/core/internal/client';
|
|
5
|
-
import {
|
|
5
|
+
import { shouldUseCloseWatcher } from './hardware-back-button.js';
|
|
6
6
|
import { p as printIonWarning } from './index6.js';
|
|
7
7
|
import { b as getIonMode, c as config, a as isPlatform } from './ionic-global.js';
|
|
8
8
|
|
|
@@ -33,7 +33,7 @@ const App = /*@__PURE__*/ proxyCustomElement(class App extends HTMLElement {
|
|
|
33
33
|
import('./input-shims.js').then((module) => module.startInputShims(config, platform));
|
|
34
34
|
}
|
|
35
35
|
const hardwareBackButtonModule = await import('./hardware-back-button.js');
|
|
36
|
-
const supportsHardwareBackButtonEvents = isHybrid ||
|
|
36
|
+
const supportsHardwareBackButtonEvents = isHybrid || shouldUseCloseWatcher();
|
|
37
37
|
if (config.getBoolean('hardwareBackButton', supportsHardwareBackButtonEvents)) {
|
|
38
38
|
hardwareBackButtonModule.startHardwareBackButton();
|
|
39
39
|
}
|
|
@@ -42,7 +42,7 @@ const App = /*@__PURE__*/ proxyCustomElement(class App extends HTMLElement {
|
|
|
42
42
|
* If an app sets hardwareBackButton: false and experimentalCloseWatcher: true
|
|
43
43
|
* then the close watcher will not be used.
|
|
44
44
|
*/
|
|
45
|
-
if (
|
|
45
|
+
if (shouldUseCloseWatcher()) {
|
|
46
46
|
printIonWarning('experimentalCloseWatcher was set to `true`, but hardwareBackButton was set to `false`. Both config options must be `true` for the Close Watcher API to be used.');
|
|
47
47
|
}
|
|
48
48
|
hardwareBackButtonModule.blockHardwareBackButton();
|
|
@@ -71,7 +71,7 @@ const App = /*@__PURE__*/ proxyCustomElement(class App extends HTMLElement {
|
|
|
71
71
|
}
|
|
72
72
|
render() {
|
|
73
73
|
const mode = getIonMode(this);
|
|
74
|
-
return (h(Host, { key: '
|
|
74
|
+
return (h(Host, { key: '0ac01df6d90d8185017e1f8e8f02cdf407e6c94b', class: {
|
|
75
75
|
[mode]: true,
|
|
76
76
|
'ion-page': true,
|
|
77
77
|
'force-statusbar-padding': config.getBoolean('_forceStatusbarPadding'),
|
package/components/ion-menu.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { proxyCustomElement, HTMLElement, createEvent, Build, h, Host } from '@stencil/core/internal/client';
|
|
5
5
|
import { g as getTimeGivenProgression } from './cubic-bezier.js';
|
|
6
6
|
import { G as GESTURE_CONTROLLER } from './gesture-controller.js';
|
|
7
|
-
import {
|
|
7
|
+
import { shouldUseCloseWatcher } from './hardware-back-button.js';
|
|
8
8
|
import { o as isEndSide, i as inheritAriaAttributes, p as assert, m as clamp } from './helpers.js';
|
|
9
9
|
import { m as menuController } from './index4.js';
|
|
10
10
|
import { o as getPresentedOverlay } from './overlays.js';
|
|
@@ -612,13 +612,13 @@ const Menu = /*@__PURE__*/ proxyCustomElement(class Menu extends HTMLElement {
|
|
|
612
612
|
* the ionBackButton listener in the menu controller
|
|
613
613
|
* will handle closing the menu when Escape is pressed.
|
|
614
614
|
*/
|
|
615
|
-
return (h(Host, { key: '
|
|
615
|
+
return (h(Host, { key: 'c6bf01fd87e31cda09c0c35900cb01ea19d61781', onKeyDown: shouldUseCloseWatcher() ? null : this.onKeydown, role: "navigation", "aria-label": inheritedAttributes['aria-label'] || 'menu', class: {
|
|
616
616
|
[mode]: true,
|
|
617
617
|
[`menu-type-${type}`]: true,
|
|
618
618
|
'menu-enabled': !disabled,
|
|
619
619
|
[`menu-side-${side}`]: true,
|
|
620
620
|
'menu-pane-visible': isPaneVisible,
|
|
621
|
-
} }, h("div", { key: '
|
|
621
|
+
} }, h("div", { key: '6d818a470a74c11c10554d45d8586436a51f961e', class: "menu-inner", part: "container", ref: (el) => (this.menuInnerEl = el) }, h("slot", { key: '3512e444ec6c6bf2a719b1dd713be9a7652f77c9' })), h("ion-backdrop", { key: '618a5316462406fa47929e4dcd5a8e8c9057a418', ref: (el) => (this.backdropEl = el), class: "menu-backdrop", tappable: false, stopPropagation: false, part: "backdrop" })));
|
|
622
622
|
}
|
|
623
623
|
get el() { return this; }
|
|
624
624
|
static get watchers() { return {
|
package/components/overlays.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { d as doc } from './index5.js';
|
|
5
|
-
import { OVERLAY_BACK_BUTTON_PRIORITY,
|
|
5
|
+
import { OVERLAY_BACK_BUTTON_PRIORITY, shouldUseCloseWatcher } from './hardware-back-button.js';
|
|
6
6
|
import { b as getIonMode, c as config } from './ionic-global.js';
|
|
7
7
|
import { C as CoreDelegate } from './framework-delegate.js';
|
|
8
8
|
import { c as componentOnReady, f as focusVisibleElement, a as addEventListener, b as removeEventListener, g as getElementRoot } from './helpers.js';
|
|
@@ -364,7 +364,7 @@ const connectListeners = (doc) => {
|
|
|
364
364
|
* this behavior will be handled via the ionBackButton
|
|
365
365
|
* event.
|
|
366
366
|
*/
|
|
367
|
-
if (!
|
|
367
|
+
if (!shouldUseCloseWatcher()) {
|
|
368
368
|
doc.addEventListener('keydown', (ev) => {
|
|
369
369
|
if (ev.key === 'Escape') {
|
|
370
370
|
const lastOverlay = getPresentedOverlay(doc);
|
|
@@ -454,15 +454,7 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
454
454
|
return;
|
|
455
455
|
}
|
|
456
456
|
setRootAriaHidden(true);
|
|
457
|
-
|
|
458
|
-
* Hide all other overlays from screen readers so only this one
|
|
459
|
-
* can be read. Note that presenting an overlay always makes
|
|
460
|
-
* it the topmost one.
|
|
461
|
-
*/
|
|
462
|
-
if (doc !== undefined) {
|
|
463
|
-
const presentedOverlays = getPresentedOverlays(doc);
|
|
464
|
-
presentedOverlays.forEach((o) => o.setAttribute('aria-hidden', 'true'));
|
|
465
|
-
}
|
|
457
|
+
hideOverlaysFromScreenReaders(overlay.el);
|
|
466
458
|
overlay.presented = true;
|
|
467
459
|
overlay.willPresent.emit();
|
|
468
460
|
(_a = overlay.willPresentShorthand) === null || _a === void 0 ? void 0 : _a.emit();
|
|
@@ -555,7 +547,7 @@ const restoreElementFocus = async (overlayEl) => {
|
|
|
555
547
|
}
|
|
556
548
|
};
|
|
557
549
|
const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnimation, opts) => {
|
|
558
|
-
var _a, _b
|
|
550
|
+
var _a, _b;
|
|
559
551
|
if (!overlay.presented) {
|
|
560
552
|
return false;
|
|
561
553
|
}
|
|
@@ -606,13 +598,7 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
|
|
|
606
598
|
console.error(err);
|
|
607
599
|
}
|
|
608
600
|
overlay.el.remove();
|
|
609
|
-
|
|
610
|
-
* If there are other overlays presented, unhide the new
|
|
611
|
-
* topmost one from screen readers.
|
|
612
|
-
*/
|
|
613
|
-
if (doc !== undefined) {
|
|
614
|
-
(_c = getPresentedOverlay(doc)) === null || _c === void 0 ? void 0 : _c.removeAttribute('aria-hidden');
|
|
615
|
-
}
|
|
601
|
+
revealOverlaysToScreenReaders();
|
|
616
602
|
return true;
|
|
617
603
|
};
|
|
618
604
|
const getAppRoot = (doc) => {
|
|
@@ -808,5 +794,61 @@ const createTriggerController = () => {
|
|
|
808
794
|
removeClickListener,
|
|
809
795
|
};
|
|
810
796
|
};
|
|
797
|
+
/**
|
|
798
|
+
* Ensure that underlying overlays have aria-hidden if necessary so that screen readers
|
|
799
|
+
* cannot move focus to these elements. Note that we cannot rely on focus/focusin/focusout
|
|
800
|
+
* events here because those events do not fire when the screen readers moves to a non-focusable
|
|
801
|
+
* element such as text.
|
|
802
|
+
* Without this logic screen readers would be able to move focus outside of the top focus-trapped overlay.
|
|
803
|
+
*
|
|
804
|
+
* @param newTopMostOverlay - The overlay that is being presented. Since the overlay has not been
|
|
805
|
+
* fully presented yet at the time this function is called it will not be included in the getPresentedOverlays result.
|
|
806
|
+
*/
|
|
807
|
+
const hideOverlaysFromScreenReaders = (newTopMostOverlay) => {
|
|
808
|
+
var _a;
|
|
809
|
+
if (doc === undefined)
|
|
810
|
+
return;
|
|
811
|
+
const overlays = getPresentedOverlays(doc);
|
|
812
|
+
for (let i = overlays.length - 1; i >= 0; i--) {
|
|
813
|
+
const presentedOverlay = overlays[i];
|
|
814
|
+
const nextPresentedOverlay = (_a = overlays[i + 1]) !== null && _a !== void 0 ? _a : newTopMostOverlay;
|
|
815
|
+
/**
|
|
816
|
+
* If next overlay has aria-hidden then all remaining overlays will have it too.
|
|
817
|
+
* Or, if the next overlay is a Toast that does not have aria-hidden then current overlay
|
|
818
|
+
* should not have aria-hidden either so focus can remain in the current overlay.
|
|
819
|
+
*/
|
|
820
|
+
if (nextPresentedOverlay.hasAttribute('aria-hidden') || nextPresentedOverlay.tagName !== 'ION-TOAST') {
|
|
821
|
+
presentedOverlay.setAttribute('aria-hidden', 'true');
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
};
|
|
825
|
+
/**
|
|
826
|
+
* When dismissing an overlay we need to reveal the new top-most overlay to screen readers.
|
|
827
|
+
* If the top-most overlay is a Toast we potentially need to reveal more overlays since
|
|
828
|
+
* focus is never automatically moved to the Toast.
|
|
829
|
+
*/
|
|
830
|
+
const revealOverlaysToScreenReaders = () => {
|
|
831
|
+
if (doc === undefined)
|
|
832
|
+
return;
|
|
833
|
+
const overlays = getPresentedOverlays(doc);
|
|
834
|
+
for (let i = overlays.length - 1; i >= 0; i--) {
|
|
835
|
+
const currentOverlay = overlays[i];
|
|
836
|
+
/**
|
|
837
|
+
* If the current we are looking at is a Toast then we can remove aria-hidden.
|
|
838
|
+
* However, we potentially need to keep looking at the overlay stack because there
|
|
839
|
+
* could be more Toasts underneath. Additionally, we need to unhide the closest non-Toast
|
|
840
|
+
* overlay too so focus can move there since focus is never automatically moved to the Toast.
|
|
841
|
+
*/
|
|
842
|
+
currentOverlay.removeAttribute('aria-hidden');
|
|
843
|
+
/**
|
|
844
|
+
* If we found a non-Toast element then we can just remove aria-hidden and stop searching entirely
|
|
845
|
+
* since this overlay should always receive focus. As a result, all underlying overlays should still
|
|
846
|
+
* be hidden from screen readers.
|
|
847
|
+
*/
|
|
848
|
+
if (currentOverlay.tagName !== 'ION-TOAST') {
|
|
849
|
+
break;
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
};
|
|
811
853
|
|
|
812
854
|
export { BACKDROP as B, GESTURE as G, OVERLAY_GESTURE_PRIORITY as O, alertController as a, actionSheetController as b, popoverController as c, createDelegateController as d, createTriggerController as e, present as f, dismiss as g, eventMethod as h, isCancel as i, prepareOverlay as j, setOverlayId as k, loadingController as l, modalController as m, focusFirstDescendant as n, getPresentedOverlay as o, pickerController as p, safeCall as s, toastController as t };
|
|
@@ -19,7 +19,7 @@ require('./index-c42c9063.js');
|
|
|
19
19
|
* moment this file is evaluated which could be
|
|
20
20
|
* before the config is set.
|
|
21
21
|
*/
|
|
22
|
-
const
|
|
22
|
+
const shouldUseCloseWatcher = () => ionicGlobal.config.get('experimentalCloseWatcher', false) && index.win !== undefined && 'CloseWatcher' in index.win;
|
|
23
23
|
/**
|
|
24
24
|
* When hardwareBackButton: false in config,
|
|
25
25
|
* we need to make sure we also block the default
|
|
@@ -89,7 +89,7 @@ const startHardwareBackButton = () => {
|
|
|
89
89
|
* backbutton event otherwise we may get duplicate
|
|
90
90
|
* events firing.
|
|
91
91
|
*/
|
|
92
|
-
if (
|
|
92
|
+
if (shouldUseCloseWatcher()) {
|
|
93
93
|
let watcher;
|
|
94
94
|
const configureWatcher = () => {
|
|
95
95
|
watcher === null || watcher === void 0 ? void 0 : watcher.destroy();
|
|
@@ -118,5 +118,5 @@ const MENU_BACK_BUTTON_PRIORITY = 99; // 1 less than overlay priority since menu
|
|
|
118
118
|
exports.MENU_BACK_BUTTON_PRIORITY = MENU_BACK_BUTTON_PRIORITY;
|
|
119
119
|
exports.OVERLAY_BACK_BUTTON_PRIORITY = OVERLAY_BACK_BUTTON_PRIORITY;
|
|
120
120
|
exports.blockHardwareBackButton = blockHardwareBackButton;
|
|
121
|
-
exports.
|
|
121
|
+
exports.shouldUseCloseWatcher = shouldUseCloseWatcher;
|
|
122
122
|
exports.startHardwareBackButton = startHardwareBackButton;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
6
|
const index$1 = require('./index-c8d52405.js');
|
|
7
|
-
const hardwareBackButton = require('./hardware-back-button-
|
|
7
|
+
const hardwareBackButton = require('./hardware-back-button-b84c0758.js');
|
|
8
8
|
const index = require('./index-5915f9b3.js');
|
|
9
9
|
const helpers = require('./helpers-da4c0ed1.js');
|
|
10
10
|
const ionicGlobal = require('./ionic-global-34d0d04a.js');
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -15,12 +15,12 @@ const ionicGlobal = require('./ionic-global-34d0d04a.js');
|
|
|
15
15
|
const helpers = require('./helpers-da4c0ed1.js');
|
|
16
16
|
const config = require('./config-4f60b98a.js');
|
|
17
17
|
const theme = require('./theme-d1c573d2.js');
|
|
18
|
-
const index$2 = require('./index-
|
|
19
|
-
const overlays = require('./overlays-
|
|
18
|
+
const index$2 = require('./index-676a122f.js');
|
|
19
|
+
const overlays = require('./overlays-d32575f9.js');
|
|
20
20
|
require('./index-c8d52405.js');
|
|
21
21
|
require('./index-c42c9063.js');
|
|
22
22
|
require('./gesture-controller-c40c045a.js');
|
|
23
|
-
require('./hardware-back-button-
|
|
23
|
+
require('./hardware-back-button-b84c0758.js');
|
|
24
24
|
require('./index-5915f9b3.js');
|
|
25
25
|
require('./framework-delegate-e0e13baa.js');
|
|
26
26
|
|
|
@@ -9,7 +9,7 @@ const index = require('./index-c42c9063.js');
|
|
|
9
9
|
const buttonActive = require('./button-active-e74be007.js');
|
|
10
10
|
const helpers = require('./helpers-da4c0ed1.js');
|
|
11
11
|
const lockController = require('./lock-controller-6585a42a.js');
|
|
12
|
-
const overlays = require('./overlays-
|
|
12
|
+
const overlays = require('./overlays-d32575f9.js');
|
|
13
13
|
const theme = require('./theme-d1c573d2.js');
|
|
14
14
|
const ionicGlobal = require('./ionic-global-34d0d04a.js');
|
|
15
15
|
const animation = require('./animation-c2840aea.js');
|
|
@@ -18,7 +18,7 @@ require('./capacitor-c04564bf.js');
|
|
|
18
18
|
require('./index-c8d52405.js');
|
|
19
19
|
require('./index-d1b59ffa.js');
|
|
20
20
|
require('./gesture-controller-c40c045a.js');
|
|
21
|
-
require('./hardware-back-button-
|
|
21
|
+
require('./hardware-back-button-b84c0758.js');
|
|
22
22
|
require('./framework-delegate-e0e13baa.js');
|
|
23
23
|
require('./index-5915f9b3.js');
|
|
24
24
|
|
|
@@ -10,7 +10,7 @@ const config = require('./config-4f60b98a.js');
|
|
|
10
10
|
const buttonActive = require('./button-active-e74be007.js');
|
|
11
11
|
const helpers = require('./helpers-da4c0ed1.js');
|
|
12
12
|
const lockController = require('./lock-controller-6585a42a.js');
|
|
13
|
-
const overlays = require('./overlays-
|
|
13
|
+
const overlays = require('./overlays-d32575f9.js');
|
|
14
14
|
const theme = require('./theme-d1c573d2.js');
|
|
15
15
|
const ionicGlobal = require('./ionic-global-34d0d04a.js');
|
|
16
16
|
const animation = require('./animation-c2840aea.js');
|
|
@@ -19,7 +19,7 @@ require('./capacitor-c04564bf.js');
|
|
|
19
19
|
require('./index-c8d52405.js');
|
|
20
20
|
require('./index-d1b59ffa.js');
|
|
21
21
|
require('./gesture-controller-c40c045a.js');
|
|
22
|
-
require('./hardware-back-button-
|
|
22
|
+
require('./hardware-back-button-b84c0758.js');
|
|
23
23
|
require('./framework-delegate-e0e13baa.js');
|
|
24
24
|
require('./index-5915f9b3.js');
|
|
25
25
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
const index = require('./index-c42c9063.js');
|
|
9
|
-
const hardwareBackButton = require('./hardware-back-button-
|
|
9
|
+
const hardwareBackButton = require('./hardware-back-button-b84c0758.js');
|
|
10
10
|
const index$1 = require('./index-5915f9b3.js');
|
|
11
11
|
const ionicGlobal = require('./ionic-global-34d0d04a.js');
|
|
12
12
|
const helpers = require('./helpers-da4c0ed1.js');
|
|
@@ -47,8 +47,8 @@ const App = class {
|
|
|
47
47
|
const platform = ionicGlobal.isPlatform(window, 'ios') ? 'ios' : 'android';
|
|
48
48
|
Promise.resolve().then(function () { return require('./input-shims-a9a85bb9.js'); }).then((module) => module.startInputShims(ionicGlobal.config, platform));
|
|
49
49
|
}
|
|
50
|
-
const hardwareBackButtonModule = await Promise.resolve().then(function () { return require('./hardware-back-button-
|
|
51
|
-
const supportsHardwareBackButtonEvents = isHybrid || hardwareBackButton.
|
|
50
|
+
const hardwareBackButtonModule = await Promise.resolve().then(function () { return require('./hardware-back-button-b84c0758.js'); });
|
|
51
|
+
const supportsHardwareBackButtonEvents = isHybrid || hardwareBackButton.shouldUseCloseWatcher();
|
|
52
52
|
if (ionicGlobal.config.getBoolean('hardwareBackButton', supportsHardwareBackButtonEvents)) {
|
|
53
53
|
hardwareBackButtonModule.startHardwareBackButton();
|
|
54
54
|
}
|
|
@@ -57,7 +57,7 @@ const App = class {
|
|
|
57
57
|
* If an app sets hardwareBackButton: false and experimentalCloseWatcher: true
|
|
58
58
|
* then the close watcher will not be used.
|
|
59
59
|
*/
|
|
60
|
-
if (hardwareBackButton.
|
|
60
|
+
if (hardwareBackButton.shouldUseCloseWatcher()) {
|
|
61
61
|
index$1.printIonWarning('experimentalCloseWatcher was set to `true`, but hardwareBackButton was set to `false`. Both config options must be `true` for the Close Watcher API to be used.');
|
|
62
62
|
}
|
|
63
63
|
hardwareBackButtonModule.blockHardwareBackButton();
|
|
@@ -86,7 +86,7 @@ const App = class {
|
|
|
86
86
|
}
|
|
87
87
|
render() {
|
|
88
88
|
const mode = ionicGlobal.getIonMode(this);
|
|
89
|
-
return (index.h(index.Host, { key: '
|
|
89
|
+
return (index.h(index.Host, { key: '0ac01df6d90d8185017e1f8e8f02cdf407e6c94b', class: {
|
|
90
90
|
[mode]: true,
|
|
91
91
|
'ion-page': true,
|
|
92
92
|
'force-statusbar-padding': ionicGlobal.config.getBoolean('_forceStatusbarPadding'),
|
|
@@ -15,11 +15,11 @@ const index$2 = require('./index-f52c6d38.js');
|
|
|
15
15
|
const ionicGlobal = require('./ionic-global-34d0d04a.js');
|
|
16
16
|
const data = require('./data-a5109f09.js');
|
|
17
17
|
const lockController = require('./lock-controller-6585a42a.js');
|
|
18
|
-
const overlays = require('./overlays-
|
|
18
|
+
const overlays = require('./overlays-d32575f9.js');
|
|
19
19
|
const animation = require('./animation-c2840aea.js');
|
|
20
20
|
const haptic = require('./haptic-b882e0bb.js');
|
|
21
21
|
require('./index-c8d52405.js');
|
|
22
|
-
require('./hardware-back-button-
|
|
22
|
+
require('./hardware-back-button-b84c0758.js');
|
|
23
23
|
require('./framework-delegate-e0e13baa.js');
|
|
24
24
|
require('./capacitor-c04564bf.js');
|
|
25
25
|
|
|
@@ -9,12 +9,12 @@ const index = require('./index-c42c9063.js');
|
|
|
9
9
|
const config = require('./config-4f60b98a.js');
|
|
10
10
|
const helpers = require('./helpers-da4c0ed1.js');
|
|
11
11
|
const lockController = require('./lock-controller-6585a42a.js');
|
|
12
|
-
const overlays = require('./overlays-
|
|
12
|
+
const overlays = require('./overlays-d32575f9.js');
|
|
13
13
|
const theme = require('./theme-d1c573d2.js');
|
|
14
14
|
const ionicGlobal = require('./ionic-global-34d0d04a.js');
|
|
15
15
|
const animation = require('./animation-c2840aea.js');
|
|
16
16
|
require('./index-c8d52405.js');
|
|
17
|
-
require('./hardware-back-button-
|
|
17
|
+
require('./hardware-back-button-b84c0758.js');
|
|
18
18
|
require('./framework-delegate-e0e13baa.js');
|
|
19
19
|
require('./index-5915f9b3.js');
|
|
20
20
|
|
|
@@ -8,10 +8,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
8
8
|
const index = require('./index-c42c9063.js');
|
|
9
9
|
const cubicBezier = require('./cubic-bezier-f2dccc53.js');
|
|
10
10
|
const gestureController = require('./gesture-controller-c40c045a.js');
|
|
11
|
-
const hardwareBackButton = require('./hardware-back-button-
|
|
11
|
+
const hardwareBackButton = require('./hardware-back-button-b84c0758.js');
|
|
12
12
|
const helpers = require('./helpers-da4c0ed1.js');
|
|
13
|
-
const index$1 = require('./index-
|
|
14
|
-
const overlays = require('./overlays-
|
|
13
|
+
const index$1 = require('./index-676a122f.js');
|
|
14
|
+
const overlays = require('./overlays-d32575f9.js');
|
|
15
15
|
const ionicGlobal = require('./ionic-global-34d0d04a.js');
|
|
16
16
|
const theme = require('./theme-d1c573d2.js');
|
|
17
17
|
const index$2 = require('./index-f52c6d38.js');
|
|
@@ -616,13 +616,13 @@ const Menu = class {
|
|
|
616
616
|
* the ionBackButton listener in the menu controller
|
|
617
617
|
* will handle closing the menu when Escape is pressed.
|
|
618
618
|
*/
|
|
619
|
-
return (index.h(index.Host, { key: '
|
|
619
|
+
return (index.h(index.Host, { key: 'c6bf01fd87e31cda09c0c35900cb01ea19d61781', onKeyDown: hardwareBackButton.shouldUseCloseWatcher() ? null : this.onKeydown, role: "navigation", "aria-label": inheritedAttributes['aria-label'] || 'menu', class: {
|
|
620
620
|
[mode]: true,
|
|
621
621
|
[`menu-type-${type}`]: true,
|
|
622
622
|
'menu-enabled': !disabled,
|
|
623
623
|
[`menu-side-${side}`]: true,
|
|
624
624
|
'menu-pane-visible': isPaneVisible,
|
|
625
|
-
} }, index.h("div", { key: '
|
|
625
|
+
} }, index.h("div", { key: '6d818a470a74c11c10554d45d8586436a51f961e', class: "menu-inner", part: "container", ref: (el) => (this.menuInnerEl = el) }, index.h("slot", { key: '3512e444ec6c6bf2a719b1dd713be9a7652f77c9' })), index.h("ion-backdrop", { key: '618a5316462406fa47929e4dcd5a8e8c9057a418', ref: (el) => (this.backdropEl = el), class: "menu-backdrop", tappable: false, stopPropagation: false, part: "backdrop" })));
|
|
626
626
|
}
|
|
627
627
|
get el() { return index.getElement(this); }
|
|
628
628
|
static get watchers() { return {
|
|
@@ -12,7 +12,7 @@ const helpers = require('./helpers-da4c0ed1.js');
|
|
|
12
12
|
const lockController = require('./lock-controller-6585a42a.js');
|
|
13
13
|
const index$4 = require('./index-5915f9b3.js');
|
|
14
14
|
const capacitor = require('./capacitor-c04564bf.js');
|
|
15
|
-
const overlays = require('./overlays-
|
|
15
|
+
const overlays = require('./overlays-d32575f9.js');
|
|
16
16
|
const theme = require('./theme-d1c573d2.js');
|
|
17
17
|
const index$5 = require('./index-ccddf5be.js');
|
|
18
18
|
const ionicGlobal = require('./ionic-global-34d0d04a.js');
|
|
@@ -21,7 +21,7 @@ const animation = require('./animation-c2840aea.js');
|
|
|
21
21
|
const cubicBezier = require('./cubic-bezier-f2dccc53.js');
|
|
22
22
|
const index$1 = require('./index-d1b59ffa.js');
|
|
23
23
|
const index = require('./index-c8d52405.js');
|
|
24
|
-
require('./hardware-back-button-
|
|
24
|
+
require('./hardware-back-button-b84c0758.js');
|
|
25
25
|
require('./keyboard-0272231f.js');
|
|
26
26
|
require('./gesture-controller-c40c045a.js');
|
|
27
27
|
|
|
@@ -10,13 +10,13 @@ const frameworkDelegate = require('./framework-delegate-e0e13baa.js');
|
|
|
10
10
|
const helpers = require('./helpers-da4c0ed1.js');
|
|
11
11
|
const lockController = require('./lock-controller-6585a42a.js');
|
|
12
12
|
const index$1 = require('./index-5915f9b3.js');
|
|
13
|
-
const overlays = require('./overlays-
|
|
13
|
+
const overlays = require('./overlays-d32575f9.js');
|
|
14
14
|
const ionicGlobal = require('./ionic-global-34d0d04a.js');
|
|
15
15
|
const theme = require('./theme-d1c573d2.js');
|
|
16
16
|
const index$2 = require('./index-ccddf5be.js');
|
|
17
17
|
const animation = require('./animation-c2840aea.js');
|
|
18
18
|
require('./index-c8d52405.js');
|
|
19
|
-
require('./hardware-back-button-
|
|
19
|
+
require('./hardware-back-button-b84c0758.js');
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Returns the dimensions of the popover
|
|
@@ -11,14 +11,14 @@ const notchController = require('./notch-controller-bfbcbb7a.js');
|
|
|
11
11
|
const compareWithUtils = require('./compare-with-utils-df1001d7.js');
|
|
12
12
|
const helpers = require('./helpers-da4c0ed1.js');
|
|
13
13
|
const index$1 = require('./index-5915f9b3.js');
|
|
14
|
-
const overlays = require('./overlays-
|
|
14
|
+
const overlays = require('./overlays-d32575f9.js');
|
|
15
15
|
const dir = require('./dir-94c21456.js');
|
|
16
16
|
const theme = require('./theme-d1c573d2.js');
|
|
17
17
|
const watchOptions = require('./watch-options-f5f3e158.js');
|
|
18
18
|
const index$2 = require('./index-f52c6d38.js');
|
|
19
19
|
const ionicGlobal = require('./ionic-global-34d0d04a.js');
|
|
20
20
|
require('./index-c8d52405.js');
|
|
21
|
-
require('./hardware-back-button-
|
|
21
|
+
require('./hardware-back-button-b84c0758.js');
|
|
22
22
|
require('./framework-delegate-e0e13baa.js');
|
|
23
23
|
|
|
24
24
|
const selectIosCss = ":host{--padding-top:0px;--padding-end:0px;--padding-bottom:0px;--padding-start:0px;--placeholder-color:currentColor;--placeholder-opacity:0.6;--background:transparent;--border-style:solid;--highlight-color-focused:var(--ion-color-primary, #3880ff);--highlight-color-valid:var(--ion-color-success, #2dd36f);--highlight-color-invalid:var(--ion-color-danger, #eb445a);--highlight-color:var(--highlight-color-focused);display:block;position:relative;font-family:var(--ion-font-family, inherit);white-space:nowrap;cursor:pointer;z-index:2}:host(:not(.legacy-select)){width:100%;min-height:44px}:host(.select-label-placement-floating),:host(.select-label-placement-stacked){min-height:56px}:host(.ion-color){--highlight-color-focused:var(--ion-color-base)}:host(.legacy-select){-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;overflow:hidden}:host(.in-item:not(.legacy-select)){-ms-flex:1 1 0px;flex:1 1 0}:host(.in-item.legacy-select){position:static;max-width:45%}:host(.select-disabled){pointer-events:none}:host(.ion-focused) button{border:2px solid #5e9ed6}:host([slot=start]:not(.legacy-select)),:host([slot=end]:not(.legacy-select)){width:auto}.select-placeholder{color:var(--placeholder-color);opacity:var(--placeholder-opacity)}:host(.legacy-select) label{top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0}@supports (inset-inline-start: 0){:host(.legacy-select) label{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host(.legacy-select) label{left:0}:host-context([dir=rtl]):host(.legacy-select) label,:host-context([dir=rtl]).legacy-select label{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(.legacy-select:dir(rtl)) label{left:unset;right:unset;right:0}}}:host(.legacy-select) label::-moz-focus-inner{border:0}button{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.select-icon{-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:0;margin-inline-end:0;margin-top:0;margin-bottom:0;position:relative;-ms-flex-negative:0;flex-shrink:0}:host(.in-item-color) .select-icon{color:inherit}:host(.select-label-placement-stacked) .select-icon,:host(.select-label-placement-floating) .select-icon{position:absolute;height:100%}:host(.select-ltr.select-label-placement-stacked) .select-icon,:host(.select-ltr.select-label-placement-floating) .select-icon{right:var(--padding-end, 0)}:host(.select-rtl.select-label-placement-stacked) .select-icon,:host(.select-rtl.select-label-placement-floating) .select-icon{left:var(--padding-start, 0)}.select-text{-ms-flex:1;flex:1;min-width:16px;font-size:inherit;text-overflow:ellipsis;white-space:inherit;overflow:hidden}.select-wrapper{-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);border-radius:var(--border-radius);display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;height:inherit;min-height:inherit;-webkit-transition:background-color 15ms linear;transition:background-color 15ms linear;background:var(--background);line-height:normal;cursor:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.select-wrapper .select-placeholder{-webkit-transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.select-wrapper-inner{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;overflow:hidden}:host(.select-label-placement-stacked) .select-wrapper-inner,:host(.select-label-placement-floating) .select-wrapper-inner{-ms-flex-positive:1;flex-grow:1}:host(.ion-touched.ion-invalid){--highlight-color:var(--highlight-color-invalid)}:host(.ion-valid){--highlight-color:var(--highlight-color-valid)}.label-text-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;max-width:200px;-webkit-transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);pointer-events:none}.label-text,::slotted([slot=label]){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.label-text-wrapper-hidden,.select-outline-notch-hidden{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);overflow:hidden}:host(.select-justify-space-between) .select-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.select-justify-start) .select-wrapper{-ms-flex-pack:start;justify-content:start}:host(.select-justify-end) .select-wrapper{-ms-flex-pack:end;justify-content:end}:host(.select-label-placement-start) .select-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.select-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:0;margin-bottom:0}:host(.select-label-placement-end) .select-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.select-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0;margin-top:0;margin-bottom:0}:host(.select-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:0;margin-bottom:0}:host(.select-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.select-label-placement-stacked) .select-wrapper,:host(.select-label-placement-floating) .select-wrapper{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:start}:host(.select-label-placement-stacked) .label-text-wrapper,:host(.select-label-placement-floating) .label-text-wrapper{max-width:100%}:host(.select-ltr.select-label-placement-stacked) .label-text-wrapper,:host(.select-ltr.select-label-placement-floating) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host(.select-rtl.select-label-placement-stacked) .label-text-wrapper,:host(.select-rtl.select-label-placement-floating) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}:host(.select-label-placement-stacked) .native-wrapper,:host(.select-label-placement-floating) .native-wrapper{margin-left:0;margin-right:0;margin-top:1px;margin-bottom:0;-ms-flex-positive:1;flex-grow:1;width:100%}:host(.select-label-placement-floating) .label-text-wrapper{-webkit-transform:translateY(100%) scale(1);transform:translateY(100%) scale(1)}:host(.select-label-placement-floating:not(.label-floating)) .native-wrapper .select-placeholder{opacity:0}:host(.select-expanded.select-label-placement-floating) .native-wrapper .select-placeholder,:host(.ion-focused.select-label-placement-floating) .native-wrapper .select-placeholder,:host(.has-value.select-label-placement-floating) .native-wrapper .select-placeholder{opacity:1}:host(.label-floating) .label-text-wrapper{-webkit-transform:translateY(50%) scale(0.75);transform:translateY(50%) scale(0.75);max-width:calc(100% / 0.75)}::slotted([slot=start]),::slotted([slot=end]){-ms-flex-negative:0;flex-shrink:0}::slotted([slot=start]){-webkit-margin-end:16px;margin-inline-end:16px;-webkit-margin-start:0;margin-inline-start:0}::slotted([slot=end]){-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.legacy-select){--padding-top:10px;--padding-end:8px;--padding-bottom:10px;--padding-start:16px}.select-icon{width:1.125rem;height:1.125rem;color:var(--ion-color-step-650, #595959)}:host(.select-label-placement-stacked) .select-wrapper-inner,:host(.select-label-placement-floating) .select-wrapper-inner{width:calc(100% - 1.125rem - 4px)}:host(.select-disabled){opacity:0.3}::slotted(ion-button[slot=start].button-has-icon-only),::slotted(ion-button[slot=end].button-has-icon-only){--border-radius:50%;--padding-start:0;--padding-end:0;--padding-top:0;--padding-bottom:0;aspect-ratio:1}";
|
|
@@ -10,13 +10,13 @@ const config = require('./config-4f60b98a.js');
|
|
|
10
10
|
const helpers = require('./helpers-da4c0ed1.js');
|
|
11
11
|
const lockController = require('./lock-controller-6585a42a.js');
|
|
12
12
|
const index$1 = require('./index-5915f9b3.js');
|
|
13
|
-
const overlays = require('./overlays-
|
|
13
|
+
const overlays = require('./overlays-d32575f9.js');
|
|
14
14
|
const theme = require('./theme-d1c573d2.js');
|
|
15
15
|
const ionicGlobal = require('./ionic-global-34d0d04a.js');
|
|
16
16
|
const animation = require('./animation-c2840aea.js');
|
|
17
17
|
const index = require('./index-c8d52405.js');
|
|
18
18
|
const index$2 = require('./index-d1b59ffa.js');
|
|
19
|
-
require('./hardware-back-button-
|
|
19
|
+
require('./hardware-back-button-b84c0758.js');
|
|
20
20
|
require('./framework-delegate-e0e13baa.js');
|
|
21
21
|
require('./gesture-controller-c40c045a.js');
|
|
22
22
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
6
|
const index = require('./index-c8d52405.js');
|
|
7
|
-
const hardwareBackButton = require('./hardware-back-button-
|
|
7
|
+
const hardwareBackButton = require('./hardware-back-button-b84c0758.js');
|
|
8
8
|
const ionicGlobal = require('./ionic-global-34d0d04a.js');
|
|
9
9
|
const frameworkDelegate = require('./framework-delegate-e0e13baa.js');
|
|
10
10
|
const helpers = require('./helpers-da4c0ed1.js');
|
|
@@ -366,7 +366,7 @@ const connectListeners = (doc) => {
|
|
|
366
366
|
* this behavior will be handled via the ionBackButton
|
|
367
367
|
* event.
|
|
368
368
|
*/
|
|
369
|
-
if (!hardwareBackButton.
|
|
369
|
+
if (!hardwareBackButton.shouldUseCloseWatcher()) {
|
|
370
370
|
doc.addEventListener('keydown', (ev) => {
|
|
371
371
|
if (ev.key === 'Escape') {
|
|
372
372
|
const lastOverlay = getPresentedOverlay(doc);
|
|
@@ -456,15 +456,7 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
456
456
|
return;
|
|
457
457
|
}
|
|
458
458
|
setRootAriaHidden(true);
|
|
459
|
-
|
|
460
|
-
* Hide all other overlays from screen readers so only this one
|
|
461
|
-
* can be read. Note that presenting an overlay always makes
|
|
462
|
-
* it the topmost one.
|
|
463
|
-
*/
|
|
464
|
-
if (index.doc !== undefined) {
|
|
465
|
-
const presentedOverlays = getPresentedOverlays(index.doc);
|
|
466
|
-
presentedOverlays.forEach((o) => o.setAttribute('aria-hidden', 'true'));
|
|
467
|
-
}
|
|
459
|
+
hideOverlaysFromScreenReaders(overlay.el);
|
|
468
460
|
overlay.presented = true;
|
|
469
461
|
overlay.willPresent.emit();
|
|
470
462
|
(_a = overlay.willPresentShorthand) === null || _a === void 0 ? void 0 : _a.emit();
|
|
@@ -557,7 +549,7 @@ const restoreElementFocus = async (overlayEl) => {
|
|
|
557
549
|
}
|
|
558
550
|
};
|
|
559
551
|
const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnimation, opts) => {
|
|
560
|
-
var _a, _b
|
|
552
|
+
var _a, _b;
|
|
561
553
|
if (!overlay.presented) {
|
|
562
554
|
return false;
|
|
563
555
|
}
|
|
@@ -608,13 +600,7 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
|
|
|
608
600
|
console.error(err);
|
|
609
601
|
}
|
|
610
602
|
overlay.el.remove();
|
|
611
|
-
|
|
612
|
-
* If there are other overlays presented, unhide the new
|
|
613
|
-
* topmost one from screen readers.
|
|
614
|
-
*/
|
|
615
|
-
if (index.doc !== undefined) {
|
|
616
|
-
(_c = getPresentedOverlay(index.doc)) === null || _c === void 0 ? void 0 : _c.removeAttribute('aria-hidden');
|
|
617
|
-
}
|
|
603
|
+
revealOverlaysToScreenReaders();
|
|
618
604
|
return true;
|
|
619
605
|
};
|
|
620
606
|
const getAppRoot = (doc) => {
|
|
@@ -810,6 +796,62 @@ const createTriggerController = () => {
|
|
|
810
796
|
removeClickListener,
|
|
811
797
|
};
|
|
812
798
|
};
|
|
799
|
+
/**
|
|
800
|
+
* Ensure that underlying overlays have aria-hidden if necessary so that screen readers
|
|
801
|
+
* cannot move focus to these elements. Note that we cannot rely on focus/focusin/focusout
|
|
802
|
+
* events here because those events do not fire when the screen readers moves to a non-focusable
|
|
803
|
+
* element such as text.
|
|
804
|
+
* Without this logic screen readers would be able to move focus outside of the top focus-trapped overlay.
|
|
805
|
+
*
|
|
806
|
+
* @param newTopMostOverlay - The overlay that is being presented. Since the overlay has not been
|
|
807
|
+
* fully presented yet at the time this function is called it will not be included in the getPresentedOverlays result.
|
|
808
|
+
*/
|
|
809
|
+
const hideOverlaysFromScreenReaders = (newTopMostOverlay) => {
|
|
810
|
+
var _a;
|
|
811
|
+
if (index.doc === undefined)
|
|
812
|
+
return;
|
|
813
|
+
const overlays = getPresentedOverlays(index.doc);
|
|
814
|
+
for (let i = overlays.length - 1; i >= 0; i--) {
|
|
815
|
+
const presentedOverlay = overlays[i];
|
|
816
|
+
const nextPresentedOverlay = (_a = overlays[i + 1]) !== null && _a !== void 0 ? _a : newTopMostOverlay;
|
|
817
|
+
/**
|
|
818
|
+
* If next overlay has aria-hidden then all remaining overlays will have it too.
|
|
819
|
+
* Or, if the next overlay is a Toast that does not have aria-hidden then current overlay
|
|
820
|
+
* should not have aria-hidden either so focus can remain in the current overlay.
|
|
821
|
+
*/
|
|
822
|
+
if (nextPresentedOverlay.hasAttribute('aria-hidden') || nextPresentedOverlay.tagName !== 'ION-TOAST') {
|
|
823
|
+
presentedOverlay.setAttribute('aria-hidden', 'true');
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
};
|
|
827
|
+
/**
|
|
828
|
+
* When dismissing an overlay we need to reveal the new top-most overlay to screen readers.
|
|
829
|
+
* If the top-most overlay is a Toast we potentially need to reveal more overlays since
|
|
830
|
+
* focus is never automatically moved to the Toast.
|
|
831
|
+
*/
|
|
832
|
+
const revealOverlaysToScreenReaders = () => {
|
|
833
|
+
if (index.doc === undefined)
|
|
834
|
+
return;
|
|
835
|
+
const overlays = getPresentedOverlays(index.doc);
|
|
836
|
+
for (let i = overlays.length - 1; i >= 0; i--) {
|
|
837
|
+
const currentOverlay = overlays[i];
|
|
838
|
+
/**
|
|
839
|
+
* If the current we are looking at is a Toast then we can remove aria-hidden.
|
|
840
|
+
* However, we potentially need to keep looking at the overlay stack because there
|
|
841
|
+
* could be more Toasts underneath. Additionally, we need to unhide the closest non-Toast
|
|
842
|
+
* overlay too so focus can move there since focus is never automatically moved to the Toast.
|
|
843
|
+
*/
|
|
844
|
+
currentOverlay.removeAttribute('aria-hidden');
|
|
845
|
+
/**
|
|
846
|
+
* If we found a non-Toast element then we can just remove aria-hidden and stop searching entirely
|
|
847
|
+
* since this overlay should always receive focus. As a result, all underlying overlays should still
|
|
848
|
+
* be hidden from screen readers.
|
|
849
|
+
*/
|
|
850
|
+
if (currentOverlay.tagName !== 'ION-TOAST') {
|
|
851
|
+
break;
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
};
|
|
813
855
|
|
|
814
856
|
exports.BACKDROP = BACKDROP;
|
|
815
857
|
exports.GESTURE = GESTURE;
|