diff --git a/apps/www/.vitepress/theme/config/docs.ts b/apps/www/.vitepress/theme/config/docs.ts index 34d2cd20..8db7b912 100644 --- a/apps/www/.vitepress/theme/config/docs.ts +++ b/apps/www/.vitepress/theme/config/docs.ts @@ -275,6 +275,12 @@ export const docsConfig: DocsConfig = { href: '/docs/components/radio-group', items: [], }, + { + title: 'Resizable', + href: '/docs/components/resizable', + label: 'New', + items: [], + }, { title: 'Scroll Area', href: '/docs/components/scroll-area', diff --git a/apps/www/__registry__/index.ts b/apps/www/__registry__/index.ts index a766e089..3df7f4a2 100644 --- a/apps/www/__registry__/index.ts +++ b/apps/www/__registry__/index.ts @@ -556,6 +556,27 @@ export const Index = { component: () => import("../src/lib/registry/default/example/RangePickerWithSlot.vue").then((m) => m.default), files: ["../src/lib/registry/default/example/RangePickerWithSlot.vue"], }, + "ResizableDemo": { + name: "ResizableDemo", + type: "components:example", + registryDependencies: ["resizable"], + component: () => import("../src/lib/registry/default/example/ResizableDemo.vue").then((m) => m.default), + files: ["../src/lib/registry/default/example/ResizableDemo.vue"], + }, + "ResizableHandleDemo": { + name: "ResizableHandleDemo", + type: "components:example", + registryDependencies: ["resizable"], + component: () => import("../src/lib/registry/default/example/ResizableHandleDemo.vue").then((m) => m.default), + files: ["../src/lib/registry/default/example/ResizableHandleDemo.vue"], + }, + "ResizableVerticalDemo": { + name: "ResizableVerticalDemo", + type: "components:example", + registryDependencies: ["resizable"], + component: () => import("../src/lib/registry/default/example/ResizableVerticalDemo.vue").then((m) => m.default), + files: ["../src/lib/registry/default/example/ResizableVerticalDemo.vue"], + }, "ScrollAreaDemo": { name: "ScrollAreaDemo", type: "components:example", @@ -1509,6 +1530,27 @@ export const Index = { component: () => import("../src/lib/registry/new-york/example/RangePickerWithSlot.vue").then((m) => m.default), files: ["../src/lib/registry/new-york/example/RangePickerWithSlot.vue"], }, + "ResizableDemo": { + name: "ResizableDemo", + type: "components:example", + registryDependencies: ["resizable"], + component: () => import("../src/lib/registry/new-york/example/ResizableDemo.vue").then((m) => m.default), + files: ["../src/lib/registry/new-york/example/ResizableDemo.vue"], + }, + "ResizableHandleDemo": { + name: "ResizableHandleDemo", + type: "components:example", + registryDependencies: ["resizable"], + component: () => import("../src/lib/registry/new-york/example/ResizableHandleDemo.vue").then((m) => m.default), + files: ["../src/lib/registry/new-york/example/ResizableHandleDemo.vue"], + }, + "ResizableVerticalDemo": { + name: "ResizableVerticalDemo", + type: "components:example", + registryDependencies: ["resizable"], + component: () => import("../src/lib/registry/new-york/example/ResizableVerticalDemo.vue").then((m) => m.default), + files: ["../src/lib/registry/new-york/example/ResizableVerticalDemo.vue"], + }, "ScrollAreaDemo": { name: "ScrollAreaDemo", type: "components:example", diff --git a/apps/www/src/content/docs/components/resizable.md b/apps/www/src/content/docs/components/resizable.md new file mode 100644 index 00000000..a5a3e073 --- /dev/null +++ b/apps/www/src/content/docs/components/resizable.md @@ -0,0 +1,105 @@ +--- +title: Resizable +description: Accessible resizable panel groups and layouts with keyboard support. +source: apps/www/src/lib/registry/default/ui/resizable +primitive: https://www.radix-vue.com/components/splitter.html +--- + + + +## Installation + + + + + + + +## Usage + +```vue + + + +``` + +## Examples + +### Vertical + +Use the direction prop to set the direction of the resizable panels. + + + +```vue:line-numbers {10} + + + +``` + +### Handle + +You can set or hide the handle by using the withHandle prop on the ResizableHandle component. + + + +```vue:line-numbers {12} + + + +``` diff --git a/apps/www/src/lib/registry/default/example/ResizableDemo.vue b/apps/www/src/lib/registry/default/example/ResizableDemo.vue new file mode 100644 index 00000000..375f5cf0 --- /dev/null +++ b/apps/www/src/lib/registry/default/example/ResizableDemo.vue @@ -0,0 +1,36 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/ResizableHandleDemo.vue b/apps/www/src/lib/registry/default/example/ResizableHandleDemo.vue new file mode 100644 index 00000000..9f1a9568 --- /dev/null +++ b/apps/www/src/lib/registry/default/example/ResizableHandleDemo.vue @@ -0,0 +1,26 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/ResizableVerticalDemo.vue b/apps/www/src/lib/registry/default/example/ResizableVerticalDemo.vue new file mode 100644 index 00000000..5395fc8f --- /dev/null +++ b/apps/www/src/lib/registry/default/example/ResizableVerticalDemo.vue @@ -0,0 +1,26 @@ + + + diff --git a/apps/www/src/lib/registry/default/ui/resizable/ResizableHandle.vue b/apps/www/src/lib/registry/default/ui/resizable/ResizableHandle.vue new file mode 100644 index 00000000..fc0cc35d --- /dev/null +++ b/apps/www/src/lib/registry/default/ui/resizable/ResizableHandle.vue @@ -0,0 +1,26 @@ + + + diff --git a/apps/www/src/lib/registry/default/ui/resizable/ResizablePanelGroup.vue b/apps/www/src/lib/registry/default/ui/resizable/ResizablePanelGroup.vue new file mode 100644 index 00000000..6c317fa7 --- /dev/null +++ b/apps/www/src/lib/registry/default/ui/resizable/ResizablePanelGroup.vue @@ -0,0 +1,21 @@ + + + diff --git a/apps/www/src/lib/registry/default/ui/resizable/index.ts b/apps/www/src/lib/registry/default/ui/resizable/index.ts new file mode 100644 index 00000000..22a0a8a8 --- /dev/null +++ b/apps/www/src/lib/registry/default/ui/resizable/index.ts @@ -0,0 +1,3 @@ +export { default as ResizablePanelGroup } from './ResizablePanelGroup.vue' +export { default as ResizableHandle } from './ResizableHandle.vue' +export { SplitterPanel as ResizablePanel } from 'radix-vue' diff --git a/apps/www/src/lib/registry/new-york/example/ResizableDemo.vue b/apps/www/src/lib/registry/new-york/example/ResizableDemo.vue new file mode 100644 index 00000000..520da52a --- /dev/null +++ b/apps/www/src/lib/registry/new-york/example/ResizableDemo.vue @@ -0,0 +1,36 @@ + + + diff --git a/apps/www/src/lib/registry/new-york/example/ResizableHandleDemo.vue b/apps/www/src/lib/registry/new-york/example/ResizableHandleDemo.vue new file mode 100644 index 00000000..2c554f5d --- /dev/null +++ b/apps/www/src/lib/registry/new-york/example/ResizableHandleDemo.vue @@ -0,0 +1,26 @@ + + + diff --git a/apps/www/src/lib/registry/new-york/example/ResizableVerticalDemo.vue b/apps/www/src/lib/registry/new-york/example/ResizableVerticalDemo.vue new file mode 100644 index 00000000..b1eb7b69 --- /dev/null +++ b/apps/www/src/lib/registry/new-york/example/ResizableVerticalDemo.vue @@ -0,0 +1,26 @@ + + + diff --git a/apps/www/src/lib/registry/new-york/ui/resizable/ResizableHandle.vue b/apps/www/src/lib/registry/new-york/ui/resizable/ResizableHandle.vue new file mode 100644 index 00000000..2cdaf66d --- /dev/null +++ b/apps/www/src/lib/registry/new-york/ui/resizable/ResizableHandle.vue @@ -0,0 +1,26 @@ + + + diff --git a/apps/www/src/lib/registry/new-york/ui/resizable/ResizablePanelGroup.vue b/apps/www/src/lib/registry/new-york/ui/resizable/ResizablePanelGroup.vue new file mode 100644 index 00000000..6c317fa7 --- /dev/null +++ b/apps/www/src/lib/registry/new-york/ui/resizable/ResizablePanelGroup.vue @@ -0,0 +1,21 @@ + + + diff --git a/apps/www/src/lib/registry/new-york/ui/resizable/index.ts b/apps/www/src/lib/registry/new-york/ui/resizable/index.ts new file mode 100644 index 00000000..22a0a8a8 --- /dev/null +++ b/apps/www/src/lib/registry/new-york/ui/resizable/index.ts @@ -0,0 +1,3 @@ +export { default as ResizablePanelGroup } from './ResizablePanelGroup.vue' +export { default as ResizableHandle } from './ResizableHandle.vue' +export { SplitterPanel as ResizablePanel } from 'radix-vue' diff --git a/apps/www/src/public/registry/index.json b/apps/www/src/public/registry/index.json index dd4e9542..1c5d1f18 100644 --- a/apps/www/src/public/registry/index.json +++ b/apps/www/src/public/registry/index.json @@ -445,6 +445,19 @@ ], "type": "components:ui" }, + { + "name": "resizable", + "dependencies": [], + "registryDependencies": [ + "utils" + ], + "files": [ + "ui/resizable/ResizableHandle.vue", + "ui/resizable/ResizablePanelGroup.vue", + "ui/resizable/index.ts" + ], + "type": "components:ui" + }, { "name": "scroll-area", "dependencies": [], @@ -685,4 +698,4 @@ ], "type": "components:ui" } -] \ No newline at end of file +] diff --git a/apps/www/src/public/registry/styles/default/resizable.json b/apps/www/src/public/registry/styles/default/resizable.json new file mode 100644 index 00000000..53b405a0 --- /dev/null +++ b/apps/www/src/public/registry/styles/default/resizable.json @@ -0,0 +1,22 @@ +{ + "name": "resizable", + "dependencies": [], + "registryDependencies": [ + "utils" + ], + "files": [ + { + "name": "ResizableHandle.vue", + "content": "\n\n\n" + }, + { + "name": "ResizablePanelGroup.vue", + "content": "\n\n\n" + }, + { + "name": "index.ts", + "content": "export { default as ResizablePanelGroup } from './ResizablePanelGroup.vue'\nexport { default as ResizableHandle } from './ResizableHandle.vue'\nexport { SplitterPanel as ResizablePanel } from 'radix-vue'\n" + } + ], + "type": "components:ui" +} diff --git a/apps/www/src/public/registry/styles/new-york/resizable.json b/apps/www/src/public/registry/styles/new-york/resizable.json new file mode 100644 index 00000000..eb2ccc2b --- /dev/null +++ b/apps/www/src/public/registry/styles/new-york/resizable.json @@ -0,0 +1,22 @@ +{ + "name": "resizable", + "dependencies": [], + "registryDependencies": [ + "utils" + ], + "files": [ + { + "name": "ResizableHandle.vue", + "content": "\n\n\n" + }, + { + "name": "ResizablePanelGroup.vue", + "content": "\n\n\n" + }, + { + "name": "index.ts", + "content": "export { default as ResizablePanelGroup } from './ResizablePanelGroup.vue'\nexport { default as ResizableHandle } from './ResizableHandle.vue'\nexport { SplitterPanel as ResizablePanel } from 'radix-vue'\n" + } + ], + "type": "components:ui" +}