@dyrected/admin 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.d.ts +1 -0
- package/dist/admin.css +2 -0
- package/dist/components/auth/auth-gate.d.ts +13 -0
- package/dist/components/error-boundary.d.ts +16 -0
- package/dist/components/forms/field-renderer.d.ts +22 -0
- package/dist/components/forms/fields/block-builder.d.ts +9 -0
- package/dist/components/forms/fields/date-picker.d.ts +8 -0
- package/dist/components/forms/fields/json-editor.d.ts +8 -0
- package/dist/components/forms/fields/media-picker.d.ts +12 -0
- package/dist/components/forms/fields/multi-select.d.ts +19 -0
- package/dist/components/forms/fields/radio-field.d.ts +8 -0
- package/dist/components/forms/fields/relationship-picker.d.ts +10 -0
- package/dist/components/forms/fields/rich-text-editor.d.ts +9 -0
- package/dist/components/forms/fields/select-field.d.ts +8 -0
- package/dist/components/forms/fields/switch-field.d.ts +6 -0
- package/dist/components/forms/fields/text-area-field.d.ts +8 -0
- package/dist/components/forms/fields/text-field.d.ts +8 -0
- package/dist/components/forms/form-engine.d.ts +14 -0
- package/dist/components/forms/form-field-renderer.d.ts +20 -0
- package/dist/components/forms/utils.d.ts +11 -0
- package/dist/components/layout/admin-shell.d.ts +5 -0
- package/dist/components/layout/branding-provider.d.ts +4 -0
- package/dist/components/live-preview/LivePreviewPane.d.ts +7 -0
- package/dist/components/media/focal-point-picker.d.ts +12 -0
- package/dist/components/media/media-card.d.ts +8 -0
- package/dist/components/media/media-grid.d.ts +8 -0
- package/dist/components/media/media-library-dialog.d.ts +11 -0
- package/dist/components/ui/aspect-ratio.d.ts +3 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/calendar.d.ts +8 -0
- package/dist/components/ui/card.d.ts +8 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/command.d.ts +80 -0
- package/dist/components/ui/data-table.d.ts +14 -0
- package/dist/components/ui/dialog.d.ts +19 -0
- package/dist/components/ui/dropdown-menu.d.ts +27 -0
- package/dist/components/ui/form.d.ts +23 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/page-header.d.ts +10 -0
- package/dist/components/ui/pagination.d.ts +11 -0
- package/dist/components/ui/popover.d.ts +6 -0
- package/dist/components/ui/progress.d.ts +4 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/render-cell.d.ts +8 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/select.d.ts +13 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/sheet.d.ts +25 -0
- package/dist/components/ui/sidebar.d.ts +65 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/sonner.d.ts +4 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/tabs.d.ts +7 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/toggle.d.ts +12 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-preferences.d.ts +6 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.mjs +69091 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/main.d.ts +0 -0
- package/dist/pages/auth/first-user-page.d.ts +4 -0
- package/dist/pages/auth/login-page.d.ts +4 -0
- package/dist/pages/collections/edit-page.d.ts +1 -0
- package/dist/pages/collections/list-page.d.ts +5 -0
- package/dist/pages/dashboard/dashboard.d.ts +1 -0
- package/dist/pages/globals/editor-page.d.ts +1 -0
- package/dist/pages/media/media-page.d.ts +4 -0
- package/dist/pages/setup/setup-prompt.d.ts +6 -0
- package/dist/providers/dyrected-provider.d.ts +29 -0
- package/dist/providers/query-provider.d.ts +3 -0
- package/package.json +6 -3
- package/CHANGELOG.md +0 -153
- package/components.json +0 -17
- package/eslint.config.js +0 -22
- package/index.html +0 -13
- package/postcss.config.js +0 -6
- package/scripts/prefix-tailwind-precision.py +0 -98
- package/scripts/prefix-tailwind.py +0 -67
- package/src/App.css +0 -184
- package/src/App.tsx +0 -25
- package/src/assets/dyrected.svg +0 -155
- package/src/assets/hero.png +0 -0
- package/src/assets/react.svg +0 -1
- package/src/assets/vite.svg +0 -1
- package/src/components/auth/auth-gate.tsx +0 -64
- package/src/components/error-boundary.tsx +0 -45
- package/src/components/forms/field-renderer.tsx +0 -111
- package/src/components/forms/fields/block-builder.tsx +0 -213
- package/src/components/forms/fields/date-picker.tsx +0 -60
- package/src/components/forms/fields/json-editor.tsx +0 -62
- package/src/components/forms/fields/media-picker.tsx +0 -286
- package/src/components/forms/fields/multi-select.tsx +0 -145
- package/src/components/forms/fields/radio-field.tsx +0 -51
- package/src/components/forms/fields/relationship-picker.tsx +0 -143
- package/src/components/forms/fields/rich-text-editor.tsx +0 -224
- package/src/components/forms/fields/select-field.tsx +0 -35
- package/src/components/forms/fields/switch-field.tsx +0 -16
- package/src/components/forms/fields/text-area-field.tsx +0 -15
- package/src/components/forms/fields/text-field.tsx +0 -24
- package/src/components/forms/form-engine.tsx +0 -87
- package/src/components/forms/form-field-renderer.tsx +0 -269
- package/src/components/forms/utils.ts +0 -97
- package/src/components/layout/admin-shell.tsx +0 -479
- package/src/components/layout/branding-provider.tsx +0 -112
- package/src/components/live-preview/LivePreviewPane.tsx +0 -128
- package/src/components/media/focal-point-picker.tsx +0 -66
- package/src/components/media/media-card.tsx +0 -44
- package/src/components/media/media-grid.tsx +0 -32
- package/src/components/media/media-library-dialog.tsx +0 -465
- package/src/components/ui/aspect-ratio.tsx +0 -7
- package/src/components/ui/badge.tsx +0 -36
- package/src/components/ui/button.tsx +0 -56
- package/src/components/ui/calendar.tsx +0 -214
- package/src/components/ui/card.tsx +0 -79
- package/src/components/ui/checkbox.tsx +0 -28
- package/src/components/ui/command.tsx +0 -151
- package/src/components/ui/data-table.tsx +0 -219
- package/src/components/ui/dialog.tsx +0 -122
- package/src/components/ui/dropdown-menu.tsx +0 -200
- package/src/components/ui/form.tsx +0 -178
- package/src/components/ui/input.tsx +0 -24
- package/src/components/ui/label.tsx +0 -24
- package/src/components/ui/page-header.tsx +0 -30
- package/src/components/ui/pagination.tsx +0 -57
- package/src/components/ui/popover.tsx +0 -29
- package/src/components/ui/progress.tsx +0 -26
- package/src/components/ui/radio-group.tsx +0 -42
- package/src/components/ui/render-cell.tsx +0 -110
- package/src/components/ui/scroll-area.tsx +0 -46
- package/src/components/ui/select.tsx +0 -160
- package/src/components/ui/separator.tsx +0 -29
- package/src/components/ui/sheet.tsx +0 -140
- package/src/components/ui/sidebar.tsx +0 -771
- package/src/components/ui/skeleton.tsx +0 -15
- package/src/components/ui/sonner.tsx +0 -27
- package/src/components/ui/switch.tsx +0 -27
- package/src/components/ui/table.tsx +0 -117
- package/src/components/ui/tabs.tsx +0 -53
- package/src/components/ui/textarea.tsx +0 -22
- package/src/components/ui/toggle.tsx +0 -43
- package/src/components/ui/tooltip.tsx +0 -28
- package/src/hooks/use-mobile.tsx +0 -19
- package/src/hooks/use-preferences.ts +0 -56
- package/src/index.css +0 -111
- package/src/index.tsx +0 -198
- package/src/lib/utils.ts +0 -36
- package/src/main.tsx +0 -10
- package/src/pages/auth/first-user-page.tsx +0 -115
- package/src/pages/auth/login-page.tsx +0 -91
- package/src/pages/collections/edit-page.tsx +0 -280
- package/src/pages/collections/list-page.tsx +0 -343
- package/src/pages/dashboard/dashboard.tsx +0 -150
- package/src/pages/globals/editor-page.tsx +0 -122
- package/src/pages/media/media-page.tsx +0 -564
- package/src/pages/setup/setup-prompt.tsx +0 -181
- package/src/providers/dyrected-provider.tsx +0 -122
- package/src/providers/query-provider.tsx +0 -19
- package/src/types/jexl.d.ts +0 -11
- package/tailwind.config.ts +0 -103
- package/tsconfig.app.json +0 -28
- package/tsconfig.json +0 -12
- package/tsconfig.node.json +0 -25
- package/vite.config.ts +0 -39
- /package/{public → dist}/favicon.svg +0 -0
- /package/{public → dist}/icons.svg +0 -0
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog"
|
|
5
|
-
import { X } from "lucide-react"
|
|
6
|
-
|
|
7
|
-
import { cn } from "../../lib/utils"
|
|
8
|
-
|
|
9
|
-
const Dialog = DialogPrimitive.Root
|
|
10
|
-
|
|
11
|
-
const DialogTrigger = DialogPrimitive.Trigger
|
|
12
|
-
|
|
13
|
-
const DialogPortal = DialogPrimitive.Portal
|
|
14
|
-
|
|
15
|
-
const DialogClose = DialogPrimitive.Close
|
|
16
|
-
|
|
17
|
-
const DialogOverlay = React.forwardRef<
|
|
18
|
-
React.ElementRef<typeof DialogPrimitive.Overlay>,
|
|
19
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
|
|
20
|
-
>(({ className, ...props }, ref) => (
|
|
21
|
-
<DialogPrimitive.Overlay
|
|
22
|
-
ref={ref}
|
|
23
|
-
className={cn(
|
|
24
|
-
"dy-fixed dy-inset-0 dy-z-50 dy-bg-black/40 dy-backdrop-blur-[2px] data-[state=open]:dy-animate-in data-[state=closed]:dy-animate-out data-[state=closed]:dy-fade-out-0 data-[state=open]:dy-fade-in-0",
|
|
25
|
-
className
|
|
26
|
-
)}
|
|
27
|
-
{...props}
|
|
28
|
-
/>
|
|
29
|
-
))
|
|
30
|
-
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName
|
|
31
|
-
|
|
32
|
-
const DialogContent = React.forwardRef<
|
|
33
|
-
React.ElementRef<typeof DialogPrimitive.Content>,
|
|
34
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
|
|
35
|
-
>(({ className, children, ...props }, ref) => (
|
|
36
|
-
<DialogPortal>
|
|
37
|
-
<DialogOverlay />
|
|
38
|
-
<DialogPrimitive.Content
|
|
39
|
-
ref={ref}
|
|
40
|
-
className={cn(
|
|
41
|
-
"dy-fixed dy-left-[50%] dy-top-[50%] dy-z-50 dy-grid dy-w-full dy-max-w-lg dy-translate-x-[-50%] dy-translate-y-[-50%] dy-gap-4 dy-border dy-bg-white dy-p-6 dy-shadow-2xl dy-duration-200 data-[state=open]:dy-animate-in data-[state=closed]:dy-animate-out data-[state=closed]:dy-fade-out-0 data-[state=open]:dy-fade-in-0 data-[state=closed]:dy-zoom-out-95 data-[state=open]:dy-zoom-in-95 data-[state=closed]:dy-slide-out-to-left-1/2 data-[state=closed]:dy-slide-out-to-top-[48%] data-[state=open]:dy-slide-in-from-left-1/2 data-[state=open]:dy-slide-in-from-top-[48%] sm:dy-rounded-xl",
|
|
42
|
-
className
|
|
43
|
-
)}
|
|
44
|
-
{...props}
|
|
45
|
-
>
|
|
46
|
-
{children}
|
|
47
|
-
<DialogPrimitive.Close className="dy-absolute dy-right-4 dy-top-4 dy-rounded-sm dy-opacity-70 dy-ring-offset-background dy-transition-opacity hover:dy-opacity-100 focus:dy-outline-none focus:dy-ring-2 focus:dy-ring-ring focus:dy-ring-offset-2 disabled:dy-pointer-events-none data-[state=open]:dy-bg-accent data-[state=open]:dy-text-muted-foreground">
|
|
48
|
-
<X className="dy-h-4 dy-w-4" />
|
|
49
|
-
<span className="dy-sr-only">Close</span>
|
|
50
|
-
</DialogPrimitive.Close>
|
|
51
|
-
</DialogPrimitive.Content>
|
|
52
|
-
</DialogPortal>
|
|
53
|
-
))
|
|
54
|
-
DialogContent.displayName = DialogPrimitive.Content.displayName
|
|
55
|
-
|
|
56
|
-
const DialogHeader = ({
|
|
57
|
-
className,
|
|
58
|
-
...props
|
|
59
|
-
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
60
|
-
<div
|
|
61
|
-
className={cn(
|
|
62
|
-
"dy-flex dy-flex-col dy-space-y-1.5 dy-text-center sm:dy-text-left",
|
|
63
|
-
className
|
|
64
|
-
)}
|
|
65
|
-
{...props}
|
|
66
|
-
/>
|
|
67
|
-
)
|
|
68
|
-
DialogHeader.displayName = "DialogHeader"
|
|
69
|
-
|
|
70
|
-
const DialogFooter = ({
|
|
71
|
-
className,
|
|
72
|
-
...props
|
|
73
|
-
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
74
|
-
<div
|
|
75
|
-
className={cn(
|
|
76
|
-
"dy-flex dy-flex-col-reverse sm:dy-flex-row sm:dy-justify-end sm:dy-space-x-2",
|
|
77
|
-
className
|
|
78
|
-
)}
|
|
79
|
-
{...props}
|
|
80
|
-
/>
|
|
81
|
-
)
|
|
82
|
-
DialogFooter.displayName = "DialogFooter"
|
|
83
|
-
|
|
84
|
-
const DialogTitle = React.forwardRef<
|
|
85
|
-
React.ElementRef<typeof DialogPrimitive.Title>,
|
|
86
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
|
|
87
|
-
>(({ className, ...props }, ref) => (
|
|
88
|
-
<DialogPrimitive.Title
|
|
89
|
-
ref={ref}
|
|
90
|
-
className={cn(
|
|
91
|
-
"dy-text-lg dy-font-semibold dy-leading-none dy-tracking-tight",
|
|
92
|
-
className
|
|
93
|
-
)}
|
|
94
|
-
{...props}
|
|
95
|
-
/>
|
|
96
|
-
))
|
|
97
|
-
DialogTitle.displayName = DialogPrimitive.Title.displayName
|
|
98
|
-
|
|
99
|
-
const DialogDescription = React.forwardRef<
|
|
100
|
-
React.ElementRef<typeof DialogPrimitive.Description>,
|
|
101
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
|
|
102
|
-
>(({ className, ...props }, ref) => (
|
|
103
|
-
<DialogPrimitive.Description
|
|
104
|
-
ref={ref}
|
|
105
|
-
className={cn("dy-text-sm dy-text-muted-foreground", className)}
|
|
106
|
-
{...props}
|
|
107
|
-
/>
|
|
108
|
-
))
|
|
109
|
-
DialogDescription.displayName = DialogPrimitive.Description.displayName
|
|
110
|
-
|
|
111
|
-
export {
|
|
112
|
-
Dialog,
|
|
113
|
-
DialogPortal,
|
|
114
|
-
DialogOverlay,
|
|
115
|
-
DialogClose,
|
|
116
|
-
DialogTrigger,
|
|
117
|
-
DialogContent,
|
|
118
|
-
DialogHeader,
|
|
119
|
-
DialogFooter,
|
|
120
|
-
DialogTitle,
|
|
121
|
-
DialogDescription,
|
|
122
|
-
}
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
|
|
5
|
-
import { Check, ChevronRight, Circle } from "lucide-react"
|
|
6
|
-
|
|
7
|
-
import { cn } from "../../lib/utils"
|
|
8
|
-
|
|
9
|
-
const DropdownMenu = DropdownMenuPrimitive.Root
|
|
10
|
-
|
|
11
|
-
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger
|
|
12
|
-
|
|
13
|
-
const DropdownMenuGroup = DropdownMenuPrimitive.Group
|
|
14
|
-
|
|
15
|
-
const DropdownMenuPortal = DropdownMenuPrimitive.Portal
|
|
16
|
-
|
|
17
|
-
const DropdownMenuSub = DropdownMenuPrimitive.Sub
|
|
18
|
-
|
|
19
|
-
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup
|
|
20
|
-
|
|
21
|
-
const DropdownMenuSubTrigger = React.forwardRef<
|
|
22
|
-
React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
|
|
23
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
24
|
-
inset?: boolean
|
|
25
|
-
}
|
|
26
|
-
>(({ className, inset, children, ...props }, ref) => (
|
|
27
|
-
<DropdownMenuPrimitive.SubTrigger
|
|
28
|
-
ref={ref}
|
|
29
|
-
className={cn(
|
|
30
|
-
"dy-flex dy-cursor-default dy-select-none dy-items-center dy-gap-2 dy-rounded-sm dy-px-2 dy-py-1.5 dy-text-sm dy-outline-none focus:dy-bg-accent data-[state=open]:dy-bg-accent [&_svg]:dy-pointer-events-none [&_svg]:dy-size-4 [&_svg]:dy-shrink-0",
|
|
31
|
-
inset && "dy-pl-8",
|
|
32
|
-
className
|
|
33
|
-
)}
|
|
34
|
-
{...props}
|
|
35
|
-
>
|
|
36
|
-
{children}
|
|
37
|
-
<ChevronRight className="dy-ml-auto" />
|
|
38
|
-
</DropdownMenuPrimitive.SubTrigger>
|
|
39
|
-
))
|
|
40
|
-
DropdownMenuSubTrigger.displayName =
|
|
41
|
-
DropdownMenuPrimitive.SubTrigger.displayName
|
|
42
|
-
|
|
43
|
-
const DropdownMenuSubContent = React.forwardRef<
|
|
44
|
-
React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
|
|
45
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>
|
|
46
|
-
>(({ className, ...props }, ref) => (
|
|
47
|
-
<DropdownMenuPrimitive.SubContent
|
|
48
|
-
ref={ref}
|
|
49
|
-
className={cn(
|
|
50
|
-
"dy-z-50 dy-min-w-[8rem] dy-overflow-hidden dy-rounded-md dy-border dy-bg-popover dy-p-1 dy-text-popover-foreground dy-shadow-lg data-[state=open]:dy-animate-in data-[state=closed]:dy-animate-out data-[state=closed]:dy-fade-out-0 data-[state=open]:dy-fade-in-0 data-[state=closed]:dy-zoom-out-95 data-[state=open]:dy-zoom-in-95 data-[side=bottom]:dy-slide-in-from-top-2 data-[side=left]:dy-slide-in-from-right-2 data-[side=right]:dy-slide-in-from-left-2 data-[side=top]:dy-slide-in-from-bottom-2 dy-origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
51
|
-
className
|
|
52
|
-
)}
|
|
53
|
-
{...props}
|
|
54
|
-
/>
|
|
55
|
-
))
|
|
56
|
-
DropdownMenuSubContent.displayName =
|
|
57
|
-
DropdownMenuPrimitive.SubContent.displayName
|
|
58
|
-
|
|
59
|
-
const DropdownMenuContent = React.forwardRef<
|
|
60
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Content>,
|
|
61
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
|
|
62
|
-
>(({ className, sideOffset = 4, ...props }, ref) => (
|
|
63
|
-
<DropdownMenuPrimitive.Portal>
|
|
64
|
-
<DropdownMenuPrimitive.Content
|
|
65
|
-
ref={ref}
|
|
66
|
-
sideOffset={sideOffset}
|
|
67
|
-
className={cn(
|
|
68
|
-
"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-white p-1 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 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
69
|
-
className
|
|
70
|
-
)}
|
|
71
|
-
{...props}
|
|
72
|
-
/>
|
|
73
|
-
</DropdownMenuPrimitive.Portal>
|
|
74
|
-
))
|
|
75
|
-
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName
|
|
76
|
-
|
|
77
|
-
const DropdownMenuItem = React.forwardRef<
|
|
78
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Item>,
|
|
79
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
|
|
80
|
-
inset?: boolean
|
|
81
|
-
}
|
|
82
|
-
>(({ className, inset, ...props }, ref) => (
|
|
83
|
-
<DropdownMenuPrimitive.Item
|
|
84
|
-
ref={ref}
|
|
85
|
-
className={cn(
|
|
86
|
-
"dy-relative dy-flex dy-cursor-default dy-select-none dy-items-center dy-gap-2 dy-rounded-sm dy-px-2 dy-py-1.5 dy-text-sm dy-outline-none dy-transition-colors focus:dy-bg-accent focus:dy-text-accent-foreground data-[disabled]:dy-pointer-events-none data-[disabled]:dy-opacity-50 [&_svg]:dy-pointer-events-none [&_svg]:dy-size-4 [&_svg]:dy-shrink-0",
|
|
87
|
-
inset && "dy-pl-8",
|
|
88
|
-
className
|
|
89
|
-
)}
|
|
90
|
-
{...props}
|
|
91
|
-
/>
|
|
92
|
-
))
|
|
93
|
-
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName
|
|
94
|
-
|
|
95
|
-
const DropdownMenuCheckboxItem = React.forwardRef<
|
|
96
|
-
React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
|
|
97
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>
|
|
98
|
-
>(({ className, children, checked, ...props }, ref) => (
|
|
99
|
-
<DropdownMenuPrimitive.CheckboxItem
|
|
100
|
-
ref={ref}
|
|
101
|
-
className={cn(
|
|
102
|
-
"dy-relative dy-flex dy-cursor-default dy-select-none dy-items-center dy-rounded-sm dy-py-1.5 dy-pl-8 dy-pr-2 dy-text-sm dy-outline-none dy-transition-colors focus:dy-bg-accent focus:dy-text-accent-foreground data-[disabled]:dy-pointer-events-none data-[disabled]:dy-opacity-50",
|
|
103
|
-
className
|
|
104
|
-
)}
|
|
105
|
-
checked={checked}
|
|
106
|
-
{...props}
|
|
107
|
-
>
|
|
108
|
-
<span className="dy-absolute dy-left-2 dy-flex dy-h-3.5 dy-w-3.5 dy-items-center dy-justify-center">
|
|
109
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
110
|
-
<Check className="dy-h-4 dy-w-4" />
|
|
111
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
112
|
-
</span>
|
|
113
|
-
{children}
|
|
114
|
-
</DropdownMenuPrimitive.CheckboxItem>
|
|
115
|
-
))
|
|
116
|
-
DropdownMenuCheckboxItem.displayName =
|
|
117
|
-
DropdownMenuPrimitive.CheckboxItem.displayName
|
|
118
|
-
|
|
119
|
-
const DropdownMenuRadioItem = React.forwardRef<
|
|
120
|
-
React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
|
|
121
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>
|
|
122
|
-
>(({ className, children, ...props }, ref) => (
|
|
123
|
-
<DropdownMenuPrimitive.RadioItem
|
|
124
|
-
ref={ref}
|
|
125
|
-
className={cn(
|
|
126
|
-
"dy-relative dy-flex dy-cursor-default dy-select-none dy-items-center dy-rounded-sm dy-py-1.5 dy-pl-8 dy-pr-2 dy-text-sm dy-outline-none dy-transition-colors focus:dy-bg-accent focus:dy-text-accent-foreground data-[disabled]:dy-pointer-events-none data-[disabled]:dy-opacity-50",
|
|
127
|
-
className
|
|
128
|
-
)}
|
|
129
|
-
{...props}
|
|
130
|
-
>
|
|
131
|
-
<span className="dy-absolute dy-left-2 dy-flex dy-h-3.5 dy-w-3.5 dy-items-center dy-justify-center">
|
|
132
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
133
|
-
<Circle className="dy-h-2 dy-w-2 dy-fill-current" />
|
|
134
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
135
|
-
</span>
|
|
136
|
-
{children}
|
|
137
|
-
</DropdownMenuPrimitive.RadioItem>
|
|
138
|
-
))
|
|
139
|
-
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName
|
|
140
|
-
|
|
141
|
-
const DropdownMenuLabel = React.forwardRef<
|
|
142
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Label>,
|
|
143
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
|
|
144
|
-
inset?: boolean
|
|
145
|
-
}
|
|
146
|
-
>(({ className, inset, ...props }, ref) => (
|
|
147
|
-
<DropdownMenuPrimitive.Label
|
|
148
|
-
ref={ref}
|
|
149
|
-
className={cn(
|
|
150
|
-
"dy-px-2 dy-py-1.5 dy-text-sm dy-font-semibold",
|
|
151
|
-
inset && "dy-pl-8",
|
|
152
|
-
className
|
|
153
|
-
)}
|
|
154
|
-
{...props}
|
|
155
|
-
/>
|
|
156
|
-
))
|
|
157
|
-
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName
|
|
158
|
-
|
|
159
|
-
const DropdownMenuSeparator = React.forwardRef<
|
|
160
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
|
|
161
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
|
|
162
|
-
>(({ className, ...props }, ref) => (
|
|
163
|
-
<DropdownMenuPrimitive.Separator
|
|
164
|
-
ref={ref}
|
|
165
|
-
className={cn("dy--mx-1 dy-my-1 dy-h-px dy-bg-muted", className)}
|
|
166
|
-
{...props}
|
|
167
|
-
/>
|
|
168
|
-
))
|
|
169
|
-
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName
|
|
170
|
-
|
|
171
|
-
const DropdownMenuShortcut = ({
|
|
172
|
-
className,
|
|
173
|
-
...props
|
|
174
|
-
}: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
175
|
-
return (
|
|
176
|
-
<span
|
|
177
|
-
className={cn("dy-ml-auto dy-text-xs dy-tracking-widest dy-opacity-60", className)}
|
|
178
|
-
{...props}
|
|
179
|
-
/>
|
|
180
|
-
)
|
|
181
|
-
}
|
|
182
|
-
DropdownMenuShortcut.displayName = "DropdownMenuShortcut"
|
|
183
|
-
|
|
184
|
-
export {
|
|
185
|
-
DropdownMenu,
|
|
186
|
-
DropdownMenuTrigger,
|
|
187
|
-
DropdownMenuContent,
|
|
188
|
-
DropdownMenuItem,
|
|
189
|
-
DropdownMenuCheckboxItem,
|
|
190
|
-
DropdownMenuRadioItem,
|
|
191
|
-
DropdownMenuLabel,
|
|
192
|
-
DropdownMenuSeparator,
|
|
193
|
-
DropdownMenuShortcut,
|
|
194
|
-
DropdownMenuGroup,
|
|
195
|
-
DropdownMenuPortal,
|
|
196
|
-
DropdownMenuSub,
|
|
197
|
-
DropdownMenuSubContent,
|
|
198
|
-
DropdownMenuSubTrigger,
|
|
199
|
-
DropdownMenuRadioGroup,
|
|
200
|
-
}
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as LabelPrimitive from "@radix-ui/react-label"
|
|
5
|
-
import { Slot } from "@radix-ui/react-slot"
|
|
6
|
-
import {
|
|
7
|
-
Controller,
|
|
8
|
-
FormProvider,
|
|
9
|
-
useFormContext,
|
|
10
|
-
type ControllerProps,
|
|
11
|
-
type FieldPath,
|
|
12
|
-
type FieldValues,
|
|
13
|
-
} from "react-hook-form"
|
|
14
|
-
|
|
15
|
-
import { cn } from "../../lib/utils"
|
|
16
|
-
import { Label } from "../../components/ui/label"
|
|
17
|
-
|
|
18
|
-
const Form = FormProvider
|
|
19
|
-
|
|
20
|
-
type FormFieldContextValue<
|
|
21
|
-
TFieldValues extends FieldValues = FieldValues,
|
|
22
|
-
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
|
|
23
|
-
> = {
|
|
24
|
-
name: TName
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const FormFieldContext = React.createContext<FormFieldContextValue | null>(null)
|
|
28
|
-
|
|
29
|
-
const FormField = <
|
|
30
|
-
TFieldValues extends FieldValues = FieldValues,
|
|
31
|
-
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
|
|
32
|
-
>({
|
|
33
|
-
...props
|
|
34
|
-
}: ControllerProps<TFieldValues, TName>) => {
|
|
35
|
-
return (
|
|
36
|
-
<FormFieldContext.Provider value={{ name: props.name }}>
|
|
37
|
-
<Controller {...props} />
|
|
38
|
-
</FormFieldContext.Provider>
|
|
39
|
-
)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const useFormField = () => {
|
|
43
|
-
const fieldContext = React.useContext(FormFieldContext)
|
|
44
|
-
const itemContext = React.useContext(FormItemContext)
|
|
45
|
-
const { getFieldState, formState } = useFormContext()
|
|
46
|
-
|
|
47
|
-
if (!fieldContext) {
|
|
48
|
-
throw new Error("useFormField should be used within <FormField>")
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (!itemContext) {
|
|
52
|
-
throw new Error("useFormField should be used within <FormItem>")
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const fieldState = getFieldState(fieldContext.name, formState)
|
|
56
|
-
|
|
57
|
-
const { id } = itemContext
|
|
58
|
-
|
|
59
|
-
return {
|
|
60
|
-
id,
|
|
61
|
-
name: fieldContext.name,
|
|
62
|
-
formItemId: `${id}-form-item`,
|
|
63
|
-
formDescriptionId: `${id}-form-item-description`,
|
|
64
|
-
formMessageId: `${id}-form-item-message`,
|
|
65
|
-
...fieldState,
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
type FormItemContextValue = {
|
|
70
|
-
id: string
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const FormItemContext = React.createContext<FormItemContextValue | null>(null)
|
|
74
|
-
|
|
75
|
-
const FormItem = React.forwardRef<
|
|
76
|
-
HTMLDivElement,
|
|
77
|
-
React.HTMLAttributes<HTMLDivElement>
|
|
78
|
-
>(({ className, ...props }, ref) => {
|
|
79
|
-
const id = React.useId()
|
|
80
|
-
|
|
81
|
-
return (
|
|
82
|
-
<FormItemContext.Provider value={{ id }}>
|
|
83
|
-
<div ref={ref} className={cn("dy-space-y-2", className)} {...props} />
|
|
84
|
-
</FormItemContext.Provider>
|
|
85
|
-
)
|
|
86
|
-
})
|
|
87
|
-
FormItem.displayName = "FormItem"
|
|
88
|
-
|
|
89
|
-
const FormLabel = React.forwardRef<
|
|
90
|
-
React.ElementRef<typeof LabelPrimitive.Root>,
|
|
91
|
-
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>
|
|
92
|
-
>(({ className, ...props }, ref) => {
|
|
93
|
-
const { error, formItemId } = useFormField()
|
|
94
|
-
|
|
95
|
-
return (
|
|
96
|
-
<Label
|
|
97
|
-
ref={ref}
|
|
98
|
-
className={cn(error && "dy-text-destructive", className)}
|
|
99
|
-
htmlFor={formItemId}
|
|
100
|
-
{...props}
|
|
101
|
-
/>
|
|
102
|
-
)
|
|
103
|
-
})
|
|
104
|
-
FormLabel.displayName = "FormLabel"
|
|
105
|
-
|
|
106
|
-
const FormControl = React.forwardRef<
|
|
107
|
-
React.ElementRef<typeof Slot>,
|
|
108
|
-
React.ComponentPropsWithoutRef<typeof Slot>
|
|
109
|
-
>(({ ...props }, ref) => {
|
|
110
|
-
const { error, formItemId, formDescriptionId, formMessageId } = useFormField()
|
|
111
|
-
|
|
112
|
-
return (
|
|
113
|
-
<Slot
|
|
114
|
-
ref={ref}
|
|
115
|
-
id={formItemId}
|
|
116
|
-
aria-describedby={
|
|
117
|
-
!error
|
|
118
|
-
? `${formDescriptionId}`
|
|
119
|
-
: `${formDescriptionId} ${formMessageId}`
|
|
120
|
-
}
|
|
121
|
-
aria-invalid={!!error}
|
|
122
|
-
{...props}
|
|
123
|
-
/>
|
|
124
|
-
)
|
|
125
|
-
})
|
|
126
|
-
FormControl.displayName = "FormControl"
|
|
127
|
-
|
|
128
|
-
const FormDescription = React.forwardRef<
|
|
129
|
-
HTMLParagraphElement,
|
|
130
|
-
React.HTMLAttributes<HTMLParagraphElement>
|
|
131
|
-
>(({ className, ...props }, ref) => {
|
|
132
|
-
const { formDescriptionId } = useFormField()
|
|
133
|
-
|
|
134
|
-
return (
|
|
135
|
-
<p
|
|
136
|
-
ref={ref}
|
|
137
|
-
id={formDescriptionId}
|
|
138
|
-
className={cn("dy-text-sm dy-text-muted-foreground", className)}
|
|
139
|
-
{...props}
|
|
140
|
-
/>
|
|
141
|
-
)
|
|
142
|
-
})
|
|
143
|
-
FormDescription.displayName = "FormDescription"
|
|
144
|
-
|
|
145
|
-
const FormMessage = React.forwardRef<
|
|
146
|
-
HTMLParagraphElement,
|
|
147
|
-
React.HTMLAttributes<HTMLParagraphElement>
|
|
148
|
-
>(({ className, children, ...props }, ref) => {
|
|
149
|
-
const { error, formMessageId } = useFormField()
|
|
150
|
-
const body = error ? String(error?.message ?? "") : children
|
|
151
|
-
|
|
152
|
-
if (!body) {
|
|
153
|
-
return null
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
return (
|
|
157
|
-
<p
|
|
158
|
-
ref={ref}
|
|
159
|
-
id={formMessageId}
|
|
160
|
-
className={cn("dy-text-sm dy-font-medium dy-text-destructive", className)}
|
|
161
|
-
{...props}
|
|
162
|
-
>
|
|
163
|
-
{body}
|
|
164
|
-
</p>
|
|
165
|
-
)
|
|
166
|
-
})
|
|
167
|
-
FormMessage.displayName = "FormMessage"
|
|
168
|
-
|
|
169
|
-
export {
|
|
170
|
-
useFormField,
|
|
171
|
-
Form,
|
|
172
|
-
FormItem,
|
|
173
|
-
FormLabel,
|
|
174
|
-
FormControl,
|
|
175
|
-
FormDescription,
|
|
176
|
-
FormMessage,
|
|
177
|
-
FormField,
|
|
178
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
|
|
3
|
-
import { cn } from "../../lib/utils"
|
|
4
|
-
|
|
5
|
-
const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<"input">>(
|
|
6
|
-
({ className, type, ...props }, ref) => {
|
|
7
|
-
return (
|
|
8
|
-
<input
|
|
9
|
-
type={type}
|
|
10
|
-
className={cn(
|
|
11
|
-
"dy-flex dy-h-12 dy-w-full dy-rounded-xl dy-border dy-border-border/40 dy-bg-white/50 dy-px-4 dy-py-2 dy-text-base dy-transition-all",
|
|
12
|
-
"placeholder:dy-text-muted-foreground/60 focus-visible:dy-outline-none focus-visible:dy-border-primary/30 focus-visible:dy-bg-white focus-visible:dy-shadow-md",
|
|
13
|
-
"disabled:dy-cursor-not-allowed disabled:dy-opacity-50 md:dy-text-sm dy-shadow-sm",
|
|
14
|
-
className
|
|
15
|
-
)}
|
|
16
|
-
ref={ref}
|
|
17
|
-
{...props}
|
|
18
|
-
/>
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
)
|
|
22
|
-
Input.displayName = "Input"
|
|
23
|
-
|
|
24
|
-
export { Input }
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import * as LabelPrimitive from "@radix-ui/react-label"
|
|
3
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
4
|
-
|
|
5
|
-
import { cn } from "../../lib/utils"
|
|
6
|
-
|
|
7
|
-
const labelVariants = cva(
|
|
8
|
-
"dy-text-sm dy-font-medium dy-leading-none dy-peer-disabled:dy-cursor-not-allowed dy-peer-disabled:dy-opacity-70"
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
const Label = React.forwardRef<
|
|
12
|
-
React.ElementRef<typeof LabelPrimitive.Root>,
|
|
13
|
-
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
|
|
14
|
-
VariantProps<typeof labelVariants>
|
|
15
|
-
>(({ className, ...props }, ref) => (
|
|
16
|
-
<LabelPrimitive.Root
|
|
17
|
-
ref={ref}
|
|
18
|
-
className={cn(labelVariants(), className)}
|
|
19
|
-
{...props}
|
|
20
|
-
/>
|
|
21
|
-
))
|
|
22
|
-
Label.displayName = LabelPrimitive.Root.displayName
|
|
23
|
-
|
|
24
|
-
export { Label }
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import type { LucideIcon } from "lucide-react"
|
|
3
|
-
|
|
4
|
-
interface PageHeaderProps {
|
|
5
|
-
title: string
|
|
6
|
-
description?: string
|
|
7
|
-
icon?: LucideIcon
|
|
8
|
-
children?: React.ReactNode
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function PageHeader({ title, description, icon: Icon, children }: PageHeaderProps) {
|
|
12
|
-
return (
|
|
13
|
-
<div className="dy-flex dy-items-end dy-justify-between dy-mb-8">
|
|
14
|
-
<div>
|
|
15
|
-
<div className="dy-flex dy-items-center dy-gap-3 dy-mb-1">
|
|
16
|
-
{Icon && <Icon className="dy-h-4 dy-w-4 dy-text-primary/60" />}
|
|
17
|
-
<h1 className="dy-text-2xl dy-font-bold dy-tracking-tight dy-text-foreground">{title}</h1>
|
|
18
|
-
</div>
|
|
19
|
-
{description && (
|
|
20
|
-
<p className="dy-text-[11px] dy-text-muted-foreground/60 dy-font-medium">
|
|
21
|
-
{description}
|
|
22
|
-
</p>
|
|
23
|
-
)}
|
|
24
|
-
</div>
|
|
25
|
-
<div className="dy-flex dy-items-center dy-gap-3">
|
|
26
|
-
{children}
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
)
|
|
30
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { ChevronLeft, ChevronRight } from "lucide-react"
|
|
2
|
-
import { Button } from "./button"
|
|
3
|
-
|
|
4
|
-
interface PaginationProps {
|
|
5
|
-
page: number
|
|
6
|
-
totalPages: number
|
|
7
|
-
total?: number
|
|
8
|
-
hasPrevPage: boolean
|
|
9
|
-
hasNextPage: boolean
|
|
10
|
-
onPageChange: (page: number) => void
|
|
11
|
-
className?: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export function Pagination({
|
|
15
|
-
page,
|
|
16
|
-
totalPages,
|
|
17
|
-
total,
|
|
18
|
-
hasPrevPage,
|
|
19
|
-
hasNextPage,
|
|
20
|
-
onPageChange,
|
|
21
|
-
className
|
|
22
|
-
}: PaginationProps) {
|
|
23
|
-
if (totalPages <= 1) return null
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<div className={`flex items-center justify-between px-4 py-4 border-t border-border/40 ${className}`}>
|
|
27
|
-
<p className="dy-text-xs dy-text-muted-foreground">
|
|
28
|
-
Showing page <strong>{page}</strong> of <strong>{totalPages}</strong>
|
|
29
|
-
{total != null && (
|
|
30
|
-
<> — {total} total entries</>
|
|
31
|
-
)}
|
|
32
|
-
</p>
|
|
33
|
-
<div className="dy-flex dy-items-center dy-gap-2">
|
|
34
|
-
<Button
|
|
35
|
-
variant="outline"
|
|
36
|
-
size="sm"
|
|
37
|
-
className="dy-h-8 dy-w-8 dy-p-0"
|
|
38
|
-
disabled={!hasPrevPage}
|
|
39
|
-
onClick={() => onPageChange(Math.max(1, page - 1))}
|
|
40
|
-
title="Previous page"
|
|
41
|
-
>
|
|
42
|
-
<ChevronLeft className="dy-h-4 dy-w-4" />
|
|
43
|
-
</Button>
|
|
44
|
-
<Button
|
|
45
|
-
variant="outline"
|
|
46
|
-
size="sm"
|
|
47
|
-
className="dy-h-8 dy-w-8 dy-p-0"
|
|
48
|
-
disabled={!hasNextPage}
|
|
49
|
-
onClick={() => onPageChange(page + 1)}
|
|
50
|
-
title="Next page"
|
|
51
|
-
>
|
|
52
|
-
<ChevronRight className="dy-h-4 dy-w-4" />
|
|
53
|
-
</Button>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
)
|
|
57
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import * as PopoverPrimitive from "@radix-ui/react-popover"
|
|
3
|
-
|
|
4
|
-
import { cn } from "../../lib/utils"
|
|
5
|
-
|
|
6
|
-
const Popover = PopoverPrimitive.Root
|
|
7
|
-
|
|
8
|
-
const PopoverTrigger = PopoverPrimitive.Trigger
|
|
9
|
-
|
|
10
|
-
const PopoverContent = React.forwardRef<
|
|
11
|
-
React.ElementRef<typeof PopoverPrimitive.Content>,
|
|
12
|
-
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
|
|
13
|
-
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
|
|
14
|
-
<PopoverPrimitive.Portal>
|
|
15
|
-
<PopoverPrimitive.Content
|
|
16
|
-
ref={ref}
|
|
17
|
-
align={align}
|
|
18
|
-
sideOffset={sideOffset}
|
|
19
|
-
className={cn(
|
|
20
|
-
"dy-z-[100] dy-w-72 dy-rounded-md dy-border dy-bg-white dy-p-4 dy-text-popover-foreground dy-shadow-md dy-outline-none data-[state=open]:dy-animate-in data-[state=closed]:dy-animate-out data-[state=closed]:dy-fade-out-0 data-[state=open]:dy-fade-in-0 data-[state=closed]:dy-zoom-out-95 data-[state=open]:dy-zoom-in-95 data-[side=bottom]:dy-slide-in-from-top-2 data-[side=left]:dy-slide-in-from-right-2 data-[side=right]:dy-slide-in-from-left-2 data-[side=top]:dy-slide-in-from-bottom-2 dy-origin-[--radix-popover-content-transform-origin]",
|
|
21
|
-
className
|
|
22
|
-
)}
|
|
23
|
-
{...props}
|
|
24
|
-
/>
|
|
25
|
-
</PopoverPrimitive.Portal>
|
|
26
|
-
))
|
|
27
|
-
PopoverContent.displayName = PopoverPrimitive.Content.displayName
|
|
28
|
-
|
|
29
|
-
export { Popover, PopoverTrigger, PopoverContent }
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import * as ProgressPrimitive from "@radix-ui/react-progress"
|
|
3
|
-
|
|
4
|
-
import { cn } from "../../lib/utils"
|
|
5
|
-
|
|
6
|
-
const Progress = React.forwardRef<
|
|
7
|
-
React.ElementRef<typeof ProgressPrimitive.Root>,
|
|
8
|
-
React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>
|
|
9
|
-
>(({ className, value, ...props }, ref) => (
|
|
10
|
-
<ProgressPrimitive.Root
|
|
11
|
-
ref={ref}
|
|
12
|
-
className={cn(
|
|
13
|
-
"dy-relative dy-h-4 dy-w-full dy-overflow-hidden dy-rounded-full dy-bg-secondary",
|
|
14
|
-
className
|
|
15
|
-
)}
|
|
16
|
-
{...props}
|
|
17
|
-
>
|
|
18
|
-
<ProgressPrimitive.Indicator
|
|
19
|
-
className="dy-h-full dy-w-full dy-flex-1 dy-bg-primary dy-transition-all"
|
|
20
|
-
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
|
21
|
-
/>
|
|
22
|
-
</ProgressPrimitive.Root>
|
|
23
|
-
))
|
|
24
|
-
Progress.displayName = ProgressPrimitive.Root.displayName
|
|
25
|
-
|
|
26
|
-
export { Progress }
|