@thecb/components 9.2.10-beta.13 → 9.2.10-beta.15
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/package.json
CHANGED
|
@@ -106,10 +106,6 @@ const Checkbox = ({
|
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
108
|
|
|
109
|
-
const checkboxProps = {
|
|
110
|
-
...(checkboxAriaLabel ? { "aria-label": checkboxAriaLabel } : {})
|
|
111
|
-
};
|
|
112
|
-
|
|
113
109
|
return (
|
|
114
110
|
<Box
|
|
115
111
|
padding="0"
|
|
@@ -128,19 +124,18 @@ const Checkbox = ({
|
|
|
128
124
|
disabled={disabled}
|
|
129
125
|
name={name}
|
|
130
126
|
checked={checked}
|
|
131
|
-
hidden={true}
|
|
132
127
|
onChange={onChange}
|
|
133
128
|
tabIndex="-1"
|
|
134
129
|
aria-invalid={error}
|
|
135
130
|
aria-describedby={error ? `${name}-error-message` : ""}
|
|
131
|
+
aria-hidden={true}
|
|
136
132
|
/>
|
|
137
133
|
<StyledCheckbox
|
|
138
134
|
role="checkbox"
|
|
139
|
-
name={name}
|
|
140
|
-
error={error}
|
|
141
135
|
aria-invalid={error}
|
|
136
|
+
aria-describedby={error ? `${name}-error-message` : ""}
|
|
137
|
+
error={error}
|
|
142
138
|
disabled={disabled}
|
|
143
|
-
aria-disabled={disabled}
|
|
144
139
|
checked={checked}
|
|
145
140
|
aria-checked={checked}
|
|
146
141
|
focused={focused}
|
|
@@ -150,11 +145,7 @@ const Checkbox = ({
|
|
|
150
145
|
disabledStyles={themeValues.disabledStyles}
|
|
151
146
|
disabledCheckedStyles={themeValues.disabledCheckedStyles}
|
|
152
147
|
focusedStyles={themeValues.focusedStyles}
|
|
153
|
-
aria-
|
|
154
|
-
aria-labelledby={
|
|
155
|
-
!checkboxAriaLabel ? `${name}_checkbox_title` : undefined
|
|
156
|
-
}
|
|
157
|
-
{...checkboxProps}
|
|
148
|
+
aria-label={checkboxAriaLabel}
|
|
158
149
|
>
|
|
159
150
|
<CheckboxIcon
|
|
160
151
|
viewBox="0 0 24 24"
|
|
@@ -169,7 +160,6 @@ const Checkbox = ({
|
|
|
169
160
|
{title && (
|
|
170
161
|
<Text
|
|
171
162
|
variant="p"
|
|
172
|
-
id={`${name}_checkbox_title`}
|
|
173
163
|
weight={themeValues.textFontWeight}
|
|
174
164
|
color={themeValues.textColor}
|
|
175
165
|
extraStyles={
|
|
@@ -19,11 +19,6 @@ export const checkbox = () => (
|
|
|
19
19
|
error={boolean("error", false, "props")}
|
|
20
20
|
disabled={boolean("disabled", false, "props")}
|
|
21
21
|
focused={boolean("focused", false, "props")}
|
|
22
|
-
checkboxAriaLabel={text(
|
|
23
|
-
"checkboxAriaLabel",
|
|
24
|
-
"CheckboxAriaLabel Prop",
|
|
25
|
-
groupId
|
|
26
|
-
)}
|
|
27
22
|
/>
|
|
28
23
|
);
|
|
29
24
|
|