@thecb/components 7.0.0-beta.9 → 7.1.0-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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "7.0.0-beta.9",
3
+ "version": "7.1.0-beta.0",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
package/src/.DS_Store ADDED
Binary file
@@ -0,0 +1,48 @@
1
+ import React from "react";
2
+ import { fallbackValues } from "./Icons.theme";
3
+ import { themeComponent } from "../../../util/themeUtils";
4
+
5
+ const WalletIconSmall = ({ themeValues }) => {
6
+ return (
7
+ <svg
8
+ width="20"
9
+ height="20"
10
+ viewBox="0 0 20 20"
11
+ fill="none"
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ >
14
+ <path
15
+ fillRule="evenodd"
16
+ clipRule="evenodd"
17
+ d="M16.3125 6.94643C16.0446 6.70536 15.7232 6.57143 15.3482 6.57143L5.14283 6.57143C5.0089 6.57143 4.90176 6.54464 4.8214 6.46429C4.74104 6.38393 4.71426 6.27678 4.71426 6.14286C4.71426 6.03571 4.74104 5.92857 4.8214 5.84821C4.90176 5.76786 5.0089 5.71428 5.14283 5.71428L15.4285 5.71428C15.5357 5.71428 15.6428 5.6875 15.7232 5.60714C15.8035 5.52678 15.8571 5.41964 15.8571 5.28571C15.8571 4.9375 15.7232 4.64286 15.4821 4.375C15.2143 4.13393 14.9196 4 14.5714 4L4.71426 4C4.23211 4 3.80354 4.1875 3.48211 4.50893C3.16068 4.83036 2.99997 5.23214 2.99997 5.71428V14.2857C2.99997 14.7679 3.16068 15.1964 3.48211 15.5179C3.80354 15.8393 4.23211 16 4.71426 16L15.3482 16C15.7232 16 16.0446 15.8929 16.3125 15.625C16.5803 15.3839 16.7143 15.0893 16.7143 14.7143V7.85714C16.7143 7.50893 16.5803 7.21428 16.3125 6.94643ZM12.7142 13.143C13.661 13.143 14.4285 12.3755 14.4285 11.4288C14.4285 10.482 13.661 9.71447 12.7142 9.71447C11.7674 9.71447 10.9999 10.482 10.9999 11.4288C10.9999 12.3755 11.7674 13.143 12.7142 13.143Z"
18
+ fill={themeValues.singleIconColor}
19
+ />
20
+ <mask
21
+ id="mask0_503_574"
22
+ style="mask-type:alpha"
23
+ maskUnits="userSpaceOnUse"
24
+ x="3"
25
+ y="4"
26
+ width="14"
27
+ height="12"
28
+ >
29
+ <path
30
+ fillRule="evenodd"
31
+ clipRule="evenodd"
32
+ d="M16.3125 6.94643C16.0446 6.70536 15.7232 6.57143 15.3482 6.57143L5.14283 6.57143C5.0089 6.57143 4.90176 6.54464 4.8214 6.46429C4.74104 6.38393 4.71426 6.27678 4.71426 6.14286C4.71426 6.03571 4.74104 5.92857 4.8214 5.84821C4.90176 5.76786 5.0089 5.71428 5.14283 5.71428L15.4285 5.71428C15.5357 5.71428 15.6428 5.6875 15.7232 5.60714C15.8035 5.52678 15.8571 5.41964 15.8571 5.28571C15.8571 4.9375 15.7232 4.64286 15.4821 4.375C15.2143 4.13393 14.9196 4 14.5714 4L4.71426 4C4.23211 4 3.80354 4.1875 3.48211 4.50893C3.16068 4.83036 2.99997 5.23214 2.99997 5.71428V14.2857C2.99997 14.7679 3.16068 15.1964 3.48211 15.5179C3.80354 15.8393 4.23211 16 4.71426 16L15.3482 16C15.7232 16 16.0446 15.8929 16.3125 15.625C16.5803 15.3839 16.7143 15.0893 16.7143 14.7143V7.85714C16.7143 7.50893 16.5803 7.21428 16.3125 6.94643ZM12.7142 13.143C13.661 13.143 14.4285 12.3755 14.4285 11.4288C14.4285 10.482 13.661 9.71447 12.7142 9.71447C11.7674 9.71447 10.9999 10.482 10.9999 11.4288C10.9999 12.3755 11.7674 13.143 12.7142 13.143Z"
33
+ fill="white"
34
+ />
35
+ </mask>
36
+ <g mask="url(#mask0_503_574)">
37
+ <rect width="20" height="20" fill={themeValues.singleIconColor} />
38
+ </g>
39
+ </svg>
40
+ );
41
+ };
42
+
43
+ export default themeComponent(
44
+ WalletIconSmall,
45
+ "Icons",
46
+ fallbackValues,
47
+ "primary"
48
+ );
@@ -9,6 +9,7 @@ import PaymentsIconSmall from "./PaymentsIconSmall";
9
9
  import PaymentMethodAddIcon from "./PaymentMethodAddIcon";
10
10
  import ProfileIconSmall from "./ProfileIconSmall";
11
11
  import SettingsIconSmall from "./SettingsIconSmall";
12
+ import WalletIconSmall from "./WalletIconSmall";
12
13
  import ChevronIcon from "./ChevronIcon";
13
14
  import PropertiesAddIcon from "./PropertiesAddIcon";
14
15
  import PropertiesIconSmall from "./PropertiesIconSmall";
@@ -69,6 +70,7 @@ export {
69
70
  PaymentMethodAddIcon,
70
71
  ProfileIconSmall,
71
72
  SettingsIconSmall,
73
+ WalletIconSmall,
72
74
  ChevronIcon,
73
75
  PropertiesAddIcon,
74
76
  PropertiesIconSmall,
@@ -1,4 +1,4 @@
1
- import React, { Fragment, useContext, useRef } from "react";
1
+ import React, { Fragment, useContext } from "react";
2
2
  import { ThemeContext } from "styled-components";
3
3
  import AriaModal from "react-aria-modal";
4
4
  import { WHITE, ATHENS_GREY, SILVER_GREY } from "../../../constants/colors";
@@ -47,14 +47,10 @@ const Modal = ({
47
47
  children
48
48
  }) => {
49
49
  const { isMobile } = useContext(ThemeContext);
50
- const modalContainerRef = useRef(null);
51
50
  return (
52
- <div ref={modalContainerRef}>
51
+ <Fragment>
53
52
  {modalOpen && (
54
53
  <AriaModal
55
- // fallback to resolve Jest unit test errors when tabbable doesn't exist in jsdom https://github.com/focus-trap/focus-trap-react/issues/91
56
- initialFocus={modalContainerRef?.current}
57
- focusTrapOptions={{ delayInitialFocus: false, fallbackFocus: modalContainerRef?.current }}
58
54
  onExit={onExit}
59
55
  getApplicationNode={getApplicationNode}
60
56
  titleText={modalHeaderText}
@@ -192,7 +188,7 @@ const Modal = ({
192
188
  </AriaModal>
193
189
  )}
194
190
  {children}
195
- </div>
191
+ </Fragment>
196
192
  );
197
193
  };
198
194