@aurodesignsystem-dev/auro-formkit 0.0.0-pr757.1 → 0.0.0-pr773.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/components/bibtemplate/dist/index.js +1 -1
  2. package/components/bibtemplate/dist/registered.js +1 -1
  3. package/components/checkbox/demo/api.min.js +9 -9
  4. package/components/checkbox/demo/index.min.js +9 -9
  5. package/components/checkbox/dist/index.js +9 -9
  6. package/components/checkbox/dist/registered.js +9 -9
  7. package/components/combobox/demo/api.min.js +79 -96
  8. package/components/combobox/demo/index.min.js +79 -96
  9. package/components/combobox/dist/index.js +43 -85
  10. package/components/combobox/dist/registered.js +43 -85
  11. package/components/counter/demo/api.md +1 -1
  12. package/components/counter/demo/api.min.js +35 -77
  13. package/components/counter/demo/index.min.js +35 -77
  14. package/components/counter/dist/auro-counter-group.d.ts +1 -1
  15. package/components/counter/dist/index.js +35 -77
  16. package/components/counter/dist/registered.js +35 -77
  17. package/components/datepicker/demo/api.min.js +64 -91
  18. package/components/datepicker/demo/index.min.js +64 -91
  19. package/components/datepicker/dist/auro-datepicker.d.ts +6 -0
  20. package/components/datepicker/dist/index.js +64 -91
  21. package/components/datepicker/dist/registered.js +64 -91
  22. package/components/dropdown/demo/api.md +60 -266
  23. package/components/dropdown/demo/api.min.js +25 -67
  24. package/components/dropdown/demo/index.md +45 -363
  25. package/components/dropdown/demo/index.min.js +25 -67
  26. package/components/dropdown/dist/auro-dropdown.d.ts +21 -71
  27. package/components/dropdown/dist/index.js +25 -67
  28. package/components/dropdown/dist/registered.js +25 -67
  29. package/components/helptext/dist/index.js +1 -1
  30. package/components/helptext/dist/registered.js +1 -1
  31. package/components/input/demo/api.min.js +11 -11
  32. package/components/input/demo/index.min.js +11 -11
  33. package/components/input/dist/index.js +11 -11
  34. package/components/input/dist/registered.js +11 -11
  35. package/components/menu/demo/api.md +1 -1
  36. package/components/menu/demo/api.min.js +36 -11
  37. package/components/menu/demo/index.min.js +36 -11
  38. package/components/menu/dist/auro-menu.d.ts +13 -2
  39. package/components/menu/dist/index.js +36 -11
  40. package/components/menu/dist/registered.js +36 -11
  41. package/components/radio/demo/api.min.js +10 -10
  42. package/components/radio/demo/index.min.js +10 -10
  43. package/components/radio/dist/auro-radio.d.ts +1 -1
  44. package/components/radio/dist/index.js +10 -10
  45. package/components/radio/dist/registered.js +10 -10
  46. package/components/select/demo/api.md +2 -2
  47. package/components/select/demo/api.min.js +98 -168
  48. package/components/select/demo/index.min.js +98 -168
  49. package/components/select/dist/auro-select.d.ts +13 -3
  50. package/components/select/dist/index.js +62 -157
  51. package/components/select/dist/registered.js +62 -157
  52. package/package.json +1 -1
@@ -781,19 +781,19 @@ class AuroFormValidation {
781
781
  {
782
782
  check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
783
783
  validity: 'tooShort',
784
- message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
784
+ message: e => e.getAttribute('setCustomValidityTooShort') || e.setCustomValidity || ''
785
785
  },
786
786
  {
787
787
  check: (e) => e.value?.length > e.maxLength,
788
788
  validity: 'tooLong',
789
- message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
789
+ message: e => e.getAttribute('setCustomValidityTooLong') || e.setCustomValidity || ''
790
790
  }
791
791
  ],
792
792
  pattern: [
793
793
  {
794
794
  check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
795
795
  validity: 'patternMismatch',
796
- message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
796
+ message: e => e.getAttribute('setCustomValidityPatternMismatch') || e.setCustomValidity || ''
797
797
  }
798
798
  ]
