@vygruppen/spor-react 12.4.5 → 12.4.7

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": "@vygruppen/spor-react",
3
- "version": "12.4.5",
3
+ "version": "12.4.7",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./dist/index.d.ts",
@@ -66,7 +66,7 @@
66
66
  "vitest": "^0.26.3",
67
67
  "vitest-axe": "^0.1.0",
68
68
  "vitest-canvas-mock": "^0.2.2",
69
- "@vygruppen/eslint-config": "1.1.0",
69
+ "@vygruppen/eslint-config": "1.1.1",
70
70
  "@vygruppen/tsconfig": "0.1.0"
71
71
  },
72
72
  "peerDependencies": {
@@ -45,6 +45,11 @@ type TimePickerProps = Omit<BoxProps, "defaultValue" | "onChange"> &
45
45
  minuteInterval?: number;
46
46
  /** Whether or not the field is disabled */
47
47
  disabled?: boolean;
48
+ /**
49
+ * The variant of the time picker.
50
+ * Defaults to "core".
51
+ */
52
+ variant?: "core" | "floating" | "ghost";
48
53
  };
49
54
  /** A time picker component.
50
55
  *
@@ -52,7 +52,6 @@ export const InfoTag = ({
52
52
  const recipe = useSlotRecipe({ key: "infoTag" });
53
53
 
54
54
  const styles = recipe({
55
- variant,
56
55
  size,
57
56
  ...customProps,
58
57
  });
@@ -24,7 +24,7 @@ type VariantProps = DefaultVariantProps | CustomVariantProps;
24
24
  export type LineIconProps = Exclude<BoxProps, "variant"> &
25
25
  VariantProps &
26
26
  PropsWithChildren<LineIconVariantProps> & {
27
- size: TagProps["size"];
27
+ size?: TagProps["size"];
28
28
  foregroundColor?: string;
29
29
  backgroundColor?: string;
30
30
  disabled?: boolean;
@@ -17,7 +17,7 @@ export type Size = "sm" | "md" | "lg";
17
17
  export type TagType = "info" | "travel";
18
18
 
19
19
  export type TagProps = VariantProps & {
20
- size: Size;
20
+ size?: Size;
21
21
  title: string;
22
22
  description?: string;
23
23
  };
@@ -16,7 +16,7 @@ type ProgressBarVariants = RecipeVariantProps<typeof progressBarRecipe>;
16
16
  export type ProgressBarProps = BoxProps &
17
17
  UseProgressProps &
18
18
  PropsWithChildren<ProgressBarVariants> & {
19
- children: React.ReactNode;
19
+ children?: React.ReactNode;
20
20
  /** The height of the progress bar.
21
21
  * Defaults to .5rem
22
22
  **/
@@ -28,12 +28,12 @@ export type ProgressBarProps = BoxProps &
28
28
  width?: BoxProps["width"];
29
29
 
30
30
  /** Pass if no label is passed to the label */
31
- "aria-label": string;
31
+ "aria-label"?: string;
32
32
  /** Optional text shown below the loader.
33
33
  *
34
34
  * If you pass an array of strings, the text will rotate every 5 seconds. If you want to change the delay, pass the delay in milliseconds to the `labelRotationDelay` prop.
35
35
  */
36
- label: string | string[];
36
+ label?: string | string[];
37
37
  /** The number of milliseconds a label is shown, if an array of strings is passed to the `label` prop.
38
38
  *
39
39
  * Defaults to 5000 (5 seconds).
@@ -94,24 +94,24 @@ export const accordionSlotRecipe = defineSlotRecipe({
94
94
  },
95
95
  "&:hover": {
96
96
  outlineWidth: tokens.size.stroke.md,
97
- outlineColor: "core.outline.hover",
98
- outline: "solid",
97
+ outlineColor: "core.outline",
98
+ outline: "2px solid",
99
99
 
100
100
  outlineOffset: 0,
101
101
  },
102
102
  "&:active": {
103
103
  backgroundColor: "core.surface.active",
104
104
  outlineWidth: tokens.size.stroke.sm,
105
- outlineColor: "core.outline.active",
106
- outline: "solid",
105
+ outline: "none",
107
106
  },
108
107
  },
109
108
  },
110
109
  floating: {
111
110
  item: {
112
- outline: "solid",
111
+ outline: "1px solid",
113
112
  outlineWidth: tokens.size.stroke.sm,
114
- outlineColor: "core.outline",
113
+ boxShadow: "sm",
114
+ outlineColor: "floating.outline",
115
115
  },
116
116
  itemTrigger: {
117
117
  _expanded: {
@@ -119,16 +119,15 @@ export const accordionSlotRecipe = defineSlotRecipe({
119
119
  },
120
120
  "&:hover": {
121
121
  outlineWidth: tokens.size.stroke.md,
122
+ outline: "1px solid",
122
123
  outlineColor: "floating.outline.hover",
123
- outline: "solid",
124
124
 
125
- outlineOffset: 0,
125
+ outlineOffset: 1,
126
126
  },
127
127
  "&:active": {
128
128
  backgroundColor: "floating.surface.active",
129
129
  outlineWidth: tokens.size.stroke.sm,
130
- outlineColor: "floating.outline.active",
131
- outline: "solid",
130
+ outline: "none",
132
131
  },
133
132
  },
134
133
  },
@@ -26,13 +26,17 @@ export const infoTagSlotRecipe = defineSlotRecipe({
26
26
  },
27
27
  variants: {
28
28
  variant: {
29
- walk: {
30
- iconContainer: {
31
- icon: {
32
- color: "text",
33
- },
34
- },
35
- },
29
+ walk: {},
30
+ ferry: {},
31
+ subway: {},
32
+ tram: {},
33
+ "local-train": {},
34
+ "region-train": {},
35
+ "region-express-train": {},
36
+ "long-distance-train": {},
37
+ "airport-express-train": {},
38
+ "vy-bus": {},
39
+ "local-bus": {},
36
40
  },
37
41
  size: {
38
42
  ...travelTagSlotRecipe.variants?.size,
@@ -1,6 +1,7 @@
1
1
  /** This file works as a proxy for all Chakra UI exports */
2
2
  export type { PortalProps, UseDisclosureProps } from "@chakra-ui/react";
3
3
  export {
4
+ ClientOnly,
4
5
  createListCollection,
5
6
  defineRecipe,
6
7
  defineStyle,