@thecb/components 11.10.4-beta.2 → 11.10.5

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": "11.10.4-beta.2",
3
+ "version": "11.10.5",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -50,8 +50,8 @@ const FormattedBankAccount = ({
50
50
  <Text
51
51
  variant="p"
52
52
  color={themeValues.autopayTextColor}
53
- extraStyles={`font-style: italic;`}
54
- >{`Autopay Enabled`}</Text>
53
+ extraStyles={`font-style: italic; font-size: .75rem;`}
54
+ >{`Autopay On`}</Text>
55
55
  )}
56
56
  </Stack>
57
57
  </BankItemWrapper>
@@ -1,7 +1,7 @@
1
- import { CHARADE_GREY, REGENT_GREY } from "../../../constants/colors";
1
+ import { CHARADE_GREY, SEA_GREEN } from "../../../constants/colors";
2
2
 
3
3
  const textColor = `${CHARADE_GREY}`;
4
- const autopayTextColor = `${REGENT_GREY}`;
4
+ const autopayTextColor = `${SEA_GREEN}`;
5
5
 
6
6
  export const fallbackValues = {
7
7
  textColor,
@@ -55,8 +55,8 @@ const FormattedCreditCard = ({
55
55
  <Text
56
56
  variant="p"
57
57
  color={themeValues.autopayTextColor}
58
- extraStyles={`font-style: italic;`}
59
- >{`Autopay Enabled`}</Text>
58
+ extraStyles={`font-style: italic; font-size: .75rem;`}
59
+ >{`Autopay On`}</Text>
60
60
  )}
61
61
  </Stack>
62
62
  </CreditCardWrapper>
@@ -1,7 +1,7 @@
1
- import { CHARADE_GREY, REGENT_GREY } from "../../../constants/colors";
1
+ import { CHARADE_GREY, SEA_GREEN } from "../../../constants/colors";
2
2
 
3
3
  const textColor = `${CHARADE_GREY}`;
4
- const autopayTextColor = `${REGENT_GREY}`;
4
+ const autopayTextColor = `${SEA_GREEN}`;
5
5
 
6
6
  export const fallbackValues = {
7
7
  textColor,
@@ -23,7 +23,6 @@ const EditableList = ({
23
23
  titleWeight = "400",
24
24
  canAdd = true,
25
25
  addItem,
26
- addItemDestination,
27
26
  removeItem,
28
27
  editItem,
29
28
  itemName,
@@ -169,8 +168,6 @@ const EditableList = ({
169
168
  <Box padding={items.length === 0 ? "0" : "1rem 0 0"}>
170
169
  <Placeholder
171
170
  text={addText}
172
- isLink={!!addItemDestination}
173
- destination={addItemDestination}
174
171
  action={addItem}
175
172
  dataQa={"Add " + qaPrefix}
176
173
  aria-label={addText}
@@ -54,7 +54,7 @@ const TermsAndConditionsModal = ({
54
54
  weight={themeValues.fontWeight}
55
55
  hoverStyles={themeValues.modalLinkHoverFocus}
56
56
  textDecoration={themeValues.modalLinkTextDecoration}
57
- extraStyles={`display: inline-block; width: fit-content; cursor: pointer`}
57
+ extraStyles={`display: inline-block; width: fit-content; cursor: pointer; min-height: 24px; line-height: 24px;`}
58
58
  role="button" // This should always be a "button" since it opens a modal
59
59
  className="modal-trigger"
60
60
  >
@@ -0,0 +1,110 @@
1
+ import React from "react";
2
+ import TermsAndConditionsModal from "./TermsAndConditionsModal";
3
+
4
+ const TermsContent = () => (
5
+ <p>
6
+ By enrolling, you agree to the automatic payment terms. Payments will be
7
+ processed on the first of each month using your selected payment method. You
8
+ may cancel at any time by contacting support. See our{" "}
9
+ <a href="#">Privacy Policy</a> for more details.
10
+ </p>
11
+ );
12
+
13
+ const meta = {
14
+ title: "Molecules/TermsAndConditionsModal",
15
+ component: TermsAndConditionsModal,
16
+ parameters: {
17
+ layout: "centered"
18
+ },
19
+ tags: ["!autodocs"],
20
+ args: {
21
+ link: "Terms and Conditions",
22
+ title: "Terms and Conditions",
23
+ terms: <TermsContent />,
24
+ isOpen: false,
25
+ linkVariant: "p",
26
+ initialFocusSelector: "[name='Cancel']"
27
+ },
28
+ argTypes: {
29
+ link: {
30
+ description: "Text displayed for the modal trigger link",
31
+ table: {
32
+ type: { summary: "string" },
33
+ defaultValue: { summary: "Terms and Conditions" }
34
+ }
35
+ },
36
+ title: {
37
+ description: "Title displayed in the modal header",
38
+ table: {
39
+ type: { summary: "string" },
40
+ defaultValue: { summary: "Terms & Conditions" }
41
+ }
42
+ },
43
+ isOpen: {
44
+ description: "Whether the modal is currently open",
45
+ table: {
46
+ type: { summary: "boolean" },
47
+ defaultValue: { summary: false }
48
+ }
49
+ },
50
+ acceptText: {
51
+ description:
52
+ "Text for the accept button. If omitted, only a close button is shown.",
53
+ table: {
54
+ type: { summary: "string" },
55
+ defaultValue: { summary: undefined }
56
+ }
57
+ },
58
+ linkVariant: {
59
+ description: "Text size variant for the trigger link",
60
+ control: "select",
61
+ options: ["p", "pL", "pS", "pXS", "pXXS", "pXL"],
62
+ table: {
63
+ type: { summary: "string" },
64
+ defaultValue: { summary: "p" }
65
+ }
66
+ },
67
+ initialFocusSelector: {
68
+ description: "CSS selector for the element that receives initial focus",
69
+ table: {
70
+ type: { summary: "string" },
71
+ defaultValue: { summary: "" }
72
+ }
73
+ }
74
+ }
75
+ };
76
+
77
+ export default meta;
78
+
79
+ export const Default = {};
80
+
81
+ export const SmallVariant = {
82
+ args: {
83
+ linkVariant: "pS"
84
+ }
85
+ };
86
+
87
+ export const ExtraSmallVariant = {
88
+ args: {
89
+ linkVariant: "pXS"
90
+ }
91
+ };
92
+
93
+ export const LargeVariant = {
94
+ args: {
95
+ linkVariant: "pL"
96
+ }
97
+ };
98
+
99
+ export const WithAcceptButton = {
100
+ args: {
101
+ acceptText: "I Accept"
102
+ }
103
+ };
104
+
105
+ export const CustomLinkText = {
106
+ args: {
107
+ link: "Learn More",
108
+ linkVariant: "pS"
109
+ }
110
+ };
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { createFormat } from "formatted-input";
3
3
  import Text from "../components/atoms/text";
4
- import { ASH_GREY, FIRE_YELLOW } from "../constants/colors";
4
+ import { ASH_GREY, FIRE_YELLOW, STORM_GREY } from "../constants/colors";
5
5
  export const formatDelimiter = "_";
6
6
 
7
7
  export const phoneFormats = [
@@ -101,7 +101,8 @@ export const renderCardStatus = (
101
101
  <Text
102
102
  as={as}
103
103
  variant="pXS"
104
- color={ASH_GREY}
104
+ fontSize=".75rem"
105
+ color={STORM_GREY}
105
106
  extraStyles={`text-align: ${textAlign}; margin: ${textMargin};`}
106
107
  >
107
108
  Exp Date {expireDate}
@@ -112,6 +113,7 @@ export const renderCardStatus = (
112
113
  <Text
113
114
  as={as}
114
115
  variant="pXS"
116
+ fontSize=".75rem"
115
117
  color={FIRE_YELLOW}
116
118
  extraStyles={`text-align: ${textAlign}; margin: ${textMargin};`}
117
119
  >
@@ -123,7 +125,8 @@ export const renderCardStatus = (
123
125
  <Text
124
126
  as={as}
125
127
  variant="pXS"
126
- color={ASH_GREY}
128
+ fontSize=".75rem"
129
+ color={STORM_GREY}
127
130
  extraStyles={`text-align: ${textAlign}; margin: ${textMargin};`}
128
131
  >
129
132
  Expired