@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
|
@@ -34,6 +34,7 @@ declare const Checkbox_base: import("../../utils/mixins/index.types").Constructo
|
|
|
34
34
|
* @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
|
|
35
35
|
* @cssproperty --mdc-help-text-line-height - Line height for the help text.
|
|
36
36
|
* @cssproperty --mdc-help-text-color - Color for the help text.
|
|
37
|
+
* @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
|
|
37
38
|
*
|
|
38
39
|
* @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
|
|
39
40
|
* @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.
|
|
@@ -50,6 +51,7 @@ declare const Checkbox_base: import("../../utils/mixins/index.types").Constructo
|
|
|
50
51
|
* @csspart help-text-container - The container for the helper/validation icon and text elements.
|
|
51
52
|
* @csspart checkbox-input - The native checkbox input element.
|
|
52
53
|
* @csspart text-container - The container for the label and helper text elements.
|
|
54
|
+
* @csspart static-checkbox - The static checkbox element.
|
|
53
55
|
*/
|
|
54
56
|
declare class Checkbox extends Checkbox_base implements AssociatedFormControl {
|
|
55
57
|
/**
|
|
@@ -49,6 +49,7 @@ import styles from './checkbox.styles';
|
|
|
49
49
|
* @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
|
|
50
50
|
* @cssproperty --mdc-help-text-line-height - Line height for the help text.
|
|
51
51
|
* @cssproperty --mdc-help-text-color - Color for the help text.
|
|
52
|
+
* @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
|
|
52
53
|
*
|
|
53
54
|
* @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
|
|
54
55
|
* @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.
|
|
@@ -65,6 +66,7 @@ import styles from './checkbox.styles';
|
|
|
65
66
|
* @csspart help-text-container - The container for the helper/validation icon and text elements.
|
|
66
67
|
* @csspart checkbox-input - The native checkbox input element.
|
|
67
68
|
* @csspart text-container - The container for the label and helper text elements.
|
|
69
|
+
* @csspart static-checkbox - The static checkbox element.
|
|
68
70
|
*/
|
|
69
71
|
class Checkbox extends AutoFocusOnMountMixin(FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper))) {
|
|
70
72
|
constructor() {
|
|
@@ -201,6 +203,7 @@ class Checkbox extends AutoFocusOnMountMixin(FormInternalsMixin(DataAriaLabelMix
|
|
|
201
203
|
var _a;
|
|
202
204
|
return html `
|
|
203
205
|
<mdc-staticcheckbox
|
|
206
|
+
part="static-checkbox"
|
|
204
207
|
class="mdc-focus-ring"
|
|
205
208
|
?checked="${this.checked}"
|
|
206
209
|
?indeterminate="${this.indeterminate}"
|
|
@@ -2,21 +2,12 @@ import { css } from 'lit';
|
|
|
2
2
|
import { hostFocusRingStyles } from '../../utils/styles';
|
|
3
3
|
const styles = [
|
|
4
4
|
css `
|
|
5
|
-
/* Base styles and CSS custom properties */
|
|
6
5
|
:host {
|
|
7
|
-
--mdc-checkbox-background-color-hover: var(--mds-color-theme-control-inactive-hover);
|
|
8
|
-
--mdc-checkbox-pressed-icon-color: var(--mds-color-theme-control-inactive-pressed);
|
|
9
|
-
--mdc-checkbox-checked-pressed-icon-color: var(--mds-color-theme-control-active-pressed);
|
|
10
|
-
--mdc-checkbox-checked-background-color-hover: var(--mds-color-theme-control-active-hover);
|
|
11
|
-
--mdc-checkbox-disabled-checked-icon-color: var(--mds-color-theme-control-active-disabled);
|
|
12
|
-
--mdc-checkbox-disabled-text-color: var(--mds-color-theme-text-primary-disabled);
|
|
13
|
-
|
|
14
6
|
flex-direction: row;
|
|
15
7
|
align-items: flex-start;
|
|
16
8
|
}
|
|
17
9
|
|
|
18
|
-
|
|
19
|
-
:host mdc-staticcheckbox {
|
|
10
|
+
:host::part(static-checkbox) {
|
|
20
11
|
position: relative;
|
|
21
12
|
}
|
|
22
13
|
|
|
@@ -29,8 +20,8 @@ const styles = [
|
|
|
29
20
|
opacity: 0.1%;
|
|
30
21
|
overflow: visible;
|
|
31
22
|
z-index: 1;
|
|
32
|
-
width:
|
|
33
|
-
height:
|
|
23
|
+
width: var(--mdc-checkbox-size);
|
|
24
|
+
height: var(--mdc-checkbox-size);
|
|
34
25
|
border-radius: 0.125rem;
|
|
35
26
|
}
|
|
36
27
|
|
|
@@ -48,63 +39,34 @@ const styles = [
|
|
|
48
39
|
white-space: normal;
|
|
49
40
|
}
|
|
50
41
|
|
|
51
|
-
/* Default interactive states */
|
|
52
42
|
:host::part(label),
|
|
53
43
|
:host::part(checkbox-input) {
|
|
54
44
|
cursor: pointer;
|
|
55
45
|
}
|
|
56
46
|
|
|
57
|
-
:host(:hover)
|
|
58
|
-
background-color: var(--
|
|
47
|
+
:host(:hover)::part(static-checkbox) {
|
|
48
|
+
--mdc-checkbox-background-color: var(--mds-color-theme-control-inactive-hover);
|
|
59
49
|
}
|
|
60
50
|
|
|
61
|
-
:host(:active)
|
|
62
|
-
background-color: var(--
|
|
51
|
+
:host(:active)::part(static-checkbox) {
|
|
52
|
+
--mdc-checkbox-background-color: var(--mds-color-theme-control-inactive-pressed);
|
|
63
53
|
}
|
|
64
54
|
|
|
65
|
-
:host([checked]:hover)::part(
|
|
66
|
-
:host([indeterminate]:hover)::part(
|
|
67
|
-
background-color: var(--
|
|
55
|
+
:host([checked]:hover)::part(static-checkbox),
|
|
56
|
+
:host([indeterminate]:hover)::part(static-checkbox) {
|
|
57
|
+
--mdc-checkbox-background-color: var(--mds-color-theme-control-active-hover);
|
|
68
58
|
}
|
|
69
59
|
|
|
70
|
-
:host([checked]:active)::part(
|
|
71
|
-
:host([indeterminate]:active)::part(
|
|
72
|
-
background-color: var(--
|
|
60
|
+
:host([checked]:active)::part(static-checkbox),
|
|
61
|
+
:host([indeterminate]:active)::part(static-checkbox) {
|
|
62
|
+
--mdc-checkbox-background-color: var(--mds-color-theme-control-active-pressed);
|
|
73
63
|
}
|
|
74
64
|
|
|
75
|
-
/* Readonly state - disables pointer events */
|
|
76
65
|
:host([readonly]),
|
|
66
|
+
:host([disabled]),
|
|
77
67
|
:host([soft-disabled]) {
|
|
78
68
|
pointer-events: none;
|
|
79
69
|
}
|
|
80
|
-
|
|
81
|
-
/* Disabled states override interactive styles */
|
|
82
|
-
:host([disabled])::part(label),
|
|
83
|
-
:host([disabled])::part(checkbox-input),
|
|
84
|
-
:host([soft-disabled])::part(label),
|
|
85
|
-
:host([soft-disabled])::part(checkbox-input) {
|
|
86
|
-
cursor: default;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
:host([disabled]) mdc-staticcheckbox,
|
|
90
|
-
:host([soft-disabled]) mdc-staticcheckbox {
|
|
91
|
-
background-color: unset;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
:host([disabled][checked])::part(icon-container),
|
|
95
|
-
:host([disabled][indeterminate])::part(icon-container),
|
|
96
|
-
:host([soft-disabled][checked])::part(icon-container),
|
|
97
|
-
:host([soft-disabled][indeterminate])::part(icon-container) {
|
|
98
|
-
background-color: var(--mdc-checkbox-disabled-checked-icon-color);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
:host([disabled])::part(label),
|
|
102
|
-
:host([disabled])::part(help-text),
|
|
103
|
-
:host([soft-disabled])::part(label),
|
|
104
|
-
:host([soft-disabled])::part(label-text),
|
|
105
|
-
:host([soft-disabled])::part(help-text) {
|
|
106
|
-
color: var(--mdc-checkbox-disabled-text-color);
|
|
107
|
-
}
|
|
108
70
|
`,
|
|
109
71
|
...hostFocusRingStyles(true),
|
|
110
72
|
];
|
|
@@ -62,6 +62,7 @@ declare const Combobox_base: import("../../utils/mixins/index.types").Constructo
|
|
|
62
62
|
* @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
|
|
63
63
|
* @cssproperty --mdc-help-text-line-height - Line height for the help text.
|
|
64
64
|
* @cssproperty --mdc-help-text-color - Color for the help text.
|
|
65
|
+
* @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
|
|
65
66
|
*
|
|
66
67
|
* @csspart label - The label element.
|
|
67
68
|
* @csspart label-text - The container for the label and required indicator elements.
|
|
@@ -88,6 +88,7 @@ import styles from './combobox.styles';
|
|
|
88
88
|
* @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
|
|
89
89
|
* @cssproperty --mdc-help-text-line-height - Line height for the help text.
|
|
90
90
|
* @cssproperty --mdc-help-text-color - Color for the help text.
|
|
91
|
+
* @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
|
|
91
92
|
*
|
|
92
93
|
* @csspart label - The label element.
|
|
93
94
|
* @csspart label-text - The container for the label and required indicator elements.
|
|
@@ -49,6 +49,7 @@ declare const FormfieldGroup_base: import("../../utils/mixins/index.types").Cons
|
|
|
49
49
|
* @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
|
|
50
50
|
* @cssproperty --mdc-help-text-line-height - Line height for the help text.
|
|
51
51
|
* @cssproperty --mdc-help-text-color - Color for the help text.
|
|
52
|
+
* @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
|
|
52
53
|
*/
|
|
53
54
|
declare class FormfieldGroup extends FormfieldGroup_base {
|
|
54
55
|
/**
|
|
@@ -53,6 +53,7 @@ import styles from './formfieldgroup.styles';
|
|
|
53
53
|
* @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
|
|
54
54
|
* @cssproperty --mdc-help-text-line-height - Line height for the help text.
|
|
55
55
|
* @cssproperty --mdc-help-text-color - Color for the help text.
|
|
56
|
+
* @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
|
|
56
57
|
*/
|
|
57
58
|
class FormfieldGroup extends DataAriaLabelMixin(FormfieldWrapper) {
|
|
58
59
|
constructor() {
|
|
@@ -37,6 +37,7 @@ declare const FormfieldWrapper_base: import("../../utils/mixins/index.types").Co
|
|
|
37
37
|
* @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
|
|
38
38
|
* @cssproperty --mdc-help-text-line-height - Line height for the help text.
|
|
39
39
|
* @cssproperty --mdc-help-text-color - Color for the help text.
|
|
40
|
+
* @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
|
|
40
41
|
*/
|
|
41
42
|
declare class FormfieldWrapper extends FormfieldWrapper_base {
|
|
42
43
|
/**
|
|
@@ -51,6 +51,7 @@ import { getHelperIcon } from './formfieldwrapper.utils';
|
|
|
51
51
|
* @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
|
|
52
52
|
* @cssproperty --mdc-help-text-line-height - Line height for the help text.
|
|
53
53
|
* @cssproperty --mdc-help-text-color - Color for the help text.
|
|
54
|
+
* @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
|
|
54
55
|
*/
|
|
55
56
|
class FormfieldWrapper extends DisabledMixin(Component) {
|
|
56
57
|
constructor() {
|
|
@@ -10,6 +10,7 @@ const styles = css `
|
|
|
10
10
|
--mdc-help-text-font-weight: var(--mds-font-apps-body-midsize-regular-font-weight);
|
|
11
11
|
--mdc-help-text-line-height: var(--mds-font-apps-body-midsize-regular-line-height);
|
|
12
12
|
--mdc-help-text-color: var(--mds-color-theme-text-secondary-normal);
|
|
13
|
+
--mdc-required-indicator-color: var(--mds-color-theme-text-error-normal);
|
|
13
14
|
|
|
14
15
|
flex-direction: column;
|
|
15
16
|
align-items: flex-start;
|
|
@@ -17,7 +18,7 @@ const styles = css `
|
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
:host::part(required-indicator) {
|
|
20
|
-
color: var(--
|
|
21
|
+
color: var(--mdc-required-indicator-color);
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
:host::part(label-text),
|
|
@@ -69,10 +70,13 @@ const styles = css `
|
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
:host([disabled]),
|
|
72
|
-
:host([disabled])
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
:host([soft-disabled]) {
|
|
74
|
+
--mdc-label-color: var(--mds-color-theme-text-primary-disabled);
|
|
75
|
+
--mdc-help-text-color: var(--mds-color-theme-text-primary-disabled);
|
|
76
|
+
--mdc-required-indicator-color: var(--mds-color-theme-text-primary-disabled);
|
|
75
77
|
color: var(--mds-color-theme-text-primary-disabled);
|
|
78
|
+
pointer-events: none;
|
|
79
|
+
cursor: default;
|
|
76
80
|
}
|
|
77
81
|
`;
|
|
78
82
|
export default [hostFitContentStyles, styles];
|
|
@@ -46,6 +46,7 @@ declare const Input_base: import("../../utils/mixins/index.types").Constructor<i
|
|
|
46
46
|
* @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
|
|
47
47
|
* @cssproperty --mdc-help-text-line-height - Line height for the help text.
|
|
48
48
|
* @cssproperty --mdc-help-text-color - Color for the help text.
|
|
49
|
+
* @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
|
|
49
50
|
* @cssproperty --mdc-input-text-color - Text color for the input field
|
|
50
51
|
* @cssproperty --mdc-input-border-color - Border color for the input container
|
|
51
52
|
* @cssproperty --mdc-input-background-color - Background color for the input field
|
|
@@ -61,6 +61,7 @@ import styles from './input.styles';
|
|
|
61
61
|
* @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
|
|
62
62
|
* @cssproperty --mdc-help-text-line-height - Line height for the help text.
|
|
63
63
|
* @cssproperty --mdc-help-text-color - Color for the help text.
|
|
64
|
+
* @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
|
|
64
65
|
* @cssproperty --mdc-input-text-color - Text color for the input field
|
|
65
66
|
* @cssproperty --mdc-input-border-color - Border color for the input container
|
|
66
67
|
* @cssproperty --mdc-input-background-color - Background color for the input field
|
|
@@ -52,6 +52,7 @@ import type { ValidationType } from '../formfieldwrapper/formfieldwrapper.types'
|
|
|
52
52
|
* @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
|
|
53
53
|
* @cssproperty --mdc-help-text-line-height - Line height for the help text.
|
|
54
54
|
* @cssproperty --mdc-help-text-color - Color for the help text.
|
|
55
|
+
* @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
|
|
55
56
|
* @cssproperty --mdc-input-text-color - Text color for the input field
|
|
56
57
|
* @cssproperty --mdc-input-border-color - Border color for the input container
|
|
57
58
|
* @cssproperty --mdc-input-background-color - Background color for the input field
|
|
@@ -64,6 +64,7 @@ import { PASSWORD_VISIBILITY_ICONS } from './password.constants';
|
|
|
64
64
|
* @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
|
|
65
65
|
* @cssproperty --mdc-help-text-line-height - Line height for the help text.
|
|
66
66
|
* @cssproperty --mdc-help-text-color - Color for the help text.
|
|
67
|
+
* @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
|
|
67
68
|
* @cssproperty --mdc-input-text-color - Text color for the input field
|
|
68
69
|
* @cssproperty --mdc-input-border-color - Border color for the input container
|
|
69
70
|
* @cssproperty --mdc-input-background-color - Background color for the input field
|
|
@@ -33,6 +33,7 @@ declare const Progressbar_base: import("../../utils/mixins/index.types").Constru
|
|
|
33
33
|
* @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
|
|
34
34
|
* @cssproperty --mdc-help-text-line-height - Line height for the help text.
|
|
35
35
|
* @cssproperty --mdc-help-text-color - Color for the help text.
|
|
36
|
+
* @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
|
|
36
37
|
* @cssproperty --mdc-progressbar-background-color - Background color of the remaining progressbar portion.
|
|
37
38
|
* @cssproperty --mdc-progressbar-progress-background-color - Background color of the elapsed progressbar portion.
|
|
38
39
|
* @cssproperty --mdc-progressbar-height - The height of the progressbar.
|
|
@@ -47,6 +47,7 @@ import styles from './progressbar.styles';
|
|
|
47
47
|
* @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
|
|
48
48
|
* @cssproperty --mdc-help-text-line-height - Line height for the help text.
|
|
49
49
|
* @cssproperty --mdc-help-text-color - Color for the help text.
|
|
50
|
+
* @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
|
|
50
51
|
* @cssproperty --mdc-progressbar-background-color - Background color of the remaining progressbar portion.
|
|
51
52
|
* @cssproperty --mdc-progressbar-progress-background-color - Background color of the elapsed progressbar portion.
|
|
52
53
|
* @cssproperty --mdc-progressbar-height - The height of the progressbar.
|
|
@@ -19,14 +19,11 @@ declare const Radio_base: import("../../utils/mixins/index.types").Constructor<i
|
|
|
19
19
|
* @event change - (React: onChange) Event that gets dispatched when the radio state changes.
|
|
20
20
|
* @event focus - (React: onFocus) Event that gets dispatched when the radio receives focus.
|
|
21
21
|
*
|
|
22
|
-
* @cssproperty --mdc-radio-
|
|
23
|
-
* @cssproperty --mdc-radio-
|
|
24
|
-
* @cssproperty --mdc-radio-
|
|
25
|
-
* @cssproperty --mdc-radio-
|
|
26
|
-
* @cssproperty --mdc-radio-
|
|
27
|
-
* @cssproperty --mdc-radio-disabled-border-color - color of the radio button when disabled
|
|
28
|
-
* @cssproperty --mdc-radio-control-active-disabled-background - color of the radio button when active and disabled
|
|
29
|
-
* @cssproperty --mdc-radio-control-inactive-disabled-background - color of the radio button when inactive and disabled
|
|
22
|
+
* @cssproperty --mdc-radio-inner-circle-size - size of the inner circle
|
|
23
|
+
* @cssproperty --mdc-radio-outer-circle-size - size of the outer circle
|
|
24
|
+
* @cssproperty --mdc-radio-inner-circle-background-color - background color of the inner circle
|
|
25
|
+
* @cssproperty --mdc-radio-outer-circle-border-color - border color of the outer circle
|
|
26
|
+
* @cssproperty --mdc-radio-outer-circle-background-color - background color of the outer circle
|
|
30
27
|
*
|
|
31
28
|
* @csspart label - The label element.
|
|
32
29
|
* @csspart label-text - The container for the label and required indicator elements.
|
|
@@ -36,14 +36,11 @@ import styles from './radio.styles';
|
|
|
36
36
|
* @event change - (React: onChange) Event that gets dispatched when the radio state changes.
|
|
37
37
|
* @event focus - (React: onFocus) Event that gets dispatched when the radio receives focus.
|
|
38
38
|
*
|
|
39
|
-
* @cssproperty --mdc-radio-
|
|
40
|
-
* @cssproperty --mdc-radio-
|
|
41
|
-
* @cssproperty --mdc-radio-
|
|
42
|
-
* @cssproperty --mdc-radio-
|
|
43
|
-
* @cssproperty --mdc-radio-
|
|
44
|
-
* @cssproperty --mdc-radio-disabled-border-color - color of the radio button when disabled
|
|
45
|
-
* @cssproperty --mdc-radio-control-active-disabled-background - color of the radio button when active and disabled
|
|
46
|
-
* @cssproperty --mdc-radio-control-inactive-disabled-background - color of the radio button when inactive and disabled
|
|
39
|
+
* @cssproperty --mdc-radio-inner-circle-size - size of the inner circle
|
|
40
|
+
* @cssproperty --mdc-radio-outer-circle-size - size of the outer circle
|
|
41
|
+
* @cssproperty --mdc-radio-inner-circle-background-color - background color of the inner circle
|
|
42
|
+
* @cssproperty --mdc-radio-outer-circle-border-color - border color of the outer circle
|
|
43
|
+
* @cssproperty --mdc-radio-outer-circle-background-color - background color of the outer circle
|
|
47
44
|
*
|
|
48
45
|
* @csspart label - The label element.
|
|
49
46
|
* @csspart label-text - The container for the label and required indicator elements.
|
|
@@ -284,6 +281,7 @@ class Radio extends AutoFocusOnMountMixin(FormInternalsMixin(DataAriaLabelMixin(
|
|
|
284
281
|
?disabled="${this.disabled}"
|
|
285
282
|
?readonly="${this.readonly}"
|
|
286
283
|
?soft-disabled="${this.softDisabled}"
|
|
284
|
+
part="static-radio"
|
|
287
285
|
>
|
|
288
286
|
<input
|
|
289
287
|
id="${this.inputId}"
|
|
@@ -3,24 +3,13 @@ import { hostFitContentStyles, hostFocusRingStyles } from '../../utils/styles';
|
|
|
3
3
|
const styles = [
|
|
4
4
|
hostFitContentStyles,
|
|
5
5
|
css `
|
|
6
|
-
/* Base styles and CSS custom properties */
|
|
7
6
|
:host {
|
|
8
7
|
display: flex;
|
|
9
8
|
flex-direction: row;
|
|
10
9
|
align-items: start;
|
|
11
10
|
gap: 0.5rem;
|
|
12
|
-
|
|
13
|
-
--mdc-radio-text-disabled-color: var(--mds-color-theme-text-primary-disabled);
|
|
14
|
-
--mdc-radio-control-inactive-hover: var(--mds-color-theme-control-inactive-hover);
|
|
15
|
-
--mdc-radio-control-inactive-pressed-color: var(--mds-color-theme-control-inactive-pressed);
|
|
16
|
-
--mdc-radio-control-active-hover-color: var(--mds-color-theme-control-active-hover);
|
|
17
|
-
--mdc-radio-control-active-pressed-color: var(--mds-color-theme-control-active-pressed);
|
|
18
|
-
--mdc-radio-control-active-disabled-background: var(--mds-color-theme-control-active-disabled);
|
|
19
|
-
--mdc-radio-control-inactive-disabled-background: var(--mds-color-theme-control-inactive-disabled);
|
|
20
|
-
--mdc-radio-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);
|
|
21
11
|
}
|
|
22
12
|
|
|
23
|
-
/* Component structure and layout */
|
|
24
13
|
:host::part(radio-input) {
|
|
25
14
|
position: absolute;
|
|
26
15
|
opacity: 0;
|
|
@@ -28,7 +17,7 @@ const styles = [
|
|
|
28
17
|
width: 100%;
|
|
29
18
|
height: 100%;
|
|
30
19
|
cursor: pointer;
|
|
31
|
-
z-index:
|
|
20
|
+
z-index: 1;
|
|
32
21
|
}
|
|
33
22
|
|
|
34
23
|
:host::part(text-container) {
|
|
@@ -47,81 +36,34 @@ const styles = [
|
|
|
47
36
|
cursor: pointer;
|
|
48
37
|
word-break: break-word;
|
|
49
38
|
white-space: normal;
|
|
50
|
-
font-size: var(--mds-font-apps-body-midsize-regular-font-size);
|
|
51
|
-
font-weight: var(--mds-font-apps-body-midsize-regular-font-weight);
|
|
52
|
-
line-height: var(--mds-font-apps-body-midsize-regular-line-height);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/* Default interactive states */
|
|
56
|
-
:host(:hover) mdc-staticradio {
|
|
57
|
-
background-color: var(--mdc-radio-control-inactive-hover);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
:host(:active) mdc-staticradio {
|
|
61
|
-
background-color: var(--mdc-radio-control-inactive-pressed-color);
|
|
39
|
+
--mdc-label-font-size: var(--mds-font-apps-body-midsize-regular-font-size);
|
|
40
|
+
--mdc-label-font-weight: var(--mds-font-apps-body-midsize-regular-font-weight);
|
|
41
|
+
--mdc-label-line-height: var(--mds-font-apps-body-midsize-regular-line-height);
|
|
62
42
|
}
|
|
63
43
|
|
|
64
|
-
:host(
|
|
65
|
-
|
|
66
|
-
background-color: var(--mdc-radio-control-active-hover-color);
|
|
44
|
+
:host(:hover)::part(static-radio) {
|
|
45
|
+
--mdc-radio-outer-circle-background-color: var(--mds-color-theme-control-inactive-hover);
|
|
67
46
|
}
|
|
68
47
|
|
|
69
|
-
:host(
|
|
70
|
-
|
|
71
|
-
background-color: var(--mdc-radio-control-active-pressed-color);
|
|
48
|
+
:host(:active)::part(static-radio) {
|
|
49
|
+
--mdc-radio-outer-circle-background-color: var(--mds-color-theme-control-inactive-pressed);
|
|
72
50
|
}
|
|
73
51
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
52
|
+
:host([checked]:hover)::part(static-radio) {
|
|
53
|
+
--mdc-radio-outer-circle-border-color: var(--mds-color-theme-control-active-hover);
|
|
54
|
+
--mdc-radio-outer-circle-background-color: var(--mds-color-theme-control-active-hover);
|
|
77
55
|
}
|
|
78
56
|
|
|
79
|
-
:host([
|
|
80
|
-
border-color: var(--
|
|
81
|
-
background-color: var(--
|
|
57
|
+
:host([checked]:active)::part(static-radio) {
|
|
58
|
+
--mdc-radio-outer-circle-border-color: var(--mds-color-theme-control-active-pressed);
|
|
59
|
+
--mdc-radio-outer-circle-background-color: var(--mds-color-theme-control-active-pressed);
|
|
82
60
|
}
|
|
83
61
|
|
|
62
|
+
:host([readonly]),
|
|
63
|
+
:host([disabled]),
|
|
84
64
|
:host([soft-disabled]) {
|
|
85
65
|
pointer-events: none;
|
|
86
66
|
}
|
|
87
|
-
|
|
88
|
-
/* Disabled states override interactive styles */
|
|
89
|
-
:host([disabled])::part(radio-input),
|
|
90
|
-
:host([soft-disabled])::part(radio-input),
|
|
91
|
-
:host([readonly])::part(radio-input),
|
|
92
|
-
:host([disabled])::part(label),
|
|
93
|
-
:host([soft-disabled])::part(label),
|
|
94
|
-
:host([readonly])::part(label) {
|
|
95
|
-
cursor: default;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
:host([disabled]:hover) mdc-staticradio,
|
|
99
|
-
:host([disabled]:active) mdc-staticradio,
|
|
100
|
-
:host([soft-disabled]:hover) mdc-staticradio,
|
|
101
|
-
:host([soft-disabled]:active) mdc-staticradio {
|
|
102
|
-
background-color: unset;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
:host([disabled]:hover)::part(radio-icon),
|
|
106
|
-
:host([soft-disabled]:hover)::part(radio-icon),
|
|
107
|
-
:host([disabled][readonly]:hover)::part(radio-icon),
|
|
108
|
-
:host([soft-disabled][readonly]:hover)::part(radio-icon) {
|
|
109
|
-
border-color: var(--mdc-radio-disabled-border-color);
|
|
110
|
-
background-color: var(--mdc-radio-control-inactive-disabled-background);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
:host([disabled][checked]:hover)::part(radio-icon),
|
|
114
|
-
:host([soft-disabled][checked]:hover)::part(radio-icon) {
|
|
115
|
-
background-color: var(--mdc-radio-control-active-disabled-background);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
:host([disabled])::part(label-text),
|
|
119
|
-
:host([disabled])::part(help-text),
|
|
120
|
-
:host([soft-disabled])::part(label),
|
|
121
|
-
:host([soft-disabled])::part(label-text),
|
|
122
|
-
:host([soft-disabled])::part(help-text) {
|
|
123
|
-
color: var(--mdc-radio-text-disabled-color);
|
|
124
|
-
}
|
|
125
67
|
`,
|
|
126
68
|
...hostFocusRingStyles(true),
|
|
127
69
|
];
|
|
@@ -33,6 +33,7 @@ import Input from '../input/input.component';
|
|
|
33
33
|
* @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
|
|
34
34
|
* @cssproperty --mdc-help-text-line-height - Line height for the help text.
|
|
35
35
|
* @cssproperty --mdc-help-text-color - Color for the help text.
|
|
36
|
+
* @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
|
|
36
37
|
* @cssproperty --mdc-input-text-color - Text color for the input field
|
|
37
38
|
* @cssproperty --mdc-input-border-color - Border color for the input container
|
|
38
39
|
* @cssproperty --mdc-input-background-color - Background color for the input field
|
|
@@ -47,6 +47,7 @@ import { DEFAULTS } from './searchfield.constants';
|
|
|
47
47
|
* @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
|
|
48
48
|
* @cssproperty --mdc-help-text-line-height - Line height for the help text.
|
|
49
49
|
* @cssproperty --mdc-help-text-color - Color for the help text.
|
|
50
|
+
* @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
|
|
50
51
|
* @cssproperty --mdc-input-text-color - Text color for the input field
|
|
51
52
|
* @cssproperty --mdc-input-border-color - Border color for the input container
|
|
52
53
|
* @cssproperty --mdc-input-background-color - Background color for the input field
|
|
@@ -57,6 +57,7 @@ declare const Select_base: import("../../utils/mixins/index.types").Constructor<
|
|
|
57
57
|
* @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
|
|
58
58
|
* @cssproperty --mdc-help-text-line-height - Line height for the help text.
|
|
59
59
|
* @cssproperty --mdc-help-text-color - Color for the help text.
|
|
60
|
+
* @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
|
|
60
61
|
* @cssproperty --mdc-select-background-color - The background color of the combobox of select.
|
|
61
62
|
* @cssproperty --mdc-select-text-color - The text color of the select.
|
|
62
63
|
* @cssproperty --mdc-select-border-color - The border color of the select.
|
|
@@ -77,6 +77,7 @@ import styles from './select.styles';
|
|
|
77
77
|
* @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
|
|
78
78
|
* @cssproperty --mdc-help-text-line-height - Line height for the help text.
|
|
79
79
|
* @cssproperty --mdc-help-text-color - Color for the help text.
|
|
80
|
+
* @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
|
|
80
81
|
* @cssproperty --mdc-select-background-color - The background color of the combobox of select.
|
|
81
82
|
* @cssproperty --mdc-select-text-color - The text color of the select.
|
|
82
83
|
* @cssproperty --mdc-select-border-color - The border color of the select.
|
|
@@ -12,15 +12,10 @@ declare const StaticCheckbox_base: import("../../utils/mixins/index.types").Cons
|
|
|
12
12
|
*
|
|
13
13
|
* @dependency mdc-icon
|
|
14
14
|
*
|
|
15
|
-
* @cssproperty --mdc-
|
|
16
|
-
* @cssproperty --mdc-
|
|
17
|
-
* @cssproperty --mdc-
|
|
18
|
-
* @cssproperty --mdc-checkbox-
|
|
19
|
-
* @cssproperty --mdc-checkbox-disabled-checked-icon-color - Background color for a disabled, selected checkbox.
|
|
20
|
-
* @cssproperty --mdc-staticcheckbox-disabled-icon-color - Icon color for a disabled checkbox.
|
|
21
|
-
* @cssproperty --mdc-staticcheckbox-icon-background-color - Background color for an unselected checkbox.
|
|
22
|
-
* @cssproperty --mdc-staticcheckbox-icon-border-color - Default background color for an unselected checkbox.
|
|
23
|
-
* @cssproperty --mdc-staticcheckbox-icon-color - Icon color for an unselected checkbox.
|
|
15
|
+
* @cssproperty --mdc-checkbox-border-color - Controls the border color of the checkbox.
|
|
16
|
+
* @cssproperty --mdc-checkbox-background-color - Controls the background color of the checkbox.
|
|
17
|
+
* @cssproperty --mdc-checkbox-icon-color - Controls the icon color of the checkbox.
|
|
18
|
+
* @cssproperty --mdc-checkbox-size - Controls the size of the checkbox.
|
|
24
19
|
*
|
|
25
20
|
* @csspart icon-container - The container for the checkbox icon.
|
|
26
21
|
* @csspart checkbox-icon - The checkbox icon.
|
|
@@ -24,15 +24,10 @@ import { ICON_NAME } from './staticcheckbox.constants';
|
|
|
24
24
|
*
|
|
25
25
|
* @dependency mdc-icon
|
|
26
26
|
*
|
|
27
|
-
* @cssproperty --mdc-
|
|
28
|
-
* @cssproperty --mdc-
|
|
29
|
-
* @cssproperty --mdc-
|
|
30
|
-
* @cssproperty --mdc-checkbox-
|
|
31
|
-
* @cssproperty --mdc-checkbox-disabled-checked-icon-color - Background color for a disabled, selected checkbox.
|
|
32
|
-
* @cssproperty --mdc-staticcheckbox-disabled-icon-color - Icon color for a disabled checkbox.
|
|
33
|
-
* @cssproperty --mdc-staticcheckbox-icon-background-color - Background color for an unselected checkbox.
|
|
34
|
-
* @cssproperty --mdc-staticcheckbox-icon-border-color - Default background color for an unselected checkbox.
|
|
35
|
-
* @cssproperty --mdc-staticcheckbox-icon-color - Icon color for an unselected checkbox.
|
|
27
|
+
* @cssproperty --mdc-checkbox-border-color - Controls the border color of the checkbox.
|
|
28
|
+
* @cssproperty --mdc-checkbox-background-color - Controls the background color of the checkbox.
|
|
29
|
+
* @cssproperty --mdc-checkbox-icon-color - Controls the icon color of the checkbox.
|
|
30
|
+
* @cssproperty --mdc-checkbox-size - Controls the size of the checkbox.
|
|
36
31
|
*
|
|
37
32
|
* @csspart icon-container - The container for the checkbox icon.
|
|
38
33
|
* @csspart checkbox-icon - The checkbox icon.
|