@thecb/components 9.2.7-beta.9 → 9.2.8-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 +207 -159
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.esm.js +207 -160
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/dropdown/Dropdown.js +4 -2
- package/src/components/atoms/icons/KebabMenuIcon.d.ts +1 -0
- package/src/components/atoms/icons/KebabMenuIcon.js +38 -0
- package/src/components/atoms/icons/icons.stories.js +3 -1
- package/src/components/atoms/icons/index.d.ts +1 -0
- package/src/components/atoms/icons/index.js +3 -1
- package/src/components/molecules/account-and-routing-modal/AccountAndRoutingModal.js +0 -2
- package/src/components/molecules/modal/Modal.js +1 -16
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV1.js +0 -1
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV2.js +0 -1
- package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.js +1 -5
- package/dist/src/apps/checkout/pages/payment/sub-pages/payment-amount/PaymentAmount_old.js +0 -49322
- 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/package.json
CHANGED
|
@@ -265,11 +265,13 @@ const Dropdown = ({
|
|
|
265
265
|
clearTimeout(timer);
|
|
266
266
|
setTimer(setTimeout(() => setInputValue(""), 20000));
|
|
267
267
|
}
|
|
268
|
+
|
|
268
269
|
setFilteredOptions(
|
|
269
270
|
options.filter(
|
|
270
271
|
option =>
|
|
271
|
-
option
|
|
272
|
-
|
|
272
|
+
option?.value?.toLowerCase()?.indexOf(inputValue?.toLowerCase()) >=
|
|
273
|
+
0 ||
|
|
274
|
+
option.text?.toLowerCase()?.indexOf(inputValue?.toLowerCase()) >= 0
|
|
273
275
|
)
|
|
274
276
|
);
|
|
275
277
|
}, [inputValue]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const KebabMenuIcon: JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
const KebabMenuIcon = () => {
|
|
4
|
+
return (
|
|
5
|
+
<svg
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
width="21"
|
|
8
|
+
height="32"
|
|
9
|
+
viewBox="0 0 21 32"
|
|
10
|
+
fill="none"
|
|
11
|
+
>
|
|
12
|
+
<path
|
|
13
|
+
d="M0 4C0 1.79086 1.79086 0 4 0L17 0C19.2091 0 21 1.79086 21 4V28C21 30.2091 19.2091 32 17 32H4C1.79086 32 0 30.2091 0 28L0 4Z"
|
|
14
|
+
fill="#FEFEFE"
|
|
15
|
+
/>
|
|
16
|
+
<path
|
|
17
|
+
fillRule="evenodd"
|
|
18
|
+
clipRule="evenodd"
|
|
19
|
+
d="M10.5 6C9.39333 6 8.5 6.89333 8.5 8C8.5 9.10667 9.39333 10 10.5 10C11.6067 10 12.5 9.10667 12.5 8C12.5 6.89333 11.6067 6 10.5 6Z"
|
|
20
|
+
fill="#3B5BDB"
|
|
21
|
+
/>
|
|
22
|
+
<path
|
|
23
|
+
fillRule="evenodd"
|
|
24
|
+
clipRule="evenodd"
|
|
25
|
+
d="M10.5 14C9.39333 14 8.5 14.8933 8.5 16C8.5 17.1067 9.39333 18 10.5 18C11.6067 18 12.5 17.1067 12.5 16C12.5 14.8933 11.6067 14 10.5 14Z"
|
|
26
|
+
fill="#3B5BDB"
|
|
27
|
+
/>
|
|
28
|
+
<path
|
|
29
|
+
fillRule="evenodd"
|
|
30
|
+
clipRule="evenodd"
|
|
31
|
+
d="M10.5 22C9.39333 22 8.5 22.9067 8.5 24C8.5 25.0933 9.40667 26 10.5 26C11.5933 26 12.5 25.0933 12.5 24C12.5 22.9067 11.6067 22 10.5 22Z"
|
|
32
|
+
fill="#3B5BDB"
|
|
33
|
+
/>
|
|
34
|
+
</svg>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default KebabMenuIcon;
|
|
@@ -38,7 +38,8 @@ import {
|
|
|
38
38
|
SuccessfulIcon,
|
|
39
39
|
VoidedIcon,
|
|
40
40
|
StatusUnknownIcon,
|
|
41
|
-
AutopayIcon
|
|
41
|
+
AutopayIcon,
|
|
42
|
+
KebabMenuIcon
|
|
42
43
|
} from "./index";
|
|
43
44
|
|
|
44
45
|
const story = page({
|
|
@@ -84,3 +85,4 @@ export const successfulIcon = () => <SuccessfulIcon />;
|
|
|
84
85
|
export const voidedIcon = () => <VoidedIcon />;
|
|
85
86
|
export const statusUnknownIcon = () => <StatusUnknownIcon />;
|
|
86
87
|
export const autopayIcon = () => <AutopayIcon />;
|
|
88
|
+
export const kebabMenuIcon = () => <KebabMenuIcon />;
|
|
@@ -86,6 +86,7 @@ import ArrowLeftCircleIconMedium from "./ArrowLeftCircleIconMedium";
|
|
|
86
86
|
import ChargebackIconMedium from "./ChargebackIconMedium";
|
|
87
87
|
import ChargebackReversalIconMedium from "./ChargebackReversalIconMedium";
|
|
88
88
|
import PlusCircleIcon from "./PlusCircleIcon";
|
|
89
|
+
import KebabMenuIcon from "./KebabMenuIcon";
|
|
89
90
|
|
|
90
91
|
export {
|
|
91
92
|
AccountsIcon,
|
|
@@ -175,5 +176,6 @@ export {
|
|
|
175
176
|
ArrowLeftCircleIconMedium,
|
|
176
177
|
ChargebackIconMedium,
|
|
177
178
|
ChargebackReversalIconMedium,
|
|
178
|
-
PlusCircleIcon
|
|
179
|
+
PlusCircleIcon,
|
|
180
|
+
KebabMenuIcon
|
|
179
181
|
};
|
|
@@ -45,12 +45,10 @@ const Modal = ({
|
|
|
45
45
|
isLoading,
|
|
46
46
|
buttonExtraStyles,
|
|
47
47
|
children,
|
|
48
|
-
dataQa = null
|
|
49
|
-
initialFocus = null
|
|
48
|
+
dataQa = null
|
|
50
49
|
}) => {
|
|
51
50
|
const { isMobile } = useContext(ThemeContext);
|
|
52
51
|
const modalContainerRef = useRef(null);
|
|
53
|
-
|
|
54
52
|
return (
|
|
55
53
|
<div ref={modalContainerRef} data-qa={dataQa}>
|
|
56
54
|
{modalOpen && (
|
|
@@ -72,9 +70,6 @@ const Modal = ({
|
|
|
72
70
|
width: customWidth || "615px"
|
|
73
71
|
}}
|
|
74
72
|
underlayClickExits={underlayClickExits}
|
|
75
|
-
aria-modal={true}
|
|
76
|
-
aria-name={modalHeaderText}
|
|
77
|
-
{...(initialFocus ? { initialFocus: initialFocus } : {})}
|
|
78
73
|
>
|
|
79
74
|
<Box
|
|
80
75
|
padding="0"
|
|
@@ -129,8 +124,6 @@ const Modal = ({
|
|
|
129
124
|
dataQa={cancelButtonText}
|
|
130
125
|
extraStyles={buttonExtraStyles}
|
|
131
126
|
className="modal-cancel-button"
|
|
132
|
-
role="button"
|
|
133
|
-
name={cancelButtonText}
|
|
134
127
|
/>
|
|
135
128
|
</Box>
|
|
136
129
|
<Box width="100%" padding="0">
|
|
@@ -145,8 +138,6 @@ const Modal = ({
|
|
|
145
138
|
disabled={isContinueActionDisabled}
|
|
146
139
|
extraStyles={buttonExtraStyles}
|
|
147
140
|
className="modal-continue-button"
|
|
148
|
-
role="button"
|
|
149
|
-
name={continueButtonText}
|
|
150
141
|
/>
|
|
151
142
|
</Box>
|
|
152
143
|
</Stack>
|
|
@@ -165,8 +156,6 @@ const Modal = ({
|
|
|
165
156
|
dataQa={cancelButtonText}
|
|
166
157
|
extraStyles={buttonExtraStyles}
|
|
167
158
|
className="modal-cancel-button"
|
|
168
|
-
role="button"
|
|
169
|
-
name={cancelButtonText}
|
|
170
159
|
/>
|
|
171
160
|
<ButtonWithAction
|
|
172
161
|
variant={
|
|
@@ -179,8 +168,6 @@ const Modal = ({
|
|
|
179
168
|
disabled={isContinueActionDisabled}
|
|
180
169
|
extraStyles={buttonExtraStyles}
|
|
181
170
|
className="modal-continue-button"
|
|
182
|
-
role="button"
|
|
183
|
-
name={continueButtonText}
|
|
184
171
|
/>
|
|
185
172
|
</Stack>
|
|
186
173
|
)}
|
|
@@ -194,8 +181,6 @@ const Modal = ({
|
|
|
194
181
|
dataQa={closeButtonText}
|
|
195
182
|
extraStyles={buttonExtraStyles}
|
|
196
183
|
className="modal-close-button"
|
|
197
|
-
role="button"
|
|
198
|
-
name={closeButtonText}
|
|
199
184
|
/>
|
|
200
185
|
</Box>
|
|
201
186
|
)}
|
|
@@ -15,8 +15,7 @@ const TermsAndConditionsModal = ({
|
|
|
15
15
|
terms,
|
|
16
16
|
variant,
|
|
17
17
|
linkVariant = "p",
|
|
18
|
-
themeValues
|
|
19
|
-
initialFocus = null
|
|
18
|
+
themeValues
|
|
20
19
|
}) => (
|
|
21
20
|
<Modal
|
|
22
21
|
modalOpen={isOpen}
|
|
@@ -43,7 +42,6 @@ const TermsAndConditionsModal = ({
|
|
|
43
42
|
toggleAccepted(true);
|
|
44
43
|
toggleOpen(false);
|
|
45
44
|
}}
|
|
46
|
-
{...(initialFocus ? { initialFocus: initialFocus } : {})}
|
|
47
45
|
>
|
|
48
46
|
<Text
|
|
49
47
|
variant={linkVariant}
|
|
@@ -54,8 +52,6 @@ const TermsAndConditionsModal = ({
|
|
|
54
52
|
weight={themeValues.fontWeight}
|
|
55
53
|
hoverStyles={themeValues.modalLinkHoverFocus}
|
|
56
54
|
extraStyles={`display: inline-block; width: fit-content; cursor: pointer`}
|
|
57
|
-
role="button"
|
|
58
|
-
className="modal-trigger"
|
|
59
55
|
>
|
|
60
56
|
{link}
|
|
61
57
|
</Text>
|