@dmsi/wedgekit-react 3.0.1 → 3.1.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.
@@ -20,6 +20,7 @@ type DataGridCellProps = PropsWithChildren<{
20
20
  disabled?: boolean;
21
21
  isLast?: boolean;
22
22
  }>;
23
+ export declare const GridColumnSizeContext: import('react').Context<number | null>;
23
24
  export declare const DataGridCell: import('react').MemoExoticComponent<({ id, type, component, children, className, locked, noPadding, paddedLeft, style, onClick, onRightClick, error, warning, pending, center, width, minWidth, disabled, isLast, testid, ...props }: AsProps<Tags> & DataGridCellProps) => import("react/jsx-runtime").JSX.Element>;
24
25
  export type DataGridCellHeaderProps<T> = {
25
26
  header: Header<T, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"DataGridCell.d.ts","sourceRoot":"","sources":["../../src/components/DataGridCell.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,IAAI,EAGJ,MAAM,EACN,OAAO,EACR,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,cAAc,EAEd,iBAAiB,EACjB,SAAS,EAKV,MAAM,OAAO,CAAC;AAOf,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAExC,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAExB,KAAK,iBAAiB,GAAG,iBAAiB,CAAC;IACzC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;IACxC,SAAS,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC3E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IA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C,CAAC,SAAS,OAAO,EAAE,MAAM,EAAE,EACvD,IAAI,EACJ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE;IACD,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAC1C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,GAAG,iBAAiB,2CAkBpB;yBAzBe,aAAa"}
@@ -1,251 +1,251 @@
1
1
  "use client";
2
- import { jsx as r, jsxs as W, Fragment as X } from "react/jsx-runtime";
3
- import { useSortable as q } from "../node_modules/@dnd-kit/sortable/dist/sortable.esm.js";
4
- import { CSS as J } from "../node_modules/@dnd-kit/utilities/dist/utilities.esm.js";
2
+ import { jsx as r, jsxs as N, Fragment as ee } from "react/jsx-runtime";
3
+ import { useSortable as J } from "../node_modules/@dnd-kit/sortable/dist/sortable.esm.js";
4
+ import { CSS as Q } from "../node_modules/@dnd-kit/utilities/dist/utilities.esm.js";
5
5
  import { clsx as v } from "../node_modules/clsx/dist/clsx.js";
6
- import { memo as Y, useRef as V, useState as A, useEffect as B } from "react";
7
- import { componentPadding as Z, paddingUsingComponentGap as ee } from "../classNames.js";
8
- import { MenuOption as f } from "./MenuOption.js";
9
- import { Menu as U } from "./Menu.js";
6
+ import { createContext as ne, memo as te, useRef as B, useState as A, useContext as oe, useEffect as _ } from "react";
7
+ import { componentPadding as re, paddingUsingComponentGap as ie } from "../classNames.js";
8
+ import { MenuOption as m } from "./MenuOption.js";
9
+ import { Menu as V } from "./Menu.js";
10
10
  import { Icon as j } from "./Icon.js";
11
- import { Search as ne } from "./Search.js";
12
- import { useSubMenuSystem as te } from "../hooks/useMenuSystem.js";
13
- const _ = Y(
11
+ import { Search as le } from "./Search.js";
12
+ import { useSubMenuSystem as se } from "../hooks/useMenuSystem.js";
13
+ const ae = ne(null), K = te(
14
14
  ({
15
15
  id: e,
16
16
  type: d = "default",
17
17
  component: o = "static",
18
- children: m,
18
+ children: u,
19
19
  className: t,
20
20
  locked: n = !1,
21
- noPadding: g = !1,
22
- paddedLeft: $ = !1,
23
- style: w,
24
- onClick: p,
25
- onRightClick: C,
26
- error: h,
27
- warning: D,
28
- pending: P,
29
- center: k,
30
- width: b,
31
- minWidth: y,
32
- disabled: F,
33
- isLast: z,
21
+ noPadding: f = !1,
22
+ paddedLeft: M = !1,
23
+ style: C,
24
+ onClick: g,
25
+ onRightClick: w,
26
+ error: p,
27
+ warning: F,
28
+ pending: G,
29
+ center: I,
30
+ width: h,
31
+ minWidth: x,
32
+ disabled: T,
33
+ isLast: H,
34
34
  testid: O,
35
- ...H
35
+ ...L
36
36
  }) => {
37
- const L = d === "header" ? "th" : "td", c = V(null), [E, S] = A(!1), [M, x] = A(!1);
38
- B(() => () => {
37
+ const E = d === "header" ? "th" : "td", c = B(null), [R, y] = A(!1), [W, S] = A(!1), z = oe(ae), $ = h ?? (z != null ? `${z}px` : void 0), U = x ?? (h == null ? $ : void 0);
38
+ _(() => () => {
39
39
  c.current && (clearTimeout(c.current), c.current = null);
40
40
  }, []);
41
- const G = (u) => {
42
- x(!0), c.current = window.setTimeout(() => {
43
- S(!0);
41
+ const D = (k) => {
42
+ S(!0), c.current = window.setTimeout(() => {
43
+ y(!0);
44
44
  }, 500);
45
- }, I = (u) => {
45
+ }, P = (k) => {
46
46
  c.current && (clearTimeout(c.current), c.current = null);
47
- const K = u.nativeEvent instanceof MouseEvent && u.nativeEvent.button === 2;
48
- !E && p && !K && M && p(u), K && C && C(), S(!1), x(!1);
49
- }, R = () => {
47
+ const q = k.nativeEvent instanceof MouseEvent && k.nativeEvent.button === 2;
48
+ !R && g && !q && W && g(k), q && w && w(), y(!1), S(!1);
49
+ }, l = () => {
50
50
  c.current && (clearTimeout(c.current), c.current = null);
51
- }, T = d === "header" && !n && !["button"].includes(o) && "bg-brand-400 border-brand-200", N = n && !["button"].includes(o) && "bg-neutral-400 border-neutral-300", l = d === "header" && o !== "button" && o !== "icon" && !z && v("border-r"), a = o === "button" && v("border-r border-b border-border-primary-normal"), s = o === "icon" && v("border-l"), i = v(
52
- l,
51
+ }, a = d === "header" && !n && !["button"].includes(o) && "bg-brand-400 border-brand-200", s = n && !["button"].includes(o) && "bg-neutral-400 border-neutral-300", i = d === "header" && o !== "button" && o !== "icon" && !H && v("border-r"), b = o === "button" && v("border-r border-b border-border-primary-normal"), Y = o === "icon" && v("border-l"), Z = v(
52
+ i,
53
+ b,
53
54
  a,
54
- T,
55
- N,
56
55
  s,
56
+ Y,
57
57
  t,
58
58
  "flex flex-1 items-center gap-1 whitespace-nowrap h-10 relative text-text-primary-normal",
59
59
  "focus-within:!z-10",
60
60
  "overflow-x-hidden",
61
61
  "overflow-y-hidden",
62
62
  o === "input" && "border",
63
- o === "input" && !h && !D && "border-border-primary-normal",
64
- o === "input" && !h && !D && P && "[&:not(:focus-within)]:border-background-warning-normal",
65
- o === "input" && h && "border-border-primary-error",
66
- o === "input" && D && "border-background-warning-normal",
67
- !["button", "icon"].includes(o) && !g && Z,
68
- $ && "pl-2",
63
+ o === "input" && !p && !F && "border-border-primary-normal",
64
+ o === "input" && !p && !F && G && "[&:not(:focus-within)]:border-background-warning-normal",
65
+ o === "input" && p && "border-border-primary-error",
66
+ o === "input" && F && "border-background-warning-normal",
67
+ !["button", "icon"].includes(o) && !f && re,
68
+ M && "pl-2",
69
69
  o === "icon" && "border-l",
70
- E && "!cursor-grabbing",
71
- o === "checkbox" || k && "justify-center",
72
- F && "!text-text-primary-disabled"
70
+ R && "!cursor-grabbing",
71
+ o === "checkbox" || I && "justify-center",
72
+ T && "!text-text-primary-disabled"
73
73
  );
74
74
  return /* @__PURE__ */ r(
75
- L,
75
+ E,
76
76
  {
77
77
  id: e,
78
78
  "data-testid": O,
79
- className: v("flex h-10", !b && "flex-1"),
80
- style: { width: b, minWidth: y },
81
- ...H,
79
+ className: v("flex h-10", !$ && "flex-1"),
80
+ style: { width: $, minWidth: U },
81
+ ...L,
82
82
  "data-theme": d === "header" && !n ? "brand" : void 0,
83
83
  children: /* @__PURE__ */ r(
84
84
  "div",
85
85
  {
86
- className: i,
86
+ className: Z,
87
87
  style: {
88
- ...w
88
+ ...C
89
89
  },
90
- onMouseDown: G,
91
- onMouseUp: I,
92
- onMouseLeave: R,
93
- onTouchStart: G,
94
- onTouchEnd: I,
95
- onTouchCancel: R,
96
- onContextMenu: (u) => u.preventDefault(),
97
- children: m
90
+ onMouseDown: D,
91
+ onMouseUp: P,
92
+ onMouseLeave: l,
93
+ onTouchStart: D,
94
+ onTouchEnd: P,
95
+ onTouchCancel: l,
96
+ onContextMenu: (k) => k.preventDefault(),
97
+ children: u
98
98
  }
99
99
  )
100
100
  }
101
101
  );
102
102
  }
103
103
  );
104
- _.displayName = "DataGridCell";
105
- function Q({
104
+ K.displayName = "DataGridCell";
105
+ function X({
106
106
  header: e,
107
107
  children: d,
108
108
  setNodeRef: o,
109
- node: m,
109
+ node: u,
110
110
  id: t,
111
111
  testid: n,
112
- useMenuDefaultMinWidth: g,
113
- allowUserGrouping: $,
114
- ...w
112
+ useMenuDefaultMinWidth: f,
113
+ allowUserGrouping: M,
114
+ ...C
115
115
  }) {
116
- const [p, C] = A(!1), [h, D] = A(
116
+ const [g, w] = A(!1), [p, F] = A(
117
117
  e.column.getFilterValue() ?? ""
118
- ), P = V(null), k = V(!1), { column: b, getContext: y } = e, { id: F, setFilterValue: z } = b, {
118
+ ), G = B(null), I = B(!1), { column: h, getContext: x } = e, { id: T, setFilterValue: H } = h, {
119
119
  menuRootRef: O,
120
- isMenuActive: H,
121
- registerSubMenu: L,
120
+ isMenuActive: L,
121
+ registerSubMenu: E,
122
122
  listeners: c,
123
- mobileHide: E
124
- } = te(m || P);
125
- B(() => {
126
- const l = y().table.options.initialState?.columnPinning, a = l?.left ?? [], s = l?.right ?? [];
127
- k.current = [...a, ...s].includes(F);
128
- }, [F, y]), B(() => {
123
+ mobileHide: R
124
+ } = se(u || G);
125
+ _(() => {
126
+ const l = x().table.options.initialState?.columnPinning, a = l?.left ?? [], s = l?.right ?? [];
127
+ I.current = [...a, ...s].includes(T);
128
+ }, [T, x]), _(() => {
129
129
  const l = setTimeout(() => {
130
- z(h);
130
+ H(p);
131
131
  }, 500);
132
132
  return () => {
133
133
  clearTimeout(l);
134
134
  };
135
- }, [h, z]);
136
- const S = !!$ && b.getCanGroup(), M = b.getIsGrouped(), x = b.getGroupedIndex(), G = y().table.getState().grouping.length, I = (l) => {
137
- y().table.setGrouping((a) => {
138
- const s = a.indexOf(F), i = s + l;
135
+ }, [p, H]);
136
+ const y = !!M && h.getCanGroup(), W = h.getIsGrouped(), S = h.getGroupedIndex(), z = x().table.getState().grouping.length, $ = (l) => {
137
+ x().table.setGrouping((a) => {
138
+ const s = a.indexOf(T), i = s + l;
139
139
  if (s === -1 || i < 0 || i >= a.length)
140
140
  return a;
141
- const u = [...a];
142
- return [u[s], u[i]] = [u[i], u[s]], u;
141
+ const b = [...a];
142
+ return [b[s], b[i]] = [b[i], b[s]], b;
143
143
  });
144
- }, R = {
144
+ }, U = {
145
145
  position: "relative",
146
146
  whiteSpace: "nowrap",
147
147
  minWidth: e.column.getSize(),
148
148
  "--color-text-primary-normal": "var(--color-text-brand-primary-normal)",
149
149
  "--color-icon-on-action-primary-normal": "var(--color-text-brand-primary-normal)",
150
150
  "--background-action-secondary-normal": "var(--color-text-brand-primary-normal)",
151
- ...w.style
151
+ ...C.style
152
152
  };
153
- return /* @__PURE__ */ W(
154
- _,
153
+ return /* @__PURE__ */ N(
154
+ K,
155
155
  {
156
156
  id: t,
157
157
  testid: n,
158
- ref: o || P,
158
+ ref: o || G,
159
159
  type: "header",
160
160
  component: "header",
161
- style: R,
161
+ style: U,
162
162
  minWidth: `${e.column.getSize()}px`,
163
163
  onClick: e.column.getToggleSortingHandler(),
164
- onRightClick: () => C(!p),
165
- ...w,
164
+ onRightClick: () => w(!g),
165
+ ...C,
166
166
  children: [
167
167
  d,
168
- M && /* @__PURE__ */ r(
168
+ W && /* @__PURE__ */ r(
169
169
  j,
170
170
  {
171
171
  name: "workspaces",
172
172
  size: 16,
173
173
  className: "shrink-0",
174
- title: `Grouped (level ${x + 1})`,
174
+ title: `Grouped (level ${S + 1})`,
175
175
  "data-testid": n ? `${n}-grouped-indicator` : void 0
176
176
  }
177
177
  ),
178
- (e.column.getCanFilter() || !k.current && e.column.getCanPin() || S) && /* @__PURE__ */ W(
179
- U,
178
+ (e.column.getCanFilter() || !I.current && e.column.getCanPin() || y) && /* @__PURE__ */ N(
179
+ V,
180
180
  {
181
181
  id: t ? `${t}-menu` : void 0,
182
182
  testid: n ? `${n}-menu` : void 0,
183
183
  ref: O,
184
- positionTo: m || P,
185
- show: p,
186
- setShow: C,
187
- mobileHide: E,
188
- useDefaultMinWidth: g,
184
+ positionTo: u || G,
185
+ show: g,
186
+ setShow: w,
187
+ mobileHide: R,
188
+ useDefaultMinWidth: f,
189
189
  children: [
190
190
  e.column.getCanFilter() && /* @__PURE__ */ r(
191
- f,
191
+ m,
192
192
  {
193
193
  id: t ? `${t}-filter-option` : void 0,
194
194
  testid: n ? `${n}-filter-option` : void 0,
195
195
  ...c,
196
- subMenu: ({ menuId: l, subMenuLevel: a, ...s }) => /* @__PURE__ */ W(
197
- U,
196
+ subMenu: ({ menuId: l, subMenuLevel: a, ...s }) => /* @__PURE__ */ N(
197
+ V,
198
198
  {
199
199
  id: t ? `${t}-filter-submenu` : void 0,
200
200
  testid: n ? `${n}-filter-submenu` : void 0,
201
201
  ...s,
202
- show: H(l, a),
202
+ show: L(l, a),
203
203
  ref: (i) => {
204
- L(l, i);
204
+ E(l, i);
205
205
  },
206
- useDefaultMinWidth: g,
206
+ useDefaultMinWidth: f,
207
207
  children: [
208
- /* @__PURE__ */ r("div", { className: v(ee), children: /* @__PURE__ */ r(
209
- ne,
208
+ /* @__PURE__ */ r("div", { className: v(ie), children: /* @__PURE__ */ r(
209
+ le,
210
210
  {
211
211
  id: t ? `${t}-filter-search` : void 0,
212
212
  testid: n ? `${n}-filter-search` : void 0,
213
213
  onChange: (i) => {
214
- D(i.target.value);
214
+ F(i.target.value);
215
215
  },
216
216
  onKeyDown: (i) => {
217
217
  [" ", "Space"].includes(i.key) && i.stopPropagation();
218
218
  },
219
- value: h ?? ""
219
+ value: p ?? ""
220
220
  }
221
221
  ) }),
222
222
  /* @__PURE__ */ r(
223
- f,
223
+ m,
224
224
  {
225
225
  id: t ? `${t}-filter-contains` : void 0,
226
226
  testid: n ? `${n}-filter-contains` : void 0,
227
- onClick: N,
228
- before: T("includesString"),
227
+ onClick: P,
228
+ before: D("includesString"),
229
229
  children: "Contains"
230
230
  }
231
231
  ),
232
232
  /* @__PURE__ */ r(
233
- f,
233
+ m,
234
234
  {
235
235
  id: t ? `${t}-filter-startswith` : void 0,
236
236
  testid: n ? `${n}-filter-startswith` : void 0,
237
- onClick: N,
238
- before: T("startsWith"),
237
+ onClick: P,
238
+ before: D("startsWith"),
239
239
  children: "Starts with"
240
240
  }
241
241
  ),
242
242
  /* @__PURE__ */ r(
243
- f,
243
+ m,
244
244
  {
245
245
  id: t ? `${t}-filter-endswith` : void 0,
246
246
  testid: n ? `${n}-filter-endswith` : void 0,
247
- onClick: N,
248
- before: T("endsWith"),
247
+ onClick: P,
248
+ before: D("endsWith"),
249
249
  children: "Ends with"
250
250
  }
251
251
  )
@@ -255,24 +255,24 @@ function Q({
255
255
  children: "Filter"
256
256
  }
257
257
  ),
258
- !k.current && e.column.getCanPin() && /* @__PURE__ */ r(
259
- f,
258
+ !I.current && e.column.getCanPin() && /* @__PURE__ */ r(
259
+ m,
260
260
  {
261
261
  onClick: () => {
262
- C(!p);
262
+ w(!g);
263
263
  },
264
264
  ...c,
265
- subMenu: ({ menuId: l, subMenuLevel: a, ...s }) => /* @__PURE__ */ W(
266
- U,
265
+ subMenu: ({ menuId: l, subMenuLevel: a, ...s }) => /* @__PURE__ */ N(
266
+ V,
267
267
  {
268
268
  ...s,
269
- show: H(l, a),
269
+ show: L(l, a),
270
270
  ref: (i) => {
271
- L(l, i);
271
+ E(l, i);
272
272
  },
273
273
  children: [
274
274
  /* @__PURE__ */ r(
275
- f,
275
+ m,
276
276
  {
277
277
  selected: e.column.getIsPinned() === "left",
278
278
  onClick: () => {
@@ -283,7 +283,7 @@ function Q({
283
283
  }
284
284
  ),
285
285
  /* @__PURE__ */ r(
286
- f,
286
+ m,
287
287
  {
288
288
  selected: e.column.getIsPinned() === "right",
289
289
  onClick: () => {
@@ -296,36 +296,36 @@ function Q({
296
296
  ]
297
297
  }
298
298
  ),
299
- children: `Freeze [${e.column.columnDef.header}]`
299
+ children: `Freeze ${e.column.columnDef.header}`
300
300
  }
301
301
  ),
302
- S && /* @__PURE__ */ r(
303
- f,
302
+ y && /* @__PURE__ */ r(
303
+ m,
304
304
  {
305
305
  id: t ? `${t}-group-option` : void 0,
306
306
  testid: n ? `${n}-group-option` : void 0,
307
307
  onClick: e.column.getToggleGroupingHandler(),
308
- children: M ? "Remove group" : `Group by [${e.column.columnDef.header}]`
308
+ children: W ? "Remove group" : `Group by [${e.column.columnDef.header}]`
309
309
  }
310
310
  ),
311
- S && M && G > 1 && /* @__PURE__ */ W(X, { children: [
311
+ y && W && z > 1 && /* @__PURE__ */ N(ee, { children: [
312
312
  /* @__PURE__ */ r(
313
- f,
313
+ m,
314
314
  {
315
315
  id: t ? `${t}-group-move-up` : void 0,
316
316
  testid: n ? `${n}-group-move-up` : void 0,
317
- disabled: x === 0,
318
- onClick: () => I(-1),
317
+ disabled: S === 0,
318
+ onClick: () => $(-1),
319
319
  children: "Move up"
320
320
  }
321
321
  ),
322
322
  /* @__PURE__ */ r(
323
- f,
323
+ m,
324
324
  {
325
325
  id: t ? `${t}-group-move-down` : void 0,
326
326
  testid: n ? `${n}-group-move-down` : void 0,
327
- disabled: x === G - 1,
328
- onClick: () => I(1),
327
+ disabled: S === z - 1,
328
+ onClick: () => $(1),
329
329
  children: "Move down"
330
330
  }
331
331
  )
@@ -336,7 +336,7 @@ function Q({
336
336
  ]
337
337
  }
338
338
  );
339
- function T(l) {
339
+ function D(l) {
340
340
  return /* @__PURE__ */ r(
341
341
  j,
342
342
  {
@@ -347,24 +347,24 @@ function Q({
347
347
  }
348
348
  );
349
349
  }
350
- function N(l, a) {
350
+ function P(l, a) {
351
351
  let s = "includesString";
352
352
  const i = e.column.columnDef.filterFn;
353
- a?.toLowerCase() === "starts with" && (s = i === "startsWith" ? "auto" : "startsWith"), a?.toLowerCase() === "ends with" && (s = i === "endsWith" ? "auto" : "endsWith"), a?.toLowerCase() === "contains" && (s = i === "includesString" ? "auto" : "includesString"), e.column.columnDef.filterFn = s, e.column.setFilterValue(h);
353
+ a?.toLowerCase() === "starts with" && (s = i === "startsWith" ? "auto" : "startsWith"), a?.toLowerCase() === "ends with" && (s = i === "endsWith" ? "auto" : "endsWith"), a?.toLowerCase() === "contains" && (s = i === "includesString" ? "auto" : "includesString"), e.column.columnDef.filterFn = s, e.column.setFilterValue(p);
354
354
  }
355
355
  }
356
- Q.displayName = "DataCellHeader";
357
- function oe({
356
+ X.displayName = "DataCellHeader";
357
+ function ce({
358
358
  header: e,
359
359
  children: d,
360
360
  ...o
361
361
  }) {
362
- const { attributes: m, isDragging: t, listeners: n, setNodeRef: g, transform: $, node: w } = q({
362
+ const { attributes: u, isDragging: t, listeners: n, setNodeRef: f, transform: M, node: C } = J({
363
363
  id: e.column.id
364
- }), p = {
364
+ }), g = {
365
365
  opacity: t ? 0.8 : 1,
366
366
  position: "relative",
367
- transform: J.Translate.toString($),
367
+ transform: Q.Translate.toString(M),
368
368
  transition: "width transform 0.2s ease-in-out",
369
369
  whiteSpace: "nowrap",
370
370
  zIndex: t ? 1 : 0,
@@ -373,40 +373,41 @@ function oe({
373
373
  userSelect: "none"
374
374
  };
375
375
  return /* @__PURE__ */ r(
376
- Q,
376
+ X,
377
377
  {
378
378
  header: e,
379
- setNodeRef: g,
380
- node: w,
381
- style: p,
379
+ setNodeRef: f,
380
+ node: C,
381
+ style: g,
382
382
  ...o,
383
- ...m,
383
+ ...u,
384
384
  ...n,
385
385
  children: d
386
386
  }
387
387
  );
388
388
  }
389
- oe.displayName = "DraggableCellHeader";
390
- function re({
389
+ ce.displayName = "DraggableCellHeader";
390
+ function ue({
391
391
  cell: e,
392
392
  children: d,
393
393
  ...o
394
394
  }) {
395
- const { isDragging: m, setNodeRef: t, transform: n } = q({
395
+ const { isDragging: u, setNodeRef: t, transform: n } = J({
396
396
  id: e.column.id
397
- }), g = {
398
- opacity: m ? 0.8 : 1,
397
+ }), f = {
398
+ opacity: u ? 0.8 : 1,
399
399
  position: "relative",
400
- transform: J.Translate.toString(n),
400
+ transform: Q.Translate.toString(n),
401
401
  transition: "width transform 0.2s ease-in-out",
402
- zIndex: m ? 1 : 0
402
+ zIndex: u ? 1 : 0
403
403
  };
404
- return /* @__PURE__ */ r(_, { style: g, ref: t, width: `${e.column.getSize()}px`, ...o, children: d });
404
+ return /* @__PURE__ */ r(K, { style: f, ref: t, width: `${e.column.getSize()}px`, ...o, children: d });
405
405
  }
406
- re.displayName = "DragAlongCell";
406
+ ue.displayName = "DragAlongCell";
407
407
  export {
408
- Q as DataCellHeader,
409
- _ as DataGridCell,
410
- re as DragAlongCell,
411
- oe as DraggableCellHeader
408
+ X as DataCellHeader,
409
+ K as DataGridCell,
410
+ ue as DragAlongCell,
411
+ ce as DraggableCellHeader,
412
+ ae as GridColumnSizeContext
412
413
  };