@aurodesignsystem-dev/auro-formkit 0.0.0-pr1497.0 → 0.0.0-pr1497.2
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/bibtemplate/dist/auro-bibtemplate.d.ts +7 -0
- package/components/bibtemplate/dist/index.js +9 -1
- package/components/bibtemplate/dist/registered.js +9 -1
- package/components/checkbox/demo/css-only.html +57 -0
- package/components/checkbox/demo/css-only.md +146 -0
- 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/demo/pages.json +1 -1
- package/components/checkbox/demo/styles.min.css +1 -1
- package/components/checkbox/demo/why-checkbox.html +57 -0
- package/components/checkbox/demo/why-checkbox.md +86 -0
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/css-only.html +57 -0
- package/components/combobox/demo/css-only.md +209 -0
- package/components/combobox/demo/customize.min.js +250 -16
- package/components/combobox/demo/getting-started.min.js +250 -16
- package/components/combobox/demo/index.min.js +250 -16
- package/components/combobox/demo/pages.json +1 -1
- package/components/combobox/demo/styles.min.css +1 -1
- package/components/combobox/demo/why-combobox.html +57 -0
- package/components/combobox/demo/why-combobox.md +113 -0
- package/components/combobox/dist/index.js +250 -16
- package/components/combobox/dist/registered.js +250 -16
- package/components/counter/demo/css-only.html +57 -0
- package/components/counter/demo/css-only.md +184 -0
- package/components/counter/demo/customize.min.js +249 -15
- package/components/counter/demo/index.min.js +249 -15
- package/components/counter/demo/keyboard-behavior.md +1 -0
- package/components/counter/demo/pages.json +1 -1
- package/components/counter/demo/styles.min.css +1 -1
- package/components/counter/demo/why-counter.html +57 -0
- package/components/counter/demo/why-counter.md +108 -0
- package/components/counter/dist/index.js +10 -2
- package/components/counter/dist/registered.js +10 -2
- package/components/datepicker/demo/accessibility.md +54 -3
- package/components/datepicker/demo/api.md +63 -53
- package/components/datepicker/demo/css-only.html +57 -0
- package/components/datepicker/demo/css-only.md +151 -0
- package/components/datepicker/demo/customize.html +2 -0
- package/components/datepicker/demo/customize.js +19 -0
- package/components/datepicker/demo/customize.md +56 -0
- package/components/datepicker/demo/customize.min.js +36147 -0
- package/components/datepicker/demo/design.md +3 -1
- package/components/datepicker/demo/index.js +5 -1
- package/components/datepicker/demo/index.md +104 -15
- package/components/datepicker/demo/index.min.js +2485 -261
- package/components/datepicker/demo/keyboard-behavior.md +201 -2
- package/components/datepicker/demo/pages.json +1 -1
- package/components/datepicker/demo/styles.min.css +1 -1
- package/components/datepicker/demo/voiceover.md +21 -12
- package/components/datepicker/demo/why-datepicker.html +57 -0
- package/components/datepicker/demo/why-datepicker.md +133 -0
- package/components/datepicker/dist/index.js +2348 -211
- package/components/datepicker/dist/registered.js +2348 -211
- package/components/datepicker/dist/src/auro-calendar-cell.d.ts +113 -13
- package/components/datepicker/dist/src/auro-calendar-month.d.ts +38 -1
- package/components/datepicker/dist/src/auro-calendar.d.ts +258 -0
- package/components/datepicker/dist/src/auro-datepicker.d.ts +141 -41
- package/components/datepicker/dist/src/datepickerKeyboardStrategy.d.ts +5 -3
- package/components/dropdown/demo/accessibility.md +11 -0
- package/components/dropdown/demo/api.md +1 -0
- package/components/dropdown/demo/css-only.html +57 -0
- package/components/dropdown/demo/css-only.md +219 -0
- package/components/dropdown/demo/customize.md +3 -0
- package/components/dropdown/demo/customize.min.js +239 -13
- package/components/dropdown/demo/getting-started.min.js +239 -13
- package/components/dropdown/demo/index.min.js +239 -13
- package/components/dropdown/demo/keyboard-behavior.md +1 -0
- package/components/dropdown/demo/pages.json +1 -1
- package/components/dropdown/demo/styles.min.css +1 -1
- package/components/dropdown/demo/why-dropdown.html +57 -0
- package/components/dropdown/demo/why-dropdown.md +97 -0
- package/components/dropdown/dist/auro-dropdown.d.ts +34 -1
- package/components/dropdown/dist/index.js +239 -13
- package/components/dropdown/dist/registered.js +239 -13
- package/components/form/demo/css-only.html +57 -0
- package/components/form/demo/css-only.md +156 -0
- package/components/form/demo/customize.min.js +3098 -259
- package/components/form/demo/getting-started.min.js +3098 -259
- package/components/form/demo/index.min.js +3098 -259
- package/components/form/demo/pages.json +1 -1
- package/components/form/demo/registerDemoDeps.min.js +3098 -259
- package/components/form/demo/styles.min.css +1 -1
- package/components/form/demo/why-form.html +57 -0
- package/components/form/demo/why-form.md +101 -0
- package/components/input/demo/css-only.html +57 -0
- package/components/input/demo/css-only.md +199 -0
- 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/demo/pages.json +1 -1
- package/components/input/demo/styles.min.css +1 -1
- package/components/input/demo/why-input.html +57 -0
- package/components/input/demo/why-input.md +121 -0
- package/components/input/dist/index.js +1 -1
- package/components/input/dist/registered.js +1 -1
- package/components/menu/demo/css-only.html +57 -0
- package/components/menu/demo/css-only.md +166 -0
- package/components/menu/demo/pages.json +1 -1
- package/components/menu/demo/styles.min.css +1 -1
- package/components/menu/demo/why-menu.html +57 -0
- package/components/menu/demo/why-menu.md +104 -0
- package/components/radio/demo/css-only.html +57 -0
- package/components/radio/demo/css-only.md +151 -0
- package/components/radio/demo/customize.min.js +1764 -0
- package/components/radio/demo/demo-support.min.js +55807 -0
- package/components/radio/demo/getting-started.js +1 -1
- package/components/radio/demo/getting-started.md +1 -1
- package/components/radio/demo/getting-started.min.js +1783 -0
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/demo/pages.json +1 -1
- package/components/radio/demo/styles.min.css +1 -1
- package/components/radio/demo/why-radio.html +57 -0
- package/components/radio/demo/why-radio.md +92 -0
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/css-only.html +57 -0
- package/components/select/demo/css-only.md +203 -0
- package/components/select/demo/customize.min.js +249 -15
- package/components/select/demo/getting-started.min.js +249 -15
- package/components/select/demo/index.min.js +249 -15
- package/components/select/demo/keyboard-behavior.md +1 -0
- package/components/select/demo/pages.json +1 -1
- package/components/select/demo/styles.min.css +1 -1
- package/components/select/demo/why-select.html +57 -0
- package/components/select/demo/why-select.md +128 -0
- package/components/select/dist/index.js +249 -15
- package/components/select/dist/registered.js +249 -15
- package/custom-elements.json +1171 -92
- package/package.json +8 -8
|
@@ -4158,7 +4158,7 @@ function applyKeyboardStrategy(component, strategy, options = {}) {
|
|
|
4158
4158
|
});
|
|
4159
4159
|
}
|
|
4160
4160
|
|
|
4161
|
-
var styleCss$2$1 = css`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}:host dialog{width:auto;max-width:none;height:auto;max-height:none;padding:0;border:none;margin:0;outline:none;transform:translateZ(0)}:host dialog::backdrop{background:transparent}:host(:not([isfullscreen])) dialog{position:relative;inset:unset}:host(:not([isfullscreen])) .container.shape-box{border-radius:unset}:host(:not([isfullscreen])) .container[class*=shape-pill],:host(:not([isfullscreen])) .container[class*=shape-snowflake]{border-radius:30px}:host(:not([isfullscreen])) .container[class*=shape-rounded]{border-radius:16px}:host(:not([matchWidth])) .container{min-width:fit-content}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([isfullscreen]) .container::backdrop{background:var(--ds-color-background-primary, #fff)}:host(:popover-open){position:fixed;overflow:visible;padding:0;border:none;margin:0;background:transparent;inset:unset;outline:none}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}.container{display:inline-block;overflow:auto;box-sizing:border-box;border-radius:var(--ds-border-radius, 0.375rem);margin:var(--ds-size-50, 0.25rem) 0}.util_displayHiddenVisually{position:absolute;overflow:hidden;width:1px;height:1px;padding:0;border:0;margin:-1px;clip-path:inset(50%);white-space:nowrap}`;
|
|
4161
|
+
var styleCss$2$1 = css`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}:host dialog{width:auto;max-width:none;height:auto;max-height:none;padding:0;border:none;margin:0;outline:none;transform:translateZ(0)}:host dialog::backdrop{background:transparent}:host(:not([isfullscreen])) dialog{position:relative;inset:unset}:host(:not([isfullscreen])) .container.shape-box{border-radius:unset}:host(:not([isfullscreen])) .container[class*=shape-pill],:host(:not([isfullscreen])) .container[class*=shape-snowflake]{border-radius:30px}:host(:not([isfullscreen])) .container[class*=shape-rounded]{border-radius:16px}:host([desktopmodal]:popover-open)::backdrop{background:transparent}:host(:not([matchWidth])) .container{min-width:fit-content}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([isfullscreen]) .container::backdrop{background:var(--ds-color-background-primary, #fff)}:host(:popover-open){position:fixed;overflow:visible;padding:0;border:none;margin:0;background:transparent;inset:unset;outline:none}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}.container{display:inline-block;overflow:auto;box-sizing:border-box;border-radius:var(--ds-border-radius, 0.375rem);margin:var(--ds-size-50, 0.25rem) 0}.util_displayHiddenVisually{position:absolute;overflow:hidden;width:1px;height:1px;padding:0;border:0;margin:-1px;clip-path:inset(50%);white-space:nowrap}`;
|
|
4162
4162
|
|
|
4163
4163
|
var colorCss$2$1 = css`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
4164
4164
|
|
|
@@ -4789,7 +4789,7 @@ let AuroHelpText$2 = class AuroHelpText extends LitElement {
|
|
|
4789
4789
|
}
|
|
4790
4790
|
};
|
|
4791
4791
|
|
|
4792
|
-
var formkitVersion$2 = '
|
|
4792
|
+
var formkitVersion$2 = '202606081904';
|
|
4793
4793
|
|
|
4794
4794
|
let AuroElement$2 = class AuroElement extends LitElement {
|
|
4795
4795
|
static get properties() {
|
|
@@ -4969,6 +4969,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4969
4969
|
_intializeDefaults() {
|
|
4970
4970
|
this.appearance = 'default';
|
|
4971
4971
|
this.chevron = false;
|
|
4972
|
+
this.desktopModal = false;
|
|
4972
4973
|
this.disabled = false;
|
|
4973
4974
|
this.disableKeyboardHandling = false;
|
|
4974
4975
|
this.error = false;
|
|
@@ -5149,6 +5150,14 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5149
5150
|
reflect: true
|
|
5150
5151
|
},
|
|
5151
5152
|
|
|
5153
|
+
/**
|
|
5154
|
+
* If declared, the dropdown will behave as a modal dialog when in a desktop viewport size.
|
|
5155
|
+
*/
|
|
5156
|
+
desktopModal: {
|
|
5157
|
+
type: Boolean,
|
|
5158
|
+
reflect: true
|
|
5159
|
+
},
|
|
5160
|
+
|
|
5152
5161
|
/**
|
|
5153
5162
|
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
5154
5163
|
*/
|
|
@@ -5436,6 +5445,15 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5436
5445
|
|
|
5437
5446
|
disconnectedCallback() {
|
|
5438
5447
|
super.disconnectedCallback();
|
|
5448
|
+
this._clearPageInert();
|
|
5449
|
+
if (this._bibTabHandler) {
|
|
5450
|
+
this.removeEventListener('keydown', this._bibTabHandler);
|
|
5451
|
+
this._bibTabHandler = undefined;
|
|
5452
|
+
}
|
|
5453
|
+
if (this.focusTrap) {
|
|
5454
|
+
this.focusTrap.disconnect();
|
|
5455
|
+
this.focusTrap = undefined;
|
|
5456
|
+
}
|
|
5439
5457
|
if (this.floater) {
|
|
5440
5458
|
this.floater.hideBib('disconnect');
|
|
5441
5459
|
this.floater.disconnect();
|
|
@@ -5463,19 +5481,45 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5463
5481
|
if (this.isPopoverVisible) {
|
|
5464
5482
|
// Fullscreen: use showModal() for native accessibility (inert outside, focus trap)
|
|
5465
5483
|
// Desktop: use show() for Floating UI positioning + FocusTrap for focus management
|
|
5466
|
-
|
|
5467
|
-
this.
|
|
5484
|
+
this.bibElement.value.open(this.isBibFullscreen);
|
|
5485
|
+
this.updateFocusTrap();
|
|
5486
|
+
|
|
5487
|
+
// Desktop modal: make siblings inert so content outside is not interactive
|
|
5488
|
+
if (this.desktopModal && !this.isBibFullscreen) {
|
|
5489
|
+
this._setPageInert();
|
|
5490
|
+
}
|
|
5468
5491
|
} else {
|
|
5469
5492
|
this.bibElement.value.close();
|
|
5493
|
+
this._clearPageInert();
|
|
5470
5494
|
}
|
|
5471
5495
|
}
|
|
5472
5496
|
|
|
5473
5497
|
// When fullscreen strategy changes while open, re-open dialog with correct mode
|
|
5474
5498
|
// (e.g. resizing from desktop → mobile while dropdown is open)
|
|
5475
5499
|
if (changedProperties.has('isBibFullscreen') && this.isPopoverVisible && this.bibElement.value) {
|
|
5476
|
-
const useModal = this.isBibFullscreen;
|
|
5477
5500
|
this.bibElement.value.close();
|
|
5478
|
-
this.bibElement.value.open(
|
|
5501
|
+
this.bibElement.value.open(this.isBibFullscreen);
|
|
5502
|
+
|
|
5503
|
+
// Re-initialize focus management for the new strategy
|
|
5504
|
+
this.updateFocusTrap();
|
|
5505
|
+
|
|
5506
|
+
// Toggle inert: desktop modal needs it, fullscreen showModal() handles it natively
|
|
5507
|
+
if (this.desktopModal && !this.isBibFullscreen) {
|
|
5508
|
+
this._setPageInert();
|
|
5509
|
+
} else {
|
|
5510
|
+
this._clearPageInert();
|
|
5511
|
+
}
|
|
5512
|
+
}
|
|
5513
|
+
|
|
5514
|
+
// Handle desktopModal toggled while the dropdown is already open.
|
|
5515
|
+
// Re-initialize focus trapping and page inert state to match the new mode.
|
|
5516
|
+
if (changedProperties.has('desktopModal') && this.isPopoverVisible && !this.isBibFullscreen) {
|
|
5517
|
+
this.updateFocusTrap();
|
|
5518
|
+
if (this.desktopModal) {
|
|
5519
|
+
this._setPageInert();
|
|
5520
|
+
} else {
|
|
5521
|
+
this._clearPageInert();
|
|
5522
|
+
}
|
|
5479
5523
|
}
|
|
5480
5524
|
}
|
|
5481
5525
|
|
|
@@ -5485,8 +5529,14 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5485
5529
|
* @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
|
|
5486
5530
|
*/
|
|
5487
5531
|
handleDropdownToggle(event) {
|
|
5488
|
-
this.updateFocusTrap();
|
|
5489
5532
|
this.isPopoverVisible = event.detail.expanded;
|
|
5533
|
+
|
|
5534
|
+
// Tear down FocusTrap when closing. Creation happens in updated()
|
|
5535
|
+
// after the dialog is open so getFocusableElements can find content.
|
|
5536
|
+
if (!this.isPopoverVisible) {
|
|
5537
|
+
this.updateFocusTrap();
|
|
5538
|
+
}
|
|
5539
|
+
|
|
5490
5540
|
const eventType = event.detail.eventType || "unknown";
|
|
5491
5541
|
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
5492
5542
|
this.trigger.focus();
|
|
@@ -5585,19 +5635,194 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5585
5635
|
* @private
|
|
5586
5636
|
*/
|
|
5587
5637
|
updateFocusTrap() {
|
|
5638
|
+
// Always clean up existing handlers/traps before setting up new ones
|
|
5639
|
+
// to prevent duplicate listeners on repeated calls.
|
|
5640
|
+
if (this._bibTabHandler) {
|
|
5641
|
+
this.removeEventListener('keydown', this._bibTabHandler);
|
|
5642
|
+
this._bibTabHandler = undefined;
|
|
5643
|
+
}
|
|
5644
|
+
|
|
5645
|
+
if (this.focusTrap) {
|
|
5646
|
+
this.focusTrap.disconnect();
|
|
5647
|
+
this.focusTrap = undefined;
|
|
5648
|
+
}
|
|
5649
|
+
|
|
5588
5650
|
if (this.isPopoverVisible) {
|
|
5589
5651
|
if (!this.isBibFullscreen) {
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5652
|
+
if (this.desktopModal) {
|
|
5653
|
+
// Desktop modal: trap focus only within the bib content.
|
|
5654
|
+
// Can't use FocusTrap on the bib element because keydown events
|
|
5655
|
+
// from slotted content bubble through the dropdown host (light DOM),
|
|
5656
|
+
// not through the bib (shadow projection target). Using FocusTrap
|
|
5657
|
+
// on the dropdown would include the trigger in the tab cycle.
|
|
5658
|
+
// Instead, listen for Tab on the dropdown and manually wrap focus
|
|
5659
|
+
// within the bib's focusable elements.
|
|
5660
|
+
this._bibTabHandler = (event) => {
|
|
5661
|
+
if (event.key !== 'Tab') {
|
|
5662
|
+
return;
|
|
5663
|
+
}
|
|
5664
|
+
|
|
5665
|
+
// Collect focusable elements from the bib content.
|
|
5666
|
+
const focusables = getFocusableElements(this.bibContent);
|
|
5667
|
+
|
|
5668
|
+
// Fallback: try from slotted content directly
|
|
5669
|
+
if (!focusables.length) {
|
|
5670
|
+
const slot = this.shadowRoot.querySelector('.slotContent slot');
|
|
5671
|
+
const assignedNodes = slot.assignedNodes({ flatten: true });
|
|
5672
|
+
|
|
5673
|
+
for (const node of assignedNodes) {
|
|
5674
|
+
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
5675
|
+
focusables.push(...getFocusableElements(node));
|
|
5676
|
+
}
|
|
5677
|
+
}
|
|
5678
|
+
}
|
|
5679
|
+
|
|
5680
|
+
if (!focusables.length) {
|
|
5681
|
+
return;
|
|
5682
|
+
}
|
|
5683
|
+
|
|
5684
|
+
event.preventDefault();
|
|
5685
|
+
|
|
5686
|
+
const direction = event.shiftKey ? -1 : 1; // eslint-disable-line no-magic-numbers
|
|
5687
|
+
|
|
5688
|
+
// Walk the active element chain through shadow roots
|
|
5689
|
+
const actives = this._getActiveElements();
|
|
5690
|
+
|
|
5691
|
+
let idx = focusables.findIndex((el) => actives.includes(el));
|
|
5692
|
+
|
|
5693
|
+
if (idx === -1) { // eslint-disable-line no-magic-numbers
|
|
5694
|
+
// Focus is not on a known element — move to first/last
|
|
5695
|
+
idx = direction === 1 ? -1 : focusables.length; // eslint-disable-line no-magic-numbers
|
|
5696
|
+
}
|
|
5697
|
+
|
|
5698
|
+
// Try each element in order, skipping any that can't receive focus
|
|
5699
|
+
// (e.g. hidden elements, elements in collapsed sections)
|
|
5700
|
+
for (let index = 0; index < focusables.length; index++) { // eslint-disable-line no-plusplus
|
|
5701
|
+
let nextIdx = idx + direction;
|
|
5702
|
+
|
|
5703
|
+
// Wrap around
|
|
5704
|
+
if (nextIdx < 0) {
|
|
5705
|
+
nextIdx = focusables.length - 1;
|
|
5706
|
+
} else if (nextIdx >= focusables.length) {
|
|
5707
|
+
nextIdx = 0;
|
|
5708
|
+
}
|
|
5709
|
+
|
|
5710
|
+
focusables[nextIdx].focus();
|
|
5711
|
+
|
|
5712
|
+
// Verify focus actually moved to the target
|
|
5713
|
+
const newActives = this._getActiveElements();
|
|
5714
|
+
|
|
5715
|
+
if (newActives.includes(focusables[nextIdx])) {
|
|
5716
|
+
return;
|
|
5717
|
+
}
|
|
5718
|
+
|
|
5719
|
+
// Focus didn't stick — skip this element and try the next
|
|
5720
|
+
idx = nextIdx;
|
|
5721
|
+
}
|
|
5722
|
+
};
|
|
5723
|
+
this.addEventListener('keydown', this._bibTabHandler);
|
|
5724
|
+
|
|
5725
|
+
// Move initial focus into the bib content, matching FocusTrap behavior
|
|
5726
|
+
requestAnimationFrame(() => {
|
|
5727
|
+
const focusables = getFocusableElements(this.bibContent);
|
|
5728
|
+
if (focusables.length) {
|
|
5729
|
+
focusables[0].focus();
|
|
5730
|
+
}
|
|
5731
|
+
});
|
|
5732
|
+
} else {
|
|
5733
|
+
// Normal desktop: use FocusTrap on the bib element
|
|
5734
|
+
this.focusTrap = new FocusTrap(this.bibContent);
|
|
5735
|
+
this.focusTrap.focusFirstElement();
|
|
5736
|
+
}
|
|
5593
5737
|
}
|
|
5594
5738
|
// Fullscreen: showModal() provides native focus trapping
|
|
5739
|
+
}
|
|
5740
|
+
}
|
|
5741
|
+
|
|
5742
|
+
/**
|
|
5743
|
+
* Returns the chain of active (focused) elements through shadow roots.
|
|
5744
|
+
* @private
|
|
5745
|
+
* @returns {Array<HTMLElement>}
|
|
5746
|
+
*/
|
|
5747
|
+
_getActiveElements() {
|
|
5748
|
+
let { activeElement } = document;
|
|
5749
|
+
const actives = [activeElement];
|
|
5750
|
+
|
|
5751
|
+
while (activeElement?.shadowRoot?.activeElement) {
|
|
5752
|
+
activeElement = activeElement.shadowRoot.activeElement;
|
|
5753
|
+
actives.push(activeElement);
|
|
5754
|
+
}
|
|
5755
|
+
|
|
5756
|
+
return actives;
|
|
5757
|
+
}
|
|
5758
|
+
|
|
5759
|
+
/**
|
|
5760
|
+
* Sets `inert` on sibling elements of the dropdown's top-level host
|
|
5761
|
+
* so that content outside the dropdown is not interactive while the modal is open.
|
|
5762
|
+
* Walks up through shadow DOM boundaries to find the outermost host element
|
|
5763
|
+
* in the light DOM, then sets `inert` on siblings at each ancestor level
|
|
5764
|
+
* to ensure all page content outside the host subtree is inert.
|
|
5765
|
+
* @private
|
|
5766
|
+
*/
|
|
5767
|
+
_setPageInert() {
|
|
5768
|
+
if (this._inertSiblings) {
|
|
5595
5769
|
return;
|
|
5596
5770
|
}
|
|
5597
5771
|
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5772
|
+
this._inertSiblings = [];
|
|
5773
|
+
|
|
5774
|
+
// Walk up through shadow DOM boundaries to find the topmost host
|
|
5775
|
+
// element in the light DOM. For example, if this dropdown is inside
|
|
5776
|
+
// auro-datepicker's shadow DOM, we walk up to the datepicker element
|
|
5777
|
+
// so we set inert on its siblings — not on the datepicker itself.
|
|
5778
|
+
let host = this;
|
|
5779
|
+
while (host.getRootNode() instanceof ShadowRoot) {
|
|
5780
|
+
host = host.getRootNode().host;
|
|
5781
|
+
}
|
|
5782
|
+
|
|
5783
|
+
// Walk up the ancestor chain, inerting siblings at each level
|
|
5784
|
+
// to ensure the entire page outside the host subtree is inert.
|
|
5785
|
+
// Uses a reference counter (data-auro-inert-count) so multiple
|
|
5786
|
+
// simultaneous modal dropdowns share inert state safely.
|
|
5787
|
+
let current = host;
|
|
5788
|
+
while (current.parentElement) {
|
|
5789
|
+
const parent = current.parentElement;
|
|
5790
|
+
for (const sibling of parent.children) {
|
|
5791
|
+
if (sibling !== current) {
|
|
5792
|
+
const count = parseInt(sibling.dataset.auroInertCount || '0', 10);
|
|
5793
|
+
if (count === 0) {
|
|
5794
|
+
sibling.dataset.auroInertWas = sibling.inert ? 'true' : 'false';
|
|
5795
|
+
}
|
|
5796
|
+
sibling.dataset.auroInertCount = String(count + 1);
|
|
5797
|
+
sibling.inert = true;
|
|
5798
|
+
this._inertSiblings.push(sibling);
|
|
5799
|
+
}
|
|
5800
|
+
}
|
|
5801
|
+
current = parent;
|
|
5802
|
+
}
|
|
5803
|
+
}
|
|
5804
|
+
|
|
5805
|
+
/**
|
|
5806
|
+
* Restores `inert` state on siblings that were tracked by `_setPageInert`.
|
|
5807
|
+
* Uses reference counting so inert is only cleared when the last modal
|
|
5808
|
+
* dropdown releases a given element. Preserves the original inert state
|
|
5809
|
+
* so externally-inerted elements are not inadvertently re-enabled.
|
|
5810
|
+
* @private
|
|
5811
|
+
*/
|
|
5812
|
+
_clearPageInert() {
|
|
5813
|
+
if (this._inertSiblings) {
|
|
5814
|
+
for (const sibling of this._inertSiblings) {
|
|
5815
|
+
const count = parseInt(sibling.dataset.auroInertCount || '1', 10) - 1;
|
|
5816
|
+
if (count <= 0) {
|
|
5817
|
+
const wasInert = sibling.dataset.auroInertWas === 'true';
|
|
5818
|
+
delete sibling.dataset.auroInertCount;
|
|
5819
|
+
delete sibling.dataset.auroInertWas;
|
|
5820
|
+
sibling.inert = wasInert;
|
|
5821
|
+
} else {
|
|
5822
|
+
sibling.dataset.auroInertCount = String(count);
|
|
5823
|
+
}
|
|
5824
|
+
}
|
|
5825
|
+
this._inertSiblings = undefined;
|
|
5601
5826
|
}
|
|
5602
5827
|
}
|
|
5603
5828
|
|
|
@@ -5836,6 +6061,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5836
6061
|
shape="${this.shape}"
|
|
5837
6062
|
?data-show="${this.isPopoverVisible}"
|
|
5838
6063
|
?isfullscreen="${this.isBibFullscreen}"
|
|
6064
|
+
?desktopmodal="${this.desktopModal}"
|
|
5839
6065
|
.dialogLabel="${this.bibDialogLabel}"
|
|
5840
6066
|
${ref(this.bibElement)}
|
|
5841
6067
|
>
|
|
@@ -18040,7 +18266,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
18040
18266
|
}
|
|
18041
18267
|
};
|
|
18042
18268
|
|
|
18043
|
-
var formkitVersion$1 = '
|
|
18269
|
+
var formkitVersion$1 = '202606081904';
|
|
18044
18270
|
|
|
18045
18271
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
18046
18272
|
// See LICENSE in the project root for license information.
|
|
@@ -19046,6 +19272,14 @@ class AuroBibtemplate extends LitElement {
|
|
|
19046
19272
|
large: {
|
|
19047
19273
|
type: Boolean,
|
|
19048
19274
|
reflect: true
|
|
19275
|
+
},
|
|
19276
|
+
|
|
19277
|
+
/**
|
|
19278
|
+
* If declared, the footer slot will be rendered even when not in fullscreen mode.
|
|
19279
|
+
*/
|
|
19280
|
+
showFooter: {
|
|
19281
|
+
type: Boolean,
|
|
19282
|
+
reflect: true
|
|
19049
19283
|
}
|
|
19050
19284
|
};
|
|
19051
19285
|
}
|
|
@@ -19148,7 +19382,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
19148
19382
|
<slot></slot>
|
|
19149
19383
|
</div>
|
|
19150
19384
|
|
|
19151
|
-
${this.isFullscreen ? html`
|
|
19385
|
+
${this.isFullscreen || this.showFooter ? html`
|
|
19152
19386
|
<div id="footerContainer">
|
|
19153
19387
|
<slot name="footer"></slot>
|
|
19154
19388
|
</div>` : null}
|
|
@@ -19157,7 +19391,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
19157
19391
|
}
|
|
19158
19392
|
}
|
|
19159
19393
|
|
|
19160
|
-
var formkitVersion = '
|
|
19394
|
+
var formkitVersion = '202606081904';
|
|
19161
19395
|
|
|
19162
19396
|
var styleCss$1 = css`.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}`;
|
|
19163
19397
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3
|
+
See LICENSE in the project root for license information.
|
|
4
|
+
|
|
5
|
+
HTML in this document is standardized and NOT to be edited.
|
|
6
|
+
All demo code should be added/edited in ./demo/css-only.md
|
|
7
|
+
|
|
8
|
+
With the exception of adding custom elements if needed for the demo.
|
|
9
|
+
|
|
10
|
+
----------------------- DO NOT EDIT -----------------------------
|
|
11
|
+
|
|
12
|
+
-->
|
|
13
|
+
|
|
14
|
+
<!DOCTYPE html>
|
|
15
|
+
<html lang="en">
|
|
16
|
+
<head>
|
|
17
|
+
<meta charset="UTF-8" />
|
|
18
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
19
|
+
<title>Auro Web Component Demo | auro-counter | CSS only</title>
|
|
20
|
+
|
|
21
|
+
<!-- highlight.js Stylesheet -->
|
|
22
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles/github.min.css"/>
|
|
23
|
+
|
|
24
|
+
<!-- Legacy reference is still needed to support auro-counter's use of legacy token values at this time -->
|
|
25
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
|
|
26
|
+
|
|
27
|
+
<!-- Design Token Alaska Theme -->
|
|
28
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
|
|
29
|
+
|
|
30
|
+
<!-- Webcore Stylesheet Alaska Theme -->
|
|
31
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
|
|
32
|
+
|
|
33
|
+
<!-- Demo Specific Styles -->
|
|
34
|
+
<link rel="stylesheet" type="text/css" href="./styles.min.css" />
|
|
35
|
+
<style>
|
|
36
|
+
table {
|
|
37
|
+
--ds-color-container-secondary-default: transparent;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
tr:not(:last-of-type) {
|
|
41
|
+
border-bottom: 1px solid var(--ds-color-border-tertiary-default);
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
44
|
+
</head>
|
|
45
|
+
<body class="auro-markdown">
|
|
46
|
+
<main></main>
|
|
47
|
+
|
|
48
|
+
<script type="module">
|
|
49
|
+
import { renderPage } from './demo-support.min.js';
|
|
50
|
+
await renderPage('./css-only.md');
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<!-- If additional elements are needed for the demo, add them here. -->
|
|
54
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-header@latest/+esm" type="module"></script>
|
|
55
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-hyperlink@latest/+esm" type="module"></script>
|
|
56
|
+
</body>
|
|
57
|
+
</html>
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
<auro-header level="1">CSS only with native number input</auro-header>
|
|
2
|
+
<p>For situations where the <code><auro-counter></code> web component cannot be used, a native HTML <code><input type="number"></code> element — optionally paired with <code><button></code> increment and decrement controls — can be styled with the Auro Design System tokens to approximate the visual appearance of <code>auro-counter</code>. Unlike <auro-hyperlink href="https://auro.alaskaair.com/components/auro/hyperlink/css-only" target="_blank">auro-hyperlink</auro-hyperlink>, <auro-hyperlink href="https://alaskaairlines.github.io/WebCoreStyleSheets/" target="_blank">Web Core Style Sheets</auro-hyperlink> does not provide a prebuilt <code>.counter</code> class, so the styling must be authored manually using Auro design tokens.</p>
|
|
3
|
+
<auro-header level="2">Styling a native number input</auro-header>
|
|
4
|
+
<p>The native number input and its associated increment/decrement buttons can be restyled with the Auro design tokens published by <auro-hyperlink href="https://alaskaairlines.github.io/WebCoreStyleSheets/" target="_blank">@aurodesignsystem/design-tokens</auro-hyperlink>. The pattern below replicates the layout, button shape, and value typography used by <code>auro-counter</code>.</p>
|
|
5
|
+
<pre><code>@import "./node_modules/@aurodesignsystem/design-tokens/dist/tokens/CSSCustomProperties.css";
|
|
6
|
+
|
|
7
|
+
.counter {
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
gap: var(--ds-size-200, 1rem);
|
|
11
|
+
font-family: var(--ds-font-family-default, sans-serif);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.counter__button {
|
|
15
|
+
appearance: none;
|
|
16
|
+
-webkit-appearance: none;
|
|
17
|
+
width: var(--ds-size-400, 2rem);
|
|
18
|
+
height: var(--ds-size-400, 2rem);
|
|
19
|
+
border: 1px solid var(--ds-color-border-ui-default, #6e767f);
|
|
20
|
+
border-radius: 50%;
|
|
21
|
+
background-color: var(--ds-color-container-primary-default, #ffffff);
|
|
22
|
+
color: var(--ds-color-text-primary-default, #00467f);
|
|
23
|
+
font-size: var(--ds-size-300, 1.5rem);
|
|
24
|
+
line-height: 1;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
display: inline-flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.counter__button:focus-visible {
|
|
32
|
+
outline: 2px solid var(--ds-color-border-active-default, #01426a);
|
|
33
|
+
outline-offset: 2px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.counter__button:disabled {
|
|
37
|
+
cursor: not-allowed;
|
|
38
|
+
opacity: 0.5;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.counter__value {
|
|
42
|
+
appearance: textfield;
|
|
43
|
+
-moz-appearance: textfield;
|
|
44
|
+
width: var(--ds-size-500, 2.5rem);
|
|
45
|
+
border: none;
|
|
46
|
+
background: transparent;
|
|
47
|
+
text-align: center;
|
|
48
|
+
font-size: var(--ds-size-300, 1.5rem);
|
|
49
|
+
color: var(--ds-color-text-primary-default, #2a2a2a);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.counter__value::-webkit-outer-spin-button,
|
|
53
|
+
.counter__value::-webkit-inner-spin-button {
|
|
54
|
+
-webkit-appearance: none;
|
|
55
|
+
margin: 0;
|
|
56
|
+
}</code></pre>
|
|
57
|
+
<auro-header level="3">Basic counter</auro-header>
|
|
58
|
+
<p>Wrap a native <code><input type="number"></code> with two <code><button></code> elements and a <code><label></code> for an accessible name:</p>
|
|
59
|
+
<pre><code><div class="counter">
|
|
60
|
+
<label for="passengers">Passengers</label>
|
|
61
|
+
<button type="button" class="counter__button" aria-label="Decrease passengers">−</button>
|
|
62
|
+
<input id="passengers" class="counter__value" type="number" min="0" max="9" step="1" value="0" />
|
|
63
|
+
<button type="button" class="counter__button" aria-label="Increase passengers">+</button>
|
|
64
|
+
</div></code></pre>
|
|
65
|
+
<auro-header level="3">Group of counters</auro-header>
|
|
66
|
+
<p>Use a <code><fieldset></code> and <code><legend></code> to give the group an accessible name. The buttons require custom JavaScript to update each input's value:</p>
|
|
67
|
+
<pre><code><fieldset>
|
|
68
|
+
<legend>Travelers</legend>
|
|
69
|
+
<div class="counter">
|
|
70
|
+
<label for="adults">Adults</label>
|
|
71
|
+
<button type="button" class="counter__button" aria-label="Decrease adults">−</button>
|
|
72
|
+
<input id="adults" class="counter__value" type="number" min="1" max="9" step="1" value="1" />
|
|
73
|
+
<button type="button" class="counter__button" aria-label="Increase adults">+</button>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="counter">
|
|
76
|
+
<label for="children">Children</label>
|
|
77
|
+
<button type="button" class="counter__button" aria-label="Decrease children">−</button>
|
|
78
|
+
<input id="children" class="counter__value" type="number" min="0" max="8" step="1" value="0" />
|
|
79
|
+
<button type="button" class="counter__button" aria-label="Increase children">+</button>
|
|
80
|
+
</div>
|
|
81
|
+
</fieldset></code></pre>
|
|
82
|
+
<auro-header level="2">What you lose without auro-counter</auro-header>
|
|
83
|
+
<p>While the CSS above replicates the <strong>visual styling</strong> of <code>auro-counter</code>, the following functionality built into the <code>auro-counter</code> and <code>auro-counter-group</code> web components is <strong>not available</strong> when using plain HTML:</p>
|
|
84
|
+
<auro-header level="3">Increment and decrement button wiring</auro-header>
|
|
85
|
+
<p><code>auro-counter</code> exposes <code>increment()</code> and <code>decrement()</code> methods and handles all click wiring between its buttons and the displayed value. With native HTML, the <code><button></code> controls have no inherent relationship to the <code><input type="number"></code> — you must write JavaScript click handlers that read the input, apply the step, clamp to <code>min</code>/<code>max</code>, and write the new value back.</p>
|
|
86
|
+
<auro-header level="3">Automatic min/max button disabling</auro-header>
|
|
87
|
+
<p><code>auro-counter</code> automatically disables the decrement button when the value is at <code>min</code> and the increment button when the value is at <code>max</code>, providing a clear visual signal that further changes are not allowed. Native HTML <code>min</code> and <code>max</code> only constrain validation — the surrounding <code><button></code> controls will not disable themselves at the boundaries unless you wire that behavior yourself.</p>
|
|
88
|
+
<auro-header level="3">Group-level min/max coordination</auro-header>
|
|
89
|
+
<p><code>auro-counter-group</code> supports <code>min</code> and <code>max</code> properties that apply to the <em>total</em> of all child counters. When the aggregate total reaches the group maximum, every child counter's increment button is disabled; when it reaches the minimum, every decrement button is disabled. Native HTML has no equivalent — you must write JavaScript to sum each input, compare against a group total, and toggle every button accordingly.</p>
|
|
90
|
+
<auro-header level="3">Coordinated value object and total</auro-header>
|
|
91
|
+
<p><code>auro-counter-group</code> exposes a single <code>value</code> property as an object keyed by each counter's <code>name</code>, along with a separate <code>total</code> property for the aggregate sum. With native HTML, you must query each input individually, build the value object yourself, and recompute the total on every change.</p>
|
|
92
|
+
<auro-header level="3">Spinbutton ARIA semantics</auro-header>
|
|
93
|
+
<p><code>auro-counter</code> renders a <code>role="spinbutton"</code> element with <code>aria-valuemin</code>, <code>aria-valuemax</code>, <code>aria-valuenow</code>, <code>aria-valuetext</code>, and <code>aria-labelledby</code> so assistive technology announces the value as a spinbutton — the role most screen readers expect for stepper controls. A native <code><input type="number"></code> is announced as an editable text field, not a spinbutton, and there is no built-in way to relabel the surrounding +/− buttons through ARIA slots.</p>
|
|
94
|
+
<auro-header level="3">Validation and error messaging</auro-header>
|
|
95
|
+
<p><code>auro-counter</code> integrates with <code>@aurodesignsystem/form-validation</code> to expose a <code>validity</code> property, an <code>error</code> attribute, and a help text region that switches to an alert with <code>role="alert"</code> and <code>aria-live="assertive"</code> when invalid. Native number inputs surface browser-controlled validation tooltips that are not announced inline and cannot be styled or customized beyond <code>setCustomValidity()</code>.</p>
|
|
96
|
+
<auro-header level="3">Keyboard strategy</auro-header>
|
|
97
|
+
<p><code>auro-counter</code> and <code>auro-counter-group</code> install dedicated keyboard strategies that handle Arrow keys, Home/End, and tab order across the +/− buttons and the spinbutton, including ordered traversal of every counter inside a group. Native HTML gives you only the default browser behavior — Arrow keys step the number input by one, but they will not move focus between counters or coordinate Home/End across a group without custom code.</p>
|
|
98
|
+
<auro-header level="3">Disabled state and propagation</auro-header>
|
|
99
|
+
<p><code>auro-counter</code> exposes a single <code>disabled</code> attribute that disables both buttons and removes the spinbutton from the tab order, and <code>auro-counter-group</code> propagates appearance and theming to all child counters. With native HTML, you must apply <code>disabled</code> to each <code><input></code> and each <code><button></code> individually, or wrap them in a <code><fieldset disabled></code> with the side effects that entails.</p>
|
|
100
|
+
<auro-header level="3">Dropdown layout</auro-header>
|
|
101
|
+
<p><code>auro-counter-group</code> supports an <code>isDropdown</code> mode that renders the group inside an Auro dropdown with a trigger, value text, fullscreen breakpoint behavior, and configurable placement. There is no native HTML equivalent — reproducing this requires building the popover, focus management, and fullscreen transitions yourself.</p>
|
|
102
|
+
<auro-header level="3">Form integration events</auro-header>
|
|
103
|
+
<p><code>auro-counter</code> dispatches <code>input</code> events with a structured <code>detail.value</code>, and <code>auro-counter-group</code> dispatches <code>input</code> events carrying both <code>detail.total</code> and <code>detail.value</code> plus <code>auroFormElement-validated</code> events so a parent <code>auro-form</code> can coordinate validation. Native inputs emit only the standard <code>input</code> and <code>change</code> events without the structured payloads the Auro form system expects.</p>
|
|
104
|
+
<auro-header level="3">Multi-brand theming</auro-header>
|
|
105
|
+
<p><code>auro-counter</code> consumes Auro design tokens through its component logic, so it automatically picks up brand-specific theming when token packages are swapped. A CSS-only counter is tied to whichever tokens were imported at author time and will not respond to runtime theme switching the way the web component does.</p>
|
|
106
|
+
<auro-header level="2">Summary</auro-header>
|
|
107
|
+
<table>
|
|
108
|
+
<thead>
|
|
109
|
+
<tr>
|
|
110
|
+
<th>Feature</th>
|
|
111
|
+
<th>Native <code><input type="number"></code> with Auro tokens</th>
|
|
112
|
+
<th><code>auro-counter</code></th>
|
|
113
|
+
</tr>
|
|
114
|
+
</thead>
|
|
115
|
+
<tbody>
|
|
116
|
+
<tr>
|
|
117
|
+
<td>Design-system-aligned styling</td>
|
|
118
|
+
<td>Manual (author-written CSS)</td>
|
|
119
|
+
<td>Built-in</td>
|
|
120
|
+
</tr>
|
|
121
|
+
<tr>
|
|
122
|
+
<td>Dark background support</td>
|
|
123
|
+
<td>Manual</td>
|
|
124
|
+
<td>Yes (<code>appearance="inverse"</code>)</td>
|
|
125
|
+
</tr>
|
|
126
|
+
<tr>
|
|
127
|
+
<td>Increment/decrement button wiring</td>
|
|
128
|
+
<td>Manual JavaScript</td>
|
|
129
|
+
<td>Built-in <code>increment()</code>/<code>decrement()</code></td>
|
|
130
|
+
</tr>
|
|
131
|
+
<tr>
|
|
132
|
+
<td>Auto-disable at min/max</td>
|
|
133
|
+
<td>Manual</td>
|
|
134
|
+
<td>Automatic per counter</td>
|
|
135
|
+
</tr>
|
|
136
|
+
<tr>
|
|
137
|
+
<td>Group-level min/max total</td>
|
|
138
|
+
<td>Not supported</td>
|
|
139
|
+
<td>Built-in via <code>auro-counter-group</code></td>
|
|
140
|
+
</tr>
|
|
141
|
+
<tr>
|
|
142
|
+
<td>Coordinated value object and total</td>
|
|
143
|
+
<td>Manual aggregation</td>
|
|
144
|
+
<td>Single <code>value</code> and <code>total</code></td>
|
|
145
|
+
</tr>
|
|
146
|
+
<tr>
|
|
147
|
+
<td>Spinbutton ARIA semantics</td>
|
|
148
|
+
<td>Not supported</td>
|
|
149
|
+
<td><code>role="spinbutton"</code> with full ARIA</td>
|
|
150
|
+
</tr>
|
|
151
|
+
<tr>
|
|
152
|
+
<td>Validation messages</td>
|
|
153
|
+
<td>Limited to <code>setCustomValidity()</code></td>
|
|
154
|
+
<td>Inline live-region error help text</td>
|
|
155
|
+
</tr>
|
|
156
|
+
<tr>
|
|
157
|
+
<td>Keyboard strategy across group</td>
|
|
158
|
+
<td>Browser default only</td>
|
|
159
|
+
<td>Coordinated arrow/Home/End handling</td>
|
|
160
|
+
</tr>
|
|
161
|
+
<tr>
|
|
162
|
+
<td>Disabled propagation</td>
|
|
163
|
+
<td>Per-input and per-button</td>
|
|
164
|
+
<td>Single attribute on counter or group</td>
|
|
165
|
+
</tr>
|
|
166
|
+
<tr>
|
|
167
|
+
<td>Dropdown layout</td>
|
|
168
|
+
<td>Not supported</td>
|
|
169
|
+
<td><code>isDropdown</code> with fullscreen breakpoints</td>
|
|
170
|
+
</tr>
|
|
171
|
+
<tr>
|
|
172
|
+
<td>Form validation events</td>
|
|
173
|
+
<td>Not supported</td>
|
|
174
|
+
<td><code>auroFormElement-validated</code></td>
|
|
175
|
+
</tr>
|
|
176
|
+
<tr>
|
|
177
|
+
<td>Multi-brand theming</td>
|
|
178
|
+
<td>Static (import-time tokens)</td>
|
|
179
|
+
<td>Full (design tokens + component logic)</td>
|
|
180
|
+
</tr>
|
|
181
|
+
</tbody>
|
|
182
|
+
</table>
|
|
183
|
+
<auro-header level="2">Recommendation</auro-header>
|
|
184
|
+
<p>Use <code>auro-counter</code> and <code>auro-counter-group</code> whenever possible. Fall back to a CSS-styled native number input only in environments where custom elements are not supported or when integrating with third-party systems that require plain HTML — and be prepared to reimplement button wiring, min/max disabling, group totals, spinbutton ARIA, and keyboard coordination yourself.</p>
|