@thecb/components 6.2.2 → 6.2.5
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 +12 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +12 -6
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/link/ExternalLink.js +2 -0
- package/src/components/molecules/modal/Modal.js +6 -4
- package/src/components/molecules/radio-section/RadioSection.js +3 -1
package/package.json
CHANGED
|
@@ -16,6 +16,7 @@ const ExternalLink = ({
|
|
|
16
16
|
variant = "primary",
|
|
17
17
|
tabIndex = "0",
|
|
18
18
|
dataQa,
|
|
19
|
+
ariaLabel,
|
|
19
20
|
children
|
|
20
21
|
}) => {
|
|
21
22
|
const themeContext = useContext(ThemeContext);
|
|
@@ -41,6 +42,7 @@ const ExternalLink = ({
|
|
|
41
42
|
extrastyles={extraStyles}
|
|
42
43
|
rel={newTab ? "noopener" : ""}
|
|
43
44
|
data-qa={dataQa}
|
|
45
|
+
aria-label={ariaLabel}
|
|
44
46
|
>
|
|
45
47
|
{safeChildren(children, <span />)}
|
|
46
48
|
</StyledExternalLink>
|
|
@@ -22,6 +22,7 @@ const getApplicationNode = () => document.getElementById("root");
|
|
|
22
22
|
|
|
23
23
|
const Modal = ({
|
|
24
24
|
hideModal,
|
|
25
|
+
onExit = hideModal,
|
|
25
26
|
continueAction,
|
|
26
27
|
isContinueActionDisabled = false,
|
|
27
28
|
cancelAction,
|
|
@@ -30,6 +31,7 @@ const Modal = ({
|
|
|
30
31
|
modalBodyText,
|
|
31
32
|
cancelButtonText = "Cancel",
|
|
32
33
|
continueButtonText = "Continue",
|
|
34
|
+
closeButtonText = "Close",
|
|
33
35
|
modalHeaderBg = WHITE,
|
|
34
36
|
modalBodyBg = ATHENS_GREY,
|
|
35
37
|
useDangerButton = false,
|
|
@@ -49,7 +51,7 @@ const Modal = ({
|
|
|
49
51
|
<Fragment>
|
|
50
52
|
{modalOpen && (
|
|
51
53
|
<AriaModal
|
|
52
|
-
onExit={
|
|
54
|
+
onExit={onExit}
|
|
53
55
|
getApplicationNode={getApplicationNode}
|
|
54
56
|
titleText={modalHeaderText}
|
|
55
57
|
underlayStyle={{
|
|
@@ -169,10 +171,10 @@ const Modal = ({
|
|
|
169
171
|
<ButtonWithAction
|
|
170
172
|
action={hideModal}
|
|
171
173
|
variant="primary"
|
|
172
|
-
text=
|
|
173
|
-
dataQa=
|
|
174
|
+
text={closeButtonText}
|
|
175
|
+
dataQa={closeButtonText}
|
|
174
176
|
extraStyles={buttonExtraStyles}
|
|
175
|
-
className="modal-
|
|
177
|
+
className="modal-close-button"
|
|
176
178
|
/>
|
|
177
179
|
</Box>
|
|
178
180
|
)}
|
|
@@ -143,7 +143,9 @@ const RadioSection = ({
|
|
|
143
143
|
.filter(section => !section.hidden)
|
|
144
144
|
.map(section => (
|
|
145
145
|
<Motion
|
|
146
|
-
tabIndex={
|
|
146
|
+
tabIndex={
|
|
147
|
+
section.hideRadioButton || section.disabled ? "-1" : "0"
|
|
148
|
+
}
|
|
147
149
|
onKeyDown={e => handleKeyDown(section.id, e)}
|
|
148
150
|
onFocus={() => setFocused(section.id)}
|
|
149
151
|
onBlur={() => setFocused(null)}
|