@vygruppen/spor-react 13.0.0 → 13.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 (77) hide show
  1. package/.turbo/turbo-build.log +8 -8
  2. package/.turbo/turbo-postinstall.log +3 -4
  3. package/CHANGELOG.md +6 -0
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.d.cts +83 -83
  6. package/dist/index.d.ts +83 -83
  7. package/dist/index.mjs.map +1 -1
  8. package/package.json +3 -3
  9. package/src/accordion/Accordion.tsx +3 -3
  10. package/src/accordion/Expandable.tsx +1 -1
  11. package/src/alert/Alert.tsx +1 -1
  12. package/src/alert/AlertIcon.tsx +1 -1
  13. package/src/alert/ExpandableAlert.tsx +1 -1
  14. package/src/alert/ServiceAlert.tsx +1 -1
  15. package/src/breadcrumb/Breadcrumb.tsx +1 -1
  16. package/src/button/Button.tsx +1 -1
  17. package/src/button/ButtonGroup.tsx +1 -1
  18. package/src/button/Clipboard.tsx +3 -3
  19. package/src/button/CloseButton.tsx +1 -1
  20. package/src/button/FloatingActionButton.tsx +1 -1
  21. package/src/button/IconButton.tsx +1 -1
  22. package/src/calendar/CalendarContext.tsx +1 -1
  23. package/src/color-mode/color-mode.tsx +1 -1
  24. package/src/datepicker/CalendarTriggerButton.tsx +1 -1
  25. package/src/datepicker/DateField.tsx +1 -1
  26. package/src/datepicker/DatePicker.tsx +1 -1
  27. package/src/datepicker/DateTimeSegment.tsx +1 -1
  28. package/src/datepicker/StyledField.tsx +1 -1
  29. package/src/dialog/Dialog.tsx +2 -2
  30. package/src/dialog/Drawer.tsx +4 -4
  31. package/src/input/AttachedInputs.tsx +1 -1
  32. package/src/input/Autocomplete.tsx +1 -1
  33. package/src/input/CardSelect.tsx +2 -2
  34. package/src/input/Checkbox.tsx +1 -1
  35. package/src/input/ChoiceChip.tsx +1 -1
  36. package/src/input/CountryCodeSelect.tsx +1 -1
  37. package/src/input/Field.tsx +2 -2
  38. package/src/input/FloatingLabel.tsx +1 -1
  39. package/src/input/Input.tsx +1 -1
  40. package/src/input/NativeSelect.tsx +1 -1
  41. package/src/input/NumericStepper.tsx +2 -2
  42. package/src/input/PasswordInput.tsx +2 -2
  43. package/src/input/PhoneNumberInput.tsx +1 -1
  44. package/src/input/Popover.tsx +1 -1
  45. package/src/input/Radio.tsx +2 -2
  46. package/src/input/SearchInput.tsx +1 -1
  47. package/src/input/Select.tsx +7 -7
  48. package/src/input/Switch.tsx +1 -1
  49. package/src/input/Textarea.tsx +1 -1
  50. package/src/input/useFLoatingInputState.tsx +1 -1
  51. package/src/layout/PressableCard.tsx +1 -1
  52. package/src/layout/RadioCard.tsx +2 -2
  53. package/src/layout/Separator.tsx +1 -1
  54. package/src/layout/StaticCard.tsx +1 -1
  55. package/src/linjetag/LineIcon.tsx +1 -1
  56. package/src/linjetag/TravelTag.tsx +1 -1
  57. package/src/link/TextLink.tsx +1 -1
  58. package/src/loader/ProgressBar.tsx +1 -1
  59. package/src/loader/ProgressLoader.tsx +1 -1
  60. package/src/loader/Skeleton.tsx +1 -1
  61. package/src/logo/CargonetLogo.tsx +1 -1
  62. package/src/logo/VyLogo.tsx +1 -1
  63. package/src/logo/VyLogoPride.tsx +1 -1
  64. package/src/media-controller/JumpButton.tsx +1 -1
  65. package/src/media-controller/PlayPauseButton.tsx +1 -1
  66. package/src/media-controller/SkipButton.tsx +1 -1
  67. package/src/nudge/Nudge.tsx +3 -3
  68. package/src/pagination/Pagination.tsx +5 -5
  69. package/src/popover/index.tsx +2 -2
  70. package/src/progress-indicator/ProgressIndicator.tsx +1 -1
  71. package/src/stepper/Stepper.tsx +1 -1
  72. package/src/tab/Tabs.tsx +1 -1
  73. package/src/tooltip.tsx +2 -2
  74. package/src/typography/Badge.tsx +1 -1
  75. package/src/typography/Code.tsx +1 -1
  76. package/src/typography/Heading.tsx +1 -1
  77. package/src/typography/Text.tsx +1 -1
