diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 00000000..9efd4d1b --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,33 @@ +name: Code Quality Check + +on: + - push + - pull_request + +jobs: + cache-and-install: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + run_install: false + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: "pnpm" + + - name: Install dependencies + run: pnpm install + + - name: Format + run: pnpm ci:format + + - name: Lint + run: pnpm ci:lint diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100644 index cb2c84d5..00000000 --- a/.husky/pre-commit +++ /dev/null @@ -1 +0,0 @@ -pnpm lint-staged diff --git a/.husky/registry b/.husky/registry new file mode 100644 index 00000000..f4b6b78d --- /dev/null +++ b/.husky/registry @@ -0,0 +1 @@ +pnpm -F docs registry:gen \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index d29d370e..f10692b6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,13 +1,14 @@ { - "tailwindCSS.experimental.classRegex": [ - ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"] - ], - "editor.defaultFormatter": "biomejs.biome", - "editor.codeActionsOnSave": { - "quickfix.biome": "explicit", - "source.organizeImports.biome": "explicit", - "source.removeUnusedImports": "explicit" - }, - "astro.content-intellisense": true, - "eslint.useFlatConfig": true + "tailwindCSS.experimental.classRegex": [ + ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"] + ], + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.codeActionsOnSave": { + "source.removeUnusedImports": "explicit", + "source.fixAll.eslint": "explicit" + }, + "eslint.useFlatConfig": true, + "[yaml]": { + "editor.defaultFormatter": "redhat.vscode-yaml" + } } diff --git a/biome.json b/biome.json deleted file mode 100644 index fb20ba08..00000000 --- a/biome.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "$schema": "https://biomejs.dev/schemas/1.7.0/schema.json", - "formatter": { - "enabled": true - }, - "organizeImports": { - "enabled": true - }, - "linter": { - "enabled": true, - "rules": { - "recommended": true, - "style": { - "noNonNullAssertion": "off" - }, - "suspicious": { - "noExplicitAny": "off" - }, - "a11y": { - "noSvgWithoutTitle": "off" - } - }, - "ignore": ["*.js"] - }, - "css": { - "formatter": { - "enabled": true - } - } -} diff --git a/docs/.lintstagedrc.json b/docs/.lintstagedrc.json deleted file mode 100644 index 5ed1dba8..00000000 --- a/docs/.lintstagedrc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "src/**/*.{ts,tsx}": [ - "pnpm registry:gen", - "biome check --write --unsafe --staged --no-errors-on-unmatched", - "eslint --fix" - ] -} diff --git a/docs/.prettierignore b/docs/.prettierignore new file mode 100644 index 00000000..968b90c7 --- /dev/null +++ b/docs/.prettierignore @@ -0,0 +1 @@ +src/__registry__/** \ No newline at end of file diff --git a/docs/app.config.ts b/docs/app.config.ts index 9f11d70e..7815efdf 100644 --- a/docs/app.config.ts +++ b/docs/app.config.ts @@ -1,153 +1,154 @@ -import { dirname, resolve } from "node:path"; -import { fileURLToPath } from "node:url"; -import { defineConfig } from "@solidjs/start/config"; +import { dirname, resolve } from "node:path" +import { fileURLToPath } from "node:url" +import { defineConfig } from "@solidjs/start/config" //@ts-expect-error -import pkg from "@vinxi/plugin-mdx"; -import { type Options, rehypePrettyCode } from "rehype-pretty-code"; -import rehypeSlug from "rehype-slug"; -import { codeImport } from "remark-code-import"; -import remarkFrontmatter from "remark-frontmatter"; -import remarkGFM from "remark-gfm"; -import { visit } from "unist-util-visit"; -import docsGen from "./plugins/gen"; +import pkg from "@vinxi/plugin-mdx" +import { rehypePrettyCode, type Options } from "rehype-pretty-code" +import rehypeSlug from "rehype-slug" +import { codeImport } from "remark-code-import" +import remarkFrontmatter from "remark-frontmatter" +import remarkGFM from "remark-gfm" +import { visit } from "unist-util-visit" -const { default: mdx } = pkg; +import docsGen from "./plugins/gen" -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); +const { default: mdx } = pkg + +const __filename = fileURLToPath(import.meta.url) +const __dirname = dirname(__filename) export default defineConfig({ - extensions: ["mdx"], - vite: { - plugins: [ - mdx.withImports({})({ - jsx: true, - jsxImportSource: "solid-js", - providerImportSource: "@/components/mdx", - remarkPlugins: [ - remarkGFM, - remarkFrontmatter, - [ - codeImport, - { - allowImportingFromOutside: true, - } satisfies Parameters[0], - ], - ], - rehypePlugins: [ - rehypeSlug, - () => (tree: any) => { - visit(tree, (node) => { - if (node.type === "element" && node.tagName === "pre") { - const [codeEl] = node.children; - if (codeEl.tagName !== "code") return; + extensions: ["mdx"], + vite: { + plugins: [ + mdx.withImports({})({ + jsx: true, + jsxImportSource: "solid-js", + providerImportSource: "@/components/mdx", + remarkPlugins: [ + remarkGFM, + remarkFrontmatter, + [ + codeImport, + { + allowImportingFromOutside: true, + } satisfies Parameters[0], + ], + ], + rehypePlugins: [ + rehypeSlug, + () => (tree: any) => { + visit(tree, (node) => { + if (node.type === "element" && node.tagName === "pre") { + const [codeEl] = node.children + if (codeEl.tagName !== "code") return - node.__rawString__ = codeEl.children[0].value; - node.__src__ = node.properties.__src__; - } - }); - }, - [ - rehypePrettyCode, - { - theme: "vesper", - keepBackground: false, - } satisfies Options, - ], - () => (tree: any) => { - visit(tree, (node) => { - if (node?.type === "element" && node?.tagName === "figure") { - if (!("data-rehype-pretty-code-figure" in node.properties)) - return; + node.__rawString__ = codeEl.children[0].value + node.__src__ = node.properties.__src__ + } + }) + }, + [ + rehypePrettyCode, + { + theme: "vesper", + keepBackground: false, + } satisfies Options, + ], + () => (tree: any) => { + visit(tree, (node) => { + if (node?.type === "element" && node?.tagName === "figure") { + if (!("data-rehype-pretty-code-figure" in node.properties)) + return - const preElement = node.children.at(-1); - if (preElement.tagName !== "pre") return; + const preElement = node.children.at(-1) + if (preElement.tagName !== "pre") return - preElement.properties.withMeta = - node.children.at(0).tagName === "figcaption"; - preElement.properties.rawString = node.__rawString__; - if (node.__src__) preElement.properties.src = node.__src__; - } - }); - }, - () => (tree: any) => { - visit(tree, (node) => { - if (node.type !== "element" || node?.tagName !== "pre") return; + preElement.properties.withMeta = + node.children.at(0).tagName === "figcaption" + preElement.properties.rawString = node.__rawString__ + if (node.__src__) preElement.properties.src = node.__src__ + } + }) + }, + () => (tree: any) => { + visit(tree, (node) => { + if (node.type !== "element" || node?.tagName !== "pre") return - // npm install. - if (node.properties?.rawString?.startsWith("npm install")) { - const npmCommand = node.properties.rawString; - node.properties.npmCommand = npmCommand; - node.properties.yarnCommand = npmCommand.replace( - "npm install", - "yarn add", - ); - node.properties.pnpmCommand = npmCommand.replace( - "npm install", - "pnpm add", - ); - node.properties.bunCommand = npmCommand.replace( - "npm install", - "bun add", - ); - } + // npm install. + if (node.properties?.rawString?.startsWith("npm install")) { + const npmCommand = node.properties.rawString + node.properties.npmCommand = npmCommand + node.properties.yarnCommand = npmCommand.replace( + "npm install", + "yarn add" + ) + node.properties.pnpmCommand = npmCommand.replace( + "npm install", + "pnpm add" + ) + node.properties.bunCommand = npmCommand.replace( + "npm install", + "bun add" + ) + } - // npx create. - if (node.properties?.rawString?.startsWith("npx create-")) { - const npmCommand = node.properties.rawString; - node.properties.npmCommand = npmCommand; - node.properties.yarnCommand = npmCommand.replace( - "npx create-", - "yarn create ", - ); - node.properties.pnpmCommand = npmCommand.replace( - "npx create-", - "pnpm create ", - ); - node.properties.bunCommand = npmCommand.replace( - "npx create-", - "bun create", - ); - } + // npx create. + if (node.properties?.rawString?.startsWith("npx create-")) { + const npmCommand = node.properties.rawString + node.properties.npmCommand = npmCommand + node.properties.yarnCommand = npmCommand.replace( + "npx create-", + "yarn create " + ) + node.properties.pnpmCommand = npmCommand.replace( + "npx create-", + "pnpm create " + ) + node.properties.bunCommand = npmCommand.replace( + "npx create-", + "bun create" + ) + } - // npx. - if ( - node.properties?.rawString?.startsWith("npx") && - !node.properties?.rawString?.startsWith("npx create-") - ) { - const npmCommand = node.properties.rawString; - node.properties.npmCommand = npmCommand; - node.properties.yarnCommand = npmCommand; - node.properties.pnpmCommand = npmCommand.replace( - "npx", - "pnpm dlx", - ); - node.properties.bunCommand = npmCommand.replace("npx", "bunx"); - } - }); - }, - () => (tree: any) => { - visit(tree, "text", (node) => { - if (node.value.includes("@/registry")) { - node.value = node.value - .replace(/@\/registry\/tailwindcss\/hooks\//g, "@/hooks/") - .replace(/@\/registry\/tailwindcss\/libs\//g, "@/libs/") - .replace( - /@\/registry\/tailwindcss\/ui\//g, - "@/components/ui/", - ); - } - }); - }, - ], - }), - docsGen(), - ], - resolve: { - alias: { - "#content": resolve(__dirname, "./.content"), - "@": resolve(__dirname, "./src"), - }, - }, - }, -}); + // npx. + if ( + node.properties?.rawString?.startsWith("npx") && + !node.properties?.rawString?.startsWith("npx create-") + ) { + const npmCommand = node.properties.rawString + node.properties.npmCommand = npmCommand + node.properties.yarnCommand = npmCommand + node.properties.pnpmCommand = npmCommand.replace( + "npx", + "pnpm dlx" + ) + node.properties.bunCommand = npmCommand.replace("npx", "bunx") + } + }) + }, + () => (tree: any) => { + visit(tree, "text", (node) => { + if (node.value.includes("@/registry")) { + node.value = node.value + .replace(/@\/registry\/tailwindcss\/hooks\//g, "@/hooks/") + .replace(/@\/registry\/tailwindcss\/libs\//g, "@/libs/") + .replace( + /@\/registry\/tailwindcss\/ui\//g, + "@/components/ui/" + ) + } + }) + }, + ], + }), + docsGen(), + ], + resolve: { + alias: { + "#content": resolve(__dirname, "./.content"), + "@": resolve(__dirname, "./src"), + }, + }, + }, +}) diff --git a/docs/biome.json b/docs/biome.json deleted file mode 100644 index 69357bb6..00000000 --- a/docs/biome.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "https://biomejs.dev/schemas/1.7.0/schema.json", - "extends": ["../biome.json"], - "formatter": { - "ignore": ["./src/__registry__/index.ts"] - }, - "linter": { - "ignore": [ - "./src/routes/(app)/examples/_components/**/*.tsx", - "./src/**/*.css" - ] - } -} diff --git a/docs/eslint.config.js b/docs/eslint.config.js index 6e34cf8a..31920aed 100644 --- a/docs/eslint.config.js +++ b/docs/eslint.config.js @@ -1,47 +1,9 @@ -import js from "@eslint/js"; -import * as tsParser from "@typescript-eslint/parser"; -import biome from "eslint-config-biome"; -import solid from "eslint-plugin-solid/configs/typescript"; -import tseslint from "typescript-eslint"; +import config from "../eslint.config.mjs" -export default tseslint.config( - js.configs.recommended, - tseslint.configs.strictTypeChecked, - tseslint.configs.stylisticTypeChecked, - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument - biome, - { - languageOptions: { - parserOptions: { - projectService: true, - tsconfigRootDir: import.meta.dirname, - }, - }, - }, - { - files: ["**/*.{ts,tsx}"], - ...solid, - languageOptions: { - parser: tsParser, - parserOptions: { - project: "tsconfig.json", - }, - }, - }, - { - rules: { - "@typescript-eslint/no-unsafe-assignment": "off", - "@typescript-eslint/no-unsafe-call": "off", - "@typescript-eslint/no-unsafe-member-access": "off", - "@typescript-eslint/consistent-type-definitions": ["error", "type"], - "@typescript-eslint/no-confusing-void-expression": "off", - "@typescript-eslint/ban-ts-comment": "off", - "@typescript-eslint/no-unsafe-return": "off", - "@typescript-eslint/restrict-plus-operands": "off", - "@typescript-eslint/no-misused-promises": "off", - "@typescript-eslint/restrict-template-expressions": "off", - "@typescript-eslint/no-redundant-type-constituents": "off", - "@typescript-eslint/no-unused-vars": "warn", - }, - }, -); +/** @type {import('eslint').Linter.Config} */ +export default [ + ...config, + { + ignores: ["src/__registry__/**", "app.config.ts"], + }, +] diff --git a/docs/package.json b/docs/package.json index 40259ddf..cab1bdec 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,69 +1,67 @@ { - "name": "docs", - "type": "module", - "scripts": { - "dev": "pnpm registry:gen && pnpm vinxi dev", - "build": "pnpm registry:gen && pnpm vinxi build", - "start": "vinxi start", - "version": "vinxi version", - "registry:gen": "tsx ./scripts/index.ts" - }, - "dependencies": { - "@ark-ui/solid": "^4.5.1", - "@corvu/drawer": "^0.2.2", - "@corvu/otp-field": "^0.1.4", - "@corvu/resizable": "^0.2.3", - "@kobalte/core": "^0.13.7", - "@solid-primitives/intersection-observer": "^2.1.6", - "@solid-primitives/storage": "^4.2.1", - "@solidjs/meta": "^0.29.4", - "@solidjs/router": "^0.15.0", - "@solidjs/start": "^1.0.10", - "@tanstack/solid-table": "^8.20.5", - "@unovis/solid": "^1.5.0", - "@unovis/ts": "^1.5.0", - "class-variance-authority": "^0.7.1", - "clsx": "^2.1.1", - "cmdk-solid": "^1.1.0", - "embla-carousel-autoplay": "8.5.1", - "embla-carousel-solid": "8.5.1", - "shiki": "^1.24.2", - "solid-js": "^1.9.2", - "solid-wrap-balancer": "^0.0.5", - "somoto": "^0.0.2", - "tailwind-merge": "^2.5.5", - "vinxi": "^0.4.3" - }, - "engines": { - "node": ">=18" - }, - "devDependencies": { - "@eslint/js": "^9.16.0", - "@typescript-eslint/parser": "^8.17.0", - "@vinxi/plugin-mdx": "^3.7.2", - "autoprefixer": "^10.4.20", - "eslint": "^9.16.0", - "eslint-config-biome": "^1.9.4", - "eslint-plugin-solid": "^0.14.4", - "postcss": "^8.4.49", - "rehype-pretty-code": "^0.14.0", - "rehype-slug": "^6.0.0", - "rehype-stringify": "^10.0.1", - "remark-code-import": "^1.2.0", - "remark-frontmatter": "^5.0.0", - "remark-gfm": "^3.0.1", - "remark-parse": "^11.0.0", - "remark-rehype": "^11.1.1", - "rimraf": "^6.0.1", - "tailwindcss": "^3.4.16", - "tailwindcss-animate": "^1.0.7", - "to-vfile": "^8.0.0", - "ts-morph": "^24.0.0", - "tsx": "^4.19.2", - "typescript-eslint": "^8.17.0", - "unified": "^11.0.5", - "unist-util-visit": "^5.0.0", - "valibot": "1.0.0-beta.9", - "vfile-matter": "^5.0.0" - } + "name": "docs", + "type": "module", + "scripts": { + "dev": "pnpm registry:gen && pnpm vinxi dev", + "build": "pnpm registry:gen && pnpm vinxi build", + "start": "vinxi start", + "version": "vinxi version", + "registry:gen": "tsx ./scripts/index.ts", + "lint": "eslint --fix --max-warnings 0 --report-unused-disable-directives", + "format": "prettier -w \"**/*.{ts,tsx,mdx}\"", + "ci:lint": "eslint --max-warnings 0 --report-unused-disable-directives", + "ci:format": "prettier -c \"**/*.{ts,tsx,mdx}\"" + }, + "dependencies": { + "@ark-ui/solid": "^4.5.1", + "@corvu/drawer": "^0.2.2", + "@corvu/otp-field": "^0.1.4", + "@corvu/resizable": "^0.2.3", + "@kobalte/core": "^0.13.7", + "@solid-primitives/intersection-observer": "^2.1.6", + "@solid-primitives/storage": "^4.2.1", + "@solidjs/meta": "^0.29.4", + "@solidjs/router": "^0.15.0", + "@solidjs/start": "^1.0.10", + "@tanstack/solid-table": "^8.20.5", + "@unovis/solid": "^1.5.0", + "@unovis/ts": "^1.5.0", + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", + "cmdk-solid": "^1.1.0", + "embla-carousel-autoplay": "8.5.1", + "embla-carousel-solid": "8.5.1", + "shiki": "^1.24.2", + "solid-js": "^1.9.2", + "solid-wrap-balancer": "^0.0.5", + "somoto": "^0.0.2", + "tailwind-merge": "^2.5.5", + "vinxi": "^0.4.3" + }, + "engines": { + "node": ">=18" + }, + "devDependencies": { + "@vinxi/plugin-mdx": "^3.7.2", + "autoprefixer": "^10.4.20", + "postcss": "^8.4.49", + "rehype-pretty-code": "^0.14.0", + "rehype-slug": "^6.0.0", + "rehype-stringify": "^10.0.1", + "remark-code-import": "^1.2.0", + "remark-frontmatter": "^5.0.0", + "remark-gfm": "^3.0.1", + "remark-parse": "^11.0.0", + "remark-rehype": "^11.1.1", + "rimraf": "^6.0.1", + "tailwindcss": "^3.4.16", + "tailwindcss-animate": "^1.0.7", + "to-vfile": "^8.0.0", + "ts-morph": "^24.0.0", + "tsx": "^4.19.2", + "unified": "^11.0.5", + "unist-util-visit": "^5.0.0", + "valibot": "1.0.0-beta.9", + "vfile-matter": "^5.0.0" + } } diff --git a/docs/plugins/gen.ts b/docs/plugins/gen.ts index b610f6ca..a0060ac6 100644 --- a/docs/plugins/gen.ts +++ b/docs/plugins/gen.ts @@ -1,113 +1,113 @@ -import { existsSync, mkdirSync, readdirSync, writeFileSync } from "node:fs"; -import { join, relative, resolve } from "node:path"; -import rehypeSlug from "rehype-slug"; -import rehypeStringify from "rehype-stringify"; -import remarkFrontmatter from "remark-frontmatter"; -import remarkParse from "remark-parse"; -import remarkRehype from "remark-rehype"; -import { readSync } from "to-vfile"; -import { unified } from "unified"; -import { matter } from "vfile-matter"; -import type { Plugin } from "vinxi"; +import { existsSync, mkdirSync, readdirSync, writeFileSync } from "node:fs" +import { join, relative, resolve } from "node:path" +import rehypeSlug from "rehype-slug" +import rehypeStringify from "rehype-stringify" +import remarkFrontmatter from "remark-frontmatter" +import remarkParse from "remark-parse" +import remarkRehype from "remark-rehype" +import { readSync } from "to-vfile" +import { unified } from "unified" +import { matter } from "vfile-matter" +import type { Plugin } from "vinxi" type Doc = { - headings?: { depth: number; slug: string; text: string }[]; - frontmatter?: { - title: string; - description: string; - component: boolean; - link: { - doc: string; - api: string; - }; - toc: boolean; - }; - slug?: string; -}; + headings?: { depth: number; slug: string; text: string }[] + frontmatter?: { + title: string + description: string + component: boolean + link: { + doc: string + api: string + } + toc: boolean + } + slug?: string +} const traverseDirectory = async ( - currentDir: string, - docsDir: string, - processor: ReturnType, - docs: Doc[], + currentDir: string, + docsDir: string, + processor: ReturnType, + docs: Doc[] ) => { - const items = readdirSync(currentDir, { withFileTypes: true }); - - for (const item of items) { - const fullPath = join(currentDir, item.name); - - if (item.isDirectory()) { - await traverseDirectory(fullPath, docsDir, processor, docs); - } else if (item.isFile() && item.name.endsWith(".mdx")) { - const fileContent = readSync(fullPath, "utf-8"); - matter(fileContent); - - const relativePath = relative(docsDir, fullPath); - const slug = `/docs/${relativePath.replace(/\.mdx$/, "").replace(/\\/g, "/")}`; - - const processed = await processor.process(String(fileContent)); - const headings: { depth: number; slug: string; text: string }[] = []; - - // Extract headings with slugs - const regex = /([^<]+)<\/h\d>/g; - let match: RegExpExecArray | null; - - // biome-ignore lint/suspicious/noAssignInExpressions: - while ((match = regex.exec(String(processed))) !== null) { - const depth = Number(match[1]); - const slug = match[2]; - const text = match[3].trim(); - - headings.push({ depth, slug, text }); - } - - docs.push({ - frontmatter: fileContent.data.matter as Doc["frontmatter"], - headings, - slug, - }); - } - } -}; + const items = readdirSync(currentDir, { withFileTypes: true }) + + for (const item of items) { + const fullPath = join(currentDir, item.name) + + if (item.isDirectory()) { + await traverseDirectory(fullPath, docsDir, processor, docs) + } else if (item.isFile() && item.name.endsWith(".mdx")) { + const fileContent = readSync(fullPath, "utf-8") + matter(fileContent) + + const relativePath = relative(docsDir, fullPath) + const slug = `/docs/${relativePath.replace(/\.mdx$/, "").replace(/\\/g, "/")}` + + const processed = await processor.process(String(fileContent)) + const headings: { depth: number; slug: string; text: string }[] = [] + + // Extract headings with slugs + const regex = /([^<]+)<\/h\d>/g + let match: RegExpExecArray | null + + // biome-ignore lint/suspicious/noAssignInExpressions: + while ((match = regex.exec(String(processed))) !== null) { + const depth = Number(match[1]) + const slug = match[2] + const text = match[3].trim() + + headings.push({ depth, slug, text }) + } + + docs.push({ + frontmatter: fileContent.data.matter as Doc["frontmatter"], + headings, + slug, + }) + } + } +} const processFiles = async () => { - const docs: Doc[] = []; - const outputFile = resolve(".content/index.js"); - const docsDir = resolve("src/routes/(app)/docs"); - - if (!existsSync(".content")) { - mkdirSync(".content", { recursive: true }); - } - - const processor = unified() - .use(remarkParse) - .use(remarkFrontmatter) - .use(remarkRehype) - .use(rehypeSlug) - .use(rehypeStringify); - - // @ts-expect-error - await traverseDirectory(docsDir, docsDir, processor, docs); - - writeFileSync( - outputFile, - `export const allDocs = ${JSON.stringify(docs, null, 2)}`, - "utf-8", - ); -}; + const docs: Doc[] = [] + const outputFile = resolve(".content/index.js") + const docsDir = resolve("src/routes/(app)/docs") + + if (!existsSync(".content")) { + mkdirSync(".content", { recursive: true }) + } + + const processor = unified() + .use(remarkParse) + .use(remarkFrontmatter) + .use(remarkRehype) + .use(rehypeSlug) + .use(rehypeStringify) + + // @ts-expect-error + await traverseDirectory(docsDir, docsDir, processor, docs) + + writeFileSync( + outputFile, + `export const allDocs = ${JSON.stringify(docs, null, 2)}`, + "utf-8" + ) +} export default function docsGen(): Plugin { - return { - name: "docs-gen", - async buildStart() { - await processFiles(); - }, - configureServer(server) { - server.watcher.on("change", async (filePath) => { - if (filePath.endsWith(".mdx")) { - await processFiles(); - } - }); - }, - }; + return { + name: "docs-gen", + async buildStart() { + await processFiles() + }, + configureServer(server) { + server.watcher.on("change", async (filePath) => { + if (filePath.endsWith(".mdx")) { + await processFiles() + } + }) + }, + } } diff --git a/docs/scripts/index.ts b/docs/scripts/index.ts index 5b4484e0..9173b983 100644 --- a/docs/scripts/index.ts +++ b/docs/scripts/index.ts @@ -1,285 +1,278 @@ -import { existsSync, mkdirSync } from "node:fs"; -import fs from "node:fs"; -import { tmpdir } from "node:os"; -import path from "node:path"; -import { registry } from "@/registry"; -import { frameworks } from "@/registry/frameworks"; -import { type Registry, registrySchema } from "@/registry/schema"; -import { rimraf } from "rimraf"; -import { Project, ScriptKind } from "ts-morph"; -import * as v from "valibot"; - -const REGISTRY_PATH = path.join(process.cwd(), "public/registry"); +import fs, { existsSync, mkdirSync } from "node:fs" +import { tmpdir } from "node:os" +import path from "node:path" +import { registry } from "@/registry" +import { rimraf } from "rimraf" +import { Project, ScriptKind } from "ts-morph" +import * as v from "valibot" + +import { frameworks } from "@/registry/frameworks" +import { registrySchema, type Registry } from "@/registry/schema" + +const REGISTRY_PATH = path.join(process.cwd(), "public/registry") const project = new Project({ - compilerOptions: {}, -}); + compilerOptions: {}, +}) function createTempSourceFile(filename: string) { - const dir = fs.mkdtempSync(path.join(tmpdir(), "shadcn-")); - return path.join(dir, filename); + const dir = fs.mkdtempSync(path.join(tmpdir(), "shadcn-")) + return path.join(dir, filename) } const fixImport = (content: string) => { - const regex = /@\/(.+?)\/((?:.*?\/)?(?:components|ui|hooks|lib))\/([\w-]+)/g; - - const replacement = ( - match: string, - path: string, - type: string, - component: string, - ) => { - if (type.endsWith("components")) { - return `@/components/${component}`; - } - if (type.endsWith("ui")) { - return `@/components/ui/${component}`; - } - if (type.endsWith("hooks")) { - return `@/hooks/${component}`; - } - if (type.endsWith("lib")) { - return `@/lib/${component}`; - } - - return match; - }; - - return content.replace(regex, replacement); -}; + const regex = /@\/(.+?)\/((?:.*?\/)?(?:components|ui|hooks|lib))\/([\w-]+)/g + + const replacement = ( + match: string, + path: string, + type: string, + component: string + ) => { + if (type.endsWith("components")) { + return `@/components/${component}` + } + if (type.endsWith("ui")) { + return `@/components/ui/${component}` + } + if (type.endsWith("hooks")) { + return `@/hooks/${component}` + } + if (type.endsWith("lib")) { + return `@/lib/${component}` + } + + return match + } + + return content.replace(regex, replacement) +} const getFileContent = (filePath: string) => { - const raw = fs.readFileSync(filePath, "utf-8"); + const raw = fs.readFileSync(filePath, "utf-8") - const project = new Project({ - compilerOptions: {}, - }); + const project = new Project({ + compilerOptions: {}, + }) - const tempFile = createTempSourceFile(filePath); - const sourceFile = project.createSourceFile(tempFile, raw, { - scriptKind: ScriptKind.TSX, - }); + const tempFile = createTempSourceFile(filePath) + const sourceFile = project.createSourceFile(tempFile, raw, { + scriptKind: ScriptKind.TSX, + }) - let code = sourceFile.getFullText(); + let code = sourceFile.getFullText() - // Fix imports. - code = fixImport(code); + // Fix imports. + code = fixImport(code) - return JSON.stringify(code, null, 4); -}; + return JSON.stringify(code, null, 4) +} // ---------------------------------------------------------------------------- // Build __registry__/index.tsx. // ---------------------------------------------------------------------------- function buildRegistry(registry: Registry) { - let index = `// @ts-nocheck + let index = `// @ts-nocheck // This file is autogenerated by scripts/index.ts // Do not edit this file directly. import { clientOnly } from "@solidjs/start" export const Index: Record = { - `; - - for (const framework of frameworks) { - // we don't render any of component or example of `unocss` - if (framework.name === "unocss") { - break; - } - - index += ` "${framework.name}": {`; - - // Build style index. - for (const item of registry) { - // we only need `example` and `block` - if (item.type === "registry:example" || item.type === "registry:block") { - const resolveFiles = item.files?.map( - (file) => - `src/registry/${framework.name}/${ - typeof file === "string" ? file : file.path - }`, - ); - if (!resolveFiles) { - continue; - } - - const type = item.type.split(":")[1]; - let sourceFilename = ""; - - let componentPath = `@/registry/${framework.name}/${type}/${item.name}`; - - if (item.type === "registry:block") { - const file = resolveFiles[0]; - const filename = path.basename(file); - - let raw: string; - try { - raw = fs.readFileSync(file, "utf8"); - } catch { - continue; - } - - const tempFile = createTempSourceFile(filename); - const sourceFile = project.createSourceFile(tempFile, raw, { - scriptKind: ScriptKind.TSX, - }); - - // Find all imports. - const imports = new Map< - string, - { - module: string; - text: string; - isDefault?: boolean; - } - >(); - for (const node of sourceFile.getImportDeclarations()) { - const module = node.getModuleSpecifier().getLiteralValue(); - for (const item of node.getNamedImports()) { - imports.set(item.getText(), { - module, - text: node.getText(), - }); - } - - const defaultImport = node.getDefaultImport(); - if (defaultImport) { - imports.set(defaultImport.getText(), { - module, - text: defaultImport.getText(), - isDefault: true, - }); - } - } - - // // Write the source file for blocks only. - sourceFilename = `__registry__/${framework.name}/${type}/${item.name}.tsx`; - - if (item.files) { - const files = item.files.map((file) => - typeof file === "string" - ? { type: "registry:page", path: file } - : file, - ); - if (files.length) { - sourceFilename = `src/__registry__/${framework.name}/${files[0].path}`; - } - } - - const sourcePath = path.join(process.cwd(), sourceFilename); - if (!existsSync(sourcePath)) { - fs.mkdirSync(sourcePath, { recursive: true }); - } - - rimraf.sync(sourcePath); - fs.writeFileSync(sourcePath, sourceFile.getText()); - } - - if (item.files) { - const files = item.files.map((file) => - typeof file === "string" - ? { type: "registry:page", path: file } - : file, - ); - if (files.length) { - componentPath = `@/registry/${framework.name}/${files[0].path.slice(0, -4)}`; - } - } - - index += ` + ` + + for (const framework of frameworks) { + // we don't render any of component or example of `unocss` + if (framework.name === "unocss") { + break + } + + index += ` "${framework.name}": {` + + // Build style index. + for (const item of registry) { + // we only need `example` and `block` + if (item.type === "registry:example" || item.type === "registry:block") { + const resolveFiles = item.files?.map( + (file) => + `src/registry/${framework.name}/${ + typeof file === "string" ? file : file.path + }` + ) + if (!resolveFiles) { + continue + } + + const type = item.type.split(":")[1] + let sourceFilename = "" + + let componentPath = `@/registry/${framework.name}/${type}/${item.name}` + + if (item.type === "registry:block") { + const file = resolveFiles[0] + const filename = path.basename(file) + + let raw: string + try { + raw = fs.readFileSync(file, "utf8") + } catch { + continue + } + + const tempFile = createTempSourceFile(filename) + const sourceFile = project.createSourceFile(tempFile, raw, { + scriptKind: ScriptKind.TSX, + }) + + // Find all imports. + const imports = new Map< + string, + { + module: string + text: string + isDefault?: boolean + } + >() + for (const node of sourceFile.getImportDeclarations()) { + const module = node.getModuleSpecifier().getLiteralValue() + for (const item of node.getNamedImports()) { + imports.set(item.getText(), { + module, + text: node.getText(), + }) + } + + const defaultImport = node.getDefaultImport() + if (defaultImport) { + imports.set(defaultImport.getText(), { + module, + text: defaultImport.getText(), + isDefault: true, + }) + } + } + + // // Write the source file for blocks only. + sourceFilename = `__registry__/${framework.name}/${type}/${item.name}.tsx` + + if (item.files) { + const files = item.files.map((file) => + typeof file === "string" + ? { type: "registry:page", path: file } + : file + ) + if (files.length) { + sourceFilename = `src/__registry__/${framework.name}/${files[0].path}` + } + } + + const sourcePath = path.join(process.cwd(), sourceFilename) + if (!existsSync(sourcePath)) { + fs.mkdirSync(sourcePath, { recursive: true }) + } + + rimraf.sync(sourcePath) + fs.writeFileSync(sourcePath, sourceFile.getText()) + } + + if (item.files) { + const files = item.files.map((file) => + typeof file === "string" + ? { type: "registry:page", path: file } + : file + ) + if (files.length) { + componentPath = `@/registry/${framework.name}/${files[0].path.slice(0, -4)}` + } + } + + index += ` "${item.name}": { name: "${item.name}", description: "${item.description ?? ""}", type: "${item.type}", registryDependencies: ${JSON.stringify(item.registryDependencies)}, files: [${item.files?.map((file) => { - const filePath = `src/registry/${framework.name}/${ - typeof file === "string" ? file : file.path - }`; - const resolvedFilePath = path.resolve(filePath); - const content = getFileContent(filePath); - - return typeof file === "string" - ? `"${resolvedFilePath}"` - : `{ + const filePath = `src/registry/${framework.name}/${ + typeof file === "string" ? file : file.path + }` + const resolvedFilePath = path.resolve(filePath) + const content = getFileContent(filePath) + + return typeof file === "string" + ? `"${resolvedFilePath}"` + : `{ path: "${filePath}", type: "${file.type}", target: "${file.target ?? ""}", content: ${item.type === "registry:block" ? content : '""'} - }`; - })}], + }` + })}], component: clientOnly(() => import("${componentPath}"), { lazy: true }), source: "${sourceFilename}", category: "${item.category ?? ""}", subcategory: "${item.subcategory ?? ""}" - },`; - } - } + },` + } + } - index += ` - },`; - } + index += ` + },` + } - index += ` + index += ` + } + ` + + // ---------------------------------------------------------------------------- + // Build registry/index.json. + // ---------------------------------------------------------------------------- + const items = registry + .filter((item) => ["registry:ui"].includes(item.type)) + .map((item) => { + return { + ...item, + files: item.files?.map((_file) => { + const file = + typeof _file === "string" + ? { + path: _file, + type: item.type, + } + : _file + + return file + }), + } + }) + const registryJson = JSON.stringify(items, null, 2) + if (!existsSync(path.join(REGISTRY_PATH))) { + mkdirSync(path.join(REGISTRY_PATH), { recursive: true }) } - `; - - // ---------------------------------------------------------------------------- - // Build registry/index.json. - // ---------------------------------------------------------------------------- - const items = registry - .filter((item) => ["registry:ui"].includes(item.type)) - .map((item) => { - return { - ...item, - files: item.files?.map((_file) => { - const file = - typeof _file === "string" - ? { - path: _file, - type: item.type, - } - : _file; - - return file; - }), - }; - }); - const registryJson = JSON.stringify(items, null, 2); - if (!existsSync(path.join(REGISTRY_PATH))) { - mkdirSync(path.join(REGISTRY_PATH), { recursive: true }); - } - rimraf.sync(path.join(REGISTRY_PATH, "index.json")); - fs.writeFileSync( - path.join(REGISTRY_PATH, "index.json"), - registryJson, - "utf8", - ); - - // Write style index. - if (!existsSync(path.join(process.cwd(), "src/__registry__"))) { - mkdirSync(path.join(process.cwd(), "src/__registry__"), { - recursive: true, - }); - } - rimraf.sync(path.join(process.cwd(), "src/__registry__/index.ts")); - fs.writeFileSync( - path.join(process.cwd(), "src/__registry__/index.ts"), - index, - ); + rimraf.sync(path.join(REGISTRY_PATH, "index.json")) + fs.writeFileSync(path.join(REGISTRY_PATH, "index.json"), registryJson, "utf8") + + // Write style index. + if (!existsSync(path.join(process.cwd(), "src/__registry__"))) { + mkdirSync(path.join(process.cwd(), "src/__registry__"), { + recursive: true, + }) + } + rimraf.sync(path.join(process.cwd(), "src/__registry__/index.ts")) + fs.writeFileSync(path.join(process.cwd(), "src/__registry__/index.ts"), index) } try { - const result = v.safeParse(registrySchema, registry); + const result = v.safeParse(registrySchema, registry) - if (!result.success) { - console.error(result.issues); - process.exit(1); - } + if (!result.success) { + console.error(result.issues) + process.exit(1) + } - buildRegistry(result.output); + buildRegistry(result.output) - console.log("✅ Done!"); + console.log("✅ Done!") } catch (error) { - console.error(error); - process.exit(1); + console.error(error) + process.exit(1) } diff --git a/docs/src/__registry__/index.ts b/docs/src/__registry__/index.ts index ebe17eae..79abe7f5 100644 --- a/docs/src/__registry__/index.ts +++ b/docs/src/__registry__/index.ts @@ -1518,7 +1518,7 @@ export const Index: Record = { path: "src/registry/tailwindcss/blocks/demo-sidebar.tsx", type: "registry:block", target: "", - content: "import { For } from \"solid-js\";\r\nimport {\r\n\tSidebar,\r\n\tSidebarContent,\r\n\tSidebarGroup,\r\n\tSidebarGroupContent,\r\n\tSidebarGroupLabel,\r\n\tSidebarInset,\r\n\tSidebarMenu,\r\n\tSidebarMenuButton,\r\n\tSidebarMenuItem,\r\n\tSidebarProvider,\r\n\tSidebarTrigger,\r\n} from \"../ui/sidebar\";\r\n\r\nconst items = [\r\n\t{\r\n\t\ttitle: \"Home\",\r\n\t\turl: \"#\",\r\n\t\ticon: () => (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t),\r\n\t},\r\n\t{\r\n\t\ttitle: \"Inbox\",\r\n\t\turl: \"#\",\r\n\t\ticon: () => (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t),\r\n\t},\r\n\t{\r\n\t\ttitle: \"Calendar\",\r\n\t\turl: \"#\",\r\n\t\ticon: () => (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t),\r\n\t},\r\n\t{\r\n\t\ttitle: \"Search\",\r\n\t\turl: \"#\",\r\n\t\ticon: () => (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t),\r\n\t},\r\n\t{\r\n\t\ttitle: \"Settings\",\r\n\t\turl: \"#\",\r\n\t\ticon: () => (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t),\r\n\t},\r\n];\r\n\r\nconst AppSidebar = () => {\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tApplication\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{(item) => (\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t{item.title}\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n\r\nexport default AppSidebar;\r\n" + content: "import { For } from \"solid-js\"\n\nimport {\n Sidebar,\n SidebarContent,\n SidebarGroup,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarInset,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarProvider,\n SidebarTrigger,\n} from \"../ui/sidebar\"\n\nconst items = [\n {\n title: \"Home\",\n url: \"#\",\n icon: () => (\n \n \n \n \n \n \n ),\n },\n {\n title: \"Inbox\",\n url: \"#\",\n icon: () => (\n \n \n \n \n \n \n ),\n },\n {\n title: \"Calendar\",\n url: \"#\",\n icon: () => (\n \n \n \n \n \n \n \n ),\n },\n {\n title: \"Search\",\n url: \"#\",\n icon: () => (\n \n \n \n \n \n \n ),\n },\n {\n title: \"Settings\",\n url: \"#\",\n icon: () => (\n \n \n \n \n \n \n ),\n },\n]\n\nconst AppSidebar = () => {\n return (\n \n \n \n \n Application\n \n \n \n {(item) => (\n \n \n \n {item.title}\n \n \n )}\n \n \n \n \n \n \n \n
\n \n
\n
\n
\n )\n}\n\nexport default AppSidebar\n" }], component: clientOnly(() => import("@/registry/tailwindcss/blocks/demo-sidebar"), { lazy: true }), source: "src/__registry__/tailwindcss/blocks/demo-sidebar.tsx", @@ -1534,32 +1534,32 @@ export const Index: Record = { path: "src/registry/tailwindcss/blocks/sidebar-01/index.tsx", type: "registry:page", target: "src/routes/dashboard.tsx", - content: "import AppSidebar from \"@/components/app-sidebar\";\r\nimport { Separator } from \"@/components/ui/separator\";\r\nimport {\r\n\tSidebarInset,\r\n\tSidebarProvider,\r\n\tSidebarTrigger,\r\n} from \"@/components/ui/sidebar\";\r\n\r\nconst Page = () => {\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport default Page;\r\n" + content: "import AppSidebar from \"@/components/app-sidebar\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n SidebarInset,\n SidebarProvider,\n SidebarTrigger,\n} from \"@/components/ui/sidebar\"\n\nconst Page = () => {\n return (\n \n \n \n
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n \n )\n}\n\nexport default Page\n" },{ path: "src/registry/tailwindcss/blocks/sidebar-01/components/app-sidebar.tsx", type: "registry:component", target: "src/components/app-sidebar.tsx", - content: "import NavMain from \"@/components/nav-main\";\r\nimport NavProjects from \"@/components/nav-projects\";\r\nimport NavUser from \"@/components/nav-user\";\r\nimport TeamSwitcher from \"@/components/team-switcher\";\r\nimport {\r\n\tSidebar,\r\n\tSidebarContent,\r\n\tSidebarFooter,\r\n\tSidebarHeader,\r\n\tSidebarRail,\r\n} from \"@/components/ui/sidebar\";\r\nimport type { ComponentProps } from \"solid-js\";\r\n\r\n// This is sample data.\r\nconst data = {\r\n\tuser: {\r\n\t\tname: \"shadcn\",\r\n\t\temail: \"m@example.com\",\r\n\t\tavatar: \"/avatars/shadcn.jpg\",\r\n\t},\r\n\tteams: [\r\n\t\t{\r\n\t\t\tname: \"Acme Inc\",\r\n\t\t\tlogo: () => (\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t),\r\n\t\t\tplan: \"Enterprise\",\r\n\t\t},\r\n\t\t{\r\n\t\t\tname: \"Acme Corp.\",\r\n\t\t\tlogo: () => (\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t),\r\n\t\t\tplan: \"Startup\",\r\n\t\t},\r\n\t\t{\r\n\t\t\tname: \"Evil Corp.\",\r\n\t\t\tlogo: () => (\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t),\r\n\t\t\tplan: \"Free\",\r\n\t\t},\r\n\t],\r\n\tnavMain: [\r\n\t\t{\r\n\t\t\ttitle: \"Playground\",\r\n\t\t\turl: \"#\",\r\n\t\t\ticon: () => (\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t),\r\n\t\t\tisActive: true,\r\n\t\t\titems: [\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"History\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Starred\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Settings\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t},\r\n\t\t{\r\n\t\t\ttitle: \"Models\",\r\n\t\t\turl: \"#\",\r\n\t\t\ticon: () => (\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t),\r\n\t\t\titems: [\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Genesis\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Explorer\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Quantum\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t},\r\n\t\t{\r\n\t\t\ttitle: \"Documentation\",\r\n\t\t\turl: \"#\",\r\n\t\t\ticon: () => (\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t),\r\n\t\t\titems: [\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Introduction\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Get Started\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Tutorials\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Changelog\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t},\r\n\t\t{\r\n\t\t\ttitle: \"Settings\",\r\n\t\t\turl: \"#\",\r\n\t\t\ticon: () => (\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t),\r\n\t\t\titems: [\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"General\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Team\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Billing\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Limits\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t},\r\n\t],\r\n\tprojects: [\r\n\t\t{\r\n\t\t\tname: \"Design Engineering\",\r\n\t\t\turl: \"#\",\r\n\t\t\ticon: () => (\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t),\r\n\t\t},\r\n\t\t{\r\n\t\t\tname: \"Sales & Marketing\",\r\n\t\t\turl: \"#\",\r\n\t\t\ticon: () => (\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t),\r\n\t\t},\r\n\t\t{\r\n\t\t\tname: \"Travel\",\r\n\t\t\turl: \"#\",\r\n\t\t\ticon: () => (\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t),\r\n\t\t},\r\n\t],\r\n};\r\n\r\nconst AppSidebar = (props: ComponentProps) => {\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport default AppSidebar;\r\n" + content: "import type { ComponentProps } from \"solid-js\"\n\nimport NavMain from \"@/components/nav-main\"\nimport NavProjects from \"@/components/nav-projects\"\nimport NavUser from \"@/components/nav-user\"\nimport TeamSwitcher from \"@/components/team-switcher\"\nimport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarHeader,\n SidebarRail,\n} from \"@/components/ui/sidebar\"\n\n// This is sample data.\nconst data = {\n user: {\n name: \"shadcn\",\n email: \"m@example.com\",\n avatar: \"/avatars/shadcn.jpg\",\n },\n teams: [\n {\n name: \"Acme Inc\",\n logo: () => (\n \n \n \n \n \n \n ),\n plan: \"Enterprise\",\n },\n {\n name: \"Acme Corp.\",\n logo: () => (\n \n \n \n ),\n plan: \"Startup\",\n },\n {\n name: \"Evil Corp.\",\n logo: () => (\n \n \n \n ),\n plan: \"Free\",\n },\n ],\n navMain: [\n {\n title: \"Playground\",\n url: \"#\",\n icon: () => (\n \n \n \n \n \n \n ),\n isActive: true,\n items: [\n {\n title: \"History\",\n url: \"#\",\n },\n {\n title: \"Starred\",\n url: \"#\",\n },\n {\n title: \"Settings\",\n url: \"#\",\n },\n ],\n },\n {\n title: \"Models\",\n url: \"#\",\n icon: () => (\n \n \n \n \n \n \n \n ),\n items: [\n {\n title: \"Genesis\",\n url: \"#\",\n },\n {\n title: \"Explorer\",\n url: \"#\",\n },\n {\n title: \"Quantum\",\n url: \"#\",\n },\n ],\n },\n {\n title: \"Documentation\",\n url: \"#\",\n icon: () => (\n \n \n \n ),\n items: [\n {\n title: \"Introduction\",\n url: \"#\",\n },\n {\n title: \"Get Started\",\n url: \"#\",\n },\n {\n title: \"Tutorials\",\n url: \"#\",\n },\n {\n title: \"Changelog\",\n url: \"#\",\n },\n ],\n },\n {\n title: \"Settings\",\n url: \"#\",\n icon: () => (\n \n \n \n \n \n \n \n ),\n items: [\n {\n title: \"General\",\n url: \"#\",\n },\n {\n title: \"Team\",\n url: \"#\",\n },\n {\n title: \"Billing\",\n url: \"#\",\n },\n {\n title: \"Limits\",\n url: \"#\",\n },\n ],\n },\n ],\n projects: [\n {\n name: \"Design Engineering\",\n url: \"#\",\n icon: () => (\n \n \n \n ),\n },\n {\n name: \"Sales & Marketing\",\n url: \"#\",\n icon: () => (\n \n \n \n \n \n \n ),\n },\n {\n name: \"Travel\",\n url: \"#\",\n icon: () => (\n \n \n \n ),\n },\n ],\n}\n\nconst AppSidebar = (props: ComponentProps) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nexport default AppSidebar\n" },{ path: "src/registry/tailwindcss/blocks/sidebar-01/components/nav-main.tsx", type: "registry:component", target: "src/components/nav-main.tsx", - content: "import {\r\n\tCollapsible,\r\n\tCollapsibleContent,\r\n\tCollapsibleTrigger,\r\n} from \"@/components/ui/collapsible\";\r\nimport {\r\n\tSidebarGroup,\r\n\tSidebarGroupLabel,\r\n\tSidebarMenu,\r\n\tSidebarMenuButton,\r\n\tSidebarMenuItem,\r\n\tSidebarMenuSub,\r\n\tSidebarMenuSubButton,\r\n\tSidebarMenuSubItem,\r\n} from \"@/components/ui/sidebar\";\r\nimport type {\r\n\tCollapsibleRootProps,\r\n\tCollapsibleTriggerProps,\r\n} from \"@kobalte/core/collapsible\";\r\nimport { type Accessor, For, type JSX, Show } from \"solid-js\";\r\n\r\nconst NavMain = (props: {\r\n\titems: {\r\n\t\ttitle: string;\r\n\t\turl: string;\r\n\t\ticon?: Accessor;\r\n\t\tisActive?: boolean;\r\n\t\titems?: {\r\n\t\t\ttitle: string;\r\n\t\t\turl: string;\r\n\t\t}[];\r\n\t}[];\r\n}) => {\r\n\treturn (\r\n\t\t\r\n\t\t\tPlatform\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{(item) => (\r\n\t\t\t\t\t\t (\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t (\r\n\t\t\t\t\t\t\t\t\t\t\t// @ts-expect-error\r\n\t\t\t\t\t\t\t\t\t\t\tsvg:last-of-type]:data-[expanded]:rotate-90\"\r\n\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\t\t{item.icon!()}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{item.title}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t{(subItem) => (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{subItem.title}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t)}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport default NavMain;\r\n" + content: "import { For, Show, type Accessor, type JSX } from \"solid-js\"\nimport type {\n CollapsibleRootProps,\n CollapsibleTriggerProps,\n} from \"@kobalte/core/collapsible\"\n\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"@/components/ui/collapsible\"\nimport {\n SidebarGroup,\n SidebarGroupLabel,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n} from \"@/components/ui/sidebar\"\n\nconst NavMain = (props: {\n items: {\n title: string\n url: string\n icon?: Accessor\n isActive?: boolean\n items?: {\n title: string\n url: string\n }[]\n }[]\n}) => {\n return (\n \n Platform\n \n \n {(item) => (\n (\n \n (\n // @ts-expect-error\n svg:last-of-type]:data-[expanded]:rotate-90\"\n >\n {item.icon!()}\n {item.title}\n \n \n \n \n )}\n />\n \n \n \n {(subItem) => (\n \n \n {subItem.title}\n \n \n )}\n \n \n \n \n )}\n />\n )}\n \n \n \n )\n}\n\nexport default NavMain\n" },{ path: "src/registry/tailwindcss/blocks/sidebar-01/components/nav-projects.tsx", type: "registry:component", target: "src/components/nav-projects.tsx", - content: "import {\r\n\tDropdownMenu,\r\n\tDropdownMenuContent,\r\n\tDropdownMenuItem,\r\n\tDropdownMenuSeparator,\r\n\tDropdownMenuTrigger,\r\n} from \"@/components/ui/dropdown-menu\";\r\nimport {\r\n\tSidebarGroup,\r\n\tSidebarGroupLabel,\r\n\tSidebarMenu,\r\n\tSidebarMenuAction,\r\n\tSidebarMenuButton,\r\n\tSidebarMenuItem,\r\n\tuseSideBar,\r\n} from \"@/components/ui/sidebar\";\r\nimport type { DropdownMenuTriggerProps } from \"@kobalte/core/dropdown-menu\";\r\nimport { type Accessor, For, type JSX } from \"solid-js\";\r\n\r\nconst NavProjects = (props: {\r\n\tprojects: {\r\n\t\tname: string;\r\n\t\turl: string;\r\n\t\ticon: Accessor;\r\n\t}[];\r\n}) => {\r\n\tconst { isMobile } = useSideBar();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\tProjects\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{(item) => (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{item.name}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t (\r\n\t\t\t\t\t\t\t\t\t\t// @ts-expect-error\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tMore\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tView Project\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tShare Project\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tDelete Project\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t)}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tMore\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport default NavProjects;\r\n" + content: "import { For, type Accessor, type JSX } from \"solid-js\"\nimport type { DropdownMenuTriggerProps } from \"@kobalte/core/dropdown-menu\"\n\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\"\nimport {\n SidebarGroup,\n SidebarGroupLabel,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuButton,\n SidebarMenuItem,\n useSideBar,\n} from \"@/components/ui/sidebar\"\n\nconst NavProjects = (props: {\n projects: {\n name: string\n url: string\n icon: Accessor\n }[]\n}) => {\n const { isMobile } = useSideBar()\n\n return (\n \n Projects\n \n \n {(item) => (\n \n \n \n {item.name}\n \n \n (\n // @ts-expect-error\n \n \n \n \n \n \n \n \n More\n \n )}\n />\n \n \n \n \n \n View Project\n \n \n \n \n \n \n \n \n Share Project\n \n \n \n \n \n \n Delete Project\n \n \n \n \n )}\n \n \n \n \n \n \n \n \n \n \n More\n \n \n \n \n )\n}\n\nexport default NavProjects\n" },{ path: "src/registry/tailwindcss/blocks/sidebar-01/components/nav-user.tsx", type: "registry:component", target: "src/components/nav-user.tsx", - content: "import {\r\n\tDropdownMenu,\r\n\tDropdownMenuContent,\r\n\tDropdownMenuGroup,\r\n\tDropdownMenuGroupLabel,\r\n\tDropdownMenuItem,\r\n\tDropdownMenuSeparator,\r\n\tDropdownMenuTrigger,\r\n} from \"@/components/ui/dropdown-menu\";\r\nimport {\r\n\tSidebarMenu,\r\n\tSidebarMenuButton,\r\n\tSidebarMenuItem,\r\n\tuseSideBar,\r\n} from \"@/components/ui/sidebar\";\r\nimport type { DropdownMenuTriggerProps } from \"@kobalte/core/dropdown-menu\";\r\nimport { Image } from \"@kobalte/core/image\";\r\n\r\nconst NavUser = (props: {\r\n\tuser: {\r\n\t\tname: string;\r\n\t\temail: string;\r\n\t\tavatar: string;\r\n\t};\r\n}) => {\r\n\tconst { isMobile } = useSideBar();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t (\r\n\t\t\t\t\t\t\t// @ts-expect-error\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tCN\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t{props.user.name}\r\n\t\t\t\t\t\t\t\t\t{props.user.email}\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tCN\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t{props.user.name}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t{props.user.email}\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tUpgrade to Pro\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tAccount\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tBilling\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tNotifications\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tLog out\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n\r\nexport default NavUser;\r\n" + content: "import type { DropdownMenuTriggerProps } from \"@kobalte/core/dropdown-menu\"\nimport { Image } from \"@kobalte/core/image\"\n\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuGroupLabel,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\"\nimport {\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n useSideBar,\n} from \"@/components/ui/sidebar\"\n\nconst NavUser = (props: {\n user: {\n name: string\n email: string\n avatar: string\n }\n}) => {\n const { isMobile } = useSideBar()\n\n return (\n \n \n \n (\n // @ts-expect-error\n \n \n \n \n CN\n \n \n
\n {props.user.name}\n {props.user.email}\n
\n \n \n \n \n )}\n />\n \n \n \n
\n \n \n \n CN\n \n \n
\n \n {props.user.name}\n \n {props.user.email}\n
\n
\n
\n
\n \n \n \n \n \n \n Upgrade to Pro\n \n \n \n \n \n \n \n \n \n \n \n Account\n \n \n \n \n \n \n \n \n Billing\n \n \n \n \n \n Notifications\n \n \n \n \n \n \n \n Log out\n \n
\n
\n
\n
\n )\n}\n\nexport default NavUser\n" },{ path: "src/registry/tailwindcss/blocks/sidebar-01/components/team-switcher.tsx", type: "registry:component", target: "src/components/team-switcher.tsx", - content: "import {\r\n\tDropdownMenu,\r\n\tDropdownMenuContent,\r\n\tDropdownMenuGroup,\r\n\tDropdownMenuGroupLabel,\r\n\tDropdownMenuItem,\r\n\tDropdownMenuSeparator,\r\n\tDropdownMenuShortcut,\r\n\tDropdownMenuTrigger,\r\n} from \"@/components/ui/dropdown-menu\";\r\nimport {\r\n\tSidebarMenu,\r\n\tSidebarMenuButton,\r\n\tSidebarMenuItem,\r\n\tuseSideBar,\r\n} from \"@/components/ui/sidebar\";\r\nimport type { DropdownMenuTriggerProps } from \"@kobalte/core/dropdown-menu\";\r\nimport { type Accessor, For, type JSX, createSignal } from \"solid-js\";\r\n\r\nconst TeamSwitcher = (props: {\r\n\tteams: {\r\n\t\tname: string;\r\n\t\tlogo: Accessor;\r\n\t\tplan: string;\r\n\t}[];\r\n}) => {\r\n\tconst [activeTeam, setActiveTeam] = createSignal(props.teams[0]);\r\n\tconst { isMobile } = useSideBar();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t (\r\n\t\t\t\t\t\t\t// @ts-expect-error\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t{activeTeam().logo()}\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t{activeTeam().name}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{activeTeam().plan}\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tTeams\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{(team, index) => (\r\n\t\t\t\t\t\t\t\t\t setActiveTeam(team)}\r\n\t\t\t\t\t\t\t\t\t\tclass=\"gap-2 p-2\"\r\n\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t{team.logo()}\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t{team.name}\r\n\t\t\t\t\t\t\t\t\t\t⌘{index() + 1}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
Add team
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n\r\nexport default TeamSwitcher;\r\n" + content: "import { For, createSignal, type Accessor, type JSX } from \"solid-js\"\nimport type { DropdownMenuTriggerProps } from \"@kobalte/core/dropdown-menu\"\n\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuGroupLabel,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\"\nimport {\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n useSideBar,\n} from \"@/components/ui/sidebar\"\n\nconst TeamSwitcher = (props: {\n teams: {\n name: string\n logo: Accessor\n plan: string\n }[]\n}) => {\n // eslint-disable-next-line solid/reactivity\n const [activeTeam, setActiveTeam] = createSignal(props.teams[0])\n const { isMobile } = useSideBar()\n\n return (\n \n \n \n (\n // @ts-expect-error\n \n
\n {activeTeam().logo()}\n
\n
\n \n {activeTeam().name}\n \n {activeTeam().plan}\n
\n \n \n \n \n )}\n />\n \n \n \n Teams\n \n \n {(team, index) => (\n setActiveTeam(team)}\n class=\"gap-2 p-2\"\n >\n
\n {team.logo()}\n
\n {team.name}\n ⌘{index() + 1}\n \n )}\n
\n
\n \n \n
\n \n \n \n
\n
Add team
\n
\n
\n \n
\n
\n )\n}\n\nexport default TeamSwitcher\n" }], component: clientOnly(() => import("@/registry/tailwindcss/blocks/sidebar-01/index"), { lazy: true }), source: "src/__registry__/tailwindcss/blocks/sidebar-01/index.tsx", @@ -1575,12 +1575,12 @@ export const Index: Record = { path: "src/registry/tailwindcss/blocks/sidebar-02/index.tsx", type: "registry:page", target: "src/routes/dashboard.tsx", - content: "import AppSidebar from \"@/components/app-sidebar\";\r\nimport {\r\n\tSidebarInset,\r\n\tSidebarProvider,\r\n\tSidebarTrigger,\r\n} from \"@/components/ui/sidebar\";\r\n\r\nconst Page = () => {\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport default Page;\r\n" + content: "import AppSidebar from \"@/components/app-sidebar\"\nimport {\n SidebarInset,\n SidebarProvider,\n SidebarTrigger,\n} from \"@/components/ui/sidebar\"\n\nconst Page = () => {\n return (\n \n \n \n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n \n )\n}\n\nexport default Page\n" },{ path: "src/registry/tailwindcss/blocks/sidebar-02/components/app-sidebar.tsx", type: "registry:component", target: "src/components/app-sidebar.tsx", - content: "import {\r\n\tSidebar,\r\n\tSidebarContent,\r\n\tSidebarGroup,\r\n\tSidebarHeader,\r\n\tSidebarMenu,\r\n\tSidebarMenuButton,\r\n\tSidebarMenuItem,\r\n\tSidebarMenuSub,\r\n\tSidebarMenuSubButton,\r\n\tSidebarMenuSubItem,\r\n} from \"@/components/ui/sidebar\";\r\nimport { type ComponentProps, For, Show } from \"solid-js\";\r\n\r\n// This is sample data.\r\nconst data = {\r\n\tnavMain: [\r\n\t\t{\r\n\t\t\ttitle: \"Getting Started\",\r\n\t\t\turl: \"#\",\r\n\t\t\titems: [\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Installation\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Project Structure\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t},\r\n\t\t{\r\n\t\t\ttitle: \"Building Your Application\",\r\n\t\t\turl: \"#\",\r\n\t\t\titems: [\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Routing\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Data Fetching\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t\tisActive: true,\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Rendering\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Caching\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Styling\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Optimizing\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Configuring\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Testing\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Authentication\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Deploying\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Upgrading\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Examples\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t},\r\n\t\t{\r\n\t\t\ttitle: \"API Reference\",\r\n\t\t\turl: \"#\",\r\n\t\t\titems: [\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Components\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"File Conventions\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Functions\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"next.config.js Options\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"CLI\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Edge Runtime\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t},\r\n\t\t{\r\n\t\t\ttitle: \"Architecture\",\r\n\t\t\turl: \"#\",\r\n\t\t\titems: [\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Accessibility\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Fast Refresh\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Next.js Compiler\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Supported Browsers\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Turbopack\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t},\r\n\t\t{\r\n\t\t\ttitle: \"Community\",\r\n\t\t\turl: \"#\",\r\n\t\t\titems: [\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Contribution Guide\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t},\r\n\t],\r\n};\r\n\r\nconst AppSidebar = (props: ComponentProps) => {\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\tDocumentation\r\n\t\t\t\t\t\t\t\tv1.0.0\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{(item) => (\r\n\t\t\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t{item.title}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t{(item) => (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{item.title}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t
\r\n\t);\r\n};\r\n\r\nexport default AppSidebar;\r\n" + content: "import { For, Show, type ComponentProps } from \"solid-js\"\n\nimport {\n Sidebar,\n SidebarContent,\n SidebarGroup,\n SidebarHeader,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n} from \"@/components/ui/sidebar\"\n\n// This is sample data.\nconst data = {\n navMain: [\n {\n title: \"Getting Started\",\n url: \"#\",\n items: [\n {\n title: \"Installation\",\n url: \"#\",\n },\n {\n title: \"Project Structure\",\n url: \"#\",\n },\n ],\n },\n {\n title: \"Building Your Application\",\n url: \"#\",\n items: [\n {\n title: \"Routing\",\n url: \"#\",\n },\n {\n title: \"Data Fetching\",\n url: \"#\",\n isActive: true,\n },\n {\n title: \"Rendering\",\n url: \"#\",\n },\n {\n title: \"Caching\",\n url: \"#\",\n },\n {\n title: \"Styling\",\n url: \"#\",\n },\n {\n title: \"Optimizing\",\n url: \"#\",\n },\n {\n title: \"Configuring\",\n url: \"#\",\n },\n {\n title: \"Testing\",\n url: \"#\",\n },\n {\n title: \"Authentication\",\n url: \"#\",\n },\n {\n title: \"Deploying\",\n url: \"#\",\n },\n {\n title: \"Upgrading\",\n url: \"#\",\n },\n {\n title: \"Examples\",\n url: \"#\",\n },\n ],\n },\n {\n title: \"API Reference\",\n url: \"#\",\n items: [\n {\n title: \"Components\",\n url: \"#\",\n },\n {\n title: \"File Conventions\",\n url: \"#\",\n },\n {\n title: \"Functions\",\n url: \"#\",\n },\n {\n title: \"next.config.js Options\",\n url: \"#\",\n },\n {\n title: \"CLI\",\n url: \"#\",\n },\n {\n title: \"Edge Runtime\",\n url: \"#\",\n },\n ],\n },\n {\n title: \"Architecture\",\n url: \"#\",\n items: [\n {\n title: \"Accessibility\",\n url: \"#\",\n },\n {\n title: \"Fast Refresh\",\n url: \"#\",\n },\n {\n title: \"Next.js Compiler\",\n url: \"#\",\n },\n {\n title: \"Supported Browsers\",\n url: \"#\",\n },\n {\n title: \"Turbopack\",\n url: \"#\",\n },\n ],\n },\n {\n title: \"Community\",\n url: \"#\",\n items: [\n {\n title: \"Contribution Guide\",\n url: \"#\",\n },\n ],\n },\n ],\n}\n\nconst AppSidebar = (props: ComponentProps) => {\n return (\n \n \n \n \n \n
\n \n \n \n \n \n \n
\n
\n Documentation\n v1.0.0\n
\n
\n
\n
\n
\n \n \n \n \n {(item) => (\n <>\n \n {item.title}\n \n \n \n \n {(item) => (\n \n \n {item.title}\n \n \n )}\n \n \n \n \n )}\n \n \n \n \n
\n )\n}\n\nexport default AppSidebar\n" }], component: clientOnly(() => import("@/registry/tailwindcss/blocks/sidebar-02/index"), { lazy: true }), source: "src/__registry__/tailwindcss/blocks/sidebar-02/index.tsx", @@ -1596,32 +1596,32 @@ export const Index: Record = { path: "src/registry/tailwindcss/blocks/sidebar-03/index.tsx", type: "registry:page", target: "src/routes/dashboard.tsx", - content: "import AppSidebar from \"@/components/app-sidebar\";\r\nimport {\r\n\tSidebarInset,\r\n\tSidebarProvider,\r\n\tSidebarSeparator,\r\n\tSidebarTrigger,\r\n} from \"@/components/ui/sidebar\";\r\n\r\nconst Page = () => {\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport default Page;\r\n" + content: "import AppSidebar from \"@/components/app-sidebar\"\nimport {\n SidebarInset,\n SidebarProvider,\n SidebarSeparator,\n SidebarTrigger,\n} from \"@/components/ui/sidebar\"\n\nconst Page = () => {\n return (\n \n \n \n
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n \n )\n}\n\nexport default Page\n" },{ path: "src/registry/tailwindcss/blocks/sidebar-03/components/app-sidebar.tsx", type: "registry:component", target: "src/components/app-sidebar.tsx", - content: "import NavMain from \"@/components/nav-main\";\r\nimport NavProjects from \"@/components/nav-projects\";\r\nimport NavSecondary from \"@/components/nav-secondary\";\r\nimport NavUser from \"@/components/nav-user\";\r\nimport {\r\n\tSidebar,\r\n\tSidebarContent,\r\n\tSidebarFooter,\r\n\tSidebarHeader,\r\n\tSidebarMenu,\r\n\tSidebarMenuButton,\r\n\tSidebarMenuItem,\r\n} from \"@/components/ui/sidebar\";\r\nimport type { ComponentProps } from \"solid-js\";\r\n\r\n// This is sample data.\r\nconst data = {\r\n\tuser: {\r\n\t\tname: \"shadcn\",\r\n\t\temail: \"m@example.com\",\r\n\t\tavatar: \"https://ui.shadcn.com/avatars/shadcn.jpg\",\r\n\t},\r\n\tnavMain: [\r\n\t\t{\r\n\t\t\ttitle: \"Playground\",\r\n\t\t\turl: \"#\",\r\n\t\t\ticon: () => (\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t),\r\n\t\t\tisActive: true,\r\n\t\t\titems: [\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"History\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Starred\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Settings\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t},\r\n\t\t{\r\n\t\t\ttitle: \"Models\",\r\n\t\t\turl: \"#\",\r\n\t\t\ticon: () => (\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t),\r\n\t\t\titems: [\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Genesis\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Explorer\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Quantum\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t},\r\n\t\t{\r\n\t\t\ttitle: \"Documentation\",\r\n\t\t\turl: \"#\",\r\n\t\t\ticon: () => (\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t),\r\n\t\t\titems: [\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Introduction\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Get Started\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Tutorials\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Changelog\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t},\r\n\t\t{\r\n\t\t\ttitle: \"Settings\",\r\n\t\t\turl: \"#\",\r\n\t\t\ticon: () => (\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t),\r\n\t\t\titems: [\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"General\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Team\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Billing\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\ttitle: \"Limits\",\r\n\t\t\t\t\turl: \"#\",\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t},\r\n\t],\r\n\tnavSecondary: [\r\n\t\t{\r\n\t\t\ttitle: \"Support\",\r\n\t\t\turl: \"#\",\r\n\t\t\ticon: () => (\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t),\r\n\t\t},\r\n\t\t{\r\n\t\t\ttitle: \"Feedback\",\r\n\t\t\turl: \"#\",\r\n\t\t\ticon: () => (\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t),\r\n\t\t},\r\n\t],\r\n\tprojects: [\r\n\t\t{\r\n\t\t\tname: \"Design Engineering\",\r\n\t\t\turl: \"#\",\r\n\t\t\ticon: () => (\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t),\r\n\t\t},\r\n\t\t{\r\n\t\t\tname: \"Sales & Marketing\",\r\n\t\t\turl: \"#\",\r\n\t\t\ticon: () => (\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t),\r\n\t\t},\r\n\t\t{\r\n\t\t\tname: \"Travel\",\r\n\t\t\turl: \"#\",\r\n\t\t\ticon: () => (\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t),\r\n\t\t},\r\n\t],\r\n};\r\n\r\nconst AppSidebar = (props: ComponentProps) => {\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\tAcme Inc\r\n\t\t\t\t\t\t\t\tEnterprise\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t
\r\n\t);\r\n};\r\n\r\nexport default AppSidebar;\r\n" + content: "import type { ComponentProps } from \"solid-js\"\n\nimport NavMain from \"@/components/nav-main\"\nimport NavProjects from \"@/components/nav-projects\"\nimport NavSecondary from \"@/components/nav-secondary\"\nimport NavUser from \"@/components/nav-user\"\nimport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarHeader,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n} from \"@/components/ui/sidebar\"\n\n// This is sample data.\nconst data = {\n user: {\n name: \"shadcn\",\n email: \"m@example.com\",\n avatar: \"https://ui.shadcn.com/avatars/shadcn.jpg\",\n },\n navMain: [\n {\n title: \"Playground\",\n url: \"#\",\n icon: () => (\n \n \n \n \n \n \n ),\n isActive: true,\n items: [\n {\n title: \"History\",\n url: \"#\",\n },\n {\n title: \"Starred\",\n url: \"#\",\n },\n {\n title: \"Settings\",\n url: \"#\",\n },\n ],\n },\n {\n title: \"Models\",\n url: \"#\",\n icon: () => (\n \n \n \n \n \n \n \n ),\n items: [\n {\n title: \"Genesis\",\n url: \"#\",\n },\n {\n title: \"Explorer\",\n url: \"#\",\n },\n {\n title: \"Quantum\",\n url: \"#\",\n },\n ],\n },\n {\n title: \"Documentation\",\n url: \"#\",\n icon: () => (\n \n \n \n ),\n items: [\n {\n title: \"Introduction\",\n url: \"#\",\n },\n {\n title: \"Get Started\",\n url: \"#\",\n },\n {\n title: \"Tutorials\",\n url: \"#\",\n },\n {\n title: \"Changelog\",\n url: \"#\",\n },\n ],\n },\n {\n title: \"Settings\",\n url: \"#\",\n icon: () => (\n \n \n \n \n \n \n \n ),\n items: [\n {\n title: \"General\",\n url: \"#\",\n },\n {\n title: \"Team\",\n url: \"#\",\n },\n {\n title: \"Billing\",\n url: \"#\",\n },\n {\n title: \"Limits\",\n url: \"#\",\n },\n ],\n },\n ],\n navSecondary: [\n {\n title: \"Support\",\n url: \"#\",\n icon: () => (\n \n \n \n \n \n \n \n ),\n },\n {\n title: \"Feedback\",\n url: \"#\",\n icon: () => (\n \n \n \n ),\n },\n ],\n projects: [\n {\n name: \"Design Engineering\",\n url: \"#\",\n icon: () => (\n \n \n \n ),\n },\n {\n name: \"Sales & Marketing\",\n url: \"#\",\n icon: () => (\n \n \n \n \n \n \n ),\n },\n {\n name: \"Travel\",\n url: \"#\",\n icon: () => (\n \n \n \n ),\n },\n ],\n}\n\nconst AppSidebar = (props: ComponentProps) => {\n return (\n \n \n \n \n \n
\n \n \n \n
\n
\n Acme Inc\n Enterprise\n
\n
\n
\n
\n
\n \n \n \n \n \n \n \n \n
\n )\n}\n\nexport default AppSidebar\n" },{ path: "src/registry/tailwindcss/blocks/sidebar-03/components/nav-main.tsx", type: "registry:component", target: "src/components/nav-main.tsx", - content: "import {\r\n\tCollapsible,\r\n\tCollapsibleContent,\r\n\tCollapsibleTrigger,\r\n} from \"@/components/ui/collapsible\";\r\nimport {\r\n\tSidebarGroup,\r\n\tSidebarGroupLabel,\r\n\tSidebarMenu,\r\n\tSidebarMenuAction,\r\n\tSidebarMenuButton,\r\n\tSidebarMenuItem,\r\n\tSidebarMenuSub,\r\n\tSidebarMenuSubButton,\r\n\tSidebarMenuSubItem,\r\n} from \"@/components/ui/sidebar\";\r\nimport type {\r\n\tCollapsibleRootProps,\r\n\tCollapsibleTriggerProps,\r\n} from \"@kobalte/core/collapsible\";\r\nimport { type Accessor, For, type JSX, Show } from \"solid-js\";\r\n\r\nconst NavMain = (props: {\r\n\titems: {\r\n\t\ttitle: string;\r\n\t\turl: string;\r\n\t\ticon: Accessor;\r\n\t\tisActive?: boolean;\r\n\t\titems?: {\r\n\t\t\ttitle: string;\r\n\t\t\turl: string;\r\n\t\t}[];\r\n\t}[];\r\n}) => {\r\n\treturn (\r\n\t\t\r\n\t\t\tPlatform\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{(item) => (\r\n\t\t\t\t\t\t (\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t{item.title}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t (\r\n\t\t\t\t\t\t\t\t\t\t\t\t// @ts-expect-error\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tToggle\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{(subItem) => (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{subItem.title}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t)}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport default NavMain;\r\n" + content: "import { For, Show, type Accessor, type JSX } from \"solid-js\"\nimport type {\n CollapsibleRootProps,\n CollapsibleTriggerProps,\n} from \"@kobalte/core/collapsible\"\n\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"@/components/ui/collapsible\"\nimport {\n SidebarGroup,\n SidebarGroupLabel,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n} from \"@/components/ui/sidebar\"\n\nconst NavMain = (props: {\n items: {\n title: string\n url: string\n icon: Accessor\n isActive?: boolean\n items?: {\n title: string\n url: string\n }[]\n }[]\n}) => {\n return (\n \n Platform\n \n \n {(item) => (\n (\n \n \n \n {item.title}\n \n \n (\n // @ts-expect-error\n \n \n \n \n Toggle\n \n )}\n />\n \n \n {\n \n {(subItem) => (\n \n \n {subItem.title}\n \n \n )}\n \n }\n \n \n \n \n )}\n />\n )}\n \n \n \n )\n}\n\nexport default NavMain\n" },{ path: "src/registry/tailwindcss/blocks/sidebar-03/components/nav-projects.tsx", type: "registry:component", target: "src/components/nav-projects.tsx", - content: "import {\r\n\tDropdownMenu,\r\n\tDropdownMenuContent,\r\n\tDropdownMenuItem,\r\n\tDropdownMenuSeparator,\r\n\tDropdownMenuTrigger,\r\n} from \"@/components/ui/dropdown-menu\";\r\nimport {\r\n\tSidebarGroup,\r\n\tSidebarGroupLabel,\r\n\tSidebarMenu,\r\n\tSidebarMenuAction,\r\n\tSidebarMenuButton,\r\n\tSidebarMenuItem,\r\n\tuseSideBar,\r\n} from \"@/components/ui/sidebar\";\r\nimport type { DropdownMenuTriggerProps } from \"@kobalte/core/dropdown-menu\";\r\nimport { type Accessor, For, type JSX } from \"solid-js\";\r\n\r\nconst NavProjects = (props: {\r\n\tprojects: {\r\n\t\tname: string;\r\n\t\turl: string;\r\n\t\ticon: Accessor;\r\n\t}[];\r\n}) => {\r\n\tconst { isMobile } = useSideBar();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\tProjects\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{(item) => (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{item.name}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t (\r\n\t\t\t\t\t\t\t\t\t\t// @ts-expect-error\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tMore\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tView Project\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tShare Project\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tDelete Project\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t)}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tMore\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport default NavProjects;\r\n" + content: "import { For, type Accessor, type JSX } from \"solid-js\"\nimport type { DropdownMenuTriggerProps } from \"@kobalte/core/dropdown-menu\"\n\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\"\nimport {\n SidebarGroup,\n SidebarGroupLabel,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuButton,\n SidebarMenuItem,\n useSideBar,\n} from \"@/components/ui/sidebar\"\n\nconst NavProjects = (props: {\n projects: {\n name: string\n url: string\n icon: Accessor\n }[]\n}) => {\n const { isMobile } = useSideBar()\n\n return (\n \n Projects\n \n \n {(item) => (\n \n \n \n {item.name}\n \n \n (\n // @ts-expect-error\n \n \n \n \n \n \n \n \n More\n \n )}\n />\n \n \n \n \n \n View Project\n \n \n \n \n \n \n \n \n Share Project\n \n \n \n \n \n \n Delete Project\n \n \n \n \n )}\n \n \n \n \n \n \n \n \n \n \n More\n \n \n \n \n )\n}\n\nexport default NavProjects\n" },{ path: "src/registry/tailwindcss/blocks/sidebar-03/components/nav-user.tsx", type: "registry:component", target: "src/components/nav-user.tsx", - content: "import {\r\n\tDropdownMenu,\r\n\tDropdownMenuContent,\r\n\tDropdownMenuGroup,\r\n\tDropdownMenuGroupLabel,\r\n\tDropdownMenuItem,\r\n\tDropdownMenuSeparator,\r\n\tDropdownMenuTrigger,\r\n} from \"@/components/ui/dropdown-menu\";\r\nimport {\r\n\tSidebarMenu,\r\n\tSidebarMenuButton,\r\n\tSidebarMenuItem,\r\n\tuseSideBar,\r\n} from \"@/components/ui/sidebar\";\r\nimport type { DropdownMenuTriggerProps } from \"@kobalte/core/dropdown-menu\";\r\nimport { Image } from \"@kobalte/core/image\";\r\n\r\nconst NavUser = (props: {\r\n\tuser: {\r\n\t\tname: string;\r\n\t\temail: string;\r\n\t\tavatar: string;\r\n\t};\r\n}) => {\r\n\tconst { isMobile } = useSideBar();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t (\r\n\t\t\t\t\t\t\t// @ts-expect-error\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tCN\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t{props.user.name}\r\n\t\t\t\t\t\t\t\t\t{props.user.email}\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tCN\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t{props.user.name}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t{props.user.email}\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tUpgrade to Pro\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tAccount\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tBilling\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tNotifications\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tLog out\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n\r\nexport default NavUser;\r\n" + content: "import type { DropdownMenuTriggerProps } from \"@kobalte/core/dropdown-menu\"\nimport { Image } from \"@kobalte/core/image\"\n\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuGroupLabel,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\"\nimport {\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n useSideBar,\n} from \"@/components/ui/sidebar\"\n\nconst NavUser = (props: {\n user: {\n name: string\n email: string\n avatar: string\n }\n}) => {\n const { isMobile } = useSideBar()\n\n return (\n \n \n \n (\n // @ts-expect-error\n \n \n \n \n CN\n \n \n
\n {props.user.name}\n {props.user.email}\n
\n \n \n \n \n )}\n />\n \n \n \n
\n \n \n \n CN\n \n \n
\n \n {props.user.name}\n \n {props.user.email}\n
\n
\n
\n
\n \n \n \n \n \n \n Upgrade to Pro\n \n \n \n \n \n \n \n \n \n \n \n Account\n \n \n \n \n \n \n \n \n Billing\n \n \n \n \n \n Notifications\n \n \n \n \n \n \n \n Log out\n \n
\n
\n
\n
\n )\n}\n\nexport default NavUser\n" },{ path: "src/registry/tailwindcss/blocks/sidebar-03/components/nav-secondary.tsx", type: "registry:component", target: "src/components/nav-secondary.tsx", - content: "import {\r\n\tSidebarGroup,\r\n\tSidebarGroupContent,\r\n\tSidebarMenu,\r\n\tSidebarMenuButton,\r\n\tSidebarMenuItem,\r\n} from \"@/components/ui/sidebar\";\r\nimport {\r\n\ttype Accessor,\r\n\ttype ComponentProps,\r\n\tFor,\r\n\ttype JSXElement,\r\n\tsplitProps,\r\n} from \"solid-js\";\r\n\r\nconst NavSecondary = (\r\n\tprops: ComponentProps & {\r\n\t\titems: {\r\n\t\t\ttitle: string;\r\n\t\t\turl: string;\r\n\t\t\ticon: Accessor;\r\n\t\t}[];\r\n\t},\r\n) => {\r\n\tconst [local, rest] = splitProps(props, [\"items\"]);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{(item) => (\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{item.title}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport default NavSecondary;\r\n" + content: "import {\n For,\n splitProps,\n type Accessor,\n type ComponentProps,\n type JSXElement,\n} from \"solid-js\"\n\nimport {\n SidebarGroup,\n SidebarGroupContent,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n} from \"@/components/ui/sidebar\"\n\nconst NavSecondary = (\n props: ComponentProps & {\n items: {\n title: string\n url: string\n icon: Accessor\n }[]\n }\n) => {\n const [local, rest] = splitProps(props, [\"items\"])\n\n return (\n \n \n \n \n {(item) => (\n \n \n \n {item.title}\n \n \n )}\n \n \n \n \n )\n}\n\nexport default NavSecondary\n" }], component: clientOnly(() => import("@/registry/tailwindcss/blocks/sidebar-03/index"), { lazy: true }), source: "src/__registry__/tailwindcss/blocks/sidebar-03/index.tsx", @@ -1637,7 +1637,7 @@ export const Index: Record = { path: "src/registry/tailwindcss/charts/area-chart.tsx", type: "registry:block", target: "", - content: "import {\r\n\tCard,\r\n\tCardContent,\r\n\tCardDescription,\r\n\tCardFooter,\r\n\tCardHeader,\r\n\tCardTitle,\r\n} from \"@/components/ui/card\";\r\nimport {\r\n\ttype ChartConfig,\r\n\tChartContainer,\r\n\tChartCrosshair,\r\n\tChartTooltipContent,\r\n} from \"@/components/ui/chart\";\r\nimport { VisArea, VisAxis, VisLine, VisTooltip } from \"@unovis/solid\";\r\nimport { CurveType, Position } from \"@unovis/ts\";\r\n\r\ntype DataRecord = {\r\n\tmonth: string;\r\n\tdesktop: number;\r\n};\r\n\r\nconst data: DataRecord[] = [\r\n\t{ month: \"January\", desktop: 186 },\r\n\t{ month: \"February\", desktop: 305 },\r\n\t{ month: \"March\", desktop: 237 },\r\n\t{ month: \"April\", desktop: 73 },\r\n\t{ month: \"May\", desktop: 209 },\r\n\t{ month: \"June\", desktop: 214 },\r\n];\r\n\r\nconst chartConfig = {\r\n\tdesktop: {\r\n\t\tlabel: \"Desktop\",\r\n\t\tcolor: \"hsl(var(--chart-1))\",\r\n\t},\r\n} satisfies ChartConfig;\r\n\r\nconst AreaChart = () => {\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\tArea Chart\r\n\t\t\t\t\r\n\t\t\t\t\tShowing total visitors for the last 6 months\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tx={(_, i) => i}\r\n\t\t\t\t\t\ty={(d) => d.desktop}\r\n\t\t\t\t\t\tcolor=\"var(--color-desktop)\"\r\n\t\t\t\t\t\topacity={0.4}\r\n\t\t\t\t\t\tcurveType={CurveType.Natural}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tx={(_, i) => i}\r\n\t\t\t\t\t\ty={(d) => d.desktop}\r\n\t\t\t\t\t\tcolor=\"var(--color-desktop)\"\r\n\t\t\t\t\t\tcurveType={CurveType.Natural}\r\n\t\t\t\t\t\tlineWidth={1}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\ttype=\"x\"\r\n\t\t\t\t\t\ttickFormat={(d) => data[d as number].month.slice(0, 3)}\r\n\t\t\t\t\t\tgridLine={false}\r\n\t\t\t\t\t\ttickLine={false}\r\n\t\t\t\t\t\tdomainLine={false}\r\n\t\t\t\t\t\tnumTicks={data.length}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tcolor=\"var(--color-desktop)\"\r\n\t\t\t\t\t\ttemplate={(props) => (\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\tTrending up by 5.2% this month{\" \"}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\tJanuary - June 2024\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n\r\nexport default AreaChart;\r\n" + content: "import { VisArea, VisAxis, VisLine, VisTooltip } from \"@unovis/solid\"\nimport { CurveType, Position } from \"@unovis/ts\"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport {\n ChartContainer,\n ChartCrosshair,\n ChartTooltipContent,\n type ChartConfig,\n} from \"@/components/ui/chart\"\n\ntype DataRecord = {\n month: string\n desktop: number\n}\n\nconst data: DataRecord[] = [\n { month: \"January\", desktop: 186 },\n { month: \"February\", desktop: 305 },\n { month: \"March\", desktop: 237 },\n { month: \"April\", desktop: 73 },\n { month: \"May\", desktop: 209 },\n { month: \"June\", desktop: 214 },\n]\n\nconst chartConfig = {\n desktop: {\n label: \"Desktop\",\n color: \"hsl(var(--chart-1))\",\n },\n} satisfies ChartConfig\n\nconst AreaChart = () => {\n return (\n \n \n Area Chart\n \n Showing total visitors for the last 6 months\n \n \n \n \n \n x={(_, i) => i}\n y={(d) => d.desktop}\n color=\"var(--color-desktop)\"\n opacity={0.4}\n curveType={CurveType.Natural}\n />\n \n x={(_, i) => i}\n y={(d) => d.desktop}\n color=\"var(--color-desktop)\"\n curveType={CurveType.Natural}\n lineWidth={1}\n />\n \n type=\"x\"\n tickFormat={(d) => data[d as number].month.slice(0, 3)}\n gridLine={false}\n tickLine={false}\n domainLine={false}\n numTicks={data.length}\n />\n \n color=\"var(--color-desktop)\"\n template={(props) => (\n \n )}\n />\n \n \n \n \n
\n
\n
\n Trending up by 5.2% this month{\" \"}\n \n \n \n \n \n \n
\n
\n January - June 2024\n
\n
\n
\n
\n
\n )\n}\n\nexport default AreaChart\n" }], component: clientOnly(() => import("@/registry/tailwindcss/charts/area-chart"), { lazy: true }), source: "src/__registry__/tailwindcss/charts/area-chart.tsx", @@ -1653,7 +1653,7 @@ export const Index: Record = { path: "src/registry/tailwindcss/charts/area-chart-linear.tsx", type: "registry:block", target: "", - content: "import {\r\n\tCard,\r\n\tCardContent,\r\n\tCardDescription,\r\n\tCardFooter,\r\n\tCardHeader,\r\n\tCardTitle,\r\n} from \"@/components/ui/card\";\r\nimport {\r\n\ttype ChartConfig,\r\n\tChartContainer,\r\n\tChartCrosshair,\r\n\tChartTooltipContent,\r\n} from \"@/components/ui/chart\";\r\nimport { VisArea, VisAxis, VisLine, VisTooltip } from \"@unovis/solid\";\r\nimport { CurveType, Position } from \"@unovis/ts\";\r\n\r\ntype DataRecord = {\r\n\tmonth: string;\r\n\tdesktop: number;\r\n};\r\n\r\nconst data: DataRecord[] = [\r\n\t{ month: \"January\", desktop: 186 },\r\n\t{ month: \"February\", desktop: 305 },\r\n\t{ month: \"March\", desktop: 237 },\r\n\t{ month: \"April\", desktop: 73 },\r\n\t{ month: \"May\", desktop: 209 },\r\n\t{ month: \"June\", desktop: 214 },\r\n];\r\n\r\nconst chartConfig = {\r\n\tdesktop: {\r\n\t\tlabel: \"Desktop\",\r\n\t\tcolor: \"hsl(var(--chart-1))\",\r\n\t},\r\n} satisfies ChartConfig;\r\n\r\nconst AreaChartLinear = () => {\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\tArea Chart - Linear\r\n\t\t\t\t\r\n\t\t\t\t\tShowing total visitors for the last 6 months\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tx={(_, i) => i}\r\n\t\t\t\t\t\ty={(d) => d.desktop}\r\n\t\t\t\t\t\tcolor=\"var(--color-desktop)\"\r\n\t\t\t\t\t\topacity={0.4}\r\n\t\t\t\t\t\tcurveType={CurveType.Linear}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tx={(_, i) => i}\r\n\t\t\t\t\t\ty={(d) => d.desktop}\r\n\t\t\t\t\t\tcolor=\"var(--color-desktop)\"\r\n\t\t\t\t\t\tcurveType={CurveType.Linear}\r\n\t\t\t\t\t\tlineWidth={1}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\ttype=\"x\"\r\n\t\t\t\t\t\ttickFormat={(d) => data[d as number].month.slice(0, 3)}\r\n\t\t\t\t\t\tgridLine={false}\r\n\t\t\t\t\t\ttickLine={false}\r\n\t\t\t\t\t\tdomainLine={false}\r\n\t\t\t\t\t\tnumTicks={data.length}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tcolor=\"var(--color-desktop)\"\r\n\t\t\t\t\t\ttemplate={(props) => (\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\tTrending up by 5.2% this month{\" \"}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\tJanuary - June 2024\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n\r\nexport default AreaChartLinear;\r\n" + content: "import { VisArea, VisAxis, VisLine, VisTooltip } from \"@unovis/solid\"\nimport { CurveType, Position } from \"@unovis/ts\"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport {\n ChartContainer,\n ChartCrosshair,\n ChartTooltipContent,\n type ChartConfig,\n} from \"@/components/ui/chart\"\n\ntype DataRecord = {\n month: string\n desktop: number\n}\n\nconst data: DataRecord[] = [\n { month: \"January\", desktop: 186 },\n { month: \"February\", desktop: 305 },\n { month: \"March\", desktop: 237 },\n { month: \"April\", desktop: 73 },\n { month: \"May\", desktop: 209 },\n { month: \"June\", desktop: 214 },\n]\n\nconst chartConfig = {\n desktop: {\n label: \"Desktop\",\n color: \"hsl(var(--chart-1))\",\n },\n} satisfies ChartConfig\n\nconst AreaChartLinear = () => {\n return (\n \n \n Area Chart - Linear\n \n Showing total visitors for the last 6 months\n \n \n \n \n \n x={(_, i) => i}\n y={(d) => d.desktop}\n color=\"var(--color-desktop)\"\n opacity={0.4}\n curveType={CurveType.Linear}\n />\n \n x={(_, i) => i}\n y={(d) => d.desktop}\n color=\"var(--color-desktop)\"\n curveType={CurveType.Linear}\n lineWidth={1}\n />\n \n type=\"x\"\n tickFormat={(d) => data[d as number].month.slice(0, 3)}\n gridLine={false}\n tickLine={false}\n domainLine={false}\n numTicks={data.length}\n />\n \n color=\"var(--color-desktop)\"\n template={(props) => (\n \n )}\n />\n \n \n \n \n
\n
\n
\n Trending up by 5.2% this month{\" \"}\n \n \n \n \n \n \n
\n
\n January - June 2024\n
\n
\n
\n
\n
\n )\n}\n\nexport default AreaChartLinear\n" }], component: clientOnly(() => import("@/registry/tailwindcss/charts/area-chart-linear"), { lazy: true }), source: "src/__registry__/tailwindcss/charts/area-chart-linear.tsx", @@ -1669,7 +1669,7 @@ export const Index: Record = { path: "src/registry/tailwindcss/charts/area-chart-step.tsx", type: "registry:block", target: "", - content: "import {\r\n\tCard,\r\n\tCardContent,\r\n\tCardDescription,\r\n\tCardFooter,\r\n\tCardHeader,\r\n\tCardTitle,\r\n} from \"@/components/ui/card\";\r\nimport {\r\n\ttype ChartConfig,\r\n\tChartContainer,\r\n\tChartCrosshair,\r\n\tChartTooltipContent,\r\n} from \"@/components/ui/chart\";\r\nimport { VisArea, VisAxis, VisLine, VisTooltip } from \"@unovis/solid\";\r\nimport { CurveType, Position } from \"@unovis/ts\";\r\n\r\ntype DataRecord = {\r\n\tmonth: string;\r\n\tdesktop: number;\r\n};\r\n\r\nconst data: DataRecord[] = [\r\n\t{ month: \"January\", desktop: 186 },\r\n\t{ month: \"February\", desktop: 305 },\r\n\t{ month: \"March\", desktop: 237 },\r\n\t{ month: \"April\", desktop: 73 },\r\n\t{ month: \"May\", desktop: 209 },\r\n\t{ month: \"June\", desktop: 214 },\r\n];\r\n\r\nconst chartConfig = {\r\n\tdesktop: {\r\n\t\tlabel: \"Desktop\",\r\n\t\tcolor: \"hsl(var(--chart-1))\",\r\n\t\ticon: (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t),\r\n\t},\r\n} satisfies ChartConfig;\r\n\r\nconst AreaChartStep = () => {\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\tArea Chart - Step\r\n\t\t\t\t\r\n\t\t\t\t\tShowing total visitors for the last 6 months\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tx={(_, i) => i}\r\n\t\t\t\t\t\ty={(d) => d.desktop}\r\n\t\t\t\t\t\tcolor=\"var(--color-desktop)\"\r\n\t\t\t\t\t\topacity={0.4}\r\n\t\t\t\t\t\tcurveType={CurveType.Step}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tx={(_, i) => i}\r\n\t\t\t\t\t\ty={(d) => d.desktop}\r\n\t\t\t\t\t\tcolor=\"var(--color-desktop)\"\r\n\t\t\t\t\t\tcurveType={CurveType.Step}\r\n\t\t\t\t\t\tlineWidth={1}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\ttype=\"x\"\r\n\t\t\t\t\t\ttickFormat={(d) => data[d as number].month.slice(0, 3)}\r\n\t\t\t\t\t\tgridLine={false}\r\n\t\t\t\t\t\ttickLine={false}\r\n\t\t\t\t\t\tdomainLine={false}\r\n\t\t\t\t\t\tnumTicks={data.length}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tcolor=\"var(--color-desktop)\"\r\n\t\t\t\t\t\ttemplate={(props) => (\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\tTrending up by 5.2% this month{\" \"}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\tJanuary - June 2024\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n\r\nexport default AreaChartStep;\r\n" + content: "import { VisArea, VisAxis, VisLine, VisTooltip } from \"@unovis/solid\"\nimport { CurveType, Position } from \"@unovis/ts\"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport {\n ChartContainer,\n ChartCrosshair,\n ChartTooltipContent,\n type ChartConfig,\n} from \"@/components/ui/chart\"\n\ntype DataRecord = {\n month: string\n desktop: number\n}\n\nconst data: DataRecord[] = [\n { month: \"January\", desktop: 186 },\n { month: \"February\", desktop: 305 },\n { month: \"March\", desktop: 237 },\n { month: \"April\", desktop: 73 },\n { month: \"May\", desktop: 209 },\n { month: \"June\", desktop: 214 },\n]\n\nconst chartConfig = {\n desktop: {\n label: \"Desktop\",\n color: \"hsl(var(--chart-1))\",\n icon: (\n \n \n \n ),\n },\n} satisfies ChartConfig\n\nconst AreaChartStep = () => {\n return (\n \n \n Area Chart - Step\n \n Showing total visitors for the last 6 months\n \n \n \n \n \n x={(_, i) => i}\n y={(d) => d.desktop}\n color=\"var(--color-desktop)\"\n opacity={0.4}\n curveType={CurveType.Step}\n />\n \n x={(_, i) => i}\n y={(d) => d.desktop}\n color=\"var(--color-desktop)\"\n curveType={CurveType.Step}\n lineWidth={1}\n />\n \n type=\"x\"\n tickFormat={(d) => data[d as number].month.slice(0, 3)}\n gridLine={false}\n tickLine={false}\n domainLine={false}\n numTicks={data.length}\n />\n \n color=\"var(--color-desktop)\"\n template={(props) => (\n \n )}\n />\n \n \n \n \n
\n
\n
\n Trending up by 5.2% this month{\" \"}\n \n \n \n \n \n \n
\n
\n January - June 2024\n
\n
\n
\n
\n
\n )\n}\n\nexport default AreaChartStep\n" }], component: clientOnly(() => import("@/registry/tailwindcss/charts/area-chart-step"), { lazy: true }), source: "src/__registry__/tailwindcss/charts/area-chart-step.tsx", @@ -1685,7 +1685,7 @@ export const Index: Record = { path: "src/registry/tailwindcss/charts/area-chart-stacked.tsx", type: "registry:block", target: "", - content: "import {\r\n\tCard,\r\n\tCardContent,\r\n\tCardDescription,\r\n\tCardFooter,\r\n\tCardHeader,\r\n\tCardTitle,\r\n} from \"@/components/ui/card\";\r\nimport {\r\n\ttype ChartConfig,\r\n\tChartContainer,\r\n\tChartCrosshair,\r\n\tChartTooltipContent,\r\n} from \"@/components/ui/chart\";\r\nimport { VisArea, VisAxis, VisLine, VisTooltip } from \"@unovis/solid\";\r\nimport { CurveType, Position } from \"@unovis/ts\";\r\n\r\ntype DataRecord = {\r\n\tmonth: string;\r\n\tdesktop: number;\r\n\tmobile: number;\r\n};\r\n\r\nconst data: DataRecord[] = [\r\n\t{ month: \"January\", desktop: 186, mobile: 80 },\r\n\t{ month: \"February\", desktop: 305, mobile: 200 },\r\n\t{ month: \"March\", desktop: 237, mobile: 120 },\r\n\t{ month: \"April\", desktop: 73, mobile: 190 },\r\n\t{ month: \"May\", desktop: 209, mobile: 130 },\r\n\t{ month: \"June\", desktop: 214, mobile: 140 },\r\n];\r\n\r\nconst chartConfig = {\r\n\tdesktop: {\r\n\t\tlabel: \"Desktop\",\r\n\t\tcolor: \"hsl(var(--chart-1))\",\r\n\t},\r\n\tmobile: {\r\n\t\tlabel: \"Mobile\",\r\n\t\tcolor: \"hsl(var(--chart-2))\",\r\n\t},\r\n} satisfies ChartConfig;\r\n\r\nconst AreaChartStacked = () => {\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\tArea Chart - Stacked\r\n\t\t\t\t\r\n\t\t\t\t\tShowing total visitors for the last 6 months\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tx={(_, i) => i}\r\n\t\t\t\t\t\ty={[(d) => d.mobile, (d) => d.desktop]}\r\n\t\t\t\t\t\tcolor={[\"var(--color-mobile)\", \"var(--color-desktop)\"]}\r\n\t\t\t\t\t\topacity={0.4}\r\n\t\t\t\t\t\tcurveType={CurveType.Natural}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tx={(_, i) => i}\r\n\t\t\t\t\t\ty={[(d) => d.mobile, (d) => d.mobile + d.desktop]}\r\n\t\t\t\t\t\tcolor={[\"var(--color-mobile)\", \"var(--color-desktop)\"]}\r\n\t\t\t\t\t\tcurveType={CurveType.Natural}\r\n\t\t\t\t\t\tlineWidth={1}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\ttype=\"x\"\r\n\t\t\t\t\t\ttickFormat={(d) => data[d as number].month.slice(0, 3)}\r\n\t\t\t\t\t\tgridLine={false}\r\n\t\t\t\t\t\ttickLine={false}\r\n\t\t\t\t\t\tdomainLine={false}\r\n\t\t\t\t\t\tnumTicks={data.length}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tcolor={[\"var(--color-mobile)\", \"var(--color-desktop)\"]}\r\n\t\t\t\t\t\ttemplate={(props) => (\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\tTrending up by 5.2% this month{\" \"}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\tJanuary - June 2024\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n\r\nexport default AreaChartStacked;\r\n" + content: "import { VisArea, VisAxis, VisLine, VisTooltip } from \"@unovis/solid\"\nimport { CurveType, Position } from \"@unovis/ts\"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport {\n ChartContainer,\n ChartCrosshair,\n ChartTooltipContent,\n type ChartConfig,\n} from \"@/components/ui/chart\"\n\ntype DataRecord = {\n month: string\n desktop: number\n mobile: number\n}\n\nconst data: DataRecord[] = [\n { month: \"January\", desktop: 186, mobile: 80 },\n { month: \"February\", desktop: 305, mobile: 200 },\n { month: \"March\", desktop: 237, mobile: 120 },\n { month: \"April\", desktop: 73, mobile: 190 },\n { month: \"May\", desktop: 209, mobile: 130 },\n { month: \"June\", desktop: 214, mobile: 140 },\n]\n\nconst chartConfig = {\n desktop: {\n label: \"Desktop\",\n color: \"hsl(var(--chart-1))\",\n },\n mobile: {\n label: \"Mobile\",\n color: \"hsl(var(--chart-2))\",\n },\n} satisfies ChartConfig\n\nconst AreaChartStacked = () => {\n return (\n \n \n Area Chart - Stacked\n \n Showing total visitors for the last 6 months\n \n \n \n \n \n x={(_, i) => i}\n y={[(d) => d.mobile, (d) => d.desktop]}\n color={[\"var(--color-mobile)\", \"var(--color-desktop)\"]}\n opacity={0.4}\n curveType={CurveType.Natural}\n />\n \n x={(_, i) => i}\n y={[(d) => d.mobile, (d) => d.mobile + d.desktop]}\n color={[\"var(--color-mobile)\", \"var(--color-desktop)\"]}\n curveType={CurveType.Natural}\n lineWidth={1}\n />\n \n type=\"x\"\n tickFormat={(d) => data[d as number].month.slice(0, 3)}\n gridLine={false}\n tickLine={false}\n domainLine={false}\n numTicks={data.length}\n />\n \n color={[\"var(--color-mobile)\", \"var(--color-desktop)\"]}\n template={(props) => (\n \n )}\n />\n \n \n \n \n
\n
\n
\n Trending up by 5.2% this month{\" \"}\n \n \n \n \n \n \n
\n
\n January - June 2024\n
\n
\n
\n
\n
\n )\n}\n\nexport default AreaChartStacked\n" }], component: clientOnly(() => import("@/registry/tailwindcss/charts/area-chart-stacked"), { lazy: true }), source: "src/__registry__/tailwindcss/charts/area-chart-stacked.tsx", @@ -1701,7 +1701,7 @@ export const Index: Record = { path: "src/registry/tailwindcss/charts/area-chart-legend.tsx", type: "registry:block", target: "", - content: "import {\r\n\tCard,\r\n\tCardContent,\r\n\tCardDescription,\r\n\tCardFooter,\r\n\tCardHeader,\r\n\tCardTitle,\r\n} from \"@/components/ui/card\";\r\nimport {\r\n\ttype ChartConfig,\r\n\tChartContainer,\r\n\tChartCrosshair,\r\n\tChartTooltipContent,\r\n} from \"@/components/ui/chart\";\r\nimport {\r\n\tVisArea,\r\n\tVisAxis,\r\n\tVisBulletLegend,\r\n\tVisLine,\r\n\tVisTooltip,\r\n} from \"@unovis/solid\";\r\nimport {\r\n\ttype BulletLegendItemInterface,\r\n\tCurveType,\r\n\tPosition,\r\n} from \"@unovis/ts\";\r\n\r\ntype DataRecord = {\r\n\tmonth: string;\r\n\tdesktop: number;\r\n\tmobile: number;\r\n};\r\n\r\nconst data: DataRecord[] = [\r\n\t{ month: \"January\", desktop: 186, mobile: 80 },\r\n\t{ month: \"February\", desktop: 305, mobile: 200 },\r\n\t{ month: \"March\", desktop: 237, mobile: 120 },\r\n\t{ month: \"April\", desktop: 73, mobile: 190 },\r\n\t{ month: \"May\", desktop: 209, mobile: 130 },\r\n\t{ month: \"June\", desktop: 214, mobile: 140 },\r\n];\r\n\r\nconst chartConfig = {\r\n\tdesktop: {\r\n\t\tlabel: \"Desktop\",\r\n\t\tcolor: \"hsl(var(--chart-1))\",\r\n\t},\r\n\tmobile: {\r\n\t\tlabel: \"Mobile\",\r\n\t\tcolor: \"hsl(var(--chart-2))\",\r\n\t},\r\n} satisfies ChartConfig;\r\n\r\nconst AreaChartLegend = () => {\r\n\tconst items = (): BulletLegendItemInterface[] => {\r\n\t\treturn Object.entries(chartConfig).map(([_, config]) => ({\r\n\t\t\tname: config.label,\r\n\t\t\tcolor: config.color,\r\n\t\t}));\r\n\t};\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\tArea Chart - Legend\r\n\t\t\t\t\r\n\t\t\t\t\tShowing total visitors for the last 6 months\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tx={(_, i) => i}\r\n\t\t\t\t\t\ty={[(d) => d.mobile, (d) => d.desktop]}\r\n\t\t\t\t\t\tcolor={[\"var(--color-mobile)\", \"var(--color-desktop)\"]}\r\n\t\t\t\t\t\topacity={0.4}\r\n\t\t\t\t\t\tcurveType={CurveType.Natural}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tx={(_, i) => i}\r\n\t\t\t\t\t\ty={[(d) => d.mobile, (d) => d.mobile + d.desktop]}\r\n\t\t\t\t\t\tcolor={[\"var(--color-mobile)\", \"var(--color-desktop)\"]}\r\n\t\t\t\t\t\tcurveType={CurveType.Natural}\r\n\t\t\t\t\t\tlineWidth={1}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\ttype=\"x\"\r\n\t\t\t\t\t\ttickFormat={(d) => data[d as number].month.slice(0, 3)}\r\n\t\t\t\t\t\tgridLine={false}\r\n\t\t\t\t\t\ttickLine={false}\r\n\t\t\t\t\t\tdomainLine={false}\r\n\t\t\t\t\t\tnumTicks={data.length}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tcolor={[\"var(--color-mobile)\", \"var(--color-desktop)\"]}\r\n\t\t\t\t\t\ttemplate={(props) => (\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\tTrending up by 5.2% this month{\" \"}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\tJanuary - June 2024\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n\r\nexport default AreaChartLegend;\r\n" + content: "import {\n VisArea,\n VisAxis,\n VisBulletLegend,\n VisLine,\n VisTooltip,\n} from \"@unovis/solid\"\nimport { CurveType, Position, type BulletLegendItemInterface } from \"@unovis/ts\"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport {\n ChartContainer,\n ChartCrosshair,\n ChartTooltipContent,\n type ChartConfig,\n} from \"@/components/ui/chart\"\n\ntype DataRecord = {\n month: string\n desktop: number\n mobile: number\n}\n\nconst data: DataRecord[] = [\n { month: \"January\", desktop: 186, mobile: 80 },\n { month: \"February\", desktop: 305, mobile: 200 },\n { month: \"March\", desktop: 237, mobile: 120 },\n { month: \"April\", desktop: 73, mobile: 190 },\n { month: \"May\", desktop: 209, mobile: 130 },\n { month: \"June\", desktop: 214, mobile: 140 },\n]\n\nconst chartConfig = {\n desktop: {\n label: \"Desktop\",\n color: \"hsl(var(--chart-1))\",\n },\n mobile: {\n label: \"Mobile\",\n color: \"hsl(var(--chart-2))\",\n },\n} satisfies ChartConfig\n\nconst AreaChartLegend = () => {\n const items = (): BulletLegendItemInterface[] => {\n return Object.entries(chartConfig).map(([_, config]) => ({\n name: config.label,\n color: config.color,\n }))\n }\n\n return (\n \n \n Area Chart - Legend\n \n Showing total visitors for the last 6 months\n \n \n \n \n \n x={(_, i) => i}\n y={[(d) => d.mobile, (d) => d.desktop]}\n color={[\"var(--color-mobile)\", \"var(--color-desktop)\"]}\n opacity={0.4}\n curveType={CurveType.Natural}\n />\n \n x={(_, i) => i}\n y={[(d) => d.mobile, (d) => d.mobile + d.desktop]}\n color={[\"var(--color-mobile)\", \"var(--color-desktop)\"]}\n curveType={CurveType.Natural}\n lineWidth={1}\n />\n \n type=\"x\"\n tickFormat={(d) => data[d as number].month.slice(0, 3)}\n gridLine={false}\n tickLine={false}\n domainLine={false}\n numTicks={data.length}\n />\n \n color={[\"var(--color-mobile)\", \"var(--color-desktop)\"]}\n template={(props) => (\n \n )}\n />\n \n \n
\n \n
\n
\n \n
\n
\n
\n Trending up by 5.2% this month{\" \"}\n \n \n \n \n \n \n
\n
\n January - June 2024\n
\n
\n
\n
\n
\n )\n}\n\nexport default AreaChartLegend\n" }], component: clientOnly(() => import("@/registry/tailwindcss/charts/area-chart-legend"), { lazy: true }), source: "src/__registry__/tailwindcss/charts/area-chart-legend.tsx", @@ -1717,7 +1717,7 @@ export const Index: Record = { path: "src/registry/tailwindcss/charts/area-chart-gradient.tsx", type: "registry:block", target: "", - content: "import {\r\n\tCard,\r\n\tCardContent,\r\n\tCardDescription,\r\n\tCardFooter,\r\n\tCardHeader,\r\n\tCardTitle,\r\n} from \"@/components/ui/card\";\r\nimport {\r\n\ttype ChartConfig,\r\n\tChartContainer,\r\n\tChartCrosshair,\r\n\tChartTooltipContent,\r\n} from \"@/components/ui/chart\";\r\nimport { VisArea, VisAxis, VisLine, VisTooltip } from \"@unovis/solid\";\r\nimport { Area, CurveType, Position } from \"@unovis/ts\";\r\n\r\ntype DataRecord = {\r\n\tmonth: string;\r\n\tdesktop: number;\r\n\tmobile: number;\r\n};\r\n\r\nconst data: DataRecord[] = [\r\n\t{ month: \"January\", desktop: 186, mobile: 80 },\r\n\t{ month: \"February\", desktop: 305, mobile: 200 },\r\n\t{ month: \"March\", desktop: 237, mobile: 120 },\r\n\t{ month: \"April\", desktop: 73, mobile: 190 },\r\n\t{ month: \"May\", desktop: 209, mobile: 130 },\r\n\t{ month: \"June\", desktop: 214, mobile: 140 },\r\n];\r\n\r\nconst chartConfig = {\r\n\tdesktop: {\r\n\t\tlabel: \"Desktop\",\r\n\t\tcolor: \"hsl(var(--chart-1))\",\r\n\t},\r\n\tmobile: {\r\n\t\tlabel: \"Mobile\",\r\n\t\tcolor: \"hsl(var(--chart-2))\",\r\n\t},\r\n} satisfies ChartConfig;\r\n\r\nconst AreaChartGradient = () => {\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\tArea Chart - Gradient\r\n\t\t\t\t\r\n\t\t\t\t\tShowing total visitors for the last 6 months\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tx={(_, i) => i}\r\n\t\t\t\t\t\ty={[(d) => d.mobile, (d) => d.desktop]}\r\n\t\t\t\t\t\tcolor=\"auto\"\r\n\t\t\t\t\t\topacity={0.4}\r\n\t\t\t\t\t\tcurveType={CurveType.Natural}\r\n\t\t\t\t\t\tattributes={{\r\n\t\t\t\t\t\t\t[`${Area.selectors.area}:nth-child(1)`]: {\r\n\t\t\t\t\t\t\t\tfill: \"url(#fillDesktop)\",\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t[`${Area.selectors.area}:nth-child(2)`]: {\r\n\t\t\t\t\t\t\t\tfill: \"url(#fillMobile)\",\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tx={(_, i) => i}\r\n\t\t\t\t\t\ty={[(d) => d.mobile, (d) => d.mobile + d.desktop]}\r\n\t\t\t\t\t\tcolor={[\"var(--color-mobile)\", \"var(--color-desktop)\"]}\r\n\t\t\t\t\t\tcurveType={CurveType.Natural}\r\n\t\t\t\t\t\tlineWidth={1}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\ttype=\"x\"\r\n\t\t\t\t\t\ttickFormat={(d) => data[d as number].month.slice(0, 3)}\r\n\t\t\t\t\t\tgridLine={false}\r\n\t\t\t\t\t\ttickLine={false}\r\n\t\t\t\t\t\tdomainLine={false}\r\n\t\t\t\t\t\tnumTicks={data.length}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tcolor={[\"var(--color-mobile)\", \"var(--color-desktop)\"]}\r\n\t\t\t\t\t\ttemplate={(props) => (\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\tTrending up by 5.2% this month{\" \"}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\tJanuary - June 2024\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n\r\nexport default AreaChartGradient;\r\n" + content: "import { VisArea, VisAxis, VisLine, VisTooltip } from \"@unovis/solid\"\nimport { Area, CurveType, Position } from \"@unovis/ts\"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport {\n ChartContainer,\n ChartCrosshair,\n ChartTooltipContent,\n type ChartConfig,\n} from \"@/components/ui/chart\"\n\ntype DataRecord = {\n month: string\n desktop: number\n mobile: number\n}\n\nconst data: DataRecord[] = [\n { month: \"January\", desktop: 186, mobile: 80 },\n { month: \"February\", desktop: 305, mobile: 200 },\n { month: \"March\", desktop: 237, mobile: 120 },\n { month: \"April\", desktop: 73, mobile: 190 },\n { month: \"May\", desktop: 209, mobile: 130 },\n { month: \"June\", desktop: 214, mobile: 140 },\n]\n\nconst chartConfig = {\n desktop: {\n label: \"Desktop\",\n color: \"hsl(var(--chart-1))\",\n },\n mobile: {\n label: \"Mobile\",\n color: \"hsl(var(--chart-2))\",\n },\n} satisfies ChartConfig\n\nconst AreaChartGradient = () => {\n return (\n \n \n Area Chart - Gradient\n \n Showing total visitors for the last 6 months\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n x={(_, i) => i}\n y={[(d) => d.mobile, (d) => d.desktop]}\n color=\"auto\"\n opacity={0.4}\n curveType={CurveType.Natural}\n attributes={{\n [`${Area.selectors.area}:nth-child(1)`]: {\n fill: \"url(#fillDesktop)\",\n },\n [`${Area.selectors.area}:nth-child(2)`]: {\n fill: \"url(#fillMobile)\",\n },\n }}\n />\n \n x={(_, i) => i}\n y={[(d) => d.mobile, (d) => d.mobile + d.desktop]}\n color={[\"var(--color-mobile)\", \"var(--color-desktop)\"]}\n curveType={CurveType.Natural}\n lineWidth={1}\n />\n \n type=\"x\"\n tickFormat={(d) => data[d as number].month.slice(0, 3)}\n gridLine={false}\n tickLine={false}\n domainLine={false}\n numTicks={data.length}\n />\n \n color={[\"var(--color-mobile)\", \"var(--color-desktop)\"]}\n template={(props) => (\n \n )}\n />\n \n \n \n \n
\n
\n
\n Trending up by 5.2% this month{\" \"}\n \n \n \n \n \n \n
\n
\n January - June 2024\n
\n
\n
\n
\n
\n )\n}\n\nexport default AreaChartGradient\n" }], component: clientOnly(() => import("@/registry/tailwindcss/charts/area-chart-gradient"), { lazy: true }), source: "src/__registry__/tailwindcss/charts/area-chart-gradient.tsx", @@ -1733,7 +1733,7 @@ export const Index: Record = { path: "src/registry/tailwindcss/charts/area-chart-interactive.tsx", type: "registry:block", target: "", - content: "import { useIsMobile } from \"@/hooks/use-mobile\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\ttype ChartConfig,\n\tChartContainer,\n\tChartCrosshair,\n\tChartTooltipContent,\n} from \"@/components/ui/chart\";\nimport {\n\tVisArea,\n\tVisAxis,\n\tVisBrush,\n\tVisBulletLegend,\n\tVisLine,\n\tVisTooltip,\n} from \"@unovis/solid\";\nimport {\n\tArea,\n\ttype BulletLegendItemInterface,\n\tCurveType,\n\tPosition,\n} from \"@unovis/ts\";\nimport { batch, createSignal } from \"solid-js\";\n\ntype DataRecord = {\n\tdate: string;\n\tdesktop: number;\n\tmobile: number;\n};\n\nconst data: DataRecord[] = [\n\t{ date: \"2024-04-01\", desktop: 222, mobile: 150 },\n\t{ date: \"2024-04-02\", desktop: 97, mobile: 180 },\n\t{ date: \"2024-04-03\", desktop: 167, mobile: 120 },\n\t{ date: \"2024-04-04\", desktop: 242, mobile: 260 },\n\t{ date: \"2024-04-05\", desktop: 373, mobile: 290 },\n\t{ date: \"2024-04-06\", desktop: 301, mobile: 340 },\n\t{ date: \"2024-04-07\", desktop: 245, mobile: 180 },\n\t{ date: \"2024-04-08\", desktop: 409, mobile: 320 },\n\t{ date: \"2024-04-09\", desktop: 59, mobile: 110 },\n\t{ date: \"2024-04-10\", desktop: 261, mobile: 190 },\n\t{ date: \"2024-04-11\", desktop: 327, mobile: 350 },\n\t{ date: \"2024-04-12\", desktop: 292, mobile: 210 },\n\t{ date: \"2024-04-13\", desktop: 342, mobile: 380 },\n\t{ date: \"2024-04-14\", desktop: 137, mobile: 220 },\n\t{ date: \"2024-04-15\", desktop: 120, mobile: 170 },\n\t{ date: \"2024-04-16\", desktop: 138, mobile: 190 },\n\t{ date: \"2024-04-17\", desktop: 446, mobile: 360 },\n\t{ date: \"2024-04-18\", desktop: 364, mobile: 410 },\n\t{ date: \"2024-04-19\", desktop: 243, mobile: 180 },\n\t{ date: \"2024-04-20\", desktop: 89, mobile: 150 },\n\t{ date: \"2024-04-21\", desktop: 137, mobile: 200 },\n\t{ date: \"2024-04-22\", desktop: 224, mobile: 170 },\n\t{ date: \"2024-04-23\", desktop: 138, mobile: 230 },\n\t{ date: \"2024-04-24\", desktop: 387, mobile: 290 },\n\t{ date: \"2024-04-25\", desktop: 215, mobile: 250 },\n\t{ date: \"2024-04-26\", desktop: 75, mobile: 130 },\n\t{ date: \"2024-04-27\", desktop: 383, mobile: 420 },\n\t{ date: \"2024-04-28\", desktop: 122, mobile: 180 },\n\t{ date: \"2024-04-29\", desktop: 315, mobile: 240 },\n\t{ date: \"2024-04-30\", desktop: 454, mobile: 380 },\n\t{ date: \"2024-05-01\", desktop: 165, mobile: 220 },\n\t{ date: \"2024-05-02\", desktop: 293, mobile: 310 },\n\t{ date: \"2024-05-03\", desktop: 247, mobile: 190 },\n\t{ date: \"2024-05-04\", desktop: 385, mobile: 420 },\n\t{ date: \"2024-05-05\", desktop: 481, mobile: 390 },\n\t{ date: \"2024-05-06\", desktop: 498, mobile: 520 },\n\t{ date: \"2024-05-07\", desktop: 388, mobile: 300 },\n\t{ date: \"2024-05-08\", desktop: 149, mobile: 210 },\n\t{ date: \"2024-05-09\", desktop: 227, mobile: 180 },\n\t{ date: \"2024-05-10\", desktop: 293, mobile: 330 },\n\t{ date: \"2024-05-11\", desktop: 335, mobile: 270 },\n\t{ date: \"2024-05-12\", desktop: 197, mobile: 240 },\n\t{ date: \"2024-05-13\", desktop: 197, mobile: 160 },\n\t{ date: \"2024-05-14\", desktop: 448, mobile: 490 },\n\t{ date: \"2024-05-15\", desktop: 473, mobile: 380 },\n\t{ date: \"2024-05-16\", desktop: 338, mobile: 400 },\n\t{ date: \"2024-05-17\", desktop: 499, mobile: 420 },\n\t{ date: \"2024-05-18\", desktop: 315, mobile: 350 },\n\t{ date: \"2024-05-19\", desktop: 235, mobile: 180 },\n\t{ date: \"2024-05-20\", desktop: 177, mobile: 230 },\n\t{ date: \"2024-05-21\", desktop: 82, mobile: 140 },\n\t{ date: \"2024-05-22\", desktop: 81, mobile: 120 },\n\t{ date: \"2024-05-23\", desktop: 252, mobile: 290 },\n\t{ date: \"2024-05-24\", desktop: 294, mobile: 220 },\n\t{ date: \"2024-05-25\", desktop: 201, mobile: 250 },\n\t{ date: \"2024-05-26\", desktop: 213, mobile: 170 },\n\t{ date: \"2024-05-27\", desktop: 420, mobile: 460 },\n\t{ date: \"2024-05-28\", desktop: 233, mobile: 190 },\n\t{ date: \"2024-05-29\", desktop: 78, mobile: 130 },\n\t{ date: \"2024-05-30\", desktop: 340, mobile: 280 },\n\t{ date: \"2024-05-31\", desktop: 178, mobile: 230 },\n\t{ date: \"2024-06-01\", desktop: 178, mobile: 200 },\n\t{ date: \"2024-06-02\", desktop: 470, mobile: 410 },\n\t{ date: \"2024-06-03\", desktop: 103, mobile: 160 },\n\t{ date: \"2024-06-04\", desktop: 439, mobile: 380 },\n\t{ date: \"2024-06-05\", desktop: 88, mobile: 140 },\n\t{ date: \"2024-06-06\", desktop: 294, mobile: 250 },\n\t{ date: \"2024-06-07\", desktop: 323, mobile: 370 },\n\t{ date: \"2024-06-08\", desktop: 385, mobile: 320 },\n\t{ date: \"2024-06-09\", desktop: 438, mobile: 480 },\n\t{ date: \"2024-06-10\", desktop: 155, mobile: 200 },\n\t{ date: \"2024-06-11\", desktop: 92, mobile: 150 },\n\t{ date: \"2024-06-12\", desktop: 492, mobile: 420 },\n\t{ date: \"2024-06-13\", desktop: 81, mobile: 130 },\n\t{ date: \"2024-06-14\", desktop: 426, mobile: 380 },\n\t{ date: \"2024-06-15\", desktop: 307, mobile: 350 },\n\t{ date: \"2024-06-16\", desktop: 371, mobile: 310 },\n\t{ date: \"2024-06-17\", desktop: 475, mobile: 520 },\n\t{ date: \"2024-06-18\", desktop: 107, mobile: 170 },\n\t{ date: \"2024-06-19\", desktop: 341, mobile: 290 },\n\t{ date: \"2024-06-20\", desktop: 408, mobile: 450 },\n\t{ date: \"2024-06-21\", desktop: 169, mobile: 210 },\n\t{ date: \"2024-06-22\", desktop: 317, mobile: 270 },\n\t{ date: \"2024-06-23\", desktop: 480, mobile: 530 },\n\t{ date: \"2024-06-24\", desktop: 132, mobile: 180 },\n\t{ date: \"2024-06-25\", desktop: 141, mobile: 190 },\n\t{ date: \"2024-06-26\", desktop: 434, mobile: 380 },\n\t{ date: \"2024-06-27\", desktop: 448, mobile: 490 },\n\t{ date: \"2024-06-28\", desktop: 149, mobile: 200 },\n\t{ date: \"2024-06-29\", desktop: 103, mobile: 160 },\n\t{ date: \"2024-06-30\", desktop: 446, mobile: 400 },\n];\n\nconst chartConfig = {\n\tdesktop: {\n\t\tlabel: \"Desktop\",\n\t\tcolor: \"hsl(var(--chart-1))\",\n\t},\n\tmobile: {\n\t\tlabel: \"Mobile\",\n\t\tcolor: \"hsl(var(--chart-2))\",\n\t},\n} satisfies ChartConfig;\n\nconst AreaChartInteractive = () => {\n\tconst items = (): BulletLegendItemInterface[] => {\n\t\treturn Object.entries(chartConfig).map(([_, config]) => ({\n\t\t\tname: config.label,\n\t\t\tcolor: config.color,\n\t\t}));\n\t};\n\n\tconst [duration, setDuration] = createSignal(0);\n\tconst [domain, setDomain] = createSignal<[number, number]>([\n\t\tdata.findIndex((d) => d.date === \"2024-04-30\"),\n\t\tdata.findIndex((d) => d.date === \"2024-06-01\"),\n\t]);\n\n\tconst isMobile = useIsMobile();\n\n\tconst numTicks = () => {\n\t\tif (isMobile()) {\n\t\t\treturn 4;\n\t\t}\n\t\treturn 15;\n\t};\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\tArea Chart - Interactive\n\t\t\t\t\n\t\t\t\t\tShowing total visitors for the last 3 months\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tx={(_, i) => i}\n\t\t\t\t\t\ty={[(d) => d.mobile, (d) => d.desktop]}\n\t\t\t\t\t\tcolor=\"auto\"\n\t\t\t\t\t\topacity={0.4}\n\t\t\t\t\t\tcurveType={CurveType.Natural}\n\t\t\t\t\t\tattributes={{\n\t\t\t\t\t\t\t[`${Area.selectors.area}:nth-child(1)`]: {\n\t\t\t\t\t\t\t\tfill: \"url(#fillDesktop)\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t[`${Area.selectors.area}:nth-child(2)`]: {\n\t\t\t\t\t\t\t\tfill: \"url(#fillMobile)\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\t\tx={(_, i) => i}\n\t\t\t\t\t\ty={[(d) => d.mobile, (d) => d.mobile + d.desktop]}\n\t\t\t\t\t\tcolor={[\"var(--color-mobile)\", \"var(--color-desktop)\"]}\n\t\t\t\t\t\tcurveType={CurveType.Natural}\n\t\t\t\t\t\tlineWidth={1}\n\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\t\ttype=\"x\"\n\t\t\t\t\t\ttickFormat={(d) => {\n\t\t\t\t\t\t\tconst date = new Date(data[d as number].date);\n\t\t\t\t\t\t\treturn date.toLocaleDateString(\"en-US\", {\n\t\t\t\t\t\t\t\tmonth: \"short\",\n\t\t\t\t\t\t\t\tday: \"numeric\",\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tgridLine={false}\n\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\tdomainLine={false}\n\t\t\t\t\t\tnumTicks={Math.min(numTicks(), domain()[1] - domain()[0])}\n\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\t\tcolor={[\"var(--color-mobile)\", \"var(--color-desktop)\"]}\n\t\t\t\t\t\ttemplate={(props) => (\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tconst date = new Date(data[d as number].date);\n\t\t\t\t\t\t\t\t\treturn date.toLocaleDateString(\"en-US\", {\n\t\t\t\t\t\t\t\t\t\tmonth: \"short\",\n\t\t\t\t\t\t\t\t\t\tday: \"numeric\",\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t{...props}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tx={(_, i) => i}\n\t\t\t\t\t\ty={[(d) => d.mobile, (d) => d.desktop]}\n\t\t\t\t\t\tcolor=\"auto\"\n\t\t\t\t\t\topacity={0.4}\n\t\t\t\t\t\tcurveType={CurveType.Natural}\n\t\t\t\t\t\tattributes={{\n\t\t\t\t\t\t\t[`${Area.selectors.area}:nth-child(1)`]: {\n\t\t\t\t\t\t\t\tfill: \"url(#fillDesktop)\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t[`${Area.selectors.area}:nth-child(2)`]: {\n\t\t\t\t\t\t\t\tfill: \"url(#fillMobile)\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\t\tx={(_, i) => i}\n\t\t\t\t\t\ty={[(d) => d.mobile, (d) => d.mobile + d.desktop]}\n\t\t\t\t\t\tcolor={[\"var(--color-mobile)\", \"var(--color-desktop)\"]}\n\t\t\t\t\t\tcurveType={CurveType.Natural}\n\t\t\t\t\t\tlineWidth={1}\n\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\t\ttype=\"x\"\n\t\t\t\t\t\ttickFormat={(d) => {\n\t\t\t\t\t\t\tconst date = new Date(data[d as number].date);\n\t\t\t\t\t\t\treturn date.toLocaleDateString(\"en-US\", {\n\t\t\t\t\t\t\t\tmonth: \"short\",\n\t\t\t\t\t\t\t\tday: \"numeric\",\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tgridLine={false}\n\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\tdomainLine={false}\n\t\t\t\t\t\tnumTicks={numTicks()}\n\t\t\t\t\t/>\n\t\t\t\t\t {\n\t\t\t\t\t\t\tif (userDriven)\n\t\t\t\t\t\t\t\tbatch(() => {\n\t\t\t\t\t\t\t\t\tsetDuration(0);\n\t\t\t\t\t\t\t\t\tsetDomain(selection!);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tdraggable\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t);\n};\n\nexport default AreaChartInteractive;\n" + content: "import { batch, createSignal } from \"solid-js\"\nimport {\n VisArea,\n VisAxis,\n VisBrush,\n VisBulletLegend,\n VisLine,\n VisTooltip,\n} from \"@unovis/solid\"\nimport {\n Area,\n CurveType,\n Position,\n type BulletLegendItemInterface,\n} from \"@unovis/ts\"\n\nimport { useIsMobile } from \"@/hooks/use-mobile\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport {\n ChartContainer,\n ChartCrosshair,\n ChartTooltipContent,\n type ChartConfig,\n} from \"@/components/ui/chart\"\n\ntype DataRecord = {\n date: string\n desktop: number\n mobile: number\n}\n\nconst data: DataRecord[] = [\n { date: \"2024-04-01\", desktop: 222, mobile: 150 },\n { date: \"2024-04-02\", desktop: 97, mobile: 180 },\n { date: \"2024-04-03\", desktop: 167, mobile: 120 },\n { date: \"2024-04-04\", desktop: 242, mobile: 260 },\n { date: \"2024-04-05\", desktop: 373, mobile: 290 },\n { date: \"2024-04-06\", desktop: 301, mobile: 340 },\n { date: \"2024-04-07\", desktop: 245, mobile: 180 },\n { date: \"2024-04-08\", desktop: 409, mobile: 320 },\n { date: \"2024-04-09\", desktop: 59, mobile: 110 },\n { date: \"2024-04-10\", desktop: 261, mobile: 190 },\n { date: \"2024-04-11\", desktop: 327, mobile: 350 },\n { date: \"2024-04-12\", desktop: 292, mobile: 210 },\n { date: \"2024-04-13\", desktop: 342, mobile: 380 },\n { date: \"2024-04-14\", desktop: 137, mobile: 220 },\n { date: \"2024-04-15\", desktop: 120, mobile: 170 },\n { date: \"2024-04-16\", desktop: 138, mobile: 190 },\n { date: \"2024-04-17\", desktop: 446, mobile: 360 },\n { date: \"2024-04-18\", desktop: 364, mobile: 410 },\n { date: \"2024-04-19\", desktop: 243, mobile: 180 },\n { date: \"2024-04-20\", desktop: 89, mobile: 150 },\n { date: \"2024-04-21\", desktop: 137, mobile: 200 },\n { date: \"2024-04-22\", desktop: 224, mobile: 170 },\n { date: \"2024-04-23\", desktop: 138, mobile: 230 },\n { date: \"2024-04-24\", desktop: 387, mobile: 290 },\n { date: \"2024-04-25\", desktop: 215, mobile: 250 },\n { date: \"2024-04-26\", desktop: 75, mobile: 130 },\n { date: \"2024-04-27\", desktop: 383, mobile: 420 },\n { date: \"2024-04-28\", desktop: 122, mobile: 180 },\n { date: \"2024-04-29\", desktop: 315, mobile: 240 },\n { date: \"2024-04-30\", desktop: 454, mobile: 380 },\n { date: \"2024-05-01\", desktop: 165, mobile: 220 },\n { date: \"2024-05-02\", desktop: 293, mobile: 310 },\n { date: \"2024-05-03\", desktop: 247, mobile: 190 },\n { date: \"2024-05-04\", desktop: 385, mobile: 420 },\n { date: \"2024-05-05\", desktop: 481, mobile: 390 },\n { date: \"2024-05-06\", desktop: 498, mobile: 520 },\n { date: \"2024-05-07\", desktop: 388, mobile: 300 },\n { date: \"2024-05-08\", desktop: 149, mobile: 210 },\n { date: \"2024-05-09\", desktop: 227, mobile: 180 },\n { date: \"2024-05-10\", desktop: 293, mobile: 330 },\n { date: \"2024-05-11\", desktop: 335, mobile: 270 },\n { date: \"2024-05-12\", desktop: 197, mobile: 240 },\n { date: \"2024-05-13\", desktop: 197, mobile: 160 },\n { date: \"2024-05-14\", desktop: 448, mobile: 490 },\n { date: \"2024-05-15\", desktop: 473, mobile: 380 },\n { date: \"2024-05-16\", desktop: 338, mobile: 400 },\n { date: \"2024-05-17\", desktop: 499, mobile: 420 },\n { date: \"2024-05-18\", desktop: 315, mobile: 350 },\n { date: \"2024-05-19\", desktop: 235, mobile: 180 },\n { date: \"2024-05-20\", desktop: 177, mobile: 230 },\n { date: \"2024-05-21\", desktop: 82, mobile: 140 },\n { date: \"2024-05-22\", desktop: 81, mobile: 120 },\n { date: \"2024-05-23\", desktop: 252, mobile: 290 },\n { date: \"2024-05-24\", desktop: 294, mobile: 220 },\n { date: \"2024-05-25\", desktop: 201, mobile: 250 },\n { date: \"2024-05-26\", desktop: 213, mobile: 170 },\n { date: \"2024-05-27\", desktop: 420, mobile: 460 },\n { date: \"2024-05-28\", desktop: 233, mobile: 190 },\n { date: \"2024-05-29\", desktop: 78, mobile: 130 },\n { date: \"2024-05-30\", desktop: 340, mobile: 280 },\n { date: \"2024-05-31\", desktop: 178, mobile: 230 },\n { date: \"2024-06-01\", desktop: 178, mobile: 200 },\n { date: \"2024-06-02\", desktop: 470, mobile: 410 },\n { date: \"2024-06-03\", desktop: 103, mobile: 160 },\n { date: \"2024-06-04\", desktop: 439, mobile: 380 },\n { date: \"2024-06-05\", desktop: 88, mobile: 140 },\n { date: \"2024-06-06\", desktop: 294, mobile: 250 },\n { date: \"2024-06-07\", desktop: 323, mobile: 370 },\n { date: \"2024-06-08\", desktop: 385, mobile: 320 },\n { date: \"2024-06-09\", desktop: 438, mobile: 480 },\n { date: \"2024-06-10\", desktop: 155, mobile: 200 },\n { date: \"2024-06-11\", desktop: 92, mobile: 150 },\n { date: \"2024-06-12\", desktop: 492, mobile: 420 },\n { date: \"2024-06-13\", desktop: 81, mobile: 130 },\n { date: \"2024-06-14\", desktop: 426, mobile: 380 },\n { date: \"2024-06-15\", desktop: 307, mobile: 350 },\n { date: \"2024-06-16\", desktop: 371, mobile: 310 },\n { date: \"2024-06-17\", desktop: 475, mobile: 520 },\n { date: \"2024-06-18\", desktop: 107, mobile: 170 },\n { date: \"2024-06-19\", desktop: 341, mobile: 290 },\n { date: \"2024-06-20\", desktop: 408, mobile: 450 },\n { date: \"2024-06-21\", desktop: 169, mobile: 210 },\n { date: \"2024-06-22\", desktop: 317, mobile: 270 },\n { date: \"2024-06-23\", desktop: 480, mobile: 530 },\n { date: \"2024-06-24\", desktop: 132, mobile: 180 },\n { date: \"2024-06-25\", desktop: 141, mobile: 190 },\n { date: \"2024-06-26\", desktop: 434, mobile: 380 },\n { date: \"2024-06-27\", desktop: 448, mobile: 490 },\n { date: \"2024-06-28\", desktop: 149, mobile: 200 },\n { date: \"2024-06-29\", desktop: 103, mobile: 160 },\n { date: \"2024-06-30\", desktop: 446, mobile: 400 },\n]\n\nconst chartConfig = {\n desktop: {\n label: \"Desktop\",\n color: \"hsl(var(--chart-1))\",\n },\n mobile: {\n label: \"Mobile\",\n color: \"hsl(var(--chart-2))\",\n },\n} satisfies ChartConfig\n\nconst AreaChartInteractive = () => {\n const items = (): BulletLegendItemInterface[] => {\n return Object.entries(chartConfig).map(([_, config]) => ({\n name: config.label,\n color: config.color,\n }))\n }\n\n const [duration, setDuration] = createSignal(0)\n const [domain, setDomain] = createSignal<[number, number]>([\n data.findIndex((d) => d.date === \"2024-04-30\"),\n data.findIndex((d) => d.date === \"2024-06-01\"),\n ])\n\n const isMobile = useIsMobile()\n\n const numTicks = () => {\n if (isMobile()) {\n return 4\n }\n return 15\n }\n\n return (\n \n \n Area Chart - Interactive\n \n Showing total visitors for the last 3 months\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n x={(_, i) => i}\n y={[(d) => d.mobile, (d) => d.desktop]}\n color=\"auto\"\n opacity={0.4}\n curveType={CurveType.Natural}\n attributes={{\n [`${Area.selectors.area}:nth-child(1)`]: {\n fill: \"url(#fillDesktop)\",\n },\n [`${Area.selectors.area}:nth-child(2)`]: {\n fill: \"url(#fillMobile)\",\n },\n }}\n />\n \n x={(_, i) => i}\n y={[(d) => d.mobile, (d) => d.mobile + d.desktop]}\n color={[\"var(--color-mobile)\", \"var(--color-desktop)\"]}\n curveType={CurveType.Natural}\n lineWidth={1}\n />\n \n type=\"x\"\n tickFormat={(d) => {\n const date = new Date(data[d as number].date)\n return date.toLocaleDateString(\"en-US\", {\n month: \"short\",\n day: \"numeric\",\n })\n }}\n gridLine={false}\n tickLine={false}\n domainLine={false}\n numTicks={Math.min(numTicks(), domain()[1] - domain()[0])}\n />\n \n color={[\"var(--color-mobile)\", \"var(--color-desktop)\"]}\n template={(props) => (\n {\n const date = new Date(data[d as number].date)\n return date.toLocaleDateString(\"en-US\", {\n month: \"short\",\n day: \"numeric\",\n })\n }}\n {...props}\n />\n )}\n />\n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n x={(_, i) => i}\n y={[(d) => d.mobile, (d) => d.desktop]}\n color=\"auto\"\n opacity={0.4}\n curveType={CurveType.Natural}\n attributes={{\n [`${Area.selectors.area}:nth-child(1)`]: {\n fill: \"url(#fillDesktop)\",\n },\n [`${Area.selectors.area}:nth-child(2)`]: {\n fill: \"url(#fillMobile)\",\n },\n }}\n />\n \n x={(_, i) => i}\n y={[(d) => d.mobile, (d) => d.mobile + d.desktop]}\n color={[\"var(--color-mobile)\", \"var(--color-desktop)\"]}\n curveType={CurveType.Natural}\n lineWidth={1}\n />\n \n type=\"x\"\n tickFormat={(d) => {\n const date = new Date(data[d as number].date)\n return date.toLocaleDateString(\"en-US\", {\n month: \"short\",\n day: \"numeric\",\n })\n }}\n gridLine={false}\n tickLine={false}\n domainLine={false}\n numTicks={numTicks()}\n />\n {\n if (userDriven)\n batch(() => {\n setDuration(0)\n setDomain(selection!)\n })\n }}\n draggable\n />\n \n
\n
\n )\n}\n\nexport default AreaChartInteractive\n" }], component: clientOnly(() => import("@/registry/tailwindcss/charts/area-chart-interactive"), { lazy: true }), source: "src/__registry__/tailwindcss/charts/area-chart-interactive.tsx", @@ -1749,7 +1749,7 @@ export const Index: Record = { path: "src/registry/tailwindcss/charts/bar-chart.tsx", type: "registry:block", target: "", - content: "import {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardFooter,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\ttype ChartConfig,\n\tChartContainer,\n\tChartTooltipContent,\n} from \"@/components/ui/chart\";\nimport { VisAxis, VisStackedBar, VisTooltip } from \"@unovis/solid\";\nimport { StackedBar } from \"@unovis/ts\";\nimport { render } from \"solid-js/web\";\n\ntype DataRecord = {\n\tmonth: string;\n\tdesktop: number;\n};\n\nconst data: DataRecord[] = [\n\t{ month: \"January\", desktop: 186 },\n\t{ month: \"February\", desktop: 305 },\n\t{ month: \"March\", desktop: 237 },\n\t{ month: \"April\", desktop: 73 },\n\t{ month: \"May\", desktop: 209 },\n\t{ month: \"June\", desktop: 214 },\n];\n\nconst chartConfig = {\n\tdesktop: {\n\t\tlabel: \"Desktop\",\n\t\tcolor: \"hsl(var(--chart-1))\",\n\t},\n} satisfies ChartConfig;\n\nconst BarChart = () => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\tBar Chart\n\t\t\t\tJanuary - June 2024\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tx={(_, i) => i}\n\t\t\t\t\t\ty={(d) => d.desktop}\n\t\t\t\t\t\tcolor=\"var(--color-desktop)\"\n\t\t\t\t\t\troundedCorners={8}\n\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\t\ttype=\"x\"\n\t\t\t\t\t\ttickFormat={(d) => data[d as number].month.slice(0, 3)}\n\t\t\t\t\t\tgridLine={false}\n\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\tdomainLine={false}\n\t\t\t\t\t\tnumTicks={data.length}\n\t\t\t\t\t/>\n\t\t\t\t\t {\n\t\t\t\t\t\t\t\tconst container = document.createElement(\"div\");\n\t\t\t\t\t\t\t\tconst Component = () => (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\trender(() => , container);\n\t\t\t\t\t\t\t\treturn container.innerHTML;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\tTrending up by 5.2% this month{\" \"}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\tShowing total visitors for the last 6 months\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t);\n};\n\nexport default BarChart;\n" + content: "import { render } from \"solid-js/web\"\nimport { VisAxis, VisStackedBar, VisTooltip } from \"@unovis/solid\"\nimport { StackedBar } from \"@unovis/ts\"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport {\n ChartContainer,\n ChartTooltipContent,\n type ChartConfig,\n} from \"@/components/ui/chart\"\n\ntype DataRecord = {\n month: string\n desktop: number\n}\n\nconst data: DataRecord[] = [\n { month: \"January\", desktop: 186 },\n { month: \"February\", desktop: 305 },\n { month: \"March\", desktop: 237 },\n { month: \"April\", desktop: 73 },\n { month: \"May\", desktop: 209 },\n { month: \"June\", desktop: 214 },\n]\n\nconst chartConfig = {\n desktop: {\n label: \"Desktop\",\n color: \"hsl(var(--chart-1))\",\n },\n} satisfies ChartConfig\n\nconst BarChart = () => {\n return (\n \n \n Bar Chart\n January - June 2024\n \n \n \n \n x={(_, i) => i}\n y={(d) => d.desktop}\n color=\"var(--color-desktop)\"\n roundedCorners={8}\n />\n \n type=\"x\"\n tickFormat={(d) => data[d as number].month.slice(0, 3)}\n gridLine={false}\n tickLine={false}\n domainLine={false}\n numTicks={data.length}\n />\n {\n const container = document.createElement(\"div\")\n const Component = () => (\n \n )\n render(() => , container)\n return container.innerHTML\n },\n }}\n />\n \n \n \n
\n
\n
\n Trending up by 5.2% this month{\" \"}\n \n \n \n \n \n \n
\n
\n Showing total visitors for the last 6 months\n
\n
\n
\n
\n
\n )\n}\n\nexport default BarChart\n" }], component: clientOnly(() => import("@/registry/tailwindcss/charts/bar-chart"), { lazy: true }), source: "src/__registry__/tailwindcss/charts/bar-chart.tsx", @@ -1765,7 +1765,7 @@ export const Index: Record = { path: "src/registry/tailwindcss/charts/bar-chart-horizontal.tsx", type: "registry:block", target: "", - content: "import {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardFooter,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\ttype ChartConfig,\n\tChartContainer,\n\tChartTooltipContent,\n} from \"@/components/ui/chart\";\nimport { VisAxis, VisStackedBar, VisTooltip } from \"@unovis/solid\";\nimport { Direction, Orientation, StackedBar } from \"@unovis/ts\";\nimport { render } from \"solid-js/web\";\n\ntype DataRecord = {\n\tmonth: string;\n\tdesktop: number;\n};\n\nconst data: DataRecord[] = [\n\t{ month: \"January\", desktop: 186 },\n\t{ month: \"February\", desktop: 305 },\n\t{ month: \"March\", desktop: 237 },\n\t{ month: \"April\", desktop: 73 },\n\t{ month: \"May\", desktop: 209 },\n\t{ month: \"June\", desktop: 214 },\n];\n\nconst chartConfig = {\n\tdesktop: {\n\t\tlabel: \"Desktop\",\n\t\tcolor: \"hsl(var(--chart-1))\",\n\t},\n} satisfies ChartConfig;\n\nconst BarChartHorizontal = () => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\tBar Chart- Horizontal\n\t\t\t\tJanuary - June 2024\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tx={(_, i) => i}\n\t\t\t\t\t\ty={(d) => d.desktop}\n\t\t\t\t\t\tcolor=\"var(--color-desktop)\"\n\t\t\t\t\t\troundedCorners={5}\n\t\t\t\t\t\torientation={Orientation.Horizontal}\n\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\t\ttype=\"y\"\n\t\t\t\t\t\ttickFormat={(_, i) => data[i].month}\n\t\t\t\t\t\tgridLine={false}\n\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\tdomainLine={false}\n\t\t\t\t\t\tnumTicks={data.length}\n\t\t\t\t\t/>\n\t\t\t\t\t {\n\t\t\t\t\t\t\t\tconst container = document.createElement(\"div\");\n\t\t\t\t\t\t\t\tconst Component = () => (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\trender(() => , container);\n\t\t\t\t\t\t\t\treturn container.innerHTML;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\tTrending up by 5.2% this month{\" \"}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\tShowing total visitors for the last 6 months\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t);\n};\n\nexport default BarChartHorizontal;\n" + content: "import { render } from \"solid-js/web\"\nimport { VisAxis, VisStackedBar, VisTooltip } from \"@unovis/solid\"\nimport { Direction, Orientation, StackedBar } from \"@unovis/ts\"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport {\n ChartContainer,\n ChartTooltipContent,\n type ChartConfig,\n} from \"@/components/ui/chart\"\n\ntype DataRecord = {\n month: string\n desktop: number\n}\n\nconst data: DataRecord[] = [\n { month: \"January\", desktop: 186 },\n { month: \"February\", desktop: 305 },\n { month: \"March\", desktop: 237 },\n { month: \"April\", desktop: 73 },\n { month: \"May\", desktop: 209 },\n { month: \"June\", desktop: 214 },\n]\n\nconst chartConfig = {\n desktop: {\n label: \"Desktop\",\n color: \"hsl(var(--chart-1))\",\n },\n} satisfies ChartConfig\n\nconst BarChartHorizontal = () => {\n return (\n \n \n Bar Chart- Horizontal\n January - June 2024\n \n \n \n \n x={(_, i) => i}\n y={(d) => d.desktop}\n color=\"var(--color-desktop)\"\n roundedCorners={5}\n orientation={Orientation.Horizontal}\n />\n \n type=\"y\"\n tickFormat={(_, i) => data[i].month}\n gridLine={false}\n tickLine={false}\n domainLine={false}\n numTicks={data.length}\n />\n {\n const container = document.createElement(\"div\")\n const Component = () => (\n \n )\n render(() => , container)\n return container.innerHTML\n },\n }}\n />\n \n \n \n
\n
\n
\n Trending up by 5.2% this month{\" \"}\n \n \n \n \n \n \n
\n
\n Showing total visitors for the last 6 months\n
\n
\n
\n
\n
\n )\n}\n\nexport default BarChartHorizontal\n" }], component: clientOnly(() => import("@/registry/tailwindcss/charts/bar-chart-horizontal"), { lazy: true }), source: "src/__registry__/tailwindcss/charts/bar-chart-horizontal.tsx", @@ -1781,7 +1781,7 @@ export const Index: Record = { path: "src/registry/tailwindcss/charts/bar-chart-multiply.tsx", type: "registry:block", target: "", - content: "import {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardFooter,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\ttype ChartConfig,\n\tChartContainer,\n\tChartTooltipContent,\n} from \"@/components/ui/chart\";\nimport { VisAxis, VisGroupedBar, VisTooltip } from \"@unovis/solid\";\nimport { GroupedBar } from \"@unovis/ts\";\nimport { render } from \"solid-js/web\";\n\ntype DataRecord = {\n\tmonth: string;\n\tdesktop: number;\n\tmobile: number;\n};\n\nconst data: DataRecord[] = [\n\t{ month: \"January\", desktop: 186, mobile: 80 },\n\t{ month: \"February\", desktop: 305, mobile: 200 },\n\t{ month: \"March\", desktop: 237, mobile: 120 },\n\t{ month: \"April\", desktop: 73, mobile: 190 },\n\t{ month: \"May\", desktop: 209, mobile: 130 },\n\t{ month: \"June\", desktop: 214, mobile: 140 },\n];\n\nconst chartConfig = {\n\tdesktop: {\n\t\tlabel: \"Desktop\",\n\t\tcolor: \"hsl(var(--chart-1))\",\n\t},\n\tmobile: {\n\t\tlabel: \"Mobile\",\n\t\tcolor: \"hsl(var(--chart-2))\",\n\t},\n} satisfies ChartConfig;\n\nconst BarChartMultiply = () => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\tBar Chart - Multiply\n\t\t\t\tJanuary - June 2024\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tx={(_, i) => i}\n\t\t\t\t\t\ty={[(d) => d.desktop, (d) => d.mobile]}\n\t\t\t\t\t\tcolor={[\"var(--color-desktop)\", \"var(--color-mobile)\"]}\n\t\t\t\t\t\troundedCorners={4}\n\t\t\t\t\t\tbarPadding={0.2}\n\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\t\ttype=\"x\"\n\t\t\t\t\t\ttickFormat={(d) => data[d as number].month.slice(0, 3)}\n\t\t\t\t\t\tgridLine={false}\n\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\tdomainLine={false}\n\t\t\t\t\t\tnumTicks={data.length}\n\t\t\t\t\t/>\n\t\t\t\t\t {\n\t\t\t\t\t\t\t\tconst container = document.createElement(\"div\");\n\t\t\t\t\t\t\t\tconst Component = () => (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\trender(() => , container);\n\t\t\t\t\t\t\t\treturn container.innerHTML;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\tTrending up by 5.2% this month{\" \"}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\tShowing total visitors for the last 6 months\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t);\n};\n\nexport default BarChartMultiply;\n" + content: "import { render } from \"solid-js/web\"\nimport { VisAxis, VisGroupedBar, VisTooltip } from \"@unovis/solid\"\nimport { GroupedBar } from \"@unovis/ts\"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport {\n ChartContainer,\n ChartTooltipContent,\n type ChartConfig,\n} from \"@/components/ui/chart\"\n\ntype DataRecord = {\n month: string\n desktop: number\n mobile: number\n}\n\nconst data: DataRecord[] = [\n { month: \"January\", desktop: 186, mobile: 80 },\n { month: \"February\", desktop: 305, mobile: 200 },\n { month: \"March\", desktop: 237, mobile: 120 },\n { month: \"April\", desktop: 73, mobile: 190 },\n { month: \"May\", desktop: 209, mobile: 130 },\n { month: \"June\", desktop: 214, mobile: 140 },\n]\n\nconst chartConfig = {\n desktop: {\n label: \"Desktop\",\n color: \"hsl(var(--chart-1))\",\n },\n mobile: {\n label: \"Mobile\",\n color: \"hsl(var(--chart-2))\",\n },\n} satisfies ChartConfig\n\nconst BarChartMultiply = () => {\n return (\n \n \n Bar Chart - Multiply\n January - June 2024\n \n \n \n \n x={(_, i) => i}\n y={[(d) => d.desktop, (d) => d.mobile]}\n color={[\"var(--color-desktop)\", \"var(--color-mobile)\"]}\n roundedCorners={4}\n barPadding={0.2}\n />\n \n type=\"x\"\n tickFormat={(d) => data[d as number].month.slice(0, 3)}\n gridLine={false}\n tickLine={false}\n domainLine={false}\n numTicks={data.length}\n />\n {\n const container = document.createElement(\"div\")\n const Component = () => (\n \n )\n render(() => , container)\n return container.innerHTML\n },\n }}\n />\n \n \n \n
\n
\n
\n Trending up by 5.2% this month{\" \"}\n \n \n \n \n \n \n
\n
\n Showing total visitors for the last 6 months\n
\n
\n
\n
\n
\n )\n}\n\nexport default BarChartMultiply\n" }], component: clientOnly(() => import("@/registry/tailwindcss/charts/bar-chart-multiply"), { lazy: true }), source: "src/__registry__/tailwindcss/charts/bar-chart-multiply.tsx", @@ -1797,7 +1797,7 @@ export const Index: Record = { path: "src/registry/tailwindcss/charts/bar-chart-stacked.tsx", type: "registry:block", target: "", - content: "import {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardFooter,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\ttype ChartConfig,\n\tChartContainer,\n\tChartTooltipContent,\n} from \"@/components/ui/chart\";\nimport {\n\tVisAxis,\n\tVisBulletLegend,\n\tVisStackedBar,\n\tVisTooltip,\n} from \"@unovis/solid\";\nimport { type BulletLegendItemInterface, StackedBar } from \"@unovis/ts\";\nimport { render } from \"solid-js/web\";\n\ntype DataRecord = {\n\tmonth: string;\n\tdesktop: number;\n\tmobile: number;\n};\n\nconst data: DataRecord[] = [\n\t{ month: \"January\", desktop: 186, mobile: 80 },\n\t{ month: \"February\", desktop: 305, mobile: 200 },\n\t{ month: \"March\", desktop: 237, mobile: 120 },\n\t{ month: \"April\", desktop: 73, mobile: 190 },\n\t{ month: \"May\", desktop: 209, mobile: 130 },\n\t{ month: \"June\", desktop: 214, mobile: 140 },\n];\n\nconst chartConfig = {\n\tdesktop: {\n\t\tlabel: \"Desktop\",\n\t\tcolor: \"hsl(var(--chart-1))\",\n\t},\n\tmobile: {\n\t\tlabel: \"Mobile\",\n\t\tcolor: \"hsl(var(--chart-2))\",\n\t},\n} satisfies ChartConfig;\n\nconst BarChartStacked = () => {\n\tconst items = (): BulletLegendItemInterface[] => {\n\t\treturn Object.entries(chartConfig).map(([_, config]) => ({\n\t\t\tname: config.label,\n\t\t\tcolor: config.color,\n\t\t}));\n\t};\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\tBar Chart - Stacked\n\t\t\t\tJanuary - June 2024\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tx={(_, i) => i}\n\t\t\t\t\t\ty={[(d) => d.desktop, (d) => d.mobile]}\n\t\t\t\t\t\tcolor={[\"var(--color-desktop)\", \"var(--color-mobile)\"]}\n\t\t\t\t\t\troundedCorners={4}\n\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\t\ttype=\"x\"\n\t\t\t\t\t\ttickFormat={(d) => data[d as number].month.slice(0, 3)}\n\t\t\t\t\t\tgridLine={false}\n\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\tdomainLine={false}\n\t\t\t\t\t\tnumTicks={data.length}\n\t\t\t\t\t/>\n\t\t\t\t\t {\n\t\t\t\t\t\t\t\tconst container = document.createElement(\"div\");\n\t\t\t\t\t\t\t\tconst Component = () => (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\trender(() => , container);\n\t\t\t\t\t\t\t\treturn container.innerHTML;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\tTrending up by 5.2% this month{\" \"}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\tShowing total visitors for the last 6 months\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t);\n};\n\nexport default BarChartStacked;\n" + content: "import { render } from \"solid-js/web\"\nimport {\n VisAxis,\n VisBulletLegend,\n VisStackedBar,\n VisTooltip,\n} from \"@unovis/solid\"\nimport { StackedBar, type BulletLegendItemInterface } from \"@unovis/ts\"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport {\n ChartContainer,\n ChartTooltipContent,\n type ChartConfig,\n} from \"@/components/ui/chart\"\n\ntype DataRecord = {\n month: string\n desktop: number\n mobile: number\n}\n\nconst data: DataRecord[] = [\n { month: \"January\", desktop: 186, mobile: 80 },\n { month: \"February\", desktop: 305, mobile: 200 },\n { month: \"March\", desktop: 237, mobile: 120 },\n { month: \"April\", desktop: 73, mobile: 190 },\n { month: \"May\", desktop: 209, mobile: 130 },\n { month: \"June\", desktop: 214, mobile: 140 },\n]\n\nconst chartConfig = {\n desktop: {\n label: \"Desktop\",\n color: \"hsl(var(--chart-1))\",\n },\n mobile: {\n label: \"Mobile\",\n color: \"hsl(var(--chart-2))\",\n },\n} satisfies ChartConfig\n\nconst BarChartStacked = () => {\n const items = (): BulletLegendItemInterface[] => {\n return Object.entries(chartConfig).map(([_, config]) => ({\n name: config.label,\n color: config.color,\n }))\n }\n\n return (\n \n \n Bar Chart - Stacked\n January - June 2024\n \n \n \n \n x={(_, i) => i}\n y={[(d) => d.desktop, (d) => d.mobile]}\n color={[\"var(--color-desktop)\", \"var(--color-mobile)\"]}\n roundedCorners={4}\n />\n \n type=\"x\"\n tickFormat={(d) => data[d as number].month.slice(0, 3)}\n gridLine={false}\n tickLine={false}\n domainLine={false}\n numTicks={data.length}\n />\n {\n const container = document.createElement(\"div\")\n const Component = () => (\n \n )\n render(() => , container)\n return container.innerHTML\n },\n }}\n />\n \n
\n \n
\n
\n \n
\n
\n
\n Trending up by 5.2% this month{\" \"}\n \n \n \n \n \n \n
\n
\n Showing total visitors for the last 6 months\n
\n
\n
\n
\n
\n )\n}\n\nexport default BarChartStacked\n" }], component: clientOnly(() => import("@/registry/tailwindcss/charts/bar-chart-stacked"), { lazy: true }), source: "src/__registry__/tailwindcss/charts/bar-chart-stacked.tsx", @@ -1813,7 +1813,7 @@ export const Index: Record = { path: "src/registry/tailwindcss/charts/bar-chart-mixed.tsx", type: "registry:block", target: "", - content: "import {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardFooter,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\ttype ChartConfig,\n\tChartContainer,\n\tChartTooltipContent,\n} from \"@/components/ui/chart\";\nimport { VisAxis, VisStackedBar, VisTooltip } from \"@unovis/solid\";\nimport { Direction, Orientation, StackedBar } from \"@unovis/ts\";\nimport { render } from \"solid-js/web\";\n\ntype DataRecord = {\n\tbrowser: string;\n\tvisitors: number;\n\tfill: string;\n};\n\nconst data: DataRecord[] = [\n\t{ browser: \"chrome\", visitors: 275, fill: \"var(--color-chrome)\" },\n\t{ browser: \"safari\", visitors: 200, fill: \"var(--color-safari)\" },\n\t{ browser: \"firefox\", visitors: 187, fill: \"var(--color-firefox)\" },\n\t{ browser: \"edge\", visitors: 173, fill: \"var(--color-edge)\" },\n\t{ browser: \"other\", visitors: 90, fill: \"var(--color-other)\" },\n];\n\nconst chartConfig = {\n\tvisitors: {\n\t\tlabel: \"Visitors\",\n\t},\n\tchrome: {\n\t\tlabel: \"Chrome\",\n\t\tcolor: \"hsl(var(--chart-1))\",\n\t},\n\tsafari: {\n\t\tlabel: \"Safari\",\n\t\tcolor: \"hsl(var(--chart-2))\",\n\t},\n\tfirefox: {\n\t\tlabel: \"Firefox\",\n\t\tcolor: \"hsl(var(--chart-3))\",\n\t},\n\tedge: {\n\t\tlabel: \"Edge\",\n\t\tcolor: \"hsl(var(--chart-4))\",\n\t},\n\tother: {\n\t\tlabel: \"Other\",\n\t\tcolor: \"hsl(var(--chart-5))\",\n\t},\n} satisfies ChartConfig;\n\nconst BarChartMixed = () => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\tBar Chart- Mixed\n\t\t\t\tJanuary - June 2024\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tx={(_, i) => i}\n\t\t\t\t\t\ty={(d) => d.visitors}\n\t\t\t\t\t\tcolor={(d) => d.fill}\n\t\t\t\t\t\troundedCorners={5}\n\t\t\t\t\t\torientation={Orientation.Horizontal}\n\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\t\ttype=\"y\"\n\t\t\t\t\t\ttickFormat={(_, i) =>\n\t\t\t\t\t\t\tchartConfig[data[i].browser as keyof typeof chartConfig].label\n\t\t\t\t\t\t}\n\t\t\t\t\t\tgridLine={false}\n\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\tdomainLine={false}\n\t\t\t\t\t\tnumTicks={data.length}\n\t\t\t\t\t/>\n\t\t\t\t\t {\n\t\t\t\t\t\t\t\tconst container = document.createElement(\"div\");\n\t\t\t\t\t\t\t\tconst Component = () => (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\trender(() => , container);\n\t\t\t\t\t\t\t\treturn container.innerHTML;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\tTrending up by 5.2% this month{\" \"}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\tShowing total visitors for the last 6 months\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t);\n};\n\nexport default BarChartMixed;\n" + content: "import { render } from \"solid-js/web\"\nimport { VisAxis, VisStackedBar, VisTooltip } from \"@unovis/solid\"\nimport { Direction, Orientation, StackedBar } from \"@unovis/ts\"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport {\n ChartContainer,\n ChartTooltipContent,\n type ChartConfig,\n} from \"@/components/ui/chart\"\n\ntype DataRecord = {\n browser: string\n visitors: number\n fill: string\n}\n\nconst data: DataRecord[] = [\n { browser: \"chrome\", visitors: 275, fill: \"var(--color-chrome)\" },\n { browser: \"safari\", visitors: 200, fill: \"var(--color-safari)\" },\n { browser: \"firefox\", visitors: 187, fill: \"var(--color-firefox)\" },\n { browser: \"edge\", visitors: 173, fill: \"var(--color-edge)\" },\n { browser: \"other\", visitors: 90, fill: \"var(--color-other)\" },\n]\n\nconst chartConfig = {\n visitors: {\n label: \"Visitors\",\n },\n chrome: {\n label: \"Chrome\",\n color: \"hsl(var(--chart-1))\",\n },\n safari: {\n label: \"Safari\",\n color: \"hsl(var(--chart-2))\",\n },\n firefox: {\n label: \"Firefox\",\n color: \"hsl(var(--chart-3))\",\n },\n edge: {\n label: \"Edge\",\n color: \"hsl(var(--chart-4))\",\n },\n other: {\n label: \"Other\",\n color: \"hsl(var(--chart-5))\",\n },\n} satisfies ChartConfig\n\nconst BarChartMixed = () => {\n return (\n \n \n Bar Chart- Mixed\n January - June 2024\n \n \n \n \n x={(_, i) => i}\n y={(d) => d.visitors}\n color={(d) => d.fill}\n roundedCorners={5}\n orientation={Orientation.Horizontal}\n />\n \n type=\"y\"\n tickFormat={(_, i) =>\n chartConfig[data[i].browser as keyof typeof chartConfig].label\n }\n gridLine={false}\n tickLine={false}\n domainLine={false}\n numTicks={data.length}\n />\n {\n const container = document.createElement(\"div\")\n const Component = () => (\n \n )\n render(() => , container)\n return container.innerHTML\n },\n }}\n />\n \n \n \n
\n
\n
\n Trending up by 5.2% this month{\" \"}\n \n \n \n \n \n \n
\n
\n Showing total visitors for the last 6 months\n
\n
\n
\n
\n
\n )\n}\n\nexport default BarChartMixed\n" }], component: clientOnly(() => import("@/registry/tailwindcss/charts/bar-chart-mixed"), { lazy: true }), source: "src/__registry__/tailwindcss/charts/bar-chart-mixed.tsx", @@ -1829,7 +1829,7 @@ export const Index: Record = { path: "src/registry/tailwindcss/charts/bar-chart-active.tsx", type: "registry:block", target: "", - content: "import {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardFooter,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\ttype ChartConfig,\n\tChartContainer,\n\tChartTooltipContent,\n} from \"@/components/ui/chart\";\nimport { VisAxis, VisStackedBar, VisTooltip } from \"@unovis/solid\";\nimport { StackedBar } from \"@unovis/ts\";\nimport { render } from \"solid-js/web\";\n\ntype DataRecord = {\n\tbrowser: string;\n\tvisitors: number;\n\tfill: string;\n};\n\nconst data: DataRecord[] = [\n\t{ browser: \"chrome\", visitors: 187, fill: \"var(--color-chrome)\" },\n\t{ browser: \"safari\", visitors: 200, fill: \"var(--color-safari)\" },\n\t{ browser: \"firefox\", visitors: 275, fill: \"var(--color-firefox)\" },\n\t{ browser: \"edge\", visitors: 173, fill: \"var(--color-edge)\" },\n\t{ browser: \"other\", visitors: 90, fill: \"var(--color-other)\" },\n];\n\nconst chartConfig = {\n\tvisitors: {\n\t\tlabel: \"Visitors\",\n\t},\n\tchrome: {\n\t\tlabel: \"Chrome\",\n\t\tcolor: \"hsl(var(--chart-1))\",\n\t},\n\tsafari: {\n\t\tlabel: \"Safari\",\n\t\tcolor: \"hsl(var(--chart-2))\",\n\t},\n\tfirefox: {\n\t\tlabel: \"Firefox\",\n\t\tcolor: \"hsl(var(--chart-3))\",\n\t},\n\tedge: {\n\t\tlabel: \"Edge\",\n\t\tcolor: \"hsl(var(--chart-4))\",\n\t},\n\tother: {\n\t\tlabel: \"Other\",\n\t\tcolor: \"hsl(var(--chart-5))\",\n\t},\n} satisfies ChartConfig;\n\nconst BarChartActive = () => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\tBar Chart- Active\n\t\t\t\tJanuary - June 2024\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t d.browser === \"firefox\")?.fill};\n\t\t\t\t\t--vis-stacked-bar-stroke-width: 2;\n\t\t\t\t\t--vis-stacked-bar-hover-stroke-color: var(--vis-stacked-bar-stroke-color);\n\t\t\t\t\t--vis-stacked-bar-hover-stroke-width: var(--vis-stacked-bar-stroke-width);\n\t\t\t\t\t}`}\n\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\t\tid={(d) => `stacked-bar-${d.browser}`}\n\t\t\t\t\t\tx={(_, i) => i}\n\t\t\t\t\t\ty={(d) => d.visitors}\n\t\t\t\t\t\tcolor={(d) => d.fill}\n\t\t\t\t\t\troundedCorners={8}\n\t\t\t\t\t\tattributes={{\n\t\t\t\t\t\t\t[StackedBar.selectors.bar]: {\n\t\t\t\t\t\t\t\t\"stroke-width\": 2,\n\t\t\t\t\t\t\t\t\"stroke-dasharray\": 4,\n\t\t\t\t\t\t\t\t\"stroke-dashoffset\": 4,\n\t\t\t\t\t\t\t\t\"fill-opacity\": 0.8,\n\t\t\t\t\t\t\t\t\"data-stacked-bar-active\": (d) => d.browser === \"firefox\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\t\ttype=\"x\"\n\t\t\t\t\t\ttickFormat={(_, i) =>\n\t\t\t\t\t\t\tchartConfig[data[i].browser as keyof typeof chartConfig].label\n\t\t\t\t\t\t}\n\t\t\t\t\t\tgridLine={false}\n\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\tdomainLine={false}\n\t\t\t\t\t\tnumTicks={data.length}\n\t\t\t\t\t/>\n\t\t\t\t\t {\n\t\t\t\t\t\t\t\tconst container = document.createElement(\"div\");\n\t\t\t\t\t\t\t\tconst Component = () => (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\trender(() => , container);\n\t\t\t\t\t\t\t\treturn container.innerHTML;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\tTrending up by 5.2% this month{\" \"}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\tShowing total visitors for the last 6 months\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t);\n};\n\nexport default BarChartActive;\n" + content: "import { render } from \"solid-js/web\"\nimport { VisAxis, VisStackedBar, VisTooltip } from \"@unovis/solid\"\nimport { StackedBar } from \"@unovis/ts\"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport {\n ChartContainer,\n ChartTooltipContent,\n type ChartConfig,\n} from \"@/components/ui/chart\"\n\ntype DataRecord = {\n browser: string\n visitors: number\n fill: string\n}\n\nconst data: DataRecord[] = [\n { browser: \"chrome\", visitors: 187, fill: \"var(--color-chrome)\" },\n { browser: \"safari\", visitors: 200, fill: \"var(--color-safari)\" },\n { browser: \"firefox\", visitors: 275, fill: \"var(--color-firefox)\" },\n { browser: \"edge\", visitors: 173, fill: \"var(--color-edge)\" },\n { browser: \"other\", visitors: 90, fill: \"var(--color-other)\" },\n]\n\nconst chartConfig = {\n visitors: {\n label: \"Visitors\",\n },\n chrome: {\n label: \"Chrome\",\n color: \"hsl(var(--chart-1))\",\n },\n safari: {\n label: \"Safari\",\n color: \"hsl(var(--chart-2))\",\n },\n firefox: {\n label: \"Firefox\",\n color: \"hsl(var(--chart-3))\",\n },\n edge: {\n label: \"Edge\",\n color: \"hsl(var(--chart-4))\",\n },\n other: {\n label: \"Other\",\n color: \"hsl(var(--chart-5))\",\n },\n} satisfies ChartConfig\n\nconst BarChartActive = () => {\n return (\n \n \n Bar Chart- Active\n January - June 2024\n \n \n \n d.browser === \"firefox\")?.fill};\n\t\t\t\t\t--vis-stacked-bar-stroke-width: 2;\n\t\t\t\t\t--vis-stacked-bar-hover-stroke-color: var(--vis-stacked-bar-stroke-color);\n\t\t\t\t\t--vis-stacked-bar-hover-stroke-width: var(--vis-stacked-bar-stroke-width);\n\t\t\t\t\t}`}\n />\n \n id={(d) => `stacked-bar-${d.browser}`}\n x={(_, i) => i}\n y={(d) => d.visitors}\n color={(d) => d.fill}\n roundedCorners={8}\n attributes={{\n [StackedBar.selectors.bar]: {\n \"stroke-width\": 2,\n \"stroke-dasharray\": 4,\n \"stroke-dashoffset\": 4,\n \"fill-opacity\": 0.8,\n \"data-stacked-bar-active\": (d) => d.browser === \"firefox\",\n },\n }}\n />\n \n type=\"x\"\n tickFormat={(_, i) =>\n chartConfig[data[i].browser as keyof typeof chartConfig].label\n }\n gridLine={false}\n tickLine={false}\n domainLine={false}\n numTicks={data.length}\n />\n {\n const container = document.createElement(\"div\")\n const Component = () => (\n \n )\n render(() => , container)\n return container.innerHTML\n },\n }}\n />\n \n \n \n
\n
\n
\n Trending up by 5.2% this month{\" \"}\n \n \n \n \n \n \n
\n
\n Showing total visitors for the last 6 months\n
\n
\n
\n
\n
\n )\n}\n\nexport default BarChartActive\n" }], component: clientOnly(() => import("@/registry/tailwindcss/charts/bar-chart-active"), { lazy: true }), source: "src/__registry__/tailwindcss/charts/bar-chart-active.tsx", diff --git a/docs/src/__registry__/tailwindcss/blocks/demo-sidebar.tsx b/docs/src/__registry__/tailwindcss/blocks/demo-sidebar.tsx index 16bc9d03..aae50268 100644 --- a/docs/src/__registry__/tailwindcss/blocks/demo-sidebar.tsx +++ b/docs/src/__registry__/tailwindcss/blocks/demo-sidebar.tsx @@ -1,163 +1,164 @@ -import { For } from "solid-js"; +import { For } from "solid-js" + import { - Sidebar, - SidebarContent, - SidebarGroup, - SidebarGroupContent, - SidebarGroupLabel, - SidebarInset, - SidebarMenu, - SidebarMenuButton, - SidebarMenuItem, - SidebarProvider, - SidebarTrigger, -} from "../ui/sidebar"; + Sidebar, + SidebarContent, + SidebarGroup, + SidebarGroupContent, + SidebarGroupLabel, + SidebarInset, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + SidebarProvider, + SidebarTrigger, +} from "../ui/sidebar" const items = [ - { - title: "Home", - url: "#", - icon: () => ( - - - - - - - ), - }, - { - title: "Inbox", - url: "#", - icon: () => ( - - - - - - - ), - }, - { - title: "Calendar", - url: "#", - icon: () => ( - - - - - - - - ), - }, - { - title: "Search", - url: "#", - icon: () => ( - - - - - - - ), - }, - { - title: "Settings", - url: "#", - icon: () => ( - - - - - - - ), - }, -]; + { + title: "Home", + url: "#", + icon: () => ( + + + + + + + ), + }, + { + title: "Inbox", + url: "#", + icon: () => ( + + + + + + + ), + }, + { + title: "Calendar", + url: "#", + icon: () => ( + + + + + + + + ), + }, + { + title: "Search", + url: "#", + icon: () => ( + + + + + + + ), + }, + { + title: "Settings", + url: "#", + icon: () => ( + + + + + + + ), + }, +] const AppSidebar = () => { - return ( - - - - - Application - - - - {(item) => ( - - - - {item.title} - - - )} - - - - - - - -
- -
-
-
- ); -}; + return ( + + + + + Application + + + + {(item) => ( + + + + {item.title} + + + )} + + + + + + + +
+ +
+
+
+ ) +} -export default AppSidebar; +export default AppSidebar diff --git a/docs/src/__registry__/tailwindcss/blocks/sidebar-01/index.tsx b/docs/src/__registry__/tailwindcss/blocks/sidebar-01/index.tsx index 7f4b876a..1be712e2 100644 --- a/docs/src/__registry__/tailwindcss/blocks/sidebar-01/index.tsx +++ b/docs/src/__registry__/tailwindcss/blocks/sidebar-01/index.tsx @@ -1,33 +1,33 @@ -import AppSidebar from "@/registry/tailwindcss/blocks/sidebar-01/components/app-sidebar"; -import { Separator } from "@/registry/tailwindcss/ui/separator"; +import AppSidebar from "@/registry/tailwindcss/blocks/sidebar-01/components/app-sidebar" +import { Separator } from "@/registry/tailwindcss/ui/separator" import { - SidebarInset, - SidebarProvider, - SidebarTrigger, -} from "@/registry/tailwindcss/ui/sidebar"; + SidebarInset, + SidebarProvider, + SidebarTrigger, +} from "@/registry/tailwindcss/ui/sidebar" const Page = () => { - return ( - - - -
-
- - -
-
-
-
-
-
-
-
-
-
- - - ); -}; + return ( + + + +
+
+ + +
+
+
+
+
+
+
+
+
+
+ + + ) +} -export default Page; +export default Page diff --git a/docs/src/__registry__/tailwindcss/blocks/sidebar-02/index.tsx b/docs/src/__registry__/tailwindcss/blocks/sidebar-02/index.tsx index df20878d..48a46ced 100644 --- a/docs/src/__registry__/tailwindcss/blocks/sidebar-02/index.tsx +++ b/docs/src/__registry__/tailwindcss/blocks/sidebar-02/index.tsx @@ -1,33 +1,33 @@ -import AppSidebar from "@/registry/tailwindcss/blocks/sidebar-02/components/app-sidebar"; +import AppSidebar from "@/registry/tailwindcss/blocks/sidebar-02/components/app-sidebar" import { - SidebarInset, - SidebarProvider, - SidebarTrigger, -} from "@/registry/tailwindcss/ui/sidebar"; + SidebarInset, + SidebarProvider, + SidebarTrigger, +} from "@/registry/tailwindcss/ui/sidebar" const Page = () => { - return ( - - - -
- -
-
-
-
-
-
-
-
-
- - - ); -}; + return ( + + + +
+ +
+
+
+
+
+
+
+
+
+ + + ) +} -export default Page; +export default Page diff --git a/docs/src/__registry__/tailwindcss/blocks/sidebar-03/index.tsx b/docs/src/__registry__/tailwindcss/blocks/sidebar-03/index.tsx index aa79c6c4..19d748cd 100644 --- a/docs/src/__registry__/tailwindcss/blocks/sidebar-03/index.tsx +++ b/docs/src/__registry__/tailwindcss/blocks/sidebar-03/index.tsx @@ -1,33 +1,33 @@ -import AppSidebar from "@/registry/tailwindcss/blocks/sidebar-03/components/app-sidebar"; +import AppSidebar from "@/registry/tailwindcss/blocks/sidebar-03/components/app-sidebar" import { - SidebarInset, - SidebarProvider, - SidebarSeparator, - SidebarTrigger, -} from "@/registry/tailwindcss/ui/sidebar"; + SidebarInset, + SidebarProvider, + SidebarSeparator, + SidebarTrigger, +} from "@/registry/tailwindcss/ui/sidebar" const Page = () => { - return ( - - - -
-
- - -
-
-
-
-
-
-
-
-
-
- - - ); -}; + return ( + + + +
+
+ + +
+
+
+
+
+
+
+
+
+
+ + + ) +} -export default Page; +export default Page diff --git a/docs/src/__registry__/tailwindcss/charts/area-chart-gradient.tsx b/docs/src/__registry__/tailwindcss/charts/area-chart-gradient.tsx index 6e8b889d..7e0f6ad5 100644 --- a/docs/src/__registry__/tailwindcss/charts/area-chart-gradient.tsx +++ b/docs/src/__registry__/tailwindcss/charts/area-chart-gradient.tsx @@ -1,159 +1,160 @@ +import { VisArea, VisAxis, VisLine, VisTooltip } from "@unovis/solid" +import { Area, CurveType, Position } from "@unovis/ts" + import { - Card, - CardContent, - CardDescription, - CardFooter, - CardHeader, - CardTitle, -} from "@/registry/tailwindcss/ui/card"; + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/registry/tailwindcss/ui/card" import { - type ChartConfig, - ChartContainer, - ChartCrosshair, - ChartTooltipContent, -} from "@/registry/tailwindcss/ui/chart"; -import { VisArea, VisAxis, VisLine, VisTooltip } from "@unovis/solid"; -import { Area, CurveType, Position } from "@unovis/ts"; + ChartContainer, + ChartCrosshair, + ChartTooltipContent, + type ChartConfig, +} from "@/registry/tailwindcss/ui/chart" type DataRecord = { - month: string; - desktop: number; - mobile: number; -}; + month: string + desktop: number + mobile: number +} const data: DataRecord[] = [ - { month: "January", desktop: 186, mobile: 80 }, - { month: "February", desktop: 305, mobile: 200 }, - { month: "March", desktop: 237, mobile: 120 }, - { month: "April", desktop: 73, mobile: 190 }, - { month: "May", desktop: 209, mobile: 130 }, - { month: "June", desktop: 214, mobile: 140 }, -]; + { month: "January", desktop: 186, mobile: 80 }, + { month: "February", desktop: 305, mobile: 200 }, + { month: "March", desktop: 237, mobile: 120 }, + { month: "April", desktop: 73, mobile: 190 }, + { month: "May", desktop: 209, mobile: 130 }, + { month: "June", desktop: 214, mobile: 140 }, +] const chartConfig = { - desktop: { - label: "Desktop", - color: "hsl(var(--chart-1))", - }, - mobile: { - label: "Mobile", - color: "hsl(var(--chart-2))", - }, -} satisfies ChartConfig; + desktop: { + label: "Desktop", + color: "hsl(var(--chart-1))", + }, + mobile: { + label: "Mobile", + color: "hsl(var(--chart-2))", + }, +} satisfies ChartConfig const AreaChartGradient = () => { - return ( - - - Area Chart - Gradient - - Showing total visitors for the last 6 months - - - - - - - - - - - - - - - - - - x={(_, i) => i} - y={[(d) => d.mobile, (d) => d.desktop]} - color="auto" - opacity={0.4} - curveType={CurveType.Natural} - attributes={{ - [`${Area.selectors.area}:nth-child(1)`]: { - fill: "url(#fillDesktop)", - }, - [`${Area.selectors.area}:nth-child(2)`]: { - fill: "url(#fillMobile)", - }, - }} - /> - - x={(_, i) => i} - y={[(d) => d.mobile, (d) => d.mobile + d.desktop]} - color={["var(--color-mobile)", "var(--color-desktop)"]} - curveType={CurveType.Natural} - lineWidth={1} - /> - - type="x" - tickFormat={(d) => data[d as number].month.slice(0, 3)} - gridLine={false} - tickLine={false} - domainLine={false} - numTicks={data.length} - /> - - color={["var(--color-mobile)", "var(--color-desktop)"]} - template={(props) => ( - - )} - /> - - - - -
-
-
- Trending up by 5.2% this month{" "} - - - - - - -
-
- January - June 2024 -
-
-
-
-
- ); -}; + return ( + + + Area Chart - Gradient + + Showing total visitors for the last 6 months + + + + + + + + + + + + + + + + + + x={(_, i) => i} + y={[(d) => d.mobile, (d) => d.desktop]} + color="auto" + opacity={0.4} + curveType={CurveType.Natural} + attributes={{ + [`${Area.selectors.area}:nth-child(1)`]: { + fill: "url(#fillDesktop)", + }, + [`${Area.selectors.area}:nth-child(2)`]: { + fill: "url(#fillMobile)", + }, + }} + /> + + x={(_, i) => i} + y={[(d) => d.mobile, (d) => d.mobile + d.desktop]} + color={["var(--color-mobile)", "var(--color-desktop)"]} + curveType={CurveType.Natural} + lineWidth={1} + /> + + type="x" + tickFormat={(d) => data[d as number].month.slice(0, 3)} + gridLine={false} + tickLine={false} + domainLine={false} + numTicks={data.length} + /> + + color={["var(--color-mobile)", "var(--color-desktop)"]} + template={(props) => ( + + )} + /> + + + + +
+
+
+ Trending up by 5.2% this month{" "} + + + + + + +
+
+ January - June 2024 +
+
+
+
+
+ ) +} -export default AreaChartGradient; +export default AreaChartGradient diff --git a/docs/src/__registry__/tailwindcss/charts/area-chart-interactive.tsx b/docs/src/__registry__/tailwindcss/charts/area-chart-interactive.tsx index a7624f56..ac2599ad 100644 --- a/docs/src/__registry__/tailwindcss/charts/area-chart-interactive.tsx +++ b/docs/src/__registry__/tailwindcss/charts/area-chart-interactive.tsx @@ -1,359 +1,360 @@ -import { useIsMobile } from "@/registry/tailwindcss/hooks/use-mobile"; +import { batch, createSignal } from "solid-js" import { - Card, - CardContent, - CardDescription, - CardHeader, - CardTitle, -} from "@/registry/tailwindcss/ui/card"; + VisArea, + VisAxis, + VisBrush, + VisBulletLegend, + VisLine, + VisTooltip, +} from "@unovis/solid" import { - type ChartConfig, - ChartContainer, - ChartCrosshair, - ChartTooltipContent, -} from "@/registry/tailwindcss/ui/chart"; + Area, + CurveType, + Position, + type BulletLegendItemInterface, +} from "@unovis/ts" + +import { useIsMobile } from "@/registry/tailwindcss/hooks/use-mobile" import { - VisArea, - VisAxis, - VisBrush, - VisBulletLegend, - VisLine, - VisTooltip, -} from "@unovis/solid"; + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from "@/registry/tailwindcss/ui/card" import { - Area, - type BulletLegendItemInterface, - CurveType, - Position, -} from "@unovis/ts"; -import { batch, createSignal } from "solid-js"; + ChartContainer, + ChartCrosshair, + ChartTooltipContent, + type ChartConfig, +} from "@/registry/tailwindcss/ui/chart" type DataRecord = { - date: string; - desktop: number; - mobile: number; -}; + date: string + desktop: number + mobile: number +} const data: DataRecord[] = [ - { date: "2024-04-01", desktop: 222, mobile: 150 }, - { date: "2024-04-02", desktop: 97, mobile: 180 }, - { date: "2024-04-03", desktop: 167, mobile: 120 }, - { date: "2024-04-04", desktop: 242, mobile: 260 }, - { date: "2024-04-05", desktop: 373, mobile: 290 }, - { date: "2024-04-06", desktop: 301, mobile: 340 }, - { date: "2024-04-07", desktop: 245, mobile: 180 }, - { date: "2024-04-08", desktop: 409, mobile: 320 }, - { date: "2024-04-09", desktop: 59, mobile: 110 }, - { date: "2024-04-10", desktop: 261, mobile: 190 }, - { date: "2024-04-11", desktop: 327, mobile: 350 }, - { date: "2024-04-12", desktop: 292, mobile: 210 }, - { date: "2024-04-13", desktop: 342, mobile: 380 }, - { date: "2024-04-14", desktop: 137, mobile: 220 }, - { date: "2024-04-15", desktop: 120, mobile: 170 }, - { date: "2024-04-16", desktop: 138, mobile: 190 }, - { date: "2024-04-17", desktop: 446, mobile: 360 }, - { date: "2024-04-18", desktop: 364, mobile: 410 }, - { date: "2024-04-19", desktop: 243, mobile: 180 }, - { date: "2024-04-20", desktop: 89, mobile: 150 }, - { date: "2024-04-21", desktop: 137, mobile: 200 }, - { date: "2024-04-22", desktop: 224, mobile: 170 }, - { date: "2024-04-23", desktop: 138, mobile: 230 }, - { date: "2024-04-24", desktop: 387, mobile: 290 }, - { date: "2024-04-25", desktop: 215, mobile: 250 }, - { date: "2024-04-26", desktop: 75, mobile: 130 }, - { date: "2024-04-27", desktop: 383, mobile: 420 }, - { date: "2024-04-28", desktop: 122, mobile: 180 }, - { date: "2024-04-29", desktop: 315, mobile: 240 }, - { date: "2024-04-30", desktop: 454, mobile: 380 }, - { date: "2024-05-01", desktop: 165, mobile: 220 }, - { date: "2024-05-02", desktop: 293, mobile: 310 }, - { date: "2024-05-03", desktop: 247, mobile: 190 }, - { date: "2024-05-04", desktop: 385, mobile: 420 }, - { date: "2024-05-05", desktop: 481, mobile: 390 }, - { date: "2024-05-06", desktop: 498, mobile: 520 }, - { date: "2024-05-07", desktop: 388, mobile: 300 }, - { date: "2024-05-08", desktop: 149, mobile: 210 }, - { date: "2024-05-09", desktop: 227, mobile: 180 }, - { date: "2024-05-10", desktop: 293, mobile: 330 }, - { date: "2024-05-11", desktop: 335, mobile: 270 }, - { date: "2024-05-12", desktop: 197, mobile: 240 }, - { date: "2024-05-13", desktop: 197, mobile: 160 }, - { date: "2024-05-14", desktop: 448, mobile: 490 }, - { date: "2024-05-15", desktop: 473, mobile: 380 }, - { date: "2024-05-16", desktop: 338, mobile: 400 }, - { date: "2024-05-17", desktop: 499, mobile: 420 }, - { date: "2024-05-18", desktop: 315, mobile: 350 }, - { date: "2024-05-19", desktop: 235, mobile: 180 }, - { date: "2024-05-20", desktop: 177, mobile: 230 }, - { date: "2024-05-21", desktop: 82, mobile: 140 }, - { date: "2024-05-22", desktop: 81, mobile: 120 }, - { date: "2024-05-23", desktop: 252, mobile: 290 }, - { date: "2024-05-24", desktop: 294, mobile: 220 }, - { date: "2024-05-25", desktop: 201, mobile: 250 }, - { date: "2024-05-26", desktop: 213, mobile: 170 }, - { date: "2024-05-27", desktop: 420, mobile: 460 }, - { date: "2024-05-28", desktop: 233, mobile: 190 }, - { date: "2024-05-29", desktop: 78, mobile: 130 }, - { date: "2024-05-30", desktop: 340, mobile: 280 }, - { date: "2024-05-31", desktop: 178, mobile: 230 }, - { date: "2024-06-01", desktop: 178, mobile: 200 }, - { date: "2024-06-02", desktop: 470, mobile: 410 }, - { date: "2024-06-03", desktop: 103, mobile: 160 }, - { date: "2024-06-04", desktop: 439, mobile: 380 }, - { date: "2024-06-05", desktop: 88, mobile: 140 }, - { date: "2024-06-06", desktop: 294, mobile: 250 }, - { date: "2024-06-07", desktop: 323, mobile: 370 }, - { date: "2024-06-08", desktop: 385, mobile: 320 }, - { date: "2024-06-09", desktop: 438, mobile: 480 }, - { date: "2024-06-10", desktop: 155, mobile: 200 }, - { date: "2024-06-11", desktop: 92, mobile: 150 }, - { date: "2024-06-12", desktop: 492, mobile: 420 }, - { date: "2024-06-13", desktop: 81, mobile: 130 }, - { date: "2024-06-14", desktop: 426, mobile: 380 }, - { date: "2024-06-15", desktop: 307, mobile: 350 }, - { date: "2024-06-16", desktop: 371, mobile: 310 }, - { date: "2024-06-17", desktop: 475, mobile: 520 }, - { date: "2024-06-18", desktop: 107, mobile: 170 }, - { date: "2024-06-19", desktop: 341, mobile: 290 }, - { date: "2024-06-20", desktop: 408, mobile: 450 }, - { date: "2024-06-21", desktop: 169, mobile: 210 }, - { date: "2024-06-22", desktop: 317, mobile: 270 }, - { date: "2024-06-23", desktop: 480, mobile: 530 }, - { date: "2024-06-24", desktop: 132, mobile: 180 }, - { date: "2024-06-25", desktop: 141, mobile: 190 }, - { date: "2024-06-26", desktop: 434, mobile: 380 }, - { date: "2024-06-27", desktop: 448, mobile: 490 }, - { date: "2024-06-28", desktop: 149, mobile: 200 }, - { date: "2024-06-29", desktop: 103, mobile: 160 }, - { date: "2024-06-30", desktop: 446, mobile: 400 }, -]; + { date: "2024-04-01", desktop: 222, mobile: 150 }, + { date: "2024-04-02", desktop: 97, mobile: 180 }, + { date: "2024-04-03", desktop: 167, mobile: 120 }, + { date: "2024-04-04", desktop: 242, mobile: 260 }, + { date: "2024-04-05", desktop: 373, mobile: 290 }, + { date: "2024-04-06", desktop: 301, mobile: 340 }, + { date: "2024-04-07", desktop: 245, mobile: 180 }, + { date: "2024-04-08", desktop: 409, mobile: 320 }, + { date: "2024-04-09", desktop: 59, mobile: 110 }, + { date: "2024-04-10", desktop: 261, mobile: 190 }, + { date: "2024-04-11", desktop: 327, mobile: 350 }, + { date: "2024-04-12", desktop: 292, mobile: 210 }, + { date: "2024-04-13", desktop: 342, mobile: 380 }, + { date: "2024-04-14", desktop: 137, mobile: 220 }, + { date: "2024-04-15", desktop: 120, mobile: 170 }, + { date: "2024-04-16", desktop: 138, mobile: 190 }, + { date: "2024-04-17", desktop: 446, mobile: 360 }, + { date: "2024-04-18", desktop: 364, mobile: 410 }, + { date: "2024-04-19", desktop: 243, mobile: 180 }, + { date: "2024-04-20", desktop: 89, mobile: 150 }, + { date: "2024-04-21", desktop: 137, mobile: 200 }, + { date: "2024-04-22", desktop: 224, mobile: 170 }, + { date: "2024-04-23", desktop: 138, mobile: 230 }, + { date: "2024-04-24", desktop: 387, mobile: 290 }, + { date: "2024-04-25", desktop: 215, mobile: 250 }, + { date: "2024-04-26", desktop: 75, mobile: 130 }, + { date: "2024-04-27", desktop: 383, mobile: 420 }, + { date: "2024-04-28", desktop: 122, mobile: 180 }, + { date: "2024-04-29", desktop: 315, mobile: 240 }, + { date: "2024-04-30", desktop: 454, mobile: 380 }, + { date: "2024-05-01", desktop: 165, mobile: 220 }, + { date: "2024-05-02", desktop: 293, mobile: 310 }, + { date: "2024-05-03", desktop: 247, mobile: 190 }, + { date: "2024-05-04", desktop: 385, mobile: 420 }, + { date: "2024-05-05", desktop: 481, mobile: 390 }, + { date: "2024-05-06", desktop: 498, mobile: 520 }, + { date: "2024-05-07", desktop: 388, mobile: 300 }, + { date: "2024-05-08", desktop: 149, mobile: 210 }, + { date: "2024-05-09", desktop: 227, mobile: 180 }, + { date: "2024-05-10", desktop: 293, mobile: 330 }, + { date: "2024-05-11", desktop: 335, mobile: 270 }, + { date: "2024-05-12", desktop: 197, mobile: 240 }, + { date: "2024-05-13", desktop: 197, mobile: 160 }, + { date: "2024-05-14", desktop: 448, mobile: 490 }, + { date: "2024-05-15", desktop: 473, mobile: 380 }, + { date: "2024-05-16", desktop: 338, mobile: 400 }, + { date: "2024-05-17", desktop: 499, mobile: 420 }, + { date: "2024-05-18", desktop: 315, mobile: 350 }, + { date: "2024-05-19", desktop: 235, mobile: 180 }, + { date: "2024-05-20", desktop: 177, mobile: 230 }, + { date: "2024-05-21", desktop: 82, mobile: 140 }, + { date: "2024-05-22", desktop: 81, mobile: 120 }, + { date: "2024-05-23", desktop: 252, mobile: 290 }, + { date: "2024-05-24", desktop: 294, mobile: 220 }, + { date: "2024-05-25", desktop: 201, mobile: 250 }, + { date: "2024-05-26", desktop: 213, mobile: 170 }, + { date: "2024-05-27", desktop: 420, mobile: 460 }, + { date: "2024-05-28", desktop: 233, mobile: 190 }, + { date: "2024-05-29", desktop: 78, mobile: 130 }, + { date: "2024-05-30", desktop: 340, mobile: 280 }, + { date: "2024-05-31", desktop: 178, mobile: 230 }, + { date: "2024-06-01", desktop: 178, mobile: 200 }, + { date: "2024-06-02", desktop: 470, mobile: 410 }, + { date: "2024-06-03", desktop: 103, mobile: 160 }, + { date: "2024-06-04", desktop: 439, mobile: 380 }, + { date: "2024-06-05", desktop: 88, mobile: 140 }, + { date: "2024-06-06", desktop: 294, mobile: 250 }, + { date: "2024-06-07", desktop: 323, mobile: 370 }, + { date: "2024-06-08", desktop: 385, mobile: 320 }, + { date: "2024-06-09", desktop: 438, mobile: 480 }, + { date: "2024-06-10", desktop: 155, mobile: 200 }, + { date: "2024-06-11", desktop: 92, mobile: 150 }, + { date: "2024-06-12", desktop: 492, mobile: 420 }, + { date: "2024-06-13", desktop: 81, mobile: 130 }, + { date: "2024-06-14", desktop: 426, mobile: 380 }, + { date: "2024-06-15", desktop: 307, mobile: 350 }, + { date: "2024-06-16", desktop: 371, mobile: 310 }, + { date: "2024-06-17", desktop: 475, mobile: 520 }, + { date: "2024-06-18", desktop: 107, mobile: 170 }, + { date: "2024-06-19", desktop: 341, mobile: 290 }, + { date: "2024-06-20", desktop: 408, mobile: 450 }, + { date: "2024-06-21", desktop: 169, mobile: 210 }, + { date: "2024-06-22", desktop: 317, mobile: 270 }, + { date: "2024-06-23", desktop: 480, mobile: 530 }, + { date: "2024-06-24", desktop: 132, mobile: 180 }, + { date: "2024-06-25", desktop: 141, mobile: 190 }, + { date: "2024-06-26", desktop: 434, mobile: 380 }, + { date: "2024-06-27", desktop: 448, mobile: 490 }, + { date: "2024-06-28", desktop: 149, mobile: 200 }, + { date: "2024-06-29", desktop: 103, mobile: 160 }, + { date: "2024-06-30", desktop: 446, mobile: 400 }, +] const chartConfig = { - desktop: { - label: "Desktop", - color: "hsl(var(--chart-1))", - }, - mobile: { - label: "Mobile", - color: "hsl(var(--chart-2))", - }, -} satisfies ChartConfig; + desktop: { + label: "Desktop", + color: "hsl(var(--chart-1))", + }, + mobile: { + label: "Mobile", + color: "hsl(var(--chart-2))", + }, +} satisfies ChartConfig const AreaChartInteractive = () => { - const items = (): BulletLegendItemInterface[] => { - return Object.entries(chartConfig).map(([_, config]) => ({ - name: config.label, - color: config.color, - })); - }; + const items = (): BulletLegendItemInterface[] => { + return Object.entries(chartConfig).map(([_, config]) => ({ + name: config.label, + color: config.color, + })) + } - const [duration, setDuration] = createSignal(0); - const [domain, setDomain] = createSignal<[number, number]>([ - data.findIndex((d) => d.date === "2024-04-30"), - data.findIndex((d) => d.date === "2024-06-01"), - ]); + const [duration, setDuration] = createSignal(0) + const [domain, setDomain] = createSignal<[number, number]>([ + data.findIndex((d) => d.date === "2024-04-30"), + data.findIndex((d) => d.date === "2024-06-01"), + ]) - const isMobile = useIsMobile(); + const isMobile = useIsMobile() - const numTicks = () => { - if (isMobile()) { - return 4; - } - return 15; - }; + const numTicks = () => { + if (isMobile()) { + return 4 + } + return 15 + } - return ( - - - Area Chart - Interactive - - Showing total visitors for the last 3 months - - - - - - - - - - - - - - - - - - x={(_, i) => i} - y={[(d) => d.mobile, (d) => d.desktop]} - color="auto" - opacity={0.4} - curveType={CurveType.Natural} - attributes={{ - [`${Area.selectors.area}:nth-child(1)`]: { - fill: "url(#fillDesktop)", - }, - [`${Area.selectors.area}:nth-child(2)`]: { - fill: "url(#fillMobile)", - }, - }} - /> - - x={(_, i) => i} - y={[(d) => d.mobile, (d) => d.mobile + d.desktop]} - color={["var(--color-mobile)", "var(--color-desktop)"]} - curveType={CurveType.Natural} - lineWidth={1} - /> - - type="x" - tickFormat={(d) => { - const date = new Date(data[d as number].date); - return date.toLocaleDateString("en-US", { - month: "short", - day: "numeric", - }); - }} - gridLine={false} - tickLine={false} - domainLine={false} - numTicks={Math.min(numTicks(), domain()[1] - domain()[0])} - /> - - color={["var(--color-mobile)", "var(--color-desktop)"]} - template={(props) => ( - { - const date = new Date(data[d as number].date); - return date.toLocaleDateString("en-US", { - month: "short", - day: "numeric", - }); - }} - {...props} - /> - )} - /> - - -
- -
- - - - - - - - - - - - - - - x={(_, i) => i} - y={[(d) => d.mobile, (d) => d.desktop]} - color="auto" - opacity={0.4} - curveType={CurveType.Natural} - attributes={{ - [`${Area.selectors.area}:nth-child(1)`]: { - fill: "url(#fillDesktop)", - }, - [`${Area.selectors.area}:nth-child(2)`]: { - fill: "url(#fillMobile)", - }, - }} - /> - - x={(_, i) => i} - y={[(d) => d.mobile, (d) => d.mobile + d.desktop]} - color={["var(--color-mobile)", "var(--color-desktop)"]} - curveType={CurveType.Natural} - lineWidth={1} - /> - - type="x" - tickFormat={(d) => { - const date = new Date(data[d as number].date); - return date.toLocaleDateString("en-US", { - month: "short", - day: "numeric", - }); - }} - gridLine={false} - tickLine={false} - domainLine={false} - numTicks={numTicks()} - /> - { - if (userDriven) - batch(() => { - setDuration(0); - setDomain(selection!); - }); - }} - draggable - /> - -
-
- ); -}; + return ( + + + Area Chart - Interactive + + Showing total visitors for the last 3 months + + + + + + + + + + + + + + + + + + x={(_, i) => i} + y={[(d) => d.mobile, (d) => d.desktop]} + color="auto" + opacity={0.4} + curveType={CurveType.Natural} + attributes={{ + [`${Area.selectors.area}:nth-child(1)`]: { + fill: "url(#fillDesktop)", + }, + [`${Area.selectors.area}:nth-child(2)`]: { + fill: "url(#fillMobile)", + }, + }} + /> + + x={(_, i) => i} + y={[(d) => d.mobile, (d) => d.mobile + d.desktop]} + color={["var(--color-mobile)", "var(--color-desktop)"]} + curveType={CurveType.Natural} + lineWidth={1} + /> + + type="x" + tickFormat={(d) => { + const date = new Date(data[d as number].date) + return date.toLocaleDateString("en-US", { + month: "short", + day: "numeric", + }) + }} + gridLine={false} + tickLine={false} + domainLine={false} + numTicks={Math.min(numTicks(), domain()[1] - domain()[0])} + /> + + color={["var(--color-mobile)", "var(--color-desktop)"]} + template={(props) => ( + { + const date = new Date(data[d as number].date) + return date.toLocaleDateString("en-US", { + month: "short", + day: "numeric", + }) + }} + {...props} + /> + )} + /> + + +
+ +
+ + + + + + + + + + + + + + + x={(_, i) => i} + y={[(d) => d.mobile, (d) => d.desktop]} + color="auto" + opacity={0.4} + curveType={CurveType.Natural} + attributes={{ + [`${Area.selectors.area}:nth-child(1)`]: { + fill: "url(#fillDesktop)", + }, + [`${Area.selectors.area}:nth-child(2)`]: { + fill: "url(#fillMobile)", + }, + }} + /> + + x={(_, i) => i} + y={[(d) => d.mobile, (d) => d.mobile + d.desktop]} + color={["var(--color-mobile)", "var(--color-desktop)"]} + curveType={CurveType.Natural} + lineWidth={1} + /> + + type="x" + tickFormat={(d) => { + const date = new Date(data[d as number].date) + return date.toLocaleDateString("en-US", { + month: "short", + day: "numeric", + }) + }} + gridLine={false} + tickLine={false} + domainLine={false} + numTicks={numTicks()} + /> + { + if (userDriven) + batch(() => { + setDuration(0) + setDomain(selection!) + }) + }} + draggable + /> + +
+
+ ) +} -export default AreaChartInteractive; +export default AreaChartInteractive diff --git a/docs/src/__registry__/tailwindcss/charts/area-chart-legend.tsx b/docs/src/__registry__/tailwindcss/charts/area-chart-legend.tsx index 3587492f..a201603f 100644 --- a/docs/src/__registry__/tailwindcss/charts/area-chart-legend.tsx +++ b/docs/src/__registry__/tailwindcss/charts/area-chart-legend.tsx @@ -1,147 +1,144 @@ import { - Card, - CardContent, - CardDescription, - CardFooter, - CardHeader, - CardTitle, -} from "@/registry/tailwindcss/ui/card"; -import { - type ChartConfig, - ChartContainer, - ChartCrosshair, - ChartTooltipContent, -} from "@/registry/tailwindcss/ui/chart"; + VisArea, + VisAxis, + VisBulletLegend, + VisLine, + VisTooltip, +} from "@unovis/solid" +import { CurveType, Position, type BulletLegendItemInterface } from "@unovis/ts" + import { - VisArea, - VisAxis, - VisBulletLegend, - VisLine, - VisTooltip, -} from "@unovis/solid"; + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/registry/tailwindcss/ui/card" import { - type BulletLegendItemInterface, - CurveType, - Position, -} from "@unovis/ts"; + ChartContainer, + ChartCrosshair, + ChartTooltipContent, + type ChartConfig, +} from "@/registry/tailwindcss/ui/chart" type DataRecord = { - month: string; - desktop: number; - mobile: number; -}; + month: string + desktop: number + mobile: number +} const data: DataRecord[] = [ - { month: "January", desktop: 186, mobile: 80 }, - { month: "February", desktop: 305, mobile: 200 }, - { month: "March", desktop: 237, mobile: 120 }, - { month: "April", desktop: 73, mobile: 190 }, - { month: "May", desktop: 209, mobile: 130 }, - { month: "June", desktop: 214, mobile: 140 }, -]; + { month: "January", desktop: 186, mobile: 80 }, + { month: "February", desktop: 305, mobile: 200 }, + { month: "March", desktop: 237, mobile: 120 }, + { month: "April", desktop: 73, mobile: 190 }, + { month: "May", desktop: 209, mobile: 130 }, + { month: "June", desktop: 214, mobile: 140 }, +] const chartConfig = { - desktop: { - label: "Desktop", - color: "hsl(var(--chart-1))", - }, - mobile: { - label: "Mobile", - color: "hsl(var(--chart-2))", - }, -} satisfies ChartConfig; + desktop: { + label: "Desktop", + color: "hsl(var(--chart-1))", + }, + mobile: { + label: "Mobile", + color: "hsl(var(--chart-2))", + }, +} satisfies ChartConfig const AreaChartLegend = () => { - const items = (): BulletLegendItemInterface[] => { - return Object.entries(chartConfig).map(([_, config]) => ({ - name: config.label, - color: config.color, - })); - }; + const items = (): BulletLegendItemInterface[] => { + return Object.entries(chartConfig).map(([_, config]) => ({ + name: config.label, + color: config.color, + })) + } - return ( - - - Area Chart - Legend - - Showing total visitors for the last 6 months - - - - - - x={(_, i) => i} - y={[(d) => d.mobile, (d) => d.desktop]} - color={["var(--color-mobile)", "var(--color-desktop)"]} - opacity={0.4} - curveType={CurveType.Natural} - /> - - x={(_, i) => i} - y={[(d) => d.mobile, (d) => d.mobile + d.desktop]} - color={["var(--color-mobile)", "var(--color-desktop)"]} - curveType={CurveType.Natural} - lineWidth={1} - /> - - type="x" - tickFormat={(d) => data[d as number].month.slice(0, 3)} - gridLine={false} - tickLine={false} - domainLine={false} - numTicks={data.length} - /> - - color={["var(--color-mobile)", "var(--color-desktop)"]} - template={(props) => ( - - )} - /> - - -
- -
-
- -
-
-
- Trending up by 5.2% this month{" "} - - - - - - -
-
- January - June 2024 -
-
-
-
-
- ); -}; + return ( + + + Area Chart - Legend + + Showing total visitors for the last 6 months + + + + + + x={(_, i) => i} + y={[(d) => d.mobile, (d) => d.desktop]} + color={["var(--color-mobile)", "var(--color-desktop)"]} + opacity={0.4} + curveType={CurveType.Natural} + /> + + x={(_, i) => i} + y={[(d) => d.mobile, (d) => d.mobile + d.desktop]} + color={["var(--color-mobile)", "var(--color-desktop)"]} + curveType={CurveType.Natural} + lineWidth={1} + /> + + type="x" + tickFormat={(d) => data[d as number].month.slice(0, 3)} + gridLine={false} + tickLine={false} + domainLine={false} + numTicks={data.length} + /> + + color={["var(--color-mobile)", "var(--color-desktop)"]} + template={(props) => ( + + )} + /> + + +
+ +
+
+ +
+
+
+ Trending up by 5.2% this month{" "} + + + + + + +
+
+ January - June 2024 +
+
+
+
+
+ ) +} -export default AreaChartLegend; +export default AreaChartLegend diff --git a/docs/src/__registry__/tailwindcss/charts/area-chart-linear.tsx b/docs/src/__registry__/tailwindcss/charts/area-chart-linear.tsx index cf9a64d8..b85aa846 100644 --- a/docs/src/__registry__/tailwindcss/charts/area-chart-linear.tsx +++ b/docs/src/__registry__/tailwindcss/charts/area-chart-linear.tsx @@ -1,123 +1,124 @@ +import { VisArea, VisAxis, VisLine, VisTooltip } from "@unovis/solid" +import { CurveType, Position } from "@unovis/ts" + import { - Card, - CardContent, - CardDescription, - CardFooter, - CardHeader, - CardTitle, -} from "@/registry/tailwindcss/ui/card"; + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/registry/tailwindcss/ui/card" import { - type ChartConfig, - ChartContainer, - ChartCrosshair, - ChartTooltipContent, -} from "@/registry/tailwindcss/ui/chart"; -import { VisArea, VisAxis, VisLine, VisTooltip } from "@unovis/solid"; -import { CurveType, Position } from "@unovis/ts"; + ChartContainer, + ChartCrosshair, + ChartTooltipContent, + type ChartConfig, +} from "@/registry/tailwindcss/ui/chart" type DataRecord = { - month: string; - desktop: number; -}; + month: string + desktop: number +} const data: DataRecord[] = [ - { month: "January", desktop: 186 }, - { month: "February", desktop: 305 }, - { month: "March", desktop: 237 }, - { month: "April", desktop: 73 }, - { month: "May", desktop: 209 }, - { month: "June", desktop: 214 }, -]; + { month: "January", desktop: 186 }, + { month: "February", desktop: 305 }, + { month: "March", desktop: 237 }, + { month: "April", desktop: 73 }, + { month: "May", desktop: 209 }, + { month: "June", desktop: 214 }, +] const chartConfig = { - desktop: { - label: "Desktop", - color: "hsl(var(--chart-1))", - }, -} satisfies ChartConfig; + desktop: { + label: "Desktop", + color: "hsl(var(--chart-1))", + }, +} satisfies ChartConfig const AreaChartLinear = () => { - return ( - - - Area Chart - Linear - - Showing total visitors for the last 6 months - - - - - - x={(_, i) => i} - y={(d) => d.desktop} - color="var(--color-desktop)" - opacity={0.4} - curveType={CurveType.Linear} - /> - - x={(_, i) => i} - y={(d) => d.desktop} - color="var(--color-desktop)" - curveType={CurveType.Linear} - lineWidth={1} - /> - - type="x" - tickFormat={(d) => data[d as number].month.slice(0, 3)} - gridLine={false} - tickLine={false} - domainLine={false} - numTicks={data.length} - /> - - color="var(--color-desktop)" - template={(props) => ( - - )} - /> - - - - -
-
-
- Trending up by 5.2% this month{" "} - - - - - - -
-
- January - June 2024 -
-
-
-
-
- ); -}; + return ( + + + Area Chart - Linear + + Showing total visitors for the last 6 months + + + + + + x={(_, i) => i} + y={(d) => d.desktop} + color="var(--color-desktop)" + opacity={0.4} + curveType={CurveType.Linear} + /> + + x={(_, i) => i} + y={(d) => d.desktop} + color="var(--color-desktop)" + curveType={CurveType.Linear} + lineWidth={1} + /> + + type="x" + tickFormat={(d) => data[d as number].month.slice(0, 3)} + gridLine={false} + tickLine={false} + domainLine={false} + numTicks={data.length} + /> + + color="var(--color-desktop)" + template={(props) => ( + + )} + /> + + + + +
+
+
+ Trending up by 5.2% this month{" "} + + + + + + +
+
+ January - June 2024 +
+
+
+
+
+ ) +} -export default AreaChartLinear; +export default AreaChartLinear diff --git a/docs/src/__registry__/tailwindcss/charts/area-chart-stacked.tsx b/docs/src/__registry__/tailwindcss/charts/area-chart-stacked.tsx index 6c6196b2..3c260255 100644 --- a/docs/src/__registry__/tailwindcss/charts/area-chart-stacked.tsx +++ b/docs/src/__registry__/tailwindcss/charts/area-chart-stacked.tsx @@ -1,123 +1,124 @@ +import { VisArea, VisAxis, VisLine, VisTooltip } from "@unovis/solid" +import { CurveType, Position } from "@unovis/ts" + import { - Card, - CardContent, - CardDescription, - CardFooter, - CardHeader, - CardTitle, -} from "@/registry/tailwindcss/ui/card"; + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/registry/tailwindcss/ui/card" import { - type ChartConfig, - ChartContainer, - ChartCrosshair, - ChartTooltipContent, -} from "@/registry/tailwindcss/ui/chart"; -import { VisArea, VisAxis, VisLine, VisTooltip } from "@unovis/solid"; -import { CurveType, Position } from "@unovis/ts"; + ChartContainer, + ChartCrosshair, + ChartTooltipContent, + type ChartConfig, +} from "@/registry/tailwindcss/ui/chart" type DataRecord = { - month: string; - desktop: number; - mobile: number; -}; + month: string + desktop: number + mobile: number +} const data: DataRecord[] = [ - { month: "January", desktop: 186, mobile: 80 }, - { month: "February", desktop: 305, mobile: 200 }, - { month: "March", desktop: 237, mobile: 120 }, - { month: "April", desktop: 73, mobile: 190 }, - { month: "May", desktop: 209, mobile: 130 }, - { month: "June", desktop: 214, mobile: 140 }, -]; + { month: "January", desktop: 186, mobile: 80 }, + { month: "February", desktop: 305, mobile: 200 }, + { month: "March", desktop: 237, mobile: 120 }, + { month: "April", desktop: 73, mobile: 190 }, + { month: "May", desktop: 209, mobile: 130 }, + { month: "June", desktop: 214, mobile: 140 }, +] const chartConfig = { - desktop: { - label: "Desktop", - color: "hsl(var(--chart-1))", - }, - mobile: { - label: "Mobile", - color: "hsl(var(--chart-2))", - }, -} satisfies ChartConfig; + desktop: { + label: "Desktop", + color: "hsl(var(--chart-1))", + }, + mobile: { + label: "Mobile", + color: "hsl(var(--chart-2))", + }, +} satisfies ChartConfig const AreaChartStacked = () => { - return ( - - - Area Chart - Stacked - - Showing total visitors for the last 6 months - - - - - - x={(_, i) => i} - y={[(d) => d.mobile, (d) => d.desktop]} - color={["var(--color-mobile)", "var(--color-desktop)"]} - opacity={0.4} - curveType={CurveType.Natural} - /> - - x={(_, i) => i} - y={[(d) => d.mobile, (d) => d.mobile + d.desktop]} - color={["var(--color-mobile)", "var(--color-desktop)"]} - curveType={CurveType.Natural} - lineWidth={1} - /> - - type="x" - tickFormat={(d) => data[d as number].month.slice(0, 3)} - gridLine={false} - tickLine={false} - domainLine={false} - numTicks={data.length} - /> - - color={["var(--color-mobile)", "var(--color-desktop)"]} - template={(props) => ( - - )} - /> - - - - -
-
-
- Trending up by 5.2% this month{" "} - - - - - - -
-
- January - June 2024 -
-
-
-
-
- ); -}; + return ( + + + Area Chart - Stacked + + Showing total visitors for the last 6 months + + + + + + x={(_, i) => i} + y={[(d) => d.mobile, (d) => d.desktop]} + color={["var(--color-mobile)", "var(--color-desktop)"]} + opacity={0.4} + curveType={CurveType.Natural} + /> + + x={(_, i) => i} + y={[(d) => d.mobile, (d) => d.mobile + d.desktop]} + color={["var(--color-mobile)", "var(--color-desktop)"]} + curveType={CurveType.Natural} + lineWidth={1} + /> + + type="x" + tickFormat={(d) => data[d as number].month.slice(0, 3)} + gridLine={false} + tickLine={false} + domainLine={false} + numTicks={data.length} + /> + + color={["var(--color-mobile)", "var(--color-desktop)"]} + template={(props) => ( + + )} + /> + + + + +
+
+
+ Trending up by 5.2% this month{" "} + + + + + + +
+
+ January - June 2024 +
+
+
+
+
+ ) +} -export default AreaChartStacked; +export default AreaChartStacked diff --git a/docs/src/__registry__/tailwindcss/charts/area-chart-step.tsx b/docs/src/__registry__/tailwindcss/charts/area-chart-step.tsx index 8e303ab7..c293eae0 100644 --- a/docs/src/__registry__/tailwindcss/charts/area-chart-step.tsx +++ b/docs/src/__registry__/tailwindcss/charts/area-chart-step.tsx @@ -1,130 +1,131 @@ +import { VisArea, VisAxis, VisLine, VisTooltip } from "@unovis/solid" +import { CurveType, Position } from "@unovis/ts" + import { - Card, - CardContent, - CardDescription, - CardFooter, - CardHeader, - CardTitle, -} from "@/registry/tailwindcss/ui/card"; + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/registry/tailwindcss/ui/card" import { - type ChartConfig, - ChartContainer, - ChartCrosshair, - ChartTooltipContent, -} from "@/registry/tailwindcss/ui/chart"; -import { VisArea, VisAxis, VisLine, VisTooltip } from "@unovis/solid"; -import { CurveType, Position } from "@unovis/ts"; + ChartContainer, + ChartCrosshair, + ChartTooltipContent, + type ChartConfig, +} from "@/registry/tailwindcss/ui/chart" type DataRecord = { - month: string; - desktop: number; -}; + month: string + desktop: number +} const data: DataRecord[] = [ - { month: "January", desktop: 186 }, - { month: "February", desktop: 305 }, - { month: "March", desktop: 237 }, - { month: "April", desktop: 73 }, - { month: "May", desktop: 209 }, - { month: "June", desktop: 214 }, -]; + { month: "January", desktop: 186 }, + { month: "February", desktop: 305 }, + { month: "March", desktop: 237 }, + { month: "April", desktop: 73 }, + { month: "May", desktop: 209 }, + { month: "June", desktop: 214 }, +] const chartConfig = { - desktop: { - label: "Desktop", - color: "hsl(var(--chart-1))", - icon: ( - - - - ), - }, -} satisfies ChartConfig; + desktop: { + label: "Desktop", + color: "hsl(var(--chart-1))", + icon: ( + + + + ), + }, +} satisfies ChartConfig const AreaChartStep = () => { - return ( - - - Area Chart - Step - - Showing total visitors for the last 6 months - - - - - - x={(_, i) => i} - y={(d) => d.desktop} - color="var(--color-desktop)" - opacity={0.4} - curveType={CurveType.Step} - /> - - x={(_, i) => i} - y={(d) => d.desktop} - color="var(--color-desktop)" - curveType={CurveType.Step} - lineWidth={1} - /> - - type="x" - tickFormat={(d) => data[d as number].month.slice(0, 3)} - gridLine={false} - tickLine={false} - domainLine={false} - numTicks={data.length} - /> - - color="var(--color-desktop)" - template={(props) => ( - - )} - /> - - - - -
-
-
- Trending up by 5.2% this month{" "} - - - - - - -
-
- January - June 2024 -
-
-
-
-
- ); -}; + return ( + + + Area Chart - Step + + Showing total visitors for the last 6 months + + + + + + x={(_, i) => i} + y={(d) => d.desktop} + color="var(--color-desktop)" + opacity={0.4} + curveType={CurveType.Step} + /> + + x={(_, i) => i} + y={(d) => d.desktop} + color="var(--color-desktop)" + curveType={CurveType.Step} + lineWidth={1} + /> + + type="x" + tickFormat={(d) => data[d as number].month.slice(0, 3)} + gridLine={false} + tickLine={false} + domainLine={false} + numTicks={data.length} + /> + + color="var(--color-desktop)" + template={(props) => ( + + )} + /> + + + + +
+
+
+ Trending up by 5.2% this month{" "} + + + + + + +
+
+ January - June 2024 +
+
+
+
+
+ ) +} -export default AreaChartStep; +export default AreaChartStep diff --git a/docs/src/__registry__/tailwindcss/charts/area-chart.tsx b/docs/src/__registry__/tailwindcss/charts/area-chart.tsx index d008af01..1ca10225 100644 --- a/docs/src/__registry__/tailwindcss/charts/area-chart.tsx +++ b/docs/src/__registry__/tailwindcss/charts/area-chart.tsx @@ -1,122 +1,123 @@ +import { VisArea, VisAxis, VisLine, VisTooltip } from "@unovis/solid" +import { CurveType, Position } from "@unovis/ts" + import { - Card, - CardContent, - CardDescription, - CardFooter, - CardHeader, - CardTitle, -} from "@/registry/tailwindcss/ui/card"; + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/registry/tailwindcss/ui/card" import { - type ChartConfig, - ChartContainer, - ChartCrosshair, - ChartTooltipContent, -} from "@/registry/tailwindcss/ui/chart"; -import { VisArea, VisAxis, VisLine, VisTooltip } from "@unovis/solid"; -import { CurveType, Position } from "@unovis/ts"; + ChartContainer, + ChartCrosshair, + ChartTooltipContent, + type ChartConfig, +} from "@/registry/tailwindcss/ui/chart" type DataRecord = { - month: string; - desktop: number; -}; + month: string + desktop: number +} const data: DataRecord[] = [ - { month: "January", desktop: 186 }, - { month: "February", desktop: 305 }, - { month: "March", desktop: 237 }, - { month: "April", desktop: 73 }, - { month: "May", desktop: 209 }, - { month: "June", desktop: 214 }, -]; + { month: "January", desktop: 186 }, + { month: "February", desktop: 305 }, + { month: "March", desktop: 237 }, + { month: "April", desktop: 73 }, + { month: "May", desktop: 209 }, + { month: "June", desktop: 214 }, +] const chartConfig = { - desktop: { - label: "Desktop", - color: "hsl(var(--chart-1))", - }, -} satisfies ChartConfig; + desktop: { + label: "Desktop", + color: "hsl(var(--chart-1))", + }, +} satisfies ChartConfig const AreaChart = () => { - return ( - - - Area Chart - - Showing total visitors for the last 6 months - - - - - - x={(_, i) => i} - y={(d) => d.desktop} - color="var(--color-desktop)" - opacity={0.4} - curveType={CurveType.Natural} - /> - - x={(_, i) => i} - y={(d) => d.desktop} - color="var(--color-desktop)" - curveType={CurveType.Natural} - lineWidth={1} - /> - - type="x" - tickFormat={(d) => data[d as number].month.slice(0, 3)} - gridLine={false} - tickLine={false} - domainLine={false} - numTicks={data.length} - /> - - color="var(--color-desktop)" - template={(props) => ( - - )} - /> - - - - -
-
-
- Trending up by 5.2% this month{" "} - - - - - - -
-
- January - June 2024 -
-
-
-
-
- ); -}; + return ( + + + Area Chart + + Showing total visitors for the last 6 months + + + + + + x={(_, i) => i} + y={(d) => d.desktop} + color="var(--color-desktop)" + opacity={0.4} + curveType={CurveType.Natural} + /> + + x={(_, i) => i} + y={(d) => d.desktop} + color="var(--color-desktop)" + curveType={CurveType.Natural} + lineWidth={1} + /> + + type="x" + tickFormat={(d) => data[d as number].month.slice(0, 3)} + gridLine={false} + tickLine={false} + domainLine={false} + numTicks={data.length} + /> + + color="var(--color-desktop)" + template={(props) => ( + + )} + /> + + + + +
+
+
+ Trending up by 5.2% this month{" "} + + + + + + +
+
+ January - June 2024 +
+
+
+
+
+ ) +} -export default AreaChart; +export default AreaChart diff --git a/docs/src/__registry__/tailwindcss/charts/bar-chart-active.tsx b/docs/src/__registry__/tailwindcss/charts/bar-chart-active.tsx index 421a5857..3baf9bec 100644 --- a/docs/src/__registry__/tailwindcss/charts/bar-chart-active.tsx +++ b/docs/src/__registry__/tailwindcss/charts/bar-chart-active.tsx @@ -1,158 +1,159 @@ +import { render } from "solid-js/web" +import { VisAxis, VisStackedBar, VisTooltip } from "@unovis/solid" +import { StackedBar } from "@unovis/ts" + import { - Card, - CardContent, - CardDescription, - CardFooter, - CardHeader, - CardTitle, -} from "@/registry/tailwindcss/ui/card"; + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/registry/tailwindcss/ui/card" import { - type ChartConfig, - ChartContainer, - ChartTooltipContent, -} from "@/registry/tailwindcss/ui/chart"; -import { VisAxis, VisStackedBar, VisTooltip } from "@unovis/solid"; -import { StackedBar } from "@unovis/ts"; -import { render } from "solid-js/web"; + ChartContainer, + ChartTooltipContent, + type ChartConfig, +} from "@/registry/tailwindcss/ui/chart" type DataRecord = { - browser: string; - visitors: number; - fill: string; -}; + browser: string + visitors: number + fill: string +} const data: DataRecord[] = [ - { browser: "chrome", visitors: 187, fill: "var(--color-chrome)" }, - { browser: "safari", visitors: 200, fill: "var(--color-safari)" }, - { browser: "firefox", visitors: 275, fill: "var(--color-firefox)" }, - { browser: "edge", visitors: 173, fill: "var(--color-edge)" }, - { browser: "other", visitors: 90, fill: "var(--color-other)" }, -]; + { browser: "chrome", visitors: 187, fill: "var(--color-chrome)" }, + { browser: "safari", visitors: 200, fill: "var(--color-safari)" }, + { browser: "firefox", visitors: 275, fill: "var(--color-firefox)" }, + { browser: "edge", visitors: 173, fill: "var(--color-edge)" }, + { browser: "other", visitors: 90, fill: "var(--color-other)" }, +] const chartConfig = { - visitors: { - label: "Visitors", - }, - chrome: { - label: "Chrome", - color: "hsl(var(--chart-1))", - }, - safari: { - label: "Safari", - color: "hsl(var(--chart-2))", - }, - firefox: { - label: "Firefox", - color: "hsl(var(--chart-3))", - }, - edge: { - label: "Edge", - color: "hsl(var(--chart-4))", - }, - other: { - label: "Other", - color: "hsl(var(--chart-5))", - }, -} satisfies ChartConfig; + visitors: { + label: "Visitors", + }, + chrome: { + label: "Chrome", + color: "hsl(var(--chart-1))", + }, + safari: { + label: "Safari", + color: "hsl(var(--chart-2))", + }, + firefox: { + label: "Firefox", + color: "hsl(var(--chart-3))", + }, + edge: { + label: "Edge", + color: "hsl(var(--chart-4))", + }, + other: { + label: "Other", + color: "hsl(var(--chart-5))", + }, +} satisfies ChartConfig const BarChartActive = () => { - return ( - - - Bar Chart- Active - January - June 2024 - - - - - - ); -}; + + + ) +} diff --git a/docs/src/components/mobile-navbar.tsx b/docs/src/components/mobile-navbar.tsx index 859dea55..d156fb02 100644 --- a/docs/src/components/mobile-navbar.tsx +++ b/docs/src/components/mobile-navbar.tsx @@ -1,74 +1,76 @@ -import { docsConfig } from "@/config/docs"; -import { Button } from "@/registry/tailwindcss/ui/button"; +import { For } from "solid-js" +import { useBeforeLeave } from "@solidjs/router" + +import { docsConfig } from "@/config/docs" +import { Button } from "@/registry/tailwindcss/ui/button" import { - Drawer, - DrawerContent, - DrawerTrigger, -} from "@/registry/tailwindcss/ui/drawer"; -import { useBeforeLeave } from "@solidjs/router"; -import { For } from "solid-js"; -import { Sidebar } from "./sidebar"; + Drawer, + DrawerContent, + DrawerTrigger, +} from "@/registry/tailwindcss/ui/drawer" + +import { Sidebar } from "./sidebar" export const MobileNavbar = () => { - return ( - - {(props) => { - useBeforeLeave(() => { - props.setOpen(false); - }); + return ( + + {(props) => { + useBeforeLeave(() => { + props.setOpen(false) + }) - return ( - <> - - - - Open menu - - - -
-
-
- - Home - - - {(item) => ( - - {item.title} - - )} - -
- -
-
-
- - ); - }} -
- ); -}; + return ( + <> + + + + Open menu + + + +
+
+
+ + Home + + + {(item) => ( + + {item.title} + + )} + +
+ +
+
+
+ + ) + }} +
+ ) +} diff --git a/docs/src/components/mode-toggle.tsx b/docs/src/components/mode-toggle.tsx index bfa5629b..bffab6c7 100644 --- a/docs/src/components/mode-toggle.tsx +++ b/docs/src/components/mode-toggle.tsx @@ -1,45 +1,46 @@ -import { Button } from "@/registry/tailwindcss/ui/button"; -import { useColorMode } from "@kobalte/core"; -import { createEffect } from "solid-js"; +import { createEffect } from "solid-js" +import { useColorMode } from "@kobalte/core" + +import { Button } from "@/registry/tailwindcss/ui/button" const ModeToggle = () => { - const { toggleColorMode, colorMode } = useColorMode(); + const { toggleColorMode, colorMode } = useColorMode() - createEffect(() => { - const windows = new Set([...Array.from(window.frames), window]); + createEffect(() => { + const windows = new Set([...Array.from(window.frames), window]) - for (const window of windows) { - window.document.documentElement.style.colorScheme = colorMode(); - window.document.documentElement.dataset.kbTheme = colorMode(); - } - }); + for (const window of windows) { + window.document.documentElement.style.colorScheme = colorMode() + window.document.documentElement.dataset.kbTheme = colorMode() + } + }) - return ( - - ); -}; + return ( + + ) +} -export default ModeToggle; +export default ModeToggle diff --git a/docs/src/components/navbar.tsx b/docs/src/components/navbar.tsx index 3f06dba3..22809616 100644 --- a/docs/src/components/navbar.tsx +++ b/docs/src/components/navbar.tsx @@ -1,40 +1,42 @@ -import { docsConfig } from "@/config/docs"; -import { siteConfig } from "@/config/site"; -import { cn } from "@/registry/tailwindcss/libs/cn"; -import { useLocation } from "@solidjs/router"; -import { For } from "solid-js"; -import { Logo } from "./logo"; +import { For } from "solid-js" +import { useLocation } from "@solidjs/router" + +import { docsConfig } from "@/config/docs" +import { siteConfig } from "@/config/site" +import { cn } from "@/registry/tailwindcss/libs/cn" + +import { Logo } from "./logo" export const Navbar = () => { - const location = useLocation(); + const location = useLocation() - return ( - - ); -}; + return ( + + ) +} diff --git a/docs/src/components/package-manager-copy-button.tsx b/docs/src/components/package-manager-copy-button.tsx index 1c78f794..aeacabb0 100644 --- a/docs/src/components/package-manager-copy-button.tsx +++ b/docs/src/components/package-manager-copy-button.tsx @@ -1,156 +1,157 @@ +import { For, Show, createSignal, type VoidComponent } from "solid-js" + import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuTrigger, -} from "@/registry/tailwindcss/ui/dropdown-menu"; -import { For, Show, type VoidComponent, createSignal } from "solid-js"; + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from "@/registry/tailwindcss/ui/dropdown-menu" type Props = { - npmCommand: string; - pnpmCommand: string; - yarnCommand: string; - bunCommand: string; -}; + npmCommand: string + pnpmCommand: string + yarnCommand: string + bunCommand: string +} const PackageManagerCopyButton: VoidComponent = (props) => { - const packageList = [ - { - title: "npm", - icon: ( - - - Npm command - - ), - value: () => props.npmCommand, - }, - { - title: "yarn", - icon: ( - - - Yarn command - - ), - value: () => props.yarnCommand, - }, - { - title: "pnpm", - icon: ( - - - Pnpm command - - ), - value: () => props.pnpmCommand, - }, - { - title: "bun", - icon: ( - - - Bun command - - ), - value: () => props.bunCommand, - }, - ]; + const packageList = [ + { + title: "npm", + icon: ( + + + Npm command + + ), + value: () => props.npmCommand, + }, + { + title: "yarn", + icon: ( + + + Yarn command + + ), + value: () => props.yarnCommand, + }, + { + title: "pnpm", + icon: ( + + + Pnpm command + + ), + value: () => props.pnpmCommand, + }, + { + title: "bun", + icon: ( + + + Bun command + + ), + value: () => props.bunCommand, + }, + ] - const [isCopied, setIsCopied] = createSignal(false); + const [isCopied, setIsCopied] = createSignal(false) - const copyToClipboard = async (value: string) => { - setIsCopied(true); - await navigator.clipboard.writeText(value); - setTimeout(() => setIsCopied(false), 2000); - }; + const copyToClipboard = async (value: string) => { + setIsCopied(true) + await navigator.clipboard.writeText(value) + setTimeout(() => setIsCopied(false), 2000) + } - return ( - - - - - - - - Copy - - } - > - - - - - - Copied - - - - - - {(item) => ( - copyToClipboard(item.value())} - > - {item.icon} - {item.title} - - )} - - - - ); -}; + return ( + + + + + + + + Copy + + } + > + + + + + + Copied + + + + + + {(item) => ( + copyToClipboard(item.value())} + > + {item.icon} + {item.title} + + )} + + + + ) +} -export default PackageManagerCopyButton; +export default PackageManagerCopyButton diff --git a/docs/src/components/page-navigation.tsx b/docs/src/components/page-navigation.tsx index 2c42d350..61287caf 100644 --- a/docs/src/components/page-navigation.tsx +++ b/docs/src/components/page-navigation.tsx @@ -1,92 +1,93 @@ +import { Show } from "solid-js" +import { useLocation } from "@solidjs/router" + import { - type TNavItem, - type TNavItemWithChildren, - docsConfig, -} from "@/config/docs"; -import { Button } from "@/registry/tailwindcss/ui/button"; -import { useLocation } from "@solidjs/router"; -import { Show } from "solid-js"; + docsConfig, + type TNavItem, + type TNavItemWithChildren, +} from "@/config/docs" +import { Button } from "@/registry/tailwindcss/ui/button" export const PageNavigation = () => { - const location = useLocation(); + const location = useLocation() - const getPagerForDoc = (slug: string) => { - const flattenedLinks = [null, ...flatten(docsConfig.sidebarNav), null]; - let activeIndex: number; - if (!slug) { - activeIndex = 1; - } else { - activeIndex = flattenedLinks.findIndex((link) => slug === link?.href); - } + const getPagerForDoc = (slug: string) => { + const flattenedLinks = [null, ...flatten(docsConfig.sidebarNav), null] + let activeIndex: number + if (!slug) { + activeIndex = 1 + } else { + activeIndex = flattenedLinks.findIndex((link) => slug === link?.href) + } - const prev = activeIndex !== 0 ? flattenedLinks[activeIndex - 1] : null; - const next = - activeIndex !== flattenedLinks.length - 1 - ? flattenedLinks[activeIndex + 1] - : null; - return { - prev, - next, - }; - }; + const prev = activeIndex !== 0 ? flattenedLinks[activeIndex - 1] : null + const next = + activeIndex !== flattenedLinks.length - 1 + ? flattenedLinks[activeIndex + 1] + : null + return { + prev, + next, + } + } - const flatten = (links: TNavItemWithChildren[]): TNavItem[] => { - return links - .reduce((flat, link) => { - return flat.concat(link.items.length ? flatten(link.items) : link); - }, []) - .filter((link) => !link.disabled); - }; + const flatten = (links: TNavItemWithChildren[]): TNavItem[] => { + return links + .reduce((flat, link) => { + return flat.concat(link.items.length ? flatten(link.items) : link) + }, []) + .filter((link) => !link.disabled) + } - const pager = () => getPagerForDoc(location.pathname); + const pager = () => getPagerForDoc(location.pathname) - return ( -
- - - - - - -
- ); -}; + return ( +
+ + + + + + +
+ ) +} diff --git a/docs/src/components/sidebar.tsx b/docs/src/components/sidebar.tsx index ea633508..a6486991 100644 --- a/docs/src/components/sidebar.tsx +++ b/docs/src/components/sidebar.tsx @@ -1,82 +1,83 @@ -import { docsConfig } from "@/config/docs"; -import { cn } from "@/registry/tailwindcss/libs/cn"; -import { useLocation } from "@solidjs/router"; -import { For, Show } from "solid-js"; +import { For, Show } from "solid-js" +import { useLocation } from "@solidjs/router" + +import { docsConfig } from "@/config/docs" +import { cn } from "@/registry/tailwindcss/libs/cn" export const Sidebar = () => { - const location = useLocation(); + const location = useLocation() - return ( -
- - {(item) => ( -
-

- {item.title} -

-
- - {(item) => ( - - {item.title} - - - {item.label} - - - - } - > - - {item.title} - - - {item.label} - - - - - )} - -
-
- )} -
-
- ); -}; + return ( +
+ + {(item) => ( +
+

+ {item.title} +

+
+ + {(item) => ( + + {item.title} + + + {item.label} + + + + } + > + + {item.title} + + + {item.label} + + + + + )} + +
+
+ )} +
+
+ ) +} diff --git a/docs/src/components/toc.tsx b/docs/src/components/toc.tsx index 4bbff88a..d4956ec2 100644 --- a/docs/src/components/toc.tsx +++ b/docs/src/components/toc.tsx @@ -1,97 +1,98 @@ -import { cn } from "@/registry/tailwindcss/libs/cn"; -import { createIntersectionObserver } from "@solid-primitives/intersection-observer"; -import { useLocation } from "@solidjs/router"; -import { For, createEffect, createSignal } from "solid-js"; +import { For, createEffect, createSignal } from "solid-js" +import { useLocation } from "@solidjs/router" +import { createIntersectionObserver } from "@solid-primitives/intersection-observer" -type Heading = { depth: number; slug: string; text: string }; +import { cn } from "@/registry/tailwindcss/libs/cn" + +type Heading = { depth: number; slug: string; text: string } type TocProps = { - data: Heading[]; -}; + data: Heading[] +} type TocItemProps = { - data: Heading; -}; + data: Heading +} const TocItem = (props: TocItemProps) => { - const location = useLocation(); - - const handleClick = (event: Event) => { - event.preventDefault(); - - const element = document.getElementById(props.data.slug); - - if (element) { - const elementPosition = element.getBoundingClientRect().top; - const offsetPosition = elementPosition + window.scrollY - 70; - - window.scrollTo({ - top: offsetPosition, - behavior: "smooth", - }); - } - }; - - return ( -
  • - - {props.data.text} - -
  • - ); -}; + const location = useLocation() + + const handleClick = (event: Event) => { + event.preventDefault() + + const element = document.getElementById(props.data.slug) + + if (element) { + const elementPosition = element.getBoundingClientRect().top + const offsetPosition = elementPosition + window.scrollY - 70 + + window.scrollTo({ + top: offsetPosition, + behavior: "smooth", + }) + } + } + + return ( +
  • + + {props.data.text} + +
  • + ) +} export const Toc = (props: TocProps) => { - const [targets, setTargets] = createSignal([]); - - createEffect(() => { - for (const item of props.data) { - setTargets((p) => [...p, document.getElementById(item.slug) as Element]); - } - }); - - createIntersectionObserver( - targets, - (entries) => { - let firstIntersectingEntry = null; - - for (const entry of entries) { - if (entry.isIntersecting) { - firstIntersectingEntry = entry; - break; - } - } - - if (firstIntersectingEntry) { - const headingFragment = `#${firstIntersectingEntry.target.id}`; - const tocItem = document.querySelector( - `a[href="${window.location.pathname + headingFragment}"]`, - ); - const previouslyActivatedItem = - document.querySelector(".active-toc-item"); - - previouslyActivatedItem?.classList.remove("active-toc-item"); - tocItem?.classList.add("active-toc-item"); - } - }, - { - threshold: 0.01, - }, - ); - - return ( - - ); -}; + const [targets, setTargets] = createSignal([]) + + createEffect(() => { + for (const item of props.data) { + setTargets((p) => [...p, document.getElementById(item.slug) as Element]) + } + }) + + createIntersectionObserver( + targets, + (entries) => { + let firstIntersectingEntry = null + + for (const entry of entries) { + if (entry.isIntersecting) { + firstIntersectingEntry = entry + break + } + } + + if (firstIntersectingEntry) { + const headingFragment = `#${firstIntersectingEntry.target.id}` + const tocItem = document.querySelector( + `a[href="${window.location.pathname + headingFragment}"]` + ) + const previouslyActivatedItem = + document.querySelector(".active-toc-item") + + previouslyActivatedItem?.classList.remove("active-toc-item") + tocItem?.classList.add("active-toc-item") + } + }, + { + threshold: 0.01, + } + ) + + return ( + + ) +} diff --git a/docs/src/config/docs.ts b/docs/src/config/docs.ts index 918fedaf..24dc7cac 100644 --- a/docs/src/config/docs.ts +++ b/docs/src/config/docs.ts @@ -1,326 +1,326 @@ export type TNavItem = { - title: string; - href?: string; - disabled?: boolean; - label?: string; -}; + title: string + href?: string + disabled?: boolean + label?: string +} export type TSidebarNavItem = TNavItem & { - items: TSidebarNavItem[]; -}; + items: TSidebarNavItem[] +} export type TNavItemWithChildren = TNavItem & { - items: TNavItemWithChildren[]; -}; + items: TNavItemWithChildren[] +} export type TDocsConfig = { - mainNav: TNavItem[]; - sidebarNav: TSidebarNavItem[]; -}; + mainNav: TNavItem[] + sidebarNav: TSidebarNavItem[] +} export const docsConfig: TDocsConfig = { - mainNav: [ - { - title: "Docs", - href: "/docs/introduction", - }, - { - title: "Components", - href: "/docs/components/accordion", - }, - { - title: "Blocks", - href: "/blocks", - }, - { - title: "Charts", - href: "/charts", - }, - ], - sidebarNav: [ - { - title: "Getting Started", - items: [ - { - title: "Introduction", - href: "/docs/introduction", - items: [], - }, - { - title: "components.json", - href: "/docs/components-json", - items: [], - }, - { - title: "Theming", - href: "/docs/theming", - items: [], - }, - { - title: "Dark mode", - href: "/docs/dark-mode", - items: [], - }, - { - title: "CLI", - href: "/docs/cli", - items: [], - }, - { - title: "Figma", - href: "/docs/figma", - items: [], - }, - { - title: "Changelog", - href: "/docs/changelog#dec-2024---updates", - items: [], - }, - { - title: "About", - href: "/docs/about", - items: [], - }, - ], - }, - { - title: "Installation", - items: [ - { - title: "Solid Start", - href: "/docs/installation/solid-start", - items: [], - }, - { - title: "Astro", - href: "/docs/installation/astro", - items: [], - }, - { - title: "Manual", - href: "/docs/installation/manual", - items: [], - }, - ], - }, - { - title: "Components", - items: [ - { - title: "Accordion", - href: "/docs/components/accordion", - items: [], - }, - { - title: "Alert", - href: "/docs/components/alert", - items: [], - }, - { - title: "Alert Dialog", - href: "/docs/components/alert-dialog", - items: [], - }, - { - title: "Badge", - href: "/docs/components/badge", - items: [], - }, - { - title: "Button", - href: "/docs/components/button", - items: [], - }, - { - title: "Card", - href: "/docs/components/card", - items: [], - }, - { - title: "Carousel", - href: "/docs/components/carousel", - items: [], - }, - { - title: "Chart", - href: "/docs/components/chart", - items: [], - label: "New", - }, - { - title: "Checkbox", - href: "/docs/components/checkbox", - items: [], - }, - { - title: "Collapsible", - href: "/docs/components/collapsible", - items: [], - }, - { - title: "Combobox", - href: "/docs/components/combobox", - items: [], - }, - { - title: "Command", - href: "/docs/components/command", - items: [], - }, - { - title: "Context Menu", - href: "/docs/components/context-menu", - items: [], - }, - { - title: "Data Table", - href: "/docs/components/data-table", - items: [], - }, - { - title: "Date Picker", - href: "/docs/components/date-picker", - items: [], - }, - { - title: "Dialog", - href: "/docs/components/dialog", - items: [], - }, - { - title: "Drawer", - href: "/docs/components/drawer", - items: [], - label: "Updated", - }, - { - title: "Dropdown Menu", - href: "/docs/components/dropdown-menu", - items: [], - }, - { - title: "Hover Card", - href: "/docs/components/hover-card", - items: [], - }, - { - title: "Menubar", - href: "/docs/components/menubar", - items: [], - }, - { - title: "Navigation Menu", - href: "/docs/components/navigation-menu", - items: [], - }, - { - title: "Number Field", - href: "/docs/components/number-field", - items: [], - }, - { - title: "OTP Field", - href: "/docs/components/otp-field", - items: [], - }, - { - title: "Pagination", - href: "/docs/components/pagination", - items: [], - }, - { - title: "Popover", - href: "/docs/components/popover", - items: [], - }, - { - title: "Progress", - href: "/docs/components/progress", - items: [], - }, - { - title: "Radio Group", - href: "/docs/components/radio-group", - items: [], - }, - { - title: "Resizable", - href: "/docs/components/resizable", - items: [], - }, - { - title: "Select", - href: "/docs/components/select", - items: [], - }, - { - title: "Separator", - href: "/docs/components/separator", - items: [], - }, - { - title: "Sidebar", - href: "/docs/components/sidebar", - items: [], - label: "New", - }, - { - title: "Skeleton", - href: "/docs/components/skeleton", - items: [], - }, - { - title: "Sonner", - href: "/docs/components/sonner", - items: [], - label: "Updated", - }, - { - title: "Switch", - href: "/docs/components/switch", - items: [], - }, - { - title: "Table", - href: "/docs/components/table", - items: [], - }, - { - title: "Tabs", - href: "/docs/components/tabs", - items: [], - }, - { - title: "Text Field", - href: "/docs/components/textfield", - items: [], - }, - { - title: "Textarea", - href: "/docs/components/textarea", - items: [], - }, - { - title: "Toast", - href: "/docs/components/toast", - items: [], - }, - { - title: "Toggle Group", - href: "/docs/components/toggle-group", - items: [], - }, - { - title: "Toggle", - href: "/docs/components/toggle", - items: [], - }, - { - title: "Tooltip", - href: "/docs/components/tooltip", - items: [], - }, - ], - }, - ], -}; + mainNav: [ + { + title: "Docs", + href: "/docs/introduction", + }, + { + title: "Components", + href: "/docs/components/accordion", + }, + { + title: "Blocks", + href: "/blocks", + }, + { + title: "Charts", + href: "/charts", + }, + ], + sidebarNav: [ + { + title: "Getting Started", + items: [ + { + title: "Introduction", + href: "/docs/introduction", + items: [], + }, + { + title: "components.json", + href: "/docs/components-json", + items: [], + }, + { + title: "Theming", + href: "/docs/theming", + items: [], + }, + { + title: "Dark mode", + href: "/docs/dark-mode", + items: [], + }, + { + title: "CLI", + href: "/docs/cli", + items: [], + }, + { + title: "Figma", + href: "/docs/figma", + items: [], + }, + { + title: "Changelog", + href: "/docs/changelog#dec-2024---updates", + items: [], + }, + { + title: "About", + href: "/docs/about", + items: [], + }, + ], + }, + { + title: "Installation", + items: [ + { + title: "Solid Start", + href: "/docs/installation/solid-start", + items: [], + }, + { + title: "Astro", + href: "/docs/installation/astro", + items: [], + }, + { + title: "Manual", + href: "/docs/installation/manual", + items: [], + }, + ], + }, + { + title: "Components", + items: [ + { + title: "Accordion", + href: "/docs/components/accordion", + items: [], + }, + { + title: "Alert", + href: "/docs/components/alert", + items: [], + }, + { + title: "Alert Dialog", + href: "/docs/components/alert-dialog", + items: [], + }, + { + title: "Badge", + href: "/docs/components/badge", + items: [], + }, + { + title: "Button", + href: "/docs/components/button", + items: [], + }, + { + title: "Card", + href: "/docs/components/card", + items: [], + }, + { + title: "Carousel", + href: "/docs/components/carousel", + items: [], + }, + { + title: "Chart", + href: "/docs/components/chart", + items: [], + label: "New", + }, + { + title: "Checkbox", + href: "/docs/components/checkbox", + items: [], + }, + { + title: "Collapsible", + href: "/docs/components/collapsible", + items: [], + }, + { + title: "Combobox", + href: "/docs/components/combobox", + items: [], + }, + { + title: "Command", + href: "/docs/components/command", + items: [], + }, + { + title: "Context Menu", + href: "/docs/components/context-menu", + items: [], + }, + { + title: "Data Table", + href: "/docs/components/data-table", + items: [], + }, + { + title: "Date Picker", + href: "/docs/components/date-picker", + items: [], + }, + { + title: "Dialog", + href: "/docs/components/dialog", + items: [], + }, + { + title: "Drawer", + href: "/docs/components/drawer", + items: [], + label: "Updated", + }, + { + title: "Dropdown Menu", + href: "/docs/components/dropdown-menu", + items: [], + }, + { + title: "Hover Card", + href: "/docs/components/hover-card", + items: [], + }, + { + title: "Menubar", + href: "/docs/components/menubar", + items: [], + }, + { + title: "Navigation Menu", + href: "/docs/components/navigation-menu", + items: [], + }, + { + title: "Number Field", + href: "/docs/components/number-field", + items: [], + }, + { + title: "OTP Field", + href: "/docs/components/otp-field", + items: [], + }, + { + title: "Pagination", + href: "/docs/components/pagination", + items: [], + }, + { + title: "Popover", + href: "/docs/components/popover", + items: [], + }, + { + title: "Progress", + href: "/docs/components/progress", + items: [], + }, + { + title: "Radio Group", + href: "/docs/components/radio-group", + items: [], + }, + { + title: "Resizable", + href: "/docs/components/resizable", + items: [], + }, + { + title: "Select", + href: "/docs/components/select", + items: [], + }, + { + title: "Separator", + href: "/docs/components/separator", + items: [], + }, + { + title: "Sidebar", + href: "/docs/components/sidebar", + items: [], + label: "New", + }, + { + title: "Skeleton", + href: "/docs/components/skeleton", + items: [], + }, + { + title: "Sonner", + href: "/docs/components/sonner", + items: [], + label: "Updated", + }, + { + title: "Switch", + href: "/docs/components/switch", + items: [], + }, + { + title: "Table", + href: "/docs/components/table", + items: [], + }, + { + title: "Tabs", + href: "/docs/components/tabs", + items: [], + }, + { + title: "Text Field", + href: "/docs/components/textfield", + items: [], + }, + { + title: "Textarea", + href: "/docs/components/textarea", + items: [], + }, + { + title: "Toast", + href: "/docs/components/toast", + items: [], + }, + { + title: "Toggle Group", + href: "/docs/components/toggle-group", + items: [], + }, + { + title: "Toggle", + href: "/docs/components/toggle", + items: [], + }, + { + title: "Tooltip", + href: "/docs/components/tooltip", + items: [], + }, + ], + }, + ], +} diff --git a/docs/src/config/site.ts b/docs/src/config/site.ts index 63548fb1..79cdd0f7 100644 --- a/docs/src/config/site.ts +++ b/docs/src/config/site.ts @@ -1,14 +1,14 @@ export const siteConfig = { - title: "shadcn-solid", - url: "https://shadcn-solid.com", - description: - "Beautifully designed components built with your choice of UI and CSS frameworks.", - links: { - facebook: "https://twitter.com/hnggngnn", - github: "https://github.com/hngngn/shadcn-solid", - shadcn: { - twitter: "https://twitter.com/shadcn", - github: "https://github.com/shadcn/ui", - }, - }, -}; + title: "shadcn-solid", + url: "https://shadcn-solid.com", + description: + "Beautifully designed components built with your choice of UI and CSS frameworks.", + links: { + facebook: "https://twitter.com/hnggngnn", + github: "https://github.com/hngngn/shadcn-solid", + shadcn: { + twitter: "https://twitter.com/shadcn", + github: "https://github.com/shadcn/ui", + }, + }, +} diff --git a/docs/src/entry-client.tsx b/docs/src/entry-client.tsx index 9bda7ce9..7c9b9b2f 100644 --- a/docs/src/entry-client.tsx +++ b/docs/src/entry-client.tsx @@ -1,4 +1,4 @@ // @refresh reload -import { StartClient, mount } from "@solidjs/start/client"; +import { StartClient, mount } from "@solidjs/start/client" -mount(() => , document.getElementById("app")!); +mount(() => , document.getElementById("app")!) diff --git a/docs/src/entry-server.tsx b/docs/src/entry-server.tsx index 401eff83..2c2e2995 100644 --- a/docs/src/entry-server.tsx +++ b/docs/src/entry-server.tsx @@ -1,5 +1,5 @@ // @refresh reload -import { createHandler, StartServer } from "@solidjs/start/server"; +import { StartServer, createHandler } from "@solidjs/start/server" export default createHandler(() => ( ( )} /> -)); +)) diff --git a/docs/src/global.d.ts b/docs/src/global.d.ts index 81e3968a..18f230ec 100644 --- a/docs/src/global.d.ts +++ b/docs/src/global.d.ts @@ -1,18 +1,18 @@ /// declare module "virtual:content" { - export const allDocs: { - heading: { depth: number; slug: string; text: string }[]; - frontmatter: { - title: string; - description: string; - component?: boolean; - link?: { - doc?: string; - api?: string; - }; - toc?: boolean; - }; - slug: string; - }; + export const allDocs: { + heading: { depth: number; slug: string; text: string }[] + frontmatter: { + title: string + description: string + component?: boolean + link?: { + doc?: string + api?: string + } + toc?: boolean + } + slug: string + } } diff --git a/docs/src/libs/blocks.ts b/docs/src/libs/blocks.ts index c2269254..26dc8e6b 100644 --- a/docs/src/libs/blocks.ts +++ b/docs/src/libs/blocks.ts @@ -1,28 +1,29 @@ -"use server"; +"use server" -import { Index } from "@/__registry__"; -import { registryEntrySchema } from "@/registry/schema"; -import * as v from "valibot"; +import { Index } from "@/__registry__" +import * as v from "valibot" -const BLOCKS_WHITELIST_PREFIXES = ["sidebar"]; -const REGISTRY_BLOCK_TYPES = ["registry:block"]; +import { registryEntrySchema } from "@/registry/schema" + +const BLOCKS_WHITELIST_PREFIXES = ["sidebar"] +const REGISTRY_BLOCK_TYPES = ["registry:block"] export const getAllBlockId = async () => { - const blocks = await _getAllBlocks(); - return blocks.map((block) => block.name); -}; + const blocks = await _getAllBlocks() + return blocks.map((block) => block.name) +} const _getAllBlocks = async () => { - const index = await v.parseAsync( - v.record(v.string(), registryEntrySchema), - Index.tailwindcss, - ); + const index = await v.parseAsync( + v.record(v.string(), registryEntrySchema), + Index.tailwindcss + ) - return Object.values(index).filter((block) => - BLOCKS_WHITELIST_PREFIXES.some( - (prefix) => - block.name.startsWith(prefix) && - REGISTRY_BLOCK_TYPES.includes(block.type), - ), - ); -}; + return Object.values(index).filter((block) => + BLOCKS_WHITELIST_PREFIXES.some( + (prefix) => + block.name.startsWith(prefix) && + REGISTRY_BLOCK_TYPES.includes(block.type) + ) + ) +} diff --git a/docs/src/libs/highlight-code.ts b/docs/src/libs/highlight-code.ts index b4c2a6a2..756eeb14 100644 --- a/docs/src/libs/highlight-code.ts +++ b/docs/src/libs/highlight-code.ts @@ -1,31 +1,31 @@ -import type { HighlighterCore } from "shiki"; -import { createHighlighterCore } from "shiki/core"; -import { createOnigurumaEngine } from "shiki/engine/oniguruma"; +import type { HighlighterCore } from "shiki" +import { createHighlighterCore } from "shiki/core" +import { createOnigurumaEngine } from "shiki/engine/oniguruma" -let highlighterPromise: Promise | null = null; +let highlighterPromise: Promise | null = null const getHighlighter = async () => { - if (!highlighterPromise) { - highlighterPromise = createHighlighterCore({ - themes: [import("shiki/themes/vesper.mjs")], - langs: [import("shiki/langs/tsx.mjs")], - engine: createOnigurumaEngine(import("shiki/wasm")), - }); - } - return highlighterPromise; -}; + if (!highlighterPromise) { + highlighterPromise = createHighlighterCore({ + themes: [import("shiki/themes/vesper.mjs")], + langs: [import("shiki/langs/tsx.mjs")], + engine: createOnigurumaEngine(import("shiki/wasm")), + }) + } + return highlighterPromise +} export const highlightCode = async (code: string) => { - const highlighter = await getHighlighter(); - return highlighter.codeToHtml(code, { - lang: "tsx", - theme: "vesper", - transformers: [ - { - code(node) { - node.properties["data-line-numbers"] = ""; - }, - }, - ], - }); -}; + const highlighter = await getHighlighter() + return highlighter.codeToHtml(code, { + lang: "tsx", + theme: "vesper", + transformers: [ + { + code(node) { + node.properties["data-line-numbers"] = "" + }, + }, + ], + }) +} diff --git a/docs/src/libs/registry.ts b/docs/src/libs/registry.ts index ff99f576..eb080cff 100644 --- a/docs/src/libs/registry.ts +++ b/docs/src/libs/registry.ts @@ -1,260 +1,261 @@ /* eslint-disable @typescript-eslint/no-unsafe-argument */ -import fs from "node:fs"; -import { tmpdir } from "node:os"; -import path from "node:path"; -import { Index } from "@/__registry__"; +import fs from "node:fs" +import { tmpdir } from "node:os" +import path from "node:path" +import { Index } from "@/__registry__" +import { Project, ScriptKind, SyntaxKind, type SourceFile } from "ts-morph" +import * as v from "valibot" + import { - registryEntrySchema, - type registryItemFileSchema, -} from "@/registry/schema"; -import { Project, ScriptKind, type SourceFile, SyntaxKind } from "ts-morph"; -import * as v from "valibot"; + registryEntrySchema, + type registryItemFileSchema, +} from "@/registry/schema" const memoizedIndex: typeof Index = Object.fromEntries( - Object.entries(Index).map(([style, items]) => [style, { ...items }]), -); + Object.entries(Index).map(([style, items]) => [style, { ...items }]) +) const createTempSourceFile = (filename: string) => { - const dir = fs.mkdtempSync(path.join(tmpdir(), "shadcn-")); - return path.join(dir, filename); -}; + const dir = fs.mkdtempSync(path.join(tmpdir(), "shadcn-")) + return path.join(dir, filename) +} const removeVariable = (sourceFile: SourceFile, name: string) => { - sourceFile.getVariableDeclaration(name)?.remove(); -}; + sourceFile.getVariableDeclaration(name)?.remove() +} const fixImport = (content: string) => { - const regex = /@\/(.+?)\/((?:.*?\/)?(?:components|ui|hooks|lib))\/([\w-]+)/g; - - const replacement = ( - match: string, - path: string, - type: string, - component: string, - ) => { - if (type.endsWith("components")) { - return `@/components/${component}`; - } - if (type.endsWith("ui")) { - return `@/components/ui/${component}`; - } - if (type.endsWith("hooks")) { - return `@/hooks/${component}`; - } - if (type.endsWith("lib")) { - return `@/lib/${component}`; - } - - return match; - }; - - return content.replace(regex, replacement); -}; + const regex = /@\/(.+?)\/((?:.*?\/)?(?:components|ui|hooks|lib))\/([\w-]+)/g + + const replacement = ( + match: string, + path: string, + type: string, + component: string + ) => { + if (type.endsWith("components")) { + return `@/components/${component}` + } + if (type.endsWith("ui")) { + return `@/components/ui/${component}` + } + if (type.endsWith("hooks")) { + return `@/hooks/${component}` + } + if (type.endsWith("lib")) { + return `@/lib/${component}` + } + + return match + } + + return content.replace(regex, replacement) +} export const getFileContent = (filePath: string) => { - const raw = fs.readFileSync(filePath, "utf-8"); + const raw = fs.readFileSync(filePath, "utf-8") - const project = new Project({ - compilerOptions: {}, - }); + const project = new Project({ + compilerOptions: {}, + }) - const tempFile = createTempSourceFile(filePath); - const sourceFile = project.createSourceFile(tempFile, raw, { - scriptKind: ScriptKind.TSX, - }); + const tempFile = createTempSourceFile(filePath) + const sourceFile = project.createSourceFile(tempFile, raw, { + scriptKind: ScriptKind.TSX, + }) - // Remove meta variables. - removeVariable(sourceFile, "iframeHeight"); - removeVariable(sourceFile, "containerClassName"); - removeVariable(sourceFile, "description"); + // Remove meta variables. + removeVariable(sourceFile, "iframeHeight") + removeVariable(sourceFile, "containerClassName") + removeVariable(sourceFile, "description") - let code = sourceFile.getFullText(); + let code = sourceFile.getFullText() - // Fix imports. - code = fixImport(code); + // Fix imports. + code = fixImport(code) - return JSON.stringify(code, null, 4); -}; + return JSON.stringify(code, null, 4) +} const extractVariable = (sourceFile: SourceFile, name: string) => { - const variable = sourceFile.getVariableDeclaration(name); - if (!variable) { - return null; - } + const variable = sourceFile.getVariableDeclaration(name) + if (!variable) { + return null + } - const value = variable - .getInitializerIfKindOrThrow(SyntaxKind.StringLiteral) - .getLiteralValue(); + const value = variable + .getInitializerIfKindOrThrow(SyntaxKind.StringLiteral) + .getLiteralValue() - variable.remove(); + variable.remove() - return value; -}; + return value +} export const getFileMeta = (filePath: string) => { - const raw = fs.readFileSync(filePath, "utf-8"); + const raw = fs.readFileSync(filePath, "utf-8") - const project = new Project({ - compilerOptions: {}, - }); + const project = new Project({ + compilerOptions: {}, + }) - const tempFile = createTempSourceFile(filePath); - const sourceFile = project.createSourceFile(tempFile, raw, { - scriptKind: ScriptKind.TSX, - }); + const tempFile = createTempSourceFile(filePath) + const sourceFile = project.createSourceFile(tempFile, raw, { + scriptKind: ScriptKind.TSX, + }) - const iframeHeight = extractVariable(sourceFile, "iframeHeight"); - const containerClassName = extractVariable(sourceFile, "containerClassName"); - const description = extractVariable(sourceFile, "description"); + const iframeHeight = extractVariable(sourceFile, "iframeHeight") + const containerClassName = extractVariable(sourceFile, "containerClassName") + const description = extractVariable(sourceFile, "description") - return { - iframeHeight, - containerClassName, - description, - }; -}; + return { + iframeHeight, + containerClassName, + description, + } +} const getFileTarget = (file: v.InferInput) => { - let target = file.target; + let target = file.target - if (!target || target === "") { - const fileName = file.path.split("\\").pop(); + if (!target || target === "") { + const fileName = file.path.split("\\").pop() - if ( - file.type === "registry:block" || - file.type === "registry:component" || - file.type === "registry:example" - ) { - target = `src/components/${fileName}`; - } + if ( + file.type === "registry:block" || + file.type === "registry:component" || + file.type === "registry:example" + ) { + target = `src/components/${fileName}` + } - if (file.type === "registry:ui") { - target = `src/components/ui/${fileName}`; - } + if (file.type === "registry:ui") { + target = `src/components/ui/${fileName}` + } - if (file.type === "registry:hook") { - target = `src/hooks/${fileName}`; - } + if (file.type === "registry:hook") { + target = `src/hooks/${fileName}` + } - if (file.type === "registry:libs") { - target = `src/libs/${fileName}`; - } - } + if (file.type === "registry:libs") { + target = `src/libs/${fileName}` + } + } - return target; -}; + return target +} export const fixFilePaths = ( - files: v.InferInput["files"], + files: v.InferInput["files"] ) => { - if (!files) { - return []; - } - - // Resolve all paths relative to the first file's directory. - const firstFilePath = files[0].path; - const firstFilePathDir = path.dirname(firstFilePath); - - return files.map((file) => { - return { - ...file, - path: path.relative(firstFilePathDir, file.path), - target: getFileTarget(file), - }; - }); -}; + if (!files) { + return [] + } + + // Resolve all paths relative to the first file's directory. + const firstFilePath = files[0].path + const firstFilePathDir = path.dirname(firstFilePath) + + return files.map((file) => { + return { + ...file, + path: path.relative(firstFilePathDir, file.path), + target: getFileTarget(file), + } + }) +} export const getRegistryItem = (name: string) => { - const item = memoizedIndex.tailwindcss[name]; - - if (!item) { - return null; - } - - // Convert all file paths to object. - // TODO: remove when we migrate to new registry. - item.files = item.files.map((file: unknown) => - typeof file === "string" ? { path: file } : file, - ); - - // Fail early before doing expensive file operations. - const result = v.safeParse(registryEntrySchema, item); - if (!result.success) { - return null; - } - - let files: typeof result.output.files = []; - for (const file of item.files) { - const content = getFileContent(file.path); - const relativePath = path.relative(process.cwd(), file.path); - - files.push({ - ...file, - path: relativePath, - content, - }); - } - - // Get meta. - // Assume the first file is the main file. - const meta = getFileMeta(files[0].path); - - // Fix file paths. - files = fixFilePaths(files); - - const parsed = v.safeParse(registryEntrySchema, { - ...result.output, - files, - meta, - }); - - if (!parsed.success) { - console.error(parsed.issues); - return null; - } - - return parsed.output; -}; + const item = memoizedIndex.tailwindcss[name] + + if (!item) { + return null + } + + // Convert all file paths to object. + // TODO: remove when we migrate to new registry. + item.files = item.files.map((file: unknown) => + typeof file === "string" ? { path: file } : file + ) + + // Fail early before doing expensive file operations. + const result = v.safeParse(registryEntrySchema, item) + if (!result.success) { + return null + } + + let files: typeof result.output.files = [] + for (const file of item.files) { + const content = getFileContent(file.path) + const relativePath = path.relative(process.cwd(), file.path) + + files.push({ + ...file, + path: relativePath, + content, + }) + } + + // Get meta. + // Assume the first file is the main file. + const meta = getFileMeta(files[0].path) + + // Fix file paths. + files = fixFilePaths(files) + + const parsed = v.safeParse(registryEntrySchema, { + ...result.output, + files, + meta, + }) + + if (!parsed.success) { + console.error(parsed.issues) + return null + } + + return parsed.output +} export type FileTree = { - name: string; - path?: string; - children?: FileTree[]; -}; + name: string + path?: string + children?: FileTree[] +} export const createFileTreeForRegistryItemFiles = ( - files: { path: string; target?: string }[], + files: { path: string; target?: string }[] ) => { - const root: FileTree[] = []; - - for (const file of files) { - const path = file.target ?? file.path; - const parts = path.split("/"); - let currentLevel = root; - for (let i = 0; i < parts.length; i++) { - const part = parts[i]; - const isFile = i === parts.length - 1; - const existingNode = currentLevel.find((node) => node.name === part); - if (existingNode) { - if (isFile) { - // Update existing file node with full path - existingNode.path = path; - } else { - // Move to next level in the tree - currentLevel = existingNode.children!; - } - } else { - const newNode: FileTree = isFile - ? { name: part, path } - : { name: part, children: [] }; - currentLevel.push(newNode); - if (!isFile) { - currentLevel = newNode.children!; - } - } - } - } - - return root; -}; + const root: FileTree[] = [] + + for (const file of files) { + const path = file.target ?? file.path + const parts = path.split("/") + let currentLevel = root + for (let i = 0; i < parts.length; i++) { + const part = parts[i] + const isFile = i === parts.length - 1 + const existingNode = currentLevel.find((node) => node.name === part) + if (existingNode) { + if (isFile) { + // Update existing file node with full path + existingNode.path = path + } else { + // Move to next level in the tree + currentLevel = existingNode.children! + } + } else { + const newNode: FileTree = isFile + ? { name: part, path } + : { name: part, children: [] } + currentLevel.push(newNode) + if (!isFile) { + currentLevel = newNode.children! + } + } + } + } + + return root +} diff --git a/docs/src/registry/base-color.ts b/docs/src/registry/base-color.ts index 4abedc29..a63f399d 100644 --- a/docs/src/registry/base-color.ts +++ b/docs/src/registry/base-color.ts @@ -1,756 +1,756 @@ export const baseColors = [ - { - name: "zinc", - label: "Zinc", - activeColor: { - light: "240 5.9% 10%", - dark: "240 5.2% 33.9%", - }, - cssVars: { - light: { - background: "0 0% 100%", - foreground: "240 10% 3.9%", - card: "0 0% 100%", - "card-foreground": "240 10% 3.9%", - popover: "0 0% 100%", - "popover-foreground": "240 10% 3.9%", - primary: "240 5.9% 10%", - "primary-foreground": "0 0% 98%", - secondary: "240 4.8% 95.9%", - "secondary-foreground": "240 5.9% 10%", - muted: "240 4.8% 95.9%", - "muted-foreground": "240 3.8% 46.1%", - accent: "240 4.8% 95.9%", - "accent-foreground": "240 5.9% 10%", - destructive: "0 84.2% 60.2%", - "destructive-foreground": "0 0% 98%", - border: "240 5.9% 90%", - input: "240 5.9% 90%", - ring: "240 5.9% 10%", - radius: "0.5rem", - "chart-1": "12 76% 61%", - "chart-2": "173 58% 39%", - "chart-3": "197 37% 24%", - "chart-4": "43 74% 66%", - "chart-5": "27 87% 67%", - }, - dark: { - background: "240 10% 3.9%", - foreground: "0 0% 98%", - card: "240 10% 3.9%", - "card-foreground": "0 0% 98%", - popover: "240 10% 3.9%", - "popover-foreground": "0 0% 98%", - primary: "0 0% 98%", - "primary-foreground": "240 5.9% 10%", - secondary: "240 3.7% 15.9%", - "secondary-foreground": "0 0% 98%", - muted: "240 3.7% 15.9%", - "muted-foreground": "240 5% 64.9%", - accent: "240 3.7% 15.9%", - "accent-foreground": "0 0% 98%", - destructive: "0 62.8% 30.6%", - "destructive-foreground": "0 0% 98%", - border: "240 3.7% 15.9%", - input: "240 3.7% 15.9%", - ring: "240 4.9% 83.9%", - "chart-1": "220 70% 50%", - "chart-2": "160 60% 45%", - "chart-3": "30 80% 55%", - "chart-4": "280 65% 60%", - "chart-5": "340 75% 55%", - }, - }, - }, - { - name: "slate", - label: "Slate", - activeColor: { - light: "215.4 16.3% 46.9%", - dark: "215.3 19.3% 34.5%", - }, - cssVars: { - light: { - background: "0 0% 100%", - foreground: "222.2 84% 4.9%", - card: "0 0% 100%", - "card-foreground": "222.2 84% 4.9%", - popover: "0 0% 100%", - "popover-foreground": "222.2 84% 4.9%", - primary: "222.2 47.4% 11.2%", - "primary-foreground": "210 40% 98%", - secondary: "210 40% 96.1%", - "secondary-foreground": "222.2 47.4% 11.2%", - muted: "210 40% 96.1%", - "muted-foreground": "215.4 16.3% 46.9%", - accent: "210 40% 96.1%", - "accent-foreground": "222.2 47.4% 11.2%", - destructive: "0 84.2% 60.2%", - "destructive-foreground": "210 40% 98%", - border: "214.3 31.8% 91.4%", - input: "214.3 31.8% 91.4%", - ring: "222.2 84% 4.9%", - radius: "0.5rem", - "chart-1": "12 76% 61%", - "chart-2": "173 58% 39%", - "chart-3": "197 37% 24%", - "chart-4": "43 74% 66%", - "chart-5": "27 87% 67%", - }, - dark: { - background: "222.2 84% 4.9%", - foreground: "210 40% 98%", - card: "222.2 84% 4.9%", - "card-foreground": "210 40% 98%", - popover: "222.2 84% 4.9%", - "popover-foreground": "210 40% 98%", - primary: "210 40% 98%", - "primary-foreground": "222.2 47.4% 11.2%", - secondary: "217.2 32.6% 17.5%", - "secondary-foreground": "210 40% 98%", - muted: "217.2 32.6% 17.5%", - "muted-foreground": "215 20.2% 65.1%", - accent: "217.2 32.6% 17.5%", - "accent-foreground": "210 40% 98%", - destructive: "0 62.8% 30.6%", - "destructive-foreground": "210 40% 98%", - border: "217.2 32.6% 17.5%", - input: "217.2 32.6% 17.5%", - ring: "212.7 26.8% 83.9", - "chart-1": "220 70% 50%", - "chart-2": "160 60% 45%", - "chart-3": "30 80% 55%", - "chart-4": "280 65% 60%", - "chart-5": "340 75% 55%", - }, - }, - }, - { - name: "stone", - label: "Stone", - activeColor: { - light: "25 5.3% 44.7%", - dark: "33.3 5.5% 32.4%", - }, - cssVars: { - light: { - background: "0 0% 100%", - foreground: "20 14.3% 4.1%", - card: "0 0% 100%", - "card-foreground": "20 14.3% 4.1%", - popover: "0 0% 100%", - "popover-foreground": "20 14.3% 4.1%", - primary: "24 9.8% 10%", - "primary-foreground": "60 9.1% 97.8%", - secondary: "60 4.8% 95.9%", - "secondary-foreground": "24 9.8% 10%", - muted: "60 4.8% 95.9%", - "muted-foreground": "25 5.3% 44.7%", - accent: "60 4.8% 95.9%", - "accent-foreground": "24 9.8% 10%", - destructive: "0 84.2% 60.2%", - "destructive-foreground": "60 9.1% 97.8%", - border: "20 5.9% 90%", - input: "20 5.9% 90%", - ring: "20 14.3% 4.1%", - radius: "0.95rem", - "chart-1": "12 76% 61%", - "chart-2": "173 58% 39%", - "chart-3": "197 37% 24%", - "chart-4": "43 74% 66%", - "chart-5": "27 87% 67%", - }, - dark: { - background: "20 14.3% 4.1%", - foreground: "60 9.1% 97.8%", - card: "20 14.3% 4.1%", - "card-foreground": "60 9.1% 97.8%", - popover: "20 14.3% 4.1%", - "popover-foreground": "60 9.1% 97.8%", - primary: "60 9.1% 97.8%", - "primary-foreground": "24 9.8% 10%", - secondary: "12 6.5% 15.1%", - "secondary-foreground": "60 9.1% 97.8%", - muted: "12 6.5% 15.1%", - "muted-foreground": "24 5.4% 63.9%", - accent: "12 6.5% 15.1%", - "accent-foreground": "60 9.1% 97.8%", - destructive: "0 62.8% 30.6%", - "destructive-foreground": "60 9.1% 97.8%", - border: "12 6.5% 15.1%", - input: "12 6.5% 15.1%", - ring: "24 5.7% 82.9%", - "chart-1": "220 70% 50%", - "chart-2": "160 60% 45%", - "chart-3": "30 80% 55%", - "chart-4": "280 65% 60%", - "chart-5": "340 75% 55%", - }, - }, - }, - { - name: "gray", - label: "Gray", - activeColor: { - light: "220 8.9% 46.1%", - dark: "215 13.8% 34.1%", - }, - cssVars: { - light: { - background: "0 0% 100%", - foreground: "224 71.4% 4.1%", - card: "0 0% 100%", - "card-foreground": "224 71.4% 4.1%", - popover: "0 0% 100%", - "popover-foreground": "224 71.4% 4.1%", - primary: "220.9 39.3% 11%", - "primary-foreground": "210 20% 98%", - secondary: "220 14.3% 95.9%", - "secondary-foreground": "220.9 39.3% 11%", - muted: "220 14.3% 95.9%", - "muted-foreground": "220 8.9% 46.1%", - accent: "220 14.3% 95.9%", - "accent-foreground": "220.9 39.3% 11%", - destructive: "0 84.2% 60.2%", - "destructive-foreground": "210 20% 98%", - border: "220 13% 91%", - input: "220 13% 91%", - ring: "224 71.4% 4.1%", - radius: "0.35rem", - "chart-1": "12 76% 61%", - "chart-2": "173 58% 39%", - "chart-3": "197 37% 24%", - "chart-4": "43 74% 66%", - "chart-5": "27 87% 67%", - }, - dark: { - background: "224 71.4% 4.1%", - foreground: "210 20% 98%", - card: "224 71.4% 4.1%", - "card-foreground": "210 20% 98%", - popover: "224 71.4% 4.1%", - "popover-foreground": "210 20% 98%", - primary: "210 20% 98%", - "primary-foreground": "220.9 39.3% 11%", - secondary: "215 27.9% 16.9%", - "secondary-foreground": "210 20% 98%", - muted: "215 27.9% 16.9%", - "muted-foreground": "217.9 10.6% 64.9%", - accent: "215 27.9% 16.9%", - "accent-foreground": "210 20% 98%", - destructive: "0 62.8% 30.6%", - "destructive-foreground": "210 20% 98%", - border: "215 27.9% 16.9%", - input: "215 27.9% 16.9%", - ring: "216 12.2% 83.9%", - "chart-1": "220 70% 50%", - "chart-2": "160 60% 45%", - "chart-3": "30 80% 55%", - "chart-4": "280 65% 60%", - "chart-5": "340 75% 55%", - }, - }, - }, - { - name: "neutral", - label: "Neutral", - activeColor: { - light: "0 0% 45.1%", - dark: "0 0% 32.2%", - }, - cssVars: { - light: { - background: "0 0% 100%", - foreground: "0 0% 3.9%", - card: "0 0% 100%", - "card-foreground": "0 0% 3.9%", - popover: "0 0% 100%", - "popover-foreground": "0 0% 3.9%", - primary: "0 0% 9%", - "primary-foreground": "0 0% 98%", - secondary: "0 0% 96.1%", - "secondary-foreground": "0 0% 9%", - muted: "0 0% 96.1%", - "muted-foreground": "0 0% 45.1%", - accent: "0 0% 96.1%", - "accent-foreground": "0 0% 9%", - destructive: "0 84.2% 60.2%", - "destructive-foreground": "0 0% 98%", - border: "0 0% 89.8%", - input: "0 0% 89.8%", - ring: "0 0% 3.9%", - "chart-1": "12 76% 61%", - "chart-2": "173 58% 39%", - "chart-3": "197 37% 24%", - "chart-4": "43 74% 66%", - "chart-5": "27 87% 67%", - }, - dark: { - background: "0 0% 3.9%", - foreground: "0 0% 98%", - card: "0 0% 3.9%", - "card-foreground": "0 0% 98%", - popover: "0 0% 3.9%", - "popover-foreground": "0 0% 98%", - primary: "0 0% 98%", - "primary-foreground": "0 0% 9%", - secondary: "0 0% 14.9%", - "secondary-foreground": "0 0% 98%", - muted: "0 0% 14.9%", - "muted-foreground": "0 0% 63.9%", - accent: "0 0% 14.9%", - "accent-foreground": "0 0% 98%", - destructive: "0 62.8% 30.6%", - "destructive-foreground": "0 0% 98%", - border: "0 0% 14.9%", - input: "0 0% 14.9%", - ring: "0 0% 83.1%", - "chart-1": "220 70% 50%", - "chart-2": "160 60% 45%", - "chart-3": "30 80% 55%", - "chart-4": "280 65% 60%", - "chart-5": "340 75% 55%", - }, - }, - }, - { - name: "red", - label: "Red", - activeColor: { - light: "0 72.2% 50.6%", - dark: "0 72.2% 50.6%", - }, - cssVars: { - light: { - background: "0 0% 100%", - foreground: "0 0% 3.9%", - card: "0 0% 100%", - "card-foreground": "0 0% 3.9%", - popover: "0 0% 100%", - "popover-foreground": "0 0% 3.9%", - primary: "0 72.2% 50.6%", - "primary-foreground": "0 85.7% 97.3%", - secondary: "0 0% 96.1%", - "secondary-foreground": "0 0% 9%", - muted: "0 0% 96.1%", - "muted-foreground": "0 0% 45.1%", - accent: "0 0% 96.1%", - "accent-foreground": "0 0% 9%", - destructive: "0 84.2% 60.2%", - "destructive-foreground": "0 0% 98%", - border: "0 0% 89.8%", - input: "0 0% 89.8%", - ring: "0 72.2% 50.6%", - radius: "0.4rem", - "chart-1": "12 76% 61%", - "chart-2": "173 58% 39%", - "chart-3": "197 37% 24%", - "chart-4": "43 74% 66%", - "chart-5": "27 87% 67%", - }, - dark: { - background: "0 0% 3.9%", - foreground: "0 0% 98%", - card: "0 0% 3.9%", - "card-foreground": "0 0% 98%", - popover: "0 0% 3.9%", - "popover-foreground": "0 0% 98%", - primary: "0 72.2% 50.6%", - "primary-foreground": "0 85.7% 97.3%", - secondary: "0 0% 14.9%", - "secondary-foreground": "0 0% 98%", - muted: "0 0% 14.9%", - "muted-foreground": "0 0% 63.9%", - accent: "0 0% 14.9%", - "accent-foreground": "0 0% 98%", - destructive: "0 62.8% 30.6%", - "destructive-foreground": "0 0% 98%", - border: "0 0% 14.9%", - input: "0 0% 14.9%", - ring: "0 72.2% 50.6%", - "chart-1": "220 70% 50%", - "chart-2": "160 60% 45%", - "chart-3": "30 80% 55%", - "chart-4": "280 65% 60%", - "chart-5": "340 75% 55%", - }, - }, - }, - { - name: "rose", - label: "Rose", - activeColor: { - light: "346.8 77.2% 49.8%", - dark: "346.8 77.2% 49.8%", - }, - cssVars: { - light: { - background: "0 0% 100%", - foreground: "240 10% 3.9%", - card: "0 0% 100%", - "card-foreground": "240 10% 3.9%", - popover: "0 0% 100%", - "popover-foreground": "240 10% 3.9%", - primary: "346.8 77.2% 49.8%", - "primary-foreground": "355.7 100% 97.3%", - secondary: "240 4.8% 95.9%", - "secondary-foreground": "240 5.9% 10%", - muted: "240 4.8% 95.9%", - "muted-foreground": "240 3.8% 46.1%", - accent: "240 4.8% 95.9%", - "accent-foreground": "240 5.9% 10%", - destructive: "0 84.2% 60.2%", - "destructive-foreground": "0 0% 98%", - border: "240 5.9% 90%", - input: "240 5.9% 90%", - ring: "346.8 77.2% 49.8%", - radius: "0.5rem", - "chart-1": "12 76% 61%", - "chart-2": "173 58% 39%", - "chart-3": "197 37% 24%", - "chart-4": "43 74% 66%", - "chart-5": "27 87% 67%", - }, - dark: { - background: "20 14.3% 4.1%", - foreground: "0 0% 95%", - popover: "0 0% 9%", - "popover-foreground": "0 0% 95%", - card: "24 9.8% 10%", - "card-foreground": "0 0% 95%", - primary: "346.8 77.2% 49.8%", - "primary-foreground": "355.7 100% 97.3%", - secondary: "240 3.7% 15.9%", - "secondary-foreground": "0 0% 98%", - muted: "0 0% 15%", - "muted-foreground": "240 5% 64.9%", - accent: "12 6.5% 15.1%", - "accent-foreground": "0 0% 98%", - destructive: "0 62.8% 30.6%", - "destructive-foreground": "0 85.7% 97.3%", - border: "240 3.7% 15.9%", - input: "240 3.7% 15.9%", - ring: "346.8 77.2% 49.8%", - "chart-1": "220 70% 50%", - "chart-2": "160 60% 45%", - "chart-3": "30 80% 55%", - "chart-4": "280 65% 60%", - "chart-5": "340 75% 55%", - }, - }, - }, - { - name: "orange", - label: "Orange", - activeColor: { - light: "24.6 95% 53.1%", - dark: "20.5 90.2% 48.2%", - }, - cssVars: { - light: { - background: "0 0% 100%", - foreground: "20 14.3% 4.1%", - card: "0 0% 100%", - "card-foreground": "20 14.3% 4.1%", - popover: "0 0% 100%", - "popover-foreground": "20 14.3% 4.1%", - primary: "24.6 95% 53.1%", - "primary-foreground": "60 9.1% 97.8%", - secondary: "60 4.8% 95.9%", - "secondary-foreground": "24 9.8% 10%", - muted: "60 4.8% 95.9%", - "muted-foreground": "25 5.3% 44.7%", - accent: "60 4.8% 95.9%", - "accent-foreground": "24 9.8% 10%", - destructive: "0 84.2% 60.2%", - "destructive-foreground": "60 9.1% 97.8%", - border: "20 5.9% 90%", - input: "20 5.9% 90%", - ring: "24.6 95% 53.1%", - radius: "0.95rem", - "chart-1": "12 76% 61%", - "chart-2": "173 58% 39%", - "chart-3": "197 37% 24%", - "chart-4": "43 74% 66%", - "chart-5": "27 87% 67%", - }, - dark: { - background: "20 14.3% 4.1%", - foreground: "60 9.1% 97.8%", - card: "20 14.3% 4.1%", - "card-foreground": "60 9.1% 97.8%", - popover: "20 14.3% 4.1%", - "popover-foreground": "60 9.1% 97.8%", - primary: "20.5 90.2% 48.2%", - "primary-foreground": "60 9.1% 97.8%", - secondary: "12 6.5% 15.1%", - "secondary-foreground": "60 9.1% 97.8%", - muted: "12 6.5% 15.1%", - "muted-foreground": "24 5.4% 63.9%", - accent: "12 6.5% 15.1%", - "accent-foreground": "60 9.1% 97.8%", - destructive: "0 72.2% 50.6%", - "destructive-foreground": "60 9.1% 97.8%", - border: "12 6.5% 15.1%", - input: "12 6.5% 15.1%", - ring: "20.5 90.2% 48.2%", - "chart-1": "220 70% 50%", - "chart-2": "160 60% 45%", - "chart-3": "30 80% 55%", - "chart-4": "280 65% 60%", - "chart-5": "340 75% 55%", - }, - }, - }, - { - name: "green", - label: "Green", - activeColor: { - light: "142.1 76.2% 36.3%", - dark: "142.1 70.6% 45.3%", - }, - cssVars: { - light: { - background: "0 0% 100%", - foreground: "240 10% 3.9%", - card: "0 0% 100%", - "card-foreground": "240 10% 3.9%", - popover: "0 0% 100%", - "popover-foreground": "240 10% 3.9%", - primary: "142.1 76.2% 36.3%", - "primary-foreground": "355.7 100% 97.3%", - secondary: "240 4.8% 95.9%", - "secondary-foreground": "240 5.9% 10%", - muted: "240 4.8% 95.9%", - "muted-foreground": "240 3.8% 46.1%", - accent: "240 4.8% 95.9%", - "accent-foreground": "240 5.9% 10%", - destructive: "0 84.2% 60.2%", - "destructive-foreground": "0 0% 98%", - border: "240 5.9% 90%", - input: "240 5.9% 90%", - ring: "142.1 76.2% 36.3%", - "chart-1": "12 76% 61%", - "chart-2": "173 58% 39%", - "chart-3": "197 37% 24%", - "chart-4": "43 74% 66%", - "chart-5": "27 87% 67%", - }, - dark: { - background: "20 14.3% 4.1%", - foreground: "0 0% 95%", - popover: "0 0% 9%", - "popover-foreground": "0 0% 95%", - card: "24 9.8% 10%", - "card-foreground": "0 0% 95%", - primary: "142.1 70.6% 45.3%", - "primary-foreground": "144.9 80.4% 10%", - secondary: "240 3.7% 15.9%", - "secondary-foreground": "0 0% 98%", - muted: "0 0% 15%", - "muted-foreground": "240 5% 64.9%", - accent: "12 6.5% 15.1%", - "accent-foreground": "0 0% 98%", - destructive: "0 62.8% 30.6%", - "destructive-foreground": "0 85.7% 97.3%", - border: "240 3.7% 15.9%", - input: "240 3.7% 15.9%", - ring: "142.4 71.8% 29.2%", - "chart-1": "220 70% 50%", - "chart-2": "160 60% 45%", - "chart-3": "30 80% 55%", - "chart-4": "280 65% 60%", - "chart-5": "340 75% 55%", - }, - }, - }, - { - name: "blue", - label: "Blue", - activeColor: { - light: "221.2 83.2% 53.3%", - dark: "217.2 91.2% 59.8%", - }, - cssVars: { - light: { - background: "0 0% 100%", - foreground: "222.2 84% 4.9%", - card: "0 0% 100%", - "card-foreground": "222.2 84% 4.9%", - popover: "0 0% 100%", - "popover-foreground": "222.2 84% 4.9%", - primary: "221.2 83.2% 53.3%", - "primary-foreground": "210 40% 98%", - secondary: "210 40% 96.1%", - "secondary-foreground": "222.2 47.4% 11.2%", - muted: "210 40% 96.1%", - "muted-foreground": "215.4 16.3% 46.9%", - accent: "210 40% 96.1%", - "accent-foreground": "222.2 47.4% 11.2%", - destructive: "0 84.2% 60.2%", - "destructive-foreground": "210 40% 98%", - border: "214.3 31.8% 91.4%", - input: "214.3 31.8% 91.4%", - ring: "221.2 83.2% 53.3%", - "chart-1": "12 76% 61%", - "chart-2": "173 58% 39%", - "chart-3": "197 37% 24%", - "chart-4": "43 74% 66%", - "chart-5": "27 87% 67%", - }, - dark: { - background: "222.2 84% 4.9%", - foreground: "210 40% 98%", - card: "222.2 84% 4.9%", - "card-foreground": "210 40% 98%", - popover: "222.2 84% 4.9%", - "popover-foreground": "210 40% 98%", - primary: "217.2 91.2% 59.8%", - "primary-foreground": "222.2 47.4% 11.2%", - secondary: "217.2 32.6% 17.5%", - "secondary-foreground": "210 40% 98%", - muted: "217.2 32.6% 17.5%", - "muted-foreground": "215 20.2% 65.1%", - accent: "217.2 32.6% 17.5%", - "accent-foreground": "210 40% 98%", - destructive: "0 62.8% 30.6%", - "destructive-foreground": "210 40% 98%", - border: "217.2 32.6% 17.5%", - input: "217.2 32.6% 17.5%", - ring: "224.3 76.3% 48%", - "chart-1": "220 70% 50%", - "chart-2": "160 60% 45%", - "chart-3": "30 80% 55%", - "chart-4": "280 65% 60%", - "chart-5": "340 75% 55%", - }, - }, - }, - { - name: "yellow", - label: "Yellow", - activeColor: { - light: "47.9 95.8% 53.1%", - dark: "47.9 95.8% 53.1%", - }, - cssVars: { - light: { - background: "0 0% 100%", - foreground: "20 14.3% 4.1%", - card: "0 0% 100%", - "card-foreground": "20 14.3% 4.1%", - popover: "0 0% 100%", - "popover-foreground": "20 14.3% 4.1%", - primary: "47.9 95.8% 53.1%", - "primary-foreground": "26 83.3% 14.1%", - secondary: "60 4.8% 95.9%", - "secondary-foreground": "24 9.8% 10%", - muted: "60 4.8% 95.9%", - "muted-foreground": "25 5.3% 44.7%", - accent: "60 4.8% 95.9%", - "accent-foreground": "24 9.8% 10%", - destructive: "0 84.2% 60.2%", - "destructive-foreground": "60 9.1% 97.8%", - border: "20 5.9% 90%", - input: "20 5.9% 90%", - ring: "20 14.3% 4.1%", - radius: "0.95rem", - "chart-1": "12 76% 61%", - "chart-2": "173 58% 39%", - "chart-3": "197 37% 24%", - "chart-4": "43 74% 66%", - "chart-5": "27 87% 67%", - }, - dark: { - background: "20 14.3% 4.1%", - foreground: "60 9.1% 97.8%", - card: "20 14.3% 4.1%", - "card-foreground": "60 9.1% 97.8%", - popover: "20 14.3% 4.1%", - "popover-foreground": "60 9.1% 97.8%", - primary: "47.9 95.8% 53.1%", - "primary-foreground": "26 83.3% 14.1%", - secondary: "12 6.5% 15.1%", - "secondary-foreground": "60 9.1% 97.8%", - muted: "12 6.5% 15.1%", - "muted-foreground": "24 5.4% 63.9%", - accent: "12 6.5% 15.1%", - "accent-foreground": "60 9.1% 97.8%", - destructive: "0 62.8% 30.6%", - "destructive-foreground": "60 9.1% 97.8%", - border: "12 6.5% 15.1%", - input: "12 6.5% 15.1%", - ring: "35.5 91.7% 32.9%", - "chart-1": "220 70% 50%", - "chart-2": "160 60% 45%", - "chart-3": "30 80% 55%", - "chart-4": "280 65% 60%", - "chart-5": "340 75% 55%", - }, - }, - }, - { - name: "violet", - label: "Violet", - activeColor: { - light: "262.1 83.3% 57.8%", - dark: "263.4 70% 50.4%", - }, - cssVars: { - light: { - background: "0 0% 100%", - foreground: "224 71.4% 4.1%", - card: "0 0% 100%", - "card-foreground": "224 71.4% 4.1%", - popover: "0 0% 100%", - "popover-foreground": "224 71.4% 4.1%", - primary: "262.1 83.3% 57.8%", - "primary-foreground": "210 20% 98%", - secondary: "220 14.3% 95.9%", - "secondary-foreground": "220.9 39.3% 11%", - muted: "220 14.3% 95.9%", - "muted-foreground": "220 8.9% 46.1%", - accent: "220 14.3% 95.9%", - "accent-foreground": "220.9 39.3% 11%", - destructive: "0 84.2% 60.2%", - "destructive-foreground": "210 20% 98%", - border: "220 13% 91%", - input: "220 13% 91%", - ring: "262.1 83.3% 57.8%", - "chart-1": "12 76% 61%", - "chart-2": "173 58% 39%", - "chart-3": "197 37% 24%", - "chart-4": "43 74% 66%", - "chart-5": "27 87% 67%", - }, - dark: { - background: "224 71.4% 4.1%", - foreground: "210 20% 98%", - card: "224 71.4% 4.1%", - "card-foreground": "210 20% 98%", - popover: "224 71.4% 4.1%", - "popover-foreground": "210 20% 98%", - primary: "263.4 70% 50.4%", - "primary-foreground": "210 20% 98%", - secondary: "215 27.9% 16.9%", - "secondary-foreground": "210 20% 98%", - muted: "215 27.9% 16.9%", - "muted-foreground": "217.9 10.6% 64.9%", - accent: "215 27.9% 16.9%", - "accent-foreground": "210 20% 98%", - destructive: "0 62.8% 30.6%", - "destructive-foreground": "210 20% 98%", - border: "215 27.9% 16.9%", - input: "215 27.9% 16.9%", - ring: "263.4 70% 50.4%", - "chart-1": "220 70% 50%", - "chart-2": "160 60% 45%", - "chart-3": "30 80% 55%", - "chart-4": "280 65% 60%", - "chart-5": "340 75% 55%", - }, - }, - }, -] as const; + { + name: "zinc", + label: "Zinc", + activeColor: { + light: "240 5.9% 10%", + dark: "240 5.2% 33.9%", + }, + cssVars: { + light: { + background: "0 0% 100%", + foreground: "240 10% 3.9%", + card: "0 0% 100%", + "card-foreground": "240 10% 3.9%", + popover: "0 0% 100%", + "popover-foreground": "240 10% 3.9%", + primary: "240 5.9% 10%", + "primary-foreground": "0 0% 98%", + secondary: "240 4.8% 95.9%", + "secondary-foreground": "240 5.9% 10%", + muted: "240 4.8% 95.9%", + "muted-foreground": "240 3.8% 46.1%", + accent: "240 4.8% 95.9%", + "accent-foreground": "240 5.9% 10%", + destructive: "0 84.2% 60.2%", + "destructive-foreground": "0 0% 98%", + border: "240 5.9% 90%", + input: "240 5.9% 90%", + ring: "240 5.9% 10%", + radius: "0.5rem", + "chart-1": "12 76% 61%", + "chart-2": "173 58% 39%", + "chart-3": "197 37% 24%", + "chart-4": "43 74% 66%", + "chart-5": "27 87% 67%", + }, + dark: { + background: "240 10% 3.9%", + foreground: "0 0% 98%", + card: "240 10% 3.9%", + "card-foreground": "0 0% 98%", + popover: "240 10% 3.9%", + "popover-foreground": "0 0% 98%", + primary: "0 0% 98%", + "primary-foreground": "240 5.9% 10%", + secondary: "240 3.7% 15.9%", + "secondary-foreground": "0 0% 98%", + muted: "240 3.7% 15.9%", + "muted-foreground": "240 5% 64.9%", + accent: "240 3.7% 15.9%", + "accent-foreground": "0 0% 98%", + destructive: "0 62.8% 30.6%", + "destructive-foreground": "0 0% 98%", + border: "240 3.7% 15.9%", + input: "240 3.7% 15.9%", + ring: "240 4.9% 83.9%", + "chart-1": "220 70% 50%", + "chart-2": "160 60% 45%", + "chart-3": "30 80% 55%", + "chart-4": "280 65% 60%", + "chart-5": "340 75% 55%", + }, + }, + }, + { + name: "slate", + label: "Slate", + activeColor: { + light: "215.4 16.3% 46.9%", + dark: "215.3 19.3% 34.5%", + }, + cssVars: { + light: { + background: "0 0% 100%", + foreground: "222.2 84% 4.9%", + card: "0 0% 100%", + "card-foreground": "222.2 84% 4.9%", + popover: "0 0% 100%", + "popover-foreground": "222.2 84% 4.9%", + primary: "222.2 47.4% 11.2%", + "primary-foreground": "210 40% 98%", + secondary: "210 40% 96.1%", + "secondary-foreground": "222.2 47.4% 11.2%", + muted: "210 40% 96.1%", + "muted-foreground": "215.4 16.3% 46.9%", + accent: "210 40% 96.1%", + "accent-foreground": "222.2 47.4% 11.2%", + destructive: "0 84.2% 60.2%", + "destructive-foreground": "210 40% 98%", + border: "214.3 31.8% 91.4%", + input: "214.3 31.8% 91.4%", + ring: "222.2 84% 4.9%", + radius: "0.5rem", + "chart-1": "12 76% 61%", + "chart-2": "173 58% 39%", + "chart-3": "197 37% 24%", + "chart-4": "43 74% 66%", + "chart-5": "27 87% 67%", + }, + dark: { + background: "222.2 84% 4.9%", + foreground: "210 40% 98%", + card: "222.2 84% 4.9%", + "card-foreground": "210 40% 98%", + popover: "222.2 84% 4.9%", + "popover-foreground": "210 40% 98%", + primary: "210 40% 98%", + "primary-foreground": "222.2 47.4% 11.2%", + secondary: "217.2 32.6% 17.5%", + "secondary-foreground": "210 40% 98%", + muted: "217.2 32.6% 17.5%", + "muted-foreground": "215 20.2% 65.1%", + accent: "217.2 32.6% 17.5%", + "accent-foreground": "210 40% 98%", + destructive: "0 62.8% 30.6%", + "destructive-foreground": "210 40% 98%", + border: "217.2 32.6% 17.5%", + input: "217.2 32.6% 17.5%", + ring: "212.7 26.8% 83.9", + "chart-1": "220 70% 50%", + "chart-2": "160 60% 45%", + "chart-3": "30 80% 55%", + "chart-4": "280 65% 60%", + "chart-5": "340 75% 55%", + }, + }, + }, + { + name: "stone", + label: "Stone", + activeColor: { + light: "25 5.3% 44.7%", + dark: "33.3 5.5% 32.4%", + }, + cssVars: { + light: { + background: "0 0% 100%", + foreground: "20 14.3% 4.1%", + card: "0 0% 100%", + "card-foreground": "20 14.3% 4.1%", + popover: "0 0% 100%", + "popover-foreground": "20 14.3% 4.1%", + primary: "24 9.8% 10%", + "primary-foreground": "60 9.1% 97.8%", + secondary: "60 4.8% 95.9%", + "secondary-foreground": "24 9.8% 10%", + muted: "60 4.8% 95.9%", + "muted-foreground": "25 5.3% 44.7%", + accent: "60 4.8% 95.9%", + "accent-foreground": "24 9.8% 10%", + destructive: "0 84.2% 60.2%", + "destructive-foreground": "60 9.1% 97.8%", + border: "20 5.9% 90%", + input: "20 5.9% 90%", + ring: "20 14.3% 4.1%", + radius: "0.95rem", + "chart-1": "12 76% 61%", + "chart-2": "173 58% 39%", + "chart-3": "197 37% 24%", + "chart-4": "43 74% 66%", + "chart-5": "27 87% 67%", + }, + dark: { + background: "20 14.3% 4.1%", + foreground: "60 9.1% 97.8%", + card: "20 14.3% 4.1%", + "card-foreground": "60 9.1% 97.8%", + popover: "20 14.3% 4.1%", + "popover-foreground": "60 9.1% 97.8%", + primary: "60 9.1% 97.8%", + "primary-foreground": "24 9.8% 10%", + secondary: "12 6.5% 15.1%", + "secondary-foreground": "60 9.1% 97.8%", + muted: "12 6.5% 15.1%", + "muted-foreground": "24 5.4% 63.9%", + accent: "12 6.5% 15.1%", + "accent-foreground": "60 9.1% 97.8%", + destructive: "0 62.8% 30.6%", + "destructive-foreground": "60 9.1% 97.8%", + border: "12 6.5% 15.1%", + input: "12 6.5% 15.1%", + ring: "24 5.7% 82.9%", + "chart-1": "220 70% 50%", + "chart-2": "160 60% 45%", + "chart-3": "30 80% 55%", + "chart-4": "280 65% 60%", + "chart-5": "340 75% 55%", + }, + }, + }, + { + name: "gray", + label: "Gray", + activeColor: { + light: "220 8.9% 46.1%", + dark: "215 13.8% 34.1%", + }, + cssVars: { + light: { + background: "0 0% 100%", + foreground: "224 71.4% 4.1%", + card: "0 0% 100%", + "card-foreground": "224 71.4% 4.1%", + popover: "0 0% 100%", + "popover-foreground": "224 71.4% 4.1%", + primary: "220.9 39.3% 11%", + "primary-foreground": "210 20% 98%", + secondary: "220 14.3% 95.9%", + "secondary-foreground": "220.9 39.3% 11%", + muted: "220 14.3% 95.9%", + "muted-foreground": "220 8.9% 46.1%", + accent: "220 14.3% 95.9%", + "accent-foreground": "220.9 39.3% 11%", + destructive: "0 84.2% 60.2%", + "destructive-foreground": "210 20% 98%", + border: "220 13% 91%", + input: "220 13% 91%", + ring: "224 71.4% 4.1%", + radius: "0.35rem", + "chart-1": "12 76% 61%", + "chart-2": "173 58% 39%", + "chart-3": "197 37% 24%", + "chart-4": "43 74% 66%", + "chart-5": "27 87% 67%", + }, + dark: { + background: "224 71.4% 4.1%", + foreground: "210 20% 98%", + card: "224 71.4% 4.1%", + "card-foreground": "210 20% 98%", + popover: "224 71.4% 4.1%", + "popover-foreground": "210 20% 98%", + primary: "210 20% 98%", + "primary-foreground": "220.9 39.3% 11%", + secondary: "215 27.9% 16.9%", + "secondary-foreground": "210 20% 98%", + muted: "215 27.9% 16.9%", + "muted-foreground": "217.9 10.6% 64.9%", + accent: "215 27.9% 16.9%", + "accent-foreground": "210 20% 98%", + destructive: "0 62.8% 30.6%", + "destructive-foreground": "210 20% 98%", + border: "215 27.9% 16.9%", + input: "215 27.9% 16.9%", + ring: "216 12.2% 83.9%", + "chart-1": "220 70% 50%", + "chart-2": "160 60% 45%", + "chart-3": "30 80% 55%", + "chart-4": "280 65% 60%", + "chart-5": "340 75% 55%", + }, + }, + }, + { + name: "neutral", + label: "Neutral", + activeColor: { + light: "0 0% 45.1%", + dark: "0 0% 32.2%", + }, + cssVars: { + light: { + background: "0 0% 100%", + foreground: "0 0% 3.9%", + card: "0 0% 100%", + "card-foreground": "0 0% 3.9%", + popover: "0 0% 100%", + "popover-foreground": "0 0% 3.9%", + primary: "0 0% 9%", + "primary-foreground": "0 0% 98%", + secondary: "0 0% 96.1%", + "secondary-foreground": "0 0% 9%", + muted: "0 0% 96.1%", + "muted-foreground": "0 0% 45.1%", + accent: "0 0% 96.1%", + "accent-foreground": "0 0% 9%", + destructive: "0 84.2% 60.2%", + "destructive-foreground": "0 0% 98%", + border: "0 0% 89.8%", + input: "0 0% 89.8%", + ring: "0 0% 3.9%", + "chart-1": "12 76% 61%", + "chart-2": "173 58% 39%", + "chart-3": "197 37% 24%", + "chart-4": "43 74% 66%", + "chart-5": "27 87% 67%", + }, + dark: { + background: "0 0% 3.9%", + foreground: "0 0% 98%", + card: "0 0% 3.9%", + "card-foreground": "0 0% 98%", + popover: "0 0% 3.9%", + "popover-foreground": "0 0% 98%", + primary: "0 0% 98%", + "primary-foreground": "0 0% 9%", + secondary: "0 0% 14.9%", + "secondary-foreground": "0 0% 98%", + muted: "0 0% 14.9%", + "muted-foreground": "0 0% 63.9%", + accent: "0 0% 14.9%", + "accent-foreground": "0 0% 98%", + destructive: "0 62.8% 30.6%", + "destructive-foreground": "0 0% 98%", + border: "0 0% 14.9%", + input: "0 0% 14.9%", + ring: "0 0% 83.1%", + "chart-1": "220 70% 50%", + "chart-2": "160 60% 45%", + "chart-3": "30 80% 55%", + "chart-4": "280 65% 60%", + "chart-5": "340 75% 55%", + }, + }, + }, + { + name: "red", + label: "Red", + activeColor: { + light: "0 72.2% 50.6%", + dark: "0 72.2% 50.6%", + }, + cssVars: { + light: { + background: "0 0% 100%", + foreground: "0 0% 3.9%", + card: "0 0% 100%", + "card-foreground": "0 0% 3.9%", + popover: "0 0% 100%", + "popover-foreground": "0 0% 3.9%", + primary: "0 72.2% 50.6%", + "primary-foreground": "0 85.7% 97.3%", + secondary: "0 0% 96.1%", + "secondary-foreground": "0 0% 9%", + muted: "0 0% 96.1%", + "muted-foreground": "0 0% 45.1%", + accent: "0 0% 96.1%", + "accent-foreground": "0 0% 9%", + destructive: "0 84.2% 60.2%", + "destructive-foreground": "0 0% 98%", + border: "0 0% 89.8%", + input: "0 0% 89.8%", + ring: "0 72.2% 50.6%", + radius: "0.4rem", + "chart-1": "12 76% 61%", + "chart-2": "173 58% 39%", + "chart-3": "197 37% 24%", + "chart-4": "43 74% 66%", + "chart-5": "27 87% 67%", + }, + dark: { + background: "0 0% 3.9%", + foreground: "0 0% 98%", + card: "0 0% 3.9%", + "card-foreground": "0 0% 98%", + popover: "0 0% 3.9%", + "popover-foreground": "0 0% 98%", + primary: "0 72.2% 50.6%", + "primary-foreground": "0 85.7% 97.3%", + secondary: "0 0% 14.9%", + "secondary-foreground": "0 0% 98%", + muted: "0 0% 14.9%", + "muted-foreground": "0 0% 63.9%", + accent: "0 0% 14.9%", + "accent-foreground": "0 0% 98%", + destructive: "0 62.8% 30.6%", + "destructive-foreground": "0 0% 98%", + border: "0 0% 14.9%", + input: "0 0% 14.9%", + ring: "0 72.2% 50.6%", + "chart-1": "220 70% 50%", + "chart-2": "160 60% 45%", + "chart-3": "30 80% 55%", + "chart-4": "280 65% 60%", + "chart-5": "340 75% 55%", + }, + }, + }, + { + name: "rose", + label: "Rose", + activeColor: { + light: "346.8 77.2% 49.8%", + dark: "346.8 77.2% 49.8%", + }, + cssVars: { + light: { + background: "0 0% 100%", + foreground: "240 10% 3.9%", + card: "0 0% 100%", + "card-foreground": "240 10% 3.9%", + popover: "0 0% 100%", + "popover-foreground": "240 10% 3.9%", + primary: "346.8 77.2% 49.8%", + "primary-foreground": "355.7 100% 97.3%", + secondary: "240 4.8% 95.9%", + "secondary-foreground": "240 5.9% 10%", + muted: "240 4.8% 95.9%", + "muted-foreground": "240 3.8% 46.1%", + accent: "240 4.8% 95.9%", + "accent-foreground": "240 5.9% 10%", + destructive: "0 84.2% 60.2%", + "destructive-foreground": "0 0% 98%", + border: "240 5.9% 90%", + input: "240 5.9% 90%", + ring: "346.8 77.2% 49.8%", + radius: "0.5rem", + "chart-1": "12 76% 61%", + "chart-2": "173 58% 39%", + "chart-3": "197 37% 24%", + "chart-4": "43 74% 66%", + "chart-5": "27 87% 67%", + }, + dark: { + background: "20 14.3% 4.1%", + foreground: "0 0% 95%", + popover: "0 0% 9%", + "popover-foreground": "0 0% 95%", + card: "24 9.8% 10%", + "card-foreground": "0 0% 95%", + primary: "346.8 77.2% 49.8%", + "primary-foreground": "355.7 100% 97.3%", + secondary: "240 3.7% 15.9%", + "secondary-foreground": "0 0% 98%", + muted: "0 0% 15%", + "muted-foreground": "240 5% 64.9%", + accent: "12 6.5% 15.1%", + "accent-foreground": "0 0% 98%", + destructive: "0 62.8% 30.6%", + "destructive-foreground": "0 85.7% 97.3%", + border: "240 3.7% 15.9%", + input: "240 3.7% 15.9%", + ring: "346.8 77.2% 49.8%", + "chart-1": "220 70% 50%", + "chart-2": "160 60% 45%", + "chart-3": "30 80% 55%", + "chart-4": "280 65% 60%", + "chart-5": "340 75% 55%", + }, + }, + }, + { + name: "orange", + label: "Orange", + activeColor: { + light: "24.6 95% 53.1%", + dark: "20.5 90.2% 48.2%", + }, + cssVars: { + light: { + background: "0 0% 100%", + foreground: "20 14.3% 4.1%", + card: "0 0% 100%", + "card-foreground": "20 14.3% 4.1%", + popover: "0 0% 100%", + "popover-foreground": "20 14.3% 4.1%", + primary: "24.6 95% 53.1%", + "primary-foreground": "60 9.1% 97.8%", + secondary: "60 4.8% 95.9%", + "secondary-foreground": "24 9.8% 10%", + muted: "60 4.8% 95.9%", + "muted-foreground": "25 5.3% 44.7%", + accent: "60 4.8% 95.9%", + "accent-foreground": "24 9.8% 10%", + destructive: "0 84.2% 60.2%", + "destructive-foreground": "60 9.1% 97.8%", + border: "20 5.9% 90%", + input: "20 5.9% 90%", + ring: "24.6 95% 53.1%", + radius: "0.95rem", + "chart-1": "12 76% 61%", + "chart-2": "173 58% 39%", + "chart-3": "197 37% 24%", + "chart-4": "43 74% 66%", + "chart-5": "27 87% 67%", + }, + dark: { + background: "20 14.3% 4.1%", + foreground: "60 9.1% 97.8%", + card: "20 14.3% 4.1%", + "card-foreground": "60 9.1% 97.8%", + popover: "20 14.3% 4.1%", + "popover-foreground": "60 9.1% 97.8%", + primary: "20.5 90.2% 48.2%", + "primary-foreground": "60 9.1% 97.8%", + secondary: "12 6.5% 15.1%", + "secondary-foreground": "60 9.1% 97.8%", + muted: "12 6.5% 15.1%", + "muted-foreground": "24 5.4% 63.9%", + accent: "12 6.5% 15.1%", + "accent-foreground": "60 9.1% 97.8%", + destructive: "0 72.2% 50.6%", + "destructive-foreground": "60 9.1% 97.8%", + border: "12 6.5% 15.1%", + input: "12 6.5% 15.1%", + ring: "20.5 90.2% 48.2%", + "chart-1": "220 70% 50%", + "chart-2": "160 60% 45%", + "chart-3": "30 80% 55%", + "chart-4": "280 65% 60%", + "chart-5": "340 75% 55%", + }, + }, + }, + { + name: "green", + label: "Green", + activeColor: { + light: "142.1 76.2% 36.3%", + dark: "142.1 70.6% 45.3%", + }, + cssVars: { + light: { + background: "0 0% 100%", + foreground: "240 10% 3.9%", + card: "0 0% 100%", + "card-foreground": "240 10% 3.9%", + popover: "0 0% 100%", + "popover-foreground": "240 10% 3.9%", + primary: "142.1 76.2% 36.3%", + "primary-foreground": "355.7 100% 97.3%", + secondary: "240 4.8% 95.9%", + "secondary-foreground": "240 5.9% 10%", + muted: "240 4.8% 95.9%", + "muted-foreground": "240 3.8% 46.1%", + accent: "240 4.8% 95.9%", + "accent-foreground": "240 5.9% 10%", + destructive: "0 84.2% 60.2%", + "destructive-foreground": "0 0% 98%", + border: "240 5.9% 90%", + input: "240 5.9% 90%", + ring: "142.1 76.2% 36.3%", + "chart-1": "12 76% 61%", + "chart-2": "173 58% 39%", + "chart-3": "197 37% 24%", + "chart-4": "43 74% 66%", + "chart-5": "27 87% 67%", + }, + dark: { + background: "20 14.3% 4.1%", + foreground: "0 0% 95%", + popover: "0 0% 9%", + "popover-foreground": "0 0% 95%", + card: "24 9.8% 10%", + "card-foreground": "0 0% 95%", + primary: "142.1 70.6% 45.3%", + "primary-foreground": "144.9 80.4% 10%", + secondary: "240 3.7% 15.9%", + "secondary-foreground": "0 0% 98%", + muted: "0 0% 15%", + "muted-foreground": "240 5% 64.9%", + accent: "12 6.5% 15.1%", + "accent-foreground": "0 0% 98%", + destructive: "0 62.8% 30.6%", + "destructive-foreground": "0 85.7% 97.3%", + border: "240 3.7% 15.9%", + input: "240 3.7% 15.9%", + ring: "142.4 71.8% 29.2%", + "chart-1": "220 70% 50%", + "chart-2": "160 60% 45%", + "chart-3": "30 80% 55%", + "chart-4": "280 65% 60%", + "chart-5": "340 75% 55%", + }, + }, + }, + { + name: "blue", + label: "Blue", + activeColor: { + light: "221.2 83.2% 53.3%", + dark: "217.2 91.2% 59.8%", + }, + cssVars: { + light: { + background: "0 0% 100%", + foreground: "222.2 84% 4.9%", + card: "0 0% 100%", + "card-foreground": "222.2 84% 4.9%", + popover: "0 0% 100%", + "popover-foreground": "222.2 84% 4.9%", + primary: "221.2 83.2% 53.3%", + "primary-foreground": "210 40% 98%", + secondary: "210 40% 96.1%", + "secondary-foreground": "222.2 47.4% 11.2%", + muted: "210 40% 96.1%", + "muted-foreground": "215.4 16.3% 46.9%", + accent: "210 40% 96.1%", + "accent-foreground": "222.2 47.4% 11.2%", + destructive: "0 84.2% 60.2%", + "destructive-foreground": "210 40% 98%", + border: "214.3 31.8% 91.4%", + input: "214.3 31.8% 91.4%", + ring: "221.2 83.2% 53.3%", + "chart-1": "12 76% 61%", + "chart-2": "173 58% 39%", + "chart-3": "197 37% 24%", + "chart-4": "43 74% 66%", + "chart-5": "27 87% 67%", + }, + dark: { + background: "222.2 84% 4.9%", + foreground: "210 40% 98%", + card: "222.2 84% 4.9%", + "card-foreground": "210 40% 98%", + popover: "222.2 84% 4.9%", + "popover-foreground": "210 40% 98%", + primary: "217.2 91.2% 59.8%", + "primary-foreground": "222.2 47.4% 11.2%", + secondary: "217.2 32.6% 17.5%", + "secondary-foreground": "210 40% 98%", + muted: "217.2 32.6% 17.5%", + "muted-foreground": "215 20.2% 65.1%", + accent: "217.2 32.6% 17.5%", + "accent-foreground": "210 40% 98%", + destructive: "0 62.8% 30.6%", + "destructive-foreground": "210 40% 98%", + border: "217.2 32.6% 17.5%", + input: "217.2 32.6% 17.5%", + ring: "224.3 76.3% 48%", + "chart-1": "220 70% 50%", + "chart-2": "160 60% 45%", + "chart-3": "30 80% 55%", + "chart-4": "280 65% 60%", + "chart-5": "340 75% 55%", + }, + }, + }, + { + name: "yellow", + label: "Yellow", + activeColor: { + light: "47.9 95.8% 53.1%", + dark: "47.9 95.8% 53.1%", + }, + cssVars: { + light: { + background: "0 0% 100%", + foreground: "20 14.3% 4.1%", + card: "0 0% 100%", + "card-foreground": "20 14.3% 4.1%", + popover: "0 0% 100%", + "popover-foreground": "20 14.3% 4.1%", + primary: "47.9 95.8% 53.1%", + "primary-foreground": "26 83.3% 14.1%", + secondary: "60 4.8% 95.9%", + "secondary-foreground": "24 9.8% 10%", + muted: "60 4.8% 95.9%", + "muted-foreground": "25 5.3% 44.7%", + accent: "60 4.8% 95.9%", + "accent-foreground": "24 9.8% 10%", + destructive: "0 84.2% 60.2%", + "destructive-foreground": "60 9.1% 97.8%", + border: "20 5.9% 90%", + input: "20 5.9% 90%", + ring: "20 14.3% 4.1%", + radius: "0.95rem", + "chart-1": "12 76% 61%", + "chart-2": "173 58% 39%", + "chart-3": "197 37% 24%", + "chart-4": "43 74% 66%", + "chart-5": "27 87% 67%", + }, + dark: { + background: "20 14.3% 4.1%", + foreground: "60 9.1% 97.8%", + card: "20 14.3% 4.1%", + "card-foreground": "60 9.1% 97.8%", + popover: "20 14.3% 4.1%", + "popover-foreground": "60 9.1% 97.8%", + primary: "47.9 95.8% 53.1%", + "primary-foreground": "26 83.3% 14.1%", + secondary: "12 6.5% 15.1%", + "secondary-foreground": "60 9.1% 97.8%", + muted: "12 6.5% 15.1%", + "muted-foreground": "24 5.4% 63.9%", + accent: "12 6.5% 15.1%", + "accent-foreground": "60 9.1% 97.8%", + destructive: "0 62.8% 30.6%", + "destructive-foreground": "60 9.1% 97.8%", + border: "12 6.5% 15.1%", + input: "12 6.5% 15.1%", + ring: "35.5 91.7% 32.9%", + "chart-1": "220 70% 50%", + "chart-2": "160 60% 45%", + "chart-3": "30 80% 55%", + "chart-4": "280 65% 60%", + "chart-5": "340 75% 55%", + }, + }, + }, + { + name: "violet", + label: "Violet", + activeColor: { + light: "262.1 83.3% 57.8%", + dark: "263.4 70% 50.4%", + }, + cssVars: { + light: { + background: "0 0% 100%", + foreground: "224 71.4% 4.1%", + card: "0 0% 100%", + "card-foreground": "224 71.4% 4.1%", + popover: "0 0% 100%", + "popover-foreground": "224 71.4% 4.1%", + primary: "262.1 83.3% 57.8%", + "primary-foreground": "210 20% 98%", + secondary: "220 14.3% 95.9%", + "secondary-foreground": "220.9 39.3% 11%", + muted: "220 14.3% 95.9%", + "muted-foreground": "220 8.9% 46.1%", + accent: "220 14.3% 95.9%", + "accent-foreground": "220.9 39.3% 11%", + destructive: "0 84.2% 60.2%", + "destructive-foreground": "210 20% 98%", + border: "220 13% 91%", + input: "220 13% 91%", + ring: "262.1 83.3% 57.8%", + "chart-1": "12 76% 61%", + "chart-2": "173 58% 39%", + "chart-3": "197 37% 24%", + "chart-4": "43 74% 66%", + "chart-5": "27 87% 67%", + }, + dark: { + background: "224 71.4% 4.1%", + foreground: "210 20% 98%", + card: "224 71.4% 4.1%", + "card-foreground": "210 20% 98%", + popover: "224 71.4% 4.1%", + "popover-foreground": "210 20% 98%", + primary: "263.4 70% 50.4%", + "primary-foreground": "210 20% 98%", + secondary: "215 27.9% 16.9%", + "secondary-foreground": "210 20% 98%", + muted: "215 27.9% 16.9%", + "muted-foreground": "217.9 10.6% 64.9%", + accent: "215 27.9% 16.9%", + "accent-foreground": "210 20% 98%", + destructive: "0 62.8% 30.6%", + "destructive-foreground": "210 20% 98%", + border: "215 27.9% 16.9%", + input: "215 27.9% 16.9%", + ring: "263.4 70% 50.4%", + "chart-1": "220 70% 50%", + "chart-2": "160 60% 45%", + "chart-3": "30 80% 55%", + "chart-4": "280 65% 60%", + "chart-5": "340 75% 55%", + }, + }, + }, +] as const -export type BaseColor = (typeof baseColors)[number]; +export type BaseColor = (typeof baseColors)[number] diff --git a/docs/src/registry/blocks.ts b/docs/src/registry/blocks.ts index 19aa90df..4e9ffe36 100644 --- a/docs/src/registry/blocks.ts +++ b/docs/src/registry/blocks.ts @@ -1,103 +1,103 @@ -import type { Registry } from "./schema"; +import type { Registry } from "./schema" export const blocks: Registry = [ - { - name: "sidebar-01", - type: "registry:block", - description: "A sidebar that collapses to icons.", - registryDependencies: [ - "sidebar", - "separator", - "collapsible", - "dropdown-menu", - ], - files: [ - { - path: "blocks/sidebar-01/index.tsx", - type: "registry:page", - target: "src/routes/dashboard.tsx", - }, - { - path: "blocks/sidebar-01/components/app-sidebar.tsx", - type: "registry:component", - target: "src/components/app-sidebar.tsx", - }, - { - path: "blocks/sidebar-01/components/nav-main.tsx", - type: "registry:component", - target: "src/components/nav-main.tsx", - }, - { - path: "blocks/sidebar-01/components/nav-projects.tsx", - type: "registry:component", - target: "src/components/nav-projects.tsx", - }, - { - path: "blocks/sidebar-01/components/nav-user.tsx", - type: "registry:component", - target: "src/components/nav-user.tsx", - }, - { - path: "blocks/sidebar-01/components/team-switcher.tsx", - type: "registry:component", - target: "src/components/team-switcher.tsx", - }, - ], - }, - { - name: "sidebar-02", - type: "registry:block", - description: "A floating sidebar with submenus.", - registryDependencies: ["sidebar"], - files: [ - { - path: "blocks/sidebar-02/index.tsx", - type: "registry:page", - target: "src/routes/dashboard.tsx", - }, - { - path: "blocks/sidebar-02/components/app-sidebar.tsx", - type: "registry:component", - target: "src/components/app-sidebar.tsx", - }, - ], - }, - { - name: "sidebar-03", - type: "registry:block", - description: "An inset sidebar with secondary navigation.", - registryDependencies: ["sidebar", "collapsible", "dropdown-menu"], - files: [ - { - path: "blocks/sidebar-03/index.tsx", - type: "registry:page", - target: "src/routes/dashboard.tsx", - }, - { - path: "blocks/sidebar-03/components/app-sidebar.tsx", - type: "registry:component", - target: "src/components/app-sidebar.tsx", - }, - { - path: "blocks/sidebar-03/components/nav-main.tsx", - type: "registry:component", - target: "src/components/nav-main.tsx", - }, - { - path: "blocks/sidebar-03/components/nav-projects.tsx", - type: "registry:component", - target: "src/components/nav-projects.tsx", - }, - { - path: "blocks/sidebar-03/components/nav-user.tsx", - type: "registry:component", - target: "src/components/nav-user.tsx", - }, - { - path: "blocks/sidebar-03/components/nav-secondary.tsx", - type: "registry:component", - target: "src/components/nav-secondary.tsx", - }, - ], - }, -]; + { + name: "sidebar-01", + type: "registry:block", + description: "A sidebar that collapses to icons.", + registryDependencies: [ + "sidebar", + "separator", + "collapsible", + "dropdown-menu", + ], + files: [ + { + path: "blocks/sidebar-01/index.tsx", + type: "registry:page", + target: "src/routes/dashboard.tsx", + }, + { + path: "blocks/sidebar-01/components/app-sidebar.tsx", + type: "registry:component", + target: "src/components/app-sidebar.tsx", + }, + { + path: "blocks/sidebar-01/components/nav-main.tsx", + type: "registry:component", + target: "src/components/nav-main.tsx", + }, + { + path: "blocks/sidebar-01/components/nav-projects.tsx", + type: "registry:component", + target: "src/components/nav-projects.tsx", + }, + { + path: "blocks/sidebar-01/components/nav-user.tsx", + type: "registry:component", + target: "src/components/nav-user.tsx", + }, + { + path: "blocks/sidebar-01/components/team-switcher.tsx", + type: "registry:component", + target: "src/components/team-switcher.tsx", + }, + ], + }, + { + name: "sidebar-02", + type: "registry:block", + description: "A floating sidebar with submenus.", + registryDependencies: ["sidebar"], + files: [ + { + path: "blocks/sidebar-02/index.tsx", + type: "registry:page", + target: "src/routes/dashboard.tsx", + }, + { + path: "blocks/sidebar-02/components/app-sidebar.tsx", + type: "registry:component", + target: "src/components/app-sidebar.tsx", + }, + ], + }, + { + name: "sidebar-03", + type: "registry:block", + description: "An inset sidebar with secondary navigation.", + registryDependencies: ["sidebar", "collapsible", "dropdown-menu"], + files: [ + { + path: "blocks/sidebar-03/index.tsx", + type: "registry:page", + target: "src/routes/dashboard.tsx", + }, + { + path: "blocks/sidebar-03/components/app-sidebar.tsx", + type: "registry:component", + target: "src/components/app-sidebar.tsx", + }, + { + path: "blocks/sidebar-03/components/nav-main.tsx", + type: "registry:component", + target: "src/components/nav-main.tsx", + }, + { + path: "blocks/sidebar-03/components/nav-projects.tsx", + type: "registry:component", + target: "src/components/nav-projects.tsx", + }, + { + path: "blocks/sidebar-03/components/nav-user.tsx", + type: "registry:component", + target: "src/components/nav-user.tsx", + }, + { + path: "blocks/sidebar-03/components/nav-secondary.tsx", + type: "registry:component", + target: "src/components/nav-secondary.tsx", + }, + ], + }, +] diff --git a/docs/src/registry/charts.ts b/docs/src/registry/charts.ts index 010c0841..921801cc 100644 --- a/docs/src/registry/charts.ts +++ b/docs/src/registry/charts.ts @@ -1,148 +1,148 @@ -import type { Registry } from "./schema"; +import type { Registry } from "./schema" export const charts: Registry = [ - // Area Charts - { - name: "area-chart", - type: "registry:block", - registryDependencies: ["card", "chart"], - files: [ - { - path: "charts/area-chart.tsx", - type: "registry:block", - }, - ], - }, - { - name: "area-chart-linear", - type: "registry:block", - registryDependencies: ["card", "chart"], - files: [ - { - path: "charts/area-chart-linear.tsx", - type: "registry:block", - }, - ], - }, - { - name: "area-chart-step", - type: "registry:block", - registryDependencies: ["card", "chart"], - files: [ - { - path: "charts/area-chart-step.tsx", - type: "registry:block", - }, - ], - }, - { - name: "area-chart-stacked", - type: "registry:block", - registryDependencies: ["card", "chart"], - files: [ - { - path: "charts/area-chart-stacked.tsx", - type: "registry:block", - }, - ], - }, - { - name: "area-chart-legend", - type: "registry:block", - registryDependencies: ["card", "chart"], - files: [ - { - path: "charts/area-chart-legend.tsx", - type: "registry:block", - }, - ], - }, - { - name: "area-chart-gradient", - type: "registry:block", - registryDependencies: ["card", "chart"], - files: [ - { - path: "charts/area-chart-gradient.tsx", - type: "registry:block", - }, - ], - }, - { - name: "area-chart-interactive", - type: "registry:block", - registryDependencies: ["card", "chart", "use-mobile"], - files: [ - { - path: "charts/area-chart-interactive.tsx", - type: "registry:block", - }, - ], - }, - { - name: "bar-chart", - type: "registry:block", - registryDependencies: ["card", "chart"], - files: [ - { - path: "charts/bar-chart.tsx", - type: "registry:block", - }, - ], - }, - { - name: "bar-chart-horizontal", - type: "registry:block", - registryDependencies: ["card", "chart"], - files: [ - { - path: "charts/bar-chart-horizontal.tsx", - type: "registry:block", - }, - ], - }, - { - name: "bar-chart-multiply", - type: "registry:block", - registryDependencies: ["card", "chart"], - files: [ - { - path: "charts/bar-chart-multiply.tsx", - type: "registry:block", - }, - ], - }, - { - name: "bar-chart-stacked", - type: "registry:block", - registryDependencies: ["card", "chart"], - files: [ - { - path: "charts/bar-chart-stacked.tsx", - type: "registry:block", - }, - ], - }, - { - name: "bar-chart-mixed", - type: "registry:block", - registryDependencies: ["card", "chart"], - files: [ - { - path: "charts/bar-chart-mixed.tsx", - type: "registry:block", - }, - ], - }, - { - name: "bar-chart-active", - type: "registry:block", - registryDependencies: ["card", "chart"], - files: [ - { - path: "charts/bar-chart-active.tsx", - type: "registry:block", - }, - ], - }, -]; + // Area Charts + { + name: "area-chart", + type: "registry:block", + registryDependencies: ["card", "chart"], + files: [ + { + path: "charts/area-chart.tsx", + type: "registry:block", + }, + ], + }, + { + name: "area-chart-linear", + type: "registry:block", + registryDependencies: ["card", "chart"], + files: [ + { + path: "charts/area-chart-linear.tsx", + type: "registry:block", + }, + ], + }, + { + name: "area-chart-step", + type: "registry:block", + registryDependencies: ["card", "chart"], + files: [ + { + path: "charts/area-chart-step.tsx", + type: "registry:block", + }, + ], + }, + { + name: "area-chart-stacked", + type: "registry:block", + registryDependencies: ["card", "chart"], + files: [ + { + path: "charts/area-chart-stacked.tsx", + type: "registry:block", + }, + ], + }, + { + name: "area-chart-legend", + type: "registry:block", + registryDependencies: ["card", "chart"], + files: [ + { + path: "charts/area-chart-legend.tsx", + type: "registry:block", + }, + ], + }, + { + name: "area-chart-gradient", + type: "registry:block", + registryDependencies: ["card", "chart"], + files: [ + { + path: "charts/area-chart-gradient.tsx", + type: "registry:block", + }, + ], + }, + { + name: "area-chart-interactive", + type: "registry:block", + registryDependencies: ["card", "chart", "use-mobile"], + files: [ + { + path: "charts/area-chart-interactive.tsx", + type: "registry:block", + }, + ], + }, + { + name: "bar-chart", + type: "registry:block", + registryDependencies: ["card", "chart"], + files: [ + { + path: "charts/bar-chart.tsx", + type: "registry:block", + }, + ], + }, + { + name: "bar-chart-horizontal", + type: "registry:block", + registryDependencies: ["card", "chart"], + files: [ + { + path: "charts/bar-chart-horizontal.tsx", + type: "registry:block", + }, + ], + }, + { + name: "bar-chart-multiply", + type: "registry:block", + registryDependencies: ["card", "chart"], + files: [ + { + path: "charts/bar-chart-multiply.tsx", + type: "registry:block", + }, + ], + }, + { + name: "bar-chart-stacked", + type: "registry:block", + registryDependencies: ["card", "chart"], + files: [ + { + path: "charts/bar-chart-stacked.tsx", + type: "registry:block", + }, + ], + }, + { + name: "bar-chart-mixed", + type: "registry:block", + registryDependencies: ["card", "chart"], + files: [ + { + path: "charts/bar-chart-mixed.tsx", + type: "registry:block", + }, + ], + }, + { + name: "bar-chart-active", + type: "registry:block", + registryDependencies: ["card", "chart"], + files: [ + { + path: "charts/bar-chart-active.tsx", + type: "registry:block", + }, + ], + }, +] diff --git a/docs/src/registry/colors.ts b/docs/src/registry/colors.ts index 239dae3d..259b67ca 100644 --- a/docs/src/registry/colors.ts +++ b/docs/src/registry/colors.ts @@ -1,1556 +1,1556 @@ export const colors = { - inherit: "inherit", - current: "currentColor", - transparent: "transparent", - black: { - hex: "#000000", - rgb: "rgb(0,0,0)", - hsl: "hsl(0,0%,0%)", - }, - white: { - hex: "#ffffff", - rgb: "rgb(255,255,255)", - hsl: "hsl(0,0%,100%)", - }, - slate: [ - { - scale: 50, - hex: "#f8fafc", - rgb: "rgb(248,250,252)", - hsl: "hsl(210,40%,98%)", - }, - { - scale: 100, - hex: "#f1f5f9", - rgb: "rgb(241,245,249)", - hsl: "hsl(210,40%,96.1%)", - }, - { - scale: 200, - hex: "#e2e8f0", - rgb: "rgb(226,232,240)", - hsl: "hsl(214.3,31.8%,91.4%)", - }, - { - scale: 300, - hex: "#cbd5e1", - rgb: "rgb(203,213,225)", - hsl: "hsl(212.7,26.8%,83.9%)", - }, - { - scale: 400, - hex: "#94a3b8", - rgb: "rgb(148,163,184)", - hsl: "hsl(215,20.2%,65.1%)", - }, - { - scale: 500, - hex: "#64748b", - rgb: "rgb(100,116,139)", - hsl: "hsl(215.4,16.3%,46.9%)", - }, - { - scale: 600, - hex: "#475569", - rgb: "rgb(71,85,105)", - hsl: "hsl(215.3,19.3%,34.5%)", - }, - { - scale: 700, - hex: "#334155", - rgb: "rgb(51,65,85)", - hsl: "hsl(215.3,25%,26.7%)", - }, - { - scale: 800, - hex: "#1e293b", - rgb: "rgb(30,41,59)", - hsl: "hsl(217.2,32.6%,17.5%)", - }, - { - scale: 900, - hex: "#0f172a", - rgb: "rgb(15,23,42)", - hsl: "hsl(222.2,47.4%,11.2%)", - }, - { - scale: 950, - hex: "#020617", - rgb: "rgb(2,6,23)", - hsl: "hsl(222.2,84%,4.9%)", - }, - ], - gray: [ - { - scale: 50, - hex: "#f9fafb", - rgb: "rgb(249,250,251)", - hsl: "hsl(210,20%,98%)", - }, - { - scale: 100, - hex: "#f3f4f6", - rgb: "rgb(243,244,246)", - hsl: "hsl(220,14.3%,95.9%)", - }, - { - scale: 200, - hex: "#e5e7eb", - rgb: "rgb(229,231,235)", - hsl: "hsl(220,13%,91%)", - }, - { - scale: 300, - hex: "#d1d5db", - rgb: "rgb(209,213,219)", - hsl: "hsl(216,12.2%,83.9%)", - }, - { - scale: 400, - hex: "#9ca3af", - rgb: "rgb(156,163,175)", - hsl: "hsl(217.9,10.6%,64.9%)", - }, - { - scale: 500, - hex: "#6b7280", - rgb: "rgb(107,114,128)", - hsl: "hsl(220,8.9%,46.1%)", - }, - { - scale: 600, - hex: "#4b5563", - rgb: "rgb(75,85,99)", - hsl: "hsl(215,13.8%,34.1%)", - }, - { - scale: 700, - hex: "#374151", - rgb: "rgb(55,65,81)", - hsl: "hsl(216.9,19.1%,26.7%)", - }, - { - scale: 800, - hex: "#1f2937", - rgb: "rgb(31,41,55)", - hsl: "hsl(215,27.9%,16.9%)", - }, - { - scale: 900, - hex: "#111827", - rgb: "rgb(17,24,39)", - hsl: "hsl(220.9,39.3%,11%)", - }, - { - scale: 950, - hex: "#030712", - rgb: "rgb(3,7,18)", - hsl: "hsl(224,71.4%,4.1%)", - }, - ], - zinc: [ - { - scale: 50, - hex: "#fafafa", - rgb: "rgb(250,250,250)", - hsl: "hsl(0,0%,98%)", - }, - { - scale: 100, - hex: "#f4f4f5", - rgb: "rgb(244,244,245)", - hsl: "hsl(240,4.8%,95.9%)", - }, - { - scale: 200, - hex: "#e4e4e7", - rgb: "rgb(228,228,231)", - hsl: "hsl(240,5.9%,90%)", - }, - { - scale: 300, - hex: "#d4d4d8", - rgb: "rgb(212,212,216)", - hsl: "hsl(240,4.9%,83.9%)", - }, - { - scale: 400, - hex: "#a1a1aa", - rgb: "rgb(161,161,170)", - hsl: "hsl(240,5%,64.9%)", - }, - { - scale: 500, - hex: "#71717a", - rgb: "rgb(113,113,122)", - hsl: "hsl(240,3.8%,46.1%)", - }, - { - scale: 600, - hex: "#52525b", - rgb: "rgb(82,82,91)", - hsl: "hsl(240,5.2%,33.9%)", - }, - { - scale: 700, - hex: "#3f3f46", - rgb: "rgb(63,63,70)", - hsl: "hsl(240,5.3%,26.1%)", - }, - { - scale: 800, - hex: "#27272a", - rgb: "rgb(39,39,42)", - hsl: "hsl(240,3.7%,15.9%)", - }, - { - scale: 900, - hex: "#18181b", - rgb: "rgb(24,24,27)", - hsl: "hsl(240,5.9%,10%)", - }, - { - scale: 950, - hex: "#09090b", - rgb: "rgb(9,9,11)", - hsl: "hsl(240,10%,3.9%)", - }, - ], - neutral: [ - { - scale: 50, - hex: "#fafafa", - rgb: "rgb(250,250,250)", - hsl: "hsl(0,0%,98%)", - }, - { - scale: 100, - hex: "#f5f5f5", - rgb: "rgb(245,245,245)", - hsl: "hsl(0,0%,96.1%)", - }, - { - scale: 200, - hex: "#e5e5e5", - rgb: "rgb(229,229,229)", - hsl: "hsl(0,0%,89.8%)", - }, - { - scale: 300, - hex: "#d4d4d4", - rgb: "rgb(212,212,212)", - hsl: "hsl(0,0%,83.1%)", - }, - { - scale: 400, - hex: "#a3a3a3", - rgb: "rgb(163,163,163)", - hsl: "hsl(0,0%,63.9%)", - }, - { - scale: 500, - hex: "#737373", - rgb: "rgb(115,115,115)", - hsl: "hsl(0,0%,45.1%)", - }, - { - scale: 600, - hex: "#525252", - rgb: "rgb(82,82,82)", - hsl: "hsl(0,0%,32.2%)", - }, - { - scale: 700, - hex: "#404040", - rgb: "rgb(64,64,64)", - hsl: "hsl(0,0%,25.1%)", - }, - { - scale: 800, - hex: "#262626", - rgb: "rgb(38,38,38)", - hsl: "hsl(0,0%,14.9%)", - }, - { - scale: 900, - hex: "#171717", - rgb: "rgb(23,23,23)", - hsl: "hsl(0,0%,9%)", - }, - { - scale: 950, - hex: "#0a0a0a", - rgb: "rgb(10,10,10)", - hsl: "hsl(0,0%,3.9%)", - }, - ], - stone: [ - { - scale: 50, - hex: "#fafaf9", - rgb: "rgb(250,250,249)", - hsl: "hsl(60,9.1%,97.8%)", - }, - { - scale: 100, - hex: "#f5f5f4", - rgb: "rgb(245,245,244)", - hsl: "hsl(60,4.8%,95.9%)", - }, - { - scale: 200, - hex: "#e7e5e4", - rgb: "rgb(231,229,228)", - hsl: "hsl(20,5.9%,90%)", - }, - { - scale: 300, - hex: "#d6d3d1", - rgb: "rgb(214,211,209)", - hsl: "hsl(24,5.7%,82.9%)", - }, - { - scale: 400, - hex: "#a8a29e", - rgb: "rgb(168,162,158)", - hsl: "hsl(24,5.4%,63.9%)", - }, - { - scale: 500, - hex: "#78716c", - rgb: "rgb(120,113,108)", - hsl: "hsl(25,5.3%,44.7%)", - }, - { - scale: 600, - hex: "#57534e", - rgb: "rgb(87,83,78)", - hsl: "hsl(33.3,5.5%,32.4%)", - }, - { - scale: 700, - hex: "#44403c", - rgb: "rgb(68,64,60)", - hsl: "hsl(30,6.3%,25.1%)", - }, - { - scale: 800, - hex: "#292524", - rgb: "rgb(41,37,36)", - hsl: "hsl(12,6.5%,15.1%)", - }, - { - scale: 900, - hex: "#1c1917", - rgb: "rgb(28,25,23)", - hsl: "hsl(24,9.8%,10%)", - }, - { - scale: 950, - hex: "#0c0a09", - rgb: "rgb(12,10,9)", - hsl: "hsl(20,14.3%,4.1%)", - }, - ], - red: [ - { - scale: 50, - hex: "#fef2f2", - rgb: "rgb(254,242,242)", - hsl: "hsl(0,85.7%,97.3%)", - }, - { - scale: 100, - hex: "#fee2e2", - rgb: "rgb(254,226,226)", - hsl: "hsl(0,93.3%,94.1%)", - }, - { - scale: 200, - hex: "#fecaca", - rgb: "rgb(254,202,202)", - hsl: "hsl(0,96.3%,89.4%)", - }, - { - scale: 300, - hex: "#fca5a5", - rgb: "rgb(252,165,165)", - hsl: "hsl(0,93.5%,81.8%)", - }, - { - scale: 400, - hex: "#f87171", - rgb: "rgb(248,113,113)", - hsl: "hsl(0,90.6%,70.8%)", - }, - { - scale: 500, - hex: "#ef4444", - rgb: "rgb(239,68,68)", - hsl: "hsl(0,84.2%,60.2%)", - }, - { - scale: 600, - hex: "#dc2626", - rgb: "rgb(220,38,38)", - hsl: "hsl(0,72.2%,50.6%)", - }, - { - scale: 700, - hex: "#b91c1c", - rgb: "rgb(185,28,28)", - hsl: "hsl(0,73.7%,41.8%)", - }, - { - scale: 800, - hex: "#991b1b", - rgb: "rgb(153,27,27)", - hsl: "hsl(0,70%,35.3%)", - }, - { - scale: 900, - hex: "#7f1d1d", - rgb: "rgb(127,29,29)", - hsl: "hsl(0,62.8%,30.6%)", - }, - { - scale: 950, - hex: "#450a0a", - rgb: "rgb(69,10,10)", - hsl: "hsl(0,74.7%,15.5%)", - }, - ], - orange: [ - { - scale: 50, - hex: "#fff7ed", - rgb: "rgb(255,247,237)", - hsl: "hsl(33.3,100%,96.5%)", - }, - { - scale: 100, - hex: "#ffedd5", - rgb: "rgb(255,237,213)", - hsl: "hsl(34.3,100%,91.8%)", - }, - { - scale: 200, - hex: "#fed7aa", - rgb: "rgb(254,215,170)", - hsl: "hsl(32.1,97.7%,83.1%)", - }, - { - scale: 300, - hex: "#fdba74", - rgb: "rgb(253,186,116)", - hsl: "hsl(30.7,97.2%,72.4%)", - }, - { - scale: 400, - hex: "#fb923c", - rgb: "rgb(251,146,60)", - hsl: "hsl(27,96%,61%)", - }, - { - scale: 500, - hex: "#f97316", - rgb: "rgb(249,115,22)", - hsl: "hsl(24.6,95%,53.1%)", - }, - { - scale: 600, - hex: "#ea580c", - rgb: "rgb(234,88,12)", - hsl: "hsl(20.5,90.2%,48.2%)", - }, - { - scale: 700, - hex: "#c2410c", - rgb: "rgb(194,65,12)", - hsl: "hsl(17.5,88.3%,40.4%)", - }, - { - scale: 800, - hex: "#9a3412", - rgb: "rgb(154,52,18)", - hsl: "hsl(15,79.1%,33.7%)", - }, - { - scale: 900, - hex: "#7c2d12", - rgb: "rgb(124,45,18)", - hsl: "hsl(15.3,74.6%,27.8%)", - }, - { - scale: 950, - hex: "#431407", - rgb: "rgb(67,20,7)", - hsl: "hsl(13,81.1%,14.5%)", - }, - ], - amber: [ - { - scale: 50, - hex: "#fffbeb", - rgb: "rgb(255,251,235)", - hsl: "hsl(48,100%,96.1%)", - }, - { - scale: 100, - hex: "#fef3c7", - rgb: "rgb(254,243,199)", - hsl: "hsl(48,96.5%,88.8%)", - }, - { - scale: 200, - hex: "#fde68a", - rgb: "rgb(253,230,138)", - hsl: "hsl(48,96.6%,76.7%)", - }, - { - scale: 300, - hex: "#fcd34d", - rgb: "rgb(252,211,77)", - hsl: "hsl(45.9,96.7%,64.5%)", - }, - { - scale: 400, - hex: "#fbbf24", - rgb: "rgb(251,191,36)", - hsl: "hsl(43.3,96.4%,56.3%)", - }, - { - scale: 500, - hex: "#f59e0b", - rgb: "rgb(245,158,11)", - hsl: "hsl(37.7,92.1%,50.2%)", - }, - { - scale: 600, - hex: "#d97706", - rgb: "rgb(217,119,6)", - hsl: "hsl(32.1,94.6%,43.7%)", - }, - { - scale: 700, - hex: "#b45309", - rgb: "rgb(180,83,9)", - hsl: "hsl(26,90.5%,37.1%)", - }, - { - scale: 800, - hex: "#92400e", - rgb: "rgb(146,64,14)", - hsl: "hsl(22.7,82.5%,31.4%)", - }, - { - scale: 900, - hex: "#78350f", - rgb: "rgb(120,53,15)", - hsl: "hsl(21.7,77.8%,26.5%)", - }, - { - scale: 950, - hex: "#451a03", - rgb: "rgb(69,26,3)", - hsl: "hsl(20.9,91.7%,14.1%)", - }, - ], - yellow: [ - { - scale: 50, - hex: "#fefce8", - rgb: "rgb(254,252,232)", - hsl: "hsl(54.5,91.7%,95.3%)", - }, - { - scale: 100, - hex: "#fef9c3", - rgb: "rgb(254,249,195)", - hsl: "hsl(54.9,96.7%,88%)", - }, - { - scale: 200, - hex: "#fef08a", - rgb: "rgb(254,240,138)", - hsl: "hsl(52.8,98.3%,76.9%)", - }, - { - scale: 300, - hex: "#fde047", - rgb: "rgb(253,224,71)", - hsl: "hsl(50.4,97.8%,63.5%)", - }, - { - scale: 400, - hex: "#facc15", - rgb: "rgb(250,204,21)", - hsl: "hsl(47.9,95.8%,53.1%)", - }, - { - scale: 500, - hex: "#eab308", - rgb: "rgb(234,179,8)", - hsl: "hsl(45.4,93.4%,47.5%)", - }, - { - scale: 600, - hex: "#ca8a04", - rgb: "rgb(202,138,4)", - hsl: "hsl(40.6,96.1%,40.4%)", - }, - { - scale: 700, - hex: "#a16207", - rgb: "rgb(161,98,7)", - hsl: "hsl(35.5,91.7%,32.9%)", - }, - { - scale: 800, - hex: "#854d0e", - rgb: "rgb(133,77,14)", - hsl: "hsl(31.8,81%,28.8%)", - }, - { - scale: 900, - hex: "#713f12", - rgb: "rgb(113,63,18)", - hsl: "hsl(28.4,72.5%,25.7%)", - }, - { - scale: 950, - hex: "#422006", - rgb: "rgb(66,32,6)", - hsl: "hsl(26,83.3%,14.1%)", - }, - ], - lime: [ - { - scale: 50, - hex: "#f7fee7", - rgb: "rgb(247,254,231)", - hsl: "hsl(78.3,92%,95.1%)", - }, - { - scale: 100, - hex: "#ecfccb", - rgb: "rgb(236,252,203)", - hsl: "hsl(79.6,89.1%,89.2%)", - }, - { - scale: 200, - hex: "#d9f99d", - rgb: "rgb(217,249,157)", - hsl: "hsl(80.9,88.5%,79.6%)", - }, - { - scale: 300, - hex: "#bef264", - rgb: "rgb(190,242,100)", - hsl: "hsl(82,84.5%,67.1%)", - }, - { - scale: 400, - hex: "#a3e635", - rgb: "rgb(163,230,53)", - hsl: "hsl(82.7,78%,55.5%)", - }, - { - scale: 500, - hex: "#84cc16", - rgb: "rgb(132,204,22)", - hsl: "hsl(83.7,80.5%,44.3%)", - }, - { - scale: 600, - hex: "#65a30d", - rgb: "rgb(101,163,13)", - hsl: "hsl(84.8,85.2%,34.5%)", - }, - { - scale: 700, - hex: "#4d7c0f", - rgb: "rgb(77,124,15)", - hsl: "hsl(85.9,78.4%,27.3%)", - }, - { - scale: 800, - hex: "#3f6212", - rgb: "rgb(63,98,18)", - hsl: "hsl(86.3,69%,22.7%)", - }, - { - scale: 900, - hex: "#365314", - rgb: "rgb(54,83,20)", - hsl: "hsl(87.6,61.2%,20.2%)", - }, - { - scale: 950, - hex: "#1a2e05", - rgb: "rgb(26,46,5)", - hsl: "hsl(89.3,80.4%,10%)", - }, - ], - green: [ - { - scale: 50, - hex: "#f0fdf4", - rgb: "rgb(240,253,244)", - hsl: "hsl(138.5,76.5%,96.7%)", - }, - { - scale: 100, - hex: "#dcfce7", - rgb: "rgb(220,252,231)", - hsl: "hsl(140.6,84.2%,92.5%)", - }, - { - scale: 200, - hex: "#bbf7d0", - rgb: "rgb(187,247,208)", - hsl: "hsl(141,78.9%,85.1%)", - }, - { - scale: 300, - hex: "#86efac", - rgb: "rgb(134,239,172)", - hsl: "hsl(141.7,76.6%,73.1%)", - }, - { - scale: 400, - hex: "#4ade80", - rgb: "rgb(74,222,128)", - hsl: "hsl(141.9,69.2%,58%)", - }, - { - scale: 500, - hex: "#22c55e", - rgb: "rgb(34,197,94)", - hsl: "hsl(142.1,70.6%,45.3%)", - }, - { - scale: 600, - hex: "#16a34a", - rgb: "rgb(22,163,74)", - hsl: "hsl(142.1,76.2%,36.3%)", - }, - { - scale: 700, - hex: "#15803d", - rgb: "rgb(21,128,61)", - hsl: "hsl(142.4,71.8%,29.2%)", - }, - { - scale: 800, - hex: "#166534", - rgb: "rgb(22,101,52)", - hsl: "hsl(142.8,64.2%,24.1%)", - }, - { - scale: 900, - hex: "#14532d", - rgb: "rgb(20,83,45)", - hsl: "hsl(143.8,61.2%,20.2%)", - }, - { - scale: 950, - hex: "#052e16", - rgb: "rgb(5,46,22)", - hsl: "hsl(144.9,80.4%,10%)", - }, - ], - emerald: [ - { - scale: 50, - hex: "#ecfdf5", - rgb: "rgb(236,253,245)", - hsl: "hsl(151.8,81%,95.9%)", - }, - { - scale: 100, - hex: "#d1fae5", - rgb: "rgb(209,250,229)", - hsl: "hsl(149.3,80.4%,90%)", - }, - { - scale: 200, - hex: "#a7f3d0", - rgb: "rgb(167,243,208)", - hsl: "hsl(152.4,76%,80.4%)", - }, - { - scale: 300, - hex: "#6ee7b7", - rgb: "rgb(110,231,183)", - hsl: "hsl(156.2,71.6%,66.9%)", - }, - { - scale: 400, - hex: "#34d399", - rgb: "rgb(52,211,153)", - hsl: "hsl(158.1,64.4%,51.6%)", - }, - { - scale: 500, - hex: "#10b981", - rgb: "rgb(16,185,129)", - hsl: "hsl(160.1,84.1%,39.4%)", - }, - { - scale: 600, - hex: "#059669", - rgb: "rgb(5,150,105)", - hsl: "hsl(161.4,93.5%,30.4%)", - }, - { - scale: 700, - hex: "#047857", - rgb: "rgb(4,120,87)", - hsl: "hsl(162.9,93.5%,24.3%)", - }, - { - scale: 800, - hex: "#065f46", - rgb: "rgb(6,95,70)", - hsl: "hsl(163.1,88.1%,19.8%)", - }, - { - scale: 900, - hex: "#064e3b", - rgb: "rgb(6,78,59)", - hsl: "hsl(164.2,85.7%,16.5%)", - }, - { - scale: 950, - hex: "#022c22", - rgb: "rgb(2,44,34)", - hsl: "hsl(165.7,91.3%,9%)", - }, - ], - teal: [ - { - scale: 50, - hex: "#f0fdfa", - rgb: "rgb(240,253,250)", - hsl: "hsl(166.2,76.5%,96.7%)", - }, - { - scale: 100, - hex: "#ccfbf1", - rgb: "rgb(204,251,241)", - hsl: "hsl(167.2,85.5%,89.2%)", - }, - { - scale: 200, - hex: "#99f6e4", - rgb: "rgb(153,246,228)", - hsl: "hsl(168.4,83.8%,78.2%)", - }, - { - scale: 300, - hex: "#5eead4", - rgb: "rgb(94,234,212)", - hsl: "hsl(170.6,76.9%,64.3%)", - }, - { - scale: 400, - hex: "#2dd4bf", - rgb: "rgb(45,212,191)", - hsl: "hsl(172.5,66%,50.4%)", - }, - { - scale: 500, - hex: "#14b8a6", - rgb: "rgb(20,184,166)", - hsl: "hsl(173.4,80.4%,40%)", - }, - { - scale: 600, - hex: "#0d9488", - rgb: "rgb(13,148,136)", - hsl: "hsl(174.7,83.9%,31.6%)", - }, - { - scale: 700, - hex: "#0f766e", - rgb: "rgb(15,118,110)", - hsl: "hsl(175.3,77.4%,26.1%)", - }, - { - scale: 800, - hex: "#115e59", - rgb: "rgb(17,94,89)", - hsl: "hsl(176.1,69.4%,21.8%)", - }, - { - scale: 900, - hex: "#134e4a", - rgb: "rgb(19,78,74)", - hsl: "hsl(175.9,60.8%,19%)", - }, - { - scale: 950, - hex: "#042f2e", - rgb: "rgb(4,47,46)", - hsl: "hsl(178.6,84.3%,10%)", - }, - ], - cyan: [ - { - scale: 50, - hex: "#ecfeff", - rgb: "rgb(236,254,255)", - hsl: "hsl(183.2,100%,96.3%)", - }, - { - scale: 100, - hex: "#cffafe", - rgb: "rgb(207,250,254)", - hsl: "hsl(185.1,95.9%,90.4%)", - }, - { - scale: 200, - hex: "#a5f3fc", - rgb: "rgb(165,243,252)", - hsl: "hsl(186.2,93.5%,81.8%)", - }, - { - scale: 300, - hex: "#67e8f9", - rgb: "rgb(103,232,249)", - hsl: "hsl(187,92.4%,69%)", - }, - { - scale: 400, - hex: "#22d3ee", - rgb: "rgb(34,211,238)", - hsl: "hsl(187.9,85.7%,53.3%)", - }, - { - scale: 500, - hex: "#06b6d4", - rgb: "rgb(6,182,212)", - hsl: "hsl(188.7,94.5%,42.7%)", - }, - { - scale: 600, - hex: "#0891b2", - rgb: "rgb(8,145,178)", - hsl: "hsl(191.6,91.4%,36.5%)", - }, - { - scale: 700, - hex: "#0e7490", - rgb: "rgb(14,116,144)", - hsl: "hsl(192.9,82.3%,31%)", - }, - { - scale: 800, - hex: "#155e75", - rgb: "rgb(21,94,117)", - hsl: "hsl(194.4,69.6%,27.1%)", - }, - { - scale: 900, - hex: "#164e63", - rgb: "rgb(22,78,99)", - hsl: "hsl(196.4,63.6%,23.7%)", - }, - { - scale: 950, - hex: "#083344", - rgb: "rgb(8,51,68)", - hsl: "hsl(197,78.9%,14.9%)", - }, - ], - sky: [ - { - scale: 50, - hex: "#f0f9ff", - rgb: "rgb(240,249,255)", - hsl: "hsl(204,100%,97.1%)", - }, - { - scale: 100, - hex: "#e0f2fe", - rgb: "rgb(224,242,254)", - hsl: "hsl(204,93.8%,93.7%)", - }, - { - scale: 200, - hex: "#bae6fd", - rgb: "rgb(186,230,253)", - hsl: "hsl(200.6,94.4%,86.1%)", - }, - { - scale: 300, - hex: "#7dd3fc", - rgb: "rgb(125,211,252)", - hsl: "hsl(199.4,95.5%,73.9%)", - }, - { - scale: 400, - hex: "#38bdf8", - rgb: "rgb(56,189,248)", - hsl: "hsl(198.4,93.2%,59.6%)", - }, - { - scale: 500, - hex: "#0ea5e9", - rgb: "rgb(14,165,233)", - hsl: "hsl(198.6,88.7%,48.4%)", - }, - { - scale: 600, - hex: "#0284c7", - rgb: "rgb(2,132,199)", - hsl: "hsl(200.4,98%,39.4%)", - }, - { - scale: 700, - hex: "#0369a1", - rgb: "rgb(3,105,161)", - hsl: "hsl(201.3,96.3%,32.2%)", - }, - { - scale: 800, - hex: "#075985", - rgb: "rgb(7,89,133)", - hsl: "hsl(201,90%,27.5%)", - }, - { - scale: 900, - hex: "#0c4a6e", - rgb: "rgb(12,74,110)", - hsl: "hsl(202,80.3%,23.9%)", - }, - { - scale: 950, - hex: "#082f49", - rgb: "rgb(8,47,73)", - hsl: "hsl(204,80.2%,15.9%)", - }, - ], - blue: [ - { - scale: 50, - hex: "#eff6ff", - rgb: "rgb(239,246,255)", - hsl: "hsl(213.8,100%,96.9%)", - }, - { - scale: 100, - hex: "#dbeafe", - rgb: "rgb(219,234,254)", - hsl: "hsl(214.3,94.6%,92.7%)", - }, - { - scale: 200, - hex: "#bfdbfe", - rgb: "rgb(191,219,254)", - hsl: "hsl(213.3,96.9%,87.3%)", - }, - { - scale: 300, - hex: "#93c5fd", - rgb: "rgb(147,197,253)", - hsl: "hsl(211.7,96.4%,78.4%)", - }, - { - scale: 400, - hex: "#60a5fa", - rgb: "rgb(96,165,250)", - hsl: "hsl(213.1,93.9%,67.8%)", - }, - { - scale: 500, - hex: "#3b82f6", - rgb: "rgb(59,130,246)", - hsl: "hsl(217.2,91.2%,59.8%)", - }, - { - scale: 600, - hex: "#2563eb", - rgb: "rgb(37,99,235)", - hsl: "hsl(221.2,83.2%,53.3%)", - }, - { - scale: 700, - hex: "#1d4ed8", - rgb: "rgb(29,78,216)", - hsl: "hsl(224.3,76.3%,48%)", - }, - { - scale: 800, - hex: "#1e40af", - rgb: "rgb(30,64,175)", - hsl: "hsl(225.9,70.7%,40.2%)", - }, - { - scale: 900, - hex: "#1e3a8a", - rgb: "rgb(30,58,138)", - hsl: "hsl(224.4,64.3%,32.9%)", - }, - { - scale: 950, - hex: "#172554", - rgb: "rgb(23,37,84)", - hsl: "hsl(226.2,57%,21%)", - }, - ], - indigo: [ - { - scale: 50, - hex: "#eef2ff", - rgb: "rgb(238,242,255)", - hsl: "hsl(225.9,100%,96.7%)", - }, - { - scale: 100, - hex: "#e0e7ff", - rgb: "rgb(224,231,255)", - hsl: "hsl(226.5,100%,93.9%)", - }, - { - scale: 200, - hex: "#c7d2fe", - rgb: "rgb(199,210,254)", - hsl: "hsl(228,96.5%,88.8%)", - }, - { - scale: 300, - hex: "#a5b4fc", - rgb: "rgb(165,180,252)", - hsl: "hsl(229.7,93.5%,81.8%)", - }, - { - scale: 400, - hex: "#818cf8", - rgb: "rgb(129,140,248)", - hsl: "hsl(234.5,89.5%,73.9%)", - }, - { - scale: 500, - hex: "#6366f1", - rgb: "rgb(99,102,241)", - hsl: "hsl(238.7,83.5%,66.7%)", - }, - { - scale: 600, - hex: "#4f46e5", - rgb: "rgb(79,70,229)", - hsl: "hsl(243.4,75.4%,58.6%)", - }, - { - scale: 700, - hex: "#4338ca", - rgb: "rgb(67,56,202)", - hsl: "hsl(244.5,57.9%,50.6%)", - }, - { - scale: 800, - hex: "#3730a3", - rgb: "rgb(55,48,163)", - hsl: "hsl(243.7,54.5%,41.4%)", - }, - { - scale: 900, - hex: "#312e81", - rgb: "rgb(49,46,129)", - hsl: "hsl(242.2,47.4%,34.3%)", - }, - { - scale: 950, - hex: "#1e1b4b", - rgb: "rgb(30,27,75)", - hsl: "hsl(243.8,47.1%,20%)", - }, - ], - violet: [ - { - scale: 50, - hex: "#f5f3ff", - rgb: "rgb(245,243,255)", - hsl: "hsl(250,100%,97.6%)", - }, - { - scale: 100, - hex: "#ede9fe", - rgb: "rgb(237,233,254)", - hsl: "hsl(251.4,91.3%,95.5%)", - }, - { - scale: 200, - hex: "#ddd6fe", - rgb: "rgb(221,214,254)", - hsl: "hsl(250.5,95.2%,91.8%)", - }, - { - scale: 300, - hex: "#c4b5fd", - rgb: "rgb(196,181,253)", - hsl: "hsl(252.5,94.7%,85.1%)", - }, - { - scale: 400, - hex: "#a78bfa", - rgb: "rgb(167,139,250)", - hsl: "hsl(255.1,91.7%,76.3%)", - }, - { - scale: 500, - hex: "#8b5cf6", - rgb: "rgb(139,92,246)", - hsl: "hsl(258.3,89.5%,66.3%)", - }, - { - scale: 600, - hex: "#7c3aed", - rgb: "rgb(124,58,237)", - hsl: "hsl(262.1,83.3%,57.8%)", - }, - { - scale: 700, - hex: "#6d28d9", - rgb: "rgb(109,40,217)", - hsl: "hsl(263.4,70%,50.4%)", - }, - { - scale: 800, - hex: "#5b21b6", - rgb: "rgb(91,33,182)", - hsl: "hsl(263.4,69.3%,42.2%)", - }, - { - scale: 900, - hex: "#4c1d95", - rgb: "rgb(76,29,149)", - hsl: "hsl(263.5,67.4%,34.9%)", - }, - { - scale: 950, - hex: "#1e1b4b", - rgb: "rgb(46,16,101)", - hsl: "hsl(261.2,72.6%,22.9%)", - }, - ], - purple: [ - { - scale: 50, - hex: "#faf5ff", - rgb: "rgb(250,245,255)", - hsl: "hsl(270,100%,98%)", - }, - { - scale: 100, - hex: "#f3e8ff", - rgb: "rgb(243,232,255)", - hsl: "hsl(268.7,100%,95.5%)", - }, - { - scale: 200, - hex: "#e9d5ff", - rgb: "rgb(233,213,255)", - hsl: "hsl(268.6,100%,91.8%)", - }, - { - scale: 300, - hex: "#d8b4fe", - rgb: "rgb(216,180,254)", - hsl: "hsl(269.2,97.4%,85.1%)", - }, - { - scale: 400, - hex: "#c084fc", - rgb: "rgb(192,132,252)", - hsl: "hsl(270,95.2%,75.3%)", - }, - { - scale: 500, - hex: "#a855f7", - rgb: "rgb(168,85,247)", - hsl: "hsl(270.7,91%,65.1%)", - }, - { - scale: 600, - hex: "#9333ea", - rgb: "rgb(147,51,234)", - hsl: "hsl(271.5,81.3%,55.9%)", - }, - { - scale: 700, - hex: "#7e22ce", - rgb: "rgb(126,34,206)", - hsl: "hsl(272.1,71.7%,47.1%)", - }, - { - scale: 800, - hex: "#6b21a8", - rgb: "rgb(107,33,168)", - hsl: "hsl(272.9,67.2%,39.4%)", - }, - { - scale: 900, - hex: "#581c87", - rgb: "rgb(88,28,135)", - hsl: "hsl(273.6,65.6%,32%)", - }, - { - scale: 950, - hex: "#3b0764", - rgb: "rgb(59,7,100)", - hsl: "hsl(273.5,86.9%,21%)", - }, - ], - fuchsia: [ - { - scale: 50, - hex: "#fdf4ff", - rgb: "rgb(253,244,255)", - hsl: "hsl(289.1,100%,97.8%)", - }, - { - scale: 100, - hex: "#fae8ff", - rgb: "rgb(250,232,255)", - hsl: "hsl(287,100%,95.5%)", - }, - { - scale: 200, - hex: "#f5d0fe", - rgb: "rgb(245,208,254)", - hsl: "hsl(288.3,95.8%,90.6%)", - }, - { - scale: 300, - hex: "#f0abfc", - rgb: "rgb(240,171,252)", - hsl: "hsl(291.1,93.1%,82.9%)", - }, - { - scale: 400, - hex: "#e879f9", - rgb: "rgb(232,121,249)", - hsl: "hsl(292,91.4%,72.5%)", - }, - { - scale: 500, - hex: "#d946ef", - rgb: "rgb(217,70,239)", - hsl: "hsl(292.2,84.1%,60.6%)", - }, - { - scale: 600, - hex: "#c026d3", - rgb: "rgb(192,38,211)", - hsl: "hsl(293.4,69.5%,48.8%)", - }, - { - scale: 700, - hex: "#a21caf", - rgb: "rgb(162,28,175)", - hsl: "hsl(294.7,72.4%,39.8%)", - }, - { - scale: 800, - hex: "#86198f", - rgb: "rgb(134,25,143)", - hsl: "hsl(295.4,70.2%,32.9%)", - }, - { - scale: 900, - hex: "#701a75", - rgb: "rgb(112,26,117)", - hsl: "hsl(296.7,63.6%,28%)", - }, - { - scale: 950, - hex: "#4a044e", - rgb: "rgb(74,4,78)", - hsl: "hsl(296.8,90.2%,16.1%)", - }, - ], - pink: [ - { - scale: 50, - hex: "#fdf2f8", - rgb: "rgb(253,242,248)", - hsl: "hsl(327.3,73.3%,97.1%)", - }, - { - scale: 100, - hex: "#fce7f3", - rgb: "rgb(252,231,243)", - hsl: "hsl(325.7,77.8%,94.7%)", - }, - { - scale: 200, - hex: "#fbcfe8", - rgb: "rgb(251,207,232)", - hsl: "hsl(325.9,84.6%,89.8%)", - }, - { - scale: 300, - hex: "#f9a8d4", - rgb: "rgb(249,168,212)", - hsl: "hsl(327.4,87.1%,81.8%)", - }, - { - scale: 400, - hex: "#f472b6", - rgb: "rgb(244,114,182)", - hsl: "hsl(328.6,85.5%,70.2%)", - }, - { - scale: 500, - hex: "#ec4899", - rgb: "rgb(236,72,153)", - hsl: "hsl(330.4,81.2%,60.4%)", - }, - { - scale: 600, - hex: "#db2777", - rgb: "rgb(219,39,119)", - hsl: "hsl(333.3,71.4%,50.6%)", - }, - { - scale: 700, - hex: "#be185d", - rgb: "rgb(190,24,93)", - hsl: "hsl(335.1,77.6%,42%)", - }, - { - scale: 800, - hex: "#9d174d", - rgb: "rgb(157,23,77)", - hsl: "hsl(335.8,74.4%,35.3%)", - }, - { - scale: 900, - hex: "#831843", - rgb: "rgb(131,24,67)", - hsl: "hsl(335.9,69%,30.4%)", - }, - { - scale: 950, - hex: "#500724", - rgb: "rgb(80,7,36)", - hsl: "hsl(336.2,83.9%,17.1%)", - }, - ], - rose: [ - { - scale: 50, - hex: "#fff1f2", - rgb: "rgb(255,241,242)", - hsl: "hsl(355.7,100%,97.3%)", - }, - { - scale: 100, - hex: "#ffe4e6", - rgb: "rgb(255,228,230)", - hsl: "hsl(355.6,100%,94.7%)", - }, - { - scale: 200, - hex: "#fecdd3", - rgb: "rgb(254,205,211)", - hsl: "hsl(352.7,96.1%,90%)", - }, - { - scale: 300, - hex: "#fda4af", - rgb: "rgb(253,164,175)", - hsl: "hsl(352.6,95.7%,81.8%)", - }, - { - scale: 400, - hex: "#fb7185", - rgb: "rgb(251,113,133)", - hsl: "hsl(351.3,94.5%,71.4%)", - }, - { - scale: 500, - hex: "#f43f5e", - rgb: "rgb(244,63,94)", - hsl: "hsl(349.7,89.2%,60.2%)", - }, - { - scale: 600, - hex: "#e11d48", - rgb: "rgb(225,29,72)", - hsl: "hsl(346.8,77.2%,49.8%)", - }, - { - scale: 700, - hex: "#be123c", - rgb: "rgb(190,18,60)", - hsl: "hsl(345.3,82.7%,40.8%)", - }, - { - scale: 800, - hex: "#9f1239", - rgb: "rgb(159,18,57)", - hsl: "hsl(343.4,79.7%,34.7%)", - }, - { - scale: 900, - hex: "#881337", - rgb: "rgb(136,19,55)", - hsl: "hsl(341.5,75.5%,30.4%)", - }, - { - scale: 950, - hex: "#4c0519", - rgb: "rgb(76,5,25)", - hsl: "hsl(343.1,87.7%,15.9%)", - }, - ], -}; + inherit: "inherit", + current: "currentColor", + transparent: "transparent", + black: { + hex: "#000000", + rgb: "rgb(0,0,0)", + hsl: "hsl(0,0%,0%)", + }, + white: { + hex: "#ffffff", + rgb: "rgb(255,255,255)", + hsl: "hsl(0,0%,100%)", + }, + slate: [ + { + scale: 50, + hex: "#f8fafc", + rgb: "rgb(248,250,252)", + hsl: "hsl(210,40%,98%)", + }, + { + scale: 100, + hex: "#f1f5f9", + rgb: "rgb(241,245,249)", + hsl: "hsl(210,40%,96.1%)", + }, + { + scale: 200, + hex: "#e2e8f0", + rgb: "rgb(226,232,240)", + hsl: "hsl(214.3,31.8%,91.4%)", + }, + { + scale: 300, + hex: "#cbd5e1", + rgb: "rgb(203,213,225)", + hsl: "hsl(212.7,26.8%,83.9%)", + }, + { + scale: 400, + hex: "#94a3b8", + rgb: "rgb(148,163,184)", + hsl: "hsl(215,20.2%,65.1%)", + }, + { + scale: 500, + hex: "#64748b", + rgb: "rgb(100,116,139)", + hsl: "hsl(215.4,16.3%,46.9%)", + }, + { + scale: 600, + hex: "#475569", + rgb: "rgb(71,85,105)", + hsl: "hsl(215.3,19.3%,34.5%)", + }, + { + scale: 700, + hex: "#334155", + rgb: "rgb(51,65,85)", + hsl: "hsl(215.3,25%,26.7%)", + }, + { + scale: 800, + hex: "#1e293b", + rgb: "rgb(30,41,59)", + hsl: "hsl(217.2,32.6%,17.5%)", + }, + { + scale: 900, + hex: "#0f172a", + rgb: "rgb(15,23,42)", + hsl: "hsl(222.2,47.4%,11.2%)", + }, + { + scale: 950, + hex: "#020617", + rgb: "rgb(2,6,23)", + hsl: "hsl(222.2,84%,4.9%)", + }, + ], + gray: [ + { + scale: 50, + hex: "#f9fafb", + rgb: "rgb(249,250,251)", + hsl: "hsl(210,20%,98%)", + }, + { + scale: 100, + hex: "#f3f4f6", + rgb: "rgb(243,244,246)", + hsl: "hsl(220,14.3%,95.9%)", + }, + { + scale: 200, + hex: "#e5e7eb", + rgb: "rgb(229,231,235)", + hsl: "hsl(220,13%,91%)", + }, + { + scale: 300, + hex: "#d1d5db", + rgb: "rgb(209,213,219)", + hsl: "hsl(216,12.2%,83.9%)", + }, + { + scale: 400, + hex: "#9ca3af", + rgb: "rgb(156,163,175)", + hsl: "hsl(217.9,10.6%,64.9%)", + }, + { + scale: 500, + hex: "#6b7280", + rgb: "rgb(107,114,128)", + hsl: "hsl(220,8.9%,46.1%)", + }, + { + scale: 600, + hex: "#4b5563", + rgb: "rgb(75,85,99)", + hsl: "hsl(215,13.8%,34.1%)", + }, + { + scale: 700, + hex: "#374151", + rgb: "rgb(55,65,81)", + hsl: "hsl(216.9,19.1%,26.7%)", + }, + { + scale: 800, + hex: "#1f2937", + rgb: "rgb(31,41,55)", + hsl: "hsl(215,27.9%,16.9%)", + }, + { + scale: 900, + hex: "#111827", + rgb: "rgb(17,24,39)", + hsl: "hsl(220.9,39.3%,11%)", + }, + { + scale: 950, + hex: "#030712", + rgb: "rgb(3,7,18)", + hsl: "hsl(224,71.4%,4.1%)", + }, + ], + zinc: [ + { + scale: 50, + hex: "#fafafa", + rgb: "rgb(250,250,250)", + hsl: "hsl(0,0%,98%)", + }, + { + scale: 100, + hex: "#f4f4f5", + rgb: "rgb(244,244,245)", + hsl: "hsl(240,4.8%,95.9%)", + }, + { + scale: 200, + hex: "#e4e4e7", + rgb: "rgb(228,228,231)", + hsl: "hsl(240,5.9%,90%)", + }, + { + scale: 300, + hex: "#d4d4d8", + rgb: "rgb(212,212,216)", + hsl: "hsl(240,4.9%,83.9%)", + }, + { + scale: 400, + hex: "#a1a1aa", + rgb: "rgb(161,161,170)", + hsl: "hsl(240,5%,64.9%)", + }, + { + scale: 500, + hex: "#71717a", + rgb: "rgb(113,113,122)", + hsl: "hsl(240,3.8%,46.1%)", + }, + { + scale: 600, + hex: "#52525b", + rgb: "rgb(82,82,91)", + hsl: "hsl(240,5.2%,33.9%)", + }, + { + scale: 700, + hex: "#3f3f46", + rgb: "rgb(63,63,70)", + hsl: "hsl(240,5.3%,26.1%)", + }, + { + scale: 800, + hex: "#27272a", + rgb: "rgb(39,39,42)", + hsl: "hsl(240,3.7%,15.9%)", + }, + { + scale: 900, + hex: "#18181b", + rgb: "rgb(24,24,27)", + hsl: "hsl(240,5.9%,10%)", + }, + { + scale: 950, + hex: "#09090b", + rgb: "rgb(9,9,11)", + hsl: "hsl(240,10%,3.9%)", + }, + ], + neutral: [ + { + scale: 50, + hex: "#fafafa", + rgb: "rgb(250,250,250)", + hsl: "hsl(0,0%,98%)", + }, + { + scale: 100, + hex: "#f5f5f5", + rgb: "rgb(245,245,245)", + hsl: "hsl(0,0%,96.1%)", + }, + { + scale: 200, + hex: "#e5e5e5", + rgb: "rgb(229,229,229)", + hsl: "hsl(0,0%,89.8%)", + }, + { + scale: 300, + hex: "#d4d4d4", + rgb: "rgb(212,212,212)", + hsl: "hsl(0,0%,83.1%)", + }, + { + scale: 400, + hex: "#a3a3a3", + rgb: "rgb(163,163,163)", + hsl: "hsl(0,0%,63.9%)", + }, + { + scale: 500, + hex: "#737373", + rgb: "rgb(115,115,115)", + hsl: "hsl(0,0%,45.1%)", + }, + { + scale: 600, + hex: "#525252", + rgb: "rgb(82,82,82)", + hsl: "hsl(0,0%,32.2%)", + }, + { + scale: 700, + hex: "#404040", + rgb: "rgb(64,64,64)", + hsl: "hsl(0,0%,25.1%)", + }, + { + scale: 800, + hex: "#262626", + rgb: "rgb(38,38,38)", + hsl: "hsl(0,0%,14.9%)", + }, + { + scale: 900, + hex: "#171717", + rgb: "rgb(23,23,23)", + hsl: "hsl(0,0%,9%)", + }, + { + scale: 950, + hex: "#0a0a0a", + rgb: "rgb(10,10,10)", + hsl: "hsl(0,0%,3.9%)", + }, + ], + stone: [ + { + scale: 50, + hex: "#fafaf9", + rgb: "rgb(250,250,249)", + hsl: "hsl(60,9.1%,97.8%)", + }, + { + scale: 100, + hex: "#f5f5f4", + rgb: "rgb(245,245,244)", + hsl: "hsl(60,4.8%,95.9%)", + }, + { + scale: 200, + hex: "#e7e5e4", + rgb: "rgb(231,229,228)", + hsl: "hsl(20,5.9%,90%)", + }, + { + scale: 300, + hex: "#d6d3d1", + rgb: "rgb(214,211,209)", + hsl: "hsl(24,5.7%,82.9%)", + }, + { + scale: 400, + hex: "#a8a29e", + rgb: "rgb(168,162,158)", + hsl: "hsl(24,5.4%,63.9%)", + }, + { + scale: 500, + hex: "#78716c", + rgb: "rgb(120,113,108)", + hsl: "hsl(25,5.3%,44.7%)", + }, + { + scale: 600, + hex: "#57534e", + rgb: "rgb(87,83,78)", + hsl: "hsl(33.3,5.5%,32.4%)", + }, + { + scale: 700, + hex: "#44403c", + rgb: "rgb(68,64,60)", + hsl: "hsl(30,6.3%,25.1%)", + }, + { + scale: 800, + hex: "#292524", + rgb: "rgb(41,37,36)", + hsl: "hsl(12,6.5%,15.1%)", + }, + { + scale: 900, + hex: "#1c1917", + rgb: "rgb(28,25,23)", + hsl: "hsl(24,9.8%,10%)", + }, + { + scale: 950, + hex: "#0c0a09", + rgb: "rgb(12,10,9)", + hsl: "hsl(20,14.3%,4.1%)", + }, + ], + red: [ + { + scale: 50, + hex: "#fef2f2", + rgb: "rgb(254,242,242)", + hsl: "hsl(0,85.7%,97.3%)", + }, + { + scale: 100, + hex: "#fee2e2", + rgb: "rgb(254,226,226)", + hsl: "hsl(0,93.3%,94.1%)", + }, + { + scale: 200, + hex: "#fecaca", + rgb: "rgb(254,202,202)", + hsl: "hsl(0,96.3%,89.4%)", + }, + { + scale: 300, + hex: "#fca5a5", + rgb: "rgb(252,165,165)", + hsl: "hsl(0,93.5%,81.8%)", + }, + { + scale: 400, + hex: "#f87171", + rgb: "rgb(248,113,113)", + hsl: "hsl(0,90.6%,70.8%)", + }, + { + scale: 500, + hex: "#ef4444", + rgb: "rgb(239,68,68)", + hsl: "hsl(0,84.2%,60.2%)", + }, + { + scale: 600, + hex: "#dc2626", + rgb: "rgb(220,38,38)", + hsl: "hsl(0,72.2%,50.6%)", + }, + { + scale: 700, + hex: "#b91c1c", + rgb: "rgb(185,28,28)", + hsl: "hsl(0,73.7%,41.8%)", + }, + { + scale: 800, + hex: "#991b1b", + rgb: "rgb(153,27,27)", + hsl: "hsl(0,70%,35.3%)", + }, + { + scale: 900, + hex: "#7f1d1d", + rgb: "rgb(127,29,29)", + hsl: "hsl(0,62.8%,30.6%)", + }, + { + scale: 950, + hex: "#450a0a", + rgb: "rgb(69,10,10)", + hsl: "hsl(0,74.7%,15.5%)", + }, + ], + orange: [ + { + scale: 50, + hex: "#fff7ed", + rgb: "rgb(255,247,237)", + hsl: "hsl(33.3,100%,96.5%)", + }, + { + scale: 100, + hex: "#ffedd5", + rgb: "rgb(255,237,213)", + hsl: "hsl(34.3,100%,91.8%)", + }, + { + scale: 200, + hex: "#fed7aa", + rgb: "rgb(254,215,170)", + hsl: "hsl(32.1,97.7%,83.1%)", + }, + { + scale: 300, + hex: "#fdba74", + rgb: "rgb(253,186,116)", + hsl: "hsl(30.7,97.2%,72.4%)", + }, + { + scale: 400, + hex: "#fb923c", + rgb: "rgb(251,146,60)", + hsl: "hsl(27,96%,61%)", + }, + { + scale: 500, + hex: "#f97316", + rgb: "rgb(249,115,22)", + hsl: "hsl(24.6,95%,53.1%)", + }, + { + scale: 600, + hex: "#ea580c", + rgb: "rgb(234,88,12)", + hsl: "hsl(20.5,90.2%,48.2%)", + }, + { + scale: 700, + hex: "#c2410c", + rgb: "rgb(194,65,12)", + hsl: "hsl(17.5,88.3%,40.4%)", + }, + { + scale: 800, + hex: "#9a3412", + rgb: "rgb(154,52,18)", + hsl: "hsl(15,79.1%,33.7%)", + }, + { + scale: 900, + hex: "#7c2d12", + rgb: "rgb(124,45,18)", + hsl: "hsl(15.3,74.6%,27.8%)", + }, + { + scale: 950, + hex: "#431407", + rgb: "rgb(67,20,7)", + hsl: "hsl(13,81.1%,14.5%)", + }, + ], + amber: [ + { + scale: 50, + hex: "#fffbeb", + rgb: "rgb(255,251,235)", + hsl: "hsl(48,100%,96.1%)", + }, + { + scale: 100, + hex: "#fef3c7", + rgb: "rgb(254,243,199)", + hsl: "hsl(48,96.5%,88.8%)", + }, + { + scale: 200, + hex: "#fde68a", + rgb: "rgb(253,230,138)", + hsl: "hsl(48,96.6%,76.7%)", + }, + { + scale: 300, + hex: "#fcd34d", + rgb: "rgb(252,211,77)", + hsl: "hsl(45.9,96.7%,64.5%)", + }, + { + scale: 400, + hex: "#fbbf24", + rgb: "rgb(251,191,36)", + hsl: "hsl(43.3,96.4%,56.3%)", + }, + { + scale: 500, + hex: "#f59e0b", + rgb: "rgb(245,158,11)", + hsl: "hsl(37.7,92.1%,50.2%)", + }, + { + scale: 600, + hex: "#d97706", + rgb: "rgb(217,119,6)", + hsl: "hsl(32.1,94.6%,43.7%)", + }, + { + scale: 700, + hex: "#b45309", + rgb: "rgb(180,83,9)", + hsl: "hsl(26,90.5%,37.1%)", + }, + { + scale: 800, + hex: "#92400e", + rgb: "rgb(146,64,14)", + hsl: "hsl(22.7,82.5%,31.4%)", + }, + { + scale: 900, + hex: "#78350f", + rgb: "rgb(120,53,15)", + hsl: "hsl(21.7,77.8%,26.5%)", + }, + { + scale: 950, + hex: "#451a03", + rgb: "rgb(69,26,3)", + hsl: "hsl(20.9,91.7%,14.1%)", + }, + ], + yellow: [ + { + scale: 50, + hex: "#fefce8", + rgb: "rgb(254,252,232)", + hsl: "hsl(54.5,91.7%,95.3%)", + }, + { + scale: 100, + hex: "#fef9c3", + rgb: "rgb(254,249,195)", + hsl: "hsl(54.9,96.7%,88%)", + }, + { + scale: 200, + hex: "#fef08a", + rgb: "rgb(254,240,138)", + hsl: "hsl(52.8,98.3%,76.9%)", + }, + { + scale: 300, + hex: "#fde047", + rgb: "rgb(253,224,71)", + hsl: "hsl(50.4,97.8%,63.5%)", + }, + { + scale: 400, + hex: "#facc15", + rgb: "rgb(250,204,21)", + hsl: "hsl(47.9,95.8%,53.1%)", + }, + { + scale: 500, + hex: "#eab308", + rgb: "rgb(234,179,8)", + hsl: "hsl(45.4,93.4%,47.5%)", + }, + { + scale: 600, + hex: "#ca8a04", + rgb: "rgb(202,138,4)", + hsl: "hsl(40.6,96.1%,40.4%)", + }, + { + scale: 700, + hex: "#a16207", + rgb: "rgb(161,98,7)", + hsl: "hsl(35.5,91.7%,32.9%)", + }, + { + scale: 800, + hex: "#854d0e", + rgb: "rgb(133,77,14)", + hsl: "hsl(31.8,81%,28.8%)", + }, + { + scale: 900, + hex: "#713f12", + rgb: "rgb(113,63,18)", + hsl: "hsl(28.4,72.5%,25.7%)", + }, + { + scale: 950, + hex: "#422006", + rgb: "rgb(66,32,6)", + hsl: "hsl(26,83.3%,14.1%)", + }, + ], + lime: [ + { + scale: 50, + hex: "#f7fee7", + rgb: "rgb(247,254,231)", + hsl: "hsl(78.3,92%,95.1%)", + }, + { + scale: 100, + hex: "#ecfccb", + rgb: "rgb(236,252,203)", + hsl: "hsl(79.6,89.1%,89.2%)", + }, + { + scale: 200, + hex: "#d9f99d", + rgb: "rgb(217,249,157)", + hsl: "hsl(80.9,88.5%,79.6%)", + }, + { + scale: 300, + hex: "#bef264", + rgb: "rgb(190,242,100)", + hsl: "hsl(82,84.5%,67.1%)", + }, + { + scale: 400, + hex: "#a3e635", + rgb: "rgb(163,230,53)", + hsl: "hsl(82.7,78%,55.5%)", + }, + { + scale: 500, + hex: "#84cc16", + rgb: "rgb(132,204,22)", + hsl: "hsl(83.7,80.5%,44.3%)", + }, + { + scale: 600, + hex: "#65a30d", + rgb: "rgb(101,163,13)", + hsl: "hsl(84.8,85.2%,34.5%)", + }, + { + scale: 700, + hex: "#4d7c0f", + rgb: "rgb(77,124,15)", + hsl: "hsl(85.9,78.4%,27.3%)", + }, + { + scale: 800, + hex: "#3f6212", + rgb: "rgb(63,98,18)", + hsl: "hsl(86.3,69%,22.7%)", + }, + { + scale: 900, + hex: "#365314", + rgb: "rgb(54,83,20)", + hsl: "hsl(87.6,61.2%,20.2%)", + }, + { + scale: 950, + hex: "#1a2e05", + rgb: "rgb(26,46,5)", + hsl: "hsl(89.3,80.4%,10%)", + }, + ], + green: [ + { + scale: 50, + hex: "#f0fdf4", + rgb: "rgb(240,253,244)", + hsl: "hsl(138.5,76.5%,96.7%)", + }, + { + scale: 100, + hex: "#dcfce7", + rgb: "rgb(220,252,231)", + hsl: "hsl(140.6,84.2%,92.5%)", + }, + { + scale: 200, + hex: "#bbf7d0", + rgb: "rgb(187,247,208)", + hsl: "hsl(141,78.9%,85.1%)", + }, + { + scale: 300, + hex: "#86efac", + rgb: "rgb(134,239,172)", + hsl: "hsl(141.7,76.6%,73.1%)", + }, + { + scale: 400, + hex: "#4ade80", + rgb: "rgb(74,222,128)", + hsl: "hsl(141.9,69.2%,58%)", + }, + { + scale: 500, + hex: "#22c55e", + rgb: "rgb(34,197,94)", + hsl: "hsl(142.1,70.6%,45.3%)", + }, + { + scale: 600, + hex: "#16a34a", + rgb: "rgb(22,163,74)", + hsl: "hsl(142.1,76.2%,36.3%)", + }, + { + scale: 700, + hex: "#15803d", + rgb: "rgb(21,128,61)", + hsl: "hsl(142.4,71.8%,29.2%)", + }, + { + scale: 800, + hex: "#166534", + rgb: "rgb(22,101,52)", + hsl: "hsl(142.8,64.2%,24.1%)", + }, + { + scale: 900, + hex: "#14532d", + rgb: "rgb(20,83,45)", + hsl: "hsl(143.8,61.2%,20.2%)", + }, + { + scale: 950, + hex: "#052e16", + rgb: "rgb(5,46,22)", + hsl: "hsl(144.9,80.4%,10%)", + }, + ], + emerald: [ + { + scale: 50, + hex: "#ecfdf5", + rgb: "rgb(236,253,245)", + hsl: "hsl(151.8,81%,95.9%)", + }, + { + scale: 100, + hex: "#d1fae5", + rgb: "rgb(209,250,229)", + hsl: "hsl(149.3,80.4%,90%)", + }, + { + scale: 200, + hex: "#a7f3d0", + rgb: "rgb(167,243,208)", + hsl: "hsl(152.4,76%,80.4%)", + }, + { + scale: 300, + hex: "#6ee7b7", + rgb: "rgb(110,231,183)", + hsl: "hsl(156.2,71.6%,66.9%)", + }, + { + scale: 400, + hex: "#34d399", + rgb: "rgb(52,211,153)", + hsl: "hsl(158.1,64.4%,51.6%)", + }, + { + scale: 500, + hex: "#10b981", + rgb: "rgb(16,185,129)", + hsl: "hsl(160.1,84.1%,39.4%)", + }, + { + scale: 600, + hex: "#059669", + rgb: "rgb(5,150,105)", + hsl: "hsl(161.4,93.5%,30.4%)", + }, + { + scale: 700, + hex: "#047857", + rgb: "rgb(4,120,87)", + hsl: "hsl(162.9,93.5%,24.3%)", + }, + { + scale: 800, + hex: "#065f46", + rgb: "rgb(6,95,70)", + hsl: "hsl(163.1,88.1%,19.8%)", + }, + { + scale: 900, + hex: "#064e3b", + rgb: "rgb(6,78,59)", + hsl: "hsl(164.2,85.7%,16.5%)", + }, + { + scale: 950, + hex: "#022c22", + rgb: "rgb(2,44,34)", + hsl: "hsl(165.7,91.3%,9%)", + }, + ], + teal: [ + { + scale: 50, + hex: "#f0fdfa", + rgb: "rgb(240,253,250)", + hsl: "hsl(166.2,76.5%,96.7%)", + }, + { + scale: 100, + hex: "#ccfbf1", + rgb: "rgb(204,251,241)", + hsl: "hsl(167.2,85.5%,89.2%)", + }, + { + scale: 200, + hex: "#99f6e4", + rgb: "rgb(153,246,228)", + hsl: "hsl(168.4,83.8%,78.2%)", + }, + { + scale: 300, + hex: "#5eead4", + rgb: "rgb(94,234,212)", + hsl: "hsl(170.6,76.9%,64.3%)", + }, + { + scale: 400, + hex: "#2dd4bf", + rgb: "rgb(45,212,191)", + hsl: "hsl(172.5,66%,50.4%)", + }, + { + scale: 500, + hex: "#14b8a6", + rgb: "rgb(20,184,166)", + hsl: "hsl(173.4,80.4%,40%)", + }, + { + scale: 600, + hex: "#0d9488", + rgb: "rgb(13,148,136)", + hsl: "hsl(174.7,83.9%,31.6%)", + }, + { + scale: 700, + hex: "#0f766e", + rgb: "rgb(15,118,110)", + hsl: "hsl(175.3,77.4%,26.1%)", + }, + { + scale: 800, + hex: "#115e59", + rgb: "rgb(17,94,89)", + hsl: "hsl(176.1,69.4%,21.8%)", + }, + { + scale: 900, + hex: "#134e4a", + rgb: "rgb(19,78,74)", + hsl: "hsl(175.9,60.8%,19%)", + }, + { + scale: 950, + hex: "#042f2e", + rgb: "rgb(4,47,46)", + hsl: "hsl(178.6,84.3%,10%)", + }, + ], + cyan: [ + { + scale: 50, + hex: "#ecfeff", + rgb: "rgb(236,254,255)", + hsl: "hsl(183.2,100%,96.3%)", + }, + { + scale: 100, + hex: "#cffafe", + rgb: "rgb(207,250,254)", + hsl: "hsl(185.1,95.9%,90.4%)", + }, + { + scale: 200, + hex: "#a5f3fc", + rgb: "rgb(165,243,252)", + hsl: "hsl(186.2,93.5%,81.8%)", + }, + { + scale: 300, + hex: "#67e8f9", + rgb: "rgb(103,232,249)", + hsl: "hsl(187,92.4%,69%)", + }, + { + scale: 400, + hex: "#22d3ee", + rgb: "rgb(34,211,238)", + hsl: "hsl(187.9,85.7%,53.3%)", + }, + { + scale: 500, + hex: "#06b6d4", + rgb: "rgb(6,182,212)", + hsl: "hsl(188.7,94.5%,42.7%)", + }, + { + scale: 600, + hex: "#0891b2", + rgb: "rgb(8,145,178)", + hsl: "hsl(191.6,91.4%,36.5%)", + }, + { + scale: 700, + hex: "#0e7490", + rgb: "rgb(14,116,144)", + hsl: "hsl(192.9,82.3%,31%)", + }, + { + scale: 800, + hex: "#155e75", + rgb: "rgb(21,94,117)", + hsl: "hsl(194.4,69.6%,27.1%)", + }, + { + scale: 900, + hex: "#164e63", + rgb: "rgb(22,78,99)", + hsl: "hsl(196.4,63.6%,23.7%)", + }, + { + scale: 950, + hex: "#083344", + rgb: "rgb(8,51,68)", + hsl: "hsl(197,78.9%,14.9%)", + }, + ], + sky: [ + { + scale: 50, + hex: "#f0f9ff", + rgb: "rgb(240,249,255)", + hsl: "hsl(204,100%,97.1%)", + }, + { + scale: 100, + hex: "#e0f2fe", + rgb: "rgb(224,242,254)", + hsl: "hsl(204,93.8%,93.7%)", + }, + { + scale: 200, + hex: "#bae6fd", + rgb: "rgb(186,230,253)", + hsl: "hsl(200.6,94.4%,86.1%)", + }, + { + scale: 300, + hex: "#7dd3fc", + rgb: "rgb(125,211,252)", + hsl: "hsl(199.4,95.5%,73.9%)", + }, + { + scale: 400, + hex: "#38bdf8", + rgb: "rgb(56,189,248)", + hsl: "hsl(198.4,93.2%,59.6%)", + }, + { + scale: 500, + hex: "#0ea5e9", + rgb: "rgb(14,165,233)", + hsl: "hsl(198.6,88.7%,48.4%)", + }, + { + scale: 600, + hex: "#0284c7", + rgb: "rgb(2,132,199)", + hsl: "hsl(200.4,98%,39.4%)", + }, + { + scale: 700, + hex: "#0369a1", + rgb: "rgb(3,105,161)", + hsl: "hsl(201.3,96.3%,32.2%)", + }, + { + scale: 800, + hex: "#075985", + rgb: "rgb(7,89,133)", + hsl: "hsl(201,90%,27.5%)", + }, + { + scale: 900, + hex: "#0c4a6e", + rgb: "rgb(12,74,110)", + hsl: "hsl(202,80.3%,23.9%)", + }, + { + scale: 950, + hex: "#082f49", + rgb: "rgb(8,47,73)", + hsl: "hsl(204,80.2%,15.9%)", + }, + ], + blue: [ + { + scale: 50, + hex: "#eff6ff", + rgb: "rgb(239,246,255)", + hsl: "hsl(213.8,100%,96.9%)", + }, + { + scale: 100, + hex: "#dbeafe", + rgb: "rgb(219,234,254)", + hsl: "hsl(214.3,94.6%,92.7%)", + }, + { + scale: 200, + hex: "#bfdbfe", + rgb: "rgb(191,219,254)", + hsl: "hsl(213.3,96.9%,87.3%)", + }, + { + scale: 300, + hex: "#93c5fd", + rgb: "rgb(147,197,253)", + hsl: "hsl(211.7,96.4%,78.4%)", + }, + { + scale: 400, + hex: "#60a5fa", + rgb: "rgb(96,165,250)", + hsl: "hsl(213.1,93.9%,67.8%)", + }, + { + scale: 500, + hex: "#3b82f6", + rgb: "rgb(59,130,246)", + hsl: "hsl(217.2,91.2%,59.8%)", + }, + { + scale: 600, + hex: "#2563eb", + rgb: "rgb(37,99,235)", + hsl: "hsl(221.2,83.2%,53.3%)", + }, + { + scale: 700, + hex: "#1d4ed8", + rgb: "rgb(29,78,216)", + hsl: "hsl(224.3,76.3%,48%)", + }, + { + scale: 800, + hex: "#1e40af", + rgb: "rgb(30,64,175)", + hsl: "hsl(225.9,70.7%,40.2%)", + }, + { + scale: 900, + hex: "#1e3a8a", + rgb: "rgb(30,58,138)", + hsl: "hsl(224.4,64.3%,32.9%)", + }, + { + scale: 950, + hex: "#172554", + rgb: "rgb(23,37,84)", + hsl: "hsl(226.2,57%,21%)", + }, + ], + indigo: [ + { + scale: 50, + hex: "#eef2ff", + rgb: "rgb(238,242,255)", + hsl: "hsl(225.9,100%,96.7%)", + }, + { + scale: 100, + hex: "#e0e7ff", + rgb: "rgb(224,231,255)", + hsl: "hsl(226.5,100%,93.9%)", + }, + { + scale: 200, + hex: "#c7d2fe", + rgb: "rgb(199,210,254)", + hsl: "hsl(228,96.5%,88.8%)", + }, + { + scale: 300, + hex: "#a5b4fc", + rgb: "rgb(165,180,252)", + hsl: "hsl(229.7,93.5%,81.8%)", + }, + { + scale: 400, + hex: "#818cf8", + rgb: "rgb(129,140,248)", + hsl: "hsl(234.5,89.5%,73.9%)", + }, + { + scale: 500, + hex: "#6366f1", + rgb: "rgb(99,102,241)", + hsl: "hsl(238.7,83.5%,66.7%)", + }, + { + scale: 600, + hex: "#4f46e5", + rgb: "rgb(79,70,229)", + hsl: "hsl(243.4,75.4%,58.6%)", + }, + { + scale: 700, + hex: "#4338ca", + rgb: "rgb(67,56,202)", + hsl: "hsl(244.5,57.9%,50.6%)", + }, + { + scale: 800, + hex: "#3730a3", + rgb: "rgb(55,48,163)", + hsl: "hsl(243.7,54.5%,41.4%)", + }, + { + scale: 900, + hex: "#312e81", + rgb: "rgb(49,46,129)", + hsl: "hsl(242.2,47.4%,34.3%)", + }, + { + scale: 950, + hex: "#1e1b4b", + rgb: "rgb(30,27,75)", + hsl: "hsl(243.8,47.1%,20%)", + }, + ], + violet: [ + { + scale: 50, + hex: "#f5f3ff", + rgb: "rgb(245,243,255)", + hsl: "hsl(250,100%,97.6%)", + }, + { + scale: 100, + hex: "#ede9fe", + rgb: "rgb(237,233,254)", + hsl: "hsl(251.4,91.3%,95.5%)", + }, + { + scale: 200, + hex: "#ddd6fe", + rgb: "rgb(221,214,254)", + hsl: "hsl(250.5,95.2%,91.8%)", + }, + { + scale: 300, + hex: "#c4b5fd", + rgb: "rgb(196,181,253)", + hsl: "hsl(252.5,94.7%,85.1%)", + }, + { + scale: 400, + hex: "#a78bfa", + rgb: "rgb(167,139,250)", + hsl: "hsl(255.1,91.7%,76.3%)", + }, + { + scale: 500, + hex: "#8b5cf6", + rgb: "rgb(139,92,246)", + hsl: "hsl(258.3,89.5%,66.3%)", + }, + { + scale: 600, + hex: "#7c3aed", + rgb: "rgb(124,58,237)", + hsl: "hsl(262.1,83.3%,57.8%)", + }, + { + scale: 700, + hex: "#6d28d9", + rgb: "rgb(109,40,217)", + hsl: "hsl(263.4,70%,50.4%)", + }, + { + scale: 800, + hex: "#5b21b6", + rgb: "rgb(91,33,182)", + hsl: "hsl(263.4,69.3%,42.2%)", + }, + { + scale: 900, + hex: "#4c1d95", + rgb: "rgb(76,29,149)", + hsl: "hsl(263.5,67.4%,34.9%)", + }, + { + scale: 950, + hex: "#1e1b4b", + rgb: "rgb(46,16,101)", + hsl: "hsl(261.2,72.6%,22.9%)", + }, + ], + purple: [ + { + scale: 50, + hex: "#faf5ff", + rgb: "rgb(250,245,255)", + hsl: "hsl(270,100%,98%)", + }, + { + scale: 100, + hex: "#f3e8ff", + rgb: "rgb(243,232,255)", + hsl: "hsl(268.7,100%,95.5%)", + }, + { + scale: 200, + hex: "#e9d5ff", + rgb: "rgb(233,213,255)", + hsl: "hsl(268.6,100%,91.8%)", + }, + { + scale: 300, + hex: "#d8b4fe", + rgb: "rgb(216,180,254)", + hsl: "hsl(269.2,97.4%,85.1%)", + }, + { + scale: 400, + hex: "#c084fc", + rgb: "rgb(192,132,252)", + hsl: "hsl(270,95.2%,75.3%)", + }, + { + scale: 500, + hex: "#a855f7", + rgb: "rgb(168,85,247)", + hsl: "hsl(270.7,91%,65.1%)", + }, + { + scale: 600, + hex: "#9333ea", + rgb: "rgb(147,51,234)", + hsl: "hsl(271.5,81.3%,55.9%)", + }, + { + scale: 700, + hex: "#7e22ce", + rgb: "rgb(126,34,206)", + hsl: "hsl(272.1,71.7%,47.1%)", + }, + { + scale: 800, + hex: "#6b21a8", + rgb: "rgb(107,33,168)", + hsl: "hsl(272.9,67.2%,39.4%)", + }, + { + scale: 900, + hex: "#581c87", + rgb: "rgb(88,28,135)", + hsl: "hsl(273.6,65.6%,32%)", + }, + { + scale: 950, + hex: "#3b0764", + rgb: "rgb(59,7,100)", + hsl: "hsl(273.5,86.9%,21%)", + }, + ], + fuchsia: [ + { + scale: 50, + hex: "#fdf4ff", + rgb: "rgb(253,244,255)", + hsl: "hsl(289.1,100%,97.8%)", + }, + { + scale: 100, + hex: "#fae8ff", + rgb: "rgb(250,232,255)", + hsl: "hsl(287,100%,95.5%)", + }, + { + scale: 200, + hex: "#f5d0fe", + rgb: "rgb(245,208,254)", + hsl: "hsl(288.3,95.8%,90.6%)", + }, + { + scale: 300, + hex: "#f0abfc", + rgb: "rgb(240,171,252)", + hsl: "hsl(291.1,93.1%,82.9%)", + }, + { + scale: 400, + hex: "#e879f9", + rgb: "rgb(232,121,249)", + hsl: "hsl(292,91.4%,72.5%)", + }, + { + scale: 500, + hex: "#d946ef", + rgb: "rgb(217,70,239)", + hsl: "hsl(292.2,84.1%,60.6%)", + }, + { + scale: 600, + hex: "#c026d3", + rgb: "rgb(192,38,211)", + hsl: "hsl(293.4,69.5%,48.8%)", + }, + { + scale: 700, + hex: "#a21caf", + rgb: "rgb(162,28,175)", + hsl: "hsl(294.7,72.4%,39.8%)", + }, + { + scale: 800, + hex: "#86198f", + rgb: "rgb(134,25,143)", + hsl: "hsl(295.4,70.2%,32.9%)", + }, + { + scale: 900, + hex: "#701a75", + rgb: "rgb(112,26,117)", + hsl: "hsl(296.7,63.6%,28%)", + }, + { + scale: 950, + hex: "#4a044e", + rgb: "rgb(74,4,78)", + hsl: "hsl(296.8,90.2%,16.1%)", + }, + ], + pink: [ + { + scale: 50, + hex: "#fdf2f8", + rgb: "rgb(253,242,248)", + hsl: "hsl(327.3,73.3%,97.1%)", + }, + { + scale: 100, + hex: "#fce7f3", + rgb: "rgb(252,231,243)", + hsl: "hsl(325.7,77.8%,94.7%)", + }, + { + scale: 200, + hex: "#fbcfe8", + rgb: "rgb(251,207,232)", + hsl: "hsl(325.9,84.6%,89.8%)", + }, + { + scale: 300, + hex: "#f9a8d4", + rgb: "rgb(249,168,212)", + hsl: "hsl(327.4,87.1%,81.8%)", + }, + { + scale: 400, + hex: "#f472b6", + rgb: "rgb(244,114,182)", + hsl: "hsl(328.6,85.5%,70.2%)", + }, + { + scale: 500, + hex: "#ec4899", + rgb: "rgb(236,72,153)", + hsl: "hsl(330.4,81.2%,60.4%)", + }, + { + scale: 600, + hex: "#db2777", + rgb: "rgb(219,39,119)", + hsl: "hsl(333.3,71.4%,50.6%)", + }, + { + scale: 700, + hex: "#be185d", + rgb: "rgb(190,24,93)", + hsl: "hsl(335.1,77.6%,42%)", + }, + { + scale: 800, + hex: "#9d174d", + rgb: "rgb(157,23,77)", + hsl: "hsl(335.8,74.4%,35.3%)", + }, + { + scale: 900, + hex: "#831843", + rgb: "rgb(131,24,67)", + hsl: "hsl(335.9,69%,30.4%)", + }, + { + scale: 950, + hex: "#500724", + rgb: "rgb(80,7,36)", + hsl: "hsl(336.2,83.9%,17.1%)", + }, + ], + rose: [ + { + scale: 50, + hex: "#fff1f2", + rgb: "rgb(255,241,242)", + hsl: "hsl(355.7,100%,97.3%)", + }, + { + scale: 100, + hex: "#ffe4e6", + rgb: "rgb(255,228,230)", + hsl: "hsl(355.6,100%,94.7%)", + }, + { + scale: 200, + hex: "#fecdd3", + rgb: "rgb(254,205,211)", + hsl: "hsl(352.7,96.1%,90%)", + }, + { + scale: 300, + hex: "#fda4af", + rgb: "rgb(253,164,175)", + hsl: "hsl(352.6,95.7%,81.8%)", + }, + { + scale: 400, + hex: "#fb7185", + rgb: "rgb(251,113,133)", + hsl: "hsl(351.3,94.5%,71.4%)", + }, + { + scale: 500, + hex: "#f43f5e", + rgb: "rgb(244,63,94)", + hsl: "hsl(349.7,89.2%,60.2%)", + }, + { + scale: 600, + hex: "#e11d48", + rgb: "rgb(225,29,72)", + hsl: "hsl(346.8,77.2%,49.8%)", + }, + { + scale: 700, + hex: "#be123c", + rgb: "rgb(190,18,60)", + hsl: "hsl(345.3,82.7%,40.8%)", + }, + { + scale: 800, + hex: "#9f1239", + rgb: "rgb(159,18,57)", + hsl: "hsl(343.4,79.7%,34.7%)", + }, + { + scale: 900, + hex: "#881337", + rgb: "rgb(136,19,55)", + hsl: "hsl(341.5,75.5%,30.4%)", + }, + { + scale: 950, + hex: "#4c0519", + rgb: "rgb(76,5,25)", + hsl: "hsl(343.1,87.7%,15.9%)", + }, + ], +} export const colorMapping = { - light: { - background: "white", - foreground: "{{base}}-950", - card: "white", - "card-foreground": "{{base}}-950", - popover: "white", - "popover-foreground": "{{base}}-950", - primary: "{{base}}-900", - "primary-foreground": "{{base}}-50", - secondary: "{{base}}-100", - "secondary-foreground": "{{base}}-900", - muted: "{{base}}-100", - "muted-foreground": "{{base}}-500", - accent: "{{base}}-100", - "accent-foreground": "{{base}}-900", - destructive: "red-500", - "destructive-foreground": "{{base}}-50", - border: "{{base}}-200", - input: "{{base}}-200", - ring: "{{base}}-950", - }, - dark: { - background: "{{base}}-950", - foreground: "{{base}}-50", - card: "{{base}}-950", - "card-foreground": "{{base}}-50", - popover: "{{base}}-950", - "popover-foreground": "{{base}}-50", - primary: "{{base}}-50", - "primary-foreground": "{{base}}-900", - secondary: "{{base}}-800", - "secondary-foreground": "{{base}}-50", - muted: "{{base}}-800", - "muted-foreground": "{{base}}-400", - accent: "{{base}}-800", - "accent-foreground": "{{base}}-50", - destructive: "red-900", - "destructive-foreground": "{{base}}-50", - border: "{{base}}-800", - input: "{{base}}-800", - ring: "{{base}}-300", - }, -}; + light: { + background: "white", + foreground: "{{base}}-950", + card: "white", + "card-foreground": "{{base}}-950", + popover: "white", + "popover-foreground": "{{base}}-950", + primary: "{{base}}-900", + "primary-foreground": "{{base}}-50", + secondary: "{{base}}-100", + "secondary-foreground": "{{base}}-900", + muted: "{{base}}-100", + "muted-foreground": "{{base}}-500", + accent: "{{base}}-100", + "accent-foreground": "{{base}}-900", + destructive: "red-500", + "destructive-foreground": "{{base}}-50", + border: "{{base}}-200", + input: "{{base}}-200", + ring: "{{base}}-950", + }, + dark: { + background: "{{base}}-950", + foreground: "{{base}}-50", + card: "{{base}}-950", + "card-foreground": "{{base}}-50", + popover: "{{base}}-950", + "popover-foreground": "{{base}}-50", + primary: "{{base}}-50", + "primary-foreground": "{{base}}-900", + secondary: "{{base}}-800", + "secondary-foreground": "{{base}}-50", + muted: "{{base}}-800", + "muted-foreground": "{{base}}-400", + accent: "{{base}}-800", + "accent-foreground": "{{base}}-50", + destructive: "red-900", + "destructive-foreground": "{{base}}-50", + border: "{{base}}-800", + input: "{{base}}-800", + ring: "{{base}}-300", + }, +} diff --git a/docs/src/registry/examples.ts b/docs/src/registry/examples.ts index 71e75d75..063429d2 100644 --- a/docs/src/registry/examples.ts +++ b/docs/src/registry/examples.ts @@ -1,954 +1,954 @@ -import type { Registry } from "./schema"; +import type { Registry } from "./schema" export const examples: Registry = [ - { - name: "accordion-demo", - type: "registry:example", - files: [ - { - path: "examples/accordion-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "alert-demo", - type: "registry:example", - files: [ - { - path: "examples/alert-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "alert-destructive", - type: "registry:example", - files: [ - { - path: "examples/alert-destructive.tsx", - type: "registry:example", - }, - ], - }, - { - name: "alert-dialog-demo", - type: "registry:example", - files: [ - { - path: "examples/alert-dialog-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "button-demo", - type: "registry:example", - files: [ - { - path: "examples/button-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "button-secondary", - type: "registry:example", - files: [ - { - path: "examples/button-secondary.tsx", - type: "registry:example", - }, - ], - }, - { - name: "button-destructive", - type: "registry:example", - files: [ - { - path: "examples/button-destructive.tsx", - type: "registry:example", - }, - ], - }, - { - name: "button-outline", - type: "registry:example", - files: [ - { - path: "examples/button-outline.tsx", - type: "registry:example", - }, - ], - }, - { - name: "button-ghost", - type: "registry:example", - files: [ - { - path: "examples/button-ghost.tsx", - type: "registry:example", - }, - ], - }, - { - name: "button-link", - type: "registry:example", - files: [ - { - path: "examples/button-link.tsx", - type: "registry:example", - }, - ], - }, - { - name: "button-with-icon", - type: "registry:example", - files: [ - { - path: "examples/button-with-icon.tsx", - type: "registry:example", - }, - ], - }, - { - name: "button-loading", - type: "registry:example", - files: [ - { - path: "examples/button-loading.tsx", - type: "registry:example", - }, - ], - }, - { - name: "button-as-child", - type: "registry:example", - files: [ - { - path: "examples/button-as-child.tsx", - type: "registry:example", - }, - ], - }, - { - name: "badge-demo", - type: "registry:example", - files: [ - { - path: "examples/badge-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "badge-secondary", - type: "registry:example", - files: [ - { - path: "examples/badge-secondary.tsx", - type: "registry:example", - }, - ], - }, - { - name: "badge-destructive", - type: "registry:example", - files: [ - { - path: "examples/badge-destructive.tsx", - type: "registry:example", - }, - ], - }, - { - name: "badge-outline", - type: "registry:example", - files: [ - { - path: "examples/badge-outline.tsx", - type: "registry:example", - }, - ], - }, - { - name: "calendar-demo", - type: "registry:example", - files: [ - { - path: "examples/calendar-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "card-demo", - type: "registry:example", - files: [ - { - path: "examples/card-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "carousel-demo", - type: "registry:example", - files: [ - { - path: "examples/carousel-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "carousel-size", - type: "registry:example", - files: [ - { - path: "examples/carousel-size.tsx", - type: "registry:example", - }, - ], - }, - { - name: "carousel-api-demo", - type: "registry:example", - files: [ - { - path: "examples/carousel-api-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "carousel-orientation", - type: "registry:example", - files: [ - { - path: "examples/carousel-orientation.tsx", - type: "registry:example", - }, - ], - }, - { - name: "carousel-plugin", - type: "registry:example", - files: [ - { - path: "examples/carousel-plugin.tsx", - type: "registry:example", - }, - ], - }, - { - name: "carousel-spacing", - type: "registry:example", - files: [ - { - path: "examples/carousel-spacing.tsx", - type: "registry:example", - }, - ], - }, - { - name: "checkbox-demo", - type: "registry:example", - files: [ - { - path: "examples/checkbox-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "checkbox-disabled", - type: "registry:example", - files: [ - { - path: "examples/checkbox-disabled.tsx", - type: "registry:example", - }, - ], - }, - { - name: "checkbox-with-text", - type: "registry:example", - files: [ - { - path: "examples/checkbox-with-text.tsx", - type: "registry:example", - }, - ], - }, - { - name: "collapsible-demo", - type: "registry:example", - files: [ - { - path: "examples/collapsible-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "combobox-demo", - type: "registry:example", - files: [ - { - path: "examples/combobox-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "command-demo", - type: "registry:example", - files: [ - { - path: "examples/command-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "command-dialog", - type: "registry:example", - files: [ - { - path: "examples/command-dialog.tsx", - type: "registry:example", - }, - ], - }, - { - name: "context-menu-demo", - type: "registry:example", - files: [ - { - path: "examples/context-menu-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "data-table-demo", - type: "registry:example", - files: [ - { - path: "examples/data-table-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "date-picker-demo", - type: "registry:example", - files: [ - { - path: "examples/date-picker-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "date-picker-with-range-demo", - type: "registry:example", - files: [ - { - path: "examples/date-picker-with-range-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "dialog-demo", - type: "registry:example", - files: [ - { - path: "examples/dialog-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "drawer-demo", - type: "registry:example", - files: [ - { - path: "examples/drawer-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "drawer-side-demo", - type: "registry:example", - files: [ - { - path: "examples/drawer-side-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "dropdown-menu-demo", - type: "registry:example", - files: [ - { - path: "examples/dropdown-menu-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "dropdown-menu-checkboxes", - type: "registry:example", - files: [ - { - path: "examples/dropdown-menu-checkboxes.tsx", - type: "registry:example", - }, - ], - }, - { - name: "dropdown-menu-radio-group", - type: "registry:example", - files: [ - { - path: "examples/dropdown-menu-radio-group.tsx", - type: "registry:example", - }, - ], - }, - { - name: "hover-card-demo", - type: "registry:example", - files: [ - { - path: "examples/hover-card-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "menubar-demo", - type: "registry:example", - files: [ - { - path: "examples/menubar-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "mode-toggle", - type: "registry:example", - files: [ - { - path: "examples/mode-toggle.tsx", - type: "registry:example", - }, - ], - }, - { - name: "navigation-menu-demo", - type: "registry:example", - files: [ - { - path: "examples/navigation-menu-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "number-field-demo", - type: "registry:example", - files: [ - { - path: "examples/number-field-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "number-field-disabled-demo", - type: "registry:example", - files: [ - { - path: "examples/number-field-disabled-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "number-field-with-error-demo", - type: "registry:example", - files: [ - { - path: "examples/number-field-with-error-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "otp-field-demo", - type: "registry:example", - files: [ - { - path: "examples/otp-field-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "otp-field-with-pattern-demo", - type: "registry:example", - files: [ - { - path: "examples/otp-field-with-pattern-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "otp-field-with-controlled-demo", - type: "registry:example", - files: [ - { - path: "examples/otp-field-with-controlled-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "popover-demo", - type: "registry:example", - files: [ - { - path: "examples/popover-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "pagination-demo", - type: "registry:example", - files: [ - { - path: "examples/pagination-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "progress-demo", - type: "registry:example", - files: [ - { - path: "examples/progress-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "radio-group-demo", - type: "registry:example", - files: [ - { - path: "examples/radio-group-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "resizable-demo", - type: "registry:example", - files: [ - { - path: "examples/resizable-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "resizable-vertical-demo", - type: "registry:example", - files: [ - { - path: "examples/resizable-vertical-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "resizable-with-handle-demo", - type: "registry:example", - files: [ - { - path: "examples/resizable-with-handle-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "select-demo", - type: "registry:example", - files: [ - { - path: "examples/select-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "separator-demo", - type: "registry:example", - files: [ - { - path: "examples/separator-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "skeleton-demo", - type: "registry:example", - files: [ - { - path: "examples/skeleton-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "sonner-demo", - type: "registry:example", - files: [ - { - path: "examples/sonner-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "switch-demo", - type: "registry:example", - files: [ - { - path: "examples/switch-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "table-demo", - type: "registry:example", - files: [ - { - path: "examples/table-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "tabs-demo", - type: "registry:example", - files: [ - { - path: "examples/tabs-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "tabs-orientation-demo", - type: "registry:example", - files: [ - { - path: "examples/tabs-orientation-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "textarea-demo", - type: "registry:example", - files: [ - { - path: "examples/textarea-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "textarea-disabled", - type: "registry:example", - files: [ - { - path: "examples/textarea-disabled.tsx", - type: "registry:example", - }, - ], - }, - { - name: "textarea-with-button", - type: "registry:example", - files: [ - { - path: "examples/textarea-with-button.tsx", - type: "registry:example", - }, - ], - }, - { - name: "textarea-with-label", - type: "registry:example", - files: [ - { - path: "examples/textarea-with-label.tsx", - type: "registry:example", - }, - ], - }, - { - name: "textarea-with-text", - type: "registry:example", - files: [ - { - path: "examples/textarea-with-text.tsx", - type: "registry:example", - }, - ], - }, - { - name: "textfield-demo", - type: "registry:example", - files: [ - { - path: "examples/textfield-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "textfield-disabled", - type: "registry:example", - files: [ - { - path: "examples/textfield-disabled.tsx", - type: "registry:example", - }, - ], - }, - { - name: "textfield-file", - type: "registry:example", - files: [ - { - path: "examples/textfield-file.tsx", - type: "registry:example", - }, - ], - }, - { - name: "textfield-with-button", - type: "registry:example", - files: [ - { - path: "examples/textfield-with-button.tsx", - type: "registry:example", - }, - ], - }, - { - name: "textfield-with-label", - type: "registry:example", - files: [ - { - path: "examples/textfield-with-label.tsx", - type: "registry:example", - }, - ], - }, - { - name: "textfield-with-text", - type: "registry:example", - files: [ - { - path: "examples/textfield-with-text.tsx", - type: "registry:example", - }, - ], - }, - { - name: "textfield-with-error", - type: "registry:example", - files: [ - { - path: "examples/textfield-with-error.tsx", - type: "registry:example", - }, - ], - }, - { - name: "toast-demo", - type: "registry:example", - files: [ - { - path: "examples/toast-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "toast-destructive", - type: "registry:example", - files: [ - { - path: "examples/toast-destructive.tsx", - type: "registry:example", - }, - ], - }, - { - name: "toggle-group-demo", - type: "registry:example", - files: [ - { - path: "examples/toggle-group-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "toggle-group-outline-demo", - type: "registry:example", - files: [ - { - path: "examples/toggle-group-outline-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "toggle-group-single-demo", - type: "registry:example", - files: [ - { - path: "examples/toggle-group-single-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "toggle-group-small-demo", - type: "registry:example", - files: [ - { - path: "examples/toggle-group-small-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "toggle-group-large-demo", - type: "registry:example", - files: [ - { - path: "examples/toggle-group-large-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "toggle-group-disabled-demo", - type: "registry:example", - files: [ - { - path: "examples/toggle-group-disabled-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "toggle-demo", - type: "registry:example", - files: [ - { - path: "examples/toggle-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "toggle-disabled", - type: "registry:example", - files: [ - { - path: "examples/toggle-disabled.tsx", - type: "registry:example", - }, - ], - }, - { - name: "toggle-large", - type: "registry:example", - files: [ - { - path: "examples/toggle-large.tsx", - type: "registry:example", - }, - ], - }, - { - name: "toggle-outline", - type: "registry:example", - files: [ - { - path: "examples/toggle-outline.tsx", - type: "registry:example", - }, - ], - }, - { - name: "toggle-small", - type: "registry:example", - files: [ - { - path: "examples/toggle-small.tsx", - type: "registry:example", - }, - ], - }, - { - name: "toggle-with-text", - type: "registry:example", - files: [ - { - path: "examples/toggle-with-text.tsx", - type: "registry:example", - }, - ], - }, - { - name: "tooltip-demo", - type: "registry:example", - files: [ - { - path: "examples/tooltip-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "demo-sidebar", - type: "registry:block", - files: [ - { - path: "blocks/demo-sidebar.tsx", - type: "registry:block", - }, - ], - }, -]; + { + name: "accordion-demo", + type: "registry:example", + files: [ + { + path: "examples/accordion-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "alert-demo", + type: "registry:example", + files: [ + { + path: "examples/alert-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "alert-destructive", + type: "registry:example", + files: [ + { + path: "examples/alert-destructive.tsx", + type: "registry:example", + }, + ], + }, + { + name: "alert-dialog-demo", + type: "registry:example", + files: [ + { + path: "examples/alert-dialog-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "button-demo", + type: "registry:example", + files: [ + { + path: "examples/button-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "button-secondary", + type: "registry:example", + files: [ + { + path: "examples/button-secondary.tsx", + type: "registry:example", + }, + ], + }, + { + name: "button-destructive", + type: "registry:example", + files: [ + { + path: "examples/button-destructive.tsx", + type: "registry:example", + }, + ], + }, + { + name: "button-outline", + type: "registry:example", + files: [ + { + path: "examples/button-outline.tsx", + type: "registry:example", + }, + ], + }, + { + name: "button-ghost", + type: "registry:example", + files: [ + { + path: "examples/button-ghost.tsx", + type: "registry:example", + }, + ], + }, + { + name: "button-link", + type: "registry:example", + files: [ + { + path: "examples/button-link.tsx", + type: "registry:example", + }, + ], + }, + { + name: "button-with-icon", + type: "registry:example", + files: [ + { + path: "examples/button-with-icon.tsx", + type: "registry:example", + }, + ], + }, + { + name: "button-loading", + type: "registry:example", + files: [ + { + path: "examples/button-loading.tsx", + type: "registry:example", + }, + ], + }, + { + name: "button-as-child", + type: "registry:example", + files: [ + { + path: "examples/button-as-child.tsx", + type: "registry:example", + }, + ], + }, + { + name: "badge-demo", + type: "registry:example", + files: [ + { + path: "examples/badge-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "badge-secondary", + type: "registry:example", + files: [ + { + path: "examples/badge-secondary.tsx", + type: "registry:example", + }, + ], + }, + { + name: "badge-destructive", + type: "registry:example", + files: [ + { + path: "examples/badge-destructive.tsx", + type: "registry:example", + }, + ], + }, + { + name: "badge-outline", + type: "registry:example", + files: [ + { + path: "examples/badge-outline.tsx", + type: "registry:example", + }, + ], + }, + { + name: "calendar-demo", + type: "registry:example", + files: [ + { + path: "examples/calendar-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "card-demo", + type: "registry:example", + files: [ + { + path: "examples/card-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "carousel-demo", + type: "registry:example", + files: [ + { + path: "examples/carousel-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "carousel-size", + type: "registry:example", + files: [ + { + path: "examples/carousel-size.tsx", + type: "registry:example", + }, + ], + }, + { + name: "carousel-api-demo", + type: "registry:example", + files: [ + { + path: "examples/carousel-api-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "carousel-orientation", + type: "registry:example", + files: [ + { + path: "examples/carousel-orientation.tsx", + type: "registry:example", + }, + ], + }, + { + name: "carousel-plugin", + type: "registry:example", + files: [ + { + path: "examples/carousel-plugin.tsx", + type: "registry:example", + }, + ], + }, + { + name: "carousel-spacing", + type: "registry:example", + files: [ + { + path: "examples/carousel-spacing.tsx", + type: "registry:example", + }, + ], + }, + { + name: "checkbox-demo", + type: "registry:example", + files: [ + { + path: "examples/checkbox-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "checkbox-disabled", + type: "registry:example", + files: [ + { + path: "examples/checkbox-disabled.tsx", + type: "registry:example", + }, + ], + }, + { + name: "checkbox-with-text", + type: "registry:example", + files: [ + { + path: "examples/checkbox-with-text.tsx", + type: "registry:example", + }, + ], + }, + { + name: "collapsible-demo", + type: "registry:example", + files: [ + { + path: "examples/collapsible-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "combobox-demo", + type: "registry:example", + files: [ + { + path: "examples/combobox-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "command-demo", + type: "registry:example", + files: [ + { + path: "examples/command-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "command-dialog", + type: "registry:example", + files: [ + { + path: "examples/command-dialog.tsx", + type: "registry:example", + }, + ], + }, + { + name: "context-menu-demo", + type: "registry:example", + files: [ + { + path: "examples/context-menu-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "data-table-demo", + type: "registry:example", + files: [ + { + path: "examples/data-table-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "date-picker-demo", + type: "registry:example", + files: [ + { + path: "examples/date-picker-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "date-picker-with-range-demo", + type: "registry:example", + files: [ + { + path: "examples/date-picker-with-range-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "dialog-demo", + type: "registry:example", + files: [ + { + path: "examples/dialog-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "drawer-demo", + type: "registry:example", + files: [ + { + path: "examples/drawer-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "drawer-side-demo", + type: "registry:example", + files: [ + { + path: "examples/drawer-side-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "dropdown-menu-demo", + type: "registry:example", + files: [ + { + path: "examples/dropdown-menu-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "dropdown-menu-checkboxes", + type: "registry:example", + files: [ + { + path: "examples/dropdown-menu-checkboxes.tsx", + type: "registry:example", + }, + ], + }, + { + name: "dropdown-menu-radio-group", + type: "registry:example", + files: [ + { + path: "examples/dropdown-menu-radio-group.tsx", + type: "registry:example", + }, + ], + }, + { + name: "hover-card-demo", + type: "registry:example", + files: [ + { + path: "examples/hover-card-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "menubar-demo", + type: "registry:example", + files: [ + { + path: "examples/menubar-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "mode-toggle", + type: "registry:example", + files: [ + { + path: "examples/mode-toggle.tsx", + type: "registry:example", + }, + ], + }, + { + name: "navigation-menu-demo", + type: "registry:example", + files: [ + { + path: "examples/navigation-menu-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "number-field-demo", + type: "registry:example", + files: [ + { + path: "examples/number-field-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "number-field-disabled-demo", + type: "registry:example", + files: [ + { + path: "examples/number-field-disabled-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "number-field-with-error-demo", + type: "registry:example", + files: [ + { + path: "examples/number-field-with-error-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "otp-field-demo", + type: "registry:example", + files: [ + { + path: "examples/otp-field-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "otp-field-with-pattern-demo", + type: "registry:example", + files: [ + { + path: "examples/otp-field-with-pattern-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "otp-field-with-controlled-demo", + type: "registry:example", + files: [ + { + path: "examples/otp-field-with-controlled-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "popover-demo", + type: "registry:example", + files: [ + { + path: "examples/popover-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "pagination-demo", + type: "registry:example", + files: [ + { + path: "examples/pagination-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "progress-demo", + type: "registry:example", + files: [ + { + path: "examples/progress-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "radio-group-demo", + type: "registry:example", + files: [ + { + path: "examples/radio-group-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "resizable-demo", + type: "registry:example", + files: [ + { + path: "examples/resizable-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "resizable-vertical-demo", + type: "registry:example", + files: [ + { + path: "examples/resizable-vertical-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "resizable-with-handle-demo", + type: "registry:example", + files: [ + { + path: "examples/resizable-with-handle-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "select-demo", + type: "registry:example", + files: [ + { + path: "examples/select-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "separator-demo", + type: "registry:example", + files: [ + { + path: "examples/separator-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "skeleton-demo", + type: "registry:example", + files: [ + { + path: "examples/skeleton-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "sonner-demo", + type: "registry:example", + files: [ + { + path: "examples/sonner-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "switch-demo", + type: "registry:example", + files: [ + { + path: "examples/switch-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "table-demo", + type: "registry:example", + files: [ + { + path: "examples/table-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "tabs-demo", + type: "registry:example", + files: [ + { + path: "examples/tabs-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "tabs-orientation-demo", + type: "registry:example", + files: [ + { + path: "examples/tabs-orientation-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "textarea-demo", + type: "registry:example", + files: [ + { + path: "examples/textarea-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "textarea-disabled", + type: "registry:example", + files: [ + { + path: "examples/textarea-disabled.tsx", + type: "registry:example", + }, + ], + }, + { + name: "textarea-with-button", + type: "registry:example", + files: [ + { + path: "examples/textarea-with-button.tsx", + type: "registry:example", + }, + ], + }, + { + name: "textarea-with-label", + type: "registry:example", + files: [ + { + path: "examples/textarea-with-label.tsx", + type: "registry:example", + }, + ], + }, + { + name: "textarea-with-text", + type: "registry:example", + files: [ + { + path: "examples/textarea-with-text.tsx", + type: "registry:example", + }, + ], + }, + { + name: "textfield-demo", + type: "registry:example", + files: [ + { + path: "examples/textfield-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "textfield-disabled", + type: "registry:example", + files: [ + { + path: "examples/textfield-disabled.tsx", + type: "registry:example", + }, + ], + }, + { + name: "textfield-file", + type: "registry:example", + files: [ + { + path: "examples/textfield-file.tsx", + type: "registry:example", + }, + ], + }, + { + name: "textfield-with-button", + type: "registry:example", + files: [ + { + path: "examples/textfield-with-button.tsx", + type: "registry:example", + }, + ], + }, + { + name: "textfield-with-label", + type: "registry:example", + files: [ + { + path: "examples/textfield-with-label.tsx", + type: "registry:example", + }, + ], + }, + { + name: "textfield-with-text", + type: "registry:example", + files: [ + { + path: "examples/textfield-with-text.tsx", + type: "registry:example", + }, + ], + }, + { + name: "textfield-with-error", + type: "registry:example", + files: [ + { + path: "examples/textfield-with-error.tsx", + type: "registry:example", + }, + ], + }, + { + name: "toast-demo", + type: "registry:example", + files: [ + { + path: "examples/toast-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "toast-destructive", + type: "registry:example", + files: [ + { + path: "examples/toast-destructive.tsx", + type: "registry:example", + }, + ], + }, + { + name: "toggle-group-demo", + type: "registry:example", + files: [ + { + path: "examples/toggle-group-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "toggle-group-outline-demo", + type: "registry:example", + files: [ + { + path: "examples/toggle-group-outline-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "toggle-group-single-demo", + type: "registry:example", + files: [ + { + path: "examples/toggle-group-single-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "toggle-group-small-demo", + type: "registry:example", + files: [ + { + path: "examples/toggle-group-small-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "toggle-group-large-demo", + type: "registry:example", + files: [ + { + path: "examples/toggle-group-large-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "toggle-group-disabled-demo", + type: "registry:example", + files: [ + { + path: "examples/toggle-group-disabled-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "toggle-demo", + type: "registry:example", + files: [ + { + path: "examples/toggle-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "toggle-disabled", + type: "registry:example", + files: [ + { + path: "examples/toggle-disabled.tsx", + type: "registry:example", + }, + ], + }, + { + name: "toggle-large", + type: "registry:example", + files: [ + { + path: "examples/toggle-large.tsx", + type: "registry:example", + }, + ], + }, + { + name: "toggle-outline", + type: "registry:example", + files: [ + { + path: "examples/toggle-outline.tsx", + type: "registry:example", + }, + ], + }, + { + name: "toggle-small", + type: "registry:example", + files: [ + { + path: "examples/toggle-small.tsx", + type: "registry:example", + }, + ], + }, + { + name: "toggle-with-text", + type: "registry:example", + files: [ + { + path: "examples/toggle-with-text.tsx", + type: "registry:example", + }, + ], + }, + { + name: "tooltip-demo", + type: "registry:example", + files: [ + { + path: "examples/tooltip-demo.tsx", + type: "registry:example", + }, + ], + }, + { + name: "demo-sidebar", + type: "registry:block", + files: [ + { + path: "blocks/demo-sidebar.tsx", + type: "registry:block", + }, + ], + }, +] diff --git a/docs/src/registry/frameworks.ts b/docs/src/registry/frameworks.ts index 94178857..ee6cd8fa 100644 --- a/docs/src/registry/frameworks.ts +++ b/docs/src/registry/frameworks.ts @@ -1,12 +1,12 @@ export const frameworks = [ - { - name: "tailwindcss", - label: "TailwindCSS", - }, - { - name: "unocss", - label: "UnoCSS", - }, -]; + { + name: "tailwindcss", + label: "TailwindCSS", + }, + { + name: "unocss", + label: "UnoCSS", + }, +] -export type Framework = (typeof frameworks)[number]; +export type Framework = (typeof frameworks)[number] diff --git a/docs/src/registry/hooks.ts b/docs/src/registry/hooks.ts index f0cb092a..6b560009 100644 --- a/docs/src/registry/hooks.ts +++ b/docs/src/registry/hooks.ts @@ -1,14 +1,14 @@ -import type { Registry } from "./schema"; +import type { Registry } from "./schema" export const hooks: Registry = [ - { - name: "use-mobile", - type: "registry:hook", - files: [ - { - path: "hooks/use-mobile.tsx", - type: "registry:hook", - }, - ], - }, -]; + { + name: "use-mobile", + type: "registry:hook", + files: [ + { + path: "hooks/use-mobile.tsx", + type: "registry:hook", + }, + ], + }, +] diff --git a/docs/src/registry/index.ts b/docs/src/registry/index.ts index fed7dfd8..858b2cc0 100644 --- a/docs/src/registry/index.ts +++ b/docs/src/registry/index.ts @@ -1,16 +1,16 @@ -import { blocks } from "./blocks"; -import { charts } from "./charts"; -import { examples } from "./examples"; -import { hooks } from "./hooks"; -import { libs } from "./libs"; -import type { Registry } from "./schema"; -import { ui } from "./ui"; +import { blocks } from "./blocks" +import { charts } from "./charts" +import { examples } from "./examples" +import { hooks } from "./hooks" +import { libs } from "./libs" +import type { Registry } from "./schema" +import { ui } from "./ui" export const registry: Registry = [ - ...ui, - ...examples, - ...libs, - ...hooks, - ...blocks, - ...charts, -]; + ...ui, + ...examples, + ...libs, + ...hooks, + ...blocks, + ...charts, +] diff --git a/docs/src/registry/libs.ts b/docs/src/registry/libs.ts index b67e1745..6e838854 100644 --- a/docs/src/registry/libs.ts +++ b/docs/src/registry/libs.ts @@ -1,35 +1,35 @@ -import type { Registry } from "./schema"; +import type { Registry } from "./schema" export const libs: Registry = [ - { - name: "cn", - type: "registry:libs", - dependencies: ["clsx", "tailwind-merge"], - files: [ - { - path: "libs/cn.ts", - type: "registry:libs", - }, - ], - }, - { - name: "call-handler", - type: "registry:libs", - files: [ - { - path: "libs/call-handler.ts", - type: "registry:libs", - }, - ], - }, - { - name: "combine-props", - type: "registry:libs", - files: [ - { - path: "libs/combine-props.ts", - type: "registry:libs", - }, - ], - }, -]; + { + name: "cn", + type: "registry:libs", + dependencies: ["clsx", "tailwind-merge"], + files: [ + { + path: "libs/cn.ts", + type: "registry:libs", + }, + ], + }, + { + name: "call-handler", + type: "registry:libs", + files: [ + { + path: "libs/call-handler.ts", + type: "registry:libs", + }, + ], + }, + { + name: "combine-props", + type: "registry:libs", + files: [ + { + path: "libs/combine-props.ts", + type: "registry:libs", + }, + ], + }, +] diff --git a/docs/src/registry/schema.ts b/docs/src/registry/schema.ts index ae21be8c..7dbe2227 100644 --- a/docs/src/registry/schema.ts +++ b/docs/src/registry/schema.ts @@ -1,97 +1,97 @@ -import * as v from "valibot"; +import * as v from "valibot" export const blockChunkSchema = v.object({ - name: v.string(), - description: v.string(), - component: v.any(), - file: v.string(), - code: v.optional(v.string()), - container: v.optional( - v.object({ - className: v.nullish(v.string()), - }), - ), -}); + name: v.string(), + description: v.string(), + component: v.any(), + file: v.string(), + code: v.optional(v.string()), + container: v.optional( + v.object({ + className: v.nullish(v.string()), + }) + ), +}) export const TypeSchema = [ - "registry:style", - "registry:libs", - "registry:example", - "registry:block", - "registry:component", - "registry:ui", - "registry:hook", - "registry:theme", - "registry:page", -] as const; + "registry:style", + "registry:libs", + "registry:example", + "registry:block", + "registry:component", + "registry:ui", + "registry:hook", + "registry:theme", + "registry:page", +] as const -export const registryItemTypeSchema = v.picklist(TypeSchema); +export const registryItemTypeSchema = v.picklist(TypeSchema) export const registryItemFileSchema = v.object({ - path: v.string(), - content: v.optional(v.string()), - type: registryItemTypeSchema, - target: v.optional(v.string()), -}); + path: v.string(), + content: v.optional(v.string()), + type: registryItemTypeSchema, + target: v.optional(v.string()), +}) export const registryItemTailwindSchema = v.object({ - config: v.object({ - content: v.optional(v.array(v.string())), - theme: v.optional(v.record(v.string(), v.any())), - plugins: v.optional(v.array(v.string())), - }), -}); + config: v.object({ + content: v.optional(v.array(v.string())), + theme: v.optional(v.record(v.string(), v.any())), + plugins: v.optional(v.array(v.string())), + }), +}) export const registryItemCssVarsSchema = v.object({ - light: v.optional(v.record(v.string(), v.string())), - dark: v.optional(v.record(v.string(), v.string())), -}); + light: v.optional(v.record(v.string(), v.string())), + dark: v.optional(v.record(v.string(), v.string())), +}) export const registryItemSchema = v.object({ - name: v.string(), - type: registryItemTypeSchema, - description: v.optional(v.string()), - dependencies: v.optional(v.array(v.string())), - devDependencies: v.optional(v.array(v.string())), - registryDependencies: v.optional(v.array(v.string())), - files: v.optional(v.array(registryItemFileSchema)), - tailwind: v.optional(registryItemTailwindSchema), - uno: v.optional(registryItemTailwindSchema), - cssVars: v.optional(registryItemCssVarsSchema), - meta: v.optional(v.record(v.string(), v.any())), - docs: v.optional(v.string()), -}); + name: v.string(), + type: registryItemTypeSchema, + description: v.optional(v.string()), + dependencies: v.optional(v.array(v.string())), + devDependencies: v.optional(v.array(v.string())), + registryDependencies: v.optional(v.array(v.string())), + files: v.optional(v.array(registryItemFileSchema)), + tailwind: v.optional(registryItemTailwindSchema), + uno: v.optional(registryItemTailwindSchema), + cssVars: v.optional(registryItemCssVarsSchema), + meta: v.optional(v.record(v.string(), v.any())), + docs: v.optional(v.string()), +}) export const registryEntrySchema = v.object({ - ...registryItemSchema.entries, - ...v.object({ - category: v.optional(v.string()), - subcategory: v.optional(v.string()), - }).entries, -}); + ...registryItemSchema.entries, + ...v.object({ + category: v.optional(v.string()), + subcategory: v.optional(v.string()), + }).entries, +}) -export const registrySchema = v.array(registryEntrySchema); +export const registrySchema = v.array(registryEntrySchema) -export type RegistryEntry = v.InferInput; +export type RegistryEntry = v.InferInput -export type Registry = v.InferInput; +export type Registry = v.InferInput export const blockSchema = v.object({ - ...registryEntrySchema.entries, - ...v.object({ - type: v.literal("registry:block"), - component: v.any(), - container: v.optional( - v.object({ - height: v.nullish(v.string()), - className: v.nullish(v.string()), - }), - ), - code: v.string(), - highlightedCode: v.string(), - }).entries, -}); + ...registryEntrySchema.entries, + ...v.object({ + type: v.literal("registry:block"), + component: v.any(), + container: v.optional( + v.object({ + height: v.nullish(v.string()), + className: v.nullish(v.string()), + }) + ), + code: v.string(), + highlightedCode: v.string(), + }).entries, +}) -export type Block = v.InferInput; +export type Block = v.InferInput -export type BlockChunk = v.InferInput; +export type BlockChunk = v.InferInput diff --git a/docs/src/registry/tailwindcss/blocks/demo-sidebar.tsx b/docs/src/registry/tailwindcss/blocks/demo-sidebar.tsx index 16bc9d03..aae50268 100644 --- a/docs/src/registry/tailwindcss/blocks/demo-sidebar.tsx +++ b/docs/src/registry/tailwindcss/blocks/demo-sidebar.tsx @@ -1,163 +1,164 @@ -import { For } from "solid-js"; +import { For } from "solid-js" + import { - Sidebar, - SidebarContent, - SidebarGroup, - SidebarGroupContent, - SidebarGroupLabel, - SidebarInset, - SidebarMenu, - SidebarMenuButton, - SidebarMenuItem, - SidebarProvider, - SidebarTrigger, -} from "../ui/sidebar"; + Sidebar, + SidebarContent, + SidebarGroup, + SidebarGroupContent, + SidebarGroupLabel, + SidebarInset, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + SidebarProvider, + SidebarTrigger, +} from "../ui/sidebar" const items = [ - { - title: "Home", - url: "#", - icon: () => ( - - - - - - - ), - }, - { - title: "Inbox", - url: "#", - icon: () => ( - - - - - - - ), - }, - { - title: "Calendar", - url: "#", - icon: () => ( - - - - - - - - ), - }, - { - title: "Search", - url: "#", - icon: () => ( - - - - - - - ), - }, - { - title: "Settings", - url: "#", - icon: () => ( - - - - - - - ), - }, -]; + { + title: "Home", + url: "#", + icon: () => ( + + + + + + + ), + }, + { + title: "Inbox", + url: "#", + icon: () => ( + + + + + + + ), + }, + { + title: "Calendar", + url: "#", + icon: () => ( + + + + + + + + ), + }, + { + title: "Search", + url: "#", + icon: () => ( + + + + + + + ), + }, + { + title: "Settings", + url: "#", + icon: () => ( + + + + + + + ), + }, +] const AppSidebar = () => { - return ( - - - - - Application - - - - {(item) => ( - - - - {item.title} - - - )} - - - - - - - -
    - -
    -
    -
    - ); -}; + return ( + + + + + Application + + + + {(item) => ( + + + + {item.title} + + + )} + + + + + + + +
    + +
    +
    +
    + ) +} -export default AppSidebar; +export default AppSidebar diff --git a/docs/src/registry/tailwindcss/blocks/sidebar-01/components/app-sidebar.tsx b/docs/src/registry/tailwindcss/blocks/sidebar-01/components/app-sidebar.tsx index 45fa2cbd..9078e5be 100644 --- a/docs/src/registry/tailwindcss/blocks/sidebar-01/components/app-sidebar.tsx +++ b/docs/src/registry/tailwindcss/blocks/sidebar-01/components/app-sidebar.tsx @@ -1,324 +1,325 @@ -import NavMain from "@/registry/tailwindcss/blocks/sidebar-01/components/nav-main"; -import NavProjects from "@/registry/tailwindcss/blocks/sidebar-01/components/nav-projects"; -import NavUser from "@/registry/tailwindcss/blocks/sidebar-01/components/nav-user"; -import TeamSwitcher from "@/registry/tailwindcss/blocks/sidebar-01/components/team-switcher"; +import type { ComponentProps } from "solid-js" + +import NavMain from "@/registry/tailwindcss/blocks/sidebar-01/components/nav-main" +import NavProjects from "@/registry/tailwindcss/blocks/sidebar-01/components/nav-projects" +import NavUser from "@/registry/tailwindcss/blocks/sidebar-01/components/nav-user" +import TeamSwitcher from "@/registry/tailwindcss/blocks/sidebar-01/components/team-switcher" import { - Sidebar, - SidebarContent, - SidebarFooter, - SidebarHeader, - SidebarRail, -} from "@/registry/tailwindcss/ui/sidebar"; -import type { ComponentProps } from "solid-js"; + Sidebar, + SidebarContent, + SidebarFooter, + SidebarHeader, + SidebarRail, +} from "@/registry/tailwindcss/ui/sidebar" // This is sample data. const data = { - user: { - name: "shadcn", - email: "m@example.com", - avatar: "/avatars/shadcn.jpg", - }, - teams: [ - { - name: "Acme Inc", - logo: () => ( - - - - - - - ), - plan: "Enterprise", - }, - { - name: "Acme Corp.", - logo: () => ( - - - - ), - plan: "Startup", - }, - { - name: "Evil Corp.", - logo: () => ( - - - - ), - plan: "Free", - }, - ], - navMain: [ - { - title: "Playground", - url: "#", - icon: () => ( - - - - - - - ), - isActive: true, - items: [ - { - title: "History", - url: "#", - }, - { - title: "Starred", - url: "#", - }, - { - title: "Settings", - url: "#", - }, - ], - }, - { - title: "Models", - url: "#", - icon: () => ( - - - - - - - - ), - items: [ - { - title: "Genesis", - url: "#", - }, - { - title: "Explorer", - url: "#", - }, - { - title: "Quantum", - url: "#", - }, - ], - }, - { - title: "Documentation", - url: "#", - icon: () => ( - - - - ), - items: [ - { - title: "Introduction", - url: "#", - }, - { - title: "Get Started", - url: "#", - }, - { - title: "Tutorials", - url: "#", - }, - { - title: "Changelog", - url: "#", - }, - ], - }, - { - title: "Settings", - url: "#", - icon: () => ( - - - - - - - - ), - items: [ - { - title: "General", - url: "#", - }, - { - title: "Team", - url: "#", - }, - { - title: "Billing", - url: "#", - }, - { - title: "Limits", - url: "#", - }, - ], - }, - ], - projects: [ - { - name: "Design Engineering", - url: "#", - icon: () => ( - - - - ), - }, - { - name: "Sales & Marketing", - url: "#", - icon: () => ( - - - - - - - ), - }, - { - name: "Travel", - url: "#", - icon: () => ( - - - - ), - }, - ], -}; + user: { + name: "shadcn", + email: "m@example.com", + avatar: "/avatars/shadcn.jpg", + }, + teams: [ + { + name: "Acme Inc", + logo: () => ( + + + + + + + ), + plan: "Enterprise", + }, + { + name: "Acme Corp.", + logo: () => ( + + + + ), + plan: "Startup", + }, + { + name: "Evil Corp.", + logo: () => ( + + + + ), + plan: "Free", + }, + ], + navMain: [ + { + title: "Playground", + url: "#", + icon: () => ( + + + + + + + ), + isActive: true, + items: [ + { + title: "History", + url: "#", + }, + { + title: "Starred", + url: "#", + }, + { + title: "Settings", + url: "#", + }, + ], + }, + { + title: "Models", + url: "#", + icon: () => ( + + + + + + + + ), + items: [ + { + title: "Genesis", + url: "#", + }, + { + title: "Explorer", + url: "#", + }, + { + title: "Quantum", + url: "#", + }, + ], + }, + { + title: "Documentation", + url: "#", + icon: () => ( + + + + ), + items: [ + { + title: "Introduction", + url: "#", + }, + { + title: "Get Started", + url: "#", + }, + { + title: "Tutorials", + url: "#", + }, + { + title: "Changelog", + url: "#", + }, + ], + }, + { + title: "Settings", + url: "#", + icon: () => ( + + + + + + + + ), + items: [ + { + title: "General", + url: "#", + }, + { + title: "Team", + url: "#", + }, + { + title: "Billing", + url: "#", + }, + { + title: "Limits", + url: "#", + }, + ], + }, + ], + projects: [ + { + name: "Design Engineering", + url: "#", + icon: () => ( + + + + ), + }, + { + name: "Sales & Marketing", + url: "#", + icon: () => ( + + + + + + + ), + }, + { + name: "Travel", + url: "#", + icon: () => ( + + + + ), + }, + ], +} const AppSidebar = (props: ComponentProps) => { - return ( - - - - - - - - - - - - - - ); -}; + return ( + + + + + + + + + + + + + + ) +} -export default AppSidebar; +export default AppSidebar diff --git a/docs/src/registry/tailwindcss/blocks/sidebar-01/components/nav-main.tsx b/docs/src/registry/tailwindcss/blocks/sidebar-01/components/nav-main.tsx index 447da214..ec46a7ac 100644 --- a/docs/src/registry/tailwindcss/blocks/sidebar-01/components/nav-main.tsx +++ b/docs/src/registry/tailwindcss/blocks/sidebar-01/components/nav-main.tsx @@ -1,94 +1,95 @@ +import { For, Show, type Accessor, type JSX } from "solid-js" +import type { + CollapsibleRootProps, + CollapsibleTriggerProps, +} from "@kobalte/core/collapsible" + import { - Collapsible, - CollapsibleContent, - CollapsibleTrigger, -} from "@/registry/tailwindcss/ui/collapsible"; + Collapsible, + CollapsibleContent, + CollapsibleTrigger, +} from "@/registry/tailwindcss/ui/collapsible" import { - SidebarGroup, - SidebarGroupLabel, - SidebarMenu, - SidebarMenuButton, - SidebarMenuItem, - SidebarMenuSub, - SidebarMenuSubButton, - SidebarMenuSubItem, -} from "@/registry/tailwindcss/ui/sidebar"; -import type { - CollapsibleRootProps, - CollapsibleTriggerProps, -} from "@kobalte/core/collapsible"; -import { type Accessor, For, type JSX, Show } from "solid-js"; + SidebarGroup, + SidebarGroupLabel, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + SidebarMenuSub, + SidebarMenuSubButton, + SidebarMenuSubItem, +} from "@/registry/tailwindcss/ui/sidebar" const NavMain = (props: { - items: { - title: string; - url: string; - icon?: Accessor; - isActive?: boolean; - items?: { - title: string; - url: string; - }[]; - }[]; + items: { + title: string + url: string + icon?: Accessor + isActive?: boolean + items?: { + title: string + url: string + }[] + }[] }) => { - return ( - - Platform - - - {(item) => ( - ( - - ( - // @ts-expect-error - - {item.icon!()} - {item.title} - - - - - )} - /> - - - - {(subItem) => ( - - - {subItem.title} - - - )} - - - - - )} - /> - )} - - - - ); -}; + return ( + + Platform + + + {(item) => ( + ( + + ( + // @ts-expect-error + + {item.icon!()} + {item.title} + + + + + )} + /> + + + + {(subItem) => ( + + + {subItem.title} + + + )} + + + + + )} + /> + )} + + + + ) +} -export default NavMain; +export default NavMain diff --git a/docs/src/registry/tailwindcss/blocks/sidebar-01/components/nav-projects.tsx b/docs/src/registry/tailwindcss/blocks/sidebar-01/components/nav-projects.tsx index bdb0641b..c5c6dbc5 100644 --- a/docs/src/registry/tailwindcss/blocks/sidebar-01/components/nav-projects.tsx +++ b/docs/src/registry/tailwindcss/blocks/sidebar-01/components/nav-projects.tsx @@ -1,155 +1,156 @@ +import { For, type Accessor, type JSX } from "solid-js" +import type { DropdownMenuTriggerProps } from "@kobalte/core/dropdown-menu" + import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuSeparator, - DropdownMenuTrigger, -} from "@/registry/tailwindcss/ui/dropdown-menu"; + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from "@/registry/tailwindcss/ui/dropdown-menu" import { - SidebarGroup, - SidebarGroupLabel, - SidebarMenu, - SidebarMenuAction, - SidebarMenuButton, - SidebarMenuItem, - useSideBar, -} from "@/registry/tailwindcss/ui/sidebar"; -import type { DropdownMenuTriggerProps } from "@kobalte/core/dropdown-menu"; -import { type Accessor, For, type JSX } from "solid-js"; + SidebarGroup, + SidebarGroupLabel, + SidebarMenu, + SidebarMenuAction, + SidebarMenuButton, + SidebarMenuItem, + useSideBar, +} from "@/registry/tailwindcss/ui/sidebar" const NavProjects = (props: { - projects: { - name: string; - url: string; - icon: Accessor; - }[]; + projects: { + name: string + url: string + icon: Accessor + }[] }) => { - const { isMobile } = useSideBar(); + const { isMobile } = useSideBar() - return ( - - Projects - - - {(item) => ( - - - - {item.name} - - - ( - // @ts-expect-error - - - - - - - - - More - - )} - /> - - - - - - View Project - - - - - - - - - Share Project - - - - - - - Delete Project - - - - - )} - - - - - - - - - - - More - - - - - ); -}; + return ( + + Projects + + + {(item) => ( + + + + {item.name} + + + ( + // @ts-expect-error + + + + + + + + + More + + )} + /> + + + + + + View Project + + + + + + + + + Share Project + + + + + + + Delete Project + + + + + )} + + + + + + + + + + + More + + + + + ) +} -export default NavProjects; +export default NavProjects diff --git a/docs/src/registry/tailwindcss/blocks/sidebar-01/components/nav-user.tsx b/docs/src/registry/tailwindcss/blocks/sidebar-01/components/nav-user.tsx index 5a8bf96f..9cdaf266 100644 --- a/docs/src/registry/tailwindcss/blocks/sidebar-01/components/nav-user.tsx +++ b/docs/src/registry/tailwindcss/blocks/sidebar-01/components/nav-user.tsx @@ -1,197 +1,198 @@ +import type { DropdownMenuTriggerProps } from "@kobalte/core/dropdown-menu" +import { Image } from "@kobalte/core/image" + import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuGroup, - DropdownMenuGroupLabel, - DropdownMenuItem, - DropdownMenuSeparator, - DropdownMenuTrigger, -} from "@/registry/tailwindcss/ui/dropdown-menu"; + DropdownMenu, + DropdownMenuContent, + DropdownMenuGroup, + DropdownMenuGroupLabel, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from "@/registry/tailwindcss/ui/dropdown-menu" import { - SidebarMenu, - SidebarMenuButton, - SidebarMenuItem, - useSideBar, -} from "@/registry/tailwindcss/ui/sidebar"; -import type { DropdownMenuTriggerProps } from "@kobalte/core/dropdown-menu"; -import { Image } from "@kobalte/core/image"; + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + useSideBar, +} from "@/registry/tailwindcss/ui/sidebar" const NavUser = (props: { - user: { - name: string; - email: string; - avatar: string; - }; + user: { + name: string + email: string + avatar: string + } }) => { - const { isMobile } = useSideBar(); + const { isMobile } = useSideBar() - return ( - - - - ( - // @ts-expect-error - - - - - CN - - -
    - {props.user.name} - {props.user.email} -
    - - - -
    - )} - /> - - - -
    - - - - CN - - -
    - - {props.user.name} - - {props.user.email} -
    -
    -
    -
    - - - - - - - Upgrade to Pro - - - - - - - - - - - - Account - - - - - - - - - Billing - - - - - - Notifications - - - - - - - - Log out - -
    -
    -
    -
    - ); -}; + return ( + + + + ( + // @ts-expect-error + + + + + CN + + +
    + {props.user.name} + {props.user.email} +
    + + + +
    + )} + /> + + + +
    + + + + CN + + +
    + + {props.user.name} + + {props.user.email} +
    +
    +
    +
    + + + + + + + Upgrade to Pro + + + + + + + + + + + + Account + + + + + + + + + Billing + + + + + + Notifications + + + + + + + + Log out + +
    +
    +
    +
    + ) +} -export default NavUser; +export default NavUser diff --git a/docs/src/registry/tailwindcss/blocks/sidebar-01/components/team-switcher.tsx b/docs/src/registry/tailwindcss/blocks/sidebar-01/components/team-switcher.tsx index c74a5745..b5952b9b 100644 --- a/docs/src/registry/tailwindcss/blocks/sidebar-01/components/team-switcher.tsx +++ b/docs/src/registry/tailwindcss/blocks/sidebar-01/components/team-switcher.tsx @@ -1,118 +1,120 @@ +import { For, createSignal, type Accessor, type JSX } from "solid-js" +import type { DropdownMenuTriggerProps } from "@kobalte/core/dropdown-menu" + import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuGroup, - DropdownMenuGroupLabel, - DropdownMenuItem, - DropdownMenuSeparator, - DropdownMenuShortcut, - DropdownMenuTrigger, -} from "@/registry/tailwindcss/ui/dropdown-menu"; + DropdownMenu, + DropdownMenuContent, + DropdownMenuGroup, + DropdownMenuGroupLabel, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuShortcut, + DropdownMenuTrigger, +} from "@/registry/tailwindcss/ui/dropdown-menu" import { - SidebarMenu, - SidebarMenuButton, - SidebarMenuItem, - useSideBar, -} from "@/registry/tailwindcss/ui/sidebar"; -import type { DropdownMenuTriggerProps } from "@kobalte/core/dropdown-menu"; -import { type Accessor, For, type JSX, createSignal } from "solid-js"; + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + useSideBar, +} from "@/registry/tailwindcss/ui/sidebar" const TeamSwitcher = (props: { - teams: { - name: string; - logo: Accessor; - plan: string; - }[]; + teams: { + name: string + logo: Accessor + plan: string + }[] }) => { - const [activeTeam, setActiveTeam] = createSignal(props.teams[0]); - const { isMobile } = useSideBar(); + // eslint-disable-next-line solid/reactivity + const [activeTeam, setActiveTeam] = createSignal(props.teams[0]) + const { isMobile } = useSideBar() - return ( - - - - ( - // @ts-expect-error - -
    - {activeTeam().logo()} -
    -
    - - {activeTeam().name} - - {activeTeam().plan} -
    - - - -
    - )} - /> - - - - Teams - - - {(team, index) => ( - setActiveTeam(team)} - class="gap-2 p-2" - > -
    - {team.logo()} -
    - {team.name} - ⌘{index() + 1} -
    - )} -
    -
    - - -
    - - - -
    -
    Add team
    -
    -
    -
    -
    -
    - ); -}; + return ( + + + + ( + // @ts-expect-error + +
    + {activeTeam().logo()} +
    +
    + + {activeTeam().name} + + {activeTeam().plan} +
    + + + +
    + )} + /> + + + + Teams + + + {(team, index) => ( + setActiveTeam(team)} + class="gap-2 p-2" + > +
    + {team.logo()} +
    + {team.name} + ⌘{index() + 1} +
    + )} +
    +
    + + +
    + + + +
    +
    Add team
    +
    +
    +
    +
    +
    + ) +} -export default TeamSwitcher; +export default TeamSwitcher diff --git a/docs/src/registry/tailwindcss/blocks/sidebar-01/index.tsx b/docs/src/registry/tailwindcss/blocks/sidebar-01/index.tsx index 7f4b876a..1be712e2 100644 --- a/docs/src/registry/tailwindcss/blocks/sidebar-01/index.tsx +++ b/docs/src/registry/tailwindcss/blocks/sidebar-01/index.tsx @@ -1,33 +1,33 @@ -import AppSidebar from "@/registry/tailwindcss/blocks/sidebar-01/components/app-sidebar"; -import { Separator } from "@/registry/tailwindcss/ui/separator"; +import AppSidebar from "@/registry/tailwindcss/blocks/sidebar-01/components/app-sidebar" +import { Separator } from "@/registry/tailwindcss/ui/separator" import { - SidebarInset, - SidebarProvider, - SidebarTrigger, -} from "@/registry/tailwindcss/ui/sidebar"; + SidebarInset, + SidebarProvider, + SidebarTrigger, +} from "@/registry/tailwindcss/ui/sidebar" const Page = () => { - return ( - - - -
    -
    - - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - ); -}; + return ( + + + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + ) +} -export default Page; +export default Page diff --git a/docs/src/registry/tailwindcss/blocks/sidebar-02/components/app-sidebar.tsx b/docs/src/registry/tailwindcss/blocks/sidebar-02/components/app-sidebar.tsx index a1b473d8..51183584 100644 --- a/docs/src/registry/tailwindcss/blocks/sidebar-02/components/app-sidebar.tsx +++ b/docs/src/registry/tailwindcss/blocks/sidebar-02/components/app-sidebar.tsx @@ -1,225 +1,226 @@ +import { For, Show, type ComponentProps } from "solid-js" + import { - Sidebar, - SidebarContent, - SidebarGroup, - SidebarHeader, - SidebarMenu, - SidebarMenuButton, - SidebarMenuItem, - SidebarMenuSub, - SidebarMenuSubButton, - SidebarMenuSubItem, -} from "@/registry/tailwindcss/ui/sidebar"; -import { type ComponentProps, For, Show } from "solid-js"; + Sidebar, + SidebarContent, + SidebarGroup, + SidebarHeader, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + SidebarMenuSub, + SidebarMenuSubButton, + SidebarMenuSubItem, +} from "@/registry/tailwindcss/ui/sidebar" // This is sample data. const data = { - navMain: [ - { - title: "Getting Started", - url: "#", - items: [ - { - title: "Installation", - url: "#", - }, - { - title: "Project Structure", - url: "#", - }, - ], - }, - { - title: "Building Your Application", - url: "#", - items: [ - { - title: "Routing", - url: "#", - }, - { - title: "Data Fetching", - url: "#", - isActive: true, - }, - { - title: "Rendering", - url: "#", - }, - { - title: "Caching", - url: "#", - }, - { - title: "Styling", - url: "#", - }, - { - title: "Optimizing", - url: "#", - }, - { - title: "Configuring", - url: "#", - }, - { - title: "Testing", - url: "#", - }, - { - title: "Authentication", - url: "#", - }, - { - title: "Deploying", - url: "#", - }, - { - title: "Upgrading", - url: "#", - }, - { - title: "Examples", - url: "#", - }, - ], - }, - { - title: "API Reference", - url: "#", - items: [ - { - title: "Components", - url: "#", - }, - { - title: "File Conventions", - url: "#", - }, - { - title: "Functions", - url: "#", - }, - { - title: "next.config.js Options", - url: "#", - }, - { - title: "CLI", - url: "#", - }, - { - title: "Edge Runtime", - url: "#", - }, - ], - }, - { - title: "Architecture", - url: "#", - items: [ - { - title: "Accessibility", - url: "#", - }, - { - title: "Fast Refresh", - url: "#", - }, - { - title: "Next.js Compiler", - url: "#", - }, - { - title: "Supported Browsers", - url: "#", - }, - { - title: "Turbopack", - url: "#", - }, - ], - }, - { - title: "Community", - url: "#", - items: [ - { - title: "Contribution Guide", - url: "#", - }, - ], - }, - ], -}; + navMain: [ + { + title: "Getting Started", + url: "#", + items: [ + { + title: "Installation", + url: "#", + }, + { + title: "Project Structure", + url: "#", + }, + ], + }, + { + title: "Building Your Application", + url: "#", + items: [ + { + title: "Routing", + url: "#", + }, + { + title: "Data Fetching", + url: "#", + isActive: true, + }, + { + title: "Rendering", + url: "#", + }, + { + title: "Caching", + url: "#", + }, + { + title: "Styling", + url: "#", + }, + { + title: "Optimizing", + url: "#", + }, + { + title: "Configuring", + url: "#", + }, + { + title: "Testing", + url: "#", + }, + { + title: "Authentication", + url: "#", + }, + { + title: "Deploying", + url: "#", + }, + { + title: "Upgrading", + url: "#", + }, + { + title: "Examples", + url: "#", + }, + ], + }, + { + title: "API Reference", + url: "#", + items: [ + { + title: "Components", + url: "#", + }, + { + title: "File Conventions", + url: "#", + }, + { + title: "Functions", + url: "#", + }, + { + title: "next.config.js Options", + url: "#", + }, + { + title: "CLI", + url: "#", + }, + { + title: "Edge Runtime", + url: "#", + }, + ], + }, + { + title: "Architecture", + url: "#", + items: [ + { + title: "Accessibility", + url: "#", + }, + { + title: "Fast Refresh", + url: "#", + }, + { + title: "Next.js Compiler", + url: "#", + }, + { + title: "Supported Browsers", + url: "#", + }, + { + title: "Turbopack", + url: "#", + }, + ], + }, + { + title: "Community", + url: "#", + items: [ + { + title: "Contribution Guide", + url: "#", + }, + ], + }, + ], +} const AppSidebar = (props: ComponentProps) => { - return ( - - - - - -
    - - - - - - -
    -
    - Documentation - v1.0.0 -
    -
    -
    -
    -
    - - - - - {(item) => ( - <> - - {item.title} - - - - - {(item) => ( - - - {item.title} - - - )} - - - - - )} - - - - -
    - ); -}; + return ( + + + + + +
    + + + + + + +
    +
    + Documentation + v1.0.0 +
    +
    +
    +
    +
    + + + + + {(item) => ( + <> + + {item.title} + + + + + {(item) => ( + + + {item.title} + + + )} + + + + + )} + + + + +
    + ) +} -export default AppSidebar; +export default AppSidebar diff --git a/docs/src/registry/tailwindcss/blocks/sidebar-02/index.tsx b/docs/src/registry/tailwindcss/blocks/sidebar-02/index.tsx index df20878d..48a46ced 100644 --- a/docs/src/registry/tailwindcss/blocks/sidebar-02/index.tsx +++ b/docs/src/registry/tailwindcss/blocks/sidebar-02/index.tsx @@ -1,33 +1,33 @@ -import AppSidebar from "@/registry/tailwindcss/blocks/sidebar-02/components/app-sidebar"; +import AppSidebar from "@/registry/tailwindcss/blocks/sidebar-02/components/app-sidebar" import { - SidebarInset, - SidebarProvider, - SidebarTrigger, -} from "@/registry/tailwindcss/ui/sidebar"; + SidebarInset, + SidebarProvider, + SidebarTrigger, +} from "@/registry/tailwindcss/ui/sidebar" const Page = () => { - return ( - - - -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - ); -}; + return ( + + + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + ) +} -export default Page; +export default Page diff --git a/docs/src/registry/tailwindcss/blocks/sidebar-03/components/app-sidebar.tsx b/docs/src/registry/tailwindcss/blocks/sidebar-03/components/app-sidebar.tsx index eb0078ef..e8dd70b6 100644 --- a/docs/src/registry/tailwindcss/blocks/sidebar-03/components/app-sidebar.tsx +++ b/docs/src/registry/tailwindcss/blocks/sidebar-03/components/app-sidebar.tsx @@ -1,332 +1,333 @@ -import NavMain from "@/registry/tailwindcss/blocks/sidebar-03/components/nav-main"; -import NavProjects from "@/registry/tailwindcss/blocks/sidebar-03/components/nav-projects"; -import NavSecondary from "@/registry/tailwindcss/blocks/sidebar-03/components/nav-secondary"; -import NavUser from "@/registry/tailwindcss/blocks/sidebar-03/components/nav-user"; +import type { ComponentProps } from "solid-js" + +import NavMain from "@/registry/tailwindcss/blocks/sidebar-03/components/nav-main" +import NavProjects from "@/registry/tailwindcss/blocks/sidebar-03/components/nav-projects" +import NavSecondary from "@/registry/tailwindcss/blocks/sidebar-03/components/nav-secondary" +import NavUser from "@/registry/tailwindcss/blocks/sidebar-03/components/nav-user" import { - Sidebar, - SidebarContent, - SidebarFooter, - SidebarHeader, - SidebarMenu, - SidebarMenuButton, - SidebarMenuItem, -} from "@/registry/tailwindcss/ui/sidebar"; -import type { ComponentProps } from "solid-js"; + Sidebar, + SidebarContent, + SidebarFooter, + SidebarHeader, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, +} from "@/registry/tailwindcss/ui/sidebar" // This is sample data. const data = { - user: { - name: "shadcn", - email: "m@example.com", - avatar: "https://ui.shadcn.com/avatars/shadcn.jpg", - }, - navMain: [ - { - title: "Playground", - url: "#", - icon: () => ( - - - - - - - ), - isActive: true, - items: [ - { - title: "History", - url: "#", - }, - { - title: "Starred", - url: "#", - }, - { - title: "Settings", - url: "#", - }, - ], - }, - { - title: "Models", - url: "#", - icon: () => ( - - - - - - - - ), - items: [ - { - title: "Genesis", - url: "#", - }, - { - title: "Explorer", - url: "#", - }, - { - title: "Quantum", - url: "#", - }, - ], - }, - { - title: "Documentation", - url: "#", - icon: () => ( - - - - ), - items: [ - { - title: "Introduction", - url: "#", - }, - { - title: "Get Started", - url: "#", - }, - { - title: "Tutorials", - url: "#", - }, - { - title: "Changelog", - url: "#", - }, - ], - }, - { - title: "Settings", - url: "#", - icon: () => ( - - - - - - - - ), - items: [ - { - title: "General", - url: "#", - }, - { - title: "Team", - url: "#", - }, - { - title: "Billing", - url: "#", - }, - { - title: "Limits", - url: "#", - }, - ], - }, - ], - navSecondary: [ - { - title: "Support", - url: "#", - icon: () => ( - - - - - - - - ), - }, - { - title: "Feedback", - url: "#", - icon: () => ( - - - - ), - }, - ], - projects: [ - { - name: "Design Engineering", - url: "#", - icon: () => ( - - - - ), - }, - { - name: "Sales & Marketing", - url: "#", - icon: () => ( - - - - - - - ), - }, - { - name: "Travel", - url: "#", - icon: () => ( - - - - ), - }, - ], -}; + user: { + name: "shadcn", + email: "m@example.com", + avatar: "https://ui.shadcn.com/avatars/shadcn.jpg", + }, + navMain: [ + { + title: "Playground", + url: "#", + icon: () => ( + + + + + + + ), + isActive: true, + items: [ + { + title: "History", + url: "#", + }, + { + title: "Starred", + url: "#", + }, + { + title: "Settings", + url: "#", + }, + ], + }, + { + title: "Models", + url: "#", + icon: () => ( + + + + + + + + ), + items: [ + { + title: "Genesis", + url: "#", + }, + { + title: "Explorer", + url: "#", + }, + { + title: "Quantum", + url: "#", + }, + ], + }, + { + title: "Documentation", + url: "#", + icon: () => ( + + + + ), + items: [ + { + title: "Introduction", + url: "#", + }, + { + title: "Get Started", + url: "#", + }, + { + title: "Tutorials", + url: "#", + }, + { + title: "Changelog", + url: "#", + }, + ], + }, + { + title: "Settings", + url: "#", + icon: () => ( + + + + + + + + ), + items: [ + { + title: "General", + url: "#", + }, + { + title: "Team", + url: "#", + }, + { + title: "Billing", + url: "#", + }, + { + title: "Limits", + url: "#", + }, + ], + }, + ], + navSecondary: [ + { + title: "Support", + url: "#", + icon: () => ( + + + + + + + + ), + }, + { + title: "Feedback", + url: "#", + icon: () => ( + + + + ), + }, + ], + projects: [ + { + name: "Design Engineering", + url: "#", + icon: () => ( + + + + ), + }, + { + name: "Sales & Marketing", + url: "#", + icon: () => ( + + + + + + + ), + }, + { + name: "Travel", + url: "#", + icon: () => ( + + + + ), + }, + ], +} const AppSidebar = (props: ComponentProps) => { - return ( - - - - - -
    - - - -
    -
    - Acme Inc - Enterprise -
    -
    -
    -
    -
    - - - - - - - - -
    - ); -}; + return ( + + + + + +
    + + + +
    +
    + Acme Inc + Enterprise +
    +
    +
    +
    +
    + + + + + + + + +
    + ) +} -export default AppSidebar; +export default AppSidebar diff --git a/docs/src/registry/tailwindcss/blocks/sidebar-03/components/nav-main.tsx b/docs/src/registry/tailwindcss/blocks/sidebar-03/components/nav-main.tsx index 1dd5c0bd..746b199d 100644 --- a/docs/src/registry/tailwindcss/blocks/sidebar-03/components/nav-main.tsx +++ b/docs/src/registry/tailwindcss/blocks/sidebar-03/components/nav-main.tsx @@ -1,105 +1,106 @@ +import { For, Show, type Accessor, type JSX } from "solid-js" +import type { + CollapsibleRootProps, + CollapsibleTriggerProps, +} from "@kobalte/core/collapsible" + import { - Collapsible, - CollapsibleContent, - CollapsibleTrigger, -} from "@/registry/tailwindcss/ui/collapsible"; + Collapsible, + CollapsibleContent, + CollapsibleTrigger, +} from "@/registry/tailwindcss/ui/collapsible" import { - SidebarGroup, - SidebarGroupLabel, - SidebarMenu, - SidebarMenuAction, - SidebarMenuButton, - SidebarMenuItem, - SidebarMenuSub, - SidebarMenuSubButton, - SidebarMenuSubItem, -} from "@/registry/tailwindcss/ui/sidebar"; -import type { - CollapsibleRootProps, - CollapsibleTriggerProps, -} from "@kobalte/core/collapsible"; -import { type Accessor, For, type JSX, Show } from "solid-js"; + SidebarGroup, + SidebarGroupLabel, + SidebarMenu, + SidebarMenuAction, + SidebarMenuButton, + SidebarMenuItem, + SidebarMenuSub, + SidebarMenuSubButton, + SidebarMenuSubItem, +} from "@/registry/tailwindcss/ui/sidebar" const NavMain = (props: { - items: { - title: string; - url: string; - icon: Accessor; - isActive?: boolean; - items?: { - title: string; - url: string; - }[]; - }[]; + items: { + title: string + url: string + icon: Accessor + isActive?: boolean + items?: { + title: string + url: string + }[] + }[] }) => { - return ( - - Platform - - - {(item) => ( - ( - - - - {item.title} - - - ( - // @ts-expect-error - - - - - Toggle - - )} - /> - - - { - - {(subItem) => ( - - - {subItem.title} - - - )} - - } - - - - - )} - /> - )} - - - - ); -}; + return ( + + Platform + + + {(item) => ( + ( + + + + {item.title} + + + ( + // @ts-expect-error + + + + + Toggle + + )} + /> + + + { + + {(subItem) => ( + + + {subItem.title} + + + )} + + } + + + + + )} + /> + )} + + + + ) +} -export default NavMain; +export default NavMain diff --git a/docs/src/registry/tailwindcss/blocks/sidebar-03/components/nav-projects.tsx b/docs/src/registry/tailwindcss/blocks/sidebar-03/components/nav-projects.tsx index 4740d24e..d51f312d 100644 --- a/docs/src/registry/tailwindcss/blocks/sidebar-03/components/nav-projects.tsx +++ b/docs/src/registry/tailwindcss/blocks/sidebar-03/components/nav-projects.tsx @@ -1,155 +1,156 @@ +import { For, type Accessor, type JSX } from "solid-js" +import type { DropdownMenuTriggerProps } from "@kobalte/core/dropdown-menu" + import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuSeparator, - DropdownMenuTrigger, -} from "@/registry/tailwindcss/ui/dropdown-menu"; + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from "@/registry/tailwindcss/ui/dropdown-menu" import { - SidebarGroup, - SidebarGroupLabel, - SidebarMenu, - SidebarMenuAction, - SidebarMenuButton, - SidebarMenuItem, - useSideBar, -} from "@/registry/tailwindcss/ui/sidebar"; -import type { DropdownMenuTriggerProps } from "@kobalte/core/dropdown-menu"; -import { type Accessor, For, type JSX } from "solid-js"; + SidebarGroup, + SidebarGroupLabel, + SidebarMenu, + SidebarMenuAction, + SidebarMenuButton, + SidebarMenuItem, + useSideBar, +} from "@/registry/tailwindcss/ui/sidebar" const NavProjects = (props: { - projects: { - name: string; - url: string; - icon: Accessor; - }[]; + projects: { + name: string + url: string + icon: Accessor + }[] }) => { - const { isMobile } = useSideBar(); + const { isMobile } = useSideBar() - return ( - - Projects - - - {(item) => ( - - - - {item.name} - - - ( - // @ts-expect-error - - - - - - - - - More - - )} - /> - - - - - - View Project - - - - - - - - - Share Project - - - - - - - Delete Project - - - - - )} - - - - - - - - - - - More - - - - - ); -}; + return ( + + Projects + + + {(item) => ( + + + + {item.name} + + + ( + // @ts-expect-error + + + + + + + + + More + + )} + /> + + + + + + View Project + + + + + + + + + Share Project + + + + + + + Delete Project + + + + + )} + + + + + + + + + + + More + + + + + ) +} -export default NavProjects; +export default NavProjects diff --git a/docs/src/registry/tailwindcss/blocks/sidebar-03/components/nav-secondary.tsx b/docs/src/registry/tailwindcss/blocks/sidebar-03/components/nav-secondary.tsx index 296ef646..7b824dfc 100644 --- a/docs/src/registry/tailwindcss/blocks/sidebar-03/components/nav-secondary.tsx +++ b/docs/src/registry/tailwindcss/blocks/sidebar-03/components/nav-secondary.tsx @@ -1,47 +1,48 @@ import { - SidebarGroup, - SidebarGroupContent, - SidebarMenu, - SidebarMenuButton, - SidebarMenuItem, -} from "@/registry/tailwindcss/ui/sidebar"; + For, + splitProps, + type Accessor, + type ComponentProps, + type JSXElement, +} from "solid-js" + import { - type Accessor, - type ComponentProps, - For, - type JSXElement, - splitProps, -} from "solid-js"; + SidebarGroup, + SidebarGroupContent, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, +} from "@/registry/tailwindcss/ui/sidebar" const NavSecondary = ( - props: ComponentProps & { - items: { - title: string; - url: string; - icon: Accessor; - }[]; - }, + props: ComponentProps & { + items: { + title: string + url: string + icon: Accessor + }[] + } ) => { - const [local, rest] = splitProps(props, ["items"]); + const [local, rest] = splitProps(props, ["items"]) - return ( - - - - - {(item) => ( - - - - {item.title} - - - )} - - - - - ); -}; + return ( + + + + + {(item) => ( + + + + {item.title} + + + )} + + + + + ) +} -export default NavSecondary; +export default NavSecondary diff --git a/docs/src/registry/tailwindcss/blocks/sidebar-03/components/nav-user.tsx b/docs/src/registry/tailwindcss/blocks/sidebar-03/components/nav-user.tsx index 5a8bf96f..9cdaf266 100644 --- a/docs/src/registry/tailwindcss/blocks/sidebar-03/components/nav-user.tsx +++ b/docs/src/registry/tailwindcss/blocks/sidebar-03/components/nav-user.tsx @@ -1,197 +1,198 @@ +import type { DropdownMenuTriggerProps } from "@kobalte/core/dropdown-menu" +import { Image } from "@kobalte/core/image" + import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuGroup, - DropdownMenuGroupLabel, - DropdownMenuItem, - DropdownMenuSeparator, - DropdownMenuTrigger, -} from "@/registry/tailwindcss/ui/dropdown-menu"; + DropdownMenu, + DropdownMenuContent, + DropdownMenuGroup, + DropdownMenuGroupLabel, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from "@/registry/tailwindcss/ui/dropdown-menu" import { - SidebarMenu, - SidebarMenuButton, - SidebarMenuItem, - useSideBar, -} from "@/registry/tailwindcss/ui/sidebar"; -import type { DropdownMenuTriggerProps } from "@kobalte/core/dropdown-menu"; -import { Image } from "@kobalte/core/image"; + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + useSideBar, +} from "@/registry/tailwindcss/ui/sidebar" const NavUser = (props: { - user: { - name: string; - email: string; - avatar: string; - }; + user: { + name: string + email: string + avatar: string + } }) => { - const { isMobile } = useSideBar(); + const { isMobile } = useSideBar() - return ( - - - - ( - // @ts-expect-error - - - - - CN - - -
    - {props.user.name} - {props.user.email} -
    - - - -
    - )} - /> - - - -
    - - - - CN - - -
    - - {props.user.name} - - {props.user.email} -
    -
    -
    -
    - - - - - - - Upgrade to Pro - - - - - - - - - - - - Account - - - - - - - - - Billing - - - - - - Notifications - - - - - - - - Log out - -
    -
    -
    -
    - ); -}; + return ( + + + + ( + // @ts-expect-error + + + + + CN + + +
    + {props.user.name} + {props.user.email} +
    + + + +
    + )} + /> + + + +
    + + + + CN + + +
    + + {props.user.name} + + {props.user.email} +
    +
    +
    +
    + + + + + + + Upgrade to Pro + + + + + + + + + + + + Account + + + + + + + + + Billing + + + + + + Notifications + + + + + + + + Log out + +
    +
    +
    +
    + ) +} -export default NavUser; +export default NavUser diff --git a/docs/src/registry/tailwindcss/blocks/sidebar-03/index.tsx b/docs/src/registry/tailwindcss/blocks/sidebar-03/index.tsx index aa79c6c4..19d748cd 100644 --- a/docs/src/registry/tailwindcss/blocks/sidebar-03/index.tsx +++ b/docs/src/registry/tailwindcss/blocks/sidebar-03/index.tsx @@ -1,33 +1,33 @@ -import AppSidebar from "@/registry/tailwindcss/blocks/sidebar-03/components/app-sidebar"; +import AppSidebar from "@/registry/tailwindcss/blocks/sidebar-03/components/app-sidebar" import { - SidebarInset, - SidebarProvider, - SidebarSeparator, - SidebarTrigger, -} from "@/registry/tailwindcss/ui/sidebar"; + SidebarInset, + SidebarProvider, + SidebarSeparator, + SidebarTrigger, +} from "@/registry/tailwindcss/ui/sidebar" const Page = () => { - return ( - - - -
    -
    - - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - ); -}; + return ( + + + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + ) +} -export default Page; +export default Page diff --git a/docs/src/registry/tailwindcss/charts/area-chart-gradient.tsx b/docs/src/registry/tailwindcss/charts/area-chart-gradient.tsx index 6e8b889d..7e0f6ad5 100644 --- a/docs/src/registry/tailwindcss/charts/area-chart-gradient.tsx +++ b/docs/src/registry/tailwindcss/charts/area-chart-gradient.tsx @@ -1,159 +1,160 @@ +import { VisArea, VisAxis, VisLine, VisTooltip } from "@unovis/solid" +import { Area, CurveType, Position } from "@unovis/ts" + import { - Card, - CardContent, - CardDescription, - CardFooter, - CardHeader, - CardTitle, -} from "@/registry/tailwindcss/ui/card"; + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/registry/tailwindcss/ui/card" import { - type ChartConfig, - ChartContainer, - ChartCrosshair, - ChartTooltipContent, -} from "@/registry/tailwindcss/ui/chart"; -import { VisArea, VisAxis, VisLine, VisTooltip } from "@unovis/solid"; -import { Area, CurveType, Position } from "@unovis/ts"; + ChartContainer, + ChartCrosshair, + ChartTooltipContent, + type ChartConfig, +} from "@/registry/tailwindcss/ui/chart" type DataRecord = { - month: string; - desktop: number; - mobile: number; -}; + month: string + desktop: number + mobile: number +} const data: DataRecord[] = [ - { month: "January", desktop: 186, mobile: 80 }, - { month: "February", desktop: 305, mobile: 200 }, - { month: "March", desktop: 237, mobile: 120 }, - { month: "April", desktop: 73, mobile: 190 }, - { month: "May", desktop: 209, mobile: 130 }, - { month: "June", desktop: 214, mobile: 140 }, -]; + { month: "January", desktop: 186, mobile: 80 }, + { month: "February", desktop: 305, mobile: 200 }, + { month: "March", desktop: 237, mobile: 120 }, + { month: "April", desktop: 73, mobile: 190 }, + { month: "May", desktop: 209, mobile: 130 }, + { month: "June", desktop: 214, mobile: 140 }, +] const chartConfig = { - desktop: { - label: "Desktop", - color: "hsl(var(--chart-1))", - }, - mobile: { - label: "Mobile", - color: "hsl(var(--chart-2))", - }, -} satisfies ChartConfig; + desktop: { + label: "Desktop", + color: "hsl(var(--chart-1))", + }, + mobile: { + label: "Mobile", + color: "hsl(var(--chart-2))", + }, +} satisfies ChartConfig const AreaChartGradient = () => { - return ( - - - Area Chart - Gradient - - Showing total visitors for the last 6 months - - - - - - - - - - - - - - - - - - x={(_, i) => i} - y={[(d) => d.mobile, (d) => d.desktop]} - color="auto" - opacity={0.4} - curveType={CurveType.Natural} - attributes={{ - [`${Area.selectors.area}:nth-child(1)`]: { - fill: "url(#fillDesktop)", - }, - [`${Area.selectors.area}:nth-child(2)`]: { - fill: "url(#fillMobile)", - }, - }} - /> - - x={(_, i) => i} - y={[(d) => d.mobile, (d) => d.mobile + d.desktop]} - color={["var(--color-mobile)", "var(--color-desktop)"]} - curveType={CurveType.Natural} - lineWidth={1} - /> - - type="x" - tickFormat={(d) => data[d as number].month.slice(0, 3)} - gridLine={false} - tickLine={false} - domainLine={false} - numTicks={data.length} - /> - - color={["var(--color-mobile)", "var(--color-desktop)"]} - template={(props) => ( - - )} - /> - - - - -
    -
    -
    - Trending up by 5.2% this month{" "} - - - - - - -
    -
    - January - June 2024 -
    -
    -
    -
    -
    - ); -}; + return ( + + + Area Chart - Gradient + + Showing total visitors for the last 6 months + + + + + + + + + + + + + + + + + + x={(_, i) => i} + y={[(d) => d.mobile, (d) => d.desktop]} + color="auto" + opacity={0.4} + curveType={CurveType.Natural} + attributes={{ + [`${Area.selectors.area}:nth-child(1)`]: { + fill: "url(#fillDesktop)", + }, + [`${Area.selectors.area}:nth-child(2)`]: { + fill: "url(#fillMobile)", + }, + }} + /> + + x={(_, i) => i} + y={[(d) => d.mobile, (d) => d.mobile + d.desktop]} + color={["var(--color-mobile)", "var(--color-desktop)"]} + curveType={CurveType.Natural} + lineWidth={1} + /> + + type="x" + tickFormat={(d) => data[d as number].month.slice(0, 3)} + gridLine={false} + tickLine={false} + domainLine={false} + numTicks={data.length} + /> + + color={["var(--color-mobile)", "var(--color-desktop)"]} + template={(props) => ( + + )} + /> + + + + +
    +
    +
    + Trending up by 5.2% this month{" "} + + + + + + +
    +
    + January - June 2024 +
    +
    +
    +
    +
    + ) +} -export default AreaChartGradient; +export default AreaChartGradient diff --git a/docs/src/registry/tailwindcss/charts/area-chart-interactive.tsx b/docs/src/registry/tailwindcss/charts/area-chart-interactive.tsx index a7624f56..ac2599ad 100644 --- a/docs/src/registry/tailwindcss/charts/area-chart-interactive.tsx +++ b/docs/src/registry/tailwindcss/charts/area-chart-interactive.tsx @@ -1,359 +1,360 @@ -import { useIsMobile } from "@/registry/tailwindcss/hooks/use-mobile"; +import { batch, createSignal } from "solid-js" import { - Card, - CardContent, - CardDescription, - CardHeader, - CardTitle, -} from "@/registry/tailwindcss/ui/card"; + VisArea, + VisAxis, + VisBrush, + VisBulletLegend, + VisLine, + VisTooltip, +} from "@unovis/solid" import { - type ChartConfig, - ChartContainer, - ChartCrosshair, - ChartTooltipContent, -} from "@/registry/tailwindcss/ui/chart"; + Area, + CurveType, + Position, + type BulletLegendItemInterface, +} from "@unovis/ts" + +import { useIsMobile } from "@/registry/tailwindcss/hooks/use-mobile" import { - VisArea, - VisAxis, - VisBrush, - VisBulletLegend, - VisLine, - VisTooltip, -} from "@unovis/solid"; + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from "@/registry/tailwindcss/ui/card" import { - Area, - type BulletLegendItemInterface, - CurveType, - Position, -} from "@unovis/ts"; -import { batch, createSignal } from "solid-js"; + ChartContainer, + ChartCrosshair, + ChartTooltipContent, + type ChartConfig, +} from "@/registry/tailwindcss/ui/chart" type DataRecord = { - date: string; - desktop: number; - mobile: number; -}; + date: string + desktop: number + mobile: number +} const data: DataRecord[] = [ - { date: "2024-04-01", desktop: 222, mobile: 150 }, - { date: "2024-04-02", desktop: 97, mobile: 180 }, - { date: "2024-04-03", desktop: 167, mobile: 120 }, - { date: "2024-04-04", desktop: 242, mobile: 260 }, - { date: "2024-04-05", desktop: 373, mobile: 290 }, - { date: "2024-04-06", desktop: 301, mobile: 340 }, - { date: "2024-04-07", desktop: 245, mobile: 180 }, - { date: "2024-04-08", desktop: 409, mobile: 320 }, - { date: "2024-04-09", desktop: 59, mobile: 110 }, - { date: "2024-04-10", desktop: 261, mobile: 190 }, - { date: "2024-04-11", desktop: 327, mobile: 350 }, - { date: "2024-04-12", desktop: 292, mobile: 210 }, - { date: "2024-04-13", desktop: 342, mobile: 380 }, - { date: "2024-04-14", desktop: 137, mobile: 220 }, - { date: "2024-04-15", desktop: 120, mobile: 170 }, - { date: "2024-04-16", desktop: 138, mobile: 190 }, - { date: "2024-04-17", desktop: 446, mobile: 360 }, - { date: "2024-04-18", desktop: 364, mobile: 410 }, - { date: "2024-04-19", desktop: 243, mobile: 180 }, - { date: "2024-04-20", desktop: 89, mobile: 150 }, - { date: "2024-04-21", desktop: 137, mobile: 200 }, - { date: "2024-04-22", desktop: 224, mobile: 170 }, - { date: "2024-04-23", desktop: 138, mobile: 230 }, - { date: "2024-04-24", desktop: 387, mobile: 290 }, - { date: "2024-04-25", desktop: 215, mobile: 250 }, - { date: "2024-04-26", desktop: 75, mobile: 130 }, - { date: "2024-04-27", desktop: 383, mobile: 420 }, - { date: "2024-04-28", desktop: 122, mobile: 180 }, - { date: "2024-04-29", desktop: 315, mobile: 240 }, - { date: "2024-04-30", desktop: 454, mobile: 380 }, - { date: "2024-05-01", desktop: 165, mobile: 220 }, - { date: "2024-05-02", desktop: 293, mobile: 310 }, - { date: "2024-05-03", desktop: 247, mobile: 190 }, - { date: "2024-05-04", desktop: 385, mobile: 420 }, - { date: "2024-05-05", desktop: 481, mobile: 390 }, - { date: "2024-05-06", desktop: 498, mobile: 520 }, - { date: "2024-05-07", desktop: 388, mobile: 300 }, - { date: "2024-05-08", desktop: 149, mobile: 210 }, - { date: "2024-05-09", desktop: 227, mobile: 180 }, - { date: "2024-05-10", desktop: 293, mobile: 330 }, - { date: "2024-05-11", desktop: 335, mobile: 270 }, - { date: "2024-05-12", desktop: 197, mobile: 240 }, - { date: "2024-05-13", desktop: 197, mobile: 160 }, - { date: "2024-05-14", desktop: 448, mobile: 490 }, - { date: "2024-05-15", desktop: 473, mobile: 380 }, - { date: "2024-05-16", desktop: 338, mobile: 400 }, - { date: "2024-05-17", desktop: 499, mobile: 420 }, - { date: "2024-05-18", desktop: 315, mobile: 350 }, - { date: "2024-05-19", desktop: 235, mobile: 180 }, - { date: "2024-05-20", desktop: 177, mobile: 230 }, - { date: "2024-05-21", desktop: 82, mobile: 140 }, - { date: "2024-05-22", desktop: 81, mobile: 120 }, - { date: "2024-05-23", desktop: 252, mobile: 290 }, - { date: "2024-05-24", desktop: 294, mobile: 220 }, - { date: "2024-05-25", desktop: 201, mobile: 250 }, - { date: "2024-05-26", desktop: 213, mobile: 170 }, - { date: "2024-05-27", desktop: 420, mobile: 460 }, - { date: "2024-05-28", desktop: 233, mobile: 190 }, - { date: "2024-05-29", desktop: 78, mobile: 130 }, - { date: "2024-05-30", desktop: 340, mobile: 280 }, - { date: "2024-05-31", desktop: 178, mobile: 230 }, - { date: "2024-06-01", desktop: 178, mobile: 200 }, - { date: "2024-06-02", desktop: 470, mobile: 410 }, - { date: "2024-06-03", desktop: 103, mobile: 160 }, - { date: "2024-06-04", desktop: 439, mobile: 380 }, - { date: "2024-06-05", desktop: 88, mobile: 140 }, - { date: "2024-06-06", desktop: 294, mobile: 250 }, - { date: "2024-06-07", desktop: 323, mobile: 370 }, - { date: "2024-06-08", desktop: 385, mobile: 320 }, - { date: "2024-06-09", desktop: 438, mobile: 480 }, - { date: "2024-06-10", desktop: 155, mobile: 200 }, - { date: "2024-06-11", desktop: 92, mobile: 150 }, - { date: "2024-06-12", desktop: 492, mobile: 420 }, - { date: "2024-06-13", desktop: 81, mobile: 130 }, - { date: "2024-06-14", desktop: 426, mobile: 380 }, - { date: "2024-06-15", desktop: 307, mobile: 350 }, - { date: "2024-06-16", desktop: 371, mobile: 310 }, - { date: "2024-06-17", desktop: 475, mobile: 520 }, - { date: "2024-06-18", desktop: 107, mobile: 170 }, - { date: "2024-06-19", desktop: 341, mobile: 290 }, - { date: "2024-06-20", desktop: 408, mobile: 450 }, - { date: "2024-06-21", desktop: 169, mobile: 210 }, - { date: "2024-06-22", desktop: 317, mobile: 270 }, - { date: "2024-06-23", desktop: 480, mobile: 530 }, - { date: "2024-06-24", desktop: 132, mobile: 180 }, - { date: "2024-06-25", desktop: 141, mobile: 190 }, - { date: "2024-06-26", desktop: 434, mobile: 380 }, - { date: "2024-06-27", desktop: 448, mobile: 490 }, - { date: "2024-06-28", desktop: 149, mobile: 200 }, - { date: "2024-06-29", desktop: 103, mobile: 160 }, - { date: "2024-06-30", desktop: 446, mobile: 400 }, -]; + { date: "2024-04-01", desktop: 222, mobile: 150 }, + { date: "2024-04-02", desktop: 97, mobile: 180 }, + { date: "2024-04-03", desktop: 167, mobile: 120 }, + { date: "2024-04-04", desktop: 242, mobile: 260 }, + { date: "2024-04-05", desktop: 373, mobile: 290 }, + { date: "2024-04-06", desktop: 301, mobile: 340 }, + { date: "2024-04-07", desktop: 245, mobile: 180 }, + { date: "2024-04-08", desktop: 409, mobile: 320 }, + { date: "2024-04-09", desktop: 59, mobile: 110 }, + { date: "2024-04-10", desktop: 261, mobile: 190 }, + { date: "2024-04-11", desktop: 327, mobile: 350 }, + { date: "2024-04-12", desktop: 292, mobile: 210 }, + { date: "2024-04-13", desktop: 342, mobile: 380 }, + { date: "2024-04-14", desktop: 137, mobile: 220 }, + { date: "2024-04-15", desktop: 120, mobile: 170 }, + { date: "2024-04-16", desktop: 138, mobile: 190 }, + { date: "2024-04-17", desktop: 446, mobile: 360 }, + { date: "2024-04-18", desktop: 364, mobile: 410 }, + { date: "2024-04-19", desktop: 243, mobile: 180 }, + { date: "2024-04-20", desktop: 89, mobile: 150 }, + { date: "2024-04-21", desktop: 137, mobile: 200 }, + { date: "2024-04-22", desktop: 224, mobile: 170 }, + { date: "2024-04-23", desktop: 138, mobile: 230 }, + { date: "2024-04-24", desktop: 387, mobile: 290 }, + { date: "2024-04-25", desktop: 215, mobile: 250 }, + { date: "2024-04-26", desktop: 75, mobile: 130 }, + { date: "2024-04-27", desktop: 383, mobile: 420 }, + { date: "2024-04-28", desktop: 122, mobile: 180 }, + { date: "2024-04-29", desktop: 315, mobile: 240 }, + { date: "2024-04-30", desktop: 454, mobile: 380 }, + { date: "2024-05-01", desktop: 165, mobile: 220 }, + { date: "2024-05-02", desktop: 293, mobile: 310 }, + { date: "2024-05-03", desktop: 247, mobile: 190 }, + { date: "2024-05-04", desktop: 385, mobile: 420 }, + { date: "2024-05-05", desktop: 481, mobile: 390 }, + { date: "2024-05-06", desktop: 498, mobile: 520 }, + { date: "2024-05-07", desktop: 388, mobile: 300 }, + { date: "2024-05-08", desktop: 149, mobile: 210 }, + { date: "2024-05-09", desktop: 227, mobile: 180 }, + { date: "2024-05-10", desktop: 293, mobile: 330 }, + { date: "2024-05-11", desktop: 335, mobile: 270 }, + { date: "2024-05-12", desktop: 197, mobile: 240 }, + { date: "2024-05-13", desktop: 197, mobile: 160 }, + { date: "2024-05-14", desktop: 448, mobile: 490 }, + { date: "2024-05-15", desktop: 473, mobile: 380 }, + { date: "2024-05-16", desktop: 338, mobile: 400 }, + { date: "2024-05-17", desktop: 499, mobile: 420 }, + { date: "2024-05-18", desktop: 315, mobile: 350 }, + { date: "2024-05-19", desktop: 235, mobile: 180 }, + { date: "2024-05-20", desktop: 177, mobile: 230 }, + { date: "2024-05-21", desktop: 82, mobile: 140 }, + { date: "2024-05-22", desktop: 81, mobile: 120 }, + { date: "2024-05-23", desktop: 252, mobile: 290 }, + { date: "2024-05-24", desktop: 294, mobile: 220 }, + { date: "2024-05-25", desktop: 201, mobile: 250 }, + { date: "2024-05-26", desktop: 213, mobile: 170 }, + { date: "2024-05-27", desktop: 420, mobile: 460 }, + { date: "2024-05-28", desktop: 233, mobile: 190 }, + { date: "2024-05-29", desktop: 78, mobile: 130 }, + { date: "2024-05-30", desktop: 340, mobile: 280 }, + { date: "2024-05-31", desktop: 178, mobile: 230 }, + { date: "2024-06-01", desktop: 178, mobile: 200 }, + { date: "2024-06-02", desktop: 470, mobile: 410 }, + { date: "2024-06-03", desktop: 103, mobile: 160 }, + { date: "2024-06-04", desktop: 439, mobile: 380 }, + { date: "2024-06-05", desktop: 88, mobile: 140 }, + { date: "2024-06-06", desktop: 294, mobile: 250 }, + { date: "2024-06-07", desktop: 323, mobile: 370 }, + { date: "2024-06-08", desktop: 385, mobile: 320 }, + { date: "2024-06-09", desktop: 438, mobile: 480 }, + { date: "2024-06-10", desktop: 155, mobile: 200 }, + { date: "2024-06-11", desktop: 92, mobile: 150 }, + { date: "2024-06-12", desktop: 492, mobile: 420 }, + { date: "2024-06-13", desktop: 81, mobile: 130 }, + { date: "2024-06-14", desktop: 426, mobile: 380 }, + { date: "2024-06-15", desktop: 307, mobile: 350 }, + { date: "2024-06-16", desktop: 371, mobile: 310 }, + { date: "2024-06-17", desktop: 475, mobile: 520 }, + { date: "2024-06-18", desktop: 107, mobile: 170 }, + { date: "2024-06-19", desktop: 341, mobile: 290 }, + { date: "2024-06-20", desktop: 408, mobile: 450 }, + { date: "2024-06-21", desktop: 169, mobile: 210 }, + { date: "2024-06-22", desktop: 317, mobile: 270 }, + { date: "2024-06-23", desktop: 480, mobile: 530 }, + { date: "2024-06-24", desktop: 132, mobile: 180 }, + { date: "2024-06-25", desktop: 141, mobile: 190 }, + { date: "2024-06-26", desktop: 434, mobile: 380 }, + { date: "2024-06-27", desktop: 448, mobile: 490 }, + { date: "2024-06-28", desktop: 149, mobile: 200 }, + { date: "2024-06-29", desktop: 103, mobile: 160 }, + { date: "2024-06-30", desktop: 446, mobile: 400 }, +] const chartConfig = { - desktop: { - label: "Desktop", - color: "hsl(var(--chart-1))", - }, - mobile: { - label: "Mobile", - color: "hsl(var(--chart-2))", - }, -} satisfies ChartConfig; + desktop: { + label: "Desktop", + color: "hsl(var(--chart-1))", + }, + mobile: { + label: "Mobile", + color: "hsl(var(--chart-2))", + }, +} satisfies ChartConfig const AreaChartInteractive = () => { - const items = (): BulletLegendItemInterface[] => { - return Object.entries(chartConfig).map(([_, config]) => ({ - name: config.label, - color: config.color, - })); - }; + const items = (): BulletLegendItemInterface[] => { + return Object.entries(chartConfig).map(([_, config]) => ({ + name: config.label, + color: config.color, + })) + } - const [duration, setDuration] = createSignal(0); - const [domain, setDomain] = createSignal<[number, number]>([ - data.findIndex((d) => d.date === "2024-04-30"), - data.findIndex((d) => d.date === "2024-06-01"), - ]); + const [duration, setDuration] = createSignal(0) + const [domain, setDomain] = createSignal<[number, number]>([ + data.findIndex((d) => d.date === "2024-04-30"), + data.findIndex((d) => d.date === "2024-06-01"), + ]) - const isMobile = useIsMobile(); + const isMobile = useIsMobile() - const numTicks = () => { - if (isMobile()) { - return 4; - } - return 15; - }; + const numTicks = () => { + if (isMobile()) { + return 4 + } + return 15 + } - return ( - - - Area Chart - Interactive - - Showing total visitors for the last 3 months - - - - - - - - - - - - - - - - - - x={(_, i) => i} - y={[(d) => d.mobile, (d) => d.desktop]} - color="auto" - opacity={0.4} - curveType={CurveType.Natural} - attributes={{ - [`${Area.selectors.area}:nth-child(1)`]: { - fill: "url(#fillDesktop)", - }, - [`${Area.selectors.area}:nth-child(2)`]: { - fill: "url(#fillMobile)", - }, - }} - /> - - x={(_, i) => i} - y={[(d) => d.mobile, (d) => d.mobile + d.desktop]} - color={["var(--color-mobile)", "var(--color-desktop)"]} - curveType={CurveType.Natural} - lineWidth={1} - /> - - type="x" - tickFormat={(d) => { - const date = new Date(data[d as number].date); - return date.toLocaleDateString("en-US", { - month: "short", - day: "numeric", - }); - }} - gridLine={false} - tickLine={false} - domainLine={false} - numTicks={Math.min(numTicks(), domain()[1] - domain()[0])} - /> - - color={["var(--color-mobile)", "var(--color-desktop)"]} - template={(props) => ( - { - const date = new Date(data[d as number].date); - return date.toLocaleDateString("en-US", { - month: "short", - day: "numeric", - }); - }} - {...props} - /> - )} - /> - - -
    - -
    - - - - - - - - - - - - - - - x={(_, i) => i} - y={[(d) => d.mobile, (d) => d.desktop]} - color="auto" - opacity={0.4} - curveType={CurveType.Natural} - attributes={{ - [`${Area.selectors.area}:nth-child(1)`]: { - fill: "url(#fillDesktop)", - }, - [`${Area.selectors.area}:nth-child(2)`]: { - fill: "url(#fillMobile)", - }, - }} - /> - - x={(_, i) => i} - y={[(d) => d.mobile, (d) => d.mobile + d.desktop]} - color={["var(--color-mobile)", "var(--color-desktop)"]} - curveType={CurveType.Natural} - lineWidth={1} - /> - - type="x" - tickFormat={(d) => { - const date = new Date(data[d as number].date); - return date.toLocaleDateString("en-US", { - month: "short", - day: "numeric", - }); - }} - gridLine={false} - tickLine={false} - domainLine={false} - numTicks={numTicks()} - /> - { - if (userDriven) - batch(() => { - setDuration(0); - setDomain(selection!); - }); - }} - draggable - /> - -
    -
    - ); -}; + return ( + + + Area Chart - Interactive + + Showing total visitors for the last 3 months + + + + + + + + + + + + + + + + + + x={(_, i) => i} + y={[(d) => d.mobile, (d) => d.desktop]} + color="auto" + opacity={0.4} + curveType={CurveType.Natural} + attributes={{ + [`${Area.selectors.area}:nth-child(1)`]: { + fill: "url(#fillDesktop)", + }, + [`${Area.selectors.area}:nth-child(2)`]: { + fill: "url(#fillMobile)", + }, + }} + /> + + x={(_, i) => i} + y={[(d) => d.mobile, (d) => d.mobile + d.desktop]} + color={["var(--color-mobile)", "var(--color-desktop)"]} + curveType={CurveType.Natural} + lineWidth={1} + /> + + type="x" + tickFormat={(d) => { + const date = new Date(data[d as number].date) + return date.toLocaleDateString("en-US", { + month: "short", + day: "numeric", + }) + }} + gridLine={false} + tickLine={false} + domainLine={false} + numTicks={Math.min(numTicks(), domain()[1] - domain()[0])} + /> + + color={["var(--color-mobile)", "var(--color-desktop)"]} + template={(props) => ( + { + const date = new Date(data[d as number].date) + return date.toLocaleDateString("en-US", { + month: "short", + day: "numeric", + }) + }} + {...props} + /> + )} + /> + + +
    + +
    + + + + + + + + + + + + + + + x={(_, i) => i} + y={[(d) => d.mobile, (d) => d.desktop]} + color="auto" + opacity={0.4} + curveType={CurveType.Natural} + attributes={{ + [`${Area.selectors.area}:nth-child(1)`]: { + fill: "url(#fillDesktop)", + }, + [`${Area.selectors.area}:nth-child(2)`]: { + fill: "url(#fillMobile)", + }, + }} + /> + + x={(_, i) => i} + y={[(d) => d.mobile, (d) => d.mobile + d.desktop]} + color={["var(--color-mobile)", "var(--color-desktop)"]} + curveType={CurveType.Natural} + lineWidth={1} + /> + + type="x" + tickFormat={(d) => { + const date = new Date(data[d as number].date) + return date.toLocaleDateString("en-US", { + month: "short", + day: "numeric", + }) + }} + gridLine={false} + tickLine={false} + domainLine={false} + numTicks={numTicks()} + /> + { + if (userDriven) + batch(() => { + setDuration(0) + setDomain(selection!) + }) + }} + draggable + /> + +
    +
    + ) +} -export default AreaChartInteractive; +export default AreaChartInteractive diff --git a/docs/src/registry/tailwindcss/charts/area-chart-legend.tsx b/docs/src/registry/tailwindcss/charts/area-chart-legend.tsx index 3587492f..a201603f 100644 --- a/docs/src/registry/tailwindcss/charts/area-chart-legend.tsx +++ b/docs/src/registry/tailwindcss/charts/area-chart-legend.tsx @@ -1,147 +1,144 @@ import { - Card, - CardContent, - CardDescription, - CardFooter, - CardHeader, - CardTitle, -} from "@/registry/tailwindcss/ui/card"; -import { - type ChartConfig, - ChartContainer, - ChartCrosshair, - ChartTooltipContent, -} from "@/registry/tailwindcss/ui/chart"; + VisArea, + VisAxis, + VisBulletLegend, + VisLine, + VisTooltip, +} from "@unovis/solid" +import { CurveType, Position, type BulletLegendItemInterface } from "@unovis/ts" + import { - VisArea, - VisAxis, - VisBulletLegend, - VisLine, - VisTooltip, -} from "@unovis/solid"; + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/registry/tailwindcss/ui/card" import { - type BulletLegendItemInterface, - CurveType, - Position, -} from "@unovis/ts"; + ChartContainer, + ChartCrosshair, + ChartTooltipContent, + type ChartConfig, +} from "@/registry/tailwindcss/ui/chart" type DataRecord = { - month: string; - desktop: number; - mobile: number; -}; + month: string + desktop: number + mobile: number +} const data: DataRecord[] = [ - { month: "January", desktop: 186, mobile: 80 }, - { month: "February", desktop: 305, mobile: 200 }, - { month: "March", desktop: 237, mobile: 120 }, - { month: "April", desktop: 73, mobile: 190 }, - { month: "May", desktop: 209, mobile: 130 }, - { month: "June", desktop: 214, mobile: 140 }, -]; + { month: "January", desktop: 186, mobile: 80 }, + { month: "February", desktop: 305, mobile: 200 }, + { month: "March", desktop: 237, mobile: 120 }, + { month: "April", desktop: 73, mobile: 190 }, + { month: "May", desktop: 209, mobile: 130 }, + { month: "June", desktop: 214, mobile: 140 }, +] const chartConfig = { - desktop: { - label: "Desktop", - color: "hsl(var(--chart-1))", - }, - mobile: { - label: "Mobile", - color: "hsl(var(--chart-2))", - }, -} satisfies ChartConfig; + desktop: { + label: "Desktop", + color: "hsl(var(--chart-1))", + }, + mobile: { + label: "Mobile", + color: "hsl(var(--chart-2))", + }, +} satisfies ChartConfig const AreaChartLegend = () => { - const items = (): BulletLegendItemInterface[] => { - return Object.entries(chartConfig).map(([_, config]) => ({ - name: config.label, - color: config.color, - })); - }; + const items = (): BulletLegendItemInterface[] => { + return Object.entries(chartConfig).map(([_, config]) => ({ + name: config.label, + color: config.color, + })) + } - return ( - - - Area Chart - Legend - - Showing total visitors for the last 6 months - - - - - - x={(_, i) => i} - y={[(d) => d.mobile, (d) => d.desktop]} - color={["var(--color-mobile)", "var(--color-desktop)"]} - opacity={0.4} - curveType={CurveType.Natural} - /> - - x={(_, i) => i} - y={[(d) => d.mobile, (d) => d.mobile + d.desktop]} - color={["var(--color-mobile)", "var(--color-desktop)"]} - curveType={CurveType.Natural} - lineWidth={1} - /> - - type="x" - tickFormat={(d) => data[d as number].month.slice(0, 3)} - gridLine={false} - tickLine={false} - domainLine={false} - numTicks={data.length} - /> - - color={["var(--color-mobile)", "var(--color-desktop)"]} - template={(props) => ( - - )} - /> - - -
    - -
    -
    - -
    -
    -
    - Trending up by 5.2% this month{" "} - - - - - - -
    -
    - January - June 2024 -
    -
    -
    -
    -
    - ); -}; + return ( + + + Area Chart - Legend + + Showing total visitors for the last 6 months + + + + + + x={(_, i) => i} + y={[(d) => d.mobile, (d) => d.desktop]} + color={["var(--color-mobile)", "var(--color-desktop)"]} + opacity={0.4} + curveType={CurveType.Natural} + /> + + x={(_, i) => i} + y={[(d) => d.mobile, (d) => d.mobile + d.desktop]} + color={["var(--color-mobile)", "var(--color-desktop)"]} + curveType={CurveType.Natural} + lineWidth={1} + /> + + type="x" + tickFormat={(d) => data[d as number].month.slice(0, 3)} + gridLine={false} + tickLine={false} + domainLine={false} + numTicks={data.length} + /> + + color={["var(--color-mobile)", "var(--color-desktop)"]} + template={(props) => ( + + )} + /> + + +
    + +
    +
    + +
    +
    +
    + Trending up by 5.2% this month{" "} + + + + + + +
    +
    + January - June 2024 +
    +
    +
    +
    +
    + ) +} -export default AreaChartLegend; +export default AreaChartLegend diff --git a/docs/src/registry/tailwindcss/charts/area-chart-linear.tsx b/docs/src/registry/tailwindcss/charts/area-chart-linear.tsx index cf9a64d8..b85aa846 100644 --- a/docs/src/registry/tailwindcss/charts/area-chart-linear.tsx +++ b/docs/src/registry/tailwindcss/charts/area-chart-linear.tsx @@ -1,123 +1,124 @@ +import { VisArea, VisAxis, VisLine, VisTooltip } from "@unovis/solid" +import { CurveType, Position } from "@unovis/ts" + import { - Card, - CardContent, - CardDescription, - CardFooter, - CardHeader, - CardTitle, -} from "@/registry/tailwindcss/ui/card"; + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/registry/tailwindcss/ui/card" import { - type ChartConfig, - ChartContainer, - ChartCrosshair, - ChartTooltipContent, -} from "@/registry/tailwindcss/ui/chart"; -import { VisArea, VisAxis, VisLine, VisTooltip } from "@unovis/solid"; -import { CurveType, Position } from "@unovis/ts"; + ChartContainer, + ChartCrosshair, + ChartTooltipContent, + type ChartConfig, +} from "@/registry/tailwindcss/ui/chart" type DataRecord = { - month: string; - desktop: number; -}; + month: string + desktop: number +} const data: DataRecord[] = [ - { month: "January", desktop: 186 }, - { month: "February", desktop: 305 }, - { month: "March", desktop: 237 }, - { month: "April", desktop: 73 }, - { month: "May", desktop: 209 }, - { month: "June", desktop: 214 }, -]; + { month: "January", desktop: 186 }, + { month: "February", desktop: 305 }, + { month: "March", desktop: 237 }, + { month: "April", desktop: 73 }, + { month: "May", desktop: 209 }, + { month: "June", desktop: 214 }, +] const chartConfig = { - desktop: { - label: "Desktop", - color: "hsl(var(--chart-1))", - }, -} satisfies ChartConfig; + desktop: { + label: "Desktop", + color: "hsl(var(--chart-1))", + }, +} satisfies ChartConfig const AreaChartLinear = () => { - return ( - - - Area Chart - Linear - - Showing total visitors for the last 6 months - - - - - - x={(_, i) => i} - y={(d) => d.desktop} - color="var(--color-desktop)" - opacity={0.4} - curveType={CurveType.Linear} - /> - - x={(_, i) => i} - y={(d) => d.desktop} - color="var(--color-desktop)" - curveType={CurveType.Linear} - lineWidth={1} - /> - - type="x" - tickFormat={(d) => data[d as number].month.slice(0, 3)} - gridLine={false} - tickLine={false} - domainLine={false} - numTicks={data.length} - /> - - color="var(--color-desktop)" - template={(props) => ( - - )} - /> - - - - -
    -
    -
    - Trending up by 5.2% this month{" "} - - - - - - -
    -
    - January - June 2024 -
    -
    -
    -
    -
    - ); -}; + return ( + + + Area Chart - Linear + + Showing total visitors for the last 6 months + + + + + + x={(_, i) => i} + y={(d) => d.desktop} + color="var(--color-desktop)" + opacity={0.4} + curveType={CurveType.Linear} + /> + + x={(_, i) => i} + y={(d) => d.desktop} + color="var(--color-desktop)" + curveType={CurveType.Linear} + lineWidth={1} + /> + + type="x" + tickFormat={(d) => data[d as number].month.slice(0, 3)} + gridLine={false} + tickLine={false} + domainLine={false} + numTicks={data.length} + /> + + color="var(--color-desktop)" + template={(props) => ( + + )} + /> + + + + +
    +
    +
    + Trending up by 5.2% this month{" "} + + + + + + +
    +
    + January - June 2024 +
    +
    +
    +
    +
    + ) +} -export default AreaChartLinear; +export default AreaChartLinear diff --git a/docs/src/registry/tailwindcss/charts/area-chart-stacked.tsx b/docs/src/registry/tailwindcss/charts/area-chart-stacked.tsx index 6c6196b2..3c260255 100644 --- a/docs/src/registry/tailwindcss/charts/area-chart-stacked.tsx +++ b/docs/src/registry/tailwindcss/charts/area-chart-stacked.tsx @@ -1,123 +1,124 @@ +import { VisArea, VisAxis, VisLine, VisTooltip } from "@unovis/solid" +import { CurveType, Position } from "@unovis/ts" + import { - Card, - CardContent, - CardDescription, - CardFooter, - CardHeader, - CardTitle, -} from "@/registry/tailwindcss/ui/card"; + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/registry/tailwindcss/ui/card" import { - type ChartConfig, - ChartContainer, - ChartCrosshair, - ChartTooltipContent, -} from "@/registry/tailwindcss/ui/chart"; -import { VisArea, VisAxis, VisLine, VisTooltip } from "@unovis/solid"; -import { CurveType, Position } from "@unovis/ts"; + ChartContainer, + ChartCrosshair, + ChartTooltipContent, + type ChartConfig, +} from "@/registry/tailwindcss/ui/chart" type DataRecord = { - month: string; - desktop: number; - mobile: number; -}; + month: string + desktop: number + mobile: number +} const data: DataRecord[] = [ - { month: "January", desktop: 186, mobile: 80 }, - { month: "February", desktop: 305, mobile: 200 }, - { month: "March", desktop: 237, mobile: 120 }, - { month: "April", desktop: 73, mobile: 190 }, - { month: "May", desktop: 209, mobile: 130 }, - { month: "June", desktop: 214, mobile: 140 }, -]; + { month: "January", desktop: 186, mobile: 80 }, + { month: "February", desktop: 305, mobile: 200 }, + { month: "March", desktop: 237, mobile: 120 }, + { month: "April", desktop: 73, mobile: 190 }, + { month: "May", desktop: 209, mobile: 130 }, + { month: "June", desktop: 214, mobile: 140 }, +] const chartConfig = { - desktop: { - label: "Desktop", - color: "hsl(var(--chart-1))", - }, - mobile: { - label: "Mobile", - color: "hsl(var(--chart-2))", - }, -} satisfies ChartConfig; + desktop: { + label: "Desktop", + color: "hsl(var(--chart-1))", + }, + mobile: { + label: "Mobile", + color: "hsl(var(--chart-2))", + }, +} satisfies ChartConfig const AreaChartStacked = () => { - return ( - - - Area Chart - Stacked - - Showing total visitors for the last 6 months - - - - - - x={(_, i) => i} - y={[(d) => d.mobile, (d) => d.desktop]} - color={["var(--color-mobile)", "var(--color-desktop)"]} - opacity={0.4} - curveType={CurveType.Natural} - /> - - x={(_, i) => i} - y={[(d) => d.mobile, (d) => d.mobile + d.desktop]} - color={["var(--color-mobile)", "var(--color-desktop)"]} - curveType={CurveType.Natural} - lineWidth={1} - /> - - type="x" - tickFormat={(d) => data[d as number].month.slice(0, 3)} - gridLine={false} - tickLine={false} - domainLine={false} - numTicks={data.length} - /> - - color={["var(--color-mobile)", "var(--color-desktop)"]} - template={(props) => ( - - )} - /> - - - - -
    -
    -
    - Trending up by 5.2% this month{" "} - - - - - - -
    -
    - January - June 2024 -
    -
    -
    -
    -
    - ); -}; + return ( + + + Area Chart - Stacked + + Showing total visitors for the last 6 months + + + + + + x={(_, i) => i} + y={[(d) => d.mobile, (d) => d.desktop]} + color={["var(--color-mobile)", "var(--color-desktop)"]} + opacity={0.4} + curveType={CurveType.Natural} + /> + + x={(_, i) => i} + y={[(d) => d.mobile, (d) => d.mobile + d.desktop]} + color={["var(--color-mobile)", "var(--color-desktop)"]} + curveType={CurveType.Natural} + lineWidth={1} + /> + + type="x" + tickFormat={(d) => data[d as number].month.slice(0, 3)} + gridLine={false} + tickLine={false} + domainLine={false} + numTicks={data.length} + /> + + color={["var(--color-mobile)", "var(--color-desktop)"]} + template={(props) => ( + + )} + /> + + + + +
    +
    +
    + Trending up by 5.2% this month{" "} + + + + + + +
    +
    + January - June 2024 +
    +
    +
    +
    +
    + ) +} -export default AreaChartStacked; +export default AreaChartStacked diff --git a/docs/src/registry/tailwindcss/charts/area-chart-step.tsx b/docs/src/registry/tailwindcss/charts/area-chart-step.tsx index 8e303ab7..c293eae0 100644 --- a/docs/src/registry/tailwindcss/charts/area-chart-step.tsx +++ b/docs/src/registry/tailwindcss/charts/area-chart-step.tsx @@ -1,130 +1,131 @@ +import { VisArea, VisAxis, VisLine, VisTooltip } from "@unovis/solid" +import { CurveType, Position } from "@unovis/ts" + import { - Card, - CardContent, - CardDescription, - CardFooter, - CardHeader, - CardTitle, -} from "@/registry/tailwindcss/ui/card"; + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/registry/tailwindcss/ui/card" import { - type ChartConfig, - ChartContainer, - ChartCrosshair, - ChartTooltipContent, -} from "@/registry/tailwindcss/ui/chart"; -import { VisArea, VisAxis, VisLine, VisTooltip } from "@unovis/solid"; -import { CurveType, Position } from "@unovis/ts"; + ChartContainer, + ChartCrosshair, + ChartTooltipContent, + type ChartConfig, +} from "@/registry/tailwindcss/ui/chart" type DataRecord = { - month: string; - desktop: number; -}; + month: string + desktop: number +} const data: DataRecord[] = [ - { month: "January", desktop: 186 }, - { month: "February", desktop: 305 }, - { month: "March", desktop: 237 }, - { month: "April", desktop: 73 }, - { month: "May", desktop: 209 }, - { month: "June", desktop: 214 }, -]; + { month: "January", desktop: 186 }, + { month: "February", desktop: 305 }, + { month: "March", desktop: 237 }, + { month: "April", desktop: 73 }, + { month: "May", desktop: 209 }, + { month: "June", desktop: 214 }, +] const chartConfig = { - desktop: { - label: "Desktop", - color: "hsl(var(--chart-1))", - icon: ( - - - - ), - }, -} satisfies ChartConfig; + desktop: { + label: "Desktop", + color: "hsl(var(--chart-1))", + icon: ( + + + + ), + }, +} satisfies ChartConfig const AreaChartStep = () => { - return ( - - - Area Chart - Step - - Showing total visitors for the last 6 months - - - - - - x={(_, i) => i} - y={(d) => d.desktop} - color="var(--color-desktop)" - opacity={0.4} - curveType={CurveType.Step} - /> - - x={(_, i) => i} - y={(d) => d.desktop} - color="var(--color-desktop)" - curveType={CurveType.Step} - lineWidth={1} - /> - - type="x" - tickFormat={(d) => data[d as number].month.slice(0, 3)} - gridLine={false} - tickLine={false} - domainLine={false} - numTicks={data.length} - /> - - color="var(--color-desktop)" - template={(props) => ( - - )} - /> - - - - -
    -
    -
    - Trending up by 5.2% this month{" "} - - - - - - -
    -
    - January - June 2024 -
    -
    -
    -
    -
    - ); -}; + return ( + + + Area Chart - Step + + Showing total visitors for the last 6 months + + + + + + x={(_, i) => i} + y={(d) => d.desktop} + color="var(--color-desktop)" + opacity={0.4} + curveType={CurveType.Step} + /> + + x={(_, i) => i} + y={(d) => d.desktop} + color="var(--color-desktop)" + curveType={CurveType.Step} + lineWidth={1} + /> + + type="x" + tickFormat={(d) => data[d as number].month.slice(0, 3)} + gridLine={false} + tickLine={false} + domainLine={false} + numTicks={data.length} + /> + + color="var(--color-desktop)" + template={(props) => ( + + )} + /> + + + + +
    +
    +
    + Trending up by 5.2% this month{" "} + + + + + + +
    +
    + January - June 2024 +
    +
    +
    +
    +
    + ) +} -export default AreaChartStep; +export default AreaChartStep diff --git a/docs/src/registry/tailwindcss/charts/area-chart.tsx b/docs/src/registry/tailwindcss/charts/area-chart.tsx index d008af01..1ca10225 100644 --- a/docs/src/registry/tailwindcss/charts/area-chart.tsx +++ b/docs/src/registry/tailwindcss/charts/area-chart.tsx @@ -1,122 +1,123 @@ +import { VisArea, VisAxis, VisLine, VisTooltip } from "@unovis/solid" +import { CurveType, Position } from "@unovis/ts" + import { - Card, - CardContent, - CardDescription, - CardFooter, - CardHeader, - CardTitle, -} from "@/registry/tailwindcss/ui/card"; + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/registry/tailwindcss/ui/card" import { - type ChartConfig, - ChartContainer, - ChartCrosshair, - ChartTooltipContent, -} from "@/registry/tailwindcss/ui/chart"; -import { VisArea, VisAxis, VisLine, VisTooltip } from "@unovis/solid"; -import { CurveType, Position } from "@unovis/ts"; + ChartContainer, + ChartCrosshair, + ChartTooltipContent, + type ChartConfig, +} from "@/registry/tailwindcss/ui/chart" type DataRecord = { - month: string; - desktop: number; -}; + month: string + desktop: number +} const data: DataRecord[] = [ - { month: "January", desktop: 186 }, - { month: "February", desktop: 305 }, - { month: "March", desktop: 237 }, - { month: "April", desktop: 73 }, - { month: "May", desktop: 209 }, - { month: "June", desktop: 214 }, -]; + { month: "January", desktop: 186 }, + { month: "February", desktop: 305 }, + { month: "March", desktop: 237 }, + { month: "April", desktop: 73 }, + { month: "May", desktop: 209 }, + { month: "June", desktop: 214 }, +] const chartConfig = { - desktop: { - label: "Desktop", - color: "hsl(var(--chart-1))", - }, -} satisfies ChartConfig; + desktop: { + label: "Desktop", + color: "hsl(var(--chart-1))", + }, +} satisfies ChartConfig const AreaChart = () => { - return ( - - - Area Chart - - Showing total visitors for the last 6 months - - - - - - x={(_, i) => i} - y={(d) => d.desktop} - color="var(--color-desktop)" - opacity={0.4} - curveType={CurveType.Natural} - /> - - x={(_, i) => i} - y={(d) => d.desktop} - color="var(--color-desktop)" - curveType={CurveType.Natural} - lineWidth={1} - /> - - type="x" - tickFormat={(d) => data[d as number].month.slice(0, 3)} - gridLine={false} - tickLine={false} - domainLine={false} - numTicks={data.length} - /> - - color="var(--color-desktop)" - template={(props) => ( - - )} - /> - - - - -
    -
    -
    - Trending up by 5.2% this month{" "} - - - - - - -
    -
    - January - June 2024 -
    -
    -
    -
    -
    - ); -}; + return ( + + + Area Chart + + Showing total visitors for the last 6 months + + + + + + x={(_, i) => i} + y={(d) => d.desktop} + color="var(--color-desktop)" + opacity={0.4} + curveType={CurveType.Natural} + /> + + x={(_, i) => i} + y={(d) => d.desktop} + color="var(--color-desktop)" + curveType={CurveType.Natural} + lineWidth={1} + /> + + type="x" + tickFormat={(d) => data[d as number].month.slice(0, 3)} + gridLine={false} + tickLine={false} + domainLine={false} + numTicks={data.length} + /> + + color="var(--color-desktop)" + template={(props) => ( + + )} + /> + + + + +
    +
    +
    + Trending up by 5.2% this month{" "} + + + + + + +
    +
    + January - June 2024 +
    +
    +
    +
    +
    + ) +} -export default AreaChart; +export default AreaChart diff --git a/docs/src/registry/tailwindcss/charts/bar-chart-active.tsx b/docs/src/registry/tailwindcss/charts/bar-chart-active.tsx index 421a5857..3baf9bec 100644 --- a/docs/src/registry/tailwindcss/charts/bar-chart-active.tsx +++ b/docs/src/registry/tailwindcss/charts/bar-chart-active.tsx @@ -1,158 +1,159 @@ +import { render } from "solid-js/web" +import { VisAxis, VisStackedBar, VisTooltip } from "@unovis/solid" +import { StackedBar } from "@unovis/ts" + import { - Card, - CardContent, - CardDescription, - CardFooter, - CardHeader, - CardTitle, -} from "@/registry/tailwindcss/ui/card"; + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/registry/tailwindcss/ui/card" import { - type ChartConfig, - ChartContainer, - ChartTooltipContent, -} from "@/registry/tailwindcss/ui/chart"; -import { VisAxis, VisStackedBar, VisTooltip } from "@unovis/solid"; -import { StackedBar } from "@unovis/ts"; -import { render } from "solid-js/web"; + ChartContainer, + ChartTooltipContent, + type ChartConfig, +} from "@/registry/tailwindcss/ui/chart" type DataRecord = { - browser: string; - visitors: number; - fill: string; -}; + browser: string + visitors: number + fill: string +} const data: DataRecord[] = [ - { browser: "chrome", visitors: 187, fill: "var(--color-chrome)" }, - { browser: "safari", visitors: 200, fill: "var(--color-safari)" }, - { browser: "firefox", visitors: 275, fill: "var(--color-firefox)" }, - { browser: "edge", visitors: 173, fill: "var(--color-edge)" }, - { browser: "other", visitors: 90, fill: "var(--color-other)" }, -]; + { browser: "chrome", visitors: 187, fill: "var(--color-chrome)" }, + { browser: "safari", visitors: 200, fill: "var(--color-safari)" }, + { browser: "firefox", visitors: 275, fill: "var(--color-firefox)" }, + { browser: "edge", visitors: 173, fill: "var(--color-edge)" }, + { browser: "other", visitors: 90, fill: "var(--color-other)" }, +] const chartConfig = { - visitors: { - label: "Visitors", - }, - chrome: { - label: "Chrome", - color: "hsl(var(--chart-1))", - }, - safari: { - label: "Safari", - color: "hsl(var(--chart-2))", - }, - firefox: { - label: "Firefox", - color: "hsl(var(--chart-3))", - }, - edge: { - label: "Edge", - color: "hsl(var(--chart-4))", - }, - other: { - label: "Other", - color: "hsl(var(--chart-5))", - }, -} satisfies ChartConfig; + visitors: { + label: "Visitors", + }, + chrome: { + label: "Chrome", + color: "hsl(var(--chart-1))", + }, + safari: { + label: "Safari", + color: "hsl(var(--chart-2))", + }, + firefox: { + label: "Firefox", + color: "hsl(var(--chart-3))", + }, + edge: { + label: "Edge", + color: "hsl(var(--chart-4))", + }, + other: { + label: "Other", + color: "hsl(var(--chart-5))", + }, +} satisfies ChartConfig const BarChartActive = () => { - return ( - - - Bar Chart- Active - January - June 2024 - - - -