@thecb/components 9.2.5 → 9.2.6-beta.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/dist/index.cjs.js +43 -18
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +43 -18
- package/dist/index.esm.js.map +1 -1
- package/dist/src/apps/checkout/pages/payment/sub-pages/payment-amount/PaymentAmount_old.js +49322 -0
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/icons/.DS_Store +0 -0
- package/src/components/molecules/account-and-routing-modal/AccountAndRoutingModal.js +2 -0
- package/src/components/molecules/modal/Modal.js +17 -3
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV1.js +1 -0
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV2.js +1 -0
- package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.js +5 -1
package/package.json
CHANGED
package/src/.DS_Store
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -45,10 +45,12 @@ const Modal = ({
|
|
|
45
45
|
isLoading,
|
|
46
46
|
buttonExtraStyles,
|
|
47
47
|
children,
|
|
48
|
-
dataQa = null
|
|
48
|
+
dataQa = null,
|
|
49
|
+
initialFocus = null
|
|
49
50
|
}) => {
|
|
50
51
|
const { isMobile } = useContext(ThemeContext);
|
|
51
52
|
const modalContainerRef = useRef(null);
|
|
53
|
+
|
|
52
54
|
return (
|
|
53
55
|
<div ref={modalContainerRef} data-qa={dataQa}>
|
|
54
56
|
{modalOpen && (
|
|
@@ -67,10 +69,12 @@ const Modal = ({
|
|
|
67
69
|
alignItems: "center"
|
|
68
70
|
}}
|
|
69
71
|
dialogStyle={{
|
|
70
|
-
width: customWidth || "615px"
|
|
71
|
-
overflow: "auto"
|
|
72
|
+
width: customWidth || "615px"
|
|
72
73
|
}}
|
|
73
74
|
underlayClickExits={underlayClickExits}
|
|
75
|
+
aria-modal={true}
|
|
76
|
+
aria-name={modalHeaderText}
|
|
77
|
+
{...(initialFocus ? { initialFocus: initialFocus } : {})}
|
|
74
78
|
>
|
|
75
79
|
<Box
|
|
76
80
|
padding="0"
|
|
@@ -125,6 +129,8 @@ const Modal = ({
|
|
|
125
129
|
dataQa={cancelButtonText}
|
|
126
130
|
extraStyles={buttonExtraStyles}
|
|
127
131
|
className="modal-cancel-button"
|
|
132
|
+
role="button"
|
|
133
|
+
name={cancelButtonText}
|
|
128
134
|
/>
|
|
129
135
|
</Box>
|
|
130
136
|
<Box width="100%" padding="0">
|
|
@@ -139,6 +145,8 @@ const Modal = ({
|
|
|
139
145
|
disabled={isContinueActionDisabled}
|
|
140
146
|
extraStyles={buttonExtraStyles}
|
|
141
147
|
className="modal-continue-button"
|
|
148
|
+
role="button"
|
|
149
|
+
name={continueButtonText}
|
|
142
150
|
/>
|
|
143
151
|
</Box>
|
|
144
152
|
</Stack>
|
|
@@ -157,6 +165,8 @@ const Modal = ({
|
|
|
157
165
|
dataQa={cancelButtonText}
|
|
158
166
|
extraStyles={buttonExtraStyles}
|
|
159
167
|
className="modal-cancel-button"
|
|
168
|
+
role="button"
|
|
169
|
+
name={cancelButtonText}
|
|
160
170
|
/>
|
|
161
171
|
<ButtonWithAction
|
|
162
172
|
variant={
|
|
@@ -169,6 +179,8 @@ const Modal = ({
|
|
|
169
179
|
disabled={isContinueActionDisabled}
|
|
170
180
|
extraStyles={buttonExtraStyles}
|
|
171
181
|
className="modal-continue-button"
|
|
182
|
+
role="button"
|
|
183
|
+
name={continueButtonText}
|
|
172
184
|
/>
|
|
173
185
|
</Stack>
|
|
174
186
|
)}
|
|
@@ -182,6 +194,8 @@ const Modal = ({
|
|
|
182
194
|
dataQa={closeButtonText}
|
|
183
195
|
extraStyles={buttonExtraStyles}
|
|
184
196
|
className="modal-close-button"
|
|
197
|
+
role="button"
|
|
198
|
+
name={closeButtonText}
|
|
185
199
|
/>
|
|
186
200
|
</Box>
|
|
187
201
|
)}
|
|
@@ -15,7 +15,8 @@ const TermsAndConditionsModal = ({
|
|
|
15
15
|
terms,
|
|
16
16
|
variant,
|
|
17
17
|
linkVariant = "p",
|
|
18
|
-
themeValues
|
|
18
|
+
themeValues,
|
|
19
|
+
initialFocus = null
|
|
19
20
|
}) => (
|
|
20
21
|
<Modal
|
|
21
22
|
modalOpen={isOpen}
|
|
@@ -42,6 +43,7 @@ const TermsAndConditionsModal = ({
|
|
|
42
43
|
toggleAccepted(true);
|
|
43
44
|
toggleOpen(false);
|
|
44
45
|
}}
|
|
46
|
+
{...(initialFocus ? { initialFocus: initialFocus } : {})}
|
|
45
47
|
>
|
|
46
48
|
<Text
|
|
47
49
|
variant={linkVariant}
|
|
@@ -52,6 +54,8 @@ const TermsAndConditionsModal = ({
|
|
|
52
54
|
weight={themeValues.fontWeight}
|
|
53
55
|
hoverStyles={themeValues.modalLinkHoverFocus}
|
|
54
56
|
extraStyles={`display: inline-block; width: fit-content; cursor: pointer`}
|
|
57
|
+
role="button"
|
|
58
|
+
className="modal-trigger"
|
|
55
59
|
>
|
|
56
60
|
{link}
|
|
57
61
|
</Text>
|