@arolariu/components 0.0.31 → 0.0.32

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 (149) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/components/ui/alert-dialog.cjs.map +1 -1
  3. package/dist/cjs/components/ui/alert.cjs +1 -1
  4. package/dist/cjs/components/ui/alert.cjs.map +1 -1
  5. package/dist/cjs/components/ui/aspect-ratio.cjs.map +1 -1
  6. package/dist/cjs/components/ui/avatar.cjs.map +1 -1
  7. package/dist/cjs/components/ui/badge.cjs.map +1 -1
  8. package/dist/cjs/components/ui/breadcrumb.cjs.map +1 -1
  9. package/dist/cjs/components/ui/button.cjs.map +1 -1
  10. package/dist/cjs/components/ui/calendar.cjs.map +1 -1
  11. package/dist/cjs/components/ui/card.cjs.map +1 -1
  12. package/dist/cjs/components/ui/carousel.cjs.map +1 -1
  13. package/dist/cjs/components/ui/chart.cjs.map +1 -1
  14. package/dist/cjs/components/ui/checkbox.cjs.map +1 -1
  15. package/dist/cjs/components/ui/collapsible.cjs.map +1 -1
  16. package/dist/cjs/components/ui/command.cjs.map +1 -1
  17. package/dist/cjs/components/ui/context-menu.cjs.map +1 -1
  18. package/dist/cjs/components/ui/drawer.cjs.map +1 -1
  19. package/dist/cjs/components/ui/dropdown-menu.cjs.map +1 -1
  20. package/dist/cjs/components/ui/form.cjs.map +1 -1
  21. package/dist/cjs/components/ui/hover-card.cjs.map +1 -1
  22. package/dist/cjs/components/ui/input-otp.cjs.map +1 -1
  23. package/dist/cjs/components/ui/input.cjs.map +1 -1
  24. package/dist/cjs/components/ui/label.cjs.map +1 -1
  25. package/dist/cjs/components/ui/menubar.cjs.map +1 -1
  26. package/dist/cjs/components/ui/navigation-menu.cjs.map +1 -1
  27. package/dist/cjs/components/ui/pagination.cjs.map +1 -1
  28. package/dist/cjs/components/ui/popover.cjs.map +1 -1
  29. package/dist/cjs/components/ui/progress.cjs.map +1 -1
  30. package/dist/cjs/components/ui/radio-group.cjs.map +1 -1
  31. package/dist/cjs/components/ui/resizable.cjs.map +1 -1
  32. package/dist/cjs/components/ui/scroll-area.cjs.map +1 -1
  33. package/dist/cjs/components/ui/select.cjs.map +1 -1
  34. package/dist/cjs/components/ui/separator.cjs.map +1 -1
  35. package/dist/cjs/components/ui/sheet.cjs.map +1 -1
  36. package/dist/cjs/components/ui/sidebar.cjs.map +1 -1
  37. package/dist/cjs/components/ui/skeleton.cjs.map +1 -1
  38. package/dist/cjs/components/ui/slider.cjs.map +1 -1
  39. package/dist/cjs/components/ui/sonner.cjs.map +1 -1
  40. package/dist/cjs/components/ui/switch.cjs.map +1 -1
  41. package/dist/cjs/components/ui/table.cjs.map +1 -1
  42. package/dist/cjs/components/ui/tabs.cjs.map +1 -1
  43. package/dist/cjs/components/ui/textarea.cjs.map +1 -1
  44. package/dist/cjs/components/ui/toggle-group.cjs.map +1 -1
  45. package/dist/cjs/components/ui/toggle.cjs.map +1 -1
  46. package/dist/cjs/components/ui/tooltip.cjs.map +1 -1
  47. package/dist/cjs/index.cjs +1 -1
  48. package/dist/cjs/index.css +1 -0
  49. package/dist/esm/components/ui/alert-dialog.js.map +1 -1
  50. package/dist/esm/components/ui/alert.js +8 -8
  51. package/dist/esm/components/ui/alert.js.map +1 -1
  52. package/dist/esm/components/ui/aspect-ratio.js.map +1 -1
  53. package/dist/esm/components/ui/avatar.js.map +1 -1
  54. package/dist/esm/components/ui/badge.js.map +1 -1
  55. package/dist/esm/components/ui/breadcrumb.js.map +1 -1
  56. package/dist/esm/components/ui/button.js.map +1 -1
  57. package/dist/esm/components/ui/calendar.js.map +1 -1
  58. package/dist/esm/components/ui/card.js.map +1 -1
  59. package/dist/esm/components/ui/carousel.js.map +1 -1
  60. package/dist/esm/components/ui/chart.js.map +1 -1
  61. package/dist/esm/components/ui/checkbox.js.map +1 -1
  62. package/dist/esm/components/ui/collapsible.js.map +1 -1
  63. package/dist/esm/components/ui/command.js.map +1 -1
  64. package/dist/esm/components/ui/context-menu.js.map +1 -1
  65. package/dist/esm/components/ui/drawer.js.map +1 -1
  66. package/dist/esm/components/ui/dropdown-menu.js.map +1 -1
  67. package/dist/esm/components/ui/form.js.map +1 -1
  68. package/dist/esm/components/ui/hover-card.js.map +1 -1
  69. package/dist/esm/components/ui/input-otp.js.map +1 -1
  70. package/dist/esm/components/ui/input.js.map +1 -1
  71. package/dist/esm/components/ui/label.js.map +1 -1
  72. package/dist/esm/components/ui/menubar.js.map +1 -1
  73. package/dist/esm/components/ui/navigation-menu.js.map +1 -1
  74. package/dist/esm/components/ui/pagination.js.map +1 -1
  75. package/dist/esm/components/ui/popover.js.map +1 -1
  76. package/dist/esm/components/ui/progress.js.map +1 -1
  77. package/dist/esm/components/ui/radio-group.js.map +1 -1
  78. package/dist/esm/components/ui/resizable.js.map +1 -1
  79. package/dist/esm/components/ui/scroll-area.js.map +1 -1
  80. package/dist/esm/components/ui/select.js.map +1 -1
  81. package/dist/esm/components/ui/separator.js.map +1 -1
  82. package/dist/esm/components/ui/sheet.js.map +1 -1
  83. package/dist/esm/components/ui/sidebar.js.map +1 -1
  84. package/dist/esm/components/ui/skeleton.js.map +1 -1
  85. package/dist/esm/components/ui/slider.js.map +1 -1
  86. package/dist/esm/components/ui/sonner.js.map +1 -1
  87. package/dist/esm/components/ui/switch.js.map +1 -1
  88. package/dist/esm/components/ui/table.js.map +1 -1
  89. package/dist/esm/components/ui/tabs.js.map +1 -1
  90. package/dist/esm/components/ui/textarea.js.map +1 -1
  91. package/dist/esm/components/ui/toggle-group.js.map +1 -1
  92. package/dist/esm/components/ui/toggle.js.map +1 -1
  93. package/dist/esm/components/ui/tooltip.js.map +1 -1
  94. package/dist/esm/index.css +1 -0
  95. package/dist/esm/index.js +294 -293
  96. package/dist/esm/index.js.map +1 -1
  97. package/dist/index.css +1 -0
  98. package/dist/index.js +298 -0
  99. package/dist/types/components/ui/alert.d.ts.map +1 -1
  100. package/dist/types/components/ui/form.d.ts.map +1 -1
  101. package/package.json +76 -45
  102. package/src/components/ui/alert-dialog.tsx +160 -160
  103. package/src/components/ui/alert.tsx +2 -0
  104. package/src/components/ui/aspect-ratio.tsx +12 -12
  105. package/src/components/ui/avatar.tsx +52 -52
  106. package/src/components/ui/badge.tsx +47 -47
  107. package/src/components/ui/breadcrumb.tsx +116 -116
  108. package/src/components/ui/button.tsx +60 -60
  109. package/src/components/ui/calendar.tsx +75 -75
  110. package/src/components/ui/card.tsx +79 -79
  111. package/src/components/ui/carousel.tsx +240 -240
  112. package/src/components/ui/chart.tsx +352 -352
  113. package/src/components/ui/checkbox.tsx +31 -31
  114. package/src/components/ui/collapsible.tsx +34 -34
  115. package/src/components/ui/command.tsx +176 -176
  116. package/src/components/ui/context-menu.tsx +254 -254
  117. package/src/components/ui/drawer.tsx +137 -137
  118. package/src/components/ui/dropdown-menu.tsx +259 -259
  119. package/src/components/ui/form.tsx +173 -173
  120. package/src/components/ui/hover-card.tsx +41 -41
  121. package/src/components/ui/input-otp.tsx +77 -77
  122. package/src/components/ui/input.tsx +22 -22
  123. package/src/components/ui/label.tsx +23 -23
  124. package/src/components/ui/menubar.tsx +278 -278
  125. package/src/components/ui/navigation-menu.tsx +170 -170
  126. package/src/components/ui/pagination.tsx +128 -128
  127. package/src/components/ui/popover.tsx +47 -47
  128. package/src/components/ui/progress.tsx +30 -30
  129. package/src/components/ui/radio-group.tsx +44 -44
  130. package/src/components/ui/resizable.tsx +55 -55
  131. package/src/components/ui/scroll-area.tsx +57 -57
  132. package/src/components/ui/select.tsx +183 -183
  133. package/src/components/ui/separator.tsx +27 -27
  134. package/src/components/ui/sheet.tsx +144 -144
  135. package/src/components/ui/sidebar.tsx +725 -725
  136. package/src/components/ui/skeleton.tsx +17 -17
  137. package/src/components/ui/slider.tsx +62 -62
  138. package/src/components/ui/sonner.tsx +30 -30
  139. package/src/components/ui/switch.tsx +30 -30
  140. package/src/components/ui/table.tsx +118 -118
  141. package/src/components/ui/tabs.tsx +65 -65
  142. package/src/components/ui/textarea.tsx +19 -19
  143. package/src/components/ui/toggle-group.tsx +72 -72
  144. package/src/components/ui/toggle.tsx +46 -46
  145. package/src/components/ui/tooltip.tsx +60 -60
  146. package/src/index.css +3 -107
  147. package/src/index.ts +2 -0
  148. package/tailwind.config.mjs +67 -0
  149. package/tsconfig.json +4 -1
