ui-mathilde-web 0.10.19 → 0.10.21
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.
- package/dist/style.css +1 -1
- package/dist/ui-mathilde-web.d.ts +65 -0
- package/dist/ui-mathilde-web.js +8366 -8352
- package/dist/ui-mathilde-web.umd.cjs +50 -50
- package/package.json +1 -1
|
@@ -73,6 +73,43 @@ declare interface AlertProps extends AlertOptions {
|
|
|
73
73
|
onClose?: () => void;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
/**
|
|
77
|
+
* Configuración de badge dinámico para una columna de tabla.
|
|
78
|
+
*
|
|
79
|
+
* Define el comportamiento de resolución de color: normalización del valor,
|
|
80
|
+
* mapa de variantes y modo de renderizado (simple o múltiple).
|
|
81
|
+
*
|
|
82
|
+
* Para el render visual se utiliza el átomo `Tag`.
|
|
83
|
+
* Se recomienda construir esta config con el helper `createBadgeConfig`.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* import { createBadgeConfig } from "@components/organisms/table/shared/tableBadge.helpers";
|
|
87
|
+
*
|
|
88
|
+
* badgeConfig: createBadgeConfig({
|
|
89
|
+
* "activa": { bg: "bg-green-100", text: "text-green-700" },
|
|
90
|
+
* "error": { bg: "bg-red-100", text: "text-red-700" },
|
|
91
|
+
* })
|
|
92
|
+
*/
|
|
93
|
+
declare interface BadgeConfig {
|
|
94
|
+
/**
|
|
95
|
+
* Transforma el valor crudo a una clave canónica para buscar en `variants`.
|
|
96
|
+
* Por defecto: lowercase + trim.
|
|
97
|
+
*/
|
|
98
|
+
normalize?: (value: unknown) => string;
|
|
99
|
+
/** Mapa de clave normalizada → variante visual (TagVariant). */
|
|
100
|
+
variants: Record<string, TagVariant>;
|
|
101
|
+
/** Fallback cuando la clave no existe en `variants`. Por defecto: gris neutro. */
|
|
102
|
+
defaultVariant?: TagVariant;
|
|
103
|
+
/** Forma visual del badge. Por defecto: "pill". */
|
|
104
|
+
shape?: "pill" | "badge";
|
|
105
|
+
/**
|
|
106
|
+
* Cuando es `true`, el valor se trata como array y se renderiza un Tag por ítem.
|
|
107
|
+
* Útil para columnas de sincronización, etiquetas o canales múltiples.
|
|
108
|
+
* @example ["FB", "GL", "TK"] → tres chips con colores independientes
|
|
109
|
+
*/
|
|
110
|
+
multiple?: boolean;
|
|
111
|
+
}
|
|
112
|
+
|
|
76
113
|
export declare const ButtonFormat: default_2.FC<ButtonFormatProps>;
|
|
77
114
|
|
|
78
115
|
declare interface ButtonFormatProps {
|
|
@@ -253,6 +290,8 @@ declare interface Column {
|
|
|
253
290
|
value: unknown;
|
|
254
291
|
}>;
|
|
255
292
|
cellProps?: Record<string, unknown>;
|
|
293
|
+
/** Cuando se define, renderiza el valor como badge con color dinámico. */
|
|
294
|
+
badgeConfig?: BadgeConfig;
|
|
256
295
|
}
|
|
257
296
|
|
|
258
297
|
declare interface Column_2 {
|
|
@@ -270,6 +309,8 @@ declare interface Column_2 {
|
|
|
270
309
|
value: unknown;
|
|
271
310
|
}>;
|
|
272
311
|
cellProps?: Record<string, unknown>;
|
|
312
|
+
/** Cuando se define, renderiza el valor como badge con color dinámico. */
|
|
313
|
+
badgeConfig?: BadgeConfig;
|
|
273
314
|
}
|
|
274
315
|
|
|
275
316
|
export declare const CustomPagination: default_2.FC<CustomPaginationProps>;
|
|
@@ -736,6 +777,30 @@ declare interface TabsComponentProps {
|
|
|
736
777
|
onTabChange?: (tabId: string) => void;
|
|
737
778
|
}
|
|
738
779
|
|
|
780
|
+
/**
|
|
781
|
+
* Átomo Tag — representación visual de una etiqueta con color dinámico.
|
|
782
|
+
*
|
|
783
|
+
* Solo se ocupa de renderizar: no conoce lógica de negocio,
|
|
784
|
+
* normalización de valores ni configuraciones de tabla.
|
|
785
|
+
*
|
|
786
|
+
* @example
|
|
787
|
+
* <Tag variant={{ bg: "bg-green-100", text: "text-green-700" }}>Activa</Tag>
|
|
788
|
+
* <Tag variant={{ bg: "bg-red-100", text: "text-red-700" }} shape="badge">Error</Tag>
|
|
789
|
+
*/
|
|
790
|
+
export declare const Tag: React_2.FC<TagProps>;
|
|
791
|
+
|
|
792
|
+
declare interface TagProps {
|
|
793
|
+
variant: TagVariant;
|
|
794
|
+
shape?: "pill" | "badge";
|
|
795
|
+
children: React.ReactNode;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
declare interface TagVariant {
|
|
799
|
+
bg: string;
|
|
800
|
+
text?: string;
|
|
801
|
+
border?: string;
|
|
802
|
+
}
|
|
803
|
+
|
|
739
804
|
export declare const TermsCheckbox: default_2.FC<TermsCheckboxProps>;
|
|
740
805
|
|
|
741
806
|
declare interface TermsCheckboxProps {
|