@aurodesignsystem-dev/auro-formkit 0.0.0-pr757.2 → 0.0.0-pr776.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/bibtemplate/dist/index.js +1 -1
- package/components/bibtemplate/dist/registered.js +1 -1
- package/components/checkbox/demo/api.min.js +9 -9
- package/components/checkbox/demo/index.min.js +9 -9
- package/components/checkbox/dist/index.js +9 -9
- package/components/checkbox/dist/registered.js +9 -9
- package/components/combobox/demo/api.min.js +79 -96
- package/components/combobox/demo/index.min.js +79 -96
- package/components/combobox/dist/index.js +42 -84
- package/components/combobox/dist/registered.js +42 -84
- package/components/counter/demo/api.min.js +34 -76
- package/components/counter/demo/index.min.js +34 -76
- package/components/counter/dist/index.js +34 -76
- package/components/counter/dist/registered.js +34 -76
- package/components/datepicker/demo/api.min.js +63 -90
- package/components/datepicker/demo/index.min.js +63 -90
- package/components/datepicker/dist/auro-datepicker.d.ts +6 -0
- package/components/datepicker/dist/index.js +63 -90
- package/components/datepicker/dist/registered.js +63 -90
- package/components/dropdown/demo/api.md +60 -266
- package/components/dropdown/demo/api.min.js +25 -67
- package/components/dropdown/demo/index.md +45 -363
- package/components/dropdown/demo/index.min.js +25 -67
- package/components/dropdown/dist/auro-dropdown.d.ts +21 -71
- package/components/dropdown/dist/index.js +25 -67
- package/components/dropdown/dist/registered.js +25 -67
- package/components/helptext/dist/index.js +1 -1
- package/components/helptext/dist/registered.js +1 -1
- package/components/input/demo/api.min.js +10 -10
- package/components/input/demo/index.min.js +10 -10
- package/components/input/dist/index.js +10 -10
- package/components/input/dist/registered.js +10 -10
- package/components/menu/demo/api.md +1 -1
- package/components/menu/demo/api.min.js +37 -12
- package/components/menu/demo/index.min.js +37 -12
- package/components/menu/dist/auro-menu.d.ts +13 -2
- package/components/menu/dist/index.js +37 -12
- package/components/menu/dist/registered.js +37 -12
- package/components/radio/demo/api.min.js +10 -10
- package/components/radio/demo/index.min.js +10 -10
- package/components/radio/dist/auro-radio.d.ts +1 -1
- package/components/radio/dist/index.js +10 -10
- package/components/radio/dist/registered.js +10 -10
- package/components/select/demo/api.md +2 -2
- package/components/select/demo/api.min.js +100 -170
- package/components/select/demo/index.min.js +100 -170
- package/components/select/dist/auro-select.d.ts +13 -3
- package/components/select/dist/index.js +63 -158
- package/components/select/dist/registered.js +63 -158
- package/package.json +3 -2
|
@@ -649,19 +649,19 @@ class AuroFormValidation {
|
|
|
649
649
|
{
|
|
650
650
|
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
651
651
|
validity: 'tooShort',
|
|
652
|
-
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
652
|
+
message: e => e.getAttribute('setCustomValidityTooShort') || e.setCustomValidity || ''
|
|
653
653
|
},
|
|
654
654
|
{
|
|
655
655
|
check: (e) => e.value?.length > e.maxLength,
|
|
656
656
|
validity: 'tooLong',
|
|
657
|
-
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
657
|
+
message: e => e.getAttribute('setCustomValidityTooLong') || e.setCustomValidity || ''
|
|
658
658
|
}
|
|
659
659
|
],
|
|
660
660
|
pattern: [
|
|
661
661
|
{
|
|
662
662
|
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
663
663
|
validity: 'patternMismatch',
|
|
664
|
-
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
664
|
+
message: e => e.getAttribute('setCustomValidityPatternMismatch') || e.setCustomValidity || ''
|
|
665
665
|
}
|
|
666
666
|
]
|
|
667
667
|
},
|
|
@@ -856,10 +856,10 @@ class AuroFormValidation {
|
|
|
856
856
|
if (!hasValue && elem.required && elem.touched) {
|
|
857
857
|
elem.validity = 'valueMissing';
|
|
858
858
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
859
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
859
|
+
} else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
860
860
|
this.validateType(elem);
|
|
861
861
|
this.validateElementAttributes(elem);
|
|
862
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
862
|
+
} else if (hasValue && (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group'))) {
|
|
863
863
|
this.validateElementAttributes(elem);
|
|
864
864
|
}
|
|
865
865
|
}
|
|
@@ -4127,7 +4127,7 @@ var dropdownVersion$1 = '3.0.0';
|
|
|
4127
4127
|
|
|
4128
4128
|
var shapeSizeCss = css`.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}`;
|
|
4129
4129
|
|
|
4130
|
-
var colorCss$1$1 = css`: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)}`;
|
|
4130
|
+
var colorCss$1$1 = css`: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)}`;
|
|
4131
4131
|
|
|
4132
4132
|
var classicColorCss = css``;
|
|
4133
4133
|
|
|
@@ -4139,7 +4139,7 @@ var styleSnowflakeCss = css`:host{display:block}.wrapper{display:flex;flex:1;fle
|
|
|
4139
4139
|
|
|
4140
4140
|
var colorCss$5 = css`: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)}`;
|
|
4141
4141
|
|
|
4142
|
-
var styleCss$6 = css
|
|
4142
|
+
var styleCss$6 = css`: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}`;
|
|
4143
4143
|
|
|
4144
4144
|
var tokensCss$4 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
4145
4145
|
|
|
@@ -4444,10 +4444,8 @@ let AuroElement$2 = class AuroElement extends LitElement {
|
|
|
4444
4444
|
// See LICENSE in the project root for license information.
|
|
4445
4445
|
|
|
4446
4446
|
|
|
4447
|
-
|
|
4448
|
-
* @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
|
|
4447
|
+
/*
|
|
4449
4448
|
* @slot - Default slot for the popover content.
|
|
4450
|
-
* @slot label - Defines the content of the label.
|
|
4451
4449
|
* @slot helpText - Defines the content of the helpText.
|
|
4452
4450
|
* @slot trigger - Defines the content of the trigger.
|
|
4453
4451
|
* @csspart trigger - The trigger content container.
|
|
@@ -4466,18 +4464,22 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4466
4464
|
this.matchWidth = false;
|
|
4467
4465
|
this.noHideOnThisFocusLoss = false;
|
|
4468
4466
|
|
|
4469
|
-
this.errorMessage =
|
|
4467
|
+
this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
|
|
4470
4468
|
|
|
4471
4469
|
// Layout Config
|
|
4472
|
-
this.layout =
|
|
4473
|
-
this.shape =
|
|
4474
|
-
this.size =
|
|
4470
|
+
this.layout = undefined;
|
|
4471
|
+
this.shape = undefined;
|
|
4472
|
+
this.size = undefined;
|
|
4475
4473
|
|
|
4476
4474
|
this.parentBorder = false;
|
|
4477
4475
|
|
|
4478
4476
|
this.privateDefaults();
|
|
4479
4477
|
}
|
|
4480
4478
|
|
|
4479
|
+
/**
|
|
4480
|
+
* @private
|
|
4481
|
+
* @returns {object} Class definition for the wrapper element.
|
|
4482
|
+
*/
|
|
4481
4483
|
get commonWrapperClasses() {
|
|
4482
4484
|
return {
|
|
4483
4485
|
'trigger': true,
|
|
@@ -4497,12 +4499,8 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4497
4499
|
this.disabled = false;
|
|
4498
4500
|
this.disableFocusTrap = false;
|
|
4499
4501
|
this.error = false;
|
|
4500
|
-
this.inset = false;
|
|
4501
|
-
this.rounded = false;
|
|
4502
4502
|
this.tabIndex = 0;
|
|
4503
4503
|
this.noToggle = false;
|
|
4504
|
-
this.a11yAutocomplete = 'none';
|
|
4505
|
-
this.labeled = true;
|
|
4506
4504
|
this.a11yRole = 'button';
|
|
4507
4505
|
this.onDark = false;
|
|
4508
4506
|
this.showTriggerBorders = true;
|
|
@@ -4624,26 +4622,27 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4624
4622
|
},
|
|
4625
4623
|
|
|
4626
4624
|
/**
|
|
4627
|
-
* If declared,
|
|
4625
|
+
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
4626
|
+
* @default false
|
|
4628
4627
|
*/
|
|
4629
|
-
|
|
4628
|
+
disableEventShow: {
|
|
4630
4629
|
type: Boolean,
|
|
4631
4630
|
reflect: true
|
|
4632
4631
|
},
|
|
4633
4632
|
|
|
4634
4633
|
/**
|
|
4635
|
-
* If declared,
|
|
4636
|
-
* @attr {Boolean} chevron
|
|
4634
|
+
* If declared, applies a border around the trigger slot.
|
|
4637
4635
|
*/
|
|
4638
|
-
|
|
4636
|
+
simple: {
|
|
4639
4637
|
type: Boolean,
|
|
4640
4638
|
reflect: true
|
|
4641
4639
|
},
|
|
4642
4640
|
|
|
4643
4641
|
/**
|
|
4644
|
-
* If declared, the dropdown
|
|
4642
|
+
* If declared, the dropdown displays a chevron on the right.
|
|
4643
|
+
* @attr {Boolean} chevron
|
|
4645
4644
|
*/
|
|
4646
|
-
|
|
4645
|
+
chevron: {
|
|
4647
4646
|
type: Boolean,
|
|
4648
4647
|
reflect: true
|
|
4649
4648
|
},
|
|
@@ -4657,7 +4656,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4657
4656
|
},
|
|
4658
4657
|
|
|
4659
4658
|
/**
|
|
4660
|
-
* If
|
|
4659
|
+
* If declared, the focus trap inside of bib will be turned off.
|
|
4661
4660
|
*/
|
|
4662
4661
|
disableFocusTrap: {
|
|
4663
4662
|
type: Boolean,
|
|
@@ -4704,22 +4703,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4704
4703
|
reflect: true
|
|
4705
4704
|
},
|
|
4706
4705
|
|
|
4707
|
-
/**
|
|
4708
|
-
* Makes the trigger to be full width of its parent container.
|
|
4709
|
-
*/
|
|
4710
|
-
fluid: {
|
|
4711
|
-
type: Boolean,
|
|
4712
|
-
reflect: true
|
|
4713
|
-
},
|
|
4714
|
-
|
|
4715
|
-
/**
|
|
4716
|
-
* If declared, will apply padding around trigger slot content.
|
|
4717
|
-
*/
|
|
4718
|
-
inset: {
|
|
4719
|
-
type: Boolean,
|
|
4720
|
-
reflect: true
|
|
4721
|
-
},
|
|
4722
|
-
|
|
4723
4706
|
/**
|
|
4724
4707
|
* If true, the dropdown bib is displayed.
|
|
4725
4708
|
*/
|
|
@@ -4763,15 +4746,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4763
4746
|
reflect: true
|
|
4764
4747
|
},
|
|
4765
4748
|
|
|
4766
|
-
/**
|
|
4767
|
-
* Defines if there is a label preset.
|
|
4768
|
-
* @private
|
|
4769
|
-
*/
|
|
4770
|
-
labeled: {
|
|
4771
|
-
type: Boolean,
|
|
4772
|
-
reflect: true
|
|
4773
|
-
},
|
|
4774
|
-
|
|
4775
4749
|
/**
|
|
4776
4750
|
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
4777
4751
|
* @private
|
|
@@ -4832,6 +4806,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4832
4806
|
reflect: true
|
|
4833
4807
|
},
|
|
4834
4808
|
|
|
4809
|
+
/**
|
|
4810
|
+
* If declared, and a function is set, that function will execute when the slot content is updated.
|
|
4811
|
+
*/
|
|
4835
4812
|
onSlotChange: {
|
|
4836
4813
|
type: Function,
|
|
4837
4814
|
reflect: false
|
|
@@ -4846,14 +4823,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4846
4823
|
reflect: true
|
|
4847
4824
|
},
|
|
4848
4825
|
|
|
4849
|
-
/**
|
|
4850
|
-
* If declared, will apply border-radius to trigger and default slots.
|
|
4851
|
-
*/
|
|
4852
|
-
rounded: {
|
|
4853
|
-
type: Boolean,
|
|
4854
|
-
reflect: true
|
|
4855
|
-
},
|
|
4856
|
-
|
|
4857
4826
|
/**
|
|
4858
4827
|
* @private
|
|
4859
4828
|
*/
|
|
@@ -4868,22 +4837,14 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4868
4837
|
type: String || undefined,
|
|
4869
4838
|
attribute: false,
|
|
4870
4839
|
reflect: false
|
|
4871
|
-
},
|
|
4872
|
-
|
|
4873
|
-
/**
|
|
4874
|
-
* The value for the aria-autocomplete attribute of the trigger element.
|
|
4875
|
-
*/
|
|
4876
|
-
a11yAutocomplete: {
|
|
4877
|
-
type: String,
|
|
4878
|
-
attribute: false,
|
|
4879
4840
|
}
|
|
4880
4841
|
};
|
|
4881
4842
|
}
|
|
4882
4843
|
|
|
4883
4844
|
static get styles() {
|
|
4884
4845
|
return [
|
|
4885
|
-
colorCss$1$1,
|
|
4886
4846
|
tokensCss$1$1,
|
|
4847
|
+
colorCss$1$1,
|
|
4887
4848
|
|
|
4888
4849
|
// default layout
|
|
4889
4850
|
classicColorCss,
|
|
@@ -5323,10 +5284,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5323
5284
|
id="bib"
|
|
5324
5285
|
shape="${this.shape}"
|
|
5325
5286
|
?data-show="${this.isPopoverVisible}"
|
|
5326
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5327
|
-
?common="${this.common}"
|
|
5328
|
-
?rounded="${this.common || this.rounded}"
|
|
5329
|
-
?inset="${this.common || this.inset}">
|
|
5287
|
+
?isfullscreen="${this.isBibFullscreen}">
|
|
5330
5288
|
<div class="slotContent">
|
|
5331
5289
|
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5332
5290
|
</div>
|
|
@@ -7307,7 +7265,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
7307
7265
|
<div id="bibTemplate" part="bibtemplate">
|
|
7308
7266
|
${this.isFullscreen ? html`
|
|
7309
7267
|
<div id="headerContainer">
|
|
7310
|
-
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
7268
|
+
<${this.buttonTag} id="closeButton" aria-label="Close" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
7311
7269
|
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
7312
7270
|
</${this.buttonTag}>
|
|
7313
7271
|
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
@@ -7335,7 +7293,7 @@ var bibTemplateVersion = '1.0.0';
|
|
|
7335
7293
|
|
|
7336
7294
|
var colorCss = css`: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)}`;
|
|
7337
7295
|
|
|
7338
|
-
var styleCss$1 = css
|
|
7296
|
+
var styleCss$1 = css`: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}`;
|
|
7339
7297
|
|
|
7340
7298
|
var tokensCss = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
7341
7299
|
|
|
@@ -7541,68 +7499,7 @@ class AuroHelpText extends LitElement {
|
|
|
7541
7499
|
|
|
7542
7500
|
var helpTextVersion = '1.0.0';
|
|
7543
7501
|
|
|
7544
|
-
css
|
|
7545
|
-
|
|
7546
|
-
css`: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)}`;
|
|
7547
|
-
|
|
7548
|
-
css`: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)}`;
|
|
7549
|
-
|
|
7550
|
-
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7551
|
-
// See LICENSE in the project root for license information.
|
|
7552
|
-
|
|
7553
|
-
// ---------------------------------------------------------------------
|
|
7554
|
-
|
|
7555
|
-
/**
|
|
7556
|
-
* Converts value to an array.
|
|
7557
|
-
* If the value is a JSON string representing an array, it will be parsed.
|
|
7558
|
-
* If the value is already an array, it is returned.
|
|
7559
|
-
* If the value is undefined, it returns undefined.
|
|
7560
|
-
* @private
|
|
7561
|
-
* @param {any} value - The value to be converted. Can be a string, array, or undefined.
|
|
7562
|
-
* @returns {Array|undefined} - The converted array or undefined.
|
|
7563
|
-
* @throws {Error} - Throws an error if the value is not an array, undefined,
|
|
7564
|
-
* or if the value cannot be parsed into an array from a JSON string.
|
|
7565
|
-
*/
|
|
7566
|
-
function arrayConverter(value) {
|
|
7567
|
-
// Allow undefined
|
|
7568
|
-
if (value === undefined) {
|
|
7569
|
-
return undefined;
|
|
7570
|
-
}
|
|
7571
|
-
|
|
7572
|
-
// Return the value if it is already an array
|
|
7573
|
-
if (Array.isArray(value)) {
|
|
7574
|
-
return value;
|
|
7575
|
-
}
|
|
7576
|
-
|
|
7577
|
-
try {
|
|
7578
|
-
// If value is a JSON string, parse it
|
|
7579
|
-
const parsed = typeof value === 'string' ? JSON.parse(value) : value;
|
|
7580
|
-
|
|
7581
|
-
// Check if the parsed value is an array
|
|
7582
|
-
if (Array.isArray(parsed)) {
|
|
7583
|
-
return parsed;
|
|
7584
|
-
}
|
|
7585
|
-
} catch (error) {
|
|
7586
|
-
// If JSON parsing fails, continue to throw an error below
|
|
7587
|
-
/* eslint-disable no-console */
|
|
7588
|
-
console.error('JSON parsing failed:', error);
|
|
7589
|
-
}
|
|
7590
|
-
|
|
7591
|
-
// Throw error if the input is not an array or undefined
|
|
7592
|
-
throw new Error('Invalid value: Input must be an array or undefined');
|
|
7593
|
-
}
|
|
7594
|
-
|
|
7595
|
-
css`: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}`;
|
|
7596
|
-
|
|
7597
|
-
css`: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)}`;
|
|
7598
|
-
|
|
7599
|
-
css`: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}`;
|
|
7600
|
-
|
|
7601
|
-
css`: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)}`;
|
|
7602
|
-
|
|
7603
|
-
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)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
7604
|
-
|
|
7605
|
-
var styleCss = css`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}[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}`;
|
|
7502
|
+
var styleCss = css`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}[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:var(--ds-size-50, 0.25rem)}.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 var(--ds-size-50, 0.25rem) 0 var(--ds-size-150, 0.75rem)}: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 var(--ds-size-50, 0.25rem)}: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}`;
|
|
7606
7503
|
|
|
7607
7504
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7608
7505
|
// See LICENSE in the project root for license information.
|
|
@@ -7940,11 +7837,12 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7940
7837
|
},
|
|
7941
7838
|
|
|
7942
7839
|
/**
|
|
7943
|
-
* Value selected for the component.
|
|
7944
|
-
* @type {String|Array<String>}
|
|
7840
|
+
* Value selected for the component.
|
|
7945
7841
|
*/
|
|
7946
7842
|
value: {
|
|
7947
|
-
type:
|
|
7843
|
+
type: String,
|
|
7844
|
+
reflect: true,
|
|
7845
|
+
attribute: 'value'
|
|
7948
7846
|
},
|
|
7949
7847
|
|
|
7950
7848
|
/**
|
|
@@ -7996,6 +7894,25 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7996
7894
|
];
|
|
7997
7895
|
}
|
|
7998
7896
|
|
|
7897
|
+
/**
|
|
7898
|
+
* Formatted value based on `multiSelect` state.
|
|
7899
|
+
* Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
|
|
7900
|
+
* @private
|
|
7901
|
+
* @returns {String|Array<String>}
|
|
7902
|
+
*/
|
|
7903
|
+
get formattedValue() {
|
|
7904
|
+
if (this.multiSelect) {
|
|
7905
|
+
if (!this.value) {
|
|
7906
|
+
return undefined;
|
|
7907
|
+
}
|
|
7908
|
+
if (this.value.startsWith("[")) {
|
|
7909
|
+
return JSON.parse(this.value);
|
|
7910
|
+
}
|
|
7911
|
+
return [this.value];
|
|
7912
|
+
}
|
|
7913
|
+
return this.value;
|
|
7914
|
+
}
|
|
7915
|
+
|
|
7999
7916
|
/**
|
|
8000
7917
|
* Returns classmap configuration for html5 input labels in all layouts.
|
|
8001
7918
|
* @private
|
|
@@ -8414,14 +8331,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8414
8331
|
this.configureDropdown();
|
|
8415
8332
|
this.configureMenu();
|
|
8416
8333
|
this.configureSelect();
|
|
8417
|
-
|
|
8418
|
-
// Set the initial value in auro-menu if defined
|
|
8419
|
-
if (this.hasAttribute('value') && this.getAttribute('value').length > 0) {
|
|
8420
|
-
this.value = this.multiSelect ? arrayConverter(this.getAttribute('value')) : this.getAttribute('value');
|
|
8421
|
-
if (this.menu) {
|
|
8422
|
-
this.menu.value = this.value;
|
|
8423
|
-
}
|
|
8424
|
-
}
|
|
8425
8334
|
}
|
|
8426
8335
|
|
|
8427
8336
|
/**
|
|
@@ -8433,19 +8342,18 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8433
8342
|
async updateMenuValue(value) {
|
|
8434
8343
|
if (!this.menu) return;
|
|
8435
8344
|
|
|
8345
|
+
this.menu.setAttribute('value', value);
|
|
8436
8346
|
this.menu.value = value;
|
|
8437
8347
|
await this.menu.updateComplete;
|
|
8438
8348
|
}
|
|
8439
8349
|
|
|
8440
8350
|
async updated(changedProperties) {
|
|
8441
|
-
if (changedProperties.has('multiSelect')) {
|
|
8351
|
+
if (changedProperties.has('multiSelect') && !changedProperties.has('value')) {
|
|
8442
8352
|
this.clearSelection();
|
|
8443
8353
|
}
|
|
8444
8354
|
|
|
8445
8355
|
if (changedProperties.has('value')) {
|
|
8446
8356
|
if (this.value) {
|
|
8447
|
-
this.value = this.multiSelect ? arrayConverter(this.value) : this.value;
|
|
8448
|
-
|
|
8449
8357
|
await this.updateMenuValue(this.value);
|
|
8450
8358
|
|
|
8451
8359
|
if (this.menu) {
|
|
@@ -8471,7 +8379,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8471
8379
|
composed: true,
|
|
8472
8380
|
detail: {
|
|
8473
8381
|
optionSelected: this.optionSelected,
|
|
8474
|
-
value: this.
|
|
8382
|
+
value: this.formattedValue
|
|
8475
8383
|
}
|
|
8476
8384
|
}));
|
|
8477
8385
|
}
|
|
@@ -8530,13 +8438,13 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8530
8438
|
const selectedValue = selectedOption.value;
|
|
8531
8439
|
|
|
8532
8440
|
if (this.multiSelect) {
|
|
8533
|
-
const currentArray =
|
|
8441
|
+
const currentArray = this.formattedValue;
|
|
8534
8442
|
|
|
8535
8443
|
if (!currentArray.includes(selectedValue)) {
|
|
8536
|
-
this.value = [
|
|
8444
|
+
this.value = JSON.stringify([
|
|
8537
8445
|
...currentArray,
|
|
8538
8446
|
selectedValue
|
|
8539
|
-
];
|
|
8447
|
+
]);
|
|
8540
8448
|
}
|
|
8541
8449
|
} else {
|
|
8542
8450
|
const currentValue = this.value;
|
|
@@ -8559,7 +8467,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8559
8467
|
}
|
|
8560
8468
|
|
|
8561
8469
|
if (this.multiSelect) {
|
|
8562
|
-
nativeSelect.value = this.
|
|
8470
|
+
nativeSelect.value = this.multiSelect ? this.multiSelect[0] : '';
|
|
8563
8471
|
} else {
|
|
8564
8472
|
nativeSelect.value = this.value || '';
|
|
8565
8473
|
}
|
|
@@ -8690,7 +8598,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8690
8598
|
.offset="${this.offset}"
|
|
8691
8599
|
.placement="${this.placement}"
|
|
8692
8600
|
chevron
|
|
8693
|
-
fluid
|
|
8694
8601
|
for="selectMenu"
|
|
8695
8602
|
layout="${this.layout}"
|
|
8696
8603
|
part="dropdown"
|
|
@@ -8769,7 +8676,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8769
8676
|
.offset="${this.offset}"
|
|
8770
8677
|
.placement="${this.placement}"
|
|
8771
8678
|
chevron
|
|
8772
|
-
fluid
|
|
8773
8679
|
for="selectMenu"
|
|
8774
8680
|
layout="${this.layout}"
|
|
8775
8681
|
part="dropdown"
|
|
@@ -8849,7 +8755,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8849
8755
|
.offset="${this.offset}"
|
|
8850
8756
|
.placement="${this.placement}"
|
|
8851
8757
|
chevron
|
|
8852
|
-
fluid
|
|
8853
8758
|
for="selectMenu"
|
|
8854
8759
|
layout="${this.layout}"
|
|
8855
8760
|
part="dropdown"
|