pxengine 0.1.12 → 0.1.14

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 (186) hide show
  1. package/dist/index.cjs +227 -291
  2. package/dist/index.d.cts +15 -11
  3. package/dist/index.d.ts +15 -11
  4. package/dist/index.js +225 -287
  5. package/dist/registry.json +20 -22
  6. package/package.json +2 -4
  7. package/config/tailwind-preset.js +0 -106
  8. package/src/atoms/AccordionAtom.tsx +0 -44
  9. package/src/atoms/AlertAtom.tsx +0 -48
  10. package/src/atoms/AlertDialogAtom.tsx +0 -66
  11. package/src/atoms/AspectRatioAtom.tsx +0 -27
  12. package/src/atoms/AvatarAtom.tsx +0 -21
  13. package/src/atoms/BadgeAtom.tsx +0 -35
  14. package/src/atoms/BreadcrumbAtom.tsx +0 -36
  15. package/src/atoms/ButtonAtom.tsx +0 -65
  16. package/src/atoms/CalendarAtom.tsx +0 -24
  17. package/src/atoms/CardAtom.tsx +0 -66
  18. package/src/atoms/CarouselAtom.tsx +0 -40
  19. package/src/atoms/ChartAtom.tsx +0 -192
  20. package/src/atoms/CheckboxAtom.tsx +0 -33
  21. package/src/atoms/CollapsibleAtom.tsx +0 -44
  22. package/src/atoms/CommandAtom.tsx +0 -46
  23. package/src/atoms/ContextMenuAtom.tsx +0 -49
  24. package/src/atoms/DialogAtom.tsx +0 -68
  25. package/src/atoms/DrawerAtom.tsx +0 -49
  26. package/src/atoms/DropdownMenuAtom.tsx +0 -49
  27. package/src/atoms/FormInputAtom.tsx +0 -101
  28. package/src/atoms/FormSelectAtom.tsx +0 -110
  29. package/src/atoms/FormTextareaAtom.tsx +0 -93
  30. package/src/atoms/InputAtom.tsx +0 -216
  31. package/src/atoms/InputOTPAtom.tsx +0 -49
  32. package/src/atoms/KbdAtom.tsx +0 -25
  33. package/src/atoms/LabelAtom.tsx +0 -23
  34. package/src/atoms/LayoutAtom.tsx +0 -45
  35. package/src/atoms/PaginationAtom.tsx +0 -49
  36. package/src/atoms/PopoverAtom.tsx +0 -40
  37. package/src/atoms/ProgressAtom.tsx +0 -15
  38. package/src/atoms/RadioGroupAtom.tsx +0 -31
  39. package/src/atoms/RatingAtom.tsx +0 -37
  40. package/src/atoms/ResizableAtom.tsx +0 -51
  41. package/src/atoms/ScrollAreaAtom.tsx +0 -31
  42. package/src/atoms/SeparatorAtom.tsx +0 -16
  43. package/src/atoms/SheetAtom.tsx +0 -72
  44. package/src/atoms/SkeletonAtom.tsx +0 -22
  45. package/src/atoms/SliderAtom.tsx +0 -32
  46. package/src/atoms/SpinnerAtom.tsx +0 -26
  47. package/src/atoms/SwitchAtom.tsx +0 -32
  48. package/src/atoms/TableAtom.tsx +0 -60
  49. package/src/atoms/TabsAtom.tsx +0 -40
  50. package/src/atoms/TextAtom.tsx +0 -36
  51. package/src/atoms/TextareaAtom.tsx +0 -42
  52. package/src/atoms/TimelineAtom.tsx +0 -77
  53. package/src/atoms/ToggleAtom.tsx +0 -36
  54. package/src/atoms/TooltipAtom.tsx +0 -39
  55. package/src/atoms/VideoAtom.tsx +0 -34
  56. package/src/atoms/index.ts +0 -49
  57. package/src/components/index.ts +0 -178
  58. package/src/components/ui/accordion.tsx +0 -56
  59. package/src/components/ui/alert-dialog.tsx +0 -139
  60. package/src/components/ui/alert.tsx +0 -59
  61. package/src/components/ui/aspect-ratio.tsx +0 -5
  62. package/src/components/ui/avatar.tsx +0 -50
  63. package/src/components/ui/badge.tsx +0 -36
  64. package/src/components/ui/breadcrumb.tsx +0 -115
  65. package/src/components/ui/button-group.tsx +0 -83
  66. package/src/components/ui/button.tsx +0 -56
  67. package/src/components/ui/calendar.tsx +0 -213
  68. package/src/components/ui/card.tsx +0 -79
  69. package/src/components/ui/carousel.tsx +0 -260
  70. package/src/components/ui/chart.tsx +0 -367
  71. package/src/components/ui/checkbox.tsx +0 -28
  72. package/src/components/ui/collapsible.tsx +0 -11
  73. package/src/components/ui/command.tsx +0 -153
  74. package/src/components/ui/context-menu.tsx +0 -198
  75. package/src/components/ui/dialog.tsx +0 -122
  76. package/src/components/ui/drawer.tsx +0 -116
  77. package/src/components/ui/dropdown-menu.tsx +0 -200
  78. package/src/components/ui/empty.tsx +0 -104
  79. package/src/components/ui/field.tsx +0 -244
  80. package/src/components/ui/form.tsx +0 -176
  81. package/src/components/ui/hover-card.tsx +0 -27
  82. package/src/components/ui/index.ts +0 -54
  83. package/src/components/ui/input-group.tsx +0 -168
  84. package/src/components/ui/input-otp.tsx +0 -69
  85. package/src/components/ui/input.tsx +0 -22
  86. package/src/components/ui/item.tsx +0 -193
  87. package/src/components/ui/kbd.tsx +0 -28
  88. package/src/components/ui/label.tsx +0 -26
  89. package/src/components/ui/menubar.tsx +0 -254
  90. package/src/components/ui/navigation-menu.tsx +0 -128
  91. package/src/components/ui/pagination.tsx +0 -117
  92. package/src/components/ui/popover.tsx +0 -29
  93. package/src/components/ui/progress.tsx +0 -28
  94. package/src/components/ui/radio-group.tsx +0 -42
  95. package/src/components/ui/resizable.tsx +0 -44
  96. package/src/components/ui/scroll-area.tsx +0 -46
  97. package/src/components/ui/select.tsx +0 -160
  98. package/src/components/ui/separator.tsx +0 -29
  99. package/src/components/ui/sheet.tsx +0 -140
  100. package/src/components/ui/sidebar.tsx +0 -771
  101. package/src/components/ui/skeleton.tsx +0 -15
  102. package/src/components/ui/slider.tsx +0 -26
  103. package/src/components/ui/sonner.tsx +0 -45
  104. package/src/components/ui/spinner.tsx +0 -16
  105. package/src/components/ui/switch.tsx +0 -27
  106. package/src/components/ui/table.tsx +0 -117
  107. package/src/components/ui/tabs.tsx +0 -53
  108. package/src/components/ui/textarea.tsx +0 -22
  109. package/src/components/ui/toggle-group.tsx +0 -61
  110. package/src/components/ui/toggle.tsx +0 -43
  111. package/src/components/ui/tooltip.tsx +0 -30
  112. package/src/hooks/use-mobile.tsx +0 -19
  113. package/src/index.ts +0 -24
  114. package/src/lib/countries.ts +0 -203
  115. package/src/lib/index.ts +0 -2
  116. package/src/lib/utils.ts +0 -15
  117. package/src/lib/validators/index.ts +0 -1
  118. package/src/lib/validators/theme.ts +0 -148
  119. package/src/molecules/creator-discovery/AudienceDemographicsCard/AudienceDemographicsCard.tsx +0 -44
  120. package/src/molecules/creator-discovery/AudienceDemographicsCard/index.ts +0 -1
  121. package/src/molecules/creator-discovery/AudienceMetricCard/AudienceMetricCard.tsx +0 -50
  122. package/src/molecules/creator-discovery/AudienceMetricCard/index.ts +0 -1
  123. package/src/molecules/creator-discovery/BrandAffinityGroup/BrandAffinityGroup.tsx +0 -36
  124. package/src/molecules/creator-discovery/BrandAffinityGroup/index.ts +0 -1
  125. package/src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.tsx +0 -123
  126. package/src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.types.ts +0 -13
  127. package/src/molecules/creator-discovery/CampaignSeedCard/index.ts +0 -2
  128. package/src/molecules/creator-discovery/ContentPreviewGallery/ContentPreviewGallery.tsx +0 -41
  129. package/src/molecules/creator-discovery/ContentPreviewGallery/index.ts +0 -1
  130. package/src/molecules/creator-discovery/CreatorActionHeader/CreatorActionHeader.tsx +0 -77
  131. package/src/molecules/creator-discovery/CreatorActionHeader/index.ts +0 -1
  132. package/src/molecules/creator-discovery/CreatorGridCard/CreatorGridCard.tsx +0 -104
  133. package/src/molecules/creator-discovery/CreatorGridCard/index.ts +0 -1
  134. package/src/molecules/creator-discovery/CreatorProfileSummary/CreatorProfileSummary.tsx +0 -65
  135. package/src/molecules/creator-discovery/CreatorProfileSummary/index.ts +0 -1
  136. package/src/molecules/creator-discovery/GrowthChartCard/GrowthChartCard.tsx +0 -58
  137. package/src/molecules/creator-discovery/GrowthChartCard/index.ts +0 -1
  138. package/src/molecules/creator-discovery/MCQCard/MCQCard.tsx +0 -165
  139. package/src/molecules/creator-discovery/MCQCard/MCQCard.types.ts +0 -71
  140. package/src/molecules/creator-discovery/MCQCard/index.ts +0 -2
  141. package/src/molecules/creator-discovery/PlatformIconGroup/PlatformIconGroup.tsx +0 -72
  142. package/src/molecules/creator-discovery/PlatformIconGroup/index.ts +0 -1
  143. package/src/molecules/creator-discovery/SearchSpecCard/CustomFieldRenderers.tsx +0 -334
  144. package/src/molecules/creator-discovery/SearchSpecCard/SearchSpecCard.tsx +0 -111
  145. package/src/molecules/creator-discovery/SearchSpecCard/SearchSpecCard.types.ts +0 -18
  146. package/src/molecules/creator-discovery/SearchSpecCard/index.ts +0 -3
  147. package/src/molecules/creator-discovery/TopPostsGrid/TopPostsGrid.tsx +0 -49
  148. package/src/molecules/creator-discovery/TopPostsGrid/index.ts +0 -1
  149. package/src/molecules/creator-discovery/index.ts +0 -13
  150. package/src/molecules/generic/ActionButton/ActionButton.tsx +0 -137
  151. package/src/molecules/generic/ActionButton/ActionButton.types.ts +0 -68
  152. package/src/molecules/generic/ActionButton/index.ts +0 -2
  153. package/src/molecules/generic/DataGrid/DataGrid.tsx +0 -102
  154. package/src/molecules/generic/DataGrid/index.ts +0 -1
  155. package/src/molecules/generic/EditableField/EditableField.tsx +0 -229
  156. package/src/molecules/generic/EditableField/EditableField.types.ts +0 -73
  157. package/src/molecules/generic/EditableField/index.ts +0 -2
  158. package/src/molecules/generic/EmptyState/EmptyState.tsx +0 -61
  159. package/src/molecules/generic/EmptyState/index.ts +0 -1
  160. package/src/molecules/generic/FileUpload/FileUpload.tsx +0 -62
  161. package/src/molecules/generic/FileUpload/index.ts +0 -1
  162. package/src/molecules/generic/FilterBar/FilterBar.tsx +0 -54
  163. package/src/molecules/generic/FilterBar/index.ts +0 -1
  164. package/src/molecules/generic/FormCard/FormCard.tsx +0 -136
  165. package/src/molecules/generic/FormCard/FormCard.types.ts +0 -93
  166. package/src/molecules/generic/FormCard/index.ts +0 -2
  167. package/src/molecules/generic/LoadingOverlay/LoadingOverlay.tsx +0 -39
  168. package/src/molecules/generic/LoadingOverlay/index.ts +0 -1
  169. package/src/molecules/generic/NotificationList/NotificationList.tsx +0 -80
  170. package/src/molecules/generic/NotificationList/index.ts +0 -1
  171. package/src/molecules/generic/StatsGrid/StatsGrid.tsx +0 -80
  172. package/src/molecules/generic/StatsGrid/index.ts +0 -1
  173. package/src/molecules/generic/StepWizard/StepWizard.tsx +0 -67
  174. package/src/molecules/generic/StepWizard/index.ts +0 -1
  175. package/src/molecules/generic/TagCloud/TagCloud.tsx +0 -32
  176. package/src/molecules/generic/TagCloud/index.ts +0 -1
  177. package/src/molecules/generic/index.ts +0 -12
  178. package/src/molecules/index.ts +0 -2
  179. package/src/render/PXEngineRenderer.tsx +0 -458
  180. package/src/render/index.ts +0 -1
  181. package/src/styles/globals.css +0 -146
  182. package/src/types/atoms.ts +0 -450
  183. package/src/types/common.ts +0 -116
  184. package/src/types/index.ts +0 -3
  185. package/src/types/molecules.ts +0 -279
  186. package/src/types/schema.ts +0 -12
