@vygruppen/spor-react 3.7.6 → 3.8.0

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 (34) hide show
  1. package/.turbo/turbo-build.log +11 -11
  2. package/CHANGELOG.md +29 -0
  3. package/dist/{CountryCodeSelect-IV4VKD4A.mjs → CountryCodeSelect-BA3A7ODU.mjs} +1 -1
  4. package/dist/{chunk-LQEO65MM.mjs → chunk-HL3ESNVB.mjs} +654 -445
  5. package/dist/index.d.mts +237 -43
  6. package/dist/index.d.ts +237 -43
  7. package/dist/index.js +830 -621
  8. package/dist/index.mjs +1 -1
  9. package/package.json +2 -2
  10. package/src/button/Button.tsx +7 -1
  11. package/src/button/FloatingActionButton.tsx +10 -1
  12. package/src/datepicker/Calendar.tsx +8 -3
  13. package/src/datepicker/CalendarCell.tsx +8 -3
  14. package/src/datepicker/CalendarGrid.tsx +9 -3
  15. package/src/datepicker/CalendarTriggerButton.tsx +10 -3
  16. package/src/datepicker/DatePicker.tsx +15 -35
  17. package/src/datepicker/DateRangePicker.tsx +14 -25
  18. package/src/datepicker/DateTimeSegment.tsx +0 -2
  19. package/src/datepicker/RangeCalendar.tsx +8 -4
  20. package/src/datepicker/StyledField.tsx +6 -1
  21. package/src/datepicker/TimePicker.tsx +1 -1
  22. package/src/input/NumericStepper.tsx +91 -68
  23. package/src/tab/Tabs.tsx +11 -1
  24. package/src/theme/components/button.ts +18 -16
  25. package/src/theme/components/card.ts +18 -10
  26. package/src/theme/components/close-button.ts +9 -8
  27. package/src/theme/components/datepicker.ts +74 -23
  28. package/src/theme/components/fab.ts +76 -1
  29. package/src/theme/components/info-tag.ts +16 -1
  30. package/src/theme/components/line-icon.ts +5 -4
  31. package/src/theme/components/link.ts +14 -36
  32. package/src/theme/components/modal.ts +4 -3
  33. package/src/theme/components/tabs.ts +82 -1
  34. package/src/theme/components/travel-tag.ts +6 -4
@@ -33,6 +33,10 @@ type NumericStepperProps = {
33
33
  isDisabled?: boolean;
34
34
  /** Whether to show input field or not */
35
35
  withInput?: boolean;
36
+ /** The amount to increase/decrease when pressing +/- */
37
+ stepSize?: number;
38
+ /** Whether to show the number input when value is zero */
39
+ showZero?: boolean;
36
40
  } & Omit<BoxProps, "onChange">;
