@aurodesignsystem-dev/auro-formkit 0.0.0-pr1628.0 → 0.0.0-pr1628.10
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 +1 -1
- package/components/bibtemplate/dist/index.js +1 -1
- package/components/bibtemplate/dist/registered.js +1 -1
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/accessibility.md +2 -2
- package/components/checkbox/demo/api.md +17 -17
- package/components/checkbox/demo/customize.md +16 -16
- package/components/checkbox/demo/customize.min.js +3 -3
- package/components/checkbox/demo/design.md +24 -24
- package/components/checkbox/demo/getting-started.md +33 -27
- package/components/checkbox/demo/getting-started.min.js +3 -3
- package/components/checkbox/demo/index.md +17 -17
- package/components/checkbox/demo/index.min.js +3 -3
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/auro-checkbox-group.d.ts +2 -2
- package/components/checkbox/dist/index.js +3 -3
- package/components/checkbox/dist/registered.js +3 -3
- package/components/combobox/demo/accessibility.md +1 -1
- package/components/combobox/demo/api.md +3 -3
- package/components/combobox/demo/css-only.md +3 -3
- package/components/combobox/demo/customize.md +13 -12
- package/components/combobox/demo/customize.min.js +79 -59
- package/components/combobox/demo/getting-started.md +4 -4
- package/components/combobox/demo/getting-started.min.js +79 -59
- package/components/combobox/demo/index.md +2 -2
- package/components/combobox/demo/index.min.js +79 -59
- package/components/combobox/demo/voiceover.md +1 -1
- package/components/combobox/dist/auro-combobox.d.ts +35 -31
- package/components/combobox/dist/index.js +68 -49
- package/components/combobox/dist/registered.js +68 -49
- package/components/counter/demo/accessibility.md +1 -1
- package/components/counter/demo/api.md +18 -18
- package/components/counter/demo/css-only.md +1 -1
- package/components/counter/demo/customize.md +2 -2
- package/components/counter/demo/customize.min.js +28 -28
- package/components/counter/demo/design.md +1 -1
- package/components/counter/demo/getting-started.md +29 -2
- package/components/counter/demo/getting-started.min.js +28 -28
- package/components/counter/demo/index.min.js +28 -28
- package/components/counter/demo/why-counter.md +3 -3
- package/components/counter/dist/auro-counter-group.d.ts +13 -14
- package/components/counter/dist/auro-counter.d.ts +1 -1
- package/components/counter/dist/index.js +28 -28
- package/components/counter/dist/registered.js +28 -28
- package/components/datepicker/README.md +1 -1
- package/components/datepicker/demo/accessibility.md +5 -5
- package/components/datepicker/demo/api.md +3 -3
- package/components/datepicker/demo/css-only.md +4 -4
- package/components/datepicker/demo/customize.md +12 -12
- package/components/datepicker/demo/customize.min.js +186 -132
- package/components/datepicker/demo/design.md +11 -11
- package/components/datepicker/demo/getting-started.md +4 -4
- package/components/datepicker/demo/getting-started.min.js +186 -132
- package/components/datepicker/demo/index.md +5 -5
- package/components/datepicker/demo/index.min.js +186 -132
- package/components/datepicker/demo/keyboard-behavior.md +1 -1
- package/components/datepicker/demo/readme.md +1 -1
- package/components/datepicker/demo/voiceover.md +4 -4
- package/components/datepicker/demo/why-datepicker.md +3 -3
- package/components/datepicker/dist/auro-calendar-cell.d.ts +32 -33
- package/components/datepicker/dist/auro-calendar-month.d.ts +8 -8
- package/components/datepicker/dist/auro-calendar.d.ts +44 -43
- package/components/datepicker/dist/auro-datepicker.d.ts +12 -10
- package/components/datepicker/dist/datepickerKeyboardStrategy.d.ts +3 -0
- package/components/datepicker/dist/index.js +186 -132
- package/components/datepicker/dist/registered.js +186 -132
- package/components/datepicker/dist/utilities.d.ts +4 -1
- package/components/datepicker/dist/utilitiesCalendar.d.ts +12 -4
- package/components/datepicker/dist/utilitiesCalendarRender.d.ts +12 -6
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-calendar.d.ts +4 -4
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker.d.ts +7 -7
- package/components/dropdown/demo/api.md +7 -7
- package/components/dropdown/demo/css-only.md +2 -2
- package/components/dropdown/demo/customize.md +1 -1
- package/components/dropdown/demo/customize.min.js +10 -9
- package/components/dropdown/demo/design.md +4 -4
- package/components/dropdown/demo/getting-started.min.js +31 -16
- package/components/dropdown/demo/index.min.js +10 -9
- package/components/dropdown/demo/voiceover.md +1 -1
- package/components/dropdown/demo/why-dropdown.md +1 -1
- package/components/dropdown/dist/auro-dropdown.d.ts +9 -8
- package/components/dropdown/dist/index.js +10 -9
- package/components/dropdown/dist/registered.js +10 -9
- package/components/form/README.md +1 -1
- package/components/form/demo/api.md +7 -7
- package/components/form/demo/css-only.md +1 -1
- package/components/form/demo/customize.md +2 -0
- package/components/form/demo/customize.min.js +345 -257
- package/components/form/demo/getting-started.md +2 -0
- package/components/form/demo/getting-started.min.js +345 -257
- package/components/form/demo/index.md +2 -2
- package/components/form/demo/index.min.js +345 -257
- package/components/form/demo/keyboard-behavior.md +1 -1
- package/components/form/demo/readme.md +1 -1
- package/components/form/demo/registerDemoDeps.min.js +343 -255
- package/components/form/demo/voiceover.md +3 -3
- package/components/form/demo/why-form.md +1 -1
- package/components/form/dist/auro-form.d.ts +2 -2
- package/components/form/dist/index.js +2 -2
- package/components/form/dist/registered.js +2 -2
- package/components/input/demo/api.md +58 -58
- package/components/input/demo/css-only.md +4 -4
- package/components/input/demo/customize.md +11 -11
- package/components/input/demo/customize.min.js +21 -7
- package/components/input/demo/design.md +2 -2
- package/components/input/demo/getting-started.md +5 -5
- package/components/input/demo/getting-started.min.js +21 -7
- package/components/input/demo/index.md +1 -1
- package/components/input/demo/index.min.js +21 -7
- package/components/input/demo/why-input.md +3 -3
- package/components/input/dist/auro-input.d.ts +1 -1
- package/components/input/dist/base-input.d.ts +6 -5
- package/components/input/dist/index.js +21 -7
- package/components/input/dist/registered.js +21 -7
- package/components/input/dist/utilities.d.ts +11 -0
- package/components/menu/demo/accessibility.md +1 -1
- package/components/menu/demo/api.md +1 -1
- package/components/menu/demo/css-only.md +4 -4
- package/components/menu/demo/customize.md +1 -1
- package/components/menu/demo/design.md +1 -1
- package/components/menu/demo/getting-started.md +3 -3
- package/components/menu/demo/index.min.js +11 -10
- package/components/menu/demo/keyboard-behavior.md +1 -1
- package/components/menu/demo/voiceover.md +1 -1
- package/components/menu/demo/why-menu.md +3 -3
- package/components/menu/dist/auro-menu.d.ts +10 -9
- package/components/menu/dist/auro-menuoption.d.ts +1 -1
- package/components/menu/dist/index.js +11 -10
- package/components/menu/dist/registered.js +11 -10
- package/components/radio/demo/accessibility.md +1 -1
- package/components/radio/demo/api.md +10 -10
- package/components/radio/demo/customize.md +15 -5
- package/components/radio/demo/customize.min.js +10 -12
- package/components/radio/demo/design.md +1 -1
- package/components/radio/demo/getting-started.md +6 -6
- package/components/radio/demo/getting-started.min.js +10 -12
- package/components/radio/demo/index.md +1 -1
- package/components/radio/demo/index.min.js +10 -12
- package/components/radio/demo/keyboard-behavior.md +1 -1
- package/components/radio/demo/voiceover.md +1 -1
- package/components/radio/demo/why-radio.md +1 -1
- package/components/radio/dist/auro-radio-group.d.ts +6 -8
- package/components/radio/dist/auro-radio.d.ts +3 -3
- package/components/radio/dist/index.js +10 -12
- package/components/radio/dist/registered.js +10 -12
- package/components/select/demo/api.md +1 -1
- package/components/select/demo/css-only.md +1 -1
- package/components/select/demo/customize.md +1 -1
- package/components/select/demo/customize.min.js +27 -24
- package/components/select/demo/getting-started.min.js +27 -24
- package/components/select/demo/index.md +1 -1
- package/components/select/demo/index.min.js +27 -24
- package/components/select/demo/voiceover.md +1 -1
- package/components/select/dist/auro-select.d.ts +4 -3
- package/components/select/dist/index.js +16 -14
- package/components/select/dist/registered.js +16 -14
- package/custom-elements.json +159 -143
- package/package.json +1 -1
|
@@ -5299,7 +5299,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$3 {
|
|
|
5299
5299
|
}
|
|
5300
5300
|
};
|
|
5301
5301
|
|
|
5302
|
-
var formkitVersion$2 = '
|
|
5302
|
+
var formkitVersion$2 = '202611091558';
|
|
5303
5303
|
|
|
5304
5304
|
/**
|
|
5305
5305
|
* Shared base class for layout-aware Auro form components, such as `auro-input`, `auro-select`, and `auro-menu`.
|
|
@@ -5465,8 +5465,8 @@ let AuroElement$2 = class AuroElement extends i$3 {
|
|
|
5465
5465
|
* @csspart chevron - The container for the icon that shows whether the bib is open. Exists only when `chevron` is set.
|
|
5466
5466
|
* @csspart size - A hidden sizing element whose `width`, `height`, `max-width`, and `max-height` are copied to the bib. Applies only when `matchWidth` is set.
|
|
5467
5467
|
* @csspart helpText - The help text container. Not currently rendered, so styles set on it have no effect; style the content in the `helpText` slot instead.
|
|
5468
|
-
* @event auroDropdown-triggerClick - Notifies that the trigger was clicked, or activated with Enter or Space.
|
|
5469
|
-
* @event auroDropdown-toggled - Notifies that the bib opened or closed.
|
|
5468
|
+
* @event auroDropdown-triggerClick - Notifies that the trigger was clicked, or activated with Enter or Space. A click currently fires it twice: first with `event.detail.expanded`, then again without a detail, bubbling. With `disableEventShow` set, only the second one fires, and Enter and Space don't fire it.
|
|
5469
|
+
* @event auroDropdown-toggled - Notifies that the bib opened or closed, with `event.detail.expanded` set to true when it opened. When it closed, `event.detail.eventType` says why, such as `click`, `keydown`, or `focusloss`.
|
|
5470
5470
|
* @event auroDropdown-idAdded - Notifies that the dropdown has an ID you can use to reference its bib, such as in `aria-controls`. The detail's `id` is the dropdown's own `id`, generated when not set, and the bib's ID is that value followed by `-floater-bib`.
|
|
5471
5471
|
*/
|
|
5472
5472
|
class AuroDropdown extends AuroElement$2 {
|
|
@@ -5795,6 +5795,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5795
5795
|
/**
|
|
5796
5796
|
* Removes the trigger's border, background, and shadow.
|
|
5797
5797
|
* Applies only when `shape` and `size` are both set.
|
|
5798
|
+
* @relevantWhen shape !== undefined
|
|
5798
5799
|
* @category ui
|
|
5799
5800
|
*/
|
|
5800
5801
|
simple: {
|
|
@@ -6087,6 +6088,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6087
6088
|
/**
|
|
6088
6089
|
* Sets the trigger's position in the keyboard tab order (the trigger's `tabindex`).
|
|
6089
6090
|
* Applies only when the `trigger` slot content isn't focusable.
|
|
6091
|
+
* @default 0
|
|
6090
6092
|
* @category a11y
|
|
6091
6093
|
*/
|
|
6092
6094
|
tabIndex: {
|
|
@@ -6778,7 +6780,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6778
6780
|
*
|
|
6779
6781
|
* @private
|
|
6780
6782
|
* @method handleDefaultSlot
|
|
6781
|
-
* @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
|
|
6782
6783
|
*/
|
|
6783
6784
|
handleDefaultSlot() {
|
|
6784
6785
|
|
|
@@ -6791,7 +6792,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6791
6792
|
* Renders the markup that every layout shares: the trigger, the help text, and the bib.
|
|
6792
6793
|
* @private
|
|
6793
6794
|
* @param {Object} helpTextClasses - The classes to apply to the help text container.
|
|
6794
|
-
* @returns {
|
|
6795
|
+
* @returns {import('lit').TemplateResult} The template for the shared markup.
|
|
6795
6796
|
*/
|
|
6796
6797
|
renderBasicHtml(helpTextClasses) {
|
|
6797
6798
|
return u$7`
|
|
@@ -6853,7 +6854,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6853
6854
|
/**
|
|
6854
6855
|
* Renders the classic layout.
|
|
6855
6856
|
* @private
|
|
6856
|
-
* @returns {
|
|
6857
|
+
* @returns {import('lit').TemplateResult} The template for the classic layout.
|
|
6857
6858
|
*/
|
|
6858
6859
|
renderLayoutClassic() {
|
|
6859
6860
|
// TODO: check with Doug why this was never used?
|
|
@@ -6869,7 +6870,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6869
6870
|
/**
|
|
6870
6871
|
* Renders the snowflake layout, which indents the help text on both sides.
|
|
6871
6872
|
* @private
|
|
6872
|
-
* @returns {
|
|
6873
|
+
* @returns {import('lit').TemplateResult} The template for the snowflake layout.
|
|
6873
6874
|
*/
|
|
6874
6875
|
renderLayoutSnowflake() {
|
|
6875
6876
|
const helpTextClasses = {
|
|
@@ -6886,7 +6887,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6886
6887
|
/**
|
|
6887
6888
|
* Renders the emphasized layout, which indents the help text on the rounded sides of a `pill` shape.
|
|
6888
6889
|
* @private
|
|
6889
|
-
* @returns {
|
|
6890
|
+
* @returns {import('lit').TemplateResult} The template for the emphasized layout.
|
|
6890
6891
|
*/
|
|
6891
6892
|
renderLayoutEmphasized() {
|
|
6892
6893
|
const helpTextClasses = {
|
|
@@ -6904,7 +6905,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6904
6905
|
* Renders the layout that `layout` sets, or the classic layout when it isn't set or isn't recognized.
|
|
6905
6906
|
* @private
|
|
6906
6907
|
* @param {string} [ForcedLayout] - The layout to render instead of `layout`, such as `emphasized`.
|
|
6907
|
-
* @returns {
|
|
6908
|
+
* @returns {import('lit').TemplateResult} The template for the layout.
|
|
6908
6909
|
*/
|
|
6909
6910
|
renderLayout(ForcedLayout) {
|
|
6910
6911
|
const layout = ForcedLayout || this.layout;
|
|
@@ -17060,6 +17061,9 @@ function cleanEscapedString(input) {
|
|
|
17060
17061
|
return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
|
|
17061
17062
|
}
|
|
17062
17063
|
|
|
17064
|
+
/**
|
|
17065
|
+
* Helpers that set up input masks and convert between the text shown in the field, `Date` objects, and ISO date strings (`YYYY-MM-DD`), for one locale and date format.
|
|
17066
|
+
*/
|
|
17063
17067
|
class AuroInputUtilities {
|
|
17064
17068
|
|
|
17065
17069
|
/**
|
|
@@ -17079,7 +17083,17 @@ class AuroInputUtilities {
|
|
|
17079
17083
|
} else {
|
|
17080
17084
|
this.locale = 'en-US';
|
|
17081
17085
|
}
|
|
17086
|
+
|
|
17087
|
+
/**
|
|
17088
|
+
* Sets the date format to use instead of the locale's format, such as `mm/dd/yyyy`. `updateFormat()` also sets it.
|
|
17089
|
+
* @type {string|undefined}
|
|
17090
|
+
*/
|
|
17082
17091
|
this.overrideFormat = config.format;
|
|
17092
|
+
|
|
17093
|
+
/**
|
|
17094
|
+
* The `Intl.DateTimeFormat` date formatter for the helpers' locale. The helpers don't currently use it.
|
|
17095
|
+
* @type {Intl.DateTimeFormat}
|
|
17096
|
+
*/
|
|
17083
17097
|
this.formatter = new Intl.DateTimeFormat(this.locale);
|
|
17084
17098
|
|
|
17085
17099
|
// Bindings - many of these are passed into IMask callbacks,
|
|
@@ -17510,7 +17524,7 @@ class BaseInput extends AuroElement$1 {
|
|
|
17510
17524
|
// The initial-load focus theft was caused by the static `autofocus`
|
|
17511
17525
|
// attribute on the bib input (now conditional), not by delegatesFocus.
|
|
17512
17526
|
/**
|
|
17513
|
-
*
|
|
17527
|
+
* Gets the options Lit uses to create the shadow root.
|
|
17514
17528
|
* @internal
|
|
17515
17529
|
*/
|
|
17516
17530
|
static get shadowRootOptions() {
|
|
@@ -17670,8 +17684,9 @@ class BaseInput extends AuroElement$1 {
|
|
|
17670
17684
|
},
|
|
17671
17685
|
|
|
17672
17686
|
/**
|
|
17673
|
-
* Sets the shape of the field's border.
|
|
17674
|
-
* and `pill
|
|
17687
|
+
* Sets the shape of the field's border. `classic` and `rounded` have slightly rounded corners, `box` has square corners,
|
|
17688
|
+
* and `pill` has fully rounded ends, or only the left or right end for `pill-left` and `pill-right`.
|
|
17689
|
+
* The emphasized layouts support `pill`, `pill-left`, and `pill-right`, and the snowflake layout uses `snowflake`.
|
|
17675
17690
|
* @type {'box' | 'classic' | 'pill' | 'pill-left' | 'pill-right' | 'rounded' | 'snowflake'}
|
|
17676
17691
|
* @default 'classic'
|
|
17677
17692
|
* @category ui
|
|
@@ -17683,8 +17698,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
17683
17698
|
},
|
|
17684
17699
|
|
|
17685
17700
|
/**
|
|
17686
|
-
* Sets the field's
|
|
17687
|
-
* emphasized layouts support only `xl`.
|
|
17701
|
+
* Sets the field's height. The `classic` and `snowflake` shapes are the same height at every size,
|
|
17702
|
+
* and the emphasized layouts support only `xl`.
|
|
17688
17703
|
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl'}
|
|
17689
17704
|
* @default 'lg'
|
|
17690
17705
|
* @category ui
|
|
@@ -19480,7 +19495,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
|
|
|
19480
19495
|
}
|
|
19481
19496
|
};
|
|
19482
19497
|
|
|
19483
|
-
var formkitVersion$1 = '
|
|
19498
|
+
var formkitVersion$1 = '202611091558';
|
|
19484
19499
|
|
|
19485
19500
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
19486
19501
|
// See LICENSE in the project root for license information.
|
|
@@ -19939,7 +19954,7 @@ class AuroInput extends BaseInput {
|
|
|
19939
19954
|
|
|
19940
19955
|
/**
|
|
19941
19956
|
* Gets the `pattern` for the inner `<input>` element. For credit card numbers,
|
|
19942
|
-
* builds a length check from `minLength` and `maxLength` instead.
|
|
19957
|
+
* builds a length check from `minLength` and `maxLength` instead, unless `noValidate` is set.
|
|
19943
19958
|
* @private
|
|
19944
19959
|
* @returns {string}
|
|
19945
19960
|
*/
|
|
@@ -20670,7 +20685,7 @@ class AuroBibtemplate extends i$3 {
|
|
|
20670
20685
|
}
|
|
20671
20686
|
|
|
20672
20687
|
/**
|
|
20673
|
-
* Called
|
|
20688
|
+
* Called when a `touchmove` event reaches the element. Stops the page behind the bib from scrolling when the touch is on the bibtemplate's own layout, such as its padding, instead of on slotted content.
|
|
20674
20689
|
* @param {Event} event - The `touchmove` event.
|
|
20675
20690
|
* @returns {void}
|
|
20676
20691
|
*/
|
|
@@ -20766,7 +20781,7 @@ class AuroBibtemplate extends i$3 {
|
|
|
20766
20781
|
}
|
|
20767
20782
|
}
|
|
20768
20783
|
|
|
20769
|
-
var formkitVersion = '
|
|
20784
|
+
var formkitVersion = '202611091558';
|
|
20770
20785
|
|
|
20771
20786
|
var styleCss$3 = i$6`.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}`;
|
|
20772
20787
|
|
|
@@ -21235,7 +21250,7 @@ function getOptionLabel(option) {
|
|
|
21235
21250
|
*
|
|
21236
21251
|
* @slot - The `<auro-menu>` that holds the options. {@requiredWhen always} {@category ui}
|
|
21237
21252
|
* @slot {HTMLSlotElement} optionalLabel - Text shown after the label when `required` isn't set, such as a translated "(optional)". Defaults to "(optional)". {@relevantWhen !required} {@category ui}
|
|
21238
|
-
* @slot ariaLabel.input.clear - Text screen readers announce for the clear button, such as "Clear destination". The combobox has no default text, so without it the clear button has no accessible name. In the fullscreen bib, the clear button currently uses "Clear Input" instead. {@category a11y}
|
|
21253
|
+
* @slot ariaLabel.input.clear - Text screen readers announce for the clear button, such as "Clear destination". The combobox has no default text, so without it the clear button has no accessible name. In the fullscreen bib, the clear button currently uses "Clear Input" instead. {@requiredWhen always} {@category a11y}
|
|
21239
21254
|
* @slot ariaLabel.bib.close - Text screen readers announce for the close button in the fullscreen bib, such as "Close destination list". Defaults to "Close". {@requiredWhen always} {@category a11y}
|
|
21240
21255
|
* @slot bib.fullscreen.headline - Headline shown above the options in the fullscreen bib, such as "Choose a destination". {@requiredWhen always} {@category ui}
|
|
21241
21256
|
* @slot label - Label that names the combobox. Screen readers announce it as the name of the input and of the fullscreen dialog. {@requiredWhen always} {@category ui}
|
|
@@ -21338,9 +21353,9 @@ class AuroCombobox extends AuroElement {
|
|
|
21338
21353
|
}
|
|
21339
21354
|
|
|
21340
21355
|
/**
|
|
21341
|
-
* Wraps setTimeout and records the timer
|
|
21342
|
-
* can cancel any outstanding callbacks. The
|
|
21343
|
-
* once the callback fires so the set doesn't
|
|
21356
|
+
* Wraps `setTimeout` and records the timer ID so `disconnectedCallback`
|
|
21357
|
+
* can cancel any outstanding callbacks. The ID is removed from the set
|
|
21358
|
+
* once the callback fires, so the set doesn't keep growing.
|
|
21344
21359
|
* @param {Function} fn - The callback to run.
|
|
21345
21360
|
* @param {number} ms - The delay in milliseconds.
|
|
21346
21361
|
* @returns {number} The timer id.
|
|
@@ -21398,7 +21413,7 @@ class AuroCombobox extends AuroElement {
|
|
|
21398
21413
|
},
|
|
21399
21414
|
|
|
21400
21415
|
/**
|
|
21401
|
-
*
|
|
21416
|
+
* Holds the options shown in the menu: every option that isn't hidden,
|
|
21402
21417
|
* such as by filtering on the typed text, plus `persistent` options.
|
|
21403
21418
|
* @private
|
|
21404
21419
|
* @type {HTMLElement[]}
|
|
@@ -21455,7 +21470,7 @@ class AuroCombobox extends AuroElement {
|
|
|
21455
21470
|
},
|
|
21456
21471
|
|
|
21457
21472
|
/**
|
|
21458
|
-
* ID
|
|
21473
|
+
* Holds the dropdown's ID, which the trigger input uses for `aria-controls`.
|
|
21459
21474
|
* @private
|
|
21460
21475
|
*/
|
|
21461
21476
|
dropdownId: {
|
|
@@ -21465,7 +21480,7 @@ class AuroCombobox extends AuroElement {
|
|
|
21465
21480
|
},
|
|
21466
21481
|
|
|
21467
21482
|
/**
|
|
21468
|
-
*
|
|
21483
|
+
* Records whether the bib is open.
|
|
21469
21484
|
* @private
|
|
21470
21485
|
*/
|
|
21471
21486
|
dropdownOpen: {
|
|
@@ -21517,7 +21532,8 @@ class AuroCombobox extends AuroElement {
|
|
|
21517
21532
|
},
|
|
21518
21533
|
|
|
21519
21534
|
/**
|
|
21520
|
-
* Sets the overall style of the combobox.
|
|
21535
|
+
* Sets the overall style of the combobox. Use `emphasized` for a large, prominent combobox on light backgrounds,
|
|
21536
|
+
* and `snowflake` only on dark backgrounds with `appearance="inverse"`. The `emphasized` layout also shows larger menu options.
|
|
21521
21537
|
* @type {'classic' | 'emphasized' | 'snowflake'}
|
|
21522
21538
|
* @default 'classic'
|
|
21523
21539
|
* @category ui
|
|
@@ -21529,8 +21545,9 @@ class AuroCombobox extends AuroElement {
|
|
|
21529
21545
|
},
|
|
21530
21546
|
|
|
21531
21547
|
/**
|
|
21532
|
-
* Sets the shape of the trigger.
|
|
21533
|
-
*
|
|
21548
|
+
* Sets the shape of the trigger. Use `classic` with the `classic` layout, `pill`, `pill-left`, or `pill-right` with the
|
|
21549
|
+
* `emphasized` layout, and `snowflake` with the `snowflake` layout. In the `snowflake` layout, the menu options use the
|
|
21550
|
+
* same shape unless the `<auro-menu>` sets its own `shape`.
|
|
21534
21551
|
* @type {'box' | 'classic' | 'pill' | 'pill-left' | 'pill-right' | 'rounded' | 'snowflake'}
|
|
21535
21552
|
* @default 'classic'
|
|
21536
21553
|
* @category ui
|
|
@@ -21814,7 +21831,7 @@ class AuroCombobox extends AuroElement {
|
|
|
21814
21831
|
},
|
|
21815
21832
|
|
|
21816
21833
|
/**
|
|
21817
|
-
*
|
|
21834
|
+
* Holds the active (highlighted) option.
|
|
21818
21835
|
* @private
|
|
21819
21836
|
* @type {HTMLElement}
|
|
21820
21837
|
*/
|
|
@@ -21991,7 +22008,7 @@ class AuroCombobox extends AuroElement {
|
|
|
21991
22008
|
}
|
|
21992
22009
|
|
|
21993
22010
|
/**
|
|
21994
|
-
*
|
|
22011
|
+
* Sets the menu's `matchWord` to the input text, then updates the input text and `displayValue` content from the selected option's label, or from `value` when no option is selected.
|
|
21995
22012
|
* @private
|
|
21996
22013
|
* @returns {void}
|
|
21997
22014
|
*/
|
|
@@ -22071,7 +22088,7 @@ class AuroCombobox extends AuroElement {
|
|
|
22071
22088
|
}
|
|
22072
22089
|
|
|
22073
22090
|
/**
|
|
22074
|
-
* Writes nextValue to the trigger input and the bib input when their current
|
|
22091
|
+
* Writes `nextValue` to the trigger input and the bib input when their current
|
|
22075
22092
|
* value differs, then re-asserts imask after Lit's update flushes.
|
|
22076
22093
|
* @param {string} nextValue - The value to write to both inputs.
|
|
22077
22094
|
* @returns {Promise<void>} The promise that resolves after both inputs flush and imask
|
|
@@ -22124,10 +22141,10 @@ class AuroCombobox extends AuroElement {
|
|
|
22124
22141
|
* @param {boolean} [options.preferComboboxValue=false] - If true,
|
|
22125
22142
|
* matches the selected option against `this.value` first. If false,
|
|
22126
22143
|
* matches against `this.input.value` first. Matching `this.value` first is needed on mount and re-mount
|
|
22127
|
-
* because under `persistInput` the consumer's typedValue prop can drift
|
|
22144
|
+
* because under `persistInput` the consumer's `typedValue` prop can drift
|
|
22128
22145
|
* from the framework value (Svelte `{#key}` re-mount after a swap, or
|
|
22129
22146
|
* SPA preselect after route change) and the old input-first match would
|
|
22130
|
-
* then pick the stale text. Only handleSlotChange passes this; typing
|
|
22147
|
+
* then pick the stale text. Only `handleSlotChange` passes this; typing
|
|
22131
22148
|
* and clearing paths keep the input-first match so user clears aren't
|
|
22132
22149
|
* undone.
|
|
22133
22150
|
* @returns {void}
|
|
@@ -22733,20 +22750,20 @@ class AuroCombobox extends AuroElement {
|
|
|
22733
22750
|
|
|
22734
22751
|
/**
|
|
22735
22752
|
* Flags genuine clear-button activations on an auro-input so the SPA-preselect
|
|
22736
|
-
* guard in handleInputValueChange doesn't swallow them.
|
|
22753
|
+
* guard in `handleInputValueChange` doesn't swallow them.
|
|
22737
22754
|
*
|
|
22738
|
-
* The auro-input clear button fires an `isProgrammatic` input event (
|
|
22739
|
-
* notifyValueChanged) that
|
|
22740
|
-
*
|
|
22741
|
-
*
|
|
22742
|
-
*
|
|
22755
|
+
* The auro-input clear button fires an `isProgrammatic` input event (through
|
|
22756
|
+
* `notifyValueChanged`) that has the same shape as the SPA-preselect echo
|
|
22757
|
+
* that guard bails on (`isProgrammatic`, a set value, and an empty input).
|
|
22758
|
+
* Without this one-shot flag, clicking clear would leave `value` and
|
|
22759
|
+
* `optionSelected` stale (AB#1634257).
|
|
22743
22760
|
*
|
|
22744
|
-
* Delegated on the shadow root so it works
|
|
22745
|
-
*
|
|
22746
|
-
*
|
|
22747
|
-
* the
|
|
22748
|
-
* (handleClickClear) fires its synchronous input event,
|
|
22749
|
-
* handleInputValueChange reads the flag.
|
|
22761
|
+
* Delegated on the shadow root so it works whenever `.clearBtn` renders
|
|
22762
|
+
* (it only exists after a value is set), and covers both real clicks and
|
|
22763
|
+
* programmatic `clearBtn.click()` calls, which no `focusin` precedes.
|
|
22764
|
+
* Registered in the capture phase so the flag is set before the button's own
|
|
22765
|
+
* `@click` handler (`handleClickClear`) fires its synchronous input event,
|
|
22766
|
+
* which is when `handleInputValueChange` reads the flag.
|
|
22750
22767
|
* @private
|
|
22751
22768
|
* @param {Element} inputEl - The auro-input whose clear button to track.
|
|
22752
22769
|
* @returns {void}
|
|
@@ -22807,7 +22824,9 @@ class AuroCombobox extends AuroElement {
|
|
|
22807
22824
|
}
|
|
22808
22825
|
|
|
22809
22826
|
/**
|
|
22810
|
-
*
|
|
22827
|
+
* Called when the text in the trigger input or the fullscreen bib input changes.
|
|
22828
|
+
* Keeps both inputs and `value` in sync, clears the combobox when the input is emptied,
|
|
22829
|
+
* validates when focus is outside the combobox unless `noValidate` is set, and fires `inputValue`.
|
|
22811
22830
|
* @private
|
|
22812
22831
|
* @param {Event} event - The input event triggered by the input element.
|
|
22813
22832
|
* @returns {void}
|
|
@@ -22917,9 +22936,9 @@ class AuroCombobox extends AuroElement {
|
|
|
22917
22936
|
}
|
|
22918
22937
|
|
|
22919
22938
|
/**
|
|
22920
|
-
*
|
|
22921
|
-
* Refreshes menu options and filtering,
|
|
22922
|
-
*
|
|
22939
|
+
* Called when the text in the trigger input changes.
|
|
22940
|
+
* Refreshes the menu's options and filtering, passes the change to `handleInputValueChange`,
|
|
22941
|
+
* and keeps focus in the fullscreen bib input while that bib is open.
|
|
22923
22942
|
* @private
|
|
22924
22943
|
* @param {Event} event - The input event from the trigger input element.
|
|
22925
22944
|
* @returns {void}
|
|
@@ -23748,7 +23767,7 @@ let menuInstanceIdCounter = 0;
|
|
|
23748
23767
|
*
|
|
23749
23768
|
* @event {CustomEvent<Element>} auroMenu-activatedOption - Fires when an option becomes the active (highlighted) option, through the arrow keys, hover, or `updateActiveOption()`. The option is in `detail`.
|
|
23750
23769
|
* @event {CustomEvent<any>} auroMenu-customEventFired - Fires right after the menu fires the event named in an option's `event` attribute. The option is in `detail.option`.
|
|
23751
|
-
* @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Fires when `loading` changes.
|
|
23770
|
+
* @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Fires when `loading` changes, and once when the menu first renders.
|
|
23752
23771
|
* @event {CustomEvent<{ options: Array<HTMLElement> }>} auroMenu-optionsChange - Fires when the set of options in the menu changes.
|
|
23753
23772
|
* @event {CustomEvent<any>} auroMenu-selectValueFailure - Fires when a value doesn't match any option that can be selected, or when someone chooses an option with no `value` in multi-select mode.
|
|
23754
23773
|
* @event {CustomEvent<any>} auroMenu-selectValueReset - Fires when `reset()` clears the menu.
|
|
@@ -23893,7 +23912,7 @@ class AuroMenu extends AuroElement {
|
|
|
23893
23912
|
},
|
|
23894
23913
|
|
|
23895
23914
|
/**
|
|
23896
|
-
*
|
|
23915
|
+
* Holds how deeply a nested menu is indented, which sets how many spacers its options get.
|
|
23897
23916
|
* @private
|
|
23898
23917
|
*/
|
|
23899
23918
|
level: {
|
|
@@ -24065,8 +24084,8 @@ class AuroMenu extends AuroElement {
|
|
|
24065
24084
|
}
|
|
24066
24085
|
|
|
24067
24086
|
/**
|
|
24068
|
-
*
|
|
24069
|
-
*
|
|
24087
|
+
* Gets `value` in the shape the menu works with: the string itself, or, in multi-select mode,
|
|
24088
|
+
* an array of values parsed from the JSON array string.
|
|
24070
24089
|
* @private
|
|
24071
24090
|
* @returns {String|Array<String>}
|
|
24072
24091
|
*/
|
|
@@ -24876,7 +24895,7 @@ class AuroMenu extends AuroElement {
|
|
|
24876
24895
|
}
|
|
24877
24896
|
|
|
24878
24897
|
/**
|
|
24879
|
-
*
|
|
24898
|
+
* Called when a key is pressed in the menu. The arrow keys move the active option, and Enter and Tab select it.
|
|
24880
24899
|
* @private
|
|
24881
24900
|
* @param {KeyboardEvent} event - The keydown event.
|
|
24882
24901
|
*/
|
|
@@ -24902,7 +24921,7 @@ class AuroMenu extends AuroElement {
|
|
|
24902
24921
|
}
|
|
24903
24922
|
|
|
24904
24923
|
/**
|
|
24905
|
-
*
|
|
24924
|
+
* Called when an option fires `auroMenuOption-click`. Selects the clicked option, unless the menu is disabled or nested in another menu.
|
|
24906
24925
|
* @private
|
|
24907
24926
|
* @param {CustomEvent} event - The auroMenuOption-click event.
|
|
24908
24927
|
*/
|
|
@@ -24922,7 +24941,7 @@ class AuroMenu extends AuroElement {
|
|
|
24922
24941
|
}
|
|
24923
24942
|
|
|
24924
24943
|
/**
|
|
24925
|
-
*
|
|
24944
|
+
* Called when the pointer moves over an option. Makes it the active option, unless it can't be highlighted.
|
|
24926
24945
|
* @private
|
|
24927
24946
|
* @param {CustomEvent} event - The `auroMenuOption-mouseover` event.
|
|
24928
24947
|
*/
|
|
@@ -24946,7 +24965,7 @@ class AuroMenu extends AuroElement {
|
|
|
24946
24965
|
}
|
|
24947
24966
|
|
|
24948
24967
|
/**
|
|
24949
|
-
*
|
|
24968
|
+
* Called when the menu's content changes. Sets the menu up again, and re-applies a `value` that was set before the options arrived.
|
|
24950
24969
|
* @private
|
|
24951
24970
|
*/
|
|
24952
24971
|
handleSlotChange() {
|
|
@@ -25042,7 +25061,7 @@ class AuroMenu extends AuroElement {
|
|
|
25042
25061
|
}
|
|
25043
25062
|
|
|
25044
25063
|
/**
|
|
25045
|
-
*
|
|
25064
|
+
* Fires the event named in the option's `event` attribute, then `auroMenu-customEventFired`, with the option in `detail.option`.
|
|
25046
25065
|
* @private
|
|
25047
25066
|
* @param {HTMLElement} option - Option with custom event.
|
|
25048
25067
|
*/
|
|
@@ -25062,6 +25081,7 @@ class AuroMenu extends AuroElement {
|
|
|
25062
25081
|
}
|
|
25063
25082
|
|
|
25064
25083
|
/**
|
|
25084
|
+
* Checks whether two selections hold the same options, in any order.
|
|
25065
25085
|
* @private
|
|
25066
25086
|
* @param {any} current - The current selection.
|
|
25067
25087
|
* @param {any} next - The new selection to compare.
|
|
@@ -25491,7 +25511,7 @@ class AuroMenuOption extends AuroElement {
|
|
|
25491
25511
|
}
|
|
25492
25512
|
|
|
25493
25513
|
/**
|
|
25494
|
-
*
|
|
25514
|
+
* Called when the option is clicked. Fires `auroMenuOption-click`, unless the option or a menu containing it is disabled.
|
|
25495
25515
|
* @private
|
|
25496
25516
|
*/
|
|
25497
25517
|
handleClick() {
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
Begin typing into the input.
|
|
87
87
|
<div class="note">
|
|
88
88
|
<p>
|
|
89
|
-
The bib doesn't open until the user types at least one character into the input. Clicking or tapping the trigger alone doesn't open the bib. Once the input has a value, the user may click or tap the trigger to open
|
|
89
|
+
The bib doesn't open until the user types at least one character into the input. Clicking or tapping the trigger alone doesn't open the bib. Once the input has a value, the user may click or tap the trigger to open the bib.
|
|
90
90
|
</p>
|
|
91
91
|
<p>
|
|
92
92
|
In desktop view, the list of options renders in a dropdown-style bib that appears below the trigger. The bib may render above the trigger if there isn't enough space in the viewport below the trigger.
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
<li><strong><code>nomatch</code></strong>: The option is shown only when no other options match the typed value, such as "No results found".</li>
|
|
132
132
|
</ul>
|
|
133
133
|
<div class="note">
|
|
134
|
-
<strong>Note:</strong>
|
|
134
|
+
<strong>Note:</strong> Set <code>noFilter</code> on the combobox to turn off filtering. Every option then stays visible whatever the user types, and matching text is still highlighted. Use it when your code replaces the options as the user types, such as with results from a server that already returns only matching options.
|
|
135
135
|
</div>
|
|
136
136
|
<auro-header level="3" id="presetValue">Preset the value</auro-header>
|
|
137
137
|
<p>To show a value when the component first renders, preset its <code>value</code>.</p>
|