@ionic/core 8.7.3-dev.11755622775.1fc05815 → 8.7.3-dev.11755697669.1be2024b
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 +4 -3
- package/components/ion-input.js +5 -36
- package/components/ion-textarea.js +4 -35
- package/components/overlays.js +15 -6
- package/components/picker-column-option.js +3 -3
- package/components/picker-column.js +3 -39
- 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 +5 -35
- 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 +3 -39
- package/dist/cjs/ion-popover.cjs.entry.js +1 -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 +4 -34
- 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-CglR7j-u.js → overlays-Ca4z9krz.js} +15 -6
- package/dist/collection/components/datetime/datetime.js +4 -3
- package/dist/collection/components/input/input.js +6 -37
- package/dist/collection/components/picker-column/picker-column.js +3 -39
- 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/textarea/textarea.js +5 -36
- package/dist/collection/utils/overlays.js +15 -6
- 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 +5 -35
- 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 +3 -39
- package/dist/esm/ion-popover.entry.js +1 -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 +4 -34
- 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-ZX_4-t_r.js → overlays-C14Rvrme.js} +15 -6
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-91d6ccb0.entry.js → p-05baca9e.entry.js} +1 -1
- package/dist/ionic/p-1488b7cc.entry.js +4 -0
- package/dist/ionic/{p-7bac2c5f.entry.js → p-1be8ffce.entry.js} +1 -1
- package/dist/ionic/p-2e296f4a.entry.js +4 -0
- package/dist/ionic/{p-ac434970.entry.js → p-31393988.entry.js} +1 -1
- package/dist/ionic/{p-982fe1c4.entry.js → p-3c51f2cd.entry.js} +1 -1
- package/dist/ionic/{p-92e8f208.entry.js → p-5b64a786.entry.js} +1 -1
- package/dist/ionic/{p-8d96a0cd.entry.js → p-6d655180.entry.js} +1 -1
- package/dist/ionic/p-8888efe4.entry.js +4 -0
- package/dist/ionic/p-DMk_cMN9.js +4 -0
- package/dist/ionic/{p-c575e7ce.entry.js → p-a67512ba.entry.js} +1 -1
- package/dist/ionic/{p-ab33ef20.entry.js → p-b1c70f1c.entry.js} +1 -1
- package/dist/ionic/p-b292804d.entry.js +4 -0
- package/dist/ionic/{p-f2884bc2.entry.js → p-b6432111.entry.js} +1 -1
- package/dist/ionic/p-c5210d3e.entry.js +4 -0
- package/dist/types/components/input/input.d.ts +0 -9
- package/dist/types/components/picker-column/picker-column.d.ts +0 -7
- package/dist/types/components/textarea/textarea.d.ts +0 -9
- package/hydrate/index.js +33 -96
- package/hydrate/index.mjs +33 -96
- package/package.json +1 -1
- package/dist/ionic/p-187aaf4a.entry.js +0 -4
- package/dist/ionic/p-1d5b934a.entry.js +0 -4
- package/dist/ionic/p-1e34d434.entry.js +0 -4
- package/dist/ionic/p-29032e49.entry.js +0 -4
- package/dist/ionic/p-CSwZyt05.js +0 -4
- package/dist/ionic/p-f456d176.entry.js +0 -4
|
@@ -37,10 +37,6 @@ 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;
|
|
44
40
|
/**
|
|
45
41
|
* Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.
|
|
46
42
|
* Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
|
|
@@ -187,31 +183,10 @@ export class Textarea {
|
|
|
187
183
|
this.el.click();
|
|
188
184
|
}
|
|
189
185
|
}
|
|
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
|
-
}
|
|
196
186
|
connectedCallback() {
|
|
197
187
|
const { el } = this;
|
|
198
188
|
this.slotMutationController = createSlotMutationController(el, ['label', 'start', 'end'], () => forceUpdate(this));
|
|
199
189
|
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();
|
|
215
190
|
this.debounceChanged();
|
|
216
191
|
if (Build.isBrowser) {
|
|
217
192
|
document.dispatchEvent(new CustomEvent('ionInputDidLoad', {
|
|
@@ -233,11 +208,6 @@ export class Textarea {
|
|
|
233
208
|
this.notchController.destroy();
|
|
234
209
|
this.notchController = undefined;
|
|
235
210
|
}
|
|
236
|
-
// Clean up validation observer to prevent memory leaks
|
|
237
|
-
if (this.validationObserver) {
|
|
238
|
-
this.validationObserver.disconnect();
|
|
239
|
-
this.validationObserver = undefined;
|
|
240
|
-
}
|
|
241
211
|
}
|
|
242
212
|
componentWillLoad() {
|
|
243
213
|
this.inheritedAttributes = Object.assign(Object.assign({}, inheritAriaAttributes(this.el)), inheritAttributes(this.el, ['data-form-type', 'title', 'tabindex', 'dir']));
|
|
@@ -415,8 +385,8 @@ export class Textarea {
|
|
|
415
385
|
];
|
|
416
386
|
}
|
|
417
387
|
getHintTextID() {
|
|
418
|
-
const {
|
|
419
|
-
if (
|
|
388
|
+
const { el, helperText, errorText, helperTextId, errorTextId } = this;
|
|
389
|
+
if (el.classList.contains('ion-touched') && el.classList.contains('ion-invalid') && errorText) {
|
|
420
390
|
return errorTextId;
|
|
421
391
|
}
|
|
422
392
|
if (helperText) {
|
|
@@ -475,7 +445,7 @@ export class Textarea {
|
|
|
475
445
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
476
446
|
*/
|
|
477
447
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
478
|
-
return (h(Host, { key: '
|
|
448
|
+
return (h(Host, { key: 'd9f2ede0107987fc42c99e310cd2336bad5a5755', class: createColorClasses(this.color, {
|
|
479
449
|
[mode]: true,
|
|
480
450
|
'has-value': hasValue,
|
|
481
451
|
'has-focus': hasFocus,
|
|
@@ -484,7 +454,7 @@ export class Textarea {
|
|
|
484
454
|
[`textarea-shape-${shape}`]: shape !== undefined,
|
|
485
455
|
[`textarea-label-placement-${labelPlacement}`]: true,
|
|
486
456
|
'textarea-disabled': disabled,
|
|
487
|
-
}) }, h("label", { key: '
|
|
457
|
+
}) }, h("label", { key: '9de598b95237462bb3bccffaefe83afbb43554b8', class: "textarea-wrapper", htmlFor: inputId, onClick: this.onLabelClick }, this.renderLabelContainer(), h("div", { key: 'e33c426c6541d723ccc246bb404c03687726ff83', class: "textarea-wrapper-inner" }, h("div", { key: '521e11af9d54d281b0a2b1c25bcfc6f742c18296', class: "start-slot-wrapper" }, h("slot", { key: '515523f6ca3ce0e5dd08f3275c21a190fb1ca177', name: "start" })), h("div", { key: '916e01e00de8400ae00ef06bc1fb62d8be2eee08', class: "native-wrapper", ref: (el) => (this.textareaWrapper = el) }, h("textarea", Object.assign({ key: '810271e6532d90e27dab1fcb26546113c1ce9cb0', 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.getHintTextID() === this.errorTextId }, this.inheritedAttributes), value)), h("div", { key: '80aca9ea9546dca9d38efd291a6b0be384bb6978', class: "end-slot-wrapper" }, h("slot", { key: '407fab16c66a9f4a542369bfecc0d9afa0065977', name: "end" }))), shouldRenderHighlight && h("div", { key: 'f00523a6698fac8a1996e04303487bef01d10f25', class: "textarea-highlight" })), this.renderBottomContent()));
|
|
488
458
|
}
|
|
489
459
|
static get is() { return "ion-textarea"; }
|
|
490
460
|
static get encapsulation() { return "scoped"; }
|
|
@@ -1055,8 +1025,7 @@ export class Textarea {
|
|
|
1055
1025
|
}
|
|
1056
1026
|
static get states() {
|
|
1057
1027
|
return {
|
|
1058
|
-
"hasFocus": {}
|
|
1059
|
-
"isInvalid": {}
|
|
1028
|
+
"hasFocus": {}
|
|
1060
1029
|
};
|
|
1061
1030
|
}
|
|
1062
1031
|
static get events() {
|
|
@@ -418,16 +418,20 @@ export const setRootAriaHidden = (hidden = false) => {
|
|
|
418
418
|
}
|
|
419
419
|
if (hidden) {
|
|
420
420
|
viewContainer.setAttribute('aria-hidden', 'true');
|
|
421
|
+
viewContainer.setAttribute('inert', '');
|
|
421
422
|
}
|
|
422
423
|
else {
|
|
423
424
|
viewContainer.removeAttribute('aria-hidden');
|
|
425
|
+
viewContainer.removeAttribute('inert');
|
|
424
426
|
}
|
|
425
427
|
};
|
|
426
428
|
export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts) => {
|
|
427
|
-
var _a, _b;
|
|
429
|
+
var _a, _b, _c;
|
|
428
430
|
if (overlay.presented) {
|
|
429
431
|
return;
|
|
430
432
|
}
|
|
433
|
+
console.log("presenting overlay...");
|
|
434
|
+
(_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.blur();
|
|
431
435
|
/**
|
|
432
436
|
* Due to accessibility guidelines, toasts do not have
|
|
433
437
|
* focus traps.
|
|
@@ -443,7 +447,7 @@ export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation
|
|
|
443
447
|
hideAnimatingOverlayFromScreenReaders(overlay.el);
|
|
444
448
|
overlay.presented = true;
|
|
445
449
|
overlay.willPresent.emit();
|
|
446
|
-
(
|
|
450
|
+
(_b = overlay.willPresentShorthand) === null || _b === void 0 ? void 0 : _b.emit();
|
|
447
451
|
const mode = getIonMode(overlay);
|
|
448
452
|
// get the user's animation fn if one was provided
|
|
449
453
|
const animationBuilder = overlay.enterAnimation
|
|
@@ -452,7 +456,7 @@ export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation
|
|
|
452
456
|
const completed = await overlayAnimation(overlay, animationBuilder, overlay.el, opts);
|
|
453
457
|
if (completed) {
|
|
454
458
|
overlay.didPresent.emit();
|
|
455
|
-
(
|
|
459
|
+
(_c = overlay.didPresentShorthand) === null || _c === void 0 ? void 0 : _c.emit();
|
|
456
460
|
}
|
|
457
461
|
/**
|
|
458
462
|
* When an overlay that steals focus
|
|
@@ -487,6 +491,7 @@ export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation
|
|
|
487
491
|
* screen readers.
|
|
488
492
|
*/
|
|
489
493
|
overlay.el.removeAttribute('aria-hidden');
|
|
494
|
+
overlay.el.removeAttribute('inert');
|
|
490
495
|
};
|
|
491
496
|
/**
|
|
492
497
|
* When an overlay component is dismissed,
|
|
@@ -538,10 +543,11 @@ const restoreElementFocus = async (overlayEl) => {
|
|
|
538
543
|
}
|
|
539
544
|
};
|
|
540
545
|
export const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnimation, opts) => {
|
|
541
|
-
var _a, _b;
|
|
546
|
+
var _a, _b, _c;
|
|
542
547
|
if (!overlay.presented) {
|
|
543
548
|
return false;
|
|
544
549
|
}
|
|
550
|
+
(_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.blur();
|
|
545
551
|
const presentedOverlays = doc !== undefined ? getPresentedOverlays(doc) : [];
|
|
546
552
|
/**
|
|
547
553
|
* For accessibility, toasts lack focus traps and don't receive
|
|
@@ -575,7 +581,7 @@ export const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLe
|
|
|
575
581
|
// Overlay contents should not be clickable during dismiss
|
|
576
582
|
overlay.el.style.setProperty('pointer-events', 'none');
|
|
577
583
|
overlay.willDismiss.emit({ data, role });
|
|
578
|
-
(
|
|
584
|
+
(_b = overlay.willDismissShorthand) === null || _b === void 0 ? void 0 : _b.emit({ data, role });
|
|
579
585
|
const mode = getIonMode(overlay);
|
|
580
586
|
const animationBuilder = overlay.leaveAnimation
|
|
581
587
|
? overlay.leaveAnimation
|
|
@@ -585,7 +591,7 @@ export const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLe
|
|
|
585
591
|
await overlayAnimation(overlay, animationBuilder, overlay.el, opts);
|
|
586
592
|
}
|
|
587
593
|
overlay.didDismiss.emit({ data, role });
|
|
588
|
-
(
|
|
594
|
+
(_c = overlay.didDismissShorthand) === null || _c === void 0 ? void 0 : _c.emit({ data, role });
|
|
589
595
|
// Get a reference to all animations currently assigned to this overlay
|
|
590
596
|
// Then tear them down to return the overlay to its initial visual state
|
|
591
597
|
const animations = activeAnimations.get(overlay) || [];
|
|
@@ -835,6 +841,7 @@ const hideAnimatingOverlayFromScreenReaders = (overlay) => {
|
|
|
835
841
|
* This is done at the end of the `present` method.
|
|
836
842
|
*/
|
|
837
843
|
overlay.setAttribute('aria-hidden', 'true');
|
|
844
|
+
overlay.setAttribute('inert', '');
|
|
838
845
|
}
|
|
839
846
|
};
|
|
840
847
|
/**
|
|
@@ -862,6 +869,7 @@ const hideUnderlyingOverlaysFromScreenReaders = (newTopMostOverlay) => {
|
|
|
862
869
|
*/
|
|
863
870
|
if (nextPresentedOverlay.hasAttribute('aria-hidden') || nextPresentedOverlay.tagName !== 'ION-TOAST') {
|
|
864
871
|
presentedOverlay.setAttribute('aria-hidden', 'true');
|
|
872
|
+
presentedOverlay.setAttribute('inert', '');
|
|
865
873
|
}
|
|
866
874
|
}
|
|
867
875
|
};
|
|
@@ -883,6 +891,7 @@ const revealOverlaysToScreenReaders = () => {
|
|
|
883
891
|
* overlay too so focus can move there since focus is never automatically moved to the Toast.
|
|
884
892
|
*/
|
|
885
893
|
currentOverlay.removeAttribute('aria-hidden');
|
|
894
|
+
currentOverlay.removeAttribute('inert');
|
|
886
895
|
/**
|
|
887
896
|
* If we found a non-Toast element then we can just remove aria-hidden and stop searching entirely
|
|
888
897
|
* since this overlay should always receive focus. As a result, all underlying overlays should still
|
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-C14Rvrme.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-C14Rvrme.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-C14Rvrme.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-C14Rvrme.js';
|
|
7
8
|
import { i as isRTL } from './dir-C53feagD.js';
|
|
8
9
|
import { c as createColorClasses, g as getClassMap } from './theme-DiVJyqlX.js';
|
|
9
10
|
import { l as chevronDown, o as caretUpSharp, p as chevronForward, q as caretDownSharp, c as chevronBack } from './index-DV3sJJW8.js';
|
|
10
11
|
import { b as getIonMode } from './ionic-global-CTSyufhF.js';
|
|
11
12
|
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';
|
|
12
13
|
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", { class: FOCUS_TRAP_DISABLE_CLASS }, 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: '57492534800ea059a7c2bbd9f0059cc0b75ae8d2', "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: '97dac5e5195635ac0bc5fb472b9d09e5c3c6bbc3', 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,10 +42,6 @@ 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;
|
|
49
45
|
/**
|
|
50
46
|
* Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.
|
|
51
47
|
* Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
|
|
@@ -230,31 +226,10 @@ const Input = class {
|
|
|
230
226
|
componentWillLoad() {
|
|
231
227
|
this.inheritedAttributes = Object.assign(Object.assign({}, inheritAriaAttributes(this.el)), inheritAttributes(this.el, ['tabindex', 'title', 'data-form-type', 'dir']));
|
|
232
228
|
}
|
|
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
|
-
}
|
|
239
229
|
connectedCallback() {
|
|
240
230
|
const { el } = this;
|
|
241
231
|
this.slotMutationController = createSlotMutationController(el, ['label', 'start', 'end'], () => forceUpdate(this));
|
|
242
232
|
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();
|
|
258
233
|
this.debounceChanged();
|
|
259
234
|
{
|
|
260
235
|
document.dispatchEvent(new CustomEvent('ionInputDidLoad', {
|
|
@@ -291,11 +266,6 @@ const Input = class {
|
|
|
291
266
|
this.notchController.destroy();
|
|
292
267
|
this.notchController = undefined;
|
|
293
268
|
}
|
|
294
|
-
// Clean up validation observer to prevent memory leaks
|
|
295
|
-
if (this.validationObserver) {
|
|
296
|
-
this.validationObserver.disconnect();
|
|
297
|
-
this.validationObserver = undefined;
|
|
298
|
-
}
|
|
299
269
|
}
|
|
300
270
|
/**
|
|
301
271
|
* Sets focus on the native `input` in `ion-input`. Use this method instead of the global
|
|
@@ -404,8 +374,8 @@ const Input = class {
|
|
|
404
374
|
];
|
|
405
375
|
}
|
|
406
376
|
getHintTextID() {
|
|
407
|
-
const {
|
|
408
|
-
if (
|
|
377
|
+
const { el, helperText, errorText, helperTextId, errorTextId } = this;
|
|
378
|
+
if (el.classList.contains('ion-touched') && el.classList.contains('ion-invalid') && errorText) {
|
|
409
379
|
return errorTextId;
|
|
410
380
|
}
|
|
411
381
|
if (helperText) {
|
|
@@ -518,7 +488,7 @@ const Input = class {
|
|
|
518
488
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
519
489
|
*/
|
|
520
490
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
521
|
-
return (h(Host, { key: '
|
|
491
|
+
return (h(Host, { key: '41b2526627e7d2773a80f011b123284203a71ca0', class: createColorClasses(this.color, {
|
|
522
492
|
[mode]: true,
|
|
523
493
|
'has-value': hasValue,
|
|
524
494
|
'has-focus': hasFocus,
|
|
@@ -529,14 +499,14 @@ const Input = class {
|
|
|
529
499
|
'in-item': inItem,
|
|
530
500
|
'in-item-color': hostContext('ion-item.ion-color', this.el),
|
|
531
501
|
'input-disabled': disabled,
|
|
532
|
-
}) }, h("label", { key: '
|
|
502
|
+
}) }, h("label", { key: '9ab078363e32528102b441ad1791d83f86fdcbdc', class: "input-wrapper", htmlFor: inputId, onClick: this.onLabelClick }, this.renderLabelContainer(), h("div", { key: 'e34b594980ec62e4c618e827fadf7669a39ad0d8', class: "native-wrapper", onClick: this.onLabelClick }, h("slot", { key: '12dc04ead5502e9e5736240e918bf9331bf7b5d9', name: "start" }), h("input", Object.assign({ key: 'df356eb4ced23109b2c0242f36dc043aba8782d6', 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.getHintTextID() === this.errorTextId }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (h("button", { key: 'f79f68cabcd4ea99419331174a377827db0c0741', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
|
|
533
503
|
/**
|
|
534
504
|
* This prevents mobile browsers from
|
|
535
505
|
* blurring the input when the clear
|
|
536
506
|
* button is activated.
|
|
537
507
|
*/
|
|
538
508
|
ev.preventDefault();
|
|
539
|
-
}, onClick: this.clearTextInput }, h("ion-icon", { key: '
|
|
509
|
+
}, onClick: this.clearTextInput }, h("ion-icon", { key: '237ec07ec2e10f08818a332bb596578c2c49f770', "aria-hidden": "true", icon: clearIconData }))), h("slot", { key: '1f0a3624aa3e8dc3c307a6762230ab698768a5e5', name: "end" })), shouldRenderHighlight && h("div", { key: '8a8cbb82695a722a0010b53dd0b1f1f97534a20b', class: "input-highlight" })), this.renderBottomContent()));
|
|
540
510
|
}
|
|
541
511
|
get el() { return getElement(this); }
|
|
542
512
|
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-C14Rvrme.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-C14Rvrme.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-C14Rvrme.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 = "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}";
|
|
9
|
+
const pickerColumnOptionIosCss = ".picker-column-option-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) .picker-column-option-button{cursor:default}";
|
|
10
10
|
|
|
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)}";
|
|
11
|
+
const pickerColumnOptionMdCss = ".picker-column-option-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) .picker-column-option-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("div", { key: 'd942de84fd14d7dc06b1e5cf4f7920d1dc3c6371', class: 'picker-column-option-button', role: "button", "aria-label": ariaLabel, onClick: () => this.onClick() }, h("slot", { key: 'b0df5717b42209e649097209a01476e1a66f5c5c' }))));
|
|
104
104
|
}
|
|
105
105
|
get el() { return getElement(this); }
|
|
106
106
|
static get watchers() { return {
|
|
@@ -408,23 +408,6 @@ 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
|
-
};
|
|
428
411
|
}
|
|
429
412
|
ariaLabelChanged(newValue) {
|
|
430
413
|
this.ariaLabel = newValue;
|
|
@@ -565,33 +548,14 @@ const PickerColumn = class {
|
|
|
565
548
|
render() {
|
|
566
549
|
const { color, disabled, isActive, numericInput } = this;
|
|
567
550
|
const mode = getIonMode(this);
|
|
568
|
-
return (h(Host, { key: '
|
|
551
|
+
return (h(Host, { key: 'db903fd415f8a2d91994dececca481c1af8ba6a9', class: createColorClasses(color, {
|
|
569
552
|
[mode]: true,
|
|
570
553
|
['picker-column-active']: isActive,
|
|
571
554
|
['picker-column-numeric-input']: numericInput,
|
|
572
555
|
['picker-column-disabled']: disabled,
|
|
573
|
-
}) },
|
|
556
|
+
}) }, h("slot", { key: '02ce9e1dd7df91afcd50b06416552bcffb5dec98', name: "prefix" }), h("div", { key: '6dfd7d2429bec19244a6b1afb4448121963a031b', class: "picker-opts", ref: (el) => {
|
|
574
557
|
this.scrollEl = el;
|
|
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" })));
|
|
558
|
+
}, role: "slider", tabindex: this.disabled ? undefined : 0, "aria-label": this.ariaLabel, "aria-valuemin": 0, "aria-valuemax": 0, "aria-valuenow": 0, "aria-valuetext": this.getOptionValueText(this.activeItem), "aria-orientation": "vertical", onKeyDown: (ev) => this.onKeyDown(ev) }, h("div", { key: 'e30ce0b9cefbfe4d4441fa33acf595da31855c3f', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: '8be2bd293c12c6ba720d9b31d0d561a96f42e97d', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: '8afdcddddabbf646fbb55cb0ba4448309a2c1dd9', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("slot", { key: '6aa0dacc34d6848575ad5b122b9046982308ca43' }), h("div", { key: '92ec8a357414c1b779b11d1dd18fb87a7ee63982', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: 'b89457cb74b5907c25594ff6720ac54ca537e933', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: '5bbc92e6bc24de08e39873bf08c5b668373ac0f8', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0")), h("slot", { key: 'd7bf2b519214f0f3576a4ca79844ad97827dd97f', name: "suffix" })));
|
|
595
559
|
}
|
|
596
560
|
get el() { return getElement(this); }
|
|
597
561
|
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-C14Rvrme.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';
|
|
@@ -3,7 +3,7 @@
|
|
|
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-CTSyufhF.js';
|
|
6
|
-
import { s as safeCall } from './overlays-
|
|
6
|
+
import { s as safeCall } from './overlays-C14Rvrme.js';
|
|
7
7
|
import { g as getClassMap } from './theme-DiVJyqlX.js';
|
|
8
8
|
import './index-ZjP4CjeZ.js';
|
|
9
9
|
import './helpers-8KSQQGQy.js';
|
|
@@ -5,7 +5,7 @@ import { r as registerInstance, c as createEvent, f as printIonWarning, h, d as
|
|
|
5
5
|
import { c as createNotchController } from './notch-controller-lb417-kU.js';
|
|
6
6
|
import { i as isOptionSelected, c as compareOptions } from './compare-with-utils-sObYyvOy.js';
|
|
7
7
|
import { b as inheritAttributes, a as renderHiddenInput, n as focusVisibleElement } from './helpers-8KSQQGQy.js';
|
|
8
|
-
import { c as popoverController, b as actionSheetController, a as alertController, m as modalController, s as safeCall } from './overlays-
|
|
8
|
+
import { c as popoverController, b as actionSheetController, a as alertController, m as modalController, s as safeCall } from './overlays-C14Rvrme.js';
|
|
9
9
|
import { i as isRTL } from './dir-C53feagD.js';
|
|
10
10
|
import { h as hostContext, c as createColorClasses, g as getClassMap } from './theme-DiVJyqlX.js';
|
|
11
11
|
import { w as watchForOptions } from './watch-options-Dtdm8lKC.js';
|
|
@@ -40,10 +40,6 @@ const Textarea = class {
|
|
|
40
40
|
* is applied in both cases.
|
|
41
41
|
*/
|
|
42
42
|
this.hasFocus = false;
|
|
43
|
-
/**
|
|
44
|
-
* Track validation state for proper aria-live announcements
|
|
45
|
-
*/
|
|
46
|
-
this.isInvalid = false;
|
|
47
43
|
/**
|
|
48
44
|
* Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.
|
|
49
45
|
* Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
|
|
@@ -190,31 +186,10 @@ const Textarea = class {
|
|
|
190
186
|
this.el.click();
|
|
191
187
|
}
|
|
192
188
|
}
|
|
193
|
-
/**
|
|
194
|
-
* Checks if the textarea is in an invalid state based on validation classes
|
|
195
|
-
*/
|
|
196
|
-
checkValidationState() {
|
|
197
|
-
return this.el.classList.contains('ion-touched') && this.el.classList.contains('ion-invalid');
|
|
198
|
-
}
|
|
199
189
|
connectedCallback() {
|
|
200
190
|
const { el } = this;
|
|
201
191
|
this.slotMutationController = createSlotMutationController(el, ['label', 'start', 'end'], () => forceUpdate(this));
|
|
202
192
|
this.notchController = createNotchController(el, () => this.notchSpacerEl, () => this.labelSlot);
|
|
203
|
-
// Watch for class changes to update validation state
|
|
204
|
-
if (typeof MutationObserver !== 'undefined') {
|
|
205
|
-
this.validationObserver = new MutationObserver(() => {
|
|
206
|
-
const newIsInvalid = this.checkValidationState();
|
|
207
|
-
if (this.isInvalid !== newIsInvalid) {
|
|
208
|
-
this.isInvalid = newIsInvalid;
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
this.validationObserver.observe(el, {
|
|
212
|
-
attributes: true,
|
|
213
|
-
attributeFilter: ['class'],
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
// Always set initial state
|
|
217
|
-
this.isInvalid = this.checkValidationState();
|
|
218
193
|
this.debounceChanged();
|
|
219
194
|
{
|
|
220
195
|
document.dispatchEvent(new CustomEvent('ionInputDidLoad', {
|
|
@@ -236,11 +211,6 @@ const Textarea = class {
|
|
|
236
211
|
this.notchController.destroy();
|
|
237
212
|
this.notchController = undefined;
|
|
238
213
|
}
|
|
239
|
-
// Clean up validation observer to prevent memory leaks
|
|
240
|
-
if (this.validationObserver) {
|
|
241
|
-
this.validationObserver.disconnect();
|
|
242
|
-
this.validationObserver = undefined;
|
|
243
|
-
}
|
|
244
214
|
}
|
|
245
215
|
componentWillLoad() {
|
|
246
216
|
this.inheritedAttributes = Object.assign(Object.assign({}, inheritAriaAttributes(this.el)), inheritAttributes(this.el, ['data-form-type', 'title', 'tabindex', 'dir']));
|
|
@@ -418,8 +388,8 @@ const Textarea = class {
|
|
|
418
388
|
];
|
|
419
389
|
}
|
|
420
390
|
getHintTextID() {
|
|
421
|
-
const {
|
|
422
|
-
if (
|
|
391
|
+
const { el, helperText, errorText, helperTextId, errorTextId } = this;
|
|
392
|
+
if (el.classList.contains('ion-touched') && el.classList.contains('ion-invalid') && errorText) {
|
|
423
393
|
return errorTextId;
|
|
424
394
|
}
|
|
425
395
|
if (helperText) {
|
|
@@ -478,7 +448,7 @@ const Textarea = class {
|
|
|
478
448
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
479
449
|
*/
|
|
480
450
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
481
|
-
return (h(Host, { key: '
|
|
451
|
+
return (h(Host, { key: 'd9f2ede0107987fc42c99e310cd2336bad5a5755', class: createColorClasses(this.color, {
|
|
482
452
|
[mode]: true,
|
|
483
453
|
'has-value': hasValue,
|
|
484
454
|
'has-focus': hasFocus,
|
|
@@ -487,7 +457,7 @@ const Textarea = class {
|
|
|
487
457
|
[`textarea-shape-${shape}`]: shape !== undefined,
|
|
488
458
|
[`textarea-label-placement-${labelPlacement}`]: true,
|
|
489
459
|
'textarea-disabled': disabled,
|
|
490
|
-
}) }, h("label", { key: '
|
|
460
|
+
}) }, h("label", { key: '9de598b95237462bb3bccffaefe83afbb43554b8', class: "textarea-wrapper", htmlFor: inputId, onClick: this.onLabelClick }, this.renderLabelContainer(), h("div", { key: 'e33c426c6541d723ccc246bb404c03687726ff83', class: "textarea-wrapper-inner" }, h("div", { key: '521e11af9d54d281b0a2b1c25bcfc6f742c18296', class: "start-slot-wrapper" }, h("slot", { key: '515523f6ca3ce0e5dd08f3275c21a190fb1ca177', name: "start" })), h("div", { key: '916e01e00de8400ae00ef06bc1fb62d8be2eee08', class: "native-wrapper", ref: (el) => (this.textareaWrapper = el) }, h("textarea", Object.assign({ key: '810271e6532d90e27dab1fcb26546113c1ce9cb0', 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.getHintTextID() === this.errorTextId }, this.inheritedAttributes), value)), h("div", { key: '80aca9ea9546dca9d38efd291a6b0be384bb6978', class: "end-slot-wrapper" }, h("slot", { key: '407fab16c66a9f4a542369bfecc0d9afa0065977', name: "end" }))), shouldRenderHighlight && h("div", { key: 'f00523a6698fac8a1996e04303487bef01d10f25', class: "textarea-highlight" })), this.renderBottomContent()));
|
|
491
461
|
}
|
|
492
462
|
get el() { return getElement(this); }
|
|
493
463
|
static get watchers() { return {
|