@thecb/components 8.3.1-beta.13 → 8.3.1-beta.2

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