├── .eslintrc.json ├── bun.lockb ├── public ├── favicon.ico ├── avatars │ ├── 01.png │ ├── 02.png │ ├── 03.png │ ├── 04.png │ └── 05.png ├── cards-dark.png ├── forms-dark.png ├── mail-dark.png ├── mail-light.png ├── music-dark.png ├── tasks-dark.png ├── cards-light.png ├── forms-light.png ├── music-light.png ├── tasks-light.png ├── dashboard-dark.png ├── dashboard-light.png ├── favicon-16x16.png ├── playground-dark.png ├── playground-light.png ├── shadcn_ui-themes.jpg ├── authentication-dark.png └── authentication-light.png ├── readme_files └── shadcn-ui.png ├── postcss.config.js ├── .prettierrc ├── src ├── components │ ├── Analytics.tsx │ ├── Providers.tsx │ ├── MainNav.tsx │ ├── TailwindIndicator.tsx │ ├── ThemeSwitcher.tsx │ ├── SiteFooter.tsx │ ├── PageHeader.tsx │ ├── CopyButton.tsx │ ├── CustomThemeProvider.tsx │ ├── ModeToggle.tsx │ ├── Tutorial.tsx │ ├── ThemeSelector.tsx │ ├── SiteHeader.tsx │ └── ExamplesNav.tsx ├── lib │ ├── utils.ts │ ├── fonts.ts │ └── cookie.ts ├── registry │ ├── styles.ts │ ├── new-york │ │ └── ui │ │ │ ├── TextArea.tsx │ │ │ ├── Label.tsx │ │ │ ├── Input.tsx │ │ │ ├── Separator.tsx │ │ │ ├── Toaster.tsx │ │ │ ├── Checkbox.tsx │ │ │ ├── Slider.tsx │ │ │ ├── Badge.tsx │ │ │ ├── Tooltip.tsx │ │ │ ├── Switch.tsx │ │ │ ├── HoverCard.tsx │ │ │ ├── Popover.tsx │ │ │ ├── RadioGroup.tsx │ │ │ ├── Avatar.tsx │ │ │ ├── ScrollArea.tsx │ │ │ ├── Button.tsx │ │ │ ├── Resizable.tsx │ │ │ ├── Tabs.tsx │ │ │ ├── Card.tsx │ │ │ ├── Calendar.tsx │ │ │ ├── Table.tsx │ │ │ └── Dialog.tsx │ └── default │ │ ├── ui │ │ ├── Toaster.tsx │ │ ├── Popover.tsx │ │ ├── Button.tsx │ │ ├── Calendar.tsx │ │ └── use-toast.ts │ │ └── example │ │ └── DatePickerWithRange.tsx ├── app │ ├── dashboard │ │ └── components │ │ │ ├── Search.tsx │ │ │ ├── MainNav.tsx │ │ │ ├── Overview.tsx │ │ │ ├── DateRangePicker.tsx │ │ │ ├── UserNav.tsx │ │ │ └── RecentSales.tsx │ ├── mail │ │ ├── use-mail.ts │ │ └── components │ │ │ ├── AccountSwitcher.tsx │ │ │ ├── Nav.tsx │ │ │ └── MailList.tsx │ ├── music │ │ ├── data │ │ │ ├── playlists.ts │ │ │ └── albums.ts │ │ └── components │ │ │ ├── PodcastEmptyPlaceholder.tsx │ │ │ └── AlbumArtwork.tsx │ ├── tasks │ │ ├── data │ │ │ ├── schema.ts │ │ │ ├── seed.ts │ │ │ └── Data.tsx │ │ ├── components │ │ │ ├── DataTableViewOptions.tsx │ │ │ ├── DataTableToolbar.tsx │ │ │ ├── UserNav.tsx │ │ │ ├── DataTableRowActions.tsx │ │ │ ├── DataTableColumnHeader.tsx │ │ │ ├── DataTablePagination.tsx │ │ │ ├── Columns.tsx │ │ │ └── DataTable.tsx │ │ └── page.tsx │ ├── forms │ │ ├── page.tsx │ │ ├── display │ │ │ ├── page.tsx │ │ │ └── DisplayForm.tsx │ │ ├── account │ │ │ └── page.tsx │ │ ├── notifications │ │ │ └── page.tsx │ │ ├── appearance │ │ │ └── page.tsx │ │ ├── components │ │ │ └── SidebarNav.tsx │ │ └── layout.tsx │ ├── cards │ │ ├── components │ │ │ ├── DatePicker.tsx │ │ │ ├── Notifications.tsx │ │ │ ├── CreateAccount.tsx │ │ │ ├── CookieSettings.tsx │ │ │ ├── GithubCard.tsx │ │ │ ├── ReportAnIssue.tsx │ │ │ └── ShareDocument.tsx │ │ └── page.tsx │ ├── playground │ │ ├── data │ │ │ ├── presets.ts │ │ │ └── models.ts │ │ └── components │ │ │ ├── PresetSave.tsx │ │ │ ├── PresetShare.tsx │ │ │ ├── TopPSelector.tsx │ │ │ ├── MaxlengthSelector.tsx │ │ │ ├── TemperatureSelector.tsx │ │ │ ├── PresetSelector.tsx │ │ │ ├── CodeViewer.tsx │ │ │ └── PresetActions.tsx │ ├── page.tsx │ └── authentication │ │ ├── components │ │ └── UserAuthForm.tsx │ │ └── page.tsx ├── config │ └── site.ts ├── hooks │ ├── use-config.ts │ └── use-mutation-observer.ts └── styles │ ├── themes │ ├── crimson.css │ ├── sunset.css │ ├── sunrise.css │ ├── forest.css │ ├── royal.css │ ├── violet.css │ ├── sapphire.css │ └── ocean.css │ └── globals.css ├── next.config.js ├── components.json ├── .gitignore ├── tsconfig.json ├── README.md ├── tailwind.config.ts └── package.json /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/bun.lockb -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/avatars/01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/avatars/01.png -------------------------------------------------------------------------------- /public/avatars/02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/avatars/02.png -------------------------------------------------------------------------------- /public/avatars/03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/avatars/03.png -------------------------------------------------------------------------------- /public/avatars/04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/avatars/04.png -------------------------------------------------------------------------------- /public/avatars/05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/avatars/05.png -------------------------------------------------------------------------------- /public/cards-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/cards-dark.png -------------------------------------------------------------------------------- /public/forms-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/forms-dark.png -------------------------------------------------------------------------------- /public/mail-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/mail-dark.png -------------------------------------------------------------------------------- /public/mail-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/mail-light.png -------------------------------------------------------------------------------- /public/music-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/music-dark.png -------------------------------------------------------------------------------- /public/tasks-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/tasks-dark.png -------------------------------------------------------------------------------- /public/cards-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/cards-light.png -------------------------------------------------------------------------------- /public/forms-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/forms-light.png -------------------------------------------------------------------------------- /public/music-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/music-light.png -------------------------------------------------------------------------------- /public/tasks-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/tasks-light.png -------------------------------------------------------------------------------- /public/dashboard-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/dashboard-dark.png -------------------------------------------------------------------------------- /public/dashboard-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/dashboard-light.png -------------------------------------------------------------------------------- /public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/favicon-16x16.png -------------------------------------------------------------------------------- /public/playground-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/playground-dark.png -------------------------------------------------------------------------------- /readme_files/shadcn-ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/readme_files/shadcn-ui.png -------------------------------------------------------------------------------- /public/playground-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/playground-light.png -------------------------------------------------------------------------------- /public/shadcn_ui-themes.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/shadcn_ui-themes.jpg -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /public/authentication-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/authentication-dark.png -------------------------------------------------------------------------------- /public/authentication-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeberMVP/shadcn-ui-themes/HEAD/public/authentication-light.png -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "tabWidth": 2, 3 | "useTabs": false, 4 | "plugins": ["prettier-plugin-tailwindcss"], 5 | "tailwindConfig": "tailwind.config.ts" 6 | } 7 | -------------------------------------------------------------------------------- /src/components/Analytics.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { Analytics as VercelAnalytics } from "@vercel/analytics/react"; 4 | 5 | export function Analytics() { 6 | return ; 7 | } 8 | -------------------------------------------------------------------------------- /src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from "clsx" 2 | import { twMerge } from "tailwind-merge" 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /src/registry/styles.ts: -------------------------------------------------------------------------------- 1 | export const styles = [ 2 | { 3 | name: 'default', 4 | label: 'Default', 5 | }, 6 | { 7 | name: 'new-york', 8 | label: 'New York', 9 | }, 10 | ] as const 11 | 12 | export type Style = (typeof styles)[number] 13 | -------------------------------------------------------------------------------- /src/app/dashboard/components/Search.tsx: -------------------------------------------------------------------------------- 1 | import { Input } from '@/registry/new-york/ui/Input' 2 | 3 | export function Search() { 4 | return ( 5 |
6 | 11 |
12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /src/lib/fonts.ts: -------------------------------------------------------------------------------- 1 | import { JetBrains_Mono as FontMono, Inter as FontSans } from 'next/font/google' 2 | 3 | export const fontSans = FontSans({ 4 | subsets: ['latin'], 5 | variable: '--font-sans', 6 | }) 7 | 8 | export const fontMono = FontMono({ 9 | subsets: ['latin'], 10 | variable: '--font-mono', 11 | }) 12 | -------------------------------------------------------------------------------- /src/app/mail/use-mail.ts: -------------------------------------------------------------------------------- 1 | import { atom, useAtom } from "jotai"; 2 | 3 | import { Mail, mails } from "@/app/mail/Data"; 4 | 5 | type Config = { 6 | selected: Mail["id"] | null; 7 | }; 8 | 9 | const configAtom = atom({ 10 | selected: mails[0].id, 11 | }); 12 | 13 | export function useMail() { 14 | return useAtom(configAtom); 15 | } 16 | -------------------------------------------------------------------------------- /src/app/music/data/playlists.ts: -------------------------------------------------------------------------------- 1 | export type Playlist = (typeof playlists)[number] 2 | 3 | export const playlists = [ 4 | 'Recently Added', 5 | 'Recently Played', 6 | 'Top Songs', 7 | 'Top Albums', 8 | 'Top Artists', 9 | 'Logic Discography', 10 | 'Bedtime Beats', 11 | 'Feeling Happy', 12 | 'I miss Y2K Pop', 13 | 'Runtober', 14 | 'Mellow Days', 15 | 'Eminem Essentials', 16 | ] 17 | -------------------------------------------------------------------------------- /src/app/tasks/data/schema.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod' 2 | 3 | // We're keeping a simple non-relational schema here. 4 | // IRL, you will have a schema for your data models. 5 | export const taskSchema = z.object({ 6 | id: z.string(), 7 | title: z.string(), 8 | status: z.string(), 9 | label: z.string(), 10 | priority: z.string(), 11 | }) 12 | 13 | export type Task = z.infer 14 | -------------------------------------------------------------------------------- /src/lib/cookie.ts: -------------------------------------------------------------------------------- 1 | import Cookies from "js-cookie"; 2 | 3 | export function setCookie( 4 | key: string, 5 | value: string, 6 | options?: Cookies.CookieAttributes, 7 | ) { 8 | Cookies.set(key, value, options); 9 | } 10 | 11 | export function getCookie(key: string) { 12 | return Cookies.get(key); 13 | } 14 | 15 | export function removeCookie(key: string) { 16 | Cookies.remove(key); 17 | } 18 | -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | images: { 4 | remotePatterns: [ 5 | { 6 | protocol: "https", 7 | hostname: "avatars.githubusercontent.com", 8 | }, 9 | { 10 | protocol: "https", 11 | hostname: "images.unsplash.com", 12 | }, 13 | ], 14 | }, 15 | }; 16 | 17 | module.exports = nextConfig; 18 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "src/styles/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": true 11 | }, 12 | "aliases": { 13 | "components": "@/components", 14 | "utils": "@/lib/utils" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/config/site.ts: -------------------------------------------------------------------------------- 1 | export const siteConfig = { 2 | name: "shadcn/ui themes", 3 | url: "https://shadcn-ui-themes.vercel.app/", 4 | ogImage: "/shadcn_ui-themes.jpg", 5 | description: "Try out themes for shadcn/ui components.", 6 | links: { 7 | twitter: "https://x.com/zebermvp", 8 | github: "https://github.com/zebermvp/shadcn-ui-themes", 9 | }, 10 | }; 11 | 12 | export type SiteConfig = typeof siteConfig; 13 | -------------------------------------------------------------------------------- /src/app/forms/page.tsx: -------------------------------------------------------------------------------- 1 | import { Separator } from '@/registry/new-york/ui/Separator' 2 | import { ProfileForm } from '@/app/forms/ProfileForm' 3 | 4 | export default function SettingsProfilePage() { 5 | return ( 6 |
7 |
8 |

Profile

9 |

10 | This is how others will see you on the site. 11 |

12 |
13 | 14 | 15 |
16 | ) 17 | } 18 | -------------------------------------------------------------------------------- /src/components/Providers.tsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import * as React from 'react' 4 | import { ThemeProvider as NextThemesProvider } from 'next-themes' 5 | import { ThemeProviderProps } from 'next-themes/dist/types' 6 | 7 | import { TooltipProvider } from '@/registry/new-york/ui/Tooltip' 8 | 9 | export function ThemeProvider({ children, ...props }: ThemeProviderProps) { 10 | return ( 11 | 12 | {children} 13 | 14 | ) 15 | } 16 | -------------------------------------------------------------------------------- /src/hooks/use-config.ts: -------------------------------------------------------------------------------- 1 | import { useAtom } from 'jotai' 2 | import { atomWithStorage } from 'jotai/utils' 3 | 4 | import { Style } from '@/registry/styles' 5 | import { Theme } from '@/registry/themes' 6 | 7 | type Config = { 8 | style: Style['name'] 9 | theme: Theme['name'] 10 | radius: number 11 | } 12 | 13 | const configAtom = atomWithStorage('config', { 14 | style: 'default', 15 | theme: 'zinc', 16 | radius: 0.5, 17 | }) 18 | 19 | export function useConfig() { 20 | return useAtom(configAtom) 21 | } 22 | -------------------------------------------------------------------------------- /src/components/MainNav.tsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import Link from 'next/link' 4 | 5 | import { Icons } from '@/components/Icons' 6 | import { siteConfig } from '@/config/site' 7 | 8 | export function MainNav() { 9 | return ( 10 |
11 | 12 | 13 | 14 | {siteConfig.name} 15 | 16 | 17 |
18 | ) 19 | } 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env*.local 29 | 30 | # vercel 31 | .vercel 32 | 33 | # typescript 34 | *.tsbuildinfo 35 | next-env.d.ts 36 | -------------------------------------------------------------------------------- /src/app/forms/display/page.tsx: -------------------------------------------------------------------------------- 1 | import { Separator } from '@/registry/new-york/ui/Separator' 2 | import { DisplayForm } from '@/app/forms/display/DisplayForm' 3 | 4 | export default function SettingsDisplayPage() { 5 | return ( 6 |
7 |
8 |

