@thecb/components 7.9.0 → 7.10.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/dist/index.cjs.js +117 -108
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +117 -108
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/button-with-action/ButtonWithAction.theme.js +96 -101
- package/src/components/atoms/line-item/LineItem.js +1 -15
- package/src/components/atoms/line-item/LineItem.stories.js +0 -9
- package/src/components/molecules/workflow-tile/WorkflowTile.js +35 -14
- package/src/constants/colors.js +0 -6
package/package.json
CHANGED
package/src/.DS_Store
ADDED
|
Binary file
|
|
Binary file
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
PEACOCK_BLUE,
|
|
6
|
-
MATISSE_BLUE,
|
|
7
|
-
RASPBERRY,
|
|
8
|
-
ERROR_COLOR
|
|
9
|
-
} from "../../../constants/colors";
|
|
1
|
+
/*
|
|
2
|
+
For now I'm using string values, eventually shared components library will have its own constants file
|
|
3
|
+
for colors/values that should be used here instead
|
|
4
|
+
*/
|
|
10
5
|
|
|
11
6
|
const padding = {
|
|
12
7
|
primary: "0.75rem 1.5rem",
|
|
@@ -24,18 +19,18 @@ const padding = {
|
|
|
24
19
|
};
|
|
25
20
|
|
|
26
21
|
const color = {
|
|
27
|
-
primary:
|
|
28
|
-
secondary:
|
|
29
|
-
back:
|
|
30
|
-
smallPrimary:
|
|
31
|
-
smallSecondary:
|
|
32
|
-
smallGhost:
|
|
33
|
-
ghost:
|
|
34
|
-
tertiary:
|
|
35
|
-
danger:
|
|
36
|
-
dangerSecondary:
|
|
37
|
-
whiteSecondary:
|
|
38
|
-
whitePrimary:
|
|
22
|
+
primary: "#FFFFFF",
|
|
23
|
+
secondary: "#15749D",
|
|
24
|
+
back: "#15749D",
|
|
25
|
+
smallPrimary: "#FFFFFF",
|
|
26
|
+
smallSecondary: "#15749D",
|
|
27
|
+
smallGhost: "#15749D",
|
|
28
|
+
ghost: "#15749D",
|
|
29
|
+
tertiary: "#15749D",
|
|
30
|
+
danger: "#FFFFFF",
|
|
31
|
+
dangerSecondary: "#D11053",
|
|
32
|
+
whiteSecondary: "#FFFFFF",
|
|
33
|
+
whitePrimary: "#FFFFFF"
|
|
39
34
|
};
|
|
40
35
|
|
|
41
36
|
const fontSizeVariant = {
|
|
@@ -99,123 +94,123 @@ const minWidth = {
|
|
|
99
94
|
};
|
|
100
95
|
|
|
101
96
|
const backgroundColor = {
|
|
102
|
-
primary:
|
|
103
|
-
secondary:
|
|
104
|
-
back:
|
|
105
|
-
smallPrimary:
|
|
106
|
-
smallSecondary:
|
|
107
|
-
smallGhost:
|
|
108
|
-
ghost:
|
|
109
|
-
tertiary:
|
|
110
|
-
danger:
|
|
111
|
-
dangerSecondary:
|
|
112
|
-
whiteSecondary:
|
|
113
|
-
whitePrimary:
|
|
97
|
+
primary: "#15749D",
|
|
98
|
+
secondary: "transparent",
|
|
99
|
+
back: "transparent",
|
|
100
|
+
smallPrimary: "#15749D",
|
|
101
|
+
smallSecondary: "transparent",
|
|
102
|
+
smallGhost: "transparent",
|
|
103
|
+
ghost: "transparent",
|
|
104
|
+
tertiary: "transparent",
|
|
105
|
+
danger: "#ED125F",
|
|
106
|
+
dangerSecondary: "transparent",
|
|
107
|
+
whiteSecondary: "transparent",
|
|
108
|
+
whitePrimary: "transparent"
|
|
114
109
|
};
|
|
115
110
|
|
|
116
111
|
const border = {
|
|
117
|
-
primary: "2px solid "
|
|
118
|
-
secondary: "2px solid "
|
|
119
|
-
back: "2px solid "
|
|
120
|
-
smallPrimary: "2px solid "
|
|
121
|
-
smallSecondary: "2px solid "
|
|
112
|
+
primary: "2px solid #15749D",
|
|
113
|
+
secondary: "2px solid #15749D",
|
|
114
|
+
back: "2px solid #15749D",
|
|
115
|
+
smallPrimary: "2px solid #15749D",
|
|
116
|
+
smallSecondary: "2px solid #15749D",
|
|
122
117
|
smallGhost: "none",
|
|
123
118
|
ghost: "none",
|
|
124
119
|
tertiary: "none",
|
|
125
|
-
danger: "2px solid "
|
|
126
|
-
dangerSecondary: "2px solid "
|
|
127
|
-
whiteSecondary: "2px solid "
|
|
128
|
-
whitePrimary: "2px solid "
|
|
120
|
+
danger: "2px solid #ED125F",
|
|
121
|
+
dangerSecondary: "2px solid #D11053",
|
|
122
|
+
whiteSecondary: "2px solid white",
|
|
123
|
+
whitePrimary: "2px solid transparent"
|
|
129
124
|
};
|
|
130
125
|
|
|
131
126
|
const hoverBackgroundColor = {
|
|
132
|
-
primary:
|
|
127
|
+
primary: "#116285",
|
|
133
128
|
secondary: "#DBEAF0",
|
|
134
|
-
back:
|
|
135
|
-
smallPrimary:
|
|
129
|
+
back: "transparent",
|
|
130
|
+
smallPrimary: "#116285",
|
|
136
131
|
smallSecondary: "#DBEAF0",
|
|
137
|
-
smallGhost:
|
|
138
|
-
ghost:
|
|
139
|
-
tertiary:
|
|
132
|
+
smallGhost: "transparent",
|
|
133
|
+
ghost: "transparent",
|
|
134
|
+
tertiary: "transparent",
|
|
140
135
|
danger: "#BA002C",
|
|
141
|
-
dangerSecondary: "
|
|
142
|
-
whiteSecondary:
|
|
143
|
-
whitePrimary:
|
|
136
|
+
dangerSecondary: "transparent",
|
|
137
|
+
whiteSecondary: "transparent",
|
|
138
|
+
whitePrimary: "transparent"
|
|
144
139
|
};
|
|
145
140
|
|
|
146
141
|
const hoverBorderColor = {
|
|
147
|
-
primary:
|
|
148
|
-
secondary:
|
|
142
|
+
primary: "#116285",
|
|
143
|
+
secondary: "#15749D",
|
|
149
144
|
back: "#DCEAF1",
|
|
150
|
-
smallPrimary:
|
|
151
|
-
smallSecondary:
|
|
152
|
-
smallGhost:
|
|
153
|
-
ghost:
|
|
154
|
-
tertiary:
|
|
145
|
+
smallPrimary: "#116285",
|
|
146
|
+
smallSecondary: "#15749D",
|
|
147
|
+
smallGhost: "transparent",
|
|
148
|
+
ghost: "transparent",
|
|
149
|
+
tertiary: "transparent",
|
|
155
150
|
danger: "#BA002C",
|
|
156
151
|
dangerSecondary: "#B10541",
|
|
157
|
-
whiteSecondary: "2px solid "
|
|
158
|
-
whitePrimary: "2px solid "
|
|
152
|
+
whiteSecondary: "2px solid transparent",
|
|
153
|
+
whitePrimary: "2px solid transparent"
|
|
159
154
|
};
|
|
160
155
|
|
|
161
156
|
const hoverColor = {
|
|
162
|
-
primary:
|
|
163
|
-
secondary:
|
|
164
|
-
back:
|
|
165
|
-
smallPrimary:
|
|
166
|
-
smallSecondary:
|
|
167
|
-
smallGhost:
|
|
168
|
-
ghost:
|
|
169
|
-
tertiary:
|
|
170
|
-
danger:
|
|
157
|
+
primary: "#FFFFFF",
|
|
158
|
+
secondary: "#116285",
|
|
159
|
+
back: "#116285",
|
|
160
|
+
smallPrimary: "#FFFFFF",
|
|
161
|
+
smallSecondary: "#116285",
|
|
162
|
+
smallGhost: "#116285",
|
|
163
|
+
ghost: "#116285",
|
|
164
|
+
tertiary: "#116285",
|
|
165
|
+
danger: "#FFFFFF",
|
|
171
166
|
dangerSecondary: "#B10541",
|
|
172
|
-
whiteSecondary:
|
|
173
|
-
whitePrimary:
|
|
167
|
+
whiteSecondary: "#FFFFFF",
|
|
168
|
+
whitePrimary: "#FFFFFF"
|
|
174
169
|
};
|
|
175
170
|
|
|
176
171
|
const activeBackgroundColor = {
|
|
177
|
-
primary:
|
|
172
|
+
primary: "#0E506D",
|
|
178
173
|
secondary: "#B8D5E1",
|
|
179
|
-
back:
|
|
180
|
-
smallPrimary:
|
|
174
|
+
back: "transparent",
|
|
175
|
+
smallPrimary: "#0E506D",
|
|
181
176
|
smallSecondary: "#B8D5E1",
|
|
182
|
-
smallGhost:
|
|
183
|
-
ghost:
|
|
184
|
-
tertiary:
|
|
177
|
+
smallGhost: "transparent",
|
|
178
|
+
ghost: "transparent",
|
|
179
|
+
tertiary: "transparent",
|
|
185
180
|
danger: "#870000",
|
|
186
|
-
dangerSecondary: "
|
|
187
|
-
whiteSecondary:
|
|
188
|
-
whitePrimary:
|
|
181
|
+
dangerSecondary: "transparent",
|
|
182
|
+
whiteSecondary: "transparent",
|
|
183
|
+
whitePrimary: "transparent"
|
|
189
184
|
};
|
|
190
185
|
|
|
191
186
|
const activeBorderColor = {
|
|
192
|
-
primary:
|
|
193
|
-
secondary:
|
|
194
|
-
back:
|
|
195
|
-
smallPrimary:
|
|
196
|
-
smallSecondary:
|
|
197
|
-
smallGhost:
|
|
198
|
-
ghost:
|
|
199
|
-
tertiary:
|
|
187
|
+
primary: "#0E506D",
|
|
188
|
+
secondary: "#15749D",
|
|
189
|
+
back: "#0E506D",
|
|
190
|
+
smallPrimary: "#0E506D",
|
|
191
|
+
smallSecondary: "#15749D",
|
|
192
|
+
smallGhost: "transparent",
|
|
193
|
+
ghost: "transparent",
|
|
194
|
+
tertiary: "transparent",
|
|
200
195
|
danger: "#870000",
|
|
201
196
|
dangerSecondary: "#910029",
|
|
202
|
-
whiteSecondary: "2px solid "
|
|
203
|
-
whitePrimary: "2px solid "
|
|
197
|
+
whiteSecondary: "2px solid transparent",
|
|
198
|
+
whitePrimary: "2px solid transparent"
|
|
204
199
|
};
|
|
205
200
|
|
|
206
201
|
const activeColor = {
|
|
207
|
-
primary:
|
|
208
|
-
secondary:
|
|
209
|
-
back:
|
|
210
|
-
smallPrimary:
|
|
211
|
-
smallSecondary:
|
|
212
|
-
smallGhost:
|
|
213
|
-
ghost:
|
|
214
|
-
tertiary:
|
|
215
|
-
danger:
|
|
202
|
+
primary: "#FFFFFF",
|
|
203
|
+
secondary: "#15749D",
|
|
204
|
+
back: "#0E506D",
|
|
205
|
+
smallPrimary: "#FFFFFF",
|
|
206
|
+
smallSecondary: "#0E506D",
|
|
207
|
+
smallGhost: "#0E506D",
|
|
208
|
+
ghost: "#0E506D",
|
|
209
|
+
tertiary: "#0E506D",
|
|
210
|
+
danger: "#FFFFFF",
|
|
216
211
|
dangerSecondary: "#910029",
|
|
217
|
-
whiteSecondary:
|
|
218
|
-
whitePrimary:
|
|
212
|
+
whiteSecondary: "#FFFFFF",
|
|
213
|
+
whitePrimary: "#FFFFFF"
|
|
219
214
|
};
|
|
220
215
|
|
|
221
216
|
export const fallbackValues = {
|
|
@@ -4,13 +4,7 @@ import Paragraph from "../paragraph";
|
|
|
4
4
|
import { themeComponent } from "../../../util/themeUtils";
|
|
5
5
|
import { fallbackValues } from "./LineItem.theme";
|
|
6
6
|
|
|
7
|
-
const LineItem = ({
|
|
8
|
-
description,
|
|
9
|
-
subDescription,
|
|
10
|
-
amount,
|
|
11
|
-
themeValues,
|
|
12
|
-
displayQuantity = null
|
|
13
|
-
}) => (
|
|
7
|
+
const LineItem = ({ description, subDescription, amount, themeValues }) => (
|
|
14
8
|
<Cluster nowrap justify="space-between" align="start">
|
|
15
9
|
<Stack childGap="0px">
|
|
16
10
|
<Paragraph
|
|
@@ -23,14 +17,6 @@ const LineItem = ({
|
|
|
23
17
|
{subDescription}
|
|
24
18
|
</Paragraph>
|
|
25
19
|
</Stack>
|
|
26
|
-
{!!displayQuantity && (
|
|
27
|
-
<Paragraph
|
|
28
|
-
variant={themeValues.paragraphVariant}
|
|
29
|
-
weight={themeValues.weightTitle}
|
|
30
|
-
>
|
|
31
|
-
{`x${displayQuantity}`}
|
|
32
|
-
</Paragraph>
|
|
33
|
-
)}
|
|
34
20
|
<Paragraph
|
|
35
21
|
variant={themeValues.paragraphVariant}
|
|
36
22
|
weight="600"
|
|
@@ -17,12 +17,3 @@ export const lineItem = () => (
|
|
|
17
17
|
amount={text("amount", "$4.00", "props")}
|
|
18
18
|
/>
|
|
19
19
|
);
|
|
20
|
-
|
|
21
|
-
export const lineItemWithQuantity = () => (
|
|
22
|
-
<LineItem
|
|
23
|
-
description={text("description", "Foo", "props")}
|
|
24
|
-
subDescription={text("subDescription", "Bar", "props")}
|
|
25
|
-
amount={text("amount", "$4.00", "props")}
|
|
26
|
-
displayQuantity={2}
|
|
27
|
-
/>
|
|
28
|
-
);
|
|
@@ -12,13 +12,16 @@ import {
|
|
|
12
12
|
} from "../../../constants/colors";
|
|
13
13
|
import { FONT_WEIGHT_SEMIBOLD } from "../../../constants/style_constants";
|
|
14
14
|
import ButtonWithLink from "../../atoms/button-with-link";
|
|
15
|
+
import ButtonWithAction from "../../atoms/button-with-action";
|
|
15
16
|
import { Box, Stack } from "../../atoms/layouts";
|
|
16
17
|
const WorkflowTile = ({
|
|
17
18
|
workflowName = "Test Workflow",
|
|
18
19
|
workflowDescription = "Link your benefit plan",
|
|
19
20
|
workflowActionName = "Search",
|
|
20
21
|
slug,
|
|
21
|
-
buttonVariant = "primary"
|
|
22
|
+
buttonVariant = "primary",
|
|
23
|
+
selectWorkflowAction,
|
|
24
|
+
navigate
|
|
22
25
|
}) => (
|
|
23
26
|
<Box
|
|
24
27
|
background={WHITE}
|
|
@@ -48,19 +51,37 @@ const WorkflowTile = ({
|
|
|
48
51
|
borderColor={GRECIAN_GREY}
|
|
49
52
|
borderWidthOverride="2px 0 0 0"
|
|
50
53
|
>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
54
|
+
{selectWorkflowAction ? (
|
|
55
|
+
<ButtonWithAction
|
|
56
|
+
variant={buttonVariant}
|
|
57
|
+
primary={buttonVariant == "primary"}
|
|
58
|
+
primaryBG={MATISSE_BLUE}
|
|
59
|
+
fontWeight={FONT_WEIGHT_SEMIBOLD}
|
|
60
|
+
fontSize={"1.125rem"}
|
|
61
|
+
text={workflowActionName}
|
|
62
|
+
minWidth={"100%"}
|
|
63
|
+
extraStyles={`width: 100%; margin: 0; text-align: center;`}
|
|
64
|
+
dataQa={slug}
|
|
65
|
+
action={() => {
|
|
66
|
+
selectWorkflowAction(slug);
|
|
67
|
+
navigate(`/service/${slug}`);
|
|
68
|
+
}}
|
|
69
|
+
/>
|
|
70
|
+
) : (
|
|
71
|
+
<ButtonWithLink
|
|
72
|
+
variant={buttonVariant}
|
|
73
|
+
primary={buttonVariant == "primary"}
|
|
74
|
+
primaryBG={MATISSE_BLUE}
|
|
75
|
+
fontWeight={FONT_WEIGHT_SEMIBOLD}
|
|
76
|
+
fontSize={"1.125rem"}
|
|
77
|
+
text={workflowActionName}
|
|
78
|
+
minWidth={"100%"}
|
|
79
|
+
url={`/service/${slug}`}
|
|
80
|
+
extraStyles={`width: 100%; margin: 0;`}
|
|
81
|
+
linkExtraStyles={`justify-content: center;`}
|
|
82
|
+
dataQa={slug}
|
|
83
|
+
/>
|
|
84
|
+
)}
|
|
64
85
|
</Box>
|
|
65
86
|
</Stack>
|
|
66
87
|
</Box>
|
package/src/constants/colors.js
CHANGED
|
@@ -54,8 +54,6 @@ const HOVER_LIGHT_BLUE = "#EFFAFF";
|
|
|
54
54
|
const MATISSE_BLUE = "#15749D";
|
|
55
55
|
const ROYAL_BLUE = "#3181E3";
|
|
56
56
|
const ASTRAL_BLUE = "#3176AA";
|
|
57
|
-
const SAPPHIRE_BLUE = "#116285";
|
|
58
|
-
const PEACOCK_BLUE = "#0E506D";
|
|
59
57
|
// GREEN
|
|
60
58
|
const FOREST_GREEN = "#19b03F";
|
|
61
59
|
const MEADOW_GREEN = "#16C98D";
|
|
@@ -78,7 +76,6 @@ const RED = "#FF0000";
|
|
|
78
76
|
const CRIMSON_RED = "#ED1C24";
|
|
79
77
|
const THUNDERBIRD_RED = "#C3191F";
|
|
80
78
|
const RAZZMATAZZ_RED = "#D11053";
|
|
81
|
-
const RASPBERRY = "#ED125F";
|
|
82
79
|
const FANTASY_RED = "#FCF4F4";
|
|
83
80
|
const COSMOS_RED = "#FFD0D3";
|
|
84
81
|
const BLUSH_RED = "#FFF0F5";
|
|
@@ -164,8 +161,6 @@ export {
|
|
|
164
161
|
MATISSE_BLUE,
|
|
165
162
|
ROYAL_BLUE,
|
|
166
163
|
ASTRAL_BLUE,
|
|
167
|
-
SAPPHIRE_BLUE,
|
|
168
|
-
PEACOCK_BLUE,
|
|
169
164
|
FOREST_GREEN,
|
|
170
165
|
MEADOW_GREEN,
|
|
171
166
|
POLAR_GREEN,
|
|
@@ -187,7 +182,6 @@ export {
|
|
|
187
182
|
FANTASY_RED,
|
|
188
183
|
COSMOS_RED,
|
|
189
184
|
BLUSH_RED,
|
|
190
|
-
RASPBERRY,
|
|
191
185
|
ALERT_COLORS,
|
|
192
186
|
ERROR_COLOR
|
|
193
187
|
};
|