From b6e6588bee97f02e6c54c3cac3d091dc718805f9 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:17:29 +0700 Subject: [PATCH 001/134] test(registry): define block inventory Check the source targets for all 26 blocks in both registries. --- skills/yopem-ui/SKILL.md | 2 +- tests/cli/blocks.test.ts | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 tests/cli/blocks.test.ts diff --git a/skills/yopem-ui/SKILL.md b/skills/yopem-ui/SKILL.md index 04dcac85..1f3dfad3 100644 --- a/skills/yopem-ui/SKILL.md +++ b/skills/yopem-ui/SKILL.md @@ -38,7 +38,7 @@ its host. 4. Check the Oxlint configuration before choosing style overrides. Yopem UI copies source into the project. It does not provide a component npm -package. Do not install `@yopem-ui/ui` or substitute shadcn/Radix APIs. +package. Do not install `@yopem-ui/ui` or substitute other component APIs. The examples use the default `@/` alias. Shared workspaces use their UI package name instead. Follow the project's installed import paths. diff --git a/tests/cli/blocks.test.ts b/tests/cli/blocks.test.ts new file mode 100644 index 00000000..a70354a8 --- /dev/null +++ b/tests/cli/blocks.test.ts @@ -0,0 +1,36 @@ +import { registryItemSchema } from "@registry/schema" +import { expect, test } from "bun:test" +import { resolve } from "node:path" + +for (const provider of ["", "ark-ui/"]) { + test(`published ${provider || "base-ui"} blocks provide installable source`, async () => { + for (const [group, count] of [ + ["login", 5], + ["signup", 5], + ["sidebar", 16], + ] as const) { + for (let number = 1; number <= count; number++) { + const name = `${group}-${String(number).padStart(2, "0")}` + + const file = Bun.file( + resolve( + import.meta.dirname, + `../../apps/docs/public/r/${provider}${name}.json`, + ), + ) + + const item = registryItemSchema.parse(await file.json()) + expect(item.name).toBe(name) + expect( + item.files.some( + ({ target }) => target === `@/components/ui/${name}.tsx`, + ), + ).toBe(true) + expect(item.registryDependencies.length).toBeGreaterThan(0) + + for (const source of item.files) + expect(source.content).not.toContain("@registry/") + } + } + }) +} From 21a1d31ac538c2ee2a60e6f985d6ab1fc92e5883 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:19:41 +0700 Subject: [PATCH 002/134] test(cli): expect dedicated block paths Keep installed blocks separate from UI primitives. --- tests/cli/blocks.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cli/blocks.test.ts b/tests/cli/blocks.test.ts index a70354a8..4a95a652 100644 --- a/tests/cli/blocks.test.ts +++ b/tests/cli/blocks.test.ts @@ -23,7 +23,7 @@ for (const provider of ["", "ark-ui/"]) { expect(item.name).toBe(name) expect( item.files.some( - ({ target }) => target === `@/components/ui/${name}.tsx`, + ({ target }) => target === `@/components/blocks/${name}.tsx`, ), ).toBe(true) expect(item.registryDependencies.length).toBeGreaterThan(0) From 52a23ab979226cf2465d4bb927b24e67edc8d3f1 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:21:41 +0700 Subject: [PATCH 003/134] feat(blocks): add login and signup forms Install ten authentication layouts in components/blocks. --- .../src/catalog/previews/ark-ui/login-01.tsx | 1 + .../src/catalog/previews/ark-ui/login-02.tsx | 1 + .../src/catalog/previews/ark-ui/login-03.tsx | 1 + .../src/catalog/previews/ark-ui/login-04.tsx | 1 + .../src/catalog/previews/ark-ui/login-05.tsx | 1 + .../src/catalog/previews/ark-ui/signup-01.tsx | 1 + .../src/catalog/previews/ark-ui/signup-02.tsx | 1 + .../src/catalog/previews/ark-ui/signup-03.tsx | 1 + .../src/catalog/previews/ark-ui/signup-04.tsx | 1 + .../src/catalog/previews/ark-ui/signup-05.tsx | 1 + .../src/catalog/previews/base-ui/login-01.tsx | 1 + .../src/catalog/previews/base-ui/login-02.tsx | 1 + .../src/catalog/previews/base-ui/login-03.tsx | 1 + .../src/catalog/previews/base-ui/login-04.tsx | 1 + .../src/catalog/previews/base-ui/login-05.tsx | 1 + .../catalog/previews/base-ui/signup-01.tsx | 1 + .../catalog/previews/base-ui/signup-02.tsx | 1 + .../catalog/previews/base-ui/signup-03.tsx | 1 + .../catalog/previews/base-ui/signup-04.tsx | 1 + .../catalog/previews/base-ui/signup-05.tsx | 1 + .../src/components/blocks/login-01.tsx | 77 ++++++++++ .../src/components/blocks/login-02.tsx | 91 +++++++++++ .../src/components/blocks/login-03.tsx | 85 +++++++++++ .../src/components/blocks/login-04.tsx | 103 +++++++++++++ .../src/components/blocks/login-05.tsx | 68 +++++++++ .../src/components/blocks/signup-01.tsx | 100 +++++++++++++ .../src/components/blocks/signup-02.tsx | 114 ++++++++++++++ .../src/components/blocks/signup-03.tsx | 102 +++++++++++++ .../src/components/blocks/signup-04.tsx | 116 ++++++++++++++ .../src/components/blocks/signup-05.tsx | 68 +++++++++ packages/registry/src/docs-extract.ts | 20 ++- packages/registry/src/docs.ts | 6 +- packages/registry/src/items/blocks.ts | 141 ++++++++++++++++++ packages/registry/src/items/index.ts | 2 + packages/registry/src/source-files.ts | 1 + 35 files changed, 1111 insertions(+), 3 deletions(-) create mode 100644 apps/docs/src/catalog/previews/ark-ui/login-01.tsx create mode 100644 apps/docs/src/catalog/previews/ark-ui/login-02.tsx create mode 100644 apps/docs/src/catalog/previews/ark-ui/login-03.tsx create mode 100644 apps/docs/src/catalog/previews/ark-ui/login-04.tsx create mode 100644 apps/docs/src/catalog/previews/ark-ui/login-05.tsx create mode 100644 apps/docs/src/catalog/previews/ark-ui/signup-01.tsx create mode 100644 apps/docs/src/catalog/previews/ark-ui/signup-02.tsx create mode 100644 apps/docs/src/catalog/previews/ark-ui/signup-03.tsx create mode 100644 apps/docs/src/catalog/previews/ark-ui/signup-04.tsx create mode 100644 apps/docs/src/catalog/previews/ark-ui/signup-05.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/login-01.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/login-02.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/login-03.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/login-04.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/login-05.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/signup-01.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/signup-02.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/signup-03.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/signup-04.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/signup-05.tsx create mode 100644 packages/registry/src/components/blocks/login-01.tsx create mode 100644 packages/registry/src/components/blocks/login-02.tsx create mode 100644 packages/registry/src/components/blocks/login-03.tsx create mode 100644 packages/registry/src/components/blocks/login-04.tsx create mode 100644 packages/registry/src/components/blocks/login-05.tsx create mode 100644 packages/registry/src/components/blocks/signup-01.tsx create mode 100644 packages/registry/src/components/blocks/signup-02.tsx create mode 100644 packages/registry/src/components/blocks/signup-03.tsx create mode 100644 packages/registry/src/components/blocks/signup-04.tsx create mode 100644 packages/registry/src/components/blocks/signup-05.tsx create mode 100644 packages/registry/src/items/blocks.ts diff --git a/apps/docs/src/catalog/previews/ark-ui/login-01.tsx b/apps/docs/src/catalog/previews/ark-ui/login-01.tsx new file mode 100644 index 00000000..982fbd7d --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/login-01.tsx @@ -0,0 +1 @@ +export { Login01 as Preview } from "@registry/ark-preview-generated/login-01" diff --git a/apps/docs/src/catalog/previews/ark-ui/login-02.tsx b/apps/docs/src/catalog/previews/ark-ui/login-02.tsx new file mode 100644 index 00000000..13d847f5 --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/login-02.tsx @@ -0,0 +1 @@ +export { Login02 as Preview } from "@registry/ark-preview-generated/login-02" diff --git a/apps/docs/src/catalog/previews/ark-ui/login-03.tsx b/apps/docs/src/catalog/previews/ark-ui/login-03.tsx new file mode 100644 index 00000000..9d8ae7ab --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/login-03.tsx @@ -0,0 +1 @@ +export { Login03 as Preview } from "@registry/ark-preview-generated/login-03" diff --git a/apps/docs/src/catalog/previews/ark-ui/login-04.tsx b/apps/docs/src/catalog/previews/ark-ui/login-04.tsx new file mode 100644 index 00000000..e3d10e3c --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/login-04.tsx @@ -0,0 +1 @@ +export { Login04 as Preview } from "@registry/ark-preview-generated/login-04" diff --git a/apps/docs/src/catalog/previews/ark-ui/login-05.tsx b/apps/docs/src/catalog/previews/ark-ui/login-05.tsx new file mode 100644 index 00000000..2ddb4dc3 --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/login-05.tsx @@ -0,0 +1 @@ +export { Login05 as Preview } from "@registry/ark-preview-generated/login-05" diff --git a/apps/docs/src/catalog/previews/ark-ui/signup-01.tsx b/apps/docs/src/catalog/previews/ark-ui/signup-01.tsx new file mode 100644 index 00000000..017df648 --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/signup-01.tsx @@ -0,0 +1 @@ +export { Signup01 as Preview } from "@registry/ark-preview-generated/signup-01" diff --git a/apps/docs/src/catalog/previews/ark-ui/signup-02.tsx b/apps/docs/src/catalog/previews/ark-ui/signup-02.tsx new file mode 100644 index 00000000..63a08673 --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/signup-02.tsx @@ -0,0 +1 @@ +export { Signup02 as Preview } from "@registry/ark-preview-generated/signup-02" diff --git a/apps/docs/src/catalog/previews/ark-ui/signup-03.tsx b/apps/docs/src/catalog/previews/ark-ui/signup-03.tsx new file mode 100644 index 00000000..4a0427ae --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/signup-03.tsx @@ -0,0 +1 @@ +export { Signup03 as Preview } from "@registry/ark-preview-generated/signup-03" diff --git a/apps/docs/src/catalog/previews/ark-ui/signup-04.tsx b/apps/docs/src/catalog/previews/ark-ui/signup-04.tsx new file mode 100644 index 00000000..ba4afef7 --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/signup-04.tsx @@ -0,0 +1 @@ +export { Signup04 as Preview } from "@registry/ark-preview-generated/signup-04" diff --git a/apps/docs/src/catalog/previews/ark-ui/signup-05.tsx b/apps/docs/src/catalog/previews/ark-ui/signup-05.tsx new file mode 100644 index 00000000..2189b2b0 --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/signup-05.tsx @@ -0,0 +1 @@ +export { Signup05 as Preview } from "@registry/ark-preview-generated/signup-05" diff --git a/apps/docs/src/catalog/previews/base-ui/login-01.tsx b/apps/docs/src/catalog/previews/base-ui/login-01.tsx new file mode 100644 index 00000000..3aa6d2e1 --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/login-01.tsx @@ -0,0 +1 @@ +export { Login01 as Preview } from "@registry/components/blocks/login-01" diff --git a/apps/docs/src/catalog/previews/base-ui/login-02.tsx b/apps/docs/src/catalog/previews/base-ui/login-02.tsx new file mode 100644 index 00000000..183747eb --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/login-02.tsx @@ -0,0 +1 @@ +export { Login02 as Preview } from "@registry/components/blocks/login-02" diff --git a/apps/docs/src/catalog/previews/base-ui/login-03.tsx b/apps/docs/src/catalog/previews/base-ui/login-03.tsx new file mode 100644 index 00000000..c9a095b5 --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/login-03.tsx @@ -0,0 +1 @@ +export { Login03 as Preview } from "@registry/components/blocks/login-03" diff --git a/apps/docs/src/catalog/previews/base-ui/login-04.tsx b/apps/docs/src/catalog/previews/base-ui/login-04.tsx new file mode 100644 index 00000000..388e052d --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/login-04.tsx @@ -0,0 +1 @@ +export { Login04 as Preview } from "@registry/components/blocks/login-04" diff --git a/apps/docs/src/catalog/previews/base-ui/login-05.tsx b/apps/docs/src/catalog/previews/base-ui/login-05.tsx new file mode 100644 index 00000000..664d29f5 --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/login-05.tsx @@ -0,0 +1 @@ +export { Login05 as Preview } from "@registry/components/blocks/login-05" diff --git a/apps/docs/src/catalog/previews/base-ui/signup-01.tsx b/apps/docs/src/catalog/previews/base-ui/signup-01.tsx new file mode 100644 index 00000000..04f875a5 --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/signup-01.tsx @@ -0,0 +1 @@ +export { Signup01 as Preview } from "@registry/components/blocks/signup-01" diff --git a/apps/docs/src/catalog/previews/base-ui/signup-02.tsx b/apps/docs/src/catalog/previews/base-ui/signup-02.tsx new file mode 100644 index 00000000..41b5ed97 --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/signup-02.tsx @@ -0,0 +1 @@ +export { Signup02 as Preview } from "@registry/components/blocks/signup-02" diff --git a/apps/docs/src/catalog/previews/base-ui/signup-03.tsx b/apps/docs/src/catalog/previews/base-ui/signup-03.tsx new file mode 100644 index 00000000..752b886e --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/signup-03.tsx @@ -0,0 +1 @@ +export { Signup03 as Preview } from "@registry/components/blocks/signup-03" diff --git a/apps/docs/src/catalog/previews/base-ui/signup-04.tsx b/apps/docs/src/catalog/previews/base-ui/signup-04.tsx new file mode 100644 index 00000000..d5eaa121 --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/signup-04.tsx @@ -0,0 +1 @@ +export { Signup04 as Preview } from "@registry/components/blocks/signup-04" diff --git a/apps/docs/src/catalog/previews/base-ui/signup-05.tsx b/apps/docs/src/catalog/previews/base-ui/signup-05.tsx new file mode 100644 index 00000000..28b39b0d --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/signup-05.tsx @@ -0,0 +1 @@ +export { Signup05 as Preview } from "@registry/components/blocks/signup-05" diff --git a/packages/registry/src/components/blocks/login-01.tsx b/packages/registry/src/components/blocks/login-01.tsx new file mode 100644 index 00000000..bd3211bf --- /dev/null +++ b/packages/registry/src/components/blocks/login-01.tsx @@ -0,0 +1,77 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { Button } from "@registry/providers/base-ui/components/ui/button" +import { Card, CardPanel } from "@registry/providers/base-ui/components/ui/card" +import { + Field, + FieldLabel, +} from "@registry/providers/base-ui/components/ui/field" +import { Form } from "@registry/providers/base-ui/components/ui/form" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { Input } from "@registry/providers/base-ui/components/ui/input" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useId } from "react" + +const styles = stylex.create({ + page: { + backgroundColor: tokens["--background"], + display: "grid", + alignItems: "center", + justifyItems: "center", + padding: `calc(${tokens["--spacing"]} * 6)`, + minBlockSize: "32rem", + }, + panel: { inlineSize: "100%", maxInlineSize: "25rem" }, +}) + +export function Login01() { + const id = useId() + + return ( + + + + + + Login to your account + Enter your account details below. +
event.preventDefault()}> + + + Email + + + + Password + + + Forgot your password? + + +
+ + Sign up +
+
+
+
+
+ ) +} diff --git a/packages/registry/src/components/blocks/login-02.tsx b/packages/registry/src/components/blocks/login-02.tsx new file mode 100644 index 00000000..369be39c --- /dev/null +++ b/packages/registry/src/components/blocks/login-02.tsx @@ -0,0 +1,91 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { Button } from "@registry/providers/base-ui/components/ui/button" +import { + Field, + FieldLabel, +} from "@registry/providers/base-ui/components/ui/field" +import { Form } from "@registry/providers/base-ui/components/ui/form" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { Input } from "@registry/providers/base-ui/components/ui/input" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useId } from "react" + +const styles = stylex.create({ + page: { + backgroundColor: tokens["--background"], + display: "grid", + alignItems: "center", + justifyItems: "center", + padding: `calc(${tokens["--spacing"]} * 6)`, + minBlockSize: "32rem", + }, + split: { + display: "grid", + inlineSize: "100%", + maxInlineSize: "60rem", + alignItems: "center", + gap: `calc(${tokens["--spacing"]} * 6)`, + gridTemplateColumns: { + default: "1fr", + "@media (min-width: 48rem)": "1fr 1fr", + }, + }, + cover: { + display: { default: "none", "@media (min-width: 48rem)": "block" }, + minBlockSize: "32rem", + backgroundColor: tokens["--secondary"], + }, +}) + +export function Login02() { + const id = useId() + + return ( + + + + Acme Inc. + + Login to your account + Enter your account details below. +
event.preventDefault()}> + + + Email + + + + Password + + + Forgot your password? + + +
+ + Sign up +
+
+ +
+ ) +} diff --git a/packages/registry/src/components/blocks/login-03.tsx b/packages/registry/src/components/blocks/login-03.tsx new file mode 100644 index 00000000..06a50f96 --- /dev/null +++ b/packages/registry/src/components/blocks/login-03.tsx @@ -0,0 +1,85 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { Button } from "@registry/providers/base-ui/components/ui/button" +import { Card, CardPanel } from "@registry/providers/base-ui/components/ui/card" +import { + Field, + FieldLabel, +} from "@registry/providers/base-ui/components/ui/field" +import { Form } from "@registry/providers/base-ui/components/ui/form" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { Input } from "@registry/providers/base-ui/components/ui/input" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useId } from "react" + +const styles = stylex.create({ + page: { + backgroundColor: tokens["--muted"], + display: "grid", + alignItems: "center", + justifyItems: "center", + padding: `calc(${tokens["--spacing"]} * 6)`, + minBlockSize: "32rem", + }, + panel: { inlineSize: "100%", maxInlineSize: "25rem" }, +}) + +export function Login03() { + const id = useId() + + return ( + + + Acme Inc. + + + + Welcome back + Enter your account details below. + + +
event.preventDefault()}> + + + Email + + + + Password + + + Forgot your password? + + +
+ Sign up +
+
+
+ + By continuing, you agree to our Terms of Service{" "} + and Privacy Policy. + +
+
+ ) +} diff --git a/packages/registry/src/components/blocks/login-04.tsx b/packages/registry/src/components/blocks/login-04.tsx new file mode 100644 index 00000000..5d5343b9 --- /dev/null +++ b/packages/registry/src/components/blocks/login-04.tsx @@ -0,0 +1,103 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { Button } from "@registry/providers/base-ui/components/ui/button" +import { Card, CardPanel } from "@registry/providers/base-ui/components/ui/card" +import { + Field, + FieldLabel, +} from "@registry/providers/base-ui/components/ui/field" +import { Form } from "@registry/providers/base-ui/components/ui/form" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { Input } from "@registry/providers/base-ui/components/ui/input" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useId } from "react" + +const styles = stylex.create({ + page: { + backgroundColor: tokens["--muted"], + display: "grid", + alignItems: "center", + justifyItems: "center", + padding: `calc(${tokens["--spacing"]} * 6)`, + minBlockSize: "32rem", + }, + split: { + display: "grid", + inlineSize: "100%", + maxInlineSize: "60rem", + alignItems: "center", + gap: `calc(${tokens["--spacing"]} * 6)`, + gridTemplateColumns: { + default: "1fr", + "@media (min-width: 48rem)": "1fr 1fr", + }, + }, + cover: { + display: { default: "none", "@media (min-width: 48rem)": "block" }, + minBlockSize: "32rem", + backgroundColor: tokens["--secondary"], + }, +}) + +export function Login04() { + const id = useId() + + return ( + + + + + + Welcome back + Enter your account details below. +
event.preventDefault()}> + + + Email + + + + Password + + + Forgot your password? + + +
+ + + + Sign up +
+ +
+
+ + By continuing, you agree to our Terms of Service{" "} + and Privacy Policy. + +
+ ) +} diff --git a/packages/registry/src/components/blocks/login-05.tsx b/packages/registry/src/components/blocks/login-05.tsx new file mode 100644 index 00000000..4c0b12f1 --- /dev/null +++ b/packages/registry/src/components/blocks/login-05.tsx @@ -0,0 +1,68 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { Button } from "@registry/providers/base-ui/components/ui/button" +import { + Field, + FieldLabel, +} from "@registry/providers/base-ui/components/ui/field" +import { Form } from "@registry/providers/base-ui/components/ui/form" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { Input } from "@registry/providers/base-ui/components/ui/input" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useId } from "react" + +const styles = stylex.create({ + page: { + backgroundColor: tokens["--background"], + display: "grid", + alignItems: "center", + justifyItems: "center", + padding: `calc(${tokens["--spacing"]} * 6)`, + minBlockSize: "32rem", + }, + panel: { inlineSize: "100%", maxInlineSize: "25rem" }, +}) + +export function Login05() { + const id = useId() + + return ( + + + + Welcome to Acme Inc. + Enter your email to continue. +
event.preventDefault()}> + + + Email + + + + +
+ + + Sign up +
+ + By continuing, you agree to our Terms of Service{" "} + and Privacy Policy. + +
+
+ ) +} diff --git a/packages/registry/src/components/blocks/signup-01.tsx b/packages/registry/src/components/blocks/signup-01.tsx new file mode 100644 index 00000000..ea047f32 --- /dev/null +++ b/packages/registry/src/components/blocks/signup-01.tsx @@ -0,0 +1,100 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { Button } from "@registry/providers/base-ui/components/ui/button" +import { Card, CardPanel } from "@registry/providers/base-ui/components/ui/card" +import { + Field, + FieldLabel, +} from "@registry/providers/base-ui/components/ui/field" +import { Form } from "@registry/providers/base-ui/components/ui/form" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { Input } from "@registry/providers/base-ui/components/ui/input" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useId } from "react" + +const styles = stylex.create({ + page: { + backgroundColor: tokens["--background"], + display: "grid", + alignItems: "center", + justifyItems: "center", + padding: `calc(${tokens["--spacing"]} * 6)`, + minBlockSize: "32rem", + }, + panel: { inlineSize: "100%", maxInlineSize: "25rem" }, +}) + +export function Signup01() { + const id = useId() + + return ( + + + + + + Create your account + Enter your account details below. +
event.preventDefault()}> + + + Full name + + + + Email + + + + Password + + + + + Confirm password + + + + + +
+ + Sign in +
+
+
+
+
+ ) +} diff --git a/packages/registry/src/components/blocks/signup-02.tsx b/packages/registry/src/components/blocks/signup-02.tsx new file mode 100644 index 00000000..79c4c215 --- /dev/null +++ b/packages/registry/src/components/blocks/signup-02.tsx @@ -0,0 +1,114 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { Button } from "@registry/providers/base-ui/components/ui/button" +import { + Field, + FieldLabel, +} from "@registry/providers/base-ui/components/ui/field" +import { Form } from "@registry/providers/base-ui/components/ui/form" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { Input } from "@registry/providers/base-ui/components/ui/input" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useId } from "react" + +const styles = stylex.create({ + page: { + backgroundColor: tokens["--background"], + display: "grid", + alignItems: "center", + justifyItems: "center", + padding: `calc(${tokens["--spacing"]} * 6)`, + minBlockSize: "32rem", + }, + split: { + display: "grid", + inlineSize: "100%", + maxInlineSize: "60rem", + alignItems: "center", + gap: `calc(${tokens["--spacing"]} * 6)`, + gridTemplateColumns: { + default: "1fr", + "@media (min-width: 48rem)": "1fr 1fr", + }, + }, + cover: { + display: { default: "none", "@media (min-width: 48rem)": "block" }, + minBlockSize: "32rem", + backgroundColor: tokens["--secondary"], + }, +}) + +export function Signup02() { + const id = useId() + + return ( + + + + Acme Inc. + + Create your account + Enter your account details below. +
event.preventDefault()}> + + + Full name + + + + Email + + + + Password + + + + + Confirm password + + + + + +
+ + Sign in +
+
+ +
+ ) +} diff --git a/packages/registry/src/components/blocks/signup-03.tsx b/packages/registry/src/components/blocks/signup-03.tsx new file mode 100644 index 00000000..40ac97b4 --- /dev/null +++ b/packages/registry/src/components/blocks/signup-03.tsx @@ -0,0 +1,102 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { Button } from "@registry/providers/base-ui/components/ui/button" +import { Card, CardPanel } from "@registry/providers/base-ui/components/ui/card" +import { + Field, + FieldLabel, +} from "@registry/providers/base-ui/components/ui/field" +import { Form } from "@registry/providers/base-ui/components/ui/form" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { Input } from "@registry/providers/base-ui/components/ui/input" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useId } from "react" + +const styles = stylex.create({ + page: { + backgroundColor: tokens["--muted"], + display: "grid", + alignItems: "center", + justifyItems: "center", + padding: `calc(${tokens["--spacing"]} * 6)`, + minBlockSize: "32rem", + }, + panel: { inlineSize: "100%", maxInlineSize: "25rem" }, +}) + +export function Signup03() { + const id = useId() + + return ( + + + Acme Inc. + + + + Create your account + Enter your account details below. +
event.preventDefault()}> + + + Full name + + + + Email + + + + Password + + + + + Confirm password + + + + + +
+ Sign in +
+
+
+ + By continuing, you agree to our Terms of Service{" "} + and Privacy Policy. + +
+
+ ) +} diff --git a/packages/registry/src/components/blocks/signup-04.tsx b/packages/registry/src/components/blocks/signup-04.tsx new file mode 100644 index 00000000..8e153ec6 --- /dev/null +++ b/packages/registry/src/components/blocks/signup-04.tsx @@ -0,0 +1,116 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { Button } from "@registry/providers/base-ui/components/ui/button" +import { Card, CardPanel } from "@registry/providers/base-ui/components/ui/card" +import { + Field, + FieldLabel, +} from "@registry/providers/base-ui/components/ui/field" +import { Form } from "@registry/providers/base-ui/components/ui/form" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { Input } from "@registry/providers/base-ui/components/ui/input" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useId } from "react" + +const styles = stylex.create({ + page: { + backgroundColor: tokens["--muted"], + display: "grid", + alignItems: "center", + justifyItems: "center", + padding: `calc(${tokens["--spacing"]} * 6)`, + minBlockSize: "32rem", + }, + split: { + display: "grid", + inlineSize: "100%", + maxInlineSize: "60rem", + alignItems: "center", + gap: `calc(${tokens["--spacing"]} * 6)`, + gridTemplateColumns: { + default: "1fr", + "@media (min-width: 48rem)": "1fr 1fr", + }, + }, + cover: { + display: { default: "none", "@media (min-width: 48rem)": "block" }, + minBlockSize: "32rem", + backgroundColor: tokens["--secondary"], + }, +}) + +export function Signup04() { + const id = useId() + + return ( + + + + + + Create your account + Enter your account details below. +
event.preventDefault()}> + + + Email + + + + Password + + + + + Confirm password + + + + + +
+ + + + Sign in +
+ +
+
+ + By continuing, you agree to our Terms of Service{" "} + and Privacy Policy. + +
+ ) +} diff --git a/packages/registry/src/components/blocks/signup-05.tsx b/packages/registry/src/components/blocks/signup-05.tsx new file mode 100644 index 00000000..70f047ee --- /dev/null +++ b/packages/registry/src/components/blocks/signup-05.tsx @@ -0,0 +1,68 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { Button } from "@registry/providers/base-ui/components/ui/button" +import { + Field, + FieldLabel, +} from "@registry/providers/base-ui/components/ui/field" +import { Form } from "@registry/providers/base-ui/components/ui/form" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { Input } from "@registry/providers/base-ui/components/ui/input" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useId } from "react" + +const styles = stylex.create({ + page: { + backgroundColor: tokens["--background"], + display: "grid", + alignItems: "center", + justifyItems: "center", + padding: `calc(${tokens["--spacing"]} * 6)`, + minBlockSize: "32rem", + }, + panel: { inlineSize: "100%", maxInlineSize: "25rem" }, +}) + +export function Signup05() { + const id = useId() + + return ( + + + + Welcome to Acme Inc. + Enter your email to continue. +
event.preventDefault()}> + + + Email + + + + +
+ + + Sign in +
+ + By continuing, you agree to our Terms of Service{" "} + and Privacy Policy. + +
+
+ ) +} diff --git a/packages/registry/src/docs-extract.ts b/packages/registry/src/docs-extract.ts index 45078afd..f5441825 100644 --- a/packages/registry/src/docs-extract.ts +++ b/packages/registry/src/docs-extract.ts @@ -3,6 +3,7 @@ import { fileURLToPath } from "node:url" import { format } from "oxfmt" import ts from "typescript-api" +import { blockItems } from "./items/blocks" import { sourceItems } from "./items/index" import { getSourcePath } from "./source-files" @@ -580,9 +581,24 @@ export async function writeDocsData(data: ReturnType) { if (import.meta.main) { await writeDocsData(compactDocs(extractDocs())) await Promise.all( - ["codeblock", "file-upload", "input-group"].map(async (name) => { + [ + "codeblock", + "file-upload", + "input-group", + ...blockItems.map(({ name }) => name), + ].map(async (name) => { const file = `${name}.tsx` - const source = await Bun.file(resolve(root, "components/ui", file)).text() + + const source = await Bun.file( + resolve( + root, + blockItems.some((item) => item.name === name) + ? "components/blocks" + : "components/ui", + file, + ), + ).text() + await Bun.write( resolve(root, "ark-preview-generated", file), source.replaceAll( diff --git a/packages/registry/src/docs.ts b/packages/registry/src/docs.ts index 19b5b25c..ebf5d9c1 100644 --- a/packages/registry/src/docs.ts +++ b/packages/registry/src/docs.ts @@ -119,7 +119,11 @@ export function createComponentDocs( return catalog.map((item) => { const extracted = data.items.find((entry) => entry.name === item.name) - const notes = ark ? [item.description] : usageNotes.get(item.name) + + const notes = + ark || item.categories.includes("blocks") + ? [item.description] + : usageNotes.get(item.name) if (!extracted || !notes) throw new Error(`Missing documentation for ${item.name}`) diff --git a/packages/registry/src/items/blocks.ts b/packages/registry/src/items/blocks.ts new file mode 100644 index 00000000..ae6245a6 --- /dev/null +++ b/packages/registry/src/items/blocks.ts @@ -0,0 +1,141 @@ +import type { SourceItem } from "@registry/items/types" + +const definitions = [ + { + name: "login-01", + title: "Login01", + description: "A simple login form.", + parts: [ + "stack", + "text", + "button", + "card", + "field", + "form", + "heading", + "input", + ], + }, + { + name: "login-02", + title: "Login02", + description: "A two column login page with a cover image.", + parts: ["stack", "text", "button", "field", "form", "heading", "input"], + }, + { + name: "login-03", + title: "Login03", + description: "A login page with a muted background color.", + parts: [ + "stack", + "text", + "button", + "card", + "field", + "form", + "heading", + "input", + ], + }, + { + name: "login-04", + title: "Login04", + description: "A login page with form and image.", + parts: [ + "stack", + "text", + "button", + "card", + "field", + "form", + "heading", + "input", + ], + }, + { + name: "login-05", + title: "Login05", + description: "A simple email-only login page.", + parts: ["stack", "text", "button", "field", "form", "heading", "input"], + }, + { + name: "signup-01", + title: "Signup01", + description: "A simple signup form.", + parts: [ + "stack", + "text", + "button", + "card", + "field", + "form", + "heading", + "input", + ], + }, + { + name: "signup-02", + title: "Signup02", + description: "A two column signup page with a cover image.", + parts: ["stack", "text", "button", "field", "form", "heading", "input"], + }, + { + name: "signup-03", + title: "Signup03", + description: "A signup page with a muted background color.", + parts: [ + "stack", + "text", + "button", + "card", + "field", + "form", + "heading", + "input", + ], + }, + { + name: "signup-04", + title: "Signup04", + description: "A signup page with form and image.", + parts: [ + "stack", + "text", + "button", + "card", + "field", + "form", + "heading", + "input", + ], + }, + { + name: "signup-05", + title: "Signup05", + description: "A simple signup form with social providers.", + parts: ["stack", "text", "button", "field", "form", "heading", "input"], + }, + +] + +export const blockItems: SourceItem[] = definitions.map( + ({ name, title, description, parts }) => ({ + name, + title, + description, + categories: ["blocks"], + dependencies: [], + devDependencies: [], + peerDependencies: ["react@>=18 <20", "react-dom@>=18 <20"], + registryDependencies: ["base", ...parts], + type: "registry:ui", + docs: { api: [title], usage: `Import ${title} from the ${name} module.` }, + files: [ + { + path: `components/blocks/${name}.tsx`, + target: `@/components/blocks/${name}.tsx`, + type: "registry:ui", + }, + ], + }), +) diff --git a/packages/registry/src/items/index.ts b/packages/registry/src/items/index.ts index aa9cb9aa..921bff78 100644 --- a/packages/registry/src/items/index.ts +++ b/packages/registry/src/items/index.ts @@ -1,3 +1,4 @@ +import { blockItems } from "@registry/items/blocks" import { displayFormItems } from "@registry/items/display-form" import { foundationItems } from "@registry/items/foundation" import { hookItems } from "@registry/items/hooks" @@ -6,6 +7,7 @@ import { remainingItems } from "@registry/items/remaining" export const sourceItems = [ ...foundationItems, + ...blockItems, ...hookItems, ...layoutItems, ...displayFormItems, diff --git a/packages/registry/src/source-files.ts b/packages/registry/src/source-files.ts index be67c843..5357a2ac 100644 --- a/packages/registry/src/source-files.ts +++ b/packages/registry/src/source-files.ts @@ -16,6 +16,7 @@ export const sourceImportReplacements = [ ["@registry/providers/base-ui/components/ui/", "@/components/ui/"], ["@registry/providers/ark-ui/components/ui/", "@/components/ui/"], ["@registry/ark-preview-generated/", "@/components/ui/"], + ["@registry/components/blocks/", "@/components/blocks/"], ["@registry/components/ui/", "@/components/ui/"], ["@registry/hooks/", "@/hooks/"], ["@registry/lib/", "@/lib/"], From df285f8258d27e91fbd12c83a3b885c4b18ba452 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:23:31 +0700 Subject: [PATCH 004/134] docs(blocks): show consumer imports Use the blocks directory for copyable examples in both catalogs. --- apps/docs/src/catalog/docs.functions.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/docs/src/catalog/docs.functions.ts b/apps/docs/src/catalog/docs.functions.ts index bf8524df..30c4a06f 100644 --- a/apps/docs/src/catalog/docs.functions.ts +++ b/apps/docs/src/catalog/docs.functions.ts @@ -75,12 +75,19 @@ export async function getDocumentation({ : (previewSources[`./previews/${provider}/${slug}.tsx`] ?? previewSources[`./previews/${slug}.tsx`]) + const block = items.find((item) => item.categories.includes("blocks")) + + const blockUsage = block + ? `import { ${block.title} } from "${block.files[0]?.target.replace(/\.tsx$/, "")}"\n\nexport function Example() {\n return <${block.title} />\n}` + : null + const previewSource = - slug === "chart" + blockUsage ?? + (slug === "chart" ? (usageSnippets.get(slug) ?? null) : previewLoader ? rewriteImports(await previewLoader()) - : null + : null) const sharedExampleLoader = slug === "message" @@ -108,7 +115,7 @@ export async function getDocumentation({ }), ) - const usage = ark ? "" : (usageSnippets.get(slug) ?? "") + const usage = blockUsage ?? (ark ? "" : (usageSnippets.get(slug) ?? "")) const allItems = ark ? [] From 732d0c9642fca1fd30d4775fee861de66aa366f2 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:25:50 +0700 Subject: [PATCH 005/134] feat(blocks): add grouped sidebar layouts Add searchable sections and a collapsible navigation variant. --- .../catalog/previews/ark-ui/sidebar-01.tsx | 1 + .../catalog/previews/ark-ui/sidebar-02.tsx | 1 + .../catalog/previews/base-ui/sidebar-01.tsx | 1 + .../catalog/previews/base-ui/sidebar-02.tsx | 1 + .../src/components/blocks/sidebar-01.tsx | 146 +++++++++++++++ .../src/components/blocks/sidebar-02.tsx | 174 ++++++++++++++++++ 6 files changed, 324 insertions(+) create mode 100644 apps/docs/src/catalog/previews/ark-ui/sidebar-01.tsx create mode 100644 apps/docs/src/catalog/previews/ark-ui/sidebar-02.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/sidebar-01.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/sidebar-02.tsx create mode 100644 packages/registry/src/components/blocks/sidebar-01.tsx create mode 100644 packages/registry/src/components/blocks/sidebar-02.tsx diff --git a/apps/docs/src/catalog/previews/ark-ui/sidebar-01.tsx b/apps/docs/src/catalog/previews/ark-ui/sidebar-01.tsx new file mode 100644 index 00000000..2fd28f8a --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/sidebar-01.tsx @@ -0,0 +1 @@ +export { Sidebar01 as Preview } from "@registry/ark-preview-generated/sidebar-01" diff --git a/apps/docs/src/catalog/previews/ark-ui/sidebar-02.tsx b/apps/docs/src/catalog/previews/ark-ui/sidebar-02.tsx new file mode 100644 index 00000000..81f068da --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/sidebar-02.tsx @@ -0,0 +1 @@ +export { Sidebar02 as Preview } from "@registry/ark-preview-generated/sidebar-02" diff --git a/apps/docs/src/catalog/previews/base-ui/sidebar-01.tsx b/apps/docs/src/catalog/previews/base-ui/sidebar-01.tsx new file mode 100644 index 00000000..c8af8a42 --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/sidebar-01.tsx @@ -0,0 +1 @@ +export { Sidebar01 as Preview } from "@registry/components/blocks/sidebar-01" diff --git a/apps/docs/src/catalog/previews/base-ui/sidebar-02.tsx b/apps/docs/src/catalog/previews/base-ui/sidebar-02.tsx new file mode 100644 index 00000000..7560cf29 --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/sidebar-02.tsx @@ -0,0 +1 @@ +export { Sidebar02 as Preview } from "@registry/components/blocks/sidebar-02" diff --git a/packages/registry/src/components/blocks/sidebar-01.tsx b/packages/registry/src/components/blocks/sidebar-01.tsx new file mode 100644 index 00000000..34215e9e --- /dev/null +++ b/packages/registry/src/components/blocks/sidebar-01.tsx @@ -0,0 +1,146 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { + Sidebar, + SidebarContent, + SidebarGroup, + SidebarGroupLabel, + SidebarHeader, + SidebarInput, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + SidebarMenuText, + SidebarProvider, + SidebarRail, + SidebarTrigger, +} from "@registry/providers/base-ui/components/ui/sidebar" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useState } from "react" + +const styles = stylex.create({ + frame: { + position: "relative", + minBlockSize: "32rem", + backgroundColor: tokens["--background"], + }, + panel: { + "@media (min-width: 800px)": { position: "absolute", blockSize: "auto" }, + }, + body: { + minInlineSize: 0, + flexGrow: 1, + padding: `calc(${tokens["--spacing"]} * 4)`, + }, +}) + +export function Sidebar01() { + const [selected, setSelected] = useState("Installation") + const [search, setSearch] = useState("") + + return ( + + + + Documentation + + setSearch(event.currentTarget.value)} + /> + + + + Getting Started + + {["Installation", "Project Structure"].map((label) => + !label.toLowerCase().includes(search.toLowerCase()) ? null : ( + + setSelected(label)} + > + {label} + + + ), + )} + + + + Build Your Application + + {["Routing", "Data Fetching", "Rendering", "Caching"].map( + (label) => + !label.toLowerCase().includes(search.toLowerCase()) ? null : ( + + setSelected(label)} + > + {label} + + + ), + )} + + + + Architecture + + {["Accessibility", "Fast Refresh", "Supported Browsers"].map( + (label) => + !label.toLowerCase().includes(search.toLowerCase()) ? null : ( + + setSelected(label)} + > + {label} + + + ), + )} + + + + Community + + {["Contribution Guide"].map((label) => + !label.toLowerCase().includes(search.toLowerCase()) ? null : ( + + setSelected(label)} + > + {label} + + + ), + )} + + + + + + + + {selected} + + + ) +} diff --git a/packages/registry/src/components/blocks/sidebar-02.tsx b/packages/registry/src/components/blocks/sidebar-02.tsx new file mode 100644 index 00000000..0109a499 --- /dev/null +++ b/packages/registry/src/components/blocks/sidebar-02.tsx @@ -0,0 +1,174 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { + Collapsible, + CollapsibleTrigger, + CollapsiblePanel, +} from "@registry/providers/base-ui/components/ui/collapsible" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { + Sidebar, + SidebarContent, + SidebarGroup, + SidebarHeader, + SidebarInput, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + SidebarMenuText, + SidebarProvider, + SidebarRail, + SidebarTrigger, +} from "@registry/providers/base-ui/components/ui/sidebar" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useState } from "react" + +const styles = stylex.create({ + frame: { + position: "relative", + minBlockSize: "32rem", + backgroundColor: tokens["--background"], + }, + panel: { + "@media (min-width: 800px)": { position: "absolute", blockSize: "auto" }, + }, + body: { + minInlineSize: 0, + flexGrow: 1, + padding: `calc(${tokens["--spacing"]} * 4)`, + }, +}) + +export function Sidebar02() { + const [selected, setSelected] = useState("Installation") + const [search, setSearch] = useState("") + + return ( + + + + Documentation + + setSearch(event.currentTarget.value)} + /> + + + + + Getting Started + + + {["Installation", "Project Structure"].map((label) => + !label + .toLowerCase() + .includes(search.toLowerCase()) ? null : ( + + setSelected(label)} + > + {label} + + + ), + )} + + + + + + + Build Your Application + + + {["Routing", "Data Fetching", "Rendering", "Caching"].map( + (label) => + !label + .toLowerCase() + .includes(search.toLowerCase()) ? null : ( + + setSelected(label)} + > + {label} + + + ), + )} + + + + + + + Architecture + + + {["Accessibility", "Fast Refresh", "Supported Browsers"].map( + (label) => + !label + .toLowerCase() + .includes(search.toLowerCase()) ? null : ( + + setSelected(label)} + > + {label} + + + ), + )} + + + + + + + Community + + + {["Contribution Guide"].map((label) => + !label + .toLowerCase() + .includes(search.toLowerCase()) ? null : ( + + setSelected(label)} + > + {label} + + + ), + )} + + + + + + + + + + {selected} + + + ) +} From 916300945d2bfbfe11961523a3eb75a0917cb3a0 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:26:16 +0700 Subject: [PATCH 006/134] feat(blocks): add submenu layouts Port sidebar variants 03 04 05 and expose both provider previews. --- .../catalog/previews/ark-ui/sidebar-03.tsx | 1 + .../catalog/previews/ark-ui/sidebar-04.tsx | 1 + .../catalog/previews/ark-ui/sidebar-05.tsx | 1 + .../catalog/previews/base-ui/sidebar-03.tsx | 1 + .../catalog/previews/base-ui/sidebar-04.tsx | 1 + .../catalog/previews/base-ui/sidebar-05.tsx | 1 + .../src/components/blocks/sidebar-03.tsx | 182 ++++++++++++++++++ .../src/components/blocks/sidebar-04.tsx | 182 ++++++++++++++++++ .../src/components/blocks/sidebar-05.tsx | 165 ++++++++++++++++ 9 files changed, 535 insertions(+) create mode 100644 apps/docs/src/catalog/previews/ark-ui/sidebar-03.tsx create mode 100644 apps/docs/src/catalog/previews/ark-ui/sidebar-04.tsx create mode 100644 apps/docs/src/catalog/previews/ark-ui/sidebar-05.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/sidebar-03.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/sidebar-04.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/sidebar-05.tsx create mode 100644 packages/registry/src/components/blocks/sidebar-03.tsx create mode 100644 packages/registry/src/components/blocks/sidebar-04.tsx create mode 100644 packages/registry/src/components/blocks/sidebar-05.tsx diff --git a/apps/docs/src/catalog/previews/ark-ui/sidebar-03.tsx b/apps/docs/src/catalog/previews/ark-ui/sidebar-03.tsx new file mode 100644 index 00000000..fa975e0d --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/sidebar-03.tsx @@ -0,0 +1 @@ +export { Sidebar03 as Preview } from "@registry/ark-preview-generated/sidebar-03" diff --git a/apps/docs/src/catalog/previews/ark-ui/sidebar-04.tsx b/apps/docs/src/catalog/previews/ark-ui/sidebar-04.tsx new file mode 100644 index 00000000..2bf9f500 --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/sidebar-04.tsx @@ -0,0 +1 @@ +export { Sidebar04 as Preview } from "@registry/ark-preview-generated/sidebar-04" diff --git a/apps/docs/src/catalog/previews/ark-ui/sidebar-05.tsx b/apps/docs/src/catalog/previews/ark-ui/sidebar-05.tsx new file mode 100644 index 00000000..e704a625 --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/sidebar-05.tsx @@ -0,0 +1 @@ +export { Sidebar05 as Preview } from "@registry/ark-preview-generated/sidebar-05" diff --git a/apps/docs/src/catalog/previews/base-ui/sidebar-03.tsx b/apps/docs/src/catalog/previews/base-ui/sidebar-03.tsx new file mode 100644 index 00000000..68cbd55d --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/sidebar-03.tsx @@ -0,0 +1 @@ +export { Sidebar03 as Preview } from "@registry/components/blocks/sidebar-03" diff --git a/apps/docs/src/catalog/previews/base-ui/sidebar-04.tsx b/apps/docs/src/catalog/previews/base-ui/sidebar-04.tsx new file mode 100644 index 00000000..60f258f4 --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/sidebar-04.tsx @@ -0,0 +1 @@ +export { Sidebar04 as Preview } from "@registry/components/blocks/sidebar-04" diff --git a/apps/docs/src/catalog/previews/base-ui/sidebar-05.tsx b/apps/docs/src/catalog/previews/base-ui/sidebar-05.tsx new file mode 100644 index 00000000..9b3a4ccf --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/sidebar-05.tsx @@ -0,0 +1 @@ +export { Sidebar05 as Preview } from "@registry/components/blocks/sidebar-05" diff --git a/packages/registry/src/components/blocks/sidebar-03.tsx b/packages/registry/src/components/blocks/sidebar-03.tsx new file mode 100644 index 00000000..29b35eb6 --- /dev/null +++ b/packages/registry/src/components/blocks/sidebar-03.tsx @@ -0,0 +1,182 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { + Sidebar, + SidebarContent, + SidebarGroup, + SidebarHeader, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + SidebarMenuSub, + SidebarMenuSubButton, + SidebarMenuSubItem, + SidebarProvider, + SidebarRail, + SidebarTrigger, +} from "@registry/providers/base-ui/components/ui/sidebar" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useState } from "react" + +const styles = stylex.create({ + frame: { + position: "relative", + minBlockSize: "32rem", + backgroundColor: tokens["--background"], + }, + panel: { + "@media (min-width: 800px)": { position: "absolute", blockSize: "auto" }, + }, + body: { + minInlineSize: 0, + flexGrow: 1, + padding: `calc(${tokens["--spacing"]} * 4)`, + }, +}) + +export function Sidebar03() { + const [selected, setSelected] = useState("Installation") + + return ( + + + + Documentation + + + + + + setSelected("Getting Started")} + > + {" "} + Getting Started + + + + setSelected("Installation")} + > + Installation + + + + setSelected("Project Structure")} + > + Project Structure + + + + + + + + + + setSelected("Build Your Application")} + > + {" "} + Build Your Application + + + + setSelected("Routing")} + > + Routing + + + + setSelected("Data Fetching")} + > + Data Fetching + + + + setSelected("Rendering")} + > + Rendering + + + + setSelected("Caching")} + > + Caching + + + + + + + + + + setSelected("Architecture")}> + {" "} + Architecture + + + + setSelected("Accessibility")} + > + Accessibility + + + + setSelected("Fast Refresh")} + > + Fast Refresh + + + + setSelected("Supported Browsers")} + > + Supported Browsers + + + + + + + + + + setSelected("Community")}> + {" "} + Community + + + + setSelected("Contribution Guide")} + > + Contribution Guide + + + + + + + + + + + + {selected} + + + ) +} diff --git a/packages/registry/src/components/blocks/sidebar-04.tsx b/packages/registry/src/components/blocks/sidebar-04.tsx new file mode 100644 index 00000000..b8ab29dd --- /dev/null +++ b/packages/registry/src/components/blocks/sidebar-04.tsx @@ -0,0 +1,182 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { + Sidebar, + SidebarContent, + SidebarGroup, + SidebarHeader, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + SidebarMenuSub, + SidebarMenuSubButton, + SidebarMenuSubItem, + SidebarProvider, + SidebarRail, + SidebarTrigger, +} from "@registry/providers/base-ui/components/ui/sidebar" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useState } from "react" + +const styles = stylex.create({ + frame: { + position: "relative", + minBlockSize: "32rem", + backgroundColor: tokens["--background"], + }, + panel: { + "@media (min-width: 800px)": { position: "absolute", blockSize: "auto" }, + }, + body: { + minInlineSize: 0, + flexGrow: 1, + padding: `calc(${tokens["--spacing"]} * 4)`, + }, +}) + +export function Sidebar04() { + const [selected, setSelected] = useState("Installation") + + return ( + + + + Documentation + + + + + + setSelected("Getting Started")} + > + {" "} + Getting Started + + + + setSelected("Installation")} + > + Installation + + + + setSelected("Project Structure")} + > + Project Structure + + + + + + + + + + setSelected("Build Your Application")} + > + {" "} + Build Your Application + + + + setSelected("Routing")} + > + Routing + + + + setSelected("Data Fetching")} + > + Data Fetching + + + + setSelected("Rendering")} + > + Rendering + + + + setSelected("Caching")} + > + Caching + + + + + + + + + + setSelected("Architecture")}> + {" "} + Architecture + + + + setSelected("Accessibility")} + > + Accessibility + + + + setSelected("Fast Refresh")} + > + Fast Refresh + + + + setSelected("Supported Browsers")} + > + Supported Browsers + + + + + + + + + + setSelected("Community")}> + {" "} + Community + + + + setSelected("Contribution Guide")} + > + Contribution Guide + + + + + + + + + + + + {selected} + + + ) +} diff --git a/packages/registry/src/components/blocks/sidebar-05.tsx b/packages/registry/src/components/blocks/sidebar-05.tsx new file mode 100644 index 00000000..d19ddb97 --- /dev/null +++ b/packages/registry/src/components/blocks/sidebar-05.tsx @@ -0,0 +1,165 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { + Collapsible, + CollapsibleTrigger, + CollapsiblePanel, +} from "@registry/providers/base-ui/components/ui/collapsible" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { + Sidebar, + SidebarContent, + SidebarGroup, + SidebarHeader, + SidebarInput, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + SidebarMenuText, + SidebarProvider, + SidebarRail, + SidebarTrigger, +} from "@registry/providers/base-ui/components/ui/sidebar" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useState } from "react" + +const styles = stylex.create({ + frame: { + position: "relative", + minBlockSize: "32rem", + backgroundColor: tokens["--background"], + }, + panel: { + "@media (min-width: 800px)": { position: "absolute", blockSize: "auto" }, + }, + body: { + minInlineSize: 0, + flexGrow: 1, + padding: `calc(${tokens["--spacing"]} * 4)`, + }, +}) + +export function Sidebar05() { + const [selected, setSelected] = useState("Installation") + const [search, setSearch] = useState("") + + return ( + + + + Documentation + setSearch(event.currentTarget.value)} + /> + + + + + Getting Started + + + {["Installation", "Project Structure"].map((label) => + !label + .toLowerCase() + .includes(search.toLowerCase()) ? null : ( + + setSelected(label)} + > + {label} + + + ), + )} + + + + + + + Build Your Application + + + {["Routing", "Data Fetching", "Rendering", "Caching"].map( + (label) => + !label + .toLowerCase() + .includes(search.toLowerCase()) ? null : ( + + setSelected(label)} + > + {label} + + + ), + )} + + + + + + + Architecture + + + {["Accessibility", "Fast Refresh", "Supported Browsers"].map( + (label) => + !label + .toLowerCase() + .includes(search.toLowerCase()) ? null : ( + + setSelected(label)} + > + {label} + + + ), + )} + + + + + + + Community + + + {["Contribution Guide"].map((label) => + !label + .toLowerCase() + .includes(search.toLowerCase()) ? null : ( + + setSelected(label)} + > + {label} + + + ), + )} + + + + + + + + + + {selected} + + + ) +} From 1d6a6566baf18d3d8279511831747253ec22389d Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:26:22 +0700 Subject: [PATCH 007/134] feat(blocks): add workspace navigation Port sidebar variants 06 07 08 and expose both provider previews. --- .../catalog/previews/ark-ui/sidebar-06.tsx | 1 + .../catalog/previews/ark-ui/sidebar-07.tsx | 1 + .../catalog/previews/ark-ui/sidebar-08.tsx | 1 + .../catalog/previews/base-ui/sidebar-06.tsx | 1 + .../catalog/previews/base-ui/sidebar-07.tsx | 1 + .../catalog/previews/base-ui/sidebar-08.tsx | 1 + .../src/components/blocks/sidebar-06.tsx | 167 ++++++++++++++++++ .../src/components/blocks/sidebar-07.tsx | 150 ++++++++++++++++ .../src/components/blocks/sidebar-08.tsx | 137 ++++++++++++++ 9 files changed, 460 insertions(+) create mode 100644 apps/docs/src/catalog/previews/ark-ui/sidebar-06.tsx create mode 100644 apps/docs/src/catalog/previews/ark-ui/sidebar-07.tsx create mode 100644 apps/docs/src/catalog/previews/ark-ui/sidebar-08.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/sidebar-06.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/sidebar-07.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/sidebar-08.tsx create mode 100644 packages/registry/src/components/blocks/sidebar-06.tsx create mode 100644 packages/registry/src/components/blocks/sidebar-07.tsx create mode 100644 packages/registry/src/components/blocks/sidebar-08.tsx diff --git a/apps/docs/src/catalog/previews/ark-ui/sidebar-06.tsx b/apps/docs/src/catalog/previews/ark-ui/sidebar-06.tsx new file mode 100644 index 00000000..650ca634 --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/sidebar-06.tsx @@ -0,0 +1 @@ +export { Sidebar06 as Preview } from "@registry/ark-preview-generated/sidebar-06" diff --git a/apps/docs/src/catalog/previews/ark-ui/sidebar-07.tsx b/apps/docs/src/catalog/previews/ark-ui/sidebar-07.tsx new file mode 100644 index 00000000..e9d56a4d --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/sidebar-07.tsx @@ -0,0 +1 @@ +export { Sidebar07 as Preview } from "@registry/ark-preview-generated/sidebar-07" diff --git a/apps/docs/src/catalog/previews/ark-ui/sidebar-08.tsx b/apps/docs/src/catalog/previews/ark-ui/sidebar-08.tsx new file mode 100644 index 00000000..809b8c82 --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/sidebar-08.tsx @@ -0,0 +1 @@ +export { Sidebar08 as Preview } from "@registry/ark-preview-generated/sidebar-08" diff --git a/apps/docs/src/catalog/previews/base-ui/sidebar-06.tsx b/apps/docs/src/catalog/previews/base-ui/sidebar-06.tsx new file mode 100644 index 00000000..f74024a1 --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/sidebar-06.tsx @@ -0,0 +1 @@ +export { Sidebar06 as Preview } from "@registry/components/blocks/sidebar-06" diff --git a/apps/docs/src/catalog/previews/base-ui/sidebar-07.tsx b/apps/docs/src/catalog/previews/base-ui/sidebar-07.tsx new file mode 100644 index 00000000..6db5bce8 --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/sidebar-07.tsx @@ -0,0 +1 @@ +export { Sidebar07 as Preview } from "@registry/components/blocks/sidebar-07" diff --git a/apps/docs/src/catalog/previews/base-ui/sidebar-08.tsx b/apps/docs/src/catalog/previews/base-ui/sidebar-08.tsx new file mode 100644 index 00000000..72d9efc5 --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/sidebar-08.tsx @@ -0,0 +1 @@ +export { Sidebar08 as Preview } from "@registry/components/blocks/sidebar-08" diff --git a/packages/registry/src/components/blocks/sidebar-06.tsx b/packages/registry/src/components/blocks/sidebar-06.tsx new file mode 100644 index 00000000..bef849bb --- /dev/null +++ b/packages/registry/src/components/blocks/sidebar-06.tsx @@ -0,0 +1,167 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { Button } from "@registry/providers/base-ui/components/ui/button" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { Input } from "@registry/providers/base-ui/components/ui/input" +import { + Menu, + MenuTrigger, + MenuPopup, + MenuRadioGroup, + MenuRadioItem, +} from "@registry/providers/base-ui/components/ui/menu" +import { + Sidebar, + SidebarContent, + SidebarFooter, + SidebarGroup, + SidebarHeader, + SidebarProvider, + SidebarRail, + SidebarTrigger, +} from "@registry/providers/base-ui/components/ui/sidebar" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useState } from "react" + +const styles = stylex.create({ + frame: { + position: "relative", + minBlockSize: "32rem", + backgroundColor: tokens["--background"], + }, + panel: { + "@media (min-width: 800px)": { position: "absolute", blockSize: "auto" }, + }, + body: { + minInlineSize: 0, + flexGrow: 1, + padding: `calc(${tokens["--spacing"]} * 4)`, + }, +}) + +export function Sidebar06() { + const [selected, setSelected] = useState("Installation") + + return ( + + + + Documentation + + + + + Getting Started + + + setSelected("Installation")} + > + Installation + + setSelected("Project Structure")} + > + Project Structure + + + + + + + + Build Your Application + + + setSelected("Routing")} + > + Routing + + setSelected("Data Fetching")} + > + Data Fetching + + setSelected("Rendering")} + > + Rendering + + setSelected("Caching")} + > + Caching + + + + + + + + Architecture + + + setSelected("Accessibility")} + > + Accessibility + + setSelected("Fast Refresh")} + > + Fast Refresh + + setSelected("Supported Browsers")} + > + Supported Browsers + + + + + + + + Community + + + setSelected("Contribution Guide")} + > + Contribution Guide + + + + + + + +
event.preventDefault()}> + Subscribe to updates + + +
+
+ +
+ + + {selected} + +
+ ) +} diff --git a/packages/registry/src/components/blocks/sidebar-07.tsx b/packages/registry/src/components/blocks/sidebar-07.tsx new file mode 100644 index 00000000..c4024e74 --- /dev/null +++ b/packages/registry/src/components/blocks/sidebar-07.tsx @@ -0,0 +1,150 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { + Menu, + MenuTrigger, + MenuPopup, + MenuRadioGroup, + MenuRadioItem, +} from "@registry/providers/base-ui/components/ui/menu" +import { + Sidebar, + SidebarContent, + SidebarFooter, + SidebarGroup, + SidebarGroupLabel, + SidebarHeader, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + SidebarMenuText, + SidebarProvider, + SidebarRail, + SidebarTrigger, +} from "@registry/providers/base-ui/components/ui/sidebar" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { FolderIcon } from "lucide-react" +import { useState } from "react" + +const styles = stylex.create({ + frame: { + position: "relative", + minBlockSize: "32rem", + backgroundColor: tokens["--background"], + }, + panel: { + "@media (min-width: 800px)": { position: "absolute", blockSize: "auto" }, + }, + body: { + minInlineSize: 0, + flexGrow: 1, + padding: `calc(${tokens["--spacing"]} * 4)`, + }, +}) + +export function Sidebar07() { + const [selected, setSelected] = useState("Playground") + + return ( + + + + Acme Inc. + + + + + Platform + + {["Playground", "Models", "Documentation", "Settings"].map( + (label) => ( + + setSelected(label)} + > + + + ), + )} + + + + Projects + + {["Design Engineering", "Sales & Marketing", "Travel"].map( + (label) => ( + + setSelected(label)} + > + + + ), + )} + + + + Support + + {["Get help", "Feedback"].map((label) => ( + + setSelected(label)} + > + + + ))} + + + + + + Account + + + setSelected("Profile")} + > + Profile + + setSelected("Preferences")} + > + Preferences + + + + + + + + + + {selected} + + + ) +} diff --git a/packages/registry/src/components/blocks/sidebar-08.tsx b/packages/registry/src/components/blocks/sidebar-08.tsx new file mode 100644 index 00000000..36124dab --- /dev/null +++ b/packages/registry/src/components/blocks/sidebar-08.tsx @@ -0,0 +1,137 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { + Menu, + MenuTrigger, + MenuPopup, + MenuRadioGroup, + MenuRadioItem, +} from "@registry/providers/base-ui/components/ui/menu" +import { + Sidebar, + SidebarContent, + SidebarFooter, + SidebarGroup, + SidebarGroupLabel, + SidebarHeader, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + SidebarMenuText, + SidebarProvider, + SidebarRail, + SidebarTrigger, +} from "@registry/providers/base-ui/components/ui/sidebar" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useState } from "react" + +const styles = stylex.create({ + frame: { + position: "relative", + minBlockSize: "32rem", + backgroundColor: tokens["--background"], + }, + panel: { + "@media (min-width: 800px)": { position: "absolute", blockSize: "auto" }, + }, + body: { + minInlineSize: 0, + flexGrow: 1, + padding: `calc(${tokens["--spacing"]} * 4)`, + }, +}) + +export function Sidebar08() { + const [selected, setSelected] = useState("Playground") + + return ( + + + + Acme Inc. + + + + Platform + + {["Playground", "Models", "Documentation", "Settings"].map( + (label) => ( + + setSelected(label)} + > + {label} + + + ), + )} + + + + Projects + + {["Design Engineering", "Sales & Marketing", "Travel"].map( + (label) => ( + + setSelected(label)} + > + {label} + + + ), + )} + + + + Support + + {["Get help", "Feedback"].map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + + + + Account + + + setSelected("Profile")} + > + Profile + + setSelected("Preferences")} + > + Preferences + + + + + + + + + + {selected} + + + ) +} From a904cd7ba8a679c5babe71da7731955c8ffb5fd3 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:26:27 +0700 Subject: [PATCH 008/134] feat(blocks): add mail and page actions Port sidebar variants 09 10 and expose both provider previews. --- .../catalog/previews/ark-ui/sidebar-09.tsx | 1 + .../catalog/previews/ark-ui/sidebar-10.tsx | 1 + .../catalog/previews/base-ui/sidebar-09.tsx | 1 + .../catalog/previews/base-ui/sidebar-10.tsx | 1 + .../src/components/blocks/sidebar-09.tsx | 121 +++++++++++++++ .../src/components/blocks/sidebar-10.tsx | 140 ++++++++++++++++++ 6 files changed, 265 insertions(+) create mode 100644 apps/docs/src/catalog/previews/ark-ui/sidebar-09.tsx create mode 100644 apps/docs/src/catalog/previews/ark-ui/sidebar-10.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/sidebar-09.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/sidebar-10.tsx create mode 100644 packages/registry/src/components/blocks/sidebar-09.tsx create mode 100644 packages/registry/src/components/blocks/sidebar-10.tsx diff --git a/apps/docs/src/catalog/previews/ark-ui/sidebar-09.tsx b/apps/docs/src/catalog/previews/ark-ui/sidebar-09.tsx new file mode 100644 index 00000000..98095393 --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/sidebar-09.tsx @@ -0,0 +1 @@ +export { Sidebar09 as Preview } from "@registry/ark-preview-generated/sidebar-09" diff --git a/apps/docs/src/catalog/previews/ark-ui/sidebar-10.tsx b/apps/docs/src/catalog/previews/ark-ui/sidebar-10.tsx new file mode 100644 index 00000000..067a1109 --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/sidebar-10.tsx @@ -0,0 +1 @@ +export { Sidebar10 as Preview } from "@registry/ark-preview-generated/sidebar-10" diff --git a/apps/docs/src/catalog/previews/base-ui/sidebar-09.tsx b/apps/docs/src/catalog/previews/base-ui/sidebar-09.tsx new file mode 100644 index 00000000..3f6be3b1 --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/sidebar-09.tsx @@ -0,0 +1 @@ +export { Sidebar09 as Preview } from "@registry/components/blocks/sidebar-09" diff --git a/apps/docs/src/catalog/previews/base-ui/sidebar-10.tsx b/apps/docs/src/catalog/previews/base-ui/sidebar-10.tsx new file mode 100644 index 00000000..422a6f56 --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/sidebar-10.tsx @@ -0,0 +1 @@ +export { Sidebar10 as Preview } from "@registry/components/blocks/sidebar-10" diff --git a/packages/registry/src/components/blocks/sidebar-09.tsx b/packages/registry/src/components/blocks/sidebar-09.tsx new file mode 100644 index 00000000..45458874 --- /dev/null +++ b/packages/registry/src/components/blocks/sidebar-09.tsx @@ -0,0 +1,121 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { + Menu, + MenuTrigger, + MenuPopup, + MenuRadioGroup, + MenuRadioItem, +} from "@registry/providers/base-ui/components/ui/menu" +import { + Sidebar, + SidebarContent, + SidebarFooter, + SidebarGroup, + SidebarGroupLabel, + SidebarHeader, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + SidebarMenuText, + SidebarProvider, + SidebarRail, + SidebarTrigger, +} from "@registry/providers/base-ui/components/ui/sidebar" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useState } from "react" + +const styles = stylex.create({ + frame: { + position: "relative", + minBlockSize: "32rem", + backgroundColor: tokens["--background"], + }, + panel: { + "@media (min-width: 800px)": { position: "absolute", blockSize: "auto" }, + }, + body: { + minInlineSize: 0, + flexGrow: 1, + padding: `calc(${tokens["--spacing"]} * 4)`, + }, +}) + +export function Sidebar09() { + const [selected, setSelected] = useState("Inbox") + const [message, setMessage] = useState("Weekly update") + + return ( + + + + Mail + + + + Mail + + {["Inbox", "Drafts", "Sent", "Junk", "Trash"].map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + + + + Account + + + setSelected("Profile")} + > + Profile + + setSelected("Preferences")} + > + Preferences + + + + + + + + + + {selected} + + + setMessage("Weekly update")}> + Weekly update + + setMessage("Team meeting")}> + Team meeting + + setMessage("Project notes")}> + Project notes + + + + + + {selected} + {message} + + + ) +} diff --git a/packages/registry/src/components/blocks/sidebar-10.tsx b/packages/registry/src/components/blocks/sidebar-10.tsx new file mode 100644 index 00000000..c8b843b7 --- /dev/null +++ b/packages/registry/src/components/blocks/sidebar-10.tsx @@ -0,0 +1,140 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { + Popover, + PopoverTrigger, + PopoverPopup, +} from "@registry/providers/base-ui/components/ui/popover" +import { + Sidebar, + SidebarContent, + SidebarGroup, + SidebarGroupLabel, + SidebarHeader, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + SidebarMenuText, + SidebarProvider, + SidebarRail, + SidebarTrigger, +} from "@registry/providers/base-ui/components/ui/sidebar" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useState } from "react" + +const styles = stylex.create({ + frame: { + position: "relative", + minBlockSize: "32rem", + backgroundColor: tokens["--background"], + }, + panel: { + "@media (min-width: 800px)": { position: "absolute", blockSize: "auto" }, + }, + body: { + minInlineSize: 0, + flexGrow: 1, + padding: `calc(${tokens["--spacing"]} * 4)`, + }, +}) + +export function Sidebar10() { + const [selected, setSelected] = useState("Home") + + return ( + + + + Workspace + + + + + Workspace + + {["Search", "Ask AI", "Home", "Inbox"].map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + + Favorites + + {["Project Management", "Personal Life"].map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + + Workspaces + + {["Design Engineering", "Sales & Marketing"].map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + + + + + + + Page actions + + + + setSelected("Customize page")} + > + Customize page + + setSelected("Turn into wiki")} + > + Turn into wiki + + setSelected("Move to")}> + Move to + + + + + + {selected} + + + ) +} From abccd9538b564e88f9d36bd7cddbad427251c05c Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:26:32 +0700 Subject: [PATCH 009/134] feat(blocks): add file and calendar views Port sidebar variants 11 12 and expose both provider previews. --- .../catalog/previews/ark-ui/sidebar-11.tsx | 1 + .../catalog/previews/ark-ui/sidebar-12.tsx | 1 + .../catalog/previews/base-ui/sidebar-11.tsx | 1 + .../catalog/previews/base-ui/sidebar-12.tsx | 1 + .../src/components/blocks/sidebar-11.tsx | 120 +++++++++++++++++ .../src/components/blocks/sidebar-12.tsx | 122 ++++++++++++++++++ 6 files changed, 246 insertions(+) create mode 100644 apps/docs/src/catalog/previews/ark-ui/sidebar-11.tsx create mode 100644 apps/docs/src/catalog/previews/ark-ui/sidebar-12.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/sidebar-11.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/sidebar-12.tsx create mode 100644 packages/registry/src/components/blocks/sidebar-11.tsx create mode 100644 packages/registry/src/components/blocks/sidebar-12.tsx diff --git a/apps/docs/src/catalog/previews/ark-ui/sidebar-11.tsx b/apps/docs/src/catalog/previews/ark-ui/sidebar-11.tsx new file mode 100644 index 00000000..317d41f4 --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/sidebar-11.tsx @@ -0,0 +1 @@ +export { Sidebar11 as Preview } from "@registry/ark-preview-generated/sidebar-11" diff --git a/apps/docs/src/catalog/previews/ark-ui/sidebar-12.tsx b/apps/docs/src/catalog/previews/ark-ui/sidebar-12.tsx new file mode 100644 index 00000000..675256a7 --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/sidebar-12.tsx @@ -0,0 +1 @@ +export { Sidebar12 as Preview } from "@registry/ark-preview-generated/sidebar-12" diff --git a/apps/docs/src/catalog/previews/base-ui/sidebar-11.tsx b/apps/docs/src/catalog/previews/base-ui/sidebar-11.tsx new file mode 100644 index 00000000..9fa21cf5 --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/sidebar-11.tsx @@ -0,0 +1 @@ +export { Sidebar11 as Preview } from "@registry/components/blocks/sidebar-11" diff --git a/apps/docs/src/catalog/previews/base-ui/sidebar-12.tsx b/apps/docs/src/catalog/previews/base-ui/sidebar-12.tsx new file mode 100644 index 00000000..3d84ba57 --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/sidebar-12.tsx @@ -0,0 +1 @@ +export { Sidebar12 as Preview } from "@registry/components/blocks/sidebar-12" diff --git a/packages/registry/src/components/blocks/sidebar-11.tsx b/packages/registry/src/components/blocks/sidebar-11.tsx new file mode 100644 index 00000000..1a399774 --- /dev/null +++ b/packages/registry/src/components/blocks/sidebar-11.tsx @@ -0,0 +1,120 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { + Collapsible, + CollapsibleTrigger, + CollapsiblePanel, +} from "@registry/providers/base-ui/components/ui/collapsible" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { + Sidebar, + SidebarContent, + SidebarGroup, + SidebarHeader, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + SidebarMenuText, + SidebarProvider, + SidebarRail, + SidebarTrigger, +} from "@registry/providers/base-ui/components/ui/sidebar" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useState } from "react" + +const styles = stylex.create({ + frame: { + position: "relative", + minBlockSize: "32rem", + backgroundColor: tokens["--background"], + }, + panel: { + "@media (min-width: 800px)": { position: "absolute", blockSize: "auto" }, + }, + body: { + minInlineSize: 0, + flexGrow: 1, + padding: `calc(${tokens["--spacing"]} * 4)`, + }, +}) + +export function Sidebar11() { + const [selected, setSelected] = useState("page.tsx") + + return ( + + + + Files + + + + + app + + + {["layout.tsx", "page.tsx"].map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + + + + + components + + + {["button.tsx", "dialog.tsx"].map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + + + + + lib + + + {["utils.ts"].map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + + + + + + + + {selected} + + + ) +} diff --git a/packages/registry/src/components/blocks/sidebar-12.tsx b/packages/registry/src/components/blocks/sidebar-12.tsx new file mode 100644 index 00000000..1e94c2dc --- /dev/null +++ b/packages/registry/src/components/blocks/sidebar-12.tsx @@ -0,0 +1,122 @@ +"use client" + +import { Calendar } from "@registry/components/ui/calendar" +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { + Menu, + MenuTrigger, + MenuPopup, + MenuRadioGroup, + MenuRadioItem, +} from "@registry/providers/base-ui/components/ui/menu" +import { + Sidebar, + SidebarContent, + SidebarFooter, + SidebarGroup, + SidebarGroupLabel, + SidebarHeader, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + SidebarMenuText, + SidebarProvider, + SidebarRail, + SidebarTrigger, +} from "@registry/providers/base-ui/components/ui/sidebar" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useState } from "react" + +const styles = stylex.create({ + frame: { + position: "relative", + minBlockSize: "32rem", + backgroundColor: tokens["--background"], + }, + panel: { + "@media (min-width: 800px)": { position: "absolute", blockSize: "auto" }, + }, + body: { + minInlineSize: 0, + flexGrow: 1, + padding: `calc(${tokens["--spacing"]} * 4)`, + }, +}) + +export function Sidebar12() { + const [selected, setSelected] = useState("Personal") + const [date, setDate] = useState() + + return ( + + + + Calendar + + + + + My calendars + + {["Personal", "Work"].map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + + Other calendars + + {["Holidays", "Birthdays"].map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + + + + Account + + + setSelected("Profile")} + > + Profile + + setSelected("Preferences")} + > + Preferences + + + + + + + + + + {selected} + {date?.toLocaleDateString()} + + + ) +} From 59d8b382da142aa599e4365701f2c22f27d6abab Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:26:37 +0700 Subject: [PATCH 010/134] feat(blocks): add settings and right panels Port sidebar variants 13 14 and expose both provider previews. --- .../catalog/previews/ark-ui/sidebar-13.tsx | 1 + .../catalog/previews/ark-ui/sidebar-14.tsx | 1 + .../catalog/previews/base-ui/sidebar-13.tsx | 1 + .../catalog/previews/base-ui/sidebar-14.tsx | 1 + .../src/components/blocks/sidebar-13.tsx | 91 +++++++++++++ .../src/components/blocks/sidebar-14.tsx | 123 ++++++++++++++++++ 6 files changed, 218 insertions(+) create mode 100644 apps/docs/src/catalog/previews/ark-ui/sidebar-13.tsx create mode 100644 apps/docs/src/catalog/previews/ark-ui/sidebar-14.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/sidebar-13.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/sidebar-14.tsx create mode 100644 packages/registry/src/components/blocks/sidebar-13.tsx create mode 100644 packages/registry/src/components/blocks/sidebar-14.tsx diff --git a/apps/docs/src/catalog/previews/ark-ui/sidebar-13.tsx b/apps/docs/src/catalog/previews/ark-ui/sidebar-13.tsx new file mode 100644 index 00000000..3fbf3133 --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/sidebar-13.tsx @@ -0,0 +1 @@ +export { Sidebar13 as Preview } from "@registry/ark-preview-generated/sidebar-13" diff --git a/apps/docs/src/catalog/previews/ark-ui/sidebar-14.tsx b/apps/docs/src/catalog/previews/ark-ui/sidebar-14.tsx new file mode 100644 index 00000000..6f0e8f1a --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/sidebar-14.tsx @@ -0,0 +1 @@ +export { Sidebar14 as Preview } from "@registry/ark-preview-generated/sidebar-14" diff --git a/apps/docs/src/catalog/previews/base-ui/sidebar-13.tsx b/apps/docs/src/catalog/previews/base-ui/sidebar-13.tsx new file mode 100644 index 00000000..a8a91af1 --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/sidebar-13.tsx @@ -0,0 +1 @@ +export { Sidebar13 as Preview } from "@registry/components/blocks/sidebar-13" diff --git a/apps/docs/src/catalog/previews/base-ui/sidebar-14.tsx b/apps/docs/src/catalog/previews/base-ui/sidebar-14.tsx new file mode 100644 index 00000000..839ee9f2 --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/sidebar-14.tsx @@ -0,0 +1 @@ +export { Sidebar14 as Preview } from "@registry/components/blocks/sidebar-14" diff --git a/packages/registry/src/components/blocks/sidebar-13.tsx b/packages/registry/src/components/blocks/sidebar-13.tsx new file mode 100644 index 00000000..8177e194 --- /dev/null +++ b/packages/registry/src/components/blocks/sidebar-13.tsx @@ -0,0 +1,91 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { + Dialog, + DialogTrigger, + DialogPopup, + DialogTitle, +} from "@registry/providers/base-ui/components/ui/dialog" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { + Sidebar, + SidebarContent, + SidebarGroup, + SidebarGroupLabel, + SidebarHeader, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + SidebarMenuText, + SidebarProvider, + SidebarRail, +} from "@registry/providers/base-ui/components/ui/sidebar" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useState } from "react" + +const styles = stylex.create({ + frame: { + position: "relative", + minBlockSize: "32rem", + backgroundColor: tokens["--background"], + }, + panel: { + "@media (min-width: 800px)": { position: "absolute", blockSize: "auto" }, + }, + body: { + minInlineSize: 0, + flexGrow: 1, + padding: `calc(${tokens["--spacing"]} * 4)`, + }, +}) + +export function Sidebar13() { + const [selected, setSelected] = useState("Notifications") + + return ( + + Open settings + + Settings + + + + Settings + + + + Settings + + {[ + "Notifications", + "Navigation", + "Appearance", + "Language", + "Privacy", + "Advanced", + ].map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + + + + + {selected} + + + + + ) +} diff --git a/packages/registry/src/components/blocks/sidebar-14.tsx b/packages/registry/src/components/blocks/sidebar-14.tsx new file mode 100644 index 00000000..156e637b --- /dev/null +++ b/packages/registry/src/components/blocks/sidebar-14.tsx @@ -0,0 +1,123 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { + Sidebar, + SidebarContent, + SidebarGroup, + SidebarGroupLabel, + SidebarHeader, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + SidebarMenuText, + SidebarProvider, + SidebarRail, + SidebarTrigger, +} from "@registry/providers/base-ui/components/ui/sidebar" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useState } from "react" + +const styles = stylex.create({ + frame: { + position: "relative", + minBlockSize: "32rem", + backgroundColor: tokens["--background"], + }, + panel: { + "@media (min-width: 800px)": { position: "absolute", blockSize: "auto" }, + }, + body: { + minInlineSize: 0, + flexGrow: 1, + padding: `calc(${tokens["--spacing"]} * 4)`, + }, +}) + +export function Sidebar14() { + const [selected, setSelected] = useState("Installation") + + return ( + + + + {selected} + + + + Documentation + + + + Getting Started + + {["Installation", "Project Structure"].map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + + Build Your Application + + {["Routing", "Data Fetching", "Rendering", "Caching"].map( + (label) => ( + + setSelected(label)} + > + {label} + + + ), + )} + + + + Architecture + + {["Accessibility", "Fast Refresh", "Supported Browsers"].map( + (label) => ( + + setSelected(label)} + > + {label} + + + ), + )} + + + + Community + + {["Contribution Guide"].map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + + + + + ) +} From fee591bea856eb99efad88aa8abb50c5c527887d Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:26:42 +0700 Subject: [PATCH 011/134] feat(blocks): add dual and header layouts Port sidebar variants 15 16 and expose both provider previews. --- .../catalog/previews/ark-ui/sidebar-15.tsx | 1 + .../catalog/previews/ark-ui/sidebar-16.tsx | 1 + .../catalog/previews/base-ui/sidebar-15.tsx | 1 + .../catalog/previews/base-ui/sidebar-16.tsx | 1 + .../src/components/blocks/sidebar-15.tsx | 153 +++++++++++++++++ .../src/components/blocks/sidebar-16.tsx | 162 ++++++++++++++++++ 6 files changed, 319 insertions(+) create mode 100644 apps/docs/src/catalog/previews/ark-ui/sidebar-15.tsx create mode 100644 apps/docs/src/catalog/previews/ark-ui/sidebar-16.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/sidebar-15.tsx create mode 100644 apps/docs/src/catalog/previews/base-ui/sidebar-16.tsx create mode 100644 packages/registry/src/components/blocks/sidebar-15.tsx create mode 100644 packages/registry/src/components/blocks/sidebar-16.tsx diff --git a/apps/docs/src/catalog/previews/ark-ui/sidebar-15.tsx b/apps/docs/src/catalog/previews/ark-ui/sidebar-15.tsx new file mode 100644 index 00000000..d8f3d9fb --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/sidebar-15.tsx @@ -0,0 +1 @@ +export { Sidebar15 as Preview } from "@registry/ark-preview-generated/sidebar-15" diff --git a/apps/docs/src/catalog/previews/ark-ui/sidebar-16.tsx b/apps/docs/src/catalog/previews/ark-ui/sidebar-16.tsx new file mode 100644 index 00000000..517ec957 --- /dev/null +++ b/apps/docs/src/catalog/previews/ark-ui/sidebar-16.tsx @@ -0,0 +1 @@ +export { Sidebar16 as Preview } from "@registry/ark-preview-generated/sidebar-16" diff --git a/apps/docs/src/catalog/previews/base-ui/sidebar-15.tsx b/apps/docs/src/catalog/previews/base-ui/sidebar-15.tsx new file mode 100644 index 00000000..4f0871f3 --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/sidebar-15.tsx @@ -0,0 +1 @@ +export { Sidebar15 as Preview } from "@registry/components/blocks/sidebar-15" diff --git a/apps/docs/src/catalog/previews/base-ui/sidebar-16.tsx b/apps/docs/src/catalog/previews/base-ui/sidebar-16.tsx new file mode 100644 index 00000000..6d74f565 --- /dev/null +++ b/apps/docs/src/catalog/previews/base-ui/sidebar-16.tsx @@ -0,0 +1 @@ +export { Sidebar16 as Preview } from "@registry/components/blocks/sidebar-16" diff --git a/packages/registry/src/components/blocks/sidebar-15.tsx b/packages/registry/src/components/blocks/sidebar-15.tsx new file mode 100644 index 00000000..29cc5d6e --- /dev/null +++ b/packages/registry/src/components/blocks/sidebar-15.tsx @@ -0,0 +1,153 @@ +"use client" + +import { Calendar } from "@registry/components/ui/calendar" +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { + Menu, + MenuTrigger, + MenuPopup, + MenuRadioGroup, + MenuRadioItem, +} from "@registry/providers/base-ui/components/ui/menu" +import { + Sidebar, + SidebarContent, + SidebarFooter, + SidebarGroup, + SidebarGroupLabel, + SidebarHeader, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + SidebarMenuText, + SidebarProvider, + SidebarRail, + SidebarTrigger, +} from "@registry/providers/base-ui/components/ui/sidebar" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useState } from "react" + +const styles = stylex.create({ + frame: { + position: "relative", + minBlockSize: "32rem", + backgroundColor: tokens["--background"], + }, + panel: { + "@media (min-width: 800px)": { position: "absolute", blockSize: "auto" }, + }, + body: { + minInlineSize: 0, + flexGrow: 1, + padding: `calc(${tokens["--spacing"]} * 4)`, + }, +}) + +export function Sidebar15() { + const [selected, setSelected] = useState("Home") + const [date, setDate] = useState() + + return ( + + + + Workspace + + + + + Workspace + + {["Search", "Ask AI", "Home", "Inbox"].map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + + Favorites + + {["Project Management", "Personal Life"].map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + + Workspaces + + {["Design Engineering", "Sales & Marketing"].map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + + + + Account + + + setSelected("Profile")} + > + Profile + + setSelected("Preferences")} + > + Preferences + + + + + + + + + + {selected} + {date?.toLocaleDateString()} + + + + Calendar + + + + + + + ) +} diff --git a/packages/registry/src/components/blocks/sidebar-16.tsx b/packages/registry/src/components/blocks/sidebar-16.tsx new file mode 100644 index 00000000..a2ae1e9a --- /dev/null +++ b/packages/registry/src/components/blocks/sidebar-16.tsx @@ -0,0 +1,162 @@ +"use client" + +import { Stack } from "@registry/components/ui/stack" +import { Text } from "@registry/components/ui/text" +import { Heading } from "@registry/providers/base-ui/components/ui/heading" +import { + Menu, + MenuTrigger, + MenuPopup, + MenuRadioGroup, + MenuRadioItem, +} from "@registry/providers/base-ui/components/ui/menu" +import { + Sidebar, + SidebarContent, + SidebarFooter, + SidebarGroup, + SidebarGroupLabel, + SidebarHeader, + SidebarInput, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + SidebarMenuText, + SidebarProvider, + SidebarRail, + SidebarTrigger, +} from "@registry/providers/base-ui/components/ui/sidebar" +import { tokens } from "@registry/styles/tokens.stylex" +import * as stylex from "@stylexjs/stylex" +import { useState } from "react" + +const styles = stylex.create({ + frame: { + position: "relative", + minBlockSize: "32rem", + backgroundColor: tokens["--background"], + }, + panel: { + "@media (min-width: 800px)": { position: "absolute", blockSize: "auto" }, + }, + body: { + minInlineSize: 0, + flexGrow: 1, + padding: `calc(${tokens["--spacing"]} * 4)`, + }, + header: { + position: "sticky", + top: 0, + zIndex: 1, + backgroundColor: tokens["--background"], + }, +}) + +export function Sidebar16() { + const [selected, setSelected] = useState("Playground") + const [search, setSearch] = useState("") + + return ( + + Acme Inc. ยท Workspace + + + + Acme Inc. + setSearch(event.currentTarget.value)} + /> + + + + Platform + + {["Playground", "Models", "Documentation", "Settings"].map( + (label) => + !label + .toLowerCase() + .includes(search.toLowerCase()) ? null : ( + + setSelected(label)} + > + {label} + + + ), + )} + + + + Projects + + {["Design Engineering", "Sales & Marketing", "Travel"].map( + (label) => + !label + .toLowerCase() + .includes(search.toLowerCase()) ? null : ( + + setSelected(label)} + > + {label} + + + ), + )} + + + + Support + + {["Get help", "Feedback"].map((label) => + !label.toLowerCase().includes(search.toLowerCase()) ? null : ( + + setSelected(label)} + > + {label} + + + ), + )} + + + + + + Account + + + setSelected("Profile")} + > + Profile + + setSelected("Preferences")} + > + Preferences + + + + + + + + + + {selected} + + + + ) +} From 6ff82dbc1b06b97290d4f2ac75e70e64614c027f Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:26:48 +0700 Subject: [PATCH 012/134] feat(registry): publish sidebar blocks Register all sixteen layouts and their component dependencies. --- packages/registry/src/items/blocks.ts | 97 ++++++++++++++++++++++++++- 1 file changed, 96 insertions(+), 1 deletion(-) diff --git a/packages/registry/src/items/blocks.ts b/packages/registry/src/items/blocks.ts index ae6245a6..334e61d2 100644 --- a/packages/registry/src/items/blocks.ts +++ b/packages/registry/src/items/blocks.ts @@ -115,7 +115,102 @@ const definitions = [ description: "A simple signup form with social providers.", parts: ["stack", "text", "button", "field", "form", "heading", "input"], }, - + { + name: "sidebar-01", + title: "Sidebar01", + description: "A simple sidebar with navigation grouped by section.", + parts: ["sidebar", "stack", "heading", "text"], + }, + { + name: "sidebar-02", + title: "Sidebar02", + description: "A sidebar with collapsible sections.", + parts: ["sidebar", "stack", "heading", "text", "collapsible"], + }, + { + name: "sidebar-03", + title: "Sidebar03", + description: "A sidebar with submenus.", + parts: ["sidebar", "stack", "heading", "text"], + }, + { + name: "sidebar-04", + title: "Sidebar04", + description: "A floating sidebar with submenus.", + parts: ["sidebar", "stack", "heading", "text"], + }, + { + name: "sidebar-05", + title: "Sidebar05", + description: "A sidebar with collapsible submenus.", + parts: ["sidebar", "stack", "heading", "text", "collapsible"], + }, + { + name: "sidebar-06", + title: "Sidebar06", + description: "A sidebar with submenus as dropdowns.", + parts: ["sidebar", "stack", "heading", "text", "menu", "input", "button"], + }, + { + name: "sidebar-07", + title: "Sidebar07", + description: "A sidebar that collapses to icons.", + parts: ["sidebar", "stack", "heading", "text", "menu"], + }, + { + name: "sidebar-08", + title: "Sidebar08", + description: "An inset sidebar with secondary navigation.", + parts: ["sidebar", "stack", "heading", "text", "menu"], + }, + { + name: "sidebar-09", + title: "Sidebar09", + description: "Collapsible nested sidebars.", + parts: ["sidebar", "stack", "heading", "text", "menu"], + }, + { + name: "sidebar-10", + title: "Sidebar10", + description: "A sidebar in a popover.", + parts: ["sidebar", "stack", "heading", "text", "popover"], + }, + { + name: "sidebar-11", + title: "Sidebar11", + description: "A sidebar with a collapsible file tree.", + parts: ["sidebar", "stack", "heading", "text", "collapsible"], + }, + { + name: "sidebar-12", + title: "Sidebar12", + description: "A sidebar with a calendar.", + parts: ["sidebar", "stack", "heading", "text", "menu", "calendar"], + }, + { + name: "sidebar-13", + title: "Sidebar13", + description: "A sidebar in a dialog.", + parts: ["sidebar", "stack", "heading", "text", "dialog"], + }, + { + name: "sidebar-14", + title: "Sidebar14", + description: "A sidebar on the right.", + parts: ["sidebar", "stack", "heading", "text"], + }, + { + name: "sidebar-15", + title: "Sidebar15", + description: "A left and right sidebar.", + parts: ["sidebar", "stack", "heading", "text", "menu", "calendar"], + }, + { + name: "sidebar-16", + title: "Sidebar16", + description: "A sidebar with a sticky site header.", + parts: ["sidebar", "stack", "heading", "text", "menu"], + }, ] export const blockItems: SourceItem[] = definitions.map( From 8538e1db705989e59220237f1ee89a6380c66336 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:27:12 +0700 Subject: [PATCH 013/134] test(cli): install each block for both providers Check consumer paths and compile installed TypeScript source. --- tests/cli/ark-consumer.test.ts | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/tests/cli/ark-consumer.test.ts b/tests/cli/ark-consumer.test.ts index 1c9cfe54..b6291173 100644 --- a/tests/cli/ark-consumer.test.ts +++ b/tests/cli/ark-consumer.test.ts @@ -87,7 +87,7 @@ for (const { composition, unsupported, } of consumers) { - test(`packed CLI builds the ${provider} Checkbox consumer`, async () => { + test(`packed CLI builds the ${provider} Checkbox and block consumer`, async () => { const project = join(directory, provider) writeViteApp( project, @@ -167,6 +167,32 @@ createRoot(container).render() "checkbox", ...registry, ) + + for (const [group, count] of [ + ["login", 5], + ["signup", 5], + ["sidebar", 16], + ] as const) { + for (let index = 1; index <= count; index++) { + const block = `${group}-${String(index).padStart(2, "0")}` + await run( + logs, + project, + "bunx", + "--no-install", + "yopem-ui", + "add", + block, + ...registry, + ) + expect( + await Bun.file( + join(project, `src/components/blocks/${block}.tsx`), + ).exists(), + ).toBe(true) + } + } + const tree = await run(logs, project, "bun", "pm", "ls", "--all") expect(tree).toContain(`${dependency}@`) expect(tree).not.toContain(`${excluded}@`) From 08914029b9616c72768b325dd6420e2037736e95 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:28:26 +0700 Subject: [PATCH 014/134] docs(blocks): group layouts in the catalog Describe block installation and distinguish forms from auth services. --- AGENTS.md | 6 ++++++ apps/docs/src/catalog/navigation.ts | 14 +++++++++++++- packages/cli/src/guidance.ts | 6 ++++++ skills/yopem-ui/SKILL.md | 7 +++++++ tests/e2e/docs/docs-navigation.spec.ts | 9 ++++++++- 5 files changed, 40 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 6bbd9f25..12394ff5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -6,6 +6,12 @@ and static registry. Components use React 19, Base UI, StyleX, and TypeScript. catalogs, inline previews, guides, search, machine-readable docs, and registry hosting. The first release is copy/paste-only and does not publish an npm package. +## Blocks + +Install login, signup, and sidebar blocks by their numbered registry names. +The CLI puts blocks in the `blocks` directory under the configured components directory. +Connect authentication forms to your authentication service before use. + ## Commands ```sh diff --git a/apps/docs/src/catalog/navigation.ts b/apps/docs/src/catalog/navigation.ts index a1463382..cdd6604e 100644 --- a/apps/docs/src/catalog/navigation.ts +++ b/apps/docs/src/catalog/navigation.ts @@ -1,3 +1,5 @@ +import { blockItems } from "@registry/items/blocks" + import { catalog } from "./components" const layoutSlugs = new Set([ @@ -33,7 +35,15 @@ const typographySlugs = new Set([ "text", ]) -const catalogGroups = ["Components", "Layout", "Typography", "Hooks"] as const +const blockSlugs = new Set(blockItems.map(({ name }) => name)) + +const catalogGroups = [ + "Components", + "Layout", + "Typography", + "Hooks", + "Blocks", +] as const export const navigationGroups = [ { @@ -57,6 +67,8 @@ export const navigationGroups = [ : []), ...catalog .filter((item) => { + if (blockSlugs.has(item.slug)) return name === "Blocks" + const group = item.slug.startsWith("use-") ? "Hooks" : layoutSlugs.has(item.slug) diff --git a/packages/cli/src/guidance.ts b/packages/cli/src/guidance.ts index a4cb643c..3aa58b73 100644 --- a/packages/cli/src/guidance.ts +++ b/packages/cli/src/guidance.ts @@ -32,6 +32,12 @@ export function designGuidance( const block = `${begin} ## Yopem UI design system +### Blocks + +Install login, signup, and sidebar blocks by their numbered registry names. +The CLI puts blocks in the \`blocks\` directory under the configured components directory. +Connect authentication forms to your authentication service before use. + ### Source and imports Yopem UI provides source-owned React components with TypeScript, ${providerName}, and StyleX. diff --git a/skills/yopem-ui/SKILL.md b/skills/yopem-ui/SKILL.md index 1f3dfad3..decee747 100644 --- a/skills/yopem-ui/SKILL.md +++ b/skills/yopem-ui/SKILL.md @@ -10,6 +10,13 @@ description: >- # Yopem UI +## Blocks + +Install login, signup, and sidebar blocks by their numbered registry names. The +CLI puts blocks in the `blocks` directory under the configured components +directory. Connect authentication forms to your authentication service before +use. + ## Primitive provider Read `provider` in `ui.json`. A missing value selects `base-ui`. For Ark UI diff --git a/tests/e2e/docs/docs-navigation.spec.ts b/tests/e2e/docs/docs-navigation.spec.ts index 8f9947d2..8fd2b5e9 100644 --- a/tests/e2e/docs/docs-navigation.spec.ts +++ b/tests/e2e/docs/docs-navigation.spec.ts @@ -62,7 +62,14 @@ test("header action icons keep consistent dimensions", async ({ await expect(search).toBeFocused() }) -const groups = ["Setup", "Components", "Layout", "Typography", "Hooks"] +const groups = [ + "Setup", + "Components", + "Layout", + "Typography", + "Hooks", + "Blocks", +] test("@a11y grouped navigation preserves inventory, keyboard collapse, and mobile dismissal", async ({ page, From bbdd67914c90dd44ea27b780da06f2b32288e3e9 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:29:10 +0700 Subject: [PATCH 015/134] test(blocks): exercise both preview catalogs Check form fields, sidebar controls, focus, and accessibility. --- tests/e2e/registry/blocks.spec.ts | 52 +++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 tests/e2e/registry/blocks.spec.ts diff --git a/tests/e2e/registry/blocks.spec.ts b/tests/e2e/registry/blocks.spec.ts new file mode 100644 index 00000000..43e14444 --- /dev/null +++ b/tests/e2e/registry/blocks.spec.ts @@ -0,0 +1,52 @@ +import AxeBuilder from "@axe-core/playwright" +import { expect, test } from "@playwright/test" + +import { openPreview } from "./helpers" + +for (const prefix of ["", "ark-ui/"]) { + for (const [group, count] of [ + ["login", 5], + ["signup", 5], + ["sidebar", 16], + ] as const) { + for (let number = 1; number <= count; number++) { + const slug = `${prefix}${group}-${String(number).padStart(2, "0")}` + test(`${slug} provides an accessible block @a11y`, async ({ page }) => { + await openPreview(page, slug) + const preview = page.getByLabel(/live preview$/).first() + + if (group === "sidebar") { + if (number === 13) { + await preview.getByRole("button", { name: "Open settings" }).click() + await expect(page.getByRole("dialog")).toBeVisible() + await page.keyboard.press("Escape") + await expect( + preview.getByRole("button", { name: "Open settings" }), + ).toBeFocused() + } else { + await expect(preview.getByRole("heading").first()).toBeVisible() + await preview + .getByRole("button", { name: /toggle sidebar/i }) + .first() + .click() + } + } else { + const email = preview.getByLabel("Email", { exact: true }) + await email.fill("reader@example.com") + await expect(email).toHaveValue("reader@example.com") + await expect(preview.locator('input[type="password"]')).toHaveCount( + number === 5 ? 0 : group === "signup" ? 2 : 1, + ) + } + + expect( + ( + await new AxeBuilder({ page }) + .include('[aria-label$="live preview"]') + .analyze() + ).violations, + ).toEqual([]) + }) + } + } +} From aaa9faff5bdfcf36c96a3c15ca2d4fe22c4d8b9d Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:30:51 +0700 Subject: [PATCH 016/134] test(cli): include Node types for Ark menus Resolve Buffer in the upstream menu declarations without skipping checks. --- tests/cli/ark-consumer.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/cli/ark-consumer.test.ts b/tests/cli/ark-consumer.test.ts index b6291173..1e381013 100644 --- a/tests/cli/ark-consumer.test.ts +++ b/tests/cli/ark-consumer.test.ts @@ -118,7 +118,7 @@ createRoot(container).render() module: "esnext", moduleResolution: "bundler", target: "esnext", - types: ["vite/client"], + types: ["vite/client", "node"], }, include: ["src"], }), @@ -131,6 +131,7 @@ createRoot(container).render() "--prefer-offline", "-d", ...archives, + "@types/node", "@types/react@19", "@types/react-dom@19", ) From 09d17a14f1476f03e5ef6401ea02307b01a76019 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:31:31 +0700 Subject: [PATCH 017/134] feat(blocks): navigate nested project files Keep full file paths and expose changed files in the sidebar. --- .../src/components/blocks/sidebar-11.tsx | 162 ++++++++++++------ 1 file changed, 109 insertions(+), 53 deletions(-) diff --git a/packages/registry/src/components/blocks/sidebar-11.tsx b/packages/registry/src/components/blocks/sidebar-11.tsx index 1a399774..004014e1 100644 --- a/packages/registry/src/components/blocks/sidebar-11.tsx +++ b/packages/registry/src/components/blocks/sidebar-11.tsx @@ -12,6 +12,7 @@ import { Sidebar, SidebarContent, SidebarGroup, + SidebarGroupLabel, SidebarHeader, SidebarMenu, SidebarMenuButton, @@ -41,6 +42,96 @@ const styles = stylex.create({ }, }) +interface Entry { + name: string + children?: Entry[] +} + +const tree: Entry[] = [ + { + name: "app", + children: [ + { + name: "api", + children: [ + { name: "hello", children: [{ name: "route.ts" }] }, + { name: "page.tsx" }, + { name: "layout.tsx" }, + { name: "blog", children: [{ name: "page.tsx" }] }, + ], + }, + ], + }, + { + name: "components", + children: [ + { name: "ui", children: [{ name: "button.tsx" }, { name: "card.tsx" }] }, + { name: "header.tsx" }, + { name: "footer.tsx" }, + ], + }, + { name: "lib", children: [{ name: "util.ts" }] }, + { + name: "public", + children: [{ name: "favicon.ico" }, { name: "vercel.svg" }], + }, + { name: ".gitignore" }, + { name: "next.config.js" }, + { name: "package.json" }, + { name: "README.md" }, +] + +function Files({ + entries, + path, + selected, + select, +}: { + entries: readonly Entry[] + path: string + selected: string + select: (path: string) => void +}) { + return ( + + {entries.map((entry) => { + if (!entry.children) { + const file = path + entry.name + + return ( + + select(file)} + > + {entry.name} + + + ) + } + + const { name: folder, children } = entry + + return ( + + + {folder} + + + + + + ) + })} + + ) +} + export function Sidebar11() { const [selected, setSelected] = useState("page.tsx") @@ -52,61 +143,26 @@ export function Sidebar11() { - - app - - - {["layout.tsx", "page.tsx"].map((label) => ( - - setSelected(label)} - > - {label} - - - ))} - - - + Changes + - - components - - - {["button.tsx", "dialog.tsx"].map((label) => ( - - setSelected(label)} - > - {label} - - - ))} - - - - - - - lib - - - {["utils.ts"].map((label) => ( - - setSelected(label)} - > - {label} - - - ))} - - - + Files + From 863414bd5511f535cdfb31cb283344c51b3d9698 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:32:34 +0700 Subject: [PATCH 018/134] fix(blocks): support keyboard sidebar links Give submenu links a destination and label collapsed icon buttons. --- .../registry/src/components/blocks/sidebar-03.tsx | 15 +++++++++++++-- .../registry/src/components/blocks/sidebar-04.tsx | 15 +++++++++++++-- .../registry/src/components/blocks/sidebar-07.tsx | 3 +++ 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/packages/registry/src/components/blocks/sidebar-03.tsx b/packages/registry/src/components/blocks/sidebar-03.tsx index 29b35eb6..11561f4a 100644 --- a/packages/registry/src/components/blocks/sidebar-03.tsx +++ b/packages/registry/src/components/blocks/sidebar-03.tsx @@ -20,7 +20,7 @@ import { } from "@registry/providers/base-ui/components/ui/sidebar" import { tokens } from "@registry/styles/tokens.stylex" import * as stylex from "@stylexjs/stylex" -import { useState } from "react" +import { useId, useState } from "react" const styles = stylex.create({ frame: { @@ -39,6 +39,7 @@ const styles = stylex.create({ }) export function Sidebar03() { + const contentId = useId() const [selected, setSelected] = useState("Installation") return ( @@ -60,6 +61,7 @@ export function Sidebar03() { setSelected("Installation")} > Installation @@ -67,6 +69,7 @@ export function Sidebar03() { setSelected("Project Structure")} > Project Structure @@ -88,6 +91,7 @@ export function Sidebar03() { setSelected("Routing")} > Routing @@ -95,6 +99,7 @@ export function Sidebar03() { setSelected("Data Fetching")} > Data Fetching @@ -102,6 +107,7 @@ export function Sidebar03() { setSelected("Rendering")} > Rendering @@ -109,6 +115,7 @@ export function Sidebar03() { setSelected("Caching")} > Caching @@ -128,6 +135,7 @@ export function Sidebar03() { setSelected("Accessibility")} > Accessibility @@ -135,6 +143,7 @@ export function Sidebar03() { setSelected("Fast Refresh")} > Fast Refresh @@ -142,6 +151,7 @@ export function Sidebar03() { setSelected("Supported Browsers")} > Supported Browsers @@ -161,6 +171,7 @@ export function Sidebar03() { setSelected("Contribution Guide")} > Contribution Guide @@ -175,7 +186,7 @@ export function Sidebar03() { - {selected} + {selected} ) diff --git a/packages/registry/src/components/blocks/sidebar-04.tsx b/packages/registry/src/components/blocks/sidebar-04.tsx index b8ab29dd..2ff49b47 100644 --- a/packages/registry/src/components/blocks/sidebar-04.tsx +++ b/packages/registry/src/components/blocks/sidebar-04.tsx @@ -20,7 +20,7 @@ import { } from "@registry/providers/base-ui/components/ui/sidebar" import { tokens } from "@registry/styles/tokens.stylex" import * as stylex from "@stylexjs/stylex" -import { useState } from "react" +import { useId, useState } from "react" const styles = stylex.create({ frame: { @@ -39,6 +39,7 @@ const styles = stylex.create({ }) export function Sidebar04() { + const contentId = useId() const [selected, setSelected] = useState("Installation") return ( @@ -60,6 +61,7 @@ export function Sidebar04() { setSelected("Installation")} > Installation @@ -67,6 +69,7 @@ export function Sidebar04() { setSelected("Project Structure")} > Project Structure @@ -88,6 +91,7 @@ export function Sidebar04() { setSelected("Routing")} > Routing @@ -95,6 +99,7 @@ export function Sidebar04() { setSelected("Data Fetching")} > Data Fetching @@ -102,6 +107,7 @@ export function Sidebar04() { setSelected("Rendering")} > Rendering @@ -109,6 +115,7 @@ export function Sidebar04() { setSelected("Caching")} > Caching @@ -128,6 +135,7 @@ export function Sidebar04() { setSelected("Accessibility")} > Accessibility @@ -135,6 +143,7 @@ export function Sidebar04() { setSelected("Fast Refresh")} > Fast Refresh @@ -142,6 +151,7 @@ export function Sidebar04() { setSelected("Supported Browsers")} > Supported Browsers @@ -161,6 +171,7 @@ export function Sidebar04() { setSelected("Contribution Guide")} > Contribution Guide @@ -175,7 +186,7 @@ export function Sidebar04() { - {selected} + {selected} ) diff --git a/packages/registry/src/components/blocks/sidebar-07.tsx b/packages/registry/src/components/blocks/sidebar-07.tsx index c4024e74..0636db86 100644 --- a/packages/registry/src/components/blocks/sidebar-07.tsx +++ b/packages/registry/src/components/blocks/sidebar-07.tsx @@ -72,6 +72,7 @@ export function Sidebar07() { (label) => ( setSelected(label)} > @@ -90,6 +91,7 @@ export function Sidebar07() { (label) => ( setSelected(label)} > @@ -107,6 +109,7 @@ export function Sidebar07() { {["Get help", "Feedback"].map((label) => ( setSelected(label)} > From 3a24ab4205d58929577a0114e31417fa845c4d64 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:32:37 +0700 Subject: [PATCH 019/134] fix(blocks): move controls into sticky header Keep the sidebar toggle and search available above the content. --- .../src/components/blocks/sidebar-16.tsx | 29 +++++++++++-------- packages/registry/src/items/blocks.ts | 2 +- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/packages/registry/src/components/blocks/sidebar-16.tsx b/packages/registry/src/components/blocks/sidebar-16.tsx index a2ae1e9a..d49a22e8 100644 --- a/packages/registry/src/components/blocks/sidebar-16.tsx +++ b/packages/registry/src/components/blocks/sidebar-16.tsx @@ -1,5 +1,6 @@ "use client" +import { HStack } from "@registry/components/ui/hstack" import { Stack } from "@registry/components/ui/stack" import { Text } from "@registry/components/ui/text" import { Heading } from "@registry/providers/base-ui/components/ui/heading" @@ -31,7 +32,9 @@ import * as stylex from "@stylexjs/stylex" import { useState } from "react" const styles = stylex.create({ + row: { position: "relative", alignItems: "stretch", flexGrow: 1, gap: 0 }, frame: { + flexDirection: "column", position: "relative", minBlockSize: "32rem", backgroundColor: tokens["--background"], @@ -57,18 +60,21 @@ export function Sidebar16() { const [search, setSearch] = useState("") return ( - - Acme Inc. ยท Workspace - + + + + Acme Inc. ยท Workspace{" "} + setSearch(event.currentTarget.value)} + /> + + Acme Inc. - setSearch(event.currentTarget.value)} - /> @@ -153,10 +159,9 @@ export function Sidebar16() { - {selected} - - + + ) } diff --git a/packages/registry/src/items/blocks.ts b/packages/registry/src/items/blocks.ts index 334e61d2..3ee5b6e1 100644 --- a/packages/registry/src/items/blocks.ts +++ b/packages/registry/src/items/blocks.ts @@ -209,7 +209,7 @@ const definitions = [ name: "sidebar-16", title: "Sidebar16", description: "A sidebar with a sticky site header.", - parts: ["sidebar", "stack", "heading", "text", "menu"], + parts: ["hstack", "sidebar", "stack", "heading", "text", "menu"], }, ] From 1af934f9ccc6dbc53b9c66f6ded068843417e893 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:34:06 +0700 Subject: [PATCH 020/134] feat(blocks): connect authentication actions Accept form and provider callbacks. Let apps supply their own URLs. --- .../src/components/blocks/login-01.tsx | 29 +++++++++-- .../src/components/blocks/login-02.tsx | 29 +++++++++-- .../src/components/blocks/login-03.tsx | 44 ++++++++++++++--- .../src/components/blocks/login-04.tsx | 49 +++++++++++++++---- .../src/components/blocks/login-05.tsx | 40 ++++++++++++--- .../src/components/blocks/signup-01.tsx | 25 ++++++++-- .../src/components/blocks/signup-02.tsx | 25 ++++++++-- .../src/components/blocks/signup-03.tsx | 26 ++++++++-- .../src/components/blocks/signup-04.tsx | 45 ++++++++++++++--- .../src/components/blocks/signup-05.tsx | 40 ++++++++++++--- 10 files changed, 290 insertions(+), 62 deletions(-) diff --git a/packages/registry/src/components/blocks/login-01.tsx b/packages/registry/src/components/blocks/login-01.tsx index bd3211bf..4fd20069 100644 --- a/packages/registry/src/components/blocks/login-01.tsx +++ b/packages/registry/src/components/blocks/login-01.tsx @@ -27,7 +27,17 @@ const styles = stylex.create({ panel: { inlineSize: "100%", maxInlineSize: "25rem" }, }) -export function Login01() { +export function Login01({ + signupHref = "#", + resetHref = "#", + onSubmit, + onProvider, +}: { + signupHref?: string + resetHref?: string + onSubmit?: (data: FormData) => void + onProvider?: (provider: string) => void +} = {}) { const id = useId() return ( @@ -38,7 +48,12 @@ export function Login01() { Login to your account Enter your account details below. -
event.preventDefault()}> + { + event.preventDefault() + onSubmit?.(new FormData(event.currentTarget)) + }} + > Email @@ -60,14 +75,18 @@ export function Login01() { required /> - Forgot your password? + Forgot your password?
- - Sign up + Sign up
diff --git a/packages/registry/src/components/blocks/login-02.tsx b/packages/registry/src/components/blocks/login-02.tsx index 369be39c..6a07838d 100644 --- a/packages/registry/src/components/blocks/login-02.tsx +++ b/packages/registry/src/components/blocks/login-02.tsx @@ -41,7 +41,17 @@ const styles = stylex.create({ }, }) -export function Login02() { +export function Login02({ + signupHref = "#", + resetHref = "#", + onSubmit, + onProvider, +}: { + signupHref?: string + resetHref?: string + onSubmit?: (data: FormData) => void + onProvider?: (provider: string) => void +} = {}) { const id = useId() return ( @@ -52,7 +62,12 @@ export function Login02() { Login to your account Enter your account details below. -
event.preventDefault()}> + { + event.preventDefault() + onSubmit?.(new FormData(event.currentTarget)) + }} + > Email @@ -74,14 +89,18 @@ export function Login02() { required /> - Forgot your password? + Forgot your password?
- - Sign up + Sign up
diff --git a/packages/registry/src/components/blocks/login-04.tsx b/packages/registry/src/components/blocks/login-04.tsx index 5d5343b9..1496e260 100644 --- a/packages/registry/src/components/blocks/login-04.tsx +++ b/packages/registry/src/components/blocks/login-04.tsx @@ -42,7 +42,21 @@ const styles = stylex.create({ }, }) -export function Login04() { +export function Login04({ + signupHref = "#", + termsHref = "#", + privacyHref = "#", + resetHref = "#", + onSubmit, + onProvider, +}: { + signupHref?: string + termsHref?: string + privacyHref?: string + resetHref?: string + onSubmit?: (data: FormData) => void + onProvider?: (provider: string) => void +} = {}) { const id = useId() return ( @@ -53,7 +67,12 @@ export function Login04() { Welcome back Enter your account details below. -
event.preventDefault()}> + { + event.preventDefault() + onSubmit?.(new FormData(event.currentTarget)) + }} + > Email @@ -75,28 +94,40 @@ export function Login04() { required /> - Forgot your password? + Forgot your password?
- - - - Sign up + Sign up
- By continuing, you agree to our Terms of Service{" "} - and Privacy Policy. + By continuing, you agree to our Terms of Service{" "} + and Privacy Policy. ) diff --git a/packages/registry/src/components/blocks/login-05.tsx b/packages/registry/src/components/blocks/login-05.tsx index 4c0b12f1..2b26d3bd 100644 --- a/packages/registry/src/components/blocks/login-05.tsx +++ b/packages/registry/src/components/blocks/login-05.tsx @@ -26,7 +26,19 @@ const styles = stylex.create({ panel: { inlineSize: "100%", maxInlineSize: "25rem" }, }) -export function Login05() { +export function Login05({ + signupHref = "#", + termsHref = "#", + privacyHref = "#", + onSubmit, + onProvider, +}: { + signupHref?: string + termsHref?: string + privacyHref?: string + onSubmit?: (data: FormData) => void + onProvider?: (provider: string) => void +} = {}) { const id = useId() return ( @@ -35,7 +47,12 @@ export function Login05() { Welcome to Acme Inc. Enter your email to continue. -
event.preventDefault()}> + { + event.preventDefault() + onSubmit?.(new FormData(event.currentTarget)) + }} + > Email @@ -50,17 +67,26 @@ export function Login05() {
- - - Sign up + Sign up
- By continuing, you agree to our Terms of Service{" "} - and Privacy Policy. + By continuing, you agree to our{" "} + Terms of Service and{" "} + Privacy Policy. diff --git a/packages/registry/src/components/blocks/signup-01.tsx b/packages/registry/src/components/blocks/signup-01.tsx index ea047f32..666ee0dc 100644 --- a/packages/registry/src/components/blocks/signup-01.tsx +++ b/packages/registry/src/components/blocks/signup-01.tsx @@ -27,7 +27,15 @@ const styles = stylex.create({ panel: { inlineSize: "100%", maxInlineSize: "25rem" }, }) -export function Signup01() { +export function Signup01({ + loginHref = "#", + onSubmit, + onProvider, +}: { + loginHref?: string + onSubmit?: (data: FormData) => void + onProvider?: (provider: string) => void +} = {}) { const id = useId() return ( @@ -38,7 +46,12 @@ export function Signup01() { Create your account Enter your account details below. -
event.preventDefault()}> + { + event.preventDefault() + onSubmit?.(new FormData(event.currentTarget)) + }} + > Full name @@ -87,10 +100,14 @@ export function Signup01() {
- - Sign in + Sign in
diff --git a/packages/registry/src/components/blocks/signup-02.tsx b/packages/registry/src/components/blocks/signup-02.tsx index 79c4c215..c30cb582 100644 --- a/packages/registry/src/components/blocks/signup-02.tsx +++ b/packages/registry/src/components/blocks/signup-02.tsx @@ -41,7 +41,15 @@ const styles = stylex.create({ }, }) -export function Signup02() { +export function Signup02({ + loginHref = "#", + onSubmit, + onProvider, +}: { + loginHref?: string + onSubmit?: (data: FormData) => void + onProvider?: (provider: string) => void +} = {}) { const id = useId() return ( @@ -52,7 +60,12 @@ export function Signup02() { Create your account Enter your account details below. -
event.preventDefault()}> + { + event.preventDefault() + onSubmit?.(new FormData(event.currentTarget)) + }} + > Full name @@ -101,10 +114,14 @@ export function Signup02() {
- - Sign in + Sign in
diff --git a/packages/registry/src/components/blocks/signup-04.tsx b/packages/registry/src/components/blocks/signup-04.tsx index 8e153ec6..8c44c826 100644 --- a/packages/registry/src/components/blocks/signup-04.tsx +++ b/packages/registry/src/components/blocks/signup-04.tsx @@ -42,7 +42,19 @@ const styles = stylex.create({ }, }) -export function Signup04() { +export function Signup04({ + loginHref = "#", + termsHref = "#", + privacyHref = "#", + onSubmit, + onProvider, +}: { + loginHref?: string + termsHref?: string + privacyHref?: string + onSubmit?: (data: FormData) => void + onProvider?: (provider: string) => void +} = {}) { const id = useId() return ( @@ -53,7 +65,12 @@ export function Signup04() { Create your account Enter your account details below. -
event.preventDefault()}> + { + event.preventDefault() + onSubmit?.(new FormData(event.currentTarget)) + }} + > Email @@ -92,24 +109,36 @@ export function Signup04() {
- - - - Sign in + Sign in
- By continuing, you agree to our Terms of Service{" "} - and Privacy Policy. + By continuing, you agree to our Terms of Service{" "} + and Privacy Policy. ) diff --git a/packages/registry/src/components/blocks/signup-05.tsx b/packages/registry/src/components/blocks/signup-05.tsx index 70f047ee..9264c5ce 100644 --- a/packages/registry/src/components/blocks/signup-05.tsx +++ b/packages/registry/src/components/blocks/signup-05.tsx @@ -26,7 +26,19 @@ const styles = stylex.create({ panel: { inlineSize: "100%", maxInlineSize: "25rem" }, }) -export function Signup05() { +export function Signup05({ + loginHref = "#", + termsHref = "#", + privacyHref = "#", + onSubmit, + onProvider, +}: { + loginHref?: string + termsHref?: string + privacyHref?: string + onSubmit?: (data: FormData) => void + onProvider?: (provider: string) => void +} = {}) { const id = useId() return ( @@ -35,7 +47,12 @@ export function Signup05() { Welcome to Acme Inc. Enter your email to continue. -
event.preventDefault()}> + { + event.preventDefault() + onSubmit?.(new FormData(event.currentTarget)) + }} + > Email @@ -50,17 +67,26 @@ export function Signup05() {
- - - Sign in + Sign in
- By continuing, you agree to our Terms of Service{" "} - and Privacy Policy. + By continuing, you agree to our{" "} + Terms of Service and{" "} + Privacy Policy. From bb95fa6c38a9ef17e100a40cffce827368ff2acc Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:37:17 +0700 Subject: [PATCH 021/134] feat(blocks): compose mail and calendar panels Nest mail panels and add collapsible calendar choices. --- .../src/components/blocks/sidebar-09.tsx | 138 ++++++++++-------- .../src/components/blocks/sidebar-12.tsx | 68 +++++---- packages/registry/src/items/blocks.ts | 14 +- 3 files changed, 130 insertions(+), 90 deletions(-) diff --git a/packages/registry/src/components/blocks/sidebar-09.tsx b/packages/registry/src/components/blocks/sidebar-09.tsx index 45458874..02481735 100644 --- a/packages/registry/src/components/blocks/sidebar-09.tsx +++ b/packages/registry/src/components/blocks/sidebar-09.tsx @@ -1,5 +1,6 @@ "use client" +import { HStack } from "@registry/components/ui/hstack" import { Stack } from "@registry/components/ui/stack" import { Text } from "@registry/components/ui/text" import { Heading } from "@registry/providers/base-ui/components/ui/heading" @@ -20,13 +21,19 @@ import { SidebarMenu, SidebarMenuButton, SidebarMenuItem, - SidebarMenuText, SidebarProvider, SidebarRail, SidebarTrigger, } from "@registry/providers/base-ui/components/ui/sidebar" import { tokens } from "@registry/styles/tokens.stylex" import * as stylex from "@stylexjs/stylex" +import { + ArchiveIcon, + FileIcon, + InboxIcon, + SendIcon, + TrashIcon, +} from "lucide-react" import { useState } from "react" const styles = stylex.create({ @@ -38,6 +45,9 @@ const styles = stylex.create({ panel: { "@media (min-width: 800px)": { position: "absolute", blockSize: "auto" }, }, + row: { alignItems: "stretch", gap: 0, overflow: "hidden", blockSize: "100%" }, + rail: { inlineSize: "3.5rem", flexShrink: 0 }, + messages: { minInlineSize: 0, flex: 1 }, body: { minInlineSize: 0, flexGrow: 1, @@ -52,65 +62,77 @@ export function Sidebar09() { return ( - - Mail - - - - Mail - - {["Inbox", "Drafts", "Sent", "Junk", "Trash"].map((label) => ( - - setSelected(label)} - > - {label} - - - ))} - - - - - - Account - - - setSelected("Profile")} - > - Profile - - setSelected("Preferences")} - > - Preferences - - - - - + + + + Mail + + + + Mail + + {[ + { label: "Inbox", icon: InboxIcon }, + { label: "Drafts", icon: FileIcon }, + { label: "Sent", icon: SendIcon }, + { label: "Junk", icon: ArchiveIcon }, + { label: "Trash", icon: TrashIcon }, + ].map(({ label, icon: Icon }) => ( + + setSelected(label)} + > + + + ))} + + + + + + Account + + + setSelected("Profile")} + > + Profile + + setSelected("Preferences")} + > + Preferences + + + + + + + + + {selected} + + + setMessage("Weekly update")}> + Weekly update + + setMessage("Team meeting")}> + Team meeting + + setMessage("Project notes")}> + Project notes + + + + - - - {selected} - - - setMessage("Weekly update")}> - Weekly update - - setMessage("Team meeting")}> - Team meeting - - setMessage("Project notes")}> - Project notes - - - {selected} diff --git a/packages/registry/src/components/blocks/sidebar-12.tsx b/packages/registry/src/components/blocks/sidebar-12.tsx index 1e94c2dc..2bfc6e28 100644 --- a/packages/registry/src/components/blocks/sidebar-12.tsx +++ b/packages/registry/src/components/blocks/sidebar-12.tsx @@ -1,8 +1,15 @@ "use client" import { Calendar } from "@registry/components/ui/calendar" +import { HStack } from "@registry/components/ui/hstack" import { Stack } from "@registry/components/ui/stack" import { Text } from "@registry/components/ui/text" +import { Checkbox } from "@registry/providers/base-ui/components/ui/checkbox" +import { + Collapsible, + CollapsibleTrigger, + CollapsiblePanel, +} from "@registry/providers/base-ui/components/ui/collapsible" import { Heading } from "@registry/providers/base-ui/components/ui/heading" import { Menu, @@ -16,12 +23,9 @@ import { SidebarContent, SidebarFooter, SidebarGroup, - SidebarGroupLabel, SidebarHeader, SidebarMenu, - SidebarMenuButton, SidebarMenuItem, - SidebarMenuText, SidebarProvider, SidebarRail, SidebarTrigger, @@ -47,7 +51,7 @@ const styles = stylex.create({ }) export function Sidebar12() { - const [selected, setSelected] = useState("Personal") + const [selected, setSelected] = useState("Calendar") const [date, setDate] = useState() return ( @@ -59,34 +63,38 @@ export function Sidebar12() { - My calendars - - {["Personal", "Work"].map((label) => ( - - setSelected(label)} - > - {label} - - - ))} - + + My calendars + + + {["Personal", "Work"].map((label) => ( + + + + {label} + + + ))} + + + - Other calendars - - {["Holidays", "Birthdays"].map((label) => ( - - setSelected(label)} - > - {label} - - - ))} - + + Other calendars + + + {["Holidays", "Birthdays"].map((label) => ( + + + + {label} + + + ))} + + + diff --git a/packages/registry/src/items/blocks.ts b/packages/registry/src/items/blocks.ts index 3ee5b6e1..bc0afbfd 100644 --- a/packages/registry/src/items/blocks.ts +++ b/packages/registry/src/items/blocks.ts @@ -167,7 +167,7 @@ const definitions = [ name: "sidebar-09", title: "Sidebar09", description: "Collapsible nested sidebars.", - parts: ["sidebar", "stack", "heading", "text", "menu"], + parts: ["hstack", "sidebar", "stack", "heading", "text", "menu"], }, { name: "sidebar-10", @@ -185,7 +185,17 @@ const definitions = [ name: "sidebar-12", title: "Sidebar12", description: "A sidebar with a calendar.", - parts: ["sidebar", "stack", "heading", "text", "menu", "calendar"], + parts: [ + "checkbox", + "hstack", + "collapsible", + "sidebar", + "stack", + "heading", + "text", + "menu", + "calendar", + ], }, { name: "sidebar-13", From af33787d0c11da680832a63f011e21232fbb5062 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:37:20 +0700 Subject: [PATCH 022/134] fix(blocks): fit calendar and settings panels Keep settings inline and reserve the second sidebar for wide screens. --- packages/registry/src/components/blocks/sidebar-13.tsx | 5 +---- packages/registry/src/components/blocks/sidebar-15.tsx | 5 ++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/registry/src/components/blocks/sidebar-13.tsx b/packages/registry/src/components/blocks/sidebar-13.tsx index 8177e194..5f0a906a 100644 --- a/packages/registry/src/components/blocks/sidebar-13.tsx +++ b/packages/registry/src/components/blocks/sidebar-13.tsx @@ -32,9 +32,6 @@ const styles = stylex.create({ minBlockSize: "32rem", backgroundColor: tokens["--background"], }, - panel: { - "@media (min-width: 800px)": { position: "absolute", blockSize: "auto" }, - }, body: { minInlineSize: 0, flexGrow: 1, @@ -51,7 +48,7 @@ export function Sidebar13() { Settings - + Settings diff --git a/packages/registry/src/components/blocks/sidebar-15.tsx b/packages/registry/src/components/blocks/sidebar-15.tsx index 29cc5d6e..4c92370c 100644 --- a/packages/registry/src/components/blocks/sidebar-15.tsx +++ b/packages/registry/src/components/blocks/sidebar-15.tsx @@ -39,6 +39,9 @@ const styles = stylex.create({ panel: { "@media (min-width: 800px)": { position: "absolute", blockSize: "auto" }, }, + calendarPanel: { + display: { default: "none", "@media (min-width: 64rem)": "flex" }, + }, body: { minInlineSize: 0, flexGrow: 1, @@ -140,7 +143,7 @@ export function Sidebar15() { {selected} {date?.toLocaleDateString()} - + Calendar From 58d4d8905cbd935428a2675f1dd027d45bc2faf0 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:38:38 +0700 Subject: [PATCH 023/134] docs(blocks): show layouts on the home page Load block previews through the existing showcase. --- apps/docs/src/catalog/introduction.tsx | 2 +- tests/e2e/docs/homepage-showcase.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/docs/src/catalog/introduction.tsx b/apps/docs/src/catalog/introduction.tsx index fecc6300..b7eadf72 100644 --- a/apps/docs/src/catalog/introduction.tsx +++ b/apps/docs/src/catalog/introduction.tsx @@ -157,7 +157,7 @@ const featuredSlugs = new Map( const showcaseGroups = navigationGroups .filter((group) => - ["Components", "Layout", "Typography"].includes(group.name), + ["Components", "Layout", "Typography", "Blocks"].includes(group.name), ) .map((group) => ({ title: group.name, diff --git a/tests/e2e/docs/homepage-showcase.spec.ts b/tests/e2e/docs/homepage-showcase.spec.ts index a626146a..84ea7d14 100644 --- a/tests/e2e/docs/homepage-showcase.spec.ts +++ b/tests/e2e/docs/homepage-showcase.spec.ts @@ -69,7 +69,7 @@ for (const theme of ["light", "dark"] as const) { page.locator("section[aria-labelledby^='showcase-']"), ).toHaveCount(showcaseSlugs.length) - for (const group of ["Components", "Layout", "Typography"]) { + for (const group of ["Components", "Layout", "Typography", "Blocks"]) { await expect( page.getByRole("heading", { name: group, level: 2, exact: true }), ).toBeVisible() From c99cb8c5d30ade5be527b08ec44e7b3fd14654a5 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:41:11 +0700 Subject: [PATCH 024/134] test(docs): check block group boundaries Follow the first block from Hooks and stop after the final signup. --- tests/e2e/docs/docs-navigation.spec.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/e2e/docs/docs-navigation.spec.ts b/tests/e2e/docs/docs-navigation.spec.ts index 8fd2b5e9..5b7982aa 100644 --- a/tests/e2e/docs/docs-navigation.spec.ts +++ b/tests/e2e/docs/docs-navigation.spec.ts @@ -209,7 +209,12 @@ for (const [path, previous, next] of [ ["/components/tooltip", "/components/toolbar", "/components/absolute-center"], ["/components/wrap", "/components/vstack", "/components/blockquote"], ["/components/text", "/components/strong", "/components/use-event-callback"], - ["/components/use-media-query", "/components/use-highlighted-code", null], + [ + "/components/use-media-query", + "/components/use-highlighted-code", + "/components/login-01", + ], + ["/components/signup-05", "/components/signup-04", null], ] as const) { test(`global page sequence at ${path}`, async ({ page }) => { await openDocsPage(page, path) From 07cf2bf44451ef883d920a2fb6a697e888fe51de Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:41:24 +0700 Subject: [PATCH 025/134] feat(blocks): port documentation sections Keep upstream navigation choices in sidebar variants 01 02 03 04. --- .../src/components/blocks/sidebar-01.tsx | 117 +++++----- .../src/components/blocks/sidebar-02.tsx | 146 ++++++------- .../src/components/blocks/sidebar-03.tsx | 199 ++++++------------ .../src/components/blocks/sidebar-04.tsx | 199 ++++++------------ 4 files changed, 247 insertions(+), 414 deletions(-) diff --git a/packages/registry/src/components/blocks/sidebar-01.tsx b/packages/registry/src/components/blocks/sidebar-01.tsx index 34215e9e..c03a3e89 100644 --- a/packages/registry/src/components/blocks/sidebar-01.tsx +++ b/packages/registry/src/components/blocks/sidebar-01.tsx @@ -22,6 +22,48 @@ import { tokens } from "@registry/styles/tokens.stylex" import * as stylex from "@stylexjs/stylex" import { useState } from "react" +const sections = [ + { title: "Getting Started", items: ["Installation", "Project Structure"] }, + { + title: "Build Your Application", + items: [ + "Routing", + "Data Fetching", + "Rendering", + "Caching", + "Styling", + "Optimizing", + "Configuring", + "Testing", + "Authentication", + "Deploying", + "Upgrading", + "Examples", + ], + }, + { + title: "API Reference", + items: [ + "Components", + "File Conventions", + "Functions", + "next.config.js Options", + "CLI", + "Edge Runtime", + ], + }, + { + title: "Architecture", + items: [ + "Accessibility", + "Fast Refresh", + "Next.js Compiler", + "Supported Browsers", + "Turbopack", + ], + }, +] + const styles = stylex.create({ frame: { position: "relative", @@ -51,9 +93,9 @@ export function Sidebar01() { {" "} Version{" "} - - Getting Started - - {["Installation", "Project Structure"].map((label) => - !label.toLowerCase().includes(search.toLowerCase()) ? null : ( - - setSelected(label)} - > - {label} - - - ), - )} - - - - Build Your Application - - {["Routing", "Data Fetching", "Rendering", "Caching"].map( - (label) => - !label.toLowerCase().includes(search.toLowerCase()) ? null : ( - - setSelected(label)} - > - {label} - - - ), - )} - - - - Architecture - - {["Accessibility", "Fast Refresh", "Supported Browsers"].map( - (label) => + {sections.map((section) => ( + + {section.title} + + {section.items.map((label) => !label.toLowerCase().includes(search.toLowerCase()) ? null : ( ), - )} - - - - Community - - {["Contribution Guide"].map((label) => - !label.toLowerCase().includes(search.toLowerCase()) ? null : ( - - setSelected(label)} - > - {label} - - - ), - )} - - + )} + + + ))} diff --git a/packages/registry/src/components/blocks/sidebar-02.tsx b/packages/registry/src/components/blocks/sidebar-02.tsx index 0109a499..8baaf00e 100644 --- a/packages/registry/src/components/blocks/sidebar-02.tsx +++ b/packages/registry/src/components/blocks/sidebar-02.tsx @@ -26,6 +26,49 @@ import { tokens } from "@registry/styles/tokens.stylex" import * as stylex from "@stylexjs/stylex" import { useState } from "react" +const sections = [ + { title: "Getting Started", items: ["Installation", "Project Structure"] }, + { + title: "Build Your Application", + items: [ + "Routing", + "Data Fetching", + "Rendering", + "Caching", + "Styling", + "Optimizing", + "Configuring", + "Testing", + "Authentication", + "Deploying", + "Upgrading", + "Examples", + ], + }, + { + title: "API Reference", + items: [ + "Components", + "File Conventions", + "Functions", + "next.config.js Options", + "CLI", + "Edge Runtime", + ], + }, + { + title: "Architecture", + items: [ + "Accessibility", + "Fast Refresh", + "Next.js Compiler", + "Supported Browsers", + "Turbopack", + ], + }, + { title: "Community", items: ["Contribution Guide"] }, +] + const styles = stylex.create({ frame: { position: "relative", @@ -55,9 +98,9 @@ export function Sidebar02() { {" "} Version{" "} - - - Getting Started - - - {["Installation", "Project Structure"].map((label) => - !label - .toLowerCase() - .includes(search.toLowerCase()) ? null : ( - - setSelected(label)} - > - {label} - - - ), - )} - - - - - - - Build Your Application - - - {["Routing", "Data Fetching", "Rendering", "Caching"].map( - (label) => - !label - .toLowerCase() - .includes(search.toLowerCase()) ? null : ( - - setSelected(label)} - > - {label} - - - ), - )} - - - - - - - Architecture - - - {["Accessibility", "Fast Refresh", "Supported Browsers"].map( - (label) => + {sections.map((section) => ( + + + + {section.title} + + + + {section.items.map((label) => !label .toLowerCase() .includes(search.toLowerCase()) ? null : ( @@ -134,34 +132,12 @@ export function Sidebar02() { ), - )} - - - - - - - Community - - - {["Contribution Guide"].map((label) => - !label - .toLowerCase() - .includes(search.toLowerCase()) ? null : ( - - setSelected(label)} - > - {label} - - - ), - )} - - - - + )} + + + + + ))} diff --git a/packages/registry/src/components/blocks/sidebar-03.tsx b/packages/registry/src/components/blocks/sidebar-03.tsx index 11561f4a..5f730e3c 100644 --- a/packages/registry/src/components/blocks/sidebar-03.tsx +++ b/packages/registry/src/components/blocks/sidebar-03.tsx @@ -7,9 +7,9 @@ import { Sidebar, SidebarContent, SidebarGroup, + SidebarGroupLabel, SidebarHeader, SidebarMenu, - SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, @@ -22,6 +22,49 @@ import { tokens } from "@registry/styles/tokens.stylex" import * as stylex from "@stylexjs/stylex" import { useId, useState } from "react" +const sections = [ + { title: "Getting Started", items: ["Installation", "Project Structure"] }, + { + title: "Build Your Application", + items: [ + "Routing", + "Data Fetching", + "Rendering", + "Caching", + "Styling", + "Optimizing", + "Configuring", + "Testing", + "Authentication", + "Deploying", + "Upgrading", + "Examples", + ], + }, + { + title: "API Reference", + items: [ + "Components", + "File Conventions", + "Functions", + "next.config.js Options", + "CLI", + "Edge Runtime", + ], + }, + { + title: "Architecture", + items: [ + "Accessibility", + "Fast Refresh", + "Next.js Compiler", + "Supported Browsers", + "Turbopack", + ], + }, + { title: "Community", items: ["Contribution Guide"] }, +] + const styles = stylex.create({ frame: { position: "relative", @@ -49,138 +92,28 @@ export function Sidebar03() { Documentation - - - - setSelected("Getting Started")} - > - {" "} - Getting Started - - - - setSelected("Installation")} - > - Installation - - - - setSelected("Project Structure")} - > - Project Structure - - - - - - - - - - setSelected("Build Your Application")} - > - {" "} - Build Your Application - - - - setSelected("Routing")} - > - Routing - - - - setSelected("Data Fetching")} - > - Data Fetching - - - - setSelected("Rendering")} - > - Rendering - - - - setSelected("Caching")} - > - Caching - - - - - - - - - - setSelected("Architecture")}> - {" "} - Architecture - - - - setSelected("Accessibility")} - > - Accessibility - - - - setSelected("Fast Refresh")} - > - Fast Refresh - - - - setSelected("Supported Browsers")} - > - Supported Browsers - - - - - - - - - - setSelected("Community")}> - {" "} - Community - - - - setSelected("Contribution Guide")} - > - Contribution Guide - - - - - - + {sections.map((section) => ( + + + + {section.title} + + {section.items.map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + + + ))} diff --git a/packages/registry/src/components/blocks/sidebar-04.tsx b/packages/registry/src/components/blocks/sidebar-04.tsx index 2ff49b47..c3e11957 100644 --- a/packages/registry/src/components/blocks/sidebar-04.tsx +++ b/packages/registry/src/components/blocks/sidebar-04.tsx @@ -7,9 +7,9 @@ import { Sidebar, SidebarContent, SidebarGroup, + SidebarGroupLabel, SidebarHeader, SidebarMenu, - SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, @@ -22,6 +22,49 @@ import { tokens } from "@registry/styles/tokens.stylex" import * as stylex from "@stylexjs/stylex" import { useId, useState } from "react" +const sections = [ + { title: "Getting Started", items: ["Installation", "Project Structure"] }, + { + title: "Build Your Application", + items: [ + "Routing", + "Data Fetching", + "Rendering", + "Caching", + "Styling", + "Optimizing", + "Configuring", + "Testing", + "Authentication", + "Deploying", + "Upgrading", + "Examples", + ], + }, + { + title: "API Reference", + items: [ + "Components", + "File Conventions", + "Functions", + "next.config.js Options", + "CLI", + "Edge Runtime", + ], + }, + { + title: "Architecture", + items: [ + "Accessibility", + "Fast Refresh", + "Next.js Compiler", + "Supported Browsers", + "Turbopack", + ], + }, + { title: "Community", items: ["Contribution Guide"] }, +] + const styles = stylex.create({ frame: { position: "relative", @@ -49,138 +92,28 @@ export function Sidebar04() { Documentation - - - - setSelected("Getting Started")} - > - {" "} - Getting Started - - - - setSelected("Installation")} - > - Installation - - - - setSelected("Project Structure")} - > - Project Structure - - - - - - - - - - setSelected("Build Your Application")} - > - {" "} - Build Your Application - - - - setSelected("Routing")} - > - Routing - - - - setSelected("Data Fetching")} - > - Data Fetching - - - - setSelected("Rendering")} - > - Rendering - - - - setSelected("Caching")} - > - Caching - - - - - - - - - - setSelected("Architecture")}> - {" "} - Architecture - - - - setSelected("Accessibility")} - > - Accessibility - - - - setSelected("Fast Refresh")} - > - Fast Refresh - - - - setSelected("Supported Browsers")} - > - Supported Browsers - - - - - - - - - - setSelected("Community")}> - {" "} - Community - - - - setSelected("Contribution Guide")} - > - Contribution Guide - - - - - - + {sections.map((section) => ( + + + + {section.title} + + {section.items.map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + + + ))} From e7a0715e5061956096995192d58a8611efd69be8 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:41:26 +0700 Subject: [PATCH 026/134] feat(blocks): port submenu navigation Keep upstream navigation choices in sidebar variants 05 06 14. --- .../src/components/blocks/sidebar-05.tsx | 181 ++++++++---------- .../src/components/blocks/sidebar-06.tsx | 158 ++++++--------- .../src/components/blocks/sidebar-14.tsx | 135 ++++++------- 3 files changed, 214 insertions(+), 260 deletions(-) diff --git a/packages/registry/src/components/blocks/sidebar-05.tsx b/packages/registry/src/components/blocks/sidebar-05.tsx index d19ddb97..feaa5d5d 100644 --- a/packages/registry/src/components/blocks/sidebar-05.tsx +++ b/packages/registry/src/components/blocks/sidebar-05.tsx @@ -15,16 +15,60 @@ import { SidebarHeader, SidebarInput, SidebarMenu, - SidebarMenuButton, SidebarMenuItem, - SidebarMenuText, + SidebarMenuSub, + SidebarMenuSubButton, + SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarTrigger, } from "@registry/providers/base-ui/components/ui/sidebar" import { tokens } from "@registry/styles/tokens.stylex" import * as stylex from "@stylexjs/stylex" -import { useState } from "react" +import { useId, useState } from "react" + +const sections = [ + { title: "Getting Started", items: ["Installation", "Project Structure"] }, + { + title: "Build Your Application", + items: [ + "Routing", + "Data Fetching", + "Rendering", + "Caching", + "Styling", + "Optimizing", + "Configuring", + "Testing", + "Authentication", + "Deploying", + "Upgrading", + "Examples", + ], + }, + { + title: "API Reference", + items: [ + "Components", + "File Conventions", + "Functions", + "next.config.js Options", + "CLI", + "Edge Runtime", + ], + }, + { + title: "Architecture", + items: [ + "Accessibility", + "Fast Refresh", + "Next.js Compiler", + "Supported Browsers", + "Turbopack", + ], + }, + { title: "Community", items: ["Contribution Guide"] }, +] const styles = stylex.create({ frame: { @@ -43,6 +87,7 @@ const styles = stylex.create({ }) export function Sidebar05() { + const contentId = useId() const [selected, setSelected] = useState("Installation") const [search, setSearch] = useState("") @@ -59,106 +104,46 @@ export function Sidebar05() { /> - - - Getting Started - - - {["Installation", "Project Structure"].map((label) => - !label - .toLowerCase() - .includes(search.toLowerCase()) ? null : ( - - setSelected(label)} - > - {label} - - - ), - )} - - - - - - - Build Your Application - - - {["Routing", "Data Fetching", "Rendering", "Caching"].map( - (label) => - !label - .toLowerCase() - .includes(search.toLowerCase()) ? null : ( - - setSelected(label)} - > - {label} - - - ), - )} - - - - - - - Architecture - - - {["Accessibility", "Fast Refresh", "Supported Browsers"].map( - (label) => - !label - .toLowerCase() - .includes(search.toLowerCase()) ? null : ( - - setSelected(label)} - > - {label} - - - ), - )} - - - - - - - Community - - - {["Contribution Guide"].map((label) => - !label - .toLowerCase() - .includes(search.toLowerCase()) ? null : ( - - setSelected(label)} - > - {label} - - - ), - )} - - - - + {sections.map((section) => ( + + + + + + {section.title} + + + + {section.items.map((label) => + !label + .toLowerCase() + .includes(search.toLowerCase()) ? null : ( + + setSelected(label)} + > + {label} + + + ), + )} + + + + + + + ))} - {selected} + {selected} ) diff --git a/packages/registry/src/components/blocks/sidebar-06.tsx b/packages/registry/src/components/blocks/sidebar-06.tsx index bef849bb..074f87fb 100644 --- a/packages/registry/src/components/blocks/sidebar-06.tsx +++ b/packages/registry/src/components/blocks/sidebar-06.tsx @@ -26,6 +26,48 @@ import { tokens } from "@registry/styles/tokens.stylex" import * as stylex from "@stylexjs/stylex" import { useState } from "react" +const sections = [ + { title: "Getting Started", items: ["Installation", "Project Structure"] }, + { + title: "Build Your Application", + items: [ + "Routing", + "Data Fetching", + "Rendering", + "Caching", + "Styling", + "Optimizing", + "Configuring", + "Testing", + "Authentication", + "Deploying", + "Upgrading", + "Examples", + ], + }, + { + title: "API Reference", + items: [ + "Components", + "File Conventions", + "Functions", + "next.config.js Options", + "CLI", + "Edge Runtime", + ], + }, + { + title: "Architecture", + items: [ + "Accessibility", + "Fast Refresh", + "Next.js Compiler", + "Supported Browsers", + "Turbopack", + ], + }, +] + const styles = stylex.create({ frame: { position: "relative", @@ -52,102 +94,26 @@ export function Sidebar06() { Documentation - - - Getting Started - - - setSelected("Installation")} - > - Installation - - setSelected("Project Structure")} - > - Project Structure - - - - - - - - Build Your Application - - - setSelected("Routing")} - > - Routing - - setSelected("Data Fetching")} - > - Data Fetching - - setSelected("Rendering")} - > - Rendering - - setSelected("Caching")} - > - Caching - - - - - - - - Architecture - - - setSelected("Accessibility")} - > - Accessibility - - setSelected("Fast Refresh")} - > - Fast Refresh - - setSelected("Supported Browsers")} - > - Supported Browsers - - - - - - - - Community - - - setSelected("Contribution Guide")} - > - Contribution Guide - - - - - + {sections.map((section) => ( + + + {section.title} + + + {section.items.map((label) => ( + setSelected(label)} + > + {label} + + ))} + + + + + ))}
event.preventDefault()}> diff --git a/packages/registry/src/components/blocks/sidebar-14.tsx b/packages/registry/src/components/blocks/sidebar-14.tsx index 156e637b..9fe74d75 100644 --- a/packages/registry/src/components/blocks/sidebar-14.tsx +++ b/packages/registry/src/components/blocks/sidebar-14.tsx @@ -10,16 +10,60 @@ import { SidebarGroupLabel, SidebarHeader, SidebarMenu, - SidebarMenuButton, SidebarMenuItem, - SidebarMenuText, + SidebarMenuSub, + SidebarMenuSubButton, + SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarTrigger, } from "@registry/providers/base-ui/components/ui/sidebar" import { tokens } from "@registry/styles/tokens.stylex" import * as stylex from "@stylexjs/stylex" -import { useState } from "react" +import { useId, useState } from "react" + +const sections = [ + { title: "Getting Started", items: ["Installation", "Project Structure"] }, + { + title: "Build Your Application", + items: [ + "Routing", + "Data Fetching", + "Rendering", + "Caching", + "Styling", + "Optimizing", + "Configuring", + "Testing", + "Authentication", + "Deploying", + "Upgrading", + "Examples", + ], + }, + { + title: "API Reference", + items: [ + "Components", + "File Conventions", + "Functions", + "next.config.js Options", + "CLI", + "Edge Runtime", + ], + }, + { + title: "Architecture", + items: [ + "Accessibility", + "Fast Refresh", + "Next.js Compiler", + "Supported Browsers", + "Turbopack", + ], + }, + { title: "Community", items: ["Contribution Guide"] }, +] const styles = stylex.create({ frame: { @@ -38,6 +82,7 @@ const styles = stylex.create({ }) export function Sidebar14() { + const contentId = useId() const [selected, setSelected] = useState("Installation") return ( @@ -51,70 +96,28 @@ export function Sidebar14() { Documentation - - Getting Started - - {["Installation", "Project Structure"].map((label) => ( - - setSelected(label)} - > - {label} - - - ))} - - - - Build Your Application - - {["Routing", "Data Fetching", "Rendering", "Caching"].map( - (label) => ( - - setSelected(label)} - > - {label} - - - ), - )} - - - - Architecture - - {["Accessibility", "Fast Refresh", "Supported Browsers"].map( - (label) => ( - - setSelected(label)} - > - {label} - - - ), - )} - - - - Community - - {["Contribution Guide"].map((label) => ( - - setSelected(label)} - > - {label} - + {sections.map((section) => ( + + + + {section.title} + + {section.items.map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + - ))} - - + + + ))} From 1e5c3894e79329b7689148b5f51a21f273c2a5c8 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:41:28 +0700 Subject: [PATCH 027/134] feat(blocks): port workspace sections Keep upstream navigation choices in sidebar variants 07 08 16. --- .../src/components/blocks/sidebar-07.tsx | 123 +++++++++-------- .../src/components/blocks/sidebar-08.tsx | 113 ++++++++++------ .../src/components/blocks/sidebar-16.tsx | 125 ++++++++++-------- 3 files changed, 213 insertions(+), 148 deletions(-) diff --git a/packages/registry/src/components/blocks/sidebar-07.tsx b/packages/registry/src/components/blocks/sidebar-07.tsx index 0636db86..c1b18638 100644 --- a/packages/registry/src/components/blocks/sidebar-07.tsx +++ b/packages/registry/src/components/blocks/sidebar-07.tsx @@ -2,6 +2,11 @@ import { Stack } from "@registry/components/ui/stack" import { Text } from "@registry/components/ui/text" +import { + Collapsible, + CollapsiblePanel, + CollapsibleTrigger, +} from "@registry/providers/base-ui/components/ui/collapsible" import { Heading } from "@registry/providers/base-ui/components/ui/heading" import { Menu, @@ -20,6 +25,9 @@ import { SidebarMenu, SidebarMenuButton, SidebarMenuItem, + SidebarMenuSub, + SidebarMenuSubButton, + SidebarMenuSubItem, SidebarMenuText, SidebarProvider, SidebarRail, @@ -28,7 +36,24 @@ import { import { tokens } from "@registry/styles/tokens.stylex" import * as stylex from "@stylexjs/stylex" import { FolderIcon } from "lucide-react" -import { useState } from "react" +import { useId, useState } from "react" + +const sections = [ + { title: "Playground", items: ["History", "Starred", "Settings"] }, + { title: "Models", items: ["Genesis", "Explorer", "Quantum"] }, + { + title: "Documentation", + items: ["Introduction", "Get Started", "Tutorials", "Changelog"], + }, + { title: "Settings", items: ["General", "Team", "Billing", "Limits"] }, +] + +const groups = [ + { + title: "Projects", + items: ["Design Engineering", "Sales & Marketing", "Travel"], + }, +] const styles = stylex.create({ frame: { @@ -47,6 +72,7 @@ const styles = stylex.create({ }) export function Sidebar07() { + const contentId = useId() const [selected, setSelected] = useState("Playground") return ( @@ -58,68 +84,61 @@ export function Sidebar07() { {" "} Workspace{" "} - - Platform - - {["Playground", "Models", "Documentation", "Settings"].map( - (label) => ( - - setSelected(label)} - > + {sections.map((section) => ( + + + + + - - ), - )} - - - - Projects - - {["Design Engineering", "Sales & Marketing", "Travel"].map( - (label) => ( + {section.title} + + + + {section.items.map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + + + + + ))} + {groups.map((group) => ( + + {group.title} + + {group.items.map((label) => ( setSelected(label)} > - - ), - )} - - - - Support - - {["Get help", "Feedback"].map((label) => ( - - setSelected(label)} - > - - - ))} - - + ))} + + + ))} @@ -146,7 +165,7 @@ export function Sidebar07() { - {selected} + {selected} ) diff --git a/packages/registry/src/components/blocks/sidebar-08.tsx b/packages/registry/src/components/blocks/sidebar-08.tsx index 36124dab..081e10a6 100644 --- a/packages/registry/src/components/blocks/sidebar-08.tsx +++ b/packages/registry/src/components/blocks/sidebar-08.tsx @@ -2,6 +2,11 @@ import { Stack } from "@registry/components/ui/stack" import { Text } from "@registry/components/ui/text" +import { + Collapsible, + CollapsiblePanel, + CollapsibleTrigger, +} from "@registry/providers/base-ui/components/ui/collapsible" import { Heading } from "@registry/providers/base-ui/components/ui/heading" import { Menu, @@ -20,6 +25,9 @@ import { SidebarMenu, SidebarMenuButton, SidebarMenuItem, + SidebarMenuSub, + SidebarMenuSubButton, + SidebarMenuSubItem, SidebarMenuText, SidebarProvider, SidebarRail, @@ -27,7 +35,25 @@ import { } from "@registry/providers/base-ui/components/ui/sidebar" import { tokens } from "@registry/styles/tokens.stylex" import * as stylex from "@stylexjs/stylex" -import { useState } from "react" +import { useId, useState } from "react" + +const sections = [ + { title: "Playground", items: ["History", "Starred", "Settings"] }, + { title: "Models", items: ["Genesis", "Explorer", "Quantum"] }, + { + title: "Documentation", + items: ["Introduction", "Get Started", "Tutorials", "Changelog"], + }, + { title: "Settings", items: ["General", "Team", "Billing", "Limits"] }, +] + +const groups = [ + { + title: "Projects", + items: ["Design Engineering", "Sales & Marketing", "Travel"], + }, + { title: "Support", items: ["Support", "Feedback"] }, +] const styles = stylex.create({ frame: { @@ -46,6 +72,7 @@ const styles = stylex.create({ }) export function Sidebar08() { + const contentId = useId() const [selected, setSelected] = useState("Playground") return ( @@ -55,55 +82,53 @@ export function Sidebar08() { Acme Inc. - - Platform - - {["Playground", "Models", "Documentation", "Settings"].map( - (label) => ( - - setSelected(label)} - > - {label} - - - ), - )} - - - - Projects - - {["Design Engineering", "Sales & Marketing", "Travel"].map( - (label) => ( + {sections.map((section) => ( + + + + + + {section.title} + + + + {section.items.map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + + + + + ))} + {groups.map((group) => ( + + {group.title} + + {group.items.map((label) => ( setSelected(label)} > {label} - ), - )} - - - - Support - - {["Get help", "Feedback"].map((label) => ( - - setSelected(label)} - > - {label} - - - ))} - - + ))} + + + ))} @@ -130,7 +155,7 @@ export function Sidebar08() { - {selected} + {selected} ) diff --git a/packages/registry/src/components/blocks/sidebar-16.tsx b/packages/registry/src/components/blocks/sidebar-16.tsx index d49a22e8..7f9bb32d 100644 --- a/packages/registry/src/components/blocks/sidebar-16.tsx +++ b/packages/registry/src/components/blocks/sidebar-16.tsx @@ -3,6 +3,11 @@ import { HStack } from "@registry/components/ui/hstack" import { Stack } from "@registry/components/ui/stack" import { Text } from "@registry/components/ui/text" +import { + Collapsible, + CollapsiblePanel, + CollapsibleTrigger, +} from "@registry/providers/base-ui/components/ui/collapsible" import { Heading } from "@registry/providers/base-ui/components/ui/heading" import { Menu, @@ -22,6 +27,9 @@ import { SidebarMenu, SidebarMenuButton, SidebarMenuItem, + SidebarMenuSub, + SidebarMenuSubButton, + SidebarMenuSubItem, SidebarMenuText, SidebarProvider, SidebarRail, @@ -29,7 +37,25 @@ import { } from "@registry/providers/base-ui/components/ui/sidebar" import { tokens } from "@registry/styles/tokens.stylex" import * as stylex from "@stylexjs/stylex" -import { useState } from "react" +import { useId, useState } from "react" + +const sections = [ + { title: "Playground", items: ["History", "Starred", "Settings"] }, + { title: "Models", items: ["Genesis", "Explorer", "Quantum"] }, + { + title: "Documentation", + items: ["Introduction", "Get Started", "Tutorials", "Changelog"], + }, + { title: "Settings", items: ["General", "Team", "Billing", "Limits"] }, +] + +const groups = [ + { + title: "Projects", + items: ["Design Engineering", "Sales & Marketing", "Travel"], + }, + { title: "Support", items: ["Support", "Feedback"] }, +] const styles = stylex.create({ row: { position: "relative", alignItems: "stretch", flexGrow: 1, gap: 0 }, @@ -56,6 +82,7 @@ const styles = stylex.create({ }) export function Sidebar16() { + const contentId = useId() const [selected, setSelected] = useState("Playground") const [search, setSearch] = useState("") @@ -77,63 +104,57 @@ export function Sidebar16() { Acme Inc. - - Platform - - {["Playground", "Models", "Documentation", "Settings"].map( - (label) => - !label - .toLowerCase() - .includes(search.toLowerCase()) ? null : ( - - setSelected(label)} - > - {label} - - - ), - )} - - - - Projects - - {["Design Engineering", "Sales & Marketing", "Travel"].map( - (label) => - !label - .toLowerCase() - .includes(search.toLowerCase()) ? null : ( - - setSelected(label)} - > - {label} - - - ), - )} - - - - Support - - {["Get help", "Feedback"].map((label) => - !label.toLowerCase().includes(search.toLowerCase()) ? null : ( + {sections.map((section) => ( + + + + + + {section.title} + + + + {section.items.map((label) => + !label + .toLowerCase() + .includes(search.toLowerCase()) ? null : ( + + setSelected(label)} + > + {label} + + + ), + )} + + + + + + + ))} + {groups.map((group) => ( + + {group.title} + + {group.items.map((label) => ( setSelected(label)} > {label} - ), - )} - - + ))} + + + ))} @@ -159,7 +180,7 @@ export function Sidebar16() { - {selected} + {selected} From fc522980c12792502b35783d9a3a2df468122d49 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:41:30 +0700 Subject: [PATCH 028/134] feat(blocks): port workspace pages Keep upstream navigation choices in sidebar variants 10 15. --- .../src/components/blocks/sidebar-10.tsx | 155 ++++++++++----- .../src/components/blocks/sidebar-15.tsx | 182 +++++++++++++----- 2 files changed, 247 insertions(+), 90 deletions(-) diff --git a/packages/registry/src/components/blocks/sidebar-10.tsx b/packages/registry/src/components/blocks/sidebar-10.tsx index c8b843b7..65f3ec1d 100644 --- a/packages/registry/src/components/blocks/sidebar-10.tsx +++ b/packages/registry/src/components/blocks/sidebar-10.tsx @@ -2,6 +2,11 @@ import { Stack } from "@registry/components/ui/stack" import { Text } from "@registry/components/ui/text" +import { + Collapsible, + CollapsiblePanel, + CollapsibleTrigger, +} from "@registry/providers/base-ui/components/ui/collapsible" import { Heading } from "@registry/providers/base-ui/components/ui/heading" import { Popover, @@ -26,6 +31,72 @@ import { tokens } from "@registry/styles/tokens.stylex" import * as stylex from "@stylexjs/stylex" import { useState } from "react" +const workspaces = [ + { + name: "Personal Life Management", + pages: [ + "Daily Journal & Reflection", + "Health & Wellness Tracker", + "Personal Growth & Learning Goals", + ], + }, + { + name: "Professional Development", + pages: [ + "Career Objectives & Milestones", + "Skill Acquisition & Training Log", + "Networking Contacts & Events", + ], + }, + { + name: "Creative Projects", + pages: [ + "Writing Ideas & Story Outlines", + "Art & Design Portfolio", + "Music Composition & Practice Log", + ], + }, + { + name: "Home Management", + pages: [ + "Household Budget & Expense Tracking", + "Home Maintenance Schedule & Tasks", + "Family Calendar & Event Planning", + ], + }, + { + name: "Travel & Adventure", + pages: [ + "Trip Planning & Itineraries", + "Travel Bucket List & Inspiration", + "Travel Journal & Photo Gallery", + ], + }, +] + +const groups = [ + { title: "Workspace", items: ["Search", "Ask AI", "Home", "Inbox"] }, + { + title: "Favorites", + items: [ + "Project Management & Task Tracking", + "Family Recipe Collection & Meal Planning", + "Fitness Tracker & Workout Routines", + "Book Notes & Reading List", + "Sustainable Gardening Tips & Plant Care", + "Language Learning Progress & Resources", + "Home Renovation Ideas & Budget Tracker", + "Personal Finance & Investment Portfolio", + "Movie & TV Show Watchlist with Reviews", + "Daily Habit Tracker & Goal Setting", + ], + }, + { + title: "Support", + items: ["Calendar", "Settings", "Templates", "Trash", "Help"], + }, +] + const styles = stylex.create({ frame: { position: "relative", @@ -54,58 +125,52 @@ export function Sidebar10() { {" "} Workspace{" "} - - Workspace - - {["Search", "Ask AI", "Home", "Inbox"].map((label) => ( - - setSelected(label)} - > - {label} - - - ))} - - - - Favorites - - {["Project Management", "Personal Life"].map((label) => ( - - setSelected(label)} - > - {label} - - - ))} - - Workspaces - - {["Design Engineering", "Sales & Marketing"].map((label) => ( - - setSelected(label)} - > - {label} - - - ))} - + {workspaces.map((workspace) => ( + + {workspace.name} + + + {workspace.pages.map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + + ))} + {groups.map((group) => ( + + {group.title} + + {group.items.map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + ))} diff --git a/packages/registry/src/components/blocks/sidebar-15.tsx b/packages/registry/src/components/blocks/sidebar-15.tsx index 4c92370c..72c7b88d 100644 --- a/packages/registry/src/components/blocks/sidebar-15.tsx +++ b/packages/registry/src/components/blocks/sidebar-15.tsx @@ -1,8 +1,15 @@ "use client" import { Calendar } from "@registry/components/ui/calendar" +import { HStack } from "@registry/components/ui/hstack" import { Stack } from "@registry/components/ui/stack" import { Text } from "@registry/components/ui/text" +import { Checkbox } from "@registry/providers/base-ui/components/ui/checkbox" +import { + Collapsible, + CollapsiblePanel, + CollapsibleTrigger, +} from "@registry/providers/base-ui/components/ui/collapsible" import { Heading } from "@registry/providers/base-ui/components/ui/heading" import { Menu, @@ -30,6 +37,78 @@ import { tokens } from "@registry/styles/tokens.stylex" import * as stylex from "@stylexjs/stylex" import { useState } from "react" +const workspaces = [ + { + name: "Personal Life Management", + pages: [ + "Daily Journal & Reflection", + "Health & Wellness Tracker", + "Personal Growth & Learning Goals", + ], + }, + { + name: "Professional Development", + pages: [ + "Career Objectives & Milestones", + "Skill Acquisition & Training Log", + "Networking Contacts & Events", + ], + }, + { + name: "Creative Projects", + pages: [ + "Writing Ideas & Story Outlines", + "Art & Design Portfolio", + "Music Composition & Practice Log", + ], + }, + { + name: "Home Management", + pages: [ + "Household Budget & Expense Tracking", + "Home Maintenance Schedule & Tasks", + "Family Calendar & Event Planning", + ], + }, + { + name: "Travel & Adventure", + pages: [ + "Trip Planning & Itineraries", + "Travel Bucket List & Inspiration", + "Travel Journal & Photo Gallery", + ], + }, +] + +const groups = [ + { title: "Workspace", items: ["Search", "Ask AI", "Home", "Inbox"] }, + { + title: "Favorites", + items: [ + "Project Management & Task Tracking", + "Family Recipe Collection & Meal Planning", + "Fitness Tracker & Workout Routines", + "Book Notes & Reading List", + "Sustainable Gardening Tips & Plant Care", + "Language Learning Progress & Resources", + "Home Renovation Ideas & Budget Tracker", + "Personal Finance & Investment Portfolio", + "Movie & TV Show Watchlist with Reviews", + "Daily Habit Tracker & Goal Setting", + ], + }, + { + title: "Support", + items: ["Calendar", "Settings", "Templates", "Trash", "Help"], + }, +] + +const calendars = [ + { name: "My Calendars", items: ["Personal", "Work", "Family"] }, + { name: "Favorites", items: ["Holidays", "Birthdays"] }, + { name: "Other", items: ["Travel", "Reminders", "Deadlines"] }, +] + const styles = stylex.create({ frame: { position: "relative", @@ -62,58 +141,52 @@ export function Sidebar15() { {" "} Workspace{" "} - - Workspace - - {["Search", "Ask AI", "Home", "Inbox"].map((label) => ( - - setSelected(label)} - > - {label} - - - ))} - - - - Favorites - - {["Project Management", "Personal Life"].map((label) => ( - - setSelected(label)} - > - {label} - - - ))} - - Workspaces - - {["Design Engineering", "Sales & Marketing"].map((label) => ( - - setSelected(label)} - > - {label} - - - ))} - + {workspaces.map((workspace) => ( + + {workspace.name} + + + {workspace.pages.map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + + ))} + {groups.map((group) => ( + + {group.title} + + {group.items.map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + ))} @@ -149,6 +222,25 @@ export function Sidebar15() { + {calendars.map((calendar) => ( + + + {calendar.name} + + + {calendar.items.map((label) => ( + + + + {label} + + + ))} + + + + + ))} From ba5cdff7a63b070bba1ba15d30389d94f4a02dc3 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:41:32 +0700 Subject: [PATCH 029/134] feat(blocks): port calendar and settings lists Keep upstream navigation choices in sidebar variants 12 13. --- .../src/components/blocks/sidebar-12.tsx | 59 ++++++++----------- .../src/components/blocks/sidebar-13.tsx | 59 ++++++++++++------- 2 files changed, 62 insertions(+), 56 deletions(-) diff --git a/packages/registry/src/components/blocks/sidebar-12.tsx b/packages/registry/src/components/blocks/sidebar-12.tsx index 2bfc6e28..59e60afb 100644 --- a/packages/registry/src/components/blocks/sidebar-12.tsx +++ b/packages/registry/src/components/blocks/sidebar-12.tsx @@ -34,6 +34,12 @@ import { tokens } from "@registry/styles/tokens.stylex" import * as stylex from "@stylexjs/stylex" import { useState } from "react" +const calendars = [ + { name: "My Calendars", items: ["Personal", "Work", "Family"] }, + { name: "Favorites", items: ["Holidays", "Birthdays"] }, + { name: "Other", items: ["Travel", "Reminders", "Deadlines"] }, +] + const styles = stylex.create({ frame: { position: "relative", @@ -62,40 +68,25 @@ export function Sidebar12() { - - - My calendars - - - {["Personal", "Work"].map((label) => ( - - - - {label} - - - ))} - - - - - - - Other calendars - - - {["Holidays", "Birthdays"].map((label) => ( - - - - {label} - - - ))} - - - - + {calendars.map((calendar) => ( + + + {calendar.name} + + + {calendar.items.map((label) => ( + + + + {label} + + + ))} + + + + + ))} diff --git a/packages/registry/src/components/blocks/sidebar-13.tsx b/packages/registry/src/components/blocks/sidebar-13.tsx index 5f0a906a..4fe9ab1d 100644 --- a/packages/registry/src/components/blocks/sidebar-13.tsx +++ b/packages/registry/src/components/blocks/sidebar-13.tsx @@ -26,6 +26,26 @@ import { tokens } from "@registry/styles/tokens.stylex" import * as stylex from "@stylexjs/stylex" import { useState } from "react" +const groups = [ + { + title: "Settings", + items: [ + "Notifications", + "Navigation", + "Home", + "Appearance", + "Messages & media", + "Language & region", + "Accessibility", + "Mark as read", + "Audio & video", + "Connected accounts", + "Privacy & visibility", + "Advanced", + ], + }, +] + const styles = stylex.create({ frame: { position: "relative", @@ -53,28 +73,23 @@ export function Sidebar13() { Settings - - Settings - - {[ - "Notifications", - "Navigation", - "Appearance", - "Language", - "Privacy", - "Advanced", - ].map((label) => ( - - setSelected(label)} - > - {label} - - - ))} - - + {groups.map((group) => ( + + {group.title} + + {group.items.map((label) => ( + + setSelected(label)} + > + {label} + + + ))} + + + ))} From 67a40b0e4b5b2dd58314cc2f6ccf8784d3ebe5d5 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:41:34 +0700 Subject: [PATCH 030/134] fix(registry): include block control sources Install each layout with the controls used by its panels. --- packages/registry/src/items/blocks.ts | 28 ++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/packages/registry/src/items/blocks.ts b/packages/registry/src/items/blocks.ts index bc0afbfd..42d4d191 100644 --- a/packages/registry/src/items/blocks.ts +++ b/packages/registry/src/items/blocks.ts @@ -155,13 +155,13 @@ const definitions = [ name: "sidebar-07", title: "Sidebar07", description: "A sidebar that collapses to icons.", - parts: ["sidebar", "stack", "heading", "text", "menu"], + parts: ["collapsible", "sidebar", "stack", "heading", "text", "menu"], }, { name: "sidebar-08", title: "Sidebar08", description: "An inset sidebar with secondary navigation.", - parts: ["sidebar", "stack", "heading", "text", "menu"], + parts: ["collapsible", "sidebar", "stack", "heading", "text", "menu"], }, { name: "sidebar-09", @@ -173,7 +173,7 @@ const definitions = [ name: "sidebar-10", title: "Sidebar10", description: "A sidebar in a popover.", - parts: ["sidebar", "stack", "heading", "text", "popover"], + parts: ["collapsible", "sidebar", "stack", "heading", "text", "popover"], }, { name: "sidebar-11", @@ -213,13 +213,31 @@ const definitions = [ name: "sidebar-15", title: "Sidebar15", description: "A left and right sidebar.", - parts: ["sidebar", "stack", "heading", "text", "menu", "calendar"], + parts: [ + "checkbox", + "collapsible", + "hstack", + "sidebar", + "stack", + "heading", + "text", + "menu", + "calendar", + ], }, { name: "sidebar-16", title: "Sidebar16", description: "A sidebar with a sticky site header.", - parts: ["hstack", "sidebar", "stack", "heading", "text", "menu"], + parts: [ + "collapsible", + "hstack", + "sidebar", + "stack", + "heading", + "text", + "menu", + ], }, ] From 7ae86b1cf6bf2d44b3b91ed1bf0f6ab07d950ba8 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:42:08 +0700 Subject: [PATCH 031/134] feat(blocks): select mail by folder Show messages, senders, and content in the nested sidebar layout. --- .../src/components/blocks/sidebar-09.tsx | 128 ++++++++++++++++-- 1 file changed, 115 insertions(+), 13 deletions(-) diff --git a/packages/registry/src/components/blocks/sidebar-09.tsx b/packages/registry/src/components/blocks/sidebar-09.tsx index 02481735..4b2a3edd 100644 --- a/packages/registry/src/components/blocks/sidebar-09.tsx +++ b/packages/registry/src/components/blocks/sidebar-09.tsx @@ -36,6 +36,89 @@ import { } from "lucide-react" import { useState } from "react" +const messages = [ + { + name: "William Smith", + subject: "Meeting Tomorrow", + date: "09:34 AM", + teaser: + "Hi team, just a reminder about our meeting tomorrow at 10 AM.\nPlease come prepared with your project updates.", + folder: "Inbox", + }, + { + name: "Alice Smith", + subject: "Re: Project Update", + date: "Yesterday", + teaser: + "Thanks for the update. The progress looks great so far.\nLet's schedule a call to discuss the next steps.", + folder: "Inbox", + }, + { + name: "Bob Johnson", + subject: "Weekend Plans", + date: "2 days ago", + teaser: + "Hey everyone! I'm thinking of organizing a team outing this weekend.\nWould you be interested in a hiking trip or a beach day?", + folder: "Inbox", + }, + { + name: "Emily Davis", + subject: "Re: Question about Budget", + date: "2 days ago", + teaser: + "I've reviewed the budget numbers you sent over.\nCan we set up a quick call to discuss some potential adjustments?", + folder: "Inbox", + }, + { + name: "Michael Wilson", + subject: "Important Announcement", + date: "1 week ago", + teaser: + "Please join us for an all-hands meeting this Friday at 3 PM.\nWe have some exciting news to share about the company's future.", + folder: "Inbox", + }, + { + name: "Sarah Brown", + subject: "Re: Feedback on Proposal", + date: "1 week ago", + teaser: + "Thank you for sending over the proposal. I've reviewed it and have some thoughts.\nCould we schedule a meeting to discuss my feedback in detail?", + folder: "Drafts", + }, + { + name: "David Lee", + subject: "New Project Idea", + date: "1 week ago", + teaser: + "I've been brainstorming and came up with an interesting project concept.\nDo you have time this week to discuss its potential impact and feasibility?", + folder: "Sent", + }, + { + name: "Olivia Wilson", + subject: "Vacation Plans", + date: "1 week ago", + teaser: + "Just a heads up that I'll be taking a two-week vacation next month.\nI'll make sure all my projects are up to date before I leave.", + folder: "Sent", + }, + { + name: "James Martin", + subject: "Re: Conference Registration", + date: "1 week ago", + teaser: + "I've completed the registration for the upcoming tech conference.\nLet me know if you need any additional information from my end.", + folder: "Junk", + }, + { + name: "Sophia White", + subject: "Team Dinner", + date: "1 week ago", + teaser: + "To celebrate our recent project success, I'd like to organize a team dinner.\nAre you available next Friday evening? Please let me know your preferences.", + folder: "Trash", + }, +] + const styles = stylex.create({ frame: { position: "relative", @@ -57,10 +140,15 @@ const styles = stylex.create({ export function Sidebar09() { const [selected, setSelected] = useState("Inbox") - const [message, setMessage] = useState("Weekly update") + const [open, setOpen] = useState(true) + const [subject, setSubject] = useState("") + const folderMessages = messages.filter((item) => item.folder === selected) + + const message = + folderMessages.find((item) => item.subject === subject) ?? folderMessages[0] return ( - + @@ -83,7 +171,10 @@ export function Sidebar09() { aria-label={label} title={label} isActive={selected === label} - onClick={() => setSelected(label)} + onClick={() => { + setSelected(label) + setOpen(true) + }} > @@ -136,7 +230,15 @@ export function Sidebar09() { {selected} - {message} + {message && ( + + + {message.name} ยท {message.date} + + {message.subject} + {message.teaser} + + )} ) From 728e87deffe621c07c1b003def92e8ba71a85f81 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:42:10 +0700 Subject: [PATCH 032/134] feat(blocks): list page actions in popover Include the upstream action choices in the inline sidebar. --- .../src/components/blocks/sidebar-10.tsx | 36 ++++++++++++------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/packages/registry/src/components/blocks/sidebar-10.tsx b/packages/registry/src/components/blocks/sidebar-10.tsx index 65f3ec1d..5f3e3a37 100644 --- a/packages/registry/src/components/blocks/sidebar-10.tsx +++ b/packages/registry/src/components/blocks/sidebar-10.tsx @@ -181,19 +181,29 @@ export function Sidebar10() { - setSelected("Customize page")} - > - Customize page - - setSelected("Turn into wiki")} - > - Turn into wiki - - setSelected("Move to")}> - Move to - + + {[ + "Customize Page", + "Turn into wiki", + "Copy Link", + "Duplicate", + "Move to", + "Move to Trash", + "Undo", + "View analytics", + "Version History", + "Show delete pages", + "Notifications", + "Import", + "Export", + ].map((action) => ( + + setSelected(action)}> + {action} + + + ))} + From 9f3bcea07b34b22a21bf2b1909e1e39c7dd41bf2 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:42:58 +0700 Subject: [PATCH 033/134] test(blocks): exercise sidebar workflows Select a file, toggle calendars, use menus, and inspect dialog access. --- tests/e2e/registry/blocks.spec.ts | 61 +++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 3 deletions(-) diff --git a/tests/e2e/registry/blocks.spec.ts b/tests/e2e/registry/blocks.spec.ts index 43e14444..9d152687 100644 --- a/tests/e2e/registry/blocks.spec.ts +++ b/tests/e2e/registry/blocks.spec.ts @@ -18,17 +18,72 @@ for (const prefix of ["", "ark-ui/"]) { if (group === "sidebar") { if (number === 13) { await preview.getByRole("button", { name: "Open settings" }).click() - await expect(page.getByRole("dialog")).toBeVisible() + const dialog = page.getByRole("dialog") + await expect(dialog).toBeVisible() + await dialog + .getByRole("button", { name: "Appearance", exact: true }) + .click() + await expect( + dialog.getByRole("heading", { name: "Appearance" }), + ).toBeVisible() + expect( + ( + await new AxeBuilder({ page }) + .include('[role="dialog"]') + .analyze() + ).violations, + ).toEqual([]) await page.keyboard.press("Escape") await expect( preview.getByRole("button", { name: "Open settings" }), ).toBeFocused() } else { await expect(preview.getByRole("heading").first()).toBeVisible() - await preview + + const toggle = preview .getByRole("button", { name: /toggle sidebar/i }) .first() - .click() + + const mobile = (page.viewportSize()?.width ?? 0) < 800 + + if (mobile) await toggle.click() + const panel = mobile ? page.getByRole("dialog") : preview + + if (number === 6) { + await panel + .getByRole("button", { name: "Getting Started", exact: true }) + .click() + await page + .getByRole("menuitemradio", { name: "Project Structure" }) + .click() + } else if (number === 11) { + await panel + .getByRole("button", { name: "api", exact: true }) + .click() + await panel + .getByRole("button", { name: "hello", exact: true }) + .click() + await panel + .getByRole("button", { name: "route.ts", exact: true }) + .click() + } else if (number === 12) { + const personal = panel.getByRole("checkbox", { + name: "Personal", + exact: true, + }) + + await expect(personal).toBeChecked() + await personal.press("Space") + await expect(personal).not.toBeChecked() + } + + if (mobile) { + await expect(panel).toBeVisible() + await page.keyboard.press("Escape") + await expect(panel).toBeHidden() + } else { + await toggle.click() + } } } else { const email = preview.getByLabel("Email", { exact: true }) From 5c57ecb573ff6b608d6ca07b8b525cb0a1444fc8 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:44:58 +0700 Subject: [PATCH 034/134] docs(blocks): show CLI installation Show how to install and import a block. --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index cc5b36f7..ac25b032 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,28 @@ except for local HTTP. It must not contain credentials, query strings, or fragments. The CLI rejects redirects. See [installation](https://ui.yopem.com/docs/installation). +## Install a block + +Choose `login-01` through `login-05`, `signup-01` through `signup-05`, or +`sidebar-01` through `sidebar-16`. Install one layout by name: + +```sh +bunx --bun @yopem-ui/cli add sidebar-09 +``` + +Both providers install blocks under `components/blocks`. The CLI installs their +UI primitives separately. Import the layout from the block file: + +```tsx +import { Sidebar09 } from "@/components/blocks/sidebar-09" + +export function MailPage() { + return +} +``` + +Authentication blocks provide forms, not an authentication service. + ## Styling Use `Box` for generic containers. Use its `render` prop to select a semantic From 2048dfd8f41d660c28fef3a75466f9ccc4b62cd6 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:52:24 +0700 Subject: [PATCH 035/134] fix(docs): open full blocks from showcase Keep full-page layouts out of compact cards and restore trigger focus. --- apps/docs/src/catalog/homepage-preview.tsx | 30 ++++++++++++++++++++++ tests/e2e/docs/homepage-showcase.spec.ts | 16 ++++++++++++ 2 files changed, 46 insertions(+) diff --git a/apps/docs/src/catalog/homepage-preview.tsx b/apps/docs/src/catalog/homepage-preview.tsx index 40165142..1d51dd34 100644 --- a/apps/docs/src/catalog/homepage-preview.tsx +++ b/apps/docs/src/catalog/homepage-preview.tsx @@ -2,6 +2,15 @@ import { Stack } from "@registry/components/ui/stack" import { Text } from "@registry/components/ui/text" +import { blockItems } from "@registry/items/blocks" +import { Button } from "@registry/providers/base-ui/components/ui/button" +import { + Dialog, + DialogTrigger, + DialogPopup, + DialogTitle, + DialogPanel, +} from "@registry/providers/base-ui/components/ui/dialog" import { Heading } from "@registry/providers/base-ui/components/ui/heading" import { Sidebar, @@ -30,6 +39,7 @@ import { Preview as MessageThumbnail } from "./previews/base-ui/message" import { Preview as ProsePreview } from "./previews/base-ui/prose" const styles = stylex.create({ + blockPopup: { inlineSize: "min(64rem, 94vw)", maxInlineSize: "94vw" }, pageHeading: { fontSize: "2.25rem" }, sectionHeading: { fontSize: "1.5rem" }, subsectionHeading: { fontSize: "1.25rem" }, @@ -70,6 +80,26 @@ export function HomepagePreview({ item }: { item: CatalogItem }) { const Preview = item.preview?.component + const block = blockItems.find(({ name }) => name === item.slug) + + if (block && Preview) + return ( + + {block.description} + + }> + Open {item.title} + + + {item.title} + + + + + + + ) + return Preview ? : null } diff --git a/tests/e2e/docs/homepage-showcase.spec.ts b/tests/e2e/docs/homepage-showcase.spec.ts index 84ea7d14..afaf1c95 100644 --- a/tests/e2e/docs/homepage-showcase.spec.ts +++ b/tests/e2e/docs/homepage-showcase.spec.ts @@ -383,3 +383,19 @@ test("chart homepage uses one compact preview", async ({ page }, testInfo) => { scale: "css", }) }) + +test("a block opens from its homepage card without mounting every layout", async ({ + page, +}) => { + await openDocsPage(page, "/") + const card = showcase(page, "login-01") + await card.scrollIntoViewIfNeeded() + const open = card.getByRole("button", { name: "Open Login 01" }) + await open.focus() + await open.press("Enter") + const dialog = page.getByRole("dialog", { name: "Login 01" }) + await dialog.getByLabel("Email", { exact: true }).fill("reader@example.com") + await page.keyboard.press("Escape") + await expect(dialog).toBeHidden() + await expect(open).toBeFocused() +}) From 0fc5355c1c03f411e8aef1bdea008009770f4fbc Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 14:56:01 +0700 Subject: [PATCH 036/134] test(registry): check block HTTP targets Keep the path contract for primitives and check the block directory. --- tests/e2e/docs/http-contracts.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/e2e/docs/http-contracts.spec.ts b/tests/e2e/docs/http-contracts.spec.ts index 22188537..ad7e72be 100644 --- a/tests/e2e/docs/http-contracts.spec.ts +++ b/tests/e2e/docs/http-contracts.spec.ts @@ -220,7 +220,9 @@ test("public registry inventory ships source, dependencies, and documentation", const target = item.type === "registry:hook" ? `@/hooks/${item.name}.ts` - : `@/components/ui/${item.name}.tsx` + : item.categories.includes("blocks") + ? `@/components/blocks/${item.name}.tsx` + : `@/components/ui/${item.name}.tsx` expect(item.files).toEqual( expect.arrayContaining([expect.objectContaining({ target })]), From 9f8eb3c6248b8381286497b3495a8e93bffba515 Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 15:00:11 +0700 Subject: [PATCH 037/134] test(blocks): dismiss menu before mobile sheet Check the nested menu closes before testing outer sheet dismissal. --- tests/e2e/registry/blocks.spec.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/e2e/registry/blocks.spec.ts b/tests/e2e/registry/blocks.spec.ts index 9d152687..8155f35c 100644 --- a/tests/e2e/registry/blocks.spec.ts +++ b/tests/e2e/registry/blocks.spec.ts @@ -53,9 +53,15 @@ for (const prefix of ["", "ark-ui/"]) { await panel .getByRole("button", { name: "Getting Started", exact: true }) .click() - await page - .getByRole("menuitemradio", { name: "Project Structure" }) - .click() + + const choice = page.getByRole("menuitemradio", { + name: "Project Structure", + }) + + await choice.click() + + if (await choice.isVisible()) await page.keyboard.press("Escape") + await expect(choice).toBeHidden() } else if (number === 11) { await panel .getByRole("button", { name: "api", exact: true }) From e839322e2d5251faeb5fc776094e99f77ffbd7cd Mon Sep 17 00:00:00 2001 From: Karyana Yandi Date: Mon, 30 Nov 2026 15:00:12 +0700 Subject: [PATCH 038/134] fix(blocks): keep menus inside sidebar sheets Portal sidebar menus into their owning panel for pointer and focus access. --- packages/registry/src/components/blocks/sidebar-06.tsx | 7 ++++--- packages/registry/src/components/blocks/sidebar-07.tsx | 7 ++++--- packages/registry/src/components/blocks/sidebar-08.tsx | 7 ++++--- packages/registry/src/components/blocks/sidebar-09.tsx | 7 ++++--- packages/registry/src/components/blocks/sidebar-12.tsx | 7 ++++--- packages/registry/src/components/blocks/sidebar-15.tsx | 7 ++++--- packages/registry/src/components/blocks/sidebar-16.tsx | 7 ++++--- 7 files changed, 28 insertions(+), 21 deletions(-) diff --git a/packages/registry/src/components/blocks/sidebar-06.tsx b/packages/registry/src/components/blocks/sidebar-06.tsx index 074f87fb..da83a8ee 100644 --- a/packages/registry/src/components/blocks/sidebar-06.tsx +++ b/packages/registry/src/components/blocks/sidebar-06.tsx @@ -24,7 +24,7 @@ import { } from "@registry/providers/base-ui/components/ui/sidebar" import { tokens } from "@registry/styles/tokens.stylex" import * as stylex from "@stylexjs/stylex" -import { useState } from "react" +import { useRef, useState } from "react" const sections = [ { title: "Getting Started", items: ["Installation", "Project Structure"] }, @@ -85,11 +85,12 @@ const styles = stylex.create({ }) export function Sidebar06() { + const sidebarRef = useRef(null) const [selected, setSelected] = useState("Installation") return ( - + Documentation @@ -98,7 +99,7 @@ export function Sidebar06() { {section.title} - + {section.items.map((label) => ( (null) const contentId = useId() const [selected, setSelected] = useState("Playground") return ( - + Acme Inc.