create-next-imagicma 0.1.11 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/README.md +0 -2
  2. package/package.json +1 -1
  3. package/template-hono/AGENTS.md +53 -95
  4. package/template-hono/README.md +3 -31
  5. package/template-hono/client/public/imagicma-picker-bridge.js +6 -2
  6. package/template-hono/client/public/imagicma-preview-feedback.js +1 -0
  7. package/template-hono/client/src/lib/imagicma-preview-bridge.ts +1 -1
  8. package/template-hono/client/src/lib/imagicma-preview-picker.ts +130 -28
  9. package/template-hono/vite.config.ts +1 -1
  10. package/template/.env.example +0 -10
  11. package/template/AGENTS.md +0 -225
  12. package/template/README.md +0 -34
  13. package/template/app/_components/DevPreviewShield.tsx +0 -638
  14. package/template/app/api/greeting/route.ts +0 -27
  15. package/template/app/error.tsx +0 -93
  16. package/template/app/favicon.ico +0 -0
  17. package/template/app/globals.css +0 -767
  18. package/template/app/hello/_components/HelloClient.tsx +0 -94
  19. package/template/app/hello/page.tsx +0 -23
  20. package/template/app/layout.tsx +0 -32
  21. package/template/app/page.tsx +0 -27
  22. package/template/app/providers.tsx +0 -25
  23. package/template/components/ui/accordion.tsx +0 -58
  24. package/template/components/ui/alert-dialog.tsx +0 -141
  25. package/template/components/ui/alert.tsx +0 -61
  26. package/template/components/ui/aspect-ratio.tsx +0 -7
  27. package/template/components/ui/avatar.tsx +0 -51
  28. package/template/components/ui/badge.tsx +0 -40
  29. package/template/components/ui/breadcrumb.tsx +0 -117
  30. package/template/components/ui/button.tsx +0 -64
  31. package/template/components/ui/calendar.tsx +0 -72
  32. package/template/components/ui/card.tsx +0 -87
  33. package/template/components/ui/carousel.tsx +0 -262
  34. package/template/components/ui/chart.tsx +0 -365
  35. package/template/components/ui/checkbox.tsx +0 -30
  36. package/template/components/ui/collapsible.tsx +0 -11
  37. package/template/components/ui/command.tsx +0 -153
  38. package/template/components/ui/context-menu.tsx +0 -200
  39. package/template/components/ui/dialog.tsx +0 -122
  40. package/template/components/ui/drawer.tsx +0 -118
  41. package/template/components/ui/dropdown-menu.tsx +0 -200
  42. package/template/components/ui/form.tsx +0 -178
  43. package/template/components/ui/hover-card.tsx +0 -29
  44. package/template/components/ui/input-otp.tsx +0 -71
  45. package/template/components/ui/input.tsx +0 -25
  46. package/template/components/ui/label.tsx +0 -26
  47. package/template/components/ui/menubar.tsx +0 -256
  48. package/template/components/ui/navigation-menu.tsx +0 -130
  49. package/template/components/ui/pagination.tsx +0 -119
  50. package/template/components/ui/popover.tsx +0 -31
  51. package/template/components/ui/progress.tsx +0 -28
  52. package/template/components/ui/radio-group.tsx +0 -44
  53. package/template/components/ui/resizable.tsx +0 -45
  54. package/template/components/ui/scroll-area.tsx +0 -48
  55. package/template/components/ui/select.tsx +0 -160
  56. package/template/components/ui/separator.tsx +0 -31
  57. package/template/components/ui/sheet.tsx +0 -140
  58. package/template/components/ui/sidebar.tsx +0 -732
  59. package/template/components/ui/skeleton.tsx +0 -17
  60. package/template/components/ui/slider.tsx +0 -28
  61. package/template/components/ui/switch.tsx +0 -29
  62. package/template/components/ui/table.tsx +0 -119
  63. package/template/components/ui/tabs.tsx +0 -55
  64. package/template/components/ui/textarea.tsx +0 -24
  65. package/template/components/ui/toast.tsx +0 -129
  66. package/template/components/ui/toaster.tsx +0 -35
  67. package/template/components/ui/toggle-group.tsx +0 -61
  68. package/template/components/ui/toggle.tsx +0 -45
  69. package/template/components/ui/tooltip.tsx +0 -30
  70. package/template/drizzle.config.ts +0 -50
  71. package/template/eslint.config.mjs +0 -18
  72. package/template/gitignore +0 -46
  73. package/template/hooks/use-greeting.ts +0 -15
  74. package/template/hooks/use-mobile.ts +0 -21
  75. package/template/hooks/use-toast.ts +0 -194
  76. package/template/lib/queryClient.ts +0 -59
  77. package/template/lib/theme/default-theme.ts +0 -11
  78. package/template/lib/utils.ts +0 -6
  79. package/template/next.config.ts +0 -8
  80. package/template/package.json +0 -76
  81. package/template/pnpm-lock.yaml +0 -6937
  82. package/template/postcss.config.mjs +0 -7
  83. package/template/process-compose.yaml +0 -13
  84. package/template/public/file.svg +0 -1
  85. package/template/public/globe.svg +0 -1
  86. package/template/public/imagicma-picker-bridge.js +0 -374
  87. package/template/public/next.svg +0 -1
  88. package/template/public/vercel.svg +0 -1
  89. package/template/public/window.svg +0 -1
  90. package/template/server/db.ts +0 -24
  91. package/template/server/storage.ts +0 -41
  92. package/template/shared/routes.ts +0 -13
  93. package/template/shared/schema.ts +0 -17
  94. package/template/tailwind.config.mjs +0 -96
  95. package/template/tsconfig.json +0 -35
  96. package/template/types/pg.d.ts +0 -19
