@thecb/components 11.6.5-beta.1 → 11.6.6-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": "11.6.5-beta.1",
3
+ "version": "11.6.6-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",
Binary file
@@ -1,8 +1,10 @@
1
1
  import {
2
2
  APRICOT_ORANGE,
3
+ INFO_BLUE,
3
4
  BLUSH_RED,
4
5
  HINT_GREEN,
5
6
  ZEST_ORANGE,
7
+ MATISSE_BLUE,
6
8
  RAZZMATAZZ_RED,
7
9
  EMERALD_GREEN,
8
10
  MUSTARD_YELLOW,
@@ -14,20 +16,18 @@ import {
14
16
  THUNDERBIRD_RED,
15
17
  HAZE_GREEN,
16
18
  ZODIAC_BLUE,
17
- SCIENCE_BLUE,
18
- LUCKY_POINT,
19
- HAWKES_BLUE
19
+ SCIENCE_BLUE
20
20
  } from "../../../constants/colors";
21
21
 
22
22
  const background = {
23
- info: `${HAWKES_BLUE}`,
23
+ info: `${INFO_BLUE}`,
24
24
  warn: `${APRICOT_ORANGE}`,
25
25
  error: `${BLUSH_RED}`,
26
26
  success: `${HINT_GREEN}`
27
27
  };
28
28
 
29
29
  const border = {
30
- info: `${LUCKY_POINT}`,
30
+ info: `${MATISSE_BLUE}`,
31
31
  warn: `${ZEST_ORANGE}`,
32
32
  error: `${RAZZMATAZZ_RED}`,
33
33
  success: `${EMERALD_GREEN}`
@@ -7,13 +7,11 @@ const {
7
7
  SAPPHIRE_BLUE,
8
8
  PEACOCK_BLUE,
9
9
  MANATEE_GREY,
10
- LUCKY_POINT,
10
+ MATISSE_BLUE,
11
11
  HINT_GREEN,
12
12
  SEA_GREEN,
13
13
  RASPBERRY,
14
- ERROR_COLOR,
15
- LUCKY_POINT_DARK,
16
- HAWKES_BLUE
14
+ ERROR_COLOR
17
15
  } = colors;
18
16
 
19
17
  const { LINK_TEXT_DECORATION } = styleConstants;
@@ -88,13 +86,13 @@ const padding = {
88
86
 
89
87
  const color = {
90
88
  primary: WHITE,
91
- secondary: LUCKY_POINT,
92
- back: LUCKY_POINT,
89
+ secondary: MATISSE_BLUE,
90
+ back: MATISSE_BLUE,
93
91
  smallPrimary: WHITE,
94
- smallSecondary: LUCKY_POINT,
95
- smallGhost: LUCKY_POINT,
96
- ghost: LUCKY_POINT,
97
- tertiary: LUCKY_POINT,
92
+ smallSecondary: MATISSE_BLUE,
93
+ smallGhost: MATISSE_BLUE,
94
+ ghost: MATISSE_BLUE,
95
+ tertiary: MATISSE_BLUE,
98
96
  danger: WHITE,
99
97
  dangerSecondary: ERROR_COLOR,
100
98
  whitePrimary: WHITE,
@@ -189,10 +187,10 @@ const textDecoration = {
189
187
  };
190
188
 
191
189
  const backgroundColor = {
192
- primary: LUCKY_POINT,
190
+ primary: MATISSE_BLUE,
193
191
  secondary: TRANSPARENT,
194
192
  back: TRANSPARENT,
195
- smallPrimary: LUCKY_POINT,
193
+ smallPrimary: MATISSE_BLUE,
196
194
  smallSecondary: TRANSPARENT,
197
195
  smallGhost: TRANSPARENT,
198
196
  ghost: TRANSPARENT,
@@ -206,11 +204,11 @@ const backgroundColor = {
206
204
  };
207
205
 
208
206
  const border = {
209
- primary: "2px solid " + LUCKY_POINT,
210
- secondary: "2px solid " + LUCKY_POINT,
211
- back: "2px solid " + LUCKY_POINT,
212
- smallPrimary: "2px solid " + LUCKY_POINT,
213
- smallSecondary: "2px solid " + LUCKY_POINT,
207
+ primary: "2px solid " + MATISSE_BLUE,
208
+ secondary: "2px solid " + MATISSE_BLUE,
209
+ back: "2px solid " + MATISSE_BLUE,
210
+ smallPrimary: "2px solid " + MATISSE_BLUE,
211
+ smallSecondary: "2px solid " + MATISSE_BLUE,
214
212
  smallGhost: "none",
215
213
  ghost: "none",
216
214
  tertiary: "none",
@@ -223,11 +221,11 @@ const border = {
223
221
  };
224
222
 
225
223
  const hoverBackgroundColor = {
226
- primary: LUCKY_POINT_DARK,
227
- secondary: HAWKES_BLUE,
224
+ primary: SAPPHIRE_BLUE,
225
+ secondary: "#DBEAF0",
228
226
  back: TRANSPARENT,
229
- smallPrimary: LUCKY_POINT_DARK,
230
- smallSecondary: HAWKES_BLUE,
227
+ smallPrimary: SAPPHIRE_BLUE,
228
+ smallSecondary: "#DBEAF0",
231
229
  smallGhost: TRANSPARENT,
232
230
  ghost: TRANSPARENT,
233
231
  tertiary: TRANSPARENT,
@@ -240,11 +238,11 @@ const hoverBackgroundColor = {
240
238
  };
241
239
 
242
240
  const hoverBorderColor = {
243
- primary: LUCKY_POINT_DARK,
244
- secondary: LUCKY_POINT,
241
+ primary: SAPPHIRE_BLUE,
242
+ secondary: MATISSE_BLUE,
245
243
  back: "#DCEAF1",
246
- smallPrimary: LUCKY_POINT_DARK,
247
- smallSecondary: LUCKY_POINT,
244
+ smallPrimary: SAPPHIRE_BLUE,
245
+ smallSecondary: MATISSE_BLUE,
248
246
  smallGhost: TRANSPARENT,
249
247
  ghost: TRANSPARENT,
250
248
  tertiary: TRANSPARENT,
@@ -258,13 +256,13 @@ const hoverBorderColor = {
258
256
 
259
257
  const hoverColor = {
260
258
  primary: WHITE,
261
- secondary: LUCKY_POINT,
262
- back: LUCKY_POINT,
259
+ secondary: SAPPHIRE_BLUE,
260
+ back: SAPPHIRE_BLUE,
263
261
  smallPrimary: WHITE,
264
- smallSecondary: LUCKY_POINT,
265
- smallGhost: LUCKY_POINT,
266
- ghost: LUCKY_POINT,
267
- tertiary: LUCKY_POINT,
262
+ smallSecondary: SAPPHIRE_BLUE,
263
+ smallGhost: SAPPHIRE_BLUE,
264
+ ghost: SAPPHIRE_BLUE,
265
+ tertiary: SAPPHIRE_BLUE,
268
266
  danger: WHITE,
269
267
  dangerSecondary: "#B10541",
270
268
  whitePrimary: WHITE,
@@ -274,11 +272,11 @@ const hoverColor = {
274
272
  };
275
273
 
276
274
  const activeBackgroundColor = {
277
- primary: LUCKY_POINT_DARK,
278
- secondary: adjustHexColor(HAWKES_BLUE, 10, "darken"),
275
+ primary: PEACOCK_BLUE,
276
+ secondary: "#B8D5E1",
279
277
  back: TRANSPARENT,
280
- smallPrimary: LUCKY_POINT_DARK,
281
- smallSecondary: adjustHexColor(HAWKES_BLUE, 10, "darken"),
278
+ smallPrimary: PEACOCK_BLUE,
279
+ smallSecondary: "#B8D5E1",
282
280
  smallGhost: TRANSPARENT,
283
281
  ghost: TRANSPARENT,
284
282
  tertiary: TRANSPARENT,
@@ -291,11 +289,11 @@ const activeBackgroundColor = {
291
289
  };
292
290
 
293
291
  const activeBorderColor = {
294
- primary: adjustHexColor(LUCKY_POINT_DARK, 10, "darken"),
295
- secondary: LUCKY_POINT,
292
+ primary: PEACOCK_BLUE,
293
+ secondary: MATISSE_BLUE,
296
294
  back: PEACOCK_BLUE,
297
- smallPrimary: adjustHexColor(LUCKY_POINT_DARK, 10, "darken"),
298
- smallSecondary: LUCKY_POINT,
295
+ smallPrimary: PEACOCK_BLUE,
296
+ smallSecondary: MATISSE_BLUE,
299
297
  smallGhost: TRANSPARENT,
300
298
  ghost: TRANSPARENT,
301
299
  tertiary: TRANSPARENT,
@@ -309,7 +307,7 @@ const activeBorderColor = {
309
307
 
310
308
  const activeColor = {
311
309
  primary: WHITE,
312
- secondary: LUCKY_POINT,
310
+ secondary: MATISSE_BLUE,
313
311
  back: PEACOCK_BLUE,
314
312
  smallPrimary: WHITE,
315
313
  smallSecondary: PEACOCK_BLUE,
@@ -1,12 +1,12 @@
1
1
  import {
2
- HAWKES_BLUE,
3
- LUCKY_POINT,
4
- LUCKY_POINT_DARK
2
+ HOVER_LIGHT_BLUE,
3
+ MATISSE_BLUE,
4
+ MATISSE_BLUE_DARK
5
5
  } from "../../../constants/colors";
6
6
 
7
- const selectedColor = `${LUCKY_POINT}`;
8
- const hoverColor = `${HAWKES_BLUE}`;
9
- const focusColor = `${LUCKY_POINT_DARK}`;
7
+ const selectedColor = `${MATISSE_BLUE}`;
8
+ const hoverColor = `${HOVER_LIGHT_BLUE}`;
9
+ const focusColor = `${MATISSE_BLUE_DARK}`;
10
10
 
11
11
  export const fallbackValues = {
12
12
  selectedColor,
@@ -2,7 +2,7 @@ import styled from "styled-components";
2
2
  import {
3
3
  GHOST_GREY,
4
4
  ERROR_COLOR,
5
- LUCKY_POINT
5
+ MATISSE_BLUE
6
6
  } from "../../../constants/colors";
7
7
  import { FONT_WEIGHT_REGULAR } from "../../../constants/style_constants";
8
8
 
@@ -41,7 +41,7 @@ export const SelectField = styled.select`
41
41
  box-shadow: none;
42
42
 
43
43
  &:focus {
44
- border: 1px solid ${LUCKY_POINT};
44
+ border: 1px solid ${MATISSE_BLUE};
45
45
  }
46
46
  `;
47
47
 
@@ -6,14 +6,11 @@ import {
6
6
  MINESHAFT_GREY,
7
7
  DUSTY_GREY,
8
8
  GREY_CHATEAU,
9
- ATHENS_GREY,
10
- LUCKY_POINT,
11
- LUCKY_POINT_DARK,
12
- HAWKES_BLUE
9
+ ATHENS_GREY
13
10
  } from "../../../constants/colors";
14
11
  import { FONT_WEIGHT_REGULAR } from "../../../constants/style_constants";
15
12
 
16
- const linkColor = { default: `${LUCKY_POINT}`, disabled: `${LUCKY_POINT}` };
13
+ const linkColor = { default: `${MATISSE_BLUE}`, disabled: `${MATISSE_BLUE}` };
17
14
  const formBackgroundColor = {
18
15
  default: `${WHITE}`,
19
16
  disabled: `${WHITE}`,
@@ -36,7 +33,7 @@ const fontWeight = {
36
33
  disabled: `${FONT_WEIGHT_REGULAR}`
37
34
  };
38
35
  const hoverFocusStyles = {
39
- default: `color: ${LUCKY_POINT_DARK}; outline: none; text-decoration: underline; `,
36
+ default: `color: #0E506D; outline: none; text-decoration: underline; `,
40
37
  disabled: `color: #6D717E;`
41
38
  };
42
39
 
@@ -131,7 +131,7 @@ const PeriscopeFailedIcon = () => {
131
131
  <g transform="translate(132 195)">
132
132
  <g transform="translate(288 64)">
133
133
  <path
134
- fill="#281978"
134
+ fill="#15749D"
135
135
  fillOpacity="0.3"
136
136
  d="M302.247 310.746c36.612 0 66.292 6.549 66.292 14.627S338.86 340 302.247 340c-36.613 0-66.292-6.55-66.292-14.627 0-8.078 29.68-14.627 66.292-14.627zM65.904 208.318c6.071 0 11.057 4.655 11.608 10.6a6.983 6.983 0 014.09-1.321c3.885 0 7.034 3.159 7.034 7.055 0 3.818-3.022 6.926-6.798 7.051l-.237.004H49.756c-4.548 0-8.234-3.696-8.234-8.256 0-4.56 3.686-8.257 8.234-8.257 1.848 0 3.549.618 4.923 1.65 1.378-4.919 5.88-8.526 11.225-8.526zm195.894-57.546c16.134 0 29.213 13.097 29.213 29.254 0 16.157-13.08 29.254-29.213 29.254-16.134 0-29.214-13.097-29.214-29.254 0-16.157 13.08-29.254 29.214-29.254zm80.899 0c16.134 0 29.213 13.097 29.213 29.254 0 16.157-13.08 29.254-29.213 29.254-16.135 0-29.214-13.097-29.214-29.254 0-16.157 13.08-29.254 29.214-29.254zm-80.899 22.503c-5.514 0-10.317 3.673-12.173 9.018a3.377 3.377 0 002.077 4.297 3.37 3.37 0 004.29-2.08l.16-.42c1.027-2.474 3.233-4.064 5.646-4.064 2.547 0 4.863 1.771 5.805 4.484l.12.302a3.37 3.37 0 004.17 1.778 3.377 3.377 0 002.077-4.297c-1.855-5.345-6.658-9.018-12.172-9.018zm80.9 0c-5.515 0-10.318 3.673-12.174 9.018a3.377 3.377 0 002.077 4.297 3.37 3.37 0 004.29-2.08l.16-.42c1.027-2.474 3.233-4.064 5.646-4.064 2.547 0 4.863 1.771 5.805 4.484l.12.302a3.37 3.37 0 004.17 1.778 3.377 3.377 0 002.077-4.297c-1.855-5.345-6.659-9.018-12.172-9.018zM519.99 12.426c12.578 0 22.908 9.642 24.048 21.958a14.473 14.473 0 018.471-2.737c8.049 0 14.575 6.544 14.575 14.617 0 7.966-6.358 14.445-14.262 14.612l-.313.003H486.54c-9.42 0-17.057-7.658-17.057-17.106 0-9.446 7.637-17.104 17.057-17.104 3.83 0 7.352 1.281 10.2 3.418 2.855-10.189 12.179-17.66 23.252-17.66zM170.591 0c6.61 0 12.239 4.15 14.476 9.99a6.571 6.571 0 011.792-.252c2.114 0 3.994.996 5.208 2.543a9.767 9.767 0 014.028-.872c5.431 0 9.833 4.414 9.833 9.86 0 5.354-4.254 9.712-9.557 9.858l-.276.004h-42.442c-5.43 0-9.833-4.415-9.833-9.861 0-5.447 4.403-9.861 9.833-9.861.666 0 1.315.068 1.942.194C157.345 4.93 163.386 0 170.59 0z"
137
137
  ></path>
@@ -154,7 +154,7 @@ const PeriscopeFailedIcon = () => {
154
154
  filter="url(#periscope-failed-filter-2)"
155
155
  xlinkHref="#periscope-failed-path-1"
156
156
  ></use>
157
- <use fill="#281978" xlinkHref="#periscope-failed-path-1"></use>
157
+ <use fill="#15749D" xlinkHref="#periscope-failed-path-1"></use>
158
158
  </g>
159
159
  <g transform="translate(0 96.764)">
160
160
  <g>
@@ -31,15 +31,20 @@ const PaymentButtonBar = ({
31
31
  }) => {
32
32
  const { isMobile } = useContext(ThemeContext);
33
33
 
34
+ // cancel URLs are external (back to client system)
35
+ const handleCancel = () => {
36
+ window.location.href = cancelURL;
37
+ };
38
+
34
39
  const backButton =
35
40
  !!cancelURL && !!cancelText ? (
36
- <ButtonWithLink
41
+ <ButtonWithAction
37
42
  text={cancelText}
38
- url={cancelURL}
43
+ action={handleCancel}
39
44
  variant={backButtonVariant}
40
45
  extraStyles={isMobile && "flex-grow: 1"}
41
46
  dataQa={backButtonTestId || cancelText}
42
- aria-labelledby={`${kebabCaseString(cancelText)}-button`}
47
+ aria-label={`${cancelText}, navigate back to previous site`}
43
48
  role="link"
44
49
  />
45
50
  ) : (
@@ -50,7 +55,7 @@ const PaymentButtonBar = ({
50
55
  action={backButtonAction}
51
56
  extraStyles={isMobile && "flex-grow: 1"}
52
57
  dataQa="Back"
53
- aria-labelledby="back-button"
58
+ aria-label={"Back, navigate to previous page"}
54
59
  role="link"
55
60
  />
56
61
  )
@@ -65,7 +65,6 @@ export const ROYAL_BLUE_VIVID: Color;
65
65
  export const ASTRAL_BLUE: Color;
66
66
  export const SAPPHIRE_BLUE: Color;
67
67
  export const PEACOCK_BLUE: Color;
68
- export const HAWKES_BLUE: Color;
69
68
 
70
69
  // GREEN
71
70
  export const FOREST_GREEN: Color;
@@ -97,9 +96,6 @@ export const FANTASY_RED: Color;
97
96
  export const COSMOS_RED: Color;
98
97
  export const BLUSH_RED: Color;
99
98
 
100
- // PURPLE
101
- export const LUCKY_POINT: Color;
102
-
103
99
  export const ERROR_COLOR: Color;
104
100
  export const ERROR_BACKGROUND_COLOR: Color;
105
101
 
@@ -31,7 +31,7 @@ export const AlertInfoIcon = () => (
31
31
  </mask>
32
32
  <use
33
33
  id="background-2"
34
- fill="#281978"
34
+ fill="#15749d"
35
35
  fillRule="nonzero"
36
36
  xlinkHref="#path-1"
37
37
  ></use>