@aurodesignsystem/auro-formkit 2.0.0-beta.46 → 2.0.0-beta.47
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/CHANGELOG.md +38 -0
- package/components/bibtemplate/dist/index.js +3 -3
- package/components/bibtemplate/dist/registered.js +3 -3
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.min.js +9 -12
- package/components/checkbox/demo/index.min.js +9 -12
- package/components/checkbox/dist/index.js +9 -12
- package/components/checkbox/dist/registered.js +9 -12
- package/components/combobox/README.md +4 -4
- package/components/combobox/demo/api.md +2 -2
- package/components/combobox/demo/api.min.js +3818 -1682
- package/components/combobox/demo/index.md +2 -2
- package/components/combobox/demo/index.min.js +3818 -1682
- package/components/combobox/dist/index.js +3827 -1691
- package/components/combobox/dist/registered.js +3827 -1691
- package/components/counter/README.md +1 -1
- package/components/counter/demo/api.min.js +12 -15
- package/components/counter/demo/index.min.js +12 -15
- package/components/counter/dist/index.js +12 -15
- package/components/counter/dist/registered.js +12 -15
- package/components/datepicker/README.md +6 -4
- package/components/datepicker/demo/api.js +2 -2
- package/components/datepicker/demo/api.md +134 -48
- package/components/datepicker/demo/api.min.js +5175 -2043
- package/components/datepicker/demo/index.md +6 -0
- package/components/datepicker/demo/index.min.js +5161 -2028
- package/components/datepicker/dist/auro-calendar-month.d.ts +15 -0
- package/components/datepicker/dist/auro-calendar.d.ts +24 -0
- package/components/datepicker/dist/auro-datepicker.d.ts +31 -11
- package/components/datepicker/dist/bibtemplateVersion.d.ts +2 -0
- package/components/datepicker/dist/index.js +5161 -2028
- package/components/datepicker/dist/registered.js +5161 -2028
- package/components/datepicker/dist/utilities.d.ts +25 -0
- package/components/datepicker/dist/utilitiesCalendar.d.ts +2 -1
- package/components/dropdown/README.md +1 -1
- package/components/form/README.md +1 -1
- package/components/input/README.md +1 -1
- package/components/input/demo/api.md +91 -89
- package/components/input/demo/api.min.js +3827 -1688
- package/components/input/demo/index.md +2 -2
- package/components/input/demo/index.min.js +3827 -1688
- package/components/input/dist/auro-input.d.ts +0 -1
- package/components/input/dist/base-input.d.ts +46 -12
- package/components/input/dist/index.js +3827 -1688
- package/components/input/dist/registered.js +3827 -1688
- package/components/input/dist/utilities.d.ts +25 -0
- package/components/menu/README.md +1 -1
- package/components/radio/README.md +1 -1
- package/components/radio/demo/api.min.js +9 -12
- package/components/radio/demo/index.min.js +9 -12
- package/components/radio/dist/index.js +9 -12
- package/components/radio/dist/registered.js +9 -12
- package/components/select/README.md +3 -3
- package/components/select/demo/api.min.js +9 -12
- package/components/select/demo/index.min.js +9 -12
- package/components/select/dist/index.js +9 -12
- package/components/select/dist/registered.js +9 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# Semantic Release Automated Changelog
|
|
2
2
|
|
|
3
|
+
# [2.0.0-beta.47](https://github.com/AlaskaAirlines/auro-formkit/compare/v2.0.0-beta.46...v2.0.0-beta.47) (2025-02-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* address linting errors ([686c11a](https://github.com/AlaskaAirlines/auro-formkit/commit/686c11ae485ccb4ccce5e561110a2a9bd49e070f))
|
|
9
|
+
* address PR review comments ([8e1be49](https://github.com/AlaskaAirlines/auro-formkit/commit/8e1be4971edfc8103f7a49f419de785bf98105e8))
|
|
10
|
+
* button up small bugs in autoformatting configuration ([0c47e81](https://github.com/AlaskaAirlines/auro-formkit/commit/0c47e819d53d8d3d4191ad70c49faf9a4859f3c7))
|
|
11
|
+
* change calendar view to typed date [#369](https://github.com/AlaskaAirlines/auro-formkit/issues/369) ([01591cf](https://github.com/AlaskaAirlines/auro-formkit/commit/01591cf395ca3e2a6441007b91bbb121d3e254a3))
|
|
12
|
+
* convert breakpoint value to integer ([7d39ac1](https://github.com/AlaskaAirlines/auro-formkit/commit/7d39ac1a02feb73cb60c273a389555176e734aab))
|
|
13
|
+
* dynamically render month and year in calendar header ([35029dc](https://github.com/AlaskaAirlines/auro-formkit/commit/35029dc0b3457fdb875647b7ab67303d430b6e52))
|
|
14
|
+
* handle dynamic format changes ([81d86b0](https://github.com/AlaskaAirlines/auro-formkit/commit/81d86b08a5b7686e27c061c26661a532f81d1995))
|
|
15
|
+
* reference correct type in mask options ([c8db94e](https://github.com/AlaskaAirlines/auro-formkit/commit/c8db94eca09a5d3e751d56f7445d180eca212fb6))
|
|
16
|
+
* update support for localized month names ([9b085d2](https://github.com/AlaskaAirlines/auro-formkit/commit/9b085d2174adf629f83b4c5192fb873b601c6de0))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* add format support to datepicker [#342](https://github.com/AlaskaAirlines/auro-formkit/issues/342) ([eacf5ea](https://github.com/AlaskaAirlines/auro-formkit/commit/eacf5eaba2e0b34facc3a3da225486f215c30dd7))
|
|
22
|
+
* implement inputmask ([a7e2cae](https://github.com/AlaskaAirlines/auro-formkit/commit/a7e2cae1ce1c0facffc07b117682bea66a7c7b3c))
|
|
23
|
+
* replace Inputmask with IMask [#312](https://github.com/AlaskaAirlines/auro-formkit/issues/312) ([5e83d31](https://github.com/AlaskaAirlines/auro-formkit/commit/5e83d31812e0408e1902cf5a678b1677ba06940b))
|
|
24
|
+
* use bibtemplate for dropdown bib content ([62abed6](https://github.com/AlaskaAirlines/auro-formkit/commit/62abed62bca382a10f5450102edec401e4afb67b))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Performance Improvements
|
|
28
|
+
|
|
29
|
+
* add dynamic phone number masking [#332](https://github.com/AlaskaAirlines/auro-formkit/issues/332) ([d38c0ff](https://github.com/AlaskaAirlines/auro-formkit/commit/d38c0ff5a15a94a8419d97daa20e0afc8a879223))
|
|
30
|
+
* handle all date formats and write tests [#344](https://github.com/AlaskaAirlines/auro-formkit/issues/344) ([10e310b](https://github.com/AlaskaAirlines/auro-formkit/commit/10e310b3fac099be13046dbf6aa8a2e13ebb6ea9))
|
|
31
|
+
* implement type date with format attribute [#329](https://github.com/AlaskaAirlines/auro-formkit/issues/329) ([20afb8d](https://github.com/AlaskaAirlines/auro-formkit/commit/20afb8df43def073abc09bd6f3a2d9d07051a26f))
|
|
32
|
+
* support custom Inputmasks [#335](https://github.com/AlaskaAirlines/auro-formkit/issues/335) ([eab15e5](https://github.com/AlaskaAirlines/auro-formkit/commit/eab15e55a38b285b3bc4e3b2f945cbe90c5e4feb))
|
|
33
|
+
* support dynamic credit card masking [#333](https://github.com/AlaskaAirlines/auro-formkit/issues/333) ([716eca8](https://github.com/AlaskaAirlines/auro-formkit/commit/716eca8d9ec732a7b91ef78f827877a3fd7af3d6))
|
|
34
|
+
* support help text for phone number inputs ([7ec6856](https://github.com/AlaskaAirlines/auro-formkit/commit/7ec6856e849fa9a73627889e6fbfe3e4136e5b2f))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### BREAKING CHANGES
|
|
38
|
+
|
|
39
|
+
* old date types are deprecated
|
|
40
|
+
|
|
3
41
|
# [2.0.0-beta.46](https://github.com/AlaskaAirlines/auro-formkit/compare/v2.0.0-beta.45...v2.0.0-beta.46) (2025-02-24)
|
|
4
42
|
|
|
5
43
|
|
|
@@ -31,11 +31,11 @@ const t$1=globalThis,i$3=t$1.trustedTypes,s$1=i$3?i$3.createPolicy("lit-html",{c
|
|
|
31
31
|
*/
|
|
32
32
|
const a=Symbol.for(""),o$1=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litStatic$:t,r:a}),i$1=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[a+1]),t[0]),r:a}),l=new Map,n=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o$1(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");void 0===(r=l.get(t))&&(n.raw=n,l.set(t,r=n)),e=u;}return t(r,...e)},u=n(x);
|
|
33
33
|
|
|
34
|
-
var colorCss$1 = i$5
|
|
34
|
+
var colorCss$1 = i$5`#headerContainer{box-shadow:var(--ds-auro-dropdownbib-header-boxshadow-color)}#footerContainer{background-color:var(--ds-auro-dropdownbib-footer-container-color)}`;
|
|
35
35
|
|
|
36
|
-
var styleCss$2 = i$5`#bibTemplate{display:flex;overflow:hidden;height:100%;max-height:100%;flex-direction:column}#headerContainer{display:flex;flex-direction:column
|
|
36
|
+
var styleCss$2 = i$5`#bibTemplate{display:flex;overflow:hidden;height:100%;max-height:100%;flex-direction:column}#headerContainer{display:flex;flex-direction:column}#header{display:flex;width:100%;min-height:var(--ds-size-1000, 5rem);box-sizing:border-box;align-items:end;padding-top:var(--ds-size-400, 2rem);padding-right:var(--ds-size-700, 3.5rem);padding-left:var(--ds-size-200, 1rem);pointer-events:none}#subheader{width:100%}#subheader ::slotted([auro-input]){padding:0 var(--ds-size-200, 1rem)}#closeButton{position:absolute;top:var(--ds-size-400, 2rem);right:var(--ds-size-200, 1rem);border:none;background-color:transparent;cursor:pointer}#closeButton [auro-icon]{--ds-auro-icon-size: var(--ds-size-500, $ds-size-500)}#bodyContainer{overflow:auto;flex:1 1 100%;padding-top:var(--ds-size-100, 0.5rem)}#footerContainer{position:absolute;right:0;bottom:0;left:0;padding:var(--ds-size-200, 1rem)}`;
|
|
37
37
|
|
|
38
|
-
var tokenCss = i$5`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15))}`;
|
|
38
|
+
var tokenCss = i$5`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-footer-container-color: var(--ds-color-container-primary-default, #ffffff)}`;
|
|
39
39
|
|
|
40
40
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
41
41
|
// See LICENSE in the project root for license information.
|
|
@@ -31,11 +31,11 @@ const t$1=globalThis,i$3=t$1.trustedTypes,s$1=i$3?i$3.createPolicy("lit-html",{c
|
|
|
31
31
|
*/
|
|
32
32
|
const a=Symbol.for(""),o$1=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litStatic$:t,r:a}),i$1=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[a+1]),t[0]),r:a}),l=new Map,n=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o$1(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");void 0===(r=l.get(t))&&(n.raw=n,l.set(t,r=n)),e=u;}return t(r,...e)},u=n(x);
|
|
33
33
|
|
|
34
|
-
var colorCss$1 = i$5
|
|
34
|
+
var colorCss$1 = i$5`#headerContainer{box-shadow:var(--ds-auro-dropdownbib-header-boxshadow-color)}#footerContainer{background-color:var(--ds-auro-dropdownbib-footer-container-color)}`;
|
|
35
35
|
|
|
36
|
-
var styleCss$2 = i$5`#bibTemplate{display:flex;overflow:hidden;height:100%;max-height:100%;flex-direction:column}#headerContainer{display:flex;flex-direction:column
|
|
36
|
+
var styleCss$2 = i$5`#bibTemplate{display:flex;overflow:hidden;height:100%;max-height:100%;flex-direction:column}#headerContainer{display:flex;flex-direction:column}#header{display:flex;width:100%;min-height:var(--ds-size-1000, 5rem);box-sizing:border-box;align-items:end;padding-top:var(--ds-size-400, 2rem);padding-right:var(--ds-size-700, 3.5rem);padding-left:var(--ds-size-200, 1rem);pointer-events:none}#subheader{width:100%}#subheader ::slotted([auro-input]){padding:0 var(--ds-size-200, 1rem)}#closeButton{position:absolute;top:var(--ds-size-400, 2rem);right:var(--ds-size-200, 1rem);border:none;background-color:transparent;cursor:pointer}#closeButton [auro-icon]{--ds-auro-icon-size: var(--ds-size-500, $ds-size-500)}#bodyContainer{overflow:auto;flex:1 1 100%;padding-top:var(--ds-size-100, 0.5rem)}#footerContainer{position:absolute;right:0;bottom:0;left:0;padding:var(--ds-size-200, 1rem)}`;
|
|
37
37
|
|
|
38
|
-
var tokenCss = i$5`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15))}`;
|
|
38
|
+
var tokenCss = i$5`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-footer-container-color: var(--ds-color-container-primary-default, #ffffff)}`;
|
|
39
39
|
|
|
40
40
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
41
41
|
// See LICENSE in the project root for license information.
|
|
@@ -96,7 +96,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
|
|
|
96
96
|
<!-- The below content is automatically added from ../../docs/templates/componentBundleUseModBrowsers.md -->
|
|
97
97
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.13.0/dist/tokens/CSSCustomProperties.css" />
|
|
98
98
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.1.2/dist/bundled/essentials.css" />
|
|
99
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-checkbox@2.0.0-beta.
|
|
99
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-checkbox@2.0.0-beta.46/dist/auro-checkbox__bundled.js" type="module"></script>
|
|
100
100
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
101
101
|
|
|
102
102
|
## auro-checkbox use cases
|
|
@@ -486,20 +486,17 @@ class AuroFormValidation {
|
|
|
486
486
|
elem.validity = 'rangeUnderflow';
|
|
487
487
|
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
488
488
|
}
|
|
489
|
-
} else if (elem.type === '
|
|
490
|
-
|
|
491
|
-
elem.type === 'month-fullYear' ||
|
|
492
|
-
elem.type === 'year-month-day'
|
|
493
|
-
) {
|
|
494
|
-
if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
|
|
489
|
+
} else if (elem.type === 'date') {
|
|
490
|
+
if (elem.value?.length > 0 && elem.value?.length < elem.lengthForType) {
|
|
495
491
|
elem.validity = 'tooShort';
|
|
496
492
|
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
497
|
-
} else {
|
|
498
|
-
const
|
|
493
|
+
} else if (elem.value?.length === elem.lengthForType && elem.util.toNorthAmericanFormat(elem.value, elem.format)) {
|
|
494
|
+
const formattedValue = elem.util.toNorthAmericanFormat(elem.value, elem.format);
|
|
495
|
+
const valueDate = new Date(formattedValue.dateForComparison);
|
|
499
496
|
|
|
500
497
|
// validate max
|
|
501
|
-
if (elem.max
|
|
502
|
-
const maxDate = new Date(elem.max);
|
|
498
|
+
if (elem.max?.length === elem.lengthForType) {
|
|
499
|
+
const maxDate = new Date(elem.util.toNorthAmericanFormat(elem.max, elem.format).dateForComparison);
|
|
503
500
|
|
|
504
501
|
if (valueDate > maxDate) {
|
|
505
502
|
elem.validity = 'rangeOverflow';
|
|
@@ -508,8 +505,8 @@ class AuroFormValidation {
|
|
|
508
505
|
}
|
|
509
506
|
|
|
510
507
|
// validate min
|
|
511
|
-
if (elem.min) {
|
|
512
|
-
const minDate = new Date(elem.min);
|
|
508
|
+
if (elem.min?.length === elem.lengthForType) {
|
|
509
|
+
const minDate = new Date(elem.util.toNorthAmericanFormat(elem.min, elem.format).dateForComparison);
|
|
513
510
|
|
|
514
511
|
if (valueDate < minDate) {
|
|
515
512
|
elem.validity = 'rangeUnderflow';
|
|
@@ -478,20 +478,17 @@ class AuroFormValidation {
|
|
|
478
478
|
elem.validity = 'rangeUnderflow';
|
|
479
479
|
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
480
480
|
}
|
|
481
|
-
} else if (elem.type === '
|
|
482
|
-
|
|
483
|
-
elem.type === 'month-fullYear' ||
|
|
484
|
-
elem.type === 'year-month-day'
|
|
485
|
-
) {
|
|
486
|
-
if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
|
|
481
|
+
} else if (elem.type === 'date') {
|
|
482
|
+
if (elem.value?.length > 0 && elem.value?.length < elem.lengthForType) {
|
|
487
483
|
elem.validity = 'tooShort';
|
|
488
484
|
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
489
|
-
} else {
|
|
490
|
-
const
|
|
485
|
+
} else if (elem.value?.length === elem.lengthForType && elem.util.toNorthAmericanFormat(elem.value, elem.format)) {
|
|
486
|
+
const formattedValue = elem.util.toNorthAmericanFormat(elem.value, elem.format);
|
|
487
|
+
const valueDate = new Date(formattedValue.dateForComparison);
|
|
491
488
|
|
|
492
489
|
// validate max
|
|
493
|
-
if (elem.max
|
|
494
|
-
const maxDate = new Date(elem.max);
|
|
490
|
+
if (elem.max?.length === elem.lengthForType) {
|
|
491
|
+
const maxDate = new Date(elem.util.toNorthAmericanFormat(elem.max, elem.format).dateForComparison);
|
|
495
492
|
|
|
496
493
|
if (valueDate > maxDate) {
|
|
497
494
|
elem.validity = 'rangeOverflow';
|
|
@@ -500,8 +497,8 @@ class AuroFormValidation {
|
|
|
500
497
|
}
|
|
501
498
|
|
|
502
499
|
// validate min
|
|
503
|
-
if (elem.min) {
|
|
504
|
-
const minDate = new Date(elem.min);
|
|
500
|
+
if (elem.min?.length === elem.lengthForType) {
|
|
501
|
+
const minDate = new Date(elem.util.toNorthAmericanFormat(elem.min, elem.format).dateForComparison);
|
|
505
502
|
|
|
506
503
|
if (valueDate < minDate) {
|
|
507
504
|
elem.validity = 'rangeUnderflow';
|
|
@@ -478,20 +478,17 @@ class AuroFormValidation {
|
|
|
478
478
|
elem.validity = 'rangeUnderflow';
|
|
479
479
|
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
480
480
|
}
|
|
481
|
-
} else if (elem.type === '
|
|
482
|
-
|
|
483
|
-
elem.type === 'month-fullYear' ||
|
|
484
|
-
elem.type === 'year-month-day'
|
|
485
|
-
) {
|
|
486
|
-
if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
|
|
481
|
+
} else if (elem.type === 'date') {
|
|
482
|
+
if (elem.value?.length > 0 && elem.value?.length < elem.lengthForType) {
|
|
487
483
|
elem.validity = 'tooShort';
|
|
488
484
|
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
489
|
-
} else {
|
|
490
|
-
const
|
|
485
|
+
} else if (elem.value?.length === elem.lengthForType && elem.util.toNorthAmericanFormat(elem.value, elem.format)) {
|
|
486
|
+
const formattedValue = elem.util.toNorthAmericanFormat(elem.value, elem.format);
|
|
487
|
+
const valueDate = new Date(formattedValue.dateForComparison);
|
|
491
488
|
|
|
492
489
|
// validate max
|
|
493
|
-
if (elem.max
|
|
494
|
-
const maxDate = new Date(elem.max);
|
|
490
|
+
if (elem.max?.length === elem.lengthForType) {
|
|
491
|
+
const maxDate = new Date(elem.util.toNorthAmericanFormat(elem.max, elem.format).dateForComparison);
|
|
495
492
|
|
|
496
493
|
if (valueDate > maxDate) {
|
|
497
494
|
elem.validity = 'rangeOverflow';
|
|
@@ -500,8 +497,8 @@ class AuroFormValidation {
|
|
|
500
497
|
}
|
|
501
498
|
|
|
502
499
|
// validate min
|
|
503
|
-
if (elem.min) {
|
|
504
|
-
const minDate = new Date(elem.min);
|
|
500
|
+
if (elem.min?.length === elem.lengthForType) {
|
|
501
|
+
const minDate = new Date(elem.util.toNorthAmericanFormat(elem.min, elem.format).dateForComparison);
|
|
505
502
|
|
|
506
503
|
if (valueDate < minDate) {
|
|
507
504
|
elem.validity = 'rangeUnderflow';
|
|
@@ -478,20 +478,17 @@ class AuroFormValidation {
|
|
|
478
478
|
elem.validity = 'rangeUnderflow';
|
|
479
479
|
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
480
480
|
}
|
|
481
|
-
} else if (elem.type === '
|
|
482
|
-
|
|
483
|
-
elem.type === 'month-fullYear' ||
|
|
484
|
-
elem.type === 'year-month-day'
|
|
485
|
-
) {
|
|
486
|
-
if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
|
|
481
|
+
} else if (elem.type === 'date') {
|
|
482
|
+
if (elem.value?.length > 0 && elem.value?.length < elem.lengthForType) {
|
|
487
483
|
elem.validity = 'tooShort';
|
|
488
484
|
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
489
|
-
} else {
|
|
490
|
-
const
|
|
485
|
+
} else if (elem.value?.length === elem.lengthForType && elem.util.toNorthAmericanFormat(elem.value, elem.format)) {
|
|
486
|
+
const formattedValue = elem.util.toNorthAmericanFormat(elem.value, elem.format);
|
|
487
|
+
const valueDate = new Date(formattedValue.dateForComparison);
|
|
491
488
|
|
|
492
489
|
// validate max
|
|
493
|
-
if (elem.max
|
|
494
|
-
const maxDate = new Date(elem.max);
|
|
490
|
+
if (elem.max?.length === elem.lengthForType) {
|
|
491
|
+
const maxDate = new Date(elem.util.toNorthAmericanFormat(elem.max, elem.format).dateForComparison);
|
|
495
492
|
|
|
496
493
|
if (valueDate > maxDate) {
|
|
497
494
|
elem.validity = 'rangeOverflow';
|
|
@@ -500,8 +497,8 @@ class AuroFormValidation {
|
|
|
500
497
|
}
|
|
501
498
|
|
|
502
499
|
// validate min
|
|
503
|
-
if (elem.min) {
|
|
504
|
-
const minDate = new Date(elem.min);
|
|
500
|
+
if (elem.min?.length === elem.lengthForType) {
|
|
501
|
+
const minDate = new Date(elem.util.toNorthAmericanFormat(elem.min, elem.format).dateForComparison);
|
|
505
502
|
|
|
506
503
|
if (valueDate < minDate) {
|
|
507
504
|
elem.validity = 'rangeUnderflow';
|
|
@@ -101,10 +101,10 @@ In cases where the project is not able to process JS assets, there are pre-proce
|
|
|
101
101
|
<!-- The below content is automatically added from ../../docs/templates/componentBundleUseModBrowsers.md -->
|
|
102
102
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.13.0/dist/tokens/CSSCustomProperties.css" />
|
|
103
103
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@6.0.0/dist/bundled/essentials.css" />
|
|
104
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-dropdown@2.0.0-beta.
|
|
105
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-input@2.0.0-beta.
|
|
106
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-menu@2.0.0-beta.
|
|
107
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-combobox@2.0.0-beta.
|
|
104
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-dropdown@2.0.0-beta.46/dist/auro-dropdown__bundled.js" type="module"></script>
|
|
105
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-input@2.0.0-beta.46/dist/auro-input__bundled.js" type="module"></script>
|
|
106
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-menu@2.0.0-beta.46/dist/auro-menu__bundled.js" type="module"></script>
|
|
107
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-combobox@2.0.0-beta.46/dist/auro-combobox__bundled.js" type="module"></script>
|
|
108
108
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
109
109
|
|
|
110
110
|
## auro-combobox use cases
|
|
@@ -557,7 +557,7 @@ When defined, the `auro-input` in the combobox trigger will use the defined `typ
|
|
|
557
557
|
<div class="exampleWrapper">
|
|
558
558
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/typeMonthDayYear.html) -->
|
|
559
559
|
<!-- The below content is automatically added from ./../apiExamples/typeMonthDayYear.html -->
|
|
560
|
-
<auro-combobox type="
|
|
560
|
+
<auro-combobox type="date" triggerIcon>
|
|
561
561
|
<span slot="bib.fullscreen.headline">Date Combobox Header</span>
|
|
562
562
|
<span slot="label">Date</span>
|
|
563
563
|
<auro-menu>
|
|
@@ -577,7 +577,7 @@ When defined, the `auro-input` in the combobox trigger will use the defined `typ
|
|
|
577
577
|
<!-- The below code snippet is automatically added from ./../apiExamples/typeMonthDayYear.html -->
|
|
578
578
|
|
|
579
579
|
```html
|
|
580
|
-
<auro-combobox type="
|
|
580
|
+
<auro-combobox type="date" triggerIcon>
|
|
581
581
|
<span slot="bib.fullscreen.headline">Date Combobox Header</span>
|
|
582
582
|
<span slot="label">Date</span>
|
|
583
583
|
<auro-menu>
|