@zauru-sdk/components 6.5.4 → 6.5.6

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/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [6.5.6](https://github.com/intuitiva/zauru-typescript-sdk/compare/@zauru-sdk/components@6.5.5...@zauru-sdk/components@6.5.6) (2026-09-17)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * resolver width % de ZauruTable contra el contenedor ([9518a4d](https://github.com/intuitiva/zauru-typescript-sdk/commit/9518a4d8d40d7655b26e0e25450e20cba271ac34))
12
+
13
+
14
+
15
+
16
+
17
+ ## [6.5.5](https://github.com/intuitiva/zauru-typescript-sdk/compare/@zauru-sdk/components@6.5.4...@zauru-sdk/components@6.5.5) (2026-09-16)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * estirar filas de ZauruTable al ancho del contenido al hacer scroll ([de57d25](https://github.com/intuitiva/zauru-typescript-sdk/commit/de57d25243d907a889aba0a5e05328646b50b5cb))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [6.5.4](https://github.com/intuitiva/zauru-typescript-sdk/compare/@zauru-sdk/components@6.5.3...@zauru-sdk/components@6.5.4) (2026-09-16)
7
29
 
8
30
 
@@ -13,7 +13,17 @@ const headerTextWrapStyle = {
13
13
  wordBreak: "normal",
14
14
  lineHeight: "1.25",
15
15
  };
16
+ const fillContainerWidthStyle = {
17
+ width: "100%",
18
+ minWidth: "100%",
19
+ maxWidth: "none",
20
+ };
16
21
  const customStyles = {
22
+ table: {
23
+ style: {
24
+ ...fillContainerWidthStyle,
25
+ },
26
+ },
17
27
  tableWrapper: {
18
28
  style: {
19
29
  display: "block",
@@ -31,11 +41,17 @@ const customStyles = {
31
41
  overflowX: "auto",
32
42
  },
33
43
  },
44
+ head: {
45
+ style: {
46
+ ...fillContainerWidthStyle,
47
+ },
48
+ },
34
49
  headRow: {
35
50
  style: {
36
51
  minHeight: "40px",
37
52
  height: "auto",
38
53
  alignItems: "stretch",
54
+ ...fillContainerWidthStyle,
39
55
  },
40
56
  denseStyle: {
41
57
  minHeight: "36px",
@@ -81,6 +97,9 @@ const customStyles = {
81
97
  },
82
98
  },
83
99
  rows: {
100
+ style: {
101
+ ...fillContainerWidthStyle,
102
+ },
84
103
  highlightOnHoverStyle: {
85
104
  backgroundColor: "rgb(230, 244, 244)",
86
105
  borderBottomColor: "#FFFFFF",
@@ -214,7 +233,18 @@ export const ZauruTable = (props) => {
214
233
  if (!column || typeof column !== "object") {
215
234
  return column;
216
235
  }
217
- return { wrap: true, ...column };
236
+ const next = { wrap: true, ...column };
237
+ // RDT `width` sets both min-width and max-width, wiping a px floor.
238
+ // Keep % as flex-basis so minWidth/maxWidth/grow still apply.
239
+ if (typeof next.width === "string" && next.width.endsWith("%")) {
240
+ const pct = next.width;
241
+ delete next.width;
242
+ next.style = {
243
+ flexBasis: pct,
244
+ ...next.style,
245
+ };
246
+ }
247
+ return next;
218
248
  })
219
249
  : columns;
220
250
  return (_jsx("div", { className: "w-full min-w-0 max-w-full overflow-x-auto", children: _jsx(DataTable, { className: className, subHeaderWrap: true, theme: theme ?? "solarized", columns: normalizedColumns, conditionalRowStyles: conditionalRowStyles, data: filteredData, customStyles: customStyles, progressPending: loading, highlightOnHover: true, pointerOnHover: true, dense: true, striped: true, pagination: !whitOutPagination, persistTableHead: true, responsive: true, noHeader: true, expandableRows: !!expandable, expandOnRowClicked: !!expandable, expandableRowExpanded: expandable ? expandable.expandableRowExpanded : undefined, expandableRowsComponent: expandable ? expandable.expandableRowsComponent : undefined, subHeader: loadSubHeader, subHeaderComponent: subHeaderComponent, paginationServer: !!pagination, paginationTotalRows: pagination?.totalRows ?? undefined, onChangeRowsPerPage: pagination ? handlePerRowsChange : undefined, onChangePage: pagination ? handlePageChange : undefined, paginationComponentOptions: paginationComponentOptions, paginationRowsPerPageOptions: pagination?.rowsPerPageOptions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/components",
3
- "version": "6.5.4",
3
+ "version": "6.5.6",
4
4
  "description": "Componentes reutilizables en las WebApps de Zauru.",
5
5
  "main": "./dist/esm/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -62,5 +62,5 @@
62
62
  "styled-components": "^5.3.5",
63
63
  "zod": "^3.23.8"
64
64
  },
65
- "gitHead": "322a6b620a8e384a6b221999cfe13628511014fb"
65
+ "gitHead": "563f879c95b2f3e76bc28623a9e09c8a103c599e"
66
66
  }
@@ -20,7 +20,18 @@ const headerTextWrapStyle = {
20
20
  lineHeight: "1.25",
21
21
  } as const;
22
22
 
23
+ const fillContainerWidthStyle = {
24
+ width: "100%",
25
+ minWidth: "100%",
26
+ maxWidth: "none",
27
+ } as const;
28
+
23
29
  const customStyles: TableStyles = {
30
+ table: {
31
+ style: {
32
+ ...fillContainerWidthStyle,
33
+ },
34
+ },
24
35
  tableWrapper: {
25
36
  style: {
26
37
  display: "block",
@@ -38,11 +49,17 @@ const customStyles: TableStyles = {
38
49
  overflowX: "auto",
39
50
  },
40
51
  },
52
+ head: {
53
+ style: {
54
+ ...fillContainerWidthStyle,
55
+ },
56
+ },
41
57
  headRow: {
42
58
  style: {
43
59
  minHeight: "40px",
44
60
  height: "auto",
45
61
  alignItems: "stretch",
62
+ ...fillContainerWidthStyle,
46
63
  },
47
64
  denseStyle: {
48
65
  minHeight: "36px",
@@ -88,6 +105,9 @@ const customStyles: TableStyles = {
88
105
  },
89
106
  },
90
107
  rows: {
108
+ style: {
109
+ ...fillContainerWidthStyle,
110
+ },
91
111
  highlightOnHoverStyle: {
92
112
  backgroundColor: "rgb(230, 244, 244)",
93
113
  borderBottomColor: "#FFFFFF",
@@ -292,7 +312,18 @@ export const ZauruTable = (props: Props) => {
292
312
  if (!column || typeof column !== "object") {
293
313
  return column;
294
314
  }
295
- return { wrap: true, ...column };
315
+ const next = { wrap: true, ...column };
316
+ // RDT `width` sets both min-width and max-width, wiping a px floor.
317
+ // Keep % as flex-basis so minWidth/maxWidth/grow still apply.
318
+ if (typeof next.width === "string" && next.width.endsWith("%")) {
319
+ const pct = next.width;
320
+ delete next.width;
321
+ next.style = {
322
+ flexBasis: pct,
323
+ ...next.style,
324
+ };
325
+ }
326
+ return next;
296
327
  })
297
328
  : columns;
298
329