@thecb/components 9.3.1-beta.0 → 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 +865 -583
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +171 -60
- package/dist/index.esm.js +862 -583
- 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 +78 -41
- package/src/components/atoms/dropdown/Dropdown.theme.js +8 -2
- package/src/components/atoms/form-layouts/FormInput.js +3 -0
- package/src/components/atoms/form-select/FormSelect.js +19 -15
- 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/index.d.ts +1 -0
- package/src/components/molecules/index.js +1 -0
- 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/popover/Popover.js +1 -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 +8 -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 +5 -1
- package/src/components/molecules/toast-notification/ToastNotification.js +75 -0
- package/src/components/molecules/toast-notification/ToastNotification.stories.js +67 -0
- package/src/components/molecules/toast-notification/index.d.ts +18 -0
- package/src/components/molecules/toast-notification/index.js +3 -0
- package/src/constants/colors.d.ts +1 -0
- package/src/constants/colors.js +5 -1
- package/src/hooks/index.js +3 -0
- package/src/hooks/use-toast-notification/index.d.ts +23 -0
- package/src/hooks/use-toast-notification/index.js +38 -0
- package/src/index.d.ts +2 -1
- package/src/index.js +2 -1
- package/src/types/common/ToastVariants.ts +6 -0
- package/src/types/common/index.ts +1 -0
- package/src/util/index.js +10 -2
- package/dist/src/apps/checkout/pages/payment/sub-pages/payment-amount/PaymentAmount_old.js +0 -49322
- 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/{util/useOutsideClick.js → hooks/use-outside-click/index.js} +0 -0
- /package/src/{util/useScrollTo.js → hooks/use-scroll-to/index.js} +0 -0
package/package.json
CHANGED
package/src/.DS_Store
CHANGED
|
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;
|
|
@@ -12,11 +12,11 @@ import styled from "styled-components";
|
|
|
12
12
|
import "core-js/proposals/relative-indexing-method";
|
|
13
13
|
|
|
14
14
|
import {
|
|
15
|
-
|
|
15
|
+
ERROR_COLOR,
|
|
16
16
|
GREY_CHATEAU,
|
|
17
|
-
STORM_GREY,
|
|
18
17
|
MINESHAFT_GREY,
|
|
19
|
-
|
|
18
|
+
STORM_GREY,
|
|
19
|
+
WHITE
|
|
20
20
|
} from "../../../constants/colors";
|
|
21
21
|
import { fallbackValues } from "./Dropdown.theme";
|
|
22
22
|
import { themeComponent } from "../../../util/themeUtils";
|
|
@@ -55,37 +55,65 @@ const DropdownContentWrapper = styled.div`
|
|
|
55
55
|
`;
|
|
56
56
|
|
|
57
57
|
const DropdownItemWrapper = styled.li`
|
|
58
|
-
background-color: ${({ selected, themeValues }) =>
|
|
59
|
-
selected ? themeValues.selectedColor : WHITE};
|
|
60
58
|
text-align: start;
|
|
61
|
-
border-width:
|
|
62
|
-
border-
|
|
59
|
+
border-width: 2px;
|
|
60
|
+
border-style: solid;
|
|
61
|
+
border-color: ${({ selected, themeValues }) =>
|
|
62
|
+
selected ? themeValues.selectedColor : WHITE};
|
|
63
63
|
box-shadow: none;
|
|
64
|
-
padding: 1rem;
|
|
65
64
|
box-sizing: border-box;
|
|
66
65
|
width: 100%;
|
|
67
66
|
list-style: none;
|
|
68
67
|
cursor: ${({ disabled }) => (disabled ? "default" : "pointer")};
|
|
69
68
|
|
|
70
69
|
&:hover {
|
|
71
|
-
|
|
70
|
+
border-color: ${({ disabled, selected, themeValues }) =>
|
|
72
71
|
selected
|
|
73
|
-
? themeValues.
|
|
72
|
+
? themeValues.focusColor
|
|
74
73
|
: disabled
|
|
75
74
|
? WHITE
|
|
76
75
|
: themeValues.hoverColor};
|
|
76
|
+
> * {
|
|
77
|
+
background: ${({ selected, disabled, themeValues }) =>
|
|
78
|
+
selected
|
|
79
|
+
? themeValues.focusColor
|
|
80
|
+
: disabled
|
|
81
|
+
? WHITE
|
|
82
|
+
: themeValues.hoverColor};
|
|
83
|
+
border-color: ${({ selected, disabled, themeValues }) =>
|
|
84
|
+
selected
|
|
85
|
+
? themeValues.focusColor
|
|
86
|
+
: disabled
|
|
87
|
+
? WHITE
|
|
88
|
+
: themeValues.hoverColor};
|
|
89
|
+
}
|
|
77
90
|
}
|
|
78
91
|
&:focus {
|
|
79
|
-
background-color: ${({ selected, disabled, themeValues }) =>
|
|
80
|
-
selected
|
|
81
|
-
? themeValues.selectedColor
|
|
82
|
-
: disabled
|
|
83
|
-
? WHITE
|
|
84
|
-
: themeValues.hoverColor};
|
|
85
92
|
outline: none;
|
|
93
|
+
border-color: ${({ themeValues }) => themeValues.selectedColor};
|
|
94
|
+
> * {
|
|
95
|
+
background: ${({ selected, disabled, themeValues }) =>
|
|
96
|
+
selected
|
|
97
|
+
? themeValues.focusColor
|
|
98
|
+
: disabled
|
|
99
|
+
? WHITE
|
|
100
|
+
: themeValues.hoverColor};
|
|
101
|
+
border-color: white;
|
|
102
|
+
outline: none;
|
|
103
|
+
}
|
|
86
104
|
}
|
|
87
105
|
`;
|
|
88
106
|
|
|
107
|
+
const DropdownItemBorder = styled.div`
|
|
108
|
+
background: ${({ selected, themeValues }) =>
|
|
109
|
+
selected ? themeValues.selectedColor : WHITE};
|
|
110
|
+
border-color: ${({ selected, themeValues }) =>
|
|
111
|
+
selected ? themeValues.selectedColor : WHITE};
|
|
112
|
+
border-width: 2px;
|
|
113
|
+
border-style: solid;
|
|
114
|
+
padding: 12px;
|
|
115
|
+
`;
|
|
116
|
+
|
|
89
117
|
const Dropdown = ({
|
|
90
118
|
placeholder,
|
|
91
119
|
options,
|
|
@@ -105,7 +133,8 @@ const Dropdown = ({
|
|
|
105
133
|
ariaDescribedby,
|
|
106
134
|
autocompleteValue, // browser autofill value, like country-name
|
|
107
135
|
smoothScroll = true,
|
|
108
|
-
ariaInvalid = false
|
|
136
|
+
ariaInvalid = false,
|
|
137
|
+
isRequired = false
|
|
109
138
|
}) => {
|
|
110
139
|
const [inputValue, setInputValue] = useState("");
|
|
111
140
|
const [optionsState, setOptionsState] = useState([]);
|
|
@@ -234,13 +263,15 @@ const Dropdown = ({
|
|
|
234
263
|
useEffect(() => {
|
|
235
264
|
if (autoEraseTypeAhead) {
|
|
236
265
|
clearTimeout(timer);
|
|
237
|
-
setTimer(setTimeout(() => setInputValue(""),
|
|
266
|
+
setTimer(setTimeout(() => setInputValue(""), 20000));
|
|
238
267
|
}
|
|
268
|
+
|
|
239
269
|
setFilteredOptions(
|
|
240
270
|
options.filter(
|
|
241
271
|
option =>
|
|
242
|
-
option
|
|
243
|
-
|
|
272
|
+
option?.value?.toLowerCase()?.indexOf(inputValue?.toLowerCase()) >=
|
|
273
|
+
0 ||
|
|
274
|
+
option.text?.toLowerCase()?.indexOf(inputValue?.toLowerCase()) >= 0
|
|
244
275
|
)
|
|
245
276
|
);
|
|
246
277
|
}, [inputValue]);
|
|
@@ -328,7 +359,7 @@ const Dropdown = ({
|
|
|
328
359
|
}}
|
|
329
360
|
padding="12px"
|
|
330
361
|
placeholder={getSelection()}
|
|
331
|
-
required={options.required}
|
|
362
|
+
required={options.required || isRequired}
|
|
332
363
|
role="combobox"
|
|
333
364
|
themeValues={themeValues}
|
|
334
365
|
title={hasTitles ? getSelection() : null}
|
|
@@ -385,27 +416,33 @@ const Dropdown = ({
|
|
|
385
416
|
role="option"
|
|
386
417
|
onFocus={() => setFocusedRef(optionRefs.current[i])}
|
|
387
418
|
>
|
|
388
|
-
<
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
? WHITE
|
|
393
|
-
: disabledValues.includes(choice.value)
|
|
394
|
-
? STORM_GREY
|
|
395
|
-
: MINESHAFT_GREY
|
|
396
|
-
}
|
|
397
|
-
extraStyles={`padding-left: 16px;
|
|
398
|
-
cursor: ${
|
|
399
|
-
disabledValues.includes(choice.value)
|
|
400
|
-
? "default"
|
|
401
|
-
: "pointer"
|
|
402
|
-
};
|
|
403
|
-
white-space: nowrap;
|
|
404
|
-
overflow: hidden;
|
|
405
|
-
text-overflow: ellipsis;`}
|
|
419
|
+
<DropdownItemBorder
|
|
420
|
+
disabled={disabledValues.includes(choice.value)}
|
|
421
|
+
selected={choice.value === value}
|
|
422
|
+
themeValues={themeValues}
|
|
406
423
|
>
|
|
407
|
-
|
|
408
|
-
|
|
424
|
+
<Text
|
|
425
|
+
variant="p"
|
|
426
|
+
color={
|
|
427
|
+
choice.value === value
|
|
428
|
+
? WHITE
|
|
429
|
+
: disabledValues.includes(choice.value)
|
|
430
|
+
? STORM_GREY
|
|
431
|
+
: MINESHAFT_GREY
|
|
432
|
+
}
|
|
433
|
+
extraStyles={`padding-left: 16px;
|
|
434
|
+
cursor: ${
|
|
435
|
+
disabledValues.includes(choice.value)
|
|
436
|
+
? "default"
|
|
437
|
+
: "pointer"
|
|
438
|
+
};
|
|
439
|
+
white-space: nowrap;
|
|
440
|
+
overflow: hidden;
|
|
441
|
+
text-overflow: ellipsis;`}
|
|
442
|
+
>
|
|
443
|
+
{choice.text}
|
|
444
|
+
</Text>
|
|
445
|
+
</DropdownItemBorder>
|
|
409
446
|
</DropdownItemWrapper>
|
|
410
447
|
);
|
|
411
448
|
})}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
HOVER_LIGHT_BLUE,
|
|
3
|
+
MATISSE_BLUE,
|
|
4
|
+
MATISSE_BLUE_DARK
|
|
5
|
+
} from "../../../constants/colors";
|
|
2
6
|
|
|
3
7
|
const selectedColor = `${MATISSE_BLUE}`;
|
|
4
8
|
const hoverColor = `${HOVER_LIGHT_BLUE}`;
|
|
9
|
+
const focusColor = `${MATISSE_BLUE_DARK}`;
|
|
5
10
|
|
|
6
11
|
export const fallbackValues = {
|
|
7
12
|
selectedColor,
|
|
8
|
-
hoverColor
|
|
13
|
+
hoverColor,
|
|
14
|
+
focusColor
|
|
9
15
|
};
|
|
@@ -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,28 +95,31 @@ 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
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
{(field.hasErrors && field.dirty) || (field.hasErrors && showErrors) ? (
|
|
102
|
+
<Text
|
|
103
|
+
color={ERROR_COLOR}
|
|
104
|
+
variant="pXS"
|
|
105
|
+
weight={themeValues.fontWeight}
|
|
106
|
+
extraStyles={`
|
|
104
107
|
word-break: break-word;
|
|
105
108
|
font-family: Public Sans;
|
|
106
109
|
&::first-letter {
|
|
107
110
|
text-transform: uppercase;
|
|
108
111
|
}
|
|
109
112
|
`}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
113
|
+
id={createIdFromString(labelTextWhenNoError, "error message")}
|
|
114
|
+
aria-live="polite"
|
|
115
|
+
aria-atomic={true}
|
|
116
|
+
data-qa={createIdFromString(labelTextWhenNoError, "error message")}
|
|
117
|
+
>
|
|
118
|
+
{errorMessages[field.errors[0]]}
|
|
119
|
+
</Text>
|
|
120
|
+
) : (
|
|
121
|
+
<Text extraStyles={`height: ${themeValues.lineHeight};`} />
|
|
122
|
+
)}
|
|
119
123
|
</Stack>
|
|
120
124
|
</SelectContainer>
|
|
121
125
|
);
|
|
@@ -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)">
|