@thecb/components 9.2.0-beta.11 → 9.2.0-beta.13

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": "9.2.0-beta.11",
3
+ "version": "9.2.0-beta.13",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -24,19 +24,21 @@ const RadioButton = ({
24
24
  const buttonBorder = {
25
25
  onFocused: {
26
26
  borderColor: themeValues.activeColor,
27
- boxShadow: `0px 0px 4px 0px ${themeValues.activeColor}`
27
+ outline: `3px solid ${themeValues.activeColor}`,
28
+ outlineOffset: "2px"
28
29
  },
29
30
  offFocused: {
30
31
  borderColor: themeValues.activeColor,
31
- boxShadow: `0px 0px 4px 0px ${themeValues.activeColor}`
32
+ outline: `3px solid ${themeValues.activeColor}`,
33
+ outlineOffset: "2px"
32
34
  },
33
35
  on: {
34
36
  borderColor: themeValues.activeColor,
35
- boxShadow: "0px 0px 0px 0px #FFFFFF"
37
+ outline: "0"
36
38
  },
37
39
  off: {
38
40
  borderColor: themeValues.inactiveColor,
39
- boxShadow: "0px 0px 0px 0px #FFFFFF"
41
+ outline: "0"
40
42
  }
41
43
  };
42
44
 
@@ -97,7 +99,7 @@ const RadioButton = ({
97
99
  borderWidth="1px"
98
100
  borderStyle="solid"
99
101
  borderRadius="12px"
100
- margin="4px 14px 4px 4px"
102
+ margin="6px 14px 6px 6px"
101
103
  height="24px"
102
104
  width="24px"
103
105
  variants={buttonBorder}
@@ -1,7 +1,7 @@
1
- import { MATISSE_BLUE, GREY_CHATEAU } from "../../../../constants/colors";
1
+ import { MATISSE_BLUE, STORM_GREY } from "../../../../constants/colors";
2
2
 
3
3
  const activeColor = `${MATISSE_BLUE}`;
4
- const inactiveColor = `${GREY_CHATEAU}`;
4
+ const inactiveColor = `${STORM_GREY}`;
5
5
 
6
6
  export const fallbackValues = {
7
7
  activeColor,
@@ -12,6 +12,7 @@ import {
12
12
  WHITE
13
13
  } from "../../../constants/colors";
14
14
  import { FONT_WEIGHT_SEMIBOLD } from "../../../constants/style_constants";
15
+ import { generateShadows } from "../../../util/generateShadows";
15
16
 
16
17
  const VARIANTS = {
17
18
  SUCCESS: "success",
@@ -37,7 +38,7 @@ const ToastNotification = ({
37
38
  ? backgroundColor
38
39
  : variant === VARIANTS.SUCCESS
39
40
  ? HINT_GREEN
40
- : variant === "error"
41
+ : variant === VARIANTS.ERROR
41
42
  ? ERROR_BACKGROUND_COLOR
42
43
  : WHITE
43
44
  }
@@ -47,9 +48,7 @@ const ToastNotification = ({
47
48
  tabIndex={toastOpen ? "-1" : "0"}
48
49
  padding="0rem 1rem"
49
50
  borderRadius="4px"
50
- boxShadow="0px 4px 4px rgba(41, 42, 51, 0.15),
51
- 0px 1px 7px rgba(41, 42, 51, 0.2),
52
- 0px 7px 12px rgba(41, 42, 51, 0.15)"
51
+ boxShadow={generateShadows().standard.base}
53
52
  extraStyles={`
54
53
  display: ${toastOpen ? "block" : "none"};
55
54
  position: fixed; bottom: 4rem; left: 4rem;
@@ -58,8 +57,8 @@ const ToastNotification = ({
58
57
  `}
59
58
  >
60
59
  <Cluster align="center" childGap={childGap}>
61
- {variant === "success" && <SuccessfulIconMedium />}
62
- {variant === "error" && <ErroredIcon />}
60
+ {variant === VARIANTS.SUCCESS && <SuccessfulIconMedium />}
61
+ {variant === VARIANTS.ERROR && <ErroredIcon />}
63
62
  <Box padding="1rem 0" maxWidth={maxWidth}>
64
63
  <Paragraph
65
64
  weight={FONT_WEIGHT_SEMIBOLD}
@@ -10,7 +10,7 @@ export interface UseToastResult {
10
10
  toastMessage: string;
11
11
  showToast: ({
12
12
  message,
13
- variant,
13
+ variant
14
14
  }: {
15
15
  message: string;
16
16
  variant: ToastVariants;
@@ -1,6 +1,6 @@
1
1
  enum ToastVariants {
2
2
  ERROR = "error",
3
- SUCCESS = "success",
3
+ SUCCESS = "success"
4
4
  }
5
5
 
6
6
  export default ToastVariants;