@aurodesignsystem-dev/auro-formkit 0.0.0-pr785.0 → 0.0.0-pr785.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.html +16 -10
- package/components/checkbox/demo/api.min.js +2 -2
- package/components/checkbox/demo/index.html +16 -10
- package/components/checkbox/demo/index.min.js +2 -2
- package/components/checkbox/demo/readme.html +16 -9
- package/components/checkbox/dist/index.js +2 -2
- package/components/checkbox/dist/registered.js +2 -2
- package/components/combobox/demo/api.html +16 -10
- package/components/combobox/demo/api.min.js +27 -15
- package/components/combobox/demo/index.html +16 -10
- package/components/combobox/demo/index.min.js +27 -15
- package/components/combobox/demo/readme.html +16 -9
- package/components/combobox/dist/index.js +27 -15
- package/components/combobox/dist/registered.js +27 -15
- package/components/counter/demo/api.html +16 -10
- package/components/counter/demo/api.min.js +25 -13
- package/components/counter/demo/index.html +16 -10
- package/components/counter/demo/index.min.js +25 -13
- package/components/counter/demo/readme.html +16 -9
- package/components/counter/dist/index.js +25 -13
- package/components/counter/dist/registered.js +25 -13
- package/components/datepicker/demo/api.html +16 -10
- package/components/datepicker/demo/api.min.js +37 -15
- package/components/datepicker/demo/index.html +16 -10
- package/components/datepicker/demo/index.min.js +37 -15
- package/components/datepicker/demo/readme.html +16 -9
- package/components/datepicker/dist/index.js +37 -15
- package/components/datepicker/dist/registered.js +37 -15
- package/components/dropdown/demo/api.html +16 -10
- package/components/dropdown/demo/api.md +7 -6
- package/components/dropdown/demo/api.min.js +25 -13
- package/components/dropdown/demo/index.html +16 -10
- package/components/dropdown/demo/index.min.js +25 -13
- package/components/dropdown/demo/readme.html +16 -9
- package/components/dropdown/dist/auro-dropdown.d.ts +1 -0
- package/components/dropdown/dist/index.js +25 -13
- package/components/dropdown/dist/registered.js +25 -13
- package/components/form/demo/api.html +16 -9
- package/components/form/demo/autocomplete.html +19 -3
- package/components/form/demo/index.html +16 -9
- package/components/form/demo/readme.html +16 -9
- package/components/form/demo/working.html +19 -13
- package/components/input/demo/api.html +16 -10
- package/components/input/demo/api.min.js +2 -2
- package/components/input/demo/index.html +16 -10
- package/components/input/demo/index.min.js +2 -2
- package/components/input/demo/readme.html +16 -9
- package/components/input/dist/index.js +2 -2
- package/components/input/dist/registered.js +2 -2
- package/components/menu/demo/api.html +16 -32
- package/components/menu/demo/index.html +16 -10
- package/components/menu/demo/readme.html +16 -9
- package/components/radio/demo/api.html +16 -10
- package/components/radio/demo/index.html +16 -10
- package/components/radio/demo/readme.html +16 -9
- package/components/select/demo/api.html +16 -10
- package/components/select/demo/api.min.js +25 -13
- package/components/select/demo/index.html +16 -11
- package/components/select/demo/index.min.js +25 -13
- package/components/select/demo/readme.html +16 -9
- package/components/select/dist/index.js +25 -13
- package/components/select/dist/registered.js +25 -13
- package/package.json +4 -3
|
@@ -2864,7 +2864,7 @@ class AuroFloatingUI {
|
|
|
2864
2864
|
return;
|
|
2865
2865
|
}
|
|
2866
2866
|
|
|
2867
|
-
this.hideBib();
|
|
2867
|
+
this.hideBib("keydown");
|
|
2868
2868
|
}
|
|
2869
2869
|
|
|
2870
2870
|
setupHideHandlers() {
|
|
@@ -2889,7 +2889,7 @@ class AuroFloatingUI {
|
|
|
2889
2889
|
document.expandedAuroFormkitDropdown = null;
|
|
2890
2890
|
document.expandedAuroFloater = this;
|
|
2891
2891
|
} else {
|
|
2892
|
-
this.hideBib();
|
|
2892
|
+
this.hideBib("click");
|
|
2893
2893
|
}
|
|
2894
2894
|
}
|
|
2895
2895
|
};
|
|
@@ -2902,7 +2902,7 @@ class AuroFloatingUI {
|
|
|
2902
2902
|
// if something else is open, let it handle itself
|
|
2903
2903
|
return;
|
|
2904
2904
|
}
|
|
2905
|
-
this.hideBib();
|
|
2905
|
+
this.hideBib("keydown");
|
|
2906
2906
|
}
|
|
2907
2907
|
};
|
|
2908
2908
|
|
|
@@ -2985,7 +2985,11 @@ class AuroFloatingUI {
|
|
|
2985
2985
|
}
|
|
2986
2986
|
}
|
|
2987
2987
|
|
|
2988
|
-
|
|
2988
|
+
/**
|
|
2989
|
+
* Hides the floating UI element.
|
|
2990
|
+
* @param {String} eventType - The event type that triggered the hiding action.
|
|
2991
|
+
*/
|
|
2992
|
+
hideBib(eventType = "unknown") {
|
|
2989
2993
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
2990
2994
|
this.lockScroll(false);
|
|
2991
2995
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -2996,7 +3000,7 @@ class AuroFloatingUI {
|
|
|
2996
3000
|
if (this.showing) {
|
|
2997
3001
|
this.cleanupHideHandlers();
|
|
2998
3002
|
this.showing = false;
|
|
2999
|
-
this.dispatchEventDropdownToggle();
|
|
3003
|
+
this.dispatchEventDropdownToggle(eventType);
|
|
3000
3004
|
}
|
|
3001
3005
|
}
|
|
3002
3006
|
document.expandedAuroFloater = null;
|
|
@@ -3005,11 +3009,13 @@ class AuroFloatingUI {
|
|
|
3005
3009
|
/**
|
|
3006
3010
|
* @private
|
|
3007
3011
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
3012
|
+
* @param {String} eventType - The event type that triggered the toggle action.
|
|
3008
3013
|
*/
|
|
3009
|
-
dispatchEventDropdownToggle() {
|
|
3014
|
+
dispatchEventDropdownToggle(eventType) {
|
|
3010
3015
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
3011
3016
|
detail: {
|
|
3012
3017
|
expanded: this.showing,
|
|
3018
|
+
eventType: eventType || "unknown",
|
|
3013
3019
|
},
|
|
3014
3020
|
composed: true
|
|
3015
3021
|
});
|
|
@@ -3019,7 +3025,7 @@ class AuroFloatingUI {
|
|
|
3019
3025
|
|
|
3020
3026
|
handleClick() {
|
|
3021
3027
|
if (this.element.isPopoverVisible) {
|
|
3022
|
-
this.hideBib();
|
|
3028
|
+
this.hideBib("click");
|
|
3023
3029
|
} else {
|
|
3024
3030
|
this.showBib();
|
|
3025
3031
|
}
|
|
@@ -3055,7 +3061,7 @@ class AuroFloatingUI {
|
|
|
3055
3061
|
break;
|
|
3056
3062
|
case 'mouseleave':
|
|
3057
3063
|
if (this.element.hoverToggle) {
|
|
3058
|
-
this.hideBib();
|
|
3064
|
+
this.hideBib("mouseleave");
|
|
3059
3065
|
}
|
|
3060
3066
|
break;
|
|
3061
3067
|
case 'focus':
|
|
@@ -4443,6 +4449,9 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4443
4449
|
|
|
4444
4450
|
this.parentBorder = false;
|
|
4445
4451
|
|
|
4452
|
+
/** @private */
|
|
4453
|
+
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
4454
|
+
|
|
4446
4455
|
this.privateDefaults();
|
|
4447
4456
|
}
|
|
4448
4457
|
|
|
@@ -4876,12 +4885,14 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4876
4885
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
4877
4886
|
this.handleTriggerContentSlotChange();
|
|
4878
4887
|
}
|
|
4888
|
+
}
|
|
4879
4889
|
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4890
|
+
handleDropdownToggle(event) {
|
|
4891
|
+
this.updateFocusTrap();
|
|
4892
|
+
this.isPopoverVisible = event.detail.expanded;
|
|
4893
|
+
const eventType = event.detail.eventType || "unknown";
|
|
4894
|
+
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
4895
|
+
this.trigger.focus();
|
|
4885
4896
|
}
|
|
4886
4897
|
}
|
|
4887
4898
|
|
|
@@ -4889,6 +4900,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4889
4900
|
|
|
4890
4901
|
// Configure the floater to, this will generate the ID for the bib
|
|
4891
4902
|
this.floater.configure(this, 'auroDropdown');
|
|
4903
|
+
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
4892
4904
|
|
|
4893
4905
|
/**
|
|
4894
4906
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -10878,9 +10890,9 @@ class BaseInput extends AuroElement$2$1 {
|
|
|
10878
10890
|
if (!this.shadowRoot.contains(this.getActiveElement())) {
|
|
10879
10891
|
this.validation.validate(this);
|
|
10880
10892
|
}
|
|
10881
|
-
|
|
10882
|
-
this.notifyValueChanged();
|
|
10883
10893
|
}
|
|
10894
|
+
|
|
10895
|
+
this.notifyValueChanged();
|
|
10884
10896
|
}
|
|
10885
10897
|
|
|
10886
10898
|
if (changedProperties.has('error')) {
|
|
@@ -16,17 +16,24 @@
|
|
|
16
16
|
<head>
|
|
17
17
|
<meta charset="UTF-8" />
|
|
18
18
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
19
|
-
<title>Auro Web Component
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/auro-classic/CSSCustomProperties.css"
|
|
26
|
-
|
|
19
|
+
<title>Auro Web Component Demo | auro-combobox</title>
|
|
20
|
+
|
|
21
|
+
<!-- Prism.js Stylesheet -->
|
|
22
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"/>
|
|
23
|
+
|
|
24
|
+
<!-- Legacy reference is still needed to support auro-combobox's use of legacy token values at this time -->
|
|
25
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
|
|
26
|
+
|
|
27
|
+
<!-- Design Token Alaska Theme -->
|
|
28
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
|
|
29
|
+
|
|
30
|
+
<!-- Webcore Stylesheet Alaska Theme -->
|
|
31
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
|
|
32
|
+
|
|
33
|
+
<!-- Demo Specific Styles -->
|
|
27
34
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
|
|
28
35
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
|
|
29
|
-
|
|
36
|
+
</head>
|
|
30
37
|
<body class="auro-markdown">
|
|
31
38
|
<main></main>
|
|
32
39
|
|
|
@@ -2795,7 +2795,7 @@ class AuroFloatingUI {
|
|
|
2795
2795
|
return;
|
|
2796
2796
|
}
|
|
2797
2797
|
|
|
2798
|
-
this.hideBib();
|
|
2798
|
+
this.hideBib("keydown");
|
|
2799
2799
|
}
|
|
2800
2800
|
|
|
2801
2801
|
setupHideHandlers() {
|
|
@@ -2820,7 +2820,7 @@ class AuroFloatingUI {
|
|
|
2820
2820
|
document.expandedAuroFormkitDropdown = null;
|
|
2821
2821
|
document.expandedAuroFloater = this;
|
|
2822
2822
|
} else {
|
|
2823
|
-
this.hideBib();
|
|
2823
|
+
this.hideBib("click");
|
|
2824
2824
|
}
|
|
2825
2825
|
}
|
|
2826
2826
|
};
|
|
@@ -2833,7 +2833,7 @@ class AuroFloatingUI {
|
|
|
2833
2833
|
// if something else is open, let it handle itself
|
|
2834
2834
|
return;
|
|
2835
2835
|
}
|
|
2836
|
-
this.hideBib();
|
|
2836
|
+
this.hideBib("keydown");
|
|
2837
2837
|
}
|
|
2838
2838
|
};
|
|
2839
2839
|
|
|
@@ -2916,7 +2916,11 @@ class AuroFloatingUI {
|
|
|
2916
2916
|
}
|
|
2917
2917
|
}
|
|
2918
2918
|
|
|
2919
|
-
|
|
2919
|
+
/**
|
|
2920
|
+
* Hides the floating UI element.
|
|
2921
|
+
* @param {String} eventType - The event type that triggered the hiding action.
|
|
2922
|
+
*/
|
|
2923
|
+
hideBib(eventType = "unknown") {
|
|
2920
2924
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
2921
2925
|
this.lockScroll(false);
|
|
2922
2926
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -2927,7 +2931,7 @@ class AuroFloatingUI {
|
|
|
2927
2931
|
if (this.showing) {
|
|
2928
2932
|
this.cleanupHideHandlers();
|
|
2929
2933
|
this.showing = false;
|
|
2930
|
-
this.dispatchEventDropdownToggle();
|
|
2934
|
+
this.dispatchEventDropdownToggle(eventType);
|
|
2931
2935
|
}
|
|
2932
2936
|
}
|
|
2933
2937
|
document.expandedAuroFloater = null;
|
|
@@ -2936,11 +2940,13 @@ class AuroFloatingUI {
|
|
|
2936
2940
|
/**
|
|
2937
2941
|
* @private
|
|
2938
2942
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
2943
|
+
* @param {String} eventType - The event type that triggered the toggle action.
|
|
2939
2944
|
*/
|
|
2940
|
-
dispatchEventDropdownToggle() {
|
|
2945
|
+
dispatchEventDropdownToggle(eventType) {
|
|
2941
2946
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
2942
2947
|
detail: {
|
|
2943
2948
|
expanded: this.showing,
|
|
2949
|
+
eventType: eventType || "unknown",
|
|
2944
2950
|
},
|
|
2945
2951
|
composed: true
|
|
2946
2952
|
});
|
|
@@ -2950,7 +2956,7 @@ class AuroFloatingUI {
|
|
|
2950
2956
|
|
|
2951
2957
|
handleClick() {
|
|
2952
2958
|
if (this.element.isPopoverVisible) {
|
|
2953
|
-
this.hideBib();
|
|
2959
|
+
this.hideBib("click");
|
|
2954
2960
|
} else {
|
|
2955
2961
|
this.showBib();
|
|
2956
2962
|
}
|
|
@@ -2986,7 +2992,7 @@ class AuroFloatingUI {
|
|
|
2986
2992
|
break;
|
|
2987
2993
|
case 'mouseleave':
|
|
2988
2994
|
if (this.element.hoverToggle) {
|
|
2989
|
-
this.hideBib();
|
|
2995
|
+
this.hideBib("mouseleave");
|
|
2990
2996
|
}
|
|
2991
2997
|
break;
|
|
2992
2998
|
case 'focus':
|
|
@@ -4374,6 +4380,9 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4374
4380
|
|
|
4375
4381
|
this.parentBorder = false;
|
|
4376
4382
|
|
|
4383
|
+
/** @private */
|
|
4384
|
+
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
4385
|
+
|
|
4377
4386
|
this.privateDefaults();
|
|
4378
4387
|
}
|
|
4379
4388
|
|
|
@@ -4807,12 +4816,14 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4807
4816
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
4808
4817
|
this.handleTriggerContentSlotChange();
|
|
4809
4818
|
}
|
|
4819
|
+
}
|
|
4810
4820
|
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4821
|
+
handleDropdownToggle(event) {
|
|
4822
|
+
this.updateFocusTrap();
|
|
4823
|
+
this.isPopoverVisible = event.detail.expanded;
|
|
4824
|
+
const eventType = event.detail.eventType || "unknown";
|
|
4825
|
+
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
4826
|
+
this.trigger.focus();
|
|
4816
4827
|
}
|
|
4817
4828
|
}
|
|
4818
4829
|
|
|
@@ -4820,6 +4831,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4820
4831
|
|
|
4821
4832
|
// Configure the floater to, this will generate the ID for the bib
|
|
4822
4833
|
this.floater.configure(this, 'auroDropdown');
|
|
4834
|
+
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
4823
4835
|
|
|
4824
4836
|
/**
|
|
4825
4837
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -10796,9 +10808,9 @@ class BaseInput extends AuroElement$2$1 {
|
|
|
10796
10808
|
if (!this.shadowRoot.contains(this.getActiveElement())) {
|
|
10797
10809
|
this.validation.validate(this);
|
|
10798
10810
|
}
|
|
10799
|
-
|
|
10800
|
-
this.notifyValueChanged();
|
|
10801
10811
|
}
|
|
10812
|
+
|
|
10813
|
+
this.notifyValueChanged();
|
|
10802
10814
|
}
|
|
10803
10815
|
|
|
10804
10816
|
if (changedProperties.has('error')) {
|
|
@@ -2795,7 +2795,7 @@ class AuroFloatingUI {
|
|
|
2795
2795
|
return;
|
|
2796
2796
|
}
|
|
2797
2797
|
|
|
2798
|
-
this.hideBib();
|
|
2798
|
+
this.hideBib("keydown");
|
|
2799
2799
|
}
|
|
2800
2800
|
|
|
2801
2801
|
setupHideHandlers() {
|
|
@@ -2820,7 +2820,7 @@ class AuroFloatingUI {
|
|
|
2820
2820
|
document.expandedAuroFormkitDropdown = null;
|
|
2821
2821
|
document.expandedAuroFloater = this;
|
|
2822
2822
|
} else {
|
|
2823
|
-
this.hideBib();
|
|
2823
|
+
this.hideBib("click");
|
|
2824
2824
|
}
|
|
2825
2825
|
}
|
|
2826
2826
|
};
|
|
@@ -2833,7 +2833,7 @@ class AuroFloatingUI {
|
|
|
2833
2833
|
// if something else is open, let it handle itself
|
|
2834
2834
|
return;
|
|
2835
2835
|
}
|
|
2836
|
-
this.hideBib();
|
|
2836
|
+
this.hideBib("keydown");
|
|
2837
2837
|
}
|
|
2838
2838
|
};
|
|
2839
2839
|
|
|
@@ -2916,7 +2916,11 @@ class AuroFloatingUI {
|
|
|
2916
2916
|
}
|
|
2917
2917
|
}
|
|
2918
2918
|
|
|
2919
|
-
|
|
2919
|
+
/**
|
|
2920
|
+
* Hides the floating UI element.
|
|
2921
|
+
* @param {String} eventType - The event type that triggered the hiding action.
|
|
2922
|
+
*/
|
|
2923
|
+
hideBib(eventType = "unknown") {
|
|
2920
2924
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
2921
2925
|
this.lockScroll(false);
|
|
2922
2926
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -2927,7 +2931,7 @@ class AuroFloatingUI {
|
|
|
2927
2931
|
if (this.showing) {
|
|
2928
2932
|
this.cleanupHideHandlers();
|
|
2929
2933
|
this.showing = false;
|
|
2930
|
-
this.dispatchEventDropdownToggle();
|
|
2934
|
+
this.dispatchEventDropdownToggle(eventType);
|
|
2931
2935
|
}
|
|
2932
2936
|
}
|
|
2933
2937
|
document.expandedAuroFloater = null;
|
|
@@ -2936,11 +2940,13 @@ class AuroFloatingUI {
|
|
|
2936
2940
|
/**
|
|
2937
2941
|
* @private
|
|
2938
2942
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
2943
|
+
* @param {String} eventType - The event type that triggered the toggle action.
|
|
2939
2944
|
*/
|
|
2940
|
-
dispatchEventDropdownToggle() {
|
|
2945
|
+
dispatchEventDropdownToggle(eventType) {
|
|
2941
2946
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
2942
2947
|
detail: {
|
|
2943
2948
|
expanded: this.showing,
|
|
2949
|
+
eventType: eventType || "unknown",
|
|
2944
2950
|
},
|
|
2945
2951
|
composed: true
|
|
2946
2952
|
});
|
|
@@ -2950,7 +2956,7 @@ class AuroFloatingUI {
|
|
|
2950
2956
|
|
|
2951
2957
|
handleClick() {
|
|
2952
2958
|
if (this.element.isPopoverVisible) {
|
|
2953
|
-
this.hideBib();
|
|
2959
|
+
this.hideBib("click");
|
|
2954
2960
|
} else {
|
|
2955
2961
|
this.showBib();
|
|
2956
2962
|
}
|
|
@@ -2986,7 +2992,7 @@ class AuroFloatingUI {
|
|
|
2986
2992
|
break;
|
|
2987
2993
|
case 'mouseleave':
|
|
2988
2994
|
if (this.element.hoverToggle) {
|
|
2989
|
-
this.hideBib();
|
|
2995
|
+
this.hideBib("mouseleave");
|
|
2990
2996
|
}
|
|
2991
2997
|
break;
|
|
2992
2998
|
case 'focus':
|
|
@@ -4374,6 +4380,9 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4374
4380
|
|
|
4375
4381
|
this.parentBorder = false;
|
|
4376
4382
|
|
|
4383
|
+
/** @private */
|
|
4384
|
+
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
4385
|
+
|
|
4377
4386
|
this.privateDefaults();
|
|
4378
4387
|
}
|
|
4379
4388
|
|
|
@@ -4807,12 +4816,14 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4807
4816
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
4808
4817
|
this.handleTriggerContentSlotChange();
|
|
4809
4818
|
}
|
|
4819
|
+
}
|
|
4810
4820
|
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4821
|
+
handleDropdownToggle(event) {
|
|
4822
|
+
this.updateFocusTrap();
|
|
4823
|
+
this.isPopoverVisible = event.detail.expanded;
|
|
4824
|
+
const eventType = event.detail.eventType || "unknown";
|
|
4825
|
+
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
4826
|
+
this.trigger.focus();
|
|
4816
4827
|
}
|
|
4817
4828
|
}
|
|
4818
4829
|
|
|
@@ -4820,6 +4831,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4820
4831
|
|
|
4821
4832
|
// Configure the floater to, this will generate the ID for the bib
|
|
4822
4833
|
this.floater.configure(this, 'auroDropdown');
|
|
4834
|
+
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
4823
4835
|
|
|
4824
4836
|
/**
|
|
4825
4837
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -10796,9 +10808,9 @@ class BaseInput extends AuroElement$2$1 {
|
|
|
10796
10808
|
if (!this.shadowRoot.contains(this.getActiveElement())) {
|
|
10797
10809
|
this.validation.validate(this);
|
|
10798
10810
|
}
|
|
10799
|
-
|
|
10800
|
-
this.notifyValueChanged();
|
|
10801
10811
|
}
|
|
10812
|
+
|
|
10813
|
+
this.notifyValueChanged();
|
|
10802
10814
|
}
|
|
10803
10815
|
|
|
10804
10816
|
if (changedProperties.has('error')) {
|
|
@@ -16,18 +16,24 @@
|
|
|
16
16
|
<head>
|
|
17
17
|
<meta charset="UTF-8" />
|
|
18
18
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
19
|
-
<title>Auro Web Component
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/auro-classic/CSSCustomProperties.css"
|
|
26
|
-
|
|
19
|
+
<title>Auro Web Component Demo | auro-counter</title>
|
|
20
|
+
|
|
21
|
+
<!-- Prism.js Stylesheet -->
|
|
22
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"/>
|
|
23
|
+
|
|
24
|
+
<!-- Legacy reference is still needed to support auro-counter's use of legacy token values at this time -->
|
|
25
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
|
|
26
|
+
|
|
27
|
+
<!-- Design Token Alaska Theme -->
|
|
28
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
|
|
29
|
+
|
|
30
|
+
<!-- Webcore Stylesheet Alaska Theme -->
|
|
31
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
|
|
32
|
+
|
|
33
|
+
<!-- Demo Specific Styles -->
|
|
27
34
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
|
|
28
35
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
|
|
29
|
-
|
|
30
|
-
</head>
|
|
36
|
+
</head>
|
|
31
37
|
<body class="auro-markdown">
|
|
32
38
|
<main></main>
|
|
33
39
|
|
|
@@ -4966,7 +4966,7 @@ class AuroFloatingUI {
|
|
|
4966
4966
|
return;
|
|
4967
4967
|
}
|
|
4968
4968
|
|
|
4969
|
-
this.hideBib();
|
|
4969
|
+
this.hideBib("keydown");
|
|
4970
4970
|
}
|
|
4971
4971
|
|
|
4972
4972
|
setupHideHandlers() {
|
|
@@ -4991,7 +4991,7 @@ class AuroFloatingUI {
|
|
|
4991
4991
|
document.expandedAuroFormkitDropdown = null;
|
|
4992
4992
|
document.expandedAuroFloater = this;
|
|
4993
4993
|
} else {
|
|
4994
|
-
this.hideBib();
|
|
4994
|
+
this.hideBib("click");
|
|
4995
4995
|
}
|
|
4996
4996
|
}
|
|
4997
4997
|
};
|
|
@@ -5004,7 +5004,7 @@ class AuroFloatingUI {
|
|
|
5004
5004
|
// if something else is open, let it handle itself
|
|
5005
5005
|
return;
|
|
5006
5006
|
}
|
|
5007
|
-
this.hideBib();
|
|
5007
|
+
this.hideBib("keydown");
|
|
5008
5008
|
}
|
|
5009
5009
|
};
|
|
5010
5010
|
|
|
@@ -5087,7 +5087,11 @@ class AuroFloatingUI {
|
|
|
5087
5087
|
}
|
|
5088
5088
|
}
|
|
5089
5089
|
|
|
5090
|
-
|
|
5090
|
+
/**
|
|
5091
|
+
* Hides the floating UI element.
|
|
5092
|
+
* @param {String} eventType - The event type that triggered the hiding action.
|
|
5093
|
+
*/
|
|
5094
|
+
hideBib(eventType = "unknown") {
|
|
5091
5095
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
5092
5096
|
this.lockScroll(false);
|
|
5093
5097
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -5098,7 +5102,7 @@ class AuroFloatingUI {
|
|
|
5098
5102
|
if (this.showing) {
|
|
5099
5103
|
this.cleanupHideHandlers();
|
|
5100
5104
|
this.showing = false;
|
|
5101
|
-
this.dispatchEventDropdownToggle();
|
|
5105
|
+
this.dispatchEventDropdownToggle(eventType);
|
|
5102
5106
|
}
|
|
5103
5107
|
}
|
|
5104
5108
|
document.expandedAuroFloater = null;
|
|
@@ -5107,11 +5111,13 @@ class AuroFloatingUI {
|
|
|
5107
5111
|
/**
|
|
5108
5112
|
* @private
|
|
5109
5113
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
5114
|
+
* @param {String} eventType - The event type that triggered the toggle action.
|
|
5110
5115
|
*/
|
|
5111
|
-
dispatchEventDropdownToggle() {
|
|
5116
|
+
dispatchEventDropdownToggle(eventType) {
|
|
5112
5117
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
5113
5118
|
detail: {
|
|
5114
5119
|
expanded: this.showing,
|
|
5120
|
+
eventType: eventType || "unknown",
|
|
5115
5121
|
},
|
|
5116
5122
|
composed: true
|
|
5117
5123
|
});
|
|
@@ -5121,7 +5127,7 @@ class AuroFloatingUI {
|
|
|
5121
5127
|
|
|
5122
5128
|
handleClick() {
|
|
5123
5129
|
if (this.element.isPopoverVisible) {
|
|
5124
|
-
this.hideBib();
|
|
5130
|
+
this.hideBib("click");
|
|
5125
5131
|
} else {
|
|
5126
5132
|
this.showBib();
|
|
5127
5133
|
}
|
|
@@ -5157,7 +5163,7 @@ class AuroFloatingUI {
|
|
|
5157
5163
|
break;
|
|
5158
5164
|
case 'mouseleave':
|
|
5159
5165
|
if (this.element.hoverToggle) {
|
|
5160
|
-
this.hideBib();
|
|
5166
|
+
this.hideBib("mouseleave");
|
|
5161
5167
|
}
|
|
5162
5168
|
break;
|
|
5163
5169
|
case 'focus':
|
|
@@ -6545,6 +6551,9 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6545
6551
|
|
|
6546
6552
|
this.parentBorder = false;
|
|
6547
6553
|
|
|
6554
|
+
/** @private */
|
|
6555
|
+
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
6556
|
+
|
|
6548
6557
|
this.privateDefaults();
|
|
6549
6558
|
}
|
|
6550
6559
|
|
|
@@ -6978,12 +6987,14 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6978
6987
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
6979
6988
|
this.handleTriggerContentSlotChange();
|
|
6980
6989
|
}
|
|
6990
|
+
}
|
|
6981
6991
|
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6992
|
+
handleDropdownToggle(event) {
|
|
6993
|
+
this.updateFocusTrap();
|
|
6994
|
+
this.isPopoverVisible = event.detail.expanded;
|
|
6995
|
+
const eventType = event.detail.eventType || "unknown";
|
|
6996
|
+
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
6997
|
+
this.trigger.focus();
|
|
6987
6998
|
}
|
|
6988
6999
|
}
|
|
6989
7000
|
|
|
@@ -6991,6 +7002,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6991
7002
|
|
|
6992
7003
|
// Configure the floater to, this will generate the ID for the bib
|
|
6993
7004
|
this.floater.configure(this, 'auroDropdown');
|
|
7005
|
+
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
6994
7006
|
|
|
6995
7007
|
/**
|
|
6996
7008
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -16,18 +16,24 @@
|
|
|
16
16
|
<head>
|
|
17
17
|
<meta charset="UTF-8" />
|
|
18
18
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
19
|
-
<title>Auro Web Component
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/auro-classic/CSSCustomProperties.css"
|
|
26
|
-
|
|
19
|
+
<title>Auro Web Component Demo | auro-counter</title>
|
|
20
|
+
|
|
21
|
+
<!-- Prism.js Stylesheet -->
|
|
22
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"/>
|
|
23
|
+
|
|
24
|
+
<!-- Legacy reference is still needed to support auro-counter's use of legacy token values at this time -->
|
|
25
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
|
|
26
|
+
|
|
27
|
+
<!-- Design Token Alaska Theme -->
|
|
28
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
|
|
29
|
+
|
|
30
|
+
<!-- Webcore Stylesheet Alaska Theme -->
|
|
31
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
|
|
32
|
+
|
|
33
|
+
<!-- Demo Specific Styles -->
|
|
27
34
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
|
|
28
35
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
|
|
29
|
-
|
|
30
|
-
</head>
|
|
36
|
+
</head>
|
|
31
37
|
<body class="auro-markdown">
|
|
32
38
|
<main></main>
|
|
33
39
|
|