@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
@@ -11,7 +11,6 @@ import {
11
11
  ArrowLeftFill24Icon,
12
12
  CloseFill24Icon,
13
13
  } from "@vygruppen/spor-icon-react";
14
- import { forwardRef } from "react";
15
14
  import { useSwipeable } from "react-swipeable";
16
15
 
17
16
  import { ResponsiveButton } from "@/button/ResponsiveButton";
@@ -55,55 +54,60 @@ const [RootDrawerProvider, useRootDrawerProps] =
55
54
  name: "RootDrawerProvider",
56
55
  });
57
56
 
58
- export const DrawerContent = forwardRef<HTMLDivElement, DrawerContentProps>(
59
- (props, ref) => {
60
- const {
61
- children,
62
- portalled = true,
63
- portalRef,
64
- hideHandle = false,
65
- ...rest
66
- } = props;
67
- const { size, placement } = useRootDrawerProps();
68
- const { setOpen } = useDialogContext();
69
- const handlers = useSwipeable({
70
- onSwiped: ({ dir }) => {
71
- const shouldClose =
72
- (placement === "bottom" && dir === "Down") ||
73
- (placement === "top" && dir === "Up") ||
74
- (placement === "end" && dir === "Right") ||
75
- (placement === "start" && dir === "Left");
76
- if (shouldClose) {
77
- setOpen(false);
78
- }
79
- },
80
- swipeDuration: 250,
81
- });
82
- const sizeNotFull = size !== "full";
83
- const showHandle = !hideHandle;
57
+ export const DrawerContent = ({
58
+ ref,
59
+ ...props
60
+ }: DrawerContentProps & {
61
+ ref?: React.RefObject<HTMLDivElement>;
62
+ }) => {
63
+ const {
64
+ children,
65
+ portalled = true,
66
+ portalRef,
67
+ hideHandle = false,
68
+ ...rest
69
+ } = props;
70
+ const { size, placement } = useRootDrawerProps();
71
+ const { setOpen } = useDialogContext();
72
+ const handlers = useSwipeable({
73
+ onSwiped: ({ dir }) => {
74
+ const shouldClose =
75
+ (placement === "bottom" && dir === "Down") ||
76
+ (placement === "top" && dir === "Up") ||
77
+ (placement === "end" && dir === "Right") ||
78
+ (placement === "start" && dir === "Left");
79
+ if (shouldClose) {
80
+ setOpen(false);
81
+ }
82
+ },
83
+ swipeDuration: 250,
84
+ });
85
+ const sizeNotFull = size !== "full";
86
+ const showHandle = !hideHandle;
84
87
 
85
- return (
86
- <Portal disabled={!portalled} container={portalRef}>
87
- <ChakraDrawer.Positioner asChild>
88
- <Box {...handlers} width="100%">
89
- <ChakraDrawer.Content ref={ref} {...rest}>
90
- {showHandle && sizeNotFull && placement === "bottom" && (
91
- <CloseDrawerLine />
92
- )}
93
- {children}
94
- {showHandle && sizeNotFull && placement === "top" && (
95
- <CloseDrawerLine />
96
- )}
97
- </ChakraDrawer.Content>
98
- </Box>
99
- </ChakraDrawer.Positioner>
100
- </Portal>
101
- );
102
- },
103
- );
104
- DrawerContent.displayName = "DrawerContent";
88
+ return (
89
+ <Portal disabled={!portalled} container={portalRef}>
90
+ <ChakraDrawer.Positioner asChild>
91
+ <Box {...handlers} width="100%">
92
+ <ChakraDrawer.Content ref={ref} {...rest}>
93
+ {showHandle && sizeNotFull && placement === "bottom" && (
94
+ <CloseDrawerLine />
95
+ )}
96
+ {children}
97
+ {showHandle && sizeNotFull && placement === "top" && (
98
+ <CloseDrawerLine />
99
+ )}
100
+ </ChakraDrawer.Content>
101
+ </Box>
102
+ </ChakraDrawer.Positioner>
103
+ </Portal>
104
+ );
105
+ };
105
106
 
