@aurodesignsystem-dev/auro-formkit 0.0.0-pr1431.2 → 0.0.0-pr1433.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/checkbox/demo/api.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/api.min.js +235 -47
- package/components/combobox/demo/index.min.js +235 -47
- package/components/combobox/dist/auro-combobox.d.ts +4 -0
- package/components/combobox/dist/index.js +144 -24
- package/components/combobox/dist/registered.js +144 -24
- package/components/counter/demo/api.min.js +30 -2
- package/components/counter/demo/index.min.js +30 -2
- package/components/counter/dist/index.js +30 -2
- package/components/counter/dist/registered.js +30 -2
- package/components/datepicker/demo/api.min.js +33 -3
- package/components/datepicker/demo/index.min.js +33 -3
- package/components/datepicker/dist/index.js +33 -3
- package/components/datepicker/dist/registered.js +33 -3
- package/components/dropdown/demo/api.min.js +29 -1
- package/components/dropdown/demo/index.min.js +29 -1
- package/components/dropdown/dist/index.js +29 -1
- package/components/dropdown/dist/registered.js +29 -1
- package/components/form/demo/api.min.js +331 -57
- package/components/form/demo/index.min.js +331 -57
- package/components/input/demo/api.min.js +1 -1
- package/components/input/demo/index.min.js +1 -1
- package/components/input/dist/index.js +1 -1
- package/components/input/dist/registered.js +1 -1
- package/components/menu/demo/api.md +1 -1
- package/components/menu/demo/api.min.js +91 -23
- package/components/menu/demo/index.min.js +91 -23
- package/components/menu/dist/auro-menuoption.d.ts +2 -0
- package/components/menu/dist/index.js +91 -23
- package/components/menu/dist/registered.js +91 -23
- package/components/radio/demo/api.min.js +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/api.min.js +121 -25
- package/components/select/demo/index.min.js +121 -25
- package/components/select/dist/index.js +30 -2
- package/components/select/dist/registered.js +30 -2
- package/custom-elements.json +422 -411
- package/package.json +2 -2
|
@@ -3345,6 +3345,7 @@ class AuroFloatingUI {
|
|
|
3345
3345
|
this.focusHandler = null;
|
|
3346
3346
|
this.clickHandler = null;
|
|
3347
3347
|
this.keyDownHandler = null;
|
|
3348
|
+
this.touchHandler = null;
|
|
3348
3349
|
|
|
3349
3350
|
/**
|
|
3350
3351
|
* @private
|
|
@@ -3762,6 +3763,28 @@ class AuroFloatingUI {
|
|
|
3762
3763
|
setTimeout(() => {
|
|
3763
3764
|
window.addEventListener("click", this.clickHandler);
|
|
3764
3765
|
}, 0);
|
|
3766
|
+
|
|
3767
|
+
// iOS Safari does not fire `click` on non-interactive elements, so
|
|
3768
|
+
// tapping an inert backdrop never reaches the click handler above.
|
|
3769
|
+
// Mirror the same outside-tap logic with a passive touchstart listener.
|
|
3770
|
+
this.touchHandler = (evt) => {
|
|
3771
|
+
const element = this.element;
|
|
3772
|
+
if (!element?.bib) {
|
|
3773
|
+
return;
|
|
3774
|
+
}
|
|
3775
|
+
|
|
3776
|
+
// fullscreen (modal) dialog handles its own dismissal
|
|
3777
|
+
if (element.bib.hasAttribute("isfullscreen")) {
|
|
3778
|
+
return;
|
|
3779
|
+
}
|
|
3780
|
+
|
|
3781
|
+
const path = evt.composedPath();
|
|
3782
|
+
if (!path.includes(element.trigger) && !path.includes(element.bib)) {
|
|
3783
|
+
this.hideBib("click");
|
|
3784
|
+
}
|
|
3785
|
+
};
|
|
3786
|
+
|
|
3787
|
+
window.addEventListener("touchstart", this.touchHandler, { passive: true });
|
|
3765
3788
|
}
|
|
3766
3789
|
|
|
3767
3790
|
cleanupHideHandlers() {
|
|
@@ -3777,6 +3800,11 @@ class AuroFloatingUI {
|
|
|
3777
3800
|
this.clickHandler = null;
|
|
3778
3801
|
}
|
|
3779
3802
|
|
|
3803
|
+
if (this.touchHandler) {
|
|
3804
|
+
window.removeEventListener("touchstart", this.touchHandler);
|
|
3805
|
+
this.touchHandler = null;
|
|
3806
|
+
}
|
|
3807
|
+
|
|
3780
3808
|
if (this.keyDownHandler) {
|
|
3781
3809
|
document.removeEventListener("keydown", this.keyDownHandler);
|
|
3782
3810
|
this.keyDownHandler = null;
|
|
@@ -5251,7 +5279,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
|
|
|
5251
5279
|
}
|
|
5252
5280
|
};
|
|
5253
5281
|
|
|
5254
|
-
var formkitVersion$1 = '
|
|
5282
|
+
var formkitVersion$1 = '202604100244';
|
|
5255
5283
|
|
|
5256
5284
|
class AuroElement extends i$3 {
|
|
5257
5285
|
static get properties() {
|
|
@@ -7004,7 +7032,7 @@ class AuroHelpText extends i$3 {
|
|
|
7004
7032
|
}
|
|
7005
7033
|
}
|
|
7006
7034
|
|
|
7007
|
-
var formkitVersion = '
|
|
7035
|
+
var formkitVersion = '202604100244';
|
|
7008
7036
|
|
|
7009
7037
|
var styleCss$2 = i$6`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}[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);--ds-auro-dropdown-trigger-outline-color: var(--ds-auro-select-outline-color)}:host{display:inline-block;text-align:left;vertical-align:top}:host([layout*=emphasized]) [auro-dropdown],:host([layout*=snowflake]) [auro-dropdown]{--ds-auro-select-border-color: transparent}:host([layout*=emphasized]) .mainContent,:host([layout*=snowflake]) .mainContent{text-align:center}.mainContent{position:relative;display:flex;overflow:hidden;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-100, 0.5rem)}.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{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-200, 1rem)}:host([layout*=snowflake]) label{padding-block:var(--ds-size-25, 0.125rem)}:host([layout*=classic]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem)}:host([layout*=classic]) .mainContent{align-items:start}:host([layout*=classic]) label{overflow:hidden;cursor:text;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) .value{height:auto}label{color:var(--ds-auro-select-label-text-color)}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-select-outline-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],:host([appearance=inverse]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-select-outline-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([fluid]){width:100%}:host([disabled]){pointer-events:none;user-select:none}:host([disabled]:not([ondark])) [auro-dropdown],:host([disabled]:not([appearance=inverse])) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([layout*=classic])[disabled][ondark]) [auro-dropdown],:host(:not([layout*=classic])[disabled][appearance=inverse]) [auro-dropdown]{--ds-auro-select-border-color: transparent}`;
|
|
7010
7038
|
|
|
@@ -8685,6 +8713,7 @@ class AuroMenuOption extends AuroElement$1 {
|
|
|
8685
8713
|
this.selected = false;
|
|
8686
8714
|
this.noCheckmark = false;
|
|
8687
8715
|
this.disabled = false;
|
|
8716
|
+
this.noMatch = false;
|
|
8688
8717
|
|
|
8689
8718
|
/**
|
|
8690
8719
|
* @private
|
|
@@ -8765,7 +8794,8 @@ class AuroMenuOption extends AuroElement$1 {
|
|
|
8765
8794
|
*/
|
|
8766
8795
|
noMatch: {
|
|
8767
8796
|
type: Boolean,
|
|
8768
|
-
reflect: true
|
|
8797
|
+
reflect: true,
|
|
8798
|
+
attribute: 'nomatch'
|
|
8769
8799
|
},
|
|
8770
8800
|
|
|
8771
8801
|
/**
|
|
@@ -8865,7 +8895,7 @@ class AuroMenuOption extends AuroElement$1 {
|
|
|
8865
8895
|
this.setAttribute('aria-selected', this.selected.toString());
|
|
8866
8896
|
|
|
8867
8897
|
// Update menu service selection state if this isn't an internal update
|
|
8868
|
-
if (this.internalUpdateInProgress !== true) {
|
|
8898
|
+
if (this.internalUpdateInProgress !== true && this.menuService) {
|
|
8869
8899
|
this.menuService[this.selected ? 'selectOption' : 'deselectOption'](this);
|
|
8870
8900
|
}
|
|
8871
8901
|
}
|
|
@@ -8900,9 +8930,10 @@ class AuroMenuOption extends AuroElement$1 {
|
|
|
8900
8930
|
}
|
|
8901
8931
|
|
|
8902
8932
|
disconnectedCallback() {
|
|
8903
|
-
|
|
8904
|
-
|
|
8905
|
-
|
|
8933
|
+
const { menuService } = this;
|
|
8934
|
+
if (menuService) {
|
|
8935
|
+
menuService.unsubscribe(this.handleMenuChange);
|
|
8936
|
+
menuService.removeMenuOption(this);
|
|
8906
8937
|
}
|
|
8907
8938
|
}
|
|
8908
8939
|
|
|
@@ -9071,9 +9102,11 @@ class AuroMenuOption extends AuroElement$1 {
|
|
|
9071
9102
|
* @private
|
|
9072
9103
|
*/
|
|
9073
9104
|
handleMouseEnter() {
|
|
9074
|
-
|
|
9075
|
-
|
|
9105
|
+
const { menuService } = this;
|
|
9106
|
+
if (!menuService || this.disabled) {
|
|
9107
|
+
return;
|
|
9076
9108
|
}
|
|
9109
|
+
menuService.setHighlightedOption(this);
|
|
9077
9110
|
}
|
|
9078
9111
|
|
|
9079
9112
|
/**
|
|
@@ -9477,10 +9510,15 @@ class MenuService {
|
|
|
9477
9510
|
return;
|
|
9478
9511
|
}
|
|
9479
9512
|
|
|
9513
|
+
const before = this.selectedOptions || [];
|
|
9480
9514
|
const optionsSet = new Set(optionsToDeselect);
|
|
9481
|
-
|
|
9482
|
-
.filter(opt => !optionsSet.has(opt));
|
|
9515
|
+
const after = before.filter(opt => !optionsSet.has(opt));
|
|
9483
9516
|
|
|
9517
|
+
if (this.optionsArraysMatch(after, before)) {
|
|
9518
|
+
return;
|
|
9519
|
+
}
|
|
9520
|
+
|
|
9521
|
+
this.selectedOptions = after;
|
|
9484
9522
|
this.stageUpdate();
|
|
9485
9523
|
}
|
|
9486
9524
|
|
|
@@ -9576,6 +9614,16 @@ class MenuService {
|
|
|
9576
9614
|
return;
|
|
9577
9615
|
}
|
|
9578
9616
|
|
|
9617
|
+
const hostValue = this.host && this.host.value;
|
|
9618
|
+
const hostHasValue = hostValue !== undefined &&
|
|
9619
|
+
hostValue !== null &&
|
|
9620
|
+
(!Array.isArray(hostValue) || hostValue.length > 0) &&
|
|
9621
|
+
(typeof hostValue !== 'string' || hostValue.trim() !== '');
|
|
9622
|
+
|
|
9623
|
+
if (hostHasValue && this._pendingValue != null) {
|
|
9624
|
+
return;
|
|
9625
|
+
}
|
|
9626
|
+
|
|
9579
9627
|
this.clearPendingValue();
|
|
9580
9628
|
|
|
9581
9629
|
if (this.selectedOptions.length > 0) {
|
|
@@ -9756,6 +9804,9 @@ class MenuService {
|
|
|
9756
9804
|
this.notify({ type: 'optionsChange', options: this._menuOptions });
|
|
9757
9805
|
|
|
9758
9806
|
if (this._pendingValue != null) {
|
|
9807
|
+
// Reset the retry count so a new option registration gives a fresh
|
|
9808
|
+
// budget — the initial retries fired before delayed options arrived.
|
|
9809
|
+
this._pendingRetryCount = 0;
|
|
9759
9810
|
this.queuePendingValue(this._pendingValue);
|
|
9760
9811
|
}
|
|
9761
9812
|
}
|
|
@@ -10100,7 +10151,11 @@ class AuroMenu extends AuroElement$1 {
|
|
|
10100
10151
|
* @returns {string} - Returns the label of the currently selected option(s).
|
|
10101
10152
|
*/
|
|
10102
10153
|
get currentLabel() {
|
|
10103
|
-
|
|
10154
|
+
const { menuService } = this;
|
|
10155
|
+
if (!menuService) {
|
|
10156
|
+
return '';
|
|
10157
|
+
}
|
|
10158
|
+
return menuService.currentLabel;
|
|
10104
10159
|
};
|
|
10105
10160
|
|
|
10106
10161
|
/**
|
|
@@ -10123,7 +10178,12 @@ class AuroMenu extends AuroElement$1 {
|
|
|
10123
10178
|
* @param {number} value - Sets the index of the currently active option.
|
|
10124
10179
|
*/
|
|
10125
10180
|
set index(value) {
|
|
10126
|
-
this
|
|
10181
|
+
const { menuService } = this;
|
|
10182
|
+
if (!menuService) {
|
|
10183
|
+
return;
|
|
10184
|
+
}
|
|
10185
|
+
|
|
10186
|
+
menuService.setHighlightedIndex(value);
|
|
10127
10187
|
}
|
|
10128
10188
|
|
|
10129
10189
|
/**
|
|
@@ -10145,7 +10205,11 @@ class AuroMenu extends AuroElement$1 {
|
|
|
10145
10205
|
* @returns {String|Array<String>}
|
|
10146
10206
|
*/
|
|
10147
10207
|
get formattedValue() {
|
|
10148
|
-
|
|
10208
|
+
const { menuService } = this;
|
|
10209
|
+
if (!menuService) {
|
|
10210
|
+
return '';
|
|
10211
|
+
}
|
|
10212
|
+
return menuService.currentValue;
|
|
10149
10213
|
}
|
|
10150
10214
|
|
|
10151
10215
|
/**
|
|
@@ -10189,7 +10253,11 @@ class AuroMenu extends AuroElement$1 {
|
|
|
10189
10253
|
* @param {HTMLElement} option - The option to set as active.
|
|
10190
10254
|
*/
|
|
10191
10255
|
updateActiveOption(option) {
|
|
10192
|
-
this
|
|
10256
|
+
const { menuService } = this;
|
|
10257
|
+
if (!menuService) {
|
|
10258
|
+
return;
|
|
10259
|
+
}
|
|
10260
|
+
menuService.setHighlightedOption(option);
|
|
10193
10261
|
}
|
|
10194
10262
|
|
|
10195
10263
|
/**
|
|
@@ -10217,7 +10285,8 @@ class AuroMenu extends AuroElement$1 {
|
|
|
10217
10285
|
if (event.type === 'valueChange') {
|
|
10218
10286
|
|
|
10219
10287
|
// New option is array value or first option with fallback to undefined for empty array in all cases
|
|
10220
|
-
const
|
|
10288
|
+
const options = event.options || [];
|
|
10289
|
+
const newOption = this.multiSelect && options.length ? options : options[0] || undefined;
|
|
10221
10290
|
const newValue = event.stringValue;
|
|
10222
10291
|
|
|
10223
10292
|
// Check if the option or value has actually changed
|
|
@@ -10226,8 +10295,11 @@ class AuroMenu extends AuroElement$1 {
|
|
|
10226
10295
|
this.setInternalValue(newValue);
|
|
10227
10296
|
}
|
|
10228
10297
|
|
|
10229
|
-
// Notify components of selection change
|
|
10230
|
-
this.notifySelectionChange(
|
|
10298
|
+
// Notify components of selection change (pass normalized options to avoid undefined iterability errors)
|
|
10299
|
+
this.notifySelectionChange({
|
|
10300
|
+
...event,
|
|
10301
|
+
options
|
|
10302
|
+
});
|
|
10231
10303
|
}
|
|
10232
10304
|
|
|
10233
10305
|
if (event.type === 'highlightChange') {
|
|
@@ -10250,7 +10322,11 @@ class AuroMenu extends AuroElement$1 {
|
|
|
10250
10322
|
* @returns {Array<HTMLElement>}
|
|
10251
10323
|
*/
|
|
10252
10324
|
get selectedOptions() {
|
|
10253
|
-
|
|
10325
|
+
const { menuService } = this;
|
|
10326
|
+
if (!menuService) {
|
|
10327
|
+
return [];
|
|
10328
|
+
}
|
|
10329
|
+
return menuService.selectedOptions;
|
|
10254
10330
|
}
|
|
10255
10331
|
|
|
10256
10332
|
/**
|
|
@@ -10258,7 +10334,11 @@ class AuroMenu extends AuroElement$1 {
|
|
|
10258
10334
|
* @returns {HTMLElement|null}
|
|
10259
10335
|
*/
|
|
10260
10336
|
get selectedOption() {
|
|
10261
|
-
|
|
10337
|
+
const { menuService } = this;
|
|
10338
|
+
if (!menuService) {
|
|
10339
|
+
return null;
|
|
10340
|
+
}
|
|
10341
|
+
return menuService.selectedOptions[0] || null;
|
|
10262
10342
|
}
|
|
10263
10343
|
|
|
10264
10344
|
// Lifecycle Methods
|
|
@@ -10302,7 +10382,11 @@ class AuroMenu extends AuroElement$1 {
|
|
|
10302
10382
|
// keys are not yet resolved (framework mount-order race), selectByValue
|
|
10303
10383
|
// queues a bounded retry automatically via queuePendingValue.
|
|
10304
10384
|
if (changedProperties.has('value') && !this.internalUpdateInProgress) {
|
|
10305
|
-
|
|
10385
|
+
const { menuService } = this;
|
|
10386
|
+
if (!menuService) {
|
|
10387
|
+
return;
|
|
10388
|
+
}
|
|
10389
|
+
menuService.selectByValue(this.value);
|
|
10306
10390
|
}
|
|
10307
10391
|
|
|
10308
10392
|
// Handle loading state changes
|
|
@@ -10367,7 +10451,11 @@ class AuroMenu extends AuroElement$1 {
|
|
|
10367
10451
|
* @protected
|
|
10368
10452
|
*/
|
|
10369
10453
|
makeSelection() {
|
|
10370
|
-
this
|
|
10454
|
+
const { menuService } = this;
|
|
10455
|
+
if (!menuService) {
|
|
10456
|
+
return;
|
|
10457
|
+
}
|
|
10458
|
+
menuService.selectHighlightedOption();
|
|
10371
10459
|
}
|
|
10372
10460
|
|
|
10373
10461
|
/**
|
|
@@ -10386,7 +10474,11 @@ class AuroMenu extends AuroElement$1 {
|
|
|
10386
10474
|
* @public
|
|
10387
10475
|
*/
|
|
10388
10476
|
reset() {
|
|
10389
|
-
this
|
|
10477
|
+
const { menuService } = this;
|
|
10478
|
+
if (!menuService) {
|
|
10479
|
+
return;
|
|
10480
|
+
}
|
|
10481
|
+
menuService.reset();
|
|
10390
10482
|
|
|
10391
10483
|
// Dispatch reset event
|
|
10392
10484
|
dispatchMenuEvent(this, 'auroMenu-selectValueReset');
|
|
@@ -10421,10 +10513,14 @@ class AuroMenu extends AuroElement$1 {
|
|
|
10421
10513
|
* @protected
|
|
10422
10514
|
*/
|
|
10423
10515
|
navigateOptions(direction) {
|
|
10516
|
+
const { menuService } = this;
|
|
10517
|
+
if (!menuService) {
|
|
10518
|
+
return;
|
|
10519
|
+
}
|
|
10424
10520
|
if (direction === 'up') {
|
|
10425
|
-
|
|
10521
|
+
menuService.highlightPrevious();
|
|
10426
10522
|
} else if (direction === 'down') {
|
|
10427
|
-
|
|
10523
|
+
menuService.highlightNext();
|
|
10428
10524
|
}
|
|
10429
10525
|
}
|
|
10430
10526
|
|