@aurodesignsystem/auro-formkit 3.4.1 → 3.5.0-rc-627.1.1

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.
Files changed (74) hide show
  1. package/CHANGELOG.md +3 -1756
  2. package/components/checkbox/README.md +1 -1
  3. package/components/checkbox/demo/api.md +1 -1
  4. package/components/checkbox/demo/api.min.js +17 -7
  5. package/components/checkbox/demo/index.min.js +17 -7
  6. package/components/checkbox/demo/readme.md +1 -1
  7. package/components/checkbox/dist/auro-checkbox.d.ts +13 -6
  8. package/components/checkbox/dist/index.js +17 -7
  9. package/components/checkbox/dist/registered.js +17 -7
  10. package/components/combobox/README.md +1 -1
  11. package/components/combobox/demo/api.md +25 -25
  12. package/components/combobox/demo/api.min.js +20 -11
  13. package/components/combobox/demo/index.min.js +20 -11
  14. package/components/combobox/demo/readme.md +1 -1
  15. package/components/combobox/dist/auro-combobox.d.ts +2 -4
  16. package/components/combobox/dist/index.js +19 -10
  17. package/components/combobox/dist/registered.js +19 -10
  18. package/components/counter/README.md +1 -1
  19. package/components/counter/demo/readme.md +1 -1
  20. package/components/datepicker/README.md +1 -1
  21. package/components/datepicker/demo/api.min.js +17 -10
  22. package/components/datepicker/demo/index.min.js +17 -10
  23. package/components/datepicker/demo/readme.md +1 -1
  24. package/components/datepicker/dist/index.js +17 -10
  25. package/components/datepicker/dist/registered.js +17 -10
  26. package/components/dropdown/README.md +1 -1
  27. package/components/dropdown/demo/readme.md +1 -1
  28. package/components/form/README.md +1 -1
  29. package/components/form/demo/api.md +1 -5
  30. package/components/form/demo/api.min.js +8 -2
  31. package/components/form/demo/index.html +1 -0
  32. package/components/form/demo/index.md +321 -27
  33. package/components/form/demo/index.min.js +8 -2
  34. package/components/form/demo/readme.md +1 -1
  35. package/components/form/demo/registerDemoDeps.js +1 -0
  36. package/components/form/dist/auro-form.d.ts +12 -6
  37. package/components/form/dist/index.js +8 -2
  38. package/components/form/dist/registered.js +8 -2
  39. package/components/input/README.md +1 -1
  40. package/components/input/demo/api.md +1 -1
  41. package/components/input/demo/api.min.js +17 -10
  42. package/components/input/demo/index.min.js +17 -10
  43. package/components/input/demo/readme.md +1 -1
  44. package/components/input/dist/base-input.d.ts +13 -6
  45. package/components/input/dist/index.js +17 -10
  46. package/components/input/dist/registered.js +17 -10
  47. package/components/menu/README.md +1 -1
  48. package/components/menu/demo/api.md +11 -17
  49. package/components/menu/demo/api.min.js +1 -1
  50. package/components/menu/demo/index.min.js +1 -1
  51. package/components/menu/demo/readme.md +1 -1
  52. package/components/menu/dist/auro-menu.d.ts +1 -1
  53. package/components/menu/dist/index.js +1 -1
  54. package/components/menu/dist/registered.js +1 -1
  55. package/components/radio/README.md +1 -1
  56. package/components/radio/demo/api.md +1 -1
  57. package/components/radio/demo/api.min.js +18 -3
  58. package/components/radio/demo/index.min.js +18 -3
  59. package/components/radio/demo/readme.md +1 -1
  60. package/components/radio/dist/auro-radio.d.ts +14 -3
  61. package/components/radio/dist/index.js +18 -3
  62. package/components/radio/dist/registered.js +18 -3
  63. package/components/select/README.md +1 -1
  64. package/components/select/demo/api.html +15 -0
  65. package/components/select/demo/api.md +178 -0
  66. package/components/select/demo/api.min.js +70 -2
  67. package/components/select/demo/index.html +15 -0
  68. package/components/select/demo/index.md +177 -0
  69. package/components/select/demo/index.min.js +70 -2
  70. package/components/select/demo/readme.md +1 -1
  71. package/components/select/dist/auro-select.d.ts +27 -0
  72. package/components/select/dist/index.js +70 -1
  73. package/components/select/dist/registered.js +70 -1
  74. package/package.json +1 -1