@@ -1,47 +1,47 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as PopoverPrimitive from "@radix-ui/react-popover";
5
- import { cn } from "./../../lib/utils";
6
-
7
- function Popover({
8
- ...props
9
- }: React.ComponentProps<typeof PopoverPrimitive.Root>) {
10
- return <PopoverPrimitive.Root data-slot="popover" {...props} />;
11
- }
12
-
13
- function PopoverTrigger({
14
- ...props
15
- }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
16
- return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />;
17
- }
18
-
19
- function PopoverContent({
20
- className,
21
- align = "center",
22
- sideOffset = 4,
23
- ...props
24
- }: React.ComponentProps<typeof PopoverPrimitive.Content>) {
25
- return (
26
- <PopoverPrimitive.Portal>
27
- <PopoverPrimitive.Content
28
- data-slot="popover-content"
29
- align={align}
30
- sideOffset={sideOffset}
31
- className={cn(
32
- "bg-white text-neutral-950 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 z-50 w-72 rounded-md border border-neutral-200 p-4 shadow-md outline-hidden dark:bg-neutral-950 dark:text-neutral-50 dark:border-neutral-800",
33
- className
34
- )}
35
- {...props}
36
- />
37
- </PopoverPrimitive.Portal>
38
- );
39
- }
40
-
41
- function PopoverAnchor({
42
- ...props
43
- }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
44
- return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />;
45
- }
46
-
47
- export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
5
+ import { cn } from "./../../lib/utils";
6
+
7
+ function Popover({
8
+ ...props
9
+ }: React.ComponentProps<typeof PopoverPrimitive.Root>) {
10
+ return <PopoverPrimitive.Root data-slot="popover" {...props} />;
11
+ }
12
+
13
+ function PopoverTrigger({
14
+ ...props
15
+ }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
16
+ return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />;
17
+ }
18
+
19
+ function PopoverContent({
20
+ className,
21
+ align = "center",
22
+ sideOffset = 4,
23
+ ...props
24
+ }: React.ComponentProps<typeof PopoverPrimitive.Content>) {
25
+ return (
26
+ <PopoverPrimitive.Portal>
27
+ <PopoverPrimitive.Content
28
+ data-slot="popover-content"
29
+ align={align}
30
+ sideOffset={sideOffset}
31
+ className={cn(
32
+ "bg-white text-neutral-950 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 z-50 w-72 rounded-md border border-neutral-200 p-4 shadow-md outline-hidden dark:bg-neutral-950 dark:text-neutral-50 dark:border-neutral-800",
33
+ className
34
+ )}
35
+ {...props}
36
+ />
37
+ </PopoverPrimitive.Portal>
38
+ );
39
+ }
40
+
41
+ function PopoverAnchor({
42
+ ...props
43
+ }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
44
+ return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />;
45
+ }
46
+
47
+ export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
@@ -1,30 +1,30 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as ProgressPrimitive from "@radix-ui/react-progress";
5
- import { cn } from "./../../lib/utils";
6
-
7
- function Progress({
8
- className,
9
- value,
10
- ...props
11
- }: React.ComponentProps<typeof ProgressPrimitive.Root>) {
12
- return (
13
- <ProgressPrimitive.Root
14
- data-slot="progress"
15
- className={cn(
16
- "bg-neutral-900/20 relative h-2 w-full overflow-hidden rounded-full dark:bg-neutral-50/20",
17
- className
18
- )}
19
- {...props}
20
- >
21
- <ProgressPrimitive.Indicator
22
- data-slot="progress-indicator"
23
- className="bg-neutral-900 h-full w-full flex-1 transition-all dark:bg-neutral-50"
24
- style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
25
- />
26
- </ProgressPrimitive.Root>
27
- );
28
- }
29
-
30
- export { Progress };
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import * as ProgressPrimitive from "@radix-ui/react-progress";
5
+ import { cn } from "./../../lib/utils";
6
+
7
+ function Progress({
8
+ className,
9
+ value,
10
+ ...props
11
+ }: React.ComponentProps<typeof ProgressPrimitive.Root>) {
12
+ return (
13
+ <ProgressPrimitive.Root
14
+ data-slot="progress"
15
+ className={cn(
16
+ "bg-neutral-900/20 relative h-2 w-full overflow-hidden rounded-full dark:bg-neutral-50/20",
17
+ className
18
+ )}
19
+ {...props}
20
+ >
21
+ <ProgressPrimitive.Indicator
22
+ data-slot="progress-indicator"
23
+ className="bg-neutral-900 h-full w-full flex-1 transition-all dark:bg-neutral-50"
24
+ style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
25
+ />
26
+ </ProgressPrimitive.Root>
27
+ );
28
+ }
29
+
30
+ export { Progress };
@@ -1,44 +1,44 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
5
- import { CircleIcon } from "lucide-react";
6
- import { cn } from "./../../lib/utils";
7
-
8
- function RadioGroup({
9
- className,
10
- ...props
11
- }: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {
12
- return (
13
- <RadioGroupPrimitive.Root
14
- data-slot="radio-group"
15
- className={cn("grid gap-3", className)}
16
- {...props}
17
- />
18
- );
19
- }
20
-
21
- function RadioGroupItem({
22
- className,
23
- ...props
24
- }: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {
25
- return (
26
- <RadioGroupPrimitive.Item
27
- data-slot="radio-group-item"
28
- className={cn(
29
- "border-neutral-200 text-neutral-900 focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:text-neutral-50 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",
30
- className
31
- )}
32
- {...props}
33
- >
34
- <RadioGroupPrimitive.Indicator
35
- data-slot="radio-group-indicator"
36
- className="relative flex items-center justify-center"
37
- >
38
- <CircleIcon className="fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" />
39
- </RadioGroupPrimitive.Indicator>
40
- </RadioGroupPrimitive.Item>
41
- );
42
- }
43
-
44
- export { RadioGroup, RadioGroupItem };
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
5
+ import { CircleIcon } from "lucide-react";
6
+ import { cn } from "./../../lib/utils";
7
+
8
+ function RadioGroup({
9
+ className,
10
+ ...props
11
+ }: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {
12
+ return (
13
+ <RadioGroupPrimitive.Root
14
+ data-slot="radio-group"
15
+ className={cn("grid gap-3", className)}
16
+ {...props}
17
+ />
18
+ );
19
+ }
20
+
21
+ function RadioGroupItem({
22
+ className,
23
+ ...props
24
+ }: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {
25
+ return (
26
+ <RadioGroupPrimitive.Item
27
+ data-slot="radio-group-item"
28
+ className={cn(
29
+ "border-neutral-200 text-neutral-900 focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:text-neutral-50 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",
30
+ className
31
+ )}
32
+ {...props}
33
+ >
34
+ <RadioGroupPrimitive.Indicator
35
+ data-slot="radio-group-indicator"
36
+ className="relative flex items-center justify-center"
37
+ >
38
+ <CircleIcon className="fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" />
39
+ </RadioGroupPrimitive.Indicator>
40
+ </RadioGroupPrimitive.Item>
41
+ );
42
+ }
43
+
44
+ export { RadioGroup, RadioGroupItem };
@@ -1,55 +1,55 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import { GripVerticalIcon } from "lucide-react";
5
- import * as ResizablePrimitive from "react-resizable-panels";
6
- import { cn } from "./../../lib/utils";
7
-
8
- function ResizablePanelGroup({
9
- className,
10
- ...props
11
- }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {
12
- return (
13
- <ResizablePrimitive.PanelGroup
14
- data-slot="resizable-panel-group"
15
- className={cn(
16
- "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
17
- className
18
- )}
19
- {...props}
20
- />
21
- );
22
- }
23
-
24
- function ResizablePanel({
25
- ...props
26
- }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {
27
- return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />;
28
- }
29
-
30
- function ResizableHandle({
31
- withHandle,
32
- className,
33
- ...props
34
- }: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
35
- withHandle?: boolean;
36
- }) {
37
- return (
38
- <ResizablePrimitive.PanelResizeHandle
39
- data-slot="resizable-handle"
40
- className={cn(
41
- "bg-neutral-200 focus-visible:ring-neutral-950 relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden 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 dark:bg-neutral-800 dark:focus-visible:ring-neutral-300",
42
- className
43
- )}
44
- {...props}
45
- >
46
- {withHandle && (
47
- <div className="bg-neutral-200 z-10 flex h-4 w-3 items-center justify-center rounded-xs border dark:bg-neutral-800">
48
- <GripVerticalIcon className="size-2.5" />
49
- </div>
50
- )}
51
- </ResizablePrimitive.PanelResizeHandle>
52
- );
53
- }
54
-
55
- export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import { GripVerticalIcon } from "lucide-react";
5
+ import * as ResizablePrimitive from "react-resizable-panels";
6
+ import { cn } from "./../../lib/utils";
7
+
8
+ function ResizablePanelGroup({
9
+ className,
10
+ ...props
11
+ }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {
12
+ return (
13
+ <ResizablePrimitive.PanelGroup
14
+ data-slot="resizable-panel-group"
15
+ className={cn(
16
+ "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
17
+ className
18
+ )}
19
+ {...props}
20
+ />
21
+ );
22
+ }
23
+
24
+ function ResizablePanel({
25
+ ...props
26
+ }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {
27
+ return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />;
28
+ }
29
+
30
+ function ResizableHandle({
31
+ withHandle,
32
+ className,
33
+ ...props
34
+ }: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
35
+ withHandle?: boolean;
36
+ }) {
37
+ return (
38
+ <ResizablePrimitive.PanelResizeHandle
39
+ data-slot="resizable-handle"
40
+ className={cn(
41
+ "bg-neutral-200 focus-visible:ring-neutral-950 relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden 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 dark:bg-neutral-800 dark:focus-visible:ring-neutral-300",
42
+ className
43
+ )}
44
+ {...props}
45
+ >
46
+ {withHandle && (
47
+ <div className="bg-neutral-200 z-10 flex h-4 w-3 items-center justify-center rounded-xs border dark:bg-neutral-800">
48
+ <GripVerticalIcon className="size-2.5" />
49
+ </div>
50
+ )}
51
+ </ResizablePrimitive.PanelResizeHandle>
52
+ );
53
+ }
54
+
55
+ export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
@@ -1,57 +1,57 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
5
- import { cn } from "./../../lib/utils";
6
-
7
- function ScrollArea({
8
- className,
9
- children,
10
- ...props
11
- }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
12
- return (
13
- <ScrollAreaPrimitive.Root
14
- data-slot="scroll-area"
15
- className={cn("relative", className)}
16
- {...props}
17
- >
18
- <ScrollAreaPrimitive.Viewport
19
- data-slot="scroll-area-viewport"
20
- className="ring-neutral-950/10 dark:ring-neutral-950/20 dark:outline-ring/40 outline-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] focus-visible:ring-4 focus-visible:outline-1 dark:ring-neutral-300/10 dark:dark:ring-neutral-300/20"
21
- >
22
- {children}
23
- </ScrollAreaPrimitive.Viewport>
24
- <ScrollBar />
25
- <ScrollAreaPrimitive.Corner />
26
- </ScrollAreaPrimitive.Root>
27
- );
28
- }
29
-
30
- function ScrollBar({
31
- className,
32
- orientation = "vertical",
33
- ...props
34
- }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
35
- return (
36
- <ScrollAreaPrimitive.ScrollAreaScrollbar
37
- data-slot="scroll-area-scrollbar"
38
- orientation={orientation}
39
- className={cn(
40
- "flex touch-none p-px transition-colors select-none",
41
- orientation === "vertical" &&
42
- "h-full w-2.5 border-l border-l-transparent",
43
- orientation === "horizontal" &&
44
- "h-2.5 flex-col border-t border-t-transparent",
45
- className
46
- )}
47
- {...props}
48
- >
49
- <ScrollAreaPrimitive.ScrollAreaThumb
50
- data-slot="scroll-area-thumb"
51
- className="bg-neutral-200 relative flex-1 rounded-full dark:bg-neutral-800"
52
- />
53
- </ScrollAreaPrimitive.ScrollAreaScrollbar>
54
- );
55
- }
56
-
57
- export { ScrollArea, ScrollBar };
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
5
+ import { cn } from "./../../lib/utils";
6
+
7
+ function ScrollArea({
8
+ className,
9
+ children,
10
+ ...props
11
+ }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
12
+ return (
13
+ <ScrollAreaPrimitive.Root
14
+ data-slot="scroll-area"
15
+ className={cn("relative", className)}
16
+ {...props}
17
+ >
18
+ <ScrollAreaPrimitive.Viewport
19
+ data-slot="scroll-area-viewport"
20
+ className="ring-neutral-950/10 dark:ring-neutral-950/20 dark:outline-ring/40 outline-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] focus-visible:ring-4 focus-visible:outline-1 dark:ring-neutral-300/10 dark:dark:ring-neutral-300/20"
21
+ >
22
+ {children}
23
+ </ScrollAreaPrimitive.Viewport>
24
+ <ScrollBar />
25
+ <ScrollAreaPrimitive.Corner />
26
+ </ScrollAreaPrimitive.Root>
27
+ );
28
+ }
29
+
30
+ function ScrollBar({
31
+ className,
32
+ orientation = "vertical",
33
+ ...props
34
+ }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
35
+ return (
36
+ <ScrollAreaPrimitive.ScrollAreaScrollbar
37
+ data-slot="scroll-area-scrollbar"
38
+ orientation={orientation}
39
+ className={cn(
40
+ "flex touch-none p-px transition-colors select-none",
41
+ orientation === "vertical" &&
42
+ "h-full w-2.5 border-l border-l-transparent",
43
+ orientation === "horizontal" &&
44
+ "h-2.5 flex-col border-t border-t-transparent",
45
+ className
46
+ )}
47
+ {...props}
48
+ >
49
+ <ScrollAreaPrimitive.ScrollAreaThumb
50
+ data-slot="scroll-area-thumb"
51
+ className="bg-neutral-200 relative flex-1 rounded-full dark:bg-neutral-800"
52
+ />
53
+ </ScrollAreaPrimitive.ScrollAreaScrollbar>
54
+ );
55
+ }
56
+
57
+ export { ScrollArea, ScrollBar };