@thecb/components 8.3.1-beta.8 → 8.3.1

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": "8.3.1-beta.8",
3
+ "version": "8.3.1",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -4,11 +4,9 @@ import { URL_TEST } from "../../../constants/regex_constants";
4
4
  import { InternalLink, ExternalLink } from "../link";
5
5
  import { safeChildren } from "../../../util/general";
6
6
  import ButtonWithAction from "../button-with-action";
7
- import { useMatch } from "react-router-dom";
8
7
 
9
8
  const ButtonWithLink = ({
10
9
  url = "/",
11
- matchesCurrentRoute = false,
12
10
  disabled = false,
13
11
  fileLink = false,
14
12
  extraStyles,
@@ -20,7 +18,6 @@ const ButtonWithLink = ({
20
18
  const ButtonWithLinkWrapper = ({
21
19
  children,
22
20
  url,
23
- matchesCurrentRoute,
24
21
  disabled,
25
22
  newTab,
26
23
  dataQa,
@@ -42,7 +39,6 @@ const ButtonWithLink = ({
42
39
  ) : (
43
40
  <InternalLink
44
41
  to={url}
45
- matchesCurrentRoute={matchesCurrentRoute}
46
42
  tabIndex="-1"
47
43
  dataQa={dataQa}
48
44
  extraStyles={extraStyles}
@@ -1,7 +1,7 @@
1
1
  import React, { forwardRef } from "react";
2
2
  import styled from "styled-components";
3
3
  import { Link } from "react-router-dom";
4
- import { ROYAL_BLUE, INFO_BLUE} from "../../../constants/colors";
4
+ import { ROYAL_BLUE } from "../../../constants/colors";
5
5
  /*
6
6
  The extracting of props and the disabling of the eslint rule is to stop React from complaining about
7
7
  unrecognized DOM attributes.
@@ -24,7 +24,6 @@ export const StyledInternalLink = styled(
24
24
  font-size: ${({ fontSize }) => fontSize};
25
25
  font-family: ${({ fontFamily }) => fontFamily};
26
26
  margin: ${({ margin }) => margin};
27
- background-color: ${({ matchesCurrentRoute }) => matchesCurrentRoute ? INFO_BLUE : 'transparent'};
28
27
 
29
28
  &:hover {
30
29
  color: ${({ hoverColor }) => hoverColor};
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  SAPPHIRE_BLUE,
3
3
  PEACOCK_BLUE,
4
- MATISSE_BLUE,
4
+ MATISSE_BLUE
5
5
  } from "../../../constants/colors";
6
6
 
7
7
  const fontFamily = {
8
8
  primary: "Public Sans",
9
- secondary: "Open Sans",
9
+ secondary: "Open Sans"
10
10
  };
11
11
 
12
12
  const hoverColor = SAPPHIRE_BLUE;
@@ -17,5 +17,5 @@ export const fallbackValues = {
17
17
  fontFamily,
18
18
  hoverColor,
19
19
  activeColor,
20
- externalLinkColor,
20
+ externalLinkColor
21
21
  };
@@ -0,0 +1,127 @@
1
+ type Color = string;
2
+
3
+ type ColorSet = {
4
+ background: Color;
5
+ border: Color;
6
+ iconBackground: Color;
7
+ iconFill: Color;
8
+ };
9
+
10
+ export const BLACK: Color;
11
+ export const TRANSPARENT: Color;
12
+
13
+ // WHITE
14
+ export const WHITE: Color;
15
+ export const SOLITUDE_WHITE: Color;
16
+ export const SEASHELL_WHITE: Color;
17
+ export const ALABASTER_WHITE: Color;
18
+ export const AQUA_HAZE_WHITE: Color;
19
+ export const BLEACH_WHITE: Color;
20
+ export const CATSKILL_WHITE: Color;
21
+ export const HALF_COLONIAL_WHITE: Color;
22
+
23
+ // GREY
24
+ export const ATHENS_GREY: Color;
25
+ export const ALTO_GREY: Color;
26
+ export const SILVER_GREY: Color;
27
+ export const PEWTER_GREY: Color;
28
+ export const ASH_GREY: Color;
29
+ export const IRON_GREY: Color;
30
+ export const GHOST_GREY: Color;
31
+ export const DUSTY_GREY: Color;
32
+ export const REGENT_GREY: Color;
33
+ export const STORM_GREY: Color;
34
+ export const TROUT_GREY: Color;
35
+ export const MINESHAFT_GREY: Color;
36
+ export const SOOT_GREY: Color;
37
+ export const FIREFLY_GREY: Color;
38
+ export const BRIGHT_GREY: Color;
39
+ export const CHARADE_GREY: Color;
40
+ export const GRECIAN_GREY: Color;
41
+ export const BLACK_SQUEEZE: Color;
42
+ export const GREY_CHATEAU: Color;
43
+ export const COOL_GREY_05: Color;
44
+
45
+ // BLUE
46
+ export const CLOUDBURST_BLUE: Color;
47
+ export const ZODIAC_BLUE: Color;
48
+ export const CONGRESS_BLUE: Color;
49
+ export const SCIENCE_BLUE: Color;
50
+ export const MARINER_BLUE: Color;
51
+ export const CURIOUS_BLUE: Color;
52
+ export const SELAGO_BLUE: Color;
53
+ export const ONAHAU_BLUE: Color;
54
+ export const PICKLED_BLUE: Color;
55
+ export const CERULEAN_BLUE: Color;
56
+ export const FOAM_BLUE: Color;
57
+ export const CELLO_BLUE: Color;
58
+ export const BOSTON_BLUE: Color;
59
+ export const INFO_BLUE: Color;
60
+ export const CORNFLOWER_BLUE: Color;
61
+ export const HOVER_LIGHT_BLUE: Color;
62
+ export const MATISSE_BLUE: Color;
63
+ export const ROYAL_BLUE: Color;
64
+ export const ROYAL_BLUE_VIVID: Color;
65
+ export const ASTRAL_BLUE: Color;
66
+ export const SAPPHIRE_BLUE: Color;
67
+ export const PEACOCK_BLUE: Color;
68
+
69
+ // GREEN
70
+ export const FOREST_GREEN: Color;
71
+ export const MEADOW_GREEN: Color;
72
+ export const POLAR_GREEN: Color;
73
+ export const ICE_GREEN: Color;
74
+ export const HAZE_GREEN: Color;
75
+ export const EMERALD_GREEN: Color;
76
+ export const HINT_GREEN: Color;
77
+ export const SEA_GREEN: Color;
78
+
79
+ // YELLOW
80
+ export const SELECTIVE_YELLOW: Color;
81
+ export const MUSTARD_YELLOW: Color;
82
+ export const FIRE_YELLOW: Color;
83
+
84
+ // ORANGE
85
+ export const CARROT_ORANGE: Color;
86
+ export const ZEST_ORANGE: Color;
87
+ export const APRICOT_ORANGE: Color;
88
+
89
+ // RED
90
+ export const RED: Color;
91
+ export const CRIMSON_RED: Color;
92
+ export const THUNDERBIRD_RED: Color;
93
+ export const RAZZMATAZZ_RED: Color;
94
+ export const RASPBERRY: Color;
95
+ export const FANTASY_RED: Color;
96
+ export const COSMOS_RED: Color;
97
+ export const BLUSH_RED: Color;
98
+
99
+ export const ERROR_COLOR: Color;
100
+
101
+ export const ALERT_COLORS: {
102
+ warn: ColorSet;
103
+ info: ColorSet;
104
+ error: ColorSet;
105
+ success: ColorSet;
106
+ text: Color;
107
+ link: Color;
108
+ };
109
+
110
+ export const PILL_COLORS: {
111
+ danger: {
112
+ background: Color;
113
+ text: Color;
114
+ };
115
+ neutral: {
116
+ background: Color;
117
+ text: Color;
118
+ };
119
+ success: {
120
+ background: Color;
121
+ text: Color;
122
+ };
123
+ warning: {
124
+ background: Color;
125
+ text: Color;
126
+ };
127
+ };
@@ -0,0 +1,3 @@
1
+ import * as colors from "./colors";
2
+
3
+ export { colors };
package/src/index.d.ts CHANGED
@@ -1,2 +1,4 @@
1
+ import * as constants from "./constants";
1
2
  export * from "./components";
2
3
  export * from "./types/common";
4
+ export { constants };