97a3c84625
Reescribe todos los componentes UI para usar Mantine v9 en lugar de shadcn/Tailwind. Elimina cn(), CVA, components.json, theme_provider custom y globals.css con Tailwind. Añade 25+ componentes nuevos (AppShell, AuthForm, DatePickerInput, Dropzone, etc.) y MantineProvider como wrapper estándar del sistema de temas. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
35 lines
864 B
TypeScript
35 lines
864 B
TypeScript
import { Checkbox as MantineCheckbox } from "@mantine/core"
|
|
|
|
interface CheckboxProps {
|
|
label?: string
|
|
indeterminate?: boolean
|
|
className?: string
|
|
labelClassName?: string
|
|
checked?: boolean
|
|
defaultChecked?: boolean
|
|
disabled?: boolean
|
|
onCheckedChange?: (checked: boolean) => void
|
|
id?: string
|
|
}
|
|
|
|
function Checkbox({ className, label, id, indeterminate, checked, defaultChecked, disabled, onCheckedChange, ...props }: CheckboxProps) {
|
|
return (
|
|
<MantineCheckbox
|
|
id={id}
|
|
data-slot="checkbox"
|
|
label={label}
|
|
indeterminate={indeterminate}
|
|
checked={checked}
|
|
defaultChecked={defaultChecked}
|
|
disabled={disabled}
|
|
onChange={(event) => onCheckedChange?.(event.currentTarget.checked)}
|
|
className={className}
|
|
size="sm"
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export { Checkbox }
|
|
export type { CheckboxProps }
|