@vygruppen/spor-react 9.11.3 → 9.11.4

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.
@@ -93,26 +93,26 @@ const config = defineStyleConfig({
93
93
  lg: {
94
94
  minHeight: 8,
95
95
  minWidth: 8,
96
- fontSize: "18px",
96
+ fontSize: "sm",
97
97
  fontWeight: "bold",
98
98
  },
99
99
  md: {
100
100
  minHeight: 7,
101
101
  minWidth: 7,
102
- fontSize: "18px",
102
+ fontSize: "sm",
103
103
  fontWeight: "bold",
104
104
  },
105
105
  sm: {
106
106
  minHeight: 6,
107
107
  minWidth: 6,
108
- fontSize: "16px",
108
+ fontSize: "xs",
109
109
  fontWeight: "normal",
110
110
  },
111
111
  xs: {
112
112
  minHeight: 5,
113
113
  minWidth: 5,
114
114
  paddingY: 0.5,
115
- fontSize: "16px",
115
+ fontSize: "xs",
116
116
  fontWeight: "normal",
117
117
  },
118
118
  },
@@ -15,9 +15,10 @@ const config = helpers.defineMultiStyleConfig({
15
15
  container: {
16
16
  display: "inline-flex",
17
17
  alignItems: "center",
18
- fontSize: "16px",
18
+ fontSize: "xs",
19
19
  cursor: "pointer",
20
20
  transitionProperty: "all",
21
+ borderRadius: "xl",
21
22
  transitionDuration: "fast",
22
23
  _checked: {
23
24
  outlineColor: "transparent",
@@ -117,42 +118,38 @@ const config = helpers.defineMultiStyleConfig({
117
118
  sizes: {
118
119
  xs: {
119
120
  container: {
120
- borderRadius: "30px",
121
121
  _checked: {
122
- borderRadius: "9px",
122
+ borderRadius: "0.563rem",
123
123
  },
124
- height: "30px",
124
+ height: 5,
125
125
  paddingX: 1.5,
126
126
  },
127
127
  },
128
128
  sm: {
129
129
  container: {
130
- borderRadius: "30px",
131
130
  _checked: {
132
- borderRadius: "12px",
131
+ borderRadius: "sm",
133
132
  },
134
- height: "36px",
133
+ height: 6,
135
134
  paddingX: 2,
136
135
  },
137
136
  },
138
137
  md: {
139
138
  container: {
140
- borderRadius: "30px",
141
139
  _checked: {
142
- borderRadius: "12px",
140
+ borderRadius: "sm",
143
141
  },
144
- height: "42px",
142
+ height: 7,
145
143
  paddingX: 2,
146
144
  },
147
145
  },
148
146
  lg: {
149
147
  container: {
150
- borderRadius: "30px",
151
148
  _checked: {
152
- borderRadius: "18px",
149
+ borderRadius: "md",
153
150
  },
154
- height: "54px",
155
- px: 3,
151
+ height: 8,
152
+ paddingX: 3,
156
153
  },
157
154
  },
158
155
  },
@@ -1,6 +1,7 @@
1
1
  import { defineStyleConfig } from "@chakra-ui/react";
2
2
  import { cssVar, mode } from "@chakra-ui/theme-tools";
3
3
  import { focusVisibleStyles } from "../utils/focus-utils";
4
+ import { ghostBackground } from "../utils/ghost-utils";
4
5
 
5
6
  const $size = cssVar("close-button-size");
6
7
 
@@ -16,27 +17,27 @@ const config = defineStyleConfig({
16
17
  fontWeight: "normal",
17
18
  ...focusVisibleStyles(props),
18
19
  _hover: {
19
- backgroundColor: mode("seaMist", "whiteAlpha.100")(props),
20
+ ...ghostBackground("hover", props),
20
21
  _disabled: {
21
22
  color: "dimGrey",
22
23
  },
23
24
  },
24
25
  _active: {
25
- backgroundColor: mode("mint", "whiteAlpha.200")(props),
26
+ ...ghostBackground("active", props),
26
27
  },
27
28
  }),
28
29
  sizes: {
29
30
  lg: {
30
31
  [$size.variable]: "40px",
31
- fontSize: "16px",
32
+ fontSize: "xs",
32
33
  },
33
34
  md: {
34
35
  [$size.variable]: "32px",
35
- fontSize: "12px",
36
+ fontSize: "0.75rem",
36
37
  },
37
38
  sm: {
38
39
  [$size.variable]: "24px",
39
- fontSize: "10px",
40
+ fontSize: "0.625rem",
40
41
  },
41
42
  },
42
43
  defaultProps: {
@@ -20,6 +20,7 @@ const parts = anatomy("datepicker").parts(
20
20
  "dateCell",
21
21
  "inputLabel",
22
22
  "dateTimeSegment",
23
+ "cell",
23
24
  );
24
25
 
25
26
  const $arrowBackground = cssVar("popper-arrow-bg");
@@ -57,6 +58,10 @@ const config = helpers.defineMultiStyleConfig({
57
58
  "darkGrey",
58
59
  props.isPlaceholder ? "whiteAlpha.400" : "white",
59
60
  )(props),
61
+ _focus: {
62
+ ...brandBackground("hover", props),
63
+ color: "white",
64
+ },
60
65
  },
61
66
  calendarTriggerButton: {
62
67
  width: 8,
@@ -98,6 +103,22 @@ const config = helpers.defineMultiStyleConfig({
98
103
  weekend: {
99
104
  ...accentText("default", props),
100
105
  },
106
+ cell: {
107
+ '&[aria-selected="true"] + [aria-selected="true"] > button': {
108
+ "&::before": {
109
+ content: '""',
110
+ display: "block",
111
+ width: "100%",
112
+ height: "100%",
113
+ position: "absolute",
114
+ left: "-50%",
115
+ top: 0,
116
+ bottom: 0,
117
+ zIndex: -1,
118
+ ...brandBackground("default", props),
119
+ },
120
+ },
121
+ },
101
122
  dateCell: {
102
123
  ...ghostBackground("default", props),
103
124
  ...baseText("default", props),
@@ -32,7 +32,7 @@ const config = helpers.defineMultiStyleConfig({
32
32
  display: "flex",
33
33
  appearance: "none",
34
34
  width: "100%",
35
- height: "54px",
35
+ height: 8,
36
36
  borderTopRadius: "sm",
37
37
  borderBottomRadius: props.isOpen ? 0 : "sm",
38
38
  paddingY: 1.5,
@@ -18,7 +18,7 @@ const config = helpers.defineMultiStyleConfig({
18
18
  transitionDuration: "fast",
19
19
  position: "relative",
20
20
  paddingX: 3,
21
- height: "54px",
21
+ height: 8,
22
22
  fontSize: "mobile.md",
23
23
  ...baseBackground("default", props),
24
24
 
@@ -58,7 +58,7 @@ const config = helpers.defineMultiStyleConfig({
58
58
  cursor: "text",
59
59
  },
60
60
  "&:not(:placeholder-shown)": {
61
- paddingTop: "16px",
61
+ paddingTop: "1rem",
62
62
  "& + label": {
63
63
  transform: "scale(0.825) translateY(-10px)",
64
64
  },
@@ -2,7 +2,7 @@ import { defineStyleConfig } from "@chakra-ui/react";
2
2
  import { baseBackground, baseBorder, baseText } from "../utils/base-utils";
3
3
  import { floatingBackground, floatingBorder } from "../utils/floating-utils";
4
4
  import { focusVisibleStyles } from "../utils/focus-utils";
5
- import { accentBackground } from "../utils/accent-utils";
5
+ import { accentBackground, accentText } from "../utils/accent-utils";
6
6
 
7
7
  const config = defineStyleConfig({
8
8
  baseStyle: (props) => ({
@@ -39,6 +39,7 @@ const config = defineStyleConfig({
39
39
  },
40
40
  }),
41
41
  accent: (props) => ({
42
+ ...accentText("default", props),
42
43
  ...accentBackground("default", props),
43
44
  boxShadow: "sm",
44
45
  _hover: {
@@ -17,7 +17,10 @@ const config = helpers.defineMultiStyleConfig({
17
17
  },
18
18
  background: {
19
19
  display: "flex",
20
- backgroundColor: mode("coralGreen", "pine")(props), // TODO: Replace with semantic tokens
20
+ backgroundColor: mode(
21
+ "brand.surface.default.dark",
22
+ "brand.surface.default.light",
23
+ )(props),
21
24
  borderRadius: "sm",
22
25
  justifyContent: "flex-start",
23
26
  marginX: "auto",
@@ -2,7 +2,7 @@ import { radioAnatomy as parts } from "@chakra-ui/anatomy";
2
2
  import { createMultiStyleConfigHelpers } from "@chakra-ui/react";
3
3
  import { mode } from "@chakra-ui/theme-tools";
4
4
  import { baseBackground, baseBorder, baseText } from "../utils/base-utils";
5
- import { brandBackground } from "../utils/brand-utils";
5
+ import { brandBackground, brandText } from "../utils/brand-utils";
6
6
  import { focusVisibleStyles } from "../utils/focus-utils";
7
7
 
8
8
  const helpers = createMultiStyleConfigHelpers(parts.keys);
@@ -41,7 +41,10 @@ const config = helpers.defineMultiStyleConfig({
41
41
  ...baseText("disabled", props),
42
42
  },
43
43
  _checked: {
44
- color: mode("pine", "coralGreen")(props),
44
+ color: mode(
45
+ "brand.surface.default.light",
46
+ "brand.surface.default.dark",
47
+ )(props),
45
48
  borderColor: "currentColor",
46
49
  _before: {
47
50
  content: `""`,
@@ -30,17 +30,17 @@ const config = helpers.defineMultiStyleConfig({
30
30
  field: {
31
31
  ...Input.baseStyle!(props).field,
32
32
  appearance: "none",
33
- paddingTop: "16px",
33
+ paddingTop: "1rem",
34
34
  "option, optgroup": {},
35
35
  },
36
36
  icon: {
37
- width: "30px",
38
- height: "30px",
37
+ width: 5,
38
+ height: 5,
39
39
  insetEnd: "0.5rem",
40
40
  position: "relative",
41
41
  color: "currentColor",
42
42
  strokeLinecap: "round",
43
- fontSize: "1.125rem",
43
+ fontSize: "sm",
44
44
  _disabled: {
45
45
  ...baseText("disabled", props),
46
46
  },
@@ -1,7 +1,6 @@
1
1
  import { Theme, defineStyleConfig } from "@chakra-ui/react";
2
2
  import { colors } from "../foundations";
3
3
  import { focusVisibleStyles } from "../utils/focus-utils";
4
- import { bg } from "../utils/bg-utils";
5
4
  import { floatingBackground } from "../utils/floating-utils";
6
5
  import { mode } from "@chakra-ui/theme-tools";
7
6
 
@@ -1,6 +1,6 @@
1
1
  import { tabsAnatomy as parts } from "@chakra-ui/anatomy";
2
2
  import { createMultiStyleConfigHelpers } from "@chakra-ui/react";
3
- import { mode, type StyleFunctionProps } from "@chakra-ui/theme-tools";
3
+ import { mode } from "@chakra-ui/theme-tools";
4
4
  import { accentBackground, accentText } from "../utils/accent-utils";
5
5
  import { baseBackground, baseBorder, baseText } from "../utils/base-utils";
6
6
  import { brandBackground, brandText } from "../utils/brand-utils";
@@ -88,7 +88,7 @@ const config = helpers.defineMultiStyleConfig({
88
88
  sizes: {
89
89
  xs: {
90
90
  tablist: {
91
- height: "30px",
91
+ height: 5,
92
92
  padding: "2px",
93
93
  },
94
94
  tab: {
@@ -98,7 +98,7 @@ const config = helpers.defineMultiStyleConfig({
98
98
  },
99
99
  sm: {
100
100
  tablist: {
101
- height: "36px",
101
+ height: 6,
102
102
  padding: 0.5,
103
103
  },
104
104
  tab: {
@@ -107,7 +107,7 @@ const config = helpers.defineMultiStyleConfig({
107
107
  },
108
108
  md: {
109
109
  tablist: {
110
- height: "42px",
110
+ height: 7,
111
111
  padding: 0.5,
112
112
  },
113
113
  tab: {
@@ -117,7 +117,7 @@ const config = helpers.defineMultiStyleConfig({
117
117
  },
118
118
  lg: {
119
119
  tablist: {
120
- height: "54px",
120
+ height: 8,
121
121
  padding: "4px",
122
122
  },
123
123
  tab: {
@@ -133,29 +133,3 @@ const config = helpers.defineMultiStyleConfig({
133
133
  });
134
134
 
135
135
  export default config;
136
-
137
- const getTabColorSchemeHoverProps = (props: StyleFunctionProps) => {
138
- switch (props.colorScheme) {
139
- case "base":
140
- return {
141
- ...baseBorder("hover", props),
142
- };
143
- case "accent":
144
- return {
145
- ...accentBackground("hover", props),
146
- };
147
- }
148
- };
149
-
150
- const getTabColorSchemeActiveProps = (props: StyleFunctionProps) => {
151
- switch (props.colorScheme) {
152
- case "base":
153
- return {
154
- ...baseBackground("active", props),
155
- };
156
- case "accent":
157
- return {
158
- ...accentBackground("active", props),
159
- };
160
- }
161
- };