Display

9 |

10 | Turn items on or off to control what's displayed in the app. 11 |

12 |
13 | 14 | 15 |
16 | ) 17 | } 18 | -------------------------------------------------------------------------------- /src/app/forms/account/page.tsx: -------------------------------------------------------------------------------- 1 | import { Separator } from '@/registry/new-york/ui/Separator' 2 | import { AccountForm } from '@/app/forms/account/AccountForm' 3 | 4 | export default function SettingsAccountPage() { 5 | return ( 6 |
7 |
8 |

Account

9 |

10 | Update your account settings. Set your preferred language and 11 | timezone. 12 |

13 |
14 | 15 | 16 |
17 | ) 18 | } 19 | -------------------------------------------------------------------------------- /src/app/forms/notifications/page.tsx: -------------------------------------------------------------------------------- 1 | import { Separator } from '@/registry/new-york/ui/Separator' 2 | import { NotificationsForm } from '@/app/forms/notifications/NotificationsForm' 3 | 4 | export default function SettingsNotificationsPage() { 5 | return ( 6 |
7 |
8 |

Notifications

9 |

10 | Configure how you receive notifications. 11 |

12 |
13 | 14 | 15 |
16 | ) 17 | } 18 | -------------------------------------------------------------------------------- /src/hooks/use-mutation-observer.ts: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | 3 | export const useMutationObserver = ( 4 | ref: React.MutableRefObject, 5 | callback: MutationCallback, 6 | options = { 7 | attributes: true, 8 | characterData: true, 9 | childList: true, 10 | subtree: true, 11 | } 12 | ) => { 13 | React.useEffect(() => { 14 | if (ref.current) { 15 | const observer = new MutationObserver(callback) 16 | observer.observe(ref.current, options) 17 | return () => observer.disconnect() 18 | } 19 | }, [ref, callback, options]) 20 | } 21 | -------------------------------------------------------------------------------- /src/app/forms/appearance/page.tsx: -------------------------------------------------------------------------------- 1 | import { Separator } from '@/registry/new-york/ui/Separator' 2 | import { AppearanceForm } from '@/app/forms/appearance/AppearanceForm' 3 | 4 | export default function SettingsAppearancePage() { 5 | return ( 6 |
7 |
8 |

Appearance

9 |

10 | Customize the appearance of the app. Automatically switch between day 11 | and night themes. 12 |

13 |
14 | 15 | 16 |
17 | ) 18 | } 19 | -------------------------------------------------------------------------------- /src/app/cards/components/DatePicker.tsx: -------------------------------------------------------------------------------- 1 | import DatePickerWithRange from '@/registry/default/example/DatePickerWithRange' 2 | import { Card, CardContent } from '@/registry/new-york/ui/Card' 3 | import { Label } from '@/registry/new-york/ui/Label' 4 | 5 | export function DemoDatePicker() { 6 | return ( 7 | 8 | 9 |
10 | 13 | 14 |
15 |
16 |
17 | ) 18 | } 19 | -------------------------------------------------------------------------------- /src/components/TailwindIndicator.tsx: -------------------------------------------------------------------------------- 1 | export function TailwindIndicator() { 2 | if (process.env.NODE_ENV === 'production') return null 3 | 4 | return ( 5 |
6 |
xs
7 |
sm
8 |
md
9 |
lg
10 |
xl
11 |
2xl
12 |
13 | ) 14 | } 15 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "noEmit": true, 9 | "esModuleInterop": true, 10 | "module": "esnext", 11 | "moduleResolution": "bundler", 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "jsx": "preserve", 15 | "incremental": true, 16 | "plugins": [ 17 | { 18 | "name": "next" 19 | } 20 | ], 21 | "paths": { 22 | "@/*": ["./src/*"] 23 | } 24 | }, 25 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 26 | "exclude": ["node_modules"] 27 | } 28 | -------------------------------------------------------------------------------- /src/app/tasks/data/seed.ts: -------------------------------------------------------------------------------- 1 | import fs from 'fs' 2 | import path from 'path' 3 | import { faker } from '@faker-js/faker' 4 | 5 | import { labels, priorities, statuses } from './Data' 6 | 7 | const tasks = Array.from({ length: 100 }, () => ({ 8 | id: `TASK-${faker.datatype.number({ min: 1000, max: 9999 })}`, 9 | title: faker.hacker.phrase().replace(/^./, (letter) => letter.toUpperCase()), 10 | status: faker.helpers.arrayElement(statuses).value, 11 | label: faker.helpers.arrayElement(labels).value, 12 | priority: faker.helpers.arrayElement(priorities).value, 13 | })) 14 | 15 | fs.writeFileSync( 16 | path.join(__dirname, 'tasks.json'), 17 | JSON.stringify(tasks, null, 2) 18 | ) 19 | 20 | console.log('✅ Tasks data generated.') 21 | -------------------------------------------------------------------------------- /src/components/ThemeSwitcher.tsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import * as React from 'react' 4 | import { useSelectedLayoutSegment } from 'next/navigation' 5 | 6 | import { useConfig } from '@/hooks/use-config' 7 | 8 | export function ThemeSwitcher() { 9 | const [config] = useConfig() 10 | const segment = useSelectedLayoutSegment() 11 | 12 | React.useEffect(() => { 13 | document.body.classList.forEach((className) => { 14 | if (className.match(/^theme.*/)) { 15 | document.body.classList.remove(className) 16 | } 17 | }) 18 | 19 | const theme = segment === 'themes' ? config.theme : null 20 | if (theme) { 21 | return document.body.classList.add(`theme-${theme}`) 22 | } 23 | }, [segment, config]) 24 | 25 | return null 26 | } 27 | -------------------------------------------------------------------------------- /src/registry/new-york/ui/TextArea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | 3 | import { cn } from '@/lib/utils' 4 | 5 | export interface TextareaProps 6 | extends React.TextareaHTMLAttributes {} 7 | 8 | const Textarea = React.forwardRef( 9 | ({ className, ...props }, ref) => { 10 | return ( 11 |