2d108c295a
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>
4.2 KiB
4.2 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, output, tested, tests, test_file_path, file_path, props, emits, has_state, framework, variant, params
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | output | tested | tests | test_file_path | file_path | props | emits | has_state | framework | variant | params | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| date_picker_input | component | ts | ui | 1.0.0 | impure | DatePickerInput(props: DatePickerInputProps): JSX.Element | Selector de fecha con input y calendario desplegable. Soporta fecha simple, múltiple y rango. Wrapper sobre Mantine DatePickerInput. |
|
false |
|
Componente DatePickerInput que renderiza input con calendario para selección de fechas | false | frontend/functions/ui/date_picker_input.tsx |
|
|
true | react |
|
|
Ejemplo
import { DatePickerInput, DatePicker } from '@fn_library'
import { useState } from 'react'
// Fecha simple
function SingleDateExample() {
const [value, setValue] = useState<Date | null>(null)
return (
<DatePickerInput
label="Fecha de inicio"
placeholder="Selecciona una fecha"
value={value}
onChange={setValue}
clearable
/>
)
}
// Rango de fechas
function RangeDateExample() {
const [range, setRange] = useState<[Date | null, Date | null]>([null, null])
return (
<DatePickerInput
type="range"
label="Periodo"
placeholder="Selecciona un rango"
value={range}
onChange={setRange}
valueFormat="DD/MM/YYYY"
/>
)
}
// Múltiples fechas
function MultipleDateExample() {
const [dates, setDates] = useState<Date[]>([])
return (
<DatePickerInput
type="multiple"
label="Días seleccionados"
placeholder="Selecciona fechas"
value={dates}
onChange={setDates}
minDate={new Date()}
/>
)
}
// DatePicker inline (sin input)
function InlineDateExample() {
const [value, setValue] = useState<Date | null>(null)
return (
<DatePicker
value={value}
onChange={setValue}
/>
)
}
Notas
- Wrapper directo sobre
DatePickerInputyDatePickerde@mantine/datesv9. Todas las props de Mantine son válidas. - Requiere importar
@mantine/dates/styles.css— este wrapper ya lo incluye. - El prop
typecontrola el modo:'default'(fecha simple),'multiple'(varias fechas),'range'(rango con inicio y fin). DatePickeres el calendario inline sin input — útil para formularios donde el calendario debe estar siempre visible.valueFormatacepta tokens de dayjs (ej:'DD/MM/YYYY','MMMM D, YYYY').- Re-exporta también
DatePickerde@mantine/datescon el mismo patrón de wrapper.