@@ -5485,7 +5485,7 @@ i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);-
5485
5485
 
5486
5486
  i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}`;
5487
5487
 
5488
- var styleCss$3 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.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}[slot=trigger]{width:100%;padding:0;border:0;cursor:pointer;font-family:inherit;font-size:inherit;text-align:left}[slot=trigger] .nestingSpacer{display:none}[slot=trigger] #placeholder.hidden{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host [auro-dropdown]{position:relative}:host [auro-dropdown]::part(trigger){max-height:var(--ds-size-300, 1.5rem)}:host [auro-dropdown]::part(popover){max-width:-webkit-fill-available;overflow-y:scroll}:host([disabled]) *{user-select:none}.outerWrapper{position:relative}auro-menuoption{padding:0;pointer-events:none}.menuWrapper{padding:var(--ds-size-50, 0.25rem) 0}:host([multiselect]) [slot=trigger]{display:flex}:host([multiselect]) auro-menuoption:not(:first-child){margin-left:var(--ds-size-100)}#slotHolder{display:none}`;
5488
+ var styleCss$3 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.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}[slot=trigger]{width:100%;padding:0;border:0;cursor:pointer;font-family:inherit;font-size:inherit;text-align:left}[slot=trigger] .nestingSpacer{display:none}[slot=trigger] #placeholder.hidden{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host .nativeSelectWrapper{position:absolute;overflow:hidden;width:1px;height:1px;padding:0;border:0;margin:-1px;clip:rect(0, 0, 0, 0);opacity:.01}:host [auro-dropdown]{position:relative}:host [auro-dropdown]::part(trigger){max-height:var(--ds-size-300, 1.5rem)}:host [auro-dropdown]::part(popover){max-width:-webkit-fill-available;overflow-y:scroll}:host([disabled]) *{user-select:none}.outerWrapper{position:relative}auro-menuoption{padding:0;pointer-events:none}.menuWrapper{padding:var(--ds-size-50, 0.25rem) 0}:host([multiselect]) [slot=trigger]{display:flex}:host([multiselect]) auro-menuoption:not(:first-child){margin-left:var(--ds-size-100)}#slotHolder{display:none}`;
5489
5489
 
5490
5490
  // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
5491
5491
  // See LICENSE in the project root for license information.
