@tioelvis/next-template 2.3.0 → 2.3.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tioelvis/next-template",
3
- "version": "2.3.0",
3
+ "version": "2.3.2",
4
4
  "description": "CLI to scaffold a Next.js + Tailwind project using shadcn/ui components",
5
5
  "type": "module",
6
6
  "bin": {
@@ -47,6 +47,7 @@
47
47
  "@radix-ui/react-popover": "^1.1.14",
48
48
  "@radix-ui/react-progress": "^1.1.7",
49
49
  "@radix-ui/react-radio-group": "^1.3.7",
50
+ "@radix-ui/react-scroll-area": "^1.2.9",
50
51
  "@radix-ui/react-slot": "^1.2.3",
51
52
  "@tailwindcss/postcss": "^4.1.11",
52
53
  "@tanstack/react-query": "^5.83.0",
@@ -71,6 +72,7 @@
71
72
  "react-day-picker": "^9.8.1",
72
73
  "react-dom": "^19.1.0",
73
74
  "react-hook-form": "^7.61.1",
75
+ "react-resizable-panels": "^3.0.3",
74
76
  "recharts": "^2.15.4",
75
77
  "tailwind-merge": "^3.3.1",
76
78
  "tailwindcss": "^4.1.11",
@@ -0,0 +1,6 @@
1
+ {
2
+ "dependencies": ["react-resizable-panels"],
3
+ "dev_dependence": [],
4
+ "hooks": [],
5
+ "supports": []
6
+ }
@@ -0,0 +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
+
7
+ import { cn } from "@/lib/utils";
8
+
9
+ function ResizablePanelGroup({
10
+ className,
11
+ ...props
12
+ }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {
13
+ return (
14
+ <ResizablePrimitive.PanelGroup
15
+ data-slot="resizable-panel-group"
16
+ className={cn(
17
+ "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
18
+ className
19
+ )}
20
+ {...props}
21
+ />
22
+ );
23
+ }
24
+
25
+ function ResizablePanel({
26
+ ...props
27
+ }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {
28
+ return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />;
29
+ }
30
+
31
+ function ResizableHandle({
32
+ withHandle,
33
+ className,
34
+ ...props
35
+ }: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
36
+ withHandle?: boolean;
37
+ }) {
38
+ return (
39
+ <ResizablePrimitive.PanelResizeHandle
40
+ data-slot="resizable-handle"
41
+ className={cn(
42
+ "bg-border focus-visible:ring-ring 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-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
43
+ className
44
+ )}
45
+ {...props}>
46
+ {withHandle && (
47
+ <div className="bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border">
48
+ <GripVerticalIcon className="size-2.5" />
49
+ </div>
50
+ )}
51
+ </ResizablePrimitive.PanelResizeHandle>
52
+ );
53
+ }
54
+
55
+ export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
@@ -0,0 +1,6 @@
1
+ {
2
+ "dependencies": ["@radix-ui/react-scroll-area"],
3
+ "dev_dependence": [],
4
+ "hooks": [],
5
+ "supports": []
6
+ }
@@ -0,0 +1,55 @@
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
+ function ScrollArea({
9
+ className,
10
+ children,
11
+ ...props
12
+ }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
13
+ return (
14
+ <ScrollAreaPrimitive.Root
15
+ data-slot="scroll-area"
16
+ className={cn("relative", className)}
17
+ {...props}>
18
+ <ScrollAreaPrimitive.Viewport
19
+ data-slot="scroll-area-viewport"
20
+ className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1">
21
+ {children}
22
+ </ScrollAreaPrimitive.Viewport>
23
+ <ScrollBar />
24
+ <ScrollAreaPrimitive.Corner />
25
+ </ScrollAreaPrimitive.Root>
26
+ );
27
+ }
28
+
29
+ function ScrollBar({
30
+ className,
31
+ orientation = "vertical",
32
+ ...props
33
+ }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
34
+ return (
35
+ <ScrollAreaPrimitive.ScrollAreaScrollbar
36
+ data-slot="scroll-area-scrollbar"
37
+ orientation={orientation}
38
+ className={cn(
39
+ "flex touch-none p-px transition-colors select-none",
40
+ orientation === "vertical" &&
41
+ "h-full w-2.5 border-l border-l-transparent",
42
+ orientation === "horizontal" &&
43
+ "h-2.5 flex-col border-t border-t-transparent",
44
+ className
45
+ )}
46
+ {...props}>
47
+ <ScrollAreaPrimitive.ScrollAreaThumb
48
+ data-slot="scroll-area-thumb"
49
+ className="bg-border relative flex-1 rounded-full"
50
+ />
51
+ </ScrollAreaPrimitive.ScrollAreaScrollbar>
52
+ );
53
+ }
54
+
55
+ export { ScrollArea, ScrollBar };
package/src/constants.js CHANGED
@@ -68,6 +68,8 @@ const COMPONENTS = [
68
68
  "popover",
69
69
  "progress",
70
70
  "radio-group",
71
+ "resizable",
72
+ "scroll-area",
71
73
  ];
72
74
 
73
75
  export {