106
- export const CloseDrawerLine = forwardRef<HTMLButtonElement>((props, ref) => {
107
+ export const CloseDrawerLine = ({
108
+ ref,
109
+ ...props
110
+ }: React.ComponentProps<typeof Box>) => {
107
111
  return (
108
112
  <Box
109
113
  width={7}
@@ -117,13 +121,14 @@ export const CloseDrawerLine = forwardRef<HTMLButtonElement>((props, ref) => {
117
121
  ref={ref}
118
122
  />
119
123
  );
120
- });
121
- CloseDrawerLine.displayName = "CloseDrawerLine";
124
+ };
122
125
 
123
- export const DrawerCloseTrigger = forwardRef<
124
- HTMLButtonElement,
125
- DrawerCloseTriggerProps
126
- >(function DrawerCloseTrigger(props, ref) {
126
+ export const DrawerCloseTrigger = function DrawerCloseTrigger({
127
+ ref,
128
+ ...props
129
+ }: DrawerCloseTriggerProps & {
130
+ ref?: React.RefObject<HTMLButtonElement>;
131
+ }) {
127
132
  const { showText = false, ...rest } = props;
128
133
  const { size } = useRootDrawerProps();
129
134
  const { t } = useTranslation();
@@ -140,12 +145,14 @@ export const DrawerCloseTrigger = forwardRef<
140
145
  )}
141
146
  </ChakraDrawer.CloseTrigger>
142
147
  );
143
- });
148
+ };
144
149
 
145
- export const DrawerBackTrigger = forwardRef<
146
- HTMLButtonElement,
147
- ChakraDrawer.CloseTriggerProps
148
- >((props, ref) => {
150
+ export const DrawerBackTrigger = ({
151
+ ref,
152
+ ...props
153
+ }: ChakraDrawer.CloseTriggerProps & {
154
+ ref?: React.RefObject<HTMLButtonElement>;
155
+ }) => {
149
156
  const { t } = useTranslation();
150
157
  return (
151
158
  <ChakraDrawer.CloseTrigger asChild {...props} ref={ref}>
@@ -156,13 +163,14 @@ export const DrawerBackTrigger = forwardRef<
156
163
  />
157
164
  </ChakraDrawer.CloseTrigger>
158
165
  );
159
- });
160
- DrawerBackTrigger.displayName = "DrawerBackTrigger";
166
+ };
161
167
 
162
- export const DrawerFullScreenHeader = forwardRef<
163
- HTMLDivElement,
164
- DrawerFullScreenHeaderProps
165
- >((props, ref) => {
168
+ export const DrawerFullScreenHeader = ({
169
+ ref,
170
+ ...props
171
+ }: DrawerFullScreenHeaderProps & {
172
+ ref?: React.RefObject<HTMLDivElement>;
173
+ }) => {
166
174
  const { backTrigger = true, closeTrigger = true, children } = props;
167
175
  return (
168
176
  <ChakraDrawer.Header {...props} ref={ref}>
@@ -171,8 +179,7 @@ export const DrawerFullScreenHeader = forwardRef<
171
179
  <Box> {closeTrigger && <DrawerCloseTrigger />}</Box>
172
180
  </ChakraDrawer.Header>
173
181
  );
174
- });
175
- DrawerFullScreenHeader.displayName = "DrawerFullScreenHeader";
182
+ };
176
183
 
177
184
  export const Drawer = (props: DrawerProps) => {
178
185
  const { children, placement, size = "md", ...rest } = props;
@@ -10,7 +10,6 @@ import {
10
10
  useRecipe,
11
11
  } from "@chakra-ui/react";
12
12
  import { ChangeDirectionOutline24Icon } from "@vygruppen/spor-icon-react";
13
- import { forwardRef } from "react";
14
13
 
15
14
  import { IconButton } from "@/button";
16
15
  import { attachedInputsRecipe } from "@/theme/recipes/attached-inputs";
@@ -43,47 +42,44 @@ export type AttachedInputsProps = RecipeVariantProps<
43
42
  }
44
43
  );
45
44
 
