refactor: migrar Select y SimpleSelect a native HTML select
Select reescrito de @base-ui/react primitives a <select> nativo con wrapper para mantener la misma API visual (ChevronDown, estilos tema). SimpleSelect actualizado para usar <select>/<optgroup> directamente sin intermediarios. Checkbox corregido: import CheckboxIndicator separado reemplazado por CheckboxPrimitive.Indicator para consistencia. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import * as React from "react"
|
||||
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox"
|
||||
import { CheckboxIndicator } from "@base-ui/react/checkbox"
|
||||
import { cn } from "../core/cn"
|
||||
|
||||
interface CheckboxProps extends CheckboxPrimitive.Root.Props {
|
||||
@@ -30,7 +29,7 @@ function Checkbox({ className, label, id, indeterminate, ...props }: CheckboxPro
|
||||
indeterminate={indeterminate}
|
||||
{...props}
|
||||
>
|
||||
<CheckboxIndicator
|
||||
<CheckboxPrimitive.Indicator
|
||||
data-slot="checkbox-indicator"
|
||||
className="flex items-center justify-center text-current"
|
||||
>
|
||||
@@ -60,7 +59,7 @@ function Checkbox({ className, label, id, indeterminate, ...props }: CheckboxPro
|
||||
<polyline points="20 6 9 17 4 12" />
|
||||
</svg>
|
||||
)}
|
||||
</CheckboxIndicator>
|
||||
</CheckboxPrimitive.Indicator>
|
||||
</CheckboxPrimitive.Root>
|
||||
{label && (
|
||||
<label
|
||||
|
||||
Reference in New Issue
Block a user