@react-native-reusables/cli 0.3.8 → 0.4.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.
- package/__generated/components/ui/accordion.tsx +53 -44
- package/__generated/components/ui/alert-dialog.tsx +96 -84
- package/__generated/components/ui/alert.tsx +33 -37
- package/__generated/components/ui/avatar.tsx +28 -22
- package/__generated/components/ui/badge.tsx +4 -3
- package/__generated/components/ui/button.tsx +18 -22
- package/__generated/components/ui/card.tsx +70 -43
- package/__generated/components/ui/checkbox.tsx +25 -24
- package/__generated/components/ui/context-menu.tsx +140 -121
- package/__generated/components/ui/dialog.tsx +74 -62
- package/__generated/components/ui/dropdown-menu.tsx +147 -126
- package/__generated/components/ui/hover-card.tsx +9 -7
- package/__generated/components/ui/input.tsx +19 -18
- package/__generated/components/ui/label.tsx +13 -6
- package/__generated/components/ui/menubar.tsx +164 -141
- package/__generated/components/ui/navigation-menu.tsx +68 -58
- package/__generated/components/ui/popover.tsx +11 -8
- package/__generated/components/ui/progress.tsx +10 -9
- package/__generated/components/ui/radio-group.tsx +29 -29
- package/__generated/components/ui/select.tsx +58 -40
- package/__generated/components/ui/separator.tsx +11 -6
- package/__generated/components/ui/switch.tsx +50 -47
- package/__generated/components/ui/table.tsx +66 -50
- package/__generated/components/ui/tabs.tsx +43 -36
- package/__generated/components/ui/text.tsx +17 -15
- package/__generated/components/ui/textarea.tsx +24 -21
- package/__generated/components/ui/toggle-group.tsx +32 -22
- package/__generated/components/ui/toggle.tsx +28 -23
- package/__generated/components/ui/tooltip.tsx +31 -26
- package/__generated/components/ui/typography.tsx +141 -198
- package/__generated/starter-base/app/_layout.tsx +24 -22
- package/__generated/starter-base/components/ThemeToggle.tsx +8 -16
- package/__generated/starter-base/components/ui/avatar.tsx +30 -28
- package/__generated/starter-base/components/ui/button.tsx +18 -25
- package/__generated/starter-base/components/ui/card.tsx +61 -36
- package/__generated/starter-base/components/ui/progress.tsx +11 -10
- package/__generated/starter-base/components/ui/text.tsx +17 -15
- package/__generated/starter-base/components/ui/tooltip.tsx +31 -26
- package/__generated/starter-base/package.json +10 -12
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,55 +1,82 @@
|
|
|
1
|
-
import type { TextRef, ViewRef } from '@rn-primitives/types';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { Text, type TextProps, View, type ViewProps } from 'react-native';
|
|
4
3
|
import { cn } from '../../lib/utils';
|
|
5
4
|
import { TextClassContext } from './text';
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
function Card({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: ViewProps & {
|
|
10
|
+
ref?: React.RefObject<View>;
|
|
11
|
+
}) {
|
|
12
|
+
return (
|
|
13
|
+
<View
|
|
14
|
+
className={cn(
|
|
15
|
+
'rounded-lg border border-border bg-card shadow-sm shadow-foreground/10',
|
|
16
|
+
className
|
|
17
|
+
)}
|
|
18
|
+
{...props}
|
|
19
|
+
/>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
18
22
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
function CardHeader({
|
|
24
|
+
className,
|
|
25
|
+
...props
|
|
26
|
+
}: ViewProps & {
|
|
27
|
+
ref?: React.RefObject<View>;
|
|
28
|
+
}) {
|
|
29
|
+
return <View className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} />;
|
|
30
|
+
}
|
|
23
31
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
function CardTitle({
|
|
33
|
+
className,
|
|
34
|
+
...props
|
|
35
|
+
}: TextProps & {
|
|
36
|
+
ref?: React.RefObject<Text>;
|
|
37
|
+
}) {
|
|
38
|
+
return (
|
|
39
|
+
<Text
|
|
40
|
+
role='heading'
|
|
41
|
+
aria-level={3}
|
|
42
|
+
className={cn(
|
|
43
|
+
'text-2xl text-card-foreground font-semibold leading-none tracking-tight',
|
|
44
|
+
className
|
|
45
|
+
)}
|
|
46
|
+
{...props}
|
|
47
|
+
/>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
37
50
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
51
|
+
function CardDescription({
|
|
52
|
+
className,
|
|
53
|
+
...props
|
|
54
|
+
}: TextProps & {
|
|
55
|
+
ref?: React.RefObject<Text>;
|
|
56
|
+
}) {
|
|
57
|
+
return <Text className={cn('text-sm text-muted-foreground', className)} {...props} />;
|
|
58
|
+
}
|
|
42
59
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
60
|
+
function CardContent({
|
|
61
|
+
className,
|
|
62
|
+
...props
|
|
63
|
+
}: ViewProps & {
|
|
64
|
+
ref?: React.RefObject<View>;
|
|
65
|
+
}) {
|
|
66
|
+
return (
|
|
67
|
+
<TextClassContext.Provider value='text-card-foreground'>
|
|
68
|
+
<View className={cn('p-6 pt-0', className)} {...props} />
|
|
69
|
+
</TextClassContext.Provider>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
49
72
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
73
|
+
function CardFooter({
|
|
74
|
+
className,
|
|
75
|
+
...props
|
|
76
|
+
}: ViewProps & {
|
|
77
|
+
ref?: React.RefObject<View>;
|
|
78
|
+
}) {
|
|
79
|
+
return <View className={cn('flex flex-row items-center p-6 pt-0', className)} {...props} />;
|
|
80
|
+
}
|
|
54
81
|
|
|
55
82
|
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
@@ -4,29 +4,30 @@ import { Platform } from 'react-native';
|
|
|
4
4
|
import { Check } from '../../lib/icons/Check';
|
|
5
5
|
import { cn } from '../../lib/utils';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
7
|
+
function Checkbox({
|
|
8
|
+
className,
|
|
9
|
+
...props
|
|
10
|
+
}: CheckboxPrimitive.RootProps & {
|
|
11
|
+
ref?: React.RefObject<CheckboxPrimitive.RootRef>;
|
|
12
|
+
}) {
|
|
13
|
+
return (
|
|
14
|
+
<CheckboxPrimitive.Root
|
|
15
|
+
className={cn(
|
|
16
|
+
'web:peer h-4 w-4 native:h-[20] native:w-[20] shrink-0 rounded-sm native:rounded border border-primary web:ring-offset-background web:focus-visible:outline-none web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
|
|
17
|
+
props.checked && 'bg-primary',
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...props}
|
|
21
|
+
>
|
|
22
|
+
<CheckboxPrimitive.Indicator className={cn('items-center justify-center h-full w-full')}>
|
|
23
|
+
<Check
|
|
24
|
+
size={12}
|
|
25
|
+
strokeWidth={Platform.OS === 'web' ? 2.5 : 3.5}
|
|
26
|
+
className='text-primary-foreground'
|
|
27
|
+
/>
|
|
28
|
+
</CheckboxPrimitive.Indicator>
|
|
29
|
+
</CheckboxPrimitive.Root>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
31
32
|
|
|
32
33
|
export { Checkbox };
|
|
@@ -22,12 +22,16 @@ const ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
|
22
22
|
const ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
23
23
|
const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
function ContextMenuSubTrigger({
|
|
26
|
+
className,
|
|
27
|
+
inset,
|
|
28
|
+
children,
|
|
29
|
+
...props
|
|
30
|
+
}: ContextMenuPrimitive.SubTriggerProps & {
|
|
31
|
+
ref?: React.RefObject<ContextMenuPrimitive.SubTriggerRef>;
|
|
32
|
+
children?: React.ReactNode;
|
|
33
|
+
inset?: boolean;
|
|
34
|
+
}) {
|
|
31
35
|
const { open } = ContextMenuPrimitive.useSubContext();
|
|
32
36
|
const Icon = Platform.OS === 'web' ? ChevronRight : open ? ChevronUp : ChevronDown;
|
|
33
37
|
return (
|
|
@@ -38,7 +42,6 @@ const ContextMenuSubTrigger = React.forwardRef<
|
|
|
38
42
|
)}
|
|
39
43
|
>
|
|
40
44
|
<ContextMenuPrimitive.SubTrigger
|
|
41
|
-
ref={ref}
|
|
42
45
|
className={cn(
|
|
43
46
|
'flex flex-row web:cursor-default web:select-none items-center gap-2 web:focus:bg-accent active:bg-accent web:hover:bg-accent rounded-sm px-2 py-1.5 native:py-2 web:outline-none',
|
|
44
47
|
open && 'bg-accent',
|
|
@@ -47,22 +50,22 @@ const ContextMenuSubTrigger = React.forwardRef<
|
|
|
47
50
|
)}
|
|
48
51
|
{...props}
|
|
49
52
|
>
|
|
50
|
-
|
|
53
|
+
{children}
|
|
51
54
|
<Icon size={18} className='ml-auto text-foreground' />
|
|
52
55
|
</ContextMenuPrimitive.SubTrigger>
|
|
53
56
|
</TextClassContext.Provider>
|
|
54
57
|
);
|
|
55
|
-
}
|
|
56
|
-
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
58
|
+
}
|
|
57
59
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
function ContextMenuSubContent({
|
|
61
|
+
className,
|
|
62
|
+
...props
|
|
63
|
+
}: ContextMenuPrimitive.SubContentProps & {
|
|
64
|
+
ref?: React.RefObject<ContextMenuPrimitive.SubContentRef>;
|
|
65
|
+
}) {
|
|
62
66
|
const { open } = ContextMenuPrimitive.useSubContext();
|
|
63
67
|
return (
|
|
64
68
|
<ContextMenuPrimitive.SubContent
|
|
65
|
-
ref={ref}
|
|
66
69
|
className={cn(
|
|
67
70
|
'z-50 min-w-[8rem] overflow-hidden rounded-md border mt-1 border-border bg-popover p-1 shadow-md shadow-foreground/5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
|
|
68
71
|
open
|
|
@@ -73,17 +76,20 @@ const ContextMenuSubContent = React.forwardRef<
|
|
|
73
76
|
{...props}
|
|
74
77
|
/>
|
|
75
78
|
);
|
|
76
|
-
}
|
|
77
|
-
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
79
|
+
}
|
|
78
80
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
function ContextMenuContent({
|
|
82
|
+
className,
|
|
83
|
+
overlayClassName,
|
|
84
|
+
overlayStyle,
|
|
85
|
+
portalHost,
|
|
86
|
+
...props
|
|
87
|
+
}: ContextMenuPrimitive.ContentProps & {
|
|
88
|
+
ref?: React.RefObject<ContextMenuPrimitive.ContentRef>;
|
|
89
|
+
overlayStyle?: StyleProp<ViewStyle>;
|
|
90
|
+
overlayClassName?: string;
|
|
91
|
+
portalHost?: string;
|
|
92
|
+
}) {
|
|
87
93
|
const { open } = ContextMenuPrimitive.useRootContext();
|
|
88
94
|
return (
|
|
89
95
|
<ContextMenuPrimitive.Portal hostName={portalHost}>
|
|
@@ -92,7 +98,7 @@ const ContextMenuContent = React.forwardRef<
|
|
|
92
98
|
overlayStyle
|
|
93
99
|
? StyleSheet.flatten([
|
|
94
100
|
Platform.OS !== 'web' ? StyleSheet.absoluteFill : undefined,
|
|
95
|
-
overlayStyle,
|
|
101
|
+
overlayStyle as typeof StyleSheet.absoluteFill,
|
|
96
102
|
])
|
|
97
103
|
: Platform.OS !== 'web'
|
|
98
104
|
? StyleSheet.absoluteFill
|
|
@@ -101,7 +107,6 @@ const ContextMenuContent = React.forwardRef<
|
|
|
101
107
|
className={overlayClassName}
|
|
102
108
|
>
|
|
103
109
|
<ContextMenuPrimitive.Content
|
|
104
|
-
ref={ref}
|
|
105
110
|
className={cn(
|
|
106
111
|
'z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 shadow-md shadow-foreground/5 web:data-[side=bottom]:slide-in-from-top-2 web:data-[side=left]:slide-in-from-right-2 web:data-[side=right]:slide-in-from-left-2 web:data-[side=top]:slide-in-from-bottom-2',
|
|
107
112
|
open
|
|
@@ -114,107 +119,122 @@ const ContextMenuContent = React.forwardRef<
|
|
|
114
119
|
</ContextMenuPrimitive.Overlay>
|
|
115
120
|
</ContextMenuPrimitive.Portal>
|
|
116
121
|
);
|
|
117
|
-
}
|
|
118
|
-
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
122
|
+
}
|
|
119
123
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
124
|
+
function ContextMenuItem({
|
|
125
|
+
className,
|
|
126
|
+
inset,
|
|
127
|
+
...props
|
|
128
|
+
}: ContextMenuPrimitive.ItemProps & {
|
|
129
|
+
ref?: React.RefObject<ContextMenuPrimitive.ItemRef>;
|
|
130
|
+
className?: string;
|
|
131
|
+
inset?: boolean;
|
|
132
|
+
}) {
|
|
133
|
+
return (
|
|
134
|
+
<TextClassContext.Provider value='select-none text-sm native:text-lg text-popover-foreground web:group-focus:text-accent-foreground'>
|
|
135
|
+
<ContextMenuPrimitive.Item
|
|
136
|
+
className={cn(
|
|
137
|
+
'relative flex flex-row web:cursor-default items-center gap-2 rounded-sm px-2 py-1.5 native:py-2 web:outline-none web:focus:bg-accent active:bg-accent web:hover:bg-accent group',
|
|
138
|
+
inset && 'pl-8',
|
|
139
|
+
props.disabled && 'opacity-50 web:pointer-events-none',
|
|
140
|
+
className
|
|
141
|
+
)}
|
|
142
|
+
{...props}
|
|
143
|
+
/>
|
|
144
|
+
</TextClassContext.Provider>
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function ContextMenuCheckboxItem({
|
|
149
|
+
className,
|
|
150
|
+
children,
|
|
151
|
+
...props
|
|
152
|
+
}: ContextMenuPrimitive.CheckboxItemProps & {
|
|
153
|
+
ref?: React.RefObject<ContextMenuPrimitive.CheckboxItemRef>;
|
|
154
|
+
children?: React.ReactNode;
|
|
155
|
+
}) {
|
|
156
|
+
return (
|
|
157
|
+
<ContextMenuPrimitive.CheckboxItem
|
|
129
158
|
className={cn(
|
|
130
|
-
'relative flex flex-row web:cursor-default items-center
|
|
131
|
-
|
|
132
|
-
props.disabled && 'opacity-50 web:pointer-events-none',
|
|
159
|
+
'relative flex flex-row web:cursor-default items-center web:group rounded-sm py-1.5 native:py-2 pl-8 pr-2 web:outline-none web:focus:bg-accent active:bg-accent',
|
|
160
|
+
props.disabled && 'web:pointer-events-none opacity-50',
|
|
133
161
|
className
|
|
134
162
|
)}
|
|
135
163
|
{...props}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
ref={ref}
|
|
147
|
-
className={cn(
|
|
148
|
-
'relative flex flex-row web:cursor-default items-center web:group rounded-sm py-1.5 native:py-2 pl-8 pr-2 web:outline-none web:focus:bg-accent active:bg-accent',
|
|
149
|
-
props.disabled && 'web:pointer-events-none opacity-50',
|
|
150
|
-
className
|
|
151
|
-
)}
|
|
152
|
-
{...props}
|
|
153
|
-
>
|
|
154
|
-
<View className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
|
|
155
|
-
<ContextMenuPrimitive.ItemIndicator>
|
|
156
|
-
<Check size={14} strokeWidth={3} className='text-foreground' />
|
|
157
|
-
</ContextMenuPrimitive.ItemIndicator>
|
|
158
|
-
</View>
|
|
159
|
-
<>{children}</>
|
|
160
|
-
</ContextMenuPrimitive.CheckboxItem>
|
|
161
|
-
));
|
|
162
|
-
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
|
|
164
|
+
>
|
|
165
|
+
<View className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
|
|
166
|
+
<ContextMenuPrimitive.ItemIndicator>
|
|
167
|
+
<Check size={14} strokeWidth={3} className='text-foreground' />
|
|
168
|
+
</ContextMenuPrimitive.ItemIndicator>
|
|
169
|
+
</View>
|
|
170
|
+
{children}
|
|
171
|
+
</ContextMenuPrimitive.CheckboxItem>
|
|
172
|
+
);
|
|
173
|
+
}
|
|
163
174
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
175
|
+
function ContextMenuRadioItem({
|
|
176
|
+
className,
|
|
177
|
+
children,
|
|
178
|
+
...props
|
|
179
|
+
}: ContextMenuPrimitive.RadioItemProps & {
|
|
180
|
+
ref?: React.RefObject<ContextMenuPrimitive.RadioItemRef>;
|
|
181
|
+
children?: React.ReactNode;
|
|
182
|
+
}) {
|
|
183
|
+
return (
|
|
184
|
+
<ContextMenuPrimitive.RadioItem
|
|
185
|
+
className={cn(
|
|
186
|
+
'relative flex flex-row web:cursor-default web:group items-center rounded-sm py-1.5 native:py-2 pl-8 pr-2 web:outline-none web:focus:bg-accent active:bg-accent',
|
|
187
|
+
props.disabled && 'web:pointer-events-none opacity-50',
|
|
188
|
+
className
|
|
189
|
+
)}
|
|
190
|
+
{...props}
|
|
191
|
+
>
|
|
192
|
+
<View className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
|
|
193
|
+
<ContextMenuPrimitive.ItemIndicator>
|
|
194
|
+
<View className='bg-foreground h-2 w-2 rounded-full' />
|
|
195
|
+
</ContextMenuPrimitive.ItemIndicator>
|
|
196
|
+
</View>
|
|
197
|
+
{children}
|
|
198
|
+
</ContextMenuPrimitive.RadioItem>
|
|
199
|
+
);
|
|
200
|
+
}
|
|
186
201
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
className
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
)
|
|
203
|
-
|
|
202
|
+
function ContextMenuLabel({
|
|
203
|
+
className,
|
|
204
|
+
inset,
|
|
205
|
+
...props
|
|
206
|
+
}: ContextMenuPrimitive.LabelProps & {
|
|
207
|
+
ref?: React.RefObject<ContextMenuPrimitive.LabelRef>;
|
|
208
|
+
className?: string;
|
|
209
|
+
inset?: boolean;
|
|
210
|
+
}) {
|
|
211
|
+
return (
|
|
212
|
+
<ContextMenuPrimitive.Label
|
|
213
|
+
className={cn(
|
|
214
|
+
'px-2 py-1.5 text-sm native:text-base font-semibold text-foreground web:cursor-default',
|
|
215
|
+
inset && 'pl-8',
|
|
216
|
+
className
|
|
217
|
+
)}
|
|
218
|
+
{...props}
|
|
219
|
+
/>
|
|
220
|
+
);
|
|
221
|
+
}
|
|
204
222
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
<ContextMenuPrimitive.
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
223
|
+
function ContextMenuSeparator({
|
|
224
|
+
className,
|
|
225
|
+
...props
|
|
226
|
+
}: ContextMenuPrimitive.SeparatorProps & {
|
|
227
|
+
ref?: React.RefObject<ContextMenuPrimitive.SeparatorRef>;
|
|
228
|
+
}) {
|
|
229
|
+
return (
|
|
230
|
+
<ContextMenuPrimitive.Separator
|
|
231
|
+
className={cn('-mx-1 my-1 h-px bg-border', className)}
|
|
232
|
+
{...props}
|
|
233
|
+
/>
|
|
234
|
+
);
|
|
235
|
+
}
|
|
216
236
|
|
|
217
|
-
|
|
237
|
+
function ContextMenuShortcut({ className, ...props }: TextProps) {
|
|
218
238
|
return (
|
|
219
239
|
<Text
|
|
220
240
|
className={cn(
|
|
@@ -224,8 +244,7 @@ const ContextMenuShortcut = ({ className, ...props }: TextProps) => {
|
|
|
224
244
|
{...props}
|
|
225
245
|
/>
|
|
226
246
|
);
|
|
227
|
-
}
|
|
228
|
-
ContextMenuShortcut.displayName = 'ContextMenuShortcut';
|
|
247
|
+
}
|
|
229
248
|
|
|
230
249
|
export {
|
|
231
250
|
ContextMenu,
|