799
799
  },
@@ -988,10 +988,10 @@ class AuroFormValidation {
988
988
  if (!hasValue && elem.required && elem.touched) {
989
989
  elem.validity = 'valueMissing';
990
990
  elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
991
- } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
991
+ } else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
992
992
  this.validateType(elem);
993
993
  this.validateElementAttributes(elem);
994
- } else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
994
+ } else if (hasValue && (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group'))) {
995
995
  this.validateElementAttributes(elem);
996
996
  }
997
997
  }
@@ -4265,7 +4265,7 @@ var dropdownVersion$1 = '3.0.0';
4265
4265
 
4266
4266
  var shapeSizeCss = i$5`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}`;
4267
4267
 
4268
- var colorCss$1$2 = i$5`:host(:not([ondark])) .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host(:not([ondark])) .wrapper:focus-within,:host(:not([ondark])) .wrapper:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host(:not([onDark])[disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([ondark])[error]){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([onDark]) .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host([onDark]) .wrapper:focus-within,:host([onDark]) .wrapper:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([onDark][disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse-disabled, rgba(255, 255, 255, 0.1))}:host([ondark][error]){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}`;
4268
+ var colorCss$1$2 = i$5`:host(:not([layout*=classic])){--ds-auro-dropdown-trigger-border-color: transparent}:host(:not([ondark])) .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host(:not([ondark])) .wrapper:focus-within,:host(:not([ondark])) .wrapper:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host(:not([onDark])[disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([ondark])[error]){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([onDark]) .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host([onDark]) .wrapper:focus-within,:host([onDark]) .wrapper:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([onDark][disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse-disabled, rgba(255, 255, 255, 0.1))}:host([ondark][error]){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}`;
4269
4269
 
4270
4270
  var classicColorCss = i$5``;
4271
4271
 
@@ -4277,7 +4277,7 @@ var styleSnowflakeCss = i$5`:host{display:block}.wrapper{display:flex;flex:1;fle
4277
4277
 
4278
4278
  var colorCss$5 = i$5`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
4279
4279
 
4280
- var styleCss$6 = i$5`.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
4280
+ var styleCss$6 = i$5`:host{position:relative;display:block}.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
4281
4281
 
4282
4282
  var tokensCss$4 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
4283
4283
 
