@dmsi/wedgekit-react 0.0.172 → 0.0.174

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.
@@ -185,7 +185,7 @@ function DataCellHeader(_a) {
185
185
  "testid",
186
186
  "useMenuDefaultMinWidth"
187
187
  ]);
188
- var _a2;
188
+ var _a2, _b2, _c;
189
189
  const [showMenu, setShowMenu] = useState(false);
190
190
  const [filter, setFilter] = useState(
191
191
  (_a2 = header.column.getFilterValue()) != null ? _a2 : ""
@@ -219,7 +219,7 @@ function DataCellHeader(_a) {
219
219
  const style = __spreadValues({
220
220
  position: "relative",
221
221
  whiteSpace: "nowrap",
222
- width: header.column.getSize(),
222
+ width: (_c = (_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.headerWidth) != null ? _c : header.column.getSize(),
223
223
  "--color-text-primary-normal": "var(--color-text-brand-primary-normal)",
224
224
  "--color-icon-on-action-primary-normal": "var(--color-text-brand-primary-normal)",
225
225
  "--background-action-secondary-normal": "var(--color-text-brand-primary-normal)"
@@ -256,8 +256,8 @@ function DataCellHeader(_a) {
256
256
  id: id ? `${id}-filter-option` : void 0,
257
257
  testid: testid ? `${testid}-filter-option` : void 0
258
258
  }, subMenuListeners), {
259
- subMenu: (_b2) => {
260
- var _c = _b2, { menuId, subMenuLevel } = _c, props2 = __objRest(_c, ["menuId", "subMenuLevel"]);
259
+ subMenu: (_d) => {
260
+ var _e = _d, { menuId, subMenuLevel } = _e, props2 = __objRest(_e, ["menuId", "subMenuLevel"]);
261
261
  return /* @__PURE__ */ jsxs(
262
262
  Menu,
263
263
  __spreadProps(__spreadValues({
@@ -330,8 +330,8 @@ function DataCellHeader(_a) {
330
330
  setShowMenu(!showMenu);
331
331
  }
332
332
  }, subMenuListeners), {
333
- subMenu: (_d) => {
334
- var _e = _d, { menuId, subMenuLevel } = _e, props2 = __objRest(_e, ["menuId", "subMenuLevel"]);
333
+ subMenu: (_f) => {
334
+ var _g = _f, { menuId, subMenuLevel } = _g, props2 = __objRest(_g, ["menuId", "subMenuLevel"]);
335
335
  return /* @__PURE__ */ jsxs(
336
336
  Menu,
337
337
  __spreadProps(__spreadValues({}, props2), {
@@ -419,6 +419,7 @@ function DraggableCellHeader(_a) {
419
419
  "header",
420
420
  "children"
421
421
  ]);
422
+ var _a2, _b2;
422
423
  const { attributes, isDragging, listeners, setNodeRef, transform, node } = useSortable({
423
424
  id: header.column.id
424
425
  });
@@ -429,7 +430,7 @@ function DraggableCellHeader(_a) {
429
430
  transition: "width transform 0.2s ease-in-out",
430
431
  whiteSpace: "nowrap",
431
432
  zIndex: isDragging ? 1 : 0,
432
- width: header.column.getSize(),
433
+ width: (_b2 = (_a2 = header.column.columnDef.meta) == null ? void 0 : _a2.headerWidth) != null ? _b2 : header.column.getSize(),
433
434
  "--color-text-primary-normal": "var(--color-action-000)",
434
435
  "--color-icon-on-action-primary-normal": "var(--color-action-000)",
435
436
  userSelect: "none"
@@ -455,6 +456,7 @@ function DragAlongCell(_a) {
455
456
  "cell",
456
457
  "children"
457
458
  ]);
459
+ var _a2, _b2, _c, _d;
458
460
  const { isDragging, setNodeRef, transform } = useSortable({
459
461
  id: cell.column.id
460
462
  });
@@ -463,10 +465,19 @@ function DragAlongCell(_a) {
463
465
  position: "relative",
464
466
  transform: CSS.Translate.toString(transform),
465
467
  transition: "width transform 0.2s ease-in-out",
466
- width: cell.column.getSize(),
468
+ width: (_b2 = (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.headerWidth) != null ? _b2 : cell.column.getSize(),
467
469
  zIndex: isDragging ? 1 : 0
468
470
  };
469
- return /* @__PURE__ */ jsx(DataGridCell, __spreadProps(__spreadValues({ style, ref: setNodeRef }, props), { children }));
471
+ return /* @__PURE__ */ jsx(
472
+ DataGridCell,
473
+ __spreadProps(__spreadValues({
474
+ style,
475
+ ref: setNodeRef,
476
+ width: (_d = (_c = cell.column.columnDef.meta) == null ? void 0 : _c.headerWidth) != null ? _d : `${cell.column.getSize()}px`
477
+ }, props), {
478
+ children
479
+ })
480
+ );
470
481
  }
471
482
  DragAlongCell.displayName = "DragAlongCell";
472
483
 
@@ -1839,7 +1839,7 @@ function DataCellHeader(_a) {
1839
1839
  "testid",
1840
1840
  "useMenuDefaultMinWidth"
1841
1841
  ]);
1842
- var _a2;
1842
+ var _a2, _b2, _c;
1843
1843
  const [showMenu, setShowMenu] = (0, import_react10.useState)(false);
1844
1844
  const [filter, setFilter] = (0, import_react10.useState)(
1845
1845
  (_a2 = header.column.getFilterValue()) != null ? _a2 : ""
@@ -1873,7 +1873,7 @@ function DataCellHeader(_a) {
1873
1873
  const style = __spreadValues({
1874
1874
  position: "relative",
1875
1875
  whiteSpace: "nowrap",
1876
- width: header.column.getSize(),
1876
+ width: (_c = (_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.headerWidth) != null ? _c : header.column.getSize(),
1877
1877
  "--color-text-primary-normal": "var(--color-text-brand-primary-normal)",
1878
1878
  "--color-icon-on-action-primary-normal": "var(--color-text-brand-primary-normal)",
1879
1879
  "--background-action-secondary-normal": "var(--color-text-brand-primary-normal)"
@@ -1910,8 +1910,8 @@ function DataCellHeader(_a) {
1910
1910
  id: id ? `${id}-filter-option` : void 0,
1911
1911
  testid: testid ? `${testid}-filter-option` : void 0
1912
1912
  }, subMenuListeners), {
1913
- subMenu: (_b2) => {
1914
- var _c = _b2, { menuId, subMenuLevel } = _c, props2 = __objRest(_c, ["menuId", "subMenuLevel"]);
1913
+ subMenu: (_d) => {
1914
+ var _e = _d, { menuId, subMenuLevel } = _e, props2 = __objRest(_e, ["menuId", "subMenuLevel"]);
1915
1915
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1916
1916
  Menu,
1917
1917
  __spreadProps(__spreadValues({
@@ -1984,8 +1984,8 @@ function DataCellHeader(_a) {
1984
1984
  setShowMenu(!showMenu);
1985
1985
  }
1986
1986
  }, subMenuListeners), {
1987
- subMenu: (_d) => {
1988
- var _e = _d, { menuId, subMenuLevel } = _e, props2 = __objRest(_e, ["menuId", "subMenuLevel"]);
1987
+ subMenu: (_f) => {
1988
+ var _g = _f, { menuId, subMenuLevel } = _g, props2 = __objRest(_g, ["menuId", "subMenuLevel"]);
1989
1989
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1990
1990
  Menu,
1991
1991
  __spreadProps(__spreadValues({}, props2), {
@@ -2073,6 +2073,7 @@ function DraggableCellHeader(_a) {
2073
2073
  "header",
2074
2074
  "children"
2075
2075
  ]);
2076
+ var _a2, _b2;
2076
2077
  const { attributes, isDragging, listeners, setNodeRef, transform, node } = (0, import_sortable.useSortable)({
2077
2078
  id: header.column.id
2078
2079
  });
@@ -2083,7 +2084,7 @@ function DraggableCellHeader(_a) {
2083
2084
  transition: "width transform 0.2s ease-in-out",
2084
2085
  whiteSpace: "nowrap",
2085
2086
  zIndex: isDragging ? 1 : 0,
2086
- width: header.column.getSize(),
2087
+ width: (_b2 = (_a2 = header.column.columnDef.meta) == null ? void 0 : _a2.headerWidth) != null ? _b2 : header.column.getSize(),
2087
2088
  "--color-text-primary-normal": "var(--color-action-000)",
2088
2089
  "--color-icon-on-action-primary-normal": "var(--color-action-000)",
2089
2090
  userSelect: "none"
@@ -2109,6 +2110,7 @@ function DragAlongCell(_a) {
2109
2110
  "cell",
2110
2111
  "children"
2111
2112
  ]);
2113
+ var _a2, _b2, _c, _d;
2112
2114
  const { isDragging, setNodeRef, transform } = (0, import_sortable.useSortable)({
2113
2115
  id: cell.column.id
2114
2116
  });
@@ -2117,10 +2119,19 @@ function DragAlongCell(_a) {
2117
2119
  position: "relative",
2118
2120
  transform: CSS.Translate.toString(transform),
2119
2121
  transition: "width transform 0.2s ease-in-out",
2120
- width: cell.column.getSize(),
2122
+ width: (_b2 = (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.headerWidth) != null ? _b2 : cell.column.getSize(),
2121
2123
  zIndex: isDragging ? 1 : 0
2122
2124
  };
2123
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DataGridCell, __spreadProps(__spreadValues({ style, ref: setNodeRef }, props), { children }));
2125
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2126
+ DataGridCell,
2127
+ __spreadProps(__spreadValues({
2128
+ style,
2129
+ ref: setNodeRef,
2130
+ width: (_d = (_c = cell.column.columnDef.meta) == null ? void 0 : _c.headerWidth) != null ? _d : `${cell.column.getSize()}px`
2131
+ }, props), {
2132
+ children
2133
+ })
2134
+ );
2124
2135
  }
2125
2136
  DragAlongCell.displayName = "DragAlongCell";
2126
2137
  // Annotate the CommonJS export names for ESM import in node:
@@ -4,7 +4,7 @@ import {
4
4
  DataGridCell,
5
5
  DragAlongCell,
6
6
  DraggableCellHeader
7
- } from "../chunk-O4JGGMFE.js";
7
+ } from "../chunk-Z2KZO4J3.js";
8
8
  import "../chunk-UBU6IJML.js";
9
9
  import "../chunk-5GUW4DUY.js";
10
10
  import "../chunk-FFU6FB3K.js";