@vygruppen/spor-react 12.24.15 → 13.0.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 (88) hide show
  1. package/.turbo/turbo-build.log +10 -10
  2. package/.turbo/turbo-postinstall.log +4 -3
  3. package/CHANGELOG.md +25 -0
  4. package/dist/index.cjs +2888 -2534
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.cts +921 -572
  7. package/dist/index.d.ts +921 -572
  8. package/dist/index.mjs +2860 -2517
  9. package/dist/index.mjs.map +1 -1
  10. package/package.json +8 -8
  11. package/src/accordion/Accordion.tsx +34 -29
  12. package/src/accordion/Expandable.tsx +20 -21
  13. package/src/alert/Alert.tsx +7 -5
  14. package/src/alert/AlertIcon.tsx +19 -20
  15. package/src/alert/ExpandableAlert.tsx +65 -64
  16. package/src/alert/ServiceAlert.tsx +78 -78
  17. package/src/breadcrumb/Breadcrumb.tsx +37 -34
  18. package/src/button/Button.tsx +64 -57
  19. package/src/button/ButtonGroup.tsx +12 -10
  20. package/src/button/Clipboard.tsx +21 -18
  21. package/src/button/CloseButton.tsx +19 -17
  22. package/src/button/FloatingActionButton.tsx +41 -47
  23. package/src/button/IconButton.tsx +20 -18
  24. package/src/calendar/CalendarContext.tsx +1 -1
  25. package/src/color-mode/color-mode.tsx +7 -5
  26. package/src/datepicker/CalendarTriggerButton.tsx +11 -7
  27. package/src/datepicker/DateField.tsx +53 -51
  28. package/src/datepicker/DatePicker.tsx +127 -134
  29. package/src/datepicker/DateTimeSegment.tsx +44 -40
  30. package/src/datepicker/StyledField.tsx +39 -36
  31. package/src/dialog/Dialog.tsx +14 -11
  32. package/src/dialog/Drawer.tsx +74 -67
  33. package/src/input/AttachedInputs.tsx +35 -41
  34. package/src/input/Autocomplete.tsx +118 -129
  35. package/src/input/CardSelect.tsx +67 -65
  36. package/src/input/Checkbox.tsx +19 -17
  37. package/src/input/CheckboxGroup.tsx +0 -2
  38. package/src/input/ChoiceChip.tsx +42 -38
  39. package/src/input/Combobox.tsx +4 -4
  40. package/src/input/CountryCodeSelect.tsx +8 -8
  41. package/src/input/Field.tsx +78 -75
  42. package/src/input/FloatingLabel.tsx +6 -8
  43. package/src/input/Input.tsx +87 -92
  44. package/src/input/ListBox.tsx +3 -4
  45. package/src/input/Menu.tsx +241 -0
  46. package/src/input/NativeSelect.tsx +7 -5
  47. package/src/input/NumericStepper.tsx +15 -12
  48. package/src/input/PasswordInput.tsx +65 -61
  49. package/src/input/PhoneNumberInput.tsx +7 -7
  50. package/src/input/Popover.tsx +52 -55
  51. package/src/input/Radio.tsx +16 -11
  52. package/src/input/SearchInput.tsx +32 -31
  53. package/src/input/Select.tsx +106 -96
  54. package/src/input/Switch.tsx +43 -41
  55. package/src/input/Textarea.tsx +68 -66
  56. package/src/input/index.ts +1 -0
  57. package/src/layout/PressableCard.tsx +11 -10
  58. package/src/layout/RadioCard.tsx +57 -53
  59. package/src/layout/Separator.tsx +8 -7
  60. package/src/layout/StaticCard.tsx +11 -10
  61. package/src/linjetag/LineIcon.tsx +48 -54
  62. package/src/linjetag/TravelTag.tsx +57 -59
  63. package/src/link/TextLink.tsx +50 -40
  64. package/src/loader/ProgressBar.tsx +41 -46
  65. package/src/loader/ProgressLoader.tsx +83 -86
  66. package/src/loader/Skeleton.tsx +56 -48
  67. package/src/logo/CargonetLogo.tsx +88 -87
  68. package/src/logo/VyLogo.tsx +80 -77
  69. package/src/logo/VyLogoPride.tsx +137 -135
  70. package/src/media-controller/JumpButton.tsx +30 -28
  71. package/src/media-controller/PlayPauseButton.tsx +8 -7
  72. package/src/media-controller/SkipButton.tsx +28 -26
  73. package/src/nudge/Nudge.tsx +66 -70
  74. package/src/pagination/Pagination.tsx +52 -46
  75. package/src/popover/index.tsx +46 -41
  76. package/src/progress-indicator/ProgressIndicator.tsx +10 -7
  77. package/src/stepper/Stepper.tsx +84 -81
  78. package/src/tab/Tabs.tsx +8 -4
  79. package/src/table/Table.tsx +89 -109
  80. package/src/theme/slot-recipes/anatomy.ts +14 -0
  81. package/src/theme/slot-recipes/index.ts +2 -0
  82. package/src/theme/slot-recipes/menu.ts +111 -0
  83. package/src/tooltip.tsx +26 -22
  84. package/src/typography/Badge.tsx +8 -5
  85. package/src/typography/Code.tsx +8 -5
  86. package/src/typography/Heading.tsx +22 -23
  87. package/src/typography/Text.tsx +11 -9
  88. package/tsconfig.json +1 -0