37
41
  /** A simple stepper component for integer values
38
42
  *
@@ -43,10 +47,10 @@ type NumericStepperProps = {
43
47
  * <NumericStepper value={value} onChange={setValue} />
44
48
  * ```
45
49
  *
46
- * You can also set a minimum and/or maximum value:
50
+ * You can also set a minimum and/or maximum value and step size:
47
51
  *
48
52
  * ```tsx
49
- * <NumericStepper value={value} onChange={setValue} minValue={1} maxValue={10} />
53
+ * <NumericStepper value={value} onChange={setValue} minValue={1} maxValue={10} stepSize={3} />
50
54
  * ```
51
55
  *
52
56
  * You can use the NumericStepper inside of a FormControl component to get IDs etc linked up automatically:
@@ -68,6 +72,8 @@ export function NumericStepper({
68
72
  maxValue = 99,
69
73
  isDisabled,
70
74
  withInput = true,
75
+ stepSize = 1,
76
+ showZero = false,
71
77
  ...boxProps
72
78
  }: NumericStepperProps) {
73
79
  const { t } = useTranslation();
@@ -80,15 +86,17 @@ export function NumericStepper({
80
86
  const textColor = useColorModeValue("darkGrey", "white");
81
87
  const backgroundColor = useColorModeValue("white", "darkGrey");
82
88
  const focusColor = useColorModeValue("greenHaze", "azure");
89
+ const clampedStepSize = Math.max(Math.min(stepSize, 10), 1);
83
90
 
84
91
  return (
85
92
  <Flex alignItems="center" {...boxProps}>
86
93
  <VerySmallButton
87
- icon={<SubtractIcon color="white" />}
88
- aria-label={t(texts.decrementButtonAriaLabel)}
89
- onClick={() => onChange(value - 1)}
94
+ icon={<SubtractIcon color="white" stepLabel={clampedStepSize} />}
95
+ aria-label={t(texts.decrementButtonAriaLabel(clampedStepSize))}
96
+ onClick={() => onChange(Math.max(value - clampedStepSize, minValue))}
90
97
  visibility={value <= minValue ? "hidden" : "visible"}
91
98
  isDisabled={formControlProps.disabled}
99
+ id={value <= minValue ? undefined : formControlProps.id}
92
100
  />
93
101
  {withInput ? (
94
102
  <chakra.input
@@ -98,10 +106,10 @@ export function NumericStepper({
98
106
  name={nameProp}
99
107
  value={value}
100
108
  {...formControlProps}
101
- id={value !== 0 ? formControlProps.id : undefined}
109
+ id={!showZero && value === 0 ? undefined : formControlProps.id}
102
110
  fontSize="sm"
103
111
  fontWeight="bold"
104
- width="3ch"
112
+ width={`${Math.max(value.toString().length + 1, 3)}ch`}
105
113
  marginX={1}
106
114
  paddingX={1}
107
115
  borderRadius="xs"
@@ -109,7 +117,7 @@ export function NumericStepper({
109
117
  backgroundColor={backgroundColor}
110
118
  color={textColor}
111
119
  transition="box-shadow .1s ease-out"
112
- visibility={value === 0 ? "hidden" : "visible"}
120
+ visibility={!showZero && value === 0 ? "hidden" : "visible"}
113
121
  aria-live="assertive"
114
122
  aria-label={value.toString()}
115
123
  _hover={{
@@ -136,7 +144,7 @@ export function NumericStepper({
136
144
  if (Number.isNaN(numericInput)) {
137
145
  return;
138
146
  }
139
- onChange(numericInput);
147
+ onChange(Math.max(Math.min(numericInput, maxValue), minValue));
140
148
  }}
141
149
  />
142
150
  ) : (
@@ -149,19 +157,19 @@ export function NumericStepper({
149
157
  textAlign="center"
150
158
  color={textColor}
151
159
  transition="box-shadow .1s ease-out"
152
- visibility={value === 0 ? "hidden" : "visible"}
160
+ visibility={!showZero && value === 0 ? "hidden" : "visible"}
153
161
  aria-label={value.toString()}
154
162
  >
155
163
  {value}
156
164
  </chakra.text>
157
165
  )}
158
166
  <VerySmallButton
159
- icon={<AddIcon color="white" />}
160
- aria-label={t(texts.incrementButtonAriaLabel)}
161
- onClick={() => onChange(value + 1)}
167
+ icon={<AddIcon color="white" stepLabel={clampedStepSize} />}
168
+ aria-label={t(texts.incrementButtonAriaLabel(clampedStepSize))}
169
+ onClick={() => onChange(Math.min(value + clampedStepSize, maxValue))}
162
170
  visibility={value >= maxValue ? "hidden" : "visible"}
163
171
  isDisabled={formControlProps.disabled}
164
- id={value === 0 ? formControlProps.id : undefined}
172
+ id={value >= maxValue ? undefined : formControlProps.id}
165
173
  />
166
174
  </Flex>
167
175
  );
@@ -201,65 +209,80 @@ const VerySmallButton = (props: VerySmallButtonProps) => {
201
209
  );
202
210
  };
203
211
 
204
- const SubtractIcon = (props: BoxProps) => (
205
- <Box
206
- as="svg"
207
- viewBox="0 0 30 30"
208
- width="24"
209
- height="24"
210
- stroke="currentColor"
211
- {...props}
212
- >
213
- <line
214
- x1="9"
215
- y1="15"
216
- x2="21"
217
- y2="15"
218
- strokeWidth="1.5"
219
- strokeLinecap="round"
220
- />
221
- </Box>
212
+ const SubtractIcon = (props: BoxProps & { stepLabel: number }) => (
213
+ <>
214
+ <Box
215
+ as="svg"
216
+ viewBox="0 0 30 30"
217
+ width="24"
218
+ height="24"
219
+ stroke="currentColor"
220
+ {...props}
221
+ >
222
+ <line
223
+ x1="9"
224
+ y1="15"
225
+ x2="21"
226
+ y2="15"
227
+ strokeWidth="1.5"
228
+ strokeLinecap="round"
229
+ />
230
+ </Box>
231
+ {props.stepLabel > 1 && (
232
+ <chakra.span paddingRight="1">{props.stepLabel.toString()}</chakra.span>
233
+ )}
234
+ </>
222
235
  );
223
236
 
224
- const AddIcon = (props: BoxProps) => (
225
- <Box
226
- as="svg"
227
- viewBox="0 0 30 30"
228
- width="24"
229
- height="24"
230
- stroke="currentColor"
231
- {...props}
232
- >
233
- <line
234
- x1="9"
235
- y1="15"
236
- x2="21"
237
- y2="15"
238
- strokeWidth="1.5"
239
- strokeLinecap="round"
240
- />
241
- <line
242
- x1="15"
243
- y1="9"
244
- x2="15"
245
- y2="21"
246
- strokeWidth="1.5"
247
- strokeLinecap="round"
248
- />
249
- </Box>
237
+ const AddIcon = (props: BoxProps & { stepLabel: number }) => (
238
+ <>
239
+ <Box
240
+ as="svg"
241
+ viewBox="0 0 30 30"
242
+ width="24"
243
+ height="24"
244
+ stroke="currentColor"
245
+ {...props}
246
+ >
247
+ <line
248
+ x1="9"
249
+ y1="15"
250
+ x2="21"
251
+ y2="15"
252
+ strokeWidth="1.5"
253
+ strokeLinecap="round"
254
+ />
255
+ <line
256
+ x1="15"
257
+ y1="9"
258
+ x2="15"
259
+ y2="21"
260
+ strokeWidth="1.5"
261
+ strokeLinecap="round"
262
+ />
263
+ </Box>
264
+
265
+ {props.stepLabel > 1 && (
266
+ <chakra.span paddingRight="1">{props.stepLabel.toString()}</chakra.span>
267
+ )}
268
+ </>
250
269
  );
251
270
 
252
271
  const texts = createTexts({
253
- decrementButtonAriaLabel: {
254
- nb: "Trekk fra 1",
255
- en: "Subtract 1",
256
- nn: "Trekk frå 1",
257
- sv: "Subtrahera 1",
272
+ decrementButtonAriaLabel(stepSize) {
273
+ return {
274
+ nb: `Trekk fra ${stepSize}`,
275
+ en: `Subtract ${stepSize}`,
276
+ nn: `Trekk frå ${stepSize}`,
277
+ sv: `Subtrahera ${stepSize}`,
278
+ };
258
279
  },
259
- incrementButtonAriaLabel: {
260
- nb: "Legg til 1",
261
- en: "Add 1",
262
- nn: "Legg til 1",
263
- sv: "Lägg till 1",
280
+ incrementButtonAriaLabel(stepSize) {
281
+ return {
282
+ nb: `Legg til ${stepSize}`,
283
+ en: `Add ${stepSize}`,
284
+ nn: `Legg til ${stepSize}`,
285
+ sv: `Lägg till ${stepSize}`,
286
+ };
264
287
  },
265
288
  });
package/src/tab/Tabs.tsx CHANGED
@@ -9,7 +9,17 @@ export type TabsProps = Exclude<
9
9
  ChakraTabsProps,
10
10
  "colorScheme" | "variant" | "orientation" | "size"
11
11
  > & {
12
- colorScheme: "dark" | "light" | "green" | "grey";
12
+ colorScheme:
13
+ /** @deprecated dark is deprecated please use accent*/
14
+ | "dark"
15
+ /** @deprecated light is deprecated please use default*/
16
+ | "light"
17
+ /** @deprecated green is deprecated please use accent*/
18
+ | "green"
19
+ /** @deprecated grey is deprecated please use default*/
20
+ | "grey"
21
+ | "base"
22
+ | "accent" ;
13
23
  /** Defaults to `md` */
