@gv-tech/ui-native 2.19.0 → 2.21.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gv-tech/ui-native",
3
- "version": "2.19.0",
3
+ "version": "2.21.0",
4
4
  "description": "React Native implementations of the GV Tech design system components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,15 +11,13 @@
11
11
  "author": "Eric N. Garcia <eng618@garciaericn.com>",
12
12
  "exports": {
13
13
  ".": {
14
- "types": "./src/index.ts",
15
- "default": "./src/index.ts"
16
- },
17
- "./*": {
18
- "types": "./src/*/index.ts",
19
- "default": "./src/*/index.ts"
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/ui-native.mjs",
16
+ "require": "./dist/ui-native.cjs",
17
+ "default": "./dist/ui-native.mjs"
20
18
  }
21
19
  },
22
- "main": "./dist/ui-native.mjs",
20
+ "main": "./dist/ui-native.cjs",
23
21
  "module": "./dist/ui-native.mjs",
24
22
  "types": "./dist/index.d.ts",
25
23
  "files": [
@@ -37,6 +35,8 @@
37
35
  "dependencies": {
38
36
  "@gv-tech/design-tokens": "^2.12.0",
39
37
  "@gv-tech/ui-core": "^2.12.0",
38
+ "react-native-reanimated": "4.3.0",
39
+ "react-native-worklets": "0.8.1",
40
40
  "@rn-primitives/accordion": "^1.2.0",
41
41
  "@rn-primitives/alert-dialog": "^1.2.0",
42
42
  "@rn-primitives/aspect-ratio": "^1.2.0",
@@ -65,21 +65,24 @@
65
65
  "@rn-primitives/toggle-group": "^1.2.0",
66
66
  "@rn-primitives/tooltip": "^1.2.0",
67
67
  "clsx": "^2.1.1",
68
- "lucide-react-native": "^0.574.0",
68
+ "lucide-react-native": "^1.8.0",
69
69
  "nativewind": "^4.2.1",
70
70
  "react-native-svg": "^15.15.3",
71
- "react-native-worklets": "0.7.2",
72
71
  "tailwind-merge": "^3.4.1",
73
72
  "tailwindcss": "^4.1.18"
74
73
  },
75
74
  "peerDependencies": {
76
75
  "react": ">=18",
77
76
  "react-native": ">=0.72",
78
- "react-native-reanimated": "^3.0.0 || ^4.0.0"
77
+ "react-native-reanimated": "^4.2.3",
78
+ "react-native-worklets": "^0.7.2"
79
79
  },
80
80
  "peerDependenciesMeta": {
81
81
  "react-native-reanimated": {
82
82
  "optional": false
83
+ },
84
+ "react-native-worklets": {
85
+ "optional": false
83
86
  }
84
87
  },
85
88
  "publishConfig": {
@@ -1,9 +1,13 @@
1
- import { Text, View } from 'react-native';
1
+ import type { AspectRatioBaseProps } from '@gv-tech/ui-core';
2
+ import * as AspectRatioPrimitive from '@rn-primitives/aspect-ratio';
3
+ import * as React from 'react';
4
+ import { cn } from './lib/utils';
2
5
 
3
- export const AspectRatio = () => {
6
+ export const AspectRatio: React.FC<AspectRatioBaseProps> = ({ children, className, ratio = 1 }) => {
4
7
  return (
5
- <View>
6
- <Text>aspect-ratio is not yet implemented for React Native</Text>
7
- </View>
8
+ <AspectRatioPrimitive.Root ratio={ratio} className={cn('w-full', className)}>
9
+ {children}
10
+ </AspectRatioPrimitive.Root>
8
11
  );
9
12
  };
13
+ AspectRatio.displayName = 'AspectRatio';
@@ -1,9 +1,131 @@
1
- import { Text, View } from 'react-native';
1
+ import type {
2
+ BreadcrumbBaseProps,
3
+ BreadcrumbEllipsisBaseProps,
4
+ BreadcrumbItemBaseProps,
5
+ BreadcrumbLinkBaseProps,
6
+ BreadcrumbListBaseProps,
7
+ BreadcrumbPageBaseProps,
8
+ BreadcrumbSeparatorBaseProps,
9
+ } from '@gv-tech/ui-core';
10
+ import { Slot } from '@rn-primitives/slot';
11
+ import { ChevronRight, MoreHorizontal } from 'lucide-react-native';
12
+ import * as React from 'react';
13
+ import { Pressable, View } from 'react-native';
14
+ import { wrapTextChildren } from './lib/render-native';
15
+ import { cn } from './lib/utils';
16
+ import { Text } from './text';
2
17
 
3
- export const Breadcrumb = () => {
18
+ export const Breadcrumb = React.forwardRef<View, BreadcrumbBaseProps & { separator?: React.ReactNode }>(
19
+ ({ className, children, ...props }, ref) => {
20
+ return (
21
+ <View ref={ref} aria-label="breadcrumb" className={cn('flex flex-row', className)} {...props}>
22
+ {children}
23
+ </View>
24
+ );
25
+ },
26
+ );
27
+ Breadcrumb.displayName = 'Breadcrumb';
28
+
29
+ export const BreadcrumbList = React.forwardRef<View, BreadcrumbListBaseProps>(
30
+ ({ className, children, ...props }, ref) => {
31
+ return (
32
+ <View
33
+ ref={ref}
34
+ className={cn(
35
+ 'text-muted-foreground flex flex-row flex-wrap items-center gap-1.5 break-words sm:gap-2.5',
36
+ className,
37
+ )}
38
+ {...props}
39
+ >
40
+ {children}
41
+ </View>
42
+ );
43
+ },
44
+ );
45
+ BreadcrumbList.displayName = 'BreadcrumbList';
46
+
47
+ export const BreadcrumbItem = React.forwardRef<View, BreadcrumbItemBaseProps>(
48
+ ({ className, children, ...props }, ref) => {
49
+ return (
50
+ <View ref={ref} className={cn('flex flex-row items-center gap-1.5', className)} {...props}>
51
+ {children}
52
+ </View>
53
+ );
54
+ },
55
+ );
56
+ BreadcrumbItem.displayName = 'BreadcrumbItem';
57
+
58
+ export type BreadcrumbLinkProps = BreadcrumbLinkBaseProps & {
59
+ onPress?: () => void;
60
+ };
61
+
62
+ export const BreadcrumbLink = React.forwardRef<View, BreadcrumbLinkProps>(
63
+ ({ asChild, className, children, onPress, ...props }, ref) => {
64
+ const Comp = asChild ? Slot : Pressable;
65
+
66
+ return (
67
+ <Comp
68
+ ref={ref}
69
+ onPress={onPress}
70
+ className={cn(
71
+ 'hover:text-foreground active:text-foreground flex flex-row items-center transition-colors',
72
+ className,
73
+ )}
74
+ {...props}
75
+ >
76
+ {wrapTextChildren(children, Text, {
77
+ className: 'text-muted-foreground hover:text-foreground text-sm font-medium',
78
+ })}
79
+ </Comp>
80
+ );
81
+ },
82
+ );
83
+ BreadcrumbLink.displayName = 'BreadcrumbLink';
84
+
85
+ export const BreadcrumbPage = React.forwardRef<View, BreadcrumbPageBaseProps>(
86
+ ({ className, children, ...props }, ref) => {
87
+ return (
88
+ <View
89
+ ref={ref}
90
+ role="link"
91
+ aria-disabled={true}
92
+ aria-current="page"
93
+ className={cn('flex flex-row items-center', className)}
94
+ {...props}
95
+ >
96
+ {wrapTextChildren(children, Text, {
97
+ className: 'text-foreground text-sm font-normal',
98
+ })}
99
+ </View>
100
+ );
101
+ },
102
+ );
103
+ BreadcrumbPage.displayName = 'BreadcrumbPage';
104
+
105
+ export const BreadcrumbSeparator = ({ children, className, ...props }: BreadcrumbSeparatorBaseProps) => {
106
+ return (
107
+ <View
108
+ role="presentation"
109
+ aria-hidden={true}
110
+ className={cn('flex flex-row items-center justify-center', className)}
111
+ {...props}
112
+ >
113
+ {children ?? <ChevronRight size={14} className="text-muted-foreground" />}
114
+ </View>
115
+ );
116
+ };
117
+ BreadcrumbSeparator.displayName = 'BreadcrumbSeparator';
118
+
119
+ export const BreadcrumbEllipsis = ({ className, children, ...props }: BreadcrumbEllipsisBaseProps) => {
4
120
  return (
5
- <View>
6
- <Text>breadcrumb is not yet implemented for React Native</Text>
121
+ <View
122
+ role="presentation"
123
+ aria-hidden={true}
124
+ className={cn('flex h-9 w-9 flex-row items-center justify-center', className)}
125
+ {...props}
126
+ >
127
+ {children ?? <MoreHorizontal size={14} className="text-muted-foreground" />}
7
128
  </View>
8
129
  );
9
130
  };
131
+ BreadcrumbEllipsis.displayName = 'BreadcrumbEllipsis';
package/src/calendar.tsx CHANGED
@@ -1,9 +1,7 @@
1
- import { Text, View } from 'react-native';
1
+ import type { CalendarBaseProps } from '@gv-tech/ui-core';
2
+ import * as React from 'react';
3
+ import { View } from 'react-native';
2
4
 
3
- export const Calendar = () => {
4
- return (
5
- <View>
6
- <Text>calendar is not yet implemented for React Native</Text>
7
- </View>
8
- );
5
+ export const Calendar: React.FC<CalendarBaseProps> = ({ className }) => {
6
+ return <View className={className} />;
9
7
  };
package/src/carousel.tsx CHANGED
@@ -1,9 +1,29 @@
1
- import { Text, View } from 'react-native';
2
-
3
- export const Carousel = () => {
4
- return (
5
- <View>
6
- <Text>carousel is not yet implemented for React Native</Text>
7
- </View>
8
- );
1
+ import type {
2
+ CarouselBaseProps,
3
+ CarouselContentBaseProps,
4
+ CarouselItemBaseProps,
5
+ CarouselNextBaseProps,
6
+ CarouselPreviousBaseProps,
7
+ } from '@gv-tech/ui-core';
8
+ import * as React from 'react';
9
+ import { View } from 'react-native';
10
+
11
+ export const Carousel: React.FC<CarouselBaseProps> = ({ children, className }) => {
12
+ return <View className={className}>{children}</View>;
13
+ };
14
+
15
+ export const CarouselContent: React.FC<CarouselContentBaseProps> = ({ children, className }) => {
16
+ return <View className={className}>{children}</View>;
17
+ };
18
+
19
+ export const CarouselItem: React.FC<CarouselItemBaseProps> = ({ children, className }) => {
20
+ return <View className={className}>{children}</View>;
21
+ };
22
+
23
+ export const CarouselPrevious: React.FC<CarouselPreviousBaseProps> = ({ className }) => {
24
+ return <View className={className} />;
25
+ };
26
+
27
+ export const CarouselNext: React.FC<CarouselNextBaseProps> = ({ className }) => {
28
+ return <View className={className} />;
9
29
  };
package/src/chart.tsx CHANGED
@@ -1,9 +1,31 @@
1
- import { Text, View } from 'react-native';
2
-
3
- export const Chart = () => {
4
- return (
5
- <View>
6
- <Text>chart is not yet implemented for React Native</Text>
7
- </View>
8
- );
1
+ import type {
2
+ ChartContainerBaseProps,
3
+ ChartLegendContentBaseProps,
4
+ ChartTooltipContentBaseProps,
5
+ } from '@gv-tech/ui-core';
6
+ import * as React from 'react';
7
+ import { View } from 'react-native';
8
+
9
+ export const ChartContainer: React.FC<ChartContainerBaseProps> = ({ children, className }) => {
10
+ return <View className={className}>{children}</View>;
11
+ };
12
+
13
+ export const ChartTooltipContent: React.FC<ChartTooltipContentBaseProps> = ({ className }) => {
14
+ return <View className={className} />;
15
+ };
16
+
17
+ export const ChartLegendContent: React.FC<ChartLegendContentBaseProps> = ({ className }) => {
18
+ return <View className={className} />;
19
+ };
20
+
21
+ export const ChartTooltip: React.FC<{ children?: React.ReactNode }> = ({ children }) => {
22
+ return <>{children}</>;
23
+ };
24
+
25
+ export const ChartLegend: React.FC<{ children?: React.ReactNode }> = ({ children }) => {
26
+ return <>{children}</>;
27
+ };
28
+
29
+ export const ChartStyle: React.FC = () => {
30
+ return null;
9
31
  };
package/src/command.tsx CHANGED
@@ -1,9 +1,49 @@
1
- import { Text, View } from 'react-native';
2
-
3
- export const Command = () => {
4
- return (
5
- <View>
6
- <Text>command is not yet implemented for React Native</Text>
7
- </View>
8
- );
1
+ import type {
2
+ CommandBaseProps,
3
+ CommandEmptyBaseProps,
4
+ CommandGroupBaseProps,
5
+ CommandInputBaseProps,
6
+ CommandItemBaseProps,
7
+ CommandListBaseProps,
8
+ CommandSeparatorBaseProps,
9
+ CommandShortcutBaseProps,
10
+ } from '@gv-tech/ui-core';
11
+ import * as React from 'react';
12
+ import { View } from 'react-native';
13
+ import { wrapTextChildren } from './lib/render-native';
14
+
15
+ export const Command: React.FC<CommandBaseProps> = ({ children, className }) => {
16
+ return <View className={className}>{wrapTextChildren(children)}</View>;
17
+ };
18
+
19
+ export const CommandDialog: React.FC<{ children?: React.ReactNode }> = ({ children }) => {
20
+ return <>{children}</>;
21
+ };
22
+
23
+ export const CommandInput: React.FC<CommandInputBaseProps> = ({ className }) => {
24
+ return <View className={className} />;
25
+ };
26
+
27
+ export const CommandList: React.FC<CommandListBaseProps> = ({ children, className }) => {
28
+ return <View className={className}>{wrapTextChildren(children)}</View>;
29
+ };
30
+
31
+ export const CommandEmpty: React.FC<CommandEmptyBaseProps> = ({ children, className }) => {
32
+ return <View className={className}>{wrapTextChildren(children)}</View>;
33
+ };
34
+
35
+ export const CommandGroup: React.FC<CommandGroupBaseProps> = ({ children, className }) => {
36
+ return <View className={className}>{wrapTextChildren(children)}</View>;
37
+ };
38
+
39
+ export const CommandItem: React.FC<CommandItemBaseProps> = ({ children, className }) => {
40
+ return <View className={className}>{wrapTextChildren(children)}</View>;
41
+ };
42
+
43
+ export const CommandSeparator: React.FC<CommandSeparatorBaseProps> = ({ className }) => {
44
+ return <View className={className} />;
45
+ };
46
+
47
+ export const CommandShortcut: React.FC<CommandShortcutBaseProps> = ({ children, className }) => {
48
+ return <View className={className}>{wrapTextChildren(children)}</View>;
9
49
  };
@@ -1,9 +1,217 @@
1
- import { Text, View } from 'react-native';
1
+ import type {
2
+ ContextMenuCheckboxItemBaseProps,
3
+ ContextMenuContentBaseProps,
4
+ ContextMenuItemBaseProps,
5
+ ContextMenuLabelBaseProps,
6
+ ContextMenuRadioItemBaseProps,
7
+ ContextMenuSeparatorBaseProps,
8
+ ContextMenuShortcutBaseProps,
9
+ ContextMenuSubContentBaseProps,
10
+ ContextMenuSubTriggerBaseProps,
11
+ } from '@gv-tech/ui-core';
12
+ import * as ContextMenuPrimitive from '@rn-primitives/context-menu';
13
+ import { Check, ChevronRight, Circle } from 'lucide-react-native';
14
+ import * as React from 'react';
15
+ import { Platform, StyleSheet, View } from 'react-native';
16
+ import Animated, { FadeIn, FadeOut } from 'react-native-reanimated';
17
+ import { wrapTextChildren } from './lib/render-native';
18
+ import { cn } from './lib/utils';
19
+ import { Text } from './text';
2
20
 
3
- export const ContextMenu = () => {
21
+ export const ContextMenu = ContextMenuPrimitive.Root;
22
+
23
+ export const ContextMenuTrigger = ContextMenuPrimitive.Trigger;
24
+
25
+ export const ContextMenuPortal = ContextMenuPrimitive.Portal;
26
+
27
+ export const ContextMenuGroup = ContextMenuPrimitive.Group;
28
+
29
+ export const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
30
+
31
+ export const ContextMenuSub = ContextMenuPrimitive.Sub;
32
+
33
+ const ContextMenuOverlay = React.forwardRef<
34
+ React.ElementRef<typeof ContextMenuPrimitive.Overlay>,
35
+ React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Overlay>
36
+ >(({ className, ...props }, ref) => {
37
+ return (
38
+ <ContextMenuPrimitive.Overlay
39
+ style={Platform.OS !== 'web' ? StyleSheet.absoluteFill : undefined}
40
+ ref={ref}
41
+ {...props}
42
+ >
43
+ <Animated.View
44
+ entering={FadeIn.duration(100)}
45
+ exiting={FadeOut.duration(100)}
46
+ className={cn('absolute inset-0 z-50 bg-black/30', className)}
47
+ />
48
+ </ContextMenuPrimitive.Overlay>
49
+ );
50
+ });
51
+ ContextMenuOverlay.displayName = 'ContextMenuOverlay';
52
+
53
+ export const ContextMenuContent = React.forwardRef<
54
+ React.ElementRef<typeof ContextMenuPrimitive.Content>,
55
+ ContextMenuContentBaseProps
56
+ >(({ className, children, ...props }, ref) => {
57
+ return (
58
+ <ContextMenuPortal>
59
+ <ContextMenuOverlay />
60
+ <ContextMenuPrimitive.Content
61
+ ref={ref}
62
+ className={cn(
63
+ 'bg-popover border-border z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md',
64
+ className,
65
+ )}
66
+ {...props}
67
+ >
68
+ {children}
69
+ </ContextMenuPrimitive.Content>
70
+ </ContextMenuPortal>
71
+ );
72
+ });
73
+ ContextMenuContent.displayName = 'ContextMenuContent';
74
+
75
+ export const ContextMenuItem = React.forwardRef<
76
+ React.ElementRef<typeof ContextMenuPrimitive.Item>,
77
+ ContextMenuItemBaseProps
78
+ >(({ className, children, inset, ...props }, ref) => {
4
79
  return (
5
- <View>
6
- <Text>context-menu is not yet implemented for React Native</Text>
7
- </View>
80
+ <ContextMenuPrimitive.Item
81
+ ref={ref}
82
+ className={cn(
83
+ 'focus:bg-accent focus:text-accent-foreground active:bg-accent active:text-accent-foreground relative flex flex-row items-center rounded-sm px-2 py-1.5 text-sm outline-none',
84
+ inset && 'pl-8',
85
+ className,
86
+ )}
87
+ {...props}
88
+ >
89
+ {wrapTextChildren(children, Text)}
90
+ </ContextMenuPrimitive.Item>
91
+ );
92
+ });
93
+ ContextMenuItem.displayName = 'ContextMenuItem';
94
+
95
+ export const ContextMenuCheckboxItem = React.forwardRef<
96
+ React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,
97
+ ContextMenuCheckboxItemBaseProps
98
+ >(({ className, children, checked, onCheckedChange, ...props }, ref) => {
99
+ return (
100
+ <ContextMenuPrimitive.CheckboxItem
101
+ ref={ref}
102
+ checked={!!checked}
103
+ onCheckedChange={onCheckedChange || (() => {})}
104
+ className={cn(
105
+ 'focus:bg-accent focus:text-accent-foreground active:bg-accent active:text-accent-foreground relative flex flex-row items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none',
106
+ className,
107
+ )}
108
+ {...props}
109
+ >
110
+ <View className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
111
+ <ContextMenuPrimitive.ItemIndicator>
112
+ <Check size={14} className="text-foreground" />
113
+ </ContextMenuPrimitive.ItemIndicator>
114
+ </View>
115
+ {wrapTextChildren(children, Text)}
116
+ </ContextMenuPrimitive.CheckboxItem>
117
+ );
118
+ });
119
+ ContextMenuCheckboxItem.displayName = 'ContextMenuCheckboxItem';
120
+
121
+ export const ContextMenuRadioItem = React.forwardRef<
122
+ React.ElementRef<typeof ContextMenuPrimitive.RadioItem>,
123
+ ContextMenuRadioItemBaseProps
124
+ >(({ className, children, value, ...props }, ref) => {
125
+ return (
126
+ <ContextMenuPrimitive.RadioItem
127
+ ref={ref}
128
+ value={value}
129
+ className={cn(
130
+ 'focus:bg-accent focus:text-accent-foreground active:bg-accent active:text-accent-foreground relative flex flex-row items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none',
131
+ className,
132
+ )}
133
+ {...props}
134
+ >
135
+ <View className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
136
+ <ContextMenuPrimitive.ItemIndicator>
137
+ <Circle size={8} className="text-foreground fill-current" />
138
+ </ContextMenuPrimitive.ItemIndicator>
139
+ </View>
140
+ {wrapTextChildren(children, Text)}
141
+ </ContextMenuPrimitive.RadioItem>
142
+ );
143
+ });
144
+ ContextMenuRadioItem.displayName = 'ContextMenuRadioItem';
145
+
146
+ export const ContextMenuLabel = React.forwardRef<
147
+ React.ElementRef<typeof ContextMenuPrimitive.Label>,
148
+ ContextMenuLabelBaseProps
149
+ >(({ className, children, inset, ...props }, ref) => {
150
+ return (
151
+ <ContextMenuPrimitive.Label
152
+ ref={ref}
153
+ className={cn('text-foreground px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}
154
+ {...props}
155
+ >
156
+ {wrapTextChildren(children, Text)}
157
+ </ContextMenuPrimitive.Label>
158
+ );
159
+ });
160
+ ContextMenuLabel.displayName = 'ContextMenuLabel';
161
+
162
+ export const ContextMenuSeparator = React.forwardRef<
163
+ React.ElementRef<typeof ContextMenuPrimitive.Separator>,
164
+ ContextMenuSeparatorBaseProps
165
+ >(({ className, ...props }, ref) => {
166
+ return <ContextMenuPrimitive.Separator ref={ref} className={cn('bg-border -mx-1 my-1 h-px', className)} {...props} />;
167
+ });
168
+ ContextMenuSeparator.displayName = 'ContextMenuSeparator';
169
+
170
+ export const ContextMenuShortcut = ({ className, children, ...props }: ContextMenuShortcutBaseProps) => {
171
+ return (
172
+ <Text className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props}>
173
+ {children}
174
+ </Text>
8
175
  );
9
176
  };
177
+ ContextMenuShortcut.displayName = 'ContextMenuShortcut';
178
+
179
+ export const ContextMenuSubTrigger = React.forwardRef<
180
+ React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,
181
+ ContextMenuSubTriggerBaseProps
182
+ >(({ className, children, inset, ...props }, ref) => {
183
+ return (
184
+ <ContextMenuPrimitive.SubTrigger
185
+ ref={ref}
186
+ className={cn(
187
+ 'focus:bg-accent focus:text-accent-foreground active:bg-accent active:text-accent-foreground flex flex-row items-center rounded-sm px-2 py-1.5 text-sm outline-none',
188
+ inset && 'pl-8',
189
+ className,
190
+ )}
191
+ {...props}
192
+ >
193
+ <View className="flex flex-row items-center gap-1.5">{wrapTextChildren(children, Text)}</View>
194
+ <ChevronRight size={14} className="text-foreground ml-auto" />
195
+ </ContextMenuPrimitive.SubTrigger>
196
+ );
197
+ });
198
+ ContextMenuSubTrigger.displayName = 'ContextMenuSubTrigger';
199
+
200
+ export const ContextMenuSubContent = React.forwardRef<
201
+ React.ElementRef<typeof ContextMenuPrimitive.SubContent>,
202
+ ContextMenuSubContentBaseProps
203
+ >(({ className, children, ...props }, ref) => {
204
+ return (
205
+ <ContextMenuPrimitive.SubContent
206
+ ref={ref}
207
+ className={cn(
208
+ 'bg-popover border-border z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md',
209
+ className,
210
+ )}
211
+ {...props}
212
+ >
213
+ {children}
214
+ </ContextMenuPrimitive.SubContent>
215
+ );
216
+ });
217
+ ContextMenuSubContent.displayName = 'ContextMenuSubContent';