@@ -4582,10 +4582,8 @@ let AuroElement$3 = class AuroElement extends i$2 {
4582
4582
  // See LICENSE in the project root for license information.
4583
4583
 
4584
4584
 
4585
- /**
4586
- * @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
4585
+ /*
4587
4586
  * @slot - Default slot for the popover content.
4588
- * @slot label - Defines the content of the label.
4589
4587
  * @slot helpText - Defines the content of the helpText.
4590
4588
  * @slot trigger - Defines the content of the trigger.
4591
4589
  * @csspart trigger - The trigger content container.
@@ -4604,18 +4602,22 @@ class AuroDropdown extends AuroElement$3 {
4604
4602
  this.matchWidth = false;
4605
4603
  this.noHideOnThisFocusLoss = false;
4606
4604
 
4607
- this.errorMessage = ''; // TODO - check with Doug if there is still more to do here
4605
+ this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
4608
4606
 
4609
4607
  // Layout Config
4610
- this.layout = 'classic';
4611
- this.shape = 'classic';
4612
- this.size = 'xl';
4608
+ this.layout = undefined;
4609
+ this.shape = undefined;
4610
+ this.size = undefined;
4613
4611
 
4614
4612
  this.parentBorder = false;
4615
4613
 
4616
4614
  this.privateDefaults();
4617
4615
  }
4618
4616
 
4617
+ /**
4618
+ * @private
4619
+ * @returns {object} Class definition for the wrapper element.
4620
+ */
4619
4621
  get commonWrapperClasses() {
4620
4622
  return {
4621
4623
  'trigger': true,
@@ -4635,12 +4637,8 @@ class AuroDropdown extends AuroElement$3 {
4635
4637
  this.disabled = false;
4636
4638
  this.disableFocusTrap = false;
4637
4639
  this.error = false;
4638
- this.inset = false;
4639
- this.rounded = false;
4640
4640
  this.tabIndex = 0;
4641
4641
  this.noToggle = false;
4642
- this.a11yAutocomplete = 'none';
4643
- this.labeled = true;
4644
4642
  this.a11yRole = 'button';
4645
4643
  this.onDark = false;
4646
4644
  this.showTriggerBorders = true;
@@ -4762,26 +4760,27 @@ class AuroDropdown extends AuroElement$3 {
4762
4760
  },
4763
4761
 
4764
4762
  /**
4765
- * If declared, applies a border around the trigger slot.
4763
+ * If declared, the dropdown will only show by calling the API .show() public method.
4764
+ * @default false
4766
4765
  */
4767
- simple: {
4766
+ disableEventShow: {
4768
4767
  type: Boolean,
4769
4768
  reflect: true
4770
4769
  },
4771
4770
 
4772
4771
  /**
4773
- * If declared, the dropdown displays a chevron on the right.
4774
- * @attr {Boolean} chevron
4772
+ * If declared, applies a border around the trigger slot.
4775
4773
  */
4776
- chevron: {
4774
+ simple: {
4777
4775
  type: Boolean,
4778
4776
  reflect: true
4779
4777
  },
4780
4778
 
4781
4779
  /**
4782
- * If declared, the dropdown will be styled with the common theme.
4780
+ * If declared, the dropdown displays a chevron on the right.
4781
+ * @attr {Boolean} chevron
4783
4782
  */
4784
- common: {
4783
+ chevron: {
4785
4784
  type: Boolean,
4786
4785
  reflect: true
4787
4786
  },
@@ -4795,7 +4794,7 @@ class AuroDropdown extends AuroElement$3 {
4795
4794
  },
4796
4795
 
4797
4796
  /**
4798
- * If declare, the focus trap inside of bib will be turned off.
4797
+ * If declared, the focus trap inside of bib will be turned off.
4799
4798
  */
4800
4799
  disableFocusTrap: {
4801
4800
  type: Boolean,
@@ -4842,22 +4841,6 @@ class AuroDropdown extends AuroElement$3 {
4842
4841
  reflect: true
4843
4842
  },
4844
4843
 
4845
- /**
4846
- * Makes the trigger to be full width of its parent container.
4847
- */
4848
- fluid: {
4849
- type: Boolean,
4850
- reflect: true
4851
- },
4852
-
4853
- /**
4854
- * If declared, will apply padding around trigger slot content.
4855
- */
4856
- inset: {
4857
- type: Boolean,
4858
- reflect: true
4859
- },
4860
-
4861
4844
  /**
4862
4845
  * If true, the dropdown bib is displayed.
4863
4846
  */
@@ -4901,15 +4884,6 @@ class AuroDropdown extends AuroElement$3 {
4901
4884
  reflect: true
4902
4885
  },
4903
4886
 
4904
- /**
4905
- * Defines if there is a label preset.
4906
- * @private
4907
- */
4908
- labeled: {
4909
- type: Boolean,
4910
- reflect: true
4911
- },
4912
-
4913
4887
  /**
4914
4888
  * Defines if the trigger should size based on the parent element providing the border UI.
4915
4889
  * @private
@@ -4970,6 +4944,9 @@ class AuroDropdown extends AuroElement$3 {
4970
4944
  reflect: true
4971
4945
  },
4972
4946
 
4947
+ /**
4948
+ * If declared, and a function is set, that function will execute when the slot content is updated.
4949
+ */
4973
4950
  onSlotChange: {
4974
4951
  type: Function,
4975
4952
  reflect: false
@@ -4984,14 +4961,6 @@ class AuroDropdown extends AuroElement$3 {
4984
4961
  reflect: true
4985
4962
  },
4986
4963
 
4987
- /**
4988
- * If declared, will apply border-radius to trigger and default slots.
4989
- */
4990
- rounded: {
4991
- type: Boolean,
4992
- reflect: true
4993
- },
4994
-
4995
4964
  /**
4996
4965
  * @private
4997
4966
  */
@@ -5006,22 +4975,14 @@ class AuroDropdown extends AuroElement$3 {
5006
4975
  type: String || undefined,
5007
4976
  attribute: false,
5008
4977
  reflect: false
5009
- },
5010
-
5011
- /**
5012
- * The value for the aria-autocomplete attribute of the trigger element.
5013
- */
5014
- a11yAutocomplete: {
5015
- type: String,
5016
- attribute: false,
5017
4978
  }
5018
4979
  };
5019
4980
  }
5020
4981
 
5021
4982
  static get styles() {
5022
4983
  return [
5023
- colorCss$1$2,
5024
4984
  tokensCss$1$2,
4985
+ colorCss$1$2,
5025
4986
 
5026
4987
  // default layout
5027
4988
  classicColorCss,
@@ -5461,10 +5422,7 @@ class AuroDropdown extends AuroElement$3 {
5461
5422
  id="bib"
5462
5423
  shape="${this.shape}"
5463
5424
  ?data-show="${this.isPopoverVisible}"
5464
- ?isfullscreen="${this.isBibFullscreen}"
5465
- ?common="${this.common}"
5466
- ?rounded="${this.common || this.rounded}"
5467
- ?inset="${this.common || this.inset}">
5425
+ ?isfullscreen="${this.isBibFullscreen}">
5468
5426
  <div class="slotContent">
5469
5427
  <slot @slotchange="${this.handleDefaultSlot}"></slot>
5470
5428
  </div>
@@ -7445,7 +7403,7 @@ class AuroBibtemplate extends i$2 {
7445
7403
  <div id="bibTemplate" part="bibtemplate">
7446
7404
  ${this.isFullscreen ? u`
7447
7405
  <div id="headerContainer">
7448
- <${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
7406
+ <${this.buttonTag} id="closeButton" aria-label="Close" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
7449
7407
  <${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
7450
7408
  </${this.buttonTag}>
7451
7409
  <${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
@@ -7473,7 +7431,7 @@ var bibTemplateVersion = '1.0.0';
7473
7431
 
7474
7432
  var colorCss$3 = i$5`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
7475
7433
 
7476
- var styleCss$4 = i$5`.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
7434
+ var styleCss$4 = i$5`:host{position:relative;display:block}.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
7477
7435
 
7478
7436
  var tokensCss$2 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
7479
7437
 
@@ -7679,67 +7637,6 @@ class AuroHelpText extends i$2 {
7679
7637
 
7680
7638
  var helpTextVersion = '1.0.0';
7681
7639
 
7682
- i$5`:focus:not(:focus-visible){outline:3px solid transparent}:host{display:block;vertical-align:middle}:host .wrapper{box-sizing:border-box;display:inline-block;width:100%;margin:0;padding:0}:host ::slotted(hr){box-sizing:content-box !important;height:0 !important;overflow:visible !important;margin:var(--ds-size-100, 0.5rem) 0 !important;border-width:0 !important;border-top-width:1px !important;border-top-style:solid !important}:host [loadingplaceholder].empty{opacity:0;position:absolute}:host [loadingplaceholder] slot[name=loadingIcon]{vertical-align:middle;line-height:1;display:inline-block}:host [loadingplaceholder] slot[name=loadingIcon]::slotted(*){margin-right:var(--ds-size-150, 0.75rem)}:host([root]){overflow-y:auto}:host([root]) .wrapper[class*=-lg]{padding:var(--ds-size-150, 0.75rem)}:host([root]) .wrapper[class*=-xl]{padding:var(--ds-size-200, 1rem)}`;
7683
-
7684
- i$5`:host ::slotted(hr){border-top-color:var(--ds-auro-menu-divider-color)}[loadingplaceholder] slot[name=loadingIcon]{color:var(--ds-auro-menu-loader-color)}[loadingplaceholder] slot[name=loadingText]{color:var(--ds-auro-menu-loader-text-color)}`;
7685
-
7686
- i$5`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-border-divider, rgba(0, 0, 0, 0.15));--ds-auro-menu-loader-color: var(--ds-basic-color-brand-primary, #01426a);--ds-auro-menu-loader-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-container-color: transparent;--ds-auro-menuoption-container-border-color: var(--ds-auro-menuoption-container-color);--ds-auro-menuoption-icon-color: transparent;--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}`;
7687
-
7688
- // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
7689
- // See LICENSE in the project root for license information.
7690
-
7691
- // ---------------------------------------------------------------------
7692
-
7693
- /**
7694
- * Converts value to an array.
7695
- * If the value is a JSON string representing an array, it will be parsed.
7696
- * If the value is already an array, it is returned.
7697
- * If the value is undefined, it returns undefined.
7698
- * @private
7699
- * @param {any} value - The value to be converted. Can be a string, array, or undefined.
7700
- * @returns {Array|undefined} - The converted array or undefined.
7701
- * @throws {Error} - Throws an error if the value is not an array, undefined,
7702
- * or if the value cannot be parsed into an array from a JSON string.
7703
- */
7704
- function arrayConverter(value) {
7705
- // Allow undefined
7706
- if (value === undefined) {
7707
- return undefined;
7708
- }
7709
-
7710
- // Return the value if it is already an array
7711
- if (Array.isArray(value)) {
7712
- return value;
7713
- }
7714
-
7715
- try {
7716
- // If value is a JSON string, parse it
7717
- const parsed = typeof value === 'string' ? JSON.parse(value) : value;
7718
-
7719
- // Check if the parsed value is an array
7720
- if (Array.isArray(parsed)) {
7721
- return parsed;
7722
- }
7723
- } catch (error) {
7724
- // If JSON parsing fails, continue to throw an error below
7725
- /* eslint-disable no-console */
7726
- console.error('JSON parsing failed:', error);
7727
- }
7728
-
7729
- // Throw error if the input is not an array or undefined
7730
- throw new Error('Invalid value: Input must be an array or undefined');
7731
- }
7732
-
7733
- i$5`:host{cursor:pointer;user-select:none}:host .wrapper{display:flex;align-items:center;padding-right:var(--ds-size-200, 1rem);padding-left:calc(var(--ds-size-150, 0.75rem) + 24px + var(--ds-size-100, 0.5rem));padding-top:var(--ds-size-50, 0.25rem);padding-bottom:var(--ds-size-50, 0.25rem);-webkit-tap-highlight-color:transparent}:host .wrapper[class*=shape-box],:host .wrapper[class*=shape-snowflake]{border-radius:unset}:host .wrapper[class*=shape-pill]{border-radius:30px}:host .wrapper[class*=-lg]{font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem);padding-top:var(--ds-size-75, 0.375rem);padding-bottom:var(--ds-size-75, 0.375rem);padding-right:var(--ds-size-150, 0.75rem)}:host .wrapper[class*=-lg]:not(:last-child){margin-bottom:var(--ds-size-50, 0.25rem)}:host .wrapper[class*=-xl]{font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem);padding-top:var(--ds-size-100, 0.5rem);padding-bottom:var(--ds-size-100, 0.5rem);padding-right:var(--ds-size-200, 1rem)}:host .wrapper[class*=-xl]:not(:last-child){margin-bottom:var(--ds-size-100, 0.5rem)}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}:host ::slotted(strong){font-weight:700}:host([loadingplaceholder]) .wrapper{padding-left:calc(var(--ds-size-150, 0.75rem) + 24px + var(--ds-size-100, 0.5rem))}:host([selected]) .wrapper{padding-left:0}:host([nocheckmark]) .wrapper{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-lg]{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-xl]{padding-left:var(--ds-size-200, 1rem)}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
7734
-
7735
- i$5`:host .wrapper{border:1px solid var(--ds-auro-menuoption-container-border-color);background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color)}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-neutral-subtle, #f7f7f7)}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected, #01426a);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([selected]):host(:hover),:host([selected]):host(.active){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected-hover, #00274a)}`;
7736
-
7737
- i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, 0.25rem);line-height:1.8}`;
7738
-
7739
- i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
7740
-
7741
- 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)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
7742
-
7743
7640
  var styleCss$3 = i$5`.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}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color)}:host([layout*=emphasized]) [auro-dropdown],:host([layout*=snowflake]) [auro-dropdown]{--ds-auro-select-border-color: transparent}.mainContent{position:relative;display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;align-items:center;justify-content:center}::slotted([slot=typeIcon]){margin-right:8px}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}:host([layout*=emphasized]) .triggerContent,:host([layout*=snowflake]) .triggerContent{padding:0 8px 0 24px}:host([layout*=snowflake]) [auro-dropdown] label.withValue{font-size:var(--ds-text-body-size-xs);line-height:20px}:host([layout*=emphasized]) [auro-dropdown] label.withValue{font-size:var(--ds-text-body-size-xs);line-height:20px}:host([layout*=classic]) .triggerContent{padding:0 8px}:host([layout*=classic]) .mainContent{align-items:start}:host([layout*=classic]) label{cursor:text;font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}:host([layout*=classic]) label.withValue{font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([layout*=classic]) .value{height:auto;font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([disabled]){pointer-events:none;user-select:none}:host([disabled]:not([ondark])) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([layout*=classic])[disabled][ondark]) [auro-dropdown]{--ds-auro-select-border-color: transparent}`;
7744
7641
 
7745
7642
  // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
@@ -8078,11 +7975,12 @@ class AuroSelect extends AuroElement$4 {
8078
7975
  },
8079
7976
 
8080
7977
  /**
8081
- * Value selected for the component. Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
8082
- * @type {String|Array<String>}
7978
+ * Value selected for the component.
8083
7979
  */
8084
7980
  value: {
8085
- type: Object
7981
+ type: String,
7982
+ reflect: true,
7983
+ attribute: 'value'
8086
7984
  },
8087
7985
 
8088
7986
  /**
@@ -8134,6 +8032,25 @@ class AuroSelect extends AuroElement$4 {
8134
8032
  ];
8135
8033
  }
8136
8034
 
8035
+ /**
8036
+ * Formatted value based on `multiSelect` state.
8037
+ * Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
8038
+ * @private
8039
+ * @returns {String|Array<String>}
8040
+ */
8041
+ get formattedValue() {
8042
+ if (this.multiSelect) {
8043
+ if (!this.value) {
8044
+ return undefined;
8045
+ }
8046
+ if (this.value.startsWith("[")) {
8047
+ return JSON.parse(this.value);
8048
+ }
8049
+ return [this.value];
8050
+ }
8051
+ return this.value;
8052
+ }
8053
+
8137
8054
  /**
8138
8055
  * Returns classmap configuration for html5 input labels in all layouts.
8139
8056
  * @private
@@ -8552,14 +8469,6 @@ class AuroSelect extends AuroElement$4 {
8552
8469
  this.configureDropdown();
8553
8470
  this.configureMenu();
8554
8471
  this.configureSelect();
8555
-
8556
- // Set the initial value in auro-menu if defined
8557
- if (this.hasAttribute('value') && this.getAttribute('value').length > 0) {
8558
- this.value = this.multiSelect ? arrayConverter(this.getAttribute('value')) : this.getAttribute('value');
8559
- if (this.menu) {
8560
- this.menu.value = this.value;
8561
- }
8562
- }
8563
8472
  }
8564
8473
 
8565
8474
  /**
@@ -8571,19 +8480,18 @@ class AuroSelect extends AuroElement$4 {
8571
8480
  async updateMenuValue(value) {
8572
8481
  if (!this.menu) return;
8573
8482
 
8483
+ this.menu.setAttribute('value', value);
8574
8484
  this.menu.value = value;
8575
8485
  await this.menu.updateComplete;
8576
8486
  }
8577
8487
 
8578
8488
  async updated(changedProperties) {
8579
- if (changedProperties.has('multiSelect')) {
8489
+ if (changedProperties.has('multiSelect') && !changedProperties.has('value')) {
8580
8490
  this.clearSelection();
8581
8491
  }
8582
8492
 
8583
8493
  if (changedProperties.has('value')) {
8584
8494
  if (this.value) {
8585
- this.value = this.multiSelect ? arrayConverter(this.value) : this.value;
8586
-
8587
8495
  await this.updateMenuValue(this.value);
8588
8496
 
8589
8497
  if (this.menu) {
@@ -8609,7 +8517,7 @@ class AuroSelect extends AuroElement$4 {
8609
8517
  composed: true,
8610
8518
  detail: {
8611
8519
  optionSelected: this.optionSelected,
8612
- value: this.value
8520
+ value: this.formattedValue
8613
8521
  }
8614
8522
  }));
8615
8523
  }
@@ -8668,13 +8576,13 @@ class AuroSelect extends AuroElement$4 {
8668
8576
  const selectedValue = selectedOption.value;
8669
8577
 
8670
8578
  if (this.multiSelect) {
8671
- const currentArray = Array.isArray(this.value) ? this.value : [];
8579
+ const currentArray = this.formattedValue;
8672
8580
 
8673
8581
  if (!currentArray.includes(selectedValue)) {
8674
- this.value = [
8582
+ this.value = JSON.stringify([
8675
8583
  ...currentArray,
8676
8584
  selectedValue
8677
- ];
8585
+ ]);
8678
8586
  }
8679
8587
  } else {
8680
8588
  const currentValue = this.value;
@@ -8697,7 +8605,7 @@ class AuroSelect extends AuroElement$4 {
8697
8605
  }
8698
8606
 
8699
8607
  if (this.multiSelect) {
8700
- nativeSelect.value = this.value ? this.value[0] : '';
8608
+ nativeSelect.value = this.multiSelect ? this.multiSelect[0] : '';
8701
8609
  } else {
8702
8610
  nativeSelect.value = this.value || '';
8703
8611
  }
@@ -8828,7 +8736,6 @@ class AuroSelect extends AuroElement$4 {
8828
8736
  .offset="${this.offset}"
8829
8737
  .placement="${this.placement}"
8830
8738
  chevron
8831
- fluid
8832
8739
  for="selectMenu"
8833
8740
  layout="${this.layout}"
8834
8741
  part="dropdown"
@@ -8907,7 +8814,6 @@ class AuroSelect extends AuroElement$4 {
8907
8814
  .offset="${this.offset}"
8908
8815
  .placement="${this.placement}"
8909
8816
  chevron
8910
- fluid
8911
8817
  for="selectMenu"
8912
8818
  layout="${this.layout}"
8913
8819
  part="dropdown"
@@ -8987,7 +8893,6 @@ class AuroSelect extends AuroElement$4 {
8987
8893
  .offset="${this.offset}"
8988
8894
  .placement="${this.placement}"
8989
8895
  chevron
8990
- fluid
8991
8896
  for="selectMenu"
8992
8897
  layout="${this.layout}"
8993
8898
  part="dropdown"
@@ -9115,7 +9020,6 @@ function dispatchMenuEvent(element, eventName, detail = null) {
9115
9020
  * @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
9116
9021
  * @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
9117
9022
  * @attr {boolean} multiselect - When true, the selected option can be multiple options.
9118
- * @attr {String|Array<string>} value - Value selected for the menu, type `string` by default. In multi-select mode, `value` is an array of strings.
9119
9023
  * @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
9120
9024
  * @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
9121
9025
  * @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
@@ -9228,9 +9132,14 @@ class AuroMenu extends AuroElement$4 {
9228
9132
  reflect: true,
9229
9133
  attribute: 'multiselect'
9230
9134
  },
9135
+
9136
+ /**
9137
+ * Value selected for the component.
9138
+ */
9231
9139
  value: {
9232
- // Allow string, string[] arrays and undefined
9233
- type: Object
9140
+ type: String,
9141
+ reflect: true,
9142
+ attribute: 'value'
9234
9143
  },
9235
9144
 
9236
9145
  /**
@@ -9265,6 +9174,25 @@ class AuroMenu extends AuroElement$4 {
9265
9174
  AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroMenu);
9266
9175
  }
9267
9176
 
9177
+ /**
9178
+ * Formatted value based on `multiSelect` state.
9179
+ * Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
9180
+ * @private
9181
+ * @returns {String|Array<String>}
9182
+ */
9183
+ get formattedValue() {
9184
+ if (this.multiSelect) {
9185
+ if (!this.value) {
9186
+ return undefined;
9187
+ }
9188
+ if (this.value.startsWith("[")) {
9189
+ return JSON.parse(this.value);
9190
+ }
9191
+ return [this.value];
9192
+ }
9193
+ return this.value;
9194
+ }
9195
+
9268
9196
  // Lifecycle Methods
9269
9197
 
9270
9198
  connectedCallback() {
@@ -9307,7 +9235,7 @@ class AuroMenu extends AuroElement$4 {
9307
9235
  updated(changedProperties) {
9308
9236
  super.updated(changedProperties);
9309
9237
 
9310
- if (changedProperties.has('multiSelect')) {
9238
+ if (changedProperties.has('multiSelect') && !changedProperties.has("value")) {
9311
9239
  // Reset selection if multiSelect mode changes
9312
9240
  this.clearSelection();
9313
9241
  }
@@ -9321,7 +9249,7 @@ class AuroMenu extends AuroElement$4 {
9321
9249
  } else {
9322
9250
  if (this.multiSelect) {
9323
9251
  // In multiselect mode, this.value should be an array of strings
9324
- const valueArray = Array.isArray(this.value) ? this.value : [this.value];
9252
+ const valueArray = this.formattedValue;
9325
9253
  const matchingOptions = this.items.filter((item) => valueArray.includes(item.value));
9326
9254
 
9327
9255
  this.optionSelected = matchingOptions.length > 0 ? matchingOptions : undefined;
@@ -9488,14 +9416,14 @@ class AuroMenu extends AuroElement$4 {
9488
9416
  */
9489
9417
  handleSelectState(option) {
9490
9418
  if (this.multiSelect) {
9491
- const currentValue = this.value || [];
9419
+ const currentValue = this.formattedValue || [];
9492
9420
  const currentSelected = this.optionSelected || [];
9493
9421
 
9494
9422
  if (!currentValue.includes(option.value)) {
9495
- this.value = [
9423
+ this.value = JSON.stringify([
9496
9424
  ...currentValue,
9497
9425
  option.value
9498
- ];
9426
+ ]);
9499
9427
  }
9500
9428
  if (!currentSelected.includes(option)) {
9501
9429
  this.optionSelected = [
@@ -9518,13 +9446,15 @@ class AuroMenu extends AuroElement$4 {
9518
9446
  * @param {HTMLElement} option - The menuoption to be deselected.
9519
9447
  */
9520
9448
  handleDeselectState(option) {
9521
- if (this.multiSelect && Array.isArray(this.value)) {
9449
+ if (this.multiSelect) {
9522
9450
  // Remove this option from array
9523
- this.value = this.value.filter((val) => val !== option.value);
9451
+ const newFormattedValue = (this.formattedValue || []).filter((val) => val !== option.value);
9524
9452
 
9525
9453
  // If array is empty after removal, set back to undefined
9526
- if (this.value.length === 0) {
9454
+ if (newFormattedValue && newFormattedValue.length === 0) {
9527
9455
  this.value = undefined;
9456
+ } else {
9457
+ this.value = JSON.stringify(newFormattedValue);
9528
9458
  }
9529
9459
 
9530
9460
  this.optionSelected = this.optionSelected.filter((val) => val !== option);