@aurodesignsystem/auro-formkit 2.0.0-beta.2 → 2.0.0-beta.3
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/.turbo/cache/013a48308b893dac-meta.json +1 -1
- package/.turbo/cache/02244170c798a2bd-meta.json +1 -0
- package/.turbo/cache/02244170c798a2bd.tar.zst +0 -0
- package/.turbo/cache/07ca42419b9f050c-meta.json +1 -1
- package/.turbo/cache/0cea4c1f34f3683b-meta.json +1 -1
- package/.turbo/cache/17259cf94d8f8925-meta.json +1 -1
- package/.turbo/cache/1ab37ce15d9be440-meta.json +1 -0
- package/.turbo/cache/1ab37ce15d9be440.tar.zst +0 -0
- package/.turbo/cache/1b9818717e4bdf9f-meta.json +1 -0
- package/.turbo/cache/1b9818717e4bdf9f.tar.zst +0 -0
- package/.turbo/cache/1c0f580d37370ba2-meta.json +1 -0
- package/.turbo/cache/1c0f580d37370ba2.tar.zst +0 -0
- package/.turbo/cache/1c99a949ec63ab35-meta.json +1 -1
- package/.turbo/cache/1de15d89eed2d760-meta.json +1 -1
- package/.turbo/cache/2110a4d14e0d11b2-meta.json +1 -0
- package/.turbo/cache/2110a4d14e0d11b2.tar.zst +0 -0
- package/.turbo/cache/257a7a26ea72dbc5-meta.json +1 -1
- package/.turbo/cache/2990aaa7ebc5b967-meta.json +1 -1
- package/.turbo/cache/2990aaa7ebc5b967.tar.zst +0 -0
- package/.turbo/cache/2fd056afdf4eb39d-meta.json +1 -0
- package/.turbo/cache/2fd056afdf4eb39d.tar.zst +0 -0
- package/.turbo/cache/3bf45120d0cc9bd8-meta.json +1 -1
- package/.turbo/cache/3e12285c614db539-meta.json +1 -0
- package/.turbo/cache/3e12285c614db539.tar.zst +0 -0
- package/.turbo/cache/45035bf5c4147ccd-meta.json +1 -1
- package/.turbo/cache/4f92cea2d8c63de2-meta.json +1 -1
- package/.turbo/cache/5bf2d3f7ba5891e0-meta.json +1 -0
- package/.turbo/cache/5bf2d3f7ba5891e0.tar.zst +0 -0
- package/.turbo/cache/5c16ce3cff5c9dff-meta.json +1 -1
- package/.turbo/cache/5f304c0f37ef25f3-meta.json +1 -1
- package/.turbo/cache/64de7a53e02db647-meta.json +1 -1
- package/.turbo/cache/691a74627ec57993-meta.json +1 -1
- package/.turbo/cache/69aae513b7ec6c7d-meta.json +1 -1
- package/.turbo/cache/6dd67d179191bda8-meta.json +1 -0
- package/.turbo/cache/6dd67d179191bda8.tar.zst +0 -0
- package/.turbo/cache/6dd7058e6703cb35-meta.json +1 -1
- package/.turbo/cache/73e9073a5274616d-meta.json +1 -1
- package/.turbo/cache/773edc0f83c8c5a5-meta.json +1 -1
- package/.turbo/cache/784c03fe9fd5ac05-meta.json +1 -1
- package/.turbo/cache/786a822763403879-meta.json +1 -1
- package/.turbo/cache/7e1043cffa69f327-meta.json +1 -0
- package/.turbo/cache/7e1043cffa69f327.tar.zst +0 -0
- package/.turbo/cache/80a13352066a9801-meta.json +1 -0
- package/.turbo/cache/80a13352066a9801.tar.zst +0 -0
- package/.turbo/cache/80b5d974184a01df-meta.json +1 -1
- package/.turbo/cache/87219c41a4ace9cd-meta.json +1 -1
- package/.turbo/cache/87219c41a4ace9cd.tar.zst +0 -0
- package/.turbo/cache/8954c6073396fadd-meta.json +1 -1
- package/.turbo/cache/8e79bd5c3a16a72e-meta.json +1 -0
- package/.turbo/cache/92daa6d7c389d548-meta.json +1 -1
- package/.turbo/cache/993dff2edb7b6766-meta.json +1 -1
- package/.turbo/cache/9a097d6576dadd64-meta.json +1 -1
- package/.turbo/cache/a63cbfecf0f78586-meta.json +1 -0
- package/.turbo/cache/{ce67b6522dd09e64.tar.zst → a63cbfecf0f78586.tar.zst} +0 -0
- package/.turbo/cache/a6a56bb802e1c20f-meta.json +1 -1
- package/.turbo/cache/a77bc920ea508bb8-meta.json +1 -1
- package/.turbo/cache/a77bc920ea508bb8.tar.zst +0 -0
- package/.turbo/cache/b2c66328fdd78093-meta.json +1 -0
- package/.turbo/cache/b2c66328fdd78093.tar.zst +0 -0
- package/.turbo/cache/b54fc4f664a7a5a0-meta.json +1 -1
- package/.turbo/cache/ba4418918621fbcd-meta.json +1 -1
- package/.turbo/cache/be7c23c37b8ec74b-meta.json +1 -1
- package/.turbo/cache/be7c23c37b8ec74b.tar.zst +0 -0
- package/.turbo/cache/bffc7582905c2a5e-meta.json +1 -0
- package/.turbo/cache/bffc7582905c2a5e.tar.zst +0 -0
- package/.turbo/cache/caa0b4ac8d2a04dd-meta.json +1 -1
- package/.turbo/cache/caa0b4ac8d2a04dd.tar.zst +0 -0
- package/.turbo/cache/cc81de9c0b452a7c-meta.json +1 -1
- package/.turbo/cache/d39e6ef95ebc4cc0-meta.json +1 -0
- package/.turbo/cache/d39e6ef95ebc4cc0.tar.zst +0 -0
- package/.turbo/cache/d572ebb3c833e8f4-meta.json +1 -0
- package/.turbo/cache/d572ebb3c833e8f4.tar.zst +0 -0
- package/.turbo/cache/d61543843c932504-meta.json +1 -0
- package/.turbo/cache/d61543843c932504.tar.zst +0 -0
- package/.turbo/cache/dad1301ac69bcb85-meta.json +1 -1
- package/.turbo/cache/dea5945f55c6aba5-meta.json +1 -0
- package/.turbo/cache/dea5945f55c6aba5.tar.zst +0 -0
- package/.turbo/cache/e992dab20aeefbaf-meta.json +1 -1
- package/.turbo/cache/e992dab20aeefbaf.tar.zst +0 -0
- package/.turbo/cache/f411e2deb0676959-meta.json +1 -0
- package/.turbo/cache/f411e2deb0676959.tar.zst +0 -0
- package/.turbo/cache/fa132b5b5f0e75f8-meta.json +1 -1
- package/.turbo/cache/fbbe2704bf9cb90b-meta.json +1 -1
- package/CHANGELOG.md +26 -0
- package/components/checkbox/.turbo/turbo-build.log +3 -3
- package/components/checkbox/.turbo/turbo-bundler.log +3 -3
- package/components/checkbox/demo/api.md +4 -2
- package/components/checkbox/demo/api.min.js +31 -36
- package/components/checkbox/demo/index.min.js +31 -36
- package/components/checkbox/dist/auro-checkbox-group.d.ts +1 -1
- package/components/checkbox/dist/index.js +31 -36
- package/components/checkbox/src/auro-checkbox-group.js +2 -2
- package/components/combobox/.turbo/turbo-build.log +3 -3
- package/components/combobox/demo/api.md +17 -15
- package/components/combobox/demo/api.min.js +104 -116
- package/components/combobox/demo/index.min.js +104 -116
- package/components/combobox/dist/auro-combobox.d.ts +11 -4
- package/components/combobox/dist/auro-combobox.d.ts.map +1 -1
- package/components/combobox/dist/index.js +103 -115
- package/components/combobox/src/auro-combobox.js +22 -20
- package/components/counter/.turbo/turbo-build.log +3 -3
- package/components/counter/.turbo/turbo-bundler.log +3 -3
- package/components/datepicker/.turbo/turbo-build.log +9 -8
- package/components/datepicker/demo/api.md +107 -87
- package/components/datepicker/demo/api.min.js +96 -130
- package/components/datepicker/demo/index.min.js +96 -130
- package/components/datepicker/dist/auro-datepicker.d.ts +6 -13
- package/components/datepicker/dist/auro-datepicker.d.ts.map +1 -1
- package/components/datepicker/dist/index.js +96 -130
- package/components/datepicker/src/auro-datepicker.js +15 -35
- package/components/dropdown/.turbo/turbo-build.log +3 -3
- package/components/dropdown/.turbo/turbo-bundler.log +2 -2
- package/components/form/.turbo/turbo-build.log +3 -3
- package/components/form/.turbo/turbo-bundler.log +3 -3
- package/components/input/.turbo/turbo-build$colon$sass.log +51 -1
- package/components/input/.turbo/turbo-build.log +56 -6
- package/components/input/.turbo/turbo-bundler.log +3 -3
- package/components/input/.turbo/turbo-sass$colon$render.log +6 -0
- package/components/input/demo/api.md +83 -83
- package/components/input/demo/api.min.js +52 -61
- package/components/input/demo/index.md +6 -6
- package/components/input/demo/index.min.js +52 -61
- package/components/input/dist/auro-input.d.ts.map +1 -1
- package/components/input/dist/base-input.d.ts +5 -12
- package/components/input/dist/base-input.d.ts.map +1 -1
- package/components/input/dist/index.js +52 -61
- package/components/input/dist/styles/mixins-css.d.ts +3 -0
- package/components/input/dist/styles/mixins-css.d.ts.map +1 -0
- package/components/input/src/auro-input.js +0 -1
- package/components/input/src/base-input.js +22 -25
- package/components/input/src/styles/borders.scss +3 -19
- package/components/input/src/styles/color.css +1 -2
- package/components/input/src/styles/color.scss +3 -10
- package/components/input/src/styles/input-css.js +1 -1
- package/components/input/src/styles/input.css +1 -1
- package/components/input/src/styles/input.scss +4 -1
- package/components/input/src/styles/label-css.js +1 -1
- package/components/input/src/styles/label.css +1 -1
- package/components/input/src/styles/label.scss +4 -7
- package/components/input/src/styles/mixins-css.js +2 -0
- package/components/input/src/styles/mixins.css +1 -0
- package/components/input/src/styles/mixins.scss +45 -0
- package/components/input/src/styles/notificationIcons-css.js +1 -1
- package/components/input/src/styles/notificationIcons.css +13 -12
- package/components/input/src/styles/notificationIcons.scss +17 -25
- package/components/input/src/styles/style-css.js +1 -1
- package/components/input/src/styles/style.css +15 -17
- package/components/input/src/styles/style.scss +0 -4
- package/components/menu/.turbo/turbo-build.log +3 -3
- package/components/menu/.turbo/turbo-bundler.log +3 -3
- package/components/menu/demo/api.min.js +1 -1
- package/components/menu/demo/index.min.js +1 -1
- package/components/menu/dist/auro-menu.d.ts +1 -1
- package/components/menu/dist/index.js +1 -1
- package/components/menu/src/auro-menu.js +1 -1
- package/components/radio/.turbo/turbo-build.log +3 -3
- package/components/radio/.turbo/turbo-bundler.log +3 -3
- package/components/radio/demo/api.md +3 -1
- package/components/radio/demo/api.min.js +30 -35
- package/components/radio/demo/index.min.js +30 -35
- package/components/radio/dist/index.js +30 -35
- package/components/radio/src/auro-radio-group.js +1 -1
- package/components/select/.turbo/turbo-build.log +3 -3
- package/components/select/demo/api.md +7 -11
- package/components/select/demo/api.min.js +33 -60
- package/components/select/demo/index.min.js +33 -56
- package/components/select/dist/auro-select.d.ts +2 -2
- package/components/select/dist/auro-select.d.ts.map +1 -1
- package/components/select/dist/index.js +32 -55
- package/components/select/src/auro-select.js +3 -21
- package/package.json +1 -1
- package/packages/form-validation/src/validation.js +29 -34
- package/.turbo/cache/0663fcbb1d711029-meta.json +0 -1
- package/.turbo/cache/0663fcbb1d711029.tar.zst +0 -0
- package/.turbo/cache/0a2b0a4df8a0443f-meta.json +0 -1
- package/.turbo/cache/120c8e207aa1ba35-meta.json +0 -1
- package/.turbo/cache/120c8e207aa1ba35.tar.zst +0 -0
- package/.turbo/cache/17dd4bdef6550a07-meta.json +0 -1
- package/.turbo/cache/17dd4bdef6550a07.tar.zst +0 -0
- package/.turbo/cache/32c0b9995fb5f8dd-meta.json +0 -1
- package/.turbo/cache/32c0b9995fb5f8dd.tar.zst +0 -0
- package/.turbo/cache/47ba2b5ebdb579e9-meta.json +0 -1
- package/.turbo/cache/47ba2b5ebdb579e9.tar.zst +0 -0
- package/.turbo/cache/56cb35d4c7473a23-meta.json +0 -1
- package/.turbo/cache/56cb35d4c7473a23.tar.zst +0 -0
- package/.turbo/cache/626afdc67e0cb540-meta.json +0 -1
- package/.turbo/cache/626afdc67e0cb540.tar.zst +0 -0
- package/.turbo/cache/6ef81cf9a66f982a-meta.json +0 -1
- package/.turbo/cache/6ef81cf9a66f982a.tar.zst +0 -0
- package/.turbo/cache/8b735250fa5a62bf-meta.json +0 -1
- package/.turbo/cache/8b735250fa5a62bf.tar.zst +0 -0
- package/.turbo/cache/9154e8fe6ab767ea-meta.json +0 -1
- package/.turbo/cache/9154e8fe6ab767ea.tar.zst +0 -0
- package/.turbo/cache/a49cc58242467fdc-meta.json +0 -1
- package/.turbo/cache/a49cc58242467fdc.tar.zst +0 -0
- package/.turbo/cache/af061e7a077a9ba5-meta.json +0 -1
- package/.turbo/cache/af061e7a077a9ba5.tar.zst +0 -0
- package/.turbo/cache/b50f1b283b4b81cd-meta.json +0 -1
- package/.turbo/cache/b50f1b283b4b81cd.tar.zst +0 -0
- package/.turbo/cache/bf85bc040b7e64db-meta.json +0 -1
- package/.turbo/cache/bf85bc040b7e64db.tar.zst +0 -0
- package/.turbo/cache/cd5f6987783fb56d-meta.json +0 -1
- package/.turbo/cache/cd5f6987783fb56d.tar.zst +0 -0
- package/.turbo/cache/ce67b6522dd09e64-meta.json +0 -1
- package/.turbo/cache/d716cb7a08152beb-meta.json +0 -1
- package/.turbo/cache/d716cb7a08152beb.tar.zst +0 -0
- package/.turbo/cache/d7a47b77deb3d9a4-meta.json +0 -1
- package/.turbo/cache/d7a47b77deb3d9a4.tar.zst +0 -0
- package/.turbo/cache/ff58f630c9d69af4-meta.json +0 -1
- package/.turbo/cache/ff58f630c9d69af4.tar.zst +0 -0
- /package/.turbo/cache/{0a2b0a4df8a0443f.tar.zst → 8e79bd5c3a16a72e.tar.zst} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* stylelint-disable no-duplicate-selectors, max-nesting-depth, no-descending-specificity, selector-max-combinators, selector-max-compound-selectors, selector-no-qualifying-type */
|
|
2
2
|
label {
|
|
3
|
+
transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
3
4
|
position: absolute;
|
|
4
5
|
overflow: hidden;
|
|
5
6
|
pointer-events: none;
|
|
6
7
|
text-overflow: ellipsis;
|
|
7
|
-
transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
8
8
|
white-space: nowrap;
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
@import '@aurodesignsystem/design-tokens/dist/tokens/SCSSVariables';
|
|
2
2
|
|
|
3
|
+
@import 'mixins';
|
|
4
|
+
|
|
3
5
|
/* stylelint-disable no-duplicate-selectors, max-nesting-depth, no-descending-specificity, selector-max-combinators, selector-max-compound-selectors, selector-no-qualifying-type */
|
|
4
6
|
|
|
5
7
|
label {
|
|
8
|
+
@include transition-animation;
|
|
9
|
+
|
|
6
10
|
position: absolute;
|
|
7
11
|
overflow: hidden;
|
|
8
12
|
pointer-events: none;
|
|
9
13
|
text-overflow: ellipsis;
|
|
10
|
-
transition: all .3s cubic-bezier(.215, .61, .355, 1);
|
|
11
14
|
white-space: nowrap;
|
|
12
15
|
}
|
|
13
16
|
|
|
@@ -43,12 +46,6 @@ label {
|
|
|
43
46
|
}
|
|
44
47
|
}
|
|
45
48
|
|
|
46
|
-
@mixin active-label {
|
|
47
|
-
top: var(--ds-size-100, $ds-size-100);
|
|
48
|
-
font-size: var(--ds-text-body-size-xs, $ds-text-body-size-xs);
|
|
49
|
-
transform: unset;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
49
|
:host {
|
|
53
50
|
.wrapper {
|
|
54
51
|
&:focus-within {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// Handles the hidden state of the notification icons
|
|
2
|
+
@mixin hidden-notification {
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
width: 0;
|
|
5
|
+
height: 0;
|
|
6
|
+
padding: 0;
|
|
7
|
+
margin: 0;
|
|
8
|
+
visibility: hidden;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Handles the transition animation for the input field
|
|
12
|
+
@mixin transition-animation {
|
|
13
|
+
transition: all .3s cubic-bezier(.215, .61, .355, 1);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Handles highlighting the border during focus and invalid states
|
|
17
|
+
@mixin border-highlight-style {
|
|
18
|
+
&:before {
|
|
19
|
+
position: absolute;
|
|
20
|
+
display: block;
|
|
21
|
+
|
|
22
|
+
/* stylelint-disable declaration-block-no-redundant-longhand-properties */
|
|
23
|
+
border-bottom-width: 1px;
|
|
24
|
+
border-bottom-style: solid;
|
|
25
|
+
/* stylelint-enable declaration-block-no-redundant-longhand-properties */
|
|
26
|
+
|
|
27
|
+
content: '';
|
|
28
|
+
inset: 0;
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Handle highlighting the border during focus and invalid state
|
|
34
|
+
@mixin border-highlight-color {
|
|
35
|
+
&:before {
|
|
36
|
+
border-bottom-color: transparent;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Handle the active state of the label
|
|
41
|
+
@mixin active-label {
|
|
42
|
+
top: var(--ds-size-100, $ds-size-100);
|
|
43
|
+
font-size: var(--ds-text-body-size-xs, $ds-text-body-size-xs);
|
|
44
|
+
transform: unset;
|
|
45
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export default css`.typeIcon{display:flex;flex-direction:row;align-items:center}.typeIcon [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, 0.5rem)}.notificationIcons{display:flex;flex-direction:row;padding-right:var(--ds-size-100, 0.5rem)}:host([bordered]) .typeIcon{padding-left:var(--ds-size-100, 0.5rem)}:host([bordered]) .notificationIcons{align-items:center}.notification:not(:first-of-type){margin-left:var(--ds-size-100, 0.5rem)}.alertNotification{width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem))}.
|
|
2
|
+
export default css`.typeIcon{display:flex;flex-direction:row;align-items:center}.typeIcon [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, 0.5rem)}.notificationIcons{display:flex;flex-direction:row;padding-right:var(--ds-size-100, 0.5rem)}:host([bordered]) .typeIcon{padding-left:var(--ds-size-100, 0.5rem)}:host([bordered]) .notificationIcons{align-items:center}.notification:not(:first-of-type){margin-left:var(--ds-size-100, 0.5rem)}.alertNotification{width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem))}.passwordBtn{width:calc(var(--ds-size-300, 1.5rem));height:calc(var(--ds-size-300, 1.5rem))}.notificationBtn{display:block;width:var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);padding:0;border:0;background:unset;cursor:pointer}.notificationBtn [auro-icon]{display:block;height:var(--ds-size-300, 1.5rem);--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}.notificationBtn [auro-icon][hidden]{display:none}:host(:not([bordered])) .typeIcon,:host(:not([bordered])) .notificationIcons{align-items:flex-end;padding-bottom:var(--ds-size-50, 0.25rem)}.clearBtn{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);overflow:hidden;width:0;opacity:0}:host .wrapper:hover .clearBtn,:host .wrapper:focus-within .clearBtn{width:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));opacity:1}:host(:focus-within[type=password]) .notificationIcons[hasValue] .alertNotification{overflow:hidden;width:0;height:0;padding:0;margin:0;visibility:hidden}`;
|
|
@@ -32,18 +32,6 @@
|
|
|
32
32
|
height: calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem));
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.clearBtn {
|
|
36
|
-
width: calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));
|
|
37
|
-
height: calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));
|
|
38
|
-
opacity: 0;
|
|
39
|
-
pointer-events: none;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
:host .wrapper:hover .clearBtn, :host .wrapper:focus-within .clearBtn {
|
|
43
|
-
opacity: 1;
|
|
44
|
-
pointer-events: auto;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
35
|
.passwordBtn {
|
|
48
36
|
width: calc(var(--ds-size-300, 1.5rem));
|
|
49
37
|
height: calc(var(--ds-size-300, 1.5rem));
|
|
@@ -73,6 +61,19 @@
|
|
|
73
61
|
padding-bottom: var(--ds-size-50, 0.25rem);
|
|
74
62
|
}
|
|
75
63
|
|
|
64
|
+
.clearBtn {
|
|
65
|
+
transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
66
|
+
overflow: hidden;
|
|
67
|
+
width: 0;
|
|
68
|
+
opacity: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:host .wrapper:hover .clearBtn, :host .wrapper:focus-within .clearBtn {
|
|
72
|
+
width: calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));
|
|
73
|
+
height: calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));
|
|
74
|
+
opacity: 1;
|
|
75
|
+
}
|
|
76
|
+
|
|
76
77
|
:host(:focus-within[type=password]) .notificationIcons[hasValue] .alertNotification {
|
|
77
78
|
overflow: hidden;
|
|
78
79
|
width: 0;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@import '@aurodesignsystem/design-tokens/dist/tokens/SCSSVariables';
|
|
2
|
+
@import 'mixins';
|
|
2
3
|
|
|
3
4
|
/* stylelint-disable selector-max-attribute, max-nesting-depth, selector-max-class, selector-max-combinators, selector-max-compound-selectors */
|
|
4
5
|
|
|
@@ -42,25 +43,6 @@
|
|
|
42
43
|
height: calc(var(--ds-size-300, $ds-size-300) + var(--ds-size-25, $ds-size-25));
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
.clearBtn {
|
|
46
|
-
width: calc(var(--ds-size-200, $ds-size-200) + var(--ds-size-25, $ds-size-25));
|
|
47
|
-
height: calc(var(--ds-size-200, $ds-size-200) + var(--ds-size-25, $ds-size-25));
|
|
48
|
-
opacity: 0;
|
|
49
|
-
pointer-events: none;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
:host {
|
|
53
|
-
.wrapper {
|
|
54
|
-
&:hover,
|
|
55
|
-
&:focus-within {
|
|
56
|
-
.clearBtn {
|
|
57
|
-
opacity: 1;
|
|
58
|
-
pointer-events: auto;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
46
|
.passwordBtn {
|
|
65
47
|
width: calc(var(--ds-size-300, $ds-size-300));
|
|
66
48
|
height: calc(var(--ds-size-300, $ds-size-300));
|
|
@@ -95,15 +77,25 @@
|
|
|
95
77
|
}
|
|
96
78
|
}
|
|
97
79
|
|
|
98
|
-
|
|
80
|
+
.clearBtn {
|
|
81
|
+
@include transition-animation;
|
|
99
82
|
|
|
100
|
-
@mixin hidden-notification {
|
|
101
83
|
overflow: hidden;
|
|
102
84
|
width: 0;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
85
|
+
opacity: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
:host {
|
|
89
|
+
.wrapper {
|
|
90
|
+
&:hover,
|
|
91
|
+
&:focus-within {
|
|
92
|
+
.clearBtn {
|
|
93
|
+
width: calc(var(--ds-size-200, $ds-size-200) + var(--ds-size-25, $ds-size-25));
|
|
94
|
+
height: calc(var(--ds-size-200, $ds-size-200) + var(--ds-size-25, $ds-size-25));
|
|
95
|
+
opacity: 1;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
107
99
|
}
|
|
108
100
|
|
|
109
101
|
:host(:focus-within[type="password"]) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export default css`*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.typeIcon{display:flex;flex-direction:row;align-items:center}.typeIcon [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, 0.5rem)}.notificationIcons{display:flex;flex-direction:row;padding-right:var(--ds-size-100, 0.5rem)}:host([bordered]) .typeIcon{padding-left:var(--ds-size-100, 0.5rem)}:host([bordered]) .notificationIcons{align-items:center}.notification:not(:first-of-type){margin-left:var(--ds-size-100, 0.5rem)}.alertNotification{width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem))}.
|
|
2
|
+
export default css`*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.typeIcon{display:flex;flex-direction:row;align-items:center}.typeIcon [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, 0.5rem)}.notificationIcons{display:flex;flex-direction:row;padding-right:var(--ds-size-100, 0.5rem)}:host([bordered]) .typeIcon{padding-left:var(--ds-size-100, 0.5rem)}:host([bordered]) .notificationIcons{align-items:center}.notification:not(:first-of-type){margin-left:var(--ds-size-100, 0.5rem)}.alertNotification{width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem))}.passwordBtn{width:calc(var(--ds-size-300, 1.5rem));height:calc(var(--ds-size-300, 1.5rem))}.notificationBtn{display:block;width:var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);padding:0;border:0;background:unset;cursor:pointer}.notificationBtn [auro-icon]{display:block;height:var(--ds-size-300, 1.5rem);--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}.notificationBtn [auro-icon][hidden]{display:none}:host(:not([bordered])) .typeIcon,:host(:not([bordered])) .notificationIcons{align-items:flex-end;padding-bottom:var(--ds-size-50, 0.25rem)}.clearBtn{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);overflow:hidden;width:0;opacity:0}:host .wrapper:hover .clearBtn,:host .wrapper:focus-within .clearBtn{width:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));opacity:1}:host(:focus-within[type=password]) .notificationIcons[hasValue] .alertNotification{overflow:hidden;width:0;height:0;padding:0;margin:0;visibility:hidden}.inputElement-helpText{margin:var(--ds-size-50, 0.25rem) 0;font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-size-200, 1rem)}input{border:unset}.wrapper{position:relative;overflow:hidden;border-style:solid}:host(:not([bordered],[borderless])) .wrapper{border-width:1px 0}:host([bordered]) .wrapper{border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}:host(:not([borderless])) .wrapper:focus-within:before{position:absolute;display:block;border-bottom-width:1px;border-bottom-style:solid;content:"";inset:0;pointer-events:none}:host([validity]:not([validity=valid])) .wrapper:before{border-bottom:0}label{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);position:absolute;overflow:hidden;pointer-events:none;text-overflow:ellipsis;white-space:nowrap}:host(:not([bordered])) label{top:calc(100% - var(--ds-size-25, 0.125rem));transform:translateY(-100%)}:host(:not([bordered])) label.withIcon{left:var(--ds-size-400, 2rem)}:host([bordered]) label{top:50%;transform:translateY(-50%)}:host([bordered]) label.withIcon{left:var(--ds-size-500, 2.5rem)}:host([bordered]) label:not(label.withIcon){left:var(--ds-size-100, 0.5rem)}:host .wrapper:focus-within label{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host label.withValue{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host([activeLabel]) .wrapper label{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host{position:relative;display:block}.wrapper{display:flex;flex-direction:row}.main{display:flex;flex-direction:row;position:relative;flex:1}input{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);position:relative;overflow:hidden;min-height:calc(var(--ds-size-700, 3.5rem) + var(--ds-size-25, 0.125rem));max-height:calc(var(--ds-size-700, 3.5rem) + var(--ds-size-25, 0.125rem));flex:1;padding:var(--ds-size-400, 2rem) 0 var(--ds-size-50, 0.25rem);margin:0;font-family:var(--ds-font-family-default, "AS Circular", Helvetica Neue, Arial, sans-serif);font-size:var(--ds-size-200, 1rem);outline:none;text-overflow:ellipsis;white-space:nowrap}input::-ms-reveal,input::-ms-clear{display:none}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}input[type=number]{-moz-appearance:textfield;appearance:textfield}input:disabled{background:none;pointer-events:none}:host([bordered]) input{padding:var(--ds-size-400, 2rem) 0 var(--ds-size-100, 0.5rem)}`;
|
|
@@ -96,18 +96,6 @@
|
|
|
96
96
|
height: calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem));
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
.clearBtn {
|
|
100
|
-
width: calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));
|
|
101
|
-
height: calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));
|
|
102
|
-
opacity: 0;
|
|
103
|
-
pointer-events: none;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
:host .wrapper:hover .clearBtn, :host .wrapper:focus-within .clearBtn {
|
|
107
|
-
opacity: 1;
|
|
108
|
-
pointer-events: auto;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
99
|
.passwordBtn {
|
|
112
100
|
width: calc(var(--ds-size-300, 1.5rem));
|
|
113
101
|
height: calc(var(--ds-size-300, 1.5rem));
|
|
@@ -137,6 +125,19 @@
|
|
|
137
125
|
padding-bottom: var(--ds-size-50, 0.25rem);
|
|
138
126
|
}
|
|
139
127
|
|
|
128
|
+
.clearBtn {
|
|
129
|
+
transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
130
|
+
overflow: hidden;
|
|
131
|
+
width: 0;
|
|
132
|
+
opacity: 0;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
:host .wrapper:hover .clearBtn, :host .wrapper:focus-within .clearBtn {
|
|
136
|
+
width: calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));
|
|
137
|
+
height: calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));
|
|
138
|
+
opacity: 1;
|
|
139
|
+
}
|
|
140
|
+
|
|
140
141
|
:host(:focus-within[type=password]) .notificationIcons[hasValue] .alertNotification {
|
|
141
142
|
overflow: hidden;
|
|
142
143
|
width: 0;
|
|
@@ -191,11 +192,11 @@ input {
|
|
|
191
192
|
|
|
192
193
|
/* stylelint-disable no-duplicate-selectors, max-nesting-depth, no-descending-specificity, selector-max-combinators, selector-max-compound-selectors, selector-no-qualifying-type */
|
|
193
194
|
label {
|
|
195
|
+
transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
194
196
|
position: absolute;
|
|
195
197
|
overflow: hidden;
|
|
196
198
|
pointer-events: none;
|
|
197
199
|
text-overflow: ellipsis;
|
|
198
|
-
transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
199
200
|
white-space: nowrap;
|
|
200
201
|
}
|
|
201
202
|
|
|
@@ -236,9 +237,6 @@ label {
|
|
|
236
237
|
}
|
|
237
238
|
|
|
238
239
|
:host {
|
|
239
|
-
--size-lgsm: 1.875rem;
|
|
240
|
-
--size-xlsm: 2.75rem;
|
|
241
|
-
--size-mdxxs: 1.2rem;
|
|
242
240
|
position: relative;
|
|
243
241
|
display: block;
|
|
244
242
|
}
|
|
@@ -257,6 +255,7 @@ label {
|
|
|
257
255
|
|
|
258
256
|
/* stylelint-disable property-no-vendor-prefix, selector-no-qualifying-type */
|
|
259
257
|
input {
|
|
258
|
+
transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
260
259
|
position: relative;
|
|
261
260
|
overflow: hidden;
|
|
262
261
|
min-height: calc(var(--ds-size-700, 3.5rem) + var(--ds-size-25, 0.125rem));
|
|
@@ -268,7 +267,6 @@ input {
|
|
|
268
267
|
font-size: var(--ds-size-200, 1rem);
|
|
269
268
|
outline: none;
|
|
270
269
|
text-overflow: ellipsis;
|
|
271
|
-
transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
272
270
|
white-space: nowrap;
|
|
273
271
|
}
|
|
274
272
|
input::-ms-reveal, input::-ms-clear {
|
|
@@ -101,13 +101,13 @@ More info and automated migrator: https://sass-lang.com/d/import
|
|
|
101
101
|
|
|
102
102
|
[36m
|
|
103
103
|
[1m./src/index.js[22m → [1mdist[22m...[39m
|
|
104
|
-
[32mcreated [1mdist[22m in [
|
|
104
|
+
[32mcreated [1mdist[22m in [1m704ms[22m[39m
|
|
105
105
|
[36m
|
|
106
106
|
[1m./demo/index.js[22m → [1m./demo/[22m...[39m
|
|
107
|
-
[32mcreated [1m./demo/[22m in [
|
|
107
|
+
[32mcreated [1m./demo/[22m in [1m500ms[22m[39m
|
|
108
108
|
[36m
|
|
109
109
|
[1m./demo/api.js[22m → [1m./demo/[22m...[39m
|
|
110
|
-
[32mcreated [1m./demo/[22m in [
|
|
110
|
+
[32mcreated [1m./demo/[22m in [1m450ms[22m[39m
|
|
111
111
|
|
|
112
112
|
> @auro-formkit/auro-menu@4.1.4 build:docs
|
|
113
113
|
> wca analyze 'scripts/wca/*.js' --outFiles docs/api.md; node ../../packages/build-tools/src/docProcessor.mjs --component menu
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
[36m
|
|
6
6
|
[1m./src/index.js[22m → [1mdist[22m...[39m
|
|
7
|
-
[32mcreated [1mdist[22m in [
|
|
7
|
+
[32mcreated [1mdist[22m in [1m995ms[22m[39m
|
|
8
8
|
[36m
|
|
9
9
|
[1m./demo/index.js[22m → [1m./demo/[22m...[39m
|
|
10
|
-
[32mcreated [1m./demo/[22m in [
|
|
10
|
+
[32mcreated [1m./demo/[22m in [1m537ms[22m[39m
|
|
11
11
|
[36m
|
|
12
12
|
[1m./demo/api.js[22m → [1m./demo/[22m...[39m
|
|
13
|
-
[32mcreated [1m./demo/[22m in [
|
|
13
|
+
[32mcreated [1m./demo/[22m in [1m386ms[22m[39m
|
|
@@ -157,8 +157,8 @@ class AuroLibraryRuntimeUtils {
|
|
|
157
157
|
* @event auroMenu-selectedOption - Notifies that a new menuoption selection has been made.
|
|
158
158
|
* @event auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
159
159
|
* @event auroMenu-selectValueFailure - Notifies that a an attempt to select a menuoption by matching a value has failed.
|
|
160
|
-
* @event auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
161
160
|
* @event auroMenu-selectValueReset - Notifies that the component value has been reset.
|
|
161
|
+
* @event auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
162
162
|
* @event auroMenu-loadingChange - Notifies when the loading attribute is changed.
|
|
163
163
|
* @slot loadingText - Text to show while loading attribute is set
|
|
164
164
|
* @slot loadingIcon - Icon to show while loading attribute is set
|
|
@@ -117,8 +117,8 @@ class AuroLibraryRuntimeUtils {
|
|
|
117
117
|
* @event auroMenu-selectedOption - Notifies that a new menuoption selection has been made.
|
|
118
118
|
* @event auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
119
119
|
* @event auroMenu-selectValueFailure - Notifies that a an attempt to select a menuoption by matching a value has failed.
|
|
120
|
-
* @event auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
121
120
|
* @event auroMenu-selectValueReset - Notifies that the component value has been reset.
|
|
121
|
+
* @event auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
122
122
|
* @event auroMenu-loadingChange - Notifies when the loading attribute is changed.
|
|
123
123
|
* @slot loadingText - Text to show while loading attribute is set
|
|
124
124
|
* @slot loadingIcon - Icon to show while loading attribute is set
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* @event auroMenu-selectedOption - Notifies that a new menuoption selection has been made.
|
|
11
11
|
* @event auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
12
12
|
* @event auroMenu-selectValueFailure - Notifies that a an attempt to select a menuoption by matching a value has failed.
|
|
13
|
-
* @event auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
14
13
|
* @event auroMenu-selectValueReset - Notifies that the component value has been reset.
|
|
14
|
+
* @event auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
15
15
|
* @event auroMenu-loadingChange - Notifies when the loading attribute is changed.
|
|
16
16
|
* @slot loadingText - Text to show while loading attribute is set
|
|
17
17
|
* @slot loadingIcon - Icon to show while loading attribute is set
|
|
@@ -117,8 +117,8 @@ class AuroLibraryRuntimeUtils {
|
|
|
117
117
|
* @event auroMenu-selectedOption - Notifies that a new menuoption selection has been made.
|
|
118
118
|
* @event auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
119
119
|
* @event auroMenu-selectValueFailure - Notifies that a an attempt to select a menuoption by matching a value has failed.
|
|
120
|
-
* @event auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
121
120
|
* @event auroMenu-selectValueReset - Notifies that the component value has been reset.
|
|
121
|
+
* @event auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
122
122
|
* @event auroMenu-loadingChange - Notifies when the loading attribute is changed.
|
|
123
123
|
* @slot loadingText - Text to show while loading attribute is set
|
|
124
124
|
* @slot loadingIcon - Icon to show while loading attribute is set
|
|
@@ -24,8 +24,8 @@ import AuroLibraryRuntimeUtils from '@aurodesignsystem/auro-library/scripts/util
|
|
|
24
24
|
* @event auroMenu-selectedOption - Notifies that a new menuoption selection has been made.
|
|
25
25
|
* @event auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
26
26
|
* @event auroMenu-selectValueFailure - Notifies that a an attempt to select a menuoption by matching a value has failed.
|
|
27
|
-
* @event auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
28
27
|
* @event auroMenu-selectValueReset - Notifies that the component value has been reset.
|
|
28
|
+
* @event auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
29
29
|
* @event auroMenu-loadingChange - Notifies when the loading attribute is changed.
|
|
30
30
|
* @slot loadingText - Text to show while loading attribute is set
|
|
31
31
|
* @slot loadingIcon - Icon to show while loading attribute is set
|
|
@@ -138,13 +138,13 @@ Run in verbose mode to see all warnings.
|
|
|
138
138
|
|
|
139
139
|
[36m
|
|
140
140
|
[1m./src/index.js[22m → [1mdist[22m...[39m
|
|
141
|
-
[32mcreated [1mdist[22m in [
|
|
141
|
+
[32mcreated [1mdist[22m in [1m776ms[22m[39m
|
|
142
142
|
[36m
|
|
143
143
|
[1m./demo/index.js[22m → [1m./demo/[22m...[39m
|
|
144
|
-
[32mcreated [1m./demo/[22m in [
|
|
144
|
+
[32mcreated [1m./demo/[22m in [1m440ms[22m[39m
|
|
145
145
|
[36m
|
|
146
146
|
[1m./demo/api.js[22m → [1m./demo/[22m...[39m
|
|
147
|
-
[32mcreated [1m./demo/[22m in [
|
|
147
|
+
[32mcreated [1m./demo/[22m in [1m507ms[22m[39m
|
|
148
148
|
|
|
149
149
|
> @auro-formkit/auro-radio@4.1.1 build:docs
|
|
150
150
|
> wca analyze 'scripts/wca/*.js' --outFiles docs/api.md; node ../../packages/build-tools/src/docProcessor.mjs --component radio
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
[36m
|
|
6
6
|
[1m./src/index.js[22m → [1mdist[22m...[39m
|
|
7
|
-
[32mcreated [1mdist[22m in [
|
|
7
|
+
[32mcreated [1mdist[22m in [1m799ms[22m[39m
|
|
8
8
|
[36m
|
|
9
9
|
[1m./demo/index.js[22m → [1m./demo/[22m...[39m
|
|
10
|
-
[32mcreated [1m./demo/[22m in [
|
|
10
|
+
[32mcreated [1m./demo/[22m in [1m396ms[22m[39m
|
|
11
11
|
[36m
|
|
12
12
|
[1m./demo/api.js[22m → [1m./demo/[22m...[39m
|
|
13
|
-
[32mcreated [1m./demo/[22m in [
|
|
13
|
+
[32mcreated [1m./demo/[22m in [1m525ms[22m[39m
|
|
@@ -208,7 +208,9 @@ Use the `disabled` attribute to disable singular `<auro-radio>` elements or the
|
|
|
208
208
|
|
|
209
209
|
### Error
|
|
210
210
|
|
|
211
|
-
Use the `error` attribute to
|
|
211
|
+
Use the `error` attribute to apply a persistent custom error that supersedes the HTML5 validation logic.
|
|
212
|
+
|
|
213
|
+
A custom error message can be set using the `error` attribute, or it can be used in conjuction with the `setCustomValidityCustomError` attribute.
|
|
212
214
|
|
|
213
215
|
<div class="exampleWrapper">
|
|
214
216
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/error.html) -->
|
|
@@ -436,20 +436,20 @@ class AuroFormValidation {
|
|
|
436
436
|
const pattern = new RegExp(`^${elem.pattern}$`, 'u');
|
|
437
437
|
|
|
438
438
|
if (!pattern.test(elem.value)) {
|
|
439
|
-
elem.validity = '
|
|
440
|
-
elem.
|
|
439
|
+
elem.validity = 'patternMismatch';
|
|
440
|
+
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || '';
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
|
|
444
444
|
// Length > 0 is required to prevent the error message from showing when the input is empty
|
|
445
445
|
if (elem.value?.length > 0 && elem.value?.length < elem.minLength) {
|
|
446
446
|
elem.validity = 'tooShort';
|
|
447
|
-
elem.
|
|
447
|
+
elem.errorMessage = elem.setCustomValidityTooShort || elem.setCustomValidity || '';
|
|
448
448
|
}
|
|
449
449
|
|
|
450
450
|
if (elem.value?.length > elem.maxLength) {
|
|
451
451
|
elem.validity = 'tooLong';
|
|
452
|
-
elem.
|
|
452
|
+
elem.errorMessage = elem.setCustomValidityTooLong || elem.setCustomValidity || '';
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
|
|
@@ -465,33 +465,32 @@ class AuroFormValidation {
|
|
|
465
465
|
const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
|
|
466
466
|
|
|
467
467
|
if (!elem.value.match(emailRegex)) {
|
|
468
|
-
elem.validity = '
|
|
469
|
-
elem.
|
|
468
|
+
elem.validity = 'patternMismatch';
|
|
469
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
470
470
|
}
|
|
471
471
|
} else if (elem.type === 'credit-card') {
|
|
472
472
|
if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
|
|
473
473
|
elem.validity = 'tooShort';
|
|
474
|
-
elem.
|
|
474
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
475
475
|
}
|
|
476
476
|
} else if (elem.type === 'number') {
|
|
477
477
|
if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
|
|
478
478
|
elem.validity = 'rangeOverflow';
|
|
479
|
-
elem.
|
|
479
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
480
480
|
}
|
|
481
481
|
|
|
482
|
-
if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
|
|
482
|
+
if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
|
|
483
483
|
elem.validity = 'rangeUnderflow';
|
|
484
|
-
elem.
|
|
484
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
485
485
|
}
|
|
486
|
-
|
|
487
486
|
} else if (elem.type === 'month-day-year' ||
|
|
488
487
|
elem.type === 'month-year' ||
|
|
489
488
|
elem.type === 'month-fullYear' ||
|
|
490
489
|
elem.type === 'year-month-day'
|
|
491
490
|
) {
|
|
492
|
-
if (elem.value
|
|
491
|
+
if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
|
|
493
492
|
elem.validity = 'tooShort';
|
|
494
|
-
elem.
|
|
493
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
495
494
|
} else {
|
|
496
495
|
const valueDate = new Date(elem.value);
|
|
497
496
|
|
|
@@ -501,7 +500,7 @@ class AuroFormValidation {
|
|
|
501
500
|
|
|
502
501
|
if (valueDate > maxDate) {
|
|
503
502
|
elem.validity = 'rangeOverflow';
|
|
504
|
-
elem.
|
|
503
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
505
504
|
}
|
|
506
505
|
}
|
|
507
506
|
|
|
@@ -511,7 +510,7 @@ class AuroFormValidation {
|
|
|
511
510
|
|
|
512
511
|
if (valueDate < minDate) {
|
|
513
512
|
elem.validity = 'rangeUnderflow';
|
|
514
|
-
elem.
|
|
513
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
515
514
|
}
|
|
516
515
|
}
|
|
517
516
|
}
|
|
@@ -534,10 +533,10 @@ class AuroFormValidation {
|
|
|
534
533
|
|
|
535
534
|
if (elem.hasAttribute('error')) {
|
|
536
535
|
elem.validity = 'customError';
|
|
537
|
-
elem.
|
|
536
|
+
elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
|
|
538
537
|
} else if (validationShouldRun) {
|
|
539
538
|
elem.validity = 'valid';
|
|
540
|
-
elem.
|
|
539
|
+
elem.errorMessage = '';
|
|
541
540
|
|
|
542
541
|
/**
|
|
543
542
|
* Only validate once we interact with the datepicker
|
|
@@ -549,7 +548,7 @@ class AuroFormValidation {
|
|
|
549
548
|
let hasValue = elem.value && elem.value.length > 0;
|
|
550
549
|
|
|
551
550
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
552
|
-
if (this.auroInputElements
|
|
551
|
+
if (this.auroInputElements?.length === 2) {
|
|
553
552
|
if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
|
|
554
553
|
hasValue = false;
|
|
555
554
|
}
|
|
@@ -557,31 +556,27 @@ class AuroFormValidation {
|
|
|
557
556
|
|
|
558
557
|
if (!hasValue && elem.required) {
|
|
559
558
|
elem.validity = 'valueMissing';
|
|
560
|
-
elem.
|
|
559
|
+
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
561
560
|
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
562
561
|
this.validateType(elem);
|
|
563
562
|
this.validateAttributes(elem);
|
|
564
563
|
}
|
|
565
564
|
}
|
|
566
565
|
|
|
567
|
-
if (this.auroInputElements
|
|
566
|
+
if (this.auroInputElements?.length > 0) {
|
|
568
567
|
elem.validity = this.auroInputElements[0].validity;
|
|
569
|
-
elem.
|
|
568
|
+
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
570
569
|
|
|
571
|
-
if (elem.validity === 'valid') {
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
|
|
575
|
-
}
|
|
570
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
|
|
571
|
+
elem.validity = this.auroInputElements[1].validity;
|
|
572
|
+
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
576
573
|
}
|
|
577
574
|
}
|
|
578
575
|
|
|
579
576
|
if (validationShouldRun || elem.hasAttribute('error')) {
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
elem.setCustomValidity = elem.ValidityMessageOverride;
|
|
584
|
-
}
|
|
577
|
+
// Use the validity message override if it is declared
|
|
578
|
+
if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
|
|
579
|
+
elem.errorMessage = elem.ValidityMessageOverride;
|
|
585
580
|
}
|
|
586
581
|
|
|
587
582
|
this.getErrorMessage(elem);
|
|
@@ -627,18 +622,18 @@ class AuroFormValidation {
|
|
|
627
622
|
if (elem.validity !== 'valid') {
|
|
628
623
|
if (elem.setCustomValidity) {
|
|
629
624
|
elem.errorMessage = elem.setCustomValidity;
|
|
630
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
625
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
|
|
631
626
|
const input = elem.renderRoot.querySelector('input');
|
|
632
627
|
|
|
633
628
|
if (input.validationMessage.length > 0) {
|
|
634
629
|
elem.errorMessage = input.validationMessage;
|
|
635
630
|
}
|
|
636
|
-
} else if (this.inputElements &&
|
|
631
|
+
} else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
|
|
637
632
|
const firstInput = this.inputElements[0];
|
|
638
633
|
|
|
639
634
|
if (firstInput.validationMessage.length > 0) {
|
|
640
635
|
elem.errorMessage = firstInput.validationMessage;
|
|
641
|
-
} else if (this.inputElements
|
|
636
|
+
} else if (this.inputElements?.length === 2) {
|
|
642
637
|
const secondInput = this.inputElements[1];
|
|
643
638
|
|
|
644
639
|
if (secondInput.validationMessage.length > 0) {
|
|
@@ -1061,7 +1056,7 @@ class AuroRadioGroup extends r {
|
|
|
1061
1056
|
</p>`
|
|
1062
1057
|
: x`
|
|
1063
1058
|
<p class="radioGroupElement-helpText" role="alert" aria-live="assertive" part="helpText">
|
|
1064
|
-
${this.
|
|
1059
|
+
${this.errorMessage}
|
|
1065
1060
|
</p>`
|
|
1066
1061
|
}
|
|
1067
1062
|
`;
|