UNPKG

@arolariu/components

Version:

A collection of reusable components for React applications, built as ESM & CJS modules with tree shake, minify and bundler optimizations enabled, for the lowest bundle size (import cost)!

1 lines 2.16 kB
{"version":3,"file":"components\\ui\\checkbox.cjs","sources":["webpack://@arolariu/components/./src/components/ui/checkbox.tsx"],"sourcesContent":["\r\n\r\nimport * as React from \"react\";\r\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\r\nimport { CheckIcon } from \"lucide-react\";\r\nimport { cn } from \"./../../lib/utils\";\r\n\r\nfunction Checkbox({\r\n className,\r\n ...props\r\n}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\r\n return (\r\n <CheckboxPrimitive.Root\r\n data-slot=\"checkbox\"\r\n className={cn(\r\n \"peer border-neutral-200 data-[state=checked]:bg-neutral-900 data-[state=checked]:text-neutral-50 data-[state=checked]:border-neutral-900 focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 size-4 shrink-0 rounded-[4px] border shadow-2xs transition-shadow outline-hidden focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=checked]:text-neutral-900 dark:data-[state=checked]:border-neutral-50 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n <CheckboxPrimitive.Indicator\r\n data-slot=\"checkbox-indicator\"\r\n className=\"flex items-center justify-center text-current transition-none\"\r\n >\r\n <CheckIcon className=\"size-3.5\" />\r\n </CheckboxPrimitive.Indicator>\r\n </CheckboxPrimitive.Root>\r\n );\r\n}\r\n\r\nexport { Checkbox };\r\n"],"names":["Checkbox","className","props","CheckboxPrimitive","cn","CheckIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,SAASA,SAAS,EAChBC,SAAS,EACT,GAAGC,OACiD;IACpD,OACE,WADF,GACE,qCAACC,+BAAAA,IAAsB;QACrB,aAAU;QACV,WAAWC,IAAAA,0BAAAA,EAAAA,EACT,kxBACAH;QAED,GAAGC,KAAK;kBAET,mDAACC,+BAAAA,SAA2B;YAC1B,aAAU;YACV,WAAU;sBAEV,mDAACE,sCAAAA,SAASA,EAAAA;gBAAC,WAAU;;;;AAI7B"}