diff --git a/.github/DISCUSSION_TEMPLATE/blocks-request.yml b/.github/DISCUSSION_TEMPLATE/blocks-request.yml new file mode 100644 index 00000000..d23ca304 --- /dev/null +++ b/.github/DISCUSSION_TEMPLATE/blocks-request.yml @@ -0,0 +1,25 @@ +title: "[blocks]: " +labels: ["Blocks Request"] +body: + - type: markdown + attributes: + value: | + ### Thanks for taking the time to create a block request! Please search open/closed requests before submitting, as the block or a similar one may have already been requested. + + - type: textarea + id: block-description + attributes: + label: Description + description: Tell us about your block request + placeholder: "A dashboard for an e-commerce website showing sales, orders, and customers..." + validations: + required: true + + - type: input + id: block-example-url + attributes: + label: Example + description: Link to an example of the block + placeholder: ex. https://example.com + validations: + required: false diff --git a/.github/workflows/code-check.yml b/.github/workflows/code-check.yml index c1435ba8..5d6ed986 100644 --- a/.github/workflows/code-check.yml +++ b/.github/workflows/code-check.yml @@ -5,9 +5,9 @@ on: branches: ["*"] jobs: - lint: + biome: runs-on: ubuntu-latest - name: pnpm lint + name: pnpm biome check steps: - uses: actions/checkout@v3 with: @@ -16,13 +16,13 @@ jobs: - name: Install Node.js uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 - uses: pnpm/action-setup@v4 name: Install pnpm id: pnpm-install with: - version: 9.4.0 + version: 9.0.6 run_install: false - name: Get pnpm store directory @@ -39,13 +39,49 @@ jobs: - name: Install dependencies run: pnpm install - - run: pnpm lint + - run: pnpm biome check + + format: + runs-on: ubuntu-latest + name: pnpm format:check + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 20 + + - uses: pnpm/action-setup@v4 + name: Install pnpm + id: pnpm-install + with: + version: 9.0.6 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - run: pnpm format:check tsc: runs-on: ubuntu-latest name: pnpm typecheck - env: - NEXT_PUBLIC_APP_URL: http://localhost:3001 steps: - uses: actions/checkout@v3 with: @@ -54,13 +90,13 @@ jobs: - name: Install Node.js uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 - uses: pnpm/action-setup@v4 name: Install pnpm id: pnpm-install with: - version: 9.4.0 + version: 9.0.6 run_install: false - name: Get pnpm store directory @@ -77,4 +113,7 @@ jobs: - name: Install dependencies run: pnpm install + - name: Build packages + run: pnpm --filter=shadcn build + - run: pnpm typecheck diff --git a/.npmrc b/.npmrc index 3e775efb..6613b112 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,2 @@ auto-install-peers=true +link-workspace-packages=true diff --git a/.vscode/settings.json b/.vscode/settings.json index 9f6832ff..47781c38 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,54 +1,43 @@ { + // Biome as default formatter for different file types + "[javascript]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[typescript]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[javascriptreact]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[typescriptreact]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[json]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[jsonc]": { + "editor.defaultFormatter": "biomejs.biome" + }, - // Disable the default formatter, use eslint instead - "prettier.enable": false, - "editor.formatOnSave": false, + // Automatic formatting on save + "editor.formatOnSave": true, - // Auto fix - "editor.codeActionsOnSave": { - "source.fixAll.eslint": "explicit", - "source.organizeImports": "never" - }, + // Automatic fixes on save + "editor.codeActionsOnSave": { + "quickfix.biome": "explicit", + "source.organizeImports.biome": "explicit" + }, - // Silent the stylistic rules in you IDE, but still auto fix them - "eslint.rules.customizations": [ - { "rule": "style/*", "severity": "warn" }, - { "rule": "format/*", "severity": "warn" }, - { "rule": "*-indent", "severity": "warn" }, - { "rule": "*-spacing", "severity": "warn" }, - { "rule": "*-spaces", "severity": "warn" }, - { "rule": "*-order", "severity": "warn" }, - { "rule": "*-dangle", "severity": "warn" }, - { "rule": "*-newline", "severity": "warn" }, - { "rule": "*quotes", "severity": "warn" }, - { "rule": "*semi", "severity": "warn" } - ], + // Optional: Experimental feature for renaming + "biome.rename": true, - // Enable eslint for all supported languages - "eslint.validate": [ - "javascript", - "javascriptreact", - "typescript", - "typescriptreact", - "vue", - "html", - "markdown", - "json", - "jsonc", - "yaml", - "toml", - "xml", - "gql", - "graphql", - "astro" - ], - "search.useIgnoreFiles": true, - "cSpell.words": [ - "customizer", - "dracula", - "occured", - "pullup", - "saas", - "shadcn" -] + "search.useIgnoreFiles": true, + "cSpell.words": [ + "customizer", + "dracula", + "occured", + "pullup", + "saas", + "shadcn" + ] } diff --git a/apps/web/__registry__/README.md b/apps/web/__registry__/README.md index 5621ceac..29d54812 100644 --- a/apps/web/__registry__/README.md +++ b/apps/web/__registry__/README.md @@ -1 +1 @@ -> Files inside this directory is autogenerated by `./scripts/build-registry.ts`. **Do not edit them manually.** - shadcn +> Files inside this directory is autogenerated by `./scripts/build-registry.ts`. **Do not edit them manually.** - nyxb diff --git a/apps/web/__registry__/default/block/_sink/page.tsx b/apps/web/__registry__/default/block/_sink/page.tsx index c572762c..8171ec76 100644 --- a/apps/web/__registry__/default/block/_sink/page.tsx +++ b/apps/web/__registry__/default/block/_sink/page.tsx @@ -1,64 +1,64 @@ -import { AccordionDemo } from '~/registry/default/block/_sink/components/accordion-demo' -import { AlertDemo } from '~/registry/default/block/_sink/components/alert-demo' -import { AlertDialogDemo } from '~/registry/default/block/_sink/components/alert-dialog-demo' -import { AppSidebar } from '~/registry/default/block/_sink/components/app-sidebar' -import { AspectRatioDemo } from '~/registry/default/block/_sink/components/aspect-ratio-demo' -import { AvatarDemo } from '~/registry/default/block/_sink/components/avatar-demo' -import { BadgeDemo } from '~/registry/default/block/_sink/components/badge-demo' -import { BadgeDestructive } from '~/registry/default/block/_sink/components/badge-destructive' -import { BadgeOutline } from '~/registry/default/block/_sink/components/badge-outline' -import { BadgeSecondary } from '~/registry/default/block/_sink/components/badge-secondary' -import { BreadcrumbDemo } from '~/registry/default/block/_sink/components/breadcrumb-demo' -import { ButtonDemo } from '~/registry/default/block/_sink/components/button-demo' -import { ButtonDestructive } from '~/registry/default/block/_sink/components/button-destructive' -import { ButtonGhost } from '~/registry/default/block/_sink/components/button-ghost' -import { ButtonLink } from '~/registry/default/block/_sink/components/button-link' -import { ButtonLoading } from '~/registry/default/block/_sink/components/button-loading' -import { ButtonOutline } from '~/registry/default/block/_sink/components/button-outline' -import { ButtonSecondary } from '~/registry/default/block/_sink/components/button-secondary' -import { ButtonWithIcon } from '~/registry/default/block/_sink/components/button-with-icon' -import { CalendarDemo } from '~/registry/default/block/_sink/components/calendar-demo' -import { CardDemo } from '~/registry/default/block/_sink/components/card-demo' -import { CarouselDemo } from '~/registry/default/block/_sink/components/carousel-demo' -import { CheckboxDemo } from '~/registry/default/block/_sink/components/checkbox-demo' -import { CollapsibleDemo } from '~/registry/default/block/_sink/components/collapsible-demo' -import { ComboboxDemo } from '~/registry/default/block/_sink/components/combobox-demo' -import { CommandDemo } from '~/registry/default/block/_sink/components/command-demo' -import { ComponentWrapper } from '~/registry/default/block/_sink/components/component-wrapper' -import { ContextMenuDemo } from '~/registry/default/block/_sink/components/context-menu-demo' -import { DatePickerDemo } from '~/registry/default/block/_sink/components/date-picker-demo' -import { DialogDemo } from '~/registry/default/block/_sink/components/dialog-demo' -import { DrawerDemo } from '~/registry/default/block/_sink/components/drawer-demo' -import { DropdownMenuDemo } from '~/registry/default/block/_sink/components/dropdown-menu-demo' -import { HoverCardDemo } from '~/registry/default/block/_sink/components/hover-card-demo' -import { InputDemo } from '~/registry/default/block/_sink/components/input-demo' -import { InputOTPDemo } from '~/registry/default/block/_sink/components/input-otp-demo' -import { LabelDemo } from '~/registry/default/block/_sink/components/label-demo' -import { MenubarDemo } from '~/registry/default/block/_sink/components/menubar-demo' -import { NavigationMenuDemo } from '~/registry/default/block/_sink/components/navigation-menu-demo' -import { PaginationDemo } from '~/registry/default/block/_sink/components/pagination-demo' -import { PopoverDemo } from '~/registry/default/block/_sink/components/popover-demo' -import { ProgressDemo } from '~/registry/default/block/_sink/components/progress-demo' -import { RadioGroupDemo } from '~/registry/default/block/_sink/components/radio-group-demo' -import { ResizableHandleDemo } from '~/registry/default/block/_sink/components/resizable-handle' -import { ScrollAreaDemo } from '~/registry/default/block/_sink/components/scroll-area-demo' -import { SelectDemo } from '~/registry/default/block/_sink/components/select-demo' -import { SeparatorDemo } from '~/registry/default/block/_sink/components/separator-demo' -import { SheetDemo } from '~/registry/default/block/_sink/components/sheet-demo' -import { SkeletonDemo } from '~/registry/default/block/_sink/components/skeleton-demo' -import { SliderDemo } from '~/registry/default/block/_sink/components/slider-demo' -import { SonnerDemo } from '~/registry/default/block/_sink/components/sonner-demo' -import { SwitchDemo } from '~/registry/default/block/_sink/components/switch-demo' -import { TableDemo } from '~/registry/default/block/_sink/components/table-demo' -import { TabsDemo } from '~/registry/default/block/_sink/components/tabs-demo' -import { TextareaDemo } from '~/registry/default/block/_sink/components/textarea-demo' -import { ToastDemo } from '~/registry/default/block/_sink/components/toast-demo' -import { ToggleDemo } from '~/registry/default/block/_sink/components/toggle-demo' -import { ToggleDisabled } from '~/registry/default/block/_sink/components/toggle-disabled' -import { ToggleGroupDemo } from '~/registry/default/block/_sink/components/toggle-group-demo' -import { ToggleOutline } from '~/registry/default/block/_sink/components/toggle-outline' -import { ToggleWithText } from '~/registry/default/block/_sink/components/toggle-with-text' -import { TooltipDemo } from '~/registry/default/block/_sink/components/tooltip-demo' +import { AccordionDemo } from "~/registry/default/block/_sink/components/accordion-demo" +import { AlertDemo } from "~/registry/default/block/_sink/components/alert-demo" +import { AlertDialogDemo } from "~/registry/default/block/_sink/components/alert-dialog-demo" +import { AppSidebar } from "~/registry/default/block/_sink/components/app-sidebar" +import { AspectRatioDemo } from "~/registry/default/block/_sink/components/aspect-ratio-demo" +import { AvatarDemo } from "~/registry/default/block/_sink/components/avatar-demo" +import { BadgeDemo } from "~/registry/default/block/_sink/components/badge-demo" +import { BadgeDestructive } from "~/registry/default/block/_sink/components/badge-destructive" +import { BadgeOutline } from "~/registry/default/block/_sink/components/badge-outline" +import { BadgeSecondary } from "~/registry/default/block/_sink/components/badge-secondary" +import { BreadcrumbDemo } from "~/registry/default/block/_sink/components/breadcrumb-demo" +import { ButtonDemo } from "~/registry/default/block/_sink/components/button-demo" +import { ButtonDestructive } from "~/registry/default/block/_sink/components/button-destructive" +import { ButtonGhost } from "~/registry/default/block/_sink/components/button-ghost" +import { ButtonLink } from "~/registry/default/block/_sink/components/button-link" +import { ButtonLoading } from "~/registry/default/block/_sink/components/button-loading" +import { ButtonOutline } from "~/registry/default/block/_sink/components/button-outline" +import { ButtonSecondary } from "~/registry/default/block/_sink/components/button-secondary" +import { ButtonWithIcon } from "~/registry/default/block/_sink/components/button-with-icon" +import { CalendarDemo } from "~/registry/default/block/_sink/components/calendar-demo" +import { CardDemo } from "~/registry/default/block/_sink/components/card-demo" +import { CarouselDemo } from "~/registry/default/block/_sink/components/carousel-demo" +import { CheckboxDemo } from "~/registry/default/block/_sink/components/checkbox-demo" +import { CollapsibleDemo } from "~/registry/default/block/_sink/components/collapsible-demo" +import { ComboboxDemo } from "~/registry/default/block/_sink/components/combobox-demo" +import { CommandDemo } from "~/registry/default/block/_sink/components/command-demo" +import { ComponentWrapper } from "~/registry/default/block/_sink/components/component-wrapper" +import { ContextMenuDemo } from "~/registry/default/block/_sink/components/context-menu-demo" +import { DatePickerDemo } from "~/registry/default/block/_sink/components/date-picker-demo" +import { DialogDemo } from "~/registry/default/block/_sink/components/dialog-demo" +import { DrawerDemo } from "~/registry/default/block/_sink/components/drawer-demo" +import { DropdownMenuDemo } from "~/registry/default/block/_sink/components/dropdown-menu-demo" +import { HoverCardDemo } from "~/registry/default/block/_sink/components/hover-card-demo" +import { InputDemo } from "~/registry/default/block/_sink/components/input-demo" +import { InputOTPDemo } from "~/registry/default/block/_sink/components/input-otp-demo" +import { LabelDemo } from "~/registry/default/block/_sink/components/label-demo" +import { MenubarDemo } from "~/registry/default/block/_sink/components/menubar-demo" +import { NavigationMenuDemo } from "~/registry/default/block/_sink/components/navigation-menu-demo" +import { PaginationDemo } from "~/registry/default/block/_sink/components/pagination-demo" +import { PopoverDemo } from "~/registry/default/block/_sink/components/popover-demo" +import { ProgressDemo } from "~/registry/default/block/_sink/components/progress-demo" +import { RadioGroupDemo } from "~/registry/default/block/_sink/components/radio-group-demo" +import { ResizableHandleDemo } from "~/registry/default/block/_sink/components/resizable-handle" +import { ScrollAreaDemo } from "~/registry/default/block/_sink/components/scroll-area-demo" +import { SelectDemo } from "~/registry/default/block/_sink/components/select-demo" +import { SeparatorDemo } from "~/registry/default/block/_sink/components/separator-demo" +import { SheetDemo } from "~/registry/default/block/_sink/components/sheet-demo" +import { SkeletonDemo } from "~/registry/default/block/_sink/components/skeleton-demo" +import { SliderDemo } from "~/registry/default/block/_sink/components/slider-demo" +import { SonnerDemo } from "~/registry/default/block/_sink/components/sonner-demo" +import { SwitchDemo } from "~/registry/default/block/_sink/components/switch-demo" +import { TableDemo } from "~/registry/default/block/_sink/components/table-demo" +import { TabsDemo } from "~/registry/default/block/_sink/components/tabs-demo" +import { TextareaDemo } from "~/registry/default/block/_sink/components/textarea-demo" +import { ToastDemo } from "~/registry/default/block/_sink/components/toast-demo" +import { ToggleDemo } from "~/registry/default/block/_sink/components/toggle-demo" +import { ToggleDisabled } from "~/registry/default/block/_sink/components/toggle-disabled" +import { ToggleGroupDemo } from "~/registry/default/block/_sink/components/toggle-group-demo" +import { ToggleOutline } from "~/registry/default/block/_sink/components/toggle-outline" +import { ToggleWithText } from "~/registry/default/block/_sink/components/toggle-with-text" +import { TooltipDemo } from "~/registry/default/block/_sink/components/tooltip-demo" import { Breadcrumb, BreadcrumbItem, @@ -66,13 +66,13 @@ import { BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, -} from '~/registry/default/ui/breadcrumb' -import { Separator } from '~/registry/default/ui/separator' +} from "~/registry/default/ui/breadcrumb" +import { Separator } from "~/registry/default/ui/separator" import { SidebarInset, SidebarProvider, SidebarTrigger, -} from '~/registry/default/ui/sidebar' +} from "~/registry/default/ui/sidebar" export default function SinkPage() { return ( @@ -197,7 +197,10 @@ export default function SinkPage() { - + diff --git a/apps/web/__registry__/default/block/authentication-01.tsx b/apps/web/__registry__/default/block/authentication-01.tsx index faf4c266..a9c656d4 100644 --- a/apps/web/__registry__/default/block/authentication-01.tsx +++ b/apps/web/__registry__/default/block/authentication-01.tsx @@ -1,4 +1,4 @@ -import { Button } from '~/registry/default/ui/button' +import { Button } from "~/registry/default/ui/button" import { Card, CardContent, @@ -6,17 +6,17 @@ import { CardFooter, CardHeader, CardTitle, -} from '~/registry/default/ui/card' -import { Input } from '~/registry/default/ui/input' -import { Label } from '~/registry/default/ui/label' +} from "~/registry/default/ui/card" +import { Input } from "~/registry/default/ui/input" +import { Label } from "~/registry/default/ui/label" -export const description - = 'A simple login form with email and password. The submit button says \'Sign in\'.' +export const description = + "A simple login form with email and password. The submit button says 'Sign in'." -export const iframeHeight = '600px' +export const iframeHeight = "600px" -export const containerClassName - = 'w-full h-screen flex items-center justify-center px-4' +export const containerClassName = + "w-full h-screen flex items-center justify-center px-4" export default function LoginForm() { return ( @@ -30,7 +30,12 @@ export default function LoginForm() {
- +
diff --git a/apps/web/__registry__/default/block/authentication-02.tsx b/apps/web/__registry__/default/block/authentication-02.tsx index 07ac9580..7511dc80 100644 --- a/apps/web/__registry__/default/block/authentication-02.tsx +++ b/apps/web/__registry__/default/block/authentication-02.tsx @@ -1,23 +1,23 @@ -import Link from 'next/link' +import Link from "next/link" -import { Button } from '~/registry/default/ui/button' +import { Button } from "~/registry/default/ui/button" import { Card, CardContent, CardDescription, CardHeader, CardTitle, -} from '~/registry/default/ui/card' -import { Input } from '~/registry/default/ui/input' -import { Label } from '~/registry/default/ui/label' +} from "~/registry/default/ui/card" +import { Input } from "~/registry/default/ui/input" +import { Label } from "~/registry/default/ui/label" -export const description - = 'A login form with email and password. There\'s an option to login with Google and a link to sign up if you don\'t have an account.' +export const description = + "A login form with email and password. There's an option to login with Google and a link to sign up if you don't have an account." -export const iframeHeight = '600px' +export const iframeHeight = "600px" -export const containerClassName - = 'w-full h-screen flex items-center justify-center px-4' +export const containerClassName = + "w-full h-screen flex items-center justify-center px-4" export default function LoginForm() { return ( @@ -42,7 +42,10 @@ export default function LoginForm() {
- + Forgot your password?
@@ -56,8 +59,7 @@ export default function LoginForm() {
- Don't have an account? - {' '} + Don't have an account?{" "} Sign up diff --git a/apps/web/__registry__/default/block/authentication-03.tsx b/apps/web/__registry__/default/block/authentication-03.tsx index f2f880f1..0f373665 100644 --- a/apps/web/__registry__/default/block/authentication-03.tsx +++ b/apps/web/__registry__/default/block/authentication-03.tsx @@ -1,23 +1,23 @@ -import Link from 'next/link' +import Link from "next/link" -import { Button } from '~/registry/default/ui/button' +import { Button } from "~/registry/default/ui/button" import { Card, CardContent, CardDescription, CardHeader, CardTitle, -} from '~/registry/default/ui/card' -import { Input } from '~/registry/default/ui/input' -import { Label } from '~/registry/default/ui/label' +} from "~/registry/default/ui/card" +import { Input } from "~/registry/default/ui/input" +import { Label } from "~/registry/default/ui/label" -export const description - = 'A sign up form with first name, last name, email and password inside a card. There\'s an option to sign up with GitHub and a link to login if you already have an account' +export const description = + "A sign up form with first name, last name, email and password inside a card. There's an option to sign up with GitHub and a link to login if you already have an account" -export const iframeHeight = '600px' +export const iframeHeight = "600px" -export const containerClassName - = 'w-full h-screen flex items-center justify-center px-4' +export const containerClassName = + "w-full h-screen flex items-center justify-center px-4" export default function LoginForm() { return ( @@ -61,8 +61,7 @@ export default function LoginForm() {
- Already have an account? - {' '} + Already have an account?{" "} Sign in diff --git a/apps/web/__registry__/default/block/authentication-04.tsx b/apps/web/__registry__/default/block/authentication-04.tsx index 0817239f..73bf4709 100644 --- a/apps/web/__registry__/default/block/authentication-04.tsx +++ b/apps/web/__registry__/default/block/authentication-04.tsx @@ -1,16 +1,16 @@ -import Image from 'next/image' -import Link from 'next/link' +import Image from "next/image" +import Link from "next/link" -import { Button } from '~/registry/default/ui/button' -import { Input } from '~/registry/default/ui/input' -import { Label } from '~/registry/default/ui/label' +import { Button } from "~/registry/default/ui/button" +import { Input } from "~/registry/default/ui/input" +import { Label } from "~/registry/default/ui/label" -export const description - = 'A login page with two columns. The first column has the login form with email and password. There\'s a Forgot your passwork link and a link to sign up if you do not have an account. The second column has a cover image.' +export const description = + "A login page with two columns. The first column has the login form with email and password. There's a Forgot your passwork link and a link to sign up if you do not have an account. The second column has a cover image." -export const iframeHeight = '800px' +export const iframeHeight = "800px" -export const containerClassName = 'w-full h-full p-4 lg:p-0' +export const containerClassName = "w-full h-full p-4 lg:p-0" export default function Dashboard() { return ( @@ -53,8 +53,7 @@ export default function Dashboard() {
- Don't have an account? - {' '} + Don't have an account?{" "} Sign up diff --git a/apps/web/__registry__/default/block/chart-area-axes.tsx b/apps/web/__registry__/default/block/chart-area-axes.tsx index 47364aac..a4e9ba50 100644 --- a/apps/web/__registry__/default/block/chart-area-axes.tsx +++ b/apps/web/__registry__/default/block/chart-area-axes.tsx @@ -1,7 +1,7 @@ -'use client' +"use client" -import { TrendingUp } from 'lucide-react' -import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from 'recharts' +import { TrendingUp } from "lucide-react" +import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from "recharts" import { Card, @@ -10,35 +10,33 @@ import { CardFooter, CardHeader, CardTitle, -} from '~/registry/default/ui/card' -import type { - ChartConfig, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/card" +import type { ChartConfig } from "~/registry/default/ui/chart" import { ChartContainer, ChartTooltip, ChartTooltipContent, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/chart" -export const description = 'An area chart with axes' +export const description = "An area chart with axes" const chartData = [ - { 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))', + label: "Desktop", + color: "hsl(var(--chart-1))", }, mobile: { - label: 'Mobile', - color: 'hsl(var(--chart-2))', + label: "Mobile", + color: "hsl(var(--chart-2))", }, } satisfies ChartConfig @@ -67,7 +65,7 @@ export default function Component() { tickLine={false} axisLine={false} tickMargin={8} - tickFormatter={value => value.slice(0, 3)} + tickFormatter={(value) => value.slice(0, 3)} /> - } /> + } + />
- Trending up by 5.2% this month - {' '} + Trending up by 5.2% this month{" "}
diff --git a/apps/web/__registry__/default/block/chart-area-default.tsx b/apps/web/__registry__/default/block/chart-area-default.tsx index 948ae8b1..6b744a14 100644 --- a/apps/web/__registry__/default/block/chart-area-default.tsx +++ b/apps/web/__registry__/default/block/chart-area-default.tsx @@ -1,7 +1,7 @@ -'use client' +"use client" -import { TrendingUp } from 'lucide-react' -import { Area, AreaChart, CartesianGrid, XAxis } from 'recharts' +import { TrendingUp } from "lucide-react" +import { Area, AreaChart, CartesianGrid, XAxis } from "recharts" import { Card, @@ -10,31 +10,29 @@ import { CardFooter, CardHeader, CardTitle, -} from '~/registry/default/ui/card' -import type { - ChartConfig, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/card" +import type { ChartConfig } from "~/registry/default/ui/chart" import { ChartContainer, ChartTooltip, ChartTooltipContent, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/chart" -export const description = 'A simple area chart' +export const description = "A simple area chart" const chartData = [ - { 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))', + label: "Desktop", + color: "hsl(var(--chart-1))", }, } satisfies ChartConfig @@ -63,7 +61,7 @@ export default function Component() { tickLine={false} axisLine={false} tickMargin={8} - tickFormatter={value => value.slice(0, 3)} + tickFormatter={(value) => value.slice(0, 3)} />
- Trending up by 5.2% this month - {' '} + Trending up by 5.2% this month{" "}
diff --git a/apps/web/__registry__/default/block/chart-area-gradient.tsx b/apps/web/__registry__/default/block/chart-area-gradient.tsx index 8b50e75f..dfe24a03 100644 --- a/apps/web/__registry__/default/block/chart-area-gradient.tsx +++ b/apps/web/__registry__/default/block/chart-area-gradient.tsx @@ -1,7 +1,7 @@ -'use client' +"use client" -import { TrendingUp } from 'lucide-react' -import { Area, AreaChart, CartesianGrid, XAxis } from 'recharts' +import { TrendingUp } from "lucide-react" +import { Area, AreaChart, CartesianGrid, XAxis } from "recharts" import { Card, @@ -10,35 +10,33 @@ import { CardFooter, CardHeader, CardTitle, -} from '~/registry/default/ui/card' -import type { - ChartConfig, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/card" +import type { ChartConfig } from "~/registry/default/ui/chart" import { ChartContainer, ChartTooltip, ChartTooltipContent, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/chart" -export const description = 'An area chart with gradient fill' +export const description = "An area chart with gradient fill" const chartData = [ - { 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))', + label: "Desktop", + color: "hsl(var(--chart-1))", }, mobile: { - label: 'Mobile', - color: 'hsl(var(--chart-2))', + label: "Mobile", + color: "hsl(var(--chart-2))", }, } satisfies ChartConfig @@ -67,11 +65,20 @@ export default function Component() { tickLine={false} axisLine={false} tickMargin={8} - tickFormatter={value => value.slice(0, 3)} + tickFormatter={(value) => value.slice(0, 3)} + /> + } /> - } /> - + - +
- Trending up by 5.2% this month - {' '} + Trending up by 5.2% this month{" "}
diff --git a/apps/web/__registry__/default/block/chart-area-icons.tsx b/apps/web/__registry__/default/block/chart-area-icons.tsx index 8dc41fa8..690c9342 100644 --- a/apps/web/__registry__/default/block/chart-area-icons.tsx +++ b/apps/web/__registry__/default/block/chart-area-icons.tsx @@ -1,7 +1,7 @@ -'use client' +"use client" -import { TrendingDown, TrendingUp } from 'lucide-react' -import { Area, AreaChart, CartesianGrid, XAxis } from 'recharts' +import { TrendingDown, TrendingUp } from "lucide-react" +import { Area, AreaChart, CartesianGrid, XAxis } from "recharts" import { Card, @@ -10,38 +10,36 @@ import { CardFooter, CardHeader, CardTitle, -} from '~/registry/default/ui/card' -import type { - ChartConfig, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/card" +import type { ChartConfig } from "~/registry/default/ui/chart" import { ChartContainer, ChartLegend, ChartLegendContent, ChartTooltip, ChartTooltipContent, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/chart" -export const description = 'An area chart with icons' +export const description = "An area chart with icons" const chartData = [ - { 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))', + label: "Desktop", + color: "hsl(var(--chart-1))", icon: TrendingDown, }, mobile: { - label: 'Mobile', - color: 'hsl(var(--chart-2))', + label: "Mobile", + color: "hsl(var(--chart-2))", icon: TrendingUp, }, } satisfies ChartConfig @@ -71,7 +69,7 @@ export default function Component() { tickLine={false} axisLine={false} tickMargin={8} - tickFormatter={value => value.slice(0, 3)} + tickFormatter={(value) => value.slice(0, 3)} />
- Trending up by 5.2% this month - {' '} + Trending up by 5.2% this month{" "}
diff --git a/apps/web/__registry__/default/block/chart-area-interactive.tsx b/apps/web/__registry__/default/block/chart-area-interactive.tsx index 779569b6..2b90917f 100644 --- a/apps/web/__registry__/default/block/chart-area-interactive.tsx +++ b/apps/web/__registry__/default/block/chart-area-interactive.tsx @@ -1,7 +1,7 @@ -'use client' +"use client" -import * as React from 'react' -import { Area, AreaChart, CartesianGrid, XAxis } from 'recharts' +import * as React from "react" +import { Area, AreaChart, CartesianGrid, XAxis } from "recharts" import { Card, @@ -9,146 +9,143 @@ import { CardDescription, CardHeader, CardTitle, -} from '~/registry/default/ui/card' -import type { - ChartConfig, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/card" +import type { ChartConfig } from "~/registry/default/ui/chart" import { ChartContainer, ChartLegend, ChartLegendContent, ChartTooltip, ChartTooltipContent, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/chart" import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, -} from '~/registry/default/ui/select' +} from "~/registry/default/ui/select" -export const description = 'An interactive area chart' +export const description = "An interactive area chart" const chartData = [ - { 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 = { visitors: { - label: 'Visitors', + label: "Visitors", }, desktop: { - label: 'Desktop', - color: 'hsl(var(--chart-1))', + label: "Desktop", + color: "hsl(var(--chart-1))", }, mobile: { - label: 'Mobile', - color: 'hsl(var(--chart-2))', + label: "Mobile", + color: "hsl(var(--chart-2))", }, } satisfies ChartConfig export default function Component() { - const [timeRange, setTimeRange] = React.useState('90d') + const [timeRange, setTimeRange] = React.useState("90d") const filteredData = chartData.filter((item) => { const date = new Date(item.date) const now = new Date() let daysToSubtract = 90 - if (timeRange === '30d') { + if (timeRange === "30d") { daysToSubtract = 30 - } - else if (timeRange === '7d') { + } else if (timeRange === "7d") { daysToSubtract = 7 } now.setDate(now.getDate() - daysToSubtract) @@ -191,7 +188,13 @@ export default function Component() { > - + - + { const date = new Date(value) - return date.toLocaleDateString('en-US', { - month: 'short', - day: 'numeric', + return date.toLocaleDateString("en-US", { + month: "short", + day: "numeric", }) }} /> { - return new Date(value).toLocaleDateString('en-US', { - month: 'short', - day: 'numeric', - }) + return new Date(value).toLocaleDateString( + "en-US", + { + month: "short", + day: "numeric", + }, + ) }} indicator="dot" /> - )} + } /> value.slice(0, 3)} + tickFormatter={(value) => value.slice(0, 3)} />
- Trending up by 5.2% this month - {' '} + Trending up by 5.2% this month{" "}
diff --git a/apps/web/__registry__/default/block/chart-area-linear.tsx b/apps/web/__registry__/default/block/chart-area-linear.tsx index ac0533c9..420fb965 100644 --- a/apps/web/__registry__/default/block/chart-area-linear.tsx +++ b/apps/web/__registry__/default/block/chart-area-linear.tsx @@ -1,7 +1,7 @@ -'use client' +"use client" -import { TrendingUp } from 'lucide-react' -import { Area, AreaChart, CartesianGrid, XAxis } from 'recharts' +import { TrendingUp } from "lucide-react" +import { Area, AreaChart, CartesianGrid, XAxis } from "recharts" import { Card, @@ -10,31 +10,29 @@ import { CardFooter, CardHeader, CardTitle, -} from '~/registry/default/ui/card' -import type { - ChartConfig, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/card" +import type { ChartConfig } from "~/registry/default/ui/chart" import { ChartContainer, ChartTooltip, ChartTooltipContent, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/chart" -export const description = 'A linear area chart' +export const description = "A linear area chart" const chartData = [ - { 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))', + label: "Desktop", + color: "hsl(var(--chart-1))", }, } satisfies ChartConfig @@ -63,7 +61,7 @@ export default function Component() { tickLine={false} axisLine={false} tickMargin={8} - tickFormatter={value => value.slice(0, 3)} + tickFormatter={(value) => value.slice(0, 3)} />
- Trending up by 5.2% this month - {' '} + Trending up by 5.2% this month{" "}
diff --git a/apps/web/__registry__/default/block/chart-area-stacked-expand.tsx b/apps/web/__registry__/default/block/chart-area-stacked-expand.tsx index 51a62bac..8254f759 100644 --- a/apps/web/__registry__/default/block/chart-area-stacked-expand.tsx +++ b/apps/web/__registry__/default/block/chart-area-stacked-expand.tsx @@ -1,7 +1,7 @@ -'use client' +"use client" -import { TrendingUp } from 'lucide-react' -import { Area, AreaChart, CartesianGrid, XAxis } from 'recharts' +import { TrendingUp } from "lucide-react" +import { Area, AreaChart, CartesianGrid, XAxis } from "recharts" import { Card, @@ -10,39 +10,37 @@ import { CardFooter, CardHeader, CardTitle, -} from '~/registry/default/ui/card' -import type { - ChartConfig, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/card" +import type { ChartConfig } from "~/registry/default/ui/chart" import { ChartContainer, ChartTooltip, ChartTooltipContent, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/chart" -export const description = 'A stacked area chart with expand stacking' +export const description = "A stacked area chart with expand stacking" const chartData = [ - { month: 'January', desktop: 186, mobile: 80, other: 45 }, - { month: 'February', desktop: 305, mobile: 200, other: 100 }, - { month: 'March', desktop: 237, mobile: 120, other: 150 }, - { month: 'April', desktop: 73, mobile: 190, other: 50 }, - { month: 'May', desktop: 209, mobile: 130, other: 100 }, - { month: 'June', desktop: 214, mobile: 140, other: 160 }, + { month: "January", desktop: 186, mobile: 80, other: 45 }, + { month: "February", desktop: 305, mobile: 200, other: 100 }, + { month: "March", desktop: 237, mobile: 120, other: 150 }, + { month: "April", desktop: 73, mobile: 190, other: 50 }, + { month: "May", desktop: 209, mobile: 130, other: 100 }, + { month: "June", desktop: 214, mobile: 140, other: 160 }, ] const chartConfig = { desktop: { - label: 'Desktop', - color: 'hsl(var(--chart-1))', + label: "Desktop", + color: "hsl(var(--chart-1))", }, mobile: { - label: 'Mobile', - color: 'hsl(var(--chart-2))', + label: "Mobile", + color: "hsl(var(--chart-2))", }, other: { - label: 'Other', - color: 'hsl(var(--chart-3))', + label: "Other", + color: "hsl(var(--chart-3))", }, } satisfies ChartConfig @@ -73,7 +71,7 @@ export default function Component() { tickLine={false} axisLine={false} tickMargin={8} - tickFormatter={value => value.slice(0, 3)} + tickFormatter={(value) => value.slice(0, 3)} />
- Trending up by 5.2% this month - {' '} + Trending up by 5.2% this month{" "}
diff --git a/apps/web/__registry__/default/block/chart-area-stacked.tsx b/apps/web/__registry__/default/block/chart-area-stacked.tsx index 3e34b73d..e6c3f80e 100644 --- a/apps/web/__registry__/default/block/chart-area-stacked.tsx +++ b/apps/web/__registry__/default/block/chart-area-stacked.tsx @@ -1,7 +1,7 @@ -'use client' +"use client" -import { TrendingUp } from 'lucide-react' -import { Area, AreaChart, CartesianGrid, XAxis } from 'recharts' +import { TrendingUp } from "lucide-react" +import { Area, AreaChart, CartesianGrid, XAxis } from "recharts" import { Card, @@ -10,35 +10,33 @@ import { CardFooter, CardHeader, CardTitle, -} from '~/registry/default/ui/card' -import type { - ChartConfig, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/card" +import type { ChartConfig } from "~/registry/default/ui/chart" import { ChartContainer, ChartTooltip, ChartTooltipContent, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/chart" -export const description = 'A stacked area chart' +export const description = "A stacked area chart" const chartData = [ - { 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))', + label: "Desktop", + color: "hsl(var(--chart-1))", }, mobile: { - label: 'Mobile', - color: 'hsl(var(--chart-2))', + label: "Mobile", + color: "hsl(var(--chart-2))", }, } satisfies ChartConfig @@ -67,7 +65,7 @@ export default function Component() { tickLine={false} axisLine={false} tickMargin={8} - tickFormatter={value => value.slice(0, 3)} + tickFormatter={(value) => value.slice(0, 3)} />
- Trending up by 5.2% this month - {' '} + Trending up by 5.2% this month{" "}
diff --git a/apps/web/__registry__/default/block/chart-area-step.tsx b/apps/web/__registry__/default/block/chart-area-step.tsx index 2a51cd45..846e53b0 100644 --- a/apps/web/__registry__/default/block/chart-area-step.tsx +++ b/apps/web/__registry__/default/block/chart-area-step.tsx @@ -1,7 +1,7 @@ -'use client' +"use client" -import { Activity, TrendingUp } from 'lucide-react' -import { Area, AreaChart, CartesianGrid, XAxis } from 'recharts' +import { Activity, TrendingUp } from "lucide-react" +import { Area, AreaChart, CartesianGrid, XAxis } from "recharts" import { Card, @@ -10,31 +10,29 @@ import { CardFooter, CardHeader, CardTitle, -} from '~/registry/default/ui/card' -import type { - ChartConfig, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/card" +import type { ChartConfig } from "~/registry/default/ui/chart" import { ChartContainer, ChartTooltip, ChartTooltipContent, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/chart" -export const description = 'A step area chart' +export const description = "A step area chart" const chartData = [ - { 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))', + label: "Desktop", + color: "hsl(var(--chart-1))", icon: Activity, }, } satisfies ChartConfig @@ -64,7 +62,7 @@ export default function Component() { tickLine={false} axisLine={false} tickMargin={8} - tickFormatter={value => value.slice(0, 3)} + tickFormatter={(value) => value.slice(0, 3)} />
- Trending up by 5.2% this month - {' '} + Trending up by 5.2% this month{" "}
diff --git a/apps/web/__registry__/default/block/chart-bar-active.tsx b/apps/web/__registry__/default/block/chart-bar-active.tsx index 037029db..e1425973 100644 --- a/apps/web/__registry__/default/block/chart-bar-active.tsx +++ b/apps/web/__registry__/default/block/chart-bar-active.tsx @@ -1,7 +1,7 @@ -'use client' +"use client" -import { TrendingUp } from 'lucide-react' -import { Bar, BarChart, CartesianGrid, Rectangle, XAxis } from 'recharts' +import { TrendingUp } from "lucide-react" +import { Bar, BarChart, CartesianGrid, Rectangle, XAxis } from "recharts" import { Card, @@ -10,49 +10,47 @@ import { CardFooter, CardHeader, CardTitle, -} from '~/registry/default/ui/card' -import type { - ChartConfig, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/card" +import type { ChartConfig } from "~/registry/default/ui/chart" import { ChartContainer, ChartTooltip, ChartTooltipContent, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/chart" -export const description = 'A bar chart with an active bar' +export const description = "A bar chart with an active bar" const chartData = [ - { 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', + label: "Visitors", }, chrome: { - label: 'Chrome', - color: 'hsl(var(--chart-1))', + label: "Chrome", + color: "hsl(var(--chart-1))", }, safari: { - label: 'Safari', - color: 'hsl(var(--chart-2))', + label: "Safari", + color: "hsl(var(--chart-2))", }, firefox: { - label: 'Firefox', - color: 'hsl(var(--chart-3))', + label: "Firefox", + color: "hsl(var(--chart-3))", }, edge: { - label: 'Edge', - color: 'hsl(var(--chart-4))', + label: "Edge", + color: "hsl(var(--chart-4))", }, other: { - label: 'Other', - color: 'hsl(var(--chart-5))', + label: "Other", + color: "hsl(var(--chart-5))", }, } satisfies ChartConfig @@ -72,8 +70,9 @@ export default function Component() { tickLine={false} tickMargin={10} axisLine={false} - tickFormatter={value => - chartConfig[value as keyof typeof chartConfig]?.label} + tickFormatter={(value) => + chartConfig[value as keyof typeof chartConfig]?.label + } />
- Trending up by 5.2% this month - {' '} - + Trending up by 5.2% this month
Showing total visitors for the last 6 months diff --git a/apps/web/__registry__/default/block/chart-bar-default.tsx b/apps/web/__registry__/default/block/chart-bar-default.tsx index 49330679..53ff48e4 100644 --- a/apps/web/__registry__/default/block/chart-bar-default.tsx +++ b/apps/web/__registry__/default/block/chart-bar-default.tsx @@ -1,7 +1,7 @@ -'use client' +"use client" -import { TrendingUp } from 'lucide-react' -import { Bar, BarChart, CartesianGrid, XAxis } from 'recharts' +import { TrendingUp } from "lucide-react" +import { Bar, BarChart, CartesianGrid, XAxis } from "recharts" import { Card, @@ -10,31 +10,29 @@ import { CardFooter, CardHeader, CardTitle, -} from '~/registry/default/ui/card' -import type { - ChartConfig, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/card" +import type { ChartConfig } from "~/registry/default/ui/chart" import { ChartContainer, ChartTooltip, ChartTooltipContent, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/chart" -export const description = 'A bar chart' +export const description = "A bar chart" const chartData = [ - { 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))', + label: "Desktop", + color: "hsl(var(--chart-1))", }, } satisfies ChartConfig @@ -54,21 +52,23 @@ export default function Component() { tickLine={false} tickMargin={10} axisLine={false} - tickFormatter={value => value.slice(0, 3)} + tickFormatter={(value) => value.slice(0, 3)} /> } /> - +
- Trending up by 5.2% this month - {' '} - + Trending up by 5.2% this month
Showing total visitors for the last 6 months diff --git a/apps/web/__registry__/default/block/chart-bar-horizontal.tsx b/apps/web/__registry__/default/block/chart-bar-horizontal.tsx index 144ef997..efb45344 100644 --- a/apps/web/__registry__/default/block/chart-bar-horizontal.tsx +++ b/apps/web/__registry__/default/block/chart-bar-horizontal.tsx @@ -1,7 +1,7 @@ -'use client' +"use client" -import { TrendingUp } from 'lucide-react' -import { Bar, BarChart, XAxis, YAxis } from 'recharts' +import { TrendingUp } from "lucide-react" +import { Bar, BarChart, XAxis, YAxis } from "recharts" import { Card, @@ -10,31 +10,29 @@ import { CardFooter, CardHeader, CardTitle, -} from '~/registry/default/ui/card' -import type { - ChartConfig, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/card" +import type { ChartConfig } from "~/registry/default/ui/chart" import { ChartContainer, ChartTooltip, ChartTooltipContent, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/chart" -export const description = 'A horizontal bar chart' +export const description = "A horizontal bar chart" const chartData = [ - { 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))', + label: "Desktop", + color: "hsl(var(--chart-1))", }, } satisfies ChartConfig @@ -62,21 +60,23 @@ export default function Component() { tickLine={false} tickMargin={10} axisLine={false} - tickFormatter={value => value.slice(0, 3)} + tickFormatter={(value) => value.slice(0, 3)} /> } /> - +
- Trending up by 5.2% this month - {' '} - + Trending up by 5.2% this month
Showing total visitors for the last 6 months diff --git a/apps/web/__registry__/default/block/chart-bar-interactive.tsx b/apps/web/__registry__/default/block/chart-bar-interactive.tsx index d86ee682..50b043a0 100644 --- a/apps/web/__registry__/default/block/chart-bar-interactive.tsx +++ b/apps/web/__registry__/default/block/chart-bar-interactive.tsx @@ -1,7 +1,7 @@ -'use client' +"use client" -import * as React from 'react' -import { Bar, BarChart, CartesianGrid, XAxis } from 'recharts' +import * as React from "react" +import { Bar, BarChart, CartesianGrid, XAxis } from "recharts" import { Card, @@ -9,129 +9,127 @@ import { CardDescription, CardHeader, CardTitle, -} from '~/registry/default/ui/card' -import type { - ChartConfig, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/card" +import type { ChartConfig } from "~/registry/default/ui/chart" import { ChartContainer, ChartTooltip, ChartTooltipContent, -} from '~/registry/default/ui/chart' +} from "~/registry/default/ui/chart" -export const description = 'An interactive bar chart' +export const description = "An interactive bar chart" const chartData = [ - { 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 = { views: { - label: 'Page Views', + label: "Page Views", }, desktop: { - label: 'Desktop', - color: 'hsl(var(--chart-1))', + label: "Desktop", + color: "hsl(var(--chart-1))", }, mobile: { - label: 'Mobile', - color: 'hsl(var(--chart-2))', + label: "Mobile", + color: "hsl(var(--chart-2))", }, } satisfies ChartConfig export default function Component() { - const [activeChart, setActiveChart] - = React.useState('desktop') + const [activeChart, setActiveChart] = + React.useState("desktop") const total = React.useMemo( () => ({ @@ -151,7 +149,7 @@ export default function Component() {
- {['desktop', 'mobile'].map((key) => { + {["desktop", "mobile"].map((key) => { const chart = key as keyof typeof chartConfig return ( @@ -205,7 +209,9 @@ export default function Dashboard() { - Sales + + Sales + @@ -217,7 +223,9 @@ export default function Dashboard() { - Active Now + + Active Now + @@ -229,9 +237,7 @@ export default function Dashboard() {
- +
Transactions @@ -260,7 +266,9 @@ export default function Dashboard() { Date - Amount + + Amount + @@ -282,7 +290,9 @@ export default function Dashboard() { 2023-06-23 - $250.00 + + $250.00 + @@ -302,11 +312,15 @@ export default function Dashboard() { 2023-06-24 - $150.00 + + $150.00 + -
Noah Williams
+
+ Noah Williams +
noah@example.com
@@ -322,7 +336,9 @@ export default function Dashboard() { 2023-06-25 - $350.00 + + $350.00 +
@@ -342,7 +358,9 @@ export default function Dashboard() { 2023-06-26 - $450.00 + + $450.00 + @@ -362,7 +380,9 @@ export default function Dashboard() { 2023-06-27 - $550.00 + + $550.00 +
diff --git a/apps/web/__registry__/default/block/dashboard-02.tsx b/apps/web/__registry__/default/block/dashboard-02.tsx index 3f23a6ff..5400ce1d 100644 --- a/apps/web/__registry__/default/block/dashboard-02.tsx +++ b/apps/web/__registry__/default/block/dashboard-02.tsx @@ -1,4 +1,4 @@ -import Link from 'next/link' +import Link from "next/link" import { Bell, CircleUser, @@ -10,17 +10,17 @@ import { Search, ShoppingCart, Users, -} from 'lucide-react' +} from "lucide-react" -import { Badge } from '~/registry/default/ui/badge' -import { Button } from '~/registry/default/ui/button' +import { Badge } from "~/registry/default/ui/badge" +import { Button } from "~/registry/default/ui/button" import { Card, CardContent, CardDescription, CardHeader, CardTitle, -} from '~/registry/default/ui/card' +} from "~/registry/default/ui/card" import { DropdownMenu, DropdownMenuContent, @@ -28,16 +28,16 @@ import { DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, -} from '~/registry/default/ui/dropdown-menu' -import { Input } from '~/registry/default/ui/input' -import { Sheet, SheetContent, SheetTrigger } from '~/registry/default/ui/sheet' +} from "~/registry/default/ui/dropdown-menu" +import { Input } from "~/registry/default/ui/input" +import { Sheet, SheetContent, SheetTrigger } from "~/registry/default/ui/sheet" -export const description - = 'A products dashboard with a sidebar navigation and a main content area. The dashboard has a header with a search input and a user menu. The sidebar has a logo, navigation links, and a card with a call to action. The main content area shows an empty state with a call to action.' +export const description = + "A products dashboard with a sidebar navigation and a main content area. The dashboard has a header with a search input and a user menu. The sidebar has a logo, navigation links, and a card with a call to action. The main content area shows an empty state with a call to action." -export const iframeHeight = '800px' +export const iframeHeight = "800px" -export const containerClassName = 'w-full h-full' +export const containerClassName = "w-full h-full" export default function Dashboard() { return ( @@ -45,11 +45,18 @@ export default function Dashboard() {
- + Acme Inc - @@ -78,8 +85,7 @@ export default function Dashboard() { className="bg-muted text-primary hover:text-primary flex items-center gap-3 rounded-lg px-3 py-2 transition-all" > - Products - {' '} + Products{" "} Upgrade to Pro - Unlock all features and get unlimited access to our support - team. + Unlock all features and get unlimited access to our + support team. @@ -181,8 +187,8 @@ export default function Dashboard() { Upgrade to Pro - Unlock all features and get unlimited access to our - support team. + Unlock all features and get unlimited access to + our support team. @@ -208,7 +214,11 @@ export default function Dashboard() {
- @@ -225,10 +235,13 @@ export default function Dashboard() {
-

Inventory

+

+ Inventory +

diff --git a/apps/web/__registry__/default/block/dashboard-03.tsx b/apps/web/__registry__/default/block/dashboard-03.tsx index b3da52a7..56f4f7a1 100644 --- a/apps/web/__registry__/default/block/dashboard-03.tsx +++ b/apps/web/__registry__/default/block/dashboard-03.tsx @@ -15,10 +15,10 @@ import { SquareUser, Triangle, Turtle, -} from 'lucide-react' +} from "lucide-react" -import { Badge } from '~/registry/default/ui/badge' -import { Button } from '~/registry/default/ui/button' +import { Badge } from "~/registry/default/ui/badge" +import { Button } from "~/registry/default/ui/button" import { Drawer, DrawerContent, @@ -26,29 +26,29 @@ import { DrawerHeader, DrawerTitle, DrawerTrigger, -} from '~/registry/default/ui/drawer' -import { Input } from '~/registry/default/ui/input' -import { Label } from '~/registry/default/ui/label' +} from "~/registry/default/ui/drawer" +import { Input } from "~/registry/default/ui/input" +import { Label } from "~/registry/default/ui/label" import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, -} from '~/registry/default/ui/select' -import { Textarea } from '~/registry/default/ui/textarea' +} from "~/registry/default/ui/select" +import { Textarea } from "~/registry/default/ui/textarea" import { Tooltip, TooltipContent, TooltipTrigger, -} from '~/registry/default/ui/tooltip' +} from "~/registry/default/ui/tooltip" -export const description - = 'An AI playground with a sidebar navigation and a main content area. The playground has a header with a settings drawer and a share button. The sidebar has navigation links and a user menu. The main content area shows a form to configure the model and messages.' +export const description = + "An AI playground with a sidebar navigation and a main content area. The playground has a header with a settings drawer and a share button. The sidebar has navigation links and a user menu. The main content area shows a form to configure the model and messages." -export const iframeHeight = '740px' +export const iframeHeight = "740px" -export const containerClassName = 'w-full h-full' +export const containerClassName = "w-full h-full" export default function Dashboard() { return ( @@ -206,14 +206,17 @@ export default function Dashboard() {

- Neural - {' '} + Neural{" "} Genesis

-

- Our fastest model for general use cases. +

+ Our fastest model for general + use cases.

@@ -223,14 +226,17 @@ export default function Dashboard() {

- Neural - {' '} + Neural{" "} Explorer

-

- Performance and speed for efficiency. +

+ Performance and speed for + efficiency.

@@ -240,15 +246,17 @@ export default function Dashboard() {

- Neural - {' '} + Neural{" "} Quantum

-

- The most powerful model for complex - computations. +

+ The most powerful model for + complex computations.

@@ -258,15 +266,27 @@ export default function Dashboard() {
- +
- +
- +
@@ -280,15 +300,22 @@ export default function Dashboard() { - System + + System + User - Assistant + + Assistant +
-