@@ -47,7 +47,7 @@ export const StaticCard = ({
47
47
  ref,
48
48
  ...props
49
49
  }: StaticCardProps & {
50
- ref?: React.RefObject<HTMLDivElement>;
50
+ ref?: React.Ref<HTMLDivElement>;
51
51
  }) => {
52
52
  const recipe = useRecipe({ key: "staticCard" });
53
53
  const [recipeProps, restProps] = recipe.splitVariantProps(props);
@@ -74,7 +74,7 @@ export const LineIcon = function LineIcon({
74
74
  label,
75
75
  ...rest
76
76
  }: LineIconProps & {
77
- ref?: React.RefObject<HTMLDivElement>;
77
+ ref?: React.Ref<HTMLDivElement>;
78
78
  }) {
79
79
  const recipe = useSlotRecipe({ key: "lineIcon" });
80
80
  const styles = recipe({ variant, size, ...rest });
@@ -141,7 +141,7 @@ export const TravelTag = function TravelTag({
141
141
  customIconVariant,
142
142
  ...rest
143
143
  }: TravelTagProps & {
144
- ref?: React.RefObject<HTMLDivElement>;
144
+ ref?: React.Ref<HTMLDivElement>;
145
145
  }) {
146
146
  const recipie = useSlotRecipe({ key: "travelTag" });
147
147
  const styles = recipie({
@@ -58,7 +58,7 @@ export const TextLink = ({
58
58
  href,
59
59
  ...props
60
60
  }: LinkProps & {
61
- ref?: React.RefObject<HTMLAnchorElement>;
61
+ ref?: React.Ref<HTMLAnchorElement>;
62
62
  }) => {
63
63
  const { t } = useTranslation();
64
64
 
@@ -86,7 +86,7 @@ export const ProgressBar = ({
86
86
  css,
87
87
  ...rest
88
88
  }: ProgressBarProps & {
89
- ref?: React.RefObject<HTMLDivElement>;
89
+ ref?: React.Ref<HTMLDivElement>;
90
90
  }) => {
91
91
  const recipe = useSlotRecipe({ key: "progressbar" });
92
92
  const styles = recipe({});
@@ -96,7 +96,7 @@ export const ProgressLoader = ({
96
96
  width,
97
97
  ...rest
98
98
  }: ProgressLoaderProps & {
99
- ref?: React.RefObject<HTMLDivElement>;
99
+ ref?: React.Ref<HTMLDivElement>;
100
100
  }) => {
101
101
  const { t } = useTranslation();
102
102
  const currentLoadingText = useRotatingLabel({
@@ -25,7 +25,7 @@ export const SkeletonCircle = function SkeletonCircle({
25
25
  ref,
26
26
  ...props
27
27
  }: SkeletonCircleProps & {
28
- ref?: React.RefObject<HTMLDivElement>;
28
+ ref?: React.Ref<HTMLDivElement>;
29
29
  }) {
30
30
  const recipe = useRecipe({ key: "skeleton" });
31
31
 
@@ -13,7 +13,7 @@ export const CargonetLogo = ({
13
13
  ref,
14
14
  ...props
15
15
  }: CargonetLogoProps & {
16
- ref?: React.RefObject<SVGSVGElement>;
16
+ ref?: React.Ref<SVGSVGElement>;
17
17
  }) => {
18
18
  const { colorPalette } = props;
19
19
  // These colors should not be tokenized, as they are logo specific.
@@ -32,7 +32,7 @@ export const VyLogo = ({
32
32
  variant = "default",
33
33
  ...props
34
34
  }: VyLogoProps & {
35
- ref?: React.RefObject<SVGSVGElement>;
35
+ ref?: React.Ref<SVGSVGElement>;
36
36
  }) => {
37
37
  const id = useId();
38
38
 
@@ -8,7 +8,7 @@ export const VyLogoPride = ({
8
8
  ref,
9
9
  ...props
10
10
  }: VyLogoPrideProps & {
11
- ref?: React.RefObject<SVGSVGElement>;
11
+ ref?: React.Ref<SVGSVGElement>;
12
12
  }) => {
13
13
  // These colors should not be tokenized, as they are logo specific.
14
14
 
@@ -42,7 +42,7 @@ export const JumpButton = ({
42
42
  ref,
43
43
  ...props
44
44
  }: JumpButtonProps & {
45
- ref?: React.RefObject<HTMLButtonElement>;
45
+ ref?: React.Ref<HTMLButtonElement>;
46
46
  }) => {
47
47
  const { direction, disabled, size = "sm" } = props;
48
48
  const { t } = useTranslation();
@@ -32,7 +32,7 @@ export const PlayPauseButton = ({
32
32
  ref,
33
33
  ...props
34
34
  }: PlayPauseButtonProps & {
35
- ref?: React.RefObject<HTMLButtonElement>;
35
+ ref?: React.Ref<HTMLButtonElement>;
36
36
  }) => {
37
37
  const { playing, disabled, size = "sm" } = props;
38
38
 
@@ -31,7 +31,7 @@ export const SkipButton = ({
31
31
  ref,
32
32
  ...props
33
33
  }: SkipButtonProps & {
34
- ref?: React.RefObject<HTMLButtonElement>;
34
+ ref?: React.Ref<HTMLButtonElement>;
35
35
  }) => {
36
36
  const { direction, disabled, size = "sm" } = props;
37
37
 
@@ -70,7 +70,7 @@ export const NudgeTrigger = ({
70
70
  ref,
71
71
  ...props
72
72
  }: ChakraPopover.TriggerProps & {
73
- ref?: React.RefObject<HTMLButtonElement>;
73
+ ref?: React.Ref<HTMLButtonElement>;
74
74
  }) => {
75
75
  return <PopoverTrigger {...props} ref={ref} />;
76
76
  };
@@ -81,7 +81,7 @@ export const NudgeContent = ({
81
81
  children,
82
82
  ...props
83
83
  }: PopoverProps & {
84
- ref?: React.RefObject<HTMLDivElement>;
84
+ ref?: React.Ref<HTMLDivElement>;
85
85
  }) => {
86
86
  const [currentStep, setCurrentStep] = useState(1);
87
87
  const childrenArray = React.Children.toArray(children); // Convert children to an array
@@ -206,7 +206,7 @@ export const NudgeCloseTrigger = ({
206
206
  children,
207
207
  ...props
208
208
  }: ChakraPopover.TriggerProps & {
209
- ref?: React.RefObject<HTMLButtonElement>;
209
+ ref?: React.Ref<HTMLButtonElement>;
210
210
  }) => {
211
211
  const isStringChild = typeof children === "string";
212
212
 
@@ -41,7 +41,7 @@ export const Pagination = ({
41
41
  ref,
42
42
  ...props
43
43
  }: PaginationRootProps & {
44
- ref?: React.RefObject<HTMLDivElement>;
44
+ ref?: React.Ref<HTMLDivElement>;
45
45
  }) => {
46
46
  const { getHref, children, ...rest } = props;
47
47
  const recipe = useSlotRecipe({ key: "pagination" });
@@ -68,7 +68,7 @@ export const PaginationEllipsis = ({
68
68
  ref,
69
69
  ...props
70
70
  }: ChakraPagination.EllipsisProps & {
71
- ref?: React.RefObject<HTMLDivElement>;
71
+ ref?: React.Ref<HTMLDivElement>;
72
72
  }) => {
73
73
  return (
74
74
  <ListItem>
@@ -83,7 +83,7 @@ export const PaginationItem = ({
83
83
  ref,
84
84
  ...props
85
85
  }: ChakraPagination.ItemProps & {
86
- ref?: React.RefObject<HTMLButtonElement>;
86
+ ref?: React.Ref<HTMLButtonElement>;
87
87
  }) => {
88
88
  const rootProps = useRootProps();
89
89
  const { t } = useTranslation();
@@ -128,7 +128,7 @@ export const PaginationPrevTrigger = ({
128
128
  ref,
129
129
  ...props
130
130
  }: ChakraPagination.PrevTriggerProps & {
131
- ref?: React.RefObject<HTMLButtonElement>;
131
+ ref?: React.Ref<HTMLButtonElement>;
132
132
  }) => {
133
133
  const { page } = usePaginationContext();
134
134
  const recipe = useSlotRecipe({ key: "pagination" });
@@ -178,7 +178,7 @@ export const PaginationNextTrigger = ({
178
178
  ref,
179
179
  ...props
180
180
  }: ChakraPagination.NextTriggerProps & {
181
- ref?: React.RefObject<HTMLButtonElement>;
181
+ ref?: React.Ref<HTMLButtonElement>;
182
182
  }) => {
183
183
  const { page, totalPages } = usePaginationContext();
184
184
  const recipe = useSlotRecipe({ key: "pagination" });
@@ -17,7 +17,7 @@ export const PopoverTrigger = ({
17
17
  children,
18
18
  ...props
19
19
  }: ChakraPopover.TriggerProps & {
20
- ref?: React.RefObject<HTMLButtonElement>;
20
+ ref?: React.Ref<HTMLButtonElement>;
21
21
  }) => {
22
22
  const isStringChild = typeof children === "string";
23
23
 
@@ -39,7 +39,7 @@ export const PopoverContent = ({
39
39
  showCloseButton = false,
40
40
  ...props
41
41
  }: PopoverProps & {
42
- ref?: React.RefObject<HTMLDivElement>;
42
+ ref?: React.Ref<HTMLDivElement>;
43
43
  }) => {
44
44
  const { colorMode } = useColorMode();
45
45
 
@@ -44,7 +44,7 @@ export const ProgressIndicator = ({
44
44
  activeStep,
45
45
  css,
46
46
  }: ProgressIndicatorProps & {
47
- ref?: React.RefObject<HTMLDivElement>;
47
+ ref?: React.Ref<HTMLDivElement>;
48
48
  }) => {
49
49
  const { t } = useTranslation();
50
50
  const recipe = useSlotRecipe({
@@ -62,7 +62,7 @@ export const Stepper = function Stepper({
62
62
  ref,
63
63
  ...props
64
64
  }: StepperProps & {
65
- ref?: React.RefObject<HTMLDivElement>;
65
+ ref?: React.Ref<HTMLDivElement>;
66
66
  }) {
67
67
  const {
68
68
  onClick = () => {},
package/src/tab/Tabs.tsx CHANGED
@@ -62,7 +62,7 @@ export const Tabs = ({
62
62
  ref,
63
63
  ...props
64
64
  }: TabsProps & {
65
- ref?: React.RefObject<HTMLDivElement>;
65
+ ref?: React.Ref<HTMLDivElement>;
66
66
  }) => {
67
67
  const { variant = "core", size = "sm" } = props;
68
68
  return <ChakraTabs.Root {...props} ref={ref} variant={variant} size={size} />;
package/src/tooltip.tsx CHANGED
@@ -9,7 +9,7 @@ export const TooltipTrigger = ({
9
9
  children,
10
10
  ...props
11
11
  }: ChakraTooltip.TriggerProps & {
12
- ref?: React.RefObject<HTMLButtonElement>;
12
+ ref?: React.Ref<HTMLButtonElement>;
13
13
  }) => {
14
14
  const isStringChild = typeof children === "string";
15
15
 
@@ -27,7 +27,7 @@ export const TooltipContent = ({
27
27
  children,
28
28
  ...props
29
29
  }: TooltipProps & {
30
- ref?: React.RefObject<HTMLDivElement>;
30
+ ref?: React.Ref<HTMLDivElement>;
31
31
  }) => {
32
32
  return (
33
33
  <Portal>
@@ -16,7 +16,7 @@ export const Badge = function Badge({
16
16
  children,
17
17
  ...props
18
18
  }: BadgeProps & {
19
- ref?: React.RefObject<HTMLSpanElement>;
19
+ ref?: React.Ref<HTMLSpanElement>;
20
20
  }) {
21
21
  return (
22
22
  <ChakraBadge ref={ref} {...props}>
@@ -18,7 +18,7 @@ export const Code = function Code({
18
18
  ref,
19
19
  ...props
20
20
  }: CodeVariantProps & {
21
- ref?: React.RefObject<HTMLElement>;
21
+ ref?: React.Ref<HTMLElement>;
22
22
  }) {
23
23
  return <StyledCode {...props} ref={ref} />;
24
24
  };
@@ -46,7 +46,7 @@ export const Heading = function Heading({
46
46
  ref,
47
47
  ...props
48
48
  }: HeadingProps & {
49
- ref?: React.RefObject<HTMLHeadingElement>;
49
+ ref?: React.Ref<HTMLHeadingElement>;
50
50
  }) {
51
51
  const {
52
52
  as,
@@ -48,7 +48,7 @@ export const Text = function Text({
48
48
  ref,
49
49
  ...props
50
50
  }: TextProps & {
51
- ref?: React.RefObject<HTMLParagraphElement>;
51
+ ref?: React.Ref<HTMLParagraphElement>;
52
52
  }) {
53
53
  const { variant, lineHeight, fontSize, ...rest } = props;
54
54
  const resolvedProps = resolveTextProps({ variant, fontSize, lineHeight });