@thecb/components 9.2.10-beta.15 → 9.2.10-beta.17
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/index.cjs.js +9 -20
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +9 -20
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/checkbox/Checkbox.js +3 -7
- package/src/components/molecules/terms-and-conditions/TermsAndConditions.stories.js +0 -1
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV1.js +1 -3
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV2.js +1 -3
package/package.json
CHANGED
|
@@ -33,7 +33,7 @@ const CheckboxIcon = styled.svg`
|
|
|
33
33
|
const HiddenCheckbox = styled.input.attrs({ type: "checkbox" })`
|
|
34
34
|
border: 0;
|
|
35
35
|
clip: rect(0 0 0 0);
|
|
36
|
-
|
|
36
|
+
clippath: inset(50%);
|
|
37
37
|
height: 1px;
|
|
38
38
|
margin: -1px;
|
|
39
39
|
overflow: hidden;
|
|
@@ -95,8 +95,7 @@ const Checkbox = ({
|
|
|
95
95
|
checkboxMargin = "0 16px 0 0",
|
|
96
96
|
extraStyles,
|
|
97
97
|
textExtraStyles,
|
|
98
|
-
dataQa = null
|
|
99
|
-
checkboxAriaLabel = ""
|
|
98
|
+
dataQa = null
|
|
100
99
|
}) => {
|
|
101
100
|
const [focused, setFocused] = useState(false);
|
|
102
101
|
|
|
@@ -123,17 +122,15 @@ const Checkbox = ({
|
|
|
123
122
|
id={`checkbox-${name}`}
|
|
124
123
|
disabled={disabled}
|
|
125
124
|
name={name}
|
|
125
|
+
aria-label={name}
|
|
126
126
|
checked={checked}
|
|
127
127
|
onChange={onChange}
|
|
128
128
|
tabIndex="-1"
|
|
129
129
|
aria-invalid={error}
|
|
130
130
|
aria-describedby={error ? `${name}-error-message` : ""}
|
|
131
|
-
aria-hidden={true}
|
|
132
131
|
/>
|
|
133
132
|
<StyledCheckbox
|
|
134
133
|
role="checkbox"
|
|
135
|
-
aria-invalid={error}
|
|
136
|
-
aria-describedby={error ? `${name}-error-message` : ""}
|
|
137
134
|
error={error}
|
|
138
135
|
disabled={disabled}
|
|
139
136
|
checked={checked}
|
|
@@ -145,7 +142,6 @@ const Checkbox = ({
|
|
|
145
142
|
disabledStyles={themeValues.disabledStyles}
|
|
146
143
|
disabledCheckedStyles={themeValues.disabledCheckedStyles}
|
|
147
144
|
focusedStyles={themeValues.focusedStyles}
|
|
148
|
-
aria-label={checkboxAriaLabel}
|
|
149
145
|
>
|
|
150
146
|
<CheckboxIcon
|
|
151
147
|
viewBox="0 0 24 24"
|
|
@@ -11,8 +11,7 @@ const TermsAndConditionsControlV1 = ({
|
|
|
11
11
|
terms,
|
|
12
12
|
error = false,
|
|
13
13
|
linkVariant,
|
|
14
|
-
initialFocusSelector = ""
|
|
15
|
-
checkboxAriaLabel = ""
|
|
14
|
+
initialFocusSelector = ""
|
|
16
15
|
}) => {
|
|
17
16
|
const [showTerms, toggleShowTerms] = useState(false);
|
|
18
17
|
return (
|
|
@@ -24,7 +23,6 @@ const TermsAndConditionsControlV1 = ({
|
|
|
24
23
|
error={error}
|
|
25
24
|
checked={isChecked}
|
|
26
25
|
onChange={onCheck}
|
|
27
|
-
checkboxAriaLabel={checkboxAriaLabel}
|
|
28
26
|
/>
|
|
29
27
|
<Box padding="0 0 0 58px">
|
|
30
28
|
<Stack>
|
|
@@ -27,8 +27,7 @@ const TermsAndConditionsControlV2 = ({
|
|
|
27
27
|
containerBackground = ATHENS_GREY,
|
|
28
28
|
checkboxMargin = "4px 8px 4px 4px",
|
|
29
29
|
modalTitle = "Terms and Conditions",
|
|
30
|
-
initialFocusSelector = ""
|
|
31
|
-
checkboxAriaLabel = ""
|
|
30
|
+
initialFocusSelector = ""
|
|
32
31
|
}) => {
|
|
33
32
|
const [showTerms, toggleShowTerms] = useState(false);
|
|
34
33
|
const standardBoxShadow = generateShadows().standard.base;
|
|
@@ -59,7 +58,6 @@ const TermsAndConditionsControlV2 = ({
|
|
|
59
58
|
onChange={onCheck}
|
|
60
59
|
checkboxMargin={checkboxMargin}
|
|
61
60
|
extraStyles={`align-self: flex-start;`}
|
|
62
|
-
checkboxAriaLabel={checkboxAriaLabel}
|
|
63
61
|
/>
|
|
64
62
|
)}
|
|
65
63
|
<Stack childGap="0.25rem" fullHeight>
|