@thecb/components 10.4.3-beta.0 → 10.4.3

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": "10.4.3-beta.0",
3
+ "version": "10.4.3",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
 
3
- const IconAdd = () => (
3
+ const IconAdd = ({ strokeWidth = 1 }) => (
4
4
  <svg
5
5
  xmlns="http://www.w3.org/2000/svg"
6
6
  xmlnsXlink="http://www.w3.org/1999/xlink"
@@ -15,7 +15,7 @@ const IconAdd = () => (
15
15
  d="M7.91666623 4.78508747L4.78508747 4.78508747 4.78508747 7.91666623 3.74122788 7.91666623 3.74122788 4.78508747 0.609649123 4.78508747 0.609649123 3.74122788 3.74122788 3.74122788 3.74122788 0.609649123 4.78508747 0.609649123 4.78508747 3.74122788 7.91666623 3.74122788z"
16
16
  ></path>
17
17
  </defs>
18
- <g fill="none" fillRule="evenodd" stroke="none" strokeWidth="1">
18
+ <g fill="none" fillRule="evenodd" stroke="none" strokeWidth={strokeWidth}>
19
19
  <g transform="translate(-407 -563)">
20
20
  <g transform="translate(408 562)">
21
21
  <g transform="translate(0 2)">
@@ -25,7 +25,13 @@ const IconAdd = () => (
25
25
  </mask>
26
26
  <use className="fill" xlinkHref="#path-1"></use>
27
27
  </g>
28
- <circle className="stroke" cx="8.155" cy="8.072" r="8"></circle>
28
+ <circle
29
+ className="stroke"
30
+ strokeWidth={strokeWidth}
31
+ cx="8.155"
32
+ cy="8.072"
33
+ r="8"
34
+ ></circle>
29
35
  </g>
30
36
  </g>
31
37
  </g>
@@ -16,7 +16,7 @@ import {
16
16
  IconAdd,
17
17
  PaymentMethodAddIcon
18
18
  } from "../icons";
19
- import { FONT_WEIGHT_REGULAR } from "../../../constants/style_constants";
19
+ import { FONT_WEIGHT_SEMIBOLD } from "../../../constants/style_constants";
20
20
 
21
21
  const getLargeIcon = iconName => {
22
22
  switch (iconName) {
@@ -123,7 +123,7 @@ const Placeholder = ({
123
123
  stroke: ${
124
124
  variant === "large" ? CHARADE_GREY : themeValues.color
125
125
  };
126
- }`}
126
+ } `}
127
127
  >
128
128
  {variant === "large" ? (
129
129
  <Center intrinsic>
@@ -131,7 +131,7 @@ const Placeholder = ({
131
131
  <Text
132
132
  variant="pS"
133
133
  color={themeValues.color}
134
- weight={FONT_WEIGHT_REGULAR}
134
+ weight={FONT_WEIGHT_SEMIBOLD}
135
135
  extraStyles={`text-align: center;`}
136
136
  >
137
137
  {text}
@@ -140,12 +140,12 @@ const Placeholder = ({
140
140
  ) : (
141
141
  <Cover singleChild minHeight="100%">
142
142
  <Cluster justify="center" align="center">
143
- <IconAdd />
143
+ <IconAdd strokeWidth="2" />
144
144
  <Center intrinsic>
145
145
  <Text
146
146
  variant="pS"
147
147
  color={themeValues.color}
148
- weight={FONT_WEIGHT_REGULAR}
148
+ weight={FONT_WEIGHT_SEMIBOLD}
149
149
  extraStyles={`padding: 0 0 0 8px; text-align: center;`}
150
150
  >
151
151
  {text}
@@ -13,7 +13,8 @@ const groupId = "props";
13
13
 
14
14
  const icons = {
15
15
  accounts: "accounts",
16
- properties: "properties"
16
+ properties: "properties",
17
+ payments: "payments"
17
18
  };
18
19
 
19
20
  const iconLabel = "largeIcon";
@@ -3,6 +3,7 @@ import Modal from "../modal";
3
3
  import Text from "../../atoms/text";
4
4
  import Paragraph from "../../atoms/paragraph";
5
5
  import { Box, Stack, Center } from "../../atoms/layouts";
6
+ import ButtonWithAction from "../../atoms/button-with-action/ButtonWithAction";
6
7
  import { fallbackValues } from "./AccountAndRoutingModal.theme";
7
8
  import { themeComponent } from "../../../util/themeUtils";
8
9
  import { AccountNumberImage, RoutingNumberImage } from "../../atoms/icons";
@@ -18,57 +19,56 @@ const AccountAndRoutingModal = ({
18
19
  imageType,
19
20
  themeValues,
20
21
  dataQa = null
21
- }) => (
22
- <Modal
23
- modalOpen={isOpen}
24
- hideModal={() => toggleOpen(false)}
25
- showModal={() => toggleOpen(true)}
26
- modalHeaderText={title}
27
- dataQa={dataQa}
28
- modalBodyText={
29
- <Box extraStyles="overflow: scroll; max-height: 20rem;">
30
- <Stack>
31
- <Paragraph variant="p">{content}</Paragraph>
32
- {imageType === "Account" ? (
33
- <Center intrinsic>
34
- <AccountNumberImage />
35
- </Center>
36
- ) : imageType === "Routing" ? (
37
- <Center intrinsic>
38
- <RoutingNumberImage />
39
- </Center>
40
- ) : (
41
- <Fragment />
42
- )}
43
- </Stack>
44
- </Box>
45
- }
46
- defaultWrapper={false}
47
- onlyCloseButton={!acceptText}
48
- continueButtonText={acceptText}
49
- continueAction={() => {
50
- toggleAccepted(true);
51
- toggleOpen(false);
52
- }}
53
- initialFocusSelector={"[name='Close']"}
54
- >
55
- <Text
56
- variant="pS"
57
- onClick={() => toggleOpen(true)}
58
- onKeyPress={e => e.key === "Enter" && toggleOpen(true)}
59
- tabIndex="0"
60
- color={themeValues.linkColor}
61
- weight={themeValues.fontWeight}
62
- hoverStyles={themeValues.modalLinkHoverFocus}
63
- textDecoration={themeValues.linkTextDecoration}
64
- extraStyles={`cursor: pointer;`}
65
- role="button"
66
- className="modal-trigger"
22
+ }) => {
23
+ return (
24
+ <Modal
25
+ modalOpen={isOpen}
26
+ hideModal={() => toggleOpen(false)}
27
+ showModal={() => toggleOpen(true)}
28
+ modalHeaderText={title}
29
+ dataQa={dataQa}
30
+ modalBodyText={
31
+ <Box extraStyles="overflow: scroll; max-height: 20rem;">
32
+ <Stack>
33
+ <Paragraph variant="p">{content}</Paragraph>
34
+ {imageType === "Account" ? (
35
+ <Center intrinsic>
36
+ <AccountNumberImage />
37
+ </Center>
38
+ ) : imageType === "Routing" ? (
39
+ <Center intrinsic>
40
+ <RoutingNumberImage />
41
+ </Center>
42
+ ) : (
43
+ <Fragment />
44
+ )}
45
+ </Stack>
46
+ </Box>
47
+ }
48
+ defaultWrapper={false}
49
+ onlyCloseButton={!acceptText}
50
+ continueButtonText={acceptText}
51
+ continueAction={() => {
52
+ toggleAccepted(true);
53
+ toggleOpen(false);
54
+ }}
55
+ initialFocusSelector={"[name='Close']"}
67
56
  >
68
- {link}
69
- </Text>
70
- </Modal>
71
- );
57
+ <ButtonWithAction
58
+ variant="ghost"
59
+ tabIndex="0"
60
+ onClick={() => toggleOpen(true)}
61
+ onKeyPress={e => e.key === "Enter" && toggleOpen(true)}
62
+ extraStyles="min-width: 0; min-height: 0;margin: 0; padding: 0; text-transform: none;"
63
+ text={
64
+ <Text variant="pS" color="inherit">
65
+ {link}
66
+ </Text>
67
+ }
68
+ />
69
+ </Modal>
70
+ );
71
+ };
72
72
 
73
73
  export default themeComponent(
74
74
  AccountAndRoutingModal,