@thecb/components 9.3.2-beta.1 → 9.3.2

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.
Files changed (54) hide show
  1. package/dist/index.cjs.js +346 -245
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.d.ts +3 -1
  4. package/dist/index.esm.js +346 -246
  5. package/dist/index.esm.js.map +1 -1
  6. package/package.json +1 -1
  7. package/src/components/atoms/button-with-action/ButtonWithAction.js +76 -70
  8. package/src/components/atoms/checkbox/Checkbox.js +10 -2
  9. package/src/components/atoms/checkbox/Checkbox.stories.js +1 -0
  10. package/src/components/atoms/country-dropdown/CountryDropdown.js +2 -0
  11. package/src/components/atoms/dropdown/Dropdown.js +11 -8
  12. package/src/components/atoms/form-layouts/FormInput.js +3 -0
  13. package/src/components/atoms/form-select/FormSelect.js +3 -1
  14. package/src/components/atoms/icons/AccountNumberImage.js +2 -0
  15. package/src/components/atoms/icons/BankIcon.js +2 -0
  16. package/src/components/atoms/icons/CheckmarkIcon.js +2 -0
  17. package/src/components/atoms/icons/GenericCard.js +2 -0
  18. package/src/components/atoms/icons/GenericCardLarge.js +2 -0
  19. package/src/components/atoms/icons/KebabMenuIcon.d.ts +1 -0
  20. package/src/components/atoms/icons/KebabMenuIcon.js +38 -0
  21. package/src/components/atoms/icons/RoutingNumberImage.js +2 -0
  22. package/src/components/atoms/icons/TrashIcon.js +42 -40
  23. package/src/components/atoms/icons/icons.stories.js +3 -1
  24. package/src/components/atoms/icons/index.d.ts +1 -0
  25. package/src/components/atoms/icons/index.js +3 -1
  26. package/src/components/atoms/layouts/Motion.js +7 -10
  27. package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.js +3 -1
  28. package/src/components/atoms/toggle-switch/ToggleSwitch.js +2 -1
  29. package/src/components/molecules/address-form/AddressForm.js +5 -0
  30. package/src/components/molecules/collapsible-section/CollapsibleSection.js +2 -1
  31. package/src/components/molecules/email-form/EmailForm.js +3 -1
  32. package/src/components/molecules/modal/Modal.js +2 -1
  33. package/src/components/molecules/obligation/modules/AutopayModalModule.js +3 -13
  34. package/src/components/molecules/payment-form-ach/PaymentFormACH.js +6 -0
  35. package/src/components/molecules/payment-form-card/PaymentFormCard.js +5 -0
  36. package/src/components/molecules/phone-form/PhoneForm.js +3 -1
  37. package/src/components/molecules/popover/Popover.js +2 -1
  38. package/src/components/molecules/popup-menu/PopupMenu.js +152 -0
  39. package/src/components/molecules/popup-menu/PopupMenu.stories.js +40 -0
  40. package/src/components/molecules/popup-menu/PopupMenu.styled.js +20 -0
  41. package/src/components/molecules/popup-menu/PopupMenu.theme.js +11 -0
  42. package/src/components/molecules/popup-menu/index.d.ts +25 -0
  43. package/src/components/molecules/popup-menu/index.js +3 -0
  44. package/src/components/molecules/popup-menu/popup-menu-item/PopupMenuItem.js +79 -0
  45. package/src/components/molecules/popup-menu/popup-menu-item/PopupMenuItem.styled.js +27 -0
  46. package/src/components/molecules/popup-menu/popup-menu-item/PopupMenuItem.theme.js +23 -0
  47. package/src/components/molecules/radio-section/RadioSection.js +62 -13
  48. package/src/components/molecules/radio-section/RadioSection.stories.js +4 -2
  49. package/src/components/molecules/radio-section/radio-button/RadioButton.js +4 -2
  50. package/src/components/molecules/terms-and-conditions/TermsAndConditions.stories.js +3 -1
  51. package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV2.js +4 -0
  52. package/src/constants/keyboard.js +7 -0
  53. package/src/util/general.js +10 -0
  54. /package/src/components/atoms/icons/{ExternalLinkIcon.js → ExternalLinkicon.js} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "9.3.2-beta.1",
