ui-mathilde-web 0.8.0 → 0.9.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.
@@ -4,7 +4,6 @@ import { ForwardRefExoticComponent } from 'react';
4
4
  import { IconType } from 'react-icons';
5
5
  import { JSX as JSX_2 } from 'react/jsx-runtime';
6
6
  import * as React_2 from 'react';
7
- import { ReactNode } from 'react';
8
7
  import { RefAttributes } from 'react';
9
8
 
10
9
  export declare const Accordion: default_2.FC<AccordionProps>;
@@ -125,7 +124,7 @@ declare interface CardProps {
125
124
  export declare const Checkbox: default_2.FC<CheckboxProps>;
126
125
 
127
126
  declare interface CheckboxProps {
128
- label?: default_2.ReactNode;
127
+ label?: string;
129
128
  value: string;
130
129
  checked: boolean;
131
130
  onChange: (e: default_2.ChangeEvent<HTMLInputElement>) => void;
@@ -157,6 +156,55 @@ declare interface ChipListProps {
157
156
  showTitle?: boolean;
158
157
  }
159
158
 
159
+ declare type CollapseMode = "single" | "multi";
160
+
161
+ export declare const CollapsibleTable: React_2.FC<CollapsibleTableProps>;
162
+
163
+ declare interface CollapsibleTableProps {
164
+ columns: Column_2[];
165
+ data: TableData_2[];
166
+ showSearch?: boolean;
167
+ itemsPerPage?: number;
168
+ title?: string;
169
+ classesHeadTable?: string;
170
+ classesBodyTable?: string;
171
+ showPagination?: boolean;
172
+ showCheckboxes?: boolean;
173
+ selectedRows?: Set<string | number>;
174
+ onRowSelect?: (rowId: string | number, checked: boolean) => void;
175
+ onSelectAll?: (checked: boolean) => void;
176
+ onToggleChange?: (rowData: {
177
+ rowId: string | number;
178
+ checked: boolean;
179
+ row: TableData_2;
180
+ columnKey: string;
181
+ }) => void;
182
+ collapsible?: boolean;
183
+ collapseMode?: CollapseMode;
184
+ defaultOpenRows?: Array<string | number>;
185
+ onCollapseChange?: (openRowIds: Array<string | number>) => void;
186
+ openRowIds?: Array<string | number>;
187
+ /**
188
+ * Sub-registros (ej: canales FB/GL/TK)
189
+ * Si devuelve [], no se muestra flecha.
190
+ */
191
+ getSubRows?: (row: TableData_2) => TableData_2[];
192
+ /**
193
+ * En Figma, subRows normalmente NO muestran el ID.
194
+ */
195
+ hideIdInSubRows?: boolean;
196
+ /**
197
+ * La flecha se renderiza dentro de esta columna (por defecto "id")
198
+ */
199
+ collapseToggleColumnKey?: string;
200
+ /**
201
+ * Clases opcionales
202
+ */
203
+ collapseButtonClassName?: string;
204
+ parentRowClassName?: string;
205
+ subRowClassName?: string;
206
+ }
207
+
160
208
  declare interface Column {
161
209
  header: string;
162
210
  relation: string;
@@ -174,6 +222,23 @@ declare interface Column {
174
222
  cellProps?: Record<string, unknown>;
175
223
  }
176
224
 
225
+ declare interface Column_2 {
226
+ header: string;
227
+ relation: string;
228
+ cell?: (row: Record<string, unknown>) => default_2.ReactNode;
229
+ isToggle?: boolean;
230
+ sortable?: boolean;
231
+ toggleText?: {
232
+ active: string;
233
+ inactive: string;
234
+ };
235
+ component?: default_2.ComponentType<{
236
+ row: Record<string, unknown>;
237
+ value: unknown;
238
+ }>;
239
+ cellProps?: Record<string, unknown>;
240
+ }
241
+
177
242
  export declare const CustomPagination: default_2.FC<CustomPaginationProps>;
178
243
 
179
244
  declare interface CustomPaginationProps {
@@ -530,6 +595,11 @@ declare interface TableData extends Record<string, unknown> {
530
595
  [key: string]: unknown;
531
596
  }
532
597
 
598
+ declare interface TableData_2 extends Record<string, unknown> {
599
+ id: string | number;
600
+ [key: string]: unknown;
601
+ }
602
+
533
603
  export declare const TableOfContents: React.FC<TableOfContentsProps>;
534
604
 
535
605
  declare interface TableOfContentsProps {
@@ -583,14 +653,6 @@ declare interface ToggleProps {
583
653
  boldWhenActive?: boolean;
584
654
  }
585
655
 
586
- export declare function TooltipComponent({ content, trigger, children }: TooltipProps): JSX_2.Element;
587
-
588
- declare interface TooltipProps {
589
- content: string;
590
- trigger: 'hover' | 'click';
591
- children?: ReactNode;
592
- }
593
-
594
656
  declare interface ValidationListProps {
595
657
  validations: {
596
658
  hasMinLength: boolean;