@rubenpazch/ui 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,73 +13,73 @@ librería (ver AGENTS.md del repo lbyte-ui-library), no lo copies en la app.
13
13
 
14
14
  ## Índice
15
15
 
16
- | Paquete | Categoría | Exporta | Qué es |
17
- | ----------------------------------------------------------------------- | -------------------------- | ----------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
18
- | [`@rubenpazch/alert`](#rubenpazchalert) | Retroalimentación | Alert | Aviso dentro de la página (info, success, warning, danger) con título, acción y cierre opcional. |
19
- | [`@rubenpazch/app-shell`](#rubenpazchapp-shell) | Navegación | AppShell | Estructura completa de un panel: Sidebar colapsable, cabecera fija con botón ☰ en móvil, título y acciones, enlace "Saltar al contenido" y área principal con ancho máximo. |
20
- | [`@rubenpazch/auth-gate`](#rubenpazchauth-gate) | Navegación | AuthGate, AuthScreen | Puerta de sesión: comprueba el token, confirma con el servidor (/me) y solo entonces pinta la app; mientras, una pantalla neutra. Sin sesión, va al login sin mostrar nada. |
21
- | [`@rubenpazch/autocomplete`](#rubenpazchautocomplete) | Formularios | Autocomplete | Selector con búsqueda sobre una lista de opciones (con descripción, carga y opción de limpiar). |
22
- | [`@rubenpazch/avatar`](#rubenpazchavatar) | Presentación de datos | Avatar, AvatarGroup | Avatar de persona (imagen, iniciales o icono) y AvatarGroup para varios. |
23
- | [`@rubenpazch/badge`](#rubenpazchbadge) | Presentación de datos | Badge | Insignia de estado o categoría (Pagado, Vencido, Borrador) con colores semánticos, variantes soft/solid/outline y punto. |
24
- | [`@rubenpazch/bottom-navigation`](#rubenpazchbottom-navigation) | Navegación | BottomNavigation | Barra fija abajo en el celular con 3 a 5 secciones principales (icono y texto); se oculta en pantallas anchas. |
25
- | [`@rubenpazch/button`](#rubenpazchbutton) | Acciones | Button | Botón con variantes text/contained/outlined, colores, tamaños, estado de carga e iconos; puede renderizar un enlace (href). |
26
- | [`@rubenpazch/card`](#rubenpazchcard) | Presentación de datos | Card, CardHeader, CardBody, CardFooter | Tarjeta (outlined o elevated) con CardHeader (título, subtítulo, acciones), CardBody y CardFooter; puede ser clicable. |
27
- | [`@rubenpazch/checkbox-input`](#rubenpazchcheckbox-input) | Formularios | CheckboxInput, CheckboxGroup | Casilla de verificación con etiqueta, ayuda y error (CheckboxInput) y grupo de casillas con título, "Seleccionar todos" y máximo (CheckboxGroup). |
28
- | [`@rubenpazch/chip`](#rubenpazchchip) | Presentación de datos | Chip | Chip/etiqueta con variantes, icono y acción de borrar. |
29
- | [`@rubenpazch/collapsible`](#rubenpazchcollapsible) | Presentación de datos | Collapsible | Sección plegable con título: deja lo opcional oculto para acortar formularios y páginas. |
30
- | [`@rubenpazch/confirmation-dialog`](#rubenpazchconfirmation-dialog) | Retroalimentación | ConfirmationDialog | Diálogo modal de confirmación (aceptar/cancelar). |
31
- | [`@rubenpazch/data-table`](#rubenpazchdata-table) | Datos | DataTable | Tabla de datos accesible: columnas con render, orden (aria-sort) en el navegador o en el servidor, carga con Skeleton, estado vacío, filas clicables, encabezado fijo y scroll horizontal en móvil. |
32
- | [`@rubenpazch/date-input`](#rubenpazchdate-input) | Formularios | DateInput | Campo de fecha con formato local, mínimo/máximo, ayuda y error. |
33
- | [`@rubenpazch/date-picker`](#rubenpazchdate-picker) | Formularios | DatePicker | Selector de fecha con calendario desplegable. |
34
- | [`@rubenpazch/date-range-picker`](#rubenpazchdate-range-picker) | Formularios | DateRangePicker, DEFAULT_DATE_RANGE_LABELS, DEFAULT_DATE_RANGE_PRESETS, rangoValido | Dos fechas (desde y hasta) con validación del orden y atajos (este mes, mes anterior, últimos 30 días…). Valores ISO AAAA-MM-DD. |
35
- | [`@rubenpazch/description-list`](#rubenpazchdescription-list) | Presentación de datos | DescriptionList | Pares etiqueta/valor en columnas: resumen de un registro (datos de un trámite, de un cliente, de un pago). |
36
- | [`@rubenpazch/draggable-list`](#rubenpazchdraggable-list) | Datos | DraggableList | Lista reordenable arrastrando (también con teclado), basada en dnd-kit. |
37
- | [`@rubenpazch/drawer`](#rubenpazchdrawer) | Navegación | Drawer | Panel lateral (izquierda/derecha/arriba/abajo) con animación y fondo. |
38
- | [`@rubenpazch/empty-state`](#rubenpazchempty-state) | Retroalimentación | EmptyState | Estado vacío con icono, título, descripción y acciones ("No hay convocatorias · Crear"). |
39
- | [`@rubenpazch/file-upload`](#rubenpazchfile-upload) | Formularios | FileUpload, DEFAULT_FILE_UPLOAD_LABELS, aceptaArchivo | Zona para subir uno o varios archivos (arrastrar y soltar o elegir), con validación de tipo, tamaño y cantidad, y lista para quitarlos. |
40
- | [`@rubenpazch/form-field`](#rubenpazchform-field) | Formularios | FormField, FormRow, FormActions | FormField (etiqueta, ayuda y error asociados a cualquier control), FormRow (columnas que se apilan en móvil) y FormActions (pie con botones). |
41
- | [`@rubenpazch/icon-button`](#rubenpazchicon-button) | Acciones | IconButton | Botón de solo icono con variantes, formas, tooltip y etiqueta accesible. |
42
- | [`@rubenpazch/icons`](#rubenpazchicons) | Iconos | ArrowDetailsIcon, ArchiveIcon, BrandingIcon, BusinessPlanIcon, CalendarIcon, CheckIcon, … | Más de 60 iconos SVG como componentes React (y MaterialIcon para Material Icons). |
43
- | [`@rubenpazch/identification-input`](#rubenpazchidentification-input) | Salud (pacientes y óptica) | IdentificationInput, DEFAULT_IDENTIFICATION_LABELS | Tipo y número de documento peruano (DNI, CE, pasaporte) con validación de longitud y formato. |
44
- | [`@rubenpazch/image-upload`](#rubenpazchimage-upload) | Formularios | ImageUpload, DEFAULT_IMAGE_UPLOAD_LABELS | Subida de imagen o PDF con vista previa, arrastrar y soltar, validación de tipo y tamaño. |
45
- | [`@rubenpazch/image-viewer`](#rubenpazchimage-viewer) | Presentación de datos | ImageViewer, DEFAULT_IMAGE_VIEWER_LABELS | Visor de imágenes a pantalla completa con zoom (botones, rueda, pellizco, doble toque), arrastre y paso entre imágenes por flechas, teclado o deslizando. |
46
- | [`@rubenpazch/info-row`](#rubenpazchinfo-row) | Presentación de datos | InfoRow | Fila de dato con icono, etiqueta y valor (variantes de color, tamaños, acción opcional). |
47
- | [`@rubenpazch/layout`](#rubenpazchlayout) | Maquetación (layout) | Flex, Stack, Inline, Spacer, Grid, GridItem, … | Maquetación solo con props (sin escribir CSS): Flex (fila o columna con gap, align y justify), Stack (vertical), Inline (horizontal que se ajusta), Center (centrar en uno o ambos ejes), Grid/GridItem (columnas fijas o automáticas), Container (ancho máximo de página) y Spacer. Todas las props aceptan valores por punto de quiebre: { base, sm, md, lg, xl }. |
48
- | [`@rubenpazch/list`](#rubenpazchlist) | Presentación de datos | List, ListItem | Lista vertical de filas (icono, título, detalle y estado a la derecha), clicables o enlaces. |
49
- | [`@rubenpazch/loading-spinner`](#rubenpazchloading-spinner) | Retroalimentación | LoadingSpinner | Indicador de carga circular con tamaños y colores. |
50
- | [`@rubenpazch/menu`](#rubenpazchmenu) | Acciones | Menu | Menú de acciones (role="menu") con botón ⋮ por defecto, opciones con icono, peligrosas o deshabilitadas, teclado completo. |
51
- | [`@rubenpazch/modal`](#rubenpazchmodal) | Retroalimentación | Modal | Ventana modal accesible: portal, foco retenido, Escape y clic fuera para cerrar, bloqueo del scroll, título y descripción anunciados. |
52
- | [`@rubenpazch/money-input`](#rubenpazchmoney-input) | Formularios | MoneyInput, formatMoney | Campo de monto en PEN (S/) o USD (US$) que devuelve un número; acepta punto o coma decimal y muestra 1,250.50 al salir. Incluye formatMoney(). |
53
- | [`@rubenpazch/month-navigator`](#rubenpazchmonth-navigator) | Navegación | MonthNavigator, addMonths, currentMonth | Navegador de periodos ‹ noviembre de 2026 › con valor "AAAA-MM", mínimo, máximo y botón Hoy; incluye addMonths() y currentMonth(). |
54
- | [`@rubenpazch/numeric-picker`](#rubenpazchnumeric-picker) | Formularios | NumericPicker | Campo numérico con mínimo, máximo, paso, decimales y moneda. |
55
- | [`@rubenpazch/numeric-up-picker`](#rubenpazchnumeric-up-picker) | Formularios | NumericUpPicker | Campo numérico con botones +/-, signo opcional, solo enteros, ayuda, advertencia y error. |
56
- | [`@rubenpazch/overlay-loader`](#rubenpazchoverlay-loader) | Retroalimentación | OverlayLoader, InlineLoader | OverlayLoader (pantalla completa, controlado por visible) e InlineLoader (dentro de un contenedor). |
57
- | [`@rubenpazch/page-header`](#rubenpazchpage-header) | Navegación | PageHeader | Cabecera de página: migas de pan, volver, título h1, subtítulo, acciones y contenido extra (filtros); acepta el Link de Next.js. |
58
- | [`@rubenpazch/pagination`](#rubenpazchpagination) | Navegación | Pagination, PaginationItem | Paginación con variantes, tamaños y formas; incluye PaginationItem. |
59
- | [`@rubenpazch/patient-details`](#rubenpazchpatient-details) | Salud (pacientes y óptica) | PatientDetails | OBSOLETO. Ficha de paciente: identificación, contacto, contacto de emergencia, ubicación (departamento/provincia/distrito) e historia clínica. Textos por la prop labels. |
60
- | [`@rubenpazch/patient-search`](#rubenpazchpatient-search) | Salud (pacientes y óptica) | PatientSearch | OBSOLETO. Buscador de pacientes con resultados y selección. |
61
- | [`@rubenpazch/phone-input`](#rubenpazchphone-input) | Formularios | PhoneInput, DEFAULT_PHONE_INPUT_LABELS, PHONE_COUNTRIES, formatPhone, isValidPhone, phoneDigits | Teléfono con país: selector de prefijo (+51 por defecto) y número que se formatea al escribir con la máscara del país; valida los dígitos y muestra el número internacional. |
62
- | [`@rubenpazch/pin-input`](#rubenpazchpin-input) | Formularios | PinInput | PinInput: código de verificación (OTP) o PIN en casillas, con avance automático, pegar el código completo, autocompletado del SMS (one-time-code) y onComplete. |
63
- | [`@rubenpazch/prescription-card`](#rubenpazchprescription-card) | Salud (pacientes y óptica) | PrescriptionCard | OBSOLETO. Tarjeta de receta óptica completa (OD/OI: esfera, cilindro, eje, adición, DNP, prisma, altura) con estado y observaciones. |
64
- | [`@rubenpazch/prescription-eye-card`](#rubenpazchprescription-eye-card) | Salud (pacientes y óptica) | PrescriptionEyeCard | OBSOLETO. Datos de un ojo de la receta óptica (PrescriptionEyeCard) y campo individual (PrescriptionFieldCard). |
65
- | [`@rubenpazch/progress-bar`](#rubenpazchprogress-bar) | Retroalimentación | ProgressBar | Barra de progreso (role="progressbar") con etiqueta y porcentaje, determinada o indeterminada. |
66
- | [`@rubenpazch/radio-button`](#rubenpazchradio-button) | Formularios | RadioButton, RadioGroup | RadioButton y RadioGroup accesibles con variantes y validación. |
67
- | [`@rubenpazch/segmented-control`](#rubenpazchsegmented-control) | Formularios | SegmentedControl | Botones unidos para elegir una opción entre pocas (radiogroup con flechas del teclado): Personal \| Empresa, Mes \| Año. |
68
- | [`@rubenpazch/select`](#rubenpazchselect) | Formularios | Select | Lista desplegable simple con etiqueta, placeholder y error. |
69
- | [`@rubenpazch/shared`](#rubenpazchshared) | Base (tokens y utilidades) | classList, normalizeSize, toLegacySize, useFieldIds, useEscapeKey, useFocusTrap, … | Utilidades (classList) y tipos comunes; la usan internamente los componentes. |
70
- | [`@rubenpazch/sidebar`](#rubenpazchsidebar) | Navegación | Sidebar | Barra de navegación vertical: secciones, subniveles plegables, insignias y página activa (también subrutas); en escritorio se colapsa a iconos y lo recuerda (storageKey); en móvil es un cajón con foco retenido y Escape. Acepta el Link de Next.js. |
71
- | [`@rubenpazch/skeleton`](#rubenpazchskeleton) | Retroalimentación | Skeleton | Marcador de carga (texto, bloque o círculo) con la forma del contenido; respeta reducir movimiento. |
72
- | [`@rubenpazch/stepper`](#rubenpazchstepper) | Navegación | Stepper | Indicador de pasos numerados (opcionalmente clicables) para procesos en etapas. |
73
- | [`@rubenpazch/switch`](#rubenpazchswitch) | Formularios | Switch | Interruptor encendido/apagado (role="switch") con etiqueta y descripción. |
74
- | [`@rubenpazch/tabs`](#rubenpazchtabs) | Navegación | Tabs | Pestañas para alternar entre secciones de una misma vista. |
75
- | [`@rubenpazch/text-input`](#rubenpazchtext-input) | Formularios | TextInput | Campo de texto con etiqueta, ayuda, advertencia, error, iconos y variantes. |
76
- | [`@rubenpazch/textarea`](#rubenpazchtextarea) | Formularios | Textarea | Área de texto con etiqueta, ayuda, advertencia, error, contador de caracteres y crecimiento automático. |
77
- | [`@rubenpazch/timeline`](#rubenpazchtimeline) | Presentación de datos | Timeline | Línea de tiempo vertical: historial de un trámite, pedido o expediente (eventos con estado, fecha y descripción). |
78
- | [`@rubenpazch/toast`](#rubenpazchtoast) | Retroalimentación | ToastBanner, ToastProvider, ToastRegion, useToast | Notificaciones temporales (Toast) y avisos fijos (ToastBanner) con tipos y acciones. |
79
- | [`@rubenpazch/tokens`](#rubenpazchtokens) | Base (tokens y utilidades) | cssVar, fontFamily, fontSize, fontWeight, lineHeight, letterSpacing, … | Tokens de diseño (colores, tipografía, espacios, radios, sombras) como variables CSS --lb-*, estilos base y puente para Tailwind 4. |
80
- | [`@rubenpazch/tooltip`](#rubenpazchtooltip) | Presentación de datos | Tooltip | Texto de ayuda breve al pasar el mouse o enfocar con teclado (role="tooltip", aria-describedby), se cierra con Escape. |
81
- | [`@rubenpazch/turnstile`](#rubenpazchturnstile) | Formularios | Turnstile, TURNSTILE_SCRIPT, cargarTurnstile | Widget de Cloudflare Turnstile (anti-robots) para formularios públicos: carga el script una sola vez, entrega el token y se reinicia tras cada envío. |
82
- | [`@rubenpazch/user-card`](#rubenpazchuser-card) | Presentación de datos | UserCard, initials | Tarjeta de una persona (usuario, socio, cliente): avatar, nombre, correo u otro dato, etiquetas y acciones; las secundarias van en un menú ⋮. |
16
+ | Paquete | Categoría | Exporta | Qué es |
17
+ | ----------------------------------------------------------------------- | -------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
18
+ | [`@rubenpazch/alert`](#rubenpazchalert) | Retroalimentación | Alert | Aviso dentro de la página (info, success, warning, danger) con título, acción y cierre opcional. |
19
+ | [`@rubenpazch/app-shell`](#rubenpazchapp-shell) | Navegación | AppShell | Estructura completa de un panel: Sidebar colapsable, cabecera fija con botón ☰ en móvil, título y acciones, enlace "Saltar al contenido" y área principal con ancho máximo. |
20
+ | [`@rubenpazch/auth-gate`](#rubenpazchauth-gate) | Navegación | AuthGate, AuthScreen | Puerta de sesión: comprueba el token, confirma con el servidor (/me) y solo entonces pinta la app; mientras, una pantalla neutra. Sin sesión, va al login sin mostrar nada. |
21
+ | [`@rubenpazch/autocomplete`](#rubenpazchautocomplete) | Formularios | Autocomplete | Selector con búsqueda sobre una lista de opciones (con descripción, carga y opción de limpiar). |
22
+ | [`@rubenpazch/avatar`](#rubenpazchavatar) | Presentación de datos | Avatar, AvatarGroup | Avatar de persona (imagen, iniciales o icono) y AvatarGroup para varios. |
23
+ | [`@rubenpazch/badge`](#rubenpazchbadge) | Presentación de datos | Badge | Insignia de estado o categoría (Pagado, Vencido, Borrador) con colores semánticos, variantes soft/solid/outline y punto. |
24
+ | [`@rubenpazch/bottom-navigation`](#rubenpazchbottom-navigation) | Navegación | BottomNavigation | Barra fija abajo en el celular con 3 a 5 secciones principales (icono y texto); se oculta en pantallas anchas. |
25
+ | [`@rubenpazch/button`](#rubenpazchbutton) | Acciones | Button | Botón con variantes text/contained/outlined, colores, tamaños, estado de carga e iconos; puede renderizar un enlace (href). |
26
+ | [`@rubenpazch/card`](#rubenpazchcard) | Presentación de datos | Card, CardHeader, CardBody, CardFooter | Tarjeta (outlined o elevated) con CardHeader (título, subtítulo, acciones), CardBody y CardFooter; puede ser clicable. |
27
+ | [`@rubenpazch/checkbox-input`](#rubenpazchcheckbox-input) | Formularios | CheckboxInput, CheckboxGroup | Casilla de verificación con etiqueta, ayuda y error (CheckboxInput) y grupo de casillas con título, "Seleccionar todos" y máximo (CheckboxGroup). |
28
+ | [`@rubenpazch/chip`](#rubenpazchchip) | Presentación de datos | Chip | Chip/etiqueta con variantes, icono y acción de borrar. |
29
+ | [`@rubenpazch/collapsible`](#rubenpazchcollapsible) | Presentación de datos | Collapsible | Sección plegable con título: deja lo opcional oculto para acortar formularios y páginas. |
30
+ | [`@rubenpazch/confirmation-dialog`](#rubenpazchconfirmation-dialog) | Retroalimentación | ConfirmationDialog | Diálogo modal de confirmación (aceptar/cancelar). |
31
+ | [`@rubenpazch/data-table`](#rubenpazchdata-table) | Datos | DataTable | Tabla de datos accesible: columnas con render, orden (aria-sort) en el navegador o en el servidor, carga con Skeleton, estado vacío, filas clicables, encabezado fijo y scroll horizontal en móvil. |
32
+ | [`@rubenpazch/date-input`](#rubenpazchdate-input) | Formularios | DateInput | Campo de fecha con formato local, mínimo/máximo, ayuda y error. |
33
+ | [`@rubenpazch/date-picker`](#rubenpazchdate-picker) | Formularios | DatePicker | Selector de fecha con calendario desplegable. |
34
+ | [`@rubenpazch/date-range-picker`](#rubenpazchdate-range-picker) | Formularios | DateRangePicker, DEFAULT_DATE_RANGE_LABELS, DEFAULT_DATE_RANGE_PRESETS, rangoValido | Dos fechas (desde y hasta) con validación del orden y atajos (este mes, mes anterior, últimos 30 días…). Valores ISO AAAA-MM-DD. |
35
+ | [`@rubenpazch/description-list`](#rubenpazchdescription-list) | Presentación de datos | DescriptionList | Pares etiqueta/valor en columnas: resumen de un registro (datos de un trámite, de un cliente, de un pago). |
36
+ | [`@rubenpazch/draggable-list`](#rubenpazchdraggable-list) | Datos | DraggableList | Lista reordenable arrastrando (también con teclado), basada en dnd-kit. |
37
+ | [`@rubenpazch/drawer`](#rubenpazchdrawer) | Navegación | Drawer | Panel lateral (izquierda/derecha/arriba/abajo) con animación y fondo. |
38
+ | [`@rubenpazch/empty-state`](#rubenpazchempty-state) | Retroalimentación | EmptyState | Estado vacío con icono, título, descripción y acciones ("No hay convocatorias · Crear"). |
39
+ | [`@rubenpazch/file-upload`](#rubenpazchfile-upload) | Formularios | FileUpload, DEFAULT_FILE_UPLOAD_LABELS, aceptaArchivo | Zona para subir uno o varios archivos (arrastrar y soltar o elegir), con validación de tipo, tamaño y cantidad, y lista para quitarlos. |
40
+ | [`@rubenpazch/form-field`](#rubenpazchform-field) | Formularios | FormField, FormRow, FormActions | FormField (etiqueta, ayuda y error asociados a cualquier control), FormRow (columnas que se apilan en móvil) y FormActions (pie con botones). |
41
+ | [`@rubenpazch/icon-button`](#rubenpazchicon-button) | Acciones | IconButton | Botón de solo icono con variantes, formas, tooltip y etiqueta accesible. |
42
+ | [`@rubenpazch/icons`](#rubenpazchicons) | Iconos | ArrowDetailsIcon, ArchiveIcon, BrandingIcon, BusinessPlanIcon, CalendarIcon, CheckIcon, … | Más de 60 iconos SVG como componentes React (y MaterialIcon para Material Icons). |
43
+ | [`@rubenpazch/identification-input`](#rubenpazchidentification-input) | Salud (pacientes y óptica) | IdentificationInput, DEFAULT_IDENTIFICATION_LABELS | Tipo y número de documento peruano (DNI, CE, pasaporte) con validación de longitud y formato. |
44
+ | [`@rubenpazch/image-upload`](#rubenpazchimage-upload) | Formularios | ImageUpload, DEFAULT_IMAGE_UPLOAD_LABELS | Subida de imagen o PDF con vista previa, arrastrar y soltar, validación de tipo y tamaño. |
45
+ | [`@rubenpazch/image-viewer`](#rubenpazchimage-viewer) | Presentación de datos | ImageViewer, DEFAULT_IMAGE_VIEWER_LABELS | Visor de imágenes a pantalla completa con zoom (botones, rueda, pellizco, doble toque), arrastre y paso entre imágenes por flechas, teclado o deslizando. |
46
+ | [`@rubenpazch/info-row`](#rubenpazchinfo-row) | Presentación de datos | InfoRow | Fila de dato con icono, etiqueta y valor (variantes de color, tamaños, acción opcional). |
47
+ | [`@rubenpazch/layout`](#rubenpazchlayout) | Maquetación (layout) | Flex, Stack, Inline, Spacer, Grid, GridItem, … | Maquetación solo con props (sin escribir CSS): Flex (fila o columna con gap, align y justify), Stack (vertical), Inline (horizontal que se ajusta), Center (centrar en uno o ambos ejes), Grid/GridItem (columnas fijas o automáticas), Container (ancho máximo de página) y Spacer. Todas las props aceptan valores por punto de quiebre: { base, sm, md, lg, xl }. |
48
+ | [`@rubenpazch/list`](#rubenpazchlist) | Presentación de datos | List, ListItem | Lista vertical de filas (icono, título, detalle y estado a la derecha), clicables o enlaces. |
49
+ | [`@rubenpazch/loading-spinner`](#rubenpazchloading-spinner) | Retroalimentación | LoadingSpinner | Indicador de carga circular con tamaños y colores. |
50
+ | [`@rubenpazch/menu`](#rubenpazchmenu) | Acciones | Menu | Menú de acciones (role="menu") con botón ⋮ por defecto, opciones con icono, peligrosas o deshabilitadas, teclado completo. |
51
+ | [`@rubenpazch/modal`](#rubenpazchmodal) | Retroalimentación | Modal | Ventana modal accesible: portal, foco retenido, Escape y clic fuera para cerrar, bloqueo del scroll, título y descripción anunciados. |
52
+ | [`@rubenpazch/money-input`](#rubenpazchmoney-input) | Formularios | MoneyInput, formatMoney | Campo de monto en PEN (S/) o USD (US$) que devuelve un número; acepta punto o coma decimal y muestra 1,250.50 al salir. Incluye formatMoney(). |
53
+ | [`@rubenpazch/month-navigator`](#rubenpazchmonth-navigator) | Navegación | MonthNavigator, addMonths, currentMonth | Navegador de periodos ‹ noviembre de 2026 › con valor "AAAA-MM", mínimo, máximo y botón Hoy; incluye addMonths() y currentMonth(). |
54
+ | [`@rubenpazch/numeric-picker`](#rubenpazchnumeric-picker) | Formularios | NumericPicker | Campo numérico con mínimo, máximo, paso, decimales y moneda. |
55
+ | [`@rubenpazch/numeric-up-picker`](#rubenpazchnumeric-up-picker) | Formularios | NumericUpPicker | Campo numérico con botones +/-, signo opcional, solo enteros, ayuda, advertencia y error. |
56
+ | [`@rubenpazch/overlay-loader`](#rubenpazchoverlay-loader) | Retroalimentación | OverlayLoader, InlineLoader | OverlayLoader (pantalla completa, controlado por visible) e InlineLoader (dentro de un contenedor). |
57
+ | [`@rubenpazch/page-header`](#rubenpazchpage-header) | Navegación | PageHeader | Cabecera de página: migas de pan, volver, título h1, subtítulo, acciones y contenido extra (filtros); acepta el Link de Next.js. |
58
+ | [`@rubenpazch/pagination`](#rubenpazchpagination) | Navegación | Pagination, PaginationItem | Paginación con variantes, tamaños y formas; incluye PaginationItem. |
59
+ | [`@rubenpazch/patient-details`](#rubenpazchpatient-details) | Salud (pacientes y óptica) | PatientDetails | OBSOLETO. Ficha de paciente: identificación, contacto, contacto de emergencia, ubicación (departamento/provincia/distrito) e historia clínica. Textos por la prop labels. |
60
+ | [`@rubenpazch/patient-search`](#rubenpazchpatient-search) | Salud (pacientes y óptica) | PatientSearch | OBSOLETO. Buscador de pacientes con resultados y selección. |
61
+ | [`@rubenpazch/phone-input`](#rubenpazchphone-input) | Formularios | PhoneInput, DEFAULT_PHONE_INPUT_LABELS, PHONE_COUNTRIES, formatPhone, isValidPhone, phoneDigits, … | Teléfono con país: selector de prefijo (+51 por defecto) y número que se formatea al escribir con la máscara del país; valida los dígitos y muestra el número internacional. |
62
+ | [`@rubenpazch/pin-input`](#rubenpazchpin-input) | Formularios | PinInput | PinInput: código de verificación (OTP) o PIN en casillas, con avance automático, pegar el código completo, autocompletado del SMS (one-time-code) y onComplete. |
63
+ | [`@rubenpazch/prescription-card`](#rubenpazchprescription-card) | Salud (pacientes y óptica) | PrescriptionCard | OBSOLETO. Tarjeta de receta óptica completa (OD/OI: esfera, cilindro, eje, adición, DNP, prisma, altura) con estado y observaciones. |
64
+ | [`@rubenpazch/prescription-eye-card`](#rubenpazchprescription-eye-card) | Salud (pacientes y óptica) | PrescriptionEyeCard | OBSOLETO. Datos de un ojo de la receta óptica (PrescriptionEyeCard) y campo individual (PrescriptionFieldCard). |
65
+ | [`@rubenpazch/progress-bar`](#rubenpazchprogress-bar) | Retroalimentación | ProgressBar | Barra de progreso (role="progressbar") con etiqueta y porcentaje, determinada o indeterminada. |
66
+ | [`@rubenpazch/radio-button`](#rubenpazchradio-button) | Formularios | RadioButton, RadioGroup | RadioButton y RadioGroup accesibles con variantes y validación. |
67
+ | [`@rubenpazch/segmented-control`](#rubenpazchsegmented-control) | Formularios | SegmentedControl | Botones unidos para elegir una opción entre pocas (radiogroup con flechas del teclado): Personal \| Empresa, Mes \| Año. |
68
+ | [`@rubenpazch/select`](#rubenpazchselect) | Formularios | Select | Lista desplegable simple con etiqueta, placeholder y error. |
69
+ | [`@rubenpazch/shared`](#rubenpazchshared) | Base (tokens y utilidades) | classList, normalizeSize, toLegacySize, useFieldIds, useEscapeKey, useFocusTrap, … | Utilidades (classList) y tipos comunes; la usan internamente los componentes. |
70
+ | [`@rubenpazch/sidebar`](#rubenpazchsidebar) | Navegación | Sidebar | Barra de navegación vertical: secciones, subniveles plegables, insignias y página activa (también subrutas); en escritorio se colapsa a iconos y lo recuerda (storageKey); en móvil es un cajón con foco retenido y Escape. Acepta el Link de Next.js. |
71
+ | [`@rubenpazch/skeleton`](#rubenpazchskeleton) | Retroalimentación | Skeleton | Marcador de carga (texto, bloque o círculo) con la forma del contenido; respeta reducir movimiento. |
72
+ | [`@rubenpazch/stepper`](#rubenpazchstepper) | Navegación | Stepper | Indicador de pasos numerados (opcionalmente clicables) para procesos en etapas. |
73
+ | [`@rubenpazch/switch`](#rubenpazchswitch) | Formularios | Switch | Interruptor encendido/apagado (role="switch") con etiqueta y descripción. |
74
+ | [`@rubenpazch/tabs`](#rubenpazchtabs) | Navegación | Tabs | Pestañas para alternar entre secciones de una misma vista. |
75
+ | [`@rubenpazch/text-input`](#rubenpazchtext-input) | Formularios | TextInput | Campo de texto con etiqueta, ayuda, advertencia, error, iconos y variantes. |
76
+ | [`@rubenpazch/textarea`](#rubenpazchtextarea) | Formularios | Textarea | Área de texto con etiqueta, ayuda, advertencia, error, contador de caracteres y crecimiento automático. |
77
+ | [`@rubenpazch/timeline`](#rubenpazchtimeline) | Presentación de datos | Timeline | Línea de tiempo vertical: historial de un trámite, pedido o expediente (eventos con estado, fecha y descripción). |
78
+ | [`@rubenpazch/toast`](#rubenpazchtoast) | Retroalimentación | ToastBanner, ToastProvider, ToastRegion, useToast | Notificaciones temporales (Toast) y avisos fijos (ToastBanner) con tipos y acciones. |
79
+ | [`@rubenpazch/tokens`](#rubenpazchtokens) | Base (tokens y utilidades) | cssVar, fontFamily, fontSize, fontWeight, lineHeight, letterSpacing, … | Tokens de diseño (colores, tipografía, espacios, radios, sombras) como variables CSS --lb-*, estilos base y puente para Tailwind 4. |
80
+ | [`@rubenpazch/tooltip`](#rubenpazchtooltip) | Presentación de datos | Tooltip | Texto de ayuda breve al pasar el mouse o enfocar con teclado (role="tooltip", aria-describedby), se cierra con Escape. |
81
+ | [`@rubenpazch/turnstile`](#rubenpazchturnstile) | Formularios | Turnstile, TURNSTILE_SCRIPT, cargarTurnstile | Widget de Cloudflare Turnstile (anti-robots) para formularios públicos: carga el script una sola vez, entrega el token y se reinicia tras cada envío. |
82
+ | [`@rubenpazch/user-card`](#rubenpazchuser-card) | Presentación de datos | UserCard, initials | Tarjeta de una persona (usuario, socio, cliente): avatar, nombre, correo u otro dato, etiquetas y acciones; las secundarias van en un menú ⋮. |
83
83
 
84
84
  ## Base (tokens y utilidades)
85
85
 
@@ -90,9 +90,9 @@ Utilidades (classList) y tipos comunes; la usan internamente los componentes.
90
90
  - **Usar cuando:** Solo si construyes un componente nuevo dentro de la librería.
91
91
  - **Evitar cuando:** En las apps: no hace falta importarla.
92
92
 
93
- Otras exportaciones: `classList`, `normalizeSize`, `toLegacySize`, `useFieldIds`, `useEscapeKey`, `useFocusTrap`, `useLockBodyScroll`, `useClickOutside`, `mergeRefs`, `useMediaQuery`, `MOBILE_QUERY`, `parseISODate`, `toISODate`, `isDayFirst`, `datePlaceholder`, `parseLocalDate`, `formatLocalDate`, `formatMonthYear`, `isSameDay`.
93
+ Otras exportaciones: `classList`, `normalizeSize`, `toLegacySize`, `useFieldIds`, `useEscapeKey`, `useFocusTrap`, `useLockBodyScroll`, `useClickOutside`, `mergeRefs`, `useMediaQuery`, `MOBILE_QUERY`, `parseISODate`, `toISODate`, `isDayFirst`, `datePlaceholder`, `parseLocalDate`, `formatLocalDate`, `formatMonthYear`, `shortWeekdays`, `shortMonths`, `isSameDay`, `uiMessagesEs`, `uiMessagesEn`, `UiLocaleProvider`, `useUiLocale`, `useUiMessages`, `getUiMessages`, `formatMessage`, `DEFAULT_INTL_LOCALE`, `uiLocaleOf`.
94
94
 
95
- Tipos: `Size`, `Color`, `Variant`, `ComponentSize`, `LegacySize`, `SizeProp`, `FieldProps`, `FieldIds`.
95
+ Tipos: `Size`, `Color`, `Variant`, `ComponentSize`, `LegacySize`, `SizeProp`, `FieldProps`, `FieldIds`, `UiMessages`, `UiMessageSection`, `UiLocale`, `UiLocaleProviderProps`, `UiMessagesOverrides`.
96
96
 
97
97
  ### @rubenpazch/tokens
98
98
 
@@ -363,12 +363,13 @@ Enter y Escape; se cierra al elegir o al hacer clic fuera.
363
363
  import { Menu } from "@rubenpazch/ui";
364
364
  ```
365
365
 
366
- | Prop | Tipo | Req. | Por defecto | Descripción |
367
- | --------- | ------------------ | ---- | -------------- | ------------------------------------------------------------------------------ |
368
- | `items` | `MenuItem[]` | sí | | Opciones del menú. |
369
- | `align` | `"start" \| "end"` | | `end` | Alineación del panel respecto al botón: end (por defecto) o start. |
370
- | `label` | `string` | | `Más opciones` | Texto accesible del botón por defecto (por defecto "Más opciones"). |
371
- | `trigger` | `ReactNode` | | | Botón que lo abre. Por defecto un botón "⋮" con el texto accesible de `label`. |
366
+ | Prop | Tipo | Req. | Por defecto | Descripción |
367
+ | --------- | ----------------------------- | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
368
+ | `items` | `MenuItem[]` | sí | | Opciones del menú. |
369
+ | `align` | `"start" \| "end"` | | `end` | Alineación del panel respecto al botón: end (por defecto) o start. |
370
+ | `label` | `string` | | | Texto accesible del botón por defecto (por defecto "Más opciones"). |
371
+ | `labels` | `Partial<{ label: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
372
+ | `trigger` | `ReactNode` | | | Botón que lo abre. Por defecto un botón "⋮" con el texto accesible de `label`. |
372
373
 
373
374
  Tipos: `MenuProps`, `MenuItem`.
374
375
 
@@ -389,43 +390,43 @@ Selector con búsqueda (combobox accesible): filtra mientras se escribe, teclado
389
390
  import { Autocomplete } from "@rubenpazch/ui";
390
391
  ```
391
392
 
392
- | Prop | Tipo | Req. | Por defecto | Descripción |
393
- | ----------------- | ------------------------------------------------------------------------------------- | ---- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
394
- | `onChange` | `(value: string \| number \| null, option?: AutocompleteOption \| undefined) => void` | sí | | |
395
- | `value` | `null \| string \| number` | sí | | |
396
- | `className` | `string` | | `` | |
397
- | `clearable` | `boolean` | | `true` | |
398
- | `createLabel` | `string` | | `Crear` | |
399
- | `debounceMs` | `number` | | `300` | |
400
- | `disabled` | `boolean` | | `false` | |
401
- | `error` | `string` | | | |
402
- | `freeSolo` | `boolean` | | `false` | Texto libre con sugerencias: el valor es lo escrito (`onChange(texto)` en cada cambio) y las opciones solo ayudan a completarlo. Útil para un destinatario que puede ser un usuario de la lista o un nombre externo. Escape, Tab y salir del campo no borran lo escrito. |
403
- | `highlightMatch` | `boolean` | | `true` | |
404
- | `hint` | `string` | | | |
405
- | `icon` | `ReactNode` | | | |
406
- | `id` | `string` | | | id del input; si no se pasa se genera uno. |
407
- | `keepListOpen` | `boolean` | | `false` | |
408
- | `label` | `string` | | | |
409
- | `labelAction` | `ReactNode` | | | Contenido junto a la etiqueta, a la derecha: un botón de ayuda ("?"), un enlace… No va dentro del `<label>`. |
410
- | `labels` | `Partial<{ clear: string; open: string; close: string; }>` | | | Textos accesibles de los botones. |
411
- | `loading` | `boolean` | | `false` | |
412
- | `loadingText` | `string` | | `Cargando…` | |
413
- | `maxHeight` | `string` | | `300px` | |
414
- | `minSearchLength` | `number` | | `0` | |
415
- | `name` | `string` | | | name del input. |
416
- | `noResultsText` | `string` | | `Sin resultados` | |
417
- | `onBlur` | `() => void` | | | |
418
- | `onCreate` | `(searchTerm: string) => void` | | | |
419
- | `onFocus` | `() => void` | | | |
420
- | `onSearch` | `(searchTerm: string) => void` | | | |
421
- | `options` | `AutocompleteOption[]` | | `[]` | |
422
- | `placeholder` | `string` | | `Buscar o seleccionar…` | |
423
- | `position` | `"bottom" \| "top"` | | `bottom` | |
424
- | `readOnly` | `boolean` | | `false` | |
425
- | `renderOption` | `(option: AutocompleteOption, isSelected: boolean) => ReactNode` | | | |
426
- | `required` | `boolean` | | `false` | |
427
- | `searchable` | `boolean` | | `true` | |
428
- | `warning` | `string` | | | |
393
+ | Prop | Tipo | Req. | Por defecto | Descripción |
394
+ | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
395
+ | `onChange` | `(value: string \| number \| null, option?: AutocompleteOption \| undefined) => void` | sí | | |
396
+ | `value` | `null \| string \| number` | sí | | |
397
+ | `className` | `string` | | `` | |
398
+ | `clearable` | `boolean` | | `true` | |
399
+ | `createLabel` | `string` | | | |
400
+ | `debounceMs` | `number` | | `300` | |
401
+ | `disabled` | `boolean` | | `false` | |
402
+ | `error` | `string` | | | |
403
+ | `freeSolo` | `boolean` | | `false` | Texto libre con sugerencias: el valor es lo escrito (`onChange(texto)` en cada cambio) y las opciones solo ayudan a completarlo. Útil para un destinatario que puede ser un usuario de la lista o un nombre externo. Escape, Tab y salir del campo no borran lo escrito. |
404
+ | `highlightMatch` | `boolean` | | `true` | |
405
+ | `hint` | `string` | | | |
406
+ | `icon` | `ReactNode` | | | |
407
+ | `id` | `string` | | | id del input; si no se pasa se genera uno. |
408
+ | `keepListOpen` | `boolean` | | `false` | |
409
+ | `label` | `string` | | | |
410
+ | `labelAction` | `ReactNode` | | | Contenido junto a la etiqueta, a la derecha: un botón de ayuda ("?"), un enlace… No va dentro del `<label>`. |
411
+ | `labels` | `Partial<{ placeholder: string; create: string; noResults: string; loading: string; clear: string; open: string; close: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`): `placeholder`, `create`, `noResults`, `loading`, `clear`, `open` y `close`. |
412
+ | `loading` | `boolean` | | `false` | |
413
+ | `loadingText` | `string` | | | |
414
+ | `maxHeight` | `string` | | `300px` | |
415
+ | `minSearchLength` | `number` | | `0` | |
416
+ | `name` | `string` | | | name del input. |
417
+ | `noResultsText` | `string` | | | |
418
+ | `onBlur` | `() => void` | | | |
419
+ | `onCreate` | `(searchTerm: string) => void` | | | |
420
+ | `onFocus` | `() => void` | | | |
421
+ | `onSearch` | `(searchTerm: string) => void` | | | |
422
+ | `options` | `AutocompleteOption[]` | | `[]` | |
423
+ | `placeholder` | `string` | | | |
424
+ | `position` | `"bottom" \| "top"` | | `bottom` | |
425
+ | `readOnly` | `boolean` | | `false` | |
426
+ | `renderOption` | `(option: AutocompleteOption, isSelected: boolean) => ReactNode` | | | |
427
+ | `required` | `boolean` | | `false` | |
428
+ | `searchable` | `boolean` | | `true` | |
429
+ | `warning` | `string` | | | |
429
430
 
430
431
  Tipos: `AutocompleteOption`, `AutocompleteProps`.
431
432
 
@@ -483,6 +484,7 @@ import { CheckboxGroup } from "@rubenpazch/ui";
483
484
  | `hideLabel` | `boolean` | | `false` | Ocultar el título visualmente (sigue disponible para lectores de pantalla). |
484
485
  | `hint` | `string` | | | Texto de ayuda bajo el título. |
485
486
  | `id` | `string` | | | id del fieldset; si no se pasa se genera uno. |
487
+ | `labels` | `Partial<{ selectAll: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
486
488
  | `maxSelected` | `number` | | | Máximo de opciones marcadas: al llegar, las demás se deshabilitan. |
487
489
  | `name` | `string` | | | name de cada casilla (formularios nativos: se envía una vez por valor marcado). |
488
490
  | `orientation` | `"vertical" \| "horizontal"` | | `vertical` | `vertical` (por defecto) o `horizontal` (se ajusta a la siguiente línea). |
@@ -519,8 +521,8 @@ import { DateInput } from "@rubenpazch/ui";
519
521
  | `hint` | `string` | | | Texto de ayuda. |
520
522
  | `id` | `string` | | | id del input; si no se pasa se genera uno (la etiqueta se asocia sola). |
521
523
  | `label` | `string` | | | Etiqueta visible. |
522
- | `labels` | `Partial<DateInputLabels>` | | | Textos del calendario; por defecto en el idioma de `locale`. |
523
- | `locale` | `string` | | `es` | Idioma: `es` (por defecto, día/mes) o `en` (mes/día). |
524
+ | `labels` | `Partial<DateInputLabels>` | | | Textos del calendario; por defecto en el idioma de `locale` o del proveedor. |
525
+ | `locale` | `string` | | | Idioma y formato: `es` (día/mes) o `en` (mes/día). Por defecto, el de `UiLocaleProvider` (sin proveedor, `es-PE`). |
524
526
  | `maxDate` | `string` | | | Fecha máxima seleccionable (ISO). |
525
527
  | `minDate` | `string` | | | Fecha mínima seleccionable (ISO). |
526
528
  | `mobileFullScreen` | `boolean` | | `true` | En pantallas pequeñas (< 640 px) el calendario se abre a pantalla completa y vuelve al campo al elegir la fecha. Por defecto true. |
@@ -555,12 +557,13 @@ import { DatePicker } from "@rubenpazch/ui";
555
557
  | `hint` | `string` | | | |
556
558
  | `id` | `string` | | | id del input; si no se pasa se genera uno (la etiqueta se asocia sola). |
557
559
  | `label` | `string` | | | |
558
- | `locale` | `string` | | `es` | |
560
+ | `labels` | `enum` | | | Textos de la interfaz; por defecto en el idioma de `locale` o del proveedor. |
561
+ | `locale` | `string` | | | Idioma y formato: `es` (día/mes) o `en` (mes/día). Por defecto, el de `UiLocaleProvider` (sin proveedor, `es-PE`). |
559
562
  | `maxDate` | `string` | | | |
560
563
  | `minDate` | `string` | | | |
561
564
  | `mobileFullScreen` | `boolean` | | `true` | En pantallas pequeñas (< 640 px) el calendario se abre a pantalla completa y vuelve al campo al elegir la fecha. Por defecto true. |
562
565
  | `name` | `string` | | | name del input. |
563
- | `openCalendarLabel` | `string` | | | Texto del botón que abre el calendario (accesibilidad). |
566
+ | `openCalendarLabel` | `string` | | | Texto del botón que abre el calendario (accesibilidad). @deprecated Usa `labels.openCalendar`. |
564
567
  | `placeholder` | `string` | | | |
565
568
  | `readOnly` | `boolean` | | `false` | |
566
569
  | `required` | `boolean` | | `false` | |
@@ -583,25 +586,27 @@ y limita cada calendario según la otra fecha.
583
586
  import { DateRangePicker } from "@rubenpazch/ui";
584
587
  ```
585
588
 
586
- | Prop | Tipo | Req. | Por defecto | Descripción |
587
- | ----------- | -------------------------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
588
- | `onChange` | `(range: DateRange) => void` | sí | | |
589
- | `value` | `DateRange` | sí | | |
590
- | `className` | `string` | | | |
591
- | `disabled` | `boolean` | | `false` | |
592
- | `error` | `string` | | | Error externo; si no hay, se muestra el de orden cuando corresponde. |
593
- | `hint` | `string` | | | |
594
- | `label` | `string` | | | Título del grupo (se usa como `<legend>`). |
595
- | `labels` | `Partial<DateRangePickerLabels>` | | | |
596
- | `locale` | `string` | | | |
597
- | `maxDate` | `string` | | | |
598
- | `minDate` | `string` | | | |
599
- | `presets` | `false \| DateRangePreset[]` | | `[ { label: "Hoy", range: (h) => rango(h, h) }, { label: "Últimos 7 días", range: (h) => rango(menos(h, 6), h) }, { label: "Últimos 30 días", range: (h) => rango(menos(h, 29), h) }, { label: "Este mes", range: (h) => rango( primerDia(h.getFullYear(), h.getMonth()), ultimoDia(h.getFullYear(), h.getMonth()), ), }, { label: "Mes anterior", range: (h) => rango( primerDia(h.getFullYear(), h.getMonth() - 1), ultimoDia(h.getFullYear(), h.getMonth() - 1), ), }, { label: "Este año", range: (h) => rango(new Date(h.getFullYear(), 0, 1), new Date(h.getFullYear(), 11, 31)), }, ]` | Atajos; `false` los oculta. Por defecto: hoy, 7/30 días, este mes, mes anterior, este año. |
600
- | `required` | `boolean` | | `false` | |
601
- | `today` | `Date` | | | Para pruebas: fecha que se toma como "hoy" en los atajos. |
589
+ | Prop | Tipo | Req. | Por defecto | Descripción |
590
+ | ----------- | -------------------------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
591
+ | `onChange` | `(range: DateRange) => void` | sí | | |
592
+ | `value` | `DateRange` | sí | | |
593
+ | `className` | `string` | | | |
594
+ | `disabled` | `boolean` | | `false` | |
595
+ | `error` | `string` | | | Error externo; si no hay, se muestra el de orden cuando corresponde. |
596
+ | `hint` | `string` | | | |
597
+ | `label` | `string` | | | Título del grupo (se usa como `<legend>`). |
598
+ | `labels` | `Partial<DateRangePickerLabels>` | | | |
599
+ | `locale` | `string` | | | |
600
+ | `maxDate` | `string` | | | |
601
+ | `minDate` | `string` | | | |
602
+ | `presets` | `false \| DateRangePreset[]` | | `[ { id: "today", label: textos.today, range: (h) => rango(h, h) }, { id: "last7Days", label: textos.last7Days, range: (h) => rango(menos(h, 6), h), }, { id: "last30Days", label: textos.last30Days, range: (h) => rango(menos(h, 29), h), }, { id: "thisMonth", label: textos.thisMonth, range: (h) => rango( primerDia(h.getFullYear(), h.getMonth()), ultimoDia(h.getFullYear(), h.getMonth()), ), }, { id: "previousMonth", label: textos.previousMonth, range: (h) => rango( primerDia(h.getFullYear(), h.getMonth() - 1), ultimoDia(h.getFullYear(), h.getMonth() - 1), ), }, { id: "thisYear", label: textos.thisYear, range: (h) => rango(new Date(h.getFullYear(), 0, 1), new Date(h.getFullYear(), 11, 31)), }, ]` | Atajos; `false` los oculta. Por defecto: hoy, 7/30 días, este mes, mes anterior, este año. |
603
+ | `required` | `boolean` | | `false` | |
604
+ | `today` | `Date` | | | Para pruebas: fecha que se toma como "hoy" en los atajos. |
602
605
 
603
606
  #### DEFAULT_DATE_RANGE_LABELS
604
607
 
608
+ Textos en castellano (los del diccionario `es`). Con `UiLocaleProvider` cambian solos.
609
+
605
610
  ```tsx
606
611
  import { DEFAULT_DATE_RANGE_LABELS } from "@rubenpazch/ui";
607
612
  ```
@@ -620,7 +625,7 @@ _Sin props documentadas._
620
625
 
621
626
  Otras exportaciones: `rangoValido`.
622
627
 
623
- Tipos: `DateRange`, `DateRangePickerLabels`, `DateRangePickerProps`, `DateRangePreset`.
628
+ Tipos: `DateRange`, `DateRangePickerLabels`, `DateRangePickerProps`, `DateRangePreset`, `DateRangePresetId`.
624
629
 
625
630
  ### @rubenpazch/file-upload
626
631
 
@@ -660,6 +665,8 @@ import { FileUpload } from "@rubenpazch/ui";
660
665
 
661
666
  #### DEFAULT_FILE_UPLOAD_LABELS
662
667
 
668
+ Textos en castellano (los del diccionario `es`). Con `UiLocaleProvider` cambian solos.
669
+
663
670
  ```tsx
664
671
  import { DEFAULT_FILE_UPLOAD_LABELS } from "@rubenpazch/ui";
665
672
  ```
@@ -765,6 +772,8 @@ import { ImageUpload } from "@rubenpazch/ui";
765
772
 
766
773
  #### DEFAULT_IMAGE_UPLOAD_LABELS
767
774
 
775
+ Textos en castellano (los del diccionario `es`). Con `UiLocaleProvider` cambian solos.
776
+
768
777
  ```tsx
769
778
  import { DEFAULT_IMAGE_UPLOAD_LABELS } from "@rubenpazch/ui";
770
779
  ```
@@ -789,25 +798,26 @@ muestra "1,250.50". Devuelve siempre un número (no texto).
789
798
  import { MoneyInput } from "@rubenpazch/ui";
790
799
  ```
791
800
 
792
- | Prop | Tipo | Req. | Por defecto | Descripción |
793
- | --------------- | --------------------------------- | ---- | ----------- | ---------------------------------------------------------------------------- |
794
- | `onChange` | `(value: number \| null) => void` | sí | | Recibe el monto como número, o null si se borra. |
795
- | `value` | `null \| number` | sí | | Monto actual como número (o null si está vacío). |
796
- | `allowNegative` | `boolean` | | `false` | Permite montos negativos (por defecto no). |
797
- | `className` | `string` | | | Clase extra para el contenedor (márgenes, ancho). |
798
- | `currency` | `"PEN" \| "USD"` | | `PEN` | PEN (por defecto, S/) o USD (US$). |
799
- | `decimals` | `number` | | `2` | Decimales (por defecto 2). |
800
- | `disabled` | `boolean` | | `false` | Campo deshabilitado. |
801
- | `error` | `string` | | | Mensaje de error; marca el campo como inválido. |
802
- | `hint` | `string` | | | Texto de ayuda bajo el campo. |
803
- | `id` | `string` | | | id del control. Si no se pasa, se genera uno. |
804
- | `label` | `string` | | | Etiqueta visible del campo (se asocia al control para lectores de pantalla). |
805
- | `max` | `number` | | | Máximo. |
806
- | `min` | `number` | | `0` | Mínimo (por defecto 0). |
807
- | `name` | `string` | | | name del control (formularios nativos y librerías de formularios). |
808
- | `placeholder` | `string` | | `0.00` | Texto de ejemplo. |
809
- | `required` | `boolean` | | `false` | Campo obligatorio: muestra * y marca el control como requerido. |
810
- | `warning` | `string` | | | Advertencia (no bloquea). |
801
+ | Prop | Tipo | Req. | Por defecto | Descripción |
802
+ | --------------- | ---------------------------------------------------- | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
803
+ | `onChange` | `(value: number \| null) => void` | sí | | Recibe el monto como número, o null si se borra. |
804
+ | `value` | `null \| number` | sí | | Monto actual como número (o null si está vacío). |
805
+ | `allowNegative` | `boolean` | | `false` | Permite montos negativos (por defecto no). |
806
+ | `className` | `string` | | | Clase extra para el contenedor (márgenes, ancho). |
807
+ | `currency` | `"PEN" \| "USD"` | | `PEN` | PEN (por defecto, S/) o USD (US$). |
808
+ | `decimals` | `number` | | `2` | Decimales (por defecto 2). |
809
+ | `disabled` | `boolean` | | `false` | Campo deshabilitado. |
810
+ | `error` | `string` | | | Mensaje de error; marca el campo como inválido. |
811
+ | `hint` | `string` | | | Texto de ayuda bajo el campo. |
812
+ | `id` | `string` | | | id del control. Si no se pasa, se genera uno. |
813
+ | `label` | `string` | | | Etiqueta visible del campo (se asocia al control para lectores de pantalla). |
814
+ | `labels` | `Partial<{ amountPEN: string; amountUSD: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
815
+ | `max` | `number` | | | Máximo. |
816
+ | `min` | `number` | | `0` | Mínimo (por defecto 0). |
817
+ | `name` | `string` | | | name del control (formularios nativos y librerías de formularios). |
818
+ | `placeholder` | `string` | | `0.00` | Texto de ejemplo. |
819
+ | `required` | `boolean` | | `false` | Campo obligatorio: muestra * y marca el control como requerido. |
820
+ | `warning` | `string` | | | Advertencia (no bloquea). |
811
821
 
812
822
  Otras exportaciones: `formatMoney`.
813
823
 
@@ -841,7 +851,7 @@ import { NumericPicker } from "@rubenpazch/ui";
841
851
  | `hint` | `string` | | | Texto de ayuda. |
842
852
  | `id` | `string` | | | id del input; si no se pasa se genera uno. |
843
853
  | `label` | `string` | | | Etiqueta visible (se asocia al input). |
844
- | `labels` | `Partial<{ increment: string; decrement: string; }>` | | | Textos accesibles de los botones. |
854
+ | `labels` | `Partial<{ increment: string; decrement: string; }>` | | | Textos (por defecto, los del idioma activo): `increment`, `decrement`. |
845
855
  | `max` | `number` | | `999999` | Máximo permitido. |
846
856
  | `min` | `number` | | `0` | Mínimo permitido. |
847
857
  | `name` | `string` | | | name del input. |
@@ -866,34 +876,34 @@ Campo numérico con botones − y +, signo opcional, solo enteros, ayuda, advert
866
876
  import { NumericUpPicker } from "@rubenpazch/ui";
867
877
  ```
868
878
 
869
- | Prop | Tipo | Req. | Por defecto | Descripción |
870
- | ----------------- | ----------------------------------------------------------------- | ---- | ----------- | ------------------------------------------ |
871
- | `onChange` | `(value: string) => void` | sí | | |
872
- | `value` | `string \| number` | sí | | |
873
- | `alwaysNegative` | `boolean` | | `false` | |
874
- | `className` | `string` | | `` | |
875
- | `clearable` | `boolean` | | `false` | |
876
- | `defaultToZero` | `boolean` | | `false` | |
877
- | `disabled` | `boolean` | | `false` | |
878
- | `error` | `string` | | | |
879
- | `hint` | `string` | | | |
880
- | `id` | `string` | | | id del input; si no se pasa se genera uno. |
881
- | `integerOnly` | `boolean` | | `false` | |
882
- | `label` | `string` | | | |
883
- | `labels` | `Partial<{ decrease: string; increase: string; clear: string; }>` | | | Textos accesibles de los botones. |
884
- | `max` | `number` | | | |
885
- | `min` | `number` | | | |
886
- | `name` | `string` | | | name del input. |
887
- | `onBlur` | `() => void` | | | |
888
- | `onClear` | `() => void` | | | |
889
- | `onFocus` | `() => void` | | | |
890
- | `placeholder` | `string` | | | |
891
- | `required` | `boolean` | | `false` | |
892
- | `showSign` | `boolean` | | `false` | |
893
- | `size` | `"sm" \| "md" \| "lg" \| "small" \| "medium" \| "large"` | | `md` | Tamaño: sm, md (por defecto) o lg. |
894
- | `step` | `number` | | `0.01` | |
895
- | `useMinAsDefault` | `boolean` | | `false` | |
896
- | `warning` | `string` | | | |
879
+ | Prop | Tipo | Req. | Por defecto | Descripción |
880
+ | ----------------- | ----------------------------------------------------------------- | ---- | ----------- | ----------------------------------------------------------------------------- |
881
+ | `onChange` | `(value: string) => void` | sí | | |
882
+ | `value` | `string \| number` | sí | | |
883
+ | `alwaysNegative` | `boolean` | | `false` | |
884
+ | `className` | `string` | | `` | |
885
+ | `clearable` | `boolean` | | `false` | |
886
+ | `defaultToZero` | `boolean` | | `false` | |
887
+ | `disabled` | `boolean` | | `false` | |
888
+ | `error` | `string` | | | |
889
+ | `hint` | `string` | | | |
890
+ | `id` | `string` | | | id del input; si no se pasa se genera uno. |
891
+ | `integerOnly` | `boolean` | | `false` | |
892
+ | `label` | `string` | | | |
893
+ | `labels` | `Partial<{ increase: string; decrease: string; clear: string; }>` | | | Textos (por defecto, los del idioma activo): `decrease`, `increase`, `clear`. |
894
+ | `max` | `number` | | | |
895
+ | `min` | `number` | | | |
896
+ | `name` | `string` | | | name del input. |
897
+ | `onBlur` | `() => void` | | | |
898
+ | `onClear` | `() => void` | | | |
899
+ | `onFocus` | `() => void` | | | |
900
+ | `placeholder` | `string` | | | |
901
+ | `required` | `boolean` | | `false` | |
902
+ | `showSign` | `boolean` | | `false` | |
903
+ | `size` | `"sm" \| "md" \| "lg" \| "small" \| "medium" \| "large"` | | `md` | Tamaño: sm, md (por defecto) o lg. |
904
+ | `step` | `number` | | `0.01` | |
905
+ | `useMinAsDefault` | `boolean` | | `false` | |
906
+ | `warning` | `string` | | | |
897
907
 
898
908
  Tipos: `NumericUpPickerProps`, `NumericUpPickerSize`.
899
909
 
@@ -915,29 +925,31 @@ va arriba del número.
915
925
  import { PhoneInput } from "@rubenpazch/ui";
916
926
  ```
917
927
 
918
- | Prop | Tipo | Req. | Por defecto | Descripción |
919
- | ------------------- | --------------------------- | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
920
- | `country` | `string` | sí | | Código del país elegido (`"PE"`). |
921
- | `onChange` | `(value: string) => void` | sí | | Recibe el número formateado con la máscara del país. |
922
- | `onCountryChange` | `(country: string) => void` | sí | | |
923
- | `value` | `string` | sí | | Número nacional ya formateado (lo que devuelve `onChange`). |
924
- | `className` | `string` | | | |
925
- | `countries` | `PhoneCountry[]` | | `[ { code: "PE", name: "Perú", dialCode: "+51", digits: 9, mask: "### ### ###" }, { code: "MX", name: "México", dialCode: "+52", digits: 10, mask: "### ### ####", }, { code: "CO", name: "Colombia", dialCode: "+57", digits: 10, mask: "### ### ####", }, { code: "CL", name: "Chile", dialCode: "+56", digits: 9, mask: "# #### ####", }, { code: "AR", name: "Argentina", dialCode: "+54", digits: 10, mask: "### ### ####", }, { code: "BR", name: "Brasil", dialCode: "+55", digits: 11, mask: "(##) ##### ####", }, { code: "ES", name: "España", dialCode: "+34", digits: 9, mask: "### ### ###", }, { code: "US", name: "Estados Unidos", dialCode: "+1", digits: 10, mask: "(###) ###-####", }, { code: "CA", name: "Canadá", dialCode: "+1", digits: 10, mask: "(###) ###-####", }, ]` | Países del selector; por defecto `PHONE_COUNTRIES`. |
926
- | `disabled` | `boolean` | | `false` | |
927
- | `error` | `string` | | | Error externo; tiene prioridad sobre el de formato. |
928
- | `hint` | `string` | | | Ayuda bajo el campo; por defecto, los dígitos que pide el país. |
929
- | `id` | `string` | | | |
930
- | `label` | `string` | | `Teléfono` | |
931
- | `labels` | `Partial<PhoneInputLabels>` | | | Textos de la interfaz; por defecto en español. |
932
- | `name` | `string` | | | `name` del campo del número (el país va en `${name}-pais`). |
933
- | `onBlur` | `() => void` | | | Al salir del campo del número (para marcarlo como "tocado"). |
934
- | `onFocus` | `() => void` | | | |
935
- | `required` | `boolean` | | `false` | |
936
- | `showInternational` | `boolean` | | `true` | Muestra el número completo con prefijo ("+51 912 345 678") cuando es válido. Por defecto `true`. |
937
- | `warning` | `string` | | | Advertencia que no bloquea el envío. |
928
+ | Prop | Tipo | Req. | Por defecto | Descripción |
929
+ | ------------------- | --------------------------- | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
930
+ | `country` | `string` | sí | | Código del país elegido (`"PE"`). |
931
+ | `onChange` | `(value: string) => void` | sí | | Recibe el número formateado con la máscara del país. |
932
+ | `onCountryChange` | `(country: string) => void` | sí | | |
933
+ | `value` | `string` | sí | | Número nacional ya formateado (lo que devuelve `onChange`). |
934
+ | `className` | `string` | | | |
935
+ | `countries` | `PhoneCountry[]` | | `[ { code: "PE", dialCode: "+51", digits: 9, mask: "### ### ###" }, { code: "MX", dialCode: "+52", digits: 10, mask: "### ### ####", }, { code: "CO", dialCode: "+57", digits: 10, mask: "### ### ####", }, { code: "CL", dialCode: "+56", digits: 9, mask: "# #### ####", }, { code: "AR", dialCode: "+54", digits: 10, mask: "### ### ####", }, { code: "BR", dialCode: "+55", digits: 11, mask: "(##) ##### ####", }, { code: "ES", dialCode: "+34", digits: 9, mask: "### ### ###", }, { code: "US", dialCode: "+1", digits: 10, mask: "(###) ###-####", }, { code: "CA", dialCode: "+1", digits: 10, mask: "(###) ###-####", }, ]` | Países del selector; por defecto `PHONE_COUNTRIES`. |
936
+ | `disabled` | `boolean` | | `false` | |
937
+ | `error` | `string` | | | Error externo; tiene prioridad sobre el de formato. |
938
+ | `hint` | `string` | | | Ayuda bajo el campo; por defecto, los dígitos que pide el país. |
939
+ | `id` | `string` | | | |
940
+ | `label` | `string` | | | |
941
+ | `labels` | `Partial<PhoneInputLabels>` | | | Textos de la interfaz; por defecto en español. |
942
+ | `name` | `string` | | | `name` del campo del número (el país va en `${name}-pais`). |
943
+ | `onBlur` | `() => void` | | | Al salir del campo del número (para marcarlo como "tocado"). |
944
+ | `onFocus` | `() => void` | | | |
945
+ | `required` | `boolean` | | `false` | |
946
+ | `showInternational` | `boolean` | | `true` | Muestra el número completo con prefijo ("+51 912 345 678") cuando es válido. Por defecto `true`. |
947
+ | `warning` | `string` | | | Advertencia que no bloquea el envío. |
938
948
 
939
949
  #### DEFAULT_PHONE_INPUT_LABELS
940
950
 
951
+ Textos en castellano (los del diccionario `es`). Con `UiLocaleProvider` cambian solos.
952
+
941
953
  ```tsx
942
954
  import { DEFAULT_PHONE_INPUT_LABELS } from "@rubenpazch/ui";
943
955
  ```
@@ -954,7 +966,7 @@ import { PHONE_COUNTRIES } from "@rubenpazch/ui";
954
966
 
955
967
  _Sin props documentadas._
956
968
 
957
- Otras exportaciones: `formatPhone`, `isValidPhone`, `phoneDigits`.
969
+ Otras exportaciones: `formatPhone`, `isValidPhone`, `phoneDigits`, `countryName`.
958
970
 
959
971
  Tipos: `PhoneInputProps`, `PhoneInputLabels`, `PhoneCountry`.
960
972
 
@@ -974,26 +986,27 @@ borrar, acepta pegar el código completo y el autocompletado del SMS en móviles
974
986
  import { PinInput } from "@rubenpazch/ui";
975
987
  ```
976
988
 
977
- | Prop | Tipo | Req. | Por defecto | Descripción |
978
- | ------------ | ------------------------------------------- | ---- | --------------------------------------- | ---------------------------------------------------------------------------------------------- |
979
- | `onChange` | `(value: string) => void` | sí | | Recibe el código cada vez que cambia. |
980
- | `value` | `string` | sí | | Código escrito hasta ahora (sin huecos: "12" son las dos primeras casillas). |
981
- | `autoFocus` | `boolean` | | `false` | Pone el foco en la primera casilla vacía al montar. |
982
- | `boxLabel` | `(index: number, length: number) => string` | | `(i, n) => `Carácter ${i + 1} de ${n}`` | Nombre accesible de cada casilla. Por defecto "Carácter 1 de 6". |
983
- | `className` | `string` | | | Clase extra del contenedor. |
984
- | `disabled` | `boolean` | | `false` | Deshabilita las casillas. |
985
- | `error` | `string` | | | Mensaje de error; marca las casillas en rojo. |
986
- | `groupSize` | `number` | | | Separa las casillas en grupos de este tamaño (3 → `123 – 456`). |
987
- | `hint` | `string` | | | Texto de ayuda ("Te lo enviamos por correo"). |
988
- | `id` | `string` | | | id de la primera casilla (la etiqueta apunta a ella). |
989
- | `label` | `string` | | | Etiqueta del grupo ("Código de verificación"). |
990
- | `length` | `number` | | `6` | Número de casillas. Por defecto 6. |
991
- | `mask` | `boolean` | | `false` | Oculta lo escrito como en una contraseña (PIN). |
992
- | `name` | `string` | | | name de un input oculto con el código completo (formularios nativos). |
993
- | `onComplete` | `(value: string) => void` | | | Se llama una vez cuando se completan todas las casillas (p. ej. para enviar). |
994
- | `required` | `boolean` | | `false` | Campo obligatorio. |
995
- | `size` | `"sm" \| "md" \| "lg"` | | `md` | Tamaño de las casillas. |
996
- | `type` | `"numeric" \| "alphanumeric"` | | `numeric` | `numeric` (solo dígitos, teclado numérico) o `alphanumeric` (letras y números, en mayúsculas). |
989
+ | Prop | Tipo | Req. | Por defecto | Descripción |
990
+ | ------------ | ------------------------------------------- | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
991
+ | `onChange` | `(value: string) => void` | sí | | Recibe el código cada vez que cambia. |
992
+ | `value` | `string` | sí | | Código escrito hasta ahora (sin huecos: "12" son las dos primeras casillas). |
993
+ | `autoFocus` | `boolean` | | `false` | Pone el foco en la primera casilla vacía al montar. |
994
+ | `boxLabel` | `(index: number, length: number) => string` | | | Nombre accesible de cada casilla. Por defecto "Carácter 1 de 6". |
995
+ | `className` | `string` | | | Clase extra del contenedor. |
996
+ | `disabled` | `boolean` | | `false` | Deshabilita las casillas. |
997
+ | `error` | `string` | | | Mensaje de error; marca las casillas en rojo. |
998
+ | `groupSize` | `number` | | | Separa las casillas en grupos de este tamaño (3 → `123 – 456`). |
999
+ | `hint` | `string` | | | Texto de ayuda ("Te lo enviamos por correo"). |
1000
+ | `id` | `string` | | | id de la primera casilla (la etiqueta apunta a ella). |
1001
+ | `label` | `string` | | | Etiqueta del grupo ("Código de verificación"). |
1002
+ | `labels` | `Partial<{ box: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
1003
+ | `length` | `number` | | `6` | Número de casillas. Por defecto 6. |
1004
+ | `mask` | `boolean` | | `false` | Oculta lo escrito como en una contraseña (PIN). |
1005
+ | `name` | `string` | | | name de un input oculto con el código completo (formularios nativos). |
1006
+ | `onComplete` | `(value: string) => void` | | | Se llama una vez cuando se completan todas las casillas (p. ej. para enviar). |
1007
+ | `required` | `boolean` | | `false` | Campo obligatorio. |
1008
+ | `size` | `"sm" \| "md" \| "lg"` | | `md` | Tamaño de las casillas. |
1009
+ | `type` | `"numeric" \| "alphanumeric"` | | `numeric` | `numeric` (solo dígitos, teclado numérico) o `alphanumeric` (letras y números, en mayúsculas). |
997
1010
 
998
1011
  Tipos: `PinInputProps`.
999
1012
 
@@ -1032,27 +1045,28 @@ import { RadioButton } from "@rubenpazch/ui";
1032
1045
  import { RadioGroup } from "@rubenpazch/ui";
1033
1046
  ```
1034
1047
 
1035
- | Prop | Tipo | Req. | Por defecto | Descripción |
1036
- | ------------------- | -------------------------------------------------------------- | ---- | --------------- | ------------------------------------------- |
1037
- | `name` | `string` | sí | | |
1038
- | `onChange` | `(value: string) => void` | sí | | |
1039
- | `options` | `RadioOption[]` | sí | | |
1040
- | `bordered` | `boolean` | | `false` | |
1041
- | `borderLabel` | `string` | | | |
1042
- | `className` | `string` | | `` | |
1043
- | `disabled` | `boolean` | | `false` | |
1044
- | `error` | `string` | | | |
1045
- | `groupLabel` | `string` | | | |
1046
- | `hint` | `string` | | | Texto de ayuda bajo el grupo. |
1047
- | `id` | `string` | | | |
1048
- | `label` | `string` | | | Etiqueta del grupo (alias de `groupLabel`). |
1049
- | `orientation` | `"vertical" \| "horizontal"` | | `vertical` | |
1050
- | `required` | `boolean` | | `false` | |
1051
- | `selectedLabelText` | `string` | | `Seleccionado:` | |
1052
- | `showSelectedLabel` | `boolean` | | `false` | |
1053
- | `size` | `"sm" \| "md" \| "lg"` | | `md` | |
1054
- | `value` | `string` | | | |
1055
- | `variant` | `"default" \| "primary" \| "success" \| "warning" \| "danger"` | | `default` | |
1048
+ | Prop | Tipo | Req. | Por defecto | Descripción |
1049
+ | ------------------- | -------------------------------------------------------------- | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
1050
+ | `name` | `string` | sí | | |
1051
+ | `onChange` | `(value: string) => void` | sí | | |
1052
+ | `options` | `RadioOption[]` | sí | | |
1053
+ | `bordered` | `boolean` | | `false` | |
1054
+ | `borderLabel` | `string` | | | |
1055
+ | `className` | `string` | | `` | |
1056
+ | `disabled` | `boolean` | | `false` | |
1057
+ | `error` | `string` | | | |
1058
+ | `groupLabel` | `string` | | | |
1059
+ | `hint` | `string` | | | Texto de ayuda bajo el grupo. |
1060
+ | `id` | `string` | | | |
1061
+ | `label` | `string` | | | Etiqueta del grupo (alias de `groupLabel`). |
1062
+ | `labels` | `Partial<{ selected: string; none: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
1063
+ | `orientation` | `"vertical" \| "horizontal"` | | `vertical` | |
1064
+ | `required` | `boolean` | | `false` | |
1065
+ | `selectedLabelText` | `string` | | | |
1066
+ | `showSelectedLabel` | `boolean` | | `false` | |
1067
+ | `size` | `"sm" \| "md" \| "lg"` | | `md` | |
1068
+ | `value` | `string` | | | |
1069
+ | `variant` | `"default" \| "primary" \| "success" \| "warning" \| "danger"` | | `default` | |
1056
1070
 
1057
1071
  Tipos: `RadioButtonProps`, `RadioSize`, `RadioVariant`, `RadioGroupProps`, `RadioOption`, `RadioGroupOrientation`.
1058
1072
 
@@ -1160,49 +1174,50 @@ Campo de texto con etiqueta, ayuda, advertencia, error, iconos y variantes.
1160
1174
  import { TextInput } from "@rubenpazch/ui";
1161
1175
  ```
1162
1176
 
1163
- | Prop | Tipo | Req. | Por defecto | Descripción |
1164
- | ------------------------ | --------------------------------------------------------------- | ---- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1165
- | `onChange` | `(value: string) => void` | sí | | |
1166
- | `value` | `string` | sí | | |
1167
- | `autoComplete` | `string` | | | |
1168
- | `className` | `string` | | `` | |
1169
- | `disabled` | `boolean` | | `false` | |
1170
- | `emailInvalidMessage` | `string` | | | |
1171
- | `emailSuggestionMessage` | `string` | | | |
1172
- | `emailValidMessage` | `string` | | | |
1173
- | `endAddon` | `ReactNode` | | | Bloque pegado a la derecha del campo: un texto (".pe", "kg") o un botón ("Buscar"). |
1174
- | `error` | `string` | | | |
1175
- | `hint` | `string` | | | |
1176
- | `icon` | `ReactNode` | | | |
1177
- | `id` | `string` | | | id del input; si no se pasa se genera uno (la etiqueta se asocia sola). |
1178
- | `label` | `string` | | | |
1179
- | `labelAction` | `ReactNode` | | | Contenido junto a la etiqueta, a la derecha: un botón de ayuda ("?"), un enlace ("¿Olvidaste tu contraseña?")… No va dentro del `<label>`. |
1180
- | `max` | `number` | | | |
1181
- | `maxLength` | `number` | | | |
1182
- | `min` | `number` | | | |
1183
- | `minLength` | `number` | | | |
1184
- | `minLengthMessage` | `string` | | | Inline error shown when the value is non-empty but shorter than `minLength`. |
1185
- | `name` | `string` | | | name del input (formularios nativos, react-hook-form…). |
1186
- | `onBlur` | `() => void` | | | |
1187
- | `onFocus` | `() => void` | | | |
1188
- | `onValidityChange` | `(isValid: boolean) => void` | | | Fires whenever the field's overall validity changes (respecting `required`, `validateEmail`, `minLength`, `maxLength`, `pattern` and `error`). Lets the parent gate a submit button on the component's own validation, without duplicating the rules. |
1189
- | `passwordRules` | `PasswordRule[]` | | | Con `type="password"`, las reglas de tu backend para una contraseña nueva. Se muestran como lista bajo el campo desde el inicio, cada una se marca al cumplirse y todas cuentan para `onValidityChange`. Si las pasas, reemplazan al medidor por composición (`showPasswordStrength` y `requirementsLabels` se ignoran). |
1190
- | `passwordRulesLabels` | `Partial<PasswordRulesLabels>` | | | Textos de la lista de reglas: título y estado de cada regla para lectores de pantalla. |
1191
- | `passwordToggleLabels` | `{ show: string; hide: string; }` | | `{ show: "Mostrar contraseña", hide: "Ocultar contraseña", }` | Textos del botón de contraseña (accesibilidad). |
1192
- | `pattern` | `string` | | | |
1193
- | `placeholder` | `string` | | | |
1194
- | `required` | `boolean` | | `false` | |
1195
- | `requiredMessage` | `string` | | | |
1196
- | `requirementsLabels` | `Partial<PasswordRequirementsLabels>` | | | |
1197
- | `showPasswordStrength` | `boolean` | | `false` | |
1198
- | `showPasswordToggle` | `boolean` | | `true` | Con `type="password"`, botón para ver u ocultar lo escrito. Por defecto true. |
1199
- | `startAddon` | `ReactNode` | | | Bloque pegado a la izquierda del campo: un texto ("S/", "https://"), un icono o un botón. Si es texto, los lectores de pantalla lo leen como parte de la descripción del campo. |
1200
- | `step` | `number` | | | |
1201
- | `strengthLabelPrefix` | `string` | | | |
1202
- | `strengthLabels` | `Partial<Record<PasswordStrengthKey, string>>` | | | |
1203
- | `type` | `"number" \| "text" \| "email" \| "tel" \| "password" \| "url"` | | `text` | |
1204
- | `validateEmail` | `boolean` | | `false` | |
1205
- | `warning` | `string` | | | |
1177
+ | Prop | Tipo | Req. | Por defecto | Descripción |
1178
+ | ------------------------ | -------------------------------------------------------------------------------------------------------------------------- | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1179
+ | `onChange` | `(value: string) => void` | sí | | |
1180
+ | `value` | `string` | sí | | |
1181
+ | `autoComplete` | `string` | | | |
1182
+ | `className` | `string` | | `` | |
1183
+ | `disabled` | `boolean` | | `false` | |
1184
+ | `emailInvalidMessage` | `string` | | | |
1185
+ | `emailSuggestionMessage` | `string` | | | |
1186
+ | `emailValidMessage` | `string` | | | |
1187
+ | `endAddon` | `ReactNode` | | | Bloque pegado a la derecha del campo: un texto (".pe", "kg") o un botón ("Buscar"). |
1188
+ | `error` | `string` | | | |
1189
+ | `hint` | `string` | | | |
1190
+ | `icon` | `ReactNode` | | | |
1191
+ | `id` | `string` | | | id del input; si no se pasa se genera uno (la etiqueta se asocia sola). |
1192
+ | `label` | `string` | | | |
1193
+ | `labelAction` | `ReactNode` | | | Contenido junto a la etiqueta, a la derecha: un botón de ayuda ("?"), un enlace ("¿Olvidaste tu contraseña?")… No va dentro del `<label>`. |
1194
+ | `labels` | `Partial<{ showPassword: string; hidePassword: string; passwordRulesTitle: string; ruleMet: string; ruleUnmet: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`): `showPassword`, `hidePassword`, `passwordRulesTitle`, `ruleMet`, `ruleUnmet`. |
1195
+ | `max` | `number` | | | |
1196
+ | `maxLength` | `number` | | | |
1197
+ | `min` | `number` | | | |
1198
+ | `minLength` | `number` | | | |
1199
+ | `minLengthMessage` | `string` | | | Inline error shown when the value is non-empty but shorter than `minLength`. |
1200
+ | `name` | `string` | | | name del input (formularios nativos, react-hook-form…). |
1201
+ | `onBlur` | `() => void` | | | |
1202
+ | `onFocus` | `() => void` | | | |
1203
+ | `onValidityChange` | `(isValid: boolean) => void` | | | Fires whenever the field's overall validity changes (respecting `required`, `validateEmail`, `minLength`, `maxLength`, `pattern` and `error`). Lets the parent gate a submit button on the component's own validation, without duplicating the rules. |
1204
+ | `passwordRules` | `PasswordRule[]` | | | Con `type="password"`, las reglas de tu backend para una contraseña nueva. Se muestran como lista bajo el campo desde el inicio, cada una se marca al cumplirse y todas cuentan para `onValidityChange`. Si las pasas, reemplazan al medidor por composición (`showPasswordStrength` y `requirementsLabels` se ignoran). |
1205
+ | `passwordRulesLabels` | `Partial<PasswordRulesLabels>` | | | Textos de la lista de reglas: título y estado de cada regla para lectores de pantalla. |
1206
+ | `passwordToggleLabels` | `Partial<{ show: string; hide: string; }>` | | | Textos del botón de contraseña (accesibilidad). @deprecated Usa `labels.showPassword` y `labels.hidePassword` (se pueden pasar por separado). |
1207
+ | `pattern` | `string` | | | |
1208
+ | `placeholder` | `string` | | | |
1209
+ | `required` | `boolean` | | `false` | |
1210
+ | `requiredMessage` | `string` | | | |
1211
+ | `requirementsLabels` | `Partial<PasswordRequirementsLabels>` | | | |
1212
+ | `showPasswordStrength` | `boolean` | | `false` | |
1213
+ | `showPasswordToggle` | `boolean` | | `true` | Con `type="password"`, botón para ver u ocultar lo escrito. Por defecto true. |
1214
+ | `startAddon` | `ReactNode` | | | Bloque pegado a la izquierda del campo: un texto ("S/", "https://"), un icono o un botón. Si es texto, los lectores de pantalla lo leen como parte de la descripción del campo. |
1215
+ | `step` | `number` | | | |
1216
+ | `strengthLabelPrefix` | `string` | | | |
1217
+ | `strengthLabels` | `Partial<Record<PasswordStrengthKey, string>>` | | | |
1218
+ | `type` | `"number" \| "text" \| "email" \| "tel" \| "password" \| "url"` | | `text` | |
1219
+ | `validateEmail` | `boolean` | | `false` | |
1220
+ | `warning` | `string` | | | |
1206
1221
 
1207
1222
  Tipos: `TextInputProps`, `TextInputNativeProps`, `PasswordRule`, `PasswordRulesLabels`.
1208
1223
 
@@ -1257,17 +1272,18 @@ Requiere que la CSP permita `https://challenges.cloudflare.com` en script-src y
1257
1272
  import { Turnstile } from "@rubenpazch/ui";
1258
1273
  ```
1259
1274
 
1260
- | Prop | Tipo | Req. | Por defecto | Descripción |
1261
- | ----------- | ------------------------------------- | ---- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
1262
- | `onToken` | `(token: string) => void` | sí | | Recibe el token, o "" cuando caduca o falla (deshabilita el envío mientras sea ""). El token se valida en el servidor y sirve una sola vez. |
1263
- | `siteKey` | `string` | sí | | Clave pública del sitio (NEXT_PUBLIC_TURNSTILE_SITE_KEY o la que entregue la API). |
1264
- | `action` | `string` | | | Acción del formulario ("login", "registro"…): el servidor puede exigir que coincida. |
1265
- | `className` | `string` | | | |
1266
- | `errorText` | `string` | | `No se pudo cargar la verificación anti-robots. Revisa tu conexión o desactiva bloqueadores y recarga la página.` | Mensaje si el widget no carga (red, bloqueadores). |
1267
- | `language` | `string` | | `es` | |
1268
- | `resetKey` | `number` | | `0` | Cambia este número después de cada envío para pedir un token nuevo. |
1269
- | `size` | `"normal" \| "flexible" \| "compact"` | | `flexible` | |
1270
- | `theme` | `"auto" \| "light" \| "dark"` | | `auto` | |
1275
+ | Prop | Tipo | Req. | Por defecto | Descripción |
1276
+ | ----------- | ------------------------------------- | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
1277
+ | `onToken` | `(token: string) => void` | sí | | Recibe el token, o "" cuando caduca o falla (deshabilita el envío mientras sea ""). El token se valida en el servidor y sirve una sola vez. |
1278
+ | `siteKey` | `string` | sí | | Clave pública del sitio (NEXT_PUBLIC_TURNSTILE_SITE_KEY o la que entregue la API). |
1279
+ | `action` | `string` | | | Acción del formulario ("login", "registro"…): el servidor puede exigir que coincida. |
1280
+ | `className` | `string` | | | |
1281
+ | `errorText` | `string` | | | Mensaje si el widget no carga (red, bloqueadores). |
1282
+ | `labels` | `Partial<{ error: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
1283
+ | `language` | `string` | | `es` | |
1284
+ | `resetKey` | `number` | | `0` | Cambia este número después de cada envío para pedir un token nuevo. |
1285
+ | `size` | `"normal" \| "flexible" \| "compact"` | | `flexible` | |
1286
+ | `theme` | `"auto" \| "light" \| "dark"` | | `auto` | |
1271
1287
 
1272
1288
  #### TURNSTILE_SCRIPT
1273
1289
 
@@ -1299,27 +1315,28 @@ Es la base de todas las pantallas de administración.
1299
1315
  import { AppShell } from "@rubenpazch/ui";
1300
1316
  ```
1301
1317
 
1302
- | Prop | Tipo | Req. | Por defecto | Descripción |
1303
- | ------------------- | -------------------------------------------------------------------------- | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1304
- | `children` | `ReactNode` | sí | | Contenido de la página. |
1305
- | `sections` | `SidebarSection[]` | sí | | Secciones del menú. |
1306
- | `bottomNav` | `{ items: BottomNavigationItem[]; moreLabel?: string \| undefined; }` | | | Barra inferior en el celular con las secciones principales (3 o 4). AppShell agrega al final "Más", que abre el menú lateral con todas las opciones; con ella la cabecera no muestra ☰. |
1307
- | `brand` | `ReactNode` | | | Logo o nombre de la app arriba. |
1308
- | `brandCollapsed` | `ReactNode` | | | Versión compacta del logo para el modo colapsado (por defecto se oculta `brand`). |
1309
- | `collapsed` | `boolean` | | | Colapsado (controlado). |
1310
- | `currentPath` | `string` | | | Ruta actual (p. ej. usePathname() de Next) para marcar la opción activa. |
1311
- | `defaultCollapsed` | `boolean` | | | Colapsado inicial (no controlado). |
1312
- | `headerActions` | `ReactNode` | | | Acciones a la derecha de la cabecera: notificaciones, usuario. |
1313
- | `labels` | `Partial<{ openMenu: string; skipToContent: string; bottomNav: string; }>` | | | Textos accesibles. |
1314
- | `linkComponent` | `ElementType<any, keyof IntrinsicElements>` | | | Componente de enlace (Link de Next.js). Por defecto <a>. |
1315
- | `loading` | `boolean` | | `false` | Carga del contenido al cambiar de pantalla: solo el área de contenido muestra el indicador (el menú y la cabecera no cambian). Los hijos siguen montados, atenuados y sin interacción. |
1316
- | `loadingLabel` | `string` | | `Cargando…` | Texto accesible de la carga. |
1317
- | `maxWidth` | `"none" \| "md" \| "lg"` | | `lg` | Ancho máximo del contenido: none, lg (72rem, por defecto) o md (56rem). |
1318
- | `onCollapsedChange` | `(collapsed: boolean) => void` | | | Al colapsar o expandir. |
1319
- | `sidebarFooter` | `ReactNode` | | | Contenido al pie de la barra lateral (usuario, "Cerrar sesión"). |
1320
- | `storageKey` | `string` | | | Clave de localStorage para recordar si estaba colapsado. |
1321
- | `title` | `ReactNode` | | | Título en la cabecera (en móvil se ve junto al botón ☰). |
1322
- | `toasts` | `boolean` | | `true` | Incluye `ToastProvider`: dentro del panel, `useToast()` muestra los mensajes del servidor como toast bajo la cabecera. Pon `false` solo si la app ya tiene su propio proveedor más arriba. |
1318
+ | Prop | Tipo | Req. | Por defecto | Descripción |
1319
+ | ------------------- | --------------------------------------------------------------------------------------------------------- | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1320
+ | `children` | `ReactNode` | sí | | Contenido de la página. |
1321
+ | `sections` | `SidebarSection[]` | sí | | Secciones del menú. |
1322
+ | `bottomNav` | `{ items: BottomNavigationItem[]; moreLabel?: string \| undefined; }` | | | Barra inferior en el celular con las secciones principales (3 o 4). AppShell agrega al final "Más", que abre el menú lateral con todas las opciones; con ella la cabecera no muestra ☰. |
1323
+ | `brand` | `ReactNode` | | | Logo o nombre de la app arriba. |
1324
+ | `brandCollapsed` | `ReactNode` | | | Versión compacta del logo para el modo colapsado (por defecto se oculta `brand`). |
1325
+ | `collapsed` | `boolean` | | | Colapsado (controlado). |
1326
+ | `currentPath` | `string` | | | Ruta actual (p. ej. usePathname() de Next) para marcar la opción activa. |
1327
+ | `defaultCollapsed` | `boolean` | | | Colapsado inicial (no controlado). |
1328
+ | `headerActions` | `ReactNode` | | | Acciones a la derecha de la cabecera: notificaciones, usuario. |
1329
+ | `labels` | `Partial<{ openMenu: string; skipToContent: string; bottomNav: string; loading: string; more: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`): `openMenu`, `skipToContent`, `bottomNav`, `loading` y `more`. |
1330
+ | `linkComponent` | `ElementType<any, keyof IntrinsicElements>` | | | Componente de enlace (Link de Next.js). Por defecto <a>. |
1331
+ | `loading` | `boolean` | | `false` | Carga del contenido al cambiar de pantalla: solo el área de contenido muestra el indicador (el menú y la cabecera no cambian). Los hijos siguen montados, atenuados y sin interacción. |
1332
+ | `loadingLabel` | `string` | | | Texto accesible de la carga. |
1333
+ | `maxWidth` | `"none" \| "md" \| "lg"` | | `lg` | Ancho máximo del contenido: none, lg (72rem, por defecto) o md (56rem). |
1334
+ | `onCollapsedChange` | `(collapsed: boolean) => void` | | | Al colapsar o expandir. |
1335
+ | `sidebarFooter` | `ReactNode` | | | Contenido al pie de la barra lateral (usuario, "Cerrar sesión"). |
1336
+ | `sidebarLabels` | `Partial<SidebarLabels>` | | | Textos del menú lateral (contraer, expandir, cerrar, navegación). |
1337
+ | `storageKey` | `string` | | | Clave de localStorage para recordar si estaba colapsado. |
1338
+ | `title` | `ReactNode` | | | Título en la cabecera (en móvil se ve junto al botón ☰). |
1339
+ | `toasts` | `boolean` | | `true` | Incluye `ToastProvider`: dentro del panel, `useToast()` muestra los mensajes del servidor como toast bajo la cabecera. Pon `false` solo si la app ya tiene su propio proveedor más arriba. |
1323
1340
 
1324
1341
  Tipos: `AppShellProps`.
1325
1342
 
@@ -1391,14 +1408,15 @@ al alcance del pulgar. En pantallas anchas se oculta (la navegación va en el me
1391
1408
  import { BottomNavigation } from "@rubenpazch/ui";
1392
1409
  ```
1393
1410
 
1394
- | Prop | Tipo | Req. | Por defecto | Descripción |
1395
- | --------------- | ------------------------------------------- | ---- | ---------------------- | -------------------------------------------------------------------------------------------- |
1396
- | `items` | `BottomNavigationItem[]` | sí | | Opciones (3 a 5). |
1397
- | `aria-label` | `string` | | `Navegación principal` | Nombre accesible de la navegación. |
1398
- | `className` | `string` | | | Clase extra. |
1399
- | `currentPath` | `string` | | | Ruta actual, para marcar la opción activa. |
1400
- | `hideFrom` | `"md" \| "lg" \| "never"` | | `md` | Desde qué ancho se oculta: md (768 px, por defecto), lg (1024 px) o never (siempre visible). |
1401
- | `linkComponent` | `ElementType<any, keyof IntrinsicElements>` | | `a` | Componente de enlace (p. ej. Link de Next.js). Por defecto <a>. |
1411
+ | Prop | Tipo | Req. | Por defecto | Descripción |
1412
+ | --------------- | ------------------------------------------- | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
1413
+ | `items` | `BottomNavigationItem[]` | sí | | Opciones (3 a 5). |
1414
+ | `aria-label` | `string` | | | Nombre accesible de la navegación. |
1415
+ | `className` | `string` | | | Clase extra. |
1416
+ | `currentPath` | `string` | | | Ruta actual, para marcar la opción activa. |
1417
+ | `hideFrom` | `"md" \| "lg" \| "never"` | | `md` | Desde qué ancho se oculta: md (768 px, por defecto), lg (1024 px) o never (siempre visible). |
1418
+ | `labels` | `Partial<{ label: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
1419
+ | `linkComponent` | `ElementType<any, keyof IntrinsicElements>` | | `a` | Componente de enlace (p. ej. Link de Next.js). Por defecto <a>. |
1402
1420
 
1403
1421
  Tipos: `BottomNavigationItem`, `BottomNavigationProps`.
1404
1422
 
@@ -1415,23 +1433,24 @@ Panel lateral (izquierda/derecha/arriba/abajo) con animación y fondo.
1415
1433
  import { Drawer } from "@rubenpazch/ui";
1416
1434
  ```
1417
1435
 
1418
- | Prop | Tipo | Req. | Por defecto | Descripción |
1419
- | --------------------- | -------------------------------------------------- | ---- | --------------- | --------------------------------------------------------------------------------------- |
1420
- | `children` | `ReactNode` | sí | | Content to render in the drawer |
1421
- | `isOpen` | `boolean` | sí | | Whether the drawer is open |
1422
- | `onClose` | `() => void` | sí | | Function to close the drawer |
1423
- | `className` | `string` | | `` | Custom className for the drawer content |
1424
- | `closeLabel` | `string` | | `Cerrar` | Texto accesible del botón de cerrar. |
1425
- | `closeOnEscape` | `boolean` | | `true` | Whether pressing Escape closes the drawer |
1426
- | `closeOnOverlayClick` | `boolean` | | `true` | Whether clicking overlay closes the drawer |
1427
- | `contentContained` | `boolean` | | `false` | Whether the content (header, body, footer) should be contained in a max-width container |
1428
- | `footer` | `ReactNode` | | | Footer content (typically action buttons) |
1429
- | `footerAlign` | `"left" \| "right" \| "center" \| "space-between"` | | `right` | Footer alignment |
1430
- | `headerAlign` | `"left" \| "right" \| "center" \| "space-between"` | | `space-between` | Header alignment (how to position title and close button) |
1431
- | `position` | `"left" \| "right" \| "top" \| "bottom"` | | `right` | Position from which the drawer slides in |
1432
- | `showOverlay` | `boolean` | | `true` | Whether to show overlay backdrop |
1433
- | `size` | `"sm" \| "md" \| "lg" \| "xl" \| "full"` | | `md` | Size of the drawer |
1434
- | `title` | `string` | | | Title displayed in the drawer header |
1436
+ | Prop | Tipo | Req. | Por defecto | Descripción |
1437
+ | --------------------- | -------------------------------------------------- | ---- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
1438
+ | `children` | `ReactNode` | sí | | Content to render in the drawer |
1439
+ | `isOpen` | `boolean` | sí | | Whether the drawer is open |
1440
+ | `onClose` | `() => void` | sí | | Function to close the drawer |
1441
+ | `className` | `string` | | `` | Custom className for the drawer content |
1442
+ | `closeLabel` | `string` | | | Texto accesible del botón de cerrar. @deprecated Usa `labels.close`. |
1443
+ | `closeOnEscape` | `boolean` | | `true` | Whether pressing Escape closes the drawer |
1444
+ | `closeOnOverlayClick` | `boolean` | | `true` | Whether clicking overlay closes the drawer |
1445
+ | `contentContained` | `boolean` | | `false` | Whether the content (header, body, footer) should be contained in a max-width container |
1446
+ | `footer` | `ReactNode` | | | Footer content (typically action buttons) |
1447
+ | `footerAlign` | `"left" \| "right" \| "center" \| "space-between"` | | `right` | Footer alignment |
1448
+ | `headerAlign` | `"left" \| "right" \| "center" \| "space-between"` | | `space-between` | Header alignment (how to position title and close button) |
1449
+ | `labels` | `Partial<{ close: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
1450
+ | `position` | `"left" \| "right" \| "top" \| "bottom"` | | `right` | Position from which the drawer slides in |
1451
+ | `showOverlay` | `boolean` | | `true` | Whether to show overlay backdrop |
1452
+ | `size` | `"sm" \| "md" \| "lg" \| "xl" \| "full"` | | `md` | Size of the drawer |
1453
+ | `title` | `string` | | | Title displayed in the drawer header |
1435
1454
 
1436
1455
  Tipos: `DrawerPosition`, `DrawerSize`, `DrawerAlign`, `DrawerProps`.
1437
1456
 
@@ -1450,16 +1469,16 @@ Navegador de periodos: ‹ noviembre de 2026 › para finanzas, contabilidad y c
1450
1469
  import { MonthNavigator } from "@rubenpazch/ui";
1451
1470
  ```
1452
1471
 
1453
- | Prop | Tipo | Req. | Por defecto | Descripción |
1454
- | ----------- | ------------------------------------------------------------- | ---- | ----------- | --------------------------------------------------- |
1455
- | `onChange` | `(value: string) => void` | sí | | Recibe el nuevo mes "AAAA-MM". |
1456
- | `value` | `string` | sí | | Mes actual en formato "AAAA-MM" (p. ej. "2026-11"). |
1457
- | `className` | `string` | | | Clase extra. |
1458
- | `labels` | `Partial<{ previous: string; next: string; today: string; }>` | | | Textos accesibles. |
1459
- | `locale` | `string` | | `es` | Idioma del nombre del mes (por defecto "es"). |
1460
- | `max` | `string` | | | Último mes permitido "AAAA-MM". |
1461
- | `min` | `string` | | | Primer mes permitido "AAAA-MM". |
1462
- | `showToday` | `boolean` | | `false` | Muestra el botón "Hoy" para volver al mes actual. |
1472
+ | Prop | Tipo | Req. | Por defecto | Descripción |
1473
+ | ----------- | ----------------------------------------------------------------------------- | ---- | ----------- | ----------------------------------------------------------------------------------- |
1474
+ | `onChange` | `(value: string) => void` | sí | | Recibe el nuevo mes "AAAA-MM". |
1475
+ | `value` | `string` | sí | | Mes actual en formato "AAAA-MM" (p. ej. "2026-11"). |
1476
+ | `className` | `string` | | | Clase extra. |
1477
+ | `labels` | `Partial<{ period: string; previous: string; next: string; today: string; }>` | | | Textos (por defecto, los del idioma activo): `period`, `previous`, `next`, `today`. |
1478
+ | `locale` | `string` | | | Idioma del nombre del mes (por defecto "es"). |
1479
+ | `max` | `string` | | | Último mes permitido "AAAA-MM". |
1480
+ | `min` | `string` | | | Primer mes permitido "AAAA-MM". |
1481
+ | `showToday` | `boolean` | | `false` | Muestra el botón "Hoy" para volver al mes actual. |
1463
1482
 
1464
1483
  Otras exportaciones: `addMonths`, `currentMonth`.
1465
1484
 
@@ -1480,16 +1499,17 @@ Cabecera de página: migas, volver, título h1, subtítulo y acciones.
1480
1499
  import { PageHeader } from "@rubenpazch/ui";
1481
1500
  ```
1482
1501
 
1483
- | Prop | Tipo | Req. | Por defecto | Descripción |
1484
- | --------------- | --------------------------------------------------------------------------------------------------- | ---- | ----------- | --------------------------------------------------------------- |
1485
- | `title` | `ReactNode` | sí | | Título de la página (se renderiza como h1). |
1486
- | `actions` | `ReactNode` | | | Acciones a la derecha (botones). En móvil pasan abajo. |
1487
- | `back` | `{ label?: string \| undefined; href?: string \| undefined; onClick?: (() => void) \| undefined; }` | | | Enlace o acción "Volver". |
1488
- | `breadcrumbs` | `Breadcrumb[]` | | | Migas de pan: Inicio / Convocatorias / Editar. |
1489
- | `children` | `ReactNode` | | | Contenido extra bajo el título (filtros, pestañas). |
1490
- | `className` | `string` | | | Clase extra. |
1491
- | `linkComponent` | `ElementType<any, keyof IntrinsicElements>` | | `a` | Componente de enlace (p. ej. Link de Next.js). Por defecto <a>. |
1492
- | `subtitle` | `ReactNode` | | | Texto secundario bajo el título. |
1502
+ | Prop | Tipo | Req. | Por defecto | Descripción |
1503
+ | --------------- | --------------------------------------------------------------------------------------------------- | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
1504
+ | `title` | `ReactNode` | sí | | Título de la página (se renderiza como h1). |
1505
+ | `actions` | `ReactNode` | | | Acciones a la derecha (botones). En móvil pasan abajo. |
1506
+ | `back` | `{ label?: string \| undefined; href?: string \| undefined; onClick?: (() => void) \| undefined; }` | | | Enlace o acción "Volver". |
1507
+ | `breadcrumbs` | `Breadcrumb[]` | | | Migas de pan: Inicio / Convocatorias / Editar. |
1508
+ | `children` | `ReactNode` | | | Contenido extra bajo el título (filtros, pestañas). |
1509
+ | `className` | `string` | | | Clase extra. |
1510
+ | `labels` | `Partial<{ breadcrumbs: string; back: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
1511
+ | `linkComponent` | `ElementType<any, keyof IntrinsicElements>` | | `a` | Componente de enlace (p. ej. Link de Next.js). Por defecto <a>. |
1512
+ | `subtitle` | `ReactNode` | | | Texto secundario bajo el título. |
1493
1513
 
1494
1514
  Tipos: `PageHeaderProps`, `Breadcrumb`.
1495
1515
 
@@ -1506,30 +1526,30 @@ Paginación con variantes, tamaños y formas; incluye PaginationItem.
1506
1526
  import { Pagination } from "@rubenpazch/ui";
1507
1527
  ```
1508
1528
 
1509
- | Prop | Tipo | Req. | Por defecto | Descripción |
1510
- | -------------------- | -------------------------------------------------------------- | ---- | ------------ | -------------------------------------------------------------------------------------------------------------------------------- |
1511
- | `aria-label` | `string` | | `Paginación` | Nombre accesible de la navegación (por defecto "Paginación"). |
1512
- | `boundaryCount` | `number` | | `1` | Number of always visible pages at the beginning and end |
1513
- | `compactOnMobile` | `boolean` | | `false` | En pantallas angostas (< 640 px) oculta los números y muestra solo anterior/siguiente con el indicador "3 / 10". |
1514
- | `count` | `number` | | `1` | Total number of pages |
1515
- | `defaultPage` | `number` | | `1` | Default page if uncontrolled |
1516
- | `disabled` | `boolean` | | `false` | If true, the component is disabled |
1517
- | `hideNextButton` | `boolean` | | `false` | If true, hide the next-page button |
1518
- | `hidePrevButton` | `boolean` | | `false` | If true, hide the previous-page button |
1519
- | `hideWhenSinglePage` | `boolean` | | `false` | No muestra nada cuando hay una sola página (o ninguna). |
1520
- | `labels` | `Partial<PaginationLabels>` | | | Textos de la interfaz; por defecto en español. |
1521
- | `onChange` | `(event: ChangeEvent<unknown, Element>, page: number) => void` | | | Al cambiar de página, estilo MUI: (evento, página). Se mantiene por compatibilidad. |
1522
- | `onPageChange` | `(page: number) => void` | | | Al cambiar de página (recibe solo el número). Preferido sobre onChange. |
1523
- | `page` | `number` | | | The current page (1-based) |
1524
- | `pageSize` | `number` | | | Registros por página, para calcular el rango del resumen. |
1525
- | `renderItem` | `(item: PaginationItemType) => ReactNode` | | | Custom render function for items |
1526
- | `shape` | `"rounded" \| "circular"` | | `rounded` | The shape of the pagination items |
1527
- | `showFirstButton` | `boolean` | | `false` | If true, show the first-page button |
1528
- | `showLastButton` | `boolean` | | `false` | If true, show the last-page button |
1529
- | `siblingCount` | `number` | | `1` | Number of always visible pages before and after the current page |
1530
- | `size` | `"small" \| "medium" \| "large" \| "sm" \| "md" \| "lg"` | | `medium` | The size of the pagination component |
1531
- | `totalCount` | `number` | | | Total de registros. Muestra un resumen junto a la paginación: "Mostrando 1–50 de 230" si se indica `pageSize`, o "230 en total". |
1532
- | `variant` | `"text" \| "outlined"` | | `text` | The variant to use |
1529
+ | Prop | Tipo | Req. | Por defecto | Descripción |
1530
+ | -------------------- | -------------------------------------------------------------- | ---- | ----------- | -------------------------------------------------------------------------------------------------------------------------------- |
1531
+ | `aria-label` | `string` | | | Nombre accesible de la navegación (por defecto "Paginación"). |
1532
+ | `boundaryCount` | `number` | | `1` | Number of always visible pages at the beginning and end |
1533
+ | `compactOnMobile` | `boolean` | | `false` | En pantallas angostas (< 640 px) oculta los números y muestra solo anterior/siguiente con el indicador "3 / 10". |
1534
+ | `count` | `number` | | `1` | Total number of pages |
1535
+ | `defaultPage` | `number` | | `1` | Default page if uncontrolled |
1536
+ | `disabled` | `boolean` | | `false` | If true, the component is disabled |
1537
+ | `hideNextButton` | `boolean` | | `false` | If true, hide the next-page button |
1538
+ | `hidePrevButton` | `boolean` | | `false` | If true, hide the previous-page button |
1539
+ | `hideWhenSinglePage` | `boolean` | | `false` | No muestra nada cuando hay una sola página (o ninguna). |
1540
+ | `labels` | `Partial<PaginationLabels>` | | | Textos de la interfaz; por defecto en español. |
1541
+ | `onChange` | `(event: ChangeEvent<unknown, Element>, page: number) => void` | | | Al cambiar de página, estilo MUI: (evento, página). Se mantiene por compatibilidad. |
1542
+ | `onPageChange` | `(page: number) => void` | | | Al cambiar de página (recibe solo el número). Preferido sobre onChange. |
1543
+ | `page` | `number` | | | The current page (1-based) |
1544
+ | `pageSize` | `number` | | | Registros por página, para calcular el rango del resumen. |
1545
+ | `renderItem` | `(item: PaginationItemType) => ReactNode` | | | Custom render function for items |
1546
+ | `shape` | `"rounded" \| "circular"` | | `rounded` | The shape of the pagination items |
1547
+ | `showFirstButton` | `boolean` | | `false` | If true, show the first-page button |
1548
+ | `showLastButton` | `boolean` | | `false` | If true, show the last-page button |
1549
+ | `siblingCount` | `number` | | `1` | Number of always visible pages before and after the current page |
1550
+ | `size` | `"small" \| "medium" \| "large" \| "sm" \| "md" \| "lg"` | | `medium` | The size of the pagination component |
1551
+ | `totalCount` | `number` | | | Total de registros. Muestra un resumen junto a la paginación: "Mostrando 1–50 de 230" si se indica `pageSize`, o "230 en total". |
1552
+ | `variant` | `"text" \| "outlined"` | | `text` | The variant to use |
1533
1553
 
1534
1554
  #### PaginationItem
1535
1555
 
@@ -1537,14 +1557,15 @@ import { Pagination } from "@rubenpazch/ui";
1537
1557
  import { PaginationItem } from "@rubenpazch/ui";
1538
1558
  ```
1539
1559
 
1540
- | Prop | Tipo | Req. | Por defecto | Descripción |
1541
- | ---------- | ------------------------------------------------------------------------------------------- | ---- | ----------- | ------------------------------------ |
1542
- | `page` | `number` | sí | | The page number |
1543
- | `type` | `"page" \| "next" \| "previous" \| "first" \| "last" \| "start-ellipsis" \| "end-ellipsis"` | sí | | The type of pagination item |
1544
- | `selected` | `boolean` | | `false` | If true, the item is selected/active |
1545
- | `shape` | `"rounded" \| "circular"` | | `rounded` | The shape of the pagination items |
1546
- | `size` | `"small" \| "medium" \| "large" \| "sm" \| "md" \| "lg"` | | `medium` | The size of the component |
1547
- | `variant` | `"text" \| "outlined"` | | `text` | The variant to use |
1560
+ | Prop | Tipo | Req. | Por defecto | Descripción |
1561
+ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ----------- | ----------------------------------------------------------------------------------------- |
1562
+ | `page` | `number` | sí | | The page number |
1563
+ | `type` | `"page" \| "next" \| "previous" \| "first" \| "last" \| "start-ellipsis" \| "end-ellipsis"` | sí | | The type of pagination item |
1564
+ | `labels` | `Partial<{ label: string; first: string; last: string; next: string; previous: string; page: string; summaryRange: string; summaryTotal: string; mobilePage: string; }>` | | | Textos (por defecto, los del idioma activo): `first`, `last`, `next`, `previous`, `page`. |
1565
+ | `selected` | `boolean` | | `false` | If true, the item is selected/active |
1566
+ | `shape` | `"rounded" \| "circular"` | | `rounded` | The shape of the pagination items |
1567
+ | `size` | `"small" \| "medium" \| "large" \| "sm" \| "md" \| "lg"` | | `medium` | The size of the component |
1568
+ | `variant` | `"text" \| "outlined"` | | `text` | The variant to use |
1548
1569
 
1549
1570
  Tipos: `PaginationProps`, `PaginationShape`, `PaginationSize`, `PaginationVariant`, `PaginationItemType`, `PaginationLabels`, `PaginationItemProps`.
1550
1571
 
@@ -1597,15 +1618,16 @@ Indicador de pasos numerados (opcionalmente clicables) para procesos en etapas.
1597
1618
  import { Stepper } from "@rubenpazch/ui";
1598
1619
  ```
1599
1620
 
1600
- | Prop | Tipo | Req. | Por defecto | Descripción |
1601
- | --------------- | -------------------------------------------------------- | ---- | ----------- | -------------------------------------------------------------------- |
1602
- | `currentStep` | `number` | sí | | |
1603
- | `steps` | `Step[]` | sí | | |
1604
- | `ariaLabel` | `string` | | `Progreso` | Nombre accesible de la navegación de pasos (por defecto "Progreso"). |
1605
- | `className` | `string` | | `` | |
1606
- | `onStepChange` | `(step: number) => void` | | | |
1607
- | `size` | `"small" \| "medium" \| "large" \| "sm" \| "md" \| "lg"` | | `medium` | |
1608
- | `stepClickable` | `boolean` | | `false` | |
1621
+ | Prop | Tipo | Req. | Por defecto | Descripción |
1622
+ | --------------- | -------------------------------------------------------- | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
1623
+ | `currentStep` | `number` | sí | | |
1624
+ | `steps` | `Step[]` | sí | | |
1625
+ | `ariaLabel` | `string` | | | Nombre accesible de la navegación de pasos (por defecto "Progreso"). |
1626
+ | `className` | `string` | | `` | |
1627
+ | `labels` | `Partial<{ label: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
1628
+ | `onStepChange` | `(step: number) => void` | | | |
1629
+ | `size` | `"small" \| "medium" \| "large" \| "sm" \| "md" \| "lg"` | | `medium` | |
1630
+ | `stepClickable` | `boolean` | | `false` | |
1609
1631
 
1610
1632
  ### @rubenpazch/tabs
1611
1633
 
@@ -1623,9 +1645,10 @@ import { Tabs } from "@rubenpazch/ui";
1623
1645
  | Prop | Tipo | Req. | Por defecto | Descripción |
1624
1646
  | ------------------ | ------------------------------------------ | ---- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1625
1647
  | `tabs` | `Tab[]` | sí | | |
1626
- | `ariaLabel` | `string` | | `Pestañas` | Nombre accesible del grupo de pestañas (por defecto "Pestañas"). |
1648
+ | `ariaLabel` | `string` | | | Nombre accesible del grupo de pestañas (por defecto "Pestañas"). |
1627
1649
  | `className` | `string` | | | |
1628
1650
  | `defaultTab` | `string` | | | |
1651
+ | `labels` | `Partial<{ label: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
1629
1652
  | `lazy` | `boolean` | | `false` | Lazy mode - only calls onLoad when tab is first visited |
1630
1653
  | `loading` | `boolean` | | `false` | Loading state for the active tab content |
1631
1654
  | `loadingComponent` | `ReactNode` | | | Custom loading component |
@@ -1655,17 +1678,18 @@ Aviso dentro de la página (no flotante): información, éxito, advertencia o er
1655
1678
  import { Alert } from "@rubenpazch/ui";
1656
1679
  ```
1657
1680
 
1658
- | Prop | Tipo | Req. | Por defecto | Descripción |
1659
- | ------------ | ---------------------------------------------- | ---- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1660
- | `action` | `ReactNode` | | | Acción a la derecha o abajo (p. ej. un Button "Reintentar"). |
1661
- | `children` | `ReactNode` | | | Texto del aviso. |
1662
- | `className` | `string` | | | Clase extra. |
1663
- | `closeLabel` | `string` | | `Cerrar aviso` | Texto accesible del botón ×. |
1664
- | `icon` | `ReactNode` | | | Icono propio; `false` para ocultarlo. Por defecto uno según el tipo. |
1665
- | `onClose` | `() => void` | | | Si se pasa, muestra el botón × y se llama al cerrarlo. |
1666
- | `role` | `"alert" \| "status" \| "note"` | | | Rol ARIA. Por defecto `alert` (warning/danger) o `status` (info/success), que se anuncian al aparecer. Para un aviso fijo que ya está en la página al cargar, usa `"note"`. |
1667
- | `title` | `ReactNode` | | | Título en negrita (opcional). |
1668
- | `variant` | `"info" \| "success" \| "warning" \| "danger"` | | `info` | Tipo de mensaje: info (por defecto), success, warning o danger. |
1681
+ | Prop | Tipo | Req. | Por defecto | Descripción |
1682
+ | ------------ | ---------------------------------------------- | ---- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1683
+ | `action` | `ReactNode` | | | Acción a la derecha o abajo (p. ej. un Button "Reintentar"). |
1684
+ | `children` | `ReactNode` | | | Texto del aviso. |
1685
+ | `className` | `string` | | | Clase extra. |
1686
+ | `closeLabel` | `string` | | | Texto accesible del botón ×. @deprecated Usa `labels.close`. |
1687
+ | `icon` | `ReactNode` | | | Icono propio; `false` para ocultarlo. Por defecto uno según el tipo. |
1688
+ | `labels` | `Partial<{ close: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
1689
+ | `onClose` | `() => void` | | | Si se pasa, muestra el botón × y se llama al cerrarlo. |
1690
+ | `role` | `"alert" \| "status" \| "note"` | | | Rol ARIA. Por defecto `alert` (warning/danger) o `status` (info/success), que se anuncian al aparecer. Para un aviso fijo que ya está en la página al cargar, usa `"note"`. |
1691
+ | `title` | `ReactNode` | | | Título en negrita (opcional). |
1692
+ | `variant` | `"info" \| "success" \| "warning" \| "danger"` | | `info` | Tipo de mensaje: info (por defecto), success, warning o danger. |
1669
1693
 
1670
1694
  Tipos: `AlertProps`, `AlertVariant`.
1671
1695
 
@@ -1685,18 +1709,19 @@ el foco inicial en "Cancelar", la opción segura.
1685
1709
  import { ConfirmationDialog } from "@rubenpazch/ui";
1686
1710
  ```
1687
1711
 
1688
- | Prop | Tipo | Req. | Por defecto | Descripción |
1689
- | ------------- | ------------ | ---- | ----------- | -------------------------------------------------------------------- |
1690
- | `isOpen` | `boolean` | sí | | Si el diálogo está abierto. |
1691
- | `message` | `ReactNode` | sí | | Explicación de la consecuencia. |
1692
- | `onCancel` | `() => void` | sí | | Al cancelar, pulsar Escape o hacer clic fuera (si no está cargando). |
1693
- | `onConfirm` | `() => void` | sí | | Al confirmar. |
1694
- | `title` | `string` | sí | | Pregunta o título: "¿Eliminar la convocatoria?". |
1695
- | `cancelText` | `string` | | `Cancelar` | Texto del botón de cancelar (por defecto "Cancelar"). |
1696
- | `children` | `ReactNode` | | | Contenido extra bajo el mensaje (p. ej. un campo "motivo"). |
1697
- | `confirmText` | `string` | | `Confirmar` | Texto del botón de confirmar (por defecto "Confirmar"). |
1698
- | `isDangerous` | `boolean` | | `false` | Acción destructiva: botón rojo. |
1699
- | `isLoading` | `boolean` | | `false` | Muestra el botón de confirmar cargando y bloquea los botones. |
1712
+ | Prop | Tipo | Req. | Por defecto | Descripción |
1713
+ | ------------- | ----------------------------------------------- | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
1714
+ | `isOpen` | `boolean` | sí | | Si el diálogo está abierto. |
1715
+ | `message` | `ReactNode` | sí | | Explicación de la consecuencia. |
1716
+ | `onCancel` | `() => void` | sí | | Al cancelar, pulsar Escape o hacer clic fuera (si no está cargando). |
1717
+ | `onConfirm` | `() => void` | sí | | Al confirmar. |
1718
+ | `title` | `string` | sí | | Pregunta o título: "¿Eliminar la convocatoria?". |
1719
+ | `cancelText` | `string` | | | Texto del botón de cancelar (por defecto "Cancelar"). |
1720
+ | `children` | `ReactNode` | | | Contenido extra bajo el mensaje (p. ej. un campo "motivo"). |
1721
+ | `confirmText` | `string` | | | Texto del botón de confirmar (por defecto "Confirmar"). |
1722
+ | `isDangerous` | `boolean` | | `false` | Acción destructiva: botón rojo. |
1723
+ | `isLoading` | `boolean` | | `false` | Muestra el botón de confirmar cargando y bloquea los botones. |
1724
+ | `labels` | `Partial<{ confirm: string; cancel: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
1700
1725
 
1701
1726
  Tipos: `ConfirmationDialogProps`.
1702
1727
 
@@ -1768,21 +1793,22 @@ página y se cierra con Escape. Para confirmar acciones usa ConfirmationDialog.
1768
1793
  import { Modal } from "@rubenpazch/ui";
1769
1794
  ```
1770
1795
 
1771
- | Prop | Tipo | Req. | Por defecto | Descripción |
1772
- | --------------------- | ---------------------------------------- | ---- | ----------- | --------------------------------------------------------------------------------- |
1773
- | `onClose` | `() => void` | sí | | Se llama al pedir cierre: botón ×, Escape o clic en el fondo. |
1774
- | `open` | `boolean` | sí | | Si el modal está abierto. |
1775
- | `children` | `ReactNode` | | | Contenido del modal. |
1776
- | `className` | `string` | | | Clase extra para la caja del modal. |
1777
- | `closeLabel` | `string` | | `Cerrar` | Texto accesible del botón ×. |
1778
- | `closeOnEscape` | `boolean` | | `true` | Cerrar con Escape (por defecto sí). |
1779
- | `closeOnOverlayClick` | `boolean` | | `true` | Cerrar al hacer clic en el fondo (por defecto sí). |
1780
- | `description` | `ReactNode` | | | Texto bajo el título (se anuncia como descripción). |
1781
- | `footer` | `ReactNode` | | | Pie: normalmente los botones de acción. |
1782
- | `role` | `"dialog" \| "alertdialog"` | | `dialog` | Rol del diálogo: `alertdialog` para confirmaciones que exigen respuesta. |
1783
- | `showCloseButton` | `boolean` | | `true` | Mostrar el botón × (por defecto sí). |
1784
- | `size` | `"sm" \| "md" \| "lg" \| "xl" \| "full"` | | `md` | Ancho máximo: sm (400px), md (520px, por defecto), lg (720px), xl (960px) o full. |
1785
- | `title` | `ReactNode` | | | Título (se anuncia como nombre del diálogo). |
1796
+ | Prop | Tipo | Req. | Por defecto | Descripción |
1797
+ | --------------------- | ---------------------------------------- | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
1798
+ | `onClose` | `() => void` | sí | | Se llama al pedir cierre: botón ×, Escape o clic en el fondo. |
1799
+ | `open` | `boolean` | sí | | Si el modal está abierto. |
1800
+ | `children` | `ReactNode` | | | Contenido del modal. |
1801
+ | `className` | `string` | | | Clase extra para la caja del modal. |
1802
+ | `closeLabel` | `string` | | | Texto accesible del botón ×. @deprecated Usa `labels.close`. |
1803
+ | `closeOnEscape` | `boolean` | | `true` | Cerrar con Escape (por defecto sí). |
1804
+ | `closeOnOverlayClick` | `boolean` | | `true` | Cerrar al hacer clic en el fondo (por defecto sí). |
1805
+ | `description` | `ReactNode` | | | Texto bajo el título (se anuncia como descripción). |
1806
+ | `footer` | `ReactNode` | | | Pie: normalmente los botones de acción. |
1807
+ | `labels` | `Partial<{ close: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
1808
+ | `role` | `"dialog" \| "alertdialog"` | | `dialog` | Rol del diálogo: `alertdialog` para confirmaciones que exigen respuesta. |
1809
+ | `showCloseButton` | `boolean` | | `true` | Mostrar el botón × (por defecto sí). |
1810
+ | `size` | `"sm" \| "md" \| "lg" \| "xl" \| "full"` | | `md` | Ancho máximo: sm (400px), md (520px, por defecto), lg (720px), xl (960px) o full. |
1811
+ | `title` | `ReactNode` | | | Título (se anuncia como nombre del diálogo). |
1786
1812
 
1787
1813
  Tipos: `ModalProps`, `ModalSize`.
1788
1814
 
@@ -1804,14 +1830,15 @@ It keeps no state and performs no side effects — the fade in/out is CSS only.
1804
1830
  import { OverlayLoader } from "@rubenpazch/ui";
1805
1831
  ```
1806
1832
 
1807
- | Prop | Tipo | Req. | Por defecto | Descripción |
1808
- | -------------- | ------------------------------------ | ---- | ----------- | ----------------------------------------------------------------------------------------- |
1809
- | `visible` | `boolean` | sí | | Whether the overlay is shown. When false it fades out and stops capturing pointer events. |
1810
- | `className` | `string` | | | Extra class applied to the root overlay element. |
1811
- | `message` | `string` | | | Primary line describing what is happening (e.g. "Estamos cargando la aplicación"). |
1812
- | `spinnerLabel` | `string` | | | Accessible label for the spinner (screen readers). Defaults to the message or "Cargando". |
1813
- | `title` | `string` | | | Optional emphasized heading rendered above the message. |
1814
- | `variant` | `"default" \| "success" \| "danger"` | | `default` | Tone for the spinner accent. |
1833
+ | Prop | Tipo | Req. | Por defecto | Descripción |
1834
+ | -------------- | ------------------------------------ | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
1835
+ | `visible` | `boolean` | sí | | Whether the overlay is shown. When false it fades out and stops capturing pointer events. |
1836
+ | `className` | `string` | | | Extra class applied to the root overlay element. |
1837
+ | `labels` | `Partial<{ loading: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
1838
+ | `message` | `string` | | | Primary line describing what is happening (e.g. "Estamos cargando la aplicación"). |
1839
+ | `spinnerLabel` | `string` | | | Accessible label for the spinner (screen readers). Defaults to the message or "Cargando". |
1840
+ | `title` | `string` | | | Optional emphasized heading rendered above the message. |
1841
+ | `variant` | `"default" \| "success" \| "danger"` | | `default` | Tone for the spinner accent. |
1815
1842
 
1816
1843
  #### InlineLoader
1817
1844
 
@@ -1828,6 +1855,7 @@ import { InlineLoader } from "@rubenpazch/ui";
1828
1855
  | -------------- | ------------------------------------ | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1829
1856
  | `className` | `string` | | | Extra class applied to the root element. |
1830
1857
  | `fill` | `boolean` | | `false` | Stretch to fill the available width and height of the parent and center its content, instead of rendering as a compact inline card. Use it when the loader owns a whole region (e.g. a route's content slot). |
1858
+ | `labels` | `Partial<{ loading: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
1831
1859
  | `message` | `string` | | | Optional line describing what is loading (e.g. "Cargando módulo…"). |
1832
1860
  | `spinnerLabel` | `string` | | | Accessible label for the spinner. Defaults to the message or "Cargando". |
1833
1861
  | `variant` | `"default" \| "success" \| "danger"` | | `default` | Tone for the spinner accent. |
@@ -1901,12 +1929,13 @@ Notificaciones temporales (Toast) y avisos fijos (ToastBanner) con tipos y accio
1901
1929
  import { ToastBanner } from "@rubenpazch/ui";
1902
1930
  ```
1903
1931
 
1904
- | Prop | Tipo | Req. | Por defecto | Descripción |
1905
- | ---------------- | ---------------------- | ---- | --------------------- | ----------- |
1906
- | `onClose` | `(id: string) => void` | sí | | |
1907
- | `toasts` | `ToastItem[]` | sí | | |
1908
- | `className` | `string` | | | |
1909
- | `closeAriaLabel` | `string` | | `Cerrar notificación` | |
1932
+ | Prop | Tipo | Req. | Por defecto | Descripción |
1933
+ | ---------------- | ----------------------------- | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
1934
+ | `onClose` | `(id: string) => void` | sí | | |
1935
+ | `toasts` | `ToastItem[]` | sí | | |
1936
+ | `className` | `string` | | | |
1937
+ | `closeAriaLabel` | `string` | | | @deprecated Usa `labels.close` (o `UiLocaleProvider`). |
1938
+ | `labels` | `Partial<{ close: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
1910
1939
 
1911
1940
  #### ToastProvider
1912
1941
 
@@ -1920,11 +1949,12 @@ formulario. Por eso `useToast()` falla fuera de un proveedor.
1920
1949
  import { ToastProvider } from "@rubenpazch/ui";
1921
1950
  ```
1922
1951
 
1923
- | Prop | Tipo | Req. | Por defecto | Descripción |
1924
- | ---------------- | ------------------------ | ---- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1925
- | `closeAriaLabel` | `string` | | `Cerrar mensaje` | Texto accesible del botón ×. |
1926
- | `offsetTop` | `string` | | | Distancia desde arriba en modo `floating`. |
1927
- | `placement` | `"floating" \| "inline"` | | `floating` | `floating` (por defecto): flotan arriba a la derecha. `inline`: no se pintan aquí; el layout pone `<ToastRegion />` en su sitio (AppShell lo hace bajo su cabecera, sin tapar el menú ni el contenido). |
1952
+ | Prop | Tipo | Req. | Por defecto | Descripción |
1953
+ | ---------------- | ----------------------------- | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1954
+ | `closeAriaLabel` | `string` | | | Texto accesible del botón ×. @deprecated Usa `labels.close`. |
1955
+ | `labels` | `Partial<{ close: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
1956
+ | `offsetTop` | `string` | | | Distancia desde arriba en modo `floating`. |
1957
+ | `placement` | `"floating" \| "inline"` | | `floating` | `floating` (por defecto): flotan arriba a la derecha. `inline`: no se pintan aquí; el layout pone `<ToastRegion />` en su sitio (AppShell lo hace bajo su cabecera, sin tapar el menú ni el contenido). |
1928
1958
 
1929
1959
  #### ToastRegion
1930
1960
 
@@ -2085,21 +2115,22 @@ Chip/etiqueta con variantes, icono y acción de borrar.
2085
2115
  import { Chip } from "@rubenpazch/ui";
2086
2116
  ```
2087
2117
 
2088
- | Prop | Tipo | Req. | Por defecto | Descripción |
2089
- | ----------------- | ----------------------------------------------------------------------- | ---- | ----------- | ---------------------------------------------- |
2090
- | `avatar` | `ReactNode` | | | Avatar or custom element shown at the start |
2091
- | `clickable` | `boolean` | | `false` | Whether the chip behaves like a button |
2092
- | `color` | `"default" \| "primary" \| "success" \| "warning" \| "error" \| "info"` | | `default` | Color theme for the chip |
2093
- | `component` | `ElementType<any, keyof IntrinsicElements>` | | | Override root component |
2094
- | `deleteAriaLabel` | `string` | | `Quitar` | Accessible label for the delete button |
2095
- | `deleteIcon` | `ReactNode` | | | Custom delete icon element |
2096
- | `disabled` | `boolean` | | `false` | Disabled state |
2097
- | `icon` | `ReactNode` | | | Leading icon rendered before the label |
2098
- | `label` | `ReactNode` | | | Content shown inside the chip |
2099
- | `onDelete` | `(event: MouseEvent<HTMLButtonElement, MouseEvent>) => void` | | | Callback fired when the delete icon is clicked |
2100
- | `selected` | `boolean` | | `false` | Selected/pressed state for toggleable chips |
2101
- | `size` | `"sm" \| "md"` | | `md` | Chip size |
2102
- | `variant` | `"filled" \| "outlined" \| "soft"` | | `filled` | Visual style for the chip |
2118
+ | Prop | Tipo | Req. | Por defecto | Descripción |
2119
+ | ----------------- | ----------------------------------------------------------------------- | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
2120
+ | `avatar` | `ReactNode` | | | Avatar or custom element shown at the start |
2121
+ | `clickable` | `boolean` | | `false` | Whether the chip behaves like a button |
2122
+ | `color` | `"default" \| "primary" \| "success" \| "warning" \| "error" \| "info"` | | `default` | Color theme for the chip |
2123
+ | `component` | `ElementType<any, keyof IntrinsicElements>` | | | Override root component |
2124
+ | `deleteAriaLabel` | `string` | | | Accessible label for the delete button @deprecated Usa `labels.delete`. |
2125
+ | `deleteIcon` | `ReactNode` | | | Custom delete icon element |
2126
+ | `disabled` | `boolean` | | `false` | Disabled state |
2127
+ | `icon` | `ReactNode` | | | Leading icon rendered before the label |
2128
+ | `label` | `ReactNode` | | | Content shown inside the chip |
2129
+ | `labels` | `Partial<{ delete: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
2130
+ | `onDelete` | `(event: MouseEvent<HTMLButtonElement, MouseEvent>) => void` | | | Callback fired when the delete icon is clicked |
2131
+ | `selected` | `boolean` | | `false` | Selected/pressed state for toggleable chips |
2132
+ | `size` | `"sm" \| "md"` | | `md` | Chip size |
2133
+ | `variant` | `"filled" \| "outlined" \| "soft"` | | `filled` | Visual style for the chip |
2103
2134
 
2104
2135
  Tipos: `ChipVariant`, `ChipColor`, `ChipSize`, `ChipProps`.
2105
2136
 
@@ -2144,15 +2175,16 @@ Pares etiqueta/valor de solo lectura (`<dl>`): resumen de un registro.
2144
2175
  import { DescriptionList } from "@rubenpazch/ui";
2145
2176
  ```
2146
2177
 
2147
- | Prop | Tipo | Req. | Por defecto | Descripción |
2148
- | ------------ | ------------------- | ---- | ------------ | ----------------------------------------------------------------- |
2149
- | `items` | `DescriptionItem[]` | sí | | |
2150
- | `className` | `string` | | | |
2151
- | `columns` | `1 \| 2 \| 3` | | `2` | Columnas en pantallas anchas (en móvil siempre 1). Por defecto 2. |
2152
- | `emptyText` | `ReactNode` | | `Sin datos.` | Texto si no hay ningún dato. |
2153
- | `emptyValue` | `ReactNode` | | `—` | Qué mostrar si un valor está vacío. |
2154
- | `footnote` | `ReactNode` | | | Nota al pie (fuente de los datos, aclaraciones). |
2155
- | `title` | `ReactNode` | | | Título opcional sobre la lista. |
2178
+ | Prop | Tipo | Req. | Por defecto | Descripción |
2179
+ | ------------ | ----------------------------- | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
2180
+ | `items` | `DescriptionItem[]` | sí | | |
2181
+ | `className` | `string` | | | |
2182
+ | `columns` | `1 \| 2 \| 3` | | `2` | Columnas en pantallas anchas (en móvil siempre 1). Por defecto 2. |
2183
+ | `emptyText` | `ReactNode` | | | Texto si no hay ningún dato. |
2184
+ | `emptyValue` | `ReactNode` | | `—` | Qué mostrar si un valor está vacío. |
2185
+ | `footnote` | `ReactNode` | | | Nota al pie (fuente de los datos, aclaraciones). |
2186
+ | `labels` | `Partial<{ empty: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
2187
+ | `title` | `ReactNode` | | | Título opcional sobre la lista. |
2156
2188
 
2157
2189
  Tipos: `DescriptionItem`, `DescriptionListProps`.
2158
2190
 
@@ -2188,6 +2220,8 @@ import { ImageViewer } from "@rubenpazch/ui";
2188
2220
 
2189
2221
  #### DEFAULT_IMAGE_VIEWER_LABELS
2190
2222
 
2223
+ Textos en castellano (los del diccionario `es`). Con `UiLocaleProvider` cambian solos.
2224
+
2191
2225
  ```tsx
2192
2226
  import { DEFAULT_IMAGE_VIEWER_LABELS } from "@rubenpazch/ui";
2193
2227
  ```
@@ -2291,14 +2325,15 @@ convierte los estados del trámite en `items`).
2291
2325
  import { Timeline } from "@rubenpazch/ui";
2292
2326
  ```
2293
2327
 
2294
- | Prop | Tipo | Req. | Por defecto | Descripción |
2295
- | --------------- | ---------------- | ---- | ---------------------- | ------------------------------------------------------------------- |
2296
- | `items` | `TimelineItem[]` | sí | | |
2297
- | `aria-label` | `string` | | | Nombre accesible de la lista, p. ej. "Historial del trámite". |
2298
- | `className` | `string` | | | |
2299
- | `dense` | `boolean` | | `false` | Más compacto (menos espacio entre eventos). |
2300
- | `emptyText` | `ReactNode` | | `Sin eventos todavía.` | Texto cuando no hay eventos. |
2301
- | `highlightLast` | `boolean` | | `false` | El último evento se marca como el estado actual (anillo y negrita). |
2328
+ | Prop | Tipo | Req. | Por defecto | Descripción |
2329
+ | --------------- | ----------------------------- | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
2330
+ | `items` | `TimelineItem[]` | sí | | |
2331
+ | `aria-label` | `string` | | | Nombre accesible de la lista, p. ej. "Historial del trámite". |
2332
+ | `className` | `string` | | | |
2333
+ | `dense` | `boolean` | | `false` | Más compacto (menos espacio entre eventos). |
2334
+ | `emptyText` | `ReactNode` | | | Texto cuando no hay eventos. |
2335
+ | `highlightLast` | `boolean` | | `false` | El último evento se marca como el estado actual (anillo y negrita). |
2336
+ | `labels` | `Partial<{ empty: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
2302
2337
 
2303
2338
  Tipos: `TimelineItem`, `TimelineProps`, `TimelineStatus`.
2304
2339
 
@@ -2344,19 +2379,20 @@ tarjeta no se llene de botones.
2344
2379
  import { UserCard } from "@rubenpazch/ui";
2345
2380
  ```
2346
2381
 
2347
- | Prop | Tipo | Req. | Por defecto | Descripción |
2348
- | ----------- | ---------------------------- | ---- | ----------- | ---------------------------------------------------------------------- |
2349
- | `name` | `string` | sí | | Nombre visible. |
2350
- | `actions` | `ReactNode` | | | Acciones principales visibles en el pie (una o dos `Button`). |
2351
- | `as` | `"article" \| "li" \| "div"` | | `article` | |
2352
- | `avatarSrc` | `string` | | | Foto. Sin ella se muestran las iniciales del nombre. |
2353
- | `badges` | `ReactNode` | | | Etiquetas (normalmente `Badge`): rol, estado, módulos… |
2354
- | `children` | `ReactNode` | | | Contenido extra entre las etiquetas y el pie. |
2355
- | `className` | `string` | | | |
2356
- | `menuItems` | `MenuItem[]` | | | Acciones secundarias en el menú ⋮ (editar contraseña, eliminar…). |
2357
- | `menuLabel` | `string` | | | Texto accesible del botón ⋮. Por defecto "Más acciones para <nombre>". |
2358
- | `muted` | `boolean` | | `false` | Atenúa la tarjeta (p. ej. usuario inactivo). |
2359
- | `subtitle` | `ReactNode` | | | Dato secundario bajo el nombre: correo, documento, cargo… |
2382
+ | Prop | Tipo | Req. | Por defecto | Descripción |
2383
+ | ----------- | ---------------------------- | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
2384
+ | `name` | `string` | sí | | Nombre visible. |
2385
+ | `actions` | `ReactNode` | | | Acciones principales visibles en el pie (una o dos `Button`). |
2386
+ | `as` | `"article" \| "li" \| "div"` | | `article` | |
2387
+ | `avatarSrc` | `string` | | | Foto. Sin ella se muestran las iniciales del nombre. |
2388
+ | `badges` | `ReactNode` | | | Etiquetas (normalmente `Badge`): rol, estado, módulos… |
2389
+ | `children` | `ReactNode` | | | Contenido extra entre las etiquetas y el pie. |
2390
+ | `className` | `string` | | | |
2391
+ | `labels` | `Partial<{ menu: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
2392
+ | `menuItems` | `MenuItem[]` | | | Acciones secundarias en el menú ⋮ (editar contraseña, eliminar…). |
2393
+ | `menuLabel` | `string` | | | Texto accesible del botón ⋮. Por defecto "Más acciones para <nombre>". |
2394
+ | `muted` | `boolean` | | `false` | Atenúa la tarjeta (p. ej. usuario inactivo). |
2395
+ | `subtitle` | `ReactNode` | | | Dato secundario bajo el nombre: correo, documento, cargo… |
2360
2396
 
2361
2397
  Otras exportaciones: `initials`.
2362
2398
 
@@ -2380,24 +2416,25 @@ clicables y scroll horizontal en móvil. Pagina con Pagination debajo.
2380
2416
  import { DataTable } from "@rubenpazch/ui";
2381
2417
  ```
2382
2418
 
2383
- | Prop | Tipo | Req. | Por defecto | Descripción |
2384
- | ------------------ | ----------------------------------- | ---- | ------------------ | -------------------------------------------------------------------------- |
2385
- | `caption` | `string` | sí | | Título accesible de la tabla (se lee al entrar). Visible si `showCaption`. |
2386
- | `columns` | `DataTableColumn<T>[]` | sí | | Columnas. |
2387
- | `getRowId` | `(row: T) => string \| number` | sí | | id único de cada fila. |
2388
- | `rows` | `T[]` | sí | | Filas. |
2389
- | `className` | `string` | | | Clase extra del contenedor. |
2390
- | `dense` | `boolean` | | `false` | Filas más compactas. |
2391
- | `emptyAction` | `ReactNode` | | | Acción del estado vacío (Button "Crear…"). |
2392
- | `emptyDescription` | `ReactNode` | | | Explicación del estado vacío. |
2393
- | `emptyTitle` | `ReactNode` | | `No hay registros` | Texto del estado vacío. |
2394
- | `loading` | `boolean` | | `false` | Muestra filas de carga. |
2395
- | `loadingRows` | `number` | | `5` | Filas de carga a mostrar (por defecto 5). |
2396
- | `onRowClick` | `(row: T) => void` | | | Al hacer clic (o Enter) en una fila. |
2397
- | `onSortChange` | `(sort: SortState \| null) => void` | | | Al cambiar el orden (para ordenar en el servidor). |
2398
- | `showCaption` | `boolean` | | `false` | Muestra el caption encima de la tabla. |
2399
- | `sort` | `null \| SortState` | | | Orden controlado. Sin él, la tabla ordena sola en el navegador. |
2400
- | `stickyHeader` | `boolean` | | `false` | Encabezado fijo al hacer scroll vertical. |
2419
+ | Prop | Tipo | Req. | Por defecto | Descripción |
2420
+ | ------------------ | ---------------------------------------------- | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
2421
+ | `caption` | `string` | sí | | Título accesible de la tabla (se lee al entrar). Visible si `showCaption`. |
2422
+ | `columns` | `DataTableColumn<T>[]` | sí | | Columnas. |
2423
+ | `getRowId` | `(row: T) => string \| number` | sí | | id único de cada fila. |
2424
+ | `rows` | `T[]` | sí | | Filas. |
2425
+ | `className` | `string` | | | Clase extra del contenedor. |
2426
+ | `dense` | `boolean` | | `false` | Filas más compactas. |
2427
+ | `emptyAction` | `ReactNode` | | | Acción del estado vacío (Button "Crear…"). |
2428
+ | `emptyDescription` | `ReactNode` | | | Explicación del estado vacío. |
2429
+ | `emptyTitle` | `ReactNode` | | | Texto del estado vacío. |
2430
+ | `labels` | `Partial<{ empty: string; loading: string; }>` | | | Textos de la interfaz. Por defecto, los del idioma activo (`UiLocaleProvider`); también se cambian para toda la app con su prop `messages`. |
2431
+ | `loading` | `boolean` | | `false` | Muestra filas de carga. |
2432
+ | `loadingRows` | `number` | | `5` | Filas de carga a mostrar (por defecto 5). |
2433
+ | `onRowClick` | `(row: T) => void` | | | Al hacer clic (o Enter) en una fila. |
2434
+ | `onSortChange` | `(sort: SortState \| null) => void` | | | Al cambiar el orden (para ordenar en el servidor). |
2435
+ | `showCaption` | `boolean` | | `false` | Muestra el caption encima de la tabla. |
2436
+ | `sort` | `null \| SortState` | | | Orden controlado. Sin él, la tabla ordena sola en el navegador. |
2437
+ | `stickyHeader` | `boolean` | | `false` | Encabezado fijo al hacer scroll vertical. |
2401
2438
 
2402
2439
  Tipos: `DataTableProps`, `DataTableColumn`, `SortState`, `SortDirection`.
2403
2440
 
@@ -2475,6 +2512,8 @@ import { IdentificationInput } from "@rubenpazch/ui";
2475
2512
 
2476
2513
  #### DEFAULT_IDENTIFICATION_LABELS
2477
2514
 
2515
+ Textos en castellano (los del diccionario `es`). Con `UiLocaleProvider` cambian solos.
2516
+
2478
2517
  ```tsx
2479
2518
  import { DEFAULT_IDENTIFICATION_LABELS } from "@rubenpazch/ui";
2480
2519
  ```