@aurodesignsystem-dev/auro-formkit 0.0.0-pr783.0 → 0.0.0-pr783.2
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 +16 -5
- package/components/checkbox/demo/index.min.js +16 -5
- package/components/checkbox/dist/index.js +16 -5
- package/components/checkbox/dist/registered.js +16 -5
- package/components/combobox/demo/api.md +1 -0
- package/components/combobox/demo/api.min.js +95 -53
- package/components/combobox/demo/index.min.js +95 -53
- package/components/combobox/dist/auro-combobox.d.ts +5 -0
- package/components/combobox/dist/index.js +94 -52
- package/components/combobox/dist/registered.js +94 -52
- package/components/counter/demo/api.min.js +59 -31
- package/components/counter/demo/index.min.js +59 -31
- package/components/counter/dist/index.js +54 -26
- package/components/counter/dist/registered.js +54 -26
- package/components/datepicker/demo/api.md +1 -1
- package/components/datepicker/demo/api.min.js +152 -53
- package/components/datepicker/demo/index.min.js +152 -53
- package/components/datepicker/dist/auro-datepicker.d.ts +24 -1
- package/components/datepicker/dist/index.js +152 -53
- package/components/datepicker/dist/registered.js +152 -53
- package/components/dropdown/demo/api.min.js +33 -16
- package/components/dropdown/demo/index.min.js +33 -16
- package/components/dropdown/dist/auro-dropdown.d.ts +6 -0
- package/components/dropdown/dist/index.js +33 -16
- package/components/dropdown/dist/registered.js +33 -16
- package/components/input/demo/api.md +2 -1
- package/components/input/demo/api.min.js +34 -27
- package/components/input/demo/index.min.js +34 -27
- package/components/input/dist/auro-input.d.ts +0 -6
- package/components/input/dist/base-input.d.ts +5 -1
- package/components/input/dist/index.js +34 -27
- package/components/input/dist/registered.js +34 -27
- package/components/menu/demo/api.min.js +1 -1
- package/components/menu/demo/index.min.js +1 -1
- package/components/menu/dist/index.js +1 -1
- package/components/menu/dist/registered.js +1 -1
- package/components/radio/demo/api.min.js +16 -5
- package/components/radio/demo/index.min.js +16 -5
- package/components/radio/dist/index.js +16 -5
- package/components/radio/dist/registered.js +16 -5
- package/components/select/demo/api.min.js +51 -23
- package/components/select/demo/index.html +1 -0
- package/components/select/demo/index.min.js +51 -23
- package/components/select/dist/index.js +50 -22
- package/components/select/dist/registered.js +50 -22
- package/package.json +2 -2
|
@@ -31,6 +31,12 @@ const t$1=globalThis,i$3=t$1.trustedTypes,s$2=i$3?i$3.createPolicy("lit-html",{c
|
|
|
31
31
|
*/
|
|
32
32
|
const a=Symbol.for(""),o$1=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litStatic$:t,r:a}),i$1=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[a+1]),t[0]),r:a}),l=new Map,n=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o$1(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");void 0===(r=l.get(t))&&(n.raw=n,l.set(t,r=n)),e=u;}return t(r,...e)},u=n(x);
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* @license
|
|
36
|
+
* Copyright 2018 Google LLC
|
|
37
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
|
+
*/const o=o=>o??E;
|
|
39
|
+
|
|
34
40
|
var tokens = i$5`:host(:not([ondark])){--ds-auro-counter-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-counter-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-counter-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-counter-placeholder-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-counter-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-counter-error-icon-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-counter-outline-color: transparent;--ds-auro-counter-control-background-color: var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-counter-control-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-counter-description-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-counter-icon-color: var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-counter-quantity-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-counter-divider-color: var(--ds-basic-color-border-divider, rgba(0, 0, 0, 0.15))}:host([ondark]){--ds-auro-counter-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-counter-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-counter-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-counter-placeholder-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-counter-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-counter-error-icon-color: var(--ds-basic-color-status-error-subtle, #fbc6c6);--ds-auro-counter-outline-color: transparent;--ds-auro-counter-control-background-color: var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-counter-control-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-counter-description-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-counter-icon-color: var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-counter-quantity-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-counter-divider-color: var(--ds-basic-color-border-divider-inverse, rgba(255, 255, 255, 0.4))}`;
|
|
35
41
|
|
|
36
42
|
var styleButtonColorCss = i$5`.auro-button{border-color:unset;background-color:var(--ds-auro-counter-control-background-color);-webkit-tap-highlight-color:var(--ds-auro-button-tap-color)}@media(hover: hover){.auro-button:active:not(:disabled),.auro-button:hover:not(:disabled){--ds-auro-counter-control-background-color: var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1))}}:host([onDark]) .auro-button{--ds-auro-counter-control-background-color: var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05))}@media(hover: hover){:host([onDark]) .auro-button:active:not(:disabled),:host([onDark]) .auro-button:hover:not(:disabled){--ds-auro-counter-control-background-color: var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1))}}`;
|
|
@@ -515,12 +521,6 @@ const t={ATTRIBUTE:1},e$1=t=>(...e)=>({_$litDirective$:t,values:e});class i{cons
|
|
|
515
521
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
516
522
|
*/const e=e$1(class extends i{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"class"!==t$1.name||t$1.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return T}});
|
|
517
523
|
|
|
518
|
-
/**
|
|
519
|
-
* @license
|
|
520
|
-
* Copyright 2018 Google LLC
|
|
521
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
522
|
-
*/const o=o=>o??E;
|
|
523
|
-
|
|
524
524
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
525
525
|
// See LICENSE in the project root for license information.
|
|
526
526
|
|
|
@@ -2281,13 +2281,24 @@ class AuroFormValidation {
|
|
|
2281
2281
|
this.getInputElements(elem);
|
|
2282
2282
|
this.getAuroInputs(elem);
|
|
2283
2283
|
|
|
2284
|
-
//
|
|
2284
|
+
// Check if validation should run
|
|
2285
2285
|
let validationShouldRun =
|
|
2286
|
+
|
|
2287
|
+
// If the validation was forced
|
|
2286
2288
|
force ||
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2289
|
+
|
|
2290
|
+
// If the validation should run on input
|
|
2291
|
+
elem.validateOnInput ||
|
|
2292
|
+
|
|
2293
|
+
// State-based checks
|
|
2294
|
+
(
|
|
2295
|
+
// Element is not currently focused
|
|
2296
|
+
!elem.contains(document.activeElement) && // native input is not focused directly
|
|
2297
|
+
!document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
|
|
2298
|
+
|
|
2299
|
+
// And element has been touched or is untouched but has a value
|
|
2300
|
+
( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
|
|
2301
|
+
);
|
|
2291
2302
|
|
|
2292
2303
|
if (elem.hasAttribute('error')) {
|
|
2293
2304
|
elem.validity = 'customError';
|
|
@@ -3018,13 +3029,13 @@ class AuroCounter extends i$2 {
|
|
|
3018
3029
|
part="counterControl"
|
|
3019
3030
|
aria-labelledby="counter-label"
|
|
3020
3031
|
aria-describedby="counter-description"
|
|
3021
|
-
|
|
3022
|
-
role="spinbutton"
|
|
3023
|
-
aria-disabled="${this.disabled ? 'true' : 'false'}"
|
|
3032
|
+
aria-disabled="${o(this.disabled ? 'true' : undefined)}"
|
|
3024
3033
|
aria-valuemin="${this.min}"
|
|
3025
3034
|
aria-valuemax="${this.max}"
|
|
3026
3035
|
aria-valuenow="${this.value}"
|
|
3027
3036
|
aria-valuetext="${this.value !== undefined ? this.value : this.min}"
|
|
3037
|
+
role="spinbutton"
|
|
3038
|
+
tabindex="${this.disabled ? '-1' : '0'}"
|
|
3028
3039
|
>
|
|
3029
3040
|
<auro-counter-button
|
|
3030
3041
|
aria-hidden="true"
|
|
@@ -3059,7 +3070,7 @@ class AuroCounter extends i$2 {
|
|
|
3059
3070
|
}
|
|
3060
3071
|
}
|
|
3061
3072
|
|
|
3062
|
-
var counterGroupStyles = i$5`:host(:not([layout=classic])) .triggerContent{padding:0 var(--ds-size-
|
|
3073
|
+
var counterGroupStyles = i$5`:host(:not([layout=classic])) .triggerContent{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-300, 1.5rem)}:host([layout=snowflake]) [auro-dropdown] .mainContent{align-items:center}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}.mainContent{display:flex;overflow:hidden;width:100%;flex-direction:column;align-items:flex-start;justify-content:center}label{font-size:var(--ds-text-body-size-default, 1rem);line-height:20px}label.filled{font-size:var(--ds-text-body-size-xs, 0.75rem)}.accents ::slotted([slot=typeIcon]){margin-right:8px}.accents ::slotted(*):not(.util_displayHidden){display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px}slot[name=valueText]{font-size:var(--ds-text-body-size-default, 1rem);overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.counters{display:flex;flex-direction:column;gap:var(--ds-size-300, 1.5rem)}.counters ::slotted(auro-counter:not(:first-of-type)){padding-top:var(--ds-size-300, 1.5rem);border-top-width:1px;border-top-style:solid}[auro-helptext] [part=helpText]{display:flex;flex-direction:column}[auro-helptext] [part=helpText]>p{margin-block:0}`;
|
|
3063
3074
|
|
|
3064
3075
|
var shapeSizeCss$1 = 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}`;
|
|
3065
3076
|
|
|
@@ -4749,7 +4760,7 @@ class AuroFloatingUI {
|
|
|
4749
4760
|
*/
|
|
4750
4761
|
mirrorSize() {
|
|
4751
4762
|
// mirror the boxsize from bibSizer
|
|
4752
|
-
if (this.element.bibSizer) {
|
|
4763
|
+
if (this.element.bibSizer && this.element.matchWidth) {
|
|
4753
4764
|
const sizerStyle = window.getComputedStyle(this.element.bibSizer);
|
|
4754
4765
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
4755
4766
|
if (sizerStyle.width !== '0px') {
|
|
@@ -4961,13 +4972,13 @@ class AuroFloatingUI {
|
|
|
4961
4972
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
4962
4973
|
return;
|
|
4963
4974
|
}
|
|
4964
|
-
|
|
4975
|
+
|
|
4965
4976
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
4966
4977
|
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
4967
4978
|
return;
|
|
4968
4979
|
}
|
|
4969
4980
|
|
|
4970
|
-
this.hideBib();
|
|
4981
|
+
this.hideBib("keydown");
|
|
4971
4982
|
}
|
|
4972
4983
|
|
|
4973
4984
|
setupHideHandlers() {
|
|
@@ -4992,7 +5003,7 @@ class AuroFloatingUI {
|
|
|
4992
5003
|
document.expandedAuroFormkitDropdown = null;
|
|
4993
5004
|
document.expandedAuroFloater = this;
|
|
4994
5005
|
} else {
|
|
4995
|
-
this.hideBib();
|
|
5006
|
+
this.hideBib("click");
|
|
4996
5007
|
}
|
|
4997
5008
|
}
|
|
4998
5009
|
};
|
|
@@ -5005,7 +5016,7 @@ class AuroFloatingUI {
|
|
|
5005
5016
|
// if something else is open, let it handle itself
|
|
5006
5017
|
return;
|
|
5007
5018
|
}
|
|
5008
|
-
this.hideBib();
|
|
5019
|
+
this.hideBib("keydown");
|
|
5009
5020
|
}
|
|
5010
5021
|
};
|
|
5011
5022
|
|
|
@@ -5088,7 +5099,11 @@ class AuroFloatingUI {
|
|
|
5088
5099
|
}
|
|
5089
5100
|
}
|
|
5090
5101
|
|
|
5091
|
-
|
|
5102
|
+
/**
|
|
5103
|
+
* Hides the floating UI element.
|
|
5104
|
+
* @param {String} eventType - The event type that triggered the hiding action.
|
|
5105
|
+
*/
|
|
5106
|
+
hideBib(eventType = "unknown") {
|
|
5092
5107
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
5093
5108
|
this.lockScroll(false);
|
|
5094
5109
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -5099,7 +5114,7 @@ class AuroFloatingUI {
|
|
|
5099
5114
|
if (this.showing) {
|
|
5100
5115
|
this.cleanupHideHandlers();
|
|
5101
5116
|
this.showing = false;
|
|
5102
|
-
this.dispatchEventDropdownToggle();
|
|
5117
|
+
this.dispatchEventDropdownToggle(eventType);
|
|
5103
5118
|
}
|
|
5104
5119
|
}
|
|
5105
5120
|
document.expandedAuroFloater = null;
|
|
@@ -5108,11 +5123,13 @@ class AuroFloatingUI {
|
|
|
5108
5123
|
/**
|
|
5109
5124
|
* @private
|
|
5110
5125
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
5126
|
+
* @param {String} eventType - The event type that triggered the toggle action.
|
|
5111
5127
|
*/
|
|
5112
|
-
dispatchEventDropdownToggle() {
|
|
5128
|
+
dispatchEventDropdownToggle(eventType) {
|
|
5113
5129
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
5114
5130
|
detail: {
|
|
5115
5131
|
expanded: this.showing,
|
|
5132
|
+
eventType: eventType || "unknown",
|
|
5116
5133
|
},
|
|
5117
5134
|
composed: true
|
|
5118
5135
|
});
|
|
@@ -5122,7 +5139,7 @@ class AuroFloatingUI {
|
|
|
5122
5139
|
|
|
5123
5140
|
handleClick() {
|
|
5124
5141
|
if (this.element.isPopoverVisible) {
|
|
5125
|
-
this.hideBib();
|
|
5142
|
+
this.hideBib("click");
|
|
5126
5143
|
} else {
|
|
5127
5144
|
this.showBib();
|
|
5128
5145
|
}
|
|
@@ -5149,7 +5166,7 @@ class AuroFloatingUI {
|
|
|
5149
5166
|
|
|
5150
5167
|
event.preventDefault();
|
|
5151
5168
|
this.handleClick();
|
|
5152
|
-
}
|
|
5169
|
+
}
|
|
5153
5170
|
break;
|
|
5154
5171
|
case 'mouseenter':
|
|
5155
5172
|
if (this.element.hoverToggle) {
|
|
@@ -5158,7 +5175,7 @@ class AuroFloatingUI {
|
|
|
5158
5175
|
break;
|
|
5159
5176
|
case 'mouseleave':
|
|
5160
5177
|
if (this.element.hoverToggle) {
|
|
5161
|
-
this.hideBib();
|
|
5178
|
+
this.hideBib("mouseleave");
|
|
5162
5179
|
}
|
|
5163
5180
|
break;
|
|
5164
5181
|
case 'focus':
|
|
@@ -6546,6 +6563,9 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6546
6563
|
|
|
6547
6564
|
this.parentBorder = false;
|
|
6548
6565
|
|
|
6566
|
+
/** @private */
|
|
6567
|
+
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
6568
|
+
|
|
6549
6569
|
this.privateDefaults();
|
|
6550
6570
|
}
|
|
6551
6571
|
|
|
@@ -6979,12 +6999,19 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6979
6999
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
6980
7000
|
this.handleTriggerContentSlotChange();
|
|
6981
7001
|
}
|
|
7002
|
+
}
|
|
6982
7003
|
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
7004
|
+
/**
|
|
7005
|
+
* Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
|
|
7006
|
+
* @private
|
|
7007
|
+
* @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
|
|
7008
|
+
*/
|
|
7009
|
+
handleDropdownToggle(event) {
|
|
7010
|
+
this.updateFocusTrap();
|
|
7011
|
+
this.isPopoverVisible = event.detail.expanded;
|
|
7012
|
+
const eventType = event.detail.eventType || "unknown";
|
|
7013
|
+
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
7014
|
+
this.trigger.focus();
|
|
6988
7015
|
}
|
|
6989
7016
|
}
|
|
6990
7017
|
|
|
@@ -6992,6 +7019,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6992
7019
|
|
|
6993
7020
|
// Configure the floater to, this will generate the ID for the bib
|
|
6994
7021
|
this.floater.configure(this, 'auroDropdown');
|
|
7022
|
+
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
6995
7023
|
|
|
6996
7024
|
/**
|
|
6997
7025
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -31,6 +31,12 @@ const t$1=globalThis,i$3=t$1.trustedTypes,s$2=i$3?i$3.createPolicy("lit-html",{c
|
|
|
31
31
|
*/
|
|
32
32
|
const a=Symbol.for(""),o$1=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litStatic$:t,r:a}),i$1=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[a+1]),t[0]),r:a}),l=new Map,n=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o$1(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");void 0===(r=l.get(t))&&(n.raw=n,l.set(t,r=n)),e=u;}return t(r,...e)},u=n(x);
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* @license
|
|
36
|
+
* Copyright 2018 Google LLC
|
|
37
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
|
+
*/const o=o=>o??E;
|
|
39
|
+
|
|
34
40
|
var tokens = i$5`:host(:not([ondark])){--ds-auro-counter-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-counter-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-counter-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-counter-placeholder-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-counter-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-counter-error-icon-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-counter-outline-color: transparent;--ds-auro-counter-control-background-color: var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-counter-control-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-counter-description-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-counter-icon-color: var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-counter-quantity-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-counter-divider-color: var(--ds-basic-color-border-divider, rgba(0, 0, 0, 0.15))}:host([ondark]){--ds-auro-counter-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-counter-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-counter-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-counter-placeholder-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-counter-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-counter-error-icon-color: var(--ds-basic-color-status-error-subtle, #fbc6c6);--ds-auro-counter-outline-color: transparent;--ds-auro-counter-control-background-color: var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-counter-control-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-counter-description-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-counter-icon-color: var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-counter-quantity-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-counter-divider-color: var(--ds-basic-color-border-divider-inverse, rgba(255, 255, 255, 0.4))}`;
|
|
35
41
|
|
|
36
42
|
var styleButtonColorCss = i$5`.auro-button{border-color:unset;background-color:var(--ds-auro-counter-control-background-color);-webkit-tap-highlight-color:var(--ds-auro-button-tap-color)}@media(hover: hover){.auro-button:active:not(:disabled),.auro-button:hover:not(:disabled){--ds-auro-counter-control-background-color: var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1))}}:host([onDark]) .auro-button{--ds-auro-counter-control-background-color: var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05))}@media(hover: hover){:host([onDark]) .auro-button:active:not(:disabled),:host([onDark]) .auro-button:hover:not(:disabled){--ds-auro-counter-control-background-color: var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1))}}`;
|
|
@@ -515,12 +521,6 @@ const t={ATTRIBUTE:1},e$1=t=>(...e)=>({_$litDirective$:t,values:e});class i{cons
|
|
|
515
521
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
516
522
|
*/const e=e$1(class extends i{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"class"!==t$1.name||t$1.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return T}});
|
|
517
523
|
|
|
518
|
-
/**
|
|
519
|
-
* @license
|
|
520
|
-
* Copyright 2018 Google LLC
|
|
521
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
522
|
-
*/const o=o=>o??E;
|
|
523
|
-
|
|
524
524
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
525
525
|
// See LICENSE in the project root for license information.
|
|
526
526
|
|
|
@@ -2281,13 +2281,24 @@ class AuroFormValidation {
|
|
|
2281
2281
|
this.getInputElements(elem);
|
|
2282
2282
|
this.getAuroInputs(elem);
|
|
2283
2283
|
|
|
2284
|
-
//
|
|
2284
|
+
// Check if validation should run
|
|
2285
2285
|
let validationShouldRun =
|
|
2286
|
+
|
|
2287
|
+
// If the validation was forced
|
|
2286
2288
|
force ||
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2289
|
+
|
|
2290
|
+
// If the validation should run on input
|
|
2291
|
+
elem.validateOnInput ||
|
|
2292
|
+
|
|
2293
|
+
// State-based checks
|
|
2294
|
+
(
|
|
2295
|
+
// Element is not currently focused
|
|
2296
|
+
!elem.contains(document.activeElement) && // native input is not focused directly
|
|
2297
|
+
!document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
|
|
2298
|
+
|
|
2299
|
+
// And element has been touched or is untouched but has a value
|
|
2300
|
+
( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
|
|
2301
|
+
);
|
|
2291
2302
|
|
|
2292
2303
|
if (elem.hasAttribute('error')) {
|
|
2293
2304
|
elem.validity = 'customError';
|
|
@@ -3018,13 +3029,13 @@ class AuroCounter extends i$2 {
|
|
|
3018
3029
|
part="counterControl"
|
|
3019
3030
|
aria-labelledby="counter-label"
|
|
3020
3031
|
aria-describedby="counter-description"
|
|
3021
|
-
|
|
3022
|
-
role="spinbutton"
|
|
3023
|
-
aria-disabled="${this.disabled ? 'true' : 'false'}"
|
|
3032
|
+
aria-disabled="${o(this.disabled ? 'true' : undefined)}"
|
|
3024
3033
|
aria-valuemin="${this.min}"
|
|
3025
3034
|
aria-valuemax="${this.max}"
|
|
3026
3035
|
aria-valuenow="${this.value}"
|
|
3027
3036
|
aria-valuetext="${this.value !== undefined ? this.value : this.min}"
|
|
3037
|
+
role="spinbutton"
|
|
3038
|
+
tabindex="${this.disabled ? '-1' : '0'}"
|
|
3028
3039
|
>
|
|
3029
3040
|
<auro-counter-button
|
|
3030
3041
|
aria-hidden="true"
|
|
@@ -3059,7 +3070,7 @@ class AuroCounter extends i$2 {
|
|
|
3059
3070
|
}
|
|
3060
3071
|
}
|
|
3061
3072
|
|
|
3062
|
-
var counterGroupStyles = i$5`:host(:not([layout=classic])) .triggerContent{padding:0 var(--ds-size-
|
|
3073
|
+
var counterGroupStyles = i$5`:host(:not([layout=classic])) .triggerContent{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-300, 1.5rem)}:host([layout=snowflake]) [auro-dropdown] .mainContent{align-items:center}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}.mainContent{display:flex;overflow:hidden;width:100%;flex-direction:column;align-items:flex-start;justify-content:center}label{font-size:var(--ds-text-body-size-default, 1rem);line-height:20px}label.filled{font-size:var(--ds-text-body-size-xs, 0.75rem)}.accents ::slotted([slot=typeIcon]){margin-right:8px}.accents ::slotted(*):not(.util_displayHidden){display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px}slot[name=valueText]{font-size:var(--ds-text-body-size-default, 1rem);overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.counters{display:flex;flex-direction:column;gap:var(--ds-size-300, 1.5rem)}.counters ::slotted(auro-counter:not(:first-of-type)){padding-top:var(--ds-size-300, 1.5rem);border-top-width:1px;border-top-style:solid}[auro-helptext] [part=helpText]{display:flex;flex-direction:column}[auro-helptext] [part=helpText]>p{margin-block:0}`;
|
|
3063
3074
|
|
|
3064
3075
|
var shapeSizeCss$1 = 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}`;
|
|
3065
3076
|
|
|
@@ -4749,7 +4760,7 @@ class AuroFloatingUI {
|
|
|
4749
4760
|
*/
|
|
4750
4761
|
mirrorSize() {
|
|
4751
4762
|
// mirror the boxsize from bibSizer
|
|
4752
|
-
if (this.element.bibSizer) {
|
|
4763
|
+
if (this.element.bibSizer && this.element.matchWidth) {
|
|
4753
4764
|
const sizerStyle = window.getComputedStyle(this.element.bibSizer);
|
|
4754
4765
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
4755
4766
|
if (sizerStyle.width !== '0px') {
|
|
@@ -4961,13 +4972,13 @@ class AuroFloatingUI {
|
|
|
4961
4972
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
4962
4973
|
return;
|
|
4963
4974
|
}
|
|
4964
|
-
|
|
4975
|
+
|
|
4965
4976
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
4966
4977
|
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
4967
4978
|
return;
|
|
4968
4979
|
}
|
|
4969
4980
|
|
|
4970
|
-
this.hideBib();
|
|
4981
|
+
this.hideBib("keydown");
|
|
4971
4982
|
}
|
|
4972
4983
|
|
|
4973
4984
|
setupHideHandlers() {
|
|
@@ -4992,7 +5003,7 @@ class AuroFloatingUI {
|
|
|
4992
5003
|
document.expandedAuroFormkitDropdown = null;
|
|
4993
5004
|
document.expandedAuroFloater = this;
|
|
4994
5005
|
} else {
|
|
4995
|
-
this.hideBib();
|
|
5006
|
+
this.hideBib("click");
|
|
4996
5007
|
}
|
|
4997
5008
|
}
|
|
4998
5009
|
};
|
|
@@ -5005,7 +5016,7 @@ class AuroFloatingUI {
|
|
|
5005
5016
|
// if something else is open, let it handle itself
|
|
5006
5017
|
return;
|
|
5007
5018
|
}
|
|
5008
|
-
this.hideBib();
|
|
5019
|
+
this.hideBib("keydown");
|
|
5009
5020
|
}
|
|
5010
5021
|
};
|
|
5011
5022
|
|
|
@@ -5088,7 +5099,11 @@ class AuroFloatingUI {
|
|
|
5088
5099
|
}
|
|
5089
5100
|
}
|
|
5090
5101
|
|
|
5091
|
-
|
|
5102
|
+
/**
|
|
5103
|
+
* Hides the floating UI element.
|
|
5104
|
+
* @param {String} eventType - The event type that triggered the hiding action.
|
|
5105
|
+
*/
|
|
5106
|
+
hideBib(eventType = "unknown") {
|
|
5092
5107
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
5093
5108
|
this.lockScroll(false);
|
|
5094
5109
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -5099,7 +5114,7 @@ class AuroFloatingUI {
|
|
|
5099
5114
|
if (this.showing) {
|
|
5100
5115
|
this.cleanupHideHandlers();
|
|
5101
5116
|
this.showing = false;
|
|
5102
|
-
this.dispatchEventDropdownToggle();
|
|
5117
|
+
this.dispatchEventDropdownToggle(eventType);
|
|
5103
5118
|
}
|
|
5104
5119
|
}
|
|
5105
5120
|
document.expandedAuroFloater = null;
|
|
@@ -5108,11 +5123,13 @@ class AuroFloatingUI {
|
|
|
5108
5123
|
/**
|
|
5109
5124
|
* @private
|
|
5110
5125
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
5126
|
+
* @param {String} eventType - The event type that triggered the toggle action.
|
|
5111
5127
|
*/
|
|
5112
|
-
dispatchEventDropdownToggle() {
|
|
5128
|
+
dispatchEventDropdownToggle(eventType) {
|
|
5113
5129
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
5114
5130
|
detail: {
|
|
5115
5131
|
expanded: this.showing,
|
|
5132
|
+
eventType: eventType || "unknown",
|
|
5116
5133
|
},
|
|
5117
5134
|
composed: true
|
|
5118
5135
|
});
|
|
@@ -5122,7 +5139,7 @@ class AuroFloatingUI {
|
|
|
5122
5139
|
|
|
5123
5140
|
handleClick() {
|
|
5124
5141
|
if (this.element.isPopoverVisible) {
|
|
5125
|
-
this.hideBib();
|
|
5142
|
+
this.hideBib("click");
|
|
5126
5143
|
} else {
|
|
5127
5144
|
this.showBib();
|
|
5128
5145
|
}
|
|
@@ -5149,7 +5166,7 @@ class AuroFloatingUI {
|
|
|
5149
5166
|
|
|
5150
5167
|
event.preventDefault();
|
|
5151
5168
|
this.handleClick();
|
|
5152
|
-
}
|
|
5169
|
+
}
|
|
5153
5170
|
break;
|
|
5154
5171
|
case 'mouseenter':
|
|
5155
5172
|
if (this.element.hoverToggle) {
|
|
@@ -5158,7 +5175,7 @@ class AuroFloatingUI {
|
|
|
5158
5175
|
break;
|
|
5159
5176
|
case 'mouseleave':
|
|
5160
5177
|
if (this.element.hoverToggle) {
|
|
5161
|
-
this.hideBib();
|
|
5178
|
+
this.hideBib("mouseleave");
|
|
5162
5179
|
}
|
|
5163
5180
|
break;
|
|
5164
5181
|
case 'focus':
|
|
@@ -6546,6 +6563,9 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6546
6563
|
|
|
6547
6564
|
this.parentBorder = false;
|
|
6548
6565
|
|
|
6566
|
+
/** @private */
|
|
6567
|
+
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
6568
|
+
|
|
6549
6569
|
this.privateDefaults();
|
|
6550
6570
|
}
|
|
6551
6571
|
|
|
@@ -6979,12 +6999,19 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6979
6999
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
6980
7000
|
this.handleTriggerContentSlotChange();
|
|
6981
7001
|
}
|
|
7002
|
+
}
|
|
6982
7003
|
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
7004
|
+
/**
|
|
7005
|
+
* Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
|
|
7006
|
+
* @private
|
|
7007
|
+
* @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
|
|
7008
|
+
*/
|
|
7009
|
+
handleDropdownToggle(event) {
|
|
7010
|
+
this.updateFocusTrap();
|
|
7011
|
+
this.isPopoverVisible = event.detail.expanded;
|
|
7012
|
+
const eventType = event.detail.eventType || "unknown";
|
|
7013
|
+
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
7014
|
+
this.trigger.focus();
|
|
6988
7015
|
}
|
|
6989
7016
|
}
|
|
6990
7017
|
|
|
@@ -6992,6 +7019,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6992
7019
|
|
|
6993
7020
|
// Configure the floater to, this will generate the ID for the bib
|
|
6994
7021
|
this.floater.configure(this, 'auroDropdown');
|
|
7022
|
+
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
6995
7023
|
|
|
6996
7024
|
/**
|
|
6997
7025
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|