carbon-react 104.55.0 → 104.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/__internal__/checkable-input/hidden-checkable-input.component.d.ts +4 -1
- package/esm/__internal__/checkable-input/hidden-checkable-input.component.js +5 -1
- package/esm/__internal__/checkable-input/hidden-checkable-input.d.ts +2 -0
- package/esm/components/switch/switch.component.js +1 -0
- package/lib/__internal__/checkable-input/hidden-checkable-input.component.d.ts +4 -1
- package/lib/__internal__/checkable-input/hidden-checkable-input.component.js +5 -1
- package/lib/__internal__/checkable-input/hidden-checkable-input.d.ts +2 -0
- package/lib/components/switch/switch.component.js +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare var _default: React.MemoExoticComponent<{
|
|
2
|
-
({ name, checked, type, value, inputRef, onChange, autoFocus, ...props }: {
|
|
2
|
+
({ name, checked, type, value, inputRef, onChange, autoFocus, role, ...props }: {
|
|
3
3
|
[x: string]: any;
|
|
4
4
|
name: any;
|
|
5
5
|
checked: any;
|
|
@@ -8,6 +8,7 @@ declare var _default: React.MemoExoticComponent<{
|
|
|
8
8
|
inputRef: any;
|
|
9
9
|
onChange: any;
|
|
10
10
|
autoFocus: any;
|
|
11
|
+
role: any;
|
|
11
12
|
}): JSX.Element;
|
|
12
13
|
propTypes: {
|
|
13
14
|
/** Allows component to be focused on page load */
|
|
@@ -28,6 +29,8 @@ declare var _default: React.MemoExoticComponent<{
|
|
|
28
29
|
onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
29
30
|
/** HTML type attribute of the input */
|
|
30
31
|
type: PropTypes.Validator<string>;
|
|
32
|
+
/** Role attribute of the input */
|
|
33
|
+
role: PropTypes.Requireable<string>;
|
|
31
34
|
/** Value of the input */
|
|
32
35
|
value: PropTypes.Requireable<string>;
|
|
33
36
|
/** A callback to retrieve the input reference */
|
|
@@ -13,6 +13,7 @@ const HiddenCheckableInput = ({
|
|
|
13
13
|
inputRef,
|
|
14
14
|
onChange,
|
|
15
15
|
autoFocus,
|
|
16
|
+
role,
|
|
16
17
|
...props
|
|
17
18
|
}) => {
|
|
18
19
|
const {
|
|
@@ -57,7 +58,7 @@ const HiddenCheckableInput = ({
|
|
|
57
58
|
"aria-checked": checked,
|
|
58
59
|
checked: checked,
|
|
59
60
|
name: name,
|
|
60
|
-
role: type,
|
|
61
|
+
role: role || type,
|
|
61
62
|
type: type,
|
|
62
63
|
value: value
|
|
63
64
|
}, props, {
|
|
@@ -98,6 +99,9 @@ HiddenCheckableInput.propTypes = {
|
|
|
98
99
|
/** HTML type attribute of the input */
|
|
99
100
|
type: PropTypes.string.isRequired,
|
|
100
101
|
|
|
102
|
+
/** Role attribute of the input */
|
|
103
|
+
role: PropTypes.string,
|
|
104
|
+
|
|
101
105
|
/** Value of the input */
|
|
102
106
|
value: PropTypes.string,
|
|
103
107
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare var _default: React.MemoExoticComponent<{
|
|
2
|
-
({ name, checked, type, value, inputRef, onChange, autoFocus, ...props }: {
|
|
2
|
+
({ name, checked, type, value, inputRef, onChange, autoFocus, role, ...props }: {
|
|
3
3
|
[x: string]: any;
|
|
4
4
|
name: any;
|
|
5
5
|
checked: any;
|
|
@@ -8,6 +8,7 @@ declare var _default: React.MemoExoticComponent<{
|
|
|
8
8
|
inputRef: any;
|
|
9
9
|
onChange: any;
|
|
10
10
|
autoFocus: any;
|
|
11
|
+
role: any;
|
|
11
12
|
}): JSX.Element;
|
|
12
13
|
propTypes: {
|
|
13
14
|
/** Allows component to be focused on page load */
|
|
@@ -28,6 +29,8 @@ declare var _default: React.MemoExoticComponent<{
|
|
|
28
29
|
onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
29
30
|
/** HTML type attribute of the input */
|
|
30
31
|
type: PropTypes.Validator<string>;
|
|
32
|
+
/** Role attribute of the input */
|
|
33
|
+
role: PropTypes.Requireable<string>;
|
|
31
34
|
/** Value of the input */
|
|
32
35
|
value: PropTypes.Requireable<string>;
|
|
33
36
|
/** A callback to retrieve the input reference */
|
|
@@ -29,6 +29,7 @@ const HiddenCheckableInput = ({
|
|
|
29
29
|
inputRef,
|
|
30
30
|
onChange,
|
|
31
31
|
autoFocus,
|
|
32
|
+
role,
|
|
32
33
|
...props
|
|
33
34
|
}) => {
|
|
34
35
|
const {
|
|
@@ -73,7 +74,7 @@ const HiddenCheckableInput = ({
|
|
|
73
74
|
"aria-checked": checked,
|
|
74
75
|
checked: checked,
|
|
75
76
|
name: name,
|
|
76
|
-
role: type,
|
|
77
|
+
role: role || type,
|
|
77
78
|
type: type,
|
|
78
79
|
value: value
|
|
79
80
|
}, props, {
|
|
@@ -114,6 +115,9 @@ HiddenCheckableInput.propTypes = {
|
|
|
114
115
|
/** HTML type attribute of the input */
|
|
115
116
|
type: _propTypes.default.string.isRequired,
|
|
116
117
|
|
|
118
|
+
/** Role attribute of the input */
|
|
119
|
+
role: _propTypes.default.string,
|
|
120
|
+
|
|
117
121
|
/** Value of the input */
|
|
118
122
|
value: _propTypes.default.string,
|
|
119
123
|
|