@aurodesignsystem-dev/auro-formkit 0.0.0-pr784.0 → 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 +7 -18
- package/components/checkbox/demo/index.html +10 -16
- package/components/checkbox/demo/index.min.js +7 -18
- package/components/checkbox/demo/readme.html +9 -16
- package/components/checkbox/dist/index.js +7 -18
- package/components/checkbox/dist/registered.js +7 -18
- package/components/combobox/demo/api.html +10 -16
- package/components/combobox/demo/api.md +0 -1
- package/components/combobox/demo/api.min.js +20 -58
- package/components/combobox/demo/index.html +10 -16
- package/components/combobox/demo/index.min.js +20 -58
- package/components/combobox/demo/readme.html +9 -16
- package/components/combobox/dist/auro-combobox.d.ts +0 -5
- package/components/combobox/dist/index.js +20 -58
- package/components/combobox/dist/registered.js +20 -58
- package/components/counter/demo/api.html +10 -16
- package/components/counter/demo/api.min.js +8 -19
- package/components/counter/demo/index.html +10 -16
- package/components/counter/demo/index.min.js +8 -19
- package/components/counter/demo/readme.html +9 -16
- package/components/counter/dist/index.js +8 -19
- package/components/counter/dist/registered.js +8 -19
- package/components/datepicker/demo/api.html +10 -16
- package/components/datepicker/demo/api.md +1 -2
- package/components/datepicker/demo/api.min.js +68 -58
- package/components/datepicker/demo/index.html +10 -16
- package/components/datepicker/demo/index.min.js +68 -58
- package/components/datepicker/demo/readme.html +9 -16
- package/components/datepicker/dist/auro-datepicker.d.ts +18 -6
- package/components/datepicker/dist/index.js +68 -58
- package/components/datepicker/dist/registered.js +68 -58
- package/components/dropdown/demo/api.html +10 -16
- package/components/dropdown/demo/api.min.js +3 -3
- package/components/dropdown/demo/index.html +10 -16
- package/components/dropdown/demo/index.min.js +3 -3
- package/components/dropdown/demo/readme.html +9 -16
- package/components/dropdown/dist/index.js +3 -3
- package/components/dropdown/dist/registered.js +3 -3
- 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.md +1 -2
- package/components/input/demo/api.min.js +9 -27
- package/components/input/demo/index.html +10 -16
- package/components/input/demo/index.min.js +9 -27
- package/components/input/demo/readme.html +9 -16
- package/components/input/dist/base-input.d.ts +1 -5
- package/components/input/dist/index.js +9 -27
- package/components/input/dist/registered.js +9 -27
- 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/api.min.js +5 -16
- package/components/radio/demo/index.html +10 -16
- package/components/radio/demo/index.min.js +5 -16
- package/components/radio/demo/readme.html +9 -16
- package/components/radio/dist/index.js +5 -16
- package/components/radio/dist/registered.js +5 -16
- package/components/select/demo/api.html +10 -16
- package/components/select/demo/api.min.js +8 -19
- package/components/select/demo/index.html +11 -16
- package/components/select/demo/index.min.js +8 -19
- package/components/select/demo/readme.html +9 -16
- package/components/select/dist/index.js +8 -19
- package/components/select/dist/registered.js +8 -19
- package/package.json +3 -4
|
@@ -749,24 +749,13 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
749
749
|
this.getInputElements(elem);
|
|
750
750
|
this.getAuroInputs(elem);
|
|
751
751
|
|
|
752
|
-
//
|
|
752
|
+
// Validate only if noValidate is not true and the input does not have focus
|
|
753
753
|
let validationShouldRun =
|
|
754
|
-
|
|
755
|
-
// If the validation was forced
|
|
756
754
|
force ||
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
// State-based checks
|
|
762
|
-
(
|
|
763
|
-
// Element is not currently focused
|
|
764
|
-
!elem.contains(document.activeElement) && // native input is not focused directly
|
|
765
|
-
!document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
|
|
766
|
-
|
|
767
|
-
// And element has been touched or is untouched but has a value
|
|
768
|
-
( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
|
|
769
|
-
);
|
|
755
|
+
(!elem.contains(document.activeElement) &&
|
|
756
|
+
(elem.touched ||
|
|
757
|
+
(!elem.touched && typeof elem.value !== "undefined"))) ||
|
|
758
|
+
elem.validateOnInput;
|
|
770
759
|
|
|
771
760
|
if (elem.hasAttribute('error')) {
|
|
772
761
|
elem.validity = 'customError';
|
|
@@ -2588,7 +2577,7 @@ class AuroFloatingUI {
|
|
|
2588
2577
|
*/
|
|
2589
2578
|
mirrorSize() {
|
|
2590
2579
|
// mirror the boxsize from bibSizer
|
|
2591
|
-
if (this.element.bibSizer) {
|
|
2580
|
+
if (this.element.bibSizer && this.element.matchWidth) {
|
|
2592
2581
|
const sizerStyle = window.getComputedStyle(this.element.bibSizer);
|
|
2593
2582
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
2594
2583
|
if (sizerStyle.width !== '0px') {
|
|
@@ -2800,7 +2789,7 @@ class AuroFloatingUI {
|
|
|
2800
2789
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
2801
2790
|
return;
|
|
2802
2791
|
}
|
|
2803
|
-
|
|
2792
|
+
|
|
2804
2793
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
2805
2794
|
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
2806
2795
|
return;
|
|
@@ -2988,7 +2977,7 @@ class AuroFloatingUI {
|
|
|
2988
2977
|
|
|
2989
2978
|
event.preventDefault();
|
|
2990
2979
|
this.handleClick();
|
|
2991
|
-
}
|
|
2980
|
+
}
|
|
2992
2981
|
break;
|
|
2993
2982
|
case 'mouseenter':
|
|
2994
2983
|
if (this.element.hoverToggle) {
|
|
@@ -9977,24 +9966,13 @@ class AuroFormValidation {
|
|
|
9977
9966
|
this.getInputElements(elem);
|
|
9978
9967
|
this.getAuroInputs(elem);
|
|
9979
9968
|
|
|
9980
|
-
//
|
|
9969
|
+
// Validate only if noValidate is not true and the input does not have focus
|
|
9981
9970
|
let validationShouldRun =
|
|
9982
|
-
|
|
9983
|
-
// If the validation was forced
|
|
9984
9971
|
force ||
|
|
9985
|
-
|
|
9986
|
-
|
|
9987
|
-
|
|
9988
|
-
|
|
9989
|
-
// State-based checks
|
|
9990
|
-
(
|
|
9991
|
-
// Element is not currently focused
|
|
9992
|
-
!elem.contains(document.activeElement) && // native input is not focused directly
|
|
9993
|
-
!document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
|
|
9994
|
-
|
|
9995
|
-
// And element has been touched or is untouched but has a value
|
|
9996
|
-
( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
|
|
9997
|
-
);
|
|
9972
|
+
(!elem.contains(document.activeElement) &&
|
|
9973
|
+
(elem.touched ||
|
|
9974
|
+
(!elem.touched && typeof elem.value !== "undefined"))) ||
|
|
9975
|
+
elem.validateOnInput;
|
|
9998
9976
|
|
|
9999
9977
|
if (elem.hasAttribute('error')) {
|
|
10000
9978
|
elem.validity = 'customError';
|
|
@@ -10818,9 +10796,9 @@ class BaseInput extends AuroElement$2$1 {
|
|
|
10818
10796
|
if (!this.shadowRoot.contains(this.getActiveElement())) {
|
|
10819
10797
|
this.validation.validate(this);
|
|
10820
10798
|
}
|
|
10821
|
-
}
|
|
10822
10799
|
|
|
10823
|
-
|
|
10800
|
+
this.notifyValueChanged();
|
|
10801
|
+
}
|
|
10824
10802
|
}
|
|
10825
10803
|
|
|
10826
10804
|
if (changedProperties.has('error')) {
|
|
@@ -10945,9 +10923,9 @@ class BaseInput extends AuroElement$2$1 {
|
|
|
10945
10923
|
this.inputElement.value = "";
|
|
10946
10924
|
this.value = "";
|
|
10947
10925
|
this.labelElement.classList.remove('inputElement-label--sticky');
|
|
10948
|
-
this.notifyValueChanged();
|
|
10949
10926
|
this.focus();
|
|
10950
10927
|
this.validation.validate(this);
|
|
10928
|
+
this.notifyValueChanged();
|
|
10951
10929
|
}
|
|
10952
10930
|
|
|
10953
10931
|
/**
|
|
@@ -11042,20 +11020,13 @@ class BaseInput extends AuroElement$2$1 {
|
|
|
11042
11020
|
}
|
|
11043
11021
|
|
|
11044
11022
|
/**
|
|
11045
|
-
* Resets component to initial state
|
|
11023
|
+
* Resets component to initial state.
|
|
11046
11024
|
* @returns {void}
|
|
11047
11025
|
*/
|
|
11048
11026
|
reset() {
|
|
11049
11027
|
this.validation.reset(this);
|
|
11050
11028
|
}
|
|
11051
11029
|
|
|
11052
|
-
/**
|
|
11053
|
-
* Clears the input value
|
|
11054
|
-
*/
|
|
11055
|
-
clear() {
|
|
11056
|
-
this.value = undefined;
|
|
11057
|
-
}
|
|
11058
|
-
|
|
11059
11030
|
/**
|
|
11060
11031
|
* Sets configuration data used elsewhere based on the `type` attribute.
|
|
11061
11032
|
* @private
|
|
@@ -16399,7 +16370,7 @@ class AuroCombobox extends AuroElement {
|
|
|
16399
16370
|
});
|
|
16400
16371
|
|
|
16401
16372
|
this.menu.addEventListener('auroMenu-selectValueReset', () => {
|
|
16402
|
-
this.
|
|
16373
|
+
this.reset();
|
|
16403
16374
|
});
|
|
16404
16375
|
}
|
|
16405
16376
|
|
|
@@ -16419,7 +16390,7 @@ class AuroCombobox extends AuroElement {
|
|
|
16419
16390
|
});
|
|
16420
16391
|
|
|
16421
16392
|
/**
|
|
16422
|
-
* Validate every time we remove focus from the
|
|
16393
|
+
* Validate every time we remove focus from the datepicker.
|
|
16423
16394
|
*/
|
|
16424
16395
|
this.addEventListener('focusout', () => {
|
|
16425
16396
|
if (document.activeElement !== this) {
|
|
@@ -16624,16 +16595,7 @@ class AuroCombobox extends AuroElement {
|
|
|
16624
16595
|
*/
|
|
16625
16596
|
reset() {
|
|
16626
16597
|
this.input.reset();
|
|
16627
|
-
this.menu.value = undefined;
|
|
16628
16598
|
this.validation.reset(this);
|
|
16629
|
-
}
|
|
16630
|
-
|
|
16631
|
-
/**
|
|
16632
|
-
* Clears the current value of the combobox.
|
|
16633
|
-
* @returns {void}
|
|
16634
|
-
*/
|
|
16635
|
-
clear() {
|
|
16636
|
-
this.input.clear();
|
|
16637
16599
|
this.menu.value = undefined;
|
|
16638
16600
|
}
|
|
16639
16601
|
|
|
@@ -16659,7 +16621,7 @@ class AuroCombobox extends AuroElement {
|
|
|
16659
16621
|
this.hideBib();
|
|
16660
16622
|
}
|
|
16661
16623
|
} else {
|
|
16662
|
-
this.
|
|
16624
|
+
this.reset();
|
|
16663
16625
|
}
|
|
16664
16626
|
}
|
|
16665
16627
|
|
|
@@ -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-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
|
-
|
|
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
|
|
|
@@ -2281,24 +2281,13 @@ class AuroFormValidation {
|
|
|
2281
2281
|
this.getInputElements(elem);
|
|
2282
2282
|
this.getAuroInputs(elem);
|
|
2283
2283
|
|
|
2284
|
-
//
|
|
2284
|
+
// Validate only if noValidate is not true and the input does not have focus
|
|
2285
2285
|
let validationShouldRun =
|
|
2286
|
-
|
|
2287
|
-
// If the validation was forced
|
|
2288
2286
|
force ||
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
// State-based checks
|
|
2294
|
-
(
|
|
2295
|
-
// Element is not currently focused
|
|
2296
|
-
!elem.contains(document.activeElement) && // native input is not focused directly
|
|
2297
|
-
!document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
|
|
2298
|
-
|
|
2299
|
-
// And element has been touched or is untouched but has a value
|
|
2300
|
-
( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
|
|
2301
|
-
);
|
|
2287
|
+
(!elem.contains(document.activeElement) &&
|
|
2288
|
+
(elem.touched ||
|
|
2289
|
+
(!elem.touched && typeof elem.value !== "undefined"))) ||
|
|
2290
|
+
elem.validateOnInput;
|
|
2302
2291
|
|
|
2303
2292
|
if (elem.hasAttribute('error')) {
|
|
2304
2293
|
elem.validity = 'customError';
|
|
@@ -4759,7 +4748,7 @@ class AuroFloatingUI {
|
|
|
4759
4748
|
*/
|
|
4760
4749
|
mirrorSize() {
|
|
4761
4750
|
// mirror the boxsize from bibSizer
|
|
4762
|
-
if (this.element.bibSizer) {
|
|
4751
|
+
if (this.element.bibSizer && this.element.matchWidth) {
|
|
4763
4752
|
const sizerStyle = window.getComputedStyle(this.element.bibSizer);
|
|
4764
4753
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
4765
4754
|
if (sizerStyle.width !== '0px') {
|
|
@@ -4971,7 +4960,7 @@ class AuroFloatingUI {
|
|
|
4971
4960
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
4972
4961
|
return;
|
|
4973
4962
|
}
|
|
4974
|
-
|
|
4963
|
+
|
|
4975
4964
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
4976
4965
|
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
4977
4966
|
return;
|
|
@@ -5159,7 +5148,7 @@ class AuroFloatingUI {
|
|
|
5159
5148
|
|
|
5160
5149
|
event.preventDefault();
|
|
5161
5150
|
this.handleClick();
|
|
5162
|
-
}
|
|
5151
|
+
}
|
|
5163
5152
|
break;
|
|
5164
5153
|
case 'mouseenter':
|
|
5165
5154
|
if (this.element.hoverToggle) {
|
|
@@ -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-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
|
-
|
|
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
|
|
|
@@ -2281,24 +2281,13 @@ class AuroFormValidation {
|
|
|
2281
2281
|
this.getInputElements(elem);
|
|
2282
2282
|
this.getAuroInputs(elem);
|
|
2283
2283
|
|
|
2284
|
-
//
|
|
2284
|
+
// Validate only if noValidate is not true and the input does not have focus
|
|
2285
2285
|
let validationShouldRun =
|
|
2286
|
-
|
|
2287
|
-
// If the validation was forced
|
|
2288
2286
|
force ||
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
// State-based checks
|
|
2294
|
-
(
|
|
2295
|
-
// Element is not currently focused
|
|
2296
|
-
!elem.contains(document.activeElement) && // native input is not focused directly
|
|
2297
|
-
!document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
|
|
2298
|
-
|
|
2299
|
-
// And element has been touched or is untouched but has a value
|
|
2300
|
-
( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
|
|
2301
|
-
);
|
|
2287
|
+
(!elem.contains(document.activeElement) &&
|
|
2288
|
+
(elem.touched ||
|
|
2289
|
+
(!elem.touched && typeof elem.value !== "undefined"))) ||
|
|
2290
|
+
elem.validateOnInput;
|
|
2302
2291
|
|
|
2303
2292
|
if (elem.hasAttribute('error')) {
|
|
2304
2293
|
elem.validity = 'customError';
|
|
@@ -4759,7 +4748,7 @@ class AuroFloatingUI {
|
|
|
4759
4748
|
*/
|
|
4760
4749
|
mirrorSize() {
|
|
4761
4750
|
// mirror the boxsize from bibSizer
|
|
4762
|
-
if (this.element.bibSizer) {
|
|
4751
|
+
if (this.element.bibSizer && this.element.matchWidth) {
|
|
4763
4752
|
const sizerStyle = window.getComputedStyle(this.element.bibSizer);
|
|
4764
4753
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
4765
4754
|
if (sizerStyle.width !== '0px') {
|
|
@@ -4971,7 +4960,7 @@ class AuroFloatingUI {
|
|
|
4971
4960
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
4972
4961
|
return;
|
|
4973
4962
|
}
|
|
4974
|
-
|
|
4963
|
+
|
|
4975
4964
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
4976
4965
|
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
4977
4966
|
return;
|
|
@@ -5159,7 +5148,7 @@ class AuroFloatingUI {
|
|
|
5159
5148
|
|
|
5160
5149
|
event.preventDefault();
|
|
5161
5150
|
this.handleClick();
|
|
5162
|
-
}
|
|
5151
|
+
}
|
|
5163
5152
|
break;
|
|
5164
5153
|
case 'mouseenter':
|
|
5165
5154
|
if (this.element.hoverToggle) {
|
|
@@ -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
|
|
|
@@ -2234,24 +2234,13 @@ class AuroFormValidation {
|
|
|
2234
2234
|
this.getInputElements(elem);
|
|
2235
2235
|
this.getAuroInputs(elem);
|
|
2236
2236
|
|
|
2237
|
-
//
|
|
2237
|
+
// Validate only if noValidate is not true and the input does not have focus
|
|
2238
2238
|
let validationShouldRun =
|
|
2239
|
-
|
|
2240
|
-
// If the validation was forced
|
|
2241
2239
|
force ||
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
// State-based checks
|
|
2247
|
-
(
|
|
2248
|
-
// Element is not currently focused
|
|
2249
|
-
!elem.contains(document.activeElement) && // native input is not focused directly
|
|
2250
|
-
!document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
|
|
2251
|
-
|
|
2252
|
-
// And element has been touched or is untouched but has a value
|
|
2253
|
-
( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
|
|
2254
|
-
);
|
|
2240
|
+
(!elem.contains(document.activeElement) &&
|
|
2241
|
+
(elem.touched ||
|
|
2242
|
+
(!elem.touched && typeof elem.value !== "undefined"))) ||
|
|
2243
|
+
elem.validateOnInput;
|
|
2255
2244
|
|
|
2256
2245
|
if (elem.hasAttribute('error')) {
|
|
2257
2246
|
elem.validity = 'customError';
|
|
@@ -4712,7 +4701,7 @@ class AuroFloatingUI {
|
|
|
4712
4701
|
*/
|
|
4713
4702
|
mirrorSize() {
|
|
4714
4703
|
// mirror the boxsize from bibSizer
|
|
4715
|
-
if (this.element.bibSizer) {
|
|
4704
|
+
if (this.element.bibSizer && this.element.matchWidth) {
|
|
4716
4705
|
const sizerStyle = window.getComputedStyle(this.element.bibSizer);
|
|
4717
4706
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
4718
4707
|
if (sizerStyle.width !== '0px') {
|
|
@@ -4924,7 +4913,7 @@ class AuroFloatingUI {
|
|
|
4924
4913
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
4925
4914
|
return;
|
|
4926
4915
|
}
|
|
4927
|
-
|
|
4916
|
+
|
|
4928
4917
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
4929
4918
|
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
4930
4919
|
return;
|
|
@@ -5112,7 +5101,7 @@ class AuroFloatingUI {
|
|
|
5112
5101
|
|
|
5113
5102
|
event.preventDefault();
|
|
5114
5103
|
this.handleClick();
|
|
5115
|
-
}
|
|
5104
|
+
}
|
|
5116
5105
|
break;
|
|
5117
5106
|
case 'mouseenter':
|
|
5118
5107
|
if (this.element.hoverToggle) {
|
|
@@ -2234,24 +2234,13 @@ class AuroFormValidation {
|
|
|
2234
2234
|
this.getInputElements(elem);
|
|
2235
2235
|
this.getAuroInputs(elem);
|
|
2236
2236
|
|
|
2237
|
-
//
|
|
2237
|
+
// Validate only if noValidate is not true and the input does not have focus
|
|
2238
2238
|
let validationShouldRun =
|
|
2239
|
-
|
|
2240
|
-
// If the validation was forced
|
|
2241
2239
|
force ||
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
// State-based checks
|
|
2247
|
-
(
|
|
2248
|
-
// Element is not currently focused
|
|
2249
|
-
!elem.contains(document.activeElement) && // native input is not focused directly
|
|
2250
|
-
!document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
|
|
2251
|
-
|
|
2252
|
-
// And element has been touched or is untouched but has a value
|
|
2253
|
-
( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
|
|
2254
|
-
);
|
|
2240
|
+
(!elem.contains(document.activeElement) &&
|
|
2241
|
+
(elem.touched ||
|
|
2242
|
+
(!elem.touched && typeof elem.value !== "undefined"))) ||
|
|
2243
|
+
elem.validateOnInput;
|
|
2255
2244
|
|
|
2256
2245
|
if (elem.hasAttribute('error')) {
|
|
2257
2246
|
elem.validity = 'customError';
|
|
@@ -4712,7 +4701,7 @@ class AuroFloatingUI {
|
|
|
4712
4701
|
*/
|
|
4713
4702
|
mirrorSize() {
|
|
4714
4703
|
// mirror the boxsize from bibSizer
|
|
4715
|
-
if (this.element.bibSizer) {
|
|
4704
|
+
if (this.element.bibSizer && this.element.matchWidth) {
|
|
4716
4705
|
const sizerStyle = window.getComputedStyle(this.element.bibSizer);
|
|
4717
4706
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
4718
4707
|
if (sizerStyle.width !== '0px') {
|
|
@@ -4924,7 +4913,7 @@ class AuroFloatingUI {
|
|
|
4924
4913
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
4925
4914
|
return;
|
|
4926
4915
|
}
|
|
4927
|
-
|
|
4916
|
+
|
|
4928
4917
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
4929
4918
|
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
4930
4919
|
return;
|
|
@@ -5112,7 +5101,7 @@ class AuroFloatingUI {
|
|
|
5112
5101
|
|
|
5113
5102
|
event.preventDefault();
|
|
5114
5103
|
this.handleClick();
|
|
5115
|
-
}
|
|
5104
|
+
}
|
|
5116
5105
|
break;
|
|
5117
5106
|
case 'mouseenter':
|
|
5118
5107
|
if (this.element.hoverToggle) {
|
|
@@ -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
|
|
|
@@ -50,13 +50,12 @@
|
|
|
50
50
|
|
|
51
51
|
| Method | Type | Description |
|
|
52
52
|
|-------------------------------|----------------------------------------|--------------------------------------------------|
|
|
53
|
-
| [clear](#clear) | `(): void` | Clears the current value(s) of the datepicker. |
|
|
54
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 |
|
|
55
55
|
| [renderHtmlActionClear](#renderHtmlActionClear) | `(): TemplateResult` | |
|
|
56
56
|
| [renderHtmlIconCalendar](#renderHtmlIconCalendar) | `(): TemplateResult` | |
|
|
57
57
|
| [renderHtmlIconError](#renderHtmlIconError) | `(): TemplateResult` | |
|
|
58
58
|
| [renderHtmlInputs](#renderHtmlInputs) | `(): TemplateResult` | |
|
|
59
|
-
| [renderLayoutFromAttributes](#renderLayoutFromAttributes) | `(): TemplateResult` | |
|
|
60
59
|
| [reset](#reset) | `(): void` | Resets component to initial state. |
|
|
61
60
|
| [resetLayoutClasses](#resetLayoutClasses) | `(): void` | |
|
|
62
61
|
| [resetShapeClasses](#resetShapeClasses) | `(): void` | |
|