@aurodesignsystem-dev/auro-formkit 0.0.0-pr783.1 → 0.0.0-pr785.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/checkbox/demo/api.html +10 -16
- package/components/checkbox/demo/api.min.js +2 -2
- package/components/checkbox/demo/index.html +10 -16
- package/components/checkbox/demo/index.min.js +2 -2
- package/components/checkbox/demo/readme.html +9 -16
- package/components/checkbox/dist/index.js +2 -2
- package/components/checkbox/dist/registered.js +2 -2
- package/components/combobox/demo/api.html +10 -16
- package/components/combobox/demo/api.min.js +15 -32
- package/components/combobox/demo/index.html +10 -16
- package/components/combobox/demo/index.min.js +15 -32
- package/components/combobox/demo/readme.html +9 -16
- package/components/combobox/dist/index.js +15 -32
- package/components/combobox/dist/registered.js +15 -32
- package/components/counter/demo/api.html +10 -16
- package/components/counter/demo/api.min.js +13 -31
- package/components/counter/demo/index.html +10 -16
- package/components/counter/demo/index.min.js +13 -31
- package/components/counter/demo/readme.html +9 -16
- package/components/counter/dist/index.js +13 -31
- package/components/counter/dist/registered.js +13 -31
- package/components/datepicker/demo/api.html +10 -16
- package/components/datepicker/demo/api.md +1 -0
- package/components/datepicker/demo/api.min.js +16 -44
- package/components/datepicker/demo/index.html +10 -16
- package/components/datepicker/demo/index.min.js +16 -44
- package/components/datepicker/demo/readme.html +9 -16
- package/components/datepicker/dist/auro-datepicker.d.ts +2 -3
- package/components/datepicker/dist/index.js +16 -44
- package/components/datepicker/dist/registered.js +16 -44
- package/components/dropdown/demo/api.html +10 -16
- package/components/dropdown/demo/api.min.js +13 -30
- package/components/dropdown/demo/index.html +10 -16
- package/components/dropdown/demo/index.min.js +13 -30
- package/components/dropdown/demo/readme.html +9 -16
- package/components/dropdown/dist/auro-dropdown.d.ts +0 -6
- package/components/dropdown/dist/index.js +13 -30
- package/components/dropdown/dist/registered.js +13 -30
- package/components/form/demo/api.html +9 -16
- package/components/form/demo/autocomplete.html +3 -19
- package/components/form/demo/index.html +9 -16
- package/components/form/demo/readme.html +9 -16
- package/components/form/demo/working.html +13 -19
- package/components/input/demo/api.html +10 -16
- package/components/input/demo/api.min.js +2 -2
- package/components/input/demo/index.html +10 -16
- package/components/input/demo/index.min.js +2 -2
- package/components/input/demo/readme.html +9 -16
- package/components/input/dist/index.js +2 -2
- package/components/input/dist/registered.js +2 -2
- package/components/menu/demo/api.html +32 -16
- package/components/menu/demo/index.html +10 -16
- package/components/menu/demo/readme.html +9 -16
- package/components/radio/demo/api.html +10 -16
- package/components/radio/demo/index.html +10 -16
- package/components/radio/demo/readme.html +9 -16
- package/components/select/demo/api.html +10 -16
- package/components/select/demo/api.min.js +13 -30
- package/components/select/demo/index.html +11 -16
- package/components/select/demo/index.min.js +13 -30
- package/components/select/demo/readme.html +9 -16
- package/components/select/dist/index.js +13 -30
- package/components/select/dist/registered.js +13 -30
- package/package.json +3 -4
|
@@ -3020,7 +3020,6 @@ class AuroCounter extends i$2 {
|
|
|
3020
3020
|
aria-describedby="counter-description"
|
|
3021
3021
|
tabindex="${this.disabled ? '-1' : '0'}"
|
|
3022
3022
|
role="spinbutton"
|
|
3023
|
-
aria-disabled="${this.disabled ? 'true' : 'false'}"
|
|
3024
3023
|
aria-valuemin="${this.min}"
|
|
3025
3024
|
aria-valuemax="${this.max}"
|
|
3026
3025
|
aria-valuenow="${this.value}"
|
|
@@ -4967,7 +4966,7 @@ class AuroFloatingUI {
|
|
|
4967
4966
|
return;
|
|
4968
4967
|
}
|
|
4969
4968
|
|
|
4970
|
-
this.hideBib(
|
|
4969
|
+
this.hideBib();
|
|
4971
4970
|
}
|
|
4972
4971
|
|
|
4973
4972
|
setupHideHandlers() {
|
|
@@ -4992,7 +4991,7 @@ class AuroFloatingUI {
|
|
|
4992
4991
|
document.expandedAuroFormkitDropdown = null;
|
|
4993
4992
|
document.expandedAuroFloater = this;
|
|
4994
4993
|
} else {
|
|
4995
|
-
this.hideBib(
|
|
4994
|
+
this.hideBib();
|
|
4996
4995
|
}
|
|
4997
4996
|
}
|
|
4998
4997
|
};
|
|
@@ -5005,7 +5004,7 @@ class AuroFloatingUI {
|
|
|
5005
5004
|
// if something else is open, let it handle itself
|
|
5006
5005
|
return;
|
|
5007
5006
|
}
|
|
5008
|
-
this.hideBib(
|
|
5007
|
+
this.hideBib();
|
|
5009
5008
|
}
|
|
5010
5009
|
};
|
|
5011
5010
|
|
|
@@ -5088,11 +5087,7 @@ class AuroFloatingUI {
|
|
|
5088
5087
|
}
|
|
5089
5088
|
}
|
|
5090
5089
|
|
|
5091
|
-
|
|
5092
|
-
* Hides the floating UI element.
|
|
5093
|
-
* @param {String} eventType - The event type that triggered the hiding action.
|
|
5094
|
-
*/
|
|
5095
|
-
hideBib(eventType = "unknown") {
|
|
5090
|
+
hideBib() {
|
|
5096
5091
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
5097
5092
|
this.lockScroll(false);
|
|
5098
5093
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -5103,7 +5098,7 @@ class AuroFloatingUI {
|
|
|
5103
5098
|
if (this.showing) {
|
|
5104
5099
|
this.cleanupHideHandlers();
|
|
5105
5100
|
this.showing = false;
|
|
5106
|
-
this.dispatchEventDropdownToggle(
|
|
5101
|
+
this.dispatchEventDropdownToggle();
|
|
5107
5102
|
}
|
|
5108
5103
|
}
|
|
5109
5104
|
document.expandedAuroFloater = null;
|
|
@@ -5112,13 +5107,11 @@ class AuroFloatingUI {
|
|
|
5112
5107
|
/**
|
|
5113
5108
|
* @private
|
|
5114
5109
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
5115
|
-
* @param {String} eventType - The event type that triggered the toggle action.
|
|
5116
5110
|
*/
|
|
5117
|
-
dispatchEventDropdownToggle(
|
|
5111
|
+
dispatchEventDropdownToggle() {
|
|
5118
5112
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
5119
5113
|
detail: {
|
|
5120
5114
|
expanded: this.showing,
|
|
5121
|
-
eventType: eventType || "unknown",
|
|
5122
5115
|
},
|
|
5123
5116
|
composed: true
|
|
5124
5117
|
});
|
|
@@ -5128,7 +5121,7 @@ class AuroFloatingUI {
|
|
|
5128
5121
|
|
|
5129
5122
|
handleClick() {
|
|
5130
5123
|
if (this.element.isPopoverVisible) {
|
|
5131
|
-
this.hideBib(
|
|
5124
|
+
this.hideBib();
|
|
5132
5125
|
} else {
|
|
5133
5126
|
this.showBib();
|
|
5134
5127
|
}
|
|
@@ -5164,7 +5157,7 @@ class AuroFloatingUI {
|
|
|
5164
5157
|
break;
|
|
5165
5158
|
case 'mouseleave':
|
|
5166
5159
|
if (this.element.hoverToggle) {
|
|
5167
|
-
this.hideBib(
|
|
5160
|
+
this.hideBib();
|
|
5168
5161
|
}
|
|
5169
5162
|
break;
|
|
5170
5163
|
case 'focus':
|
|
@@ -6552,9 +6545,6 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6552
6545
|
|
|
6553
6546
|
this.parentBorder = false;
|
|
6554
6547
|
|
|
6555
|
-
/** @private */
|
|
6556
|
-
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
6557
|
-
|
|
6558
6548
|
this.privateDefaults();
|
|
6559
6549
|
}
|
|
6560
6550
|
|
|
@@ -6988,19 +6978,12 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6988
6978
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
6989
6979
|
this.handleTriggerContentSlotChange();
|
|
6990
6980
|
}
|
|
6991
|
-
}
|
|
6992
6981
|
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
handleDropdownToggle(event) {
|
|
6999
|
-
this.updateFocusTrap();
|
|
7000
|
-
this.isPopoverVisible = event.detail.expanded;
|
|
7001
|
-
const eventType = event.detail.eventType || "unknown";
|
|
7002
|
-
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
7003
|
-
this.trigger.focus();
|
|
6982
|
+
if (changedProperties.has('isPopoverVisible')) {
|
|
6983
|
+
this.updateFocusTrap();
|
|
6984
|
+
if (!this.isPopoverVisible && this.hasFocus) {
|
|
6985
|
+
this.trigger.focus();
|
|
6986
|
+
}
|
|
7004
6987
|
}
|
|
7005
6988
|
}
|
|
7006
6989
|
|
|
@@ -7008,7 +6991,6 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
7008
6991
|
|
|
7009
6992
|
// Configure the floater to, this will generate the ID for the bib
|
|
7010
6993
|
this.floater.configure(this, 'auroDropdown');
|
|
7011
|
-
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
7012
6994
|
|
|
7013
6995
|
/**
|
|
7014
6996
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -16,24 +16,17 @@
|
|
|
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"
|
|
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 -->
|
|
19
|
+
<title>Auro Web Component Generator | auro-counter custom element</title>
|
|
20
|
+
<link
|
|
21
|
+
rel="stylesheet"
|
|
22
|
+
type="text/css"
|
|
23
|
+
href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"
|
|
24
|
+
/>
|
|
25
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/auro-classic/CSSCustomProperties.css">
|
|
26
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/alaska/CSSCustomProperties--alaska.css">
|
|
34
27
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
|
|
35
28
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
|
|
36
|
-
</head>
|
|
29
|
+
</head>
|
|
37
30
|
<body class="auro-markdown">
|
|
38
31
|
<main></main>
|
|
39
32
|
|
|
@@ -2973,7 +2973,6 @@ class AuroCounter extends LitElement {
|
|
|
2973
2973
|
aria-describedby="counter-description"
|
|
2974
2974
|
tabindex="${this.disabled ? '-1' : '0'}"
|
|
2975
2975
|
role="spinbutton"
|
|
2976
|
-
aria-disabled="${this.disabled ? 'true' : 'false'}"
|
|
2977
2976
|
aria-valuemin="${this.min}"
|
|
2978
2977
|
aria-valuemax="${this.max}"
|
|
2979
2978
|
aria-valuenow="${this.value}"
|
|
@@ -4920,7 +4919,7 @@ class AuroFloatingUI {
|
|
|
4920
4919
|
return;
|
|
4921
4920
|
}
|
|
4922
4921
|
|
|
4923
|
-
this.hideBib(
|
|
4922
|
+
this.hideBib();
|
|
4924
4923
|
}
|
|
4925
4924
|
|
|
4926
4925
|
setupHideHandlers() {
|
|
@@ -4945,7 +4944,7 @@ class AuroFloatingUI {
|
|
|
4945
4944
|
document.expandedAuroFormkitDropdown = null;
|
|
4946
4945
|
document.expandedAuroFloater = this;
|
|
4947
4946
|
} else {
|
|
4948
|
-
this.hideBib(
|
|
4947
|
+
this.hideBib();
|
|
4949
4948
|
}
|
|
4950
4949
|
}
|
|
4951
4950
|
};
|
|
@@ -4958,7 +4957,7 @@ class AuroFloatingUI {
|
|
|
4958
4957
|
// if something else is open, let it handle itself
|
|
4959
4958
|
return;
|
|
4960
4959
|
}
|
|
4961
|
-
this.hideBib(
|
|
4960
|
+
this.hideBib();
|
|
4962
4961
|
}
|
|
4963
4962
|
};
|
|
4964
4963
|
|
|
@@ -5041,11 +5040,7 @@ class AuroFloatingUI {
|
|
|
5041
5040
|
}
|
|
5042
5041
|
}
|
|
5043
5042
|
|
|
5044
|
-
|
|
5045
|
-
* Hides the floating UI element.
|
|
5046
|
-
* @param {String} eventType - The event type that triggered the hiding action.
|
|
5047
|
-
*/
|
|
5048
|
-
hideBib(eventType = "unknown") {
|
|
5043
|
+
hideBib() {
|
|
5049
5044
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
5050
5045
|
this.lockScroll(false);
|
|
5051
5046
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -5056,7 +5051,7 @@ class AuroFloatingUI {
|
|
|
5056
5051
|
if (this.showing) {
|
|
5057
5052
|
this.cleanupHideHandlers();
|
|
5058
5053
|
this.showing = false;
|
|
5059
|
-
this.dispatchEventDropdownToggle(
|
|
5054
|
+
this.dispatchEventDropdownToggle();
|
|
5060
5055
|
}
|
|
5061
5056
|
}
|
|
5062
5057
|
document.expandedAuroFloater = null;
|
|
@@ -5065,13 +5060,11 @@ class AuroFloatingUI {
|
|
|
5065
5060
|
/**
|
|
5066
5061
|
* @private
|
|
5067
5062
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
5068
|
-
* @param {String} eventType - The event type that triggered the toggle action.
|
|
5069
5063
|
*/
|
|
5070
|
-
dispatchEventDropdownToggle(
|
|
5064
|
+
dispatchEventDropdownToggle() {
|
|
5071
5065
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
5072
5066
|
detail: {
|
|
5073
5067
|
expanded: this.showing,
|
|
5074
|
-
eventType: eventType || "unknown",
|
|
5075
5068
|
},
|
|
5076
5069
|
composed: true
|
|
5077
5070
|
});
|
|
@@ -5081,7 +5074,7 @@ class AuroFloatingUI {
|
|
|
5081
5074
|
|
|
5082
5075
|
handleClick() {
|
|
5083
5076
|
if (this.element.isPopoverVisible) {
|
|
5084
|
-
this.hideBib(
|
|
5077
|
+
this.hideBib();
|
|
5085
5078
|
} else {
|
|
5086
5079
|
this.showBib();
|
|
5087
5080
|
}
|
|
@@ -5117,7 +5110,7 @@ class AuroFloatingUI {
|
|
|
5117
5110
|
break;
|
|
5118
5111
|
case 'mouseleave':
|
|
5119
5112
|
if (this.element.hoverToggle) {
|
|
5120
|
-
this.hideBib(
|
|
5113
|
+
this.hideBib();
|
|
5121
5114
|
}
|
|
5122
5115
|
break;
|
|
5123
5116
|
case 'focus':
|
|
@@ -6505,9 +6498,6 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6505
6498
|
|
|
6506
6499
|
this.parentBorder = false;
|
|
6507
6500
|
|
|
6508
|
-
/** @private */
|
|
6509
|
-
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
6510
|
-
|
|
6511
6501
|
this.privateDefaults();
|
|
6512
6502
|
}
|
|
6513
6503
|
|
|
@@ -6941,19 +6931,12 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6941
6931
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
6942
6932
|
this.handleTriggerContentSlotChange();
|
|
6943
6933
|
}
|
|
6944
|
-
}
|
|
6945
6934
|
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
handleDropdownToggle(event) {
|
|
6952
|
-
this.updateFocusTrap();
|
|
6953
|
-
this.isPopoverVisible = event.detail.expanded;
|
|
6954
|
-
const eventType = event.detail.eventType || "unknown";
|
|
6955
|
-
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
6956
|
-
this.trigger.focus();
|
|
6935
|
+
if (changedProperties.has('isPopoverVisible')) {
|
|
6936
|
+
this.updateFocusTrap();
|
|
6937
|
+
if (!this.isPopoverVisible && this.hasFocus) {
|
|
6938
|
+
this.trigger.focus();
|
|
6939
|
+
}
|
|
6957
6940
|
}
|
|
6958
6941
|
}
|
|
6959
6942
|
|
|
@@ -6961,7 +6944,6 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6961
6944
|
|
|
6962
6945
|
// Configure the floater to, this will generate the ID for the bib
|
|
6963
6946
|
this.floater.configure(this, 'auroDropdown');
|
|
6964
|
-
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
6965
6947
|
|
|
6966
6948
|
/**
|
|
6967
6949
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -2973,7 +2973,6 @@ class AuroCounter extends LitElement {
|
|
|
2973
2973
|
aria-describedby="counter-description"
|
|
2974
2974
|
tabindex="${this.disabled ? '-1' : '0'}"
|
|
2975
2975
|
role="spinbutton"
|
|
2976
|
-
aria-disabled="${this.disabled ? 'true' : 'false'}"
|
|
2977
2976
|
aria-valuemin="${this.min}"
|
|
2978
2977
|
aria-valuemax="${this.max}"
|
|
2979
2978
|
aria-valuenow="${this.value}"
|
|
@@ -4920,7 +4919,7 @@ class AuroFloatingUI {
|
|
|
4920
4919
|
return;
|
|
4921
4920
|
}
|
|
4922
4921
|
|
|
4923
|
-
this.hideBib(
|
|
4922
|
+
this.hideBib();
|
|
4924
4923
|
}
|
|
4925
4924
|
|
|
4926
4925
|
setupHideHandlers() {
|
|
@@ -4945,7 +4944,7 @@ class AuroFloatingUI {
|
|
|
4945
4944
|
document.expandedAuroFormkitDropdown = null;
|
|
4946
4945
|
document.expandedAuroFloater = this;
|
|
4947
4946
|
} else {
|
|
4948
|
-
this.hideBib(
|
|
4947
|
+
this.hideBib();
|
|
4949
4948
|
}
|
|
4950
4949
|
}
|
|
4951
4950
|
};
|
|
@@ -4958,7 +4957,7 @@ class AuroFloatingUI {
|
|
|
4958
4957
|
// if something else is open, let it handle itself
|
|
4959
4958
|
return;
|
|
4960
4959
|
}
|
|
4961
|
-
this.hideBib(
|
|
4960
|
+
this.hideBib();
|
|
4962
4961
|
}
|
|
4963
4962
|
};
|
|
4964
4963
|
|
|
@@ -5041,11 +5040,7 @@ class AuroFloatingUI {
|
|
|
5041
5040
|
}
|
|
5042
5041
|
}
|
|
5043
5042
|
|
|
5044
|
-
|
|
5045
|
-
* Hides the floating UI element.
|
|
5046
|
-
* @param {String} eventType - The event type that triggered the hiding action.
|
|
5047
|
-
*/
|
|
5048
|
-
hideBib(eventType = "unknown") {
|
|
5043
|
+
hideBib() {
|
|
5049
5044
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
5050
5045
|
this.lockScroll(false);
|
|
5051
5046
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -5056,7 +5051,7 @@ class AuroFloatingUI {
|
|
|
5056
5051
|
if (this.showing) {
|
|
5057
5052
|
this.cleanupHideHandlers();
|
|
5058
5053
|
this.showing = false;
|
|
5059
|
-
this.dispatchEventDropdownToggle(
|
|
5054
|
+
this.dispatchEventDropdownToggle();
|
|
5060
5055
|
}
|
|
5061
5056
|
}
|
|
5062
5057
|
document.expandedAuroFloater = null;
|
|
@@ -5065,13 +5060,11 @@ class AuroFloatingUI {
|
|
|
5065
5060
|
/**
|
|
5066
5061
|
* @private
|
|
5067
5062
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
5068
|
-
* @param {String} eventType - The event type that triggered the toggle action.
|
|
5069
5063
|
*/
|
|
5070
|
-
dispatchEventDropdownToggle(
|
|
5064
|
+
dispatchEventDropdownToggle() {
|
|
5071
5065
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
5072
5066
|
detail: {
|
|
5073
5067
|
expanded: this.showing,
|
|
5074
|
-
eventType: eventType || "unknown",
|
|
5075
5068
|
},
|
|
5076
5069
|
composed: true
|
|
5077
5070
|
});
|
|
@@ -5081,7 +5074,7 @@ class AuroFloatingUI {
|
|
|
5081
5074
|
|
|
5082
5075
|
handleClick() {
|
|
5083
5076
|
if (this.element.isPopoverVisible) {
|
|
5084
|
-
this.hideBib(
|
|
5077
|
+
this.hideBib();
|
|
5085
5078
|
} else {
|
|
5086
5079
|
this.showBib();
|
|
5087
5080
|
}
|
|
@@ -5117,7 +5110,7 @@ class AuroFloatingUI {
|
|
|
5117
5110
|
break;
|
|
5118
5111
|
case 'mouseleave':
|
|
5119
5112
|
if (this.element.hoverToggle) {
|
|
5120
|
-
this.hideBib(
|
|
5113
|
+
this.hideBib();
|
|
5121
5114
|
}
|
|
5122
5115
|
break;
|
|
5123
5116
|
case 'focus':
|
|
@@ -6505,9 +6498,6 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6505
6498
|
|
|
6506
6499
|
this.parentBorder = false;
|
|
6507
6500
|
|
|
6508
|
-
/** @private */
|
|
6509
|
-
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
6510
|
-
|
|
6511
6501
|
this.privateDefaults();
|
|
6512
6502
|
}
|
|
6513
6503
|
|
|
@@ -6941,19 +6931,12 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6941
6931
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
6942
6932
|
this.handleTriggerContentSlotChange();
|
|
6943
6933
|
}
|
|
6944
|
-
}
|
|
6945
6934
|
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
handleDropdownToggle(event) {
|
|
6952
|
-
this.updateFocusTrap();
|
|
6953
|
-
this.isPopoverVisible = event.detail.expanded;
|
|
6954
|
-
const eventType = event.detail.eventType || "unknown";
|
|
6955
|
-
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
6956
|
-
this.trigger.focus();
|
|
6935
|
+
if (changedProperties.has('isPopoverVisible')) {
|
|
6936
|
+
this.updateFocusTrap();
|
|
6937
|
+
if (!this.isPopoverVisible && this.hasFocus) {
|
|
6938
|
+
this.trigger.focus();
|
|
6939
|
+
}
|
|
6957
6940
|
}
|
|
6958
6941
|
}
|
|
6959
6942
|
|
|
@@ -6961,7 +6944,6 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6961
6944
|
|
|
6962
6945
|
// Configure the floater to, this will generate the ID for the bib
|
|
6963
6946
|
this.floater.configure(this, 'auroDropdown');
|
|
6964
|
-
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
6965
6947
|
|
|
6966
6948
|
/**
|
|
6967
6949
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -16,24 +16,18 @@
|
|
|
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"
|
|
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 -->
|
|
19
|
+
<title>Auro Web Component Generator | auro-datepicker custom element</title>
|
|
20
|
+
<link
|
|
21
|
+
rel="stylesheet"
|
|
22
|
+
type="text/css"
|
|
23
|
+
href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"
|
|
24
|
+
/>
|
|
25
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/auro-classic/CSSCustomProperties.css">
|
|
26
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/alaska/CSSCustomProperties--alaska.css">
|
|
34
27
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
|
|
35
28
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
|
|
36
|
-
|
|
29
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/essentials-as.css" />
|
|
30
|
+
</head>
|
|
37
31
|
<body class="auro-markdown">
|
|
38
32
|
<main></main>
|
|
39
33
|
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
| Method | Type | Description |
|
|
52
52
|
|-------------------------------|----------------------------------------|--------------------------------------------------|
|
|
53
53
|
| [focus](#focus) | `(focusInput: string): void` | Focuses the datepicker trigger input.<br /><br />**focusInput**: Pass in `endDate` to focus on the return input. No parameter is needed to focus on the depart input. |
|
|
54
|
+
| [formatShortDate](#formatShortDate) | `(date: any): string` | Simple formatter that ONLY WORKS FOR US DATES.<br />Returns formatted date like Apr 21 or Dec 25.<br /><br />**date**: undefined |
|
|
54
55
|
| [renderHtmlActionClear](#renderHtmlActionClear) | `(): TemplateResult` | |
|
|
55
56
|
| [renderHtmlIconCalendar](#renderHtmlIconCalendar) | `(): TemplateResult` | |
|
|
56
57
|
| [renderHtmlIconError](#renderHtmlIconError) | `(): TemplateResult` | |
|
|
@@ -16323,7 +16323,7 @@ class AuroFloatingUI {
|
|
|
16323
16323
|
return;
|
|
16324
16324
|
}
|
|
16325
16325
|
|
|
16326
|
-
this.hideBib(
|
|
16326
|
+
this.hideBib();
|
|
16327
16327
|
}
|
|
16328
16328
|
|
|
16329
16329
|
setupHideHandlers() {
|
|
@@ -16348,7 +16348,7 @@ class AuroFloatingUI {
|
|
|
16348
16348
|
document.expandedAuroFormkitDropdown = null;
|
|
16349
16349
|
document.expandedAuroFloater = this;
|
|
16350
16350
|
} else {
|
|
16351
|
-
this.hideBib(
|
|
16351
|
+
this.hideBib();
|
|
16352
16352
|
}
|
|
16353
16353
|
}
|
|
16354
16354
|
};
|
|
@@ -16361,7 +16361,7 @@ class AuroFloatingUI {
|
|
|
16361
16361
|
// if something else is open, let it handle itself
|
|
16362
16362
|
return;
|
|
16363
16363
|
}
|
|
16364
|
-
this.hideBib(
|
|
16364
|
+
this.hideBib();
|
|
16365
16365
|
}
|
|
16366
16366
|
};
|
|
16367
16367
|
|
|
@@ -16444,11 +16444,7 @@ class AuroFloatingUI {
|
|
|
16444
16444
|
}
|
|
16445
16445
|
}
|
|
16446
16446
|
|
|
16447
|
-
|
|
16448
|
-
* Hides the floating UI element.
|
|
16449
|
-
* @param {String} eventType - The event type that triggered the hiding action.
|
|
16450
|
-
*/
|
|
16451
|
-
hideBib(eventType = "unknown") {
|
|
16447
|
+
hideBib() {
|
|
16452
16448
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
16453
16449
|
this.lockScroll(false);
|
|
16454
16450
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -16459,7 +16455,7 @@ class AuroFloatingUI {
|
|
|
16459
16455
|
if (this.showing) {
|
|
16460
16456
|
this.cleanupHideHandlers();
|
|
16461
16457
|
this.showing = false;
|
|
16462
|
-
this.dispatchEventDropdownToggle(
|
|
16458
|
+
this.dispatchEventDropdownToggle();
|
|
16463
16459
|
}
|
|
16464
16460
|
}
|
|
16465
16461
|
document.expandedAuroFloater = null;
|
|
@@ -16468,13 +16464,11 @@ class AuroFloatingUI {
|
|
|
16468
16464
|
/**
|
|
16469
16465
|
* @private
|
|
16470
16466
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
16471
|
-
* @param {String} eventType - The event type that triggered the toggle action.
|
|
16472
16467
|
*/
|
|
16473
|
-
dispatchEventDropdownToggle(
|
|
16468
|
+
dispatchEventDropdownToggle() {
|
|
16474
16469
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
16475
16470
|
detail: {
|
|
16476
16471
|
expanded: this.showing,
|
|
16477
|
-
eventType: eventType || "unknown",
|
|
16478
16472
|
},
|
|
16479
16473
|
composed: true
|
|
16480
16474
|
});
|
|
@@ -16484,7 +16478,7 @@ class AuroFloatingUI {
|
|
|
16484
16478
|
|
|
16485
16479
|
handleClick() {
|
|
16486
16480
|
if (this.element.isPopoverVisible) {
|
|
16487
|
-
this.hideBib(
|
|
16481
|
+
this.hideBib();
|
|
16488
16482
|
} else {
|
|
16489
16483
|
this.showBib();
|
|
16490
16484
|
}
|
|
@@ -16520,7 +16514,7 @@ class AuroFloatingUI {
|
|
|
16520
16514
|
break;
|
|
16521
16515
|
case 'mouseleave':
|
|
16522
16516
|
if (this.element.hoverToggle) {
|
|
16523
|
-
this.hideBib(
|
|
16517
|
+
this.hideBib();
|
|
16524
16518
|
}
|
|
16525
16519
|
break;
|
|
16526
16520
|
case 'focus':
|
|
@@ -17908,9 +17902,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
17908
17902
|
|
|
17909
17903
|
this.parentBorder = false;
|
|
17910
17904
|
|
|
17911
|
-
/** @private */
|
|
17912
|
-
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
17913
|
-
|
|
17914
17905
|
this.privateDefaults();
|
|
17915
17906
|
}
|
|
17916
17907
|
|
|
@@ -18344,19 +18335,12 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
18344
18335
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
18345
18336
|
this.handleTriggerContentSlotChange();
|
|
18346
18337
|
}
|
|
18347
|
-
}
|
|
18348
18338
|
|
|
18349
|
-
|
|
18350
|
-
|
|
18351
|
-
|
|
18352
|
-
|
|
18353
|
-
|
|
18354
|
-
handleDropdownToggle(event) {
|
|
18355
|
-
this.updateFocusTrap();
|
|
18356
|
-
this.isPopoverVisible = event.detail.expanded;
|
|
18357
|
-
const eventType = event.detail.eventType || "unknown";
|
|
18358
|
-
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
18359
|
-
this.trigger.focus();
|
|
18339
|
+
if (changedProperties.has('isPopoverVisible')) {
|
|
18340
|
+
this.updateFocusTrap();
|
|
18341
|
+
if (!this.isPopoverVisible && this.hasFocus) {
|
|
18342
|
+
this.trigger.focus();
|
|
18343
|
+
}
|
|
18360
18344
|
}
|
|
18361
18345
|
}
|
|
18362
18346
|
|
|
@@ -18364,7 +18348,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
18364
18348
|
|
|
18365
18349
|
// Configure the floater to, this will generate the ID for the bib
|
|
18366
18350
|
this.floater.configure(this, 'auroDropdown');
|
|
18367
|
-
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
18368
18351
|
|
|
18369
18352
|
/**
|
|
18370
18353
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -24354,9 +24337,9 @@ class BaseInput extends AuroElement$2 {
|
|
|
24354
24337
|
if (!this.shadowRoot.contains(this.getActiveElement())) {
|
|
24355
24338
|
this.validation.validate(this);
|
|
24356
24339
|
}
|
|
24357
|
-
}
|
|
24358
24340
|
|
|
24359
|
-
|
|
24341
|
+
this.notifyValueChanged();
|
|
24342
|
+
}
|
|
24360
24343
|
}
|
|
24361
24344
|
|
|
24362
24345
|
if (changedProperties.has('error')) {
|
|
@@ -27990,15 +27973,6 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
27990
27973
|
this.layout = 'classic';
|
|
27991
27974
|
this.shape = 'classic';
|
|
27992
27975
|
this.size = 'lg';
|
|
27993
|
-
|
|
27994
|
-
/**
|
|
27995
|
-
* @private
|
|
27996
|
-
* @property {boolean} delegatesFocus - Whether the shadow root delegates focus.
|
|
27997
|
-
*/
|
|
27998
|
-
this.constructor.shadowRootOptions = {
|
|
27999
|
-
...i.shadowRootOptions,
|
|
28000
|
-
delegatesFocus: true,
|
|
28001
|
-
};
|
|
28002
27976
|
}
|
|
28003
27977
|
|
|
28004
27978
|
// This function is to define props used within the scope of this component
|
|
@@ -28736,7 +28710,6 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
28736
28710
|
}
|
|
28737
28711
|
|
|
28738
28712
|
this.hasFocus = true;
|
|
28739
|
-
this.dropdown.show();
|
|
28740
28713
|
|
|
28741
28714
|
// shadowroot active element is null if we focus the datepicker itself
|
|
28742
28715
|
if (this.shadowRoot.activeElement === null) {
|
|
@@ -29080,8 +29053,7 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
29080
29053
|
/**
|
|
29081
29054
|
* Simple formatter that ONLY WORKS FOR US DATES.
|
|
29082
29055
|
* Returns formatted date like Apr 21 or Dec 25.
|
|
29083
|
-
* @
|
|
29084
|
-
* @param {string} date - Date format should be in a format Date constructor accepts, like '2023-04-21' or '2023/04/21'.
|
|
29056
|
+
* @param date
|
|
29085
29057
|
* @return {string}
|
|
29086
29058
|
*/
|
|
29087
29059
|
formatShortDate(date) {
|
|
@@ -16,24 +16,18 @@
|
|
|
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"
|
|
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 -->
|
|
19
|
+
<title>Auro Web Component Generator | auro-datepicker custom element</title>
|
|
20
|
+
<link
|
|
21
|
+
rel="stylesheet"
|
|
22
|
+
type="text/css"
|
|
23
|
+
href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"
|
|
24
|
+
/>
|
|
25
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/auro-classic/CSSCustomProperties.css">
|
|
26
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/alaska/CSSCustomProperties--alaska.css">
|
|
34
27
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
|
|
35
28
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
|
|
36
|
-
|
|
29
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/essentials-as.css" />
|
|
30
|
+
</head>
|
|
37
31
|
<body class="auro-markdown">
|
|
38
32
|
<main></main>
|
|
39
33
|
|