voyager-ionic-core 8.7.6 → 8.7.9
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/button.js +3 -7
- package/components/checkbox.js +4 -7
- package/components/header.js +42 -4
- package/components/index2.js +74 -3
- package/components/ion-accordion.js +93 -14
- package/components/ion-input.js +6 -14
- package/components/ion-select.js +58 -10
- package/components/ion-textarea.js +5 -13
- package/components/ion-toggle.js +4 -7
- package/components/{notch-controller.js → validity.js} +14 -1
- package/dist/cjs/{index-CD5Rjp23.js → index-094mMFB-.js} +76 -5
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/ion-accordion_2.cjs.entry.js +91 -13
- package/dist/cjs/ion-app_8.cjs.entry.js +43 -5
- package/dist/cjs/ion-button_2.cjs.entry.js +3 -7
- package/dist/cjs/ion-checkbox.cjs.entry.js +4 -7
- package/dist/cjs/ion-input.cjs.entry.js +7 -15
- package/dist/cjs/ion-modal.cjs.entry.js +1 -1
- package/dist/cjs/ion-nav_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +1 -1
- package/dist/cjs/ion-select_3.cjs.entry.js +56 -10
- package/dist/cjs/ion-textarea.cjs.entry.js +6 -14
- package/dist/cjs/ion-toggle.cjs.entry.js +4 -7
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/{ios.transition-j9CclgEW.js → ios.transition-BOt_uW73.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{md.transition-CwFyRSfv.js → md.transition-Dt968VXB.js} +1 -1
- package/dist/cjs/{notch-controller-Bzqhjm4f.js → validity-C8QoAYT2.js} +14 -0
- package/dist/collection/components/accordion/accordion.js +93 -14
- package/dist/collection/components/button/button.js +3 -7
- package/dist/collection/components/checkbox/checkbox.js +4 -7
- package/dist/collection/components/header/header.ios.css +27 -1
- package/dist/collection/components/header/header.js +5 -4
- package/dist/collection/components/header/header.utils.js +37 -0
- package/dist/collection/components/input/input.js +6 -14
- package/dist/collection/components/select/select.js +59 -11
- package/dist/collection/components/textarea/textarea.js +5 -13
- package/dist/collection/components/toggle/toggle.js +4 -7
- package/dist/collection/utils/forms/index.js +1 -0
- package/dist/collection/utils/forms/validity.js +15 -0
- package/dist/collection/utils/test/playwright/page/utils/spy-on-event.js +32 -0
- package/dist/collection/utils/transition/index.js +74 -3
- package/dist/docs.json +1 -1
- package/dist/esm/{index-D6G2seR8.js → index-r2D9DEro.js} +76 -5
- package/dist/esm/index.js +3 -3
- package/dist/esm/ion-accordion_2.entry.js +91 -13
- package/dist/esm/ion-app_8.entry.js +43 -5
- package/dist/esm/ion-button_2.entry.js +3 -7
- package/dist/esm/ion-checkbox.entry.js +4 -7
- package/dist/esm/ion-input.entry.js +6 -14
- package/dist/esm/ion-modal.entry.js +1 -1
- package/dist/esm/ion-nav_2.entry.js +1 -1
- package/dist/esm/ion-popover.entry.js +1 -1
- package/dist/esm/ion-select_3.entry.js +55 -9
- package/dist/esm/ion-textarea.entry.js +5 -13
- package/dist/esm/ion-toggle.entry.js +4 -7
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/{ios.transition-Bpq9ixwv.js → ios.transition-BDzw0_Hm.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{md.transition-zOA0oanq.js → md.transition-BzDYi3qq.js} +1 -1
- package/dist/esm/{notch-controller-BwelN_JM.js → validity-B8oWougr.js} +14 -1
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-43ed1ef5.entry.js +4 -0
- package/dist/ionic/p-4cc26913.entry.js +4 -0
- package/dist/ionic/{p-323421af.entry.js → p-5a39a99a.entry.js} +1 -1
- package/dist/ionic/p-5fb517e4.entry.js +4 -0
- package/dist/ionic/p-8bdfc8f6.entry.js +4 -0
- package/dist/ionic/{p-9a36e2e7.entry.js → p-95bddd49.entry.js} +1 -1
- package/dist/ionic/{p-DPhQmGJN.js → p-C7hRNDhM.js} +1 -1
- package/dist/ionic/p-DUt5fQmA.js +4 -0
- package/dist/ionic/{p-9R1XyICs.js → p-DZRJwG4S.js} +1 -1
- package/dist/ionic/{p-DCv9sLH2.js → p-DieJyvMP.js} +1 -1
- package/dist/ionic/p-d0a2a1ab.entry.js +4 -0
- package/dist/ionic/p-dc2e126d.entry.js +4 -0
- package/dist/ionic/{p-de7b5fa3.entry.js → p-e16b69e1.entry.js} +1 -1
- package/dist/ionic/p-f65f9308.entry.js +4 -0
- package/dist/ionic/p-fc278823.entry.js +4 -0
- package/dist/ionic/svg/checkbox-outline.svg +1 -0
- package/dist/ionic/svg/checkbox-sharp.svg +1 -0
- package/dist/ionic/svg/checkbox.svg +1 -0
- package/dist/ionic/svg/checkmark-circle-outline.svg +1 -0
- package/dist/ionic/svg/checkmark-circle-sharp.svg +1 -0
- package/dist/ionic/svg/checkmark-circle.svg +1 -0
- package/dist/ionic/svg/checkmark-done-circle-outline.svg +1 -0
- package/dist/ionic/svg/checkmark-done-circle-sharp.svg +1 -0
- package/dist/ionic/svg/checkmark-done-circle.svg +1 -0
- package/dist/ionic/svg/checkmark-done-outline.svg +1 -0
- package/dist/ionic/svg/checkmark-done-sharp.svg +1 -0
- package/dist/ionic/svg/checkmark-done.svg +1 -0
- package/dist/ionic/svg/checkmark-outline.svg +1 -0
- package/dist/ionic/svg/checkmark-sharp.svg +1 -0
- package/dist/ionic/svg/checkmark.svg +1 -0
- package/dist/ionic/svg/chevron-back-circle-outline.svg +1 -0
- package/dist/ionic/svg/chevron-back-circle-sharp.svg +1 -0
- package/dist/ionic/svg/chevron-back-circle.svg +1 -0
- package/dist/ionic/svg/chevron-back-outline.svg +1 -0
- package/dist/ionic/svg/chevron-back-sharp.svg +1 -0
- package/dist/ionic/svg/chevron-back.svg +1 -0
- package/dist/ionic/svg/chevron-collapse-outline.svg +1 -0
- package/dist/ionic/svg/chevron-collapse-sharp.svg +1 -0
- package/dist/ionic/svg/chevron-collapse.svg +1 -0
- package/dist/ionic/svg/chevron-down-circle-outline.svg +1 -0
- package/dist/ionic/svg/chevron-down-circle-sharp.svg +1 -0
- package/dist/ionic/svg/chevron-down-circle.svg +1 -0
- package/dist/ionic/svg/chevron-down-outline.svg +1 -0
- package/dist/ionic/svg/chevron-down-sharp.svg +1 -0
- package/dist/ionic/svg/chevron-down.svg +1 -0
- package/dist/ionic/svg/chevron-expand-outline.svg +1 -0
- package/dist/ionic/svg/chevron-expand-sharp.svg +1 -0
- package/dist/ionic/svg/chevron-expand.svg +1 -0
- package/dist/ionic/svg/chevron-forward-circle-outline.svg +1 -0
- package/dist/ionic/svg/chevron-forward-circle-sharp.svg +1 -0
- package/dist/ionic/svg/chevron-forward-circle.svg +1 -0
- package/dist/ionic/svg/chevron-forward-outline.svg +1 -0
- package/dist/ionic/svg/chevron-forward-sharp.svg +1 -0
- package/dist/ionic/svg/chevron-forward.svg +1 -0
- package/dist/ionic/svg/chevron-up-circle-outline.svg +1 -0
- package/dist/ionic/svg/chevron-up-circle-sharp.svg +1 -0
- package/dist/ionic/svg/chevron-up-circle.svg +1 -0
- package/dist/ionic/svg/chevron-up-outline.svg +1 -0
- package/dist/ionic/svg/chevron-up-sharp.svg +1 -0
- package/dist/ionic/svg/chevron-up.svg +1 -0
- package/dist/ionic/svg/clipboard-outline.svg +1 -0
- package/dist/ionic/svg/clipboard-sharp.svg +1 -0
- package/dist/ionic/svg/clipboard.svg +1 -0
- package/dist/ionic/svg/close-circle-outline.svg +1 -0
- package/dist/ionic/svg/close-circle-sharp.svg +1 -0
- package/dist/ionic/svg/close-circle.svg +1 -0
- package/dist/ionic/svg/close-outline.svg +1 -0
- package/dist/ionic/svg/close-sharp.svg +1 -0
- package/dist/ionic/svg/close.svg +1 -0
- package/dist/ionic/svg/cloud-circle-outline.svg +1 -0
- package/dist/ionic/svg/cloud-circle-sharp.svg +1 -0
- package/dist/ionic/svg/cloud-circle.svg +1 -0
- package/dist/ionic/svg/cloud-done-outline.svg +1 -0
- package/dist/ionic/svg/cloud-done-sharp.svg +1 -0
- package/dist/ionic/svg/cloud-done.svg +1 -0
- package/dist/ionic/svg/cloud-download-outline.svg +1 -0
- package/dist/ionic/svg/cloud-download-sharp.svg +1 -0
- package/dist/ionic/svg/cloud-download.svg +1 -0
- package/dist/ionic/svg/cloud-offline-outline.svg +1 -0
- package/dist/ionic/svg/cloud-offline-sharp.svg +1 -0
- package/dist/ionic/svg/cloud-offline.svg +1 -0
- package/dist/ionic/svg/cloud-outline.svg +1 -0
- package/dist/ionic/svg/cloud-sharp.svg +1 -0
- package/dist/ionic/svg/cloud-upload-outline.svg +1 -0
- package/dist/ionic/svg/cloud-upload-sharp.svg +1 -0
- package/dist/ionic/svg/cloud-upload.svg +1 -0
- package/dist/ionic/svg/cloud.svg +1 -0
- package/dist/ionic/svg/cloudy-night-outline.svg +1 -0
- package/dist/ionic/svg/cloudy-night-sharp.svg +1 -0
- package/dist/ionic/svg/cloudy-night.svg +1 -0
- package/dist/ionic/svg/cloudy-outline.svg +1 -0
- package/dist/ionic/svg/cloudy-sharp.svg +1 -0
- package/dist/ionic/svg/cloudy.svg +1 -0
- package/dist/ionic/svg/code-download-outline.svg +1 -0
- package/dist/ionic/svg/code-download-sharp.svg +1 -0
- package/dist/ionic/svg/code-download.svg +1 -0
- package/dist/ionic/svg/code-outline.svg +1 -0
- package/dist/ionic/svg/code-sharp.svg +1 -0
- package/dist/ionic/svg/code-slash-outline.svg +1 -0
- package/dist/ionic/svg/code-slash-sharp.svg +1 -0
- package/dist/ionic/svg/code-slash.svg +1 -0
- package/dist/ionic/svg/code-working-outline.svg +1 -0
- package/dist/ionic/svg/code-working-sharp.svg +1 -0
- package/dist/ionic/svg/code-working.svg +1 -0
- package/dist/ionic/svg/code.svg +1 -0
- package/dist/ionic/svg/cog-outline.svg +1 -0
- package/dist/ionic/svg/cog-sharp.svg +1 -0
- package/dist/ionic/svg/cog.svg +1 -0
- package/dist/ionic/svg/color-fill-outline.svg +1 -0
- package/dist/ionic/svg/color-fill-sharp.svg +1 -0
- package/dist/ionic/svg/color-fill.svg +1 -0
- package/dist/ionic/svg/color-filter-outline.svg +1 -0
- package/dist/ionic/svg/color-filter-sharp.svg +1 -0
- package/dist/ionic/svg/color-filter.svg +1 -0
- package/dist/ionic/svg/color-palette-outline.svg +1 -0
- package/dist/ionic/svg/color-palette-sharp.svg +1 -0
- package/dist/ionic/svg/color-palette.svg +1 -0
- package/dist/ionic/svg/color-wand-outline.svg +1 -0
- package/dist/ionic/svg/color-wand-sharp.svg +1 -0
- package/dist/ionic/svg/color-wand.svg +1 -0
- package/dist/ionic/svg/compass-outline.svg +1 -0
- package/dist/ionic/svg/compass-sharp.svg +1 -0
- package/dist/ionic/svg/compass.svg +1 -0
- package/dist/ionic/svg/construct-outline.svg +1 -0
- package/dist/ionic/svg/construct-sharp.svg +1 -0
- package/dist/ionic/svg/construct.svg +1 -0
- package/dist/ionic/svg/contract-outline.svg +1 -0
- package/dist/ionic/svg/contract-sharp.svg +1 -0
- package/dist/ionic/svg/contract.svg +1 -0
- package/dist/ionic/svg/contrast-outline.svg +1 -0
- package/dist/ionic/svg/contrast-sharp.svg +1 -0
- package/dist/ionic/svg/contrast.svg +1 -0
- package/dist/ionic/svg/copy-outline.svg +1 -0
- package/dist/ionic/svg/copy-sharp.svg +1 -0
- package/dist/ionic/svg/copy.svg +1 -0
- package/dist/ionic/svg/create-outline.svg +1 -0
- package/dist/ionic/svg/create-sharp.svg +1 -0
- package/dist/ionic/svg/create.svg +1 -0
- package/dist/ionic/svg/crop-outline.svg +1 -0
- package/dist/ionic/svg/crop-sharp.svg +1 -0
- package/dist/ionic/svg/crop.svg +1 -0
- package/dist/ionic/svg/cube-outline.svg +1 -0
- package/dist/ionic/svg/cube-sharp.svg +1 -0
- package/dist/ionic/svg/cube.svg +1 -0
- package/dist/ionic/svg/cut-outline.svg +1 -0
- package/dist/ionic/svg/cut-sharp.svg +1 -0
- package/dist/ionic/svg/cut.svg +1 -0
- package/dist/ionic/svg/desktop-outline.svg +1 -0
- package/dist/ionic/svg/desktop-sharp.svg +1 -0
- package/dist/ionic/svg/desktop.svg +1 -0
- package/dist/ionic/svg/diamond-outline.svg +1 -0
- package/dist/ionic/svg/diamond-sharp.svg +1 -0
- package/dist/ionic/svg/diamond.svg +1 -0
- package/dist/ionic/svg/dice-outline.svg +1 -0
- package/dist/ionic/svg/dice-sharp.svg +1 -0
- package/dist/ionic/svg/dice.svg +1 -0
- package/dist/ionic/svg/disc-outline.svg +1 -0
- package/dist/ionic/svg/disc-sharp.svg +1 -0
- package/dist/ionic/svg/disc.svg +1 -0
- package/dist/ionic/svg/document-attach-outline.svg +1 -0
- package/dist/ionic/svg/document-attach-sharp.svg +1 -0
- package/dist/ionic/svg/document-attach.svg +1 -0
- package/dist/ionic/svg/document-lock-outline.svg +1 -0
- package/dist/ionic/svg/document-lock-sharp.svg +1 -0
- package/dist/ionic/svg/document-lock.svg +1 -0
- package/dist/ionic/svg/document-outline.svg +1 -0
- package/dist/types/components/accordion/accordion.d.ts +18 -1
- package/dist/types/components/checkbox/checkbox.d.ts +0 -1
- package/dist/types/components/header/header.utils.d.ts +10 -0
- package/dist/types/components/input/input.d.ts +0 -4
- package/dist/types/components/select/select.d.ts +6 -0
- package/dist/types/components/textarea/textarea.d.ts +0 -4
- package/dist/types/components/toggle/toggle.d.ts +0 -1
- package/dist/types/utils/forms/index.d.ts +1 -0
- package/dist/types/utils/forms/validity.d.ts +10 -0
- package/dist/types/utils/transition/index.d.ts +9 -0
- package/hydrate/index.js +262 -73
- package/hydrate/index.mjs +262 -73
- package/package.json +3 -3
- package/dist/ionic/p-1c8a476d.entry.js +0 -4
- package/dist/ionic/p-3355a2ff.entry.js +0 -4
- package/dist/ionic/p-62e50f80.entry.js +0 -4
- package/dist/ionic/p-785026d7.entry.js +0 -4
- package/dist/ionic/p-78c74a3e.entry.js +0 -4
- package/dist/ionic/p-83fc84e7.entry.js +0 -4
- package/dist/ionic/p-913a7c1e.entry.js +0 -4
- package/dist/ionic/p-CMhMiYSX.js +0 -4
- package/dist/ionic/p-c17c0a01.entry.js +0 -4
|
@@ -12,7 +12,7 @@ import { c as createKeyboardController } from './keyboard-controller-BaaVITYt.js
|
|
|
12
12
|
import { g as getTimeGivenProgression } from './cubic-bezier-hHmYLOfE.js';
|
|
13
13
|
import { a as attachComponent, d as detachComponent } from './framework-delegate-BYawdMXj.js';
|
|
14
14
|
import { c as createLockController } from './lock-controller-B-hirT0v.js';
|
|
15
|
-
import { t as transition } from './index-
|
|
15
|
+
import { t as transition } from './index-r2D9DEro.js';
|
|
16
16
|
import './index-ZjP4CjeZ.js';
|
|
17
17
|
import './keyboard-CUw4ekVy.js';
|
|
18
18
|
import './capacitor-CFERIeaU.js';
|
|
@@ -708,6 +708,8 @@ Footer.style = {
|
|
|
708
708
|
};
|
|
709
709
|
|
|
710
710
|
const TRANSITION = 'all 0.2s ease-in-out';
|
|
711
|
+
const ROLE_NONE = 'none';
|
|
712
|
+
const ROLE_BANNER = 'banner';
|
|
711
713
|
const cloneElement = (tagName) => {
|
|
712
714
|
const getCachedEl = document.querySelector(`${tagName}.ion-cloned-element`);
|
|
713
715
|
if (getCachedEl !== null) {
|
|
@@ -834,6 +836,7 @@ const setHeaderActive = (headerIndex, active = true) => {
|
|
|
834
836
|
const toolbars = headerIndex.toolbars;
|
|
835
837
|
const ionTitles = toolbars.map((toolbar) => toolbar.ionTitleEl);
|
|
836
838
|
if (active) {
|
|
839
|
+
headerEl.setAttribute('role', ROLE_BANNER);
|
|
837
840
|
headerEl.classList.remove('header-collapse-condense-inactive');
|
|
838
841
|
ionTitles.forEach((ionTitle) => {
|
|
839
842
|
if (ionTitle) {
|
|
@@ -842,6 +845,16 @@ const setHeaderActive = (headerIndex, active = true) => {
|
|
|
842
845
|
});
|
|
843
846
|
}
|
|
844
847
|
else {
|
|
848
|
+
/**
|
|
849
|
+
* There can only be one banner landmark per page.
|
|
850
|
+
* By default, all ion-headers have the banner role.
|
|
851
|
+
* This causes an accessibility issue when using a
|
|
852
|
+
* condensed header since there are two ion-headers
|
|
853
|
+
* on the page at once (active and inactive).
|
|
854
|
+
* To solve this, the role needs to be toggled
|
|
855
|
+
* based on which header is active.
|
|
856
|
+
*/
|
|
857
|
+
headerEl.setAttribute('role', ROLE_NONE);
|
|
845
858
|
headerEl.classList.add('header-collapse-condense-inactive');
|
|
846
859
|
/**
|
|
847
860
|
* The small title should only be accessed by screen readers
|
|
@@ -901,8 +914,32 @@ const handleHeaderFade = (scrollEl, baseEl, condenseHeader) => {
|
|
|
901
914
|
});
|
|
902
915
|
});
|
|
903
916
|
};
|
|
917
|
+
/**
|
|
918
|
+
* Get the role type for the ion-header.
|
|
919
|
+
*
|
|
920
|
+
* @param isInsideMenu If ion-header is inside ion-menu.
|
|
921
|
+
* @param isCondensed If ion-header has collapse="condense".
|
|
922
|
+
* @param mode The current mode.
|
|
923
|
+
* @returns 'none' if inside ion-menu or if condensed in md
|
|
924
|
+
* mode, otherwise 'banner'.
|
|
925
|
+
*/
|
|
926
|
+
const getRoleType = (isInsideMenu, isCondensed, mode) => {
|
|
927
|
+
// If the header is inside a menu, it should not have the banner role.
|
|
928
|
+
if (isInsideMenu) {
|
|
929
|
+
return ROLE_NONE;
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* Only apply role="none" to `md` mode condensed headers
|
|
933
|
+
* since the large header is never shown.
|
|
934
|
+
*/
|
|
935
|
+
if (isCondensed && mode === 'md') {
|
|
936
|
+
return ROLE_NONE;
|
|
937
|
+
}
|
|
938
|
+
// Default to banner role.
|
|
939
|
+
return ROLE_BANNER;
|
|
940
|
+
};
|
|
904
941
|
|
|
905
|
-
const headerIosCss = "ion-header{display:block;position:relative;-ms-flex-order:-1;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-ios ion-toolbar:last-of-type{--border-width:0 0 0.55px}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.header-background{left:0;right:0;top:0;bottom:0;position:absolute;-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}.header-translucent-ios ion-toolbar{--opacity:.8}.header-collapse-condense-inactive .header-background{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.header-ios.ion-no-border ion-toolbar:last-of-type{--border-width:0}.header-collapse-fade ion-toolbar{--opacity-scale:inherit}.header-collapse-condense{z-index:9}.header-collapse-condense ion-toolbar{position:-webkit-sticky;position:sticky;top:0}.header-collapse-condense ion-toolbar:first-of-type{padding-top:0px;z-index:1}.header-collapse-condense ion-toolbar{
|
|
942
|
+
const headerIosCss = "ion-header{display:block;position:relative;-ms-flex-order:-1;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-ios ion-toolbar:last-of-type{--border-width:0 0 0.55px}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.header-background{left:0;right:0;top:0;bottom:0;position:absolute;-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}.header-translucent-ios ion-toolbar{--opacity:.8}.header-collapse-condense-inactive .header-background{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.header-ios.ion-no-border ion-toolbar:last-of-type{--border-width:0}.header-collapse-fade ion-toolbar{--opacity-scale:inherit}.header-collapse-fade.header-transitioning ion-toolbar{--background:transparent;--border-style:none}.header-collapse-condense{z-index:9}.header-collapse-condense ion-toolbar{position:-webkit-sticky;position:sticky;top:0}.header-collapse-condense ion-toolbar:first-of-type{padding-top:0px;z-index:1}.header-collapse-condense ion-toolbar{z-index:0}.header-collapse-condense ion-toolbar:last-of-type{--border-width:0px}.header-collapse-condense ion-toolbar ion-searchbar{padding-top:0px;padding-bottom:13px}.header-collapse-main{--opacity-scale:1}.header-collapse-main ion-toolbar{--opacity-scale:inherit}.header-collapse-main ion-toolbar.in-toolbar ion-title,.header-collapse-main ion-toolbar.in-toolbar ion-buttons{-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.header-collapse-condense ion-toolbar,.header-collapse-condense-inactive.header-transitioning:not(.header-collapse-condense) ion-toolbar{--background:var(--ion-background-color, #fff)}.header-collapse-condense-inactive.header-transitioning:not(.header-collapse-condense) ion-toolbar{--border-style:none;--opacity-scale:1}.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-buttons.buttons-collapse{opacity:0;pointer-events:none}.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-buttons.buttons-collapse{visibility:hidden}ion-header.header-ios:not(.header-collapse-main):has(~ion-content ion-header.header-ios[collapse=condense],~ion-content ion-header.header-ios.header-collapse-condense){opacity:0}";
|
|
906
943
|
|
|
907
944
|
const headerMdCss = "ion-header{display:block;position:relative;-ms-flex-order:-1;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-md{-webkit-box-shadow:0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12);box-shadow:0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12)}.header-collapse-condense{display:none}.header-md.ion-no-border{-webkit-box-shadow:none;box-shadow:none}";
|
|
908
945
|
|
|
@@ -1042,16 +1079,17 @@ const Header = class {
|
|
|
1042
1079
|
const { translucent, inheritedAttributes } = this;
|
|
1043
1080
|
const mode = getIonMode(this);
|
|
1044
1081
|
const collapse = this.collapse || 'none';
|
|
1082
|
+
const isCondensed = collapse === 'condense';
|
|
1045
1083
|
// banner role must be at top level, so remove role if inside a menu
|
|
1046
|
-
const roleType = hostContext('ion-menu', this.el)
|
|
1047
|
-
return (h(Host, Object.assign({ key: '
|
|
1084
|
+
const roleType = getRoleType(hostContext('ion-menu', this.el), isCondensed, mode);
|
|
1085
|
+
return (h(Host, Object.assign({ key: '863c4568cd7b8c0ec55109f193bbbaed68a1346e', role: roleType, class: {
|
|
1048
1086
|
[mode]: true,
|
|
1049
1087
|
// Used internally for styling
|
|
1050
1088
|
[`header-${mode}`]: true,
|
|
1051
1089
|
[`header-translucent`]: this.translucent,
|
|
1052
1090
|
[`header-collapse-${collapse}`]: true,
|
|
1053
1091
|
[`header-translucent-${mode}`]: this.translucent,
|
|
1054
|
-
} }, inheritedAttributes), mode === 'ios' && translucent && h("div", { key: '
|
|
1092
|
+
} }, inheritedAttributes), mode === 'ios' && translucent && h("div", { key: '25c3bdce328b0b35607d154c8b8374679313d881', class: "header-background" }), h("slot", { key: 'b44fab0a9be7920b9650da26117c783e751e1702' })));
|
|
1055
1093
|
}
|
|
1056
1094
|
get el() { return getElement(this); }
|
|
1057
1095
|
};
|
|
@@ -213,11 +213,7 @@ const Button = class {
|
|
|
213
213
|
target,
|
|
214
214
|
};
|
|
215
215
|
let fill = this.fill;
|
|
216
|
-
|
|
217
|
-
* We check both undefined and null to
|
|
218
|
-
* work around https://github.com/ionic-team/stencil/issues/3586.
|
|
219
|
-
*/
|
|
220
|
-
if (fill == null) {
|
|
216
|
+
if (fill === undefined) {
|
|
221
217
|
fill = this.inToolbar || this.inListHeader ? 'clear' : 'solid';
|
|
222
218
|
}
|
|
223
219
|
/**
|
|
@@ -230,7 +226,7 @@ const Button = class {
|
|
|
230
226
|
{
|
|
231
227
|
type !== 'button' && this.renderHiddenButton();
|
|
232
228
|
}
|
|
233
|
-
return (h(Host, { key: '
|
|
229
|
+
return (h(Host, { key: 'ed82ea53705523f9afc5f1a9addff44cc6424f27', onClick: this.handleClick, "aria-disabled": disabled ? 'true' : null, class: createColorClasses$1(color, {
|
|
234
230
|
[mode]: true,
|
|
235
231
|
[buttonType]: true,
|
|
236
232
|
[`${buttonType}-${expand}`]: expand !== undefined,
|
|
@@ -245,7 +241,7 @@ const Button = class {
|
|
|
245
241
|
'button-disabled': disabled,
|
|
246
242
|
'ion-activatable': true,
|
|
247
243
|
'ion-focusable': true,
|
|
248
|
-
}) }, h(TagType, Object.assign({ key: '
|
|
244
|
+
}) }, h(TagType, Object.assign({ key: 'fadec13053469dd0405bbbc61b70ced568aa4826' }, attrs, { class: "button-native", part: "native", disabled: disabled, onFocus: this.onFocus, onBlur: this.onBlur }, inheritedAttributes), h("span", { key: '6bf0e5144fb1148002e88038522402b789689d2c', class: "button-inner" }, h("slot", { key: '25da0ca155cfa9e2754842c34f4fd09f576ac2d2', name: "icon-only", onSlotchange: this.slotChanged }), h("slot", { key: '51414065bb11953ec9d818f8d9353589bc9072c5', name: "start" }), h("slot", { key: 'c9b5f8842aeabd20628df2f4600f1257ea913d8d' }), h("slot", { key: '478dd3671c7be1909fc84e672f0fa8dfe6082263', name: "end" })), mode === 'md' && h("ion-ripple-effect", { key: 'e1d55f85a55144d743f58a5914cd116cb065fa8c', type: this.rippleType }))));
|
|
249
245
|
}
|
|
250
246
|
get el() { return getElement(this); }
|
|
251
247
|
static get watchers() { return {
|
|
@@ -74,7 +74,6 @@ const Checkbox = class {
|
|
|
74
74
|
};
|
|
75
75
|
this.toggleChecked = (ev) => {
|
|
76
76
|
ev.preventDefault();
|
|
77
|
-
this.setFocus();
|
|
78
77
|
this.setChecked(!this.checked);
|
|
79
78
|
this.indeterminate = false;
|
|
80
79
|
};
|
|
@@ -111,9 +110,7 @@ const Checkbox = class {
|
|
|
111
110
|
}
|
|
112
111
|
/** @internal */
|
|
113
112
|
async setFocus() {
|
|
114
|
-
|
|
115
|
-
this.focusEl.focus();
|
|
116
|
-
}
|
|
113
|
+
this.el.focus();
|
|
117
114
|
}
|
|
118
115
|
getHintTextID() {
|
|
119
116
|
const { el, helperText, errorText, helperTextId, errorTextId } = this;
|
|
@@ -149,7 +146,7 @@ const Checkbox = class {
|
|
|
149
146
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
150
147
|
// The host element must have a checkbox role to ensure proper VoiceOver
|
|
151
148
|
// support in Safari for accessibility.
|
|
152
|
-
return (h(Host, { key: '
|
|
149
|
+
return (h(Host, { key: 'ee2e02d28f9d15a1ec746609f7e9559444f621e5', role: "checkbox", "aria-checked": indeterminate ? 'mixed' : `${checked}`, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId, "aria-labelledby": hasLabelContent ? this.inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick, class: createColorClasses(color, {
|
|
153
150
|
[mode]: true,
|
|
154
151
|
'in-item': hostContext('ion-item', el),
|
|
155
152
|
'checkbox-checked': checked,
|
|
@@ -159,10 +156,10 @@ const Checkbox = class {
|
|
|
159
156
|
[`checkbox-justify-${justify}`]: justify !== undefined,
|
|
160
157
|
[`checkbox-alignment-${alignment}`]: alignment !== undefined,
|
|
161
158
|
[`checkbox-label-placement-${labelPlacement}`]: true,
|
|
162
|
-
})
|
|
159
|
+
}) }, h("label", { key: '84d4c33da0348dc65ad36fb0fafd48be366dcf3b', class: "checkbox-wrapper", htmlFor: inputId }, h("input", Object.assign({ key: '427db69a3ab8a17aa0867519c90f585b8930406b', type: "checkbox", checked: checked ? true : undefined, disabled: disabled, id: inputId, onChange: this.toggleChecked, required: required }, inheritedAttributes)), h("div", { key: '9dda7024b3a4f1ee55351f783f9a10f9b4ad0d12', class: {
|
|
163
160
|
'label-text-wrapper': true,
|
|
164
161
|
'label-text-wrapper-hidden': !hasLabelContent,
|
|
165
|
-
}, part: "label", id: this.inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: '
|
|
162
|
+
}, part: "label", id: this.inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: 'f9d1d545ffd4164b650808241b51ea1bedc6a42c' }), this.renderHintText()), h("div", { key: 'a96d61ac324864228f14caa0e9f2c0d15418882e', class: "native-wrapper" }, h("svg", { key: '64ff3e4d87e190601811ef64323edec18d510cd1', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container", "aria-hidden": "true" }, path)))));
|
|
166
163
|
}
|
|
167
164
|
getSVGPath(mode, indeterminate) {
|
|
168
165
|
let path = indeterminate ? (h("path", { d: "M6 12L18 12", part: "mark" })) : (h("path", { d: "M5.9,12.5l3.8,3.8l8.8-8.8", part: "mark" }));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, c as createEvent, i as forceUpdate, h, d as Host, g as getElement } from './index-C8IsBmNU.js';
|
|
5
|
-
import { c as createNotchController } from './
|
|
5
|
+
import { c as createNotchController, a as checkInvalidState } from './validity-B8oWougr.js';
|
|
6
6
|
import { d as debounceEvent, i as inheritAriaAttributes, b as inheritAttributes, c as componentOnReady } from './helpers-DEn3pfjm.js';
|
|
7
7
|
import { c as createSlotMutationController, g as getCounterText } from './input.utils-DrvTa8gz.js';
|
|
8
8
|
import { h as hostContext, c as createColorClasses } from './theme-DiVJyqlX.js';
|
|
@@ -230,14 +230,6 @@ const Input = class {
|
|
|
230
230
|
componentWillLoad() {
|
|
231
231
|
this.inheritedAttributes = Object.assign(Object.assign({}, inheritAriaAttributes(this.el)), inheritAttributes(this.el, ['tabindex', 'title', 'data-form-type', 'dir']));
|
|
232
232
|
}
|
|
233
|
-
/**
|
|
234
|
-
* Checks if the input is in an invalid state based on Ionic validation classes
|
|
235
|
-
*/
|
|
236
|
-
checkInvalidState() {
|
|
237
|
-
const hasIonTouched = this.el.classList.contains('ion-touched');
|
|
238
|
-
const hasIonInvalid = this.el.classList.contains('ion-invalid');
|
|
239
|
-
return hasIonTouched && hasIonInvalid;
|
|
240
|
-
}
|
|
241
233
|
connectedCallback() {
|
|
242
234
|
const { el } = this;
|
|
243
235
|
this.slotMutationController = createSlotMutationController(el, ['label', 'start', 'end'], () => forceUpdate(this));
|
|
@@ -245,7 +237,7 @@ const Input = class {
|
|
|
245
237
|
// Watch for class changes to update validation state
|
|
246
238
|
if (typeof MutationObserver !== 'undefined') {
|
|
247
239
|
this.validationObserver = new MutationObserver(() => {
|
|
248
|
-
const newIsInvalid =
|
|
240
|
+
const newIsInvalid = checkInvalidState(el);
|
|
249
241
|
if (this.isInvalid !== newIsInvalid) {
|
|
250
242
|
this.isInvalid = newIsInvalid;
|
|
251
243
|
// Force a re-render to update aria-describedby immediately
|
|
@@ -258,7 +250,7 @@ const Input = class {
|
|
|
258
250
|
});
|
|
259
251
|
}
|
|
260
252
|
// Always set initial state
|
|
261
|
-
this.isInvalid =
|
|
253
|
+
this.isInvalid = checkInvalidState(el);
|
|
262
254
|
this.debounceChanged();
|
|
263
255
|
{
|
|
264
256
|
document.dispatchEvent(new CustomEvent('ionInputDidLoad', {
|
|
@@ -522,7 +514,7 @@ const Input = class {
|
|
|
522
514
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
523
515
|
*/
|
|
524
516
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
525
|
-
return (h(Host, { key: '
|
|
517
|
+
return (h(Host, { key: '97b5308021064d9e7434ef2d3d96f27045c1b0c4', class: createColorClasses(this.color, {
|
|
526
518
|
[mode]: true,
|
|
527
519
|
'has-value': hasValue,
|
|
528
520
|
'has-focus': hasFocus,
|
|
@@ -533,14 +525,14 @@ const Input = class {
|
|
|
533
525
|
'in-item': inItem,
|
|
534
526
|
'in-item-color': hostContext('ion-item.ion-color', this.el),
|
|
535
527
|
'input-disabled': disabled,
|
|
536
|
-
}) }, h("label", { key: '
|
|
528
|
+
}) }, h("label", { key: '353f68726ce180299bd9adc81e5ff7d26a48f54f', class: "input-wrapper", htmlFor: inputId, onClick: this.onLabelClick }, this.renderLabelContainer(), h("div", { key: '2034b4bad04fc157f3298a1805819216b6f439d0', class: "native-wrapper", onClick: this.onLabelClick }, h("slot", { key: '96bb5e30176b2bd76dfb75bfbf6c1c3d4403f4bb', name: "start" }), h("input", Object.assign({ key: '1a1d75b0e414a95c89d5a760757c33548d234aca', 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: '95f3df17b7691d9a2e7dcd4a51f16a94aa3ca36f', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
|
|
537
529
|
/**
|
|
538
530
|
* This prevents mobile browsers from
|
|
539
531
|
* blurring the input when the clear
|
|
540
532
|
* button is activated.
|
|
541
533
|
*/
|
|
542
534
|
ev.preventDefault();
|
|
543
|
-
}, onClick: this.clearTextInput }, h("ion-icon", { key: '
|
|
535
|
+
}, onClick: this.clearTextInput }, h("ion-icon", { key: '16b0af75eed50c8115fb5597f73b5fbf71c2530e', "aria-hidden": "true", icon: clearIconData }))), h("slot", { key: 'c48da0f8ddb3764ac43efa705bb4a6bb2d9cc2fd', name: "end" })), shouldRenderHighlight && h("div", { key: 'f15238481fc20de56ca7ecb6e350b3c024cc755e', class: "input-highlight" })), this.renderBottomContent()));
|
|
544
536
|
}
|
|
545
537
|
get el() { return getElement(this); }
|
|
546
538
|
static get watchers() { return {
|
|
@@ -9,7 +9,7 @@ import { c as createLockController } from './lock-controller-B-hirT0v.js';
|
|
|
9
9
|
import { g as getCapacitor } from './capacitor-CFERIeaU.js';
|
|
10
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-BymNv-BL.js';
|
|
11
11
|
import { g as getClassMap } from './theme-DiVJyqlX.js';
|
|
12
|
-
import { e as deepReady, w as waitForMount } from './index-
|
|
12
|
+
import { e as deepReady, w as waitForMount } from './index-r2D9DEro.js';
|
|
13
13
|
import { b as getIonMode } from './ionic-global-CDrldh-5.js';
|
|
14
14
|
import { KEYBOARD_DID_OPEN } from './keyboard-ywgs5efA.js';
|
|
15
15
|
import { c as createAnimation } from './animation-Dt8bGnA-.js';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { r as registerInstance, c as createEvent, e as config, f as printIonWarning, h, g as getElement, d as Host } from './index-C8IsBmNU.js';
|
|
5
5
|
import { g as getTimeGivenProgression } from './cubic-bezier-hHmYLOfE.js';
|
|
6
6
|
import { s as shallowEqualStringMap, l as assert } from './helpers-DEn3pfjm.js';
|
|
7
|
-
import { l as lifecycle, t as transition, s as setPageHidden, d as LIFECYCLE_WILL_UNLOAD, b as LIFECYCLE_WILL_LEAVE, c as LIFECYCLE_DID_LEAVE } from './index-
|
|
7
|
+
import { l as lifecycle, t as transition, s as setPageHidden, d as LIFECYCLE_WILL_UNLOAD, b as LIFECYCLE_WILL_LEAVE, c as LIFECYCLE_DID_LEAVE } from './index-r2D9DEro.js';
|
|
8
8
|
import { b as getIonMode } from './ionic-global-CDrldh-5.js';
|
|
9
9
|
import { a as attachComponent } from './framework-delegate-BYawdMXj.js';
|
|
10
10
|
|
|
@@ -8,7 +8,7 @@ import { g as getElementRoot, r as raf, f as addEventListener, h as hasLazyBuild
|
|
|
8
8
|
import { c as createLockController } from './lock-controller-B-hirT0v.js';
|
|
9
9
|
import { b as getIonMode, a as isPlatform } from './ionic-global-CDrldh-5.js';
|
|
10
10
|
import { g as getClassMap } from './theme-DiVJyqlX.js';
|
|
11
|
-
import { e as deepReady, w as waitForMount } from './index-
|
|
11
|
+
import { e as deepReady, w as waitForMount } from './index-r2D9DEro.js';
|
|
12
12
|
import { c as createAnimation } from './animation-Dt8bGnA-.js';
|
|
13
13
|
import './index-ZjP4CjeZ.js';
|
|
14
14
|
import './hardware-back-button-CPLxO-Ev.js';
|
|
@@ -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, i as forceUpdate } from './index-C8IsBmNU.js';
|
|
5
|
-
import { c as createNotchController } from './
|
|
5
|
+
import { c as createNotchController, a as checkInvalidState } from './validity-B8oWougr.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-DEn3pfjm.js';
|
|
8
8
|
import { c as popoverController, b as actionSheetController, a as alertController, m as modalController, s as safeCall } from './overlays-BymNv-BL.js';
|
|
@@ -43,6 +43,10 @@ const Select = class {
|
|
|
43
43
|
* is applied in both cases.
|
|
44
44
|
*/
|
|
45
45
|
this.hasFocus = false;
|
|
46
|
+
/**
|
|
47
|
+
* Track validation state for proper aria-live announcements.
|
|
48
|
+
*/
|
|
49
|
+
this.isInvalid = false;
|
|
46
50
|
/**
|
|
47
51
|
* The text to display on the cancel button.
|
|
48
52
|
*/
|
|
@@ -172,9 +176,46 @@ const Select = class {
|
|
|
172
176
|
*/
|
|
173
177
|
forceUpdate(this);
|
|
174
178
|
});
|
|
179
|
+
// Watch for class changes to update validation state.
|
|
180
|
+
if (typeof MutationObserver !== 'undefined') {
|
|
181
|
+
this.validationObserver = new MutationObserver(() => {
|
|
182
|
+
const newIsInvalid = checkInvalidState(this.el);
|
|
183
|
+
if (this.isInvalid !== newIsInvalid) {
|
|
184
|
+
this.isInvalid = newIsInvalid;
|
|
185
|
+
/**
|
|
186
|
+
* Screen readers tend to announce changes
|
|
187
|
+
* to `aria-describedby` when the attribute
|
|
188
|
+
* is changed during a blur event for a
|
|
189
|
+
* native form control.
|
|
190
|
+
* However, the announcement can be spotty
|
|
191
|
+
* when using a non-native form control
|
|
192
|
+
* and `forceUpdate()`.
|
|
193
|
+
* This is due to `forceUpdate()` internally
|
|
194
|
+
* rescheduling the DOM update to a lower
|
|
195
|
+
* priority queue regardless if it's called
|
|
196
|
+
* inside a Promise or not, thus causing
|
|
197
|
+
* the screen reader to potentially miss the
|
|
198
|
+
* change.
|
|
199
|
+
* By using a State variable inside a Promise,
|
|
200
|
+
* it guarantees a re-render immediately at
|
|
201
|
+
* a higher priority.
|
|
202
|
+
*/
|
|
203
|
+
Promise.resolve().then(() => {
|
|
204
|
+
this.hintTextID = this.getHintTextID();
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
this.validationObserver.observe(el, {
|
|
209
|
+
attributes: true,
|
|
210
|
+
attributeFilter: ['class'],
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
// Always set initial state
|
|
214
|
+
this.isInvalid = checkInvalidState(this.el);
|
|
175
215
|
}
|
|
176
216
|
componentWillLoad() {
|
|
177
217
|
this.inheritedAttributes = inheritAttributes(this.el, ['aria-label']);
|
|
218
|
+
this.hintTextID = this.getHintTextID();
|
|
178
219
|
}
|
|
179
220
|
componentDidLoad() {
|
|
180
221
|
/**
|
|
@@ -198,6 +239,11 @@ const Select = class {
|
|
|
198
239
|
this.notchController.destroy();
|
|
199
240
|
this.notchController = undefined;
|
|
200
241
|
}
|
|
242
|
+
// Clean up validation observer to prevent memory leaks.
|
|
243
|
+
if (this.validationObserver) {
|
|
244
|
+
this.validationObserver.disconnect();
|
|
245
|
+
this.validationObserver = undefined;
|
|
246
|
+
}
|
|
201
247
|
}
|
|
202
248
|
/**
|
|
203
249
|
* Open the select overlay. The overlay is either an alert, action sheet, or popover,
|
|
@@ -668,11 +714,11 @@ const Select = class {
|
|
|
668
714
|
}
|
|
669
715
|
renderListbox() {
|
|
670
716
|
const { disabled, inputId, isExpanded, required } = this;
|
|
671
|
-
return (h("button", { disabled: disabled, id: inputId, "aria-label": this.ariaLabel, "aria-haspopup": "dialog", "aria-expanded": `${isExpanded}`, "aria-describedby": this.
|
|
717
|
+
return (h("button", { disabled: disabled, id: inputId, "aria-label": this.ariaLabel, "aria-haspopup": "dialog", "aria-expanded": `${isExpanded}`, "aria-describedby": this.hintTextID, "aria-invalid": this.isInvalid ? 'true' : undefined, "aria-required": `${required}`, onFocus: this.onFocus, onBlur: this.onBlur, ref: (focusEl) => (this.focusEl = focusEl) }));
|
|
672
718
|
}
|
|
673
719
|
getHintTextID() {
|
|
674
|
-
const {
|
|
675
|
-
if (
|
|
720
|
+
const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
|
|
721
|
+
if (isInvalid && errorText) {
|
|
676
722
|
return errorTextId;
|
|
677
723
|
}
|
|
678
724
|
if (helperText) {
|
|
@@ -684,10 +730,10 @@ const Select = class {
|
|
|
684
730
|
* Renders the helper text or error text values
|
|
685
731
|
*/
|
|
686
732
|
renderHintText() {
|
|
687
|
-
const { helperText, errorText, helperTextId, errorTextId } = this;
|
|
733
|
+
const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
|
|
688
734
|
return [
|
|
689
|
-
h("div", { id: helperTextId, class: "helper-text", part: "supporting-text helper-text" }, helperText),
|
|
690
|
-
h("div", { id: errorTextId, class: "error-text", part: "supporting-text error-text" }, errorText),
|
|
735
|
+
h("div", { id: helperTextId, class: "helper-text", part: "supporting-text helper-text", "aria-live": "polite" }, !isInvalid ? helperText : null),
|
|
736
|
+
h("div", { id: errorTextId, class: "error-text", part: "supporting-text error-text", role: "alert" }, isInvalid ? errorText : null),
|
|
691
737
|
];
|
|
692
738
|
}
|
|
693
739
|
/**
|
|
@@ -735,7 +781,7 @@ const Select = class {
|
|
|
735
781
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
736
782
|
*/
|
|
737
783
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
|
|
738
|
-
return (h(Host, { key: '
|
|
784
|
+
return (h(Host, { key: '35b5e18e6f79a802ff2d46d1242e80ff755cc0b9', onClick: this.onClick, class: createColorClasses(this.color, {
|
|
739
785
|
[mode]: true,
|
|
740
786
|
'in-item': inItem,
|
|
741
787
|
'in-item-color': hostContext('ion-item.ion-color', el),
|
|
@@ -753,7 +799,7 @@ const Select = class {
|
|
|
753
799
|
[`select-justify-${justify}`]: justifyEnabled,
|
|
754
800
|
[`select-shape-${shape}`]: shape !== undefined,
|
|
755
801
|
[`select-label-placement-${labelPlacement}`]: true,
|
|
756
|
-
}) }, h("label", { key: '
|
|
802
|
+
}) }, h("label", { key: '6005b34a0c50bc4d7653a4276bc232ecd02e083c', class: "select-wrapper", id: "select-label", onClick: this.onLabelClick }, this.renderLabelContainer(), h("div", { key: 'c7e07aa81ae856c057f16275dd058f37c5670a47', class: "select-wrapper-inner" }, h("slot", { key: '7fc2deefe0424404caacdbbd9e08ed43ba55d28a', name: "start" }), h("div", { key: '157d74ee717b1bc30b5f1c233a09b0c8456aa68e', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), h("slot", { key: 'ea66db304528b82bf9317730b6dce3db2612f235', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && h("div", { key: '786eb1530b7476f0615d4e7c0bf4e7e4dc66509c', class: "select-highlight" })), this.renderBottomContent()));
|
|
757
803
|
}
|
|
758
804
|
get el() { return getElement(this); }
|
|
759
805
|
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, i as forceUpdate, w as writeTask, h, d as Host, g as getElement } from './index-C8IsBmNU.js';
|
|
5
|
-
import { c as createNotchController } from './
|
|
5
|
+
import { c as createNotchController, a as checkInvalidState } from './validity-B8oWougr.js';
|
|
6
6
|
import { d as debounceEvent, i as inheritAriaAttributes, b as inheritAttributes, c as componentOnReady } from './helpers-DEn3pfjm.js';
|
|
7
7
|
import { c as createSlotMutationController, g as getCounterText } from './input.utils-DrvTa8gz.js';
|
|
8
8
|
import { h as hostContext, c as createColorClasses } from './theme-DiVJyqlX.js';
|
|
@@ -190,14 +190,6 @@ const Textarea = class {
|
|
|
190
190
|
this.el.click();
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
/**
|
|
194
|
-
* Checks if the textarea is in an invalid state based on Ionic validation classes
|
|
195
|
-
*/
|
|
196
|
-
checkValidationState() {
|
|
197
|
-
const hasIonTouched = this.el.classList.contains('ion-touched');
|
|
198
|
-
const hasIonInvalid = this.el.classList.contains('ion-invalid');
|
|
199
|
-
return hasIonTouched && hasIonInvalid;
|
|
200
|
-
}
|
|
201
193
|
connectedCallback() {
|
|
202
194
|
const { el } = this;
|
|
203
195
|
this.slotMutationController = createSlotMutationController(el, ['label', 'start', 'end'], () => forceUpdate(this));
|
|
@@ -205,7 +197,7 @@ const Textarea = class {
|
|
|
205
197
|
// Watch for class changes to update validation state
|
|
206
198
|
if (typeof MutationObserver !== 'undefined') {
|
|
207
199
|
this.validationObserver = new MutationObserver(() => {
|
|
208
|
-
const newIsInvalid = this.
|
|
200
|
+
const newIsInvalid = checkInvalidState(this.el);
|
|
209
201
|
if (this.isInvalid !== newIsInvalid) {
|
|
210
202
|
this.isInvalid = newIsInvalid;
|
|
211
203
|
// Force a re-render to update aria-describedby immediately
|
|
@@ -218,7 +210,7 @@ const Textarea = class {
|
|
|
218
210
|
});
|
|
219
211
|
}
|
|
220
212
|
// Always set initial state
|
|
221
|
-
this.isInvalid = this.
|
|
213
|
+
this.isInvalid = checkInvalidState(this.el);
|
|
222
214
|
this.debounceChanged();
|
|
223
215
|
{
|
|
224
216
|
document.dispatchEvent(new CustomEvent('ionInputDidLoad', {
|
|
@@ -482,7 +474,7 @@ const Textarea = class {
|
|
|
482
474
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
483
475
|
*/
|
|
484
476
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
485
|
-
return (h(Host, { key: '
|
|
477
|
+
return (h(Host, { key: 'a70a62d7aae3831a50acd74f60b930925ada1326', class: createColorClasses(this.color, {
|
|
486
478
|
[mode]: true,
|
|
487
479
|
'has-value': hasValue,
|
|
488
480
|
'has-focus': hasFocus,
|
|
@@ -491,7 +483,7 @@ const Textarea = class {
|
|
|
491
483
|
[`textarea-shape-${shape}`]: shape !== undefined,
|
|
492
484
|
[`textarea-label-placement-${labelPlacement}`]: true,
|
|
493
485
|
'textarea-disabled': disabled,
|
|
494
|
-
}) }, h("label", { key: '
|
|
486
|
+
}) }, h("label", { key: '8a2dd59a60f7469df84018eb0ede3a9ec3862703', class: "textarea-wrapper", htmlFor: inputId, onClick: this.onLabelClick }, this.renderLabelContainer(), h("div", { key: '1bfc368236e3da7a225a45118c27fbfc1fe5fa46', class: "textarea-wrapper-inner" }, h("div", { key: '215cbb2635ff52e31a8973376989b85e7245d40f', class: "start-slot-wrapper" }, h("slot", { key: '9f6b461cdee9d629deb695d2bea054ece2f32305', name: "start" })), h("div", { key: 'c1af35a2d5bc452bebe0b22a26d15ff52b4e9fc8', class: "native-wrapper", ref: (el) => (this.textareaWrapper = el) }, h("textarea", Object.assign({ key: '69a69b3cf0932baafbe37e6e846f1a571608d3f2', 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: 'c053ea8b865d0e29763aed2e4939cc9c9e374c15', class: "end-slot-wrapper" }, h("slot", { key: '930aa641833b0df54b9ea10368fc2f46d5f491f6', name: "end" }))), shouldRenderHighlight && h("div", { key: '8d12597d15f5f429d80e8272ea99e64ed924e482', class: "textarea-highlight" })), this.renderBottomContent()));
|
|
495
487
|
}
|
|
496
488
|
get el() { return getElement(this); }
|
|
497
489
|
static get watchers() { return {
|
|
@@ -136,7 +136,6 @@ const Toggle = class {
|
|
|
136
136
|
const { checked, value } = this;
|
|
137
137
|
const isNowChecked = !checked;
|
|
138
138
|
this.checked = isNowChecked;
|
|
139
|
-
this.setFocus();
|
|
140
139
|
this.ionChange.emit({
|
|
141
140
|
checked: isNowChecked,
|
|
142
141
|
value,
|
|
@@ -187,9 +186,7 @@ const Toggle = class {
|
|
|
187
186
|
return this.value || '';
|
|
188
187
|
}
|
|
189
188
|
setFocus() {
|
|
190
|
-
|
|
191
|
-
this.focusEl.focus();
|
|
192
|
-
}
|
|
189
|
+
this.el.focus();
|
|
193
190
|
}
|
|
194
191
|
renderOnOffSwitchLabels(mode, checked) {
|
|
195
192
|
const icon = this.getSwitchLabelIcon(mode, checked);
|
|
@@ -239,7 +236,7 @@ const Toggle = class {
|
|
|
239
236
|
const value = this.getValue();
|
|
240
237
|
const rtl = isRTL(el) ? 'rtl' : 'ltr';
|
|
241
238
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
242
|
-
return (h(Host, { key: '
|
|
239
|
+
return (h(Host, { key: '17bbbc8d229868e5c872b2bc5a3faf579780c5e0', role: "switch", "aria-checked": `${checked}`, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === errorTextId, onClick: this.onClick, "aria-labelledby": hasLabel ? inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, class: createColorClasses(color, {
|
|
243
240
|
[mode]: true,
|
|
244
241
|
'in-item': hostContext('ion-item', el),
|
|
245
242
|
'toggle-activated': activated,
|
|
@@ -249,10 +246,10 @@ const Toggle = class {
|
|
|
249
246
|
[`toggle-alignment-${alignment}`]: alignment !== undefined,
|
|
250
247
|
[`toggle-label-placement-${labelPlacement}`]: true,
|
|
251
248
|
[`toggle-${rtl}`]: true,
|
|
252
|
-
}) }, h("label", { key: '
|
|
249
|
+
}) }, h("label", { key: '673625b62a2c909e95dccb642c91312967a6cd1c', class: "toggle-wrapper", htmlFor: inputId }, h("input", Object.assign({ key: '7dc3f357b4708116663970047765da9f8f845bf0', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, required: required }, inheritedAttributes)), h("div", { key: '8f1c6a182031e8cbc6727e5f4ac0e00ad4247447', class: {
|
|
253
250
|
'label-text-wrapper': true,
|
|
254
251
|
'label-text-wrapper-hidden': !hasLabel,
|
|
255
|
-
}, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: '
|
|
252
|
+
}, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: '8322b9d54dc7edeb4e16fefcde9f7ebca8d5c3e1' }), this.renderHintText()), h("div", { key: 'fe6984143db817a7b3020a3f57cf5418fc3dcc0e', class: "native-wrapper" }, this.renderToggleControl()))));
|
|
256
253
|
}
|
|
257
254
|
get el() { return getElement(this); }
|
|
258
255
|
static get watchers() { return {
|