@@ -1,117 +0,0 @@
1
- import * as React from "react"
2
- import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react"
3
-
4
- import { cn } from "@/lib/utils"
5
- import { ButtonProps, buttonVariants } from "@/components/ui/button"
6
-
7
- const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (
8
- <nav
9
- role="navigation"
10
- aria-label="pagination"
11
- className={cn("mx-auto flex w-full justify-center", className)}
12
- {...props}
13
- />
14
- )
15
- Pagination.displayName = "Pagination"
16
-
17
- const PaginationContent = React.forwardRef<
18
- HTMLUListElement,
19
- React.ComponentProps<"ul">
20
- >(({ className, ...props }, ref) => (
21
- <ul
22
- ref={ref}
23
- className={cn("flex flex-row items-center gap-1", className)}
24
- {...props}
25
- />
26
- ))
27
- PaginationContent.displayName = "PaginationContent"
28
-
29
- const PaginationItem = React.forwardRef<
30
- HTMLLIElement,
31
- React.ComponentProps<"li">
32
- >(({ className, ...props }, ref) => (
33
- <li ref={ref} className={cn("", className)} {...props} />
34
- ))
35
- PaginationItem.displayName = "PaginationItem"
36
-
37
- type PaginationLinkProps = {
38
- isActive?: boolean
39
- } & Pick<ButtonProps, "size"> &
40
- React.ComponentProps<"a">
41
-
42
- const PaginationLink = ({
43
- className,
44
- isActive,
45
- size = "icon",
46
- ...props
47
- }: PaginationLinkProps) => (
48
- <a
49
- aria-current={isActive ? "page" : undefined}
50
- className={cn(
51
- buttonVariants({
52
- variant: isActive ? "outline" : "ghost",
53
- size,
54
- }),
55
- className
56
- )}
57
- {...props}
58
- />
59
- )
60
- PaginationLink.displayName = "PaginationLink"
61
-
62
- const PaginationPrevious = ({
63
- className,
64
- ...props
65
- }: React.ComponentProps<typeof PaginationLink>) => (
66
- <PaginationLink
67
- aria-label="Go to previous page"
68
- size="default"
69
- className={cn("gap-1 pl-2.5", className)}
70
- {...props}
71
- >
72
- <ChevronLeft className="h-4 w-4" />
73
- <span>Previous</span>
74
- </PaginationLink>
75
- )
76
- PaginationPrevious.displayName = "PaginationPrevious"
77
-
78
- const PaginationNext = ({
79
- className,
80
- ...props
81
- }: React.ComponentProps<typeof PaginationLink>) => (
82
- <PaginationLink
83
- aria-label="Go to next page"
84
- size="default"
85
- className={cn("gap-1 pr-2.5", className)}
86
- {...props}
87
- >
88
- <span>Next</span>
89
- <ChevronRight className="h-4 w-4" />
90
- </PaginationLink>
91
- )
92
- PaginationNext.displayName = "PaginationNext"
93
-
94
- const PaginationEllipsis = ({
95
- className,
96
- ...props
97
- }: React.ComponentProps<"span">) => (
98
- <span
99
- aria-hidden
100
- className={cn("flex h-9 w-9 items-center justify-center", className)}
101
- {...props}
102
- >
103
- <MoreHorizontal className="h-4 w-4" />
104
- <span className="sr-only">More pages</span>
105
- </span>
106
- )
107
- PaginationEllipsis.displayName = "PaginationEllipsis"
108
-
109
- export {
110
- Pagination,
111
- PaginationContent,
112
- PaginationEllipsis,
113
- PaginationItem,
114
- PaginationLink,
115
- PaginationNext,
116
- PaginationPrevious,
117
- }
@@ -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
- "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]",
21
- className
22
- )}
23
- {...props}
24
- />
25
- </PopoverPrimitive.Portal>
26
- ))
27
- PopoverContent.displayName = PopoverPrimitive.Content.displayName
28
-
29
- 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,42 +0,0 @@
1
- import * as React from "react"
2
- import * as RadioGroupPrimitive from "@radix-ui/react-radio-group"
3
- import { Circle } from "lucide-react"
4
-
5
- import { cn } from "@/lib/utils"
6
-
7
- const RadioGroup = React.forwardRef<
8
- React.ElementRef<typeof RadioGroupPrimitive.Root>,
9
- React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>
10
- >(({ className, ...props }, ref) => {
11
- return (
12
- <RadioGroupPrimitive.Root
13
- className={cn("grid gap-2", className)}
14
- {...props}
15
- ref={ref}
16
- />
17
- )
18
- })
19
- RadioGroup.displayName = RadioGroupPrimitive.Root.displayName
20
-
21
- const RadioGroupItem = React.forwardRef<
22
- React.ElementRef<typeof RadioGroupPrimitive.Item>,
23
- React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>
24
- >(({ className, ...props }, ref) => {
25
- return (
26
- <RadioGroupPrimitive.Item
27
- ref={ref}
28
- className={cn(
29
- "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",
30
- className
31
- )}
32
- {...props}
33
- >
34
- <RadioGroupPrimitive.Indicator className="flex items-center justify-center">
35
- <Circle className="h-2.5 w-2.5 fill-current text-current" />
36
- </RadioGroupPrimitive.Indicator>
37
- </RadioGroupPrimitive.Item>
38
- )
39
- })
40
- RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName
41
-
42
- export { RadioGroup, RadioGroupItem }
@@ -1,44 +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
- props: React.ComponentProps<typeof ResizablePrimitive.Group>,
10
- ) => (
11
- <ResizablePrimitive.Group
12
- {...props}
13
- className={cn(
14
- "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
15
- props.className,
16
- )}
17
- />
18
- );
19
-
20
- const ResizablePanel = ResizablePrimitive.Panel;
21
-
22
- const ResizableHandle = ({
23
- withHandle,
24
- className,
25
- ...props
26
- }: React.ComponentProps<typeof ResizablePrimitive.Separator> & {
27
- withHandle?: boolean;
28
- }) => (
29
- <ResizablePrimitive.Separator
30
- className={cn(
31
- "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",
32
- className,
33
- )}
34
- {...props}
35
- >
36
- {withHandle && (
37
- <div className="z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border">
38
- <GripVertical className="h-2.5 w-2.5" />
39
- </div>
40
- )}
41
- </ResizablePrimitive.Separator>
42
- );
43
-
44
- export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
@@ -1,46 +0,0 @@
1
- import * as React from "react"
2
- import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"
3
-
4
- import { cn } from "@/lib/utils"
5
-
6
- const ScrollArea = React.forwardRef<
7
- React.ElementRef<typeof ScrollAreaPrimitive.Root>,
8
- React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>
9
- >(({ className, children, ...props }, ref) => (
10
- <ScrollAreaPrimitive.Root
11
- ref={ref}
12
- className={cn("relative overflow-hidden", className)}
13
- {...props}
14
- >
15
- <ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]">
16
- {children}
17
- </ScrollAreaPrimitive.Viewport>
18
- <ScrollBar />
19
- <ScrollAreaPrimitive.Corner />
20
- </ScrollAreaPrimitive.Root>
21
- ))
22
- ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName
23
-
24
- const ScrollBar = React.forwardRef<
25
- React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,
26
- React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>
27
- >(({ className, orientation = "vertical", ...props }, ref) => (
28
- <ScrollAreaPrimitive.ScrollAreaScrollbar
29
- ref={ref}
30
- orientation={orientation}
31
- className={cn(
32
- "flex touch-none select-none transition-colors",
33
- orientation === "vertical" &&
34
- "h-full w-2.5 border-l border-l-transparent p-[1px]",
35
- orientation === "horizontal" &&
36
- "h-2.5 flex-col border-t border-t-transparent p-[1px]",
37
- className
38
- )}
39
- {...props}
40
- >
41
- <ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-border" />
42
- </ScrollAreaPrimitive.ScrollAreaScrollbar>
43
- ))
44
- ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName
45
-
46
- 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-10 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,29 +0,0 @@
1
- import * as React from "react"
2
- import * as SeparatorPrimitive from "@radix-ui/react-separator"
3
-
4
- import { cn } from "@/lib/utils"
5
-
6
- const Separator = React.forwardRef<
7
- React.ElementRef<typeof SeparatorPrimitive.Root>,
8
- React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
9
- >(
10
- (
11
- { className, orientation = "horizontal", decorative = true, ...props },
12
- ref
13
- ) => (
14
- <SeparatorPrimitive.Root
15
- ref={ref}
16
- decorative={decorative}
17
- orientation={orientation}
18
- className={cn(
19
- "shrink-0 bg-border",
20
- orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
21
- className
22
- )}
23
- {...props}
24
- />
25
- )
26
- )
27
- Separator.displayName = SeparatorPrimitive.Root.displayName
28
-
29
- export { Separator }
@@ -1,140 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as SheetPrimitive from "@radix-ui/react-dialog"
5
- import { cva, type VariantProps } from "class-variance-authority"
6
- import { X } from "lucide-react"
7
-
8
- import { cn } from "@/lib/utils"
9
-
10
- const Sheet = SheetPrimitive.Root
11
-
12
- const SheetTrigger = SheetPrimitive.Trigger
13
-
14
- const SheetClose = SheetPrimitive.Close
15
-
16
- const SheetPortal = SheetPrimitive.Portal
17
-
18
- const SheetOverlay = React.forwardRef<
19
- React.ElementRef<typeof SheetPrimitive.Overlay>,
20
- React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>
21
- >(({ className, ...props }, ref) => (
22
- <SheetPrimitive.Overlay
23
- className={cn(
24
- "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",
25
- className
26
- )}
27
- {...props}
28
- ref={ref}
29
- />
30
- ))
31
- SheetOverlay.displayName = SheetPrimitive.Overlay.displayName
32
-
33
- const sheetVariants = cva(
34
- "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
35
- {
36
- variants: {
37
- side: {
38
- top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
39
- bottom:
40
- "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
41
- 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",
42
- right:
43
- "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",
44
- },
45
- },
46
- defaultVariants: {
47
- side: "right",
48
- },
49
- }
50
- )
51
-
52
- interface SheetContentProps
53
- extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,
54
- VariantProps<typeof sheetVariants> {}
55
-
56
- const SheetContent = React.forwardRef<
57
- React.ElementRef<typeof SheetPrimitive.Content>,
58
- SheetContentProps
59
- >(({ side = "right", className, children, ...props }, ref) => (
60
- <SheetPortal>
61
- <SheetOverlay />
62
- <SheetPrimitive.Content
63
- ref={ref}
64
- className={cn(sheetVariants({ side }), className)}
65
- {...props}
66
- >
67
- {children}
68
- <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">
69
- <X className="h-4 w-4" />
70
- <span className="sr-only">Close</span>
71
- </SheetPrimitive.Close>
72
- </SheetPrimitive.Content>
73
- </SheetPortal>
74
- ))
75
- SheetContent.displayName = SheetPrimitive.Content.displayName
76
-
77
- const SheetHeader = ({
78
- className,
79
- ...props
80
- }: React.HTMLAttributes<HTMLDivElement>) => (
81
- <div
82
- className={cn(
83
- "flex flex-col space-y-2 text-center sm:text-left",
84
- className
85
- )}
86
- {...props}
87
- />
88
- )
89
- SheetHeader.displayName = "SheetHeader"
90
-
91
- const SheetFooter = ({
92
- className,
93
- ...props
94
- }: React.HTMLAttributes<HTMLDivElement>) => (
95
- <div
96
- className={cn(
97
- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
98
- className
99
- )}
100
- {...props}
101
- />
102
- )
103
- SheetFooter.displayName = "SheetFooter"
104
-
105
- const SheetTitle = React.forwardRef<
106
- React.ElementRef<typeof SheetPrimitive.Title>,
107
- React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>
108
- >(({ className, ...props }, ref) => (
109
- <SheetPrimitive.Title
110
- ref={ref}
111
- className={cn("text-lg font-semibold text-foreground", className)}
112
- {...props}
113
- />
114
- ))
115
- SheetTitle.displayName = SheetPrimitive.Title.displayName
116
-
117
- const SheetDescription = React.forwardRef<
118
- React.ElementRef<typeof SheetPrimitive.Description>,
119
- React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>
120
- >(({ className, ...props }, ref) => (
121
- <SheetPrimitive.Description
122
- ref={ref}
123
- className={cn("text-sm text-muted-foreground", className)}
124
- {...props}
125
- />
126
- ))
127
- SheetDescription.displayName = SheetPrimitive.Description.displayName
128
-
129
- export {
130
- Sheet,
131
- SheetPortal,
132
- SheetOverlay,
133
- SheetTrigger,
134
- SheetClose,
135
- SheetContent,
136
- SheetHeader,
137
- SheetFooter,
138
- SheetTitle,
139
- SheetDescription,
140
- }