46
- export const AttachedInputs = forwardRef<HTMLDivElement, AttachedInputsProps>(
47
- (props, ref) => {
48
- const recipe = useRecipe({ key: "attachedInputs" });
49
- const [recipeProps, { onFlip, flipAriaLabel, ...restProps }] =
50
- recipe.splitVariantProps(props);
51
- const styles = recipe(recipeProps);
52
-
53
- if (!onFlip) {
54
- return (
55
- <Group
56
- ref={ref}
57
- css={styles}
58
- attached
59
- isolation="auto"
60
- {...restProps}
61
- />
62
- );
63
- }
45
+ export const AttachedInputs = ({
46
+ ref,
47
+ ...props
48
+ }: AttachedInputsProps & {
49
+ ref?: React.RefObject<HTMLDivElement>;
50
+ }) => {
51
+ const recipe = useRecipe({ key: "attachedInputs" });
52
+ const [recipeProps, { onFlip, flipAriaLabel, ...restProps }] =
53
+ recipe.splitVariantProps(props);
54
+ const styles = recipe(recipeProps);
64
55
 
56
+ if (!onFlip) {
65
57
  return (
66
- <Box position="relative">
67
- <Group
68
- ref={ref}
69
- css={styles}
70
- attached
71
- isolation="auto"
72
- data-with-flip-button
73
- {...restProps}
74
- />
75
- <SwitchButton
76
- icon={<ChangeDirectionOutline24Icon />}
77
- orientation={props.orientation}
78
- variant="tertiary"
79
- size={["xs", null, "sm"]}
80
- aria-label={flipAriaLabel}
81
- onClick={onFlip}
82
- />
83
- </Box>
58
+ <Group ref={ref} css={styles} attached isolation="auto" {...restProps} />
84
59
  );
85
- },
86
- );
60
+ }
61
+
62
+ return (
63
+ <Box position="relative">
64
+ <Group
65
+ ref={ref}
66
+ css={styles}
67
+ attached
68
+ isolation="auto"
69
+ data-with-flip-button
70
+ {...restProps}
71
+ />
72
+ <SwitchButton
73
+ icon={<ChangeDirectionOutline24Icon />}
74
+ orientation={props.orientation}
75
+ variant="tertiary"
76
+ size={["xs", null, "sm"]}
77
+ aria-label={flipAriaLabel}
78
+ onClick={onFlip}
79
+ />
80
+ </Box>
81
+ );
82
+ };
87
83
 
88
84
  const SwitchButton = chakra(
89
85
  IconButton,
@@ -117,5 +113,3 @@ const SwitchButton = chakra(
117
113
  },
118
114
  }),
119
115
  );
120
-
121
- AttachedInputs.displayName = "AttachedInputs";
@@ -8,7 +8,7 @@ import {
8
8
  useListCollection,
9
9
  } from "@chakra-ui/react";
10
10
  import { CheckmarkFill18Icon } from "@vygruppen/spor-icon-react";
11
- import React, { forwardRef } from "react";
11
+ import React from "react";
12
12
 
13
13
  import { CloseButton } from "@/button";
14
14
  import { ColorSpinner } from "@/loader";
@@ -27,139 +27,131 @@ type Props = {
27
27
  loading?: boolean;
28
28
  emptyLabel?: React.ReactNode;
29
29
  openOnFocus?: boolean;
30
+ ref?: React.RefObject<HTMLInputElement | null>;
30
31
  } & Omit<ComboboxRootProps, "collection"> &
31
32
  FieldProps;
32
33
 
