@harpercollins/harpercollins-design-system 1.36.1 → 1.37.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.
@@ -1,15 +1,15 @@
1
- import { jsx as D } from "react/jsx-runtime";
2
- import { useReactTable as ie } from "../../../../node_modules/.pnpm/@tanstack_react-table@8.21.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@tanstack/react-table/build/lib/index.js";
1
+ import { jsx as A } from "react/jsx-runtime";
2
+ import { useReactTable as ce } from "../../../../node_modules/.pnpm/@tanstack_react-table@8.21.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@tanstack/react-table/build/lib/index.js";
3
3
  import n from "react";
4
- import { useLocalStorage as H } from "../../../../hooks/useLocalStorage.js";
5
- import L from "../../../inputs/Checkbox/Checkbox.js";
6
- import { multiSelectFilter as se, selectFilter as le, dateFilter as re, numericFilter as ue, textFilter as ce } from "../filters/filterFunctions.js";
7
- import { extractColumnFilterTypes as B, parseSortingFromUrl as me, parseFiltersFromUrl as ae, syncStateToUrl as fe } from "../tableUrlUtils.js";
8
- import { useInfiniteScroll as ge } from "./useInfiniteScroll.js";
9
- import { getFilteredRowModel as de, getSortedRowModel as he, getCoreRowModel as Ce } from "../../../../node_modules/.pnpm/@tanstack_table-core@8.21.3/node_modules/@tanstack/table-core/build/lib/index.js";
10
- function Re({ table: s }) {
11
- return /* @__PURE__ */ D(
12
- L,
4
+ import { useLocalStorage as F } from "../../../../hooks/useLocalStorage.js";
5
+ import P from "../../../inputs/Checkbox/Checkbox.js";
6
+ import { multiSelectFilter as ue, selectFilter as ae, dateFilter as me, numericFilter as fe, textFilter as ge } from "../filters/filterFunctions.js";
7
+ import { extractColumnFilterTypes as L, parseSortingFromUrl as de, parseFiltersFromUrl as he, syncStateToUrl as Ce } from "../tableUrlUtils.js";
8
+ import { useInfiniteScroll as Re } from "./useInfiniteScroll.js";
9
+ import { getFilteredRowModel as Se, getSortedRowModel as we, getCoreRowModel as Fe } from "../../../../node_modules/.pnpm/@tanstack_table-core@8.21.3/node_modules/@tanstack/table-core/build/lib/index.js";
10
+ function ye({ table: s }) {
11
+ return /* @__PURE__ */ A(
12
+ P,
13
13
  {
14
14
  checked: s.getIsAllRowsSelected(),
15
15
  indeterminate: s.getIsSomeRowsSelected(),
@@ -18,9 +18,9 @@ function Re({ table: s }) {
18
18
  }
19
19
  );
20
20
  }
21
- function Se({ row: s }) {
22
- return /* @__PURE__ */ D(
23
- L,
21
+ function pe({ row: s }) {
22
+ return /* @__PURE__ */ A(
23
+ P,
24
24
  {
25
25
  checked: s.getIsSelected(),
26
26
  disabled: !s.getCanSelect(),
@@ -29,87 +29,93 @@ function Se({ row: s }) {
29
29
  }
30
30
  );
31
31
  }
32
- function ke({
32
+ function Ne({
33
33
  id: s,
34
34
  loading: l = !1,
35
35
  reactTableOptions: t,
36
36
  gridCheckboxes: f = !1,
37
- allSelected: w = !1,
38
- onSelectionChange: F,
39
- infiniteScroll: u,
40
- syncUrl: c = !1,
41
- urlParamPrefix: m = ""
37
+ allSelected: y = !1,
38
+ onSelectionChange: p,
39
+ infiniteScroll: c,
40
+ syncUrl: u = !1,
41
+ urlParamPrefix: a = "",
42
+ initialWrapText: _ = !1
42
43
  }) {
43
- const { columns: r } = t, A = n.useRef(
44
- B(r)
45
- ), [y, P] = n.useState(() => {
46
- if (c && typeof window < "u") {
44
+ const { columns: r } = t, $ = n.useRef(
45
+ L(r)
46
+ ), [z, U] = n.useState(() => {
47
+ if (u && typeof window < "u") {
47
48
  const e = new URLSearchParams(window.location.search);
48
- return me(e, m);
49
+ return de(e, a);
49
50
  }
50
51
  return [];
51
- }), [z, _] = n.useState(
52
+ }), [M, W] = n.useState(
52
53
  () => {
53
- if (c && typeof window < "u") {
54
+ if (u && typeof window < "u") {
54
55
  const e = new URLSearchParams(window.location.search);
55
- return ae(
56
+ return he(
56
57
  e,
57
- m,
58
- A.current
58
+ a,
59
+ $.current
59
60
  );
60
61
  }
61
62
  return [];
62
63
  }
63
- ), [U, $] = H(
64
+ ), [g, x] = F(
65
+ `table.${s}.wrapText`,
66
+ _
67
+ ), j = n.useCallback(() => {
68
+ x(!g);
69
+ }, [g, x]), [G, K] = F(
64
70
  `table.${s}.columnSizing`,
65
71
  {}
66
- ), j = n.useRef(r), g = n.useMemo(() => {
72
+ ), q = n.useRef(r), d = n.useMemo(() => {
67
73
  const e = {};
68
- return j.current.forEach((i) => {
74
+ return q.current.forEach((i) => {
69
75
  const o = i.id ?? i.accessorKey;
70
76
  o && i.meta?.hidden && (e[o] = !1);
71
77
  }), e;
72
- }, []), [d, a] = H(
78
+ }, []), [h, m] = F(
73
79
  `table.${s}.columnVisibility`,
74
- g
75
- ), G = n.useCallback(() => {
76
- a(g);
77
- }, [g, a]), K = n.useCallback(
80
+ d
81
+ ), J = n.useCallback(() => {
82
+ m(d);
83
+ }, [d, m]), Q = n.useCallback(
78
84
  (e) => {
79
- a(
80
- typeof e == "function" ? e(d) : e
85
+ m(
86
+ typeof e == "function" ? e(h) : e
81
87
  );
82
88
  },
83
- [d, a]
84
- ), [q, J] = n.useState({}), Q = n.useCallback(
89
+ [h, m]
90
+ ), [X, Y] = n.useState({}), Z = n.useCallback(
85
91
  (e) => {
86
- J((i) => {
92
+ Y((i) => {
87
93
  const o = typeof e == "function" ? e(i) : e;
88
- return F?.(o), o;
94
+ return p?.(o), o;
89
95
  });
90
96
  },
91
- [F]
92
- ), M = n.useRef(null), h = n.useRef(t.data), W = l && h.current.length > 0 ? h.current : t.data;
97
+ [p]
98
+ ), b = n.useRef(null), C = n.useRef(t.data), T = l && C.current.length > 0 ? C.current : t.data;
93
99
  n.useEffect(() => {
94
- !l && t.data.length > 0 && (h.current = t.data);
100
+ !l && t.data.length > 0 && (C.current = t.data);
95
101
  }, [l, t.data]);
96
- const C = n.useRef(null), X = n.useRef(null), Y = n.useMemo(() => {
102
+ const R = n.useRef(null), O = n.useRef(null), ee = n.useMemo(() => {
97
103
  const e = [], i = [];
98
104
  return r.forEach((o) => {
99
105
  o.meta?.pinned === "left" && o.id ? e.push(o.id) : o.meta?.pinned === "right" && o.id && i.push(o.id);
100
106
  }), { left: e, right: i };
101
- }, [r]), Z = n.useMemo(() => {
107
+ }, [r]), te = n.useMemo(() => {
102
108
  let e = [...r];
103
109
  return e = e.map((i) => {
104
110
  const o = i.meta?.filterType;
105
111
  return o && !i.filterFn ? {
106
112
  ...i,
107
113
  filterFn: {
108
- text: ce,
109
- number: ue,
110
- date: re,
111
- select: le,
112
- multiselect: se
114
+ text: ge,
115
+ number: fe,
116
+ date: me,
117
+ select: ae,
118
+ multiselect: ue
113
119
  }[o]
114
120
  } : i;
115
121
  }), f && (e = [{
@@ -118,93 +124,95 @@ function ke({
118
124
  enableSorting: !1,
119
125
  enableResizing: !1,
120
126
  meta: { noSortButton: !0 },
121
- header: Re,
122
- cell: Se
127
+ header: ye,
128
+ cell: pe
123
129
  }, ...e]), e;
124
- }, [f, r]), R = ie({
130
+ }, [f, r]), S = ce({
125
131
  // Overridable defaults
126
132
  columnResizeDirection: "ltr",
127
133
  defaultColumn: { size: 200, minSize: 20, maxSize: 500 },
128
134
  // Consumer customisation
129
135
  ...t,
130
136
  // Values always controlled by this hook
131
- getCoreRowModel: Ce(),
132
- getSortedRowModel: he(),
133
- getFilteredRowModel: de(),
134
- columns: Z,
135
- data: W,
137
+ getCoreRowModel: Fe(),
138
+ getSortedRowModel: we(),
139
+ getFilteredRowModel: Se(),
140
+ columns: te,
141
+ data: T,
136
142
  enableSorting: t.enableSorting ?? !0,
137
143
  enableColumnResizing: t.enableColumnResizing ?? !0,
138
144
  columnResizeMode: t.columnResizeMode ?? "onChange",
139
- onColumnSizingChange: t.onColumnSizingChange ?? $,
140
- onSortingChange: t.onSortingChange ?? P,
141
- onColumnFiltersChange: t.onColumnFiltersChange ?? _,
142
- onColumnVisibilityChange: t.onColumnVisibilityChange ?? K,
145
+ onColumnSizingChange: t.onColumnSizingChange ?? K,
146
+ onSortingChange: t.onSortingChange ?? U,
147
+ onColumnFiltersChange: t.onColumnFiltersChange ?? W,
148
+ onColumnVisibilityChange: t.onColumnVisibilityChange ?? Q,
143
149
  enableRowSelection: f,
144
- onRowSelectionChange: t.onRowSelectionChange ?? Q,
150
+ onRowSelectionChange: t.onRowSelectionChange ?? Z,
145
151
  state: {
146
152
  ...t.state,
147
- rowSelection: t.state?.rowSelection ?? q,
148
- sorting: t.state?.sorting ?? y,
149
- columnFilters: t.state?.columnFilters ?? z,
150
- columnSizing: U,
151
- columnPinning: Y,
152
- columnVisibility: t.state?.columnVisibility ?? d
153
+ rowSelection: t.state?.rowSelection ?? X,
154
+ sorting: t.state?.sorting ?? z,
155
+ columnFilters: t.state?.columnFilters ?? M,
156
+ columnSizing: G,
157
+ columnPinning: ee,
158
+ columnVisibility: t.state?.columnVisibility ?? h
153
159
  }
154
- }), { rows: p } = R.getRowModel(), {
155
- enabled: T,
156
- virtualItems: O,
157
- paddingTop: ee,
158
- paddingBottom: te,
159
- measureElement: ne
160
- } = ge(p.length, u, C), b = u?.enabled, x = u?.hasNextPage, V = u?.isFetchingNextPage, k = u?.fetchNextPage, oe = 200, S = n.useCallback(
160
+ }), { rows: V } = S.getRowModel(), {
161
+ enabled: ne,
162
+ virtualItems: oe,
163
+ paddingTop: ie,
164
+ paddingBottom: se,
165
+ measureElement: le
166
+ } = Re(V.length, c, R), k = c?.enabled, E = c?.hasNextPage, v = c?.isFetchingNextPage, I = c?.fetchNextPage, re = 200, w = n.useCallback(
161
167
  (e) => {
162
- if (!e || !b) return;
163
- const { scrollHeight: i, scrollTop: o, clientHeight: N } = e;
164
- i - o - N < oe && !V && x && k?.();
168
+ if (!e || !k) return;
169
+ const { scrollHeight: i, scrollTop: o, clientHeight: D } = e;
170
+ i - o - D < re && !v && E && I?.();
165
171
  },
166
- [b, x, V, k]
172
+ [k, E, v, I]
167
173
  );
168
174
  n.useEffect(() => {
169
- S(C.current);
170
- }, [S]), M.current = R, n.useEffect(() => {
171
- M.current?.toggleAllRowsSelected(w);
172
- }, [w]);
173
- const E = t.state?.sorting ?? y, v = t.state?.columnFilters ?? z, I = n.useMemo(
174
- () => B(
175
+ w(R.current);
176
+ }, [w]), b.current = S, n.useEffect(() => {
177
+ b.current?.toggleAllRowsSelected(y);
178
+ }, [y]);
179
+ const N = t.state?.sorting ?? z, H = t.state?.columnFilters ?? M, B = n.useMemo(
180
+ () => L(
175
181
  r
176
182
  ),
177
183
  [r]
178
184
  );
179
185
  return n.useEffect(() => {
180
- !c || typeof window > "u" || fe(
181
- E,
182
- v,
183
- m,
184
- I
186
+ !u || typeof window > "u" || Ce(
187
+ N,
188
+ H,
189
+ a,
190
+ B
185
191
  );
186
192
  }, [
187
- c,
188
- E,
189
- v,
190
- m,
191
- I
193
+ u,
194
+ N,
195
+ H,
196
+ a,
197
+ B
192
198
  ]), {
193
199
  id: s,
194
- table: R,
195
- rows: p,
196
- isVirtual: T,
197
- virtualItems: O,
198
- paddingTop: ee,
199
- paddingBottom: te,
200
- measureElement: ne,
201
- wrapperRef: C,
202
- toolbarRef: X,
200
+ table: S,
201
+ rows: V,
202
+ isVirtual: ne,
203
+ virtualItems: oe,
204
+ paddingTop: ie,
205
+ paddingBottom: se,
206
+ measureElement: le,
207
+ wrapperRef: R,
208
+ toolbarRef: O,
203
209
  loading: l,
204
- fetchMoreOnBottomReached: S,
205
- resetColumnVisibility: G
210
+ fetchMoreOnBottomReached: w,
211
+ resetColumnVisibility: J,
212
+ wrapText: g,
213
+ toggleWrapText: j
206
214
  };
207
215
  }
208
216
  export {
209
- ke as useDataGrid
217
+ Ne as useDataGrid
210
218
  };
@@ -6,9 +6,9 @@ function G({
6
6
  loading: r = !1,
7
7
  maxHeight: l = !1,
8
8
  wrapText: f = !1,
9
- rowRender: o,
10
- reactTableOptions: s,
11
- gridCheckboxes: t = !1,
9
+ rowRender: t,
10
+ reactTableOptions: o,
11
+ gridCheckboxes: s = !1,
12
12
  allSelected: i = !1,
13
13
  onSelectionChange: n,
14
14
  showStickyScrollbar: d = !1,
@@ -16,38 +16,38 @@ function G({
16
16
  stickyHeaderOffset: u = 0,
17
17
  infiniteScroll: p,
18
18
  toolbar: c,
19
- footer: y,
20
- isError: b = !1,
21
- errorMessage: g = "An error occurred while loading data. Please try again.",
22
- syncUrl: x = !1,
23
- urlParamPrefix: L = ""
19
+ footer: x,
20
+ isError: y = !1,
21
+ errorMessage: T = "An error occurred while loading data. Please try again.",
22
+ syncUrl: b = !1,
23
+ urlParamPrefix: g = ""
24
24
  }) {
25
25
  return /* @__PURE__ */ a(
26
26
  h,
27
27
  {
28
28
  id: e,
29
29
  loading: r,
30
- reactTableOptions: s,
31
- gridCheckboxes: t,
30
+ reactTableOptions: o,
31
+ gridCheckboxes: s,
32
32
  allSelected: i,
33
33
  onSelectionChange: n,
34
34
  infiniteScroll: p,
35
35
  toolbar: c,
36
- isError: b,
37
- errorMessage: g,
38
- syncUrl: x,
39
- urlParamPrefix: L,
40
- renderLayout: (T) => /* @__PURE__ */ a(
36
+ isError: y,
37
+ errorMessage: T,
38
+ syncUrl: b,
39
+ urlParamPrefix: g,
40
+ initialWrapText: f,
41
+ renderLayout: (L) => /* @__PURE__ */ a(
41
42
  j,
42
43
  {
43
- ctx: T,
44
+ ctx: L,
44
45
  maxHeight: l,
45
- wrapText: f,
46
- rowRender: o,
46
+ rowRender: t,
47
47
  showStickyScrollbar: d,
48
48
  enableStickyHeader: m,
49
49
  stickyHeaderOffset: u,
50
- footer: y
50
+ footer: x
51
51
  }
52
52
  )
53
53
  }
@@ -1,21 +1,22 @@
1
1
  import e from "styled-components";
2
2
  import r from "../../../node_modules/.pnpm/@mui_joy@5.0.0-beta.52_@emotion_react@11.14.0_@types_react@18.3.28_react@18.3.1__@emoti_58201694b486b0db36cbf79098c4edaa/node_modules/@mui/joy/Box/Box.js";
3
- const l = e.div`
3
+ const s = e.div`
4
4
  width: 100%;
5
5
  max-height: ${({ $maxHeight: t }) => t ? "75vh" : "initial"};
6
6
  background: var(--palette-background-surface);
7
7
  overflow-x: auto;
8
8
  overflow-y: ${({ $maxHeight: t }) => t ? "auto" : "visible"};
9
9
  position: relative;
10
- `, s = e.button`
10
+ `, d = e.button`
11
11
  && {
12
12
  display: flex;
13
13
  flex-wrap: nowrap;
14
14
  align-items: center;
15
- gap: 6px;
16
- flex: 0 1 auto;
15
+ gap: 2px;
16
+ flex: 1 1 0;
17
17
  justify-content: space-between;
18
18
  min-width: 0;
19
+ overflow: hidden;
19
20
  height: 100%;
20
21
  background: none;
21
22
  border: none;
@@ -26,35 +27,50 @@ const l = e.div`
26
27
  color: inherit;
27
28
  font-size: inherit;
28
29
  font-weight: bold;
29
- white-space: wrap;
30
- max-width: 300px;
31
30
  }
32
31
  // disabled state
33
32
  &&:disabled {
34
33
  cursor: auto;
35
34
  }
36
35
  `, h = e.span`
36
+ flex-shrink: 0;
37
+ display: ${({ $isSorted: t }) => t ? "flex" : "none"};
38
+ align-items: center;
39
+ justify-content: center;
40
+
41
+ ${d}:hover & {
42
+ display: flex;
43
+ }
44
+ `, c = e.span`
37
45
  && {
38
46
  display: flex;
39
47
  flex-wrap: nowrap;
40
48
  align-items: center;
41
49
  gap: 6px;
42
- flex: 0 1 auto;
43
- justify-content: space-between;
50
+ flex: 1 1 0;
44
51
  min-width: 0;
52
+ overflow: hidden;
45
53
  height: 100%;
46
54
  padding: 0;
47
55
  font-weight: bold;
48
- white-space: wrap;
49
- max-width: 300px;
50
56
  }
51
- `, c = e.div`
57
+ `, g = e.span`
58
+ flex: 1 1 0;
59
+ min-width: 0;
60
+ overflow: hidden;
61
+ text-overflow: ellipsis;
62
+ display: -webkit-box;
63
+ -webkit-line-clamp: 3;
64
+ -webkit-box-orient: vertical;
65
+ white-space: normal;
66
+ font-size: 0.75rem;
67
+ `, f = e.div`
52
68
  display: flex;
53
69
  align-items: center;
54
70
  gap: 2px;
55
71
  width: 100%;
56
72
  height: 100%;
57
- `, g = e(r)`
73
+ `, b = e(r)`
58
74
  position: absolute;
59
75
  top: 0;
60
76
  left: 0;
@@ -66,7 +82,7 @@ const l = e.div`
66
82
  align-items: flex-start;
67
83
  z-index: 1;
68
84
  padding-top: 10%;
69
- `, f = (t, i, o, a, n) => ({
85
+ `, x = (t, i, o, n, a) => ({
70
86
  ...t,
71
87
  tableLayout: "fixed",
72
88
  width: "100%",
@@ -81,7 +97,7 @@ const l = e.div`
81
97
  verticalAlign: "middle",
82
98
  position: "sticky",
83
99
  zIndex: 1,
84
- top: !n && a ? "var(--header-top, 0px)" : 0
100
+ top: !a && n ? "var(--header-top, 0px)" : 0
85
101
  },
86
102
  "& tfoot": {
87
103
  position: "sticky",
@@ -165,7 +181,7 @@ const l = e.div`
165
181
  display: "flex",
166
182
  alignItems: "center",
167
183
  flexWrap: "nowrap",
168
- gap: "6px",
184
+ gap: "2px",
169
185
  position: "relative",
170
186
  border: "none",
171
187
  cursor: "pointer",
@@ -187,10 +203,12 @@ const l = e.div`
187
203
  }
188
204
  });
189
205
  export {
190
- h as ColumnHeaderContainer,
191
- c as HeaderContent,
192
- g as LoadingOverlay,
193
- s as SortButton,
194
- l as TableWrapper,
195
- f as getTableStyles
206
+ c as ColumnHeaderContainer,
207
+ f as HeaderContent,
208
+ g as HeaderLabel,
209
+ b as LoadingOverlay,
210
+ d as SortButton,
211
+ h as SortIcon,
212
+ s as TableWrapper,
213
+ x as getTableStyles
196
214
  };
@@ -1,68 +1,68 @@
1
1
  import { jsx as n, Fragment as p, jsxs as r } from "react/jsx-runtime";
2
2
  import { faArrowDown as c, faArrowUp as m } from "../../../node_modules/.pnpm/@fortawesome_free-solid-svg-icons@6.7.2/node_modules/@fortawesome/free-solid-svg-icons/index.js";
3
3
  import { flexRender as l } from "../../../node_modules/.pnpm/@tanstack_react-table@8.21.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@tanstack/react-table/build/lib/index.js";
4
- import t from "../Icon/Icon.js";
5
- import { HeaderContent as S, SortButton as C, ColumnHeaderContainer as z } from "./Table.styles.js";
6
- import { SortDirection as a } from "./Table.types.js";
7
- import { ColumnFilter as D } from "../DataGrid/filters/FilterComponents.js";
4
+ import { ColumnFilter as C } from "../DataGrid/filters/FilterComponents.js";
5
+ import o from "../Icon/Icon.js";
6
+ import { HeaderContent as z, SortButton as D, HeaderLabel as a, SortIcon as x, ColumnHeaderContainer as b } from "./Table.styles.js";
7
+ import { SortDirection as s } from "./Table.types.js";
8
8
  function w({
9
- headerGroups: s,
9
+ headerGroups: d,
10
10
  id: u,
11
- theadRef: d
11
+ theadRef: f
12
12
  }) {
13
- return /* @__PURE__ */ n(p, { children: s.map((o) => /* @__PURE__ */ n("thead", { ref: d, children: /* @__PURE__ */ n("tr", { children: o.headers.map((e, f) => {
14
- const g = f === o.headers.length - 1, i = e.column.getIsPinned();
13
+ return /* @__PURE__ */ n(p, { children: d.map((t) => /* @__PURE__ */ n("thead", { ref: f, children: /* @__PURE__ */ n("tr", { children: t.headers.map((e, g) => {
14
+ const S = g === t.headers.length - 1, i = e.column.getIsPinned();
15
15
  return /* @__PURE__ */ r(
16
16
  "th",
17
17
  {
18
18
  colSpan: e.colSpan,
19
19
  "data-pinned": i || void 0,
20
20
  style: {
21
- width: !i && g ? "auto" : `calc(var(--${u}-header-${e.id}-size) * 1px)`
21
+ width: !i && S ? "auto" : `calc(var(--${u}-header-${e.id}-size) * 1px)`
22
22
  },
23
23
  children: [
24
- e.isPlaceholder ? null : /* @__PURE__ */ r(S, { children: [
24
+ e.isPlaceholder ? null : /* @__PURE__ */ r(z, { children: [
25
25
  e.column.columnDef.meta?.noSortButton ? l(e.column.columnDef.header, e.getContext()) : e.column.getCanSort() ? /* @__PURE__ */ r(
26
- C,
26
+ D,
27
27
  {
28
28
  type: "button",
29
29
  "aria-label": `Sort ${e.id} column`,
30
30
  onClick: e.column.getToggleSortingHandler(),
31
31
  title: (
32
32
  // eslint-disable-next-line no-nested-ternary
33
- e.column.getNextSortingOrder() === a.ASC ? "Sort ascending" : e.column.getNextSortingOrder() === a.DESC ? "Sort descending" : "Clear sort"
33
+ e.column.getNextSortingOrder() === s.ASC ? "Sort ascending" : e.column.getNextSortingOrder() === s.DESC ? "Sort descending" : "Clear sort"
34
34
  ),
35
35
  children: [
36
- l(
36
+ /* @__PURE__ */ n(a, { children: l(
37
37
  e.column.columnDef.header,
38
38
  e.getContext()
39
- ),
40
- {
41
- asc: /* @__PURE__ */ n(t, { icon: m, size: "sm" }),
42
- desc: /* @__PURE__ */ n(t, { icon: c, size: "sm" })
39
+ ) }),
40
+ /* @__PURE__ */ n(x, { $isSorted: e.column.getIsSorted(), children: {
41
+ asc: /* @__PURE__ */ n(o, { icon: m, size: "sm" }),
42
+ desc: /* @__PURE__ */ n(o, { icon: c, size: "sm" })
43
43
  }[e.column.getIsSorted()] ?? (e.column.getNextSortingOrder() === "desc" ? /* @__PURE__ */ n(
44
- t,
44
+ o,
45
45
  {
46
46
  icon: c,
47
47
  size: "sm",
48
48
  className: "fade"
49
49
  }
50
50
  ) : /* @__PURE__ */ n(
51
- t,
51
+ o,
52
52
  {
53
53
  icon: m,
54
54
  size: "sm",
55
55
  className: "fade"
56
56
  }
57
- ))
57
+ )) })
58
58
  ]
59
59
  }
60
- ) : /* @__PURE__ */ n(z, { children: l(
60
+ ) : /* @__PURE__ */ n(b, { children: /* @__PURE__ */ n(a, { children: l(
61
61
  e.column.columnDef.header,
62
62
  e.getContext()
63
- ) }),
63
+ ) }) }),
64
64
  e.column.getCanFilter() && e.column.columnDef.meta?.filterType && /* @__PURE__ */ n(
65
- D,
65
+ C,
66
66
  {
67
67
  column: e.column,
68
68
  filterType: e.column.columnDef.meta.filterType,
@@ -85,7 +85,7 @@ function w({
85
85
  },
86
86
  e.id
87
87
  );
88
- }) }) }, o.id)) });
88
+ }) }) }, t.id)) });
89
89
  }
90
90
  export {
91
91
  w as default