@@ -8,7 +8,12 @@ import {
8
8
  LinkOutOutline18Icon,
9
9
  LinkOutOutline24Icon,
10
10
  } from "@vygruppen/spor-icon-react";
11
- import React, { cloneElement, forwardRef, isValidElement } from "react";
11
+ import React, {
12
+ cloneElement,
13
+ isValidElement,
14
+ PropsWithChildren,
15
+ ReactNode,
16
+ } from "react";
12
17
 
13
18
  import { createTexts, useTranslation } from "@/i18n";
14
19
 
@@ -46,43 +51,25 @@ const ExternalIcon = ({
46
51
  </>
47
52
  );
48
53
 
49
- export const TextLink = forwardRef<HTMLAnchorElement, LinkProps>(
50
- ({ children, external, href, ...props }, ref) => {
51
- const { t } = useTranslation();
54
+ export const TextLink = ({
55
+ ref,
56
+ children,
57
+ external,
58
+ href,
59
+ ...props
60
+ }: LinkProps & {
61
+ ref?: React.RefObject<HTMLAnchorElement>;
62
+ }) => {
63
+ const { t } = useTranslation();
52
64
 
53
- const isExternal =
54
- external ??
55
- Boolean(href?.startsWith("http://") || href?.startsWith("https://"));
65
+ const isExternal =
66
+ external ??
67
+ Boolean(href?.startsWith("http://") || href?.startsWith("https://"));
56
68
 
57
- const externalLabel = t ? t(texts.externalLink) : texts.externalLink.en;
58
-
59
- // If asChild is true, we need to clone the children and add the external icon
60
- if (props.asChild && isValidElement(children)) {
61
- return (
62
- <ChakraLink
63
- href={href}
64
- {...props}
65
- ref={ref}
66
- {...(isExternal && {
67
- target: "_blank",
68
- rel: "noopener noreferrer",
69
- })}
70
- >
71
- {cloneElement(children as React.ReactElement, {
72
- ...children.props,
73
- children: (
74
- <>
75
- {children.props.children}
76
- {isExternal && (
77
- <ExternalIcon label={externalLabel} size={props.size} />
78
- )}
79
- </>
80
- ),
81
- })}
82
- </ChakraLink>
83
- );
84
- }
69
+ const externalLabel = t ? t(texts.externalLink) : texts.externalLink.en;
85
70
 
71
+ // If asChild is true, we need to clone the children and add the external icon
72
+ if (props.asChild && isValidElement(children)) {
86
73
  return (
87
74
  <ChakraLink
88
75
  href={href}
@@ -93,13 +80,36 @@ export const TextLink = forwardRef<HTMLAnchorElement, LinkProps>(
93
80
  rel: "noopener noreferrer",
94
81
  })}
95
82
  >
96
- {children}
97
- {isExternal && <ExternalIcon label={externalLabel} size={props.size} />}
83
+ {cloneElement(children as React.ReactElement<{ children: ReactNode }>, {
84
+ ...(children.props as object),
85
+ children: (
86
+ <>
87
+ {(children.props as PropsWithChildren).children}
88
+ {isExternal && (
89
+ <ExternalIcon label={externalLabel} size={props.size} />
90
+ )}
91
+ </>
92
+ ),
93
+ })}
98
94
  </ChakraLink>
99
95
  );
100
- },
101
- );
102
- TextLink.displayName = "TextLink";
96
+ }
97
+
98
+ return (
99
+ <ChakraLink
100
+ href={href}
101
+ {...props}
102
+ ref={ref}
103
+ {...(isExternal && {
104
+ target: "_blank",
105
+ rel: "noopener noreferrer",
106
+ })}
107
+ >
108
+ {children}
109
+ {isExternal && <ExternalIcon label={externalLabel} size={props.size} />}
110
+ </ChakraLink>
111
+ );
112
+ };
103
113
 
