diff --git a/apps/v4/app/(create)/components/preview.tsx b/apps/v4/app/(create)/components/preview.tsx index 4210d739f4..24ae974b8c 100644 --- a/apps/v4/app/(create)/components/preview.tsx +++ b/apps/v4/app/(create)/components/preview.tsx @@ -1,7 +1,7 @@ "use client" import * as React from "react" -import { type ImperativePanelHandle } from "react-resizable-panels" +import { type PanelImperativeHandle } from "react-resizable-panels" import { DARK_MODE_FORWARD_TYPE } from "@/components/mode-switcher" import { Badge } from "@/registry/new-york-v4/ui/badge" @@ -16,7 +16,7 @@ import { export function Preview() { const [params] = useDesignSystemSearchParams() const iframeRef = React.useRef(null) - const resizablePanelRef = React.useRef(null) + const resizablePanelRef = React.useRef(null) // Sync resizable panel with URL param changes. React.useEffect(() => { diff --git a/apps/v4/app/(internal)/sink/components/resizable-demo.tsx b/apps/v4/app/(internal)/sink/components/resizable-demo.tsx index 8f6ed50f02..2ce698b783 100644 --- a/apps/v4/app/(internal)/sink/components/resizable-demo.tsx +++ b/apps/v4/app/(internal)/sink/components/resizable-demo.tsx @@ -8,24 +8,24 @@ export function ResizableDemo() { return (
- +
One
- - - + + +
Two
- +
Three
@@ -34,32 +34,32 @@ export function ResizableDemo() {
- +
Sidebar
- +
Content
- +
Header
- +
Content
diff --git a/apps/v4/components/block-viewer.tsx b/apps/v4/components/block-viewer.tsx index 20db7b5931..4d6eb64334 100644 --- a/apps/v4/components/block-viewer.tsx +++ b/apps/v4/components/block-viewer.tsx @@ -16,7 +16,7 @@ import { Tablet, Terminal, } from "lucide-react" -import { type ImperativePanelHandle } from "react-resizable-panels" +import { type PanelImperativeHandle } from "react-resizable-panels" import { type registryItemFileSchema, type registryItemSchema, @@ -68,7 +68,7 @@ type BlockViewerContext = { setView: (view: "code" | "preview") => void activeFile: string | null setActiveFile: (file: string) => void - resizablePanelRef: React.RefObject | null + resizablePanelRef: React.RefObject | null tree: ReturnType | null highlightedFiles: | (z.infer & { @@ -101,7 +101,7 @@ function BlockViewerProvider({ const [activeFile, setActiveFile] = React.useState< BlockViewerContext["activeFile"] >(highlightedFiles?.[0].target ?? null) - const resizablePanelRef = React.useRef(null) + const resizablePanelRef = React.useRef(null) const [iframeKey, setIframeKey] = React.useState(0) return ( @@ -268,19 +268,19 @@ function BlockViewerView({ styleName }: { styleName: Style["name"] }) {
- +
diff --git a/apps/v4/content/docs/components/base/resizable.mdx b/apps/v4/content/docs/components/base/resizable.mdx index cc00257185..7c90653889 100644 --- a/apps/v4/content/docs/components/base/resizable.mdx +++ b/apps/v4/content/docs/components/base/resizable.mdx @@ -71,7 +71,7 @@ import { ``` ```tsx showLineNumbers - + One Two @@ -82,7 +82,7 @@ import { ### Vertical -Use `direction="vertical"` for vertical resizing. +Use `orientation="vertical"` for vertical resizing. @@ -101,3 +101,27 @@ To enable RTL support in shadcn/ui, see the [RTL configuration guide](/docs/rtl) ## API Reference See the [react-resizable-panels](https://github.com/bvaughn/react-resizable-panels/tree/main/packages/react-resizable-panels) documentation. + +## Changelog + +### 2025-02-02 `react-resizable-panels` v4 + +Updated to `react-resizable-panels` v4. See the [v4.0.0 release notes](https://github.com/bvaughn/react-resizable-panels/releases/tag/4.0.0) for full details. + +If you're using `react-resizable-panels` primitives directly, note the following changes: + +| v3 | v4 | +| ---------------------------- | ----------------------- | +| `PanelGroup` | `Group` | +| `PanelResizeHandle` | `Separator` | +| `direction` prop | `orientation` prop | +| `defaultSize={50}` | `defaultSize="50%"` | +| `onLayout` | `onLayoutChange` | +| `ImperativePanelHandle` | `PanelImperativeHandle` | +| `ref` prop on Panel | `panelRef` prop | +| `data-panel-group-direction` | `aria-orientation` | + + + The shadcn/ui wrapper components (`ResizablePanelGroup`, `ResizablePanel`, + `ResizableHandle`) remain unchanged. + diff --git a/apps/v4/content/docs/components/radix/resizable.mdx b/apps/v4/content/docs/components/radix/resizable.mdx index 7eb8442fd8..78ffa09780 100644 --- a/apps/v4/content/docs/components/radix/resizable.mdx +++ b/apps/v4/content/docs/components/radix/resizable.mdx @@ -71,7 +71,7 @@ import { ``` ```tsx showLineNumbers - + One Two @@ -82,7 +82,7 @@ import { ### Vertical -Use `direction="vertical"` for vertical resizing. +Use `orientation="vertical"` for vertical resizing. @@ -101,3 +101,27 @@ To enable RTL support in shadcn/ui, see the [RTL configuration guide](/docs/rtl) ## API Reference See the [react-resizable-panels](https://github.com/bvaughn/react-resizable-panels/tree/main/packages/react-resizable-panels) documentation. + +## Changelog + +### 2025-02-02 `react-resizable-panels` v4 + +Updated to `react-resizable-panels` v4. See the [v4.0.0 release notes](https://github.com/bvaughn/react-resizable-panels/releases/tag/4.0.0) for full details. + +If you're using `react-resizable-panels` primitives directly, note the following changes: + +| v3 | v4 | +| ---------------------------- | ----------------------- | +| `PanelGroup` | `Group` | +| `PanelResizeHandle` | `Separator` | +| `direction` prop | `orientation` prop | +| `defaultSize={50}` | `defaultSize="50%"` | +| `onLayout` | `onLayoutChange` | +| `ImperativePanelHandle` | `PanelImperativeHandle` | +| `ref` prop on Panel | `panelRef` prop | +| `data-panel-group-direction` | `aria-orientation` | + + + The shadcn/ui wrapper components (`ResizablePanelGroup`, `ResizablePanel`, + `ResizableHandle`) remain unchanged. + diff --git a/apps/v4/examples/base/resizable-demo.tsx b/apps/v4/examples/base/resizable-demo.tsx index aa8d1d71b9..9a719e83df 100644 --- a/apps/v4/examples/base/resizable-demo.tsx +++ b/apps/v4/examples/base/resizable-demo.tsx @@ -7,24 +7,24 @@ import { export default function ResizableDemo() { return ( - +
One
- - - - + + + +
Two
- - + +
Three
diff --git a/apps/v4/examples/base/resizable-handle.tsx b/apps/v4/examples/base/resizable-handle.tsx index 628aa09823..7a3022ef1f 100644 --- a/apps/v4/examples/base/resizable-handle.tsx +++ b/apps/v4/examples/base/resizable-handle.tsx @@ -7,16 +7,16 @@ import { export default function ResizableHandleDemo() { return ( - +
Sidebar
- +
Content
diff --git a/apps/v4/examples/base/resizable-rtl.tsx b/apps/v4/examples/base/resizable-rtl.tsx index a7417a3fd1..9f13a889c7 100644 --- a/apps/v4/examples/base/resizable-rtl.tsx +++ b/apps/v4/examples/base/resizable-rtl.tsx @@ -44,25 +44,25 @@ export function ResizableRtl() { return ( - +
{t.one}
- - - + + +
{t.two}
- +
{t.three}
diff --git a/apps/v4/examples/base/resizable-vertical.tsx b/apps/v4/examples/base/resizable-vertical.tsx index c638dce216..a2c6c9e778 100644 --- a/apps/v4/examples/base/resizable-vertical.tsx +++ b/apps/v4/examples/base/resizable-vertical.tsx @@ -7,16 +7,16 @@ import { export function ResizableVertical() { return ( - +
Header
- +
Content
diff --git a/apps/v4/examples/base/ui-rtl/resizable.tsx b/apps/v4/examples/base/ui-rtl/resizable.tsx index 57c347ae9b..c93bf00c59 100644 --- a/apps/v4/examples/base/ui-rtl/resizable.tsx +++ b/apps/v4/examples/base/ui-rtl/resizable.tsx @@ -1,18 +1,17 @@ "use client" -import * as React from "react" import { cn } from "@/examples/base/lib/utils" import * as ResizablePrimitive from "react-resizable-panels" function ResizablePanelGroup({ className, ...props -}: React.ComponentProps) { +}: ResizablePrimitive.GroupProps) { return ( - ) { +function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) { return } @@ -30,14 +27,14 @@ function ResizableHandle({ withHandle, className, ...props -}: React.ComponentProps & { +}: ResizablePrimitive.SeparatorProps & { withHandle?: boolean }) { return ( - div]:rotate-90", + "bg-border focus-visible:ring-ring ring-offset-background relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:start-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:start-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 rtl:after:translate-x-1/2 rtl:aria-[orientation=horizontal]:after:-translate-x-0 [&[aria-orientation=horizontal]>div]:rotate-90", className )} {...props} @@ -45,8 +42,8 @@ function ResizableHandle({ {withHandle && (
)} - + ) } -export { ResizablePanelGroup, ResizablePanel, ResizableHandle } +export { ResizableHandle, ResizablePanel, ResizablePanelGroup } diff --git a/apps/v4/examples/base/ui/resizable.tsx b/apps/v4/examples/base/ui/resizable.tsx index c7c8c59662..c93adbc639 100644 --- a/apps/v4/examples/base/ui/resizable.tsx +++ b/apps/v4/examples/base/ui/resizable.tsx @@ -1,18 +1,17 @@ "use client" -import * as React from "react" import { cn } from "@/examples/base/lib/utils" import * as ResizablePrimitive from "react-resizable-panels" function ResizablePanelGroup({ className, ...props -}: React.ComponentProps) { +}: ResizablePrimitive.GroupProps) { return ( - ) { +function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) { return } @@ -30,14 +27,14 @@ function ResizableHandle({ withHandle, className, ...props -}: React.ComponentProps & { +}: ResizablePrimitive.SeparatorProps & { withHandle?: boolean }) { return ( - div]:rotate-90", + "bg-border focus-visible:ring-ring ring-offset-background 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:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90", className )} {...props} @@ -45,8 +42,8 @@ function ResizableHandle({ {withHandle && (
)} - + ) } -export { ResizablePanelGroup, ResizablePanel, ResizableHandle } +export { ResizableHandle, ResizablePanel, ResizablePanelGroup } diff --git a/apps/v4/examples/radix/resizable-demo.tsx b/apps/v4/examples/radix/resizable-demo.tsx index 01b54c0200..a97ff7e0da 100644 --- a/apps/v4/examples/radix/resizable-demo.tsx +++ b/apps/v4/examples/radix/resizable-demo.tsx @@ -7,24 +7,24 @@ import { export default function ResizableDemo() { return ( - +
One
- - - - + + + +
Two
- - + +
Three
diff --git a/apps/v4/examples/radix/resizable-handle.tsx b/apps/v4/examples/radix/resizable-handle.tsx index f1eb479710..42597cad63 100644 --- a/apps/v4/examples/radix/resizable-handle.tsx +++ b/apps/v4/examples/radix/resizable-handle.tsx @@ -7,16 +7,16 @@ import { export default function ResizableHandleDemo() { return ( - +
Sidebar
- +
Content
diff --git a/apps/v4/examples/radix/resizable-rtl.tsx b/apps/v4/examples/radix/resizable-rtl.tsx index 383f3899e5..004df77821 100644 --- a/apps/v4/examples/radix/resizable-rtl.tsx +++ b/apps/v4/examples/radix/resizable-rtl.tsx @@ -44,25 +44,25 @@ export function ResizableRtl() { return ( - +
{t.one}
- - - + + +
{t.two}
- +
{t.three}
diff --git a/apps/v4/examples/radix/resizable-vertical.tsx b/apps/v4/examples/radix/resizable-vertical.tsx index 8c9fa03a45..8ff89aad7b 100644 --- a/apps/v4/examples/radix/resizable-vertical.tsx +++ b/apps/v4/examples/radix/resizable-vertical.tsx @@ -7,16 +7,16 @@ import { export function ResizableVertical() { return ( - +
Header
- +
Content
diff --git a/apps/v4/examples/radix/ui-rtl/resizable.tsx b/apps/v4/examples/radix/ui-rtl/resizable.tsx index 990b4c9032..869f393be3 100644 --- a/apps/v4/examples/radix/ui-rtl/resizable.tsx +++ b/apps/v4/examples/radix/ui-rtl/resizable.tsx @@ -1,18 +1,17 @@ "use client" -import * as React from "react" import { cn } from "@/examples/radix/lib/utils" import * as ResizablePrimitive from "react-resizable-panels" function ResizablePanelGroup({ className, ...props -}: React.ComponentProps) { +}: ResizablePrimitive.GroupProps) { return ( - ) { +function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) { return } @@ -30,14 +27,14 @@ function ResizableHandle({ withHandle, className, ...props -}: React.ComponentProps & { +}: ResizablePrimitive.SeparatorProps & { withHandle?: boolean }) { return ( - div]:rotate-90", + "bg-border focus-visible:ring-ring ring-offset-background relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:start-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:start-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 rtl:after:translate-x-1/2 rtl:aria-[orientation=horizontal]:after:-translate-x-0 [&[aria-orientation=horizontal]>div]:rotate-90", className )} {...props} @@ -45,8 +42,8 @@ function ResizableHandle({ {withHandle && (
)} - + ) } -export { ResizablePanelGroup, ResizablePanel, ResizableHandle } +export { ResizableHandle, ResizablePanel, ResizablePanelGroup } diff --git a/apps/v4/examples/radix/ui/resizable.tsx b/apps/v4/examples/radix/ui/resizable.tsx index ceb034731d..0cf214b966 100644 --- a/apps/v4/examples/radix/ui/resizable.tsx +++ b/apps/v4/examples/radix/ui/resizable.tsx @@ -1,18 +1,17 @@ "use client" -import * as React from "react" import { cn } from "@/examples/radix/lib/utils" import * as ResizablePrimitive from "react-resizable-panels" function ResizablePanelGroup({ className, ...props -}: React.ComponentProps) { +}: ResizablePrimitive.GroupProps) { return ( - ) { +function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) { return } @@ -30,14 +27,14 @@ function ResizableHandle({ withHandle, className, ...props -}: React.ComponentProps & { +}: ResizablePrimitive.SeparatorProps & { withHandle?: boolean }) { return ( - div]:rotate-90", + "bg-border focus-visible:ring-ring ring-offset-background 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:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90", className )} {...props} @@ -45,8 +42,8 @@ function ResizableHandle({ {withHandle && (
)} - + ) } -export { ResizablePanelGroup, ResizablePanel, ResizableHandle } +export { ResizableHandle, ResizablePanel, ResizablePanelGroup } diff --git a/apps/v4/package.json b/apps/v4/package.json index 3532923ca6..d818dbc02e 100644 --- a/apps/v4/package.json +++ b/apps/v4/package.json @@ -68,7 +68,7 @@ "react-day-picker": "^9.7.0", "react-dom": "19.2.3", "react-hook-form": "^7.62.0", - "react-resizable-panels": "^3.0.6", + "react-resizable-panels": "^4", "react-textarea-autosize": "^8.5.9", "recharts": "2.15.1", "rehype-pretty-code": "^0.14.1", diff --git a/apps/v4/public/r/styles/base-lyra/resizable-example.json b/apps/v4/public/r/styles/base-lyra/resizable-example.json index cbfad52f82..158631b741 100644 --- a/apps/v4/public/r/styles/base-lyra/resizable-example.json +++ b/apps/v4/public/r/styles/base-lyra/resizable-example.json @@ -9,7 +9,7 @@ "files": [ { "path": "registry/base-lyra/examples/resizable-example.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-lyra/components/example\"\nimport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/base-lyra/ui/resizable\"\n\nexport default function ResizableExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction ResizableHorizontal() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableVertical() {\n return (\n \n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableWithHandle() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableNested() {\n return (\n \n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n
\n
\n )\n}\n\nfunction ResizableControlled() {\n const [sizes, setSizes] = React.useState([30, 70])\n\n return (\n \n {\n setSizes(newSizes)\n }}\n >\n \n
\n {Math.round(sizes[0] ?? 30)}%\n
\n
\n \n \n
\n {Math.round(sizes[1] ?? 70)}%\n
\n
\n \n
\n )\n}\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\nimport type { Layout } from \"react-resizable-panels\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-lyra/components/example\"\nimport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/base-lyra/ui/resizable\"\n\nexport default function ResizableExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction ResizableHorizontal() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableVertical() {\n return (\n \n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableWithHandle() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableNested() {\n return (\n \n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n \n
\n )\n}\n\nfunction ResizableControlled() {\n const [layout, setLayout] = React.useState({})\n\n return (\n \n \n \n
\n \n {Math.round(layout.left ?? 30)}%\n \n
\n
\n \n \n
\n \n {Math.round(layout.right ?? 70)}%\n \n
\n
\n \n
\n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/base-lyra/resizable.json b/apps/v4/public/r/styles/base-lyra/resizable.json index 0d481618ba..c8daa19e9f 100644 --- a/apps/v4/public/r/styles/base-lyra/resizable.json +++ b/apps/v4/public/r/styles/base-lyra/resizable.json @@ -7,7 +7,7 @@ "files": [ { "path": "registry/base-lyra/ui/resizable.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/registry/base-lyra/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ResizablePanel({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: React.ComponentProps & {\n withHandle?: boolean\n}) {\n return (\n div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n
\n )}\n \n )\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle }\n", + "content": "\"use client\"\n\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/registry/base-lyra/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: ResizablePrimitive.GroupProps) {\n return (\n \n )\n}\n\nfunction ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {\n return \n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizablePrimitive.SeparatorProps & {\n withHandle?: boolean\n}) {\n return (\n div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n
\n )}\n \n )\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup }\n", "type": "registry:ui" } ], diff --git a/apps/v4/public/r/styles/base-maia/resizable-example.json b/apps/v4/public/r/styles/base-maia/resizable-example.json index cb72540b09..ab4bd41bd8 100644 --- a/apps/v4/public/r/styles/base-maia/resizable-example.json +++ b/apps/v4/public/r/styles/base-maia/resizable-example.json @@ -9,7 +9,7 @@ "files": [ { "path": "registry/base-maia/examples/resizable-example.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-maia/components/example\"\nimport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/base-maia/ui/resizable\"\n\nexport default function ResizableExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction ResizableHorizontal() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableVertical() {\n return (\n \n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableWithHandle() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableNested() {\n return (\n \n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n
\n
\n )\n}\n\nfunction ResizableControlled() {\n const [sizes, setSizes] = React.useState([30, 70])\n\n return (\n \n {\n setSizes(newSizes)\n }}\n >\n \n
\n {Math.round(sizes[0] ?? 30)}%\n
\n
\n \n \n
\n {Math.round(sizes[1] ?? 70)}%\n
\n
\n \n
\n )\n}\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\nimport type { Layout } from \"react-resizable-panels\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-maia/components/example\"\nimport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/base-maia/ui/resizable\"\n\nexport default function ResizableExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction ResizableHorizontal() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableVertical() {\n return (\n \n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableWithHandle() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableNested() {\n return (\n \n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n \n
\n )\n}\n\nfunction ResizableControlled() {\n const [layout, setLayout] = React.useState({})\n\n return (\n \n \n \n
\n \n {Math.round(layout.left ?? 30)}%\n \n
\n
\n \n \n
\n \n {Math.round(layout.right ?? 70)}%\n \n
\n
\n \n
\n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/base-maia/resizable.json b/apps/v4/public/r/styles/base-maia/resizable.json index 629f7a52ef..c1ce996b73 100644 --- a/apps/v4/public/r/styles/base-maia/resizable.json +++ b/apps/v4/public/r/styles/base-maia/resizable.json @@ -7,7 +7,7 @@ "files": [ { "path": "registry/base-maia/ui/resizable.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/registry/base-maia/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ResizablePanel({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: React.ComponentProps & {\n withHandle?: boolean\n}) {\n return (\n div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n
\n )}\n \n )\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle }\n", + "content": "\"use client\"\n\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/registry/base-maia/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: ResizablePrimitive.GroupProps) {\n return (\n \n )\n}\n\nfunction ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {\n return \n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizablePrimitive.SeparatorProps & {\n withHandle?: boolean\n}) {\n return (\n div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n
\n )}\n \n )\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup }\n", "type": "registry:ui" } ], diff --git a/apps/v4/public/r/styles/base-mira/resizable-example.json b/apps/v4/public/r/styles/base-mira/resizable-example.json index bd8bef9c8b..97ef5e8990 100644 --- a/apps/v4/public/r/styles/base-mira/resizable-example.json +++ b/apps/v4/public/r/styles/base-mira/resizable-example.json @@ -9,7 +9,7 @@ "files": [ { "path": "registry/base-mira/examples/resizable-example.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-mira/components/example\"\nimport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/base-mira/ui/resizable\"\n\nexport default function ResizableExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction ResizableHorizontal() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableVertical() {\n return (\n \n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableWithHandle() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableNested() {\n return (\n \n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n
\n
\n )\n}\n\nfunction ResizableControlled() {\n const [sizes, setSizes] = React.useState([30, 70])\n\n return (\n \n {\n setSizes(newSizes)\n }}\n >\n \n
\n {Math.round(sizes[0] ?? 30)}%\n
\n
\n \n \n
\n {Math.round(sizes[1] ?? 70)}%\n
\n
\n \n
\n )\n}\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\nimport type { Layout } from \"react-resizable-panels\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-mira/components/example\"\nimport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/base-mira/ui/resizable\"\n\nexport default function ResizableExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction ResizableHorizontal() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableVertical() {\n return (\n \n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableWithHandle() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableNested() {\n return (\n \n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n \n
\n )\n}\n\nfunction ResizableControlled() {\n const [layout, setLayout] = React.useState({})\n\n return (\n \n \n \n
\n \n {Math.round(layout.left ?? 30)}%\n \n
\n
\n \n \n
\n \n {Math.round(layout.right ?? 70)}%\n \n
\n
\n \n
\n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/base-mira/resizable.json b/apps/v4/public/r/styles/base-mira/resizable.json index c7d5bdaf46..3684df933a 100644 --- a/apps/v4/public/r/styles/base-mira/resizable.json +++ b/apps/v4/public/r/styles/base-mira/resizable.json @@ -7,7 +7,7 @@ "files": [ { "path": "registry/base-mira/ui/resizable.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/registry/base-mira/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ResizablePanel({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: React.ComponentProps & {\n withHandle?: boolean\n}) {\n return (\n div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n
\n )}\n \n )\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle }\n", + "content": "\"use client\"\n\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/registry/base-mira/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: ResizablePrimitive.GroupProps) {\n return (\n \n )\n}\n\nfunction ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {\n return \n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizablePrimitive.SeparatorProps & {\n withHandle?: boolean\n}) {\n return (\n div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n
\n )}\n \n )\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup }\n", "type": "registry:ui" } ], diff --git a/apps/v4/public/r/styles/base-nova/resizable-example.json b/apps/v4/public/r/styles/base-nova/resizable-example.json index 8472bcf78c..d86ed818fb 100644 --- a/apps/v4/public/r/styles/base-nova/resizable-example.json +++ b/apps/v4/public/r/styles/base-nova/resizable-example.json @@ -9,7 +9,7 @@ "files": [ { "path": "registry/base-nova/examples/resizable-example.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-nova/components/example\"\nimport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/base-nova/ui/resizable\"\n\nexport default function ResizableExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction ResizableHorizontal() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableVertical() {\n return (\n \n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableWithHandle() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableNested() {\n return (\n \n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n
\n
\n )\n}\n\nfunction ResizableControlled() {\n const [sizes, setSizes] = React.useState([30, 70])\n\n return (\n \n {\n setSizes(newSizes)\n }}\n >\n \n
\n {Math.round(sizes[0] ?? 30)}%\n
\n
\n \n \n
\n {Math.round(sizes[1] ?? 70)}%\n
\n
\n \n
\n )\n}\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\nimport type { Layout } from \"react-resizable-panels\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-nova/components/example\"\nimport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/base-nova/ui/resizable\"\n\nexport default function ResizableExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction ResizableHorizontal() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableVertical() {\n return (\n \n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableWithHandle() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableNested() {\n return (\n \n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n \n
\n )\n}\n\nfunction ResizableControlled() {\n const [layout, setLayout] = React.useState({})\n\n return (\n \n \n \n
\n \n {Math.round(layout.left ?? 30)}%\n \n
\n
\n \n \n
\n \n {Math.round(layout.right ?? 70)}%\n \n
\n
\n \n
\n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/base-nova/resizable.json b/apps/v4/public/r/styles/base-nova/resizable.json index e4dbfabfb4..806229059b 100644 --- a/apps/v4/public/r/styles/base-nova/resizable.json +++ b/apps/v4/public/r/styles/base-nova/resizable.json @@ -7,7 +7,7 @@ "files": [ { "path": "registry/base-nova/ui/resizable.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/registry/base-nova/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ResizablePanel({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: React.ComponentProps & {\n withHandle?: boolean\n}) {\n return (\n div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n
\n )}\n \n )\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle }\n", + "content": "\"use client\"\n\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/registry/base-nova/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: ResizablePrimitive.GroupProps) {\n return (\n \n )\n}\n\nfunction ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {\n return \n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizablePrimitive.SeparatorProps & {\n withHandle?: boolean\n}) {\n return (\n div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n
\n )}\n \n )\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup }\n", "type": "registry:ui" } ], diff --git a/apps/v4/public/r/styles/base-vega/resizable-example.json b/apps/v4/public/r/styles/base-vega/resizable-example.json index b5f6745f48..24b6f6bd48 100644 --- a/apps/v4/public/r/styles/base-vega/resizable-example.json +++ b/apps/v4/public/r/styles/base-vega/resizable-example.json @@ -9,7 +9,7 @@ "files": [ { "path": "registry/base-vega/examples/resizable-example.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-vega/components/example\"\nimport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/base-vega/ui/resizable\"\n\nexport default function ResizableExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction ResizableHorizontal() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableVertical() {\n return (\n \n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableWithHandle() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableNested() {\n return (\n \n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n
\n
\n )\n}\n\nfunction ResizableControlled() {\n const [sizes, setSizes] = React.useState([30, 70])\n\n return (\n \n {\n setSizes(newSizes)\n }}\n >\n \n
\n {Math.round(sizes[0] ?? 30)}%\n
\n
\n \n \n
\n {Math.round(sizes[1] ?? 70)}%\n
\n
\n \n
\n )\n}\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\nimport type { Layout } from \"react-resizable-panels\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-vega/components/example\"\nimport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/base-vega/ui/resizable\"\n\nexport default function ResizableExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction ResizableHorizontal() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableVertical() {\n return (\n \n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableWithHandle() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableNested() {\n return (\n \n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n \n
\n )\n}\n\nfunction ResizableControlled() {\n const [layout, setLayout] = React.useState({})\n\n return (\n \n \n \n
\n \n {Math.round(layout.left ?? 30)}%\n \n
\n
\n \n \n
\n \n {Math.round(layout.right ?? 70)}%\n \n
\n
\n \n
\n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/base-vega/resizable.json b/apps/v4/public/r/styles/base-vega/resizable.json index c9a7885172..2419a9fcbb 100644 --- a/apps/v4/public/r/styles/base-vega/resizable.json +++ b/apps/v4/public/r/styles/base-vega/resizable.json @@ -7,7 +7,7 @@ "files": [ { "path": "registry/base-vega/ui/resizable.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/registry/base-vega/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ResizablePanel({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: React.ComponentProps & {\n withHandle?: boolean\n}) {\n return (\n div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n
\n )}\n \n )\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle }\n", + "content": "\"use client\"\n\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/registry/base-vega/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: ResizablePrimitive.GroupProps) {\n return (\n \n )\n}\n\nfunction ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {\n return \n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizablePrimitive.SeparatorProps & {\n withHandle?: boolean\n}) {\n return (\n div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n
\n )}\n \n )\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup }\n", "type": "registry:ui" } ], diff --git a/apps/v4/public/r/styles/new-york-v4/resizable-demo-with-handle.json b/apps/v4/public/r/styles/new-york-v4/resizable-demo-with-handle.json index 15319e244f..4ac2d349b2 100644 --- a/apps/v4/public/r/styles/new-york-v4/resizable-demo-with-handle.json +++ b/apps/v4/public/r/styles/new-york-v4/resizable-demo-with-handle.json @@ -7,7 +7,7 @@ "files": [ { "path": "registry/new-york-v4/examples/resizable-demo-with-handle.tsx", - "content": "import {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/new-york-v4/ui/resizable\"\n\nexport default function ResizableDemo() {\n return (\n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n \n )\n}\n", + "content": "import {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/new-york-v4/ui/resizable\"\n\nexport default function ResizableDemo() {\n return (\n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n \n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/new-york-v4/resizable-demo.json b/apps/v4/public/r/styles/new-york-v4/resizable-demo.json index 7dcec3137c..ad043ce237 100644 --- a/apps/v4/public/r/styles/new-york-v4/resizable-demo.json +++ b/apps/v4/public/r/styles/new-york-v4/resizable-demo.json @@ -7,7 +7,7 @@ "files": [ { "path": "registry/new-york-v4/examples/resizable-demo.tsx", - "content": "import {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/new-york-v4/ui/resizable\"\n\nexport default function ResizableDemo() {\n return (\n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n \n )\n}\n", + "content": "import {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/new-york-v4/ui/resizable\"\n\nexport default function ResizableDemo() {\n return (\n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n \n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/new-york-v4/resizable-handle.json b/apps/v4/public/r/styles/new-york-v4/resizable-handle.json index 380a9f8613..e1ddf8dd70 100644 --- a/apps/v4/public/r/styles/new-york-v4/resizable-handle.json +++ b/apps/v4/public/r/styles/new-york-v4/resizable-handle.json @@ -7,7 +7,7 @@ "files": [ { "path": "registry/new-york-v4/examples/resizable-handle.tsx", - "content": "import {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/new-york-v4/ui/resizable\"\n\nexport default function ResizableHandleDemo() {\n return (\n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n )\n}\n", + "content": "import {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/new-york-v4/ui/resizable\"\n\nexport default function ResizableHandleDemo() {\n return (\n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/new-york-v4/resizable-vertical.json b/apps/v4/public/r/styles/new-york-v4/resizable-vertical.json index 6a4b9b4d7b..e13741ae19 100644 --- a/apps/v4/public/r/styles/new-york-v4/resizable-vertical.json +++ b/apps/v4/public/r/styles/new-york-v4/resizable-vertical.json @@ -7,7 +7,7 @@ "files": [ { "path": "registry/new-york-v4/examples/resizable-vertical.tsx", - "content": "import {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/new-york-v4/ui/resizable\"\n\nexport default function ResizableDemo() {\n return (\n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n )\n}\n", + "content": "import {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/new-york-v4/ui/resizable\"\n\nexport default function ResizableDemo() {\n return (\n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/new-york-v4/resizable.json b/apps/v4/public/r/styles/new-york-v4/resizable.json index a744bbb78e..30ff10a45d 100644 --- a/apps/v4/public/r/styles/new-york-v4/resizable.json +++ b/apps/v4/public/r/styles/new-york-v4/resizable.json @@ -7,7 +7,7 @@ "files": [ { "path": "registry/new-york-v4/ui/resizable.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { GripVerticalIcon } from \"lucide-react\"\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ResizablePanel({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: React.ComponentProps & {\n withHandle?: boolean\n}) {\n return (\n div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n
\n \n
\n )}\n \n )\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle }\n", + "content": "\"use client\"\n\nimport { GripVerticalIcon } from \"lucide-react\"\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: ResizablePrimitive.GroupProps) {\n return (\n \n )\n}\n\nfunction ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {\n return \n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizablePrimitive.SeparatorProps & {\n withHandle?: boolean\n}) {\n return (\n div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n
\n \n
\n )}\n \n )\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup }\n", "type": "registry:ui" } ], diff --git a/apps/v4/public/r/styles/radix-lyra/resizable-example.json b/apps/v4/public/r/styles/radix-lyra/resizable-example.json index 14d09a8f97..625a477af1 100644 --- a/apps/v4/public/r/styles/radix-lyra/resizable-example.json +++ b/apps/v4/public/r/styles/radix-lyra/resizable-example.json @@ -9,7 +9,7 @@ "files": [ { "path": "registry/radix-lyra/examples/resizable-example.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-lyra/components/example\"\nimport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/radix-lyra/ui/resizable\"\n\nexport default function ResizableExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction ResizableHorizontal() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableVertical() {\n return (\n \n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableWithHandle() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableNested() {\n return (\n \n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n
\n
\n )\n}\n\nfunction ResizableControlled() {\n const [sizes, setSizes] = React.useState([30, 70])\n\n return (\n \n {\n setSizes(newSizes)\n }}\n >\n \n
\n {Math.round(sizes[0] ?? 30)}%\n
\n
\n \n \n
\n {Math.round(sizes[1] ?? 70)}%\n
\n
\n \n
\n )\n}\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\nimport type { Layout } from \"react-resizable-panels\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-lyra/components/example\"\nimport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/radix-lyra/ui/resizable\"\n\nexport default function ResizableExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction ResizableHorizontal() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableVertical() {\n return (\n \n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableWithHandle() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableNested() {\n return (\n \n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n \n
\n )\n}\n\nfunction ResizableControlled() {\n const [layout, setLayout] = React.useState({})\n\n return (\n \n \n \n
\n \n {Math.round(layout.left ?? 30)}%\n \n
\n
\n \n \n
\n \n {Math.round(layout.right ?? 70)}%\n \n
\n
\n \n
\n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/radix-lyra/resizable.json b/apps/v4/public/r/styles/radix-lyra/resizable.json index 0fec519e52..a345efa152 100644 --- a/apps/v4/public/r/styles/radix-lyra/resizable.json +++ b/apps/v4/public/r/styles/radix-lyra/resizable.json @@ -7,7 +7,7 @@ "files": [ { "path": "registry/radix-lyra/ui/resizable.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/registry/radix-lyra/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ResizablePanel({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: React.ComponentProps & {\n withHandle?: boolean\n}) {\n return (\n div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n
\n )}\n \n )\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle }\n", + "content": "\"use client\"\n\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/registry/radix-lyra/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: ResizablePrimitive.GroupProps) {\n return (\n \n )\n}\n\nfunction ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {\n return \n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizablePrimitive.SeparatorProps & {\n withHandle?: boolean\n}) {\n return (\n div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n
\n )}\n \n )\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup }\n", "type": "registry:ui" } ], diff --git a/apps/v4/public/r/styles/radix-maia/resizable-example.json b/apps/v4/public/r/styles/radix-maia/resizable-example.json index 1845364907..27291ff67e 100644 --- a/apps/v4/public/r/styles/radix-maia/resizable-example.json +++ b/apps/v4/public/r/styles/radix-maia/resizable-example.json @@ -9,7 +9,7 @@ "files": [ { "path": "registry/radix-maia/examples/resizable-example.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-maia/components/example\"\nimport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/radix-maia/ui/resizable\"\n\nexport default function ResizableExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction ResizableHorizontal() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableVertical() {\n return (\n \n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableWithHandle() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableNested() {\n return (\n \n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n
\n
\n )\n}\n\nfunction ResizableControlled() {\n const [sizes, setSizes] = React.useState([30, 70])\n\n return (\n \n {\n setSizes(newSizes)\n }}\n >\n \n
\n {Math.round(sizes[0] ?? 30)}%\n
\n
\n \n \n
\n {Math.round(sizes[1] ?? 70)}%\n
\n
\n \n
\n )\n}\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\nimport type { Layout } from \"react-resizable-panels\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-maia/components/example\"\nimport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/radix-maia/ui/resizable\"\n\nexport default function ResizableExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction ResizableHorizontal() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableVertical() {\n return (\n \n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableWithHandle() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableNested() {\n return (\n \n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n \n
\n )\n}\n\nfunction ResizableControlled() {\n const [layout, setLayout] = React.useState({})\n\n return (\n \n \n \n
\n \n {Math.round(layout.left ?? 30)}%\n \n
\n
\n \n \n
\n \n {Math.round(layout.right ?? 70)}%\n \n
\n
\n \n
\n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/radix-maia/resizable.json b/apps/v4/public/r/styles/radix-maia/resizable.json index 4eaa12e122..807e16f7f8 100644 --- a/apps/v4/public/r/styles/radix-maia/resizable.json +++ b/apps/v4/public/r/styles/radix-maia/resizable.json @@ -7,7 +7,7 @@ "files": [ { "path": "registry/radix-maia/ui/resizable.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/registry/radix-maia/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ResizablePanel({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: React.ComponentProps & {\n withHandle?: boolean\n}) {\n return (\n div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n
\n )}\n \n )\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle }\n", + "content": "\"use client\"\n\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/registry/radix-maia/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: ResizablePrimitive.GroupProps) {\n return (\n \n )\n}\n\nfunction ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {\n return \n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizablePrimitive.SeparatorProps & {\n withHandle?: boolean\n}) {\n return (\n div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n
\n )}\n \n )\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup }\n", "type": "registry:ui" } ], diff --git a/apps/v4/public/r/styles/radix-mira/resizable-example.json b/apps/v4/public/r/styles/radix-mira/resizable-example.json index 07b4f8737d..b8ded1b87b 100644 --- a/apps/v4/public/r/styles/radix-mira/resizable-example.json +++ b/apps/v4/public/r/styles/radix-mira/resizable-example.json @@ -9,7 +9,7 @@ "files": [ { "path": "registry/radix-mira/examples/resizable-example.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-mira/components/example\"\nimport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/radix-mira/ui/resizable\"\n\nexport default function ResizableExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction ResizableHorizontal() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableVertical() {\n return (\n \n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableWithHandle() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableNested() {\n return (\n \n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n
\n
\n )\n}\n\nfunction ResizableControlled() {\n const [sizes, setSizes] = React.useState([30, 70])\n\n return (\n \n {\n setSizes(newSizes)\n }}\n >\n \n
\n {Math.round(sizes[0] ?? 30)}%\n
\n
\n \n \n
\n {Math.round(sizes[1] ?? 70)}%\n
\n
\n \n
\n )\n}\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\nimport type { Layout } from \"react-resizable-panels\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-mira/components/example\"\nimport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/radix-mira/ui/resizable\"\n\nexport default function ResizableExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction ResizableHorizontal() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableVertical() {\n return (\n \n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableWithHandle() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableNested() {\n return (\n \n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n \n
\n )\n}\n\nfunction ResizableControlled() {\n const [layout, setLayout] = React.useState({})\n\n return (\n \n \n \n
\n \n {Math.round(layout.left ?? 30)}%\n \n
\n
\n \n \n
\n \n {Math.round(layout.right ?? 70)}%\n \n
\n
\n \n
\n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/radix-mira/resizable.json b/apps/v4/public/r/styles/radix-mira/resizable.json index abedd6afda..89114e7dcb 100644 --- a/apps/v4/public/r/styles/radix-mira/resizable.json +++ b/apps/v4/public/r/styles/radix-mira/resizable.json @@ -7,7 +7,7 @@ "files": [ { "path": "registry/radix-mira/ui/resizable.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/registry/radix-mira/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ResizablePanel({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: React.ComponentProps & {\n withHandle?: boolean\n}) {\n return (\n div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n
\n )}\n \n )\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle }\n", + "content": "\"use client\"\n\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/registry/radix-mira/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: ResizablePrimitive.GroupProps) {\n return (\n \n )\n}\n\nfunction ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {\n return \n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizablePrimitive.SeparatorProps & {\n withHandle?: boolean\n}) {\n return (\n div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n
\n )}\n \n )\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup }\n", "type": "registry:ui" } ], diff --git a/apps/v4/public/r/styles/radix-nova/resizable-example.json b/apps/v4/public/r/styles/radix-nova/resizable-example.json index c153f434c0..0d8cf7667c 100644 --- a/apps/v4/public/r/styles/radix-nova/resizable-example.json +++ b/apps/v4/public/r/styles/radix-nova/resizable-example.json @@ -9,7 +9,7 @@ "files": [ { "path": "registry/radix-nova/examples/resizable-example.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-nova/components/example\"\nimport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/radix-nova/ui/resizable\"\n\nexport default function ResizableExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction ResizableHorizontal() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableVertical() {\n return (\n \n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableWithHandle() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableNested() {\n return (\n \n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n
\n
\n )\n}\n\nfunction ResizableControlled() {\n const [sizes, setSizes] = React.useState([30, 70])\n\n return (\n \n {\n setSizes(newSizes)\n }}\n >\n \n
\n {Math.round(sizes[0] ?? 30)}%\n
\n
\n \n \n
\n {Math.round(sizes[1] ?? 70)}%\n
\n
\n \n
\n )\n}\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\nimport type { Layout } from \"react-resizable-panels\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-nova/components/example\"\nimport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/radix-nova/ui/resizable\"\n\nexport default function ResizableExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction ResizableHorizontal() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableVertical() {\n return (\n \n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableWithHandle() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableNested() {\n return (\n \n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n \n
\n )\n}\n\nfunction ResizableControlled() {\n const [layout, setLayout] = React.useState({})\n\n return (\n \n \n \n
\n \n {Math.round(layout.left ?? 30)}%\n \n
\n
\n \n \n
\n \n {Math.round(layout.right ?? 70)}%\n \n
\n
\n \n
\n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/radix-nova/resizable.json b/apps/v4/public/r/styles/radix-nova/resizable.json index 41f3b7531f..642a9b7537 100644 --- a/apps/v4/public/r/styles/radix-nova/resizable.json +++ b/apps/v4/public/r/styles/radix-nova/resizable.json @@ -7,7 +7,7 @@ "files": [ { "path": "registry/radix-nova/ui/resizable.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/registry/radix-nova/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ResizablePanel({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: React.ComponentProps & {\n withHandle?: boolean\n}) {\n return (\n div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n
\n )}\n \n )\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle }\n", + "content": "\"use client\"\n\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/registry/radix-nova/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: ResizablePrimitive.GroupProps) {\n return (\n \n )\n}\n\nfunction ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {\n return \n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizablePrimitive.SeparatorProps & {\n withHandle?: boolean\n}) {\n return (\n div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n
\n )}\n \n )\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup }\n", "type": "registry:ui" } ], diff --git a/apps/v4/public/r/styles/radix-vega/resizable-example.json b/apps/v4/public/r/styles/radix-vega/resizable-example.json index a60ff0dc75..d56799f88d 100644 --- a/apps/v4/public/r/styles/radix-vega/resizable-example.json +++ b/apps/v4/public/r/styles/radix-vega/resizable-example.json @@ -9,7 +9,7 @@ "files": [ { "path": "registry/radix-vega/examples/resizable-example.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-vega/components/example\"\nimport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/radix-vega/ui/resizable\"\n\nexport default function ResizableExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction ResizableHorizontal() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableVertical() {\n return (\n \n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableWithHandle() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableNested() {\n return (\n \n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n
\n
\n )\n}\n\nfunction ResizableControlled() {\n const [sizes, setSizes] = React.useState([30, 70])\n\n return (\n \n {\n setSizes(newSizes)\n }}\n >\n \n
\n {Math.round(sizes[0] ?? 30)}%\n
\n
\n \n \n
\n {Math.round(sizes[1] ?? 70)}%\n
\n
\n \n
\n )\n}\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\nimport type { Layout } from \"react-resizable-panels\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-vega/components/example\"\nimport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/radix-vega/ui/resizable\"\n\nexport default function ResizableExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction ResizableHorizontal() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableVertical() {\n return (\n \n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableWithHandle() {\n return (\n \n \n \n
\n Sidebar\n
\n
\n \n \n
\n Content\n
\n
\n \n
\n )\n}\n\nfunction ResizableNested() {\n return (\n \n \n \n
\n One\n
\n
\n \n \n \n \n
\n Two\n
\n
\n \n \n
\n Three\n
\n
\n
\n
\n \n
\n )\n}\n\nfunction ResizableControlled() {\n const [layout, setLayout] = React.useState({})\n\n return (\n \n \n \n
\n \n {Math.round(layout.left ?? 30)}%\n \n
\n
\n \n \n
\n \n {Math.round(layout.right ?? 70)}%\n \n
\n
\n \n
\n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/radix-vega/resizable.json b/apps/v4/public/r/styles/radix-vega/resizable.json index c305032c7a..fb3dcb8ce0 100644 --- a/apps/v4/public/r/styles/radix-vega/resizable.json +++ b/apps/v4/public/r/styles/radix-vega/resizable.json @@ -7,7 +7,7 @@ "files": [ { "path": "registry/radix-vega/ui/resizable.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/registry/radix-vega/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ResizablePanel({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: React.ComponentProps & {\n withHandle?: boolean\n}) {\n return (\n div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n
\n )}\n \n )\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle }\n", + "content": "\"use client\"\n\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/registry/radix-vega/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: ResizablePrimitive.GroupProps) {\n return (\n \n )\n}\n\nfunction ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {\n return \n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizablePrimitive.SeparatorProps & {\n withHandle?: boolean\n}) {\n return (\n div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n
\n )}\n \n )\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup }\n", "type": "registry:ui" } ], diff --git a/apps/v4/registry/bases/base/examples/resizable-example.tsx b/apps/v4/registry/bases/base/examples/resizable-example.tsx index 4f6bfb2426..f243393cc7 100644 --- a/apps/v4/registry/bases/base/examples/resizable-example.tsx +++ b/apps/v4/registry/bases/base/examples/resizable-example.tsx @@ -1,6 +1,7 @@ "use client" import * as React from "react" +import type { Layout } from "react-resizable-panels" import { Example, @@ -28,16 +29,16 @@ function ResizableHorizontal() { return ( - +
Sidebar
- +
Content
@@ -51,16 +52,16 @@ function ResizableVertical() { return ( - +
Header
- +
Content
@@ -74,16 +75,16 @@ function ResizableWithHandle() { return ( - +
Sidebar
- +
Content
@@ -96,22 +97,25 @@ function ResizableWithHandle() { function ResizableNested() { return ( - - + +
One
- - - + + +
Two
- +
Three
@@ -124,26 +128,28 @@ function ResizableNested() { } function ResizableControlled() { - const [sizes, setSizes] = React.useState([30, 70]) + const [layout, setLayout] = React.useState({}) return ( { - setSizes(newSizes) - }} + onLayoutChange={setLayout} > - +
- {Math.round(sizes[0] ?? 30)}% + + {Math.round(layout.left ?? 30)}% +
- +
- {Math.round(sizes[1] ?? 70)}% + + {Math.round(layout.right ?? 70)}% +
diff --git a/apps/v4/registry/bases/base/ui/resizable.tsx b/apps/v4/registry/bases/base/ui/resizable.tsx index 68e5d20455..193b380200 100644 --- a/apps/v4/registry/bases/base/ui/resizable.tsx +++ b/apps/v4/registry/bases/base/ui/resizable.tsx @@ -1,6 +1,5 @@ "use client" -import * as React from "react" import * as ResizablePrimitive from "react-resizable-panels" import { cn } from "@/registry/bases/base/lib/utils" @@ -8,12 +7,12 @@ import { cn } from "@/registry/bases/base/lib/utils" function ResizablePanelGroup({ className, ...props -}: React.ComponentProps) { +}: ResizablePrimitive.GroupProps) { return ( - ) { +function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) { return } @@ -31,14 +28,14 @@ function ResizableHandle({ withHandle, className, ...props -}: React.ComponentProps & { +}: ResizablePrimitive.SeparatorProps & { withHandle?: boolean }) { return ( - div]:rotate-90", + "cn-resizable-handle bg-border focus-visible:ring-ring ring-offset-background 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:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90", className )} {...props} @@ -46,8 +43,8 @@ function ResizableHandle({ {withHandle && (
)} - + ) } -export { ResizablePanelGroup, ResizablePanel, ResizableHandle } +export { ResizableHandle, ResizablePanel, ResizablePanelGroup } diff --git a/apps/v4/registry/bases/radix/examples/resizable-example.tsx b/apps/v4/registry/bases/radix/examples/resizable-example.tsx index 1640fe607f..22fa7ffe83 100644 --- a/apps/v4/registry/bases/radix/examples/resizable-example.tsx +++ b/apps/v4/registry/bases/radix/examples/resizable-example.tsx @@ -1,6 +1,7 @@ "use client" import * as React from "react" +import type { Layout } from "react-resizable-panels" import { Example, @@ -28,16 +29,16 @@ function ResizableHorizontal() { return ( - +
Sidebar
- +
Content
@@ -51,16 +52,16 @@ function ResizableVertical() { return ( - +
Header
- +
Content
@@ -74,16 +75,16 @@ function ResizableWithHandle() { return ( - +
Sidebar
- +
Content
@@ -96,22 +97,25 @@ function ResizableWithHandle() { function ResizableNested() { return ( - - + +
One
- - - + + +
Two
- +
Three
@@ -124,26 +128,28 @@ function ResizableNested() { } function ResizableControlled() { - const [sizes, setSizes] = React.useState([30, 70]) + const [layout, setLayout] = React.useState({}) return ( { - setSizes(newSizes) - }} + onLayoutChange={setLayout} > - +
- {Math.round(sizes[0] ?? 30)}% + + {Math.round(layout.left ?? 30)}% +
- +
- {Math.round(sizes[1] ?? 70)}% + + {Math.round(layout.right ?? 70)}% +
diff --git a/apps/v4/registry/bases/radix/ui/resizable.tsx b/apps/v4/registry/bases/radix/ui/resizable.tsx index 105d9e5381..9287b2ac8e 100644 --- a/apps/v4/registry/bases/radix/ui/resizable.tsx +++ b/apps/v4/registry/bases/radix/ui/resizable.tsx @@ -1,6 +1,5 @@ "use client" -import * as React from "react" import * as ResizablePrimitive from "react-resizable-panels" import { cn } from "@/registry/bases/radix/lib/utils" @@ -8,12 +7,12 @@ import { cn } from "@/registry/bases/radix/lib/utils" function ResizablePanelGroup({ className, ...props -}: React.ComponentProps) { +}: ResizablePrimitive.GroupProps) { return ( - ) { +function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) { return } @@ -31,14 +28,14 @@ function ResizableHandle({ withHandle, className, ...props -}: React.ComponentProps & { +}: ResizablePrimitive.SeparatorProps & { withHandle?: boolean }) { return ( - div]:rotate-90", + "cn-resizable-handle bg-border focus-visible:ring-ring ring-offset-background 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:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90", className )} {...props} @@ -46,8 +43,8 @@ function ResizableHandle({ {withHandle && (
)} - + ) } -export { ResizablePanelGroup, ResizablePanel, ResizableHandle } +export { ResizableHandle, ResizablePanel, ResizablePanelGroup } diff --git a/apps/v4/registry/new-york-v4/examples/resizable-demo-with-handle.tsx b/apps/v4/registry/new-york-v4/examples/resizable-demo-with-handle.tsx index 9eeb3f2093..01e22922fb 100644 --- a/apps/v4/registry/new-york-v4/examples/resizable-demo-with-handle.tsx +++ b/apps/v4/registry/new-york-v4/examples/resizable-demo-with-handle.tsx @@ -7,24 +7,24 @@ import { export default function ResizableDemo() { return ( - +
One
- - - + + +
Two
- +
Three
diff --git a/apps/v4/registry/new-york-v4/examples/resizable-demo.tsx b/apps/v4/registry/new-york-v4/examples/resizable-demo.tsx index 8e4ba87ff2..4f79910649 100644 --- a/apps/v4/registry/new-york-v4/examples/resizable-demo.tsx +++ b/apps/v4/registry/new-york-v4/examples/resizable-demo.tsx @@ -7,24 +7,24 @@ import { export default function ResizableDemo() { return ( - +
One
- - - + + +
Two
- +
Three
diff --git a/apps/v4/registry/new-york-v4/examples/resizable-handle.tsx b/apps/v4/registry/new-york-v4/examples/resizable-handle.tsx index f07f1902ad..658cbee60c 100644 --- a/apps/v4/registry/new-york-v4/examples/resizable-handle.tsx +++ b/apps/v4/registry/new-york-v4/examples/resizable-handle.tsx @@ -7,16 +7,16 @@ import { export default function ResizableHandleDemo() { return ( - +
Sidebar
- +
Content
diff --git a/apps/v4/registry/new-york-v4/examples/resizable-vertical.tsx b/apps/v4/registry/new-york-v4/examples/resizable-vertical.tsx index acd24f9646..0123fce0bd 100644 --- a/apps/v4/registry/new-york-v4/examples/resizable-vertical.tsx +++ b/apps/v4/registry/new-york-v4/examples/resizable-vertical.tsx @@ -7,16 +7,16 @@ import { export default function ResizableDemo() { return ( - +
Header
- +
Content
diff --git a/apps/v4/registry/new-york-v4/ui/resizable.tsx b/apps/v4/registry/new-york-v4/ui/resizable.tsx index 12bbd0b8b0..bbd25ccbbf 100644 --- a/apps/v4/registry/new-york-v4/ui/resizable.tsx +++ b/apps/v4/registry/new-york-v4/ui/resizable.tsx @@ -1,6 +1,5 @@ "use client" -import * as React from "react" import { GripVerticalIcon } from "lucide-react" import * as ResizablePrimitive from "react-resizable-panels" @@ -9,12 +8,12 @@ import { cn } from "@/lib/utils" function ResizablePanelGroup({ className, ...props -}: React.ComponentProps) { +}: ResizablePrimitive.GroupProps) { return ( - ) { +function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) { return } @@ -32,14 +29,14 @@ function ResizableHandle({ withHandle, className, ...props -}: React.ComponentProps & { +}: ResizablePrimitive.SeparatorProps & { withHandle?: boolean }) { return ( - div]:rotate-90", + "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 aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90", className )} {...props} @@ -49,8 +46,8 @@ function ResizableHandle({
)} -
+ ) } -export { ResizablePanelGroup, ResizablePanel, ResizableHandle } +export { ResizableHandle, ResizablePanel, ResizablePanelGroup } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b6b45d3c0e..df5609fea4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -260,8 +260,8 @@ importers: specifier: ^7.62.0 version: 7.62.0(react@19.2.3) react-resizable-panels: - specifier: ^3.0.6 - version: 3.0.6(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + specifier: ^4 + version: 4.5.8(react-dom@19.2.3(react@19.2.3))(react@19.2.3) react-textarea-autosize: specifier: ^8.5.9 version: 8.5.9(@types/react@19.2.2)(react@19.2.3) @@ -6749,11 +6749,11 @@ packages: '@types/react': optional: true - react-resizable-panels@3.0.6: - resolution: {integrity: sha512-b3qKHQ3MLqOgSS+FRYKapNkJZf5EQzuf6+RLiq1/IlTHw99YrZ2NJZLk4hQIzTnnIkRg2LUqyVinu6YWWpUYew==} + react-resizable-panels@4.5.8: + resolution: {integrity: sha512-X2S5YoYWbjd7Ove6e6T/kzOrjiUD6ccz55a+XW0H3JXbrPb+Gmz7YRAJy4ysOkua/U5jSOG9SoySbebMBjtQJQ==} peerDependencies: - react: ^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc - react-dom: ^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 react-smooth@4.0.4: resolution: {integrity: sha512-gnGKTpYwqL0Iii09gHobNolvX4Kiq4PKx6eWBCYYix+8cdw+cGo3do906l1NBPKkSWx1DghC1dlWG9L2uGd61Q==} @@ -15041,7 +15041,7 @@ snapshots: optionalDependencies: '@types/react': 19.2.2 - react-resizable-panels@3.0.6(react-dom@19.2.3(react@19.2.3))(react@19.2.3): + react-resizable-panels@4.5.8(react-dom@19.2.3(react@19.2.3))(react@19.2.3): dependencies: react: 19.2.3 react-dom: 19.2.3(react@19.2.3)