@aurodesignsystem-dev/auro-formkit 0.0.0-pr784.0 → 0.0.0-pr784.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/combobox/demo/api.min.js +41 -37
- package/components/combobox/demo/index.min.js +41 -37
- package/components/combobox/dist/index.js +40 -36
- package/components/combobox/dist/registered.js +40 -36
- package/components/counter/demo/api.min.js +34 -17
- package/components/counter/demo/index.min.js +34 -17
- package/components/counter/dist/index.js +34 -17
- package/components/counter/dist/registered.js +34 -17
- package/components/datepicker/demo/api.md +0 -1
- package/components/datepicker/demo/api.min.js +100 -37
- package/components/datepicker/demo/index.min.js +100 -37
- package/components/datepicker/dist/auro-datepicker.d.ts +19 -1
- package/components/datepicker/dist/index.js +100 -37
- package/components/datepicker/dist/registered.js +100 -37
- 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.min.js +7 -18
- package/components/input/demo/index.min.js +7 -18
- package/components/input/dist/auro-input.d.ts +0 -6
- package/components/input/dist/index.js +7 -18
- package/components/input/dist/registered.js +7 -18
- 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/select/demo/api.min.js +35 -18
- package/components/select/demo/index.min.js +35 -18
- package/components/select/dist/index.js +34 -17
- package/components/select/dist/registered.js +34 -17
- package/package.json +2 -2
|
@@ -3069,7 +3069,7 @@ class AuroCounter extends i$2 {
|
|
|
3069
3069
|
}
|
|
3070
3070
|
}
|
|
3071
3071
|
|
|
3072
|
-
var counterGroupStyles = i$5`:host(:not([layout=classic])) .triggerContent{padding:0 var(--ds-size-
|
|
3072
|
+
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;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}`;
|
|
3073
3073
|
|
|
3074
3074
|
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}`;
|
|
3075
3075
|
|
|
@@ -4759,7 +4759,7 @@ class AuroFloatingUI {
|
|
|
4759
4759
|
*/
|
|
4760
4760
|
mirrorSize() {
|
|
4761
4761
|
// mirror the boxsize from bibSizer
|
|
4762
|
-
if (this.element.bibSizer) {
|
|
4762
|
+
if (this.element.bibSizer && this.element.matchWidth) {
|
|
4763
4763
|
const sizerStyle = window.getComputedStyle(this.element.bibSizer);
|
|
4764
4764
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
4765
4765
|
if (sizerStyle.width !== '0px') {
|
|
@@ -4971,13 +4971,13 @@ class AuroFloatingUI {
|
|
|
4971
4971
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
4972
4972
|
return;
|
|
4973
4973
|
}
|
|
4974
|
-
|
|
4974
|
+
|
|
4975
4975
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
4976
4976
|
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
4977
4977
|
return;
|
|
4978
4978
|
}
|
|
4979
4979
|
|
|
4980
|
-
this.hideBib();
|
|
4980
|
+
this.hideBib("keydown");
|
|
4981
4981
|
}
|
|
4982
4982
|
|
|
4983
4983
|
setupHideHandlers() {
|
|
@@ -5002,7 +5002,7 @@ class AuroFloatingUI {
|
|
|
5002
5002
|
document.expandedAuroFormkitDropdown = null;
|
|
5003
5003
|
document.expandedAuroFloater = this;
|
|
5004
5004
|
} else {
|
|
5005
|
-
this.hideBib();
|
|
5005
|
+
this.hideBib("click");
|
|
5006
5006
|
}
|
|
5007
5007
|
}
|
|
5008
5008
|
};
|
|
@@ -5015,7 +5015,7 @@ class AuroFloatingUI {
|
|
|
5015
5015
|
// if something else is open, let it handle itself
|
|
5016
5016
|
return;
|
|
5017
5017
|
}
|
|
5018
|
-
this.hideBib();
|
|
5018
|
+
this.hideBib("keydown");
|
|
5019
5019
|
}
|
|
5020
5020
|
};
|
|
5021
5021
|
|
|
@@ -5098,7 +5098,11 @@ class AuroFloatingUI {
|
|
|
5098
5098
|
}
|
|
5099
5099
|
}
|
|
5100
5100
|
|
|
5101
|
-
|
|
5101
|
+
/**
|
|
5102
|
+
* Hides the floating UI element.
|
|
5103
|
+
* @param {String} eventType - The event type that triggered the hiding action.
|
|
5104
|
+
*/
|
|
5105
|
+
hideBib(eventType = "unknown") {
|
|
5102
5106
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
5103
5107
|
this.lockScroll(false);
|
|
5104
5108
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -5109,7 +5113,7 @@ class AuroFloatingUI {
|
|
|
5109
5113
|
if (this.showing) {
|
|
5110
5114
|
this.cleanupHideHandlers();
|
|
5111
5115
|
this.showing = false;
|
|
5112
|
-
this.dispatchEventDropdownToggle();
|
|
5116
|
+
this.dispatchEventDropdownToggle(eventType);
|
|
5113
5117
|
}
|
|
5114
5118
|
}
|
|
5115
5119
|
document.expandedAuroFloater = null;
|
|
@@ -5118,11 +5122,13 @@ class AuroFloatingUI {
|
|
|
5118
5122
|
/**
|
|
5119
5123
|
* @private
|
|
5120
5124
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
5125
|
+
* @param {String} eventType - The event type that triggered the toggle action.
|
|
5121
5126
|
*/
|
|
5122
|
-
dispatchEventDropdownToggle() {
|
|
5127
|
+
dispatchEventDropdownToggle(eventType) {
|
|
5123
5128
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
5124
5129
|
detail: {
|
|
5125
5130
|
expanded: this.showing,
|
|
5131
|
+
eventType: eventType || "unknown",
|
|
5126
5132
|
},
|
|
5127
5133
|
composed: true
|
|
5128
5134
|
});
|
|
@@ -5132,7 +5138,7 @@ class AuroFloatingUI {
|
|
|
5132
5138
|
|
|
5133
5139
|
handleClick() {
|
|
5134
5140
|
if (this.element.isPopoverVisible) {
|
|
5135
|
-
this.hideBib();
|
|
5141
|
+
this.hideBib("click");
|
|
5136
5142
|
} else {
|
|
5137
5143
|
this.showBib();
|
|
5138
5144
|
}
|
|
@@ -5159,7 +5165,7 @@ class AuroFloatingUI {
|
|
|
5159
5165
|
|
|
5160
5166
|
event.preventDefault();
|
|
5161
5167
|
this.handleClick();
|
|
5162
|
-
}
|
|
5168
|
+
}
|
|
5163
5169
|
break;
|
|
5164
5170
|
case 'mouseenter':
|
|
5165
5171
|
if (this.element.hoverToggle) {
|
|
@@ -5168,7 +5174,7 @@ class AuroFloatingUI {
|
|
|
5168
5174
|
break;
|
|
5169
5175
|
case 'mouseleave':
|
|
5170
5176
|
if (this.element.hoverToggle) {
|
|
5171
|
-
this.hideBib();
|
|
5177
|
+
this.hideBib("mouseleave");
|
|
5172
5178
|
}
|
|
5173
5179
|
break;
|
|
5174
5180
|
case 'focus':
|
|
@@ -6556,6 +6562,9 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6556
6562
|
|
|
6557
6563
|
this.parentBorder = false;
|
|
6558
6564
|
|
|
6565
|
+
/** @private */
|
|
6566
|
+
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
6567
|
+
|
|
6559
6568
|
this.privateDefaults();
|
|
6560
6569
|
}
|
|
6561
6570
|
|
|
@@ -6989,12 +6998,19 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6989
6998
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
6990
6999
|
this.handleTriggerContentSlotChange();
|
|
6991
7000
|
}
|
|
7001
|
+
}
|
|
6992
7002
|
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
7003
|
+
/**
|
|
7004
|
+
* Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
|
|
7005
|
+
* @private
|
|
7006
|
+
* @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
|
|
7007
|
+
*/
|
|
7008
|
+
handleDropdownToggle(event) {
|
|
7009
|
+
this.updateFocusTrap();
|
|
7010
|
+
this.isPopoverVisible = event.detail.expanded;
|
|
7011
|
+
const eventType = event.detail.eventType || "unknown";
|
|
7012
|
+
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
7013
|
+
this.trigger.focus();
|
|
6998
7014
|
}
|
|
6999
7015
|
}
|
|
7000
7016
|
|
|
@@ -7002,6 +7018,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
7002
7018
|
|
|
7003
7019
|
// Configure the floater to, this will generate the ID for the bib
|
|
7004
7020
|
this.floater.configure(this, 'auroDropdown');
|
|
7021
|
+
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
7005
7022
|
|
|
7006
7023
|
/**
|
|
7007
7024
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -3069,7 +3069,7 @@ class AuroCounter extends i$2 {
|
|
|
3069
3069
|
}
|
|
3070
3070
|
}
|
|
3071
3071
|
|
|
3072
|
-
var counterGroupStyles = i$5`:host(:not([layout=classic])) .triggerContent{padding:0 var(--ds-size-
|
|
3072
|
+
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;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}`;
|
|
3073
3073
|
|
|
3074
3074
|
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}`;
|
|
3075
3075
|
|
|
@@ -4759,7 +4759,7 @@ class AuroFloatingUI {
|
|
|
4759
4759
|
*/
|
|
4760
4760
|
mirrorSize() {
|
|
4761
4761
|
// mirror the boxsize from bibSizer
|
|
4762
|
-
if (this.element.bibSizer) {
|
|
4762
|
+
if (this.element.bibSizer && this.element.matchWidth) {
|
|
4763
4763
|
const sizerStyle = window.getComputedStyle(this.element.bibSizer);
|
|
4764
4764
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
4765
4765
|
if (sizerStyle.width !== '0px') {
|
|
@@ -4971,13 +4971,13 @@ class AuroFloatingUI {
|
|
|
4971
4971
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
4972
4972
|
return;
|
|
4973
4973
|
}
|
|
4974
|
-
|
|
4974
|
+
|
|
4975
4975
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
4976
4976
|
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
4977
4977
|
return;
|
|
4978
4978
|
}
|
|
4979
4979
|
|
|
4980
|
-
this.hideBib();
|
|
4980
|
+
this.hideBib("keydown");
|
|
4981
4981
|
}
|
|
4982
4982
|
|
|
4983
4983
|
setupHideHandlers() {
|
|
@@ -5002,7 +5002,7 @@ class AuroFloatingUI {
|
|
|
5002
5002
|
document.expandedAuroFormkitDropdown = null;
|
|
5003
5003
|
document.expandedAuroFloater = this;
|
|
5004
5004
|
} else {
|
|
5005
|
-
this.hideBib();
|
|
5005
|
+
this.hideBib("click");
|
|
5006
5006
|
}
|
|
5007
5007
|
}
|
|
5008
5008
|
};
|
|
@@ -5015,7 +5015,7 @@ class AuroFloatingUI {
|
|
|
5015
5015
|
// if something else is open, let it handle itself
|
|
5016
5016
|
return;
|
|
5017
5017
|
}
|
|
5018
|
-
this.hideBib();
|
|
5018
|
+
this.hideBib("keydown");
|
|
5019
5019
|
}
|
|
5020
5020
|
};
|
|
5021
5021
|
|
|
@@ -5098,7 +5098,11 @@ class AuroFloatingUI {
|
|
|
5098
5098
|
}
|
|
5099
5099
|
}
|
|
5100
5100
|
|
|
5101
|
-
|
|
5101
|
+
/**
|
|
5102
|
+
* Hides the floating UI element.
|
|
5103
|
+
* @param {String} eventType - The event type that triggered the hiding action.
|
|
5104
|
+
*/
|
|
5105
|
+
hideBib(eventType = "unknown") {
|
|
5102
5106
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
5103
5107
|
this.lockScroll(false);
|
|
5104
5108
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -5109,7 +5113,7 @@ class AuroFloatingUI {
|
|
|
5109
5113
|
if (this.showing) {
|
|
5110
5114
|
this.cleanupHideHandlers();
|
|
5111
5115
|
this.showing = false;
|
|
5112
|
-
this.dispatchEventDropdownToggle();
|
|
5116
|
+
this.dispatchEventDropdownToggle(eventType);
|
|
5113
5117
|
}
|
|
5114
5118
|
}
|
|
5115
5119
|
document.expandedAuroFloater = null;
|
|
@@ -5118,11 +5122,13 @@ class AuroFloatingUI {
|
|
|
5118
5122
|
/**
|
|
5119
5123
|
* @private
|
|
5120
5124
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
5125
|
+
* @param {String} eventType - The event type that triggered the toggle action.
|
|
5121
5126
|
*/
|
|
5122
|
-
dispatchEventDropdownToggle() {
|
|
5127
|
+
dispatchEventDropdownToggle(eventType) {
|
|
5123
5128
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
5124
5129
|
detail: {
|
|
5125
5130
|
expanded: this.showing,
|
|
5131
|
+
eventType: eventType || "unknown",
|
|
5126
5132
|
},
|
|
5127
5133
|
composed: true
|
|
5128
5134
|
});
|
|
@@ -5132,7 +5138,7 @@ class AuroFloatingUI {
|
|
|
5132
5138
|
|
|
5133
5139
|
handleClick() {
|
|
5134
5140
|
if (this.element.isPopoverVisible) {
|
|
5135
|
-
this.hideBib();
|
|
5141
|
+
this.hideBib("click");
|
|
5136
5142
|
} else {
|
|
5137
5143
|
this.showBib();
|
|
5138
5144
|
}
|
|
@@ -5159,7 +5165,7 @@ class AuroFloatingUI {
|
|
|
5159
5165
|
|
|
5160
5166
|
event.preventDefault();
|
|
5161
5167
|
this.handleClick();
|
|
5162
|
-
}
|
|
5168
|
+
}
|
|
5163
5169
|
break;
|
|
5164
5170
|
case 'mouseenter':
|
|
5165
5171
|
if (this.element.hoverToggle) {
|
|
@@ -5168,7 +5174,7 @@ class AuroFloatingUI {
|
|
|
5168
5174
|
break;
|
|
5169
5175
|
case 'mouseleave':
|
|
5170
5176
|
if (this.element.hoverToggle) {
|
|
5171
|
-
this.hideBib();
|
|
5177
|
+
this.hideBib("mouseleave");
|
|
5172
5178
|
}
|
|
5173
5179
|
break;
|
|
5174
5180
|
case 'focus':
|
|
@@ -6556,6 +6562,9 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6556
6562
|
|
|
6557
6563
|
this.parentBorder = false;
|
|
6558
6564
|
|
|
6565
|
+
/** @private */
|
|
6566
|
+
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
6567
|
+
|
|
6559
6568
|
this.privateDefaults();
|
|
6560
6569
|
}
|
|
6561
6570
|
|
|
@@ -6989,12 +6998,19 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6989
6998
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
6990
6999
|
this.handleTriggerContentSlotChange();
|
|
6991
7000
|
}
|
|
7001
|
+
}
|
|
6992
7002
|
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
7003
|
+
/**
|
|
7004
|
+
* Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
|
|
7005
|
+
* @private
|
|
7006
|
+
* @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
|
|
7007
|
+
*/
|
|
7008
|
+
handleDropdownToggle(event) {
|
|
7009
|
+
this.updateFocusTrap();
|
|
7010
|
+
this.isPopoverVisible = event.detail.expanded;
|
|
7011
|
+
const eventType = event.detail.eventType || "unknown";
|
|
7012
|
+
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
7013
|
+
this.trigger.focus();
|
|
6998
7014
|
}
|
|
6999
7015
|
}
|
|
7000
7016
|
|
|
@@ -7002,6 +7018,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
7002
7018
|
|
|
7003
7019
|
// Configure the floater to, this will generate the ID for the bib
|
|
7004
7020
|
this.floater.configure(this, 'auroDropdown');
|
|
7021
|
+
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
7005
7022
|
|
|
7006
7023
|
/**
|
|
7007
7024
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -3022,7 +3022,7 @@ class AuroCounter extends LitElement {
|
|
|
3022
3022
|
}
|
|
3023
3023
|
}
|
|
3024
3024
|
|
|
3025
|
-
var counterGroupStyles = css`:host(:not([layout=classic])) .triggerContent{padding:0 var(--ds-size-
|
|
3025
|
+
var counterGroupStyles = css`: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;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}`;
|
|
3026
3026
|
|
|
3027
3027
|
var shapeSizeCss$1 = 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}`;
|
|
3028
3028
|
|
|
@@ -4712,7 +4712,7 @@ class AuroFloatingUI {
|
|
|
4712
4712
|
*/
|
|
4713
4713
|
mirrorSize() {
|
|
4714
4714
|
// mirror the boxsize from bibSizer
|
|
4715
|
-
if (this.element.bibSizer) {
|
|
4715
|
+
if (this.element.bibSizer && this.element.matchWidth) {
|
|
4716
4716
|
const sizerStyle = window.getComputedStyle(this.element.bibSizer);
|
|
4717
4717
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
4718
4718
|
if (sizerStyle.width !== '0px') {
|
|
@@ -4924,13 +4924,13 @@ class AuroFloatingUI {
|
|
|
4924
4924
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
4925
4925
|
return;
|
|
4926
4926
|
}
|
|
4927
|
-
|
|
4927
|
+
|
|
4928
4928
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
4929
4929
|
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
4930
4930
|
return;
|
|
4931
4931
|
}
|
|
4932
4932
|
|
|
4933
|
-
this.hideBib();
|
|
4933
|
+
this.hideBib("keydown");
|
|
4934
4934
|
}
|
|
4935
4935
|
|
|
4936
4936
|
setupHideHandlers() {
|
|
@@ -4955,7 +4955,7 @@ class AuroFloatingUI {
|
|
|
4955
4955
|
document.expandedAuroFormkitDropdown = null;
|
|
4956
4956
|
document.expandedAuroFloater = this;
|
|
4957
4957
|
} else {
|
|
4958
|
-
this.hideBib();
|
|
4958
|
+
this.hideBib("click");
|
|
4959
4959
|
}
|
|
4960
4960
|
}
|
|
4961
4961
|
};
|
|
@@ -4968,7 +4968,7 @@ class AuroFloatingUI {
|
|
|
4968
4968
|
// if something else is open, let it handle itself
|
|
4969
4969
|
return;
|
|
4970
4970
|
}
|
|
4971
|
-
this.hideBib();
|
|
4971
|
+
this.hideBib("keydown");
|
|
4972
4972
|
}
|
|
4973
4973
|
};
|
|
4974
4974
|
|
|
@@ -5051,7 +5051,11 @@ class AuroFloatingUI {
|
|
|
5051
5051
|
}
|
|
5052
5052
|
}
|
|
5053
5053
|
|
|
5054
|
-
|
|
5054
|
+
/**
|
|
5055
|
+
* Hides the floating UI element.
|
|
5056
|
+
* @param {String} eventType - The event type that triggered the hiding action.
|
|
5057
|
+
*/
|
|
5058
|
+
hideBib(eventType = "unknown") {
|
|
5055
5059
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
5056
5060
|
this.lockScroll(false);
|
|
5057
5061
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -5062,7 +5066,7 @@ class AuroFloatingUI {
|
|
|
5062
5066
|
if (this.showing) {
|
|
5063
5067
|
this.cleanupHideHandlers();
|
|
5064
5068
|
this.showing = false;
|
|
5065
|
-
this.dispatchEventDropdownToggle();
|
|
5069
|
+
this.dispatchEventDropdownToggle(eventType);
|
|
5066
5070
|
}
|
|
5067
5071
|
}
|
|
5068
5072
|
document.expandedAuroFloater = null;
|
|
@@ -5071,11 +5075,13 @@ class AuroFloatingUI {
|
|
|
5071
5075
|
/**
|
|
5072
5076
|
* @private
|
|
5073
5077
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
5078
|
+
* @param {String} eventType - The event type that triggered the toggle action.
|
|
5074
5079
|
*/
|
|
5075
|
-
dispatchEventDropdownToggle() {
|
|
5080
|
+
dispatchEventDropdownToggle(eventType) {
|
|
5076
5081
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
5077
5082
|
detail: {
|
|
5078
5083
|
expanded: this.showing,
|
|
5084
|
+
eventType: eventType || "unknown",
|
|
5079
5085
|
},
|
|
5080
5086
|
composed: true
|
|
5081
5087
|
});
|
|
@@ -5085,7 +5091,7 @@ class AuroFloatingUI {
|
|
|
5085
5091
|
|
|
5086
5092
|
handleClick() {
|
|
5087
5093
|
if (this.element.isPopoverVisible) {
|
|
5088
|
-
this.hideBib();
|
|
5094
|
+
this.hideBib("click");
|
|
5089
5095
|
} else {
|
|
5090
5096
|
this.showBib();
|
|
5091
5097
|
}
|
|
@@ -5112,7 +5118,7 @@ class AuroFloatingUI {
|
|
|
5112
5118
|
|
|
5113
5119
|
event.preventDefault();
|
|
5114
5120
|
this.handleClick();
|
|
5115
|
-
}
|
|
5121
|
+
}
|
|
5116
5122
|
break;
|
|
5117
5123
|
case 'mouseenter':
|
|
5118
5124
|
if (this.element.hoverToggle) {
|
|
@@ -5121,7 +5127,7 @@ class AuroFloatingUI {
|
|
|
5121
5127
|
break;
|
|
5122
5128
|
case 'mouseleave':
|
|
5123
5129
|
if (this.element.hoverToggle) {
|
|
5124
|
-
this.hideBib();
|
|
5130
|
+
this.hideBib("mouseleave");
|
|
5125
5131
|
}
|
|
5126
5132
|
break;
|
|
5127
5133
|
case 'focus':
|
|
@@ -6509,6 +6515,9 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6509
6515
|
|
|
6510
6516
|
this.parentBorder = false;
|
|
6511
6517
|
|
|
6518
|
+
/** @private */
|
|
6519
|
+
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
6520
|
+
|
|
6512
6521
|
this.privateDefaults();
|
|
6513
6522
|
}
|
|
6514
6523
|
|
|
@@ -6942,12 +6951,19 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6942
6951
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
6943
6952
|
this.handleTriggerContentSlotChange();
|
|
6944
6953
|
}
|
|
6954
|
+
}
|
|
6945
6955
|
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6956
|
+
/**
|
|
6957
|
+
* Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
|
|
6958
|
+
* @private
|
|
6959
|
+
* @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
|
|
6960
|
+
*/
|
|
6961
|
+
handleDropdownToggle(event) {
|
|
6962
|
+
this.updateFocusTrap();
|
|
6963
|
+
this.isPopoverVisible = event.detail.expanded;
|
|
6964
|
+
const eventType = event.detail.eventType || "unknown";
|
|
6965
|
+
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
6966
|
+
this.trigger.focus();
|
|
6951
6967
|
}
|
|
6952
6968
|
}
|
|
6953
6969
|
|
|
@@ -6955,6 +6971,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6955
6971
|
|
|
6956
6972
|
// Configure the floater to, this will generate the ID for the bib
|
|
6957
6973
|
this.floater.configure(this, 'auroDropdown');
|
|
6974
|
+
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
6958
6975
|
|
|
6959
6976
|
/**
|
|
6960
6977
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -3022,7 +3022,7 @@ class AuroCounter extends LitElement {
|
|
|
3022
3022
|
}
|
|
3023
3023
|
}
|
|
3024
3024
|
|
|
3025
|
-
var counterGroupStyles = css`:host(:not([layout=classic])) .triggerContent{padding:0 var(--ds-size-
|
|
3025
|
+
var counterGroupStyles = css`: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;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}`;
|
|
3026
3026
|
|
|
3027
3027
|
var shapeSizeCss$1 = 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}`;
|
|
3028
3028
|
|
|
@@ -4712,7 +4712,7 @@ class AuroFloatingUI {
|
|
|
4712
4712
|
*/
|
|
4713
4713
|
mirrorSize() {
|
|
4714
4714
|
// mirror the boxsize from bibSizer
|
|
4715
|
-
if (this.element.bibSizer) {
|
|
4715
|
+
if (this.element.bibSizer && this.element.matchWidth) {
|
|
4716
4716
|
const sizerStyle = window.getComputedStyle(this.element.bibSizer);
|
|
4717
4717
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
4718
4718
|
if (sizerStyle.width !== '0px') {
|
|
@@ -4924,13 +4924,13 @@ class AuroFloatingUI {
|
|
|
4924
4924
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
4925
4925
|
return;
|
|
4926
4926
|
}
|
|
4927
|
-
|
|
4927
|
+
|
|
4928
4928
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
4929
4929
|
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
4930
4930
|
return;
|
|
4931
4931
|
}
|
|
4932
4932
|
|
|
4933
|
-
this.hideBib();
|
|
4933
|
+
this.hideBib("keydown");
|
|
4934
4934
|
}
|
|
4935
4935
|
|
|
4936
4936
|
setupHideHandlers() {
|
|
@@ -4955,7 +4955,7 @@ class AuroFloatingUI {
|
|
|
4955
4955
|
document.expandedAuroFormkitDropdown = null;
|
|
4956
4956
|
document.expandedAuroFloater = this;
|
|
4957
4957
|
} else {
|
|
4958
|
-
this.hideBib();
|
|
4958
|
+
this.hideBib("click");
|
|
4959
4959
|
}
|
|
4960
4960
|
}
|
|
4961
4961
|
};
|
|
@@ -4968,7 +4968,7 @@ class AuroFloatingUI {
|
|
|
4968
4968
|
// if something else is open, let it handle itself
|
|
4969
4969
|
return;
|
|
4970
4970
|
}
|
|
4971
|
-
this.hideBib();
|
|
4971
|
+
this.hideBib("keydown");
|
|
4972
4972
|
}
|
|
4973
4973
|
};
|
|
4974
4974
|
|
|
@@ -5051,7 +5051,11 @@ class AuroFloatingUI {
|
|
|
5051
5051
|
}
|
|
5052
5052
|
}
|
|
5053
5053
|
|
|
5054
|
-
|
|
5054
|
+
/**
|
|
5055
|
+
* Hides the floating UI element.
|
|
5056
|
+
* @param {String} eventType - The event type that triggered the hiding action.
|
|
5057
|
+
*/
|
|
5058
|
+
hideBib(eventType = "unknown") {
|
|
5055
5059
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
5056
5060
|
this.lockScroll(false);
|
|
5057
5061
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -5062,7 +5066,7 @@ class AuroFloatingUI {
|
|
|
5062
5066
|
if (this.showing) {
|
|
5063
5067
|
this.cleanupHideHandlers();
|
|
5064
5068
|
this.showing = false;
|
|
5065
|
-
this.dispatchEventDropdownToggle();
|
|
5069
|
+
this.dispatchEventDropdownToggle(eventType);
|
|
5066
5070
|
}
|
|
5067
5071
|
}
|
|
5068
5072
|
document.expandedAuroFloater = null;
|
|
@@ -5071,11 +5075,13 @@ class AuroFloatingUI {
|
|
|
5071
5075
|
/**
|
|
5072
5076
|
* @private
|
|
5073
5077
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
5078
|
+
* @param {String} eventType - The event type that triggered the toggle action.
|
|
5074
5079
|
*/
|
|
5075
|
-
dispatchEventDropdownToggle() {
|
|
5080
|
+
dispatchEventDropdownToggle(eventType) {
|
|
5076
5081
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
5077
5082
|
detail: {
|
|
5078
5083
|
expanded: this.showing,
|
|
5084
|
+
eventType: eventType || "unknown",
|
|
5079
5085
|
},
|
|
5080
5086
|
composed: true
|
|
5081
5087
|
});
|
|
@@ -5085,7 +5091,7 @@ class AuroFloatingUI {
|
|
|
5085
5091
|
|
|
5086
5092
|
handleClick() {
|
|
5087
5093
|
if (this.element.isPopoverVisible) {
|
|
5088
|
-
this.hideBib();
|
|
5094
|
+
this.hideBib("click");
|
|
5089
5095
|
} else {
|
|
5090
5096
|
this.showBib();
|
|
5091
5097
|
}
|
|
@@ -5112,7 +5118,7 @@ class AuroFloatingUI {
|
|
|
5112
5118
|
|
|
5113
5119
|
event.preventDefault();
|
|
5114
5120
|
this.handleClick();
|
|
5115
|
-
}
|
|
5121
|
+
}
|
|
5116
5122
|
break;
|
|
5117
5123
|
case 'mouseenter':
|
|
5118
5124
|
if (this.element.hoverToggle) {
|
|
@@ -5121,7 +5127,7 @@ class AuroFloatingUI {
|
|
|
5121
5127
|
break;
|
|
5122
5128
|
case 'mouseleave':
|
|
5123
5129
|
if (this.element.hoverToggle) {
|
|
5124
|
-
this.hideBib();
|
|
5130
|
+
this.hideBib("mouseleave");
|
|
5125
5131
|
}
|
|
5126
5132
|
break;
|
|
5127
5133
|
case 'focus':
|
|
@@ -6509,6 +6515,9 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6509
6515
|
|
|
6510
6516
|
this.parentBorder = false;
|
|
6511
6517
|
|
|
6518
|
+
/** @private */
|
|
6519
|
+
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
6520
|
+
|
|
6512
6521
|
this.privateDefaults();
|
|
6513
6522
|
}
|
|
6514
6523
|
|
|
@@ -6942,12 +6951,19 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6942
6951
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
6943
6952
|
this.handleTriggerContentSlotChange();
|
|
6944
6953
|
}
|
|
6954
|
+
}
|
|
6945
6955
|
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6956
|
+
/**
|
|
6957
|
+
* Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
|
|
6958
|
+
* @private
|
|
6959
|
+
* @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
|
|
6960
|
+
*/
|
|
6961
|
+
handleDropdownToggle(event) {
|
|
6962
|
+
this.updateFocusTrap();
|
|
6963
|
+
this.isPopoverVisible = event.detail.expanded;
|
|
6964
|
+
const eventType = event.detail.eventType || "unknown";
|
|
6965
|
+
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
6966
|
+
this.trigger.focus();
|
|
6951
6967
|
}
|
|
6952
6968
|
}
|
|
6953
6969
|
|
|
@@ -6955,6 +6971,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6955
6971
|
|
|
6956
6972
|
// Configure the floater to, this will generate the ID for the bib
|
|
6957
6973
|
this.floater.configure(this, 'auroDropdown');
|
|
6974
|
+
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
6958
6975
|
|
|
6959
6976
|
/**
|
|
6960
6977
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|