├── postcss.config.mjs ├── dist ├── components │ ├── index.js │ ├── index.js.map │ ├── ui │ │ ├── aspect-ratio.js │ │ ├── skeleton.js │ │ ├── aspect-ratio.js.map │ │ ├── skeleton.js.map │ │ ├── sonner.js │ │ ├── label.js │ │ ├── separator.js │ │ ├── collapsible.js │ │ ├── textarea.js │ │ ├── progress.js │ │ ├── label.js.map │ │ ├── sonner.js.map │ │ ├── input.js │ │ ├── avatar.js │ │ ├── textarea.js.map │ │ ├── separator.js.map │ │ ├── switch.js │ │ ├── checkbox.js │ │ ├── progress.js.map │ │ ├── input.js.map │ │ ├── collapsible.js.map │ │ ├── radio-group.js │ │ ├── index.js │ │ ├── hover-card.js │ │ ├── switch.js.map │ │ ├── popover.js │ │ ├── alert.js │ │ ├── badge.js │ │ ├── toggle.js │ │ ├── scroll-area.js │ │ ├── checkbox.js.map │ │ ├── toggle-group.js │ │ ├── avatar.js.map │ │ ├── tabs.js │ │ ├── resizable.js │ │ ├── tooltip.js │ │ ├── card.js │ │ ├── radio-group.js.map │ │ ├── accordion.js │ │ ├── slider.js │ │ ├── button.js │ │ ├── toggle.js.map │ │ ├── hover-card.js.map │ │ ├── badge.js.map │ │ ├── index.js.map │ │ ├── input-otp.js │ │ ├── table.js │ │ ├── popover.js.map │ │ ├── alert.js.map │ │ ├── scroll-area.js.map │ │ ├── breadcrumb.js │ │ ├── tabs.js.map │ │ ├── resizable.js.map │ │ ├── tooltip.js.map │ │ ├── slider.js.map │ │ ├── toggle-group.js.map │ │ ├── button.js.map │ │ ├── accordion.js.map │ │ ├── pagination.js │ │ ├── calendar.js │ │ └── card.js.map │ └── views │ │ ├── ListView.js │ │ └── ListView.js.map ├── rsc │ ├── index.js │ └── index.js.map ├── client │ ├── index.js │ └── index.js.map ├── lib │ ├── utils.js │ └── utils.js.map ├── index.js ├── styles │ └── globals.css ├── tailwind-content.js ├── index.js.map ├── config │ ├── tailwind.js │ └── tailwind.js.map ├── module-resolver.js ├── tailwind-content.js.map ├── hooks │ ├── use-mobile.js │ └── use-mobile.js.map ├── module-resolver.js.map ├── postcss │ └── v4 │ │ ├── index.js │ │ └── index.js.map └── tailwind-preset.js ├── public └── images │ ├── posts-shadcn.png │ └── categories-shadcn.png ├── src ├── components │ ├── index.ts │ ├── ui │ │ ├── aspect-ratio.tsx │ │ ├── skeleton.tsx │ │ ├── sonner.tsx │ │ ├── label.tsx │ │ ├── separator.tsx │ │ ├── textarea.tsx │ │ ├── progress.tsx │ │ ├── collapsible.tsx │ │ ├── input.tsx │ │ ├── switch.tsx │ │ ├── avatar.tsx │ │ ├── checkbox.tsx │ │ ├── radio-group.tsx │ │ ├── index.ts │ │ ├── hover-card.tsx │ │ ├── toggle.tsx │ │ ├── popover.tsx │ │ ├── badge.tsx │ │ ├── scroll-area.tsx │ │ ├── alert.tsx │ │ ├── tooltip.tsx │ │ ├── tabs.tsx │ │ ├── toggle-group.tsx │ │ ├── resizable.tsx │ │ ├── slider.tsx │ │ ├── accordion.tsx │ │ ├── card.tsx │ │ ├── button.tsx │ │ ├── data-table │ │ │ └── data-table-pagination.tsx │ │ ├── input-otp.tsx │ │ ├── breadcrumb.tsx │ │ ├── table.tsx │ │ └── calendar.tsx │ └── views │ │ └── ListView.tsx ├── styles │ └── globals.css ├── lib │ └── utils.ts ├── client │ └── index.ts ├── index.ts ├── rsc │ └── index.ts ├── tailwind-content.ts ├── module-resolver.js ├── hooks │ └── use-mobile.ts ├── config │ └── tailwind.ts ├── postcss │ └── v4 │ │ └── index.js └── tailwind-preset.ts ├── release-notes.md ├── components.json ├── spack.config.js ├── tsconfig.json ├── .swcrc ├── .turbo └── turbo-build.log ├── add-use-client.sh ├── tailwind.config.js └── README.md /postcss.config.mjs: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | "@tailwindcss/postcss": {}, 4 | }, 5 | }; 6 | -------------------------------------------------------------------------------- /dist/components/index.js: -------------------------------------------------------------------------------- 1 | export * from "./ui"; 2 | export * from "./views/ListView"; 3 | 4 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /public/images/posts-shadcn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LaunchThatApp/payload-shadcn/HEAD/public/images/posts-shadcn.png -------------------------------------------------------------------------------- /public/images/categories-shadcn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LaunchThatApp/payload-shadcn/HEAD/public/images/categories-shadcn.png -------------------------------------------------------------------------------- /src/components/index.ts: -------------------------------------------------------------------------------- 1 | // Export all UI components 2 | export * from "./ui"; 3 | 4 | // Export all views 5 | export * from "./views/ListView"; 6 | -------------------------------------------------------------------------------- /dist/rsc/index.js: -------------------------------------------------------------------------------- 1 | export { cn } from "../lib/utils"; 2 | export { ListView } from "../components/views/ListView"; 3 | 4 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /dist/client/index.js: -------------------------------------------------------------------------------- 1 | "use client"; 2 | export * from "../components/ui"; 3 | export * from "../lib/utils"; 4 | export * from "../components/views/ListView.client"; 5 | 6 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /dist/lib/utils.js: -------------------------------------------------------------------------------- 1 | import { clsx } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | export function cn(...inputs) { 4 | return twMerge(clsx(inputs)); 5 | } 6 | 7 | //# sourceMappingURL=utils.js.map -------------------------------------------------------------------------------- /dist/index.js: -------------------------------------------------------------------------------- 1 | import { shadcnPlugin } from "./shadcnPlugin"; 2 | export { shadcnPlugin } from "./shadcnPlugin"; 3 | export default shadcnPlugin; 4 | export * from "./components/ui"; 5 | 6 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /src/styles/globals.css: -------------------------------------------------------------------------------- 1 | @layer base { 2 | /* Add base styles */ 3 | } 4 | 5 | @layer components { 6 | /* Add shadcn/ui styles */ 7 | } 8 | 9 | @layer utilities { 10 | /* Add any necessary utilities */ 11 | } 12 | -------------------------------------------------------------------------------- /dist/styles/globals.css: -------------------------------------------------------------------------------- 1 | @layer base { 2 | /* Add base styles */ 3 | } 4 | 5 | @layer components { 6 | /* Add shadcn/ui styles */ 7 | } 8 | 9 | @layer utilities { 10 | /* Add any necessary utilities */ 11 | } 12 | -------------------------------------------------------------------------------- /src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import type { ClassValue } from "clsx"; 2 | import { clsx } from "clsx"; 3 | import { twMerge } from "tailwind-merge"; 4 | 5 | export function cn(...inputs: ClassValue[]) { 6 | return twMerge(clsx(inputs)); 7 | } 8 | -------------------------------------------------------------------------------- /src/client/index.ts: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | // Re-export all UI components 4 | export * from "../components/ui"; 5 | 6 | // Export utilities 7 | export * from "../lib/utils"; 8 | 9 | export * from "../components/views/ListView.client"; 10 | -------------------------------------------------------------------------------- /dist/components/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["../../src/components/index.ts"],"sourcesContent":["// Export all UI components\nexport * from \"./ui\";\n\n// Export all views\nexport * from \"./views/ListView\";\n"],"names":[],"mappings":"AACA,cAAc,OAAO;AAGrB,cAAc,mBAAmB"} -------------------------------------------------------------------------------- /release-notes.md: -------------------------------------------------------------------------------- 1 | ## What's Changed 2 | 3 | * Switched to SWC compiler for improved build performance 4 | * Updated documentation and README 5 | * Initial plugin setup with shadcn components 6 | 7 | ## Installation 8 | ```bash 9 | pnpm add @launchthat.apps/payload-shadcn 10 | ``` 11 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import { shadcnPlugin } from "./shadcnPlugin"; 2 | 3 | // Export the plugin 4 | export { shadcnPlugin } from "./shadcnPlugin"; 5 | export type { ShadcnPluginOptions } from "./shadcnPlugin"; 6 | export default shadcnPlugin; 7 | 8 | // Export UI components 9 | export * from "./components/ui"; 10 | -------------------------------------------------------------------------------- /dist/tailwind-content.js: -------------------------------------------------------------------------------- 1 | export function getShadcnContent() { 2 | return [ 3 | "./node_modules/@launchthat.apps/payload-shadcn/dist/components/**/*.{js,jsx,ts,tsx}", 4 | "./node_modules/@launchthat.apps/payload-shadcn/dist/**/*.{js,jsx,ts,tsx}" 5 | ]; 6 | } 7 | export default getShadcnContent; 8 | 9 | //# sourceMappingURL=tailwind-content.js.map -------------------------------------------------------------------------------- /src/components/ui/aspect-ratio.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio" 4 | 5 | function AspectRatio({ 6 | ...props 7 | }: React.ComponentProps) { 8 | return 9 | } 10 | 11 | export { AspectRatio } 12 | -------------------------------------------------------------------------------- /dist/client/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["../../src/client/index.ts"],"sourcesContent":["\"use client\";\n\n// Re-export all UI components\nexport * from \"../components/ui\";\n\n// Export utilities\nexport * from \"../lib/utils\";\n\nexport * from \"../components/views/ListView.client\";\n"],"names":[],"mappings":"AAAA;AAGA,cAAc,mBAAmB;AAGjC,cAAc,eAAe;AAE7B,cAAc,sCAAsC"} -------------------------------------------------------------------------------- /src/components/ui/skeleton.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | function Skeleton({ className, ...props }: React.ComponentProps<"div">) { 6 | return ( 7 |
12 | ) 13 | } 14 | 15 | export { Skeleton } 16 | -------------------------------------------------------------------------------- /src/rsc/index.ts: -------------------------------------------------------------------------------- 1 | // This file is for React Server Components 2 | // Only export components that are safe to use in RSC 3 | 4 | // Export utilities that don't use client hooks 5 | export { cn } from "../lib/utils"; 6 | 7 | // If you have any server-side only components, export them here 8 | 9 | // Export server components 10 | export { ListView } from "../components/views/ListView"; 11 | -------------------------------------------------------------------------------- /dist/components/ui/aspect-ratio.js: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { jsx as _jsx } from "react/jsx-runtime"; 3 | import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio"; 4 | function AspectRatio({ ...props }) { 5 | return _jsx(AspectRatioPrimitive.Root, { 6 | "data-slot": "aspect-ratio", 7 | ...props 8 | }); 9 | } 10 | export { AspectRatio }; 11 | 12 | //# sourceMappingURL=aspect-ratio.js.map -------------------------------------------------------------------------------- /dist/components/ui/skeleton.js: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { jsx as _jsx } from "react/jsx-runtime"; 3 | import { cn } from "../../lib/utils"; 4 | function Skeleton({ className, ...props }) { 5 | return _jsx("div", { 6 | "data-slot": "skeleton", 7 | className: cn("bg-accent animate-pulse rounded-md", className), 8 | ...props 9 | }); 10 | } 11 | export { Skeleton }; 12 | 13 | //# sourceMappingURL=skeleton.js.map -------------------------------------------------------------------------------- /dist/lib/utils.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["../../src/lib/utils.ts"],"sourcesContent":["import type { ClassValue } from \"clsx\";\nimport { clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"names":["clsx","twMerge","cn","inputs"],"mappings":"AACA,SAASA,IAAI,QAAQ,OAAO;AAC5B,SAASC,OAAO,QAAQ,iBAAiB;AAEzC,OAAO,SAASC,GAAG,GAAGC,MAAoB;IACxC,OAAOF,QAAQD,KAAKG;AACtB"} -------------------------------------------------------------------------------- /dist/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { shadcnPlugin } from \"./shadcnPlugin\";\n\n// Export the plugin\nexport { shadcnPlugin } from \"./shadcnPlugin\";\nexport type { ShadcnPluginOptions } from \"./shadcnPlugin\";\nexport default shadcnPlugin;\n\n// Export UI components\nexport * from \"./components/ui\";\n"],"names":["shadcnPlugin"],"mappings":"AAAA,SAASA,YAAY,QAAQ,iBAAiB;AAG9C,SAASA,YAAY,QAAQ,iBAAiB;AAE9C,eAAeA,aAAa;AAG5B,cAAc,kBAAkB"} -------------------------------------------------------------------------------- /dist/config/tailwind.js: -------------------------------------------------------------------------------- 1 | export const getShadcnContent = ()=>[ 2 | "./node_modules/@launchthat.apps/payload-shadcn/dist/components/**/*.{js,jsx,ts,tsx}", 3 | "./node_modules/@launchthat.apps/payload-shadcn/dist/**/*.{js,jsx,ts,tsx}" 4 | ]; 5 | export const getShadcnTheme = ()=>({}); 6 | const defaultConfig = { 7 | content: getShadcnContent(), 8 | theme: { 9 | extend: getShadcnTheme() 10 | } 11 | }; 12 | export default defaultConfig; 13 | 14 | //# sourceMappingURL=tailwind.js.map -------------------------------------------------------------------------------- /dist/rsc/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["../../src/rsc/index.ts"],"sourcesContent":["// This file is for React Server Components\n// Only export components that are safe to use in RSC\n\n// Export utilities that don't use client hooks\nexport { cn } from \"../lib/utils\";\n\n// If you have any server-side only components, export them here\n\n// Export server components\nexport { ListView } from \"../components/views/ListView\";\n"],"names":["cn","ListView"],"mappings":"AAIA,SAASA,EAAE,QAAQ,eAAe;AAKlC,SAASC,QAAQ,QAAQ,+BAA+B"} -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": false, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "", 8 | "css": "src/styles/globals.css", 9 | "baseColor": "neutral", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | }, 20 | "iconLibrary": "lucide" 21 | } 22 | -------------------------------------------------------------------------------- /src/tailwind-content.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Returns an array of content paths for Tailwind to scan for shadcn components 3 | * 4 | * @returns Array of glob patterns for shadcn components 5 | */ 6 | export function getShadcnContent() { 7 | return [ 8 | // shadcn components 9 | "./node_modules/@launchthat.apps/payload-shadcn/dist/components/**/*.{js,jsx,ts,tsx}", 10 | // PayloadCMS admin customizations 11 | "./node_modules/@launchthat.apps/payload-shadcn/dist/**/*.{js,jsx,ts,tsx}", 12 | ]; 13 | } 14 | 15 | export default getShadcnContent; 16 | -------------------------------------------------------------------------------- /spack.config.js: -------------------------------------------------------------------------------- 1 | const { config } = require("@swc/core/spack"); 2 | 3 | module.exports = config({ 4 | entry: { 5 | index: __dirname + "/src/index.ts", 6 | "client/index": __dirname + "/src/client/index.ts", 7 | "rsc/index": __dirname + "/src/rsc/index.ts", 8 | }, 9 | output: { 10 | path: __dirname + "/dist", 11 | }, 12 | options: { 13 | jsc: { 14 | parser: { 15 | syntax: "typescript", 16 | tsx: true, 17 | decorators: true, 18 | }, 19 | target: "es2020", 20 | }, 21 | }, 22 | }); 23 | -------------------------------------------------------------------------------- /dist/module-resolver.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | 3 | module.exports = function (source) { 4 | // Replace path aliases (@/lib/utils, @/components/ui/*) 5 | let result = source; 6 | 7 | // Replace @/lib/utils with relative path 8 | result = result.replace( 9 | /from\s+["']@\/lib\/utils["']/g, 10 | `from "../../lib/utils.js"`, 11 | ); 12 | 13 | // Replace @/components/ui/* 14 | result = result.replace( 15 | /from\s+["']@\/components\/ui\/([^"']*)["']/g, 16 | (match, componentName) => `from "../../components/ui/${componentName}.js"`, 17 | ); 18 | 19 | return result; 20 | }; 21 | -------------------------------------------------------------------------------- /src/module-resolver.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | 3 | module.exports = function (source) { 4 | // Replace path aliases (@/lib/utils, @/components/ui/*) 5 | let result = source; 6 | 7 | // Replace @/lib/utils with relative path 8 | result = result.replace( 9 | /from\s+["']@\/lib\/utils["']/g, 10 | `from "../../lib/utils.js"`, 11 | ); 12 | 13 | // Replace @/components/ui/* 14 | result = result.replace( 15 | /from\s+["']@\/components\/ui\/([^"']*)["']/g, 16 | (match, componentName) => `from "../../components/ui/${componentName}.js"`, 17 | ); 18 | 19 | return result; 20 | }; 21 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2020", 4 | "module": "ESNext", 5 | "moduleResolution": "bundler", 6 | "esModuleInterop": true, 7 | "outDir": "./dist", 8 | "rootDir": "./src", 9 | "declaration": true, 10 | "declarationMap": true, 11 | "sourceMap": true, 12 | "strict": true, 13 | "skipLibCheck": true, 14 | "jsx": "react-jsx", 15 | "baseUrl": ".", 16 | "paths": { 17 | "@/*": ["src/*"], 18 | "@acme/ui": ["../../packages/ui/src"] 19 | } 20 | }, 21 | "include": ["src/**/*"], 22 | "exclude": ["node_modules", "dist"] 23 | } 24 | -------------------------------------------------------------------------------- /dist/components/ui/aspect-ratio.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["../../../src/components/ui/aspect-ratio.tsx"],"sourcesContent":["\"use client\"\n\nimport * as AspectRatioPrimitive from \"@radix-ui/react-aspect-ratio\"\n\nfunction AspectRatio({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nexport { AspectRatio }\n"],"names":["AspectRatioPrimitive","AspectRatio","props","Root","data-slot"],"mappings":"AAAA;;AAEA,YAAYA,0BAA0B,+BAA8B;AAEpE,SAASC,YAAY,EACnB,GAAGC,OACoD;IACvD,OAAO,KAACF,qBAAqBG,IAAI;QAACC,aAAU;QAAgB,GAAGF,KAAK;;AACtE;AAEA,SAASD,WAAW,GAAE"} -------------------------------------------------------------------------------- /src/hooks/use-mobile.ts: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | const MOBILE_BREAKPOINT = 768 4 | 5 | export function useIsMobile() { 6 | const [isMobile, setIsMobile] = React.useState(undefined) 7 | 8 | React.useEffect(() => { 9 | const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`) 10 | const onChange = () => { 11 | setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) 12 | } 13 | mql.addEventListener("change", onChange) 14 | setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) 15 | return () => mql.removeEventListener("change", onChange) 16 | }, []) 17 | 18 | return !!isMobile 19 | } 20 | -------------------------------------------------------------------------------- /dist/components/ui/skeleton.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["../../../src/components/ui/skeleton.tsx"],"sourcesContent":["\"use client\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nexport { Skeleton }\n"],"names":["cn","Skeleton","className","props","div","data-slot"],"mappings":"AAAA;;AAEA,SAASA,EAAE,QAAQ,kBAAa;AAEhC,SAASC,SAAS,EAAEC,SAAS,EAAE,GAAGC,OAAoC;IACpE,OACE,KAACC;QACCC,aAAU;QACVH,WAAWF,GAAG,sCAAsCE;QACnD,GAAGC,KAAK;;AAGf;AAEA,SAASF,QAAQ,GAAE"} -------------------------------------------------------------------------------- /dist/components/ui/sonner.js: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { jsx as _jsx } from "react/jsx-runtime"; 3 | import { useTheme } from "next-themes"; 4 | import { Toaster as Sonner } from "sonner"; 5 | const Toaster = ({ ...props })=>{ 6 | const { theme = "system" } = useTheme(); 7 | return _jsx(Sonner, { 8 | theme: theme, 9 | className: "toaster group", 10 | style: { 11 | "--normal-bg": "var(--popover)", 12 | "--normal-text": "var(--popover-foreground)", 13 | "--normal-border": "var(--border)" 14 | }, 15 | ...props 16 | }); 17 | }; 18 | export { Toaster }; 19 | 20 | //# sourceMappingURL=sonner.js.map -------------------------------------------------------------------------------- /dist/tailwind-content.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["../src/tailwind-content.ts"],"sourcesContent":["/**\n * Returns an array of content paths for Tailwind to scan for shadcn components\n *\n * @returns Array of glob patterns for shadcn components\n */\nexport function getShadcnContent() {\n return [\n // shadcn components\n \"./node_modules/@launchthat.apps/payload-shadcn/dist/components/**/*.{js,jsx,ts,tsx}\",\n // PayloadCMS admin customizations\n \"./node_modules/@launchthat.apps/payload-shadcn/dist/**/*.{js,jsx,ts,tsx}\",\n ];\n}\n\nexport default getShadcnContent;\n"],"names":["getShadcnContent"],"mappings":"AAKA,OAAO,SAASA;IACd,OAAO;QAEL;QAEA;KACD;AACH;AAEA,eAAeA,iBAAiB"} -------------------------------------------------------------------------------- /src/components/ui/sonner.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import { useTheme } from "next-themes" 4 | import { Toaster as Sonner, ToasterProps } from "sonner" 5 | 6 | const Toaster = ({ ...props }: ToasterProps) => { 7 | const { theme = "system" } = useTheme() 8 | 9 | return ( 10 | 22 | ) 23 | } 24 | 25 | export { Toaster } 26 | -------------------------------------------------------------------------------- /dist/components/ui/label.js: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { jsx as _jsx } from "react/jsx-runtime"; 3 | import * as React from "react"; 4 | import * as LabelPrimitive from "@radix-ui/react-label"; 5 | import { cn } from "../../lib/utils"; 6 | function Label({ className, ...props }) { 7 | return _jsx(LabelPrimitive.Root, { 8 | "data-slot": "label", 9 | className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className), 10 | ...props 11 | }); 12 | } 13 | export { Label }; 14 | 15 | //# sourceMappingURL=label.js.map -------------------------------------------------------------------------------- /dist/hooks/use-mobile.js: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | const MOBILE_BREAKPOINT = 768; 3 | export function useIsMobile() { 4 | const [isMobile, setIsMobile] = React.useState(undefined); 5 | React.useEffect(()=>{ 6 | const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`); 7 | const onChange = ()=>{ 8 | setIsMobile(window.innerWidth < MOBILE_BREAKPOINT); 9 | }; 10 | mql.addEventListener("change", onChange); 11 | setIsMobile(window.innerWidth < MOBILE_BREAKPOINT); 12 | return ()=>mql.removeEventListener("change", onChange); 13 | }, []); 14 | return !!isMobile; 15 | } 16 | 17 | //# sourceMappingURL=use-mobile.js.map -------------------------------------------------------------------------------- /src/components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | import * as LabelPrimitive from "@radix-ui/react-label" 5 | 6 | import { cn } from "@/lib/utils" 7 | 8 | function Label({ 9 | className, 10 | ...props 11 | }: React.ComponentProps) { 12 | return ( 13 | 21 | ) 22 | } 23 | 24 | export { Label } 25 | -------------------------------------------------------------------------------- /dist/components/ui/separator.js: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { jsx as _jsx } from "react/jsx-runtime"; 3 | import * as React from "react"; 4 | import * as SeparatorPrimitive from "@radix-ui/react-separator"; 5 | import { cn } from "../../lib/utils"; 6 | function Separator({ className, orientation = "horizontal", decorative = true, ...props }) { 7 | return _jsx(SeparatorPrimitive.Root, { 8 | "data-slot": "separator-root", 9 | decorative: decorative, 10 | orientation: orientation, 11 | className: cn("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", className), 12 | ...props 13 | }); 14 | } 15 | export { Separator }; 16 | 17 | //# sourceMappingURL=separator.js.map -------------------------------------------------------------------------------- /dist/components/ui/collapsible.js: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { jsx as _jsx } from "react/jsx-runtime"; 3 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"; 4 | function Collapsible({ ...props }) { 5 | return _jsx(CollapsiblePrimitive.Root, { 6 | "data-slot": "collapsible", 7 | ...props 8 | }); 9 | } 10 | function CollapsibleTrigger({ ...props }) { 11 | return _jsx(CollapsiblePrimitive.CollapsibleTrigger, { 12 | "data-slot": "collapsible-trigger", 13 | ...props 14 | }); 15 | } 16 | function CollapsibleContent({ ...props }) { 17 | return _jsx(CollapsiblePrimitive.CollapsibleContent, { 18 | "data-slot": "collapsible-content", 19 | ...props 20 | }); 21 | } 22 | export { Collapsible, CollapsibleTrigger, CollapsibleContent }; 23 | 24 | //# sourceMappingURL=collapsible.js.map -------------------------------------------------------------------------------- /src/components/ui/separator.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | import * as SeparatorPrimitive from "@radix-ui/react-separator" 5 | 6 | import { cn } from "@/lib/utils" 7 | 8 | function Separator({ 9 | className, 10 | orientation = "horizontal", 11 | decorative = true, 12 | ...props 13 | }: React.ComponentProps) { 14 | return ( 15 | 25 | ) 26 | } 27 | 28 | export { Separator } 29 | -------------------------------------------------------------------------------- /src/components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | 5 | import { cn } from "@/lib/utils" 6 | 7 | function Textarea({ className, ...props }: React.ComponentProps<"textarea">) { 8 | return ( 9 |