@stackshift-ui/dropdown-menu 1.0.0-beta.2 → 1.0.0-beta.4
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/dist/chunk-6DZX6EAA.mjs +37 -0
- package/dist/chunk-QJPK6AEC.mjs +1 -0
- package/dist/chunk-R7IXLJKK.mjs +263 -0
- package/dist/dropdown-menu.d.ts +18 -63
- package/dist/dropdown-menu.js +1 -1
- package/dist/dropdown-menu.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/setupTests.js +36 -40
- package/dist/setupTests.mjs +34 -38
- package/package.json +6 -6
- package/src/dropdown-menu.tsx +118 -81
- package/dist/chunk-T7FMXF3I.mjs +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/dropdown-menu",
|
|
3
3
|
"description": "Displays a menu to the user — such as a set of actions or functions — triggered by a button.",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.4",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -31,18 +31,18 @@
|
|
|
31
31
|
"typescript": "^5.6.2",
|
|
32
32
|
"vite-tsconfig-paths": "^5.0.1",
|
|
33
33
|
"vitest": "^2.1.1",
|
|
34
|
-
"@stackshift-ui/
|
|
35
|
-
"@stackshift-ui/
|
|
34
|
+
"@stackshift-ui/typescript-config": "6.0.10",
|
|
35
|
+
"@stackshift-ui/eslint-config": "6.0.10"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
|
39
39
|
"classnames": "^2.5.1",
|
|
40
40
|
"lucide-react": "^0.468.0",
|
|
41
|
-
"@stackshift-ui/scripts": "6.1.0-beta.
|
|
42
|
-
"@stackshift-ui/system": "6.1.0-beta.
|
|
41
|
+
"@stackshift-ui/scripts": "6.1.0-beta.2",
|
|
42
|
+
"@stackshift-ui/system": "6.1.0-beta.3"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@stackshift-ui/system": ">=6.1.0-beta.
|
|
45
|
+
"@stackshift-ui/system": ">=6.1.0-beta.3",
|
|
46
46
|
"@types/react": "16.8 - 19",
|
|
47
47
|
"next": "10 - 14",
|
|
48
48
|
"react": "16.8 - 19",
|
package/src/dropdown-menu.tsx
CHANGED
|
@@ -22,40 +22,56 @@ const displayNameSub = "DropdownMenuSub";
|
|
|
22
22
|
const displayNameSubTrigger = "DropdownMenuSubTrigger";
|
|
23
23
|
const displayNameSubContent = "DropdownMenuSubContent";
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
const DropdownMenu = React.forwardRef<
|
|
26
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Root>,
|
|
27
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root>
|
|
28
|
+
>(({ ...props }, ref) => {
|
|
26
29
|
const { [displayName]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
27
30
|
|
|
28
|
-
return
|
|
29
|
-
}
|
|
31
|
+
return (
|
|
32
|
+
<Component as={DropdownMenuPrimitive.Root} data-slot="dropdown-menu" ref={ref} {...props} />
|
|
33
|
+
);
|
|
34
|
+
});
|
|
30
35
|
DropdownMenu.displayName = displayName;
|
|
31
36
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
const DropdownMenuPortal = React.forwardRef<
|
|
38
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Portal>,
|
|
39
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>
|
|
40
|
+
>(({ ...props }, ref) => {
|
|
35
41
|
const { [displayNamePortal]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
36
42
|
|
|
37
43
|
return (
|
|
38
|
-
<Component
|
|
44
|
+
<Component
|
|
45
|
+
as={DropdownMenuPrimitive.Portal}
|
|
46
|
+
data-slot="dropdown-menu-portal"
|
|
47
|
+
ref={ref}
|
|
48
|
+
{...props}
|
|
49
|
+
/>
|
|
39
50
|
);
|
|
40
|
-
}
|
|
51
|
+
});
|
|
41
52
|
DropdownMenuPortal.displayName = displayNamePortal;
|
|
42
53
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
54
|
+
const DropdownMenuTrigger = React.forwardRef<
|
|
55
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Trigger>,
|
|
56
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>
|
|
57
|
+
>(({ ...props }, ref) => {
|
|
46
58
|
const { [displayNameTrigger]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
47
59
|
|
|
48
60
|
return (
|
|
49
|
-
<Component
|
|
61
|
+
<Component
|
|
62
|
+
as={DropdownMenuPrimitive.Trigger}
|
|
63
|
+
data-slot="dropdown-menu-trigger"
|
|
64
|
+
ref={ref}
|
|
65
|
+
{...props}
|
|
66
|
+
/>
|
|
50
67
|
);
|
|
51
|
-
}
|
|
68
|
+
});
|
|
52
69
|
DropdownMenuTrigger.displayName = displayNameTrigger;
|
|
53
70
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {
|
|
71
|
+
const DropdownMenuContent = React.forwardRef<
|
|
72
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Content>,
|
|
73
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
|
|
74
|
+
>(({ className, sideOffset = 4, ...props }, ref) => {
|
|
59
75
|
const { [displayNameContent]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
60
76
|
|
|
61
77
|
return (
|
|
@@ -68,29 +84,38 @@ function DropdownMenuContent({
|
|
|
68
84
|
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
69
85
|
className,
|
|
70
86
|
)}
|
|
87
|
+
ref={ref}
|
|
71
88
|
{...props}
|
|
72
89
|
/>
|
|
73
90
|
</DropdownMenuPortal>
|
|
74
91
|
);
|
|
75
|
-
}
|
|
92
|
+
});
|
|
76
93
|
DropdownMenuContent.displayName = displayNameContent;
|
|
77
94
|
|
|
78
|
-
|
|
95
|
+
const DropdownMenuGroup = React.forwardRef<
|
|
96
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Group>,
|
|
97
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Group>
|
|
98
|
+
>(({ ...props }, ref) => {
|
|
79
99
|
const { [displayNameGroup]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
80
100
|
|
|
81
|
-
return
|
|
82
|
-
|
|
101
|
+
return (
|
|
102
|
+
<Component
|
|
103
|
+
as={DropdownMenuPrimitive.Group}
|
|
104
|
+
data-slot="dropdown-menu-group"
|
|
105
|
+
ref={ref}
|
|
106
|
+
{...props}
|
|
107
|
+
/>
|
|
108
|
+
);
|
|
109
|
+
});
|
|
83
110
|
DropdownMenuGroup.displayName = displayNameGroup;
|
|
84
111
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
variant?: "default" | "destructive";
|
|
93
|
-
}) {
|
|
112
|
+
const DropdownMenuItem = React.forwardRef<
|
|
113
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Item>,
|
|
114
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
|
|
115
|
+
inset?: boolean;
|
|
116
|
+
variant?: "default" | "destructive";
|
|
117
|
+
}
|
|
118
|
+
>(({ className, inset, variant = "default", ...props }, ref) => {
|
|
94
119
|
const { [displayNameItem]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
95
120
|
|
|
96
121
|
return (
|
|
@@ -103,18 +128,17 @@ function DropdownMenuItem({
|
|
|
103
128
|
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
104
129
|
className,
|
|
105
130
|
)}
|
|
131
|
+
ref={ref}
|
|
106
132
|
{...props}
|
|
107
133
|
/>
|
|
108
134
|
);
|
|
109
|
-
}
|
|
135
|
+
});
|
|
110
136
|
DropdownMenuItem.displayName = displayNameItem;
|
|
111
137
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
...props
|
|
117
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {
|
|
138
|
+
const DropdownMenuCheckboxItem = React.forwardRef<
|
|
139
|
+
React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
|
|
140
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>
|
|
141
|
+
>(({ className, children, checked, ...props }, ref) => {
|
|
118
142
|
const { [displayNameCheckboxItem]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
119
143
|
|
|
120
144
|
return (
|
|
@@ -126,6 +150,7 @@ function DropdownMenuCheckboxItem({
|
|
|
126
150
|
className,
|
|
127
151
|
)}
|
|
128
152
|
checked={checked}
|
|
153
|
+
ref={ref}
|
|
129
154
|
{...props}>
|
|
130
155
|
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
131
156
|
<DropdownMenuPrimitive.ItemIndicator>
|
|
@@ -135,29 +160,30 @@ function DropdownMenuCheckboxItem({
|
|
|
135
160
|
{children}
|
|
136
161
|
</Component>
|
|
137
162
|
);
|
|
138
|
-
}
|
|
163
|
+
});
|
|
139
164
|
DropdownMenuCheckboxItem.displayName = displayNameCheckboxItem;
|
|
140
165
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
166
|
+
const DropdownMenuRadioGroup = React.forwardRef<
|
|
167
|
+
React.ElementRef<typeof DropdownMenuPrimitive.RadioGroup>,
|
|
168
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup>
|
|
169
|
+
>(({ ...props }, ref) => {
|
|
144
170
|
const { [displayNameRadioGroup]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
145
171
|
|
|
146
172
|
return (
|
|
147
173
|
<Component
|
|
148
174
|
as={DropdownMenuPrimitive.RadioGroup}
|
|
149
175
|
data-slot="dropdown-menu-radio-group"
|
|
176
|
+
ref={ref}
|
|
150
177
|
{...props}
|
|
151
178
|
/>
|
|
152
179
|
);
|
|
153
|
-
}
|
|
180
|
+
});
|
|
154
181
|
DropdownMenuRadioGroup.displayName = displayNameRadioGroup;
|
|
155
182
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {
|
|
183
|
+
const DropdownMenuRadioItem = React.forwardRef<
|
|
184
|
+
React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
|
|
185
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>
|
|
186
|
+
>(({ className, children, ...props }, ref) => {
|
|
161
187
|
const { [displayNameRadioItem]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
162
188
|
|
|
163
189
|
return (
|
|
@@ -168,6 +194,7 @@ function DropdownMenuRadioItem({
|
|
|
168
194
|
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
169
195
|
className,
|
|
170
196
|
)}
|
|
197
|
+
ref={ref}
|
|
171
198
|
{...props}>
|
|
172
199
|
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
173
200
|
<DropdownMenuPrimitive.ItemIndicator>
|
|
@@ -177,16 +204,15 @@ function DropdownMenuRadioItem({
|
|
|
177
204
|
{children}
|
|
178
205
|
</Component>
|
|
179
206
|
);
|
|
180
|
-
}
|
|
207
|
+
});
|
|
181
208
|
DropdownMenuRadioItem.displayName = displayNameRadioItem;
|
|
182
209
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
}) {
|
|
210
|
+
const DropdownMenuLabel = React.forwardRef<
|
|
211
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Label>,
|
|
212
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
|
|
213
|
+
inset?: boolean;
|
|
214
|
+
}
|
|
215
|
+
>(({ className, inset, ...props }, ref) => {
|
|
190
216
|
const { [displayNameLabel]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
191
217
|
|
|
192
218
|
return (
|
|
@@ -195,63 +221,73 @@ function DropdownMenuLabel({
|
|
|
195
221
|
data-slot="dropdown-menu-label"
|
|
196
222
|
data-inset={inset}
|
|
197
223
|
className={cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className)}
|
|
224
|
+
ref={ref}
|
|
198
225
|
{...props}
|
|
199
226
|
/>
|
|
200
227
|
);
|
|
201
|
-
}
|
|
228
|
+
});
|
|
202
229
|
DropdownMenuLabel.displayName = displayNameLabel;
|
|
203
230
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
}
|
|
231
|
+
const DropdownMenuSeparator = React.forwardRef<
|
|
232
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
|
|
233
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
|
|
234
|
+
>(({ className, ...props }, ref) => {
|
|
208
235
|
const { [displayNameSeparator]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
209
236
|
|
|
210
237
|
return (
|
|
211
238
|
<Component
|
|
212
239
|
as={DropdownMenuPrimitive.Separator}
|
|
240
|
+
ref={ref}
|
|
213
241
|
data-slot="dropdown-menu-separator"
|
|
214
242
|
className={cn("bg-border -mx-1 my-1 h-px", className)}
|
|
215
243
|
{...props}
|
|
216
244
|
/>
|
|
217
245
|
);
|
|
218
|
-
}
|
|
246
|
+
});
|
|
219
247
|
DropdownMenuSeparator.displayName = displayNameSeparator;
|
|
220
248
|
|
|
221
|
-
|
|
249
|
+
const DropdownMenuShortcut = React.forwardRef<
|
|
250
|
+
React.ElementRef<"span">,
|
|
251
|
+
React.ComponentPropsWithoutRef<"span">
|
|
252
|
+
>(({ className, ...props }, ref) => {
|
|
222
253
|
const { [displayNameShortcut]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
223
254
|
|
|
224
255
|
return (
|
|
225
256
|
<Component
|
|
226
257
|
as="span"
|
|
258
|
+
ref={ref}
|
|
227
259
|
data-slot="dropdown-menu-shortcut"
|
|
228
260
|
className={cn("text-muted-foreground ml-auto text-xs tracking-widest", className)}
|
|
229
261
|
{...props}
|
|
230
262
|
/>
|
|
231
263
|
);
|
|
232
|
-
}
|
|
264
|
+
});
|
|
233
265
|
DropdownMenuShortcut.displayName = displayNameShortcut;
|
|
234
266
|
|
|
235
|
-
|
|
267
|
+
const DropdownMenuSub = React.forwardRef<
|
|
268
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Sub>,
|
|
269
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Sub>
|
|
270
|
+
>(({ ...props }, ref) => {
|
|
236
271
|
const { [displayNameSub]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
237
272
|
|
|
238
|
-
return
|
|
239
|
-
}
|
|
273
|
+
return (
|
|
274
|
+
<Component as={DropdownMenuPrimitive.Sub} ref={ref} data-slot="dropdown-menu-sub" {...props} />
|
|
275
|
+
);
|
|
276
|
+
});
|
|
240
277
|
DropdownMenuSub.displayName = displayNameSub;
|
|
241
278
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}
|
|
248
|
-
inset?: boolean;
|
|
249
|
-
}) {
|
|
279
|
+
const DropdownMenuSubTrigger = React.forwardRef<
|
|
280
|
+
React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
|
|
281
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
282
|
+
inset?: boolean;
|
|
283
|
+
}
|
|
284
|
+
>(({ className, inset, children, ...props }, ref) => {
|
|
250
285
|
const { [displayNameSubTrigger]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
251
286
|
|
|
252
287
|
return (
|
|
253
288
|
<Component
|
|
254
289
|
as={DropdownMenuPrimitive.SubTrigger}
|
|
290
|
+
ref={ref}
|
|
255
291
|
data-slot="dropdown-menu-sub-trigger"
|
|
256
292
|
data-inset={inset}
|
|
257
293
|
className={cn(
|
|
@@ -263,18 +299,19 @@ function DropdownMenuSubTrigger({
|
|
|
263
299
|
<ChevronRightIcon className="ml-auto size-4" />
|
|
264
300
|
</Component>
|
|
265
301
|
);
|
|
266
|
-
}
|
|
302
|
+
});
|
|
267
303
|
DropdownMenuSubTrigger.displayName = displayNameSubTrigger;
|
|
268
304
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
}
|
|
305
|
+
const DropdownMenuSubContent = React.forwardRef<
|
|
306
|
+
React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
|
|
307
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>
|
|
308
|
+
>(({ className, ...props }, ref) => {
|
|
273
309
|
const { [displayNameSubContent]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
274
310
|
|
|
275
311
|
return (
|
|
276
312
|
<Component
|
|
277
313
|
as={DropdownMenuPrimitive.SubContent}
|
|
314
|
+
ref={ref}
|
|
278
315
|
data-slot="dropdown-menu-sub-content"
|
|
279
316
|
className={cn(
|
|
280
317
|
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
@@ -283,7 +320,7 @@ function DropdownMenuSubContent({
|
|
|
283
320
|
{...props}
|
|
284
321
|
/>
|
|
285
322
|
);
|
|
286
|
-
}
|
|
323
|
+
});
|
|
287
324
|
DropdownMenuSubContent.displayName = displayNameSubContent;
|
|
288
325
|
|
|
289
326
|
export {
|
package/dist/chunk-T7FMXF3I.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as e from"@radix-ui/react-dropdown-menu";import{CheckIcon as R,ChevronRightIcon as I,CircleIcon as S}from"lucide-react";import{cn as s,DefaultComponent as r,useStackShiftUIComponents as i}from"@stackshift-ui/system";import{jsx as n,jsxs as u}from"react/jsx-runtime";var m="DropdownMenu",c="DropdownMenuPortal",l="DropdownMenuTrigger",f="DropdownMenuContent",w="DropdownMenuGroup",v="DropdownMenuItem",g="DropdownMenuCheckboxItem",D="DropdownMenuRadioGroup",M="DropdownMenuRadioItem",b="DropdownMenuLabel",y="DropdownMenuSeparator",P="DropdownMenuShortcut",C="DropdownMenuSub",N="DropdownMenuSubTrigger",x="DropdownMenuSubContent";function z({...o}){let{[m]:t=r}=i();return n(t,{as:e.Root,"data-slot":"dropdown-menu",...o})}z.displayName=m;function h({...o}){let{[c]:t=r}=i();return n(t,{as:e.Portal,"data-slot":"dropdown-menu-portal",...o})}h.displayName=c;function k({...o}){let{[l]:t=r}=i();return n(t,{as:e.Trigger,"data-slot":"dropdown-menu-trigger",...o})}k.displayName=l;function G({className:o,sideOffset:t=4,...a}){let{[f]:d=r}=i();return n(h,{children:n(d,{as:e.Content,"data-slot":"dropdown-menu-content",sideOffset:t,className:s("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",o),...a})})}G.displayName=f;function T({...o}){let{[w]:t=r}=i();return n(t,{as:e.Group,"data-slot":"dropdown-menu-group",...o})}T.displayName=w;function _({className:o,inset:t,variant:a="default",...d}){let{[v]:p=r}=i();return n(p,{as:e.Item,"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":a,className:s("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),...d})}_.displayName=v;function L({className:o,children:t,checked:a,...d}){let{[g]:p=r}=i();return u(p,{as:e.CheckboxItem,"data-slot":"dropdown-menu-checkbox-item",className:s("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),checked:a,...d,children:[n("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:n(e.ItemIndicator,{children:n(R,{className:"size-4"})})}),t]})}L.displayName=g;function j({...o}){let{[D]:t=r}=i();return n(t,{as:e.RadioGroup,"data-slot":"dropdown-menu-radio-group",...o})}j.displayName=D;function O({className:o,children:t,...a}){let{[M]:d=r}=i();return u(d,{as:e.RadioItem,"data-slot":"dropdown-menu-radio-item",className:s("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),...a,children:[n("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:n(e.ItemIndicator,{children:n(S,{className:"size-2 fill-current"})})}),t]})}O.displayName=M;function U({className:o,inset:t,...a}){let{[b]:d=r}=i();return n(d,{as:e.Label,"data-slot":"dropdown-menu-label","data-inset":t,className:s("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",o),...a})}U.displayName=b;function q({className:o,...t}){let{[y]:a=r}=i();return n(a,{as:e.Separator,"data-slot":"dropdown-menu-separator",className:s("bg-border -mx-1 my-1 h-px",o),...t})}q.displayName=y;function A({className:o,...t}){let{[P]:a=r}=i();return n(a,{as:"span","data-slot":"dropdown-menu-shortcut",className:s("text-muted-foreground ml-auto text-xs tracking-widest",o),...t})}A.displayName=P;function B({...o}){let{[C]:t=r}=i();return n(t,{as:e.Sub,"data-slot":"dropdown-menu-sub",...o})}B.displayName=C;function E({className:o,inset:t,children:a,...d}){let{[N]:p=r}=i();return u(p,{as:e.SubTrigger,"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:s("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",o),...d,children:[a,n(I,{className:"ml-auto size-4"})]})}E.displayName=N;function F({className:o,...t}){let{[x]:a=r}=i();return n(a,{as:e.SubContent,"data-slot":"dropdown-menu-sub-content",className:s("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",o),...t})}F.displayName=x;export{z as a,h as b,k as c,G as d,T as e,_ as f,L as g,j as h,O as i,U as j,q as k,A as l,B as m,E as n,F as o};
|