@ionic/core 8.7.3-dev.11755600455.1e79c35a → 8.7.3-dev.11755622775.1fc05815
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-input.js +36 -5
- package/components/ion-refresher.js +18 -1
- package/components/ion-textarea.js +35 -4
- package/components/overlays.js +97 -3
- package/components/picker-column-option.js +3 -3
- package/components/picker-column.js +39 -3
- 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-input.cjs.entry.js +35 -5
- package/dist/cjs/ion-loading.cjs.entry.js +1 -1
- package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-modal.cjs.entry.js +1 -1
- package/dist/cjs/ion-picker-column-option.cjs.entry.js +3 -3
- 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-refresher_2.cjs.entry.js +18 -1
- package/dist/cjs/ion-select-modal.cjs.entry.js +1 -1
- package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-textarea.cjs.entry.js +34 -4
- package/dist/cjs/ion-toast.cjs.entry.js +1 -1
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{overlays-DUsEBICv.js → overlays-CglR7j-u.js} +96 -2
- package/dist/collection/components/datetime/datetime.js +3 -4
- package/dist/collection/components/input/input.js +37 -6
- 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/refresher/refresher.js +18 -1
- package/dist/collection/components/textarea/textarea.js +36 -5
- package/dist/collection/utils/overlays.js +97 -2
- package/dist/docs.json +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/ion-action-sheet.entry.js +1 -1
- package/dist/esm/ion-alert.entry.js +1 -1
- package/dist/esm/ion-datetime_3.entry.js +4 -4
- package/dist/esm/ion-input.entry.js +35 -5
- package/dist/esm/ion-loading.entry.js +1 -1
- package/dist/esm/ion-menu_3.entry.js +1 -1
- package/dist/esm/ion-modal.entry.js +1 -1
- package/dist/esm/ion-picker-column-option.entry.js +3 -3
- package/dist/esm/ion-picker-column.entry.js +39 -3
- package/dist/esm/ion-popover.entry.js +1 -1
- package/dist/esm/ion-refresher_2.entry.js +18 -1
- package/dist/esm/ion-select-modal.entry.js +1 -1
- package/dist/esm/ion-select_3.entry.js +1 -1
- package/dist/esm/ion-textarea.entry.js +34 -4
- package/dist/esm/ion-toast.entry.js +1 -1
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{overlays-B_dsLNe8.js → overlays-ZX_4-t_r.js} +97 -3
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-187aaf4a.entry.js +4 -0
- package/dist/ionic/p-1d5b934a.entry.js +4 -0
- package/dist/ionic/p-1e34d434.entry.js +4 -0
- package/dist/ionic/p-29032e49.entry.js +4 -0
- package/dist/ionic/{p-8b54aa01.entry.js → p-7bac2c5f.entry.js} +1 -1
- package/dist/ionic/p-8cdb4ff5.entry.js +4 -0
- package/dist/ionic/{p-7ed24ba0.entry.js → p-8d96a0cd.entry.js} +1 -1
- package/dist/ionic/{p-84236acb.entry.js → p-91d6ccb0.entry.js} +1 -1
- package/dist/ionic/{p-09ed68cf.entry.js → p-92e8f208.entry.js} +1 -1
- package/dist/ionic/{p-98d0823e.entry.js → p-982fe1c4.entry.js} +1 -1
- package/dist/ionic/p-CSwZyt05.js +4 -0
- package/dist/ionic/{p-698fb72c.entry.js → p-ab33ef20.entry.js} +1 -1
- package/dist/ionic/{p-07d8f62a.entry.js → p-ac434970.entry.js} +1 -1
- package/dist/ionic/{p-57bb1214.entry.js → p-c575e7ce.entry.js} +1 -1
- package/dist/ionic/{p-9c6fddc6.entry.js → p-f2884bc2.entry.js} +1 -1
- package/dist/ionic/p-f456d176.entry.js +4 -0
- package/dist/types/components/input/input.d.ts +9 -0
- package/dist/types/components/picker-column/picker-column.d.ts +7 -0
- package/dist/types/components/textarea/textarea.d.ts +9 -0
- package/hydrate/index.js +204 -21
- package/hydrate/index.mjs +204 -21
- package/package.json +1 -1
- package/dist/ionic/p-1488b7cc.entry.js +0 -4
- package/dist/ionic/p-8888efe4.entry.js +0 -4
- package/dist/ionic/p-8bfe00f3.entry.js +0 -4
- package/dist/ionic/p-C3MD7jSK.js +0 -4
- package/dist/ionic/p-ac2be9d6.entry.js +0 -4
- package/dist/ionic/p-b292804d.entry.js +0 -4
- package/dist/ionic/p-c5210d3e.entry.js +0 -4
|
@@ -175,6 +175,14 @@ export class Refresher {
|
|
|
175
175
|
this.beginRefresh();
|
|
176
176
|
this.didRefresh = true;
|
|
177
177
|
hapticImpact({ style: ImpactStyle.Light });
|
|
178
|
+
/**
|
|
179
|
+
* Clear focus from any active element to prevent scroll jumps
|
|
180
|
+
* when the refresh completes
|
|
181
|
+
*/
|
|
182
|
+
const activeElement = document.activeElement;
|
|
183
|
+
if ((activeElement === null || activeElement === void 0 ? void 0 : activeElement.blur) !== undefined) {
|
|
184
|
+
activeElement.blur();
|
|
185
|
+
}
|
|
178
186
|
/**
|
|
179
187
|
* Translate the content element otherwise when pointer is removed
|
|
180
188
|
* from screen the scroll content will bounce back over the refresher
|
|
@@ -590,6 +598,15 @@ export class Refresher {
|
|
|
590
598
|
this.state = 8 /* RefresherState.Refreshing */;
|
|
591
599
|
// place the content in a hangout position while it thinks
|
|
592
600
|
this.setCss(this.pullMin, this.snapbackDuration, true, '');
|
|
601
|
+
/**
|
|
602
|
+
* Clear focus from any active element to prevent the browser
|
|
603
|
+
* from restoring focus and causing scroll jumps after refresh.
|
|
604
|
+
* This ensures the view stays at the top after refresh completes.
|
|
605
|
+
*/
|
|
606
|
+
const activeElement = document.activeElement;
|
|
607
|
+
if ((activeElement === null || activeElement === void 0 ? void 0 : activeElement.blur) !== undefined) {
|
|
608
|
+
activeElement.blur();
|
|
609
|
+
}
|
|
593
610
|
// emit "refresh" because it was pulled down far enough
|
|
594
611
|
// and they let go to begin refreshing
|
|
595
612
|
this.ionRefresh.emit({
|
|
@@ -672,7 +689,7 @@ export class Refresher {
|
|
|
672
689
|
}
|
|
673
690
|
render() {
|
|
674
691
|
const mode = getIonMode(this);
|
|
675
|
-
return (h(Host, { key: '
|
|
692
|
+
return (h(Host, { key: '2d1bd880877b698604542ab2d602d38b9504d975', slot: "fixed", class: {
|
|
676
693
|
[mode]: true,
|
|
677
694
|
// Used internally for styling
|
|
678
695
|
[`refresher-${mode}`]: true,
|
|
@@ -37,6 +37,10 @@ export class Textarea {
|
|
|
37
37
|
* is applied in both cases.
|
|
38
38
|
*/
|
|
39
39
|
this.hasFocus = false;
|
|
40
|
+
/**
|
|
41
|
+
* Track validation state for proper aria-live announcements
|
|
42
|
+
*/
|
|
43
|
+
this.isInvalid = false;
|
|
40
44
|
/**
|
|
41
45
|
* Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.
|
|
42
46
|
* Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
|
|
@@ -183,10 +187,31 @@ export class Textarea {
|
|
|
183
187
|
this.el.click();
|
|
184
188
|
}
|
|
185
189
|
}
|
|
190
|
+
/**
|
|
191
|
+
* Checks if the textarea is in an invalid state based on validation classes
|
|
192
|
+
*/
|
|
193
|
+
checkValidationState() {
|
|
194
|
+
return this.el.classList.contains('ion-touched') && this.el.classList.contains('ion-invalid');
|
|
195
|
+
}
|
|
186
196
|
connectedCallback() {
|
|
187
197
|
const { el } = this;
|
|
188
198
|
this.slotMutationController = createSlotMutationController(el, ['label', 'start', 'end'], () => forceUpdate(this));
|
|
189
199
|
this.notchController = createNotchController(el, () => this.notchSpacerEl, () => this.labelSlot);
|
|
200
|
+
// Watch for class changes to update validation state
|
|
201
|
+
if (Build.isBrowser && typeof MutationObserver !== 'undefined') {
|
|
202
|
+
this.validationObserver = new MutationObserver(() => {
|
|
203
|
+
const newIsInvalid = this.checkValidationState();
|
|
204
|
+
if (this.isInvalid !== newIsInvalid) {
|
|
205
|
+
this.isInvalid = newIsInvalid;
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
this.validationObserver.observe(el, {
|
|
209
|
+
attributes: true,
|
|
210
|
+
attributeFilter: ['class'],
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
// Always set initial state
|
|
214
|
+
this.isInvalid = this.checkValidationState();
|
|
190
215
|
this.debounceChanged();
|
|
191
216
|
if (Build.isBrowser) {
|
|
192
217
|
document.dispatchEvent(new CustomEvent('ionInputDidLoad', {
|
|
@@ -208,6 +233,11 @@ export class Textarea {
|
|
|
208
233
|
this.notchController.destroy();
|
|
209
234
|
this.notchController = undefined;
|
|
210
235
|
}
|
|
236
|
+
// Clean up validation observer to prevent memory leaks
|
|
237
|
+
if (this.validationObserver) {
|
|
238
|
+
this.validationObserver.disconnect();
|
|
239
|
+
this.validationObserver = undefined;
|
|
240
|
+
}
|
|
211
241
|
}
|
|
212
242
|
componentWillLoad() {
|
|
213
243
|
this.inheritedAttributes = Object.assign(Object.assign({}, inheritAriaAttributes(this.el)), inheritAttributes(this.el, ['data-form-type', 'title', 'tabindex', 'dir']));
|
|
@@ -385,8 +415,8 @@ export class Textarea {
|
|
|
385
415
|
];
|
|
386
416
|
}
|
|
387
417
|
getHintTextID() {
|
|
388
|
-
const {
|
|
389
|
-
if (
|
|
418
|
+
const { isInvalid, helperText, errorText, helperTextId, errorTextId } = this;
|
|
419
|
+
if (isInvalid && errorText) {
|
|
390
420
|
return errorTextId;
|
|
391
421
|
}
|
|
392
422
|
if (helperText) {
|
|
@@ -445,7 +475,7 @@ export class Textarea {
|
|
|
445
475
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
446
476
|
*/
|
|
447
477
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
448
|
-
return (h(Host, { key: '
|
|
478
|
+
return (h(Host, { key: 'de258335fde7fa934cf3bd58c469525440457468', class: createColorClasses(this.color, {
|
|
449
479
|
[mode]: true,
|
|
450
480
|
'has-value': hasValue,
|
|
451
481
|
'has-focus': hasFocus,
|
|
@@ -454,7 +484,7 @@ export class Textarea {
|
|
|
454
484
|
[`textarea-shape-${shape}`]: shape !== undefined,
|
|
455
485
|
[`textarea-label-placement-${labelPlacement}`]: true,
|
|
456
486
|
'textarea-disabled': disabled,
|
|
457
|
-
}) }, h("label", { key: '
|
|
487
|
+
}) }, h("label", { key: '79fc87122871d45316b1c5fd0a467bf85351e804', class: "textarea-wrapper", htmlFor: inputId, onClick: this.onLabelClick }, this.renderLabelContainer(), h("div", { key: '2375888a47557b41ea3b3bf8eae1fd3f2a4032bd', class: "textarea-wrapper-inner" }, h("div", { key: 'c5af683527a870bd85256b6de8a7d216283403dd', class: "start-slot-wrapper" }, h("slot", { key: 'd972e5784403c5cc6ed067ae578ce23ff8303e1e', name: "start" })), h("div", { key: '1092067609d912a76a8679767611e4ca3e071c6f', class: "native-wrapper", ref: (el) => (this.textareaWrapper = el) }, h("textarea", Object.assign({ key: 'cd23a4bad4d5b460830340009d24d0618f14fd73', class: "native-textarea", ref: (el) => (this.nativeInput = el), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, minLength: this.minlength, maxLength: this.maxlength, name: this.name, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, cols: this.cols, rows: this.rows, wrap: this.wrap, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeyDown, "aria-describedby": this.getHintTextID(), "aria-invalid": this.isInvalid ? 'true' : undefined }, this.inheritedAttributes), value)), h("div", { key: 'c91a5456f4490ef8699f2e44b4a6c64f6084f5fd', class: "end-slot-wrapper" }, h("slot", { key: 'b71ba7ba0d74091e81784432dcffa832b66f3f25', name: "end" }))), shouldRenderHighlight && h("div", { key: '757c3287e1cea5ee851227407685a437f8408c54', class: "textarea-highlight" })), this.renderBottomContent()));
|
|
458
488
|
}
|
|
459
489
|
static get is() { return "ion-textarea"; }
|
|
460
490
|
static get encapsulation() { return "scoped"; }
|
|
@@ -1025,7 +1055,8 @@ export class Textarea {
|
|
|
1025
1055
|
}
|
|
1026
1056
|
static get states() {
|
|
1027
1057
|
return {
|
|
1028
|
-
"hasFocus": {}
|
|
1058
|
+
"hasFocus": {},
|
|
1059
|
+
"isInvalid": {}
|
|
1029
1060
|
};
|
|
1030
1061
|
}
|
|
1031
1062
|
static get events() {
|
|
@@ -11,6 +11,7 @@ import { CoreDelegate } from "./framework-delegate";
|
|
|
11
11
|
import { BACKDROP_NO_SCROLL } from "./gesture/gesture-controller";
|
|
12
12
|
import { OVERLAY_BACK_BUTTON_PRIORITY } from "./hardware-back-button";
|
|
13
13
|
import { addEventListener, componentOnReady, focusVisibleElement, getElementRoot, removeEventListener, } from "./helpers";
|
|
14
|
+
import { isPlatform } from "./platform";
|
|
14
15
|
let lastOverlayIndex = 0;
|
|
15
16
|
let lastId = 0;
|
|
16
17
|
export const activeAnimations = new WeakMap();
|
|
@@ -417,11 +418,9 @@ export const setRootAriaHidden = (hidden = false) => {
|
|
|
417
418
|
}
|
|
418
419
|
if (hidden) {
|
|
419
420
|
viewContainer.setAttribute('aria-hidden', 'true');
|
|
420
|
-
viewContainer.setAttribute('inert', '');
|
|
421
421
|
}
|
|
422
422
|
else {
|
|
423
423
|
viewContainer.removeAttribute('aria-hidden');
|
|
424
|
-
viewContainer.removeAttribute('inert');
|
|
425
424
|
}
|
|
426
425
|
};
|
|
427
426
|
export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts) => {
|
|
@@ -440,6 +439,8 @@ export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation
|
|
|
440
439
|
setRootAriaHidden(true);
|
|
441
440
|
document.body.classList.add(BACKDROP_NO_SCROLL);
|
|
442
441
|
}
|
|
442
|
+
hideUnderlyingOverlaysFromScreenReaders(overlay.el);
|
|
443
|
+
hideAnimatingOverlayFromScreenReaders(overlay.el);
|
|
443
444
|
overlay.presented = true;
|
|
444
445
|
overlay.willPresent.emit();
|
|
445
446
|
(_a = overlay.willPresentShorthand) === null || _a === void 0 ? void 0 : _a.emit();
|
|
@@ -565,6 +566,12 @@ export const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLe
|
|
|
565
566
|
}
|
|
566
567
|
overlay.presented = false;
|
|
567
568
|
try {
|
|
569
|
+
/**
|
|
570
|
+
* There is no need to show the overlay to screen readers during
|
|
571
|
+
* the dismiss animation. This is because the overlay will be removed
|
|
572
|
+
* from the DOM after the animation is complete.
|
|
573
|
+
*/
|
|
574
|
+
hideAnimatingOverlayFromScreenReaders(overlay.el);
|
|
568
575
|
// Overlay contents should not be clickable during dismiss
|
|
569
576
|
overlay.el.style.setProperty('pointer-events', 'none');
|
|
570
577
|
overlay.willDismiss.emit({ data, role });
|
|
@@ -603,6 +610,7 @@ export const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLe
|
|
|
603
610
|
printIonError(`[${overlay.el.tagName.toLowerCase()}] - `, err);
|
|
604
611
|
}
|
|
605
612
|
overlay.el.remove();
|
|
613
|
+
revealOverlaysToScreenReaders();
|
|
606
614
|
return true;
|
|
607
615
|
};
|
|
608
616
|
const getAppRoot = (doc) => {
|
|
@@ -798,4 +806,91 @@ export const createTriggerController = () => {
|
|
|
798
806
|
removeClickListener,
|
|
799
807
|
};
|
|
800
808
|
};
|
|
809
|
+
/**
|
|
810
|
+
* The overlay that is being animated also needs to hide from screen
|
|
811
|
+
* readers during its animation. This ensures that assistive technologies
|
|
812
|
+
* like TalkBack do not announce or interact with the content until the
|
|
813
|
+
* animation is complete, avoiding confusion for users.
|
|
814
|
+
*
|
|
815
|
+
* When the overlay is presented on an Android device, TalkBack's focus rings
|
|
816
|
+
* may appear in the wrong position due to the transition (specifically
|
|
817
|
+
* `transform` styles). This occurs because the focus rings are initially
|
|
818
|
+
* displayed at the starting position of the elements before the transition
|
|
819
|
+
* begins. This workaround ensures the focus rings do not appear in the
|
|
820
|
+
* incorrect location.
|
|
821
|
+
*
|
|
822
|
+
* If this solution is applied to iOS devices, then it leads to a bug where
|
|
823
|
+
* the overlays cannot be accessed by screen readers. This is due to
|
|
824
|
+
* VoiceOver not being able to update the accessibility tree when the
|
|
825
|
+
* `aria-hidden` is removed.
|
|
826
|
+
*
|
|
827
|
+
* @param overlay - The overlay that is being animated.
|
|
828
|
+
*/
|
|
829
|
+
const hideAnimatingOverlayFromScreenReaders = (overlay) => {
|
|
830
|
+
if (doc === undefined)
|
|
831
|
+
return;
|
|
832
|
+
if (isPlatform('android')) {
|
|
833
|
+
/**
|
|
834
|
+
* Once the animation is complete, this attribute will be removed.
|
|
835
|
+
* This is done at the end of the `present` method.
|
|
836
|
+
*/
|
|
837
|
+
overlay.setAttribute('aria-hidden', 'true');
|
|
838
|
+
}
|
|
839
|
+
};
|
|
840
|
+
/**
|
|
841
|
+
* Ensure that underlying overlays have aria-hidden if necessary so that screen readers
|
|
842
|
+
* cannot move focus to these elements. Note that we cannot rely on focus/focusin/focusout
|
|
843
|
+
* events here because those events do not fire when the screen readers moves to a non-focusable
|
|
844
|
+
* element such as text.
|
|
845
|
+
* Without this logic screen readers would be able to move focus outside of the top focus-trapped overlay.
|
|
846
|
+
*
|
|
847
|
+
* @param newTopMostOverlay - The overlay that is being presented. Since the overlay has not been
|
|
848
|
+
* fully presented yet at the time this function is called it will not be included in the getPresentedOverlays result.
|
|
849
|
+
*/
|
|
850
|
+
const hideUnderlyingOverlaysFromScreenReaders = (newTopMostOverlay) => {
|
|
851
|
+
var _a;
|
|
852
|
+
if (doc === undefined)
|
|
853
|
+
return;
|
|
854
|
+
const overlays = getPresentedOverlays(doc);
|
|
855
|
+
for (let i = overlays.length - 1; i >= 0; i--) {
|
|
856
|
+
const presentedOverlay = overlays[i];
|
|
857
|
+
const nextPresentedOverlay = (_a = overlays[i + 1]) !== null && _a !== void 0 ? _a : newTopMostOverlay;
|
|
858
|
+
/**
|
|
859
|
+
* If next overlay has aria-hidden then all remaining overlays will have it too.
|
|
860
|
+
* Or, if the next overlay is a Toast that does not have aria-hidden then current overlay
|
|
861
|
+
* should not have aria-hidden either so focus can remain in the current overlay.
|
|
862
|
+
*/
|
|
863
|
+
if (nextPresentedOverlay.hasAttribute('aria-hidden') || nextPresentedOverlay.tagName !== 'ION-TOAST') {
|
|
864
|
+
presentedOverlay.setAttribute('aria-hidden', 'true');
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
};
|
|
868
|
+
/**
|
|
869
|
+
* When dismissing an overlay we need to reveal the new top-most overlay to screen readers.
|
|
870
|
+
* If the top-most overlay is a Toast we potentially need to reveal more overlays since
|
|
871
|
+
* focus is never automatically moved to the Toast.
|
|
872
|
+
*/
|
|
873
|
+
const revealOverlaysToScreenReaders = () => {
|
|
874
|
+
if (doc === undefined)
|
|
875
|
+
return;
|
|
876
|
+
const overlays = getPresentedOverlays(doc);
|
|
877
|
+
for (let i = overlays.length - 1; i >= 0; i--) {
|
|
878
|
+
const currentOverlay = overlays[i];
|
|
879
|
+
/**
|
|
880
|
+
* If the current we are looking at is a Toast then we can remove aria-hidden.
|
|
881
|
+
* However, we potentially need to keep looking at the overlay stack because there
|
|
882
|
+
* could be more Toasts underneath. Additionally, we need to unhide the closest non-Toast
|
|
883
|
+
* overlay too so focus can move there since focus is never automatically moved to the Toast.
|
|
884
|
+
*/
|
|
885
|
+
currentOverlay.removeAttribute('aria-hidden');
|
|
886
|
+
/**
|
|
887
|
+
* If we found a non-Toast element then we can just remove aria-hidden and stop searching entirely
|
|
888
|
+
* since this overlay should always receive focus. As a result, all underlying overlays should still
|
|
889
|
+
* be hidden from screen readers.
|
|
890
|
+
*/
|
|
891
|
+
if (currentOverlay.tagName !== 'ION-TOAST') {
|
|
892
|
+
break;
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
};
|
|
801
896
|
export const FOCUS_TRAP_DISABLE_CLASS = 'ion-disable-focus-trap';
|
package/dist/docs.json
CHANGED
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-CXSTcaAW.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-ZX_4-t_r.js';
|
|
17
17
|
import './index-ZjP4CjeZ.js';
|
|
18
18
|
import './gesture-controller-BTEOs1at.js';
|
|
19
19
|
import './hardware-back-button-Dhbd-23H.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-DBUPuLNw.js';
|
|
6
6
|
import { r as raf } from './helpers-8KSQQGQy.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-ZX_4-t_r.js';
|
|
9
9
|
import { g as getClassMap } from './theme-DiVJyqlX.js';
|
|
10
10
|
import { b as getIonMode } from './ionic-global-CTSyufhF.js';
|
|
11
11
|
import { c as createAnimation } from './animation-BvhAtgca.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-DBUPuLNw.js';
|
|
7
7
|
import { r as raf } from './helpers-8KSQQGQy.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-ZX_4-t_r.js';
|
|
10
10
|
import { g as getClassMap } from './theme-DiVJyqlX.js';
|
|
11
11
|
import { b as getIonMode } from './ionic-global-CTSyufhF.js';
|
|
12
12
|
import { c as createAnimation } from './animation-BvhAtgca.js';
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
import { j as printIonError, f as printIonWarning, r as registerInstance, c as createEvent, w as writeTask, h, d as Host, g as getElement } from './index-4DxY6_gG.js';
|
|
5
5
|
import { startFocusVisible } from './focus-visible-BmVRXR1y.js';
|
|
6
6
|
import { r as raf, g as getElementRoot, a as renderHiddenInput, e as clamp } from './helpers-8KSQQGQy.js';
|
|
7
|
-
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-B_dsLNe8.js';
|
|
8
7
|
import { i as isRTL } from './dir-C53feagD.js';
|
|
9
8
|
import { c as createColorClasses, g as getClassMap } from './theme-DiVJyqlX.js';
|
|
10
9
|
import { l as chevronDown, o as caretUpSharp, p as chevronForward, q as caretDownSharp, c as chevronBack } from './index-DV3sJJW8.js';
|
|
11
10
|
import { b as getIonMode } from './ionic-global-CTSyufhF.js';
|
|
12
11
|
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-CKHMWxfe.js';
|
|
13
12
|
import { c as createLockController } from './lock-controller-B-hirT0v.js';
|
|
13
|
+
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-ZX_4-t_r.js';
|
|
14
14
|
import { c as createAnimation } from './animation-BvhAtgca.js';
|
|
15
15
|
import { a as hapticSelectionChanged, h as hapticSelectionEnd, b as hapticSelectionStart } from './haptic-DzAMWJuk.js';
|
|
16
16
|
import './index-ZjP4CjeZ.js';
|
|
@@ -1299,7 +1299,7 @@ const Datetime = class {
|
|
|
1299
1299
|
const renderArray = forcePresentation === 'time-date'
|
|
1300
1300
|
? [this.renderTimePickerColumns(forcePresentation), this.renderDatePickerColumns(forcePresentation)]
|
|
1301
1301
|
: [this.renderDatePickerColumns(forcePresentation), this.renderTimePickerColumns(forcePresentation)];
|
|
1302
|
-
return h("ion-picker",
|
|
1302
|
+
return h("ion-picker", null, renderArray);
|
|
1303
1303
|
}
|
|
1304
1304
|
renderDatePickerColumns(forcePresentation) {
|
|
1305
1305
|
return forcePresentation === 'date-time' || forcePresentation === 'time-date'
|
|
@@ -1856,7 +1856,7 @@ const Datetime = class {
|
|
|
1856
1856
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
1857
1857
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
1858
1858
|
renderHiddenInput(true, el, name, formatValue(value), disabled);
|
|
1859
|
-
return (h(Host, { key: '
|
|
1859
|
+
return (h(Host, { key: 'f35cf200ff05d33074576e3d2754d3b2a0735b96', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
|
|
1860
1860
|
[mode]: true,
|
|
1861
1861
|
['datetime-readonly']: readonly,
|
|
1862
1862
|
['datetime-disabled']: disabled,
|
|
@@ -1866,7 +1866,7 @@ const Datetime = class {
|
|
|
1866
1866
|
[`datetime-size-${size}`]: true,
|
|
1867
1867
|
[`datetime-prefer-wheel`]: hasWheelVariant,
|
|
1868
1868
|
[`datetime-grid`]: isGridStyle,
|
|
1869
|
-
})) }, h("div", { key: '
|
|
1869
|
+
})) }, h("div", { key: '859e9354a12bfa58ac3f964c2e66839f17071c00', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
|
|
1870
1870
|
}
|
|
1871
1871
|
get el() { return getElement(this); }
|
|
1872
1872
|
static get watchers() { return {
|
|
@@ -42,6 +42,10 @@ const Input = class {
|
|
|
42
42
|
* is applied in both cases.
|
|
43
43
|
*/
|
|
44
44
|
this.hasFocus = false;
|
|
45
|
+
/**
|
|
46
|
+
* Track validation state for proper aria-live announcements
|
|
47
|
+
*/
|
|
48
|
+
this.isInvalid = false;
|
|
45
49
|
/**
|
|
46
50
|
* Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.
|
|
47
51
|
* Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
|
|
@@ -226,10 +230,31 @@ const Input = class {
|
|
|
226
230
|
componentWillLoad() {
|
|
227
231
|
this.inheritedAttributes = Object.assign(Object.assign({}, inheritAriaAttributes(this.el)), inheritAttributes(this.el, ['tabindex', 'title', 'data-form-type', 'dir']));
|
|
228
232
|
}
|
|
233
|
+
/**
|
|
234
|
+
* Checks if the input is in an invalid state based on validation classes
|
|
235
|
+
*/
|
|
236
|
+
checkValidationState() {
|
|
237
|
+
return this.el.classList.contains('ion-touched') && this.el.classList.contains('ion-invalid');
|
|
238
|
+
}
|
|
229
239
|
connectedCallback() {
|
|
230
240
|
const { el } = this;
|
|
231
241
|
this.slotMutationController = createSlotMutationController(el, ['label', 'start', 'end'], () => forceUpdate(this));
|
|
232
242
|
this.notchController = createNotchController(el, () => this.notchSpacerEl, () => this.labelSlot);
|
|
243
|
+
// Watch for class changes to update validation state
|
|
244
|
+
if (typeof MutationObserver !== 'undefined') {
|
|
245
|
+
this.validationObserver = new MutationObserver(() => {
|
|
246
|
+
const newIsInvalid = this.checkValidationState();
|
|
247
|
+
if (this.isInvalid !== newIsInvalid) {
|
|
248
|
+
this.isInvalid = newIsInvalid;
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
this.validationObserver.observe(el, {
|
|
252
|
+
attributes: true,
|
|
253
|
+
attributeFilter: ['class'],
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
// Always set initial state
|
|
257
|
+
this.isInvalid = this.checkValidationState();
|
|
233
258
|
this.debounceChanged();
|
|
234
259
|
{
|
|
235
260
|
document.dispatchEvent(new CustomEvent('ionInputDidLoad', {
|
|
@@ -266,6 +291,11 @@ const Input = class {
|
|
|
266
291
|
this.notchController.destroy();
|
|
267
292
|
this.notchController = undefined;
|
|
268
293
|
}
|
|
294
|
+
// Clean up validation observer to prevent memory leaks
|
|
295
|
+
if (this.validationObserver) {
|
|
296
|
+
this.validationObserver.disconnect();
|
|
297
|
+
this.validationObserver = undefined;
|
|
298
|
+
}
|
|
269
299
|
}
|
|
270
300
|
/**
|
|
271
301
|
* Sets focus on the native `input` in `ion-input`. Use this method instead of the global
|
|
@@ -374,8 +404,8 @@ const Input = class {
|
|
|
374
404
|
];
|
|
375
405
|
}
|
|
376
406
|
getHintTextID() {
|
|
377
|
-
const {
|
|
378
|
-
if (
|
|
407
|
+
const { isInvalid, helperText, errorText, helperTextId, errorTextId } = this;
|
|
408
|
+
if (isInvalid && errorText) {
|
|
379
409
|
return errorTextId;
|
|
380
410
|
}
|
|
381
411
|
if (helperText) {
|
|
@@ -488,7 +518,7 @@ const Input = class {
|
|
|
488
518
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
489
519
|
*/
|
|
490
520
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
491
|
-
return (h(Host, { key: '
|
|
521
|
+
return (h(Host, { key: '1b0cffa910aef4eac24438bf3158e51905e70788', class: createColorClasses(this.color, {
|
|
492
522
|
[mode]: true,
|
|
493
523
|
'has-value': hasValue,
|
|
494
524
|
'has-focus': hasFocus,
|
|
@@ -499,14 +529,14 @@ const Input = class {
|
|
|
499
529
|
'in-item': inItem,
|
|
500
530
|
'in-item-color': hostContext('ion-item.ion-color', this.el),
|
|
501
531
|
'input-disabled': disabled,
|
|
502
|
-
}) }, h("label", { key: '
|
|
532
|
+
}) }, h("label", { key: '24411a6cc190e2054015bca5e2827b96c65bba17', class: "input-wrapper", htmlFor: inputId, onClick: this.onLabelClick }, this.renderLabelContainer(), h("div", { key: '7fa7a7f6d2778e6efbebc6f2671d8a63048f76a8', class: "native-wrapper", onClick: this.onLabelClick }, h("slot", { key: '14f489e6026967ee1b2eee1519bad4230f028489', name: "start" }), h("input", Object.assign({ key: 'd0f5b756394aced0831e80e91313a417bda37e6f', class: "native-input", ref: (input) => (this.nativeInput = input), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, type: this.type, value: value, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd, "aria-describedby": this.getHintTextID(), "aria-invalid": this.isInvalid ? 'true' : undefined }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (h("button", { key: '3e37003927082bbbfce4b3396a263969aa2289fc', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
|
|
503
533
|
/**
|
|
504
534
|
* This prevents mobile browsers from
|
|
505
535
|
* blurring the input when the clear
|
|
506
536
|
* button is activated.
|
|
507
537
|
*/
|
|
508
538
|
ev.preventDefault();
|
|
509
|
-
}, onClick: this.clearTextInput }, h("ion-icon", { key: '
|
|
539
|
+
}, onClick: this.clearTextInput }, h("ion-icon", { key: '269ccdfd95a8a5b39bf0587b1494b4badd5c65b3', "aria-hidden": "true", icon: clearIconData }))), h("slot", { key: '5d93a350194c4197c01c5d54f50060e7f527f065', name: "end" })), shouldRenderHighlight && h("div", { key: 'fbdd13d41b37aa1e4608ba2535f7b833748eae3f', class: "input-highlight" })), this.renderBottomContent()));
|
|
510
540
|
}
|
|
511
541
|
get el() { return getElement(this); }
|
|
512
542
|
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-8KSQQGQy.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-ZX_4-t_r.js';
|
|
9
9
|
import { g as getClassMap } from './theme-DiVJyqlX.js';
|
|
10
10
|
import { b as getIonMode } from './ionic-global-CTSyufhF.js';
|
|
11
11
|
import { c as createAnimation } from './animation-BvhAtgca.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-ZX_4-t_r.js';
|
|
7
7
|
import { G as GESTURE_CONTROLLER } from './gesture-controller-BTEOs1at.js';
|
|
8
8
|
import { shouldUseCloseWatcher } from './hardware-back-button-Dhbd-23H.js';
|
|
9
9
|
import { o as isEndSide, i as inheritAriaAttributes, l as assert, e as clamp } from './helpers-8KSQQGQy.js';
|
|
@@ -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-8KSQQGQy.js';
|
|
8
8
|
import { c as createLockController } from './lock-controller-B-hirT0v.js';
|
|
9
9
|
import { g as getCapacitor } from './capacitor-CFERIeaU.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-ZX_4-t_r.js';
|
|
11
11
|
import { g as getClassMap } from './theme-DiVJyqlX.js';
|
|
12
12
|
import { e as deepReady, w as waitForMount } from './index-Dp7GXH1z.js';
|
|
13
13
|
import { b as getIonMode } from './ionic-global-CTSyufhF.js';
|
|
@@ -6,9 +6,9 @@ import { b as inheritAttributes } from './helpers-8KSQQGQy.js';
|
|
|
6
6
|
import { c as createColorClasses } from './theme-DiVJyqlX.js';
|
|
7
7
|
import { b as getIonMode } from './ionic-global-CTSyufhF.js';
|
|
8
8
|
|
|
9
|
-
const pickerColumnOptionIosCss = "
|
|
9
|
+
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}";
|
|
10
10
|
|
|
11
|
-
const pickerColumnOptionMdCss = "
|
|
11
|
+
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)}";
|
|
12
12
|
|
|
13
13
|
const PickerColumnOption = class {
|
|
14
14
|
constructor(hostRef) {
|
|
@@ -100,7 +100,7 @@ const PickerColumnOption = class {
|
|
|
100
100
|
return (h(Host, { key: 'f816729941aabcb31ddfdce3ffe2e2139030d715', class: createColorClasses(color, {
|
|
101
101
|
[mode]: true,
|
|
102
102
|
['option-disabled']: disabled,
|
|
103
|
-
}) }, h("
|
|
103
|
+
}) }, h("button", { key: '48dff7833bb60fc8331cd353a0885e6affa683d1', tabindex: "-1", "aria-label": ariaLabel, disabled: disabled, onClick: () => this.onClick() }, h("slot", { key: 'f9224d0e7b7aa6c05b29abfdcfe0f30ad6ee3141' }))));
|
|
104
104
|
}
|
|
105
105
|
get el() { return getElement(this); }
|
|
106
106
|
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 mode = getIonMode(this);
|
|
551
|
-
return (h(Host, { key: '
|
|
568
|
+
return (h(Host, { key: 'ea0280355b2f87895bf7dddd289ccf473aa759f3', class: createColorClasses(color, {
|
|
552
569
|
[mode]: 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: '482992131cdeb85b1f61430d7fe1322a16345769', name: "prefix" }), h("div", { key: '43f7f80d621d411ef366b3ca1396299e8c9a0c97', "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: '13a9ee686132af32240710730765de4c0003a9e8', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: 'dbccba4920833cfcebe9b0fc763458ec3053705a', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: '682b43f83a5ea2e46067457f3af118535e111edb', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("slot", { key: 'd27e1e1dc0504b2f4627a29912a05bb91e8e413a' }), h("div", { key: '61c948dbb9cf7469aed3018542bc0954211585ba', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: 'cf46c277fbee65e35ff44ce0d53ce12aa9cbf9db', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: 'bbc0e2d491d3f836ab849493ade2f7fa6ad9244e', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0")), h("slot", { key: 'd25cbbe14b2914fe7b878d43b4e3f4a8c8177d24', 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-ZX_4-t_r.js';
|
|
6
6
|
import { C as CoreDelegate, a as attachComponent, d as detachComponent } from './framework-delegate-BLEBgH06.js';
|
|
7
7
|
import { g as getElementRoot, r as raf, f as addEventListener, h as hasLazyBuild } from './helpers-8KSQQGQy.js';
|
|
8
8
|
import { c as createLockController } from './lock-controller-B-hirT0v.js';
|