@vygruppen/spor-react 8.3.0 → 9.0.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.
Files changed (67) hide show
  1. package/.turbo/turbo-build.log +10 -12
  2. package/CHANGELOG.md +34 -0
  3. package/dist/{CountryCodeSelect-DYAFPSID.mjs → CountryCodeSelect-OVMXGXPY.mjs} +1 -1
  4. package/dist/{chunk-42ZK3WXN.mjs → chunk-W7IAYOJH.mjs} +1252 -1784
  5. package/dist/index.d.mts +1657 -812
  6. package/dist/index.d.ts +1657 -812
  7. package/dist/index.js +1603 -2073
  8. package/dist/index.mjs +1 -1
  9. package/package.json +1 -1
  10. package/src/breadcrumb/Breadcrumb.tsx +4 -2
  11. package/src/card/Card.tsx +5 -4
  12. package/src/datepicker/DateRangePicker.tsx +1 -0
  13. package/src/input/ChoiceChip.tsx +3 -3
  14. package/src/input/NumericStepper.tsx +7 -49
  15. package/src/input/PasswordInput.tsx +2 -0
  16. package/src/input/PhoneNumberInput.tsx +1 -1
  17. package/src/input/Switch.tsx +4 -7
  18. package/src/loader/ProgressBar.tsx +7 -24
  19. package/src/tab/Tabs.tsx +4 -5
  20. package/src/theme/components/accordion.ts +12 -16
  21. package/src/theme/components/alert-expandable.ts +10 -21
  22. package/src/theme/components/breadcrumb.ts +60 -5
  23. package/src/theme/components/button.ts +40 -75
  24. package/src/theme/components/card-select.ts +14 -56
  25. package/src/theme/components/card.ts +66 -68
  26. package/src/theme/components/checkbox.ts +20 -20
  27. package/src/theme/components/choice-chip.ts +28 -43
  28. package/src/theme/components/close-button.ts +1 -1
  29. package/src/theme/components/datepicker.ts +48 -166
  30. package/src/theme/components/drawer.ts +6 -4
  31. package/src/theme/components/fab.ts +35 -62
  32. package/src/theme/components/index.ts +3 -1
  33. package/src/theme/components/info-select.ts +5 -9
  34. package/src/theme/components/input.ts +17 -32
  35. package/src/theme/components/link.ts +8 -8
  36. package/src/theme/components/listbox.ts +5 -7
  37. package/src/theme/components/media-controller-button.ts +20 -25
  38. package/src/theme/components/modal.ts +8 -6
  39. package/src/theme/components/numeric-stepper.ts +65 -0
  40. package/src/theme/components/popover.ts +7 -8
  41. package/src/theme/components/progress-bar.ts +43 -0
  42. package/src/theme/components/progress-indicator.ts +5 -2
  43. package/src/theme/components/radio.ts +15 -12
  44. package/src/theme/components/select.ts +2 -2
  45. package/src/theme/components/stepper.ts +10 -7
  46. package/src/theme/components/switch.ts +35 -82
  47. package/src/theme/components/table.ts +10 -12
  48. package/src/theme/components/tabs.ts +55 -261
  49. package/src/theme/components/travel-tag.ts +3 -6
  50. package/src/theme/foundations/colors.ts +3 -1
  51. package/src/theme/foundations/fonts.ts +2 -2
  52. package/src/theme/index.ts +9 -6
  53. package/src/theme/utils/accent-utils.ts +54 -0
  54. package/src/theme/utils/base-utils.ts +94 -0
  55. package/src/theme/utils/bg-utils.ts +19 -0
  56. package/src/theme/utils/brand-utils.ts +42 -0
  57. package/src/theme/utils/floating-utils.ts +64 -0
  58. package/src/theme/utils/{focus-util.ts → focus-utils.ts} +1 -1
  59. package/src/theme/utils/ghost-utils.ts +40 -0
  60. package/src/theme/utils/surface-utils.ts +35 -0
  61. package/src/tooltip/Tooltip.tsx +17 -20
  62. package/src/typography/Heading.tsx +7 -2
  63. package/src/util/externals.tsx +0 -1
  64. package/src/theme/utils/background-utils.ts +0 -179
  65. package/src/theme/utils/border-utils.ts +0 -176
  66. package/src/theme/utils/box-shadow-utils.ts +0 -44
  67. package/src/theme/utils/text-utils.ts +0 -60
