@aurodesignsystem-dev/auro-formkit 0.0.0-pr1507.0 → 0.0.0-pr1509.0
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/checkbox/demo/customize.html +1 -2
- package/components/checkbox/demo/customize.min.js +1 -1
- package/components/checkbox/demo/getting-started.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/customize.html +1 -2
- package/components/combobox/demo/customize.md +108 -132
- package/components/combobox/demo/customize.min.js +30 -21
- package/components/combobox/demo/getting-started.min.js +30 -21
- package/components/combobox/demo/index.min.js +30 -21
- package/components/combobox/dist/index.js +30 -21
- package/components/combobox/dist/registered.js +30 -21
- package/components/counter/demo/customize.min.js +10 -2
- package/components/counter/demo/index.min.js +10 -2
- package/components/counter/dist/index.js +10 -2
- package/components/counter/dist/registered.js +10 -2
- package/components/datepicker/demo/api.md +2 -0
- package/components/datepicker/demo/customize.js +0 -2
- package/components/datepicker/demo/customize.md +138 -38
- package/components/datepicker/demo/customize.min.js +36 -22
- package/components/datepicker/demo/index.min.js +36 -4
- package/components/datepicker/dist/index.js +36 -4
- package/components/datepicker/dist/registered.js +36 -4
- package/components/datepicker/dist/src/auro-datepicker.d.ts +2 -0
- package/components/dropdown/demo/customize.min.js +9 -1
- package/components/dropdown/demo/getting-started.min.js +9 -1
- package/components/dropdown/demo/index.min.js +9 -1
- package/components/dropdown/dist/auro-dropdown.d.ts +1 -0
- package/components/dropdown/dist/index.js +9 -1
- package/components/dropdown/dist/registered.js +9 -1
- package/components/form/demo/customize.html +6 -6
- package/components/form/demo/customize.js +19 -0
- package/components/form/demo/customize.md +203 -51
- package/components/form/demo/customize.min.js +542 -69
- package/components/form/demo/getting-started.min.js +470 -69
- package/components/form/demo/index.min.js +470 -69
- package/components/form/demo/registerDemoDeps.min.js +107 -32
- package/components/form/dist/auro-form.d.ts +122 -4
- package/components/form/dist/index.js +363 -37
- package/components/form/dist/registered.js +363 -37
- package/components/input/demo/customize.html +1 -2
- package/components/input/demo/customize.md +54 -53
- package/components/input/demo/customize.min.js +19 -1
- package/components/input/demo/getting-started.min.js +19 -1
- package/components/input/demo/index.min.js +19 -1
- package/components/input/dist/index.js +19 -1
- package/components/input/dist/registered.js +19 -1
- package/components/radio/demo/customize.min.js +1 -1
- package/components/radio/demo/getting-started.min.js +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/customize.html +1 -2
- package/components/select/demo/customize.min.js +10 -2
- package/components/select/demo/getting-started.min.js +10 -2
- package/components/select/demo/index.min.js +10 -2
- package/components/select/dist/index.js +10 -2
- package/components/select/dist/registered.js +10 -2
- package/custom-elements.json +1557 -1428
- package/package.json +1 -1
|
@@ -11271,6 +11271,11 @@ let BaseInput$2 = class BaseInput extends AuroElement$6 {
|
|
|
11271
11271
|
}
|
|
11272
11272
|
|
|
11273
11273
|
// add attribute for query selectors when auro-input is registered under a custom name
|
|
11274
|
+
// COVERAGE: the body of this branch is unreachable in WTR — connectedCallback
|
|
11275
|
+
// performs the same `setAttribute('auro-input', '')` earlier (see L665-667),
|
|
11276
|
+
// so by the time firstUpdated runs the attribute is already present and the
|
|
11277
|
+
// `!hasAttribute('auro-input')` guard is false. Retained as a defensive
|
|
11278
|
+
// safety net in case connectedCallback is ever short-circuited.
|
|
11274
11279
|
if (this.tagName.toLowerCase() !== 'auro-input' && !this.hasAttribute('auro-input')) {
|
|
11275
11280
|
this.setAttribute('auro-input', '');
|
|
11276
11281
|
}
|
|
@@ -11360,6 +11365,13 @@ let BaseInput$2 = class BaseInput extends AuroElement$6 {
|
|
|
11360
11365
|
|
|
11361
11366
|
if (typeToI18n.includes(this.type)) {
|
|
11362
11367
|
this.setCustomValidityForType = i18n$3(this.lang, this.type);
|
|
11368
|
+
// COVERAGE: this `else if` branch is unreachable in WTR. connectedCallback
|
|
11369
|
+
// (L682) calls configureDataForType, which at L1266-1268 assigns
|
|
11370
|
+
// `this.format = this.util.getDateMaskFromLocale().toLowerCase()` for any
|
|
11371
|
+
// type=date input whose `format` attribute is unset. That runs before
|
|
11372
|
+
// firstUpdated invokes setCustomHelpTextMessage, so `!this.format` is
|
|
11373
|
+
// always false here. Retained as a defensive fallback; the whole function
|
|
11374
|
+
// is @deprecated per AB#1557296 and slated for removal.
|
|
11363
11375
|
} else if (!this.format && this.type === 'date') {
|
|
11364
11376
|
this.setCustomValidityForType = i18n$3(this.lang, 'dateMMDDYYYY');
|
|
11365
11377
|
} else if (this.dateFormatMap[this.format]) {
|
|
@@ -11837,6 +11849,12 @@ let BaseInput$2 = class BaseInput extends AuroElement$6 {
|
|
|
11837
11849
|
*/
|
|
11838
11850
|
get placeholderStr() {
|
|
11839
11851
|
if (!this.placeholder && this.type === 'date') {
|
|
11852
|
+
// COVERAGE: the `'MM/DD/YYYY'` literal fallback is unreachable in WTR.
|
|
11853
|
+
// connectedCallback (L682) calls configureDataForType, which at L1266-1268
|
|
11854
|
+
// assigns `this.format = this.util.getDateMaskFromLocale().toLowerCase()`
|
|
11855
|
+
// when type=date and format is unset. That runs before the first render
|
|
11856
|
+
// reads this getter, so the ternary's truthy arm always wins. Retained
|
|
11857
|
+
// as a defensive fallback for direct getter calls before connection.
|
|
11840
11858
|
return this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
|
|
11841
11859
|
}
|
|
11842
11860
|
return this.placeholder || "";
|
|
@@ -12328,7 +12346,7 @@ let AuroHelpText$8 = class AuroHelpText extends i$2 {
|
|
|
12328
12346
|
}
|
|
12329
12347
|
};
|
|
12330
12348
|
|
|
12331
|
-
var formkitVersion$8 = '
|
|
12349
|
+
var formkitVersion$8 = '202606232113';
|
|
12332
12350
|
|
|
12333
12351
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12334
12352
|
// See LICENSE in the project root for license information.
|
|
@@ -26447,7 +26465,7 @@ let AuroBibtemplate$3 = class AuroBibtemplate extends i$2 {
|
|
|
26447
26465
|
}
|
|
26448
26466
|
};
|
|
26449
26467
|
|
|
26450
|
-
var formkitVersion$2$1 = '
|
|
26468
|
+
var formkitVersion$2$1 = '202606232113';
|
|
26451
26469
|
|
|
26452
26470
|
let l$1$2 = class l{generateElementName(t,e){let o=t;return o+="-",o+=e.replace(/[.]/g,"_"),o}generateTag(o,s,a){const r=this.generateElementName(o,s),i=i$5`${s$5(r)}`;return customElements.get(r)||customElements.define(r,class extends a{}),i}};let d$1$2 = class d{registerComponent(t,e){customElements.get(t)||customElements.define(t,class extends e{});}closestElement(t,e=this,o=(e,s=e&&e.closest(t))=>e&&e!==document&&e!==window?s||o(e.getRootNode().host):null){return o(e)}handleComponentTagRename(t,e){const o=e.toLowerCase();t.tagName.toLowerCase()!==o&&t.setAttribute(o,true);}elementMatch(t,e){const o=e.toLowerCase();return t.tagName.toLowerCase()===o||t.hasAttribute(o)}getSlotText(t,e){const o=t.shadowRoot?.querySelector(`slot[name="${e}"]`),s=(o?.assignedNodes({flatten:true})||[]).map(t=>t.textContent?.trim()).join(" ").trim();return s||null}};let h$1$2 = class h{registerComponent(t,e){customElements.get(t)||customElements.define(t,class extends e{});}closestElement(t,e=this,o=(e,s=e&&e.closest(t))=>e&&e!==document&&e!==window?s||o(e.getRootNode().host):null){return o(e)}handleComponentTagRename(t,e){const o=e.toLowerCase();t.tagName.toLowerCase()!==o&&t.setAttribute(o,true);}elementMatch(t,e){const o=e.toLowerCase();return t.tagName.toLowerCase()===o||t.hasAttribute(o)}};var c$1$3=i$4`:host{color:var(--ds-auro-loader-color)}:host>span{background-color:var(--ds-auro-loader-background-color);border-color:var(--ds-auro-loader-border-color)}:host([onlight]),:host([appearance=brand]){--ds-auro-loader-color: var(--ds-basic-color-brand-primary, #01426a)}:host([ondark]),:host([appearance=inverse]){--ds-auro-loader-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([orbit])>span{--ds-auro-loader-background-color: transparent}:host([orbit])>span:nth-child(1){--ds-auro-loader-border-color: currentcolor;opacity:.25}:host([orbit])>span:nth-child(2){--ds-auro-loader-border-color: currentcolor;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}
|
|
26453
26471
|
`,u$4$2=i$4`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, .875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, .75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, .625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, .875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, .05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, .05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, .05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, .05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, .05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, .1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(.875rem, 1.1666666667vw, .875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, .1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:focus:not(:focus-visible){outline:3px solid transparent}:host,:host>span{position:relative}:host{width:2rem;height:2rem;display:inline-block;font-size:0}:host>span{position:absolute;display:inline-block;float:none;top:0;left:0;width:2rem;height:2rem;border-radius:100%;border-style:solid;border-width:0;box-sizing:border-box}:host([xs]),:host([xs])>span{width:1.2rem;height:1.2rem}:host([sm]),:host([sm])>span{width:3rem;height:3rem}:host([md]),:host([md])>span{width:5rem;height:5rem}:host([lg]),:host([lg])>span{width:8rem;height:8rem}:host{--margin: .375rem;--margin-xs: .2rem;--margin-sm: .5rem;--margin-md: .75rem;--margin-lg: 1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin) * 6);height:calc(1rem + var(--margin) * 2)}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(1.95rem + var(--margin-xs) * 6);height:calc(.65rem + var(--margin-xs) * 2)}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm) * 6);height:calc(2rem + var(--margin-sm) * 2)}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md) * 6);height:calc(3rem + var(--margin-md) * 2)}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg) * 6);height:calc(5rem + var(--margin-lg) * 2)}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-.4s}:host([pulse])>span:nth-child(2){animation-delay:-.2s}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,to{opacity:.1;transform:scale(.9)}50%{opacity:1;transform:scale(1.1)}}:host([orbit]),:host([orbit])>span{opacity:1}:host([orbit])>span{border-width:5px}:host([orbit])>span:nth-child(2){animation:orbit 2s linear infinite}:host([orbit][sm])>span{border-width:8px}:host([orbit][md])>span{border-width:13px}:host([orbit][lg])>span{border-width:21px}@keyframes orbit{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host([ringworm])>svg{animation:rotate 2s linear infinite;height:100%;width:100%;stroke:currentcolor;stroke-width:8}:host([ringworm]) .path{stroke-dashoffset:0;animation:ringworm 1.5s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}:host([laser]){position:static;width:100%;display:block;height:0;overflow:hidden;font-size:unset}:host([laser])>span{position:fixed;width:100%;height:.25rem;border-radius:0;z-index:100}:host([laser])>span:nth-child(1){border-color:currentcolor;opacity:.25}:host([laser])>span:nth-child(2){border-color:currentcolor;animation:laser 2s linear infinite;opacity:1;width:50%}:host([laser][sm])>span:nth-child(2){width:20%}:host([laser][md])>span:nth-child(2){width:30%}:host([laser][lg])>span:nth-child(2){width:50%;animation-duration:1.5s}:host([laser][xl])>span:nth-child(2){width:80%;animation-duration:1.5s}@keyframes laser{0%{left:-100%}to{left:110%}}:host>.no-animation{display:none}@media (prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center}:host>span{opacity:1}:host>.loader{display:none}:host>svg{display:none}:host>.no-animation{display:block}}
|
|
@@ -31958,7 +31976,7 @@ let AuroHelpText$2$1 = class AuroHelpText extends i$2 {
|
|
|
31958
31976
|
}
|
|
31959
31977
|
};
|
|
31960
31978
|
|
|
31961
|
-
var formkitVersion$1$3 = '
|
|
31979
|
+
var formkitVersion$1$3 = '202606232113';
|
|
31962
31980
|
|
|
31963
31981
|
let AuroElement$2$2 = class AuroElement extends i$2 {
|
|
31964
31982
|
static get properties() {
|
|
@@ -32909,6 +32927,14 @@ let AuroDropdown$3 = class AuroDropdown extends AuroElement$2$2 {
|
|
|
32909
32927
|
};
|
|
32910
32928
|
this.addEventListener('keydown', this._bibTabHandler);
|
|
32911
32929
|
|
|
32930
|
+
// Suppress AuroFloatingUI's auto-hide-on-focus-loss while the
|
|
32931
|
+
// desktopModal trap owns focus management. Without this, the very
|
|
32932
|
+
// first focus move into the bib (from the RAF below) triggers
|
|
32933
|
+
// handleFocusLoss → hideBib, tearing down the trap before the
|
|
32934
|
+
// user can press Tab.
|
|
32935
|
+
this._priorNoHideOnFocusLoss = this.noHideOnThisFocusLoss;
|
|
32936
|
+
this.noHideOnThisFocusLoss = true;
|
|
32937
|
+
|
|
32912
32938
|
// Move initial focus into the bib content, matching FocusTrap behavior
|
|
32913
32939
|
requestAnimationFrame(() => {
|
|
32914
32940
|
const focusables = getFocusableElements$3(this.bibContent);
|
|
@@ -44483,6 +44509,11 @@ let BaseInput$1 = class BaseInput extends AuroElement$1$3 {
|
|
|
44483
44509
|
}
|
|
44484
44510
|
|
|
44485
44511
|
// add attribute for query selectors when auro-input is registered under a custom name
|
|
44512
|
+
// COVERAGE: the body of this branch is unreachable in WTR — connectedCallback
|
|
44513
|
+
// performs the same `setAttribute('auro-input', '')` earlier (see L665-667),
|
|
44514
|
+
// so by the time firstUpdated runs the attribute is already present and the
|
|
44515
|
+
// `!hasAttribute('auro-input')` guard is false. Retained as a defensive
|
|
44516
|
+
// safety net in case connectedCallback is ever short-circuited.
|
|
44486
44517
|
if (this.tagName.toLowerCase() !== 'auro-input' && !this.hasAttribute('auro-input')) {
|
|
44487
44518
|
this.setAttribute('auro-input', '');
|
|
44488
44519
|
}
|
|
@@ -44572,6 +44603,13 @@ let BaseInput$1 = class BaseInput extends AuroElement$1$3 {
|
|
|
44572
44603
|
|
|
44573
44604
|
if (typeToI18n.includes(this.type)) {
|
|
44574
44605
|
this.setCustomValidityForType = i18n$1(this.lang, this.type);
|
|
44606
|
+
// COVERAGE: this `else if` branch is unreachable in WTR. connectedCallback
|
|
44607
|
+
// (L682) calls configureDataForType, which at L1266-1268 assigns
|
|
44608
|
+
// `this.format = this.util.getDateMaskFromLocale().toLowerCase()` for any
|
|
44609
|
+
// type=date input whose `format` attribute is unset. That runs before
|
|
44610
|
+
// firstUpdated invokes setCustomHelpTextMessage, so `!this.format` is
|
|
44611
|
+
// always false here. Retained as a defensive fallback; the whole function
|
|
44612
|
+
// is @deprecated per AB#1557296 and slated for removal.
|
|
44575
44613
|
} else if (!this.format && this.type === 'date') {
|
|
44576
44614
|
this.setCustomValidityForType = i18n$1(this.lang, 'dateMMDDYYYY');
|
|
44577
44615
|
} else if (this.dateFormatMap[this.format]) {
|
|
@@ -45049,6 +45087,12 @@ let BaseInput$1 = class BaseInput extends AuroElement$1$3 {
|
|
|
45049
45087
|
*/
|
|
45050
45088
|
get placeholderStr() {
|
|
45051
45089
|
if (!this.placeholder && this.type === 'date') {
|
|
45090
|
+
// COVERAGE: the `'MM/DD/YYYY'` literal fallback is unreachable in WTR.
|
|
45091
|
+
// connectedCallback (L682) calls configureDataForType, which at L1266-1268
|
|
45092
|
+
// assigns `this.format = this.util.getDateMaskFromLocale().toLowerCase()`
|
|
45093
|
+
// when type=date and format is unset. That runs before the first render
|
|
45094
|
+
// reads this getter, so the ternary's truthy arm always wins. Retained
|
|
45095
|
+
// as a defensive fallback for direct getter calls before connection.
|
|
45052
45096
|
return this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
|
|
45053
45097
|
}
|
|
45054
45098
|
return this.placeholder || "";
|
|
@@ -45540,7 +45584,7 @@ let AuroHelpText$1$3 = class AuroHelpText extends i$2 {
|
|
|
45540
45584
|
}
|
|
45541
45585
|
};
|
|
45542
45586
|
|
|
45543
|
-
var formkitVersion$7 = '
|
|
45587
|
+
var formkitVersion$7 = '202606232113';
|
|
45544
45588
|
|
|
45545
45589
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
45546
45590
|
// See LICENSE in the project root for license information.
|
|
@@ -46960,6 +47004,8 @@ const datepickerKeyboardStrategy = {
|
|
|
46960
47004
|
* @slot label - Defines the label content for the entire datepicker when `layout="snowflake"`.
|
|
46961
47005
|
* @slot toLabel - Defines the label content for the second input when the `range` attribute is used.
|
|
46962
47006
|
* @slot fromLabel - Defines the label content for the first input.
|
|
47007
|
+
* @slot optionalFromLabel - Overrides the "(optional)" text rendered next to the first input's label when the datepicker is not `required`.
|
|
47008
|
+
* @slot optionalToLabel - Overrides the "(optional)" text rendered next to the second input's label when `range` is set and the datepicker is not `required`.
|
|
46963
47009
|
* @slot date_YYYY_MM_DD - Defines the content to display in the auro-calendar-cell for the specified date. The content text is colored using the success state token when the `highlight` attribute is applied to the slot.
|
|
46964
47010
|
* @slot popover_YYYY_MM_DD - Defines the content to display in the auro-calendar-cell popover for the specified date.
|
|
46965
47011
|
* @csspart dropdown - Use for customizing the style of the dropdown.
|
|
@@ -48555,7 +48601,9 @@ class AuroDatePicker extends AuroElement$5 {
|
|
|
48555
48601
|
// update the calendar
|
|
48556
48602
|
if (this.valueEndObject) {
|
|
48557
48603
|
this.calendar.dateTo = this.convertToWcValidTime(this.valueEndObject);
|
|
48558
|
-
|
|
48604
|
+
if (!this.wasCellClick) {
|
|
48605
|
+
this.calendarRenderUtil.updateCentralDate(this, this.valueEndObject);
|
|
48606
|
+
}
|
|
48559
48607
|
} else {
|
|
48560
48608
|
if (this.inputList[1].value !== this.valueEnd) {
|
|
48561
48609
|
this.inputList[1].value = this.valueEnd || '';
|
|
@@ -48950,6 +48998,7 @@ class AuroDatePicker extends AuroElement$5 {
|
|
|
48950
48998
|
}
|
|
48951
48999
|
<span slot="ariaLabel.clear">${this.runtimeUtils.getSlotText(this, 'ariaLabel.input.clear') || i18n$2(this.lang, 'clearInput')}</span>
|
|
48952
49000
|
<span slot="label"><slot name="fromLabel"></slot></span>
|
|
49001
|
+
<slot name="optionalFromLabel" slot="optionalLabel"> (optional)</slot>
|
|
48953
49002
|
</${this.inputTag}>
|
|
48954
49003
|
</div>
|
|
48955
49004
|
|
|
@@ -48994,6 +49043,7 @@ class AuroDatePicker extends AuroElement$5 {
|
|
|
48994
49043
|
}
|
|
48995
49044
|
<span slot="ariaLabel.clear">${this.runtimeUtils.getSlotText(this, 'ariaLabel.input.clear') || this.runtimeUtils.getSlotText(this, 'ariaLabel.input.clear') || i18n$2(this.lang, 'clearInput')}</span>
|
|
48996
49045
|
<span slot="label"><slot name="toLabel"></slot></span>
|
|
49046
|
+
<slot name="optionalToLabel" slot="optionalLabel"> (optional)</slot>
|
|
48997
49047
|
</${this.inputTag}>
|
|
48998
49048
|
</div>
|
|
48999
49049
|
` : undefined}
|
|
@@ -50237,7 +50287,7 @@ let AuroHelpText$1$2 = class AuroHelpText extends i$2 {
|
|
|
50237
50287
|
}
|
|
50238
50288
|
};
|
|
50239
50289
|
|
|
50240
|
-
var formkitVersion$1$2 = '
|
|
50290
|
+
var formkitVersion$1$2 = '202606232113';
|
|
50241
50291
|
|
|
50242
50292
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
50243
50293
|
// See LICENSE in the project root for license information.
|
|
@@ -54565,7 +54615,7 @@ let AuroHelpText$6 = class AuroHelpText extends i$2 {
|
|
|
54565
54615
|
}
|
|
54566
54616
|
};
|
|
54567
54617
|
|
|
54568
|
-
var formkitVersion$6 = '
|
|
54618
|
+
var formkitVersion$6 = '202606232113';
|
|
54569
54619
|
|
|
54570
54620
|
let AuroElement$1$2 = class AuroElement extends i$2 {
|
|
54571
54621
|
static get properties() {
|
|
@@ -55516,6 +55566,14 @@ let AuroDropdown$2 = class AuroDropdown extends AuroElement$1$2 {
|
|
|
55516
55566
|
};
|
|
55517
55567
|
this.addEventListener('keydown', this._bibTabHandler);
|
|
55518
55568
|
|
|
55569
|
+
// Suppress AuroFloatingUI's auto-hide-on-focus-loss while the
|
|
55570
|
+
// desktopModal trap owns focus management. Without this, the very
|
|
55571
|
+
// first focus move into the bib (from the RAF below) triggers
|
|
55572
|
+
// handleFocusLoss → hideBib, tearing down the trap before the
|
|
55573
|
+
// user can press Tab.
|
|
55574
|
+
this._priorNoHideOnFocusLoss = this.noHideOnThisFocusLoss;
|
|
55575
|
+
this.noHideOnThisFocusLoss = true;
|
|
55576
|
+
|
|
55519
55577
|
// Move initial focus into the bib content, matching FocusTrap behavior
|
|
55520
55578
|
requestAnimationFrame(() => {
|
|
55521
55579
|
const focusables = getFocusableElements$2(this.bibContent);
|
|
@@ -58497,7 +58555,7 @@ let AuroHelpText$5 = class AuroHelpText extends i$2 {
|
|
|
58497
58555
|
}
|
|
58498
58556
|
};
|
|
58499
58557
|
|
|
58500
|
-
var formkitVersion$5 = '
|
|
58558
|
+
var formkitVersion$5 = '202606232113';
|
|
58501
58559
|
|
|
58502
58560
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
58503
58561
|
// See LICENSE in the project root for license information.
|
|
@@ -60247,7 +60305,7 @@ let AuroHelpText$4 = class AuroHelpText extends i$2 {
|
|
|
60247
60305
|
}
|
|
60248
60306
|
};
|
|
60249
60307
|
|
|
60250
|
-
var formkitVersion$4 = '
|
|
60308
|
+
var formkitVersion$4 = '202606232113';
|
|
60251
60309
|
|
|
60252
60310
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
60253
60311
|
// See LICENSE in the project root for license information.
|
|
@@ -65462,7 +65520,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$2 {
|
|
|
65462
65520
|
}
|
|
65463
65521
|
};
|
|
65464
65522
|
|
|
65465
|
-
var formkitVersion$2 = '
|
|
65523
|
+
var formkitVersion$2 = '202606232113';
|
|
65466
65524
|
|
|
65467
65525
|
let AuroElement$2$1 = class AuroElement extends i$2 {
|
|
65468
65526
|
static get properties() {
|
|
@@ -66413,6 +66471,14 @@ let AuroDropdown$1 = class AuroDropdown extends AuroElement$2$1 {
|
|
|
66413
66471
|
};
|
|
66414
66472
|
this.addEventListener('keydown', this._bibTabHandler);
|
|
66415
66473
|
|
|
66474
|
+
// Suppress AuroFloatingUI's auto-hide-on-focus-loss while the
|
|
66475
|
+
// desktopModal trap owns focus management. Without this, the very
|
|
66476
|
+
// first focus move into the bib (from the RAF below) triggers
|
|
66477
|
+
// handleFocusLoss → hideBib, tearing down the trap before the
|
|
66478
|
+
// user can press Tab.
|
|
66479
|
+
this._priorNoHideOnFocusLoss = this.noHideOnThisFocusLoss;
|
|
66480
|
+
this.noHideOnThisFocusLoss = true;
|
|
66481
|
+
|
|
66416
66482
|
// Move initial focus into the bib content, matching FocusTrap behavior
|
|
66417
66483
|
requestAnimationFrame(() => {
|
|
66418
66484
|
const focusables = getFocusableElements$1(this.bibContent);
|
|
@@ -77987,6 +78053,11 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
77987
78053
|
}
|
|
77988
78054
|
|
|
77989
78055
|
// add attribute for query selectors when auro-input is registered under a custom name
|
|
78056
|
+
// COVERAGE: the body of this branch is unreachable in WTR — connectedCallback
|
|
78057
|
+
// performs the same `setAttribute('auro-input', '')` earlier (see L665-667),
|
|
78058
|
+
// so by the time firstUpdated runs the attribute is already present and the
|
|
78059
|
+
// `!hasAttribute('auro-input')` guard is false. Retained as a defensive
|
|
78060
|
+
// safety net in case connectedCallback is ever short-circuited.
|
|
77990
78061
|
if (this.tagName.toLowerCase() !== 'auro-input' && !this.hasAttribute('auro-input')) {
|
|
77991
78062
|
this.setAttribute('auro-input', '');
|
|
77992
78063
|
}
|
|
@@ -78076,6 +78147,13 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
78076
78147
|
|
|
78077
78148
|
if (typeToI18n.includes(this.type)) {
|
|
78078
78149
|
this.setCustomValidityForType = i18n(this.lang, this.type);
|
|
78150
|
+
// COVERAGE: this `else if` branch is unreachable in WTR. connectedCallback
|
|
78151
|
+
// (L682) calls configureDataForType, which at L1266-1268 assigns
|
|
78152
|
+
// `this.format = this.util.getDateMaskFromLocale().toLowerCase()` for any
|
|
78153
|
+
// type=date input whose `format` attribute is unset. That runs before
|
|
78154
|
+
// firstUpdated invokes setCustomHelpTextMessage, so `!this.format` is
|
|
78155
|
+
// always false here. Retained as a defensive fallback; the whole function
|
|
78156
|
+
// is @deprecated per AB#1557296 and slated for removal.
|
|
78079
78157
|
} else if (!this.format && this.type === 'date') {
|
|
78080
78158
|
this.setCustomValidityForType = i18n(this.lang, 'dateMMDDYYYY');
|
|
78081
78159
|
} else if (this.dateFormatMap[this.format]) {
|
|
@@ -78553,6 +78631,12 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
78553
78631
|
*/
|
|
78554
78632
|
get placeholderStr() {
|
|
78555
78633
|
if (!this.placeholder && this.type === 'date') {
|
|
78634
|
+
// COVERAGE: the `'MM/DD/YYYY'` literal fallback is unreachable in WTR.
|
|
78635
|
+
// connectedCallback (L682) calls configureDataForType, which at L1266-1268
|
|
78636
|
+
// assigns `this.format = this.util.getDateMaskFromLocale().toLowerCase()`
|
|
78637
|
+
// when type=date and format is unset. That runs before the first render
|
|
78638
|
+
// reads this getter, so the ternary's truthy arm always wins. Retained
|
|
78639
|
+
// as a defensive fallback for direct getter calls before connection.
|
|
78556
78640
|
return this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
|
|
78557
78641
|
}
|
|
78558
78642
|
return this.placeholder || "";
|
|
@@ -79044,7 +79128,7 @@ let AuroHelpText$1$1 = class AuroHelpText extends i$2 {
|
|
|
79044
79128
|
}
|
|
79045
79129
|
};
|
|
79046
79130
|
|
|
79047
|
-
var formkitVersion$1$1 = '
|
|
79131
|
+
var formkitVersion$1$1 = '202606232113';
|
|
79048
79132
|
|
|
79049
79133
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
79050
79134
|
// See LICENSE in the project root for license information.
|
|
@@ -80165,7 +80249,7 @@ let AuroBibtemplate$1 = class AuroBibtemplate extends i$2 {
|
|
|
80165
80249
|
}
|
|
80166
80250
|
};
|
|
80167
80251
|
|
|
80168
|
-
var formkitVersion$3 = '
|
|
80252
|
+
var formkitVersion$3 = '202606232113';
|
|
80169
80253
|
|
|
80170
80254
|
var styleCss$1$3 = i$4`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;text-align:left}:host [auro-dropdown]{--ds-auro-dropdown-trigger-background-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
|
|
80171
80255
|
|
|
@@ -81516,24 +81600,7 @@ class AuroCombobox extends AuroElement$3 {
|
|
|
81516
81600
|
nativeInput.setSelectionRange(len, len);
|
|
81517
81601
|
}
|
|
81518
81602
|
} else {
|
|
81519
|
-
|
|
81520
|
-
// fullscreen→floating switch can close the dialog and leave focus on
|
|
81521
|
-
// body. Every other Branch 2 callsite already has focus on the input
|
|
81522
|
-
// via the focusin → this.focus() redirect (L1448-1452), so this is a
|
|
81523
|
-
// no-op in the common case.
|
|
81524
|
-
if (!this.input.componentHasFocus) {
|
|
81525
|
-
this.input.focus();
|
|
81526
|
-
}
|
|
81527
|
-
|
|
81528
|
-
// Park the trigger native input's caret at end-of-text every time the
|
|
81529
|
-
// popover opens. Chrome focuses the native via the floating <label for="…">
|
|
81530
|
-
// overlay on click and resets selection to [0, 0]; no JS fires between
|
|
81531
|
-
// mousedown and selectionchange, so we restore the caret here.
|
|
81532
|
-
const triggerNativeInput = this.input.inputElement;
|
|
81533
|
-
if (triggerNativeInput && triggerNativeInput.value) {
|
|
81534
|
-
const len = triggerNativeInput.value.length;
|
|
81535
|
-
triggerNativeInput.setSelectionRange(len, len);
|
|
81536
|
-
}
|
|
81603
|
+
this.input.focus();
|
|
81537
81604
|
}
|
|
81538
81605
|
}
|
|
81539
81606
|
|
|
@@ -88973,7 +89040,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
88973
89040
|
}
|
|
88974
89041
|
};
|
|
88975
89042
|
|
|
88976
|
-
var formkitVersion$1 = '
|
|
89043
|
+
var formkitVersion$1 = '202606232113';
|
|
88977
89044
|
|
|
88978
89045
|
class AuroElement extends i$2 {
|
|
88979
89046
|
static get properties() {
|
|
@@ -89924,6 +89991,14 @@ class AuroDropdown extends AuroElement {
|
|
|
89924
89991
|
};
|
|
89925
89992
|
this.addEventListener('keydown', this._bibTabHandler);
|
|
89926
89993
|
|
|
89994
|
+
// Suppress AuroFloatingUI's auto-hide-on-focus-loss while the
|
|
89995
|
+
// desktopModal trap owns focus management. Without this, the very
|
|
89996
|
+
// first focus move into the bib (from the RAF below) triggers
|
|
89997
|
+
// handleFocusLoss → hideBib, tearing down the trap before the
|
|
89998
|
+
// user can press Tab.
|
|
89999
|
+
this._priorNoHideOnFocusLoss = this.noHideOnThisFocusLoss;
|
|
90000
|
+
this.noHideOnThisFocusLoss = true;
|
|
90001
|
+
|
|
89927
90002
|
// Move initial focus into the bib content, matching FocusTrap behavior
|
|
89928
90003
|
requestAnimationFrame(() => {
|
|
89929
90004
|
const focusables = getFocusableElements(this.bibContent);
|
|
@@ -90986,7 +91061,7 @@ class AuroHelpText extends i$2 {
|
|
|
90986
91061
|
}
|
|
90987
91062
|
}
|
|
90988
91063
|
|
|
90989
|
-
var formkitVersion = '
|
|
91064
|
+
var formkitVersion = '202606232113';
|
|
90990
91065
|
|
|
90991
91066
|
var styleCss = i$4`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.body-default{font-size:var(--wcss-body-default-font-size, 1rem);font-weight:var(--wcss-body-default-weight, );line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-default-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-default-emphasized{font-size:var(--wcss-body-default-emphasized-font-size, 1rem);font-weight:var(--wcss-body-default-emphasized-weight, );line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);font-weight:var(--wcss-body-lg-weight, );line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg,.body-lg-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg-emphasized{font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);font-weight:var(--wcss-body-lg-emphasized-weight, );line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);font-weight:var(--wcss-body-sm-weight, );line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-sm-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-sm-emphasized{font-size:var(--wcss-body-sm-emphasized-font-size, 0.875rem);font-weight:var(--wcss-body-sm-emphasized-weight, );line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);font-weight:var(--wcss-body-xs-weight, );line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs,.body-xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs-emphasized{font-size:var(--wcss-body-xs-emphasized-font-size, 0.75rem);font-weight:var(--wcss-body-xs-emphasized-weight, );line-height:var(--wcss-body-xs-emphasized-line-height, 1rem)}.body-2xs{font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-2xs-weight, );line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.body-2xs,.body-2xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-2xs-emphasized{font-size:var(--wcss-body-2xs-emphasized-font-size, 0.625rem);font-weight:var(--wcss-body-2xs-emphasized-weight, );line-height:var(--wcss-body-2xs-emphasized-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 300);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 300);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-outline-color: var(--ds-auro-select-outline-color)}:host{display:inline-block;text-align:left;vertical-align:top}:host([layout*=emphasized]) [auro-dropdown],:host([layout*=snowflake]) [auro-dropdown]{--ds-auro-select-border-color: transparent}:host([layout*=emphasized]) .mainContent,:host([layout*=snowflake]) .mainContent{text-align:center}.mainContent{position:relative;display:flex;overflow:hidden;flex:1;flex-direction:column;align-items:center;justify-content:center}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;align-items:center;justify-content:center}::slotted([slot=typeIcon]){margin-right:var(--ds-size-100, 0.5rem)}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}:host([layout*=emphasized]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-200, 1rem)}:host([layout*=snowflake]) label{padding-block:var(--ds-size-25, 0.125rem)}:host([layout*=classic]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem)}:host([layout*=classic]) .mainContent{align-items:start}:host([layout*=classic]) label{overflow:hidden;cursor:text;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) .value{height:auto}label{color:var(--ds-auro-select-label-text-color)}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-select-outline-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]:is([validity]:not([validity=valid]))) [auro-dropdown],:host([appearance=inverse]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-select-outline-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([fluid]){width:100%}:host([disabled]){pointer-events:none;user-select:none}:host([disabled]:not([ondark])) [auro-dropdown],:host([disabled]:not([appearance=inverse])) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([layout*=classic])[disabled][ondark]) [auro-dropdown],:host(:not([layout*=classic])[disabled][appearance=inverse]) [auro-dropdown]{--ds-auro-select-border-color: transparent}`;
|
|
90992
91067
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @property {string | number | boolean | string[] | null} value - The value of the form element.
|
|
4
4
|
* @property {ValidityState} validity - The validity state of the form element, stored when fired from the form element.
|
|
5
5
|
* @property {boolean} required - Whether the form element is required or not.
|
|
6
|
-
* @property {
|
|
6
|
+
* @property {boolean} disabled - Whether the form element is currently disabled. Cached from the live attribute via the MutationObserver in `connectedCallback` and refreshed from `_handleAttributeMutations`.
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* @typedef {Object.<string, FormStateMember>} FormState - The form state.
|
|
@@ -95,6 +95,32 @@ export class AuroForm extends LitElement {
|
|
|
95
95
|
* @type {MutationObserver[]}
|
|
96
96
|
*/
|
|
97
97
|
private mutationObservers;
|
|
98
|
+
/**
|
|
99
|
+
* Captured initial (default) value per field `name`. Populated on first
|
|
100
|
+
* sight of each name in `_addElementToState` and preserved across
|
|
101
|
+
* subsequent `initializeState` cycles (slot change, rename, reset) so
|
|
102
|
+
* `_setInitialState` can detect user edits as `current !== initial`,
|
|
103
|
+
* matching HTML's `dirtyValueFlag` semantics.
|
|
104
|
+
* @private
|
|
105
|
+
* @type {Record<string, string | number | boolean | string[] | null | undefined>}
|
|
106
|
+
*/
|
|
107
|
+
private _initialValues;
|
|
108
|
+
/**
|
|
109
|
+
* @private
|
|
110
|
+
* @type {MutationObserver | null}
|
|
111
|
+
*/
|
|
112
|
+
private _attributeObserver;
|
|
113
|
+
/**
|
|
114
|
+
* Handle batched MutationObserver records for `disabled` and `name`
|
|
115
|
+
* attribute changes on tracked form elements. A `name` change invalidates
|
|
116
|
+
* the formState keying — we resolve it by re-initializing state. A `disabled`
|
|
117
|
+
* change simply needs a re-render (so `value` / `validity` getters re-evaluate)
|
|
118
|
+
* and a refresh of the submit/reset button enablement.
|
|
119
|
+
* @param {MutationRecord[]} mutations - The batched mutation records.
|
|
120
|
+
* @returns {void}
|
|
121
|
+
* @private
|
|
122
|
+
*/
|
|
123
|
+
private _handleAttributeMutations;
|
|
98
124
|
/**
|
|
99
125
|
* Resets all form elements to their initial state and fires a `reset` event. The event's `detail.previousValue` contains the form values captured immediately before the reset.
|
|
100
126
|
* @returns {void}
|
|
@@ -155,6 +181,39 @@ export class AuroForm extends LitElement {
|
|
|
155
181
|
* @private
|
|
156
182
|
*/
|
|
157
183
|
private isFormElement;
|
|
184
|
+
/**
|
|
185
|
+
* Whether a given element is currently disabled. Disabled controls are excluded
|
|
186
|
+
* from submission, validity, and initial-state checks per the HTML spec
|
|
187
|
+
* (section 4.10.19.2 "Enabling and disabling form controls":
|
|
188
|
+
* https://www.w3.org/TR/2011/WD-html5-20110113/association-of-controls-and-forms.html).
|
|
189
|
+
*
|
|
190
|
+
* Implementation note: we deliberately read only the attribute. Every Auro
|
|
191
|
+
* form element in `formElementTags` declares `disabled` with `reflect: true`,
|
|
192
|
+
* so the attribute and property stay in sync. Reading the attribute also
|
|
193
|
+
* lets the MutationObserver in `connectedCallback` (which is filtered to
|
|
194
|
+
* `['disabled', 'name']`) be the single source of truth for re-renders.
|
|
195
|
+
* If a future form-element type ships without attribute reflection, expand
|
|
196
|
+
* this helper to also read `element.disabled`.
|
|
197
|
+
* @param {HTMLElement | undefined | null} element - The element to check.
|
|
198
|
+
* @returns {boolean}
|
|
199
|
+
* @private
|
|
200
|
+
*/
|
|
201
|
+
private _isDisabled;
|
|
202
|
+
/**
|
|
203
|
+
* Whether the tracked form element registered under `name` is currently disabled.
|
|
204
|
+
* See `_isDisabled` for the HTML-spec rationale behind excluding disabled
|
|
205
|
+
* controls from form state.
|
|
206
|
+
*
|
|
207
|
+
* Reads a cached flag on `formState[name]` populated by `_addElementToState`
|
|
208
|
+
* at registration and refreshed by `_handleAttributeMutations` whenever the
|
|
209
|
+
* element's `disabled` attribute toggles. The cache is fed by the same
|
|
210
|
+
* `hasAttribute('disabled')` read as `_isDisabled`, so the "future form-element
|
|
211
|
+
* type without attribute reflection" caveat documented there applies here too.
|
|
212
|
+
* @param {string} name - The `name` attribute used to register the element.
|
|
213
|
+
* @returns {boolean}
|
|
214
|
+
* @private
|
|
215
|
+
*/
|
|
216
|
+
private _isNameDisabled;
|
|
158
217
|
/**
|
|
159
218
|
* Validates if an event is from a valid form element with a name.
|
|
160
219
|
* @param {Event} event - The event to validate.
|
|
@@ -186,8 +245,57 @@ export class AuroForm extends LitElement {
|
|
|
186
245
|
* @private
|
|
187
246
|
*/
|
|
188
247
|
private get resetElements();
|
|
248
|
+
/**
|
|
249
|
+
* Raw constraint-validation check. Returns `true` when no enabled field
|
|
250
|
+
* has a validity error. Unlike the public `validity` getter, this does
|
|
251
|
+
* NOT gate on `isInitialState` — callers that need to make a decision
|
|
252
|
+
* based on the actual constraint state (submit-button enablement, the
|
|
253
|
+
* internal `submit()` gate) read this so a pre-filled valid form is
|
|
254
|
+
* correctly recognized as submittable at first render.
|
|
255
|
+
* @returns {boolean}
|
|
256
|
+
* @private
|
|
257
|
+
*/
|
|
258
|
+
private _isFormValid;
|
|
259
|
+
/**
|
|
260
|
+
* Whether the reset button should be enabled. True when the form has
|
|
261
|
+
* diverged from its initial state (so the user can always return to
|
|
262
|
+
* defaults — even if the dirty value lives behind a now-disabled field),
|
|
263
|
+
* OR when any non-disabled field has a current value or captured initial
|
|
264
|
+
* value (covers pre-filled forms and user-cleared-back-to-empty cases).
|
|
265
|
+
* @returns {boolean}
|
|
266
|
+
* @private
|
|
267
|
+
*/
|
|
268
|
+
private _hasResetableState;
|
|
269
|
+
/**
|
|
270
|
+
* Collapse empty representations to a single canonical `null`.
|
|
271
|
+
*
|
|
272
|
+
* `_addElementToState` captures `null` for a field that mounts without a
|
|
273
|
+
* `value` attribute (`element.value || element.getAttribute('value')` is
|
|
274
|
+
* falsy → resolves to `null`), but `sharedInputListener` later stores the
|
|
275
|
+
* raw `event.target.value` — which is `''` for a user-cleared text input.
|
|
276
|
+
* Without this normalization, backspacing back to empty would taint the
|
|
277
|
+
* form forever (`'' !== null`) and Reset would stay enabled with nothing
|
|
278
|
+
* to actually reset.
|
|
279
|
+
*
|
|
280
|
+
* `''`, `undefined`, and `[]` all collapse to `null`. The empty-array case
|
|
281
|
+
* covers checkbox-group, radio-group, and multiselect, where `[]` means
|
|
282
|
+
* "no selection" — semantically the same as `null`/`''`. Genuine values
|
|
283
|
+
* — including `0`, `false`, non-empty strings, and non-empty arrays —
|
|
284
|
+
* pass through unchanged so number, boolean, and populated multi-value
|
|
285
|
+
* fields still compare correctly.
|
|
286
|
+
* @param {*} value - Value to normalize.
|
|
287
|
+
* @returns {*}
|
|
288
|
+
* @private
|
|
289
|
+
*/
|
|
290
|
+
private _normalizeEmpty;
|
|
189
291
|
/**
|
|
190
292
|
* Infer validity status based on current formState.
|
|
293
|
+
*
|
|
294
|
+
* Validity stays `null` while the form is in its initial state — this is
|
|
295
|
+
* the "stay quiet until the user interacts" UX contract that consumers
|
|
296
|
+
* depend on to delay error indicators. Code that needs the raw
|
|
297
|
+
* constraint-validation result regardless of interaction (e.g.,
|
|
298
|
+
* submit-button enablement) should call `_isFormValid()` directly.
|
|
191
299
|
* @private
|
|
192
300
|
*/
|
|
193
301
|
private _calculateValidity;
|
|
@@ -197,7 +305,17 @@ export class AuroForm extends LitElement {
|
|
|
197
305
|
*/
|
|
198
306
|
get validity(): "valid" | "invalid" | null;
|
|
199
307
|
/**
|
|
200
|
-
* Determines whether the form is in its initial (untouched) state
|
|
308
|
+
* Determines whether the form is in its initial (untouched) state.
|
|
309
|
+
*
|
|
310
|
+
* A field is tainted if either:
|
|
311
|
+
* - its value differs from the value captured on first render, OR
|
|
312
|
+
* - its validity is failing (anything other than `null` or `'valid'`).
|
|
313
|
+
*
|
|
314
|
+
* Validity acts as a backup signal: it catches users who interact with a
|
|
315
|
+
* field without changing its value (e.g., focusing and blurring a required
|
|
316
|
+
* field). We skip `null` (not yet validated) and `'valid'` (the default
|
|
317
|
+
* after Auro's auto-validation on mount) because neither proves the user
|
|
318
|
+
* touched anything.
|
|
201
319
|
* @returns {void}
|
|
202
320
|
* @private
|
|
203
321
|
*/
|
|
@@ -267,9 +385,9 @@ export type FormStateMember = {
|
|
|
267
385
|
*/
|
|
268
386
|
required: boolean;
|
|
269
387
|
/**
|
|
270
|
-
* - Whether the form element is
|
|
388
|
+
* - Whether the form element is currently disabled. Cached from the live attribute via the MutationObserver in `connectedCallback` and refreshed from `_handleAttributeMutations`.
|
|
271
389
|
*/
|
|
272
|
-
|
|
390
|
+
disabled: boolean;
|
|
273
391
|
};
|
|
274
392
|
/**
|
|
275
393
|
* - The form state.
|