33
- export const Autocomplete = forwardRef<HTMLInputElement, Props>(
34
- function Autocomplete(
35
- {
36
- variant = "core",
37
- children,
38
- css,
39
- label,
40
- leftIcon,
41
- onInputValueChange,
42
- invalid,
43
- helperText,
44
- errorText,
45
- required,
46
- filteredExternally,
47
- loading,
48
- disabled,
49
- emptyLabel,
50
- onFocus,
51
- openOnClick = true,
52
- openOnFocus = true,
53
- ...rest
34
+ export function Autocomplete({
35
+ variant = "core",
36
+ children,
37
+ css,
38
+ label,
39
+ leftIcon,
40
+ onInputValueChange,
41
+ invalid,
42
+ helperText,
43
+ errorText,
44
+ required,
45
+ filteredExternally,
46
+ loading,
47
+ disabled,
48
+ emptyLabel,
49
+ onFocus,
50
+ openOnClick = true,
51
+ openOnFocus = true,
52
+ ref,
53
+ ...rest
54
+ }: Props) {
55
+ const { contains } = useFilter({ sensitivity: "base" });
56
+ const { t } = useTranslation();
57
+
58
+ const extractedItems = React.useMemo(
59
+ () => extractItemsFromChildren(children),
60
+ [children],
61
+ );
62
+
63
+ const { collection, filter, reset } = useListCollection({
64
+ initialItems: extractedItems,
65
+ filter: filteredExternally ? undefined : contains,
66
+ });
67
+
68
+ React.useEffect(() => {
69
+ if (filteredExternally) reset();
70
+ }, [extractedItems, reset, filteredExternally]);
71
+
72
+ const filteredChildren = React.useMemo(
73
+ () => filterChildren(children, collection.items),
74
+ [children, collection.items],
75
+ );
76
+
77
+ const combobox = useCombobox({
78
+ collection,
79
+ openOnClick: filteredChildren.length > 0 ? openOnClick : false,
80
+ onInputValueChange: (event) => {
81
+ if (!filteredExternally) {
82
+ filter(event.inputValue);
83
+ }
84
+ onInputValueChange?.(event);
54
85
  },
55
- ref,
56
- ) {
57
- const { contains } = useFilter({ sensitivity: "base" });
58
- const { t } = useTranslation();
59
-
60
- const extractedItems = React.useMemo(
61
- () => extractItemsFromChildren(children),
62
- [children],
63
- );
64
-
65
- const { collection, filter, reset } = useListCollection({
66
- initialItems: extractedItems,
67
- filter: filteredExternally ? undefined : contains,
68
- });
69
-
70
- React.useEffect(() => {
71
- if (filteredExternally) reset();
72
- }, [extractedItems, reset, filteredExternally]);
73
-
74
- const filteredChildren = React.useMemo(
75
- () => filterChildren(children, collection.items),
76
- [children, collection.items],
77
- );
78
-
79
- const combobox = useCombobox({
80
- collection,
81
- openOnClick: filteredChildren.length > 0 ? openOnClick : false,
82
- onInputValueChange: (event) => {
83
- if (!filteredExternally) {
84
- filter(event.inputValue);
85
- }
86
- onInputValueChange?.(event);
86
+ positioning: {
87
+ placement: "bottom",
88
+ offset: {
89
+ mainAxis: 3,
90
+ crossAxis: -1,
87
91
  },
88
- positioning: {
89
- placement: "bottom",
90
- offset: {
91
- mainAxis: 3,
92
- crossAxis: -1,
93
- },
94
- flip: false,
95
- },
96
- disabled,
97
- ...rest,
98
- });
99
-
100
- return (
101
- <Combobox.RootProvider value={combobox}>
102
- <Combobox.Control css={css}>
103
- <Combobox.Input asChild>
104
- <Input
105
- ref={ref}
106
- label={<Combobox.Label>{label}</Combobox.Label>}
107
- variant={variant}
108
- labelAsChild
109
- startElement={leftIcon}
110
- invalid={invalid}
111
- helperText={helperText}
112
- errorText={errorText}
113
- required={required}
114
- onFocus={(event) => {
115
- onFocus?.(event);
116
- if (openOnFocus && filteredChildren.length > 0)
117
- combobox.setOpen(true);
118
- }}
119
- />
120
- </Combobox.Input>
121
- <Combobox.IndicatorGroup>
122
- <Combobox.ClearTrigger asChild aria-label={t(texts.clearValue)}>
123
- <CloseButton size="xs" tabIndex={0} />
124
- </Combobox.ClearTrigger>
125
- </Combobox.IndicatorGroup>
126
- </Combobox.Control>
127
- <Combobox.Positioner>
128
- <Combobox.Content>
129
- {!loading && (
130
- <Combobox.Empty>
131
- {emptyLabel ?? t(texts.noItemsFound)}
132
- </Combobox.Empty>
133
- )}
134
- {loading ? <ColorSpinner width="1.5rem" p="2" /> : filteredChildren}
135
- </Combobox.Content>
136
- </Combobox.Positioner>
137
- </Combobox.RootProvider>
138
- );
139
- },
140
- );
92
+ flip: false,
93
+ },
94
+ disabled,
95
+ ...rest,
96
+ });
97
+
98
+ return (
99
+ <Combobox.RootProvider value={combobox}>
100
+ <Combobox.Control css={css}>
101
+ <Combobox.Input asChild>
102
+ <Input
103
+ ref={ref}
104
+ label={<Combobox.Label>{label}</Combobox.Label>}
105
+ variant={variant}
106
+ labelAsChild
107
+ startElement={leftIcon}
108
+ invalid={invalid}
109
+ helperText={helperText}
110
+ errorText={errorText}
111
+ required={required}
112
+ onFocus={(event) => {
113
+ onFocus?.(event);
114
+ if (openOnFocus && filteredChildren.length > 0)
115
+ combobox.setOpen(true);
116
+ }}
117
+ />
118
+ </Combobox.Input>
119
+ <Combobox.IndicatorGroup>
120
+ <Combobox.ClearTrigger asChild aria-label={t(texts.clearValue)}>
121
+ <CloseButton size="xs" tabIndex={0} />
122
+ </Combobox.ClearTrigger>
123
+ </Combobox.IndicatorGroup>
124
+ </Combobox.Control>
125
+ <Combobox.Positioner>
126
+ <Combobox.Content>
127
+ {!loading && (
128
+ <Combobox.Empty>
129
+ {emptyLabel ?? t(texts.noItemsFound)}
130
+ </Combobox.Empty>
131
+ )}
132
+ {loading ? <ColorSpinner width="1.5rem" p="2" /> : filteredChildren}
133
+ </Combobox.Content>
134
+ </Combobox.Positioner>
135
+ </Combobox.RootProvider>
136
+ );
137
+ }
141
138
 
142
139
  export const AutocompleteItemGroup = Combobox.ItemGroup;
143
140
  export const AutocompleteItemGroupLabel = Combobox.ItemGroupLabel;
144
141
 
145
- export const AutocompleteItem = forwardRef<HTMLDivElement, ComboboxItemProps>(
146
- function AutocompleteItem({
147
- children,
148
- ...props
149
- }: React.PropsWithChildren<ComboboxItemProps>) {
150
- const { multiple } = useComboboxContext();
151
- return (
152
- <Combobox.Item {...props}>
153
- {children}
154
- {multiple && (
155
- <Combobox.ItemIndicator asChild>
156
- <CheckmarkFill18Icon />
157
- </Combobox.ItemIndicator>
158
- )}
159
- </Combobox.Item>
160
- );
161
- },
162
- );
142
+ export const AutocompleteItem = ({ children, ...props }: ComboboxItemProps) => {
143
+ const { multiple } = useComboboxContext();
144
+ return (
145
+ <Combobox.Item {...props}>
146
+ {children}
147
+ {multiple && (
148
+ <Combobox.ItemIndicator asChild>
149
+ <CheckmarkFill18Icon />
150
+ </Combobox.ItemIndicator>
151
+ )}
152
+ </Combobox.Item>
153
+ );
154
+ };
163
155
 
164
156
  const filterChildren = (
165
157
  children: React.ReactNode,
@@ -187,10 +179,7 @@ const filterChildren = (
187
179
 
188
180
  if (!hasItems) return null;
189
181
 
190
- return React.cloneElement(child, {
191
- ...groupProps,
192
- children: filteredGroupChildren,
193
- });
182
+ return React.cloneElement(child, groupProps, ...filteredGroupChildren);
194
183
  }
195
184
 
196
185
  const itemProps = (child.props as { item?: Item })?.item;