@vuer-ai/vuer-uikit 0.0.12 → 0.0.13
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 +3 -2
- package/src/highlight-cursor/cursor-context.tsx +23 -0
- package/src/highlight-cursor/cursor-provider.tsx +264 -0
- package/src/highlight-cursor/enhanced-components.tsx +16 -0
- package/src/highlight-cursor/index.ts +21 -0
- package/src/highlight-cursor/tabs-cursor-context.tsx +121 -0
- package/src/highlight-cursor/types.ts +40 -0
- package/src/highlight-cursor/with-cursor.tsx +144 -0
- package/src/index.css +5 -0
- package/src/index.ts +5 -0
- package/src/styles/theme.css +80 -0
- package/src/styles/toast.css +64 -0
- package/src/styles/variables.css +194 -0
- package/src/ui/avatar.tsx +92 -0
- package/src/ui/badge.tsx +68 -0
- package/src/ui/button.tsx +100 -0
- package/src/ui/card.tsx +88 -0
- package/src/ui/checkbox.tsx +76 -0
- package/src/ui/collapsible.tsx +36 -0
- package/src/ui/dropdown.tsx +375 -0
- package/src/ui/index.ts +31 -0
- package/src/ui/input-numbers.tsx +201 -0
- package/src/ui/input.tsx +141 -0
- package/src/ui/layout.tsx +41 -0
- package/src/ui/modal.tsx +198 -0
- package/src/ui/popover.tsx +59 -0
- package/src/ui/radio-group.tsx +56 -0
- package/src/ui/select.tsx +292 -0
- package/src/ui/sheet.tsx +131 -0
- package/src/ui/slider.tsx +189 -0
- package/src/ui/switch.tsx +43 -0
- package/src/ui/tabs.tsx +128 -0
- package/src/ui/textarea.tsx +52 -0
- package/src/ui/theme-context.tsx +80 -0
- package/src/ui/timeline.tsx +717 -0
- package/src/ui/toast.tsx +27 -0
- package/src/ui/toggle-group.tsx +82 -0
- package/src/ui/toggle.tsx +88 -0
- package/src/ui/tooltip.tsx +132 -0
- package/src/ui/tree-view-v2.tsx +300 -0
- package/src/ui/tree-view.tsx +550 -0
- package/src/ui/version-badge.tsx +65 -0
- package/src/utils/cn.ts +21 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/use-local-storage.ts +59 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
2
|
+
import { CheckIcon } from "lucide-react";
|
|
3
|
+
import { type ComponentProps } from "react";
|
|
4
|
+
|
|
5
|
+
import { cn } from "../utils";
|
|
6
|
+
|
|
7
|
+
interface CheckboxProps extends Omit<ComponentProps<typeof CheckboxPrimitive.Root>, "className"> {
|
|
8
|
+
checkall?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function Checkbox({ className, checkall, ...props }: CheckboxProps) {
|
|
13
|
+
return (
|
|
14
|
+
<CheckboxPrimitive.Root
|
|
15
|
+
data-slot="checkbox"
|
|
16
|
+
className={cn(
|
|
17
|
+
"group",
|
|
18
|
+
"relative",
|
|
19
|
+
"w-[16px]",
|
|
20
|
+
"h-[16px]",
|
|
21
|
+
"rounded-[3px]",
|
|
22
|
+
"border-[1.5px]",
|
|
23
|
+
"border-solid",
|
|
24
|
+
"border-bg-tertiary",
|
|
25
|
+
"data-[state=checked]:bg-brand-primary",
|
|
26
|
+
"data-[state=checked]:border-none",
|
|
27
|
+
"disabled:cursor-not-allowed",
|
|
28
|
+
"disabled:bg-bg-secondary",
|
|
29
|
+
"disabled:data-[state=checked]:bg-bg-secondary",
|
|
30
|
+
"disabled:data-[state=checked]:border-[1.5px]",
|
|
31
|
+
"disabled:data-[state=checked]:border-solid",
|
|
32
|
+
"disabled:data-[state=checked]:border-bg-tertiary",
|
|
33
|
+
checkall && [
|
|
34
|
+
"data-[state=checked]:bg-bg-transparent",
|
|
35
|
+
"data-[state=checked]:border-[1.5px]",
|
|
36
|
+
"data-[state=checked]:border-solid",
|
|
37
|
+
"data-[state=checked]:border-bg-tertiary",
|
|
38
|
+
],
|
|
39
|
+
className,
|
|
40
|
+
)}
|
|
41
|
+
{...props}
|
|
42
|
+
>
|
|
43
|
+
{checkall ? (
|
|
44
|
+
<CheckboxPrimitive.Indicator
|
|
45
|
+
data-slot="checkbox-indicator"
|
|
46
|
+
className={cn(
|
|
47
|
+
"absolute",
|
|
48
|
+
"inset-0",
|
|
49
|
+
"m-auto",
|
|
50
|
+
"w-3/5",
|
|
51
|
+
"h-3/5",
|
|
52
|
+
"bg-brand-primary",
|
|
53
|
+
"group-disabled:bg-bg-tertiary",
|
|
54
|
+
)}
|
|
55
|
+
></CheckboxPrimitive.Indicator>
|
|
56
|
+
) : (
|
|
57
|
+
<CheckboxPrimitive.Indicator
|
|
58
|
+
data-slot="checkbox-indicator"
|
|
59
|
+
className={cn(
|
|
60
|
+
"flex",
|
|
61
|
+
"items-center",
|
|
62
|
+
"justify-center",
|
|
63
|
+
"text-current",
|
|
64
|
+
"transition-none",
|
|
65
|
+
"text-icon-withbg",
|
|
66
|
+
"group-disabled:text-bg-tertiary",
|
|
67
|
+
)}
|
|
68
|
+
>
|
|
69
|
+
<CheckIcon className="size-3.5" />
|
|
70
|
+
</CheckboxPrimitive.Indicator>
|
|
71
|
+
)}
|
|
72
|
+
</CheckboxPrimitive.Root>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export { Checkbox };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
|
|
4
|
+
import { cn } from "../utils";
|
|
5
|
+
|
|
6
|
+
function Collapsible({ ...props }: ComponentProps<typeof CollapsiblePrimitive.Root>) {
|
|
7
|
+
return <CollapsiblePrimitive.Root data-slot="collapsible" {...props} />;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function CollapsibleTrigger({
|
|
11
|
+
...props
|
|
12
|
+
}: ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {
|
|
13
|
+
return <CollapsiblePrimitive.CollapsibleTrigger data-slot="collapsible-trigger" {...props} />;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function CollapsibleContent({
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
}: ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {
|
|
20
|
+
return (
|
|
21
|
+
<CollapsiblePrimitive.CollapsibleContent
|
|
22
|
+
data-slot="collapsible-content"
|
|
23
|
+
className={cn(
|
|
24
|
+
[
|
|
25
|
+
"overflow-hidden",
|
|
26
|
+
"data-[state=open]:animate-collapsible-down",
|
|
27
|
+
"data-[state=closed]:animate-collapsible-up",
|
|
28
|
+
],
|
|
29
|
+
className,
|
|
30
|
+
)}
|
|
31
|
+
{...props}
|
|
32
|
+
/>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
2
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
3
|
+
import { ComponentProps } from "react";
|
|
4
|
+
|
|
5
|
+
import { cn } from "../utils";
|
|
6
|
+
|
|
7
|
+
function DropdownMenu({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Root>) {
|
|
8
|
+
return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function DropdownMenuPortal({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Portal>) {
|
|
12
|
+
return <DropdownMenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function DropdownMenuTrigger({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {
|
|
16
|
+
return (
|
|
17
|
+
<DropdownMenuPrimitive.Trigger
|
|
18
|
+
data-slot="dropdown-menu-trigger"
|
|
19
|
+
className="text-text-primary hover:text-text-highlight disabled:text-text-tertiary active:text-text-secondary"
|
|
20
|
+
{...props}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function DropdownMenuContent({
|
|
26
|
+
className,
|
|
27
|
+
sideOffset = 4,
|
|
28
|
+
...props
|
|
29
|
+
}: ComponentProps<typeof DropdownMenuPrimitive.Content>) {
|
|
30
|
+
return (
|
|
31
|
+
<DropdownMenuPrimitive.Portal>
|
|
32
|
+
<DropdownMenuPrimitive.Content
|
|
33
|
+
data-slot="dropdown-menu-content"
|
|
34
|
+
sideOffset={sideOffset}
|
|
35
|
+
className={cn(
|
|
36
|
+
[
|
|
37
|
+
"bg-bg-primary",
|
|
38
|
+
"p-md",
|
|
39
|
+
"data-[state=open]:animate-in",
|
|
40
|
+
"data-[state=closed]:animate-out",
|
|
41
|
+
"data-[state=closed]:fade-out-0",
|
|
42
|
+
"data-[state=open]:fade-in-0",
|
|
43
|
+
"data-[state=closed]:zoom-out-95",
|
|
44
|
+
"data-[state=open]:zoom-in-95",
|
|
45
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
46
|
+
"data-[side=left]:slide-in-from-right-2",
|
|
47
|
+
"data-[side=right]:slide-in-from-left-2",
|
|
48
|
+
"data-[side=top]:slide-in-from-bottom-2",
|
|
49
|
+
"relative",
|
|
50
|
+
"z-50",
|
|
51
|
+
"max-h-(--radix-dropdown-menu-content-available-height)",
|
|
52
|
+
"min-w-[8rem]",
|
|
53
|
+
"origin-(--radix-dropdown-menu-content-transform-origin)",
|
|
54
|
+
"overflow-x-hidden",
|
|
55
|
+
"overflow-y-auto",
|
|
56
|
+
"rounded-uk-md",
|
|
57
|
+
"shadow-md",
|
|
58
|
+
"shadow-[0_8px_20px_0_rgba(0,0,0,.80)]",
|
|
59
|
+
"liquid:liquid-bg",
|
|
60
|
+
],
|
|
61
|
+
className,
|
|
62
|
+
)}
|
|
63
|
+
{...props}
|
|
64
|
+
/>
|
|
65
|
+
</DropdownMenuPrimitive.Portal>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function DropdownMenuGroup({
|
|
70
|
+
className,
|
|
71
|
+
...props
|
|
72
|
+
}: ComponentProps<typeof DropdownMenuPrimitive.Group>) {
|
|
73
|
+
return (
|
|
74
|
+
<DropdownMenuPrimitive.Group
|
|
75
|
+
data-slot="dropdown-menu-group"
|
|
76
|
+
className={cn("space-y-xs", className)}
|
|
77
|
+
{...props}
|
|
78
|
+
/>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function DropdownMenuItem({
|
|
83
|
+
className,
|
|
84
|
+
inset,
|
|
85
|
+
variant = "default",
|
|
86
|
+
...props
|
|
87
|
+
}: ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
88
|
+
inset?: boolean;
|
|
89
|
+
variant?: "default" | "destructive";
|
|
90
|
+
}) {
|
|
91
|
+
return (
|
|
92
|
+
<DropdownMenuPrimitive.Item
|
|
93
|
+
data-slot="dropdown-menu-item"
|
|
94
|
+
data-inset={inset}
|
|
95
|
+
data-variant={variant}
|
|
96
|
+
className={cn(
|
|
97
|
+
[
|
|
98
|
+
"w-full",
|
|
99
|
+
"flex",
|
|
100
|
+
"gap-md",
|
|
101
|
+
"items-center",
|
|
102
|
+
"pr-md",
|
|
103
|
+
"pl-[calc(var(--spacing-md)*2)]",
|
|
104
|
+
"py-xs",
|
|
105
|
+
"mb-xs",
|
|
106
|
+
"last:mb-0",
|
|
107
|
+
"relative",
|
|
108
|
+
"cursor-default",
|
|
109
|
+
"rounded-uk-xs",
|
|
110
|
+
"text-uk-xs",
|
|
111
|
+
"leading-uk-xs",
|
|
112
|
+
"outline-hidden",
|
|
113
|
+
"select-none",
|
|
114
|
+
"hover:bg-bg-tertiary",
|
|
115
|
+
"data-[disabled]:pointer-events-none",
|
|
116
|
+
"data-[disabled]:text-bg-quaternary",
|
|
117
|
+
"[&_svg]:pointer-events-none",
|
|
118
|
+
"[&_svg]:shrink-0",
|
|
119
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
120
|
+
"[&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
121
|
+
],
|
|
122
|
+
className,
|
|
123
|
+
)}
|
|
124
|
+
{...props}
|
|
125
|
+
/>
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function DropdownMenuCheckboxItem({
|
|
130
|
+
className,
|
|
131
|
+
children,
|
|
132
|
+
checked,
|
|
133
|
+
...props
|
|
134
|
+
}: ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {
|
|
135
|
+
return (
|
|
136
|
+
<DropdownMenuPrimitive.CheckboxItem
|
|
137
|
+
data-slot="dropdown-menu-checkbox-item"
|
|
138
|
+
className={cn(
|
|
139
|
+
[
|
|
140
|
+
"w-full",
|
|
141
|
+
"flex",
|
|
142
|
+
"gap-md",
|
|
143
|
+
"items-center",
|
|
144
|
+
"pr-md",
|
|
145
|
+
"pl-[calc(var(--spacing-xl)*1.8)]",
|
|
146
|
+
"py-xs",
|
|
147
|
+
"mb-xs",
|
|
148
|
+
"last:mb-0",
|
|
149
|
+
"relative",
|
|
150
|
+
"cursor-default",
|
|
151
|
+
"rounded-uk-xs",
|
|
152
|
+
"text-uk-xs",
|
|
153
|
+
"leading-uk-xs",
|
|
154
|
+
"outline-hidden",
|
|
155
|
+
"select-none",
|
|
156
|
+
"hover:bg-bg-tertiary",
|
|
157
|
+
"data-[disabled]:pointer-events-none",
|
|
158
|
+
"data-[disabled]:text-bg-quaternary",
|
|
159
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
160
|
+
"[&_svg]:pointer-events-none",
|
|
161
|
+
"[&_svg]:shrink-0",
|
|
162
|
+
],
|
|
163
|
+
className,
|
|
164
|
+
)}
|
|
165
|
+
checked={checked}
|
|
166
|
+
{...props}
|
|
167
|
+
>
|
|
168
|
+
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
169
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
170
|
+
<CheckIcon className="size-4" />
|
|
171
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
172
|
+
</span>
|
|
173
|
+
{children}
|
|
174
|
+
</DropdownMenuPrimitive.CheckboxItem>
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function DropdownMenuRadioGroup({
|
|
179
|
+
...props
|
|
180
|
+
}: ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {
|
|
181
|
+
return <DropdownMenuPrimitive.RadioGroup data-slot="dropdown-menu-radio-group" {...props} />;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function DropdownMenuRadioItem({
|
|
185
|
+
className,
|
|
186
|
+
children,
|
|
187
|
+
...props
|
|
188
|
+
}: ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {
|
|
189
|
+
return (
|
|
190
|
+
<DropdownMenuPrimitive.RadioItem
|
|
191
|
+
data-slot="dropdown-menu-radio-item"
|
|
192
|
+
className={cn(
|
|
193
|
+
[
|
|
194
|
+
"w-full",
|
|
195
|
+
"hover:bg-bg-tertiary",
|
|
196
|
+
"outline-hidden",
|
|
197
|
+
"relative",
|
|
198
|
+
"flex",
|
|
199
|
+
"cursor-default",
|
|
200
|
+
"select-none",
|
|
201
|
+
"items-center",
|
|
202
|
+
"gap-md",
|
|
203
|
+
"rounded-uk-xs",
|
|
204
|
+
"py-xs",
|
|
205
|
+
"pl-[calc(var(--spacing-xl)*1.8)]",
|
|
206
|
+
"pr-md",
|
|
207
|
+
"mb-xs",
|
|
208
|
+
"last:mb-0",
|
|
209
|
+
"text-uk-xs",
|
|
210
|
+
"leading-uk-xs",
|
|
211
|
+
"data-[disabled]:pointer-events-none",
|
|
212
|
+
"data-[disabled]:text-bg-quaternary",
|
|
213
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
214
|
+
"[&_svg]:pointer-events-none",
|
|
215
|
+
"[&_svg]:shrink-0",
|
|
216
|
+
],
|
|
217
|
+
className,
|
|
218
|
+
)}
|
|
219
|
+
{...props}
|
|
220
|
+
>
|
|
221
|
+
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
222
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
223
|
+
<CircleIcon className="size-2 fill-current" />
|
|
224
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
225
|
+
</span>
|
|
226
|
+
{children}
|
|
227
|
+
</DropdownMenuPrimitive.RadioItem>
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
function DropdownMenuLabel({
|
|
232
|
+
className,
|
|
233
|
+
inset,
|
|
234
|
+
...props
|
|
235
|
+
}: ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
236
|
+
inset?: boolean;
|
|
237
|
+
}) {
|
|
238
|
+
return (
|
|
239
|
+
<DropdownMenuPrimitive.Label
|
|
240
|
+
data-slot="dropdown-menu-label"
|
|
241
|
+
data-inset={inset}
|
|
242
|
+
className={cn("text-text-secondary text-uk-xs leading-uk-xs px-2 py-1.5", className)}
|
|
243
|
+
{...props}
|
|
244
|
+
/>
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
function DropdownMenuSeparator({
|
|
249
|
+
className,
|
|
250
|
+
...props
|
|
251
|
+
}: ComponentProps<typeof DropdownMenuPrimitive.Separator>) {
|
|
252
|
+
return (
|
|
253
|
+
<DropdownMenuPrimitive.Separator
|
|
254
|
+
data-slot="dropdown-menu-separator"
|
|
255
|
+
className={cn("bg-line-primary my-lg pointer-events-none -mx-1 h-px", className)}
|
|
256
|
+
{...props}
|
|
257
|
+
/>
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
function DropdownMenuShortcut({ className, ...props }: ComponentProps<"span">) {
|
|
262
|
+
return (
|
|
263
|
+
<span
|
|
264
|
+
data-slot="dropdown-menu-shortcut"
|
|
265
|
+
className={cn("text-text-tertiary text-uk-xs leading-uk-xs ml-auto", className)}
|
|
266
|
+
{...props}
|
|
267
|
+
/>
|
|
268
|
+
);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
function DropdownMenuSub({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
|
|
272
|
+
return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
function DropdownMenuSubTrigger({
|
|
276
|
+
className,
|
|
277
|
+
inset,
|
|
278
|
+
children,
|
|
279
|
+
...props
|
|
280
|
+
}: ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
281
|
+
inset?: boolean;
|
|
282
|
+
}) {
|
|
283
|
+
return (
|
|
284
|
+
<DropdownMenuPrimitive.SubTrigger
|
|
285
|
+
data-slot="dropdown-menu-sub-trigger"
|
|
286
|
+
data-inset={inset}
|
|
287
|
+
className={cn(
|
|
288
|
+
"w-full",
|
|
289
|
+
"flex",
|
|
290
|
+
"gap-md",
|
|
291
|
+
"items-center",
|
|
292
|
+
"pr-md",
|
|
293
|
+
"pl-[calc(var(--spacing-md)*2)]",
|
|
294
|
+
"py-xs",
|
|
295
|
+
"mb-xs",
|
|
296
|
+
"relative",
|
|
297
|
+
"cursor-default",
|
|
298
|
+
"rounded-uk-xs",
|
|
299
|
+
"text-uk-xs",
|
|
300
|
+
"leading-uk-xs",
|
|
301
|
+
"outline-hidden",
|
|
302
|
+
"select-none",
|
|
303
|
+
"hover:bg-bg-tertiary",
|
|
304
|
+
"data-[state=open]:bg-bg-tertiary",
|
|
305
|
+
"data-[disabled]:pointer-events-none",
|
|
306
|
+
"data-[disabled]:text-bg-quaternary",
|
|
307
|
+
"[&_svg]:pointer-events-none",
|
|
308
|
+
"[&_svg]:shrink-0",
|
|
309
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
310
|
+
"[&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
311
|
+
className,
|
|
312
|
+
)}
|
|
313
|
+
{...props}
|
|
314
|
+
>
|
|
315
|
+
{children}
|
|
316
|
+
<ChevronRightIcon className="ml-auto size-4" />
|
|
317
|
+
</DropdownMenuPrimitive.SubTrigger>
|
|
318
|
+
);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
function DropdownMenuSubContent({
|
|
322
|
+
className,
|
|
323
|
+
...props
|
|
324
|
+
}: ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {
|
|
325
|
+
return (
|
|
326
|
+
<DropdownMenuPrimitive.SubContent
|
|
327
|
+
data-slot="dropdown-menu-sub-content"
|
|
328
|
+
className={cn(
|
|
329
|
+
"bg-bg-primary",
|
|
330
|
+
"p-md",
|
|
331
|
+
"data-[state=open]:animate-in",
|
|
332
|
+
"data-[state=closed]:animate-out",
|
|
333
|
+
"data-[state=closed]:fade-out-0",
|
|
334
|
+
"data-[state=open]:fade-in-0",
|
|
335
|
+
"data-[state=closed]:zoom-out-95",
|
|
336
|
+
"data-[state=open]:zoom-in-95",
|
|
337
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
338
|
+
"data-[side=left]:slide-in-from-right-2",
|
|
339
|
+
"data-[side=right]:slide-in-from-left-2",
|
|
340
|
+
"data-[side=top]:slide-in-from-bottom-2",
|
|
341
|
+
"relative",
|
|
342
|
+
"z-50",
|
|
343
|
+
"max-h-(--radix-dropdown-menu-content-available-height)",
|
|
344
|
+
"min-w-[8rem]",
|
|
345
|
+
"origin-(--radix-dropdown-menu-content-transform-origin)",
|
|
346
|
+
"overflow-x-hidden",
|
|
347
|
+
"overflow-y-auto",
|
|
348
|
+
"rounded-uk-md",
|
|
349
|
+
"shadow-md",
|
|
350
|
+
"shadow-[0_8px_20px_0_rgba(0,0,0,.80)]",
|
|
351
|
+
"liquid:liquid-bg",
|
|
352
|
+
className,
|
|
353
|
+
)}
|
|
354
|
+
{...props}
|
|
355
|
+
/>
|
|
356
|
+
);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
export {
|
|
360
|
+
DropdownMenu,
|
|
361
|
+
DropdownMenuPortal,
|
|
362
|
+
DropdownMenuTrigger,
|
|
363
|
+
DropdownMenuContent,
|
|
364
|
+
DropdownMenuGroup,
|
|
365
|
+
DropdownMenuLabel,
|
|
366
|
+
DropdownMenuItem,
|
|
367
|
+
DropdownMenuCheckboxItem,
|
|
368
|
+
DropdownMenuRadioGroup,
|
|
369
|
+
DropdownMenuRadioItem,
|
|
370
|
+
DropdownMenuSeparator,
|
|
371
|
+
DropdownMenuShortcut,
|
|
372
|
+
DropdownMenuSub,
|
|
373
|
+
DropdownMenuSubTrigger,
|
|
374
|
+
DropdownMenuSubContent,
|
|
375
|
+
};
|
package/src/ui/index.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export * from "./timeline";
|
|
2
|
+
export * from "./tree-view-v2";
|
|
3
|
+
export * from "./tree-view";
|
|
4
|
+
export * from "./sheet";
|
|
5
|
+
export * from "./popover";
|
|
6
|
+
export * from "./avatar";
|
|
7
|
+
export * from "./tooltip";
|
|
8
|
+
export * from "./toast";
|
|
9
|
+
export * from "./textarea";
|
|
10
|
+
export * from "./dropdown";
|
|
11
|
+
export * from "./toggle";
|
|
12
|
+
export * from "./toggle-group";
|
|
13
|
+
export * from "./badge";
|
|
14
|
+
export * from "./radio-group";
|
|
15
|
+
export * from "./card";
|
|
16
|
+
export * from "./checkbox";
|
|
17
|
+
export * from "./switch";
|
|
18
|
+
export * from "./tabs";
|
|
19
|
+
export * from "./modal";
|
|
20
|
+
export * from "./button";
|
|
21
|
+
export * from "./input";
|
|
22
|
+
export * from "./input-numbers";
|
|
23
|
+
export * from "./collapsible";
|
|
24
|
+
export * from "./select";
|
|
25
|
+
export * from "./modal";
|
|
26
|
+
export * from "./tabs";
|
|
27
|
+
export * from "./slider";
|
|
28
|
+
export * from "./layout";
|
|
29
|
+
export * from "./version-badge";
|
|
30
|
+
|
|
31
|
+
export * from "./theme-context";
|