@motiadev/workbench 0.0.6 → 0.0.8
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/README.md +50 -0
- package/dist/index.d.ts +0 -1
- package/{index.html → dist/index.html} +1 -1
- package/dist/middleware.d.ts +2 -2
- package/dist/middleware.js +10 -12
- package/dist/package.json +58 -0
- package/dist/src/components/app-sidebar.d.ts +0 -1
- package/dist/src/components/app-sidebar.js +5 -6
- package/dist/src/components/log-console.d.ts +0 -1
- package/dist/src/components/log-level-badge.d.ts +0 -1
- package/dist/src/components/ui/badge.d.ts +1 -2
- package/dist/src/components/ui/button.d.ts +1 -2
- package/dist/src/components/ui/collapsible.d.ts +0 -1
- package/dist/src/components/ui/dialog.d.ts +0 -1
- package/dist/src/components/ui/input.d.ts +0 -1
- package/dist/src/components/ui/label.d.ts +0 -1
- package/dist/src/components/ui/select.d.ts +0 -1
- package/dist/src/components/ui/separator.d.ts +0 -1
- package/dist/src/components/ui/sheet.d.ts +1 -2
- package/dist/src/components/ui/sidebar.d.ts +0 -1
- package/dist/src/components/ui/skeleton.d.ts +0 -1
- package/dist/src/components/ui/switch.d.ts +0 -1
- package/dist/src/components/ui/table.d.ts +0 -1
- package/dist/src/components/ui/textarea.d.ts +0 -1
- package/dist/src/components/ui/tooltip.d.ts +0 -1
- package/dist/src/hooks/use-list-flows.d.ts +0 -1
- package/dist/src/hooks/use-log-listener.d.ts +0 -1
- package/dist/src/hooks/use-mobile.d.ts +0 -1
- package/dist/src/lib/utils.d.ts +0 -1
- package/dist/src/main.d.ts +0 -8
- package/dist/src/main.js +6 -7
- package/dist/src/publicComponents/api-node.d.ts +0 -1
- package/dist/src/publicComponents/base-handle.d.ts +0 -1
- package/dist/src/publicComponents/base-node.d.ts +0 -1
- package/dist/src/publicComponents/emits.d.ts +0 -1
- package/dist/src/publicComponents/event-node.d.ts +0 -1
- package/dist/src/publicComponents/node-props.d.ts +0 -1
- package/dist/src/publicComponents/noop-node.d.ts +0 -1
- package/dist/src/publicComponents/subscribe.d.ts +0 -1
- package/dist/src/route-wrapper.d.ts +0 -1
- package/dist/src/routes/flow.d.ts +1 -0
- package/dist/src/routes/flow.js +16 -0
- package/dist/src/routes/index.d.ts +1 -2
- package/dist/src/routes/index.js +2 -6
- package/dist/src/stores/use-logs.d.ts +0 -1
- package/dist/src/views/flow/arrow-head.d.ts +0 -1
- package/dist/src/views/flow/base-edge.d.ts +0 -1
- package/dist/src/views/flow/flow-loader.d.ts +0 -1
- package/dist/src/views/flow/flow-view.d.ts +0 -1
- package/dist/src/views/flow/hooks/use-get-flow-state.d.ts +0 -1
- package/dist/src/views/flow/hooks/use-organize-nodes.d.ts +0 -1
- package/dist/src/views/flow/legend.d.ts +0 -1
- package/dist/src/views/flow/node-organizer.d.ts +0 -1
- package/dist/src/views/flow/nodes/api-flow-node.d.ts +0 -1
- package/dist/src/views/flow/nodes/event-flow-node.d.ts +0 -1
- package/dist/src/views/flow/nodes/json-schema-form.d.ts +0 -1
- package/dist/src/views/flow/nodes/language-indicator.d.ts +0 -1
- package/dist/src/views/flow/nodes/nodes.types.d.ts +0 -1
- package/dist/src/views/flow/nodes/noop-flow-node.d.ts +0 -1
- package/dist/tailwind.config.d.ts +0 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/tsconfig.node.tsbuildinfo +1 -1
- package/dist/vite.config.d.ts +1 -10
- package/dist/vite.config.js +4 -5
- package/package.json +3 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/middleware.d.ts.map +0 -1
- package/dist/src/components/app-sidebar.d.ts.map +0 -1
- package/dist/src/components/log-console.d.ts.map +0 -1
- package/dist/src/components/log-level-badge.d.ts.map +0 -1
- package/dist/src/components/ui/badge.d.ts.map +0 -1
- package/dist/src/components/ui/button.d.ts.map +0 -1
- package/dist/src/components/ui/collapsible.d.ts.map +0 -1
- package/dist/src/components/ui/dialog.d.ts.map +0 -1
- package/dist/src/components/ui/input.d.ts.map +0 -1
- package/dist/src/components/ui/label.d.ts.map +0 -1
- package/dist/src/components/ui/select.d.ts.map +0 -1
- package/dist/src/components/ui/separator.d.ts.map +0 -1
- package/dist/src/components/ui/sheet.d.ts.map +0 -1
- package/dist/src/components/ui/sidebar.d.ts.map +0 -1
- package/dist/src/components/ui/skeleton.d.ts.map +0 -1
- package/dist/src/components/ui/switch.d.ts.map +0 -1
- package/dist/src/components/ui/table.d.ts.map +0 -1
- package/dist/src/components/ui/textarea.d.ts.map +0 -1
- package/dist/src/components/ui/tooltip.d.ts.map +0 -1
- package/dist/src/hooks/use-list-flows.d.ts.map +0 -1
- package/dist/src/hooks/use-log-listener.d.ts.map +0 -1
- package/dist/src/hooks/use-mobile.d.ts.map +0 -1
- package/dist/src/lib/utils.d.ts.map +0 -1
- package/dist/src/main.d.ts.map +0 -1
- package/dist/src/publicComponents/api-node.d.ts.map +0 -1
- package/dist/src/publicComponents/base-handle.d.ts.map +0 -1
- package/dist/src/publicComponents/base-node.d.ts.map +0 -1
- package/dist/src/publicComponents/emits.d.ts.map +0 -1
- package/dist/src/publicComponents/event-node.d.ts.map +0 -1
- package/dist/src/publicComponents/node-props.d.ts.map +0 -1
- package/dist/src/publicComponents/noop-node.d.ts.map +0 -1
- package/dist/src/publicComponents/subscribe.d.ts.map +0 -1
- package/dist/src/route-wrapper.d.ts.map +0 -1
- package/dist/src/routeTree.gen.d.ts +0 -53
- package/dist/src/routeTree.gen.d.ts.map +0 -1
- package/dist/src/routeTree.gen.js +0 -45
- package/dist/src/routes/__root.d.ts +0 -2
- package/dist/src/routes/__root.d.ts.map +0 -1
- package/dist/src/routes/__root.js +0 -15
- package/dist/src/routes/flow/$id.d.ts +0 -4
- package/dist/src/routes/flow/$id.d.ts.map +0 -1
- package/dist/src/routes/flow/$id.js +0 -15
- package/dist/src/routes/index.d.ts.map +0 -1
- package/dist/src/stores/use-logs.d.ts.map +0 -1
- package/dist/src/views/flow/arrow-head.d.ts.map +0 -1
- package/dist/src/views/flow/base-edge.d.ts.map +0 -1
- package/dist/src/views/flow/flow-loader.d.ts.map +0 -1
- package/dist/src/views/flow/flow-view.d.ts.map +0 -1
- package/dist/src/views/flow/hooks/use-get-flow-state.d.ts.map +0 -1
- package/dist/src/views/flow/hooks/use-organize-nodes.d.ts.map +0 -1
- package/dist/src/views/flow/legend.d.ts.map +0 -1
- package/dist/src/views/flow/node-organizer.d.ts.map +0 -1
- package/dist/src/views/flow/nodes/api-flow-node.d.ts.map +0 -1
- package/dist/src/views/flow/nodes/event-flow-node.d.ts.map +0 -1
- package/dist/src/views/flow/nodes/json-schema-form.d.ts.map +0 -1
- package/dist/src/views/flow/nodes/language-indicator.d.ts.map +0 -1
- package/dist/src/views/flow/nodes/nodes.types.d.ts.map +0 -1
- package/dist/src/views/flow/nodes/noop-flow-node.d.ts.map +0 -1
- package/dist/tailwind.config.d.ts.map +0 -1
- package/dist/vite.config.d.ts.map +0 -1
- package/eslint.config.js +0 -28
- package/index.tsx +0 -10
- package/middleware.ts +0 -48
- package/src/assets/.empty +0 -0
- package/src/components/app-sidebar.tsx +0 -55
- package/src/components/log-console.tsx +0 -76
- package/src/components/log-level-badge.tsx +0 -12
- package/src/components/ui/badge.tsx +0 -31
- package/src/components/ui/button.tsx +0 -47
- package/src/components/ui/collapsible.tsx +0 -9
- package/src/components/ui/dialog.tsx +0 -120
- package/src/components/ui/input.tsx +0 -21
- package/src/components/ui/label.tsx +0 -26
- package/src/components/ui/select.tsx +0 -157
- package/src/components/ui/separator.tsx +0 -22
- package/src/components/ui/sheet.tsx +0 -106
- package/src/components/ui/sidebar.tsx +0 -637
- package/src/components/ui/skeleton.tsx +0 -7
- package/src/components/ui/switch.tsx +0 -27
- package/src/components/ui/table.tsx +0 -76
- package/src/components/ui/textarea.tsx +0 -22
- package/src/components/ui/tooltip.tsx +0 -32
- package/src/hooks/use-list-flows.tsx +0 -20
- package/src/hooks/use-log-listener.tsx +0 -32
- package/src/hooks/use-mobile.tsx +0 -19
- package/src/lib/utils.ts +0 -6
- package/src/main.tsx +0 -28
- package/src/publicComponents/api-node.tsx +0 -28
- package/src/publicComponents/base-handle.tsx +0 -43
- package/src/publicComponents/base-node.tsx +0 -57
- package/src/publicComponents/emits.tsx +0 -22
- package/src/publicComponents/event-node.tsx +0 -36
- package/src/publicComponents/node-props.tsx +0 -15
- package/src/publicComponents/noop-node.tsx +0 -21
- package/src/publicComponents/subscribe.tsx +0 -19
- package/src/route-wrapper.tsx +0 -9
- package/src/routeTree.gen.ts +0 -109
- package/src/routes/__root.tsx +0 -26
- package/src/routes/flow/$id.tsx +0 -21
- package/src/routes/index.tsx +0 -13
- package/src/stores/use-logs.ts +0 -22
- package/src/views/flow/arrow-head.tsx +0 -13
- package/src/views/flow/base-edge.tsx +0 -31
- package/src/views/flow/flow-loader.tsx +0 -3
- package/src/views/flow/flow-view.tsx +0 -72
- package/src/views/flow/hooks/use-get-flow-state.tsx +0 -93
- package/src/views/flow/hooks/use-organize-nodes.ts +0 -60
- package/src/views/flow/legend.tsx +0 -96
- package/src/views/flow/node-organizer.tsx +0 -70
- package/src/views/flow/nodes/api-flow-node.tsx +0 -6
- package/src/views/flow/nodes/event-flow-node.tsx +0 -6
- package/src/views/flow/nodes/json-schema-form.tsx +0 -110
- package/src/views/flow/nodes/language-indicator.tsx +0 -74
- package/src/views/flow/nodes/nodes.types.ts +0 -36
- package/src/views/flow/nodes/noop-flow-node.tsx +0 -6
- package/src/vite-env.d.ts +0 -1
- package/tailwind.config.ts +0 -75
- package/tsconfig.app.json +0 -32
- package/tsconfig.json +0 -14
- package/tsconfig.node.json +0 -32
- package/tsconfig.node.tsbuildinfo +0 -1
- package/vite.config.ts +0 -14
- /package/{components.json → dist/components.json} +0 -0
- /package/{postcss.config.js → dist/postcss.config.js} +0 -0
- /package/{public → dist/public}/.empty +0 -0
- /package/{src → dist/src}/index.css +0 -0
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog"
|
|
3
|
-
import { X } from "lucide-react"
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
6
|
-
|
|
7
|
-
const Dialog = DialogPrimitive.Root
|
|
8
|
-
|
|
9
|
-
const DialogTrigger = DialogPrimitive.Trigger
|
|
10
|
-
|
|
11
|
-
const DialogPortal = DialogPrimitive.Portal
|
|
12
|
-
|
|
13
|
-
const DialogClose = DialogPrimitive.Close
|
|
14
|
-
|
|
15
|
-
const DialogOverlay = React.forwardRef<
|
|
16
|
-
React.ElementRef<typeof DialogPrimitive.Overlay>,
|
|
17
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
|
|
18
|
-
>(({ className, ...props }, ref) => (
|
|
19
|
-
<DialogPrimitive.Overlay
|
|
20
|
-
ref={ref}
|
|
21
|
-
className={cn(
|
|
22
|
-
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
23
|
-
className
|
|
24
|
-
)}
|
|
25
|
-
{...props}
|
|
26
|
-
/>
|
|
27
|
-
))
|
|
28
|
-
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName
|
|
29
|
-
|
|
30
|
-
const DialogContent = React.forwardRef<
|
|
31
|
-
React.ElementRef<typeof DialogPrimitive.Content>,
|
|
32
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
|
|
33
|
-
>(({ className, children, ...props }, ref) => (
|
|
34
|
-
<DialogPortal>
|
|
35
|
-
<DialogOverlay />
|
|
36
|
-
<DialogPrimitive.Content
|
|
37
|
-
ref={ref}
|
|
38
|
-
className={cn(
|
|
39
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
40
|
-
className
|
|
41
|
-
)}
|
|
42
|
-
{...props}
|
|
43
|
-
>
|
|
44
|
-
{children}
|
|
45
|
-
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
|
|
46
|
-
<X className="h-4 w-4" />
|
|
47
|
-
<span className="sr-only">Close</span>
|
|
48
|
-
</DialogPrimitive.Close>
|
|
49
|
-
</DialogPrimitive.Content>
|
|
50
|
-
</DialogPortal>
|
|
51
|
-
))
|
|
52
|
-
DialogContent.displayName = DialogPrimitive.Content.displayName
|
|
53
|
-
|
|
54
|
-
const DialogHeader = ({
|
|
55
|
-
className,
|
|
56
|
-
...props
|
|
57
|
-
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
58
|
-
<div
|
|
59
|
-
className={cn(
|
|
60
|
-
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
61
|
-
className
|
|
62
|
-
)}
|
|
63
|
-
{...props}
|
|
64
|
-
/>
|
|
65
|
-
)
|
|
66
|
-
DialogHeader.displayName = "DialogHeader"
|
|
67
|
-
|
|
68
|
-
const DialogFooter = ({
|
|
69
|
-
className,
|
|
70
|
-
...props
|
|
71
|
-
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
72
|
-
<div
|
|
73
|
-
className={cn(
|
|
74
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
75
|
-
className
|
|
76
|
-
)}
|
|
77
|
-
{...props}
|
|
78
|
-
/>
|
|
79
|
-
)
|
|
80
|
-
DialogFooter.displayName = "DialogFooter"
|
|
81
|
-
|
|
82
|
-
const DialogTitle = React.forwardRef<
|
|
83
|
-
React.ElementRef<typeof DialogPrimitive.Title>,
|
|
84
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
|
|
85
|
-
>(({ className, ...props }, ref) => (
|
|
86
|
-
<DialogPrimitive.Title
|
|
87
|
-
ref={ref}
|
|
88
|
-
className={cn(
|
|
89
|
-
"text-lg font-semibold leading-none tracking-tight",
|
|
90
|
-
className
|
|
91
|
-
)}
|
|
92
|
-
{...props}
|
|
93
|
-
/>
|
|
94
|
-
))
|
|
95
|
-
DialogTitle.displayName = DialogPrimitive.Title.displayName
|
|
96
|
-
|
|
97
|
-
const DialogDescription = React.forwardRef<
|
|
98
|
-
React.ElementRef<typeof DialogPrimitive.Description>,
|
|
99
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
|
|
100
|
-
>(({ className, ...props }, ref) => (
|
|
101
|
-
<DialogPrimitive.Description
|
|
102
|
-
ref={ref}
|
|
103
|
-
className={cn("text-sm text-muted-foreground", className)}
|
|
104
|
-
{...props}
|
|
105
|
-
/>
|
|
106
|
-
))
|
|
107
|
-
DialogDescription.displayName = DialogPrimitive.Description.displayName
|
|
108
|
-
|
|
109
|
-
export {
|
|
110
|
-
Dialog,
|
|
111
|
-
DialogPortal,
|
|
112
|
-
DialogOverlay,
|
|
113
|
-
DialogTrigger,
|
|
114
|
-
DialogClose,
|
|
115
|
-
DialogContent,
|
|
116
|
-
DialogHeader,
|
|
117
|
-
DialogFooter,
|
|
118
|
-
DialogTitle,
|
|
119
|
-
DialogDescription,
|
|
120
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from 'react'
|
|
2
|
-
import { cn } from '@/lib/utils'
|
|
3
|
-
|
|
4
|
-
const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<'input'>>(
|
|
5
|
-
({ className, type, ...props }, ref) => {
|
|
6
|
-
return (
|
|
7
|
-
<input
|
|
8
|
-
type={type}
|
|
9
|
-
className={cn(
|
|
10
|
-
'flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
|
|
11
|
-
className,
|
|
12
|
-
)}
|
|
13
|
-
ref={ref}
|
|
14
|
-
{...props}
|
|
15
|
-
/>
|
|
16
|
-
)
|
|
17
|
-
},
|
|
18
|
-
)
|
|
19
|
-
Input.displayName = 'Input'
|
|
20
|
-
|
|
21
|
-
export { Input }
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as LabelPrimitive from "@radix-ui/react-label"
|
|
5
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
6
|
-
|
|
7
|
-
import { cn } from "@/lib/utils"
|
|
8
|
-
|
|
9
|
-
const labelVariants = cva(
|
|
10
|
-
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
11
|
-
)
|
|
12
|
-
|
|
13
|
-
const Label = React.forwardRef<
|
|
14
|
-
React.ElementRef<typeof LabelPrimitive.Root>,
|
|
15
|
-
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
|
|
16
|
-
VariantProps<typeof labelVariants>
|
|
17
|
-
>(({ className, ...props }, ref) => (
|
|
18
|
-
<LabelPrimitive.Root
|
|
19
|
-
ref={ref}
|
|
20
|
-
className={cn(labelVariants(), className)}
|
|
21
|
-
{...props}
|
|
22
|
-
/>
|
|
23
|
-
))
|
|
24
|
-
Label.displayName = LabelPrimitive.Root.displayName
|
|
25
|
-
|
|
26
|
-
export { Label }
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import * as SelectPrimitive from "@radix-ui/react-select"
|
|
3
|
-
import { Check, ChevronDown, ChevronUp } from "lucide-react"
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
6
|
-
|
|
7
|
-
const Select = SelectPrimitive.Root
|
|
8
|
-
|
|
9
|
-
const SelectGroup = SelectPrimitive.Group
|
|
10
|
-
|
|
11
|
-
const SelectValue = SelectPrimitive.Value
|
|
12
|
-
|
|
13
|
-
const SelectTrigger = React.forwardRef<
|
|
14
|
-
React.ElementRef<typeof SelectPrimitive.Trigger>,
|
|
15
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
|
|
16
|
-
>(({ className, children, ...props }, ref) => (
|
|
17
|
-
<SelectPrimitive.Trigger
|
|
18
|
-
ref={ref}
|
|
19
|
-
className={cn(
|
|
20
|
-
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
21
|
-
className
|
|
22
|
-
)}
|
|
23
|
-
{...props}
|
|
24
|
-
>
|
|
25
|
-
{children}
|
|
26
|
-
<SelectPrimitive.Icon asChild>
|
|
27
|
-
<ChevronDown className="h-4 w-4 opacity-50" />
|
|
28
|
-
</SelectPrimitive.Icon>
|
|
29
|
-
</SelectPrimitive.Trigger>
|
|
30
|
-
))
|
|
31
|
-
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName
|
|
32
|
-
|
|
33
|
-
const SelectScrollUpButton = React.forwardRef<
|
|
34
|
-
React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
|
|
35
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
|
|
36
|
-
>(({ className, ...props }, ref) => (
|
|
37
|
-
<SelectPrimitive.ScrollUpButton
|
|
38
|
-
ref={ref}
|
|
39
|
-
className={cn(
|
|
40
|
-
"flex cursor-default items-center justify-center py-1",
|
|
41
|
-
className
|
|
42
|
-
)}
|
|
43
|
-
{...props}
|
|
44
|
-
>
|
|
45
|
-
<ChevronUp className="h-4 w-4" />
|
|
46
|
-
</SelectPrimitive.ScrollUpButton>
|
|
47
|
-
))
|
|
48
|
-
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName
|
|
49
|
-
|
|
50
|
-
const SelectScrollDownButton = React.forwardRef<
|
|
51
|
-
React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
|
|
52
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
|
|
53
|
-
>(({ className, ...props }, ref) => (
|
|
54
|
-
<SelectPrimitive.ScrollDownButton
|
|
55
|
-
ref={ref}
|
|
56
|
-
className={cn(
|
|
57
|
-
"flex cursor-default items-center justify-center py-1",
|
|
58
|
-
className
|
|
59
|
-
)}
|
|
60
|
-
{...props}
|
|
61
|
-
>
|
|
62
|
-
<ChevronDown className="h-4 w-4" />
|
|
63
|
-
</SelectPrimitive.ScrollDownButton>
|
|
64
|
-
))
|
|
65
|
-
SelectScrollDownButton.displayName =
|
|
66
|
-
SelectPrimitive.ScrollDownButton.displayName
|
|
67
|
-
|
|
68
|
-
const SelectContent = React.forwardRef<
|
|
69
|
-
React.ElementRef<typeof SelectPrimitive.Content>,
|
|
70
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
|
|
71
|
-
>(({ className, children, position = "popper", ...props }, ref) => (
|
|
72
|
-
<SelectPrimitive.Portal>
|
|
73
|
-
<SelectPrimitive.Content
|
|
74
|
-
ref={ref}
|
|
75
|
-
className={cn(
|
|
76
|
-
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",
|
|
77
|
-
position === "popper" &&
|
|
78
|
-
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
79
|
-
className
|
|
80
|
-
)}
|
|
81
|
-
position={position}
|
|
82
|
-
{...props}
|
|
83
|
-
>
|
|
84
|
-
<SelectScrollUpButton />
|
|
85
|
-
<SelectPrimitive.Viewport
|
|
86
|
-
className={cn(
|
|
87
|
-
"p-1",
|
|
88
|
-
position === "popper" &&
|
|
89
|
-
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
90
|
-
)}
|
|
91
|
-
>
|
|
92
|
-
{children}
|
|
93
|
-
</SelectPrimitive.Viewport>
|
|
94
|
-
<SelectScrollDownButton />
|
|
95
|
-
</SelectPrimitive.Content>
|
|
96
|
-
</SelectPrimitive.Portal>
|
|
97
|
-
))
|
|
98
|
-
SelectContent.displayName = SelectPrimitive.Content.displayName
|
|
99
|
-
|
|
100
|
-
const SelectLabel = React.forwardRef<
|
|
101
|
-
React.ElementRef<typeof SelectPrimitive.Label>,
|
|
102
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
|
|
103
|
-
>(({ className, ...props }, ref) => (
|
|
104
|
-
<SelectPrimitive.Label
|
|
105
|
-
ref={ref}
|
|
106
|
-
className={cn("px-2 py-1.5 text-sm font-semibold", className)}
|
|
107
|
-
{...props}
|
|
108
|
-
/>
|
|
109
|
-
))
|
|
110
|
-
SelectLabel.displayName = SelectPrimitive.Label.displayName
|
|
111
|
-
|
|
112
|
-
const SelectItem = React.forwardRef<
|
|
113
|
-
React.ElementRef<typeof SelectPrimitive.Item>,
|
|
114
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
|
|
115
|
-
>(({ className, children, ...props }, ref) => (
|
|
116
|
-
<SelectPrimitive.Item
|
|
117
|
-
ref={ref}
|
|
118
|
-
className={cn(
|
|
119
|
-
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
120
|
-
className
|
|
121
|
-
)}
|
|
122
|
-
{...props}
|
|
123
|
-
>
|
|
124
|
-
<span className="absolute right-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
125
|
-
<SelectPrimitive.ItemIndicator>
|
|
126
|
-
<Check className="h-4 w-4" />
|
|
127
|
-
</SelectPrimitive.ItemIndicator>
|
|
128
|
-
</span>
|
|
129
|
-
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
130
|
-
</SelectPrimitive.Item>
|
|
131
|
-
))
|
|
132
|
-
SelectItem.displayName = SelectPrimitive.Item.displayName
|
|
133
|
-
|
|
134
|
-
const SelectSeparator = React.forwardRef<
|
|
135
|
-
React.ElementRef<typeof SelectPrimitive.Separator>,
|
|
136
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
|
|
137
|
-
>(({ className, ...props }, ref) => (
|
|
138
|
-
<SelectPrimitive.Separator
|
|
139
|
-
ref={ref}
|
|
140
|
-
className={cn("-mx-1 my-1 h-px bg-muted", className)}
|
|
141
|
-
{...props}
|
|
142
|
-
/>
|
|
143
|
-
))
|
|
144
|
-
SelectSeparator.displayName = SelectPrimitive.Separator.displayName
|
|
145
|
-
|
|
146
|
-
export {
|
|
147
|
-
Select,
|
|
148
|
-
SelectGroup,
|
|
149
|
-
SelectValue,
|
|
150
|
-
SelectTrigger,
|
|
151
|
-
SelectContent,
|
|
152
|
-
SelectLabel,
|
|
153
|
-
SelectItem,
|
|
154
|
-
SelectSeparator,
|
|
155
|
-
SelectScrollUpButton,
|
|
156
|
-
SelectScrollDownButton,
|
|
157
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import * as React from 'react'
|
|
4
|
-
import * as SeparatorPrimitive from '@radix-ui/react-separator'
|
|
5
|
-
|
|
6
|
-
import { cn } from '@/lib/utils'
|
|
7
|
-
|
|
8
|
-
const Separator = React.forwardRef<
|
|
9
|
-
React.ElementRef<typeof SeparatorPrimitive.Root>,
|
|
10
|
-
React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
|
|
11
|
-
>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (
|
|
12
|
-
<SeparatorPrimitive.Root
|
|
13
|
-
ref={ref}
|
|
14
|
-
decorative={decorative}
|
|
15
|
-
orientation={orientation}
|
|
16
|
-
className={cn('shrink-0 bg-border', orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]', className)}
|
|
17
|
-
{...props}
|
|
18
|
-
/>
|
|
19
|
-
))
|
|
20
|
-
Separator.displayName = SeparatorPrimitive.Root.displayName
|
|
21
|
-
|
|
22
|
-
export { Separator }
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import * as React from 'react'
|
|
2
|
-
import * as SheetPrimitive from '@radix-ui/react-dialog'
|
|
3
|
-
import { cva, type VariantProps } from 'class-variance-authority'
|
|
4
|
-
import { X } from 'lucide-react'
|
|
5
|
-
import { cn } from '@/lib/utils'
|
|
6
|
-
|
|
7
|
-
const Sheet = SheetPrimitive.Root
|
|
8
|
-
|
|
9
|
-
const SheetTrigger = SheetPrimitive.Trigger
|
|
10
|
-
|
|
11
|
-
const SheetClose = SheetPrimitive.Close
|
|
12
|
-
|
|
13
|
-
const SheetPortal = SheetPrimitive.Portal
|
|
14
|
-
|
|
15
|
-
const SheetOverlay = React.forwardRef<
|
|
16
|
-
React.ElementRef<typeof SheetPrimitive.Overlay>,
|
|
17
|
-
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>
|
|
18
|
-
>(({ className, ...props }, ref) => (
|
|
19
|
-
<SheetPrimitive.Overlay
|
|
20
|
-
className={cn(
|
|
21
|
-
'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
|
|
22
|
-
className,
|
|
23
|
-
)}
|
|
24
|
-
{...props}
|
|
25
|
-
ref={ref}
|
|
26
|
-
/>
|
|
27
|
-
))
|
|
28
|
-
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName
|
|
29
|
-
|
|
30
|
-
const sheetVariants = cva(
|
|
31
|
-
'fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out',
|
|
32
|
-
{
|
|
33
|
-
variants: {
|
|
34
|
-
side: {
|
|
35
|
-
top: 'inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top',
|
|
36
|
-
bottom:
|
|
37
|
-
'inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom',
|
|
38
|
-
left: 'inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm',
|
|
39
|
-
right:
|
|
40
|
-
'inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm',
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
defaultVariants: {
|
|
44
|
-
side: 'right',
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
interface SheetContentProps
|
|
50
|
-
extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,
|
|
51
|
-
VariantProps<typeof sheetVariants> {}
|
|
52
|
-
|
|
53
|
-
const SheetContent = React.forwardRef<React.ElementRef<typeof SheetPrimitive.Content>, SheetContentProps>(
|
|
54
|
-
({ side = 'right', className, children, ...props }, ref) => (
|
|
55
|
-
<SheetPortal>
|
|
56
|
-
<SheetOverlay />
|
|
57
|
-
<SheetPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>
|
|
58
|
-
<SheetPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">
|
|
59
|
-
<X className="h-4 w-4" />
|
|
60
|
-
<span className="sr-only">Close</span>
|
|
61
|
-
</SheetPrimitive.Close>
|
|
62
|
-
{children}
|
|
63
|
-
</SheetPrimitive.Content>
|
|
64
|
-
</SheetPortal>
|
|
65
|
-
),
|
|
66
|
-
)
|
|
67
|
-
SheetContent.displayName = SheetPrimitive.Content.displayName
|
|
68
|
-
|
|
69
|
-
const SheetHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
|
|
70
|
-
<div className={cn('flex flex-col space-y-2 text-center sm:text-left', className)} {...props} />
|
|
71
|
-
)
|
|
72
|
-
SheetHeader.displayName = 'SheetHeader'
|
|
73
|
-
|
|
74
|
-
const SheetFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
|
|
75
|
-
<div className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)} {...props} />
|
|
76
|
-
)
|
|
77
|
-
SheetFooter.displayName = 'SheetFooter'
|
|
78
|
-
|
|
79
|
-
const SheetTitle = React.forwardRef<
|
|
80
|
-
React.ElementRef<typeof SheetPrimitive.Title>,
|
|
81
|
-
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>
|
|
82
|
-
>(({ className, ...props }, ref) => (
|
|
83
|
-
<SheetPrimitive.Title ref={ref} className={cn('text-lg font-semibold text-foreground', className)} {...props} />
|
|
84
|
-
))
|
|
85
|
-
SheetTitle.displayName = SheetPrimitive.Title.displayName
|
|
86
|
-
|
|
87
|
-
const SheetDescription = React.forwardRef<
|
|
88
|
-
React.ElementRef<typeof SheetPrimitive.Description>,
|
|
89
|
-
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>
|
|
90
|
-
>(({ className, ...props }, ref) => (
|
|
91
|
-
<SheetPrimitive.Description ref={ref} className={cn('text-sm text-muted-foreground', className)} {...props} />
|
|
92
|
-
))
|
|
93
|
-
SheetDescription.displayName = SheetPrimitive.Description.displayName
|
|
94
|
-
|
|
95
|
-
export {
|
|
96
|
-
Sheet,
|
|
97
|
-
SheetPortal,
|
|
98
|
-
SheetOverlay,
|
|
99
|
-
SheetTrigger,
|
|
100
|
-
SheetClose,
|
|
101
|
-
SheetContent,
|
|
102
|
-
SheetHeader,
|
|
103
|
-
SheetFooter,
|
|
104
|
-
SheetTitle,
|
|
105
|
-
SheetDescription,
|
|
106
|
-
}
|