@momentum-design/components 0.120.31 → 0.120.32
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/dist/browser/index.js +227 -367
- package/dist/browser/index.js.map +2 -2
- package/dist/components/checkbox/checkbox.component.d.ts +2 -0
- package/dist/components/checkbox/checkbox.component.js +3 -0
- package/dist/components/checkbox/checkbox.styles.js +14 -52
- package/dist/components/combobox/combobox.component.d.ts +1 -0
- package/dist/components/combobox/combobox.component.js +1 -0
- package/dist/components/formfieldgroup/formfieldgroup.component.d.ts +1 -0
- package/dist/components/formfieldgroup/formfieldgroup.component.js +1 -0
- package/dist/components/formfieldwrapper/formfieldwrapper.component.d.ts +1 -0
- package/dist/components/formfieldwrapper/formfieldwrapper.component.js +1 -0
- package/dist/components/formfieldwrapper/formfieldwrapper.styles.js +8 -4
- package/dist/components/input/input.component.d.ts +1 -0
- package/dist/components/input/input.component.js +1 -0
- package/dist/components/password/password.component.d.ts +1 -0
- package/dist/components/password/password.component.js +1 -0
- package/dist/components/progressbar/progressbar.component.d.ts +1 -0
- package/dist/components/progressbar/progressbar.component.js +1 -0
- package/dist/components/radio/radio.component.d.ts +5 -8
- package/dist/components/radio/radio.component.js +6 -8
- package/dist/components/radio/radio.styles.js +16 -74
- package/dist/components/searchfield/searchfield.component.d.ts +1 -0
- package/dist/components/searchfield/searchfield.component.js +1 -0
- package/dist/components/select/select.component.d.ts +1 -0
- package/dist/components/select/select.component.js +1 -0
- package/dist/components/staticcheckbox/staticcheckbox.component.d.ts +4 -9
- package/dist/components/staticcheckbox/staticcheckbox.component.js +4 -9
- package/dist/components/staticcheckbox/staticcheckbox.styles.js +54 -56
- package/dist/components/staticradio/staticradio.component.d.ts +5 -12
- package/dist/components/staticradio/staticradio.component.js +5 -12
- package/dist/components/staticradio/staticradio.styles.js +65 -58
- package/dist/components/statictoggle/statictoggle.component.d.ts +7 -15
- package/dist/components/statictoggle/statictoggle.component.js +7 -15
- package/dist/components/statictoggle/statictoggle.styles.js +55 -64
- package/dist/components/textarea/textarea.component.d.ts +1 -0
- package/dist/components/textarea/textarea.component.js +1 -0
- package/dist/components/toggle/toggle.component.d.ts +8 -11
- package/dist/components/toggle/toggle.component.js +10 -13
- package/dist/components/toggle/toggle.styles.js +12 -58
- package/dist/custom-elements.json +1916 -1900
- package/dist/react/checkbox/index.d.ts +2 -0
- package/dist/react/checkbox/index.js +2 -0
- package/dist/react/combobox/index.d.ts +1 -0
- package/dist/react/combobox/index.js +1 -0
- package/dist/react/formfieldgroup/index.d.ts +1 -0
- package/dist/react/formfieldgroup/index.js +1 -0
- package/dist/react/formfieldwrapper/index.d.ts +1 -0
- package/dist/react/formfieldwrapper/index.js +1 -0
- package/dist/react/index.d.ts +4 -4
- package/dist/react/index.js +4 -4
- package/dist/react/input/index.d.ts +1 -0
- package/dist/react/input/index.js +1 -0
- package/dist/react/password/index.d.ts +1 -0
- package/dist/react/password/index.js +1 -0
- package/dist/react/progressbar/index.d.ts +1 -0
- package/dist/react/progressbar/index.js +1 -0
- package/dist/react/radio/index.d.ts +5 -8
- package/dist/react/radio/index.js +5 -8
- package/dist/react/searchfield/index.d.ts +1 -0
- package/dist/react/searchfield/index.js +1 -0
- package/dist/react/select/index.d.ts +1 -0
- package/dist/react/select/index.js +1 -0
- package/dist/react/staticcheckbox/index.d.ts +4 -9
- package/dist/react/staticcheckbox/index.js +4 -9
- package/dist/react/staticradio/index.d.ts +5 -12
- package/dist/react/staticradio/index.js +5 -12
- package/dist/react/statictoggle/index.d.ts +7 -15
- package/dist/react/statictoggle/index.js +7 -15
- package/dist/react/textarea/index.d.ts +1 -0
- package/dist/react/textarea/index.js +1 -0
- package/dist/react/toggle/index.d.ts +8 -11
- package/dist/react/toggle/index.js +8 -11
- package/package.json +1 -1
|
@@ -2,82 +2,80 @@ import { css } from 'lit';
|
|
|
2
2
|
const styles = [
|
|
3
3
|
css `
|
|
4
4
|
:host {
|
|
5
|
+
--mdc-checkbox-border-color: var(--mds-color-theme-outline-input-normal);
|
|
6
|
+
--mdc-checkbox-background-color: var(--mds-color-theme-control-inactive-normal);
|
|
7
|
+
--mdc-checkbox-icon-color: var(--mds-color-theme-inverted-text-primary-normal);
|
|
8
|
+
--mdc-checkbox-size: 1rem;
|
|
5
9
|
margin: 0.125rem 0;
|
|
6
10
|
border-radius: 0.125rem;
|
|
7
|
-
--mdc-staticcheckbox-border-color: var(--mds-color-theme-outline-button-normal);
|
|
8
|
-
--mdc-staticcheckbox-checked-background-color: var(--mds-color-theme-control-active-normal);
|
|
9
|
-
--mdc-staticcheckbox-disabled-background-color: var(--mds-color-theme-control-inactive-disabled);
|
|
10
|
-
--mdc-staticcheckbox-disabled-icon-color: var(--mds-color-theme-text-primary-disabled);
|
|
11
|
-
--mdc-staticcheckbox-icon-background-color: var(--mds-color-theme-control-inactive-normal);
|
|
12
|
-
--mdc-staticcheckbox-icon-border-color: var(--mds-color-theme-outline-input-normal);
|
|
13
|
-
--mdc-staticcheckbox-icon-color: var(--mds-color-theme-inverted-text-primary-normal);
|
|
14
|
-
--mdc-staticcheckbox-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);
|
|
15
|
-
--mdc-staticcheckbox-disabled-checked-icon-color: var(--mds-color-theme-control-active-disabled);
|
|
16
|
-
--mdc-staticcheckbox-readonly-border-color: var(--mds-color-theme-outline-primary-normal);
|
|
17
|
-
--mdc-staticcheckbox-text-normal-color: var(--mds-color-theme-text-primary-normal);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
:host([checked])::part(icon-container),
|
|
21
|
-
:host([indeterminate])::part(icon-container) {
|
|
22
|
-
background-color: var(--mdc-staticcheckbox-checked-background-color);
|
|
23
|
-
border-color: transparent;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
:host([disabled])::part(icon-container),
|
|
27
|
-
:host([soft-disabled])::part(icon-container),
|
|
28
|
-
:host([disabled][readonly])::part(icon-container),
|
|
29
|
-
:host([soft-disabled][readonly])::part(icon-container) {
|
|
30
|
-
border-color: var(--mdc-staticcheckbox-disabled-border-color);
|
|
31
|
-
background-color: var(--mdc-staticcheckbox-disabled-background-color);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
:host([disabled][checked])::part(icon-container),
|
|
35
|
-
:host([disabled][indeterminate])::part(icon-container),
|
|
36
|
-
:host([soft-disabled][checked])::part(icon-container),
|
|
37
|
-
:host([soft-disabled][indeterminate])::part(icon-container),
|
|
38
|
-
:host([disabled][readonly][checked])::part(icon-container),
|
|
39
|
-
:host([disabled][readonly][indeterminate])::part(icon-container),
|
|
40
|
-
:host([soft-disabled][readonly][checked])::part(icon-container),
|
|
41
|
-
:host([soft-disabled][readonly][indeterminate])::part(icon-container) {
|
|
42
|
-
background-color: var(--mdc-staticcheckbox-disabled-checked-icon-color);
|
|
43
|
-
border: 0.0625rem solid var(--mdc-staticcheckbox-disabled-border-color);
|
|
44
11
|
}
|
|
45
12
|
|
|
46
13
|
:host::part(icon-container) {
|
|
47
14
|
display: flex;
|
|
48
15
|
align-items: center;
|
|
49
|
-
border: 0.0625rem solid var(--mdc-
|
|
50
|
-
background-color: var(--mdc-
|
|
51
|
-
width:
|
|
52
|
-
height:
|
|
16
|
+
border: 0.0625rem solid var(--mdc-checkbox-border-color);
|
|
17
|
+
background-color: var(--mdc-checkbox-background-color);
|
|
18
|
+
width: var(--mdc-checkbox-size);
|
|
19
|
+
height: var(--mdc-checkbox-size);
|
|
53
20
|
border-radius: 0.125rem;
|
|
54
21
|
}
|
|
55
22
|
|
|
56
|
-
:host
|
|
57
|
-
|
|
58
|
-
background-color: unset;
|
|
23
|
+
:host::part(checkbox-icon) {
|
|
24
|
+
--mdc-icon-fill-color: var(--mdc-checkbox-icon-color);
|
|
59
25
|
}
|
|
60
26
|
|
|
61
|
-
:host
|
|
62
|
-
|
|
27
|
+
:host([checked]),
|
|
28
|
+
:host([indeterminate]) {
|
|
29
|
+
--mdc-checkbox-background-color: var(--mds-color-theme-control-active-normal);
|
|
30
|
+
--mdc-checkbox-border-color: transparent;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:host([readonly]) {
|
|
34
|
+
--mdc-checkbox-border-color: var(--mds-color-theme-outline-primary-normal);
|
|
35
|
+
--mdc-checkbox-background-color: var(--mds-color-theme-control-inactive-disabled);
|
|
36
|
+
--mdc-checkbox-icon-color: var(--mds-color-theme-text-primary-normal);
|
|
63
37
|
}
|
|
64
38
|
|
|
65
|
-
:host([disabled])
|
|
66
|
-
:host([soft-disabled])
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
--mdc-icon-
|
|
39
|
+
:host([disabled]),
|
|
40
|
+
:host([soft-disabled]) {
|
|
41
|
+
--mdc-checkbox-border-color: var(--mds-color-theme-outline-primary-disabled);
|
|
42
|
+
--mdc-checkbox-background-color: var(--mds-color-theme-control-inactive-disabled);
|
|
43
|
+
--mdc-checkbox-icon-color: var(--mds-color-theme-text-primary-disabled);
|
|
44
|
+
cursor: default;
|
|
70
45
|
}
|
|
71
46
|
|
|
72
|
-
:host([
|
|
73
|
-
|
|
47
|
+
:host([disabled][checked]),
|
|
48
|
+
:host([disabled][indeterminate]),
|
|
49
|
+
:host([soft-disabled][checked]),
|
|
50
|
+
:host([soft-disabled][indeterminate]) {
|
|
51
|
+
--mdc-checkbox-background-color: var(--mds-color-theme-control-active-disabled);
|
|
52
|
+
--mdc-checkbox-border-color: var(--mds-color-theme-outline-primary-disabled);
|
|
74
53
|
}
|
|
75
54
|
|
|
76
55
|
/* High Contrast Mode */
|
|
77
56
|
@media (forced-colors: active) {
|
|
78
|
-
:host([checked])
|
|
79
|
-
:host([indeterminate])
|
|
80
|
-
|
|
57
|
+
:host([checked]),
|
|
58
|
+
:host([indeterminate]) {
|
|
59
|
+
--mdc-checkbox-background-color: SelectedItem;
|
|
60
|
+
--mdc-checkbox-border-color: SelectedItemText;
|
|
61
|
+
--mdc-checkbox-icon-color: SelectedItemText;
|
|
62
|
+
}
|
|
63
|
+
:host([readonly]) {
|
|
64
|
+
--mdc-checkbox-border-color: Highlight;
|
|
65
|
+
--mdc-checkbox-icon-color: HighlightText;
|
|
66
|
+
}
|
|
67
|
+
:host([disabled]),
|
|
68
|
+
:host([soft-disabled]) {
|
|
69
|
+
--mdc-checkbox-background-color: GrayText;
|
|
70
|
+
--mdc-checkbox-border-color: GrayText;
|
|
71
|
+
--mdc-checkbox-icon-color: GrayText;
|
|
72
|
+
}
|
|
73
|
+
:host([disabled][checked]),
|
|
74
|
+
:host([disabled][indeterminate]),
|
|
75
|
+
:host([soft-disabled][checked]),
|
|
76
|
+
:host([soft-disabled][indeterminate]) {
|
|
77
|
+
--mdc-checkbox-border-color: GrayText;
|
|
78
|
+
--mdc-checkbox-icon-color: GrayText;
|
|
81
79
|
}
|
|
82
80
|
}
|
|
83
81
|
`,
|
|
@@ -9,18 +9,11 @@ declare const StaticRadio_base: import("../../utils/mixins/index.types").Constru
|
|
|
9
9
|
*
|
|
10
10
|
* @tagname mdc-staticradio
|
|
11
11
|
*
|
|
12
|
-
* @cssproperty --mdc-
|
|
13
|
-
* @cssproperty --mdc-
|
|
14
|
-
* @cssproperty --mdc-
|
|
15
|
-
* @cssproperty --mdc-
|
|
16
|
-
* @cssproperty --mdc-
|
|
17
|
-
* @cssproperty --mdc-staticradio-inner-circle-disabled-background - background color of the inner circle when disabled
|
|
18
|
-
* @cssproperty --mdc-staticradio-control-inactive-color - color of the radio button when inactive
|
|
19
|
-
* @cssproperty --mdc-staticradio-control-inactive-disabled-background - background color of the radio button when
|
|
20
|
-
* inactive and disabled
|
|
21
|
-
* @cssproperty --mdc-staticradio-control-active-color - color of the radio button when active
|
|
22
|
-
* @cssproperty --mdc-staticradio-control-active-disabled-background - background color of the radio button
|
|
23
|
-
* when active and disabled
|
|
12
|
+
* @cssproperty --mdc-radio-inner-circle-size - size of the inner circle
|
|
13
|
+
* @cssproperty --mdc-radio-outer-circle-size - size of the outer circle
|
|
14
|
+
* @cssproperty --mdc-radio-inner-circle-background-color - background color of the inner circle
|
|
15
|
+
* @cssproperty --mdc-radio-outer-circle-border-color - border color of the outer circle
|
|
16
|
+
* @cssproperty --mdc-radio-outer-circle-background-color - background color of the outer circle
|
|
24
17
|
*
|
|
25
18
|
* @csspart radio-icon - The radio icon.
|
|
26
19
|
*
|
|
@@ -20,18 +20,11 @@ import styles from './staticradio.styles';
|
|
|
20
20
|
*
|
|
21
21
|
* @tagname mdc-staticradio
|
|
22
22
|
*
|
|
23
|
-
* @cssproperty --mdc-
|
|
24
|
-
* @cssproperty --mdc-
|
|
25
|
-
* @cssproperty --mdc-
|
|
26
|
-
* @cssproperty --mdc-
|
|
27
|
-
* @cssproperty --mdc-
|
|
28
|
-
* @cssproperty --mdc-staticradio-inner-circle-disabled-background - background color of the inner circle when disabled
|
|
29
|
-
* @cssproperty --mdc-staticradio-control-inactive-color - color of the radio button when inactive
|
|
30
|
-
* @cssproperty --mdc-staticradio-control-inactive-disabled-background - background color of the radio button when
|
|
31
|
-
* inactive and disabled
|
|
32
|
-
* @cssproperty --mdc-staticradio-control-active-color - color of the radio button when active
|
|
33
|
-
* @cssproperty --mdc-staticradio-control-active-disabled-background - background color of the radio button
|
|
34
|
-
* when active and disabled
|
|
23
|
+
* @cssproperty --mdc-radio-inner-circle-size - size of the inner circle
|
|
24
|
+
* @cssproperty --mdc-radio-outer-circle-size - size of the outer circle
|
|
25
|
+
* @cssproperty --mdc-radio-inner-circle-background-color - background color of the inner circle
|
|
26
|
+
* @cssproperty --mdc-radio-outer-circle-border-color - border color of the outer circle
|
|
27
|
+
* @cssproperty --mdc-radio-outer-circle-background-color - background color of the outer circle
|
|
35
28
|
*
|
|
36
29
|
* @csspart radio-icon - The radio icon.
|
|
37
30
|
*
|
|
@@ -2,69 +2,40 @@ import { css } from 'lit';
|
|
|
2
2
|
const styles = [
|
|
3
3
|
css `
|
|
4
4
|
:host {
|
|
5
|
+
--mdc-radio-inner-circle-size: 0.375rem;
|
|
6
|
+
--mdc-radio-outer-circle-size: 1rem;
|
|
7
|
+
--mdc-radio-inner-circle-background-color: var(--mds-color-theme-inverted-text-primary-normal);
|
|
8
|
+
--mdc-radio-outer-circle-border-color: var(--mds-color-theme-outline-input-normal);
|
|
9
|
+
--mdc-radio-outer-circle-background-color: var(--mds-color-theme-control-inactive-normal);
|
|
10
|
+
|
|
5
11
|
display: block;
|
|
6
12
|
position: relative;
|
|
7
13
|
width: 1rem;
|
|
8
14
|
height: 1rem;
|
|
9
15
|
margin: 0.125rem 0;
|
|
10
16
|
border-radius: 50%;
|
|
11
|
-
|
|
12
|
-
--mdc-staticradio-inner-circle-size: 0.375rem;
|
|
13
|
-
--mdc-staticradio-text-normal-color: var(--mds-color-theme-text-primary-normal);
|
|
14
|
-
--mdc-staticradio-text-disabled-color: var(--mds-color-theme-text-primary-disabled);
|
|
15
|
-
--mdc-staticradio-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);
|
|
16
|
-
--mdc-staticradio-normal-border-color: var(--mds-color-theme-outline-input-normal);
|
|
17
|
-
--mdc-staticradio-inner-circle-normal-background: var(--mds-color-theme-inverted-text-primary-normal);
|
|
18
|
-
--mdc-staticradio-inner-circle-disabled-background: var(--mds-color-theme-inverted-text-primary-disabled);
|
|
19
|
-
--mdc-staticradio-control-inactive-color: var(--mds-color-theme-control-inactive-normal);
|
|
20
|
-
--mdc-staticradio-control-inactive-disabled-background: var(--mds-color-theme-control-inactive-disabled);
|
|
21
|
-
--mdc-staticradio-control-active-color: var(--mds-color-theme-control-active-normal);
|
|
22
|
-
--mdc-staticradio-control-active-disabled-background: var(--mds-color-theme-control-active-disabled);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.radio-icon:after {
|
|
26
|
-
content: '';
|
|
27
|
-
position: absolute;
|
|
28
|
-
display: none;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
:host([disabled])::part(radio-icon),
|
|
32
|
-
:host([soft-disabled])::part(radio-icon),
|
|
33
|
-
:host([disabled][readonly])::part(radio-icon),
|
|
34
|
-
:host([soft-disabled][readonly])::part(radio-icon) {
|
|
35
|
-
border-color: var(--mdc-staticradio-disabled-border-color);
|
|
36
|
-
background-color: var(--mdc-staticradio-control-inactive-disabled-background);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
:host([disabled][checked])::part(radio-icon),
|
|
40
|
-
:host([soft-disabled][checked])::part(radio-icon),
|
|
41
|
-
:host([disabled][readonly][checked])::part(radio-icon),
|
|
42
|
-
:host([soft-disabled][readonly][checked])::part(radio-icon) {
|
|
43
|
-
border: var(--mdc-staticradio-control-active-disabled-background);
|
|
44
|
-
background-color: var(--mdc-staticradio-control-active-disabled-background);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
:host([disabled][checked]) .radio-icon:after,
|
|
48
|
-
:host([soft-disabled][checked]) .radio-icon:after,
|
|
49
|
-
:host([disabled][readonly][checked]) .radio-icon:after,
|
|
50
|
-
:host([soft-disabled][readonly][checked]) .radio-icon:after {
|
|
51
|
-
background-color: var(--mdc-staticradio-inner-circle-disabled-background);
|
|
52
17
|
}
|
|
53
18
|
|
|
54
19
|
:host::part(radio-icon) {
|
|
55
20
|
position: absolute;
|
|
56
21
|
top: 0;
|
|
57
22
|
left: 0;
|
|
58
|
-
width:
|
|
59
|
-
height:
|
|
60
|
-
border: 0.0625rem solid var(--mdc-
|
|
61
|
-
background-color: var(--mdc-
|
|
23
|
+
width: var(--mdc-radio-outer-circle-size);
|
|
24
|
+
height: var(--mdc-radio-outer-circle-size);
|
|
25
|
+
border: 0.0625rem solid var(--mdc-radio-outer-circle-border-color);
|
|
26
|
+
background-color: var(--mdc-radio-outer-circle-background-color);
|
|
62
27
|
border-radius: 50%;
|
|
63
28
|
}
|
|
64
29
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
30
|
+
.radio-icon:after {
|
|
31
|
+
content: '';
|
|
32
|
+
position: absolute;
|
|
33
|
+
display: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([checked]) {
|
|
37
|
+
--mdc-radio-outer-circle-border-color: var(--mds-color-theme-control-active-normal);
|
|
38
|
+
--mdc-radio-outer-circle-background-color: var(--mds-color-theme-control-active-normal);
|
|
68
39
|
}
|
|
69
40
|
|
|
70
41
|
:host([checked]) .radio-icon:after {
|
|
@@ -72,23 +43,59 @@ const styles = [
|
|
|
72
43
|
top: 50%;
|
|
73
44
|
left: 50%;
|
|
74
45
|
transform: translate(-50%, -50%);
|
|
75
|
-
width: var(--mdc-
|
|
76
|
-
height: var(--mdc-
|
|
46
|
+
width: var(--mdc-radio-inner-circle-size);
|
|
47
|
+
height: var(--mdc-radio-inner-circle-size);
|
|
77
48
|
border-radius: 50%;
|
|
78
|
-
background-color: var(--mdc-
|
|
49
|
+
background-color: var(--mdc-radio-inner-circle-background-color);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:host([readonly]) {
|
|
53
|
+
--mdc-radio-outer-circle-border-color: var(--mds-color-theme-outline-input-normal);
|
|
54
|
+
--mdc-radio-outer-circle-background-color: transparent;
|
|
79
55
|
}
|
|
80
56
|
|
|
81
|
-
:host([readonly])
|
|
82
|
-
|
|
83
|
-
|
|
57
|
+
:host([readonly][checked]) {
|
|
58
|
+
--mdc-radio-inner-circle-background-color: var(--mds-color-theme-text-primary-normal);
|
|
59
|
+
--mdc-radio-outer-circle-border-color: var(--mds-color-theme-outline-input-normal);
|
|
60
|
+
--mdc-radio-outer-circle-background-color: transparent;
|
|
84
61
|
}
|
|
85
62
|
|
|
86
|
-
:host([
|
|
87
|
-
|
|
63
|
+
:host([disabled]),
|
|
64
|
+
:host([soft-disabled]) {
|
|
65
|
+
--mdc-radio-outer-circle-border-color: var(--mds-color-theme-outline-primary-disabled);
|
|
66
|
+
--mdc-radio-outer-circle-background-color: var(--mds-color-theme-control-inactive-disabled);
|
|
88
67
|
}
|
|
89
68
|
|
|
90
|
-
:host([
|
|
91
|
-
|
|
69
|
+
:host([disabled][checked]),
|
|
70
|
+
:host([soft-disabled][checked]) {
|
|
71
|
+
--mdc-radio-inner-circle-background-color: var(--mds-color-theme-inverted-text-primary-disabled);
|
|
72
|
+
--mdc-radio-outer-circle-border-color: transparent;
|
|
73
|
+
--mdc-radio-outer-circle-background-color: var(--mds-color-theme-control-active-disabled);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@media (forced-colors: active) {
|
|
77
|
+
:host([checked]) {
|
|
78
|
+
--mdc-radio-outer-circle-border-color: SelectedItem;
|
|
79
|
+
--mdc-radio-outer-circle-background-color: SelectedItem;
|
|
80
|
+
}
|
|
81
|
+
:host([readonly]),
|
|
82
|
+
:host([readonly][checked]) {
|
|
83
|
+
--mdc-radio-inner-circle-background-color: Highlight;
|
|
84
|
+
--mdc-radio-outer-circle-border-color: Highlight;
|
|
85
|
+
--mdc-radio-outer-circle-background-color: ButtonFace;
|
|
86
|
+
}
|
|
87
|
+
:host([disabled]),
|
|
88
|
+
:host([soft-disabled]) {
|
|
89
|
+
--mdc-radio-outer-circle-border-color: GrayText;
|
|
90
|
+
--mdc-radio-outer-circle-background-color: GrayText;
|
|
91
|
+
--mdc-radio-inner-circle-background-color: GrayText;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
:host([disabled][checked]),
|
|
95
|
+
:host([soft-disabled][checked]) {
|
|
96
|
+
--mdc-radio-outer-circle-border-color: GrayText;
|
|
97
|
+
--mdc-radio-outer-circle-background-color: GrayText;
|
|
98
|
+
}
|
|
92
99
|
}
|
|
93
100
|
`,
|
|
94
101
|
];
|
|
@@ -13,21 +13,13 @@ declare const StaticToggle_base: import("../../utils/mixins/index.types").Constr
|
|
|
13
13
|
*
|
|
14
14
|
* @slot default - This is a default/unnamed slot
|
|
15
15
|
*
|
|
16
|
-
* @cssproperty --mdc-
|
|
17
|
-
* @cssproperty --mdc-
|
|
18
|
-
* @cssproperty --mdc-
|
|
19
|
-
* @cssproperty --mdc-
|
|
20
|
-
* @cssproperty --mdc-
|
|
21
|
-
* @cssproperty --mdc-
|
|
22
|
-
* @cssproperty --mdc-
|
|
23
|
-
* @cssproperty --mdc-statictoggle-inactive-rest-color - Background color of the inactive toggle in rest state
|
|
24
|
-
* @cssproperty --mdc-statictoggle-inactive-disabled-color - Background color of the inactive toggle in disabled state
|
|
25
|
-
* @cssproperty --mdc-statictoggle-active-rest-color - Background color of the active toggle in rest state
|
|
26
|
-
* @cssproperty --mdc-statictoggle-active-disabled-color - Background color of the active toggle in disabled state
|
|
27
|
-
* @cssproperty --mdc-statictoggle-icon-color-normal - Color of the icon in normal state
|
|
28
|
-
* @cssproperty --mdc-statictoggle-icon-color-disabled - Color of the icon in disabled state
|
|
29
|
-
* @cssproperty --mdc-statictoggle-icon-background-color-normal - Background color of the icon in normal state
|
|
30
|
-
* @cssproperty --mdc-statictoggle-icon-background-color-disabled - Background color of the icon in disabled state
|
|
16
|
+
* @cssproperty --mdc-toggle-width - The width of the toggle
|
|
17
|
+
* @cssproperty --mdc-toggle-height - The height of the toggle
|
|
18
|
+
* @cssproperty --mdc-toggle-border-radius - The border radius of the toggle
|
|
19
|
+
* @cssproperty --mdc-toggle-border-color - The border color of the toggle
|
|
20
|
+
* @cssproperty --mdc-toggle-background-color - The background color of the toggle
|
|
21
|
+
* @cssproperty --mdc-toggle-icon-color - The icon color of the toggle
|
|
22
|
+
* @cssproperty --mdc-toggle-icon-background-color - The icon background color of the toggle
|
|
31
23
|
*
|
|
32
24
|
* @csspart slider - The slider part of the toggle
|
|
33
25
|
* @csspart toggle-icon - The icon part of the toggle
|
|
@@ -24,21 +24,13 @@ import styles from './statictoggle.styles';
|
|
|
24
24
|
*
|
|
25
25
|
* @slot default - This is a default/unnamed slot
|
|
26
26
|
*
|
|
27
|
-
* @cssproperty --mdc-
|
|
28
|
-
* @cssproperty --mdc-
|
|
29
|
-
* @cssproperty --mdc-
|
|
30
|
-
* @cssproperty --mdc-
|
|
31
|
-
* @cssproperty --mdc-
|
|
32
|
-
* @cssproperty --mdc-
|
|
33
|
-
* @cssproperty --mdc-
|
|
34
|
-
* @cssproperty --mdc-statictoggle-inactive-rest-color - Background color of the inactive toggle in rest state
|
|
35
|
-
* @cssproperty --mdc-statictoggle-inactive-disabled-color - Background color of the inactive toggle in disabled state
|
|
36
|
-
* @cssproperty --mdc-statictoggle-active-rest-color - Background color of the active toggle in rest state
|
|
37
|
-
* @cssproperty --mdc-statictoggle-active-disabled-color - Background color of the active toggle in disabled state
|
|
38
|
-
* @cssproperty --mdc-statictoggle-icon-color-normal - Color of the icon in normal state
|
|
39
|
-
* @cssproperty --mdc-statictoggle-icon-color-disabled - Color of the icon in disabled state
|
|
40
|
-
* @cssproperty --mdc-statictoggle-icon-background-color-normal - Background color of the icon in normal state
|
|
41
|
-
* @cssproperty --mdc-statictoggle-icon-background-color-disabled - Background color of the icon in disabled state
|
|
27
|
+
* @cssproperty --mdc-toggle-width - The width of the toggle
|
|
28
|
+
* @cssproperty --mdc-toggle-height - The height of the toggle
|
|
29
|
+
* @cssproperty --mdc-toggle-border-radius - The border radius of the toggle
|
|
30
|
+
* @cssproperty --mdc-toggle-border-color - The border color of the toggle
|
|
31
|
+
* @cssproperty --mdc-toggle-background-color - The background color of the toggle
|
|
32
|
+
* @cssproperty --mdc-toggle-icon-color - The icon color of the toggle
|
|
33
|
+
* @cssproperty --mdc-toggle-icon-background-color - The icon background color of the toggle
|
|
42
34
|
*
|
|
43
35
|
* @csspart slider - The slider part of the toggle
|
|
44
36
|
* @csspart toggle-icon - The icon part of the toggle
|
|
@@ -2,34 +2,23 @@ import { css } from 'lit';
|
|
|
2
2
|
const styles = [
|
|
3
3
|
css `
|
|
4
4
|
:host {
|
|
5
|
-
--mdc-
|
|
6
|
-
--mdc-
|
|
7
|
-
--mdc-
|
|
8
|
-
--mdc-
|
|
9
|
-
--mdc-
|
|
10
|
-
--mdc-
|
|
11
|
-
--mdc-
|
|
12
|
-
--mdc-statictoggle-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);
|
|
5
|
+
--mdc-toggle-width: 3rem;
|
|
6
|
+
--mdc-toggle-height: 1.5rem;
|
|
7
|
+
--mdc-toggle-border-radius: 0.75rem;
|
|
8
|
+
--mdc-toggle-border-color: var(--mds-color-theme-outline-input-normal);
|
|
9
|
+
--mdc-toggle-background-color: var(--mds-color-theme-control-inactive-normal);
|
|
10
|
+
--mdc-toggle-icon-color: var(--mds-color-theme-common-inverted-text-primary-normal);
|
|
11
|
+
--mdc-toggle-icon-background-color: var(--mds-color-theme-common-text-primary-normal);
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
--mdc-statictoggle-inactive-disabled-color: var(--mds-color-theme-control-inactive-disabled);
|
|
16
|
-
--mdc-statictoggle-active-rest-color: var(--mds-color-theme-control-active-normal);
|
|
17
|
-
--mdc-statictoggle-active-disabled-color: var(--mds-color-theme-control-active-disabled);
|
|
18
|
-
|
|
19
|
-
--mdc-statictoggle-icon-color-normal: var(--mds-color-theme-common-inverted-text-primary-normal);
|
|
20
|
-
--mdc-statictoggle-icon-color-disabled: var(--mds-color-theme-common-inverted-text-primary-disabled);
|
|
21
|
-
--mdc-statictoggle-icon-background-color-normal: var(--mds-color-theme-common-text-primary-normal);
|
|
22
|
-
--mdc-statictoggle-icon-background-color-disabled: var(--mds-color-theme-common-text-primary-disabled);
|
|
23
|
-
|
|
24
|
-
border-radius: var(--mdc-statictoggle-border-radius);
|
|
13
|
+
border-radius: var(--mdc-toggle-border-radius);
|
|
25
14
|
}
|
|
26
15
|
|
|
27
16
|
:host::part(slider) {
|
|
28
|
-
width: var(--mdc-
|
|
29
|
-
height: var(--mdc-
|
|
30
|
-
background-color: var(--mdc-
|
|
31
|
-
border
|
|
32
|
-
border: var(--mdc-
|
|
17
|
+
width: var(--mdc-toggle-width);
|
|
18
|
+
height: var(--mdc-toggle-height);
|
|
19
|
+
background-color: var(--mdc-toggle-background-color);
|
|
20
|
+
border: 1px solid var(--mdc-toggle-border-color);
|
|
21
|
+
border-radius: var(--mdc-toggle-border-radius);
|
|
33
22
|
display: flex;
|
|
34
23
|
align-items: center;
|
|
35
24
|
justify-content: flex-start;
|
|
@@ -38,69 +27,71 @@ const styles = [
|
|
|
38
27
|
padding: 1px;
|
|
39
28
|
}
|
|
40
29
|
|
|
41
|
-
:host([checked])::part(slider) {
|
|
42
|
-
background-color: var(--mdc-statictoggle-active-rest-color);
|
|
43
|
-
justify-content: flex-end;
|
|
44
|
-
border-color: transparent;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
:host([size='compact'])::part(slider) {
|
|
48
|
-
width: var(--mdc-statictoggle-width-compact);
|
|
49
|
-
height: var(--mdc-statictoggle-height-compact);
|
|
50
|
-
border-radius: var(--mdc-statictoggle-border-radius-compact);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
30
|
:host::part(toggle-icon) {
|
|
54
31
|
padding: 0.25rem;
|
|
55
|
-
--mdc-icon-fill-color: var(--mdc-
|
|
56
|
-
background-color: var(--mdc-
|
|
32
|
+
--mdc-icon-fill-color: var(--mdc-toggle-icon-color);
|
|
33
|
+
background-color: var(--mdc-toggle-icon-background-color);
|
|
57
34
|
border-radius: 50%;
|
|
58
35
|
}
|
|
59
36
|
|
|
60
|
-
:host([
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
--mdc-icon-fill-color: var(--mdc-statictoggle-icon-color-disabled);
|
|
65
|
-
background-color: var(--mdc-statictoggle-icon-background-color-disabled);
|
|
37
|
+
:host([size='compact'])::part(slider) {
|
|
38
|
+
--mdc-toggle-width: 2rem;
|
|
39
|
+
--mdc-toggle-height: 1rem;
|
|
40
|
+
--mdc-toggle-border-radius: 0.5rem;
|
|
66
41
|
}
|
|
67
42
|
|
|
68
43
|
:host([size='compact'])::part(toggle-icon) {
|
|
69
44
|
padding: 0.125rem;
|
|
70
45
|
}
|
|
71
46
|
|
|
72
|
-
:host([
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
47
|
+
:host([checked]) {
|
|
48
|
+
--mdc-toggle-border-color: transparent;
|
|
49
|
+
--mdc-toggle-background-color: var(--mds-color-theme-control-active-normal);
|
|
50
|
+
}
|
|
51
|
+
:host([checked])::part(slider) {
|
|
52
|
+
justify-content: flex-end;
|
|
77
53
|
}
|
|
78
54
|
|
|
79
|
-
:host([
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
background-color: var(--mdc-statictoggle-active-disabled-color);
|
|
84
|
-
border-color: transparent;
|
|
55
|
+
:host([readonly]) {
|
|
56
|
+
--mdc-toggle-icon-background-color: var(--mds-color-theme-common-text-primary-normal);
|
|
57
|
+
--mdc-toggle-border-color: var(--mds-color-theme-outline-primary-disabled);
|
|
58
|
+
--mdc-toggle-background-color: var(--mds-color-theme-control-inactive-disabled);
|
|
85
59
|
}
|
|
86
60
|
|
|
87
|
-
:host([
|
|
88
|
-
|
|
61
|
+
:host([disabled]),
|
|
62
|
+
:host([soft-disabled]) {
|
|
63
|
+
--mdc-toggle-icon-color: var(--mds-color-theme-common-inverted-text-primary-disabled);
|
|
64
|
+
--mdc-toggle-icon-background-color: var(--mds-color-theme-common-text-primary-disabled);
|
|
65
|
+
--mdc-toggle-border-color: var(--mds-color-theme-outline-primary-disabled);
|
|
66
|
+
--mdc-toggle-background-color: var(--mds-color-theme-control-inactive-disabled);
|
|
67
|
+
cursor: default;
|
|
89
68
|
}
|
|
90
69
|
|
|
91
|
-
:host([
|
|
92
|
-
:host([soft-disabled]
|
|
93
|
-
|
|
70
|
+
:host([checked][disabled]),
|
|
71
|
+
:host([checked][soft-disabled]) {
|
|
72
|
+
--mdc-toggle-icon-color: var(--mds-color-theme-common-inverted-text-primary-disabled);
|
|
73
|
+
--mdc-toggle-icon-background-color: var(--mds-color-theme-common-text-primary-disabled);
|
|
74
|
+
--mdc-toggle-border-color: transparent;
|
|
75
|
+
--mdc-toggle-background-color: var(--mds-color-theme-control-active-disabled);
|
|
94
76
|
}
|
|
95
77
|
|
|
96
78
|
/* High Contrast Mode */
|
|
97
79
|
@media (forced-colors: active) {
|
|
98
|
-
:host([checked])::part(slider),
|
|
99
80
|
:host::part(toggle-icon) {
|
|
100
|
-
|
|
81
|
+
--mdc-toggle-icon-color: CanvasText;
|
|
82
|
+
border: 1px solid var(--mdc-toggle-border-color);
|
|
101
83
|
}
|
|
102
|
-
|
|
103
|
-
|
|
84
|
+
|
|
85
|
+
:host([checked]) {
|
|
86
|
+
--mdc-toggle-icon-color: SelectedItemText;
|
|
87
|
+
--mdc-toggle-border-color: SelectedItem;
|
|
88
|
+
--mdc-toggle-background-color: SelectedItem;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:host([disabled])::part(toggle-icon),
|
|
92
|
+
:host([soft-disabled])::part(toggle-icon) {
|
|
93
|
+
--mdc-toggle-icon-color: GrayText;
|
|
94
|
+
border: 1px solid GrayText;
|
|
104
95
|
}
|
|
105
96
|
}
|
|
106
97
|
`,
|
|
@@ -59,6 +59,7 @@ declare const Textarea_base: import("../../utils/mixins/index.types").Constructo
|
|
|
59
59
|
* @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
|
|
60
60
|
* @cssproperty --mdc-help-text-line-height - Line height for the help text.
|
|
61
61
|
* @cssproperty --mdc-help-text-color - Color for the help text.
|
|
62
|
+
* @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
|
|
62
63
|
* @cssproperty --mdc-textarea-text-color - Text color for the textarea field
|
|
63
64
|
* @cssproperty --mdc-textarea-background-color - Background color for the textarea field
|
|
64
65
|
* @cssproperty --mdc-textarea-border-color - Border color for the textarea field
|
|
@@ -74,6 +74,7 @@ import styles from './textarea.styles';
|
|
|
74
74
|
* @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
|
|
75
75
|
* @cssproperty --mdc-help-text-line-height - Line height for the help text.
|
|
76
76
|
* @cssproperty --mdc-help-text-color - Color for the help text.
|
|
77
|
+
* @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
|
|
77
78
|
* @cssproperty --mdc-textarea-text-color - Text color for the textarea field
|
|
78
79
|
* @cssproperty --mdc-textarea-background-color - Background color for the textarea field
|
|
79
80
|
* @cssproperty --mdc-textarea-border-color - Border color for the textarea field
|
|
@@ -24,16 +24,13 @@ declare const Toggle_base: import("../../utils/mixins/index.types").Constructor<
|
|
|
24
24
|
* @event change - (React: onChange) Event that gets dispatched when the toggle state changes.
|
|
25
25
|
* @event focus - (React: onFocus) Event that gets dispatched when the toggle receives focus.
|
|
26
26
|
*
|
|
27
|
-
* @cssproperty --mdc-toggle-width -
|
|
28
|
-
* @cssproperty --mdc-toggle-height -
|
|
29
|
-
* @cssproperty --mdc-toggle-
|
|
30
|
-
* @cssproperty --mdc-toggle-
|
|
31
|
-
* @cssproperty --mdc-toggle-
|
|
32
|
-
* @cssproperty --mdc-toggle-
|
|
33
|
-
* @cssproperty --mdc-toggle-
|
|
34
|
-
* @cssproperty --mdc-toggle-active-pressed-color - Background color of the active toggle in pressed state
|
|
35
|
-
* @cssproperty --mdc-toggle-inactive-hover-color - Background color of the inactive toggle in hover state
|
|
36
|
-
* @cssproperty --mdc-toggle-inactive-pressed-color - Background color of the inactive toggle in pressed state
|
|
27
|
+
* @cssproperty --mdc-toggle-width - The width of the toggle
|
|
28
|
+
* @cssproperty --mdc-toggle-height - The height of the toggle
|
|
29
|
+
* @cssproperty --mdc-toggle-border-radius - The border radius of the toggle
|
|
30
|
+
* @cssproperty --mdc-toggle-border-color - The border color of the toggle
|
|
31
|
+
* @cssproperty --mdc-toggle-background-color - The background color of the toggle
|
|
32
|
+
* @cssproperty --mdc-toggle-icon-color - The icon color of the toggle
|
|
33
|
+
* @cssproperty --mdc-toggle-icon-background-color - The icon background color of the toggle
|
|
37
34
|
*
|
|
38
35
|
* @csspart label - The label element.
|
|
39
36
|
* @csspart label-text - The container for the label and required indicator elements.
|
|
@@ -43,7 +40,7 @@ declare const Toggle_base: import("../../utils/mixins/index.types").Constructor<
|
|
|
43
40
|
* @csspart help-text - The helper/validation text element.
|
|
44
41
|
* @csspart helper-icon - The helper/validation icon element that is displayed next to the helper/validation text.
|
|
45
42
|
* @csspart help-text-container - The container for the helper/validation icon and text elements.
|
|
46
|
-
* @csspart
|
|
43
|
+
* @csspart static-toggle - The static-toggle element that wraps the toggle input.
|
|
47
44
|
* @csspart toggle-input - The native checkbox input element styled as a toggle switch.
|
|
48
45
|
*/
|
|
49
46
|
declare class Toggle extends Toggle_base implements AssociatedFormControl {
|