@@ -1,130 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react"
4
- import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu"
5
- import { cva } from "class-variance-authority"
6
- import { ChevronDown } from "lucide-react"
7
-
8
- import { cn } from "@/lib/utils"
9
-
10
- const NavigationMenu = React.forwardRef<
11
- React.ElementRef<typeof NavigationMenuPrimitive.Root>,
12
- React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>
13
- >(({ className, children, ...props }, ref) => (
14
- <NavigationMenuPrimitive.Root
15
- ref={ref}
16
- className={cn(
17
- "relative z-10 flex max-w-max flex-1 items-center justify-center",
18
- className
19
- )}
20
- {...props}
21
- >
22
- {children}
23
- <NavigationMenuViewport />
24
- </NavigationMenuPrimitive.Root>
25
- ))
26
- NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName
27
-
28
- const NavigationMenuList = React.forwardRef<
29
- React.ElementRef<typeof NavigationMenuPrimitive.List>,
30
- React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>
31
- >(({ className, ...props }, ref) => (
32
- <NavigationMenuPrimitive.List
33
- ref={ref}
34
- className={cn(
35
- "group flex flex-1 list-none items-center justify-center space-x-1",
36
- className
37
- )}
38
- {...props}
39
- />
40
- ))
41
- NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName
42
-
43
- const NavigationMenuItem = NavigationMenuPrimitive.Item
44
-
45
- const navigationMenuTriggerStyle = cva(
46
- "group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent"
47
- )
48
-
49
- const NavigationMenuTrigger = React.forwardRef<
50
- React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,
51
- React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>
52
- >(({ className, children, ...props }, ref) => (
53
- <NavigationMenuPrimitive.Trigger
54
- ref={ref}
55
- className={cn(navigationMenuTriggerStyle(), "group", className)}
56
- {...props}
57
- >
58
- {children}{" "}
59
- <ChevronDown
60
- className="relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180"
61
- aria-hidden="true"
62
- />
63
- </NavigationMenuPrimitive.Trigger>
64
- ))
65
- NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName
66
-
67
- const NavigationMenuContent = React.forwardRef<
68
- React.ElementRef<typeof NavigationMenuPrimitive.Content>,
69
- React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>
70
- >(({ className, ...props }, ref) => (
71
- <NavigationMenuPrimitive.Content
72
- ref={ref}
73
- className={cn(
74
- "left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",
75
- className
76
- )}
77
- {...props}
78
- />
79
- ))
80
- NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName
81
-
82
- const NavigationMenuLink = NavigationMenuPrimitive.Link
83
-
84
- const NavigationMenuViewport = React.forwardRef<
85
- React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,
86
- React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>
87
- >(({ className, ...props }, ref) => (
88
- <div className={cn("absolute left-0 top-full flex justify-center")}>
89
- <NavigationMenuPrimitive.Viewport
90
- className={cn(
91
- "origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
92
- className
93
- )}
94
- ref={ref}
95
- {...props}
96
- />
97
- </div>
98
- ))
99
- NavigationMenuViewport.displayName =
100
- NavigationMenuPrimitive.Viewport.displayName
101
-
102
- const NavigationMenuIndicator = React.forwardRef<
103
- React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,
104
- React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>
105
- >(({ className, ...props }, ref) => (
106
- <NavigationMenuPrimitive.Indicator
107
- ref={ref}
108
- className={cn(
109
- "top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",
110
- className
111
- )}
112
- {...props}
113
- >
114
- <div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" />
115
- </NavigationMenuPrimitive.Indicator>
116
- ))
117
- NavigationMenuIndicator.displayName =
118
- NavigationMenuPrimitive.Indicator.displayName
119
-
120
- export {
121
- navigationMenuTriggerStyle,
122
- NavigationMenu,
123
- NavigationMenuList,
124
- NavigationMenuItem,
125
- NavigationMenuContent,
126
- NavigationMenuTrigger,
127
- NavigationMenuLink,
128
- NavigationMenuIndicator,
129
- NavigationMenuViewport,
130
- }
@@ -1,119 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react"
4
- import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react"
5
-
6
- import { cn } from "@/lib/utils"
7
- import { ButtonProps, buttonVariants } from "@/components/ui/button"
8
-
9
- const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (
10
- <nav
11
- role="navigation"
12
- aria-label="pagination"
13
- className={cn("mx-auto flex w-full justify-center", className)}
14
- {...props}
15
- />
16
- )
17
- Pagination.displayName = "Pagination"
18
-
19
- const PaginationContent = React.forwardRef<
20
- HTMLUListElement,
21
- React.ComponentProps<"ul">
22
- >(({ className, ...props }, ref) => (
23
- <ul
24
- ref={ref}
25
- className={cn("flex flex-row items-center gap-1", className)}
26
- {...props}
27
- />
28
- ))
29
- PaginationContent.displayName = "PaginationContent"
30
-
31
- const PaginationItem = React.forwardRef<
32
- HTMLLIElement,
33
- React.ComponentProps<"li">
34
- >(({ className, ...props }, ref) => (
35
- <li ref={ref} className={cn("", className)} {...props} />
36
- ))
37
- PaginationItem.displayName = "PaginationItem"
38
-
39
- type PaginationLinkProps = {
40
- isActive?: boolean
41
- } & Pick<ButtonProps, "size"> &
42
- React.ComponentProps<"a">
43
-
44
- const PaginationLink = ({
45
- className,
46
- isActive,
47
- size = "icon",
48
- ...props
49
- }: PaginationLinkProps) => (
50
- <a
51
- aria-current={isActive ? "page" : undefined}
52
- className={cn(
53
- buttonVariants({
54
- variant: isActive ? "outline" : "ghost",
55
- size,
56
- }),
57
- className
58
- )}
59
- {...props}
60
- />
61
- )
62
- PaginationLink.displayName = "PaginationLink"
63
-
64
- const PaginationPrevious = ({
65
- className,
66
- ...props
67
- }: React.ComponentProps<typeof PaginationLink>) => (
68
- <PaginationLink
69
- aria-label="Go to previous page"
70
- size="default"
71
- className={cn("gap-1 pl-2.5", className)}
72
- {...props}
73
- >
74
- <ChevronLeft className="h-4 w-4" />
75
- <span>Previous</span>
76
- </PaginationLink>
77
- )
78
- PaginationPrevious.displayName = "PaginationPrevious"
79
-
80
- const PaginationNext = ({
81
- className,
82
- ...props
83
- }: React.ComponentProps<typeof PaginationLink>) => (
84
- <PaginationLink
85
- aria-label="Go to next page"
86
- size="default"
87
- className={cn("gap-1 pr-2.5", className)}
88
- {...props}
89
- >
90
- <span>Next</span>
91
- <ChevronRight className="h-4 w-4" />
92
- </PaginationLink>
93
- )
94
- PaginationNext.displayName = "PaginationNext"
95
-
96
- const PaginationEllipsis = ({
97
- className,
98
- ...props
99
- }: React.ComponentProps<"span">) => (
100
- <span
101
- aria-hidden
102
- className={cn("flex h-9 w-9 items-center justify-center", className)}
103
- {...props}
104
- >
105
- <MoreHorizontal className="h-4 w-4" />
106
- <span className="sr-only">More pages</span>
107
- </span>
108
- )
109
- PaginationEllipsis.displayName = "PaginationEllipsis"
110
-
111
- export {
112
- Pagination,
113
- PaginationContent,
114
- PaginationEllipsis,
115
- PaginationItem,
116
- PaginationLink,
117
- PaginationNext,
118
- PaginationPrevious,
119
- }
@@ -1,31 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react"
4
- import * as PopoverPrimitive from "@radix-ui/react-popover"
5
-
6
- import { cn } from "@/lib/utils"
7
-
8
- const Popover = PopoverPrimitive.Root
9
-
10
- const PopoverTrigger = PopoverPrimitive.Trigger
11
-
12
- const PopoverContent = React.forwardRef<
13
- React.ElementRef<typeof PopoverPrimitive.Content>,
14
- React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
15
- >(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
16
- <PopoverPrimitive.Portal>
17
- <PopoverPrimitive.Content
18
- ref={ref}
19
- align={align}
20
- sideOffset={sideOffset}
21
- className={cn(
22
- "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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-popover-content-transform-origin]",
23
- className
24
- )}
25
- {...props}
26
- />
27
- </PopoverPrimitive.Portal>
28
- ))
29
- PopoverContent.displayName = PopoverPrimitive.Content.displayName
30
-
31
- export { Popover, PopoverTrigger, PopoverContent }
@@ -1,28 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as ProgressPrimitive from "@radix-ui/react-progress"
5
-
6
- import { cn } from "@/lib/utils"
7
-
8
- const Progress = React.forwardRef<
9
- React.ElementRef<typeof ProgressPrimitive.Root>,
10
- React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>
11
- >(({ className, value, ...props }, ref) => (
12
- <ProgressPrimitive.Root
13
- ref={ref}
14
- className={cn(
15
- "relative h-4 w-full overflow-hidden rounded-full bg-secondary",
16
- className
17
- )}
18
- {...props}
19
- >
20
- <ProgressPrimitive.Indicator
21
- className="h-full w-full flex-1 bg-primary transition-all"
22
- style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
23
- />
24
- </ProgressPrimitive.Root>
25
- ))
26
- Progress.displayName = ProgressPrimitive.Root.displayName
27
-
28
- export { Progress }
@@ -1,44 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react"
4
- import * as RadioGroupPrimitive from "@radix-ui/react-radio-group"
5
- import { Circle } from "lucide-react"
6
-
7
- import { cn } from "@/lib/utils"
8
-
9
- const RadioGroup = React.forwardRef<
10
- React.ElementRef<typeof RadioGroupPrimitive.Root>,
11
- React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>
12
- >(({ className, ...props }, ref) => {
13
- return (
14
- <RadioGroupPrimitive.Root
15
- className={cn("grid gap-2", className)}
16
- {...props}
17
- ref={ref}
18
- />
19
- )
20
- })
21
- RadioGroup.displayName = RadioGroupPrimitive.Root.displayName
22
-
23
- const RadioGroupItem = React.forwardRef<
24
- React.ElementRef<typeof RadioGroupPrimitive.Item>,
25
- React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>
26
- >(({ className, ...props }, ref) => {
27
- return (
28
- <RadioGroupPrimitive.Item
29
- ref={ref}
30
- className={cn(
31
- "aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
32
- className
33
- )}
34
- {...props}
35
- >
36
- <RadioGroupPrimitive.Indicator className="flex items-center justify-center">
37
- <Circle className="h-2.5 w-2.5 fill-current text-current" />
38
- </RadioGroupPrimitive.Indicator>
39
- </RadioGroupPrimitive.Item>
40
- )
41
- })
42
- RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName
43
-
44
- export { RadioGroup, RadioGroupItem }
@@ -1,45 +0,0 @@
1
- "use client"
2
-
3
- import { GripVertical } from "lucide-react"
4
- import * as ResizablePrimitive from "react-resizable-panels"
5
-
6
- import { cn } from "@/lib/utils"
7
-
8
- const ResizablePanelGroup = ({
9
- className,
10
- ...props
11
- }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => (
12
- <ResizablePrimitive.PanelGroup
13
- className={cn(
14
- "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
15
- className
16
- )}
17
- {...props}
18
- />
19
- )
20
-
21
- const ResizablePanel = ResizablePrimitive.Panel
22
-
23
- const ResizableHandle = ({
24
- withHandle,
25
- className,
26
- ...props
27
- }: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
28
- withHandle?: boolean
29
- }) => (
30
- <ResizablePrimitive.PanelResizeHandle
31
- className={cn(
32
- "relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",
33
- className
34
- )}
35
- {...props}
36
- >
37
- {withHandle && (
38
- <div className="z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border">
39
- <GripVertical className="h-2.5 w-2.5" />
40
- </div>
41
- )}
42
- </ResizablePrimitive.PanelResizeHandle>
43
- )
44
-
45
- export { ResizablePanelGroup, ResizablePanel, ResizableHandle }
@@ -1,48 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react"
4
- import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"
5
-
6
- import { cn } from "@/lib/utils"
7
-
8
- const ScrollArea = React.forwardRef<
9
- React.ElementRef<typeof ScrollAreaPrimitive.Root>,
10
- React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>
11
- >(({ className, children, ...props }, ref) => (
12
- <ScrollAreaPrimitive.Root
13
- ref={ref}
14
- className={cn("relative overflow-hidden", className)}
15
- {...props}
16
- >
17
- <ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]">
18
- {children}
19
- </ScrollAreaPrimitive.Viewport>
20
- <ScrollBar />
21
- <ScrollAreaPrimitive.Corner />
22
- </ScrollAreaPrimitive.Root>
23
- ))
24
- ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName
25
-
26
- const ScrollBar = React.forwardRef<
27
- React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,
28
- React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>
29
- >(({ className, orientation = "vertical", ...props }, ref) => (
30
- <ScrollAreaPrimitive.ScrollAreaScrollbar
31
- ref={ref}
32
- orientation={orientation}
33
- className={cn(
34
- "flex touch-none select-none transition-colors",
35
- orientation === "vertical" &&
36
- "h-full w-2.5 border-l border-l-transparent p-[1px]",
37
- orientation === "horizontal" &&
38
- "h-2.5 flex-col border-t border-t-transparent p-[1px]",
39
- className
40
- )}
41
- {...props}
42
- >
43
- <ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-border" />
44
- </ScrollAreaPrimitive.ScrollAreaScrollbar>
45
- ))
46
- ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName
47
-
48
- export { ScrollArea, ScrollBar }
@@ -1,160 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as SelectPrimitive from "@radix-ui/react-select"
5
- import { Check, ChevronDown, ChevronUp } from "lucide-react"
6
-
7
- import { cn } from "@/lib/utils"
8
-
9
- const Select = SelectPrimitive.Root
10
-
11
- const SelectGroup = SelectPrimitive.Group
12
-
13
- const SelectValue = SelectPrimitive.Value
14
-
15
- const SelectTrigger = React.forwardRef<
16
- React.ElementRef<typeof SelectPrimitive.Trigger>,
17
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
18
- >(({ className, children, ...props }, ref) => (
19
- <SelectPrimitive.Trigger
20
- ref={ref}
21
- className={cn(
22
- "flex h-9 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
23
- className
24
- )}
25
- {...props}
26
- >
27
- {children}
28
- <SelectPrimitive.Icon asChild>
29
- <ChevronDown className="h-4 w-4 opacity-50" />
30
- </SelectPrimitive.Icon>
31
- </SelectPrimitive.Trigger>
32
- ))
33
- SelectTrigger.displayName = SelectPrimitive.Trigger.displayName
34
-
35
- const SelectScrollUpButton = React.forwardRef<
36
- React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
37
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
38
- >(({ className, ...props }, ref) => (
39
- <SelectPrimitive.ScrollUpButton
40
- ref={ref}
41
- className={cn(
42
- "flex cursor-default items-center justify-center py-1",
43
- className
44
- )}
45
- {...props}
46
- >
47
- <ChevronUp className="h-4 w-4" />
48
- </SelectPrimitive.ScrollUpButton>
49
- ))
50
- SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName
51
-
52
- const SelectScrollDownButton = React.forwardRef<
53
- React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
54
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
55
- >(({ className, ...props }, ref) => (
56
- <SelectPrimitive.ScrollDownButton
57
- ref={ref}
58
- className={cn(
59
- "flex cursor-default items-center justify-center py-1",
60
- className
61
- )}
62
- {...props}
63
- >
64
- <ChevronDown className="h-4 w-4" />
65
- </SelectPrimitive.ScrollDownButton>
66
- ))
67
- SelectScrollDownButton.displayName =
68
- SelectPrimitive.ScrollDownButton.displayName
69
-
70
- const SelectContent = React.forwardRef<
71
- React.ElementRef<typeof SelectPrimitive.Content>,
72
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
73
- >(({ className, children, position = "popper", ...props }, ref) => (
74
- <SelectPrimitive.Portal>
75
- <SelectPrimitive.Content
76
- ref={ref}
77
- className={cn(
78
- "relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-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 origin-[--radix-select-content-transform-origin]",
79
- position === "popper" &&
80
- "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
81
- className
82
- )}
83
- position={position}
84
- {...props}
85
- >
86
- <SelectScrollUpButton />
87
- <SelectPrimitive.Viewport
88
- className={cn(
89
- "p-1",
90
- position === "popper" &&
91
- "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
92
- )}
93
- >
94
- {children}
95
- </SelectPrimitive.Viewport>
96
- <SelectScrollDownButton />
97
- </SelectPrimitive.Content>
98
- </SelectPrimitive.Portal>
99
- ))
100
- SelectContent.displayName = SelectPrimitive.Content.displayName
101
-
102
- const SelectLabel = React.forwardRef<
103
- React.ElementRef<typeof SelectPrimitive.Label>,
104
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
105
- >(({ className, ...props }, ref) => (
106
- <SelectPrimitive.Label
107
- ref={ref}
108
- className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
109
- {...props}
110
- />
111
- ))
112
- SelectLabel.displayName = SelectPrimitive.Label.displayName
113
-
114
- const SelectItem = React.forwardRef<
115
- React.ElementRef<typeof SelectPrimitive.Item>,
116
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
117
- >(({ className, children, ...props }, ref) => (
118
- <SelectPrimitive.Item
119
- ref={ref}
120
- className={cn(
121
- "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
122
- className
123
- )}
124
- {...props}
125
- >
126
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
127
- <SelectPrimitive.ItemIndicator>
128
- <Check className="h-4 w-4" />
129
- </SelectPrimitive.ItemIndicator>
130
- </span>
131
-
132
- <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
133
- </SelectPrimitive.Item>
134
- ))
135
- SelectItem.displayName = SelectPrimitive.Item.displayName
136
-
137
- const SelectSeparator = React.forwardRef<
138
- React.ElementRef<typeof SelectPrimitive.Separator>,
139
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
140
- >(({ className, ...props }, ref) => (
141
- <SelectPrimitive.Separator
142
- ref={ref}
143
- className={cn("-mx-1 my-1 h-px bg-muted", className)}
144
- {...props}
145
- />
146
- ))
147
- SelectSeparator.displayName = SelectPrimitive.Separator.displayName
148
-
149
- export {
150
- Select,
151
- SelectGroup,
152
- SelectValue,
153
- SelectTrigger,
154
- SelectContent,
155
- SelectLabel,
156
- SelectItem,
157
- SelectSeparator,
158
- SelectScrollUpButton,
159
- SelectScrollDownButton,
160
- }
@@ -1,31 +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
- >(
12
- (
13
- { className, orientation = "horizontal", decorative = true, ...props },
14
- ref
15
- ) => (
16
- <SeparatorPrimitive.Root
17
- ref={ref}
18
- decorative={decorative}
19
- orientation={orientation}
20
- className={cn(
21
- "shrink-0 bg-border",
22
- orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
23
- className
24
- )}
25
- {...props}
26
- />
27
- )
28
- )
29
- Separator.displayName = SeparatorPrimitive.Root.displayName
30
-
31
- export { Separator }