@thecb/components 9.3.2-beta.1 → 9.3.4-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 +153 -52
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.esm.js +153 -53
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/atoms/button-with-action/ButtonWithAction.js +76 -70
- package/src/components/atoms/checkbox/Checkbox.js +8 -1
- package/src/components/atoms/checkbox/Checkbox.stories.js +1 -0
- package/src/components/atoms/country-dropdown/CountryDropdown.js +2 -0
- package/src/components/atoms/dropdown/Dropdown.js +8 -5
- package/src/components/atoms/form-layouts/FormInput.js +3 -0
- package/src/components/atoms/form-select/FormSelect.js +3 -1
- package/src/components/atoms/icons/AccountNumberImage.js +2 -0
- package/src/components/atoms/icons/BankIcon.js +2 -0
- package/src/components/atoms/icons/CheckmarkIcon.js +2 -0
- package/src/components/atoms/icons/GenericCard.js +2 -0
- package/src/components/atoms/icons/GenericCardLarge.js +2 -0
- package/src/components/atoms/icons/KebabMenuIcon.d.ts +1 -0
- package/src/components/atoms/icons/KebabMenuIcon.js +38 -0
- package/src/components/atoms/icons/RoutingNumberImage.js +2 -0
- package/src/components/atoms/icons/TrashIcon.js +42 -40
- 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/atoms/state-province-dropdown/StateProvinceDropdown.js +3 -1
- package/src/components/molecules/address-form/AddressForm.js +5 -0
- package/src/components/molecules/email-form/EmailForm.js +3 -1
- package/src/components/molecules/modal/Modal.js +2 -1
- package/src/components/molecules/payment-form-ach/PaymentFormACH.js +6 -0
- package/src/components/molecules/payment-form-card/PaymentFormCard.js +5 -0
- package/src/components/molecules/phone-form/PhoneForm.js +3 -1
- package/src/components/molecules/popup-menu/PopupMenu.js +152 -0
- package/src/components/molecules/popup-menu/PopupMenu.stories.js +40 -0
- package/src/components/molecules/popup-menu/PopupMenu.styled.js +20 -0
- package/src/components/molecules/popup-menu/PopupMenu.theme.js +11 -0
- package/src/components/molecules/popup-menu/index.d.ts +25 -0
- package/src/components/molecules/popup-menu/index.js +3 -0
- package/src/components/molecules/popup-menu/popup-menu-item/PopupMenuItem.js +79 -0
- package/src/components/molecules/popup-menu/popup-menu-item/PopupMenuItem.styled.js +27 -0
- package/src/components/molecules/popup-menu/popup-menu-item/PopupMenuItem.theme.js +23 -0
- package/src/components/molecules/radio-section/RadioSection.js +9 -2
- package/src/components/molecules/radio-section/RadioSection.stories.js +4 -2
- package/src/components/molecules/radio-section/radio-button/RadioButton.js +3 -1
- package/src/components/molecules/terms-and-conditions/TermsAndConditions.stories.js +3 -1
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV2.js +4 -0
package/package.json
CHANGED
package/src/.DS_Store
ADDED
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useContext } from "react";
|
|
1
|
+
import React, { useContext, forwardRef } from "react";
|
|
2
2
|
import styled, { ThemeContext } from "styled-components";
|
|
3
3
|
import posed from "react-pose";
|
|
4
4
|
import { linear } from "@popmotion/easing";
|
|
@@ -60,32 +60,36 @@ const Spinner = ({ color, isMobile }) => (
|
|
|
60
60
|
|
|
61
61
|
*/
|
|
62
62
|
|
|
63
|
-
const ButtonWithAction = (
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
63
|
+
const ButtonWithAction = forwardRef(
|
|
64
|
+
(
|
|
65
|
+
{
|
|
66
|
+
action = noop,
|
|
67
|
+
variant = "primary",
|
|
68
|
+
text,
|
|
69
|
+
textWrap = false,
|
|
70
|
+
isLoading = false,
|
|
71
|
+
loadingColor = "white",
|
|
72
|
+
dataQa = null,
|
|
73
|
+
textExtraStyles,
|
|
74
|
+
contentOverride = false,
|
|
75
|
+
extraStyles = "",
|
|
76
|
+
tabIndex,
|
|
77
|
+
children,
|
|
78
|
+
extraDisabledStyles,
|
|
79
|
+
...rest
|
|
80
|
+
},
|
|
81
|
+
ref
|
|
82
|
+
) => {
|
|
83
|
+
const themeContext = useContext(ThemeContext);
|
|
84
|
+
const themeValues = createThemeValues(
|
|
85
|
+
themeContext,
|
|
86
|
+
fallbackValues,
|
|
87
|
+
"Button",
|
|
88
|
+
variant
|
|
89
|
+
);
|
|
90
|
+
const { isMobile } = themeContext;
|
|
87
91
|
|
|
88
|
-
|
|
92
|
+
const hoverStyles = `
|
|
89
93
|
outline: none;
|
|
90
94
|
background-color: ${themeValues.hoverBackgroundColor};
|
|
91
95
|
border-color: ${themeValues.hoverBorderColor};
|
|
@@ -95,7 +99,7 @@ const ButtonWithAction = ({
|
|
|
95
99
|
};
|
|
96
100
|
cursor: pointer;
|
|
97
101
|
`;
|
|
98
|
-
|
|
102
|
+
const activeStyles = `
|
|
99
103
|
outline: none;
|
|
100
104
|
background-color: ${themeValues.activeBackgroundColor};
|
|
101
105
|
border-color: ${themeValues.activeBorderColor};
|
|
@@ -104,7 +108,7 @@ const ButtonWithAction = ({
|
|
|
104
108
|
variant === "ghost" || variant === "smallGhost" ? "underline" : "none"
|
|
105
109
|
};
|
|
106
110
|
`;
|
|
107
|
-
|
|
111
|
+
const disabledStyles = `
|
|
108
112
|
background-color: #6D717E;
|
|
109
113
|
border-color: #6D717E;
|
|
110
114
|
color: #FFFFFF;
|
|
@@ -116,47 +120,49 @@ const ButtonWithAction = ({
|
|
|
116
120
|
${extraDisabledStyles}
|
|
117
121
|
`;
|
|
118
122
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
123
|
+
return (
|
|
124
|
+
<Box
|
|
125
|
+
ref={ref}
|
|
126
|
+
variant={variant}
|
|
127
|
+
padding={themeValues.padding}
|
|
128
|
+
minHeight={themeValues.height}
|
|
129
|
+
minWidth={themeValues.minWidth}
|
|
130
|
+
background={themeValues.backgroundColor}
|
|
131
|
+
border={themeValues.border}
|
|
132
|
+
hoverStyles={hoverStyles}
|
|
133
|
+
activeStyles={activeStyles}
|
|
134
|
+
disabledStyles={disabledStyles}
|
|
135
|
+
as="button"
|
|
136
|
+
onClick={isLoading ? undefined : action}
|
|
137
|
+
borderRadius="2px"
|
|
138
|
+
theme={themeContext}
|
|
139
|
+
extraStyles={`margin: 0.5rem; ${extraStyles}`}
|
|
140
|
+
dataQa={dataQa}
|
|
141
|
+
tabIndex={tabIndex}
|
|
142
|
+
{...rest}
|
|
143
|
+
>
|
|
144
|
+
{contentOverride ? (
|
|
145
|
+
children
|
|
146
|
+
) : (
|
|
147
|
+
<Center intrinsic>
|
|
148
|
+
{isLoading ? (
|
|
149
|
+
<Spinner color={loadingColor} isMobile={isMobile} />
|
|
150
|
+
) : (
|
|
151
|
+
<Text
|
|
152
|
+
weight={themeValues.fontWeight}
|
|
153
|
+
variant={themeValues.fontSizeVariant}
|
|
154
|
+
color={themeValues.color}
|
|
155
|
+
textWrap={textWrap}
|
|
156
|
+
extraStyles={textExtraStyles}
|
|
157
|
+
>
|
|
158
|
+
{text}
|
|
159
|
+
</Text>
|
|
160
|
+
)}
|
|
161
|
+
</Center>
|
|
162
|
+
)}
|
|
163
|
+
</Box>
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
);
|
|
161
167
|
|
|
162
168
|
export default ButtonWithAction;
|
|
@@ -95,6 +95,7 @@ const Checkbox = ({
|
|
|
95
95
|
checkboxMargin = "0 16px 0 0",
|
|
96
96
|
extraStyles,
|
|
97
97
|
textExtraStyles,
|
|
98
|
+
labelledById,
|
|
98
99
|
dataQa = null
|
|
99
100
|
}) => {
|
|
100
101
|
const [focused, setFocused] = useState(false);
|
|
@@ -105,6 +106,10 @@ const Checkbox = ({
|
|
|
105
106
|
}
|
|
106
107
|
};
|
|
107
108
|
|
|
109
|
+
const titleId = title ? `checkboxlabel-${name}` : undefined;
|
|
110
|
+
const ariaLabelledById = labelledById ?? titleId;
|
|
111
|
+
const ariaLabel = ariaLabelledById ? undefined : name;
|
|
112
|
+
|
|
108
113
|
return (
|
|
109
114
|
<Box
|
|
110
115
|
padding="0"
|
|
@@ -122,7 +127,8 @@ const Checkbox = ({
|
|
|
122
127
|
id={`checkbox-${name}`}
|
|
123
128
|
disabled={disabled}
|
|
124
129
|
name={name}
|
|
125
|
-
aria-label={
|
|
130
|
+
aria-label={ariaLabel}
|
|
131
|
+
aria-labelledby={ariaLabelledById}
|
|
126
132
|
checked={checked}
|
|
127
133
|
onChange={onChange}
|
|
128
134
|
tabIndex="-1"
|
|
@@ -155,6 +161,7 @@ const Checkbox = ({
|
|
|
155
161
|
</CheckboxContainer>
|
|
156
162
|
{title && (
|
|
157
163
|
<Text
|
|
164
|
+
id={titleId}
|
|
158
165
|
variant="p"
|
|
159
166
|
weight={themeValues.textFontWeight}
|
|
160
167
|
color={themeValues.textColor}
|
|
@@ -10,6 +10,7 @@ const CountryDropdown = ({
|
|
|
10
10
|
fieldActions,
|
|
11
11
|
showErrors,
|
|
12
12
|
onChange,
|
|
13
|
+
isRequired = false,
|
|
13
14
|
dataQa = null
|
|
14
15
|
}) => (
|
|
15
16
|
<FormSelect
|
|
@@ -22,6 +23,7 @@ const CountryDropdown = ({
|
|
|
22
23
|
showErrors={showErrors}
|
|
23
24
|
onChange={onChange}
|
|
24
25
|
autocompleteValue="country-name"
|
|
26
|
+
isRequired={isRequired}
|
|
25
27
|
/>
|
|
26
28
|
);
|
|
27
29
|
export default CountryDropdown;
|
|
@@ -133,7 +133,8 @@ const Dropdown = ({
|
|
|
133
133
|
ariaDescribedby,
|
|
134
134
|
autocompleteValue, // browser autofill value, like country-name
|
|
135
135
|
smoothScroll = true,
|
|
136
|
-
ariaInvalid = false
|
|
136
|
+
ariaInvalid = false,
|
|
137
|
+
isRequired = false
|
|
137
138
|
}) => {
|
|
138
139
|
const [inputValue, setInputValue] = useState("");
|
|
139
140
|
const [optionsState, setOptionsState] = useState([]);
|
|
@@ -262,13 +263,15 @@ const Dropdown = ({
|
|
|
262
263
|
useEffect(() => {
|
|
263
264
|
if (autoEraseTypeAhead) {
|
|
264
265
|
clearTimeout(timer);
|
|
265
|
-
setTimer(setTimeout(() => setInputValue(""),
|
|
266
|
+
setTimer(setTimeout(() => setInputValue(""), 20000));
|
|
266
267
|
}
|
|
268
|
+
|
|
267
269
|
setFilteredOptions(
|
|
268
270
|
options.filter(
|
|
269
271
|
option =>
|
|
270
|
-
option
|
|
271
|
-
|
|
272
|
+
option?.value?.toLowerCase()?.indexOf(inputValue?.toLowerCase()) >=
|
|
273
|
+
0 ||
|
|
274
|
+
option.text?.toLowerCase()?.indexOf(inputValue?.toLowerCase()) >= 0
|
|
272
275
|
)
|
|
273
276
|
);
|
|
274
277
|
}, [inputValue]);
|
|
@@ -356,7 +359,7 @@ const Dropdown = ({
|
|
|
356
359
|
}}
|
|
357
360
|
padding="12px"
|
|
358
361
|
placeholder={getSelection()}
|
|
359
|
-
required={options.required}
|
|
362
|
+
required={options.required || isRequired}
|
|
360
363
|
role="combobox"
|
|
361
364
|
themeValues={themeValues}
|
|
362
365
|
title={hasTitles ? getSelection() : null}
|
|
@@ -116,6 +116,7 @@ const FormInput = ({
|
|
|
116
116
|
extraStyles,
|
|
117
117
|
removeFromValue, // regex of characters to remove before setting value
|
|
118
118
|
dataQa = null,
|
|
119
|
+
isRequired = false,
|
|
119
120
|
...props
|
|
120
121
|
}) => {
|
|
121
122
|
const [showPassword, setShowPassword] = useState(false);
|
|
@@ -221,6 +222,7 @@ const FormInput = ({
|
|
|
221
222
|
$extraStyles={extraStyles}
|
|
222
223
|
data-qa={dataQa || labelTextWhenNoError}
|
|
223
224
|
autoComplete={autocompleteValue}
|
|
225
|
+
required={isRequired}
|
|
224
226
|
{...props}
|
|
225
227
|
/>
|
|
226
228
|
) : (
|
|
@@ -247,6 +249,7 @@ const FormInput = ({
|
|
|
247
249
|
$extraStyles={extraStyles}
|
|
248
250
|
data-qa={dataQa || labelTextWhenNoError}
|
|
249
251
|
autoComplete={autocompleteValue}
|
|
252
|
+
required={isRequired}
|
|
250
253
|
{...props}
|
|
251
254
|
/>
|
|
252
255
|
)}
|
|
@@ -24,7 +24,8 @@ const FormSelect = ({
|
|
|
24
24
|
autocompleteValue, // browser autofill value, like country-name
|
|
25
25
|
smoothScroll = true, // whether the browser should animate scroll to selected item on first open
|
|
26
26
|
dataQa = null,
|
|
27
|
-
widthFitOptions = false
|
|
27
|
+
widthFitOptions = false,
|
|
28
|
+
isRequired = false
|
|
28
29
|
}) => {
|
|
29
30
|
const [open, setOpen] = useState(false);
|
|
30
31
|
const dropdownRef = useRef(null);
|
|
@@ -94,6 +95,7 @@ const FormSelect = ({
|
|
|
94
95
|
disabled={disabled}
|
|
95
96
|
autocompleteValue={autocompleteValue}
|
|
96
97
|
smoothScroll={smoothScroll}
|
|
98
|
+
isRequired={isRequired}
|
|
97
99
|
/>
|
|
98
100
|
<Stack direction="row" justify="space-between">
|
|
99
101
|
{(field.hasErrors && field.dirty) || (field.hasErrors && showErrors) ? (
|
|
@@ -7,6 +7,8 @@ const AccountNumberImage = () => {
|
|
|
7
7
|
width="371"
|
|
8
8
|
height="164"
|
|
9
9
|
viewBox="0 0 371 164"
|
|
10
|
+
role="img"
|
|
11
|
+
aria-label="A check with the account number highlighted in the bottom center"
|
|
10
12
|
>
|
|
11
13
|
<g fill="none" fillRule="evenodd" stroke="none" strokeWidth="1">
|
|
12
14
|
<g transform="translate(-364 -546)">
|
|
@@ -8,6 +8,8 @@ export const BankIcon = () => {
|
|
|
8
8
|
viewBox="0 0 28 18"
|
|
9
9
|
fill="none"
|
|
10
10
|
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
role="img"
|
|
12
|
+
aria-label="Check Payment"
|
|
11
13
|
>
|
|
12
14
|
<path
|
|
13
15
|
d="M0 2.25C0 1.00736 1.04467 0 2.33333 0H25.6667C26.9553 0 28 1.00736 28 2.25V15.75C28 16.9926 26.9553 18 25.6667 18H2.33333C1.04467 18 0 16.9926 0 15.75V2.25Z"
|
|
@@ -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="none"
|
|
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;
|
|
@@ -7,6 +7,8 @@ const RoutingNumberImage = () => {
|
|
|
7
7
|
width="371"
|
|
8
8
|
height="164"
|
|
9
9
|
viewBox="0 0 371 164"
|
|
10
|
+
role="img"
|
|
11
|
+
aria-label="A check with the routing number highlighted in the lower left hand corner"
|
|
10
12
|
>
|
|
11
13
|
<g fill="none" fillRule="evenodd" stroke="none" strokeWidth="1">
|
|
12
14
|
<g transform="translate(-365 -522)">
|
|
@@ -2,46 +2,48 @@ import React from "react";
|
|
|
2
2
|
import { fallbackValues } from "./Icons.theme";
|
|
3
3
|
import { themeComponent } from "../../../util/themeUtils";
|
|
4
4
|
|
|
5
|
-
const TrashIcon = ({ themeValues }) =>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<defs>
|
|
15
|
-
<path
|
|
16
|
-
d="M15,7 L14,15.5714286 C14,16.3571429 13.25,17 12.3333333,17 L12.3333333,17 L7.66666667,17 C6.75,17 6,16.3571429 6,15.5714286 L6,15.5714286 L5,7 L15,7 Z M12.1428571,3 L13,4 L16,4 L16,6 L4,6 L4,4 L7,4 L7.85714286,3 L12.1428571,3 Z"
|
|
17
|
-
id="trash-path-1"
|
|
18
|
-
></path>
|
|
19
|
-
</defs>
|
|
20
|
-
<g
|
|
21
|
-
id="trash-Icons-/-Small-/-20px-S-/-Trash---Mobile---20px"
|
|
22
|
-
stroke="none"
|
|
23
|
-
strokeWidth="1"
|
|
24
|
-
fill="none"
|
|
25
|
-
fillRule="evenodd"
|
|
5
|
+
const TrashIcon = ({ themeValues, iconFill }) => {
|
|
6
|
+
return (
|
|
7
|
+
<svg
|
|
8
|
+
width="20px"
|
|
9
|
+
height="20px"
|
|
10
|
+
viewBox="0 0 20 20"
|
|
11
|
+
version="1.1"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
26
14
|
>
|
|
27
|
-
<
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
mask="
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
15
|
+
<defs>
|
|
16
|
+
<path
|
|
17
|
+
d="M15,7 L14,15.5714286 C14,16.3571429 13.25,17 12.3333333,17 L12.3333333,17 L7.66666667,17 C6.75,17 6,16.3571429 6,15.5714286 L6,15.5714286 L5,7 L15,7 Z M12.1428571,3 L13,4 L16,4 L16,6 L4,6 L4,4 L7,4 L7.85714286,3 L12.1428571,3 Z"
|
|
18
|
+
id="trash-path-1"
|
|
19
|
+
></path>
|
|
20
|
+
</defs>
|
|
21
|
+
<g
|
|
22
|
+
id="trash-Icons-/-Small-/-20px-S-/-Trash---Mobile---20px"
|
|
23
|
+
stroke="none"
|
|
24
|
+
strokeWidth="1"
|
|
25
|
+
fill="none"
|
|
26
|
+
fillRule="evenodd"
|
|
27
|
+
>
|
|
28
|
+
<mask id="trash-mask-2" fill="white">
|
|
29
|
+
<use xlinkHref="#trash-path-1"></use>
|
|
30
|
+
</mask>
|
|
31
|
+
<use
|
|
32
|
+
id="trash-Mask"
|
|
33
|
+
fill={iconFill ?? themeValues.singleIconColor}
|
|
34
|
+
fillRule="nonzero"
|
|
35
|
+
xlinkHref="#trash-path-1"
|
|
36
|
+
></use>
|
|
37
|
+
<polygon
|
|
38
|
+
id="trash-Path"
|
|
39
|
+
fill={iconFill ?? themeValues.singleIconColor}
|
|
40
|
+
fillRule="nonzero"
|
|
41
|
+
mask="url(#trash-mask-2)"
|
|
42
|
+
points="0 0 20 0 20 20 0 20"
|
|
43
|
+
></polygon>
|
|
44
|
+
</g>
|
|
45
|
+
</svg>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
46
48
|
|
|
47
49
|
export default themeComponent(TrashIcon, "Icons", fallbackValues, "primary");
|
|
@@ -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
|
};
|
|
@@ -9,7 +9,8 @@ const FormStateDropdown = ({
|
|
|
9
9
|
field,
|
|
10
10
|
fieldActions,
|
|
11
11
|
showErrors,
|
|
12
|
-
countryCode
|
|
12
|
+
countryCode,
|
|
13
|
+
isRequired = false
|
|
13
14
|
}) => {
|
|
14
15
|
const placeholder =
|
|
15
16
|
countryCode === "US" ? placeHolderOptionUS : placeHolderOption;
|
|
@@ -23,6 +24,7 @@ const FormStateDropdown = ({
|
|
|
23
24
|
errorMessages={errorMessages}
|
|
24
25
|
showErrors={showErrors}
|
|
25
26
|
autocompleteValue="address-level1"
|
|
27
|
+
isRequired={isRequired}
|
|
26
28
|
/>
|
|
27
29
|
);
|
|
28
30
|
};
|
|
@@ -71,6 +71,7 @@ const AddressForm = ({
|
|
|
71
71
|
}}
|
|
72
72
|
showErrors={showErrors}
|
|
73
73
|
dataQa="Country"
|
|
74
|
+
isRequired={true}
|
|
74
75
|
/>
|
|
75
76
|
<FormInput
|
|
76
77
|
labelTextWhenNoError="Address"
|
|
@@ -81,6 +82,7 @@ const AddressForm = ({
|
|
|
81
82
|
onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
|
|
82
83
|
autocompleteValue="address-line1"
|
|
83
84
|
dataQa="Address"
|
|
85
|
+
isRequired={true}
|
|
84
86
|
/>
|
|
85
87
|
<FormInput
|
|
86
88
|
labelTextWhenNoError="Apt, Suite, Unit, Floor, etc. (Optional)"
|
|
@@ -100,6 +102,7 @@ const AddressForm = ({
|
|
|
100
102
|
onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
|
|
101
103
|
autocompleteValue="address-level2"
|
|
102
104
|
dataQa="City"
|
|
105
|
+
isRequired={true}
|
|
103
106
|
/>
|
|
104
107
|
<StateProvinceDropdown
|
|
105
108
|
labelTextWhenNoError={isUS ? "State" : "State or Province"}
|
|
@@ -110,6 +113,7 @@ const AddressForm = ({
|
|
|
110
113
|
showErrors={showErrors}
|
|
111
114
|
onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
|
|
112
115
|
dataQa="State or Province"
|
|
116
|
+
isRequired={true}
|
|
113
117
|
/>
|
|
114
118
|
<FormInput
|
|
115
119
|
isNum={isUS}
|
|
@@ -122,6 +126,7 @@ const AddressForm = ({
|
|
|
122
126
|
onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
|
|
123
127
|
autocompleteValue="postal-code"
|
|
124
128
|
dataQa="Zip code"
|
|
129
|
+
isRequired={true}
|
|
125
130
|
/>
|
|
126
131
|
{showWalletCheckbox && (
|
|
127
132
|
<Checkbox
|
|
@@ -19,7 +19,8 @@ const EmailForm = ({
|
|
|
19
19
|
handleSubmit = noop,
|
|
20
20
|
showWalletCheckbox,
|
|
21
21
|
saveToWallet,
|
|
22
|
-
walletCheckboxMarked
|
|
22
|
+
walletCheckboxMarked,
|
|
23
|
+
isRequired = false
|
|
23
24
|
}) => {
|
|
24
25
|
if (clearOnDismount) {
|
|
25
26
|
useEffect(() => () => actions.form.clear(), []);
|
|
@@ -48,6 +49,7 @@ const EmailForm = ({
|
|
|
48
49
|
isEmail
|
|
49
50
|
autocompleteValue="email"
|
|
50
51
|
dataQa="Email address"
|
|
52
|
+
isRequired={isRequired}
|
|
51
53
|
/>
|
|
52
54
|
{showWalletCheckbox && (
|
|
53
55
|
<Checkbox
|