@aurodesignsystem-dev/auro-formkit 0.0.0-pr1608.1 → 0.0.0-pr1609.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/accessibility.md +4 -15
- package/components/checkbox/demo/customize.min.js +17 -53
- package/components/checkbox/demo/getting-started.min.js +17 -53
- package/components/checkbox/demo/index.min.js +17 -53
- package/components/checkbox/dist/auro-checkbox-group.d.ts +0 -13
- package/components/checkbox/dist/index.js +17 -53
- package/components/checkbox/dist/registered.js +17 -53
- package/components/combobox/demo/customize.min.js +3 -3
- package/components/combobox/demo/getting-started.min.js +3 -3
- package/components/combobox/demo/index.min.js +3 -3
- package/components/combobox/dist/index.js +3 -3
- package/components/combobox/dist/registered.js +3 -3
- package/components/counter/demo/customize.min.js +22 -296
- package/components/counter/demo/getting-started.min.js +22 -296
- package/components/counter/demo/index.min.js +22 -296
- package/components/counter/dist/counterGroupKeyboardStrategy.d.ts +0 -1
- package/components/counter/dist/index.js +22 -296
- package/components/counter/dist/registered.js +22 -296
- package/components/datepicker/demo/customize.min.js +3 -3
- package/components/datepicker/demo/getting-started.min.js +3 -3
- package/components/datepicker/demo/index.min.js +3 -3
- package/components/datepicker/dist/index.js +3 -3
- package/components/datepicker/dist/registered.js +3 -3
- package/components/dropdown/demo/customize.min.js +1 -1
- package/components/dropdown/demo/getting-started.min.js +2 -2
- package/components/dropdown/demo/index.min.js +1 -1
- package/components/dropdown/dist/index.js +1 -1
- package/components/dropdown/dist/registered.js +1 -1
- package/components/form/demo/customize.min.js +68 -416
- package/components/form/demo/getting-started.min.js +68 -416
- package/components/form/demo/index.min.js +68 -416
- package/components/form/demo/registerDemoDeps.min.js +68 -416
- package/components/input/demo/customize.min.js +1 -1
- package/components/input/demo/getting-started.min.js +1 -1
- package/components/input/demo/index.min.js +1 -1
- package/components/input/dist/index.js +1 -1
- package/components/input/dist/registered.js +1 -1
- package/components/radio/demo/accessibility.md +4 -13
- package/components/radio/demo/customize.min.js +16 -54
- package/components/radio/demo/getting-started.min.js +16 -54
- package/components/radio/demo/index.min.js +16 -54
- package/components/radio/dist/auro-radio-group.d.ts +0 -13
- package/components/radio/dist/index.js +16 -54
- package/components/radio/dist/registered.js +16 -54
- package/components/select/demo/customize.min.js +2 -2
- package/components/select/demo/getting-started.min.js +2 -2
- package/components/select/demo/index.min.js +2 -2
- package/components/select/dist/index.js +2 -2
- package/components/select/dist/registered.js +2 -2
- package/custom-elements.json +1 -23
- package/package.json +1 -1
|
@@ -8,13 +8,12 @@ For keyboard interaction details, see the <auro-hyperlink href="keyboard-behavio
|
|
|
8
8
|
|
|
9
9
|
<auro-header level="2" id="ariaRolesAndAttributes">ARIA Roles and Attributes</auro-header>
|
|
10
10
|
<auro-header level="3" id="checkboxGroup">Checkbox Group</auro-header>
|
|
11
|
-
The `<auro-checkbox-group>` element uses a `<fieldset>` with a `<legend>` internally, providing native grouping semantics
|
|
11
|
+
The `<auro-checkbox-group>` element uses a `<fieldset>` with a `<legend>` internally, providing native grouping semantics:
|
|
12
12
|
|
|
13
13
|
| Attribute | Value | Description |
|
|
14
14
|
|---|---|---|
|
|
15
|
-
| `role` | `group` (implicit via `fieldset`) | Groups related checkboxes together.
|
|
16
|
-
| `aria-invalid` | `true` |
|
|
17
|
-
| `aria-describedby` | id reference | Points at the `id` of the group's help-text/error element, so assistive technology can associate the message with the group on demand rather than relying only on the one-time live-region announcement. |
|
|
15
|
+
| `role` | `group` (implicit via `fieldset`) | Groups related checkboxes together. |
|
|
16
|
+
| `aria-invalid` | `true` / `false` | Reflects whether the group is currently in an invalid state. |
|
|
18
17
|
|
|
19
18
|
<auro-header level="3" id="checkboxElement">Checkbox</auro-header>
|
|
20
19
|
Each `<auro-checkbox>` renders a native `<input type="checkbox">` inside its shadow DOM:
|
|
@@ -24,22 +23,12 @@ Each `<auro-checkbox>` renders a native `<input type="checkbox">` inside its sha
|
|
|
24
23
|
| `type` | `checkbox` | Native checkbox input type. |
|
|
25
24
|
| `aria-checked` | `true` / `false` | Reflects the checked state of the checkbox. |
|
|
26
25
|
| `aria-disabled` | `true` / `false` | Indicates whether the checkbox is disabled. |
|
|
27
|
-
| `aria-invalid` | `true` | Mirrored onto each checkbox from the group while the group is invalid, and removed when it becomes valid. Omitted rather than set to `false`. |
|
|
28
|
-
|
|
29
|
-
<auro-header level="4" id="invalidStatePlacement">Why the invalid state appears twice</auro-header>
|
|
30
|
-
While the group is invalid, `aria-invalid` is set on both the `<fieldset>` and every individual `<auro-checkbox>`. This is intentional: some assistive-technology and browser combinations announce a container's invalid state only when focus first enters the group, so mirroring the state onto each checkbox keeps it conveyed as focus moves through the options.
|
|
31
|
-
|
|
32
|
-
The `checkbox` role is in `aria-invalid`'s supported-role list in every ARIA version, so the per-checkbox placement is unambiguous. The group-level placement is worth one note: `aria-invalid` is a global attribute in ARIA 1.1, applicable to any role including `group`, but ARIA 1.2 deprecates that global use in favor of a supported-role list that does not include `group`. Keeping it on the `<fieldset>` is a deliberate choice — it is not a *prohibited* attribute for `group`, current axe-core resolves it as global and reports no violation, and it gives the group a real invalid signal that would otherwise be lost. This is covered by an automated axe assertion in the component's test suite so that a future change in tooling surfaces here rather than in a consumer's audit.
|
|
33
|
-
|
|
34
|
-
<auro-header level="4" id="attributePlacementNote">Attribute placement</auro-header>
|
|
35
|
-
`aria-invalid` is applied to the internal `<fieldset>`, not to the `<auro-checkbox-group>` host element. Do not write CSS selectors or test assertions against `auro-checkbox-group[aria-invalid]`; query the internal fieldset or read the `validity` property instead.
|
|
36
26
|
|
|
37
27
|
<auro-header level="2" id="screenReaderAnnouncements">Screen Reader Announcements</auro-header>
|
|
38
28
|
- **Focus** — When focus moves to a checkbox, the screen reader announces the checkbox label, its checked/unchecked state, and role ("checkbox").
|
|
39
29
|
- **State change** — Toggling the checkbox announces the new state ("checked" or "unchecked").
|
|
40
30
|
- **Group context** — The legend text provides group context when navigating between groups.
|
|
41
|
-
- **Error** — When validation fails, the error message is announced
|
|
42
|
-
- **Invalid state** — While the group is invalid, entering it or moving between its checkboxes conveys the invalid state.
|
|
31
|
+
- **Error** — When validation fails, the error message is announced to screen reader users.
|
|
43
32
|
|
|
44
33
|
<auro-header level="2" id="accessibleLabels">Accessible Labels</auro-header>
|
|
45
34
|
- The `legend` slot content provides the accessible group label via the native `<legend>` element.
|
|
@@ -1046,22 +1046,6 @@ class AuroDependencyVersioning {
|
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
1048
|
|
|
1049
|
-
/**
|
|
1050
|
-
* Class for generating unique hashes based on the current timestamp.
|
|
1051
|
-
* This can be used to create unique identifiers for elements or data within an application,
|
|
1052
|
-
* ensuring that each identifier is distinct and can be easily generated without the need
|
|
1053
|
-
* for external libraries or complex algorithms.
|
|
1054
|
-
*/
|
|
1055
|
-
class UniqueId {
|
|
1056
|
-
/**
|
|
1057
|
-
* Creates a unique hash based on the current timestamp.
|
|
1058
|
-
* @returns {Function} Timestamp as a base-36 string
|
|
1059
|
-
*/
|
|
1060
|
-
create() {
|
|
1061
|
-
return Date.now().toString(36);
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
1049
|
var styleCss$1 = i$5`:host{display:block;padding-bottom:var(--ds-size-150, 0.75rem)}.displayFlex legend+slot{display:flex;white-space:nowrap}fieldset{all:unset}legend{margin-bottom:var(--ds-size-150, 0.75rem)}[auro-helptext]{margin-top:var(--ds-size-150, 0.75rem)}`;
|
|
1066
1050
|
|
|
1067
1051
|
var colorCss$1 = i$5`:host{color:var(--ds-auro-checkbox-group-text-color)}:host([disabled]){--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([onDark]),:host([appearance=inverse]){--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][disabled]),:host([appearance=inverse][disabled]){--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}`;
|
|
@@ -1300,7 +1284,7 @@ class AuroHelpText extends i$2 {
|
|
|
1300
1284
|
}
|
|
1301
1285
|
}
|
|
1302
1286
|
|
|
1303
|
-
var formkitVersion = '
|
|
1287
|
+
var formkitVersion = '202609022123';
|
|
1304
1288
|
|
|
1305
1289
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1306
1290
|
// See LICENSE in the project root for license information.
|
|
@@ -1377,11 +1361,6 @@ class AuroCheckboxGroup extends i$2 {
|
|
|
1377
1361
|
* @private
|
|
1378
1362
|
*/
|
|
1379
1363
|
this.helpTextTag = versioning.generateTag('auro-formkit-checkbox-helptext', formkitVersion, AuroHelpText);
|
|
1380
|
-
|
|
1381
|
-
/**
|
|
1382
|
-
* @private
|
|
1383
|
-
*/
|
|
1384
|
-
this.uniqueId = new UniqueId().create();
|
|
1385
1364
|
}
|
|
1386
1365
|
|
|
1387
1366
|
static get styles() {
|
|
@@ -1633,29 +1612,6 @@ class AuroCheckboxGroup extends i$2 {
|
|
|
1633
1612
|
this.handlePreselectedItems();
|
|
1634
1613
|
|
|
1635
1614
|
this.validate();
|
|
1636
|
-
this.syncCheckboxValidity();
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
/**
|
|
1640
|
-
* Method for mirroring the group's invalid state onto each checkbox.
|
|
1641
|
-
* `validity` is the authoritative invalid state, and it has to be re-applied from
|
|
1642
|
-
* `handleItems()` as well, because a slot change can happen without `validity` itself
|
|
1643
|
-
* changing — a checkbox slotted into an already-invalid group would otherwise be missed.
|
|
1644
|
-
* @private
|
|
1645
|
-
* @returns {void}
|
|
1646
|
-
*/
|
|
1647
|
-
syncCheckboxValidity() {
|
|
1648
|
-
const invalid = Boolean(this.validity && this.validity !== 'valid');
|
|
1649
|
-
|
|
1650
|
-
this.checkboxes.forEach((el) => {
|
|
1651
|
-
if (invalid) {
|
|
1652
|
-
el.setAttribute('error', true);
|
|
1653
|
-
el.setAttribute('aria-invalid', 'true');
|
|
1654
|
-
} else {
|
|
1655
|
-
el.removeAttribute('error');
|
|
1656
|
-
el.removeAttribute('aria-invalid');
|
|
1657
|
-
}
|
|
1658
|
-
});
|
|
1659
1615
|
}
|
|
1660
1616
|
|
|
1661
1617
|
/**
|
|
@@ -1687,7 +1643,13 @@ class AuroCheckboxGroup extends i$2 {
|
|
|
1687
1643
|
}
|
|
1688
1644
|
|
|
1689
1645
|
if (changedProperties.has('validity')) {
|
|
1690
|
-
this.
|
|
1646
|
+
this.checkboxes.forEach((el) => {
|
|
1647
|
+
if (this.validity && this.validity !== 'valid') {
|
|
1648
|
+
el.setAttribute('error', true);
|
|
1649
|
+
} else {
|
|
1650
|
+
el.removeAttribute('error');
|
|
1651
|
+
}
|
|
1652
|
+
});
|
|
1691
1653
|
}
|
|
1692
1654
|
|
|
1693
1655
|
if (changedProperties.has('required')) {
|
|
@@ -1711,6 +1673,12 @@ class AuroCheckboxGroup extends i$2 {
|
|
|
1711
1673
|
}
|
|
1712
1674
|
|
|
1713
1675
|
if (changedProperties.has('error')) {
|
|
1676
|
+
if (this.error) {
|
|
1677
|
+
this.setAttribute('aria-invalid', true);
|
|
1678
|
+
} else {
|
|
1679
|
+
this.removeAttribute('aria-invalid');
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1714
1682
|
this.validate(true);
|
|
1715
1683
|
}
|
|
1716
1684
|
}
|
|
@@ -1729,11 +1697,7 @@ class AuroCheckboxGroup extends i$2 {
|
|
|
1729
1697
|
};
|
|
1730
1698
|
|
|
1731
1699
|
return u`
|
|
1732
|
-
<fieldset
|
|
1733
|
-
class="${e(groupClasses)}"
|
|
1734
|
-
aria-invalid="${o$1(this.validity && this.validity !== 'valid' ? 'true' : undefined)}"
|
|
1735
|
-
aria-describedby="${this.uniqueId}"
|
|
1736
|
-
>
|
|
1700
|
+
<fieldset class="${e(groupClasses)}">
|
|
1737
1701
|
<legend>
|
|
1738
1702
|
<slot name="legend"></slot>
|
|
1739
1703
|
${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
|
|
@@ -1743,11 +1707,11 @@ class AuroCheckboxGroup extends i$2 {
|
|
|
1743
1707
|
|
|
1744
1708
|
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
1745
1709
|
? u`
|
|
1746
|
-
<${this.helpTextTag}
|
|
1710
|
+
<${this.helpTextTag} part="helpText" appearance="${this.onDark ? 'inverse' : this.appearance}">
|
|
1747
1711
|
<slot name="helpText"></slot>
|
|
1748
1712
|
</${this.helpTextTag}>`
|
|
1749
1713
|
: u`
|
|
1750
|
-
<${this.helpTextTag}
|
|
1714
|
+
<${this.helpTextTag} error appearance="${this.onDark ? 'inverse' : this.appearance}"" role="alert" aria-live="assertive" part="helpText">
|
|
1751
1715
|
${this.errorMessage}
|
|
1752
1716
|
</${this.helpTextTag}>`
|
|
1753
1717
|
}
|
|
@@ -1046,22 +1046,6 @@ class AuroDependencyVersioning {
|
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
1048
|
|
|
1049
|
-
/**
|
|
1050
|
-
* Class for generating unique hashes based on the current timestamp.
|
|
1051
|
-
* This can be used to create unique identifiers for elements or data within an application,
|
|
1052
|
-
* ensuring that each identifier is distinct and can be easily generated without the need
|
|
1053
|
-
* for external libraries or complex algorithms.
|
|
1054
|
-
*/
|
|
1055
|
-
class UniqueId {
|
|
1056
|
-
/**
|
|
1057
|
-
* Creates a unique hash based on the current timestamp.
|
|
1058
|
-
* @returns {Function} Timestamp as a base-36 string
|
|
1059
|
-
*/
|
|
1060
|
-
create() {
|
|
1061
|
-
return Date.now().toString(36);
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
1049
|
var styleCss$1 = i$5`:host{display:block;padding-bottom:var(--ds-size-150, 0.75rem)}.displayFlex legend+slot{display:flex;white-space:nowrap}fieldset{all:unset}legend{margin-bottom:var(--ds-size-150, 0.75rem)}[auro-helptext]{margin-top:var(--ds-size-150, 0.75rem)}`;
|
|
1066
1050
|
|
|
1067
1051
|
var colorCss$1 = i$5`:host{color:var(--ds-auro-checkbox-group-text-color)}:host([disabled]){--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([onDark]),:host([appearance=inverse]){--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][disabled]),:host([appearance=inverse][disabled]){--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}`;
|
|
@@ -1300,7 +1284,7 @@ class AuroHelpText extends i$2 {
|
|
|
1300
1284
|
}
|
|
1301
1285
|
}
|
|
1302
1286
|
|
|
1303
|
-
var formkitVersion = '
|
|
1287
|
+
var formkitVersion = '202609022123';
|
|
1304
1288
|
|
|
1305
1289
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1306
1290
|
// See LICENSE in the project root for license information.
|
|
@@ -1377,11 +1361,6 @@ class AuroCheckboxGroup extends i$2 {
|
|
|
1377
1361
|
* @private
|
|
1378
1362
|
*/
|
|
1379
1363
|
this.helpTextTag = versioning.generateTag('auro-formkit-checkbox-helptext', formkitVersion, AuroHelpText);
|
|
1380
|
-
|
|
1381
|
-
/**
|
|
1382
|
-
* @private
|
|
1383
|
-
*/
|
|
1384
|
-
this.uniqueId = new UniqueId().create();
|
|
1385
1364
|
}
|
|
1386
1365
|
|
|
1387
1366
|
static get styles() {
|
|
@@ -1633,29 +1612,6 @@ class AuroCheckboxGroup extends i$2 {
|
|
|
1633
1612
|
this.handlePreselectedItems();
|
|
1634
1613
|
|
|
1635
1614
|
this.validate();
|
|
1636
|
-
this.syncCheckboxValidity();
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
/**
|
|
1640
|
-
* Method for mirroring the group's invalid state onto each checkbox.
|
|
1641
|
-
* `validity` is the authoritative invalid state, and it has to be re-applied from
|
|
1642
|
-
* `handleItems()` as well, because a slot change can happen without `validity` itself
|
|
1643
|
-
* changing — a checkbox slotted into an already-invalid group would otherwise be missed.
|
|
1644
|
-
* @private
|
|
1645
|
-
* @returns {void}
|
|
1646
|
-
*/
|
|
1647
|
-
syncCheckboxValidity() {
|
|
1648
|
-
const invalid = Boolean(this.validity && this.validity !== 'valid');
|
|
1649
|
-
|
|
1650
|
-
this.checkboxes.forEach((el) => {
|
|
1651
|
-
if (invalid) {
|
|
1652
|
-
el.setAttribute('error', true);
|
|
1653
|
-
el.setAttribute('aria-invalid', 'true');
|
|
1654
|
-
} else {
|
|
1655
|
-
el.removeAttribute('error');
|
|
1656
|
-
el.removeAttribute('aria-invalid');
|
|
1657
|
-
}
|
|
1658
|
-
});
|
|
1659
1615
|
}
|
|
1660
1616
|
|
|
1661
1617
|
/**
|
|
@@ -1687,7 +1643,13 @@ class AuroCheckboxGroup extends i$2 {
|
|
|
1687
1643
|
}
|
|
1688
1644
|
|
|
1689
1645
|
if (changedProperties.has('validity')) {
|
|
1690
|
-
this.
|
|
1646
|
+
this.checkboxes.forEach((el) => {
|
|
1647
|
+
if (this.validity && this.validity !== 'valid') {
|
|
1648
|
+
el.setAttribute('error', true);
|
|
1649
|
+
} else {
|
|
1650
|
+
el.removeAttribute('error');
|
|
1651
|
+
}
|
|
1652
|
+
});
|
|
1691
1653
|
}
|
|
1692
1654
|
|
|
1693
1655
|
if (changedProperties.has('required')) {
|
|
@@ -1711,6 +1673,12 @@ class AuroCheckboxGroup extends i$2 {
|
|
|
1711
1673
|
}
|
|
1712
1674
|
|
|
1713
1675
|
if (changedProperties.has('error')) {
|
|
1676
|
+
if (this.error) {
|
|
1677
|
+
this.setAttribute('aria-invalid', true);
|
|
1678
|
+
} else {
|
|
1679
|
+
this.removeAttribute('aria-invalid');
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1714
1682
|
this.validate(true);
|
|
1715
1683
|
}
|
|
1716
1684
|
}
|
|
@@ -1729,11 +1697,7 @@ class AuroCheckboxGroup extends i$2 {
|
|
|
1729
1697
|
};
|
|
1730
1698
|
|
|
1731
1699
|
return u`
|
|
1732
|
-
<fieldset
|
|
1733
|
-
class="${e(groupClasses)}"
|
|
1734
|
-
aria-invalid="${o$1(this.validity && this.validity !== 'valid' ? 'true' : undefined)}"
|
|
1735
|
-
aria-describedby="${this.uniqueId}"
|
|
1736
|
-
>
|
|
1700
|
+
<fieldset class="${e(groupClasses)}">
|
|
1737
1701
|
<legend>
|
|
1738
1702
|
<slot name="legend"></slot>
|
|
1739
1703
|
${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
|
|
@@ -1743,11 +1707,11 @@ class AuroCheckboxGroup extends i$2 {
|
|
|
1743
1707
|
|
|
1744
1708
|
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
1745
1709
|
? u`
|
|
1746
|
-
<${this.helpTextTag}
|
|
1710
|
+
<${this.helpTextTag} part="helpText" appearance="${this.onDark ? 'inverse' : this.appearance}">
|
|
1747
1711
|
<slot name="helpText"></slot>
|
|
1748
1712
|
</${this.helpTextTag}>`
|
|
1749
1713
|
: u`
|
|
1750
|
-
<${this.helpTextTag}
|
|
1714
|
+
<${this.helpTextTag} error appearance="${this.onDark ? 'inverse' : this.appearance}"" role="alert" aria-live="assertive" part="helpText">
|
|
1751
1715
|
${this.errorMessage}
|
|
1752
1716
|
</${this.helpTextTag}>`
|
|
1753
1717
|
}
|
|
@@ -1046,22 +1046,6 @@ class AuroDependencyVersioning {
|
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
1048
|
|
|
1049
|
-
/**
|
|
1050
|
-
* Class for generating unique hashes based on the current timestamp.
|
|
1051
|
-
* This can be used to create unique identifiers for elements or data within an application,
|
|
1052
|
-
* ensuring that each identifier is distinct and can be easily generated without the need
|
|
1053
|
-
* for external libraries or complex algorithms.
|
|
1054
|
-
*/
|
|
1055
|
-
class UniqueId {
|
|
1056
|
-
/**
|
|
1057
|
-
* Creates a unique hash based on the current timestamp.
|
|
1058
|
-
* @returns {Function} Timestamp as a base-36 string
|
|
1059
|
-
*/
|
|
1060
|
-
create() {
|
|
1061
|
-
return Date.now().toString(36);
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
1049
|
var styleCss$1 = i$5`:host{display:block;padding-bottom:var(--ds-size-150, 0.75rem)}.displayFlex legend+slot{display:flex;white-space:nowrap}fieldset{all:unset}legend{margin-bottom:var(--ds-size-150, 0.75rem)}[auro-helptext]{margin-top:var(--ds-size-150, 0.75rem)}`;
|
|
1066
1050
|
|
|
1067
1051
|
var colorCss$1 = i$5`:host{color:var(--ds-auro-checkbox-group-text-color)}:host([disabled]){--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([onDark]),:host([appearance=inverse]){--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][disabled]),:host([appearance=inverse][disabled]){--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}`;
|
|
@@ -1300,7 +1284,7 @@ class AuroHelpText extends i$2 {
|
|
|
1300
1284
|
}
|
|
1301
1285
|
}
|
|
1302
1286
|
|
|
1303
|
-
var formkitVersion = '
|
|
1287
|
+
var formkitVersion = '202609022123';
|
|
1304
1288
|
|
|
1305
1289
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1306
1290
|
// See LICENSE in the project root for license information.
|
|
@@ -1377,11 +1361,6 @@ class AuroCheckboxGroup extends i$2 {
|
|
|
1377
1361
|
* @private
|
|
1378
1362
|
*/
|
|
1379
1363
|
this.helpTextTag = versioning.generateTag('auro-formkit-checkbox-helptext', formkitVersion, AuroHelpText);
|
|
1380
|
-
|
|
1381
|
-
/**
|
|
1382
|
-
* @private
|
|
1383
|
-
*/
|
|
1384
|
-
this.uniqueId = new UniqueId().create();
|
|
1385
1364
|
}
|
|
1386
1365
|
|
|
1387
1366
|
static get styles() {
|
|
@@ -1633,29 +1612,6 @@ class AuroCheckboxGroup extends i$2 {
|
|
|
1633
1612
|
this.handlePreselectedItems();
|
|
1634
1613
|
|
|
1635
1614
|
this.validate();
|
|
1636
|
-
this.syncCheckboxValidity();
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
/**
|
|
1640
|
-
* Method for mirroring the group's invalid state onto each checkbox.
|
|
1641
|
-
* `validity` is the authoritative invalid state, and it has to be re-applied from
|
|
1642
|
-
* `handleItems()` as well, because a slot change can happen without `validity` itself
|
|
1643
|
-
* changing — a checkbox slotted into an already-invalid group would otherwise be missed.
|
|
1644
|
-
* @private
|
|
1645
|
-
* @returns {void}
|
|
1646
|
-
*/
|
|
1647
|
-
syncCheckboxValidity() {
|
|
1648
|
-
const invalid = Boolean(this.validity && this.validity !== 'valid');
|
|
1649
|
-
|
|
1650
|
-
this.checkboxes.forEach((el) => {
|
|
1651
|
-
if (invalid) {
|
|
1652
|
-
el.setAttribute('error', true);
|
|
1653
|
-
el.setAttribute('aria-invalid', 'true');
|
|
1654
|
-
} else {
|
|
1655
|
-
el.removeAttribute('error');
|
|
1656
|
-
el.removeAttribute('aria-invalid');
|
|
1657
|
-
}
|
|
1658
|
-
});
|
|
1659
1615
|
}
|
|
1660
1616
|
|
|
1661
1617
|
/**
|
|
@@ -1687,7 +1643,13 @@ class AuroCheckboxGroup extends i$2 {
|
|
|
1687
1643
|
}
|
|
1688
1644
|
|
|
1689
1645
|
if (changedProperties.has('validity')) {
|
|
1690
|
-
this.
|
|
1646
|
+
this.checkboxes.forEach((el) => {
|
|
1647
|
+
if (this.validity && this.validity !== 'valid') {
|
|
1648
|
+
el.setAttribute('error', true);
|
|
1649
|
+
} else {
|
|
1650
|
+
el.removeAttribute('error');
|
|
1651
|
+
}
|
|
1652
|
+
});
|
|
1691
1653
|
}
|
|
1692
1654
|
|
|
1693
1655
|
if (changedProperties.has('required')) {
|
|
@@ -1711,6 +1673,12 @@ class AuroCheckboxGroup extends i$2 {
|
|
|
1711
1673
|
}
|
|
1712
1674
|
|
|
1713
1675
|
if (changedProperties.has('error')) {
|
|
1676
|
+
if (this.error) {
|
|
1677
|
+
this.setAttribute('aria-invalid', true);
|
|
1678
|
+
} else {
|
|
1679
|
+
this.removeAttribute('aria-invalid');
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1714
1682
|
this.validate(true);
|
|
1715
1683
|
}
|
|
1716
1684
|
}
|
|
@@ -1729,11 +1697,7 @@ class AuroCheckboxGroup extends i$2 {
|
|
|
1729
1697
|
};
|
|
1730
1698
|
|
|
1731
1699
|
return u`
|
|
1732
|
-
<fieldset
|
|
1733
|
-
class="${e(groupClasses)}"
|
|
1734
|
-
aria-invalid="${o$1(this.validity && this.validity !== 'valid' ? 'true' : undefined)}"
|
|
1735
|
-
aria-describedby="${this.uniqueId}"
|
|
1736
|
-
>
|
|
1700
|
+
<fieldset class="${e(groupClasses)}">
|
|
1737
1701
|
<legend>
|
|
1738
1702
|
<slot name="legend"></slot>
|
|
1739
1703
|
${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
|
|
@@ -1743,11 +1707,11 @@ class AuroCheckboxGroup extends i$2 {
|
|
|
1743
1707
|
|
|
1744
1708
|
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
1745
1709
|
? u`
|
|
1746
|
-
<${this.helpTextTag}
|
|
1710
|
+
<${this.helpTextTag} part="helpText" appearance="${this.onDark ? 'inverse' : this.appearance}">
|
|
1747
1711
|
<slot name="helpText"></slot>
|
|
1748
1712
|
</${this.helpTextTag}>`
|
|
1749
1713
|
: u`
|
|
1750
|
-
<${this.helpTextTag}
|
|
1714
|
+
<${this.helpTextTag} error appearance="${this.onDark ? 'inverse' : this.appearance}"" role="alert" aria-live="assertive" part="helpText">
|
|
1751
1715
|
${this.errorMessage}
|
|
1752
1716
|
</${this.helpTextTag}>`
|
|
1753
1717
|
}
|
|
@@ -141,10 +141,6 @@ export class AuroCheckboxGroup extends LitElement {
|
|
|
141
141
|
* @private
|
|
142
142
|
*/
|
|
143
143
|
private helpTextTag;
|
|
144
|
-
/**
|
|
145
|
-
* @private
|
|
146
|
-
*/
|
|
147
|
-
private uniqueId;
|
|
148
144
|
/**
|
|
149
145
|
* Helper method to handle checkbox value changing.
|
|
150
146
|
* @private
|
|
@@ -168,15 +164,6 @@ export class AuroCheckboxGroup extends LitElement {
|
|
|
168
164
|
*/
|
|
169
165
|
private handleItems;
|
|
170
166
|
checkboxes: Element[] | undefined;
|
|
171
|
-
/**
|
|
172
|
-
* Method for mirroring the group's invalid state onto each checkbox.
|
|
173
|
-
* `validity` is the authoritative invalid state, and it has to be re-applied from
|
|
174
|
-
* `handleItems()` as well, because a slot change can happen without `validity` itself
|
|
175
|
-
* changing — a checkbox slotted into an already-invalid group would otherwise be missed.
|
|
176
|
-
* @private
|
|
177
|
-
* @returns {void}
|
|
178
|
-
*/
|
|
179
|
-
private syncCheckboxValidity;
|
|
180
167
|
/**
|
|
181
168
|
* Resets component to initial state.
|
|
182
169
|
* @returns {void}
|
|
@@ -999,22 +999,6 @@ class AuroDependencyVersioning {
|
|
|
999
999
|
}
|
|
1000
1000
|
}
|
|
1001
1001
|
|
|
1002
|
-
/**
|
|
1003
|
-
* Class for generating unique hashes based on the current timestamp.
|
|
1004
|
-
* This can be used to create unique identifiers for elements or data within an application,
|
|
1005
|
-
* ensuring that each identifier is distinct and can be easily generated without the need
|
|
1006
|
-
* for external libraries or complex algorithms.
|
|
1007
|
-
*/
|
|
1008
|
-
class UniqueId {
|
|
1009
|
-
/**
|
|
1010
|
-
* Creates a unique hash based on the current timestamp.
|
|
1011
|
-
* @returns {Function} Timestamp as a base-36 string
|
|
1012
|
-
*/
|
|
1013
|
-
create() {
|
|
1014
|
-
return Date.now().toString(36);
|
|
1015
|
-
}
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
1002
|
var styleCss$1 = css`:host{display:block;padding-bottom:var(--ds-size-150, 0.75rem)}.displayFlex legend+slot{display:flex;white-space:nowrap}fieldset{all:unset}legend{margin-bottom:var(--ds-size-150, 0.75rem)}[auro-helptext]{margin-top:var(--ds-size-150, 0.75rem)}`;
|
|
1019
1003
|
|
|
1020
1004
|
var colorCss$1 = css`:host{color:var(--ds-auro-checkbox-group-text-color)}:host([disabled]){--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([onDark]),:host([appearance=inverse]){--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][disabled]),:host([appearance=inverse][disabled]){--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}`;
|
|
@@ -1253,7 +1237,7 @@ class AuroHelpText extends LitElement {
|
|
|
1253
1237
|
}
|
|
1254
1238
|
}
|
|
1255
1239
|
|
|
1256
|
-
var formkitVersion = '
|
|
1240
|
+
var formkitVersion = '202609022123';
|
|
1257
1241
|
|
|
1258
1242
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1259
1243
|
// See LICENSE in the project root for license information.
|
|
@@ -1330,11 +1314,6 @@ class AuroCheckboxGroup extends LitElement {
|
|
|
1330
1314
|
* @private
|
|
1331
1315
|
*/
|
|
1332
1316
|
this.helpTextTag = versioning.generateTag('auro-formkit-checkbox-helptext', formkitVersion, AuroHelpText);
|
|
1333
|
-
|
|
1334
|
-
/**
|
|
1335
|
-
* @private
|
|
1336
|
-
*/
|
|
1337
|
-
this.uniqueId = new UniqueId().create();
|
|
1338
1317
|
}
|
|
1339
1318
|
|
|
1340
1319
|
static get styles() {
|
|
@@ -1586,29 +1565,6 @@ class AuroCheckboxGroup extends LitElement {
|
|
|
1586
1565
|
this.handlePreselectedItems();
|
|
1587
1566
|
|
|
1588
1567
|
this.validate();
|
|
1589
|
-
this.syncCheckboxValidity();
|
|
1590
|
-
}
|
|
1591
|
-
|
|
1592
|
-
/**
|
|
1593
|
-
* Method for mirroring the group's invalid state onto each checkbox.
|
|
1594
|
-
* `validity` is the authoritative invalid state, and it has to be re-applied from
|
|
1595
|
-
* `handleItems()` as well, because a slot change can happen without `validity` itself
|
|
1596
|
-
* changing — a checkbox slotted into an already-invalid group would otherwise be missed.
|
|
1597
|
-
* @private
|
|
1598
|
-
* @returns {void}
|
|
1599
|
-
*/
|
|
1600
|
-
syncCheckboxValidity() {
|
|
1601
|
-
const invalid = Boolean(this.validity && this.validity !== 'valid');
|
|
1602
|
-
|
|
1603
|
-
this.checkboxes.forEach((el) => {
|
|
1604
|
-
if (invalid) {
|
|
1605
|
-
el.setAttribute('error', true);
|
|
1606
|
-
el.setAttribute('aria-invalid', 'true');
|
|
1607
|
-
} else {
|
|
1608
|
-
el.removeAttribute('error');
|
|
1609
|
-
el.removeAttribute('aria-invalid');
|
|
1610
|
-
}
|
|
1611
|
-
});
|
|
1612
1568
|
}
|
|
1613
1569
|
|
|
1614
1570
|
/**
|
|
@@ -1640,7 +1596,13 @@ class AuroCheckboxGroup extends LitElement {
|
|
|
1640
1596
|
}
|
|
1641
1597
|
|
|
1642
1598
|
if (changedProperties.has('validity')) {
|
|
1643
|
-
this.
|
|
1599
|
+
this.checkboxes.forEach((el) => {
|
|
1600
|
+
if (this.validity && this.validity !== 'valid') {
|
|
1601
|
+
el.setAttribute('error', true);
|
|
1602
|
+
} else {
|
|
1603
|
+
el.removeAttribute('error');
|
|
1604
|
+
}
|
|
1605
|
+
});
|
|
1644
1606
|
}
|
|
1645
1607
|
|
|
1646
1608
|
if (changedProperties.has('required')) {
|
|
@@ -1664,6 +1626,12 @@ class AuroCheckboxGroup extends LitElement {
|
|
|
1664
1626
|
}
|
|
1665
1627
|
|
|
1666
1628
|
if (changedProperties.has('error')) {
|
|
1629
|
+
if (this.error) {
|
|
1630
|
+
this.setAttribute('aria-invalid', true);
|
|
1631
|
+
} else {
|
|
1632
|
+
this.removeAttribute('aria-invalid');
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1667
1635
|
this.validate(true);
|
|
1668
1636
|
}
|
|
1669
1637
|
}
|
|
@@ -1682,11 +1650,7 @@ class AuroCheckboxGroup extends LitElement {
|
|
|
1682
1650
|
};
|
|
1683
1651
|
|
|
1684
1652
|
return html$1`
|
|
1685
|
-
<fieldset
|
|
1686
|
-
class="${classMap(groupClasses)}"
|
|
1687
|
-
aria-invalid="${ifDefined(this.validity && this.validity !== 'valid' ? 'true' : undefined)}"
|
|
1688
|
-
aria-describedby="${this.uniqueId}"
|
|
1689
|
-
>
|
|
1653
|
+
<fieldset class="${classMap(groupClasses)}">
|
|
1690
1654
|
<legend>
|
|
1691
1655
|
<slot name="legend"></slot>
|
|
1692
1656
|
${this.required ? undefined : html$1`<slot name="optionalLabel"> (optional)</slot>`}
|
|
@@ -1696,11 +1660,11 @@ class AuroCheckboxGroup extends LitElement {
|
|
|
1696
1660
|
|
|
1697
1661
|
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
1698
1662
|
? html$1`
|
|
1699
|
-
<${this.helpTextTag}
|
|
1663
|
+
<${this.helpTextTag} part="helpText" appearance="${this.onDark ? 'inverse' : this.appearance}">
|
|
1700
1664
|
<slot name="helpText"></slot>
|
|
1701
1665
|
</${this.helpTextTag}>`
|
|
1702
1666
|
: html$1`
|
|
1703
|
-
<${this.helpTextTag}
|
|
1667
|
+
<${this.helpTextTag} error appearance="${this.onDark ? 'inverse' : this.appearance}"" role="alert" aria-live="assertive" part="helpText">
|
|
1704
1668
|
${this.errorMessage}
|
|
1705
1669
|
</${this.helpTextTag}>`
|
|
1706
1670
|
}
|