@ionic/core 8.7.4-dev.11756465095.1387c832 → 8.7.4-dev.11756888693.1b2f4d4a
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-datetime.js +3 -4
- package/components/ion-menu.js +2 -5
- package/components/overlays.js +109 -18
- package/components/picker-column-option.js +4 -4
- package/components/picker-column.js +39 -3
- package/components/select-modal.js +1 -1
- 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 +4 -4
- package/dist/cjs/ion-loading.cjs.entry.js +1 -1
- package/dist/cjs/ion-menu_3.cjs.entry.js +3 -6
- package/dist/cjs/ion-modal.cjs.entry.js +1 -1
- package/dist/cjs/ion-picker-column-option.cjs.entry.js +4 -4
- package/dist/cjs/ion-picker-column.cjs.entry.js +39 -3
- package/dist/cjs/ion-popover.cjs.entry.js +1 -1
- package/dist/cjs/ion-select-modal.cjs.entry.js +2 -2
- package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-toast.cjs.entry.js +1 -1
- package/dist/cjs/{overlays-Di-PotkY.js → overlays-cmlYi6Sc.js} +108 -17
- package/dist/collection/components/datetime/datetime.js +3 -4
- package/dist/collection/components/menu/menu.js +2 -9
- package/dist/collection/components/picker-column/picker-column.js +39 -3
- package/dist/collection/components/picker-column-option/picker-column-option.ios.css +2 -2
- package/dist/collection/components/picker-column-option/picker-column-option.js +1 -1
- package/dist/collection/components/picker-column-option/picker-column-option.md.css +2 -2
- package/dist/collection/components/select-modal/select-modal.ionic.css +4 -0
- package/dist/collection/utils/overlays.js +109 -17
- package/dist/docs.json +1 -5
- 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 +4 -4
- package/dist/esm/ion-loading.entry.js +1 -1
- package/dist/esm/ion-menu_3.entry.js +3 -6
- package/dist/esm/ion-modal.entry.js +1 -1
- package/dist/esm/ion-picker-column-option.entry.js +4 -4
- package/dist/esm/ion-picker-column.entry.js +39 -3
- package/dist/esm/ion-popover.entry.js +1 -1
- package/dist/esm/ion-select-modal.entry.js +2 -2
- package/dist/esm/ion-select_3.entry.js +1 -1
- package/dist/esm/ion-toast.entry.js +1 -1
- package/dist/esm/{overlays-B1-bMbOY.js → overlays-e6TpXUJS.js} +109 -18
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-f0e88837.entry.js → p-0cffd1bf.entry.js} +1 -1
- package/dist/ionic/{p-fcba862e.entry.js → p-1fd86237.entry.js} +1 -1
- package/dist/ionic/{p-db20a452.entry.js → p-34198a78.entry.js} +1 -1
- package/dist/ionic/p-417569b5.entry.js +4 -0
- package/dist/ionic/p-45b08f61.entry.js +4 -0
- package/dist/ionic/p-63b6f13f.entry.js +4 -0
- package/dist/ionic/p-80de7b65.entry.js +4 -0
- package/dist/ionic/{p-00239ebc.entry.js → p-9d9584bd.entry.js} +1 -1
- package/dist/ionic/p-9f1d66d0.entry.js +4 -0
- package/dist/ionic/p-DkI7cEUN.js +4 -0
- package/dist/ionic/{p-c847a353.entry.js → p-bfad272a.entry.js} +1 -1
- package/dist/ionic/{p-361408bb.entry.js → p-d45f502a.entry.js} +1 -1
- package/dist/ionic/{p-3b1c39cf.entry.js → p-f116e723.entry.js} +1 -1
- package/dist/types/components/picker-column/picker-column.d.ts +7 -0
- package/hydrate/index.js +157 -33
- package/hydrate/index.mjs +157 -33
- package/package.json +2 -2
- package/dist/ionic/p-47b803fc.entry.js +0 -4
- package/dist/ionic/p-66b83d63.entry.js +0 -4
- package/dist/ionic/p-9e575e4e.entry.js +0 -4
- package/dist/ionic/p-CKq50gmC.js +0 -4
- package/dist/ionic/p-a953afe2.entry.js +0 -4
- package/dist/ionic/p-f4d11cbb.entry.js +0 -4
package/dist/esm/index.js
CHANGED
|
@@ -13,7 +13,7 @@ export { L as LogLevel } from './index-4DxY6_gG.js';
|
|
|
13
13
|
export { I as IonicSafeString, g as getMode, s as setupConfig } from './config-Dx_6wPIJ.js';
|
|
14
14
|
export { o as openURL } from './theme-DiVJyqlX.js';
|
|
15
15
|
export { m as menuController } from './index-BwfAv3fK.js';
|
|
16
|
-
export { b as actionSheetController, a as alertController, l as loadingController, m as modalController, p as pickerController, c as popoverController, t as toastController } from './overlays-
|
|
16
|
+
export { b as actionSheetController, a as alertController, l as loadingController, m as modalController, p as pickerController, c as popoverController, t as toastController } from './overlays-e6TpXUJS.js';
|
|
17
17
|
import './gesture-controller-BTEOs1at.js';
|
|
18
18
|
import './focus-visible-vXpMhGrs.js';
|
|
19
19
|
import './framework-delegate-C3AU0AA6.js';
|
|
@@ -5,7 +5,7 @@ import { r as registerInstance, c as createEvent, a as readTask, h, d as Host, g
|
|
|
5
5
|
import { c as createButtonActiveGesture } from './button-active-BMINdWv6.js';
|
|
6
6
|
import { r as raf } from './helpers-CKng-4WP.js';
|
|
7
7
|
import { c as createLockController } from './lock-controller-B-hirT0v.js';
|
|
8
|
-
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, f as present, g as dismiss, h as eventMethod, s as safeCall, j as prepareOverlay, k as setOverlayId } from './overlays-
|
|
8
|
+
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, f as present, g as dismiss, h as eventMethod, s as safeCall, j as prepareOverlay, k as setOverlayId } from './overlays-e6TpXUJS.js';
|
|
9
9
|
import { g as getClassMap } from './theme-DiVJyqlX.js';
|
|
10
10
|
import { b as getIonMode, c as getIonTheme } from './ionic-global-Dtd5Ma5B.js';
|
|
11
11
|
import { c as createAnimation } from './animation-DPqVg3gl.js';
|
|
@@ -6,7 +6,7 @@ import { E as ENABLE_HTML_CONTENT_DEFAULT, a as sanitizeDOMString } from './conf
|
|
|
6
6
|
import { c as createButtonActiveGesture } from './button-active-BMINdWv6.js';
|
|
7
7
|
import { r as raf } from './helpers-CKng-4WP.js';
|
|
8
8
|
import { c as createLockController } from './lock-controller-B-hirT0v.js';
|
|
9
|
-
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall } from './overlays-
|
|
9
|
+
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall } from './overlays-e6TpXUJS.js';
|
|
10
10
|
import { g as getClassMap } from './theme-DiVJyqlX.js';
|
|
11
11
|
import { b as getIonMode, c as getIonTheme } from './ionic-global-Dtd5Ma5B.js';
|
|
12
12
|
import { c as createAnimation } from './animation-DPqVg3gl.js';
|
|
@@ -6,13 +6,13 @@ import { c as caretLeftSvg } from './caret-left-fIOYmaqA.js';
|
|
|
6
6
|
import { c as caretRightSvg } from './caret-right-BYSs-jZz.js';
|
|
7
7
|
import { startFocusVisible } from './focus-visible-vXpMhGrs.js';
|
|
8
8
|
import { r as raf, g as getElementRoot, a as renderHiddenInput, e as clamp } from './helpers-CKng-4WP.js';
|
|
9
|
-
import { F as FOCUS_TRAP_DISABLE_CLASS, d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall } from './overlays-B1-bMbOY.js';
|
|
10
9
|
import { i as isRTL } from './dir-C53feagD.js';
|
|
11
10
|
import { c as createColorClasses, g as getClassMap } from './theme-DiVJyqlX.js';
|
|
12
11
|
import { o as chevronForward, c as chevronBack, p as caretDownSharp, q as caretUpSharp, l as chevronDown } from './index-COG0_eom.js';
|
|
13
12
|
import { b as getIonMode, c as getIonTheme } from './ionic-global-Dtd5Ma5B.js';
|
|
14
13
|
import { i as isBefore, a as isAfter, g as getPreviousMonth, b as getNextMonth, c as isSameDay, d as getDay, e as generateDayAriaLabel, v as validateParts, f as getPartsFromCalendarDay, h as getNextYear, j as getPreviousYear, k as getEndOfWeek, l as getStartOfWeek, m as getPreviousDay, n as getNextDay, o as getPreviousWeek, p as getNextWeek, q as parseMinParts, r as parseMaxParts, s as parseDate, w as warnIfValueOutOfBounds, t as parseAmPm, u as clampDate, x as convertToArrayOfNumbers, y as convertDataToISO, z as getToday, A as getClosestValidDate, B as generateMonths, C as getNumDaysInMonth, D as getCombinedDateColumnData, E as getMonthColumnData, F as getDayColumnData, G as getYearColumnData, H as isMonthFirstLocale, I as getTimeColumnsData, J as isLocaleDayPeriodRTL, K as calculateHourFromAMPM, L as getDaysOfWeek, M as getMonthAndYear, N as getDaysOfMonth, O as getHourCycle, P as getLocalizedTime, Q as getLocalizedDateTime, R as formatValue } from './data-slRmoEWk.js';
|
|
15
14
|
import { c as createLockController } from './lock-controller-B-hirT0v.js';
|
|
15
|
+
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall } from './overlays-e6TpXUJS.js';
|
|
16
16
|
import { c as createAnimation } from './animation-DPqVg3gl.js';
|
|
17
17
|
import { a as hapticSelectionChanged, h as hapticSelectionEnd, b as hapticSelectionStart } from './haptic-BWDWI-Xh.js';
|
|
18
18
|
import './framework-delegate-C3AU0AA6.js';
|
|
@@ -1303,7 +1303,7 @@ const Datetime = class {
|
|
|
1303
1303
|
const renderArray = forcePresentation === 'time-date'
|
|
1304
1304
|
? [this.renderTimePickerColumns(forcePresentation), this.renderDatePickerColumns(forcePresentation)]
|
|
1305
1305
|
: [this.renderDatePickerColumns(forcePresentation), this.renderTimePickerColumns(forcePresentation)];
|
|
1306
|
-
return h("ion-picker",
|
|
1306
|
+
return h("ion-picker", null, renderArray);
|
|
1307
1307
|
}
|
|
1308
1308
|
renderDatePickerColumns(forcePresentation) {
|
|
1309
1309
|
return forcePresentation === 'date-time' || forcePresentation === 'time-date'
|
|
@@ -1930,7 +1930,7 @@ const Datetime = class {
|
|
|
1930
1930
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
1931
1931
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
1932
1932
|
renderHiddenInput(true, el, name, formatValue(value), disabled);
|
|
1933
|
-
return (h(Host, { key: '
|
|
1933
|
+
return (h(Host, { key: '40f8732998d123ef5c700080cc423bb8310654d5', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
|
|
1934
1934
|
[theme]: true,
|
|
1935
1935
|
['datetime-readonly']: readonly,
|
|
1936
1936
|
['datetime-disabled']: disabled,
|
|
@@ -1940,7 +1940,7 @@ const Datetime = class {
|
|
|
1940
1940
|
[`datetime-size-${size}`]: true,
|
|
1941
1941
|
[`datetime-prefer-wheel`]: hasWheelVariant,
|
|
1942
1942
|
[`datetime-grid`]: isGridStyle,
|
|
1943
|
-
})) }, h("div", { key: '
|
|
1943
|
+
})) }, h("div", { key: '0a323aa4e3cd9c96495d0dc3bf7985c8723f5e8c', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(theme)));
|
|
1944
1944
|
}
|
|
1945
1945
|
get el() { return getElement(this); }
|
|
1946
1946
|
static get watchers() { return {
|
|
@@ -5,7 +5,7 @@ import { r as registerInstance, c as createEvent, e as config, h, d as Host, g a
|
|
|
5
5
|
import { E as ENABLE_HTML_CONTENT_DEFAULT, a as sanitizeDOMString } from './config-Dx_6wPIJ.js';
|
|
6
6
|
import { r as raf } from './helpers-CKng-4WP.js';
|
|
7
7
|
import { c as createLockController } from './lock-controller-B-hirT0v.js';
|
|
8
|
-
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod } from './overlays-
|
|
8
|
+
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod } from './overlays-e6TpXUJS.js';
|
|
9
9
|
import { g as getClassMap } from './theme-DiVJyqlX.js';
|
|
10
10
|
import { c as getIonTheme } from './ionic-global-Dtd5Ma5B.js';
|
|
11
11
|
import { c as createAnimation } from './animation-DPqVg3gl.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, c as createEvent, e as config, j as printIonError, h, d as Host, g as getElement } from './index-4DxY6_gG.js';
|
|
5
5
|
import { g as getTimeGivenProgression } from './cubic-bezier-hHmYLOfE.js';
|
|
6
|
-
import { o as getPresentedOverlay, B as BACKDROP, n as focusFirstDescendant, q as focusLastDescendant, G as GESTURE } from './overlays-
|
|
6
|
+
import { o as getPresentedOverlay, B as BACKDROP, n as focusFirstDescendant, q as focusLastDescendant, G as GESTURE } from './overlays-e6TpXUJS.js';
|
|
7
7
|
import { G as GESTURE_CONTROLLER } from './gesture-controller-BTEOs1at.js';
|
|
8
8
|
import { b as getIonMode, a as isPlatform, c as getIonTheme, s as shouldUseCloseWatcher } from './ionic-global-Dtd5Ma5B.js';
|
|
9
9
|
import { o as isEndSide, i as inheritAriaAttributes, l as assert, e as clamp } from './helpers-CKng-4WP.js';
|
|
@@ -299,9 +299,6 @@ const Menu = class {
|
|
|
299
299
|
* @param role The role of the element that is closing the menu.
|
|
300
300
|
*/
|
|
301
301
|
setOpen(shouldOpen, animated = true, role) {
|
|
302
|
-
var _a;
|
|
303
|
-
// Blur the active element to prevent it from being kept focused inside an element that will be set with aria-hidden="true"
|
|
304
|
-
(_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.blur();
|
|
305
302
|
return menuController._setOpen(this, shouldOpen, animated, role);
|
|
306
303
|
}
|
|
307
304
|
trapKeyboardFocus(ev, doc) {
|
|
@@ -664,14 +661,14 @@ const Menu = class {
|
|
|
664
661
|
* the ionBackButton listener in the menu controller
|
|
665
662
|
* will handle closing the menu when Escape is pressed.
|
|
666
663
|
*/
|
|
667
|
-
return (h(Host, { key: '
|
|
664
|
+
return (h(Host, { key: 'b0e4627dc1a53c796913d3da9b7575f0d69086d0', onKeyDown: shouldUseCloseWatcher() ? null : this.onKeydown, role: "navigation", "aria-label": inheritedAttributes['aria-label'] || 'menu', class: {
|
|
668
665
|
[theme]: true,
|
|
669
666
|
[`menu-type-${type}`]: true,
|
|
670
667
|
'menu-enabled': !disabled,
|
|
671
668
|
[`menu-side-${side}`]: true,
|
|
672
669
|
'menu-pane-visible': isPaneVisible,
|
|
673
670
|
'split-pane-side': hostContext('ion-split-pane', el),
|
|
674
|
-
} }, h("div", { key: '
|
|
671
|
+
} }, h("div", { key: '6733a5a84b2bcb8f52fb2bac1c286ab5ac1a9321', class: "menu-inner", part: "container", ref: (el) => (this.menuInnerEl = el) }, h("slot", { key: 'a527ba8092d9eb1ee570f3bdd47c6d4d35cd4dfd' })), h("ion-backdrop", { key: '693c82c16d5110cc08eb651309d092a848329cc1', ref: (el) => (this.backdropEl = el), class: "menu-backdrop", tappable: false, stopPropagation: false, part: "backdrop" })));
|
|
675
672
|
}
|
|
676
673
|
get el() { return getElement(this); }
|
|
677
674
|
static get watchers() { return {
|
|
@@ -7,7 +7,7 @@ import { C as CoreDelegate, a as attachComponent, d as detachComponent } from '.
|
|
|
7
7
|
import { e as clamp, g as getElementRoot, r as raf, b as inheritAttributes, h as hasLazyBuild } from './helpers-CKng-4WP.js';
|
|
8
8
|
import { c as createLockController } from './lock-controller-B-hirT0v.js';
|
|
9
9
|
import { g as getCapacitor } from './capacitor--DL1MVFW.js';
|
|
10
|
-
import { G as GESTURE, O as OVERLAY_GESTURE_PRIORITY, F as FOCUS_TRAP_DISABLE_CLASS, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod } from './overlays-
|
|
10
|
+
import { G as GESTURE, O as OVERLAY_GESTURE_PRIORITY, F as FOCUS_TRAP_DISABLE_CLASS, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod } from './overlays-e6TpXUJS.js';
|
|
11
11
|
import { g as getClassMap } from './theme-DiVJyqlX.js';
|
|
12
12
|
import { e as deepReady, w as waitForMount } from './index-DLYqkEhn.js';
|
|
13
13
|
import { w as win, b as getIonMode, c as getIonTheme } from './ionic-global-Dtd5Ma5B.js';
|
|
@@ -7,11 +7,11 @@ import { c as createColorClasses } from './theme-DiVJyqlX.js';
|
|
|
7
7
|
import { c as getIonTheme } from './ionic-global-Dtd5Ma5B.js';
|
|
8
8
|
import './focus-visible-vXpMhGrs.js';
|
|
9
9
|
|
|
10
|
-
const ionicPickerColumnOptionMdCss = "
|
|
10
|
+
const ionicPickerColumnOptionMdCss = "button{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;width:100%;height:34px;border:0px;outline:none;background:transparent;color:inherit;font-family:var(--ion-font-family, inherit);font-size:inherit;line-height:34px;text-align:inherit;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;overflow:hidden}:host(.option-disabled){opacity:0.4}:host(.option-disabled) button{cursor:default}:host(.option-active){color:var(--ion-color-base)}";
|
|
11
11
|
|
|
12
|
-
const pickerColumnOptionIosCss = "
|
|
12
|
+
const pickerColumnOptionIosCss = "button{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;width:100%;height:34px;border:0px;outline:none;background:transparent;color:inherit;font-family:var(--ion-font-family, inherit);font-size:inherit;line-height:34px;text-align:inherit;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;overflow:hidden}:host(.option-disabled){opacity:0.4}:host(.option-disabled) button{cursor:default}";
|
|
13
13
|
|
|
14
|
-
const pickerColumnOptionMdCss = "
|
|
14
|
+
const pickerColumnOptionMdCss = "button{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;width:100%;height:34px;border:0px;outline:none;background:transparent;color:inherit;font-family:var(--ion-font-family, inherit);font-size:inherit;line-height:34px;text-align:inherit;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;overflow:hidden}:host(.option-disabled){opacity:0.4}:host(.option-disabled) button{cursor:default}:host(.option-active){color:var(--ion-color-base)}";
|
|
15
15
|
|
|
16
16
|
const PickerColumnOption = class {
|
|
17
17
|
constructor(hostRef) {
|
|
@@ -103,7 +103,7 @@ const PickerColumnOption = class {
|
|
|
103
103
|
return (h(Host, { key: '9ceebae71b6df0b01f36691d82d716f6756625d9', class: createColorClasses(color, {
|
|
104
104
|
[theme]: true,
|
|
105
105
|
['option-disabled']: disabled,
|
|
106
|
-
}) }, h("
|
|
106
|
+
}) }, h("button", { key: 'f6b973f486688a74a08b60c09ab41b640e49db6b', tabindex: "-1", "aria-label": ariaLabel, disabled: disabled, onClick: () => this.onClick() }, h("slot", { key: 'ff9607efb6a87c60c9421c32c81612e4650c6862' }))));
|
|
107
107
|
}
|
|
108
108
|
get el() { return getElement(this); }
|
|
109
109
|
static get watchers() { return {
|
|
@@ -408,6 +408,23 @@ const PickerColumn = class {
|
|
|
408
408
|
var _a;
|
|
409
409
|
return el ? (_a = el.getAttribute('aria-label')) !== null && _a !== void 0 ? _a : el.innerText : '';
|
|
410
410
|
};
|
|
411
|
+
/**
|
|
412
|
+
* Render an element that overlays the column. This element is for assistive
|
|
413
|
+
* tech to allow users to navigate the column up/down. This element should receive
|
|
414
|
+
* focus as it listens for synthesized keyboard events as required by the
|
|
415
|
+
* slider role: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/slider_role
|
|
416
|
+
*/
|
|
417
|
+
this.renderAssistiveFocusable = () => {
|
|
418
|
+
const { activeItem } = this;
|
|
419
|
+
const valueText = this.getOptionValueText(activeItem);
|
|
420
|
+
/**
|
|
421
|
+
* When using the picker, the valuetext provides important context that valuenow
|
|
422
|
+
* does not. Additionally, using non-zero valuemin/valuemax values can cause
|
|
423
|
+
* WebKit to incorrectly announce numeric valuetext values (such as a year
|
|
424
|
+
* like "2024") as percentages: https://bugs.webkit.org/show_bug.cgi?id=273126
|
|
425
|
+
*/
|
|
426
|
+
return (h("div", { ref: (el) => (this.assistiveFocusable = el), class: "assistive-focusable", role: "slider", tabindex: this.disabled ? undefined : 0, "aria-label": this.ariaLabel, "aria-valuemin": 0, "aria-valuemax": 0, "aria-valuenow": 0, "aria-valuetext": valueText, "aria-orientation": "vertical", onKeyDown: (ev) => this.onKeyDown(ev) }));
|
|
427
|
+
};
|
|
411
428
|
}
|
|
412
429
|
ariaLabelChanged(newValue) {
|
|
413
430
|
this.ariaLabel = newValue;
|
|
@@ -548,14 +565,33 @@ const PickerColumn = class {
|
|
|
548
565
|
render() {
|
|
549
566
|
const { color, disabled, isActive, numericInput } = this;
|
|
550
567
|
const theme = getIonTheme(this);
|
|
551
|
-
return (h(Host, { key: '
|
|
568
|
+
return (h(Host, { key: '03736b14a79aaadec0f7bdac8b61584bd87ccad0', class: createColorClasses(color, {
|
|
552
569
|
[theme]: true,
|
|
553
570
|
['picker-column-active']: isActive,
|
|
554
571
|
['picker-column-numeric-input']: numericInput,
|
|
555
572
|
['picker-column-disabled']: disabled,
|
|
556
|
-
}) }, h("slot", { key: '
|
|
573
|
+
}) }, this.renderAssistiveFocusable(), h("slot", { key: '68c982ebabe6549bda8473b5e75fe1a2a5bfac02', name: "prefix" }), h("div", { key: '9347af6d92c2743262627f0e22cd2ab6e36697fa', "aria-hidden": "true", class: "picker-opts", ref: (el) => {
|
|
557
574
|
this.scrollEl = el;
|
|
558
|
-
},
|
|
575
|
+
},
|
|
576
|
+
/**
|
|
577
|
+
* When an element has an overlay scroll style and
|
|
578
|
+
* a fixed height, Firefox will focus the scrollable
|
|
579
|
+
* container if the content exceeds the container's
|
|
580
|
+
* dimensions.
|
|
581
|
+
*
|
|
582
|
+
* This causes keyboard navigation to focus to this
|
|
583
|
+
* element instead of going to the next element in
|
|
584
|
+
* the tab order.
|
|
585
|
+
*
|
|
586
|
+
* The desired behavior is for the user to be able to
|
|
587
|
+
* focus the assistive focusable element and tab to
|
|
588
|
+
* the next element in the tab order. Instead of tabbing
|
|
589
|
+
* to this element.
|
|
590
|
+
*
|
|
591
|
+
* To prevent this, we set the tabIndex to -1. This
|
|
592
|
+
* will match the behavior of the other browsers.
|
|
593
|
+
*/
|
|
594
|
+
tabIndex: -1 }, h("div", { key: '48aa739ea118e6c6c92dd32aa669afc8cbc9bbd9', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: '4c5acf2374d2ad96c3cc0e927023d2ba8615ce4d', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: 'ae5cad7c4deeb08619d4021dfa1f2ba7d0cd9c09', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("slot", { key: '076bb7a8359908369b56ad8021d812fa0d094f5b' }), h("div", { key: '7cf4d0a8d32a9c304fbdb7469c2a5528b91744b9', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: '2c6585e2091abc2b83dc77c419d5a8a4d317f499', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: '2ee73069dede56b1edc0adfd3037ff0f83389c3e', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0")), h("slot", { key: 'f704bf80e0a0c91d0a50114cba974bbb9d7937d1', name: "suffix" })));
|
|
559
595
|
}
|
|
560
596
|
get el() { return getElement(this); }
|
|
561
597
|
static get watchers() { return {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, c as createEvent, f as printIonWarning, h, d as Host, g as getElement } from './index-4DxY6_gG.js';
|
|
5
|
-
import { B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, n as focusFirstDescendant, g as dismiss, h as eventMethod, F as FOCUS_TRAP_DISABLE_CLASS } from './overlays-
|
|
5
|
+
import { B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, n as focusFirstDescendant, g as dismiss, h as eventMethod, F as FOCUS_TRAP_DISABLE_CLASS } from './overlays-e6TpXUJS.js';
|
|
6
6
|
import { C as CoreDelegate, a as attachComponent, d as detachComponent } from './framework-delegate-C3AU0AA6.js';
|
|
7
7
|
import { g as getElementRoot, r as raf, f as addEventListener, h as hasLazyBuild } from './helpers-CKng-4WP.js';
|
|
8
8
|
import { c as createLockController } from './lock-controller-B-hirT0v.js';
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, h, i as forceUpdate, d as Host, g as getElement } from './index-4DxY6_gG.js';
|
|
5
5
|
import { b as getIonMode } from './ionic-global-Dtd5Ma5B.js';
|
|
6
|
-
import { s as safeCall } from './overlays-
|
|
6
|
+
import { s as safeCall } from './overlays-e6TpXUJS.js';
|
|
7
7
|
import { g as getClassMap } from './theme-DiVJyqlX.js';
|
|
8
8
|
import './helpers-CKng-4WP.js';
|
|
9
9
|
import './focus-visible-vXpMhGrs.js';
|
|
10
10
|
import './framework-delegate-C3AU0AA6.js';
|
|
11
11
|
import './gesture-controller-BTEOs1at.js';
|
|
12
12
|
|
|
13
|
-
const selectModalIonicCss = ".sc-ion-select-modal-ionic-h{height:100%}ion-item.sc-ion-select-modal-ionic{--border-width:0}ion-toolbar.sc-ion-select-modal-ionic{font-size:var(--ion-font-size-450, 1.125rem);font-weight:var(--ion-font-weight-medium, 500);letter-spacing:var(--ion-font-letter-spacing-0, 0%);line-height:var(--ion-font-line-height-700, var(--ion-scale-700, 28px));text-decoration:none;text-transform:none}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(container),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~=\"container\"]{display:none}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(label),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~=\"label\"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(label),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~=\"label\"],ion-list.sc-ion-select-modal-ionic ion-checkbox.sc-ion-select-modal-ionic::part(label),ion-list.sc-ion-select-modal-ionic ion-checkbox.sc-ion-select-modal-ionic [part~=\"label\"]{font-size:var(--ion-font-size-400, 1rem);font-weight:var(--ion-font-weight-medium, 500);letter-spacing:var(--ion-font-letter-spacing-0, 0%);line-height:var(--ion-font-line-height-600, var(--ion-scale-600, 24px));text-decoration:none;text-transform:none}.item-radio-checked.sc-ion-select-modal-ionic,.item-checkbox-checked.sc-ion-select-modal-ionic{--background:var(--ion-semantics-primary-100, var(--ion-primitives-blue-100, #f2f4fd));--border-radius:var(--ion-border-radius-400, var(--ion-scale-400, 16px))}ion-content.sc-ion-select-modal-ionic{--padding-start:var(--ion-space-400, var(--ion-scale-400, 16px)) !important;--padding-end:var(--ion-space-400, var(--ion-scale-400, 16px)) !important;--padding-bottom:var(--ion-space-1200, var(--ion-scale-1200, 48px)) !important}";
|
|
13
|
+
const selectModalIonicCss = ".sc-ion-select-modal-ionic-h{height:100%}ion-item.sc-ion-select-modal-ionic{--border-width:0}ion-item.ion-focused.sc-ion-select-modal-ionic::part(native)::after,ion-item.ion-focused.sc-ion-select-modal-ionic [part~=\"native\"]::after{border:none}ion-toolbar.sc-ion-select-modal-ionic{font-size:var(--ion-font-size-450, 1.125rem);font-weight:var(--ion-font-weight-medium, 500);letter-spacing:var(--ion-font-letter-spacing-0, 0%);line-height:var(--ion-font-line-height-700, var(--ion-scale-700, 28px));text-decoration:none;text-transform:none}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(container),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~=\"container\"]{display:none}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(label),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~=\"label\"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(label),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~=\"label\"],ion-list.sc-ion-select-modal-ionic ion-checkbox.sc-ion-select-modal-ionic::part(label),ion-list.sc-ion-select-modal-ionic ion-checkbox.sc-ion-select-modal-ionic [part~=\"label\"]{font-size:var(--ion-font-size-400, 1rem);font-weight:var(--ion-font-weight-medium, 500);letter-spacing:var(--ion-font-letter-spacing-0, 0%);line-height:var(--ion-font-line-height-600, var(--ion-scale-600, 24px));text-decoration:none;text-transform:none}.item-radio-checked.sc-ion-select-modal-ionic,.item-checkbox-checked.sc-ion-select-modal-ionic{--background:var(--ion-semantics-primary-100, var(--ion-primitives-blue-100, #f2f4fd));--border-radius:var(--ion-border-radius-400, var(--ion-scale-400, 16px))}ion-content.sc-ion-select-modal-ionic{--padding-start:var(--ion-space-400, var(--ion-scale-400, 16px)) !important;--padding-end:var(--ion-space-400, var(--ion-scale-400, 16px)) !important;--padding-bottom:var(--ion-space-1200, var(--ion-scale-1200, 48px)) !important}";
|
|
14
14
|
|
|
15
15
|
const selectModalIosCss = ".sc-ion-select-modal-ios-h{height:100%}ion-item.sc-ion-select-modal-ios{--inner-padding-end:0}ion-radio.sc-ion-select-modal-ios::after{bottom:0;position:absolute;width:calc(100% - 0.9375rem - 16px);border-width:0px 0px 0.55px 0px;border-style:solid;border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));content:\"\"}ion-radio.sc-ion-select-modal-ios::after{inset-inline-start:calc(0.9375rem + 16px)}";
|
|
16
16
|
|
|
@@ -6,7 +6,7 @@ import { c as caretDownSvg } from './caret-down-D1t981Ih.js';
|
|
|
6
6
|
import { c as createNotchController } from './notch-controller-BZq2fbxL.js';
|
|
7
7
|
import { i as isOptionSelected, c as compareOptions } from './compare-with-utils-sObYyvOy.js';
|
|
8
8
|
import { b as inheritAttributes, a as renderHiddenInput, n as focusVisibleElement } from './helpers-CKng-4WP.js';
|
|
9
|
-
import { c as popoverController, b as actionSheetController, a as alertController, m as modalController, s as safeCall } from './overlays-
|
|
9
|
+
import { c as popoverController, b as actionSheetController, a as alertController, m as modalController, s as safeCall } from './overlays-e6TpXUJS.js';
|
|
10
10
|
import { i as isRTL } from './dir-C53feagD.js';
|
|
11
11
|
import { h as hostContext, c as createColorClasses, g as getClassMap } from './theme-DiVJyqlX.js';
|
|
12
12
|
import { w as watchForOptions } from './watch-options-Dtdm8lKC.js';
|
|
@@ -5,7 +5,7 @@ import { f as printIonWarning, r as registerInstance, c as createEvent, e as con
|
|
|
5
5
|
import { E as ENABLE_HTML_CONTENT_DEFAULT, a as sanitizeDOMString } from './config-Dx_6wPIJ.js';
|
|
6
6
|
import { g as getElementRoot, r as raf } from './helpers-CKng-4WP.js';
|
|
7
7
|
import { c as createLockController } from './lock-controller-B-hirT0v.js';
|
|
8
|
-
import { O as OVERLAY_GESTURE_PRIORITY, d as createDelegateController, e as createTriggerController, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall, G as GESTURE } from './overlays-
|
|
8
|
+
import { O as OVERLAY_GESTURE_PRIORITY, d as createDelegateController, e as createTriggerController, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall, G as GESTURE } from './overlays-e6TpXUJS.js';
|
|
9
9
|
import { c as createColorClasses, g as getClassMap } from './theme-DiVJyqlX.js';
|
|
10
10
|
import { w as win, b as getIonMode, c as getIonTheme } from './ionic-global-Dtd5Ma5B.js';
|
|
11
11
|
import { c as createAnimation } from './animation-DPqVg3gl.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import { b as getIonMode, d as doc, O as OVERLAY_BACK_BUTTON_PRIORITY, s as shouldUseCloseWatcher } from './ionic-global-Dtd5Ma5B.js';
|
|
4
|
+
import { b as getIonMode, d as doc, a as isPlatform, O as OVERLAY_BACK_BUTTON_PRIORITY, s as shouldUseCloseWatcher } from './ionic-global-Dtd5Ma5B.js';
|
|
5
5
|
import { n as focusVisibleElement, c as componentOnReady, f as addEventListener, m as removeEventListener, g as getElementRoot } from './helpers-CKng-4WP.js';
|
|
6
6
|
import { e as config, j as printIonError, f as printIonWarning } from './index-4DxY6_gG.js';
|
|
7
7
|
import { C as CoreDelegate } from './framework-delegate-C3AU0AA6.js';
|
|
@@ -488,17 +488,15 @@ const getPresentedOverlay = (doc, overlayTag, id) => {
|
|
|
488
488
|
*/
|
|
489
489
|
const setRootAriaHidden = (hidden = false) => {
|
|
490
490
|
const root = getAppRoot(document);
|
|
491
|
-
const viewContainer = root.querySelector('ion-router-outlet, #ion-view-container-root');
|
|
491
|
+
const viewContainer = root.querySelector('ion-router-outlet, ion-nav, #ion-view-container-root');
|
|
492
492
|
if (!viewContainer) {
|
|
493
493
|
return;
|
|
494
494
|
}
|
|
495
495
|
if (hidden) {
|
|
496
496
|
viewContainer.setAttribute('aria-hidden', 'true');
|
|
497
|
-
viewContainer.setAttribute('inert', '');
|
|
498
497
|
}
|
|
499
498
|
else {
|
|
500
499
|
viewContainer.removeAttribute('aria-hidden');
|
|
501
|
-
viewContainer.removeAttribute('inert');
|
|
502
500
|
}
|
|
503
501
|
};
|
|
504
502
|
const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts) => {
|
|
@@ -506,17 +504,6 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
506
504
|
if (overlay.presented) {
|
|
507
505
|
return;
|
|
508
506
|
}
|
|
509
|
-
/**
|
|
510
|
-
* When an overlay that steals focus
|
|
511
|
-
* is dismissed, focus should be returned
|
|
512
|
-
* to the element that was focused
|
|
513
|
-
* prior to the overlay opening. Toast
|
|
514
|
-
* does not steal focus and is excluded
|
|
515
|
-
* from returning focus as a result.
|
|
516
|
-
*/
|
|
517
|
-
if (overlay.el.tagName !== 'ION-TOAST') {
|
|
518
|
-
restoreElementFocus(overlay.el);
|
|
519
|
-
}
|
|
520
507
|
/**
|
|
521
508
|
* Due to accessibility guidelines, toasts do not have
|
|
522
509
|
* focus traps.
|
|
@@ -528,6 +515,8 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
528
515
|
setRootAriaHidden(true);
|
|
529
516
|
document.body.classList.add(BACKDROP_NO_SCROLL);
|
|
530
517
|
}
|
|
518
|
+
hideUnderlyingOverlaysFromScreenReaders(overlay.el);
|
|
519
|
+
hideAnimatingOverlayFromScreenReaders(overlay.el);
|
|
531
520
|
overlay.presented = true;
|
|
532
521
|
overlay.willPresent.emit();
|
|
533
522
|
(_a = overlay.willPresentShorthand) === null || _a === void 0 ? void 0 : _a.emit();
|
|
@@ -541,6 +530,17 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
541
530
|
overlay.didPresent.emit();
|
|
542
531
|
(_b = overlay.didPresentShorthand) === null || _b === void 0 ? void 0 : _b.emit();
|
|
543
532
|
}
|
|
533
|
+
/**
|
|
534
|
+
* When an overlay that steals focus
|
|
535
|
+
* is dismissed, focus should be returned
|
|
536
|
+
* to the element that was focused
|
|
537
|
+
* prior to the overlay opening. Toast
|
|
538
|
+
* does not steal focus and is excluded
|
|
539
|
+
* from returning focus as a result.
|
|
540
|
+
*/
|
|
541
|
+
if (overlay.el.tagName !== 'ION-TOAST') {
|
|
542
|
+
restoreElementFocus(overlay.el);
|
|
543
|
+
}
|
|
544
544
|
/**
|
|
545
545
|
* If the focused element is already
|
|
546
546
|
* inside the overlay component then
|
|
@@ -563,7 +563,6 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
563
563
|
* screen readers.
|
|
564
564
|
*/
|
|
565
565
|
overlay.el.removeAttribute('aria-hidden');
|
|
566
|
-
overlay.el.removeAttribute('inert');
|
|
567
566
|
};
|
|
568
567
|
/**
|
|
569
568
|
* When an overlay component is dismissed,
|
|
@@ -580,8 +579,6 @@ const restoreElementFocus = async (overlayEl) => {
|
|
|
580
579
|
if (!previousElement) {
|
|
581
580
|
return;
|
|
582
581
|
}
|
|
583
|
-
// Ensure active element is blurred to prevent a11y warning issues
|
|
584
|
-
previousElement.blur();
|
|
585
582
|
const shadowRoot = previousElement === null || previousElement === void 0 ? void 0 : previousElement.shadowRoot;
|
|
586
583
|
if (shadowRoot) {
|
|
587
584
|
// If there are no inner focusable elements, just focus the host element.
|
|
@@ -645,6 +642,12 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
|
|
|
645
642
|
}
|
|
646
643
|
overlay.presented = false;
|
|
647
644
|
try {
|
|
645
|
+
/**
|
|
646
|
+
* There is no need to show the overlay to screen readers during
|
|
647
|
+
* the dismiss animation. This is because the overlay will be removed
|
|
648
|
+
* from the DOM after the animation is complete.
|
|
649
|
+
*/
|
|
650
|
+
hideAnimatingOverlayFromScreenReaders(overlay.el);
|
|
648
651
|
// Overlay contents should not be clickable during dismiss
|
|
649
652
|
overlay.el.style.setProperty('pointer-events', 'none');
|
|
650
653
|
overlay.willDismiss.emit({ data, role });
|
|
@@ -683,6 +686,7 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
|
|
|
683
686
|
printIonError(`[${overlay.el.tagName.toLowerCase()}] - `, err);
|
|
684
687
|
}
|
|
685
688
|
overlay.el.remove();
|
|
689
|
+
revealOverlaysToScreenReaders();
|
|
686
690
|
return true;
|
|
687
691
|
};
|
|
688
692
|
const getAppRoot = (doc) => {
|
|
@@ -879,6 +883,93 @@ const createTriggerController = () => {
|
|
|
879
883
|
removeClickListener,
|
|
880
884
|
};
|
|
881
885
|
};
|
|
886
|
+
/**
|
|
887
|
+
* The overlay that is being animated also needs to hide from screen
|
|
888
|
+
* readers during its animation. This ensures that assistive technologies
|
|
889
|
+
* like TalkBack do not announce or interact with the content until the
|
|
890
|
+
* animation is complete, avoiding confusion for users.
|
|
891
|
+
*
|
|
892
|
+
* When the overlay is presented on an Android device, TalkBack's focus rings
|
|
893
|
+
* may appear in the wrong position due to the transition (specifically
|
|
894
|
+
* `transform` styles). This occurs because the focus rings are initially
|
|
895
|
+
* displayed at the starting position of the elements before the transition
|
|
896
|
+
* begins. This workaround ensures the focus rings do not appear in the
|
|
897
|
+
* incorrect location.
|
|
898
|
+
*
|
|
899
|
+
* If this solution is applied to iOS devices, then it leads to a bug where
|
|
900
|
+
* the overlays cannot be accessed by screen readers. This is due to
|
|
901
|
+
* VoiceOver not being able to update the accessibility tree when the
|
|
902
|
+
* `aria-hidden` is removed.
|
|
903
|
+
*
|
|
904
|
+
* @param overlay - The overlay that is being animated.
|
|
905
|
+
*/
|
|
906
|
+
const hideAnimatingOverlayFromScreenReaders = (overlay) => {
|
|
907
|
+
if (doc === undefined)
|
|
908
|
+
return;
|
|
909
|
+
if (isPlatform('android')) {
|
|
910
|
+
/**
|
|
911
|
+
* Once the animation is complete, this attribute will be removed.
|
|
912
|
+
* This is done at the end of the `present` method.
|
|
913
|
+
*/
|
|
914
|
+
overlay.setAttribute('aria-hidden', 'true');
|
|
915
|
+
}
|
|
916
|
+
};
|
|
917
|
+
/**
|
|
918
|
+
* Ensure that underlying overlays have aria-hidden if necessary so that screen readers
|
|
919
|
+
* cannot move focus to these elements. Note that we cannot rely on focus/focusin/focusout
|
|
920
|
+
* events here because those events do not fire when the screen readers moves to a non-focusable
|
|
921
|
+
* element such as text.
|
|
922
|
+
* Without this logic screen readers would be able to move focus outside of the top focus-trapped overlay.
|
|
923
|
+
*
|
|
924
|
+
* @param newTopMostOverlay - The overlay that is being presented. Since the overlay has not been
|
|
925
|
+
* fully presented yet at the time this function is called it will not be included in the getPresentedOverlays result.
|
|
926
|
+
*/
|
|
927
|
+
const hideUnderlyingOverlaysFromScreenReaders = (newTopMostOverlay) => {
|
|
928
|
+
var _a;
|
|
929
|
+
if (doc === undefined)
|
|
930
|
+
return;
|
|
931
|
+
const overlays = getPresentedOverlays(doc);
|
|
932
|
+
for (let i = overlays.length - 1; i >= 0; i--) {
|
|
933
|
+
const presentedOverlay = overlays[i];
|
|
934
|
+
const nextPresentedOverlay = (_a = overlays[i + 1]) !== null && _a !== void 0 ? _a : newTopMostOverlay;
|
|
935
|
+
/**
|
|
936
|
+
* If next overlay has aria-hidden then all remaining overlays will have it too.
|
|
937
|
+
* Or, if the next overlay is a Toast that does not have aria-hidden then current overlay
|
|
938
|
+
* should not have aria-hidden either so focus can remain in the current overlay.
|
|
939
|
+
*/
|
|
940
|
+
if (nextPresentedOverlay.hasAttribute('aria-hidden') || nextPresentedOverlay.tagName !== 'ION-TOAST') {
|
|
941
|
+
presentedOverlay.setAttribute('aria-hidden', 'true');
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
};
|
|
945
|
+
/**
|
|
946
|
+
* When dismissing an overlay we need to reveal the new top-most overlay to screen readers.
|
|
947
|
+
* If the top-most overlay is a Toast we potentially need to reveal more overlays since
|
|
948
|
+
* focus is never automatically moved to the Toast.
|
|
949
|
+
*/
|
|
950
|
+
const revealOverlaysToScreenReaders = () => {
|
|
951
|
+
if (doc === undefined)
|
|
952
|
+
return;
|
|
953
|
+
const overlays = getPresentedOverlays(doc);
|
|
954
|
+
for (let i = overlays.length - 1; i >= 0; i--) {
|
|
955
|
+
const currentOverlay = overlays[i];
|
|
956
|
+
/**
|
|
957
|
+
* If the current we are looking at is a Toast then we can remove aria-hidden.
|
|
958
|
+
* However, we potentially need to keep looking at the overlay stack because there
|
|
959
|
+
* could be more Toasts underneath. Additionally, we need to unhide the closest non-Toast
|
|
960
|
+
* overlay too so focus can move there since focus is never automatically moved to the Toast.
|
|
961
|
+
*/
|
|
962
|
+
currentOverlay.removeAttribute('aria-hidden');
|
|
963
|
+
/**
|
|
964
|
+
* If we found a non-Toast element then we can just remove aria-hidden and stop searching entirely
|
|
965
|
+
* since this overlay should always receive focus. As a result, all underlying overlays should still
|
|
966
|
+
* be hidden from screen readers.
|
|
967
|
+
*/
|
|
968
|
+
if (currentOverlay.tagName !== 'ION-TOAST') {
|
|
969
|
+
break;
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
};
|
|
882
973
|
const FOCUS_TRAP_DISABLE_CLASS = 'ion-disable-focus-trap';
|
|
883
974
|
|
|
884
975
|
export { BACKDROP as B, FOCUS_TRAP_DISABLE_CLASS as F, 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, focusLastDescendant as q, safeCall as s, toastController as t };
|
package/dist/ionic/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
export{c as createAnimation}from"./p-CVVzZviS.js";export{a as LIFECYCLE_DID_ENTER,c as LIFECYCLE_DID_LEAVE,L as LIFECYCLE_WILL_ENTER,b as LIFECYCLE_WILL_LEAVE,d as LIFECYCLE_WILL_UNLOAD,g as getIonPageElement}from"./p-D8VpGXAu.js";export{iosTransitionAnimation}from"./p-DO7doFVM.js";export{mdTransitionAnimation}from"./p-Bh0_z73h.js";export{g as getTimeGivenProgression}from"./p-hHmYLOfE.js";export{createGesture}from"./p-Cl0B-RWe.js";export{g as getPlatforms,i as initialize,a as isPlatform}from"./p-Cdv0TJ6-.js";export{c as componentOnReady}from"./p-DuV7rU9I.js";export{L as LogLevel}from"./p-4DxY6_gG.js";export{I as IonicSafeString,g as getMode,s as setupConfig}from"./p-EnaLTYYj.js";export{o as openURL}from"./p-DiVJyqlX.js";export{m as menuController}from"./p-EG6i47Uw.js";export{b as actionSheetController,a as alertController,l as loadingController,m as modalController,p as pickerController,c as popoverController,t as toastController}from"./p-
|
|
4
|
+
export{c as createAnimation}from"./p-CVVzZviS.js";export{a as LIFECYCLE_DID_ENTER,c as LIFECYCLE_DID_LEAVE,L as LIFECYCLE_WILL_ENTER,b as LIFECYCLE_WILL_LEAVE,d as LIFECYCLE_WILL_UNLOAD,g as getIonPageElement}from"./p-D8VpGXAu.js";export{iosTransitionAnimation}from"./p-DO7doFVM.js";export{mdTransitionAnimation}from"./p-Bh0_z73h.js";export{g as getTimeGivenProgression}from"./p-hHmYLOfE.js";export{createGesture}from"./p-Cl0B-RWe.js";export{g as getPlatforms,i as initialize,a as isPlatform}from"./p-Cdv0TJ6-.js";export{c as componentOnReady}from"./p-DuV7rU9I.js";export{L as LogLevel}from"./p-4DxY6_gG.js";export{I as IonicSafeString,g as getMode,s as setupConfig}from"./p-EnaLTYYj.js";export{o as openURL}from"./p-DiVJyqlX.js";export{m as menuController}from"./p-EG6i47Uw.js";export{b as actionSheetController,a as alertController,l as loadingController,m as modalController,p as pickerController,c as popoverController,t as toastController}from"./p-DkI7cEUN.js";import"./p-BTEOs1at.js";import"./p-vXpMhGrs.js";import"./p-CqYDGaCK.js";const e=e=>{const{swiper:o,extendParams:s}=e,t={effect:void 0,direction:"horizontal",initialSlide:0,loop:!1,parallax:!1,slidesPerView:1,spaceBetween:0,speed:300,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,touchEventsTarget:"container",freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,zoom:{maxRatio:3,minRatio:1,toggle:!1},touchRatio:1,touchAngle:45,simulateTouch:!0,touchStartPreventDefault:!1,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,threshold:0,touchMoveStopPropagation:!0,touchReleaseOnEdges:!1,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold:20,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loopAdditionalSlides:0,noSwiping:!0,runCallbacksOnInit:!0,coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0},flipEffect:{slideShadows:!0,limitRotation:!0},cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94},fadeEffect:{crossFade:!1},a11y:{prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide"}};o.pagination&&(t.pagination={type:"bullets",clickable:!1,hideOnClick:!1}),o.scrollbar&&(t.scrollbar={hide:!0}),s(t)};export{e as IonicSlides}
|