3
+ "version": "9.3.2",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -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
- action = noop,
65
- variant = "primary",
66
- text,
67
- textWrap = false,
68
- isLoading = false,
69
- loadingColor = "white",
70
- dataQa = null,
71
- textExtraStyles,
72
- contentOverride = false,
73
- extraStyles = "",
74
- tabIndex,
75
- children,
76
- extraDisabledStyles,
77
- ...rest
78
- }) => {
79
- const themeContext = useContext(ThemeContext);
80
- const themeValues = createThemeValues(
81
- themeContext,
82
- fallbackValues,
83
- "Button",
84
- variant
85
- );
86
- const { isMobile } = themeContext;
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
- const hoverStyles = `
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
- const activeStyles = `
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
- const disabledStyles = `
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
- return (
120
- <Box
121
- variant={variant}
122
- padding={themeValues.padding}
123
- minHeight={themeValues.height}
124
- minWidth={themeValues.minWidth}
125
- background={themeValues.backgroundColor}
126
- border={themeValues.border}
127
- hoverStyles={hoverStyles}
128
- activeStyles={activeStyles}
129
- disabledStyles={disabledStyles}
130
- as="button"
131
- onClick={isLoading ? undefined : action}
132
- borderRadius="2px"
133
- theme={themeContext}
134
- extraStyles={`margin: 0.5rem; ${extraStyles}`}
135
- dataQa={dataQa}
136
- tabIndex={tabIndex}
137
- {...rest}
138
- >
139
- {contentOverride ? (
140
- children
141
- ) : (
142
- <Center intrinsic>
143
- {isLoading ? (
144
- <Spinner color={loadingColor} isMobile={isMobile} />
145
- ) : (
146
- <Text
147
- weight={themeValues.fontWeight}
148
- variant={themeValues.fontSizeVariant}
149
- color={themeValues.color}
150
- textWrap={textWrap}
151
- extraStyles={textExtraStyles}
152
- >
153
- {text}
154
- </Text>
155
- )}
156
- </Center>
157
- )}
158
- </Box>
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;
@@ -2,6 +2,7 @@ import React, { useState } from "react";
2
2
  import styled, { css } from "styled-components";
3
3
  import { fallbackValues } from "./Checkbox.theme";
4
4
  import { noop } from "../../../util/general";
5
+ import { ENTER } from "../../../constants/keyboard";
5
6
  import Box from "../layouts/Box";
6
7
  import Text from "../text";
7
8
  import { themeComponent } from "../../../util/themeUtils";
@@ -95,16 +96,21 @@ const Checkbox = ({
95
96
  checkboxMargin = "0 16px 0 0",
96
97
  extraStyles,
97
98
  textExtraStyles,
99
+ labelledById,
98
100
  dataQa = null
99
101
  }) => {
100
102
  const [focused, setFocused] = useState(false);
101
103
 
102
104
  const handleClick = (e, func) => {
103
- if (e?.keyCode === 13) {
105
+ if (e.keyCode === ENTER) {
104
106
  func();
105
107
  }
106
108
  };
107
109
 
110
+ const titleId = title ? `checkboxlabel-${name}` : undefined;
111
+ const ariaLabelledById = labelledById ?? titleId;
112
+ const ariaLabel = ariaLabelledById ? undefined : name;
113
+
108
114
  return (
109
115
  <Box
110
116
  padding="0"
@@ -122,7 +128,8 @@ const Checkbox = ({
122
128
  id={`checkbox-${name}`}
123
129
  disabled={disabled}
124
130
  name={name}
125
- aria-label={name}
131
+ aria-label={ariaLabel}
132
+ aria-labelledby={ariaLabelledById}
126
133
  checked={checked}
127
134
  onChange={onChange}
128
135
  tabIndex="-1"
@@ -155,6 +162,7 @@ const Checkbox = ({
155
162
  </CheckboxContainer>
156
163
  {title && (
157
164
  <Text
165
+ id={titleId}
158
166
  variant="p"
159
167
  weight={themeValues.textFontWeight}
160
168
  color={themeValues.textColor}
@@ -19,6 +19,7 @@ export const checkbox = () => (
19
19
  error={boolean("error", false, "props")}
20
20
  disabled={boolean("disabled", false, "props")}
21
21
  focused={boolean("focused", false, "props")}
22
+ labelledById={text("labelledById", undefined, "props")}
22
23
  />
23
24
  );
24
25
 
@@ -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;
@@ -18,6 +18,7 @@ import {
18
18
  STORM_GREY,
19
19
  WHITE
20
20
  } from "../../../constants/colors";
21
+ import { ENTER } from "../../../constants/keyboard";
21
22
  import { fallbackValues } from "./Dropdown.theme";
22
23
  import { themeComponent } from "../../../util/themeUtils";
23
24
 
@@ -133,7 +134,8 @@ const Dropdown = ({
133
134
  ariaDescribedby,
134
135
  autocompleteValue, // browser autofill value, like country-name
135
136
  smoothScroll = true,
136
- ariaInvalid = false
137
+ ariaInvalid = false,
138
+ isRequired = false
137
139
  }) => {
138
140
  const [inputValue, setInputValue] = useState("");
139
141
  const [optionsState, setOptionsState] = useState([]);
@@ -262,13 +264,15 @@ const Dropdown = ({
262
264
  useEffect(() => {
263
265
  if (autoEraseTypeAhead) {
264
266
  clearTimeout(timer);
265
- setTimer(setTimeout(() => setInputValue(""), 3000));
267
+ setTimer(setTimeout(() => setInputValue(""), 20000));
266
268
  }
269
+
267
270
  setFilteredOptions(
268
271
  options.filter(
269
272
  option =>
270
- option.value.toLowerCase().startsWith(inputValue.toLowerCase()) ||
271
- option.text.toLowerCase().startsWith(inputValue.toLowerCase())
273
+ option?.value?.toLowerCase()?.indexOf(inputValue?.toLowerCase()) >=
274
+ 0 ||
275
+ option.text?.toLowerCase()?.indexOf(inputValue?.toLowerCase()) >= 0
272
276
  )
273
277
  );
274
278
  }, [inputValue]);
@@ -315,10 +319,9 @@ const Dropdown = ({
315
319
  >
316
320
  <Box
317
321
  as="input"
318
- aria-multiline="false"
319
322
  autoComplete={autocompleteValue}
320
323
  aria-controls={`${ariaLabelledby}_listbox`}
321
- aria-activedescendant="focused_option"
324
+ aria-activedescendant={isOpen ? "focused_option" : undefined}
322
325
  aria-owns={`${ariaLabelledby}_listbox`}
323
326
  aria-haspopup="listbox"
324
327
  aria-labelledby={ariaLabelledby}
@@ -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}
@@ -399,7 +402,7 @@ const Dropdown = ({
399
402
  tabIndex={-1}
400
403
  onClick={e => handleItemSelection(e, choice, i)}
401
404
  onKeyDown={e => {
402
- if (e.keyCode === 13) {
405
+ if (e.keyCode === ENTER) {
403
406
  handleItemSelection(e, choice, i);
404
407
  }
405
408
  }}
@@ -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"
@@ -9,6 +9,8 @@ const CheckmarkIcon = () => (
9
9
  version="1.1"
10
10
  xmlns="http://www.w3.org/2000/svg"
11
11
  xmlnsXlink="http://www.w3.org/1999/xlink"
12
+ role="img"
13
+ aria-label="Successful payment, green checkmark"
12
14
  >
13
15
  <g
14
16
  id="Cityville-Checkout---Desktop---Logged-In"
@@ -7,6 +7,8 @@ const GenericCard = () => (
7
7
  viewBox="0 0 28 18"
8
8
  fill="none"
9
9
  xmlns="http://www.w3.org/2000/svg"
10
+ role="img"
11
+ aria-label="Card Payment"
10
12
  >
11
13
  <rect width="28" height="18" rx="2" fill="#15749D" />
12
14
  <path
@@ -8,6 +8,8 @@ const GenericCardLarge = () => {
8
8
  viewBox="0 0 36 24"
9
9
  fill="none"
10
10
  xmlns="http://www.w3.org/2000/svg"
11
+ role="img"
12
+ aria-label="Card Payment"
11
13
  >
12
14
  <rect width="36" height="24" rx="2" fill="#15749D" />
13
15
  <path
@@ -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
- <svg
7
- width="20px"
8
- height="20px"
9
- viewBox="0 0 20 20"
10
- version="1.1"
11
- xmlns="http://www.w3.org/2000/svg"
12
- xmlnsXlink="http://www.w3.org/1999/xlink"
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
- <mask id="trash-mask-2" fill="white">
28
- <use xlinkHref="#trash-path-1"></use>
29
- </mask>
30
- <use
31
- id="trash-Mask"
32
- fill={themeValues.singleIconColor}
33
- fillRule="nonzero"
34
- xlinkHref="#trash-path-1"
35
- ></use>
36
- <polygon
37
- id="trash-Path"
38
- fill={themeValues.singleIconColor}
39
- fillRule="nonzero"
40
- mask="url(#trash-mask-2)"
41
- points="0 0 20 0 20 20 0 20"
42
- ></polygon>
43
- </g>
44
- </svg>
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 />;
@@ -21,3 +21,4 @@ export * from "./SuccessfulIconMedium";
21
21
  export * from "./SuccessfulIconSmall";
22
22
  export * from "./XCircleIconMedium";
23
23
  export * from "./XCircleIconSmall";
24
+ export * from "./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
  };
@@ -1,4 +1,4 @@
1
- import React, { Fragment } from "react";
1
+ import React, { Fragment, forwardRef } from "react";
2
2
  import { MotionWrapper } from "./Motion.styled";
3
3
  import { safeChildren } from "../../../util/general";
4
4
 
@@ -37,15 +37,12 @@ import { safeChildren } from "../../../util/general";
37
37
  This should be sufficient for most scenarios, but if you need to, you have the ability to make Motion act like all of the other primitives using the props provided.
38
38
  */
39
39
 
40
- export const Motion = ({
41
- position = "relative",
42
- padding = "0",
43
- children,
44
- ...rest
45
- }) => (
46
- <MotionWrapper position={position} padding={padding} {...rest}>
47
- {safeChildren(children, <Fragment />)}
48
- </MotionWrapper>
40
+ export const Motion = forwardRef(
41
+ ({ position = "relative", padding = "0", children, ...rest }, ref) => (
42
+ <MotionWrapper position={position} padding={padding} ref={ref} {...rest}>
43
+ {safeChildren(children, <Fragment />)}
44
+ </MotionWrapper>
45
+ )
49
46
  );
50
47
 
51
48
  export default Motion;
@@ -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
  };