@@ -5580,6 +5580,14 @@ class AuroSelect extends i$2 {
5580
5580
  static get properties() {
5581
5581
  return {
5582
5582
 
5583
+ /**
5584
+ * If declared, sets the autocomplete attribute for the select element.
5585
+ */
5586
+ autocomplete: {
5587
+ type: String,
5588
+ reflect: true
5589
+ },
5590
+
5583
5591
  /**
5584
5592
  * If declared, bib's position will be automatically calculated where to appear.
5585
5593
  * @default false
@@ -5597,6 +5605,14 @@ class AuroSelect extends i$2 {
5597
5605
  reflect: true
5598
5606
  },
5599
5607
 
5608
+ /**
5609
+ * The name for the select element.
5610
+ */
5611
+ name: {
5612
+ type: String,
5613
+ reflect: true
5614
+ },
5615
+
5600
5616
  /**
5601
5617
  * If set, makes dropdown width match the size of the content, rather than the width of the trigger.
5602
5618
  */
@@ -6140,6 +6156,7 @@ class AuroSelect extends i$2 {
6140
6156
  this.menu.value = undefined;
6141
6157
  }
6142
6158
 
6159
+ this._updateNativeSelect();
6143
6160
  this.validation.validate(this);
6144
6161
 
6145
6162
  // LEGACY EVENT
@@ -6191,6 +6208,34 @@ class AuroSelect extends i$2 {
6191
6208
  this.validation.validate(this, force);
6192
6209
  }
6193
6210
 
6211
+ /**
6212
+ * Syncs the value from the native select element to the component's value.
6213
+ * @param {Event} event // The change event from the native select element.
6214
+ * @returns {void}
6215
+ * @private
6216
+ */
6217
+ _handleNativeSelectChange(event) {
6218
+ const selectedOption = event.target.options[event.target.selectedIndex];
6219
+ const selectedValue = selectedOption.value;
6220
+ const [currentValue] = this.value || [];
6221
+ this.value = !currentValue || currentValue !== selectedValue ? [selectedValue] : this.value;
6222
+ }
6223
+
6224
+ /**
6225
+ * Updates the native select element's value based on the component's value.
6226
+ * @returns {void}
6227
+ * @private
6228
+ */
6229
+ _updateNativeSelect() {
6230
+ const nativeSelect = this.shadowRoot.querySelector('select');
6231
+ if (!nativeSelect) {
6232
+ return;
6233
+ }
6234
+ const [value] = this.value || [];
6235
+ nativeSelect.value = value || '';
6236
+ }
6237
+
6238
+
6194
6239
  // When using auroElement, use the following attribute and function when hiding content from screen readers.
6195
6240
  // aria-hidden="${this.hideAudible(this.hiddenAudible)}"
6196
6241
 
@@ -6257,6 +6302,29 @@ class AuroSelect extends i$2 {
6257
6302
  }
6258
6303
  </p>
6259
6304
  </${this.dropdownTag}>
6305
+ <div class="nativeSelectWrapper">
6306
+ <select
6307
+ tabindex="-1"
6308
+ id="${`native-select-${this.id || this.uniqueId}`}"
6309
+ name="${this.name || ''}"
6310
+ ?disabled="${this.disabled}"
6311
+ ?required="${this.required}"
6312
+ aria-hidden="true"
6313
+ autocomplete="${o(this.autocomplete)}"
6314
+ @change="${this._handleNativeSelectChange}">
6315
+ <option value="" ?selected="${!this.value}"></option>
6316
+ ${this.options.map((option) => {
6317
+ const optionValue = option.value || option.textContent;
6318
+ return u`
6319
+ <option
6320
+ value="${optionValue}"
6321
+ ?selected="${this.value === optionValue}">
6322
+ ${option.textContent}
6323
+ </option>
6324
+ `;
6325
+ })}
6326
+ </select>
6327
+ </div>
6260
6328
  <!-- Help text and error message template -->
6261
6329
  </div>
6262
6330
  `;
@@ -6409,7 +6477,7 @@ function dispatchMenuEvent(element, eventName, detail = null) {
6409
6477
  // See https://git.io/JJ6SJ for "How to document your components using JSDoc"
6410
6478
  /**
6411
6479
  * The auro-menu element provides users a way to select from a list of options.
6412
- * @attr {Array<HTMLElement>|undefined} optionselected - An array of currently selected menu options. In single-select mode, the array will contain only one HTMLElement. `undefined` when no options are selected.
6480
+ * @attr {Array<HTMLElement>|undefined} optionSelected - An array of currently selected menu options. In single-select mode, the array will contain only one HTMLElement. `undefined` when no options are selected.
6413
6481
  * @attr {object} optionactive - Specifies the current active menuOption.
6414
6482
  * @attr {string} matchword - Specifies a string used to highlight matched string parts in options.
6415
6483
  * @attr {boolean} disabled - When true, the entire menu and all options are disabled;
@@ -111,7 +111,7 @@ The use of any Auro custom element has a dependency on the [Auro Design Tokens](
111
111
  In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
112
112
 
113
113
  ```html
114
- <script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@3.4.0/auro-select/+esm"></script>
114
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@0.0.0/auro-select/+esm"></script>
115
115
  ```
116
116
  <!-- AURO-GENERATED-CONTENT:END -->
117
117
 
@@ -13,6 +13,13 @@
13
13
  */
14
14
  export class AuroSelect extends LitElement {
15
15
  static get properties(): {
16
+ /**
17
+ * If declared, sets the autocomplete attribute for the select element.
18
+ */
19
+ autocomplete: {
20
+ type: StringConstructor;
21
+ reflect: boolean;
22
+ };
16
23
  /**
17
24
  * If declared, bib's position will be automatically calculated where to appear.
18
25
  * @default false
@@ -28,6 +35,13 @@ export class AuroSelect extends LitElement {
28
35
  type: BooleanConstructor;
29
36
  reflect: boolean;
30
37
  };
38
+ /**
39
+ * The name for the select element.
40
+ */
41
+ name: {
42
+ type: StringConstructor;
43
+ reflect: boolean;
44
+ };
31
45
  /**
32
46
  * If set, makes dropdown width match the size of the content, rather than the width of the trigger.
33
47
  */
@@ -325,6 +339,19 @@ export class AuroSelect extends LitElement {
325
339
  * @param {boolean} [force=false] - Whether to force validation.
326
340
  */
327
341
  validate(force?: boolean): void;
342
+ /**
343
+ * Syncs the value from the native select element to the component's value.
344
+ * @param {Event} event // The change event from the native select element.
345
+ * @returns {void}
346
+ * @private
347
+ */
348
+ private _handleNativeSelectChange;
349
+ /**
350
+ * Updates the native select element's value based on the component's value.
351
+ * @returns {void}
352
+ * @private
353
+ */
354
+ private _updateNativeSelect;
328
355
  render(): import("lit-html").TemplateResult;
329
356
  }
330
357
  import { LitElement } from "lit";
@@ -2,6 +2,7 @@ import { css, LitElement, html as html$1 } from 'lit';
2
2
  import { classMap } from 'lit/directives/class-map.js';
3
3
  import { unsafeStatic, literal, html } from 'lit/static-html.js';
4
4
  import { ifDefined } from 'lit/directives/if-defined.js';
5
+ import { ifDefined as ifDefined$1 } from 'lit-html/directives/if-defined.js';
5
6
 
6
7
  class DateFormatter {
7
8
 
@@ -5438,7 +5439,7 @@ css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);-
5438
5439
 
5439
5440
  css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}`;
5440
5441
 
5441
- var styleCss = css`:focus:not(:focus-visible){outline:3px solid transparent}.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}[slot=trigger]{width:100%;padding:0;border:0;cursor:pointer;font-family:inherit;font-size:inherit;text-align:left}[slot=trigger] .nestingSpacer{display:none}[slot=trigger] #placeholder.hidden{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host [auro-dropdown]{position:relative}:host [auro-dropdown]::part(trigger){max-height:var(--ds-size-300, 1.5rem)}:host [auro-dropdown]::part(popover){max-width:-webkit-fill-available;overflow-y:scroll}:host([disabled]) *{user-select:none}.outerWrapper{position:relative}auro-menuoption{padding:0;pointer-events:none}.menuWrapper{padding:var(--ds-size-50, 0.25rem) 0}:host([multiselect]) [slot=trigger]{display:flex}:host([multiselect]) auro-menuoption:not(:first-child){margin-left:var(--ds-size-100)}#slotHolder{display:none}`;
5442
+ var styleCss = css`:focus:not(:focus-visible){outline:3px solid transparent}.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}[slot=trigger]{width:100%;padding:0;border:0;cursor:pointer;font-family:inherit;font-size:inherit;text-align:left}[slot=trigger] .nestingSpacer{display:none}[slot=trigger] #placeholder.hidden{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host .nativeSelectWrapper{position:absolute;overflow:hidden;width:1px;height:1px;padding:0;border:0;margin:-1px;clip:rect(0, 0, 0, 0);opacity:.01}:host [auro-dropdown]{position:relative}:host [auro-dropdown]::part(trigger){max-height:var(--ds-size-300, 1.5rem)}:host [auro-dropdown]::part(popover){max-width:-webkit-fill-available;overflow-y:scroll}:host([disabled]) *{user-select:none}.outerWrapper{position:relative}auro-menuoption{padding:0;pointer-events:none}.menuWrapper{padding:var(--ds-size-50, 0.25rem) 0}:host([multiselect]) [slot=trigger]{display:flex}:host([multiselect]) auro-menuoption:not(:first-child){margin-left:var(--ds-size-100)}#slotHolder{display:none}`;
5442
5443
 
5443
5444
  // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
5444
5445
  // See LICENSE in the project root for license information.
@@ -5533,6 +5534,14 @@ class AuroSelect extends LitElement {
5533
5534
  static get properties() {
5534
5535
  return {
5535
5536
 
5537
+ /**
5538
+ * If declared, sets the autocomplete attribute for the select element.
5539
+ */
5540
+ autocomplete: {
5541
+ type: String,
5542
+ reflect: true
5543
+ },
5544
+
5536
5545
  /**
5537
5546
  * If declared, bib's position will be automatically calculated where to appear.
5538
5547
  * @default false
@@ -5550,6 +5559,14 @@ class AuroSelect extends LitElement {
5550
5559
  reflect: true
5551
5560
  },
5552
5561
 
5562
+ /**
5563
+ * The name for the select element.
5564
+ */
5565
+ name: {
5566
+ type: String,
5567
+ reflect: true
5568
+ },
5569
+
5553
5570
  /**
5554
5571
  * If set, makes dropdown width match the size of the content, rather than the width of the trigger.
5555
5572
  */
@@ -6093,6 +6110,7 @@ class AuroSelect extends LitElement {
6093
6110
  this.menu.value = undefined;
6094
6111
  }
6095
6112
 
6113
+ this._updateNativeSelect();
6096
6114
  this.validation.validate(this);
6097
6115
 
6098
6116
  // LEGACY EVENT
@@ -6144,6 +6162,34 @@ class AuroSelect extends LitElement {
6144
6162
  this.validation.validate(this, force);
6145
6163
  }
6146
6164
 
6165
+ /**
6166
+ * Syncs the value from the native select element to the component's value.
6167
+ * @param {Event} event // The change event from the native select element.
6168
+ * @returns {void}
6169
+ * @private
6170
+ */
6171
+ _handleNativeSelectChange(event) {
6172
+ const selectedOption = event.target.options[event.target.selectedIndex];
6173
+ const selectedValue = selectedOption.value;
6174
+ const [currentValue] = this.value || [];
6175
+ this.value = !currentValue || currentValue !== selectedValue ? [selectedValue] : this.value;
6176
+ }
6177
+
6178
+ /**
6179
+ * Updates the native select element's value based on the component's value.
6180
+ * @returns {void}
6181
+ * @private
6182
+ */
6183
+ _updateNativeSelect() {
6184
+ const nativeSelect = this.shadowRoot.querySelector('select');
6185
+ if (!nativeSelect) {
6186
+ return;
6187
+ }
6188
+ const [value] = this.value || [];
6189
+ nativeSelect.value = value || '';
6190
+ }
6191
+
6192
+
6147
6193
  // When using auroElement, use the following attribute and function when hiding content from screen readers.
6148
6194
  // aria-hidden="${this.hideAudible(this.hiddenAudible)}"
6149
6195
 
@@ -6210,6 +6256,29 @@ class AuroSelect extends LitElement {
6210
6256
  }
6211
6257
  </p>
6212
6258
  </${this.dropdownTag}>
6259
+ <div class="nativeSelectWrapper">
6260
+ <select
6261
+ tabindex="-1"
6262
+ id="${`native-select-${this.id || this.uniqueId}`}"
6263
+ name="${this.name || ''}"
6264
+ ?disabled="${this.disabled}"
6265
+ ?required="${this.required}"
6266
+ aria-hidden="true"
6267
+ autocomplete="${ifDefined$1(this.autocomplete)}"
6268
+ @change="${this._handleNativeSelectChange}">
6269
+ <option value="" ?selected="${!this.value}"></option>
6270
+ ${this.options.map((option) => {
6271
+ const optionValue = option.value || option.textContent;
6272
+ return html`
6273
+ <option
6274
+ value="${optionValue}"
6275
+ ?selected="${this.value === optionValue}">
6276
+ ${option.textContent}
6277
+ </option>
6278
+ `;
6279
+ })}
6280
+ </select>
6281
+ </div>
6213
6282
  <!-- Help text and error message template -->
6214
6283
  </div>
6215
6284
  `;
@@ -2,6 +2,7 @@ import { css, LitElement, html as html$1 } from 'lit';
2
2
  import { classMap } from 'lit/directives/class-map.js';
3
3
  import { unsafeStatic, literal, html } from 'lit/static-html.js';
4
4
  import { ifDefined } from 'lit/directives/if-defined.js';
5
+ import { ifDefined as ifDefined$1 } from 'lit-html/directives/if-defined.js';
5
6
 
6
7
  class DateFormatter {
7
8
 
@@ -5438,7 +5439,7 @@ css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);-
5438
5439
 
5439
5440
  css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}`;
5440
5441
 
5441
- var styleCss = css`:focus:not(:focus-visible){outline:3px solid transparent}.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}[slot=trigger]{width:100%;padding:0;border:0;cursor:pointer;font-family:inherit;font-size:inherit;text-align:left}[slot=trigger] .nestingSpacer{display:none}[slot=trigger] #placeholder.hidden{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host [auro-dropdown]{position:relative}:host [auro-dropdown]::part(trigger){max-height:var(--ds-size-300, 1.5rem)}:host [auro-dropdown]::part(popover){max-width:-webkit-fill-available;overflow-y:scroll}:host([disabled]) *{user-select:none}.outerWrapper{position:relative}auro-menuoption{padding:0;pointer-events:none}.menuWrapper{padding:var(--ds-size-50, 0.25rem) 0}:host([multiselect]) [slot=trigger]{display:flex}:host([multiselect]) auro-menuoption:not(:first-child){margin-left:var(--ds-size-100)}#slotHolder{display:none}`;
5442
+ var styleCss = css`:focus:not(:focus-visible){outline:3px solid transparent}.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}[slot=trigger]{width:100%;padding:0;border:0;cursor:pointer;font-family:inherit;font-size:inherit;text-align:left}[slot=trigger] .nestingSpacer{display:none}[slot=trigger] #placeholder.hidden{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host .nativeSelectWrapper{position:absolute;overflow:hidden;width:1px;height:1px;padding:0;border:0;margin:-1px;clip:rect(0, 0, 0, 0);opacity:.01}:host [auro-dropdown]{position:relative}:host [auro-dropdown]::part(trigger){max-height:var(--ds-size-300, 1.5rem)}:host [auro-dropdown]::part(popover){max-width:-webkit-fill-available;overflow-y:scroll}:host([disabled]) *{user-select:none}.outerWrapper{position:relative}auro-menuoption{padding:0;pointer-events:none}.menuWrapper{padding:var(--ds-size-50, 0.25rem) 0}:host([multiselect]) [slot=trigger]{display:flex}:host([multiselect]) auro-menuoption:not(:first-child){margin-left:var(--ds-size-100)}#slotHolder{display:none}`;
5442
5443
 
5443
5444
  // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
5444
5445
  // See LICENSE in the project root for license information.
@@ -5533,6 +5534,14 @@ class AuroSelect extends LitElement {
5533
5534
  static get properties() {
5534
5535
  return {
5535
5536
 
5537
+ /**
5538
+ * If declared, sets the autocomplete attribute for the select element.
5539
+ */
5540
+ autocomplete: {
5541
+ type: String,
5542
+ reflect: true
5543
+ },
5544
+
5536
5545
  /**
5537
5546
  * If declared, bib's position will be automatically calculated where to appear.
5538
5547
  * @default false
@@ -5550,6 +5559,14 @@ class AuroSelect extends LitElement {
5550
5559
  reflect: true
5551
5560
  },
5552
5561
 
5562
+ /**
5563
+ * The name for the select element.
5564
+ */
5565
+ name: {
5566
+ type: String,
5567
+ reflect: true
5568
+ },
5569
+
5553
5570
  /**
5554
5571
  * If set, makes dropdown width match the size of the content, rather than the width of the trigger.
5555
5572
  */
@@ -6093,6 +6110,7 @@ class AuroSelect extends LitElement {
6093
6110
  this.menu.value = undefined;
6094
6111
  }
6095
6112
 
6113
+ this._updateNativeSelect();
6096
6114
  this.validation.validate(this);
6097
6115
 
6098
6116
  // LEGACY EVENT
@@ -6144,6 +6162,34 @@ class AuroSelect extends LitElement {
6144
6162
  this.validation.validate(this, force);
6145
6163
  }
6146
6164
 
6165
+ /**
6166
+ * Syncs the value from the native select element to the component's value.
6167
+ * @param {Event} event // The change event from the native select element.
6168
+ * @returns {void}
6169
+ * @private
6170
+ */
6171
+ _handleNativeSelectChange(event) {
6172
+ const selectedOption = event.target.options[event.target.selectedIndex];
6173
+ const selectedValue = selectedOption.value;
6174
+ const [currentValue] = this.value || [];
6175
+ this.value = !currentValue || currentValue !== selectedValue ? [selectedValue] : this.value;
6176
+ }
6177
+
6178
+ /**
6179
+ * Updates the native select element's value based on the component's value.
6180
+ * @returns {void}
6181
+ * @private
6182
+ */
6183
+ _updateNativeSelect() {
6184
+ const nativeSelect = this.shadowRoot.querySelector('select');
6185
+ if (!nativeSelect) {
6186
+ return;
6187
+ }
6188
+ const [value] = this.value || [];
6189
+ nativeSelect.value = value || '';
6190
+ }
6191
+
6192
+
6147
6193
  // When using auroElement, use the following attribute and function when hiding content from screen readers.
6148
6194
  // aria-hidden="${this.hideAudible(this.hiddenAudible)}"
6149
6195
 
@@ -6210,6 +6256,29 @@ class AuroSelect extends LitElement {
6210
6256
  }
6211
6257
  </p>
6212
6258
  </${this.dropdownTag}>
6259
+ <div class="nativeSelectWrapper">
6260
+ <select
6261
+ tabindex="-1"
6262
+ id="${`native-select-${this.id || this.uniqueId}`}"
6263
+ name="${this.name || ''}"
6264
+ ?disabled="${this.disabled}"
6265
+ ?required="${this.required}"
6266
+ aria-hidden="true"
6267
+ autocomplete="${ifDefined$1(this.autocomplete)}"
6268
+ @change="${this._handleNativeSelectChange}">
6269
+ <option value="" ?selected="${!this.value}"></option>
6270
+ ${this.options.map((option) => {
6271
+ const optionValue = option.value || option.textContent;
6272
+ return html`
6273
+ <option
6274
+ value="${optionValue}"
6275
+ ?selected="${this.value === optionValue}">
6276
+ ${option.textContent}
6277
+ </option>
6278
+ `;
6279
+ })}
6280
+ </select>
6281
+ </div>
6213
6282
  <!-- Help text and error message template -->
6214
6283
  </div>
6215
6284
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurodesignsystem/auro-formkit",
3
- "version": "3.4.1",
3
+ "version": "3.5.0-rc-627.1.1",
4
4
  "description": "A collection of web components used to build forms.",
5
5
  "homepage": "https://github.com/AlaskaAirlines/auro-formkit#readme",
6
6
  "bugs": {