diff --git a/apps/www/__registry__/default/blocks/toolbar-01/page.tsx b/apps/www/__registry__/default/blocks/toolbar-01/page.tsx new file mode 100644 index 00000000000..4d05ba11c70 --- /dev/null +++ b/apps/www/__registry__/default/blocks/toolbar-01/page.tsx @@ -0,0 +1,11 @@ +import { Toolbar } from "@/registry/default/blocks/toolbar-01/components/toolbar" + +export default function Page() { + return ( +
+
+ +
+
+ ) +} diff --git a/apps/www/__registry__/index.tsx b/apps/www/__registry__/index.tsx index 5b61ac36371..e114e188e7a 100644 --- a/apps/www/__registry__/index.tsx +++ b/apps/www/__registry__/index.tsx @@ -1234,6 +1234,25 @@ export const Index: Record = { source: "__registry__/new-york/blocks/login-05/page.tsx", meta: undefined, }, + "toolbar-01": { + name: "toolbar-01", + description: "A toolbar with action buttons.", + type: "registry:block", + registryDependencies: ["button","input","avatar","separator"], + files: [{ + path: "registry/new-york/blocks/toolbar-01/page.tsx", + type: "registry:page", + target: "app/toolbar/page.tsx" + },{ + path: "registry/new-york/blocks/toolbar-01/components/toolbar.tsx", + type: "registry:component", + target: "" + }], + categories: ["toolbar"], + component: React.lazy(() => import("@/registry/new-york/blocks/toolbar-01/page.tsx")), + source: "__registry__/new-york/blocks/toolbar-01/page.tsx", + meta: undefined, + }, "chart-area-axes": { name: "chart-area-axes", description: "", @@ -6489,6 +6508,25 @@ export const Index: Record = { source: "__registry__/default/blocks/login-05/page.tsx", meta: undefined, }, + "toolbar-01": { + name: "toolbar-01", + description: "A toolbar with action buttons.", + type: "registry:block", + registryDependencies: ["button","input","avatar","separator"], + files: [{ + path: "registry/default/blocks/toolbar-01/page.tsx", + type: "registry:page", + target: "app/toolbar/page.tsx" + },{ + path: "registry/default/blocks/toolbar-01/components/toolbar.tsx", + type: "registry:component", + target: "" + }], + categories: ["toolbar"], + component: React.lazy(() => import("@/registry/default/blocks/toolbar-01/page.tsx")), + source: "__registry__/default/blocks/toolbar-01/page.tsx", + meta: undefined, + }, "chart-area-axes": { name: "chart-area-axes", description: "", diff --git a/apps/www/__registry__/new-york/blocks/toolbar-01/page.tsx b/apps/www/__registry__/new-york/blocks/toolbar-01/page.tsx new file mode 100644 index 00000000000..f28fd21f088 --- /dev/null +++ b/apps/www/__registry__/new-york/blocks/toolbar-01/page.tsx @@ -0,0 +1,11 @@ +import { Toolbar } from "@/registry/new-york/blocks/toolbar-01/components/toolbar" + +export default function Page() { + return ( +
+
+ +
+
+ ) +} diff --git a/apps/www/public/r/styles/default/toolbar-01.json b/apps/www/public/r/styles/default/toolbar-01.json new file mode 100644 index 00000000000..1413a16139a --- /dev/null +++ b/apps/www/public/r/styles/default/toolbar-01.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "toolbar-01", + "type": "registry:block", + "author": "shadcn (https://ui.shadcn.com)", + "description": "A toolbar with action buttons.", + "registryDependencies": [ + "button", + "input", + "avatar", + "separator" + ], + "files": [ + { + "path": "blocks/toolbar-01/page.tsx", + "content": "import { Toolbar } from \"@/registry/default/blocks/toolbar-01/components/toolbar\"\n\nexport default function Page() {\n return (\n
\n
\n \n
\n
\n )\n}\n", + "type": "registry:page", + "target": "app/toolbar/page.tsx" + }, + { + "path": "blocks/toolbar-01/components/toolbar.tsx", + "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport {\n MousePointerClick,\n Plus,\n Search,\n Sparkles,\n SunMoon,\n} from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Avatar, AvatarFallback } from \"@/registry/default/ui/avatar\"\nimport { Button } from \"@/registry/default/ui/button\"\nimport { Input } from \"@/registry/default/ui/input\"\nimport { Separator } from \"@/registry/default/ui/separator\"\n\nexport function Toolbar() {\n const [search, setSearch] = useState(\"\")\n const [isActive, setIsActive] = useState(true)\n const [activeButton, setActiveButton] = useState(null)\n\n const handleButtonClick = (buttonName: string) => {\n setActiveButton(buttonName)\n setTimeout(() => setActiveButton(null), 1000)\n }\n\n const submitSearch = (e: React.FormEvent) => {\n e.preventDefault()\n setActiveButton(\"Search\")\n setSearch(\"\")\n }\n\n return (\n
\n
\n {activeButton && (\n
\n
{activeButton}
\n
\n
\n
\n
\n )}\n
\n
\n handleButtonClick(\"Theme toggle\")}\n >\n \n \n \n handleButtonClick(\"Plus\")}\n >\n \n \n handleButtonClick(\"Sparkles\")}\n >\n \n \n
\n
\n \n
\n
\n setSearch(e.target.value)}\n />\n \n
\n
\n
\n handleButtonClick(\"MousePointerClick\")}\n >\n
\n Click!\n \n
\n \n \n handleButtonClick(\"User\")}\n >\n \n D\n \n \n
\n
\n )\n}\n", + "type": "registry:component", + "target": "" + } + ], + "categories": [ + "toolbar" + ] +} \ No newline at end of file diff --git a/apps/www/public/r/styles/new-york/toolbar-01-dark.png b/apps/www/public/r/styles/new-york/toolbar-01-dark.png new file mode 100644 index 00000000000..b19c219666b Binary files /dev/null and b/apps/www/public/r/styles/new-york/toolbar-01-dark.png differ diff --git a/apps/www/public/r/styles/new-york/toolbar-01-light.png b/apps/www/public/r/styles/new-york/toolbar-01-light.png new file mode 100644 index 00000000000..a7d387a9fe4 Binary files /dev/null and b/apps/www/public/r/styles/new-york/toolbar-01-light.png differ diff --git a/apps/www/public/r/styles/new-york/toolbar-01.json b/apps/www/public/r/styles/new-york/toolbar-01.json new file mode 100644 index 00000000000..4eb0b67562c --- /dev/null +++ b/apps/www/public/r/styles/new-york/toolbar-01.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "toolbar-01", + "type": "registry:block", + "author": "shadcn (https://ui.shadcn.com)", + "description": "A toolbar with action buttons.", + "registryDependencies": [ + "button", + "input", + "avatar", + "separator" + ], + "files": [ + { + "path": "blocks/toolbar-01/page.tsx", + "content": "import { Toolbar } from \"@/registry/new-york/blocks/toolbar-01/components/toolbar\"\n\nexport default function Page() {\n return (\n
\n
\n \n
\n
\n )\n}\n", + "type": "registry:page", + "target": "app/toolbar/page.tsx" + }, + { + "path": "blocks/toolbar-01/components/toolbar.tsx", + "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport {\n MousePointerClick,\n Plus,\n Search,\n Sparkles,\n SunMoon,\n} from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Avatar, AvatarFallback } from \"@/registry/new-york/ui/avatar\"\nimport { Button } from \"@/registry/new-york/ui/button\"\nimport { Input } from \"@/registry/new-york/ui/input\"\nimport { Separator } from \"@/registry/new-york/ui/separator\"\n\nexport function Toolbar() {\n const [search, setSearch] = useState(\"\")\n const [isActive, setIsActive] = useState(true)\n const [activeButton, setActiveButton] = useState(null)\n\n const handleButtonClick = (buttonName: string) => {\n setActiveButton(buttonName)\n setTimeout(() => setActiveButton(null), 1000)\n }\n\n const submitSearch = (e: React.FormEvent) => {\n e.preventDefault()\n setActiveButton(\"Search\")\n setSearch(\"\")\n }\n\n return (\n
\n
\n {activeButton && (\n
\n
{activeButton}
\n
\n
\n
\n
\n )}\n
\n
\n handleButtonClick(\"Theme toggle\")}\n >\n \n \n \n handleButtonClick(\"Plus\")}\n >\n \n \n handleButtonClick(\"Sparkles\")}\n >\n \n \n
\n
\n \n
\n
\n setSearch(e.target.value)}\n />\n \n
\n
\n
\n handleButtonClick(\"MousePointerClick\")}\n >\n
\n Click!\n \n
\n \n \n handleButtonClick(\"User\")}\n >\n \n D\n \n \n
\n
\n )\n}\n", + "type": "registry:component", + "target": "" + } + ], + "categories": [ + "toolbar" + ] +} \ No newline at end of file diff --git a/apps/www/registry/default/blocks/toolbar-01/components/toolbar.tsx b/apps/www/registry/default/blocks/toolbar-01/components/toolbar.tsx new file mode 100644 index 00000000000..06448c04054 --- /dev/null +++ b/apps/www/registry/default/blocks/toolbar-01/components/toolbar.tsx @@ -0,0 +1,113 @@ +"use client" + +import { useState } from "react" +import { + MousePointerClick, + Plus, + Search, + Sparkles, + SunMoon, +} from "lucide-react" + +import { cn } from "@/lib/utils" +import { Avatar, AvatarFallback } from "@/registry/default/ui/avatar" +import { Button } from "@/registry/default/ui/button" +import { Input } from "@/registry/default/ui/input" +import { Separator } from "@/registry/default/ui/separator" + +export function Toolbar() { + const [search, setSearch] = useState("") + const [isActive, setIsActive] = useState(true) + const [activeButton, setActiveButton] = useState(null) + + const handleButtonClick = (buttonName: string) => { + setActiveButton(buttonName) + setTimeout(() => setActiveButton(null), 1000) + } + + const submitSearch = (e: React.FormEvent) => { + e.preventDefault() + setActiveButton("Search") + setSearch("") + } + + return ( +
+
+ {activeButton && ( +
+
{activeButton}
+
+
+
+
+ )} +
+
+ + + + +
+
+ +
+
+ setSearch(e.target.value)} + /> +
+
+
+
+ + + +
+
+ ) +} diff --git a/apps/www/registry/default/blocks/toolbar-01/page.tsx b/apps/www/registry/default/blocks/toolbar-01/page.tsx new file mode 100644 index 00000000000..4d05ba11c70 --- /dev/null +++ b/apps/www/registry/default/blocks/toolbar-01/page.tsx @@ -0,0 +1,11 @@ +import { Toolbar } from "@/registry/default/blocks/toolbar-01/components/toolbar" + +export default function Page() { + return ( +
+
+ +
+
+ ) +} diff --git a/apps/www/registry/new-york/blocks/toolbar-01/components/toolbar.tsx b/apps/www/registry/new-york/blocks/toolbar-01/components/toolbar.tsx new file mode 100644 index 00000000000..439fc588910 --- /dev/null +++ b/apps/www/registry/new-york/blocks/toolbar-01/components/toolbar.tsx @@ -0,0 +1,113 @@ +"use client" + +import { useState } from "react" +import { + MousePointerClick, + Plus, + Search, + Sparkles, + SunMoon, +} from "lucide-react" + +import { cn } from "@/lib/utils" +import { Avatar, AvatarFallback } from "@/registry/new-york/ui/avatar" +import { Button } from "@/registry/new-york/ui/button" +import { Input } from "@/registry/new-york/ui/input" +import { Separator } from "@/registry/new-york/ui/separator" + +export function Toolbar() { + const [search, setSearch] = useState("") + const [isActive, setIsActive] = useState(true) + const [activeButton, setActiveButton] = useState(null) + + const handleButtonClick = (buttonName: string) => { + setActiveButton(buttonName) + setTimeout(() => setActiveButton(null), 1000) + } + + const submitSearch = (e: React.FormEvent) => { + e.preventDefault() + setActiveButton("Search") + setSearch("") + } + + return ( +
+
+ {activeButton && ( +
+
{activeButton}
+
+
+
+
+ )} +
+
+ + + + +
+
+ +
+
+ setSearch(e.target.value)} + /> +
+
+
+
+ + + +
+
+ ) +} diff --git a/apps/www/registry/new-york/blocks/toolbar-01/page.tsx b/apps/www/registry/new-york/blocks/toolbar-01/page.tsx new file mode 100644 index 00000000000..f28fd21f088 --- /dev/null +++ b/apps/www/registry/new-york/blocks/toolbar-01/page.tsx @@ -0,0 +1,11 @@ +import { Toolbar } from "@/registry/new-york/blocks/toolbar-01/components/toolbar" + +export default function Page() { + return ( +
+
+ +
+
+ ) +} diff --git a/apps/www/registry/registry-blocks.ts b/apps/www/registry/registry-blocks.ts index 956be895488..9973c7488fc 100644 --- a/apps/www/registry/registry-blocks.ts +++ b/apps/www/registry/registry-blocks.ts @@ -567,4 +567,22 @@ export const blocks: Registry["items"] = [ ], categories: ["authentication", "login"], }, + { + name: "toolbar-01", + description: "A toolbar with action buttons.", + type: "registry:block", + registryDependencies: ["button", "input", "avatar", "separator"], + files: [ + { + path: "blocks/toolbar-01/page.tsx", + target: "app/toolbar/page.tsx", + type: "registry:page", + }, + { + path: "blocks/toolbar-01/components/toolbar.tsx", + type: "registry:component", + }, + ], + categories: ["toolbar"], + }, ] diff --git a/apps/www/registry/registry-categories.ts b/apps/www/registry/registry-categories.ts index 8687469fd0e..d1778238b31 100644 --- a/apps/www/registry/registry-categories.ts +++ b/apps/www/registry/registry-categories.ts @@ -59,4 +59,9 @@ export const registryCategories = [ slug: "charts-tooltip", hidden: true, }, + { + name: "Toolbar", + slug: "toolbar", + hidden: false, + }, ]