@turtleclub/ui 0.7.0-beta.32 → 0.7.0-beta.34
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/index.cjs +10331 -110
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7652 -47844
- package/dist/index.js.map +1 -1
- package/dist/types/components/features/sidebar-layout.d.ts +2 -0
- package/dist/types/components/features/sidebar-layout.d.ts.map +1 -1
- package/dist/types/components/ui/chart.d.ts +1 -1
- package/dist/types/components/ui/chart.d.ts.map +1 -1
- package/package.json +26 -22
- package/.prettierrc.json +0 -4
- package/.turbo/turbo-build.log +0 -182
- package/CHANGELOG.md +0 -795
- package/components.json +0 -21
- package/src/components/charts/QUICK_REFERENCE.md +0 -323
- package/src/components/charts/README.md +0 -658
- package/src/components/charts/RECHARTS_FEATURES.md +0 -458
- package/src/components/charts/area-chart.tsx +0 -248
- package/src/components/charts/bar-chart.tsx +0 -362
- package/src/components/charts/index.ts +0 -4
- package/src/components/charts/pie-chart.tsx +0 -277
- package/src/components/charts/radial-chart.tsx +0 -312
- package/src/components/features/api-status/index.tsx +0 -23
- package/src/components/features/data-table/data-table.tsx +0 -538
- package/src/components/features/data-table/expand-toggle.tsx +0 -17
- package/src/components/features/data-table/fuzzy-filter.tsx +0 -34
- package/src/components/features/data-table/index.ts +0 -3
- package/src/components/features/data-table/item-info.tsx +0 -19
- package/src/components/features/data-table/skeleton.tsx +0 -23
- package/src/components/features/data-table/sort-dropdown.tsx +0 -118
- package/src/components/features/data-table/sortable-header.tsx +0 -37
- package/src/components/features/index.ts +0 -6
- package/src/components/features/page-heading.tsx +0 -27
- package/src/components/features/search-bar.tsx +0 -55
- package/src/components/features/segmented-navigation.tsx +0 -18
- package/src/components/features/sidebar-layout.tsx +0 -193
- package/src/components/features/turtle-tooltip.tsx +0 -67
- package/src/components/icons/arrow.tsx +0 -23
- package/src/components/icons/beta.tsx +0 -95
- package/src/components/icons/dot.tsx +0 -102
- package/src/components/icons/index.ts +0 -7
- package/src/components/icons/issue.tsx +0 -106
- package/src/components/icons/turtle.tsx +0 -156
- package/src/components/icons/update.tsx +0 -113
- package/src/components/icons/warning.tsx +0 -95
- package/src/components/molecules/index.ts +0 -9
- package/src/components/molecules/opportunity/index.ts +0 -10
- package/src/components/molecules/opportunity/opportunity-apr.tsx +0 -129
- package/src/components/molecules/opportunity/opportunity-disclaimer.tsx +0 -46
- package/src/components/molecules/opportunity/opportunity-rate-estimator.tsx +0 -62
- package/src/components/molecules/opportunity/opportunity-section.tsx +0 -113
- package/src/components/molecules/opportunity/opportunity-selector.tsx +0 -30
- package/src/components/molecules/opportunity/opportunity-type.tsx +0 -16
- package/src/components/molecules/route-details.tsx +0 -112
- package/src/components/molecules/slippage-selector.tsx +0 -200
- package/src/components/molecules/swap-details.tsx +0 -55
- package/src/components/molecules/swap-input.tsx +0 -186
- package/src/components/molecules/tabs.tsx +0 -79
- package/src/components/molecules/token-selector.tsx +0 -180
- package/src/components/molecules/tx-status.tsx +0 -312
- package/src/components/molecules/widget/asset-list/asset-filters.tsx +0 -113
- package/src/components/molecules/widget/asset-list/asset-list.tsx +0 -178
- package/src/components/molecules/widget/asset-list/asset-row.tsx +0 -45
- package/src/components/molecules/widget/asset-list/hooks/index.ts +0 -2
- package/src/components/molecules/widget/asset-list/hooks/use-asset-filtering.ts +0 -44
- package/src/components/molecules/widget/asset-list/hooks/use-asset-grouping.ts +0 -87
- package/src/components/molecules/widget/asset-list/index.ts +0 -3
- package/src/components/molecules/widget/base-selector.tsx +0 -121
- package/src/components/molecules/widget/campaign-item.tsx +0 -82
- package/src/components/molecules/widget/deal-item.tsx +0 -92
- package/src/components/molecules/widget/index.ts +0 -36
- package/src/components/molecules/widget/opportunity-item.tsx +0 -105
- package/src/components/molecules/widget/widget-item-stats.tsx +0 -50
- package/src/components/molecules/widget/widget-item.tsx +0 -139
- package/src/components/molecules/widget/widget-list-items.tsx +0 -86
- package/src/components/ui/alert-dialog.tsx +0 -163
- package/src/components/ui/animated-background/animated-background.tsx +0 -182
- package/src/components/ui/animated-background/index.ts +0 -1
- package/src/components/ui/avatar.tsx +0 -73
- package/src/components/ui/badge.tsx +0 -59
- package/src/components/ui/banner.tsx +0 -84
- package/src/components/ui/button.tsx +0 -100
- package/src/components/ui/card.tsx +0 -119
- package/src/components/ui/chart.tsx +0 -346
- package/src/components/ui/checkbox.tsx +0 -32
- package/src/components/ui/chip.tsx +0 -52
- package/src/components/ui/collapsible.tsx +0 -34
- package/src/components/ui/combobox.tsx +0 -730
- package/src/components/ui/command.tsx +0 -184
- package/src/components/ui/dialog.tsx +0 -129
- package/src/components/ui/dropdown.tsx +0 -316
- package/src/components/ui/field.tsx +0 -244
- package/src/components/ui/heading.tsx +0 -74
- package/src/components/ui/hover-card.tsx +0 -139
- package/src/components/ui/icon-animation.tsx +0 -82
- package/src/components/ui/icon-list.tsx +0 -168
- package/src/components/ui/index.ts +0 -48
- package/src/components/ui/info-card.tsx +0 -110
- package/src/components/ui/input-group.tsx +0 -170
- package/src/components/ui/input.tsx +0 -72
- package/src/components/ui/label-with-icon.tsx +0 -122
- package/src/components/ui/label.tsx +0 -24
- package/src/components/ui/multi-select.tsx +0 -1090
- package/src/components/ui/navigation-bar.tsx +0 -153
- package/src/components/ui/navigation-menu.tsx +0 -188
- package/src/components/ui/opportunity-details-v1.tsx +0 -104
- package/src/components/ui/pagination.tsx +0 -127
- package/src/components/ui/popover.tsx +0 -48
- package/src/components/ui/scroll-area.tsx +0 -64
- package/src/components/ui/segment-control.tsx +0 -146
- package/src/components/ui/select.tsx +0 -199
- package/src/components/ui/separator.tsx +0 -26
- package/src/components/ui/sheet.tsx +0 -139
- package/src/components/ui/sidebar.tsx +0 -728
- package/src/components/ui/skeleton.tsx +0 -14
- package/src/components/ui/slider.tsx +0 -58
- package/src/components/ui/sonner.tsx +0 -24
- package/src/components/ui/switch.tsx +0 -29
- package/src/components/ui/table-shadcn.tsx +0 -110
- package/src/components/ui/table.tsx +0 -117
- package/src/components/ui/textarea.tsx +0 -22
- package/src/components/ui/toggle-group.tsx +0 -71
- package/src/components/ui/toggle.tsx +0 -47
- package/src/components/ui/tooltip.tsx +0 -66
- package/src/hooks/index.ts +0 -1
- package/src/hooks/useIsMobile.ts +0 -77
- package/src/index.ts +0 -16
- package/src/lib/utils.ts +0 -6
- package/src/styles/globals.css +0 -181
- package/src/styles/themes/index.css +0 -9
- package/src/styles/themes/semantic.css +0 -117
- package/src/styles/tokens/colors.css +0 -124
- package/src/styles/tokens/index.css +0 -15
- package/src/styles/tokens/radius.css +0 -18
- package/src/styles/tokens/spacing.css +0 -58
- package/src/styles/tokens/typography.css +0 -87
- package/src/tokens/index.ts +0 -108
- package/tsconfig.json +0 -20
- package/vite.config.js +0 -49
- /package/{src/images/enso.png → dist/enso-22FJ4GNK.png} +0 -0
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { Command as CommandPrimitive } from "cmdk";
|
|
5
|
-
import { SearchIcon } from "lucide-react";
|
|
6
|
-
|
|
7
|
-
import { cn } from "@/lib/utils";
|
|
8
|
-
import {
|
|
9
|
-
Dialog,
|
|
10
|
-
DialogContent,
|
|
11
|
-
DialogDescription,
|
|
12
|
-
DialogHeader,
|
|
13
|
-
DialogTitle,
|
|
14
|
-
} from "@/components/ui/dialog";
|
|
15
|
-
|
|
16
|
-
function Command({
|
|
17
|
-
className,
|
|
18
|
-
...props
|
|
19
|
-
}: React.ComponentProps<typeof CommandPrimitive>) {
|
|
20
|
-
return (
|
|
21
|
-
<CommandPrimitive
|
|
22
|
-
data-slot="command"
|
|
23
|
-
className={cn(
|
|
24
|
-
"bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
|
|
25
|
-
className,
|
|
26
|
-
)}
|
|
27
|
-
{...props}
|
|
28
|
-
/>
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function CommandDialog({
|
|
33
|
-
title = "Command Palette",
|
|
34
|
-
description = "Search for a command to run...",
|
|
35
|
-
children,
|
|
36
|
-
className,
|
|
37
|
-
showCloseButton = true,
|
|
38
|
-
...props
|
|
39
|
-
}: React.ComponentProps<typeof Dialog> & {
|
|
40
|
-
title?: string;
|
|
41
|
-
description?: string;
|
|
42
|
-
className?: string;
|
|
43
|
-
showCloseButton?: boolean;
|
|
44
|
-
}) {
|
|
45
|
-
return (
|
|
46
|
-
<Dialog {...props}>
|
|
47
|
-
<DialogHeader className="sr-only">
|
|
48
|
-
<DialogTitle>{title}</DialogTitle>
|
|
49
|
-
<DialogDescription>{description}</DialogDescription>
|
|
50
|
-
</DialogHeader>
|
|
51
|
-
<DialogContent
|
|
52
|
-
className={cn("overflow-hidden p-0", className)}
|
|
53
|
-
showCloseButton={showCloseButton}
|
|
54
|
-
>
|
|
55
|
-
<Command className="[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
|
|
56
|
-
{children}
|
|
57
|
-
</Command>
|
|
58
|
-
</DialogContent>
|
|
59
|
-
</Dialog>
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function CommandInput({
|
|
64
|
-
className,
|
|
65
|
-
...props
|
|
66
|
-
}: React.ComponentProps<typeof CommandPrimitive.Input>) {
|
|
67
|
-
return (
|
|
68
|
-
<div
|
|
69
|
-
data-slot="command-input-wrapper"
|
|
70
|
-
className="border-border flex h-9 items-center gap-2 border-b px-3"
|
|
71
|
-
>
|
|
72
|
-
<SearchIcon className="size-4 shrink-0 opacity-50" />
|
|
73
|
-
<CommandPrimitive.Input
|
|
74
|
-
data-slot="command-input"
|
|
75
|
-
className={cn(
|
|
76
|
-
"placeholder:text-muted-foreground flex h-10 w-full bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
77
|
-
className,
|
|
78
|
-
)}
|
|
79
|
-
{...props}
|
|
80
|
-
/>
|
|
81
|
-
</div>
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function CommandList({
|
|
86
|
-
className,
|
|
87
|
-
...props
|
|
88
|
-
}: React.ComponentProps<typeof CommandPrimitive.List>) {
|
|
89
|
-
return (
|
|
90
|
-
<CommandPrimitive.List
|
|
91
|
-
data-slot="command-list"
|
|
92
|
-
className={cn(
|
|
93
|
-
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
94
|
-
className,
|
|
95
|
-
)}
|
|
96
|
-
{...props}
|
|
97
|
-
/>
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function CommandEmpty({
|
|
102
|
-
...props
|
|
103
|
-
}: React.ComponentProps<typeof CommandPrimitive.Empty>) {
|
|
104
|
-
return (
|
|
105
|
-
<CommandPrimitive.Empty
|
|
106
|
-
data-slot="command-empty"
|
|
107
|
-
className="py-6 text-center text-sm"
|
|
108
|
-
{...props}
|
|
109
|
-
/>
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function CommandGroup({
|
|
114
|
-
className,
|
|
115
|
-
...props
|
|
116
|
-
}: React.ComponentProps<typeof CommandPrimitive.Group>) {
|
|
117
|
-
return (
|
|
118
|
-
<CommandPrimitive.Group
|
|
119
|
-
data-slot="command-group"
|
|
120
|
-
className={cn(
|
|
121
|
-
"text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
|
|
122
|
-
className,
|
|
123
|
-
)}
|
|
124
|
-
{...props}
|
|
125
|
-
/>
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
function CommandSeparator({
|
|
130
|
-
className,
|
|
131
|
-
...props
|
|
132
|
-
}: React.ComponentProps<typeof CommandPrimitive.Separator>) {
|
|
133
|
-
return (
|
|
134
|
-
<CommandPrimitive.Separator
|
|
135
|
-
data-slot="command-separator"
|
|
136
|
-
className={cn("bg-border -mx-1 h-px", className)}
|
|
137
|
-
{...props}
|
|
138
|
-
/>
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
function CommandItem({
|
|
143
|
-
className,
|
|
144
|
-
...props
|
|
145
|
-
}: React.ComponentProps<typeof CommandPrimitive.Item>) {
|
|
146
|
-
return (
|
|
147
|
-
<CommandPrimitive.Item
|
|
148
|
-
data-slot="command-item"
|
|
149
|
-
className={cn(
|
|
150
|
-
"data-[selected=true]:bg-secondary data-[selected=true]:text-secondary-foreground [&_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=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
151
|
-
className,
|
|
152
|
-
)}
|
|
153
|
-
{...props}
|
|
154
|
-
/>
|
|
155
|
-
);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
function CommandShortcut({
|
|
159
|
-
className,
|
|
160
|
-
...props
|
|
161
|
-
}: React.ComponentProps<"span">) {
|
|
162
|
-
return (
|
|
163
|
-
<span
|
|
164
|
-
data-slot="command-shortcut"
|
|
165
|
-
className={cn(
|
|
166
|
-
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
167
|
-
className,
|
|
168
|
-
)}
|
|
169
|
-
{...props}
|
|
170
|
-
/>
|
|
171
|
-
);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export {
|
|
175
|
-
Command,
|
|
176
|
-
CommandDialog,
|
|
177
|
-
CommandInput,
|
|
178
|
-
CommandList,
|
|
179
|
-
CommandEmpty,
|
|
180
|
-
CommandGroup,
|
|
181
|
-
CommandItem,
|
|
182
|
-
CommandShortcut,
|
|
183
|
-
CommandSeparator,
|
|
184
|
-
};
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
5
|
-
import { XIcon } from "lucide-react";
|
|
6
|
-
|
|
7
|
-
import { cn } from "@/lib/utils";
|
|
8
|
-
|
|
9
|
-
function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {
|
|
10
|
-
return <DialogPrimitive.Root data-slot="dialog" {...props} />;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
|
|
14
|
-
return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {
|
|
18
|
-
return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {
|
|
22
|
-
return <DialogPrimitive.Close data-slot="dialog-close" {...props} />;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function DialogOverlay({
|
|
26
|
-
className,
|
|
27
|
-
...props
|
|
28
|
-
}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {
|
|
29
|
-
return (
|
|
30
|
-
<DialogPrimitive.Overlay
|
|
31
|
-
data-slot="dialog-overlay"
|
|
32
|
-
className={cn(
|
|
33
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 grid place-items-center overflow-y-auto bg-black/50",
|
|
34
|
-
className
|
|
35
|
-
)}
|
|
36
|
-
{...props}
|
|
37
|
-
/>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function DialogContent({
|
|
42
|
-
className,
|
|
43
|
-
children,
|
|
44
|
-
showCloseButton = true,
|
|
45
|
-
...props
|
|
46
|
-
}: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
47
|
-
showCloseButton?: boolean;
|
|
48
|
-
}) {
|
|
49
|
-
return (
|
|
50
|
-
<DialogPortal data-slot="dialog-portal">
|
|
51
|
-
<DialogOverlay className="backdrop-blur-sm" />
|
|
52
|
-
<DialogPrimitive.Content
|
|
53
|
-
data-slot="dialog-content"
|
|
54
|
-
className={cn(
|
|
55
|
-
"bg-background 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 border-gradient-soft fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
56
|
-
className
|
|
57
|
-
)}
|
|
58
|
-
{...props}
|
|
59
|
-
>
|
|
60
|
-
{children}
|
|
61
|
-
{showCloseButton && (
|
|
62
|
-
<DialogPrimitive.Close
|
|
63
|
-
data-slot="dialog-close"
|
|
64
|
-
className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
|
|
65
|
-
>
|
|
66
|
-
<XIcon />
|
|
67
|
-
<span className="sr-only">Close</span>
|
|
68
|
-
</DialogPrimitive.Close>
|
|
69
|
-
)}
|
|
70
|
-
</DialogPrimitive.Content>
|
|
71
|
-
</DialogPortal>
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
76
|
-
return (
|
|
77
|
-
<div
|
|
78
|
-
data-slot="dialog-header"
|
|
79
|
-
className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
|
|
80
|
-
{...props}
|
|
81
|
-
/>
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function DialogFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
86
|
-
return (
|
|
87
|
-
<div
|
|
88
|
-
data-slot="dialog-footer"
|
|
89
|
-
className={cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className)}
|
|
90
|
-
{...props}
|
|
91
|
-
/>
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {
|
|
96
|
-
return (
|
|
97
|
-
<DialogPrimitive.Title
|
|
98
|
-
data-slot="dialog-title"
|
|
99
|
-
className={cn("text-lg leading-none font-semibold", className)}
|
|
100
|
-
{...props}
|
|
101
|
-
/>
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
function DialogDescription({
|
|
106
|
-
className,
|
|
107
|
-
...props
|
|
108
|
-
}: React.ComponentProps<typeof DialogPrimitive.Description>) {
|
|
109
|
-
return (
|
|
110
|
-
<DialogPrimitive.Description
|
|
111
|
-
data-slot="dialog-description"
|
|
112
|
-
className={cn("text-muted-foreground text-sm", className)}
|
|
113
|
-
{...props}
|
|
114
|
-
/>
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export {
|
|
119
|
-
Dialog,
|
|
120
|
-
DialogClose,
|
|
121
|
-
DialogContent,
|
|
122
|
-
DialogDescription,
|
|
123
|
-
DialogFooter,
|
|
124
|
-
DialogHeader,
|
|
125
|
-
DialogOverlay,
|
|
126
|
-
DialogPortal,
|
|
127
|
-
DialogTitle,
|
|
128
|
-
DialogTrigger,
|
|
129
|
-
};
|
|
@@ -1,316 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
5
|
-
import {
|
|
6
|
-
CheckIcon,
|
|
7
|
-
ChevronDownIcon,
|
|
8
|
-
ChevronRightIcon,
|
|
9
|
-
CircleIcon,
|
|
10
|
-
} from "lucide-react";
|
|
11
|
-
import { cn } from "@/lib/utils";
|
|
12
|
-
import { TurtleAvatar } from "./avatar";
|
|
13
|
-
|
|
14
|
-
function DropdownMenu({
|
|
15
|
-
className,
|
|
16
|
-
...props
|
|
17
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Root> & {
|
|
18
|
-
className?: string;
|
|
19
|
-
}) {
|
|
20
|
-
return (
|
|
21
|
-
<div className={cn("relative z-10", className)}>
|
|
22
|
-
<DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />
|
|
23
|
-
</div>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function DropdownMenuPortal({
|
|
28
|
-
...props
|
|
29
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {
|
|
30
|
-
return (
|
|
31
|
-
<DropdownMenuPrimitive.Portal
|
|
32
|
-
data-slot="dropdown-menu-portal"
|
|
33
|
-
{...props}
|
|
34
|
-
container={
|
|
35
|
-
document.querySelectorAll(".turtle-widget-root")[0] ?? undefined
|
|
36
|
-
}
|
|
37
|
-
/>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function DropdownMenuTrigger({
|
|
42
|
-
className,
|
|
43
|
-
children,
|
|
44
|
-
size = "default",
|
|
45
|
-
src,
|
|
46
|
-
compact = false,
|
|
47
|
-
...props
|
|
48
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger> & {
|
|
49
|
-
src?: string;
|
|
50
|
-
size?: "default" | "sm" | "lg";
|
|
51
|
-
compact?: boolean;
|
|
52
|
-
}) {
|
|
53
|
-
return (
|
|
54
|
-
<DropdownMenuPrimitive.Trigger
|
|
55
|
-
data-slot="dropdown-menu-trigger"
|
|
56
|
-
className={cn(
|
|
57
|
-
"border-border bg-background flex min-w-[8rem] items-center rounded-full border outline-none",
|
|
58
|
-
size === "default"
|
|
59
|
-
? "h-10 text-sm"
|
|
60
|
-
: size === "sm"
|
|
61
|
-
? "h-9 text-xs"
|
|
62
|
-
: "h-11 text-base",
|
|
63
|
-
className,
|
|
64
|
-
)}
|
|
65
|
-
{...props}
|
|
66
|
-
>
|
|
67
|
-
{src ? (
|
|
68
|
-
<TurtleAvatar
|
|
69
|
-
src={src}
|
|
70
|
-
alt=""
|
|
71
|
-
className={cn(
|
|
72
|
-
"shrink-0 rounded-full",
|
|
73
|
-
size === "default"
|
|
74
|
-
? "size-10"
|
|
75
|
-
: size === "sm"
|
|
76
|
-
? "size-9"
|
|
77
|
-
: "size-11",
|
|
78
|
-
)}
|
|
79
|
-
/>
|
|
80
|
-
) : undefined}
|
|
81
|
-
<div className={cn("grow py-2 pr-2.5", src ? "pl-2.5" : compact ? "pl-2.5" : "pl-4")}>
|
|
82
|
-
{children}
|
|
83
|
-
</div>
|
|
84
|
-
<ChevronDownIcon className="mr-2.5 size-4" />
|
|
85
|
-
</DropdownMenuPrimitive.Trigger>
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
function DropdownMenuContent({
|
|
90
|
-
className,
|
|
91
|
-
sideOffset = 4,
|
|
92
|
-
...props
|
|
93
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {
|
|
94
|
-
return (
|
|
95
|
-
<DropdownMenuPrimitive.Portal
|
|
96
|
-
container={
|
|
97
|
-
document.querySelectorAll(".turtle-widget-root")[0] ?? undefined
|
|
98
|
-
}
|
|
99
|
-
>
|
|
100
|
-
<DropdownMenuPrimitive.Content
|
|
101
|
-
data-slot="dropdown-menu-content"
|
|
102
|
-
sideOffset={sideOffset}
|
|
103
|
-
className={cn(
|
|
104
|
-
"bg-background 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 border-border 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-lg border p-2 shadow-md",
|
|
105
|
-
className,
|
|
106
|
-
)}
|
|
107
|
-
{...props}
|
|
108
|
-
/>
|
|
109
|
-
</DropdownMenuPrimitive.Portal>
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function DropdownMenuGroup({
|
|
114
|
-
...props
|
|
115
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {
|
|
116
|
-
return (
|
|
117
|
-
<DropdownMenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
function DropdownMenuItem({
|
|
122
|
-
className,
|
|
123
|
-
inset,
|
|
124
|
-
variant = "default",
|
|
125
|
-
...props
|
|
126
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
127
|
-
inset?: boolean;
|
|
128
|
-
variant?: "default" | "destructive";
|
|
129
|
-
}) {
|
|
130
|
-
return (
|
|
131
|
-
<DropdownMenuPrimitive.Item
|
|
132
|
-
data-slot="dropdown-menu-item"
|
|
133
|
-
data-inset={inset}
|
|
134
|
-
data-variant={variant}
|
|
135
|
-
className={cn(
|
|
136
|
-
"focus:bg-secondary focus:text-secondary-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 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-lg px-3 py-2 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",
|
|
137
|
-
className,
|
|
138
|
-
)}
|
|
139
|
-
{...props}
|
|
140
|
-
/>
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
function DropdownMenuCheckboxItem({
|
|
145
|
-
className,
|
|
146
|
-
children,
|
|
147
|
-
checked,
|
|
148
|
-
...props
|
|
149
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {
|
|
150
|
-
return (
|
|
151
|
-
<DropdownMenuPrimitive.CheckboxItem
|
|
152
|
-
data-slot="dropdown-menu-checkbox-item"
|
|
153
|
-
className={cn(
|
|
154
|
-
"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",
|
|
155
|
-
className,
|
|
156
|
-
)}
|
|
157
|
-
checked={checked}
|
|
158
|
-
{...props}
|
|
159
|
-
>
|
|
160
|
-
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
161
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
162
|
-
<CheckIcon className="size-4" />
|
|
163
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
164
|
-
</span>
|
|
165
|
-
{children}
|
|
166
|
-
</DropdownMenuPrimitive.CheckboxItem>
|
|
167
|
-
);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
function DropdownMenuRadioGroup({
|
|
171
|
-
...props
|
|
172
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {
|
|
173
|
-
return (
|
|
174
|
-
<DropdownMenuPrimitive.RadioGroup
|
|
175
|
-
data-slot="dropdown-menu-radio-group"
|
|
176
|
-
{...props}
|
|
177
|
-
/>
|
|
178
|
-
);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
function DropdownMenuRadioItem({
|
|
182
|
-
className,
|
|
183
|
-
children,
|
|
184
|
-
...props
|
|
185
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {
|
|
186
|
-
return (
|
|
187
|
-
<DropdownMenuPrimitive.RadioItem
|
|
188
|
-
data-slot="dropdown-menu-radio-item"
|
|
189
|
-
className={cn(
|
|
190
|
-
"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",
|
|
191
|
-
className,
|
|
192
|
-
)}
|
|
193
|
-
{...props}
|
|
194
|
-
>
|
|
195
|
-
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
196
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
197
|
-
<CircleIcon className="size-2 fill-current" />
|
|
198
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
199
|
-
</span>
|
|
200
|
-
{children}
|
|
201
|
-
</DropdownMenuPrimitive.RadioItem>
|
|
202
|
-
);
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
function DropdownMenuLabel({
|
|
206
|
-
className,
|
|
207
|
-
inset,
|
|
208
|
-
...props
|
|
209
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
210
|
-
inset?: boolean;
|
|
211
|
-
}) {
|
|
212
|
-
return (
|
|
213
|
-
<DropdownMenuPrimitive.Label
|
|
214
|
-
data-slot="dropdown-menu-label"
|
|
215
|
-
data-inset={inset}
|
|
216
|
-
className={cn(
|
|
217
|
-
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
218
|
-
className,
|
|
219
|
-
)}
|
|
220
|
-
{...props}
|
|
221
|
-
/>
|
|
222
|
-
);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
function DropdownMenuSeparator({
|
|
226
|
-
className,
|
|
227
|
-
...props
|
|
228
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {
|
|
229
|
-
return (
|
|
230
|
-
<DropdownMenuPrimitive.Separator
|
|
231
|
-
data-slot="dropdown-menu-separator"
|
|
232
|
-
className={cn("bg-border -mx-1 my-1 h-px", className)}
|
|
233
|
-
{...props}
|
|
234
|
-
/>
|
|
235
|
-
);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
function DropdownMenuShortcut({
|
|
239
|
-
className,
|
|
240
|
-
...props
|
|
241
|
-
}: React.ComponentProps<"span">) {
|
|
242
|
-
return (
|
|
243
|
-
<span
|
|
244
|
-
data-slot="dropdown-menu-shortcut"
|
|
245
|
-
className={cn(
|
|
246
|
-
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
247
|
-
className,
|
|
248
|
-
)}
|
|
249
|
-
{...props}
|
|
250
|
-
/>
|
|
251
|
-
);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
function DropdownMenuSub({
|
|
255
|
-
...props
|
|
256
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
|
|
257
|
-
return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
function DropdownMenuSubTrigger({
|
|
261
|
-
className,
|
|
262
|
-
inset,
|
|
263
|
-
children,
|
|
264
|
-
...props
|
|
265
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
266
|
-
inset?: boolean;
|
|
267
|
-
}) {
|
|
268
|
-
return (
|
|
269
|
-
<DropdownMenuPrimitive.SubTrigger
|
|
270
|
-
data-slot="dropdown-menu-sub-trigger"
|
|
271
|
-
data-inset={inset}
|
|
272
|
-
className={cn(
|
|
273
|
-
"focus:bg-secondary focus:text-secondary-foreground data-[state=open]:bg-accent/10 [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-lg px-3 py-2 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
274
|
-
className,
|
|
275
|
-
)}
|
|
276
|
-
{...props}
|
|
277
|
-
>
|
|
278
|
-
{children}
|
|
279
|
-
<ChevronRightIcon className="ml-auto size-4" />
|
|
280
|
-
</DropdownMenuPrimitive.SubTrigger>
|
|
281
|
-
);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
function DropdownMenuSubContent({
|
|
285
|
-
className,
|
|
286
|
-
...props
|
|
287
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {
|
|
288
|
-
return (
|
|
289
|
-
<DropdownMenuPrimitive.SubContent
|
|
290
|
-
data-slot="dropdown-menu-sub-content"
|
|
291
|
-
className={cn(
|
|
292
|
-
"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 border-border z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-2 shadow-lg",
|
|
293
|
-
className,
|
|
294
|
-
)}
|
|
295
|
-
{...props}
|
|
296
|
-
/>
|
|
297
|
-
);
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
export {
|
|
301
|
-
DropdownMenu,
|
|
302
|
-
DropdownMenuPortal,
|
|
303
|
-
DropdownMenuTrigger,
|
|
304
|
-
DropdownMenuContent,
|
|
305
|
-
DropdownMenuGroup,
|
|
306
|
-
DropdownMenuLabel,
|
|
307
|
-
DropdownMenuItem,
|
|
308
|
-
DropdownMenuCheckboxItem,
|
|
309
|
-
DropdownMenuRadioGroup,
|
|
310
|
-
DropdownMenuRadioItem,
|
|
311
|
-
DropdownMenuSeparator,
|
|
312
|
-
DropdownMenuShortcut,
|
|
313
|
-
DropdownMenuSub,
|
|
314
|
-
DropdownMenuSubTrigger,
|
|
315
|
-
DropdownMenuSubContent,
|
|
316
|
-
};
|