ui-mathilde-web 0.7.1 → 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.
@@ -156,6 +156,55 @@ declare interface ChipListProps {
156
156
  showTitle?: boolean;
157
157
  }
158
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
+
159
208
  declare interface Column {
160
209
  header: string;
161
210
  relation: string;
@@ -173,6 +222,23 @@ declare interface Column {
173
222
  cellProps?: Record<string, unknown>;
174
223
  }
175
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
+
176
242
  export declare const CustomPagination: default_2.FC<CustomPaginationProps>;
177
243
 
178
244
  declare interface CustomPaginationProps {
@@ -529,6 +595,11 @@ declare interface TableData extends Record<string, unknown> {
529
595
  [key: string]: unknown;
530
596
  }
531
597
 
598
+ declare interface TableData_2 extends Record<string, unknown> {
599
+ id: string | number;
600
+ [key: string]: unknown;
601
+ }
602
+
532
603
  export declare const TableOfContents: React.FC<TableOfContentsProps>;
533
604
 
534
605
  declare interface TableOfContentsProps {