@@ -1,8 +1,11 @@
1
1
  import { defineStyleConfig } from "@chakra-ui/react";
2
- import { mode } from "@chakra-ui/theme-tools";
3
- import { colors } from "../foundations";
4
- import { getBoxShadowString } from "../utils/box-shadow-utils";
5
- import { focusVisibleStyles } from "../utils/focus-util";
2
+ import { baseBackground, baseBorder, baseText } from "../utils/base-utils";
3
+ import { brandBackground, brandText } from "../utils/brand-utils";
4
+ import { floatingBackground, floatingBorder } from "../utils/floating-utils";
5
+ import { focusVisibleStyles } from "../utils/focus-utils";
6
+ import { ghostBackground } from "../utils/ghost-utils";
7
+ import { surface } from "../utils/surface-utils";
8
+ import { accentBackground, accentText } from "../utils/accent-utils";
6
9
 
7
10
  const config = defineStyleConfig({
8
11
  baseStyle: (props) => ({
@@ -16,111 +19,73 @@ const config = defineStyleConfig({
16
19
  textWrap: "wrap",
17
20
  paddingX: 3,
18
21
  paddingY: 1,
19
- _focus: {
20
- boxShadow: 0,
21
- outline: 0,
22
- },
23
22
  ...focusVisibleStyles(props),
24
23
  _disabled: {
25
24
  cursor: "not-allowed",
25
+ pointerEvents: "none",
26
26
  boxShadow: "none",
27
- backgroundColor: mode("blackAlpha.100", "whiteAlpha.100")(props),
28
- color: mode("blackAlpha.400", "whiteAlpha.400")(props),
29
- },
30
- _hover: {
31
- _disabled: {
32
- background: mode("blackAlpha.100", "whiteAlpha.100")(props),
33
- },
27
+ ...surface("disabled", props),
28
+ ...baseText("disabled", props),
34
29
  },
35
30
  }),
36
31
  variants: {
37
32
  primary: (props) => ({
38
- // FIXME: Update to use a global defined background color for darkMode whenever it is available.
39
- // hardcoded background color as alpha-"hack" below is not feasible for dark mode with solid background color
40
- backgroundColor: mode("pine", "coralGreen")(props),
41
- color: mode("white", "darkTeal")(props),
33
+ ...brandBackground("default", props),
34
+ ...brandText("default", props),
42
35
  _hover: {
43
- backgroundColor: mode("darkTeal", "blueGreen")(props),
36
+ ...brandBackground("hover", props),
44
37
  },
45
38
  _active: {
46
- backgroundColor: mode("greenHaze", "seaMist")(props),
39
+ ...brandBackground("active", props),
47
40
  },
48
41
  }),
49
42
  secondary: (props) => ({
50
- // FIXME: Update to use global defined background color for darkMode whenever it is available instead of alpha
51
- backgroundColor: mode("seaMist", "primaryGreen")(props),
52
- color: mode("darkTeal", "seaMist")(props),
53
- // order is important here for now while we do not have global defined background color for darkMode
43
+ ...accentBackground("default", props),
44
+ ...accentText("default", props),
54
45
  _hover: {
55
- backgroundColor: mode("coralGreen", "greenHaze")(props),
46
+ ...accentBackground("hover", props),
56
47
  },
57
48
  _active: {
58
- backgroundColor: mode("mint", "darkTeal")(props),
59
- boxShadow: `inset 0 0 0 2px ${mode(
60
- colors.greenHaze,
61
- colors.azure,
62
- )(props)}, inset 0 0 0 4px ${mode(
63
- colors.white,
64
- colors.blackAlpha[600],
65
- )(props)}`,
66
- _hover: {
67
- boxShadow: `inset 0 0 0 2px ${mode(
68
- colors.greenHaze,
69
- colors.azure,
70
- )(props)}, inset 0 0 0 4px ${mode(
71
- colors.white,
72
- colors.blackAlpha[600],
73
- )(props)}`,
74
- },
49
+ ...accentBackground("active", props),
75
50
  },
76
51
  }),
77
52
  tertiary: (props) => ({
78
- backgroundColor: "transparent",
79
- color: mode("darkGrey", "white")(props),
80
- boxShadow: `inset 0 0 0 1px ${mode(
81
- colors.blackAlpha[400],
82
- colors.whiteAlpha[400],
83
- )(props)}`,
53
+ ...baseBackground("default", props),
54
+ ...baseText("default", props),
55
+ ...baseBorder("default", props),
84
56
  _hover: {
85
- boxShadow: `inset 0 0 0 2px currentColor`,
57
+ ...baseBorder("hover", props),
86
58
  },
87
59
  _active: {
88
- boxShadow: `inset 0 0 0 1px ${mode(
89
- colors.blackAlpha[400],
90
- colors.whiteAlpha[300],
91
- )(props)}`,
92
- backgroundColor: mode("mint", "whiteAlpha.200")(props),
60
+ ...baseBorder("default", props), // We want a
61
+ ...baseBackground("active", props),
93
62
  },
94
63
  }),
95
64
  ghost: (props) => ({
96
- backgroundColor: "transparent",
97
- color: mode("darkGrey", "white")(props),
65
+ ...ghostBackground("default", props),
66
+ ...baseText("default", props),
98
67
  _hover: {
99
- backgroundColor: mode("seaMist", "whiteAlpha.200")(props),
68
+ ...ghostBackground("hover", props),
100
69
  _disabled: {
101
- color: "blackAlpha.300",
70
+ ...baseText("disabled", props),
102
71
  },
103
72
  },
104
73
  _active: {
105
- backgroundColor: mode("mint", "whiteAlpha.100")(props),
74
+ ...ghostBackground("active", props),
106
75
  },
107
76
  }),
108
77
  floating: (props) => ({
109
- backgroundColor: mode("white", "whiteAlpha.100")(props),
110
- boxShadow: getBoxShadowString({
111
- borderColor: mode("grey.200", "whiteAlpha.400")(props),
112
- baseShadow: "sm",
113
- }),
114
- _active: {
115
- backgroundColor: mode("mint", "whiteAlpha.400")(props),
116
- },
78
+ ...floatingBackground("default", props),
79
+ ...floatingBorder("default", props),
80
+ boxShadow: "sm",
117
81
  _hover: {
118
- backgroundColor: mode("white", "whiteAlpha.200")(props),
119
- boxShadow: getBoxShadowString({
120
- borderColor: mode("grey.300", "white")(props),
121
- baseShadow: "md",
122
- borderWidth: 2,
123
- }),
82
+ ...floatingBackground("hover", props),
83
+ ...floatingBorder("hover", props),
84
+ boxShadow: "md",
85
+ },
86
+ _active: {
87
+ ...floatingBackground("active", props),
88
+ boxShadow: "sm",
124
89
  },
125
90
  }),
126
91
  },
@@ -146,8 +111,8 @@ const config = defineStyleConfig({
146
111
  xs: {
147
112
  minHeight: 5,
148
113
  minWidth: 5,
114
+ paddingY: 0.5,
149
115
  fontSize: "16px",
150
-
151
116
  fontWeight: "normal",
152
117
  },
153
118
  },
@@ -1,13 +1,9 @@
1
1
  import { anatomy } from "@chakra-ui/anatomy";
2
2
  import { createMultiStyleConfigHelpers } from "@chakra-ui/styled-system";
3
- import { mode } from "@chakra-ui/theme-tools";
4
- import {
5
- baseBackground,
6
- floatingBackground,
7
- ghostBackground,
8
- } from "../utils/background-utils";
9
- import { getBoxShadowString } from "../utils/box-shadow-utils";
10
- import { focusVisibleStyles } from "../utils/focus-util";
3
+ import { baseBackground, baseBorder, baseText } from "../utils/base-utils";
4
+ import { floatingBackground, floatingBorder } from "../utils/floating-utils";
5
+ import { focusVisibleStyles } from "../utils/focus-utils";
6
+ import { ghostBackground } from "../utils/ghost-utils";
11
7
 
12
8
  const parts = anatomy("card-select").parts("trigger", "card");
13
9
 
@@ -18,48 +14,31 @@ const config = helpers.defineMultiStyleConfig({
18
14
  appearance: "none",
19
15
  display: "flex",
20
16
  alignItems: "center",
17
+ transitionProperty: "outline",
18
+ transitionDuration: "fast",
21
19
  ...focusVisibleStyles(props),
22
20
  },
23
21
  card: {
24
22
  borderRadius: "sm",
25
23
  boxShadow: "md",
26
24
  padding: 3,
27
- color: mode("darkGrey", "white")(props),
25
+ ...baseText("default", props),
28
26
  ...floatingBackground("default", props),
29
27
  },
30
28
  }),
31
29
  variants: {
32
30
  base: (props) => ({
33
31
  trigger: {
34
- boxShadow: getBoxShadowString({
35
- borderColor: mode("blackAlpha.400", "whiteAlpha.400")(props),
36
- }),
32
+ ...baseBorder("default", props),
37
33
  _hover: {
38
- boxShadow: getBoxShadowString({
39
- borderColor: mode("darkGrey", "white")(props),
40
- borderWidth: 2,
41
- }),
34
+ ...baseBorder("hover", props),
42
35
  },
43
36
  _active: {
44
37
  ...baseBackground("active", props),
45
- boxShadow: getBoxShadowString({
46
- borderColor: mode("darkGrey", "whiteAlpha.400")(props),
47
- borderWidth: 1,
48
- }),
38
+ ...baseBorder("default", props),
49
39
  },
50
40
  _expanded: {
51
41
  ...baseBackground("active", props),
52
- _hover: {
53
- ...baseBackground("active", props),
54
- boxShadow: "none",
55
- },
56
- _active: {
57
- ...baseBackground("active", props),
58
- boxShadow: getBoxShadowString({
59
- borderColor: mode("blackAlpha.400", "whiteAlpha.400")(props),
60
- borderWidth: 1,
61
- }),
62
- },
63
42
  },
64
43
  },
65
44
  }),
@@ -78,41 +57,20 @@ const config = helpers.defineMultiStyleConfig({
78
57
  }),
79
58
  floating: (props) => ({
80
59
  trigger: {
60
+ boxShadow: "sm",
81
61
  ...floatingBackground("default", props),
82
- boxShadow: getBoxShadowString({
83
- borderColor: mode("silver", "whiteAlpha.400")(props),
84
- borderWidth: 1,
85
- baseShadow: "sm",
86
- }),
62
+ ...floatingBorder("default", props),
87
63
  transition: "all .1s ease-out",
88
64
  _hover: {
89
65
  ...floatingBackground("hover", props),
90
- boxShadow: getBoxShadowString({
91
- borderColor: mode("silver", "whiteAlpha.400")(props),
92
- borderWidth: 2,
93
- baseShadow: "sm",
94
- }),
66
+ ...floatingBorder("hover", props),
95
67
  },
96
68
  _active: {
97
69
  ...floatingBackground("active", props),
98
- boxShadow: getBoxShadowString({
99
- borderColor: mode("silver", "whiteAlpha.400")(props),
100
- borderWidth: mode(0, 1)(props),
101
- baseShadow: "sm",
102
- }),
70
+ ...floatingBorder("active", props),
103
71
  },
104
72
  _expanded: {
105
73
  ...floatingBackground("active", props),
106
- _hover: {
107
- boxShadow: getBoxShadowString({
108
- borderColor: "darkGrey",
109
- borderWidth: 3,
110
- }),
111
- },
112
- _active: {
113
- ...floatingBackground("active", props),
114
- boxShadow: "none",
115
- },
116
74
  },
117
75
  },
118
76
  }),
@@ -1,8 +1,8 @@
1
1
  import { defineStyleConfig } from "@chakra-ui/react";
2
2
  import { mode } from "@chakra-ui/theme-tools";
3
3
  import { colors } from "../foundations";
4
- import { getBoxShadowString } from "../utils/box-shadow-utils";
5
- import { focusVisibleStyles } from "../utils/focus-util";
4
+ import { baseBackground, baseBorder, baseText } from "../utils/base-utils";
5
+ import { focusVisibleStyles } from "../utils/focus-utils";
6
6
 
7
7
  const config = defineStyleConfig({
8
8
  baseStyle: (props: any) => ({
@@ -14,24 +14,51 @@ const config = defineStyleConfig({
14
14
  transitionProperty: "common",
15
15
  transitionDuration: "fast",
16
16
  borderRadius: "md",
17
+ // Except for white cards, all cards are light mode always
18
+ color: "text.default.light",
17
19
  ...getColorSchemeBaseProps(props),
18
-
19
20
  "button&, a&, label&, &.is-clickable": {
21
+ outline: "1px solid",
20
22
  ...getColorSchemeClickableProps(props),
21
- _hover: getColorSchemeHoverProps(props),
22
23
  ...focusVisibleStyles(props),
24
+ _hover: getColorSchemeHoverProps(props),
23
25
  _active: getColorSchemeActiveProps(props),
24
26
  _disabled: {
25
- backgroundColor: "platinum",
26
- boxShadow: getBoxShadowString({
27
- borderColor: "silver",
28
- isInset: false,
29
- }),
30
- color: "osloGrey",
27
+ ...baseBackground("disabled", props),
28
+ ...baseBorder("disabled", props),
29
+ ...baseText("disabled", props),
31
30
  pointerEvents: "none",
32
31
  },
33
32
  },
34
33
  }),
34
+ sizes: {
35
+ sm: {
36
+ "button&, a&, label&, &.is-clickable": {
37
+ boxShadow: "sm",
38
+
39
+ _hover: {
40
+ boxShadow: "md",
41
+ },
42
+
43
+ _active: {
44
+ boxShadow: "none",
45
+ },
46
+ },
47
+ },
48
+ lg: {
49
+ "button&, a&, label&, &.is-clickable": {
50
+ boxShadow: "md",
51
+
52
+ _hover: {
53
+ boxShadow: "lg",
54
+ },
55
+
56
+ _active: {
57
+ boxShadow: "sm",
58
+ },
59
+ },
60
+ },
61
+ },
35
62
  });
36
63
 
37
64
  export default config;
@@ -46,21 +73,20 @@ type CardThemeProps = {
46
73
  | "yellow"
47
74
  | "orange"
48
75
  | "red";
49
- size: "sm" | "lg";
76
+ theme: any;
50
77
  };
51
78
 
52
79
  const getColorSchemeBaseProps = (props: CardThemeProps) => {
53
- const { colorScheme, size } = props;
54
- const baseShadow = size === "lg" ? "md" : "sm";
55
- switch (colorScheme) {
80
+ switch (props.colorScheme) {
56
81
  case "white":
57
82
  return {
58
- backgroundColor: mode("white", "whiteAlpha.100")(props),
59
- boxShadow: getBoxShadowString({
60
- baseShadow,
61
- borderColor: "silver",
62
- isInset: false,
63
- }),
83
+ outline: "1px solid",
84
+ outlineColor: "silver",
85
+ backgroundColor: mode(
86
+ "white",
87
+ `color-mix(in srgb, white 10%, ${props.theme.colors.surface.default.dark})`,
88
+ )(props),
89
+ color: "inherit",
64
90
  };
65
91
  case "grey":
66
92
  return {
@@ -78,95 +104,67 @@ const getColorSchemeBaseProps = (props: CardThemeProps) => {
78
104
  }
79
105
  default:
80
106
  return {
81
- backgroundColor: colors[colorScheme]?.[100] ?? "platinum",
107
+ backgroundColor: colors[props.colorScheme]?.[100] ?? "platinum",
82
108
  };
83
109
  }
84
110
  };
85
111
 
86
- function getColorSchemeClickableProps({ colorScheme, size }: CardThemeProps) {
87
- const baseShadow = size === "lg" ? "md" : "sm";
88
- switch (colorScheme) {
112
+ function getColorSchemeClickableProps(props: CardThemeProps) {
113
+ switch (props.colorScheme) {
89
114
  case "white":
90
115
  return {
91
- boxShadow: getBoxShadowString({
92
- baseShadow,
93
- borderColor: "silver",
94
- }),
116
+ outlineColor: "silver",
95
117
  };
96
118
  case "grey":
97
119
  return {
98
- boxShadow: getBoxShadowString({
99
- baseShadow,
100
- borderColor: "steel",
101
- }),
120
+ outlineColor: "steel",
102
121
  };
103
122
  default:
104
123
  return {
105
- backgroundColor: colors[colorScheme]?.[100] ?? "platinum",
106
- boxShadow: getBoxShadowString({
107
- baseShadow,
108
- borderColor: colors[colorScheme]?.[200] ?? "silver",
109
- }),
124
+ backgroundColor: colors[props.colorScheme]?.[100] ?? "platinum",
125
+ outlineColor: colors[props.colorScheme]?.[200] ?? "silver",
110
126
  };
111
127
  }
112
128
  }
113
129
 
114
130
  const getColorSchemeHoverProps = (props: CardThemeProps) => {
115
- const { colorScheme, size } = props;
116
- const baseShadow = size === "lg" ? "lg" : "md";
117
- switch (colorScheme) {
131
+ switch (props.colorScheme) {
118
132
  case "white":
119
133
  return {
120
- backgroundColor: mode("white", "whiteAlpha.200")(props),
121
- boxShadow: getBoxShadowString({
122
- baseShadow,
123
- borderColor: colors.steel,
124
- }),
134
+ backgroundColor: mode(
135
+ "white",
136
+ `color-mix(in srgb, white 20%, ${props.theme.colors.surface.default.dark})`,
137
+ )(props),
138
+ outlineColor: "steel",
125
139
  };
126
140
  case "grey":
127
141
  return {
128
- boxShadow: getBoxShadowString({
129
- baseShadow,
130
- borderColor: colors.osloGrey,
131
- }),
142
+ outlineColor: "osloGrey",
132
143
  };
133
144
  default:
134
145
  return {
135
- backgroundColor: colors[colorScheme]?.[200] ?? "silver",
136
- boxShadow: getBoxShadowString({
137
- baseShadow,
138
- borderColor: colors[colorScheme]?.[400] ?? colors.silver,
139
- }),
146
+ backgroundColor: colors[props.colorScheme]?.[200] ?? "silver",
147
+ outlineColor: colors[props.colorScheme]?.[400] ?? "silver",
140
148
  };
141
149
  }
142
150
  };
143
151
  const getColorSchemeActiveProps = (props: CardThemeProps) => {
144
- const { colorScheme, size } = props;
145
- const baseShadow = size === "lg" ? "sm" : "none";
152
+ const { colorScheme } = props;
146
153
  switch (colorScheme) {
147
154
  case "white":
148
155
  return {
149
156
  backgroundColor: mode("mint", "teal")(props),
150
- boxShadow: getBoxShadowString({
151
- baseShadow,
152
- borderColor: colors.silver,
153
- }),
157
+ outlineColor: "silver",
154
158
  };
155
159
  case "grey":
156
160
  return {
157
161
  backgroundColor: "white",
158
- boxShadow: getBoxShadowString({
159
- baseShadow,
160
- borderColor: colors.steel,
161
- }),
162
+ outlineColor: "steel",
162
163
  };
163
164
  default:
164
165
  return {
165
166
  backgroundColor: colors[colorScheme]?.[50] ?? "lightGrey",
166
- boxShadow: getBoxShadowString({
167
- baseShadow,
168
- borderColor: colors[colorScheme]?.[100] ?? colors.silver,
169
- }),
167
+ outlineColor: colors[colorScheme]?.[100] ?? "silver",
170
168
  };
171
169
  }
172
170
  };
@@ -1,9 +1,9 @@
1
1
  import { checkboxAnatomy as parts } from "@chakra-ui/anatomy";
2
2
  import { createMultiStyleConfigHelpers } from "@chakra-ui/react";
3
- import { focusVisibleStyles } from "../utils/focus-util";
4
3
  import { mode } from "@chakra-ui/theme-tools";
5
- import { baseBackground } from "../utils/background-utils";
6
- import { baseText } from "../utils/text-utils";
4
+ import { baseBackground, baseText } from "../utils/base-utils";
5
+ import { brandBackground, brandText } from "../utils/brand-utils";
6
+ import { focusVisibleStyles } from "../utils/focus-utils";
7
7
 
8
8
  const helpers = createMultiStyleConfigHelpers(parts.keys);
9
9
 
@@ -13,20 +13,20 @@ const config = helpers.defineMultiStyleConfig({
13
13
  _hover: {
14
14
  "input:enabled:not([aria-invalid]) + .chakra-checkbox__control": {
15
15
  ...baseBackground("hover", props),
16
- borderColor: mode("darkGrey", "white")(props),
16
+ borderColor: brandBackground("hover", props).backgroundColor,
17
17
  },
18
18
  "input:enabled[aria-invalid] + .chakra-checkbox__control": {
19
19
  backgroundColor: mode("white", "inherit")(props),
20
- borderColor: "brightRed",
20
+ borderColor: mode("outline.error.light", "outline.error.dark"),
21
21
  },
22
22
  "input:enabled:checked:not([aria-invalid]) + .chakra-checkbox__control":
23
23
  {
24
- backgroundColor: mode("darkTeal", "blueGreen")(props),
25
- borderColor: mode("darkTeal", "blueGreen")(props),
24
+ ...brandBackground("hover", props),
25
+ borderColor: brandBackground("hover", props).backgroundColor,
26
26
  },
27
27
  "input:enabled:checked[aria-invalid] + .chakra-checkbox__control": {
28
- backgroundColor: "brightRed",
29
- borderColor: "brightRed",
28
+ borderColor: mode("outline.error.light", "outline.error.dark"),
29
+ backgroundColor: mode("outline.error.light", "outline.error.dark"),
30
30
  },
31
31
  },
32
32
  },
@@ -42,23 +42,23 @@ const config = helpers.defineMultiStyleConfig({
42
42
  transitionProperty: "background, border-color",
43
43
  transitionDuration: "normal",
44
44
  border: "2px solid",
45
- borderColor: mode("blackAlpha.400", "whiteAlpha.400")(props),
45
+ borderColor: mode(
46
+ "base.outline.default.light",
47
+ "base.outline.default.dark",
48
+ )(props),
46
49
  borderRadius: "xs",
47
- color: mode("white", "darkTeal")(props),
48
50
  ...baseBackground("default", props),
51
+ ...focusVisibleStyles(props),
49
52
 
50
53
  _checked: {
51
- ...baseBackground("selected", props),
52
- borderColor: mode("pine", "coralGreen")(props),
53
- ...baseText("default", props),
54
- color: mode("white", "darkTeal")(props),
55
-
56
- ...focusVisibleStyles(props),
54
+ ...brandText("default", props),
55
+ ...brandBackground("default", props),
56
+ borderColor: brandBackground("default", props).backgroundColor,
57
57
 
58
58
  _disabled: {
59
59
  ...baseBackground("disabled", props),
60
- borderColor: mode("blackAlpha.200", "whiteAlpha.200")(props),
61
- color: mode("blackAlpha.200", "whiteAlpha.200")(props),
60
+ ...baseText("disabled", props),
61
+ borderColor: "currentColor",
62
62
  },
63
63
 
64
64
  _invalid: {
@@ -69,7 +69,7 @@ const config = helpers.defineMultiStyleConfig({
69
69
 
70
70
  _disabled: {
71
71
  ...baseBackground("disabled", props),
72
- borderColor: mode("blackAlpha.200", "whiteAlpha.200")(props),
72
+ borderColor: baseText("disabled", props).color,
73
73
  },
74
74
  _invalid: {
75
75
  ...baseBackground("default", props),