14
24
  size?: "sm" | "md" | "lg" | "xl";
15
25
  /** Defaults to `round` */
@@ -11,7 +11,9 @@ const config = defineStyleConfig({
11
11
  fontWeight: "bold",
12
12
  transitionProperty: "common",
13
13
  transitionDuration: "normal",
14
- px: 3,
14
+ textWrap: "wrap",
15
+ paddingX: 3,
16
+ paddingY: 1,
15
17
  _focus: {
16
18
  boxShadow: 0,
17
19
  outline: 0,
@@ -36,7 +38,7 @@ const config = defineStyleConfig({
36
38
  focus: {
37
39
  boxShadow: `inset 0 0 0 4px ${mode(
38
40
  colors.darkTeal,
39
- colors.seaMist,
41
+ colors.seaMist
40
42
  )(props)}, inset 0 0 0 6px currentColor`,
41
43
  },
42
44
  notFocus: { boxShadow: "none" },
@@ -57,10 +59,10 @@ const config = defineStyleConfig({
57
59
  focus: {
58
60
  boxShadow: `inset 0 0 0 2px ${mode(
59
61
  colors.greenHaze,
60
- colors.azure,
62
+ colors.azure
61
63
  )(props)}, inset 0 0 0 4px ${mode(
62
64
  colors.white,
63
- colors.darkGrey,
65
+ colors.darkGrey
64
66
  )(props)}`,
65
67
  },
66
68
  notFocus: { boxShadow: "none" },
@@ -84,18 +86,18 @@ const config = defineStyleConfig({
84
86
  focus: {
85
87
  boxShadow: `inset 0 0 0 2px ${mode(
86
88
  colors.greenHaze,
87
- colors.azure,
89
+ colors.azure
88
90
  )(props)}, inset 0 0 0 4px ${mode(
89
91
  colors.white,
90
- colors.blackAlpha[300],
92
+ colors.blackAlpha[300]
91
93
  )(props)}`,
92
94
  _hover: {
93
95
  boxShadow: `inset 0 0 0 2px ${mode(
94
96
  colors.greenHaze,
95
- colors.azure,
97
+ colors.azure
96
98
  )(props)}, inset 0 0 0 4px ${mode(
97
99
  colors.white,
98
- colors.blackAlpha[500],
100
+ colors.blackAlpha[500]
99
101
  )(props)}`,
100
102
  },
101
103
  },
@@ -107,18 +109,18 @@ const config = defineStyleConfig({
107
109
  backgroundColor: mode("mint", "whiteAlpha.300")(props),
108
110
  boxShadow: `inset 0 0 0 2px ${mode(
109
111
  colors.greenHaze,
110
- colors.azure,
112
+ colors.azure
111
113
  )(props)}, inset 0 0 0 4px ${mode(
112
114
  colors.white,
113
- colors.blackAlpha[600],
115
+ colors.blackAlpha[600]
114
116
  )(props)}`,
115
117
  _hover: {
116
118
  boxShadow: `inset 0 0 0 2px ${mode(
117
119
  colors.greenHaze,
118
- colors.azure,
120
+ colors.azure
119
121
  )(props)}, inset 0 0 0 4px ${mode(
120
122
  colors.white,
121
- colors.blackAlpha[600],
123
+ colors.blackAlpha[600]
122
124
  )(props)}`,
123
125
  },
124
126
  },
@@ -149,7 +151,7 @@ const config = defineStyleConfig({
149
151
  fontWeight: "normal",
150
152
  boxShadow: `inset 0 0 0 1px ${mode(
151
153
  colors.blackAlpha[400],
152
- colors.whiteAlpha[400],
154
+ colors.whiteAlpha[400]
153
155
  )(props)}`,
154
156
  ...focusVisible({
155
157
  focus: {
@@ -161,7 +163,7 @@ const config = defineStyleConfig({
161
163
  notFocus: {
162
164
  boxShadow: `inset 0 0 0 1px ${mode(
163
165
  colors.blackAlpha[400],
164
- colors.whiteAlpha[400],
166
+ colors.whiteAlpha[400]
165
167
  )(props)}`,
166
168
  },
167
169
  }),
@@ -171,7 +173,7 @@ const config = defineStyleConfig({
171
173
  _active: {
172
174
  boxShadow: `inset 0 0 0 1px ${mode(
173
175
  colors.blackAlpha[400],
174
- colors.whiteAlpha[300],
176
+ colors.whiteAlpha[300]
175
177
  )(props)}`,
176
178
  backgroundColor: mode("mint", "whiteAlpha.200")(props),
177
179
  },
@@ -260,7 +262,7 @@ const config = defineStyleConfig({
260
262
  minHeight: 5,
261
263
  minWidth: 5,
262
264
  fontSize: "16px",
263
- px: 2,
265
+ paddingX: 2,
264
266
  },
265
267
  },
266
268
  defaultProps: {
@@ -2,6 +2,7 @@ import { defineStyleConfig } from "@chakra-ui/react";
2
2
  import { colors } from "../foundations";
3
3
  import { getBoxShadowString } from "../utils/box-shadow-utils";
4
4
  import { focusVisible } from "../utils/focus-utils";
5
+ import { mode } from "@chakra-ui/theme-tools";
5
6
 
6
7
  const config = defineStyleConfig({
7
8
  baseStyle: (props: any) => ({
@@ -22,7 +23,7 @@ const config = defineStyleConfig({
22
23
  ...focusVisible({
23
24
  focus: {
24
25
  boxShadow: getBoxShadowString({
25
- borderColor: "greenHaze",
26
+ borderColor: mode("greenHaze", "azure")(props),
26
27
  borderWidth: 2,
27
28
  isInset: false,
28
29
  }),
@@ -61,13 +62,18 @@ type CardThemeProps = {
61
62
  size: "sm" | "lg";
62
63
  };
63
64
 
64
- function getColorSchemeBaseProps({ colorScheme }: CardThemeProps): {
65
- backgroundColor: string;
66
- } {
65
+ const getColorSchemeBaseProps= (props: CardThemeProps) => {
66
+ const { colorScheme, size } = props;
67
+ const baseShadow = size === "lg" ? "md" : "sm";
67
68
  switch (colorScheme) {
68
69
  case "white":
69
70
  return {
70
- backgroundColor: "white",
71
+ backgroundColor: mode("white", "whiteAlpha.100")(props),
72
+ boxShadow: getBoxShadowString({
73
+ baseShadow,
74
+ borderColor: "silver",
75
+ isInset: false,
76
+ }),
71
77
  };
72
78
  case "grey":
73
79
  return {
@@ -116,12 +122,14 @@ function getColorSchemeClickableProps({ colorScheme, size }: CardThemeProps) {
116
122
  }
117
123
  }
118
124
 
119
- function getColorSchemeHoverProps({ colorScheme, size }: CardThemeProps) {
125
+ const getColorSchemeHoverProps = (props: CardThemeProps) => {
126
+ const { colorScheme, size } = props;
120
127
  const baseShadow = size === "lg" ? "lg" : "md";
121
128
  switch (colorScheme) {
122
129
  case "white":
123
130
  return {
124
- boxShadow: getBoxShadowString({
131
+ backgroundColor: mode("white", "whiteAlpha.200")(props),
132
+ boxShadow: getBoxShadowString({
125
133
  baseShadow,
126
134
  borderColor: colors.steel,
127
135
  isInset: false,
@@ -146,13 +154,13 @@ function getColorSchemeHoverProps({ colorScheme, size }: CardThemeProps) {
146
154
  };
147
155
  }
148
156
  }
149
-
150
- function getColorSchemeActiveProps({ colorScheme, size }: CardThemeProps) {
157
+ const getColorSchemeActiveProps = (props: CardThemeProps) => {
158
+ const { colorScheme, size } = props;
151
159
  const baseShadow = size === "lg" ? "sm" : "none";
152
160
  switch (colorScheme) {
153
161
  case "white":
154
162
  return {
155
- backgroundColor: "mint",
163
+ backgroundColor: mode("mint", "teal")(props),
156
164
  boxShadow: getBoxShadowString({
157
165
  baseShadow,
158
166
  borderColor: colors.silver,
@@ -1,39 +1,40 @@
1
1
  import { defineStyleConfig } from "@chakra-ui/react";
2
- import { cssVar } from "@chakra-ui/theme-tools";
2
+ import { cssVar, mode } from "@chakra-ui/theme-tools";
3
3
  import { getBoxShadowString } from "../utils/box-shadow-utils";
4
4
  import { focusVisible } from "../utils/focus-utils";
5
5
 
6
6
  const $size = cssVar("close-button-size");
7
7
 
8
8
  const config = defineStyleConfig({
9
- baseStyle: {
9
+ baseStyle: (props) => ({
10
10
  w: [$size.reference],
11
11
  h: [$size.reference],
12
12
  transitionProperty: "common",
13
13
  transitionDuration: "normal",
14
- borderRadius: "xs",
14
+ borderRadius: "md",
15
15
  backgroundColor: "transparent",
16
- color: "darkGrey",
16
+ color: mode("darkGrey", "white")(props),
17
17
  fontWeight: "normal",
18
18
  ...focusVisible({
19
19
  focus: {
20
20
  outline: "none",
21
- boxShadow: getBoxShadowString({ borderColor: "greenHaze" }),
21
+ boxShadow: getBoxShadowString({ borderColor: mode("greenHaze", "azure")(props) }),
22
+ outlineOffset: "2px",
22
23
  },
23
24
  notFocus: {
24
25
  boxShadow: "none",
25
26
  },
26
27
  }),
27
28
  _hover: {
28
- backgroundColor: "seaMist",
29
+ backgroundColor: mode("seaMist", "pine")(props),
29
30
  _disabled: {
30
31
  color: "dimGrey",
31
32
  },
32
33
  },
33
34
  _active: {
34
- backgroundColor: "mint",
35
+ backgroundColor: mode("mint", "whiteAlpha.200")(props),
35
36
  },
36
- },
37
+ }),
37
38
  sizes: {
38
39
  lg: {
39
40
  [$size.variable]: "40px",
@@ -19,7 +19,6 @@ const parts = anatomy("datepicker").parts(
19
19
  const $arrowBackground = cssVar("popper-arrow-bg");
20
20
 
21
21
  const helpers = createMultiStyleConfigHelpers(parts.keys);
22
-
23
22
  const config = helpers.defineMultiStyleConfig({
24
23
  baseStyle: (props) => ({
25
24
  wrapper: {
@@ -29,6 +28,7 @@ const config = helpers.defineMultiStyleConfig({
29
28
  }),
30
29
  transitionProperty: "box-shadow",
31
30
  transitionDuration: "fast",
31
+ borderRadius: "sm",
32
32
  display: "flex",
33
33
  flex: 1,
34
34
  paddingY: 0.5,
@@ -80,27 +80,26 @@ const config = helpers.defineMultiStyleConfig({
80
80
  },
81
81
  calendarTriggerButton: {
82
82
  backgroundColor: mode("white", "night")(props),
83
- boxShadow: `${getBoxShadowString({
84
- borderColor: mode("blackAlpha.400", "whiteAlpha.400")(props),
85
- })}, inset 1px 0 0 1px ${mode("white", colors.night)(props)}`, // to make the shadow colors not multiply
83
+ boxShadow: "none",
86
84
  width: 8,
87
85
  display: "flex",
88
86
  alignItems: "center",
89
87
  justifyContent: "center",
90
- borderRightRadius: "sm",
88
+ borderLeftRadius: "sm",
91
89
  transitionProperty: "box-shadow, background-color",
92
90
  transitionSpeed: "fast",
93
91
  position: "relative",
94
- left: "-1px", // To make the box-shadows overlap
92
+ paddingTop: 1,
93
+ paddingBottom: 1,
94
+ borderRadius: "sm",
95
+ right: "9px",
95
96
 
96
97
  _hover: {
97
- boxShadow: `${getBoxShadowString({
98
- borderColor: mode("darkGrey", "white")(props),
99
- borderWidth: 2,
100
- })}, inset 2px 0 0 2px ${mode("white", colors.night)(props)}`,
98
+ boxShadow: "none",
99
+ backgroundColor: mode("seaMist", "pine")(props),
101
100
  },
102
101
  _active: {
103
- backgroundColor: mode("mint", "azure")(props),
102
+ backgroundColor: mode("mint", "whiteAlpha.200")(props),
104
103
  },
105
104
  ...focusVisible({
106
105
  focus: {
@@ -124,18 +123,22 @@ const config = helpers.defineMultiStyleConfig({
124
123
  }),
125
124
  },
126
125
  },
127
- arrow: {
126
+ arrow: {
128
127
  [$arrowBackground.variable]: mode("white", colors.night)(props),
129
- },
128
+ },
130
129
  calendar: {
131
130
  backgroundColor: mode("white", "night")(props),
132
131
  color: mode("darkGrey", "white")(props),
132
+ boxShadow: getBoxShadowString({
133
+ borderWidth: 2,
134
+ borderColor: mode("blackAlpha.200", "whiteAlpha.200")(props),
135
+ }),
133
136
  },
134
137
  weekdays: {
135
138
  color: mode("darkGrey", "white")(props),
136
139
  },
137
140
  weekend: {
138
- color: mode("greenHaze", "azure")(props),
141
+ color: mode("darkTeal", "seaMist")(props),
139
142
  },
140
143
  dateCell: {
141
144
  backgroundColor: mode("white", "night")(props),
@@ -195,7 +198,7 @@ const config = helpers.defineMultiStyleConfig({
195
198
  "&[data-today]": {
196
199
  boxShadow: getBoxShadowString({
197
200
  borderWidth: 1,
198
- borderColor: mode("osloGrey", "dimGrey")(props),
201
+ borderColor: mode("blackAlpha.400", "whiteAlpha.400")(props),
199
202
  }),
200
203
  _focus: {
201
204
  outline: "none",
@@ -212,16 +215,64 @@ const config = helpers.defineMultiStyleConfig({
212
215
  },
213
216
  }),
214
217
  variants: {
215
- simple: {
216
- wrapper: {
217
- borderRadius: "sm",
218
+ base: (props) => ({
219
+ calendar: {
220
+ backgroundColor: mode("white", "night")(props),
221
+ color: mode("darkGrey", "white")(props),
222
+ boxShadow: getBoxShadowString({
223
+ borderWidth: 2,
224
+ borderColor: mode("blackAlpha.200", "whiteAlpha.200")(props),
225
+ }),
218
226
  },
219
- },
220
- "with-trigger": {
221
- wrapper: {
222
- borderLeftRadius: "sm",
227
+ dateCell: {
228
+ color: mode("darkGrey", "white")(props),
229
+ _hover: {
230
+ backgroundColor: mode("seaMist", "pine")(props),
231
+ },
232
+ "&[data-today]": {
233
+ boxShadow: getBoxShadowString({
234
+ borderWidth: 1,
235
+ borderColor: mode("blackAlpha.400", "whiteAlpha.400")(props),
236
+ }),
237
+ },
223
238
  },
224
- },
239
+ }),
240
+ floating: (props) => ({
241
+ calendar: {
242
+ backgroundColor: mode("white", "night")(props),
243
+ color: mode("darkGrey", "white")(props),
244
+ boxShadow: getBoxShadowString({
245
+ borderColor: mode("grey.200", "whiteAlpha.400")(props),
246
+ baseShadow: "sm",
247
+ }),
248
+ },
249
+ dateCell: {
250
+ color: mode("darkGrey", "white")(props),
251
+ _hover: {
252
+ backgroundColor: mode("", "")(props),
253
+ },
254
+ },
255
+ }),
256
+ ghost: (props) => ({
257
+ calendar: {
258
+ backgroundColor: mode("white", "night")(props),
259
+ color: mode("darkGrey", "white")(props),
260
+ boxShadow: getBoxShadowString({
261
+ borderWidth: 2,
262
+ borderColor: mode("", "")(props),
263
+ }),
264
+ },
265
+ dateCell: {
266
+ color: mode("darkGrey", "white")(props),
267
+ _hover: {
268
+ backgroundColor: mode("seaMist", "pine")(props),
269
+ },
270
+ _selected: {
271
+ backgroundColor: mode("", "primaryGreen")(props),
272
+ color: "darkGrey"
273
+ },
274
+ },
275
+ }),
225
276
  },
226
277
  });
227
278