104
114
  const texts = createTexts({
105
115
  externalLink: {
@@ -6,7 +6,7 @@ import {
6
6
  UseProgressProps,
7
7
  useSlotRecipe,
8
8
  } from "@chakra-ui/react";
9
- import React, { forwardRef, PropsWithChildren } from "react";
9
+ import React, { PropsWithChildren } from "react";
10
10
 
11
11
  import { progressBarRecipe } from "../theme/slot-recipes/progress-bar";
12
12
  import { useRotatingLabel } from "./useRotatingLabel";
@@ -75,50 +75,45 @@ export type ProgressBarProps = BoxProps &
75
75
  * ```
76
76
  */
77
77
 
78
- export const ProgressBar = forwardRef<HTMLDivElement, ProgressBarProps>(
79
- (
80
- {
81
- value,
82
- label,
83
- labelRotationDelay = 5000,
84
- isActive = true,
85
- showValueText = false,
86
- height = "0.5rem",
87
- css,
88
- ...rest
89
- },
90
- ref,
91
- ) => {
92
- const recipe = useSlotRecipe({ key: "progressbar" });
93
- const styles = recipe({});
94
- const currentLoadingText = useRotatingLabel({
95
- label,
96
- delay: labelRotationDelay,
97
- });
78
+ export const ProgressBar = ({
79
+ ref,
80
+ value,
81
+ label,
82
+ labelRotationDelay = 5000,
83
+ isActive = true,
84
+ showValueText = false,
85
+ height = "0.5rem",
86
+ css,
87
+ ...rest
88
+ }: ProgressBarProps & {
89
+ ref?: React.RefObject<HTMLDivElement>;
90
+ }) => {
91
+ const recipe = useSlotRecipe({ key: "progressbar" });
92
+ const styles = recipe({});
93
+ const currentLoadingText = useRotatingLabel({
94
+ label,
95
+ delay: labelRotationDelay,
96
+ });
98
97
 
99
- return (
100
- <Progress.Root
101
- css={{ ...styles.container, ...css }}
102
- ref={ref}
103
- value={value}
104
- {...rest}
98
+ return (
99
+ <Progress.Root
100
+ css={{ ...styles.container, ...css }}
101
+ ref={ref}
102
+ value={value}
103
+ {...rest}
104
+ >
105
+ <Progress.Track
106
+ height={height}
107
+ css={isActive ? styles.background : styles.disabledBackground}
105
108
  >
106
- <Progress.Track
107
- height={height}
108
- css={isActive ? styles.background : styles.disabledBackground}
109
- >
110
- <Progress.Range css={styles.progress} />
111
- </Progress.Track>
112
-
113
- {label && (
114
- <Progress.Label css={styles.description}>
115
- {currentLoadingText}
116
- </Progress.Label>
117
- )}
118
-
119
- {showValueText && <Progress.ValueText>{value}%</Progress.ValueText>}
120
- </Progress.Root>
121
- );
122
- },
123
- );
124
- ProgressBar.displayName = "ProgressBar";
109
+ <Progress.Range css={styles.progress} />
110
+ </Progress.Track>
111
+ {label && (
112
+ <Progress.Label css={styles.description}>
113
+ {currentLoadingText}
114
+ </Progress.Label>
115
+ )}
116
+ {showValueText && <Progress.ValueText>{value}%</Progress.ValueText>}
117
+ </Progress.Root>
118
+ );
119
+ };
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { BoxProps, chakra, RecipeVariantProps, Text } from "@chakra-ui/react";
3
- import React, { forwardRef, useEffect, useId, useRef, useState } from "react";
3
+ import React, { useEffect, useId, useRef, useState } from "react";
4
4
  import { useProgressBar } from "react-aria";
5
5
 
6
6
  import { createTexts, useTranslation } from "..";
@@ -87,93 +87,90 @@ const ProgressLoaderWrapper = chakra("div", progressLoaderRecipe);
87
87
  * ```
88
88
  */
89
89
 
90
- export const ProgressLoader = forwardRef<HTMLDivElement, ProgressLoaderProps>(
91
- (
92
- {
93
- value,
94
- label,
95
- labelRotationDelay = 5000,
96
- "aria-label": ariaLabel,
97
- width,
98
- ...rest
99
- },
100
- ref,
101
- ) => {
102
- const { t } = useTranslation();
103
- const currentLoadingText = useRotatingLabel({
104
- label,
105
- delay: labelRotationDelay,
106
- });
107
- const { labelProps, progressBarProps } = useProgressBar({
108
- isIndeterminate: value === undefined,
109
- value,
110
- "aria-label": ariaLabel ?? t(texts.fallbackLabel(value ?? "?")),
111
- });
112
- const {
113
- pathRef,
114
- pathLength: progressPathLength,
115
- progressOffset,
116
- } = usePathLength(value);
90
+ export const ProgressLoader = ({
91
+ ref,
92
+ value,
93
+ label,
94
+ labelRotationDelay = 5000,
95
+ "aria-label": ariaLabel,
96
+ width,
97
+ ...rest
98
+ }: ProgressLoaderProps & {
99
+ ref?: React.RefObject<HTMLDivElement>;
100
+ }) => {
101
+ const { t } = useTranslation();
102
+ const currentLoadingText = useRotatingLabel({
103
+ label,
104
+ delay: labelRotationDelay,
105
+ });
106
+ const { labelProps, progressBarProps } = useProgressBar({
107
+ isIndeterminate: value === undefined,
108
+ value,
109
+ "aria-label": ariaLabel ?? t(texts.fallbackLabel(value ?? "?")),
110
+ });
111
+ const {
112
+ pathRef,
113
+ pathLength: progressPathLength,
114
+ progressOffset,
115
+ } = usePathLength(value);
117
116
 
118
- const id = useId();
117
+ const id = useId();
119
118
 
120
- return (
121
- <ProgressLoaderWrapper
122
- {...progressBarProps}
123
- width={width}
124
- role="progressbar"
125
- aria-valuenow={value}
126
- aria-valuemin={0}
127
- aria-valuemax={100}
128
- aria-label={ariaLabel ?? t(texts.fallbackLabel(value ?? "?"))}
129
- {...rest}
130
- ref={ref}
131
- >
132
- <chakra.svg as="svg" viewBox="0 0 246 78" fill="none">
133
- <path
134
- id={`${id}-start-dot`}
135
- d="M14.0479 44.8251C19.4332 44.8251 23.7988 40.5242 23.7988 35.2187C23.7988 29.9133 19.4332 25.6124 14.0479 25.6124C8.66254 25.6124 4.29688 29.9133 4.29688 35.2187C4.29688 40.5242 8.66254 44.8251 14.0479 44.8251Z"
136
- fill="#FFB466"
137
- />
138
- <path
139
- id={`${id}-track`}
140
- d="M204.911 39.1156C204.911 39.1156 175.012 46.8319 157.651 30.4354C140.29 14.0388 121 21.7547 110.391 47.6529C103.22 65.157 78.9634 67.0859 67.9533 47.6529C59.8376 33.3287 36.125 37.1866 36.125 37.1866"
141
- strokeWidth="13.6469"
142
- strokeLinecap="round"
143
- strokeLinejoin="round"
144
- />
145
- <path
146
- id={`${id}-progress`}
147
- d="M204.911 39.1156C204.911 39.1156 175.012 46.8319 157.651 30.4354C140.29 14.0388 121 21.7547 110.391 47.6529C103.22 65.157 78.9634 67.0859 67.9533 47.6529C59.8376 33.3287 36.125 37.1866 36.125 37.1866"
148
- strokeWidth="13.6469"
149
- strokeLinecap="round"
150
- strokeLinejoin="round"
151
- strokeDasharray={progressPathLength}
152
- strokeDashoffset={progressOffset}
153
- style={{ transition: "stroke-dashoffset .2s ease-out" }}
154
- ref={pathRef}
155
- />
156
- <path
157
- id={`${id}-end-dot`}
158
- d="M226.025 44.8251C231.411 44.8251 235.776 40.5242 235.776 35.2187C235.776 29.9133 231.411 25.6124 226.025 25.6124C220.64 25.6124 216.274 29.9133 216.274 35.2187C216.274 40.5242 220.64 44.8251 226.025 44.8251Z"
159
- fill="#688CBA"
160
- />
161
- </chakra.svg>
162
- {currentLoadingText && (
163
- <Text
164
- textAlign="center"
165
- marginTop={2}
166
- fontWeight="bold"
167
- {...labelProps}
168
- >
169
- {currentLoadingText}
170
- </Text>
171
- )}
172
- </ProgressLoaderWrapper>
173
- );
174
- },
175
- );
176
- ProgressLoader.displayName = "ProgressLoader";
119
+ return (
120
+ <ProgressLoaderWrapper
121
+ {...progressBarProps}
122
+ width={width}
123
+ role="progressbar"
124
+ aria-valuenow={value}
125
+ aria-valuemin={0}
126
+ aria-valuemax={100}
127
+ aria-label={ariaLabel ?? t(texts.fallbackLabel(value ?? "?"))}
128
+ {...rest}
129
+ ref={ref}
130
+ >
131
+ <chakra.svg as="svg" viewBox="0 0 246 78" fill="none">
132
+ <path
133
+ id={`${id}-start-dot`}
134
+ d="M14.0479 44.8251C19.4332 44.8251 23.7988 40.5242 23.7988 35.2187C23.7988 29.9133 19.4332 25.6124 14.0479 25.6124C8.66254 25.6124 4.29688 29.9133 4.29688 35.2187C4.29688 40.5242 8.66254 44.8251 14.0479 44.8251Z"
135
+ fill="#FFB466"
136
+ />
137
+ <path
138
+ id={`${id}-track`}
139
+ d="M204.911 39.1156C204.911 39.1156 175.012 46.8319 157.651 30.4354C140.29 14.0388 121 21.7547 110.391 47.6529C103.22 65.157 78.9634 67.0859 67.9533 47.6529C59.8376 33.3287 36.125 37.1866 36.125 37.1866"
140
+ strokeWidth="13.6469"
141
+ strokeLinecap="round"
142
+ strokeLinejoin="round"
143
+ />
144
+ <path
145
+ id={`${id}-progress`}
146
+ d="M204.911 39.1156C204.911 39.1156 175.012 46.8319 157.651 30.4354C140.29 14.0388 121 21.7547 110.391 47.6529C103.22 65.157 78.9634 67.0859 67.9533 47.6529C59.8376 33.3287 36.125 37.1866 36.125 37.1866"
147
+ strokeWidth="13.6469"
148
+ strokeLinecap="round"
149
+ strokeLinejoin="round"
150
+ strokeDasharray={progressPathLength}
151
+ strokeDashoffset={progressOffset}
152
+ style={{ transition: "stroke-dashoffset .2s ease-out" }}
153
+ ref={pathRef}
154
+ />
155
+ <path
156
+ id={`${id}-end-dot`}
157
+ d="M226.025 44.8251C231.411 44.8251 235.776 40.5242 235.776 35.2187C235.776 29.9133 231.411 25.6124 226.025 25.6124C220.64 25.6124 216.274 29.9133 216.274 35.2187C216.274 40.5242 220.64 44.8251 226.025 44.8251Z"
158
+ fill="#688CBA"
159
+ />
160
+ </chakra.svg>
161
+ {currentLoadingText && (
162
+ <Text
163
+ textAlign="center"
164
+ marginTop={2}
165
+ fontWeight="bold"
166
+ {...labelProps}
167
+ >
168
+ {currentLoadingText}
169
+ </Text>
170
+ )}
171
+ </ProgressLoaderWrapper>
172
+ );
173
+ };
177
174
 
178
175
  const texts = createTexts({
179
176
  fallbackLabel: (value) => ({
@@ -11,7 +11,6 @@ import {
11
11
  useRecipe,
12
12
  } from "@chakra-ui/react";
13
13
  import * as React from "react";
14
- import { forwardRef } from "react";
15
14
 
16
15
  import { skeletonRecipe } from "@/theme/recipes/skeleton";
17
16
 
@@ -22,10 +21,12 @@ export type SkeletonCircleProps = ChakraSkeletonProps &
22
21
  size?: CircleProps["size"];
23
22
  };
24
23
 
25
- export const SkeletonCircle = React.forwardRef<
26
- HTMLDivElement,
27
- SkeletonCircleProps
28
- >(function SkeletonCircle(props, ref) {
24
+ export const SkeletonCircle = function SkeletonCircle({
25
+ ref,
26
+ ...props
27
+ }: SkeletonCircleProps & {
28
+ ref?: React.RefObject<HTMLDivElement>;
29
+ }) {
29
30
  const recipe = useRecipe({ key: "skeleton" });
30
31
 
31
32
  const [recipeProps, restProps] = recipe.splitVariantProps({
@@ -41,58 +42,65 @@ export const SkeletonCircle = React.forwardRef<
41
42
  <ChakraSkeleton css={{ ...recipe(recipeProps), ...css }} {...rest} />
42
43
  </Circle>
43
44
  );
44
- });
45
+ };
45
46
 
46
47
  export type SkeletonTextProps = ChakraSkeletonProps &
47
48
  SkeletonVariantProps & {
48
49
  noOfLines?: number;
49
50
  };
50
51
 
51
- export const SkeletonText = forwardRef<HTMLDivElement, SkeletonTextProps>(
52
- function SkeletonText(props, ref) {
53
- const recipe = useRecipe({ key: "skeleton" });
54
- const [recipeProps, restProps] = recipe.splitVariantProps({
55
- loading: true,
56
- variant: "pulse",
57
- ...props,
58
- });
59
- const { noOfLines = 3, height = "0.5rem", gap, css, ...rest } = restProps;
52
+ export const SkeletonText = function SkeletonText(
53
+ props: SkeletonTextProps & { ref?: React.Ref<HTMLDivElement> },
54
+ ) {
55
+ const recipe = useRecipe({ key: "skeleton" });
56
+ const [recipeProps, restProps] = recipe.splitVariantProps({
57
+ loading: true,
58
+ variant: "pulse",
59
+ ...props,
60
+ });
60
61
 
61
- return (
62
- <Stack gap={gap} width="full" ref={ref}>
63
- {Array.from({ length: noOfLines }).map((_, index) => (
64
- <ChakraSkeleton
65
- height={height}
66
- css={{ ...recipe(recipeProps), ...css }}
67
- key={index}
68
- _last={{ maxW: "80%" }}
69
- {...rest}
70
- />
71
- ))}
72
- </Stack>
73
- );
74
- },
75
- );
62
+ const {
63
+ noOfLines = 3,
64
+ height = "0.5rem",
65
+ gap,
66
+ css,
67
+ ref,
68
+ ...rest
69
+ } = restProps;
76
70
 
71
+ return (
72
+ <Stack gap={gap} width="full" ref={ref}>
73
+ {Array.from({ length: noOfLines }).map((_, index) => (
74
+ <ChakraSkeleton
75
+ key={index}
76
+ height={height}
77
+ css={{ ...recipe(recipeProps), ...css }}
78
+ _last={{ maxW: "80%" }}
79
+ {...rest}
80
+ />
81
+ ))}
82
+ </Stack>
83
+ );
84
+ };
77
85
  export type SkeletonProps = ChakraSkeletonProps & SkeletonVariantProps;
78
86
 
79
- export const Skeleton = forwardRef<HTMLDivElement, SkeletonTextProps>(
80
- function SkeletonText(props, ref) {
81
- const recipe = useRecipe({ key: "skeleton" });
82
- const [recipeProps, restProps] = recipe.splitVariantProps({
83
- loading: true,
84
- variant: "pulse",
85
- ...props,
86
- });
87
+ export const Skeleton = function Skeleton(
88
+ props: SkeletonProps & { ref?: React.Ref<HTMLDivElement> },
89
+ ) {
90
+ const recipe = useRecipe({ key: "skeleton" });
91
+ const [recipeProps, restProps] = recipe.splitVariantProps({
92
+ loading: true,
93
+ variant: "pulse",
94
+ ...props,
95
+ });
87
96
 
88
- const { css, ...rest } = restProps;
97
+ const { css, ref, ...rest } = restProps;
89
98
 
90
- return (
91
- <ChakraSkeleton
92
- ref={ref}
93
- css={{ ...recipe(recipeProps), ...css }}
94
- {...rest}
95
- />
96
- );
97
- },
98
- );
99
+ return (
100
+ <ChakraSkeleton
101
+ ref={ref}
102
+ css={{ ...recipe(recipeProps), ...css }}
103
+ {...rest}
104
+ />
105
+ );
106
+ };