@stackone/malachite 2.137.0 → 2.139.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.
- package/COMPONENTS.md +3 -1
- package/dist/components/LinkCard.js +45 -51
- package/dist/components/LinkCard.js.map +1 -1
- package/dist/components/Table/Table.js +1118 -798
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/components/Table/TableColumnPicker.js +70 -0
- package/dist/components/Table/TableColumnPicker.js.map +1 -0
- package/dist/components/TileGrid.js +85 -0
- package/dist/components/TileGrid.js.map +1 -0
- package/dist/components/cardHref.js +13 -0
- package/dist/components/cardHref.js.map +1 -0
- package/dist/index.d.ts +119 -1
- package/dist/index.js +408 -404
- package/dist/index.js.map +1 -1
- package/dist/tailwind.css.js +1 -1
- package/package.json +1 -1
|
@@ -1,1096 +1,1416 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useVirtualizer as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
|
|
1
|
+
import { jsxs as y, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useVirtualizer as ar } from "@tanstack/react-virtual";
|
|
3
|
+
import je, { useState as te, useRef as j, useCallback as Nt, useId as cr, useEffect as le, useMemo as Ue, useLayoutEffect as Nn } from "react";
|
|
4
|
+
import Rn from "../CustomIcons/CaretDownIcon.js";
|
|
5
|
+
import dr from "../CustomIcons/CaretUpIcon.js";
|
|
6
|
+
import fr from "../CustomIcons/InfoIcon.js";
|
|
7
|
+
import hr from "../CustomIcons/WarningTriangleIcon.js";
|
|
8
|
+
import { DisclosureArrow as ur } from "../DisclosureArrow.js";
|
|
9
|
+
import pr from "../FrameHeader.js";
|
|
10
|
+
import vr from "../PinnedCornerCap.js";
|
|
11
|
+
import { Spinner as br } from "../Spinner.js";
|
|
12
|
+
import _n from "../Tooltip.js";
|
|
13
|
+
import mr from "../TruncatedTooltip.js";
|
|
14
|
+
import { devWarning as Ye } from "../devWarning.js";
|
|
15
|
+
import { FOCUS_RING_INSET as un, FOCUS_RING as In, FOCUS_RING_INSET_OVERLAY as gr } from "../focusRing.js";
|
|
16
|
+
import { FRAME_CLASS as yr, FRAME_PADDING as Se, FRAME_SECTION_RADIUS as we, FRAME_SECTION_BORDER as xr, FRAME_RADIUS as kr } from "../frameStyles.js";
|
|
17
|
+
import { hasHeaderContent as pn } from "../headerContent.js";
|
|
18
|
+
import { isFromInteractiveDescendant as vn, activateOnEnterOrSpace as Sr } from "../keyboardActivation.js";
|
|
19
|
+
import { FOREGROUND_RESET as Rt, SELECTED_ROW_ACCENT as Cn, SELECTED_TEXT_CONTEXT as Tn, SELECTED_ROW_FOREGROUND as On, SELECTED_ROW_BACKGROUND as Ct } from "../selectedRow.js";
|
|
20
|
+
import { VISUALLY_HIDDEN_STYLE as wr } from "../visuallyHiddenStyle.js";
|
|
21
|
+
import $r from "./TablePagination.js";
|
|
22
|
+
import { paginationPlacement as Er } from "./paginationPlacement.js";
|
|
23
|
+
import { useFillHeight as Nr } from "./useFillHeight.js";
|
|
24
|
+
const Rr = "200px", _r = /* @__PURE__ */ new Set(["auto", "scroll", "overlay"]), Ir = (e) => {
|
|
25
|
+
const r = (l) => l.parentElement ?? (l.getRootNode().host || null);
|
|
26
|
+
for (let l = r(e); l; l = r(l))
|
|
27
|
+
if (_r.has(getComputedStyle(l).overflowY))
|
|
28
|
+
return l;
|
|
29
|
+
return null;
|
|
30
|
+
}, Je = 16, Cr = 8, Tr = Je * 2 + Cr, Dn = 160, Or = (e, r) => e.length === r.length && e.every((l, v) => l === r[v]), bn = "\0", Dr = (e, r, l) => {
|
|
22
31
|
if (typeof e != "object" || e === null)
|
|
23
|
-
return `${
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
26
|
-
return
|
|
27
|
-
const
|
|
28
|
-
return
|
|
29
|
-
},
|
|
30
|
-
const
|
|
31
|
-
return
|
|
32
|
-
}),
|
|
32
|
+
return `${bn}i${l}`;
|
|
33
|
+
const v = r.ids.get(e);
|
|
34
|
+
if (v !== void 0)
|
|
35
|
+
return v;
|
|
36
|
+
const g = `${bn}${r.next++}`;
|
|
37
|
+
return r.ids.set(e, g), g;
|
|
38
|
+
}, Lr = (e, r, l) => typeof r == "function" ? e.map((v) => r(v)) : e.map((v, g) => {
|
|
39
|
+
const k = v[r];
|
|
40
|
+
return k == null ? Dr(v, l, g) : String(k);
|
|
41
|
+
}), Re = (e) => {
|
|
33
42
|
if (typeof e == "number")
|
|
34
43
|
return e;
|
|
35
44
|
if (typeof e == "string") {
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
38
|
-
return Number(
|
|
45
|
+
const r = e.trim().match(/^(\d+(?:\.\d+)?|\.\d+)px$/i);
|
|
46
|
+
if (r)
|
|
47
|
+
return Number(r[1]);
|
|
39
48
|
}
|
|
40
|
-
},
|
|
41
|
-
const
|
|
42
|
-
return !(e.title === "" || e.title == null) &&
|
|
43
|
-
},
|
|
44
|
-
const
|
|
45
|
-
return
|
|
46
|
-
}, 0),
|
|
47
|
-
const
|
|
48
|
-
return !
|
|
49
|
-
},
|
|
50
|
-
let
|
|
51
|
-
for (const { width:
|
|
52
|
-
const d =
|
|
49
|
+
}, At = (e) => {
|
|
50
|
+
const r = Re(e.width);
|
|
51
|
+
return !(e.title === "" || e.title == null) && r !== void 0 && typeof e.minWidth == "number" && e.minWidth < r ? e.minWidth : void 0;
|
|
52
|
+
}, Ar = (e) => e.reduce((r, l) => {
|
|
53
|
+
const v = At(l) ?? Re(l.width);
|
|
54
|
+
return v !== void 0 ? r + v : typeof l.minWidth == "number" ? r + l.minWidth : r + Dn;
|
|
55
|
+
}, 0), Mr = (e) => {
|
|
56
|
+
const r = typeof e == "string" ? e.trim().toLowerCase() : e;
|
|
57
|
+
return !r || r === "auto" || r === "0" ? 0 : Re(e);
|
|
58
|
+
}, Wr = (e) => {
|
|
59
|
+
let r = 0, l = 0, v = 0;
|
|
60
|
+
for (const { width: g, minWidth: k } of e) {
|
|
61
|
+
const d = Mr(g);
|
|
53
62
|
if (d === void 0)
|
|
54
63
|
return;
|
|
55
|
-
d === 0 ? (
|
|
64
|
+
d === 0 ? (r += 1, l = Math.max(l, k ?? 0)) : v += d;
|
|
56
65
|
}
|
|
57
|
-
return
|
|
58
|
-
},
|
|
59
|
-
const
|
|
60
|
-
(
|
|
61
|
-
const
|
|
62
|
-
return !(d.fixed === "right" ||
|
|
66
|
+
return l === 0 ? void 0 : v + r * l;
|
|
67
|
+
}, Hr = (e) => (e.title === "" || e.title == null) && Re(e.width) !== void 0, Fr = (e) => {
|
|
68
|
+
const r = [...e].reverse().findIndex((k) => !Hr(k)), l = r === -1 ? 0 : e.length - r, v = /* @__PURE__ */ new Map(), g = e.reduceRight(
|
|
69
|
+
(k, d, O) => {
|
|
70
|
+
const $ = At(d) ?? Re(d.width);
|
|
71
|
+
return !(d.fixed === "right" || O >= l) || $ === void 0 ? k : (v.set(d.key, k.right), { right: k.right + $, edge: d.key });
|
|
63
72
|
},
|
|
64
73
|
{ right: 0, edge: void 0 }
|
|
65
74
|
);
|
|
66
|
-
return { offsets:
|
|
67
|
-
},
|
|
75
|
+
return { offsets: v, edgeKey: g.edge, extent: g.right };
|
|
76
|
+
}, zr = { overflowX: "auto", scrollbarWidth: "none" }, mn = {
|
|
68
77
|
position: "sticky",
|
|
69
78
|
left: 0,
|
|
70
79
|
width: "100%"
|
|
71
|
-
},
|
|
80
|
+
}, Br = { offsets: /* @__PURE__ */ new Map(), edgeKey: void 0, extent: 0 }, _t = (e) => `color-mix(in srgb, var(--malachite-card-shadow, rgba(0, 0, 0, 0.1)) ${e}%, transparent)`, Gr = {
|
|
72
81
|
position: "absolute",
|
|
73
82
|
top: 0,
|
|
74
83
|
bottom: 0,
|
|
75
84
|
right: 0,
|
|
76
85
|
width: 24,
|
|
77
86
|
pointerEvents: "none",
|
|
78
|
-
backgroundImage: `linear-gradient(to left, ${
|
|
79
|
-
},
|
|
87
|
+
backgroundImage: `linear-gradient(to left, ${_t(45)}, ${_t(18)} 30%, ${_t(5)} 65%, transparent)`
|
|
88
|
+
}, Pr = (e, r) => e === void 0 ? {} : {
|
|
80
89
|
position: "sticky",
|
|
81
90
|
right: e,
|
|
82
91
|
zIndex: 1,
|
|
83
92
|
height: "auto",
|
|
84
|
-
...
|
|
85
|
-
},
|
|
86
|
-
if (!e && !
|
|
93
|
+
...r === "row" ? { backgroundColor: "inherit", backgroundImage: "inherit" } : { backgroundColor: r }
|
|
94
|
+
}, gn = (e) => `linear-gradient(${e}, ${e})`, jr = (e, r) => {
|
|
95
|
+
if (!e && !r)
|
|
87
96
|
return {};
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
e ?
|
|
91
|
-
].filter(
|
|
97
|
+
const l = [
|
|
98
|
+
r ? gn(Ct) : void 0,
|
|
99
|
+
e ? gn(`var(--malachite-table-row-variant-${e}-background)`) : void 0
|
|
100
|
+
].filter(Mt);
|
|
92
101
|
return {
|
|
93
102
|
backgroundColor: e ? "var(--malachite-table-background, #f7f7f7)" : "var(--malachite-table-row-background, #fff)",
|
|
94
|
-
backgroundImage:
|
|
103
|
+
backgroundImage: l.join(", ")
|
|
95
104
|
};
|
|
96
|
-
},
|
|
105
|
+
}, Mt = (e) => typeof e == "string", Ur = (e) => e == null, Yr = {
|
|
97
106
|
default: 40,
|
|
98
107
|
compact: 30,
|
|
99
108
|
snug: 38
|
|
100
|
-
},
|
|
109
|
+
}, Jr = {
|
|
101
110
|
default: 40,
|
|
102
111
|
compact: 40,
|
|
103
112
|
snug: 34
|
|
104
|
-
},
|
|
113
|
+
}, qr = {
|
|
105
114
|
default: "px-4 py-3",
|
|
106
115
|
compact: "px-4 py-1",
|
|
107
116
|
snug: "px-3 py-0"
|
|
108
|
-
},
|
|
117
|
+
}, Zr = {
|
|
109
118
|
default: "px-4 py-3",
|
|
110
119
|
compact: "px-4 py-3",
|
|
111
120
|
snug: "px-3 py-[9px]"
|
|
112
|
-
},
|
|
121
|
+
}, Tt = "text-[var(--malachite-text-primary,#0a0a0a)]", Ot = "text-[var(--malachite-text-dimmed,#a1a1a1)]", $e = (e) => ({
|
|
113
122
|
small: "text-[length:var(--malachite-font-size-small)]",
|
|
114
123
|
medium: "text-[length:var(--malachite-font-size-medium)]",
|
|
115
124
|
large: "text-[length:var(--malachite-font-size-large)]"
|
|
116
|
-
})[e],
|
|
125
|
+
})[e], yn = {
|
|
117
126
|
borderBottom: "1px solid var(--malachite-card-border, #e8e8e8)"
|
|
118
|
-
},
|
|
119
|
-
e &&
|
|
120
|
-
},
|
|
121
|
-
|
|
127
|
+
}, xn = (e, r) => {
|
|
128
|
+
e && r && r.scrollLeft !== e.scrollLeft && (r.scrollLeft = e.scrollLeft);
|
|
129
|
+
}, Qr = 56, Vr = 44, Kr = 8, Xr = 10, ei = "--malachite-ctx-table-surround", It = "var(--malachite-table-header-background, #f7f7f7)", ti = () => /* @__PURE__ */ i(
|
|
130
|
+
vr,
|
|
122
131
|
{
|
|
123
|
-
radius:
|
|
124
|
-
surround: `var(${
|
|
132
|
+
radius: kr,
|
|
133
|
+
surround: `var(${ei}, var(--malachite-card-background, #ffffff))`
|
|
125
134
|
}
|
|
126
|
-
),
|
|
135
|
+
), ni = ({
|
|
127
136
|
records: e,
|
|
128
|
-
startIndex:
|
|
129
|
-
scrollElement:
|
|
130
|
-
estimateRowHeight:
|
|
131
|
-
style:
|
|
132
|
-
renderRow:
|
|
137
|
+
startIndex: r,
|
|
138
|
+
scrollElement: l,
|
|
139
|
+
estimateRowHeight: v,
|
|
140
|
+
style: g,
|
|
141
|
+
renderRow: k,
|
|
133
142
|
registerHandle: d,
|
|
134
|
-
cardKey:
|
|
135
|
-
rovingIndex:
|
|
143
|
+
cardKey: O,
|
|
144
|
+
rovingIndex: $
|
|
136
145
|
}) => {
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
const
|
|
140
|
-
if (!
|
|
146
|
+
const D = j(null), [R, I] = te(0);
|
|
147
|
+
Nn(() => {
|
|
148
|
+
const z = D.current;
|
|
149
|
+
if (!z || !l)
|
|
141
150
|
return;
|
|
142
|
-
const
|
|
143
|
-
const
|
|
144
|
-
|
|
151
|
+
const de = () => {
|
|
152
|
+
const Y = z.getBoundingClientRect().top - l.getBoundingClientRect().top + l.scrollTop;
|
|
153
|
+
I((q) => Math.abs(q - Y) < 1 ? q : Y);
|
|
145
154
|
};
|
|
146
|
-
if (
|
|
155
|
+
if (de(), typeof ResizeObserver > "u")
|
|
147
156
|
return;
|
|
148
|
-
const
|
|
149
|
-
let
|
|
150
|
-
for (;
|
|
151
|
-
let
|
|
152
|
-
for (;
|
|
153
|
-
|
|
154
|
-
const
|
|
155
|
-
if (
|
|
156
|
-
|
|
157
|
+
const fe = new ResizeObserver(de);
|
|
158
|
+
let U = z;
|
|
159
|
+
for (; U && U !== l; ) {
|
|
160
|
+
let Y = U.previousElementSibling;
|
|
161
|
+
for (; Y; )
|
|
162
|
+
fe.observe(Y), Y = Y.previousElementSibling;
|
|
163
|
+
const q = U.parentElement;
|
|
164
|
+
if (q)
|
|
165
|
+
U = q;
|
|
157
166
|
else {
|
|
158
|
-
const
|
|
159
|
-
|
|
167
|
+
const Q = U.getRootNode();
|
|
168
|
+
U = Q instanceof ShadowRoot ? Q.host : null;
|
|
160
169
|
}
|
|
161
170
|
}
|
|
162
|
-
return () =>
|
|
163
|
-
}, [
|
|
164
|
-
const
|
|
171
|
+
return () => fe.disconnect();
|
|
172
|
+
}, [l, e.length, r]);
|
|
173
|
+
const H = ar({
|
|
165
174
|
count: e.length,
|
|
166
175
|
// State, not a ref: an ancestor's ref is not attached when this child's layout effects
|
|
167
176
|
// run, so a ref would leave the virtualizer without a scroll element.
|
|
168
|
-
getScrollElement: () =>
|
|
169
|
-
estimateSize: () =>
|
|
170
|
-
overscan:
|
|
171
|
-
scrollMargin:
|
|
177
|
+
getScrollElement: () => l,
|
|
178
|
+
estimateSize: () => v,
|
|
179
|
+
overscan: Kr,
|
|
180
|
+
scrollMargin: R
|
|
172
181
|
});
|
|
173
|
-
|
|
182
|
+
le(() => {
|
|
174
183
|
if (d)
|
|
175
|
-
return d(
|
|
176
|
-
startIndex:
|
|
184
|
+
return d(O, {
|
|
185
|
+
startIndex: r,
|
|
177
186
|
count: e.length,
|
|
178
|
-
scrollToIndex: (
|
|
179
|
-
}), () => d(
|
|
180
|
-
}, [d,
|
|
181
|
-
const
|
|
182
|
-
Math.max(
|
|
183
|
-
|
|
184
|
-
) :
|
|
185
|
-
return /* @__PURE__ */
|
|
186
|
-
ne > 0 && /* @__PURE__ */
|
|
187
|
-
|
|
188
|
-
(
|
|
189
|
-
e[
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
{ measureRef:
|
|
194
|
-
|
|
187
|
+
scrollToIndex: (z) => H.scrollToIndex(z, { align: "center" })
|
|
188
|
+
}), () => d(O, null);
|
|
189
|
+
}, [d, O, r, e.length, H]);
|
|
190
|
+
const b = H.getVirtualItems(), F = H.getTotalSize(), M = $ >= r && $ < r + e.length && b.length > 0 ? Math.min(
|
|
191
|
+
Math.max($, r + b[0].index),
|
|
192
|
+
r + b[b.length - 1].index
|
|
193
|
+
) : $, ne = b.length > 0 ? b[0].start - R : 0, C = b.length > 0 ? F - (b[b.length - 1].end - R) : 0;
|
|
194
|
+
return /* @__PURE__ */ y("div", { ref: D, className: "flex flex-col w-full", style: g, children: [
|
|
195
|
+
ne > 0 && /* @__PURE__ */ i("div", { "aria-hidden": "true", style: { height: ne, flexShrink: 0 } }),
|
|
196
|
+
b.map(
|
|
197
|
+
(z) => k(
|
|
198
|
+
e[z.index],
|
|
199
|
+
r + z.index,
|
|
200
|
+
z.index === e.length - 1,
|
|
201
|
+
z.index === 0,
|
|
202
|
+
{ measureRef: H.measureElement, index: z.index },
|
|
203
|
+
M
|
|
195
204
|
)
|
|
196
205
|
),
|
|
197
|
-
|
|
206
|
+
C > 0 && /* @__PURE__ */ i("div", { "aria-hidden": "true", style: { height: C, flexShrink: 0 } })
|
|
198
207
|
] });
|
|
199
|
-
},
|
|
200
|
-
const
|
|
201
|
-
return typeof e == "number" ? `${Math.max(0, e -
|
|
202
|
-
},
|
|
203
|
-
const
|
|
204
|
-
if (
|
|
208
|
+
}, ri = (e, r) => {
|
|
209
|
+
const l = r ? Qr : 0;
|
|
210
|
+
return typeof e == "number" ? `${Math.max(0, e - l)}px` : `calc(${e} - ${l}px)`;
|
|
211
|
+
}, Ee = (e) => {
|
|
212
|
+
const r = e.width;
|
|
213
|
+
if (r == null)
|
|
205
214
|
return {};
|
|
206
|
-
const
|
|
207
|
-
return
|
|
208
|
-
},
|
|
209
|
-
const
|
|
210
|
-
if (
|
|
215
|
+
const l = typeof r == "number" ? `${r}px` : r, v = At(e);
|
|
216
|
+
return v === void 0 ? { flexBasis: l, maxWidth: l } : { flexBasis: l, maxWidth: l, minWidth: v, flexShrink: 1 };
|
|
217
|
+
}, Wt = (e) => {
|
|
218
|
+
const r = e.width;
|
|
219
|
+
if (r == null)
|
|
211
220
|
return {};
|
|
212
|
-
const
|
|
213
|
-
return { width:
|
|
214
|
-
},
|
|
215
|
-
const
|
|
216
|
-
return
|
|
217
|
-
},
|
|
221
|
+
const l = typeof r == "number" ? `${r}px` : r;
|
|
222
|
+
return { width: l, flexBasis: l };
|
|
223
|
+
}, Ln = (e) => e === "asc" ? "ascending" : e === "desc" ? "descending" : "none", ii = 50, li = (e, r) => e !== void 0 && Number.isFinite(e) && e >= 1 ? Math.min(Math.floor(e), ii) : r, ce = (e) => e === "center" ? "justify-center" : e === "right" ? "justify-end" : "justify-start", oi = (e) => e === "center" ? "justify-center" : e === "right" ? "justify-end" : "justify-between", Ne = (e) => e === "center" ? "text-center" : e === "right" ? "text-right" : "text-left", An = (e) => e ? ce(e) : "justify-end", qe = ({ info: e }) => /* @__PURE__ */ i(_n, { text: e, placement: "top", children: /* @__PURE__ */ i(fr, { size: 13, className: "shrink-0 text-[var(--malachite-text-secondary,#bbb)]" }) }), si = { ascend: "asc", descend: "desc" }, ai = (e) => {
|
|
224
|
+
const r = e.find((l) => l.sorter && l.defaultSortOrder);
|
|
225
|
+
return r != null && r.defaultSortOrder ? { key: r.key, direction: si[r.defaultSortOrder] } : null;
|
|
226
|
+
}, Mn = (e, r) => ({
|
|
218
227
|
type: "button",
|
|
219
|
-
onClick:
|
|
228
|
+
onClick: r,
|
|
220
229
|
"aria-label": typeof e == "string" ? `Sort by ${e}` : "Sort column"
|
|
221
|
-
}),
|
|
230
|
+
}), ci = ({
|
|
222
231
|
column: e,
|
|
223
|
-
record:
|
|
224
|
-
index:
|
|
225
|
-
size:
|
|
226
|
-
paddingClass:
|
|
227
|
-
height:
|
|
232
|
+
record: r,
|
|
233
|
+
index: l,
|
|
234
|
+
size: v,
|
|
235
|
+
paddingClass: g,
|
|
236
|
+
height: k,
|
|
228
237
|
bordered: d,
|
|
229
|
-
isFirstRow:
|
|
230
|
-
isLastRow:
|
|
231
|
-
isFirstColumn:
|
|
232
|
-
isLastColumn:
|
|
233
|
-
variantBackground:
|
|
234
|
-
showSelectedAccent:
|
|
235
|
-
isSelected:
|
|
236
|
-
minWidth:
|
|
237
|
-
id:
|
|
238
|
+
isFirstRow: O,
|
|
239
|
+
isLastRow: $,
|
|
240
|
+
isFirstColumn: D,
|
|
241
|
+
isLastColumn: R,
|
|
242
|
+
variantBackground: I,
|
|
243
|
+
showSelectedAccent: H,
|
|
244
|
+
isSelected: b,
|
|
245
|
+
minWidth: F,
|
|
246
|
+
id: Z
|
|
238
247
|
}) => {
|
|
239
|
-
const
|
|
240
|
-
return /* @__PURE__ */
|
|
248
|
+
const M = r[e.dataIndex], ne = e.render ? e.render(M, r, l) : M == null ? "" : String(M), C = e.ellipsis && Mt(M) ? M : void 0;
|
|
249
|
+
return /* @__PURE__ */ i(
|
|
241
250
|
"td",
|
|
242
251
|
{
|
|
243
|
-
id:
|
|
252
|
+
id: Z,
|
|
244
253
|
className: `
|
|
245
|
-
table-cell ${
|
|
254
|
+
table-cell ${g} ${$e(v)}
|
|
246
255
|
${e.ellipsis ? "truncate overflow-hidden whitespace-nowrap" : ""}
|
|
247
256
|
${d ? "table-cell-bordered" : ""}
|
|
248
|
-
${d &&
|
|
249
|
-
${d &&
|
|
250
|
-
${d &&
|
|
251
|
-
${d &&
|
|
252
|
-
${d &&
|
|
253
|
-
${d &&
|
|
254
|
-
${d &&
|
|
255
|
-
${
|
|
257
|
+
${d && O ? "table-cell-bordered-top" : ""}
|
|
258
|
+
${d && D ? "table-cell-bordered-left" : ""}
|
|
259
|
+
${d && R ? "table-cell-bordered-right" : ""}
|
|
260
|
+
${d && D && O ? "rounded-tl-lg" : ""}
|
|
261
|
+
${d && R && O ? "rounded-tr-lg" : ""}
|
|
262
|
+
${d && D && $ ? "rounded-bl-lg" : ""}
|
|
263
|
+
${d && R && $ ? "rounded-br-lg" : ""}
|
|
264
|
+
${Ne(e.align)}
|
|
256
265
|
`,
|
|
257
266
|
style: {
|
|
258
267
|
width: e.width,
|
|
259
|
-
minWidth:
|
|
260
|
-
height:
|
|
261
|
-
backgroundColor:
|
|
268
|
+
minWidth: F,
|
|
269
|
+
height: k,
|
|
270
|
+
backgroundColor: I ?? // Mirror the row's background, or the tint composites over the wrong opaque
|
|
262
271
|
// base — they differ in dark mode.
|
|
263
|
-
(
|
|
272
|
+
(b ? d ? "var(--malachite-table-borderedRow-background, #fff)" : "var(--malachite-table-row-background, #fff)" : void 0),
|
|
264
273
|
// Its own layer, so the tint composites over the cell instead of replacing it.
|
|
265
|
-
backgroundImage:
|
|
274
|
+
backgroundImage: b ? `linear-gradient(${Ct}, ${Ct})` : void 0,
|
|
266
275
|
// Content pinning its own colour follows via the channel below.
|
|
267
|
-
color:
|
|
268
|
-
...
|
|
276
|
+
color: b ? On : "var(--malachite-table-row-foreground)",
|
|
277
|
+
...b ? Tn : {},
|
|
269
278
|
// Inset box-shadow, not `ring-*`: --tw-ring-* silently doesn't paint in a shadow root.
|
|
270
|
-
boxShadow:
|
|
271
|
-
borderBottom: d ? void 0 :
|
|
279
|
+
boxShadow: H ? `inset 2px 0 0 ${Cn}` : void 0,
|
|
280
|
+
borderBottom: d ? void 0 : $ ? "none" : "1px solid var(--malachite-table-row-border)"
|
|
272
281
|
},
|
|
273
|
-
title:
|
|
282
|
+
title: C,
|
|
274
283
|
children: ne
|
|
275
284
|
}
|
|
276
285
|
);
|
|
277
|
-
},
|
|
286
|
+
}, di = ({
|
|
278
287
|
column: e,
|
|
279
|
-
paddingClass:
|
|
280
|
-
sortDirection:
|
|
281
|
-
onSort:
|
|
282
|
-
cellStyle:
|
|
288
|
+
paddingClass: r,
|
|
289
|
+
sortDirection: l,
|
|
290
|
+
onSort: v,
|
|
291
|
+
cellStyle: g
|
|
283
292
|
}) => {
|
|
284
|
-
const
|
|
293
|
+
const k = !!e.sorter, d = e.title === "" || e.title == null;
|
|
285
294
|
if (d && e.width !== void 0)
|
|
286
|
-
return /* @__PURE__ */
|
|
295
|
+
return /* @__PURE__ */ i(
|
|
287
296
|
"div",
|
|
288
297
|
{
|
|
289
298
|
role: "columnheader",
|
|
290
299
|
className: "h-full shrink-0",
|
|
291
300
|
style: {
|
|
292
|
-
...
|
|
293
|
-
...
|
|
301
|
+
...Wt(e),
|
|
302
|
+
...g
|
|
294
303
|
}
|
|
295
304
|
}
|
|
296
305
|
);
|
|
297
306
|
if (d)
|
|
298
|
-
return /* @__PURE__ */
|
|
307
|
+
return /* @__PURE__ */ i(
|
|
299
308
|
"div",
|
|
300
309
|
{
|
|
301
310
|
role: "columnheader",
|
|
302
311
|
className: "flex flex-[1_0_0] h-full min-w-0",
|
|
303
312
|
style: {
|
|
304
|
-
...
|
|
305
|
-
...
|
|
313
|
+
...Ee(e),
|
|
314
|
+
...g
|
|
306
315
|
}
|
|
307
316
|
}
|
|
308
317
|
);
|
|
309
|
-
const
|
|
310
|
-
|
|
318
|
+
const $ = typeof e.title == "string" ? /* @__PURE__ */ i("p", { className: "font-medium text-[13px] text-[var(--malachite-text-primary,#0a0a0a)] tracking-[0.13px] whitespace-nowrap truncate", children: e.title }) : e.title, D = /* @__PURE__ */ i(
|
|
319
|
+
Rn,
|
|
311
320
|
{
|
|
312
321
|
size: 13,
|
|
313
|
-
className: `shrink-0 transition-transform ${
|
|
322
|
+
className: `shrink-0 transition-transform ${l ? Tt : Ot} ${l === "asc" ? "rotate-180" : ""}`
|
|
314
323
|
}
|
|
315
324
|
);
|
|
316
|
-
return
|
|
325
|
+
return k ? /* @__PURE__ */ i(
|
|
317
326
|
"div",
|
|
318
327
|
{
|
|
319
328
|
role: "columnheader",
|
|
320
|
-
"aria-sort":
|
|
329
|
+
"aria-sort": Ln(l),
|
|
321
330
|
className: "flex flex-[1_0_0] min-w-0 overflow-hidden",
|
|
322
|
-
style: { ...
|
|
323
|
-
children: /* @__PURE__ */
|
|
331
|
+
style: { ...Ee(e), ...g },
|
|
332
|
+
children: /* @__PURE__ */ y(
|
|
324
333
|
"button",
|
|
325
334
|
{
|
|
326
|
-
...
|
|
327
|
-
className: `flex flex-1 items-center ${
|
|
335
|
+
...Mn(e.title, v),
|
|
336
|
+
className: `flex flex-1 items-center ${oi(e.align)} gap-1 min-w-0 ${r} cursor-pointer appearance-none bg-transparent border-0 ${Ne(e.align)}`,
|
|
328
337
|
children: [
|
|
329
|
-
/* @__PURE__ */
|
|
330
|
-
|
|
331
|
-
e.info && /* @__PURE__ */
|
|
338
|
+
/* @__PURE__ */ y("div", { className: "flex items-center gap-1 min-w-0", children: [
|
|
339
|
+
$,
|
|
340
|
+
e.info && /* @__PURE__ */ i(qe, { info: e.info })
|
|
332
341
|
] }),
|
|
333
|
-
|
|
342
|
+
D
|
|
334
343
|
]
|
|
335
344
|
}
|
|
336
345
|
)
|
|
337
346
|
}
|
|
338
|
-
) : /* @__PURE__ */
|
|
347
|
+
) : /* @__PURE__ */ i(
|
|
339
348
|
"div",
|
|
340
349
|
{
|
|
341
350
|
role: "columnheader",
|
|
342
|
-
className: `flex flex-[1_0_0] items-center ${
|
|
351
|
+
className: `flex flex-[1_0_0] items-center ${ce(e.align)} min-w-0 overflow-hidden ${r}`,
|
|
343
352
|
style: {
|
|
344
|
-
...
|
|
345
|
-
...
|
|
353
|
+
...Ee(e),
|
|
354
|
+
...g
|
|
346
355
|
},
|
|
347
|
-
children: /* @__PURE__ */
|
|
348
|
-
|
|
349
|
-
e.info && /* @__PURE__ */
|
|
356
|
+
children: /* @__PURE__ */ y("div", { className: "flex items-center gap-1 min-w-0", children: [
|
|
357
|
+
$,
|
|
358
|
+
e.info && /* @__PURE__ */ i(qe, { info: e.info })
|
|
350
359
|
] })
|
|
351
360
|
}
|
|
352
361
|
);
|
|
353
|
-
},
|
|
362
|
+
}, fi = ({
|
|
354
363
|
column: e,
|
|
355
|
-
record:
|
|
356
|
-
index:
|
|
357
|
-
size:
|
|
358
|
-
paddingClass:
|
|
359
|
-
isSelected:
|
|
364
|
+
record: r,
|
|
365
|
+
index: l,
|
|
366
|
+
size: v,
|
|
367
|
+
paddingClass: g,
|
|
368
|
+
isSelected: k = !1,
|
|
360
369
|
cellStyle: d,
|
|
361
|
-
id:
|
|
370
|
+
id: O,
|
|
371
|
+
leading: $,
|
|
372
|
+
trailing: D
|
|
362
373
|
}) => {
|
|
363
|
-
const
|
|
364
|
-
color:
|
|
365
|
-
...
|
|
374
|
+
const R = r[e.dataIndex], I = e.render ? e.render(R, r, l) : R == null ? "" : String(R), b = (e.title === "" || e.title == null) && e.width !== void 0, F = Mt(R) && R.length > 0, Z = k ? {
|
|
375
|
+
color: On,
|
|
376
|
+
...Tn
|
|
366
377
|
} : {};
|
|
367
|
-
if (
|
|
368
|
-
return /* @__PURE__ */
|
|
378
|
+
if (b && !$ && !D)
|
|
379
|
+
return /* @__PURE__ */ i(
|
|
369
380
|
"div",
|
|
370
381
|
{
|
|
371
382
|
role: "cell",
|
|
372
|
-
id:
|
|
373
|
-
className: `flex items-center ${
|
|
383
|
+
id: O,
|
|
384
|
+
className: `flex items-center ${An(e.align)} shrink-0 overflow-hidden ${g}`,
|
|
374
385
|
style: {
|
|
375
|
-
...
|
|
376
|
-
...
|
|
386
|
+
...Wt(e),
|
|
387
|
+
...Z,
|
|
377
388
|
...d
|
|
378
389
|
},
|
|
379
|
-
children:
|
|
390
|
+
children: I
|
|
380
391
|
}
|
|
381
392
|
);
|
|
382
|
-
const
|
|
383
|
-
|
|
393
|
+
const M = !e.render && F ? /* @__PURE__ */ i(mr, { text: R, children: I }) : I, ne = !!($ || D), C = ne ? /* @__PURE__ */ y("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
394
|
+
$,
|
|
395
|
+
/* @__PURE__ */ i("div", { id: O, className: "flex items-center min-w-0", children: M }),
|
|
396
|
+
D ? /* @__PURE__ */ i("span", { className: "shrink-0 whitespace-nowrap", children: D }) : null
|
|
397
|
+
] }) : M;
|
|
398
|
+
return /* @__PURE__ */ i(
|
|
384
399
|
"div",
|
|
385
400
|
{
|
|
386
401
|
role: "cell",
|
|
387
|
-
id:
|
|
388
|
-
className: `flex flex-[1_0_0] items-center min-w-0 overflow-hidden ${
|
|
402
|
+
id: ne ? void 0 : O,
|
|
403
|
+
className: `flex flex-[1_0_0] items-center min-w-0 overflow-hidden ${g} ${$e(v)} ${ce(e.align)}`,
|
|
389
404
|
style: {
|
|
390
|
-
...
|
|
391
|
-
...
|
|
405
|
+
...Ee(e),
|
|
406
|
+
...Z,
|
|
392
407
|
...d
|
|
393
408
|
},
|
|
394
|
-
children:
|
|
409
|
+
children: C
|
|
395
410
|
}
|
|
396
411
|
);
|
|
397
|
-
},
|
|
412
|
+
}, Dt = 32, kn = 8, Sn = 16, Wn = 2, hi = Wn + 1.5, Lt = {
|
|
413
|
+
width: Dt,
|
|
414
|
+
flexBasis: Dt
|
|
415
|
+
}, wn = {
|
|
416
|
+
lead: "var(--malachite-text-dimmed, #a1a1a1)",
|
|
417
|
+
follow: "var(--malachite-text-placeholder, #bbbbbb)",
|
|
418
|
+
current: "var(--malachite-text-primary, #0a0a0a)"
|
|
419
|
+
}, $n = `0 0 0 ${Wn}px var(--malachite-table-row-background, #fff)`, En = (e) => ({
|
|
420
|
+
position: "absolute",
|
|
421
|
+
left: "50%",
|
|
422
|
+
width: 2,
|
|
423
|
+
marginLeft: -1,
|
|
424
|
+
top: e === "above" ? 0 : "50%",
|
|
425
|
+
bottom: e === "above" ? "50%" : 0,
|
|
426
|
+
backgroundColor: "var(--malachite-card-border, #e8e8e8)"
|
|
427
|
+
}), ui = ({
|
|
428
|
+
thread: e,
|
|
429
|
+
tabIndex: r
|
|
430
|
+
}) => {
|
|
431
|
+
const l = (e == null ? void 0 : e.emphasis) ?? "follow", v = /* @__PURE__ */ i(
|
|
432
|
+
"span",
|
|
433
|
+
{
|
|
434
|
+
"aria-hidden": "true",
|
|
435
|
+
className: "block rounded-full",
|
|
436
|
+
style: {
|
|
437
|
+
width: kn,
|
|
438
|
+
height: kn,
|
|
439
|
+
backgroundColor: wn[l],
|
|
440
|
+
boxShadow: l === "current" ? `${$n}, 0 0 0 ${hi}px ${wn.current}` : $n
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
), g = e != null && e.onClick ? /* @__PURE__ */ i(
|
|
444
|
+
"button",
|
|
445
|
+
{
|
|
446
|
+
type: "button",
|
|
447
|
+
"aria-label": e.label,
|
|
448
|
+
onClick: e.onClick,
|
|
449
|
+
tabIndex: r,
|
|
450
|
+
className: `relative flex items-center justify-center rounded-full cursor-pointer appearance-none bg-transparent border-0 p-0 ${In}`,
|
|
451
|
+
style: { width: Sn, height: Sn },
|
|
452
|
+
children: v
|
|
453
|
+
}
|
|
454
|
+
) : /* @__PURE__ */ i(
|
|
455
|
+
"span",
|
|
456
|
+
{
|
|
457
|
+
className: "relative",
|
|
458
|
+
role: e != null && e.label ? "img" : void 0,
|
|
459
|
+
"aria-label": e == null ? void 0 : e.label,
|
|
460
|
+
children: v
|
|
461
|
+
}
|
|
462
|
+
);
|
|
463
|
+
return /* @__PURE__ */ y(
|
|
464
|
+
"div",
|
|
465
|
+
{
|
|
466
|
+
role: "cell",
|
|
467
|
+
className: "relative flex items-center justify-center shrink-0",
|
|
468
|
+
style: Lt,
|
|
469
|
+
children: [
|
|
470
|
+
e != null && e.joinsAbove ? /* @__PURE__ */ i(
|
|
471
|
+
"span",
|
|
472
|
+
{
|
|
473
|
+
"aria-hidden": "true",
|
|
474
|
+
"data-thread-line": "above",
|
|
475
|
+
style: En("above")
|
|
476
|
+
}
|
|
477
|
+
) : null,
|
|
478
|
+
e != null && e.joinsBelow ? /* @__PURE__ */ i(
|
|
479
|
+
"span",
|
|
480
|
+
{
|
|
481
|
+
"aria-hidden": "true",
|
|
482
|
+
"data-thread-line": "below",
|
|
483
|
+
style: En("below")
|
|
484
|
+
}
|
|
485
|
+
) : null,
|
|
486
|
+
e ? e.label ? (
|
|
487
|
+
// The label already names the dot; describing it again reads it twice.
|
|
488
|
+
/* @__PURE__ */ i(_n, { text: e.label, placement: "top", describesTrigger: !1, children: g })
|
|
489
|
+
) : g : null
|
|
490
|
+
]
|
|
491
|
+
}
|
|
492
|
+
);
|
|
493
|
+
}, Hi = ({
|
|
398
494
|
columns: e,
|
|
399
|
-
data:
|
|
400
|
-
loading:
|
|
401
|
-
loadingRowCount:
|
|
402
|
-
"aria-label":
|
|
403
|
-
"aria-labelledby":
|
|
495
|
+
data: r,
|
|
496
|
+
loading: l = !1,
|
|
497
|
+
loadingRowCount: v,
|
|
498
|
+
"aria-label": g,
|
|
499
|
+
"aria-labelledby": k,
|
|
404
500
|
error: d = !1,
|
|
405
|
-
errorTitle:
|
|
406
|
-
errorSubTitle:
|
|
407
|
-
emptyTitle:
|
|
408
|
-
emptySubTitle:
|
|
409
|
-
bordered:
|
|
410
|
-
showHeader:
|
|
411
|
-
rowKey:
|
|
412
|
-
scrollHeight:
|
|
413
|
-
size:
|
|
414
|
-
rowDensity:
|
|
501
|
+
errorTitle: O = "Data unavailable",
|
|
502
|
+
errorSubTitle: $ = "There was an issue retrieving the data. Please try again.",
|
|
503
|
+
emptyTitle: D = "No data",
|
|
504
|
+
emptySubTitle: R = "",
|
|
505
|
+
bordered: I = !1,
|
|
506
|
+
showHeader: H = !0,
|
|
507
|
+
rowKey: b = "key",
|
|
508
|
+
scrollHeight: F,
|
|
509
|
+
size: Z = "small",
|
|
510
|
+
rowDensity: M = "default",
|
|
415
511
|
layout: ne = "auto",
|
|
416
|
-
headerVariant:
|
|
417
|
-
title:
|
|
418
|
-
subtitle:
|
|
419
|
-
extra:
|
|
420
|
-
rowClassName:
|
|
421
|
-
rowVariant:
|
|
422
|
-
onRow:
|
|
423
|
-
onClickRow:
|
|
424
|
-
selectedRowKey:
|
|
425
|
-
scrollSelectedIntoView:
|
|
426
|
-
rowSelection:
|
|
427
|
-
pagination:
|
|
428
|
-
className:
|
|
429
|
-
style:
|
|
430
|
-
stickyHeaderTop:
|
|
431
|
-
scrollX:
|
|
432
|
-
rowSection:
|
|
433
|
-
renderSectionDivider:
|
|
434
|
-
onVisibleOrderChange:
|
|
435
|
-
virtual:
|
|
436
|
-
virtualRowHeightEstimate:
|
|
437
|
-
virtualScrollElement:
|
|
512
|
+
headerVariant: C = "inline",
|
|
513
|
+
title: z,
|
|
514
|
+
subtitle: de,
|
|
515
|
+
extra: fe,
|
|
516
|
+
rowClassName: U,
|
|
517
|
+
rowVariant: Y,
|
|
518
|
+
onRow: q,
|
|
519
|
+
onClickRow: Q,
|
|
520
|
+
selectedRowKey: W,
|
|
521
|
+
scrollSelectedIntoView: Ht = !0,
|
|
522
|
+
rowSelection: Ft,
|
|
523
|
+
pagination: _,
|
|
524
|
+
className: zt = "",
|
|
525
|
+
style: Ze,
|
|
526
|
+
stickyHeaderTop: Qe,
|
|
527
|
+
scrollX: V = !1,
|
|
528
|
+
rowSection: Ve,
|
|
529
|
+
renderSectionDivider: Ke,
|
|
530
|
+
onVisibleOrderChange: Xe,
|
|
531
|
+
virtual: Hn = !1,
|
|
532
|
+
virtualRowHeightEstimate: Fn,
|
|
533
|
+
virtualScrollElement: _e = null,
|
|
534
|
+
expandable: Bt,
|
|
535
|
+
onReachEnd: be,
|
|
536
|
+
loadingMore: he = !1,
|
|
537
|
+
loadingMoreText: Gt = "Loading more",
|
|
538
|
+
rowThread: Pt,
|
|
539
|
+
rowThreadTitle: zn = "Thread"
|
|
438
540
|
}) => {
|
|
439
|
-
var
|
|
440
|
-
const
|
|
441
|
-
(t,
|
|
442
|
-
|
|
541
|
+
var dn, fn;
|
|
542
|
+
const ue = C === "detached" ? Pt : void 0, Ie = e.length + (ue ? 1 : 0), B = C === "detached" ? Bt : void 0, me = qr[M], et = Zr[M], tt = Yr[M], jt = M === "snug" ? tt : void 0, [L, Bn] = te(() => ai(e)), Ut = j(null), nt = j(null), ge = j(null), rt = j(null), it = j(/* @__PURE__ */ new Map()), Gn = Nt(
|
|
543
|
+
(t, n) => {
|
|
544
|
+
n ? it.current.set(t, n) : it.current.delete(t);
|
|
443
545
|
},
|
|
444
546
|
[]
|
|
445
|
-
),
|
|
446
|
-
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
|
|
547
|
+
), K = cr(), Ce = ((dn = e.find((t) => t.title !== "" && t.title != null)) == null ? void 0 : dn.key) ?? ((fn = e[0]) == null ? void 0 : fn.key), ye = (t) => `${K}-row-${t}-label`, Yt = (t) => `${K}-row-${t}-toggle`, [pe, Pn] = te({
|
|
548
|
+
index: 0
|
|
549
|
+
}), re = Hn && C === "detached", jn = Fn ?? Vr, [ve, Un] = te(null), Yn = Nt((t) => {
|
|
550
|
+
ge.current = t, t && Un((n) => n === t ? n : t);
|
|
551
|
+
}, []), Te = re ? _e ?? ve : null, [Jn, Jt] = te(null), Oe = F === "fill", qt = Nr(
|
|
552
|
+
C === "detached" ? ve : Jn,
|
|
553
|
+
Oe,
|
|
450
554
|
// The pager is only drawn once loaded, and takes its height out of the room.
|
|
451
|
-
!!
|
|
452
|
-
),
|
|
453
|
-
const t =
|
|
454
|
-
|
|
555
|
+
!!_ && !l
|
|
556
|
+
), lt = qt === void 0 ? void 0 : `${qt}px`, Zt = V ? Ar(e) + (ue ? Dt : 0) : 0, De = V && C === "detached" ? Fr(e) : Br, Le = De.edgeKey !== void 0, [qn, Qt] = te(!1), [Zn, Vt] = te(0), Ae = Nt(() => {
|
|
557
|
+
const t = ge.current;
|
|
558
|
+
Qt(
|
|
455
559
|
t !== null && t.scrollLeft + t.clientWidth < t.scrollWidth - 1
|
|
456
|
-
),
|
|
560
|
+
), Vt(t === null ? 0 : t.offsetWidth - t.clientWidth);
|
|
457
561
|
}, []);
|
|
458
|
-
|
|
459
|
-
if (!
|
|
460
|
-
|
|
562
|
+
le(() => {
|
|
563
|
+
if (!Le || !ve) {
|
|
564
|
+
Qt(!1), Vt(0);
|
|
461
565
|
return;
|
|
462
566
|
}
|
|
463
|
-
if (
|
|
567
|
+
if (Ae(), typeof ResizeObserver > "u")
|
|
464
568
|
return;
|
|
465
|
-
const t = new ResizeObserver(
|
|
466
|
-
return t.observe(
|
|
467
|
-
}, [
|
|
468
|
-
const
|
|
469
|
-
|
|
470
|
-
const t =
|
|
471
|
-
if (!t || !
|
|
472
|
-
|
|
569
|
+
const t = new ResizeObserver(Ae);
|
|
570
|
+
return t.observe(ve), () => t.disconnect();
|
|
571
|
+
}, [Le, ve, Zt, Ae]);
|
|
572
|
+
const ot = !(re && _e), ee = C === "detached" && Qe !== void 0 && H && !F && (!re || !ot), Kt = W != null, [st, Xt] = te(0);
|
|
573
|
+
le(() => {
|
|
574
|
+
const t = Ut.current;
|
|
575
|
+
if (!t || !ee || !Kt || typeof ResizeObserver > "u") {
|
|
576
|
+
Xt(0);
|
|
473
577
|
return;
|
|
474
578
|
}
|
|
475
|
-
const
|
|
476
|
-
var
|
|
477
|
-
const a =
|
|
478
|
-
|
|
479
|
-
(
|
|
579
|
+
const n = new ResizeObserver((s) => {
|
|
580
|
+
var h, u;
|
|
581
|
+
const a = s[0], f = ((u = (h = a == null ? void 0 : a.borderBoxSize) == null ? void 0 : h[0]) == null ? void 0 : u.blockSize) ?? (a == null ? void 0 : a.contentRect.height) ?? 0;
|
|
582
|
+
Xt(
|
|
583
|
+
(m) => Math.abs(m - f) < 1 ? m : f
|
|
480
584
|
);
|
|
481
585
|
});
|
|
482
|
-
return
|
|
483
|
-
}, [
|
|
484
|
-
const
|
|
485
|
-
const t = (
|
|
486
|
-
if (!
|
|
487
|
-
const
|
|
488
|
-
if (!
|
|
489
|
-
if (typeof
|
|
490
|
-
const
|
|
491
|
-
return
|
|
586
|
+
return n.observe(t), () => n.disconnect();
|
|
587
|
+
}, [ee, Kt]);
|
|
588
|
+
const Qn = ee ? (Qe ?? 0) + st : void 0, { sortedData: Me, sectionDividers: at } = Ue(() => {
|
|
589
|
+
const t = (h) => {
|
|
590
|
+
if (!L) return h;
|
|
591
|
+
const u = e.find((A) => A.key === L.key);
|
|
592
|
+
if (!u || u.sorter === "server") return h;
|
|
593
|
+
if (typeof u.sorter == "function") {
|
|
594
|
+
const A = [...h].sort(u.sorter);
|
|
595
|
+
return L.direction === "asc" ? A : A.reverse();
|
|
492
596
|
}
|
|
493
|
-
const
|
|
494
|
-
return [...
|
|
495
|
-
const
|
|
496
|
-
return
|
|
597
|
+
const m = u.dataIndex ?? L.key;
|
|
598
|
+
return [...h].sort((A, N) => {
|
|
599
|
+
const o = A[m], c = N[m];
|
|
600
|
+
return o < c ? L.direction === "asc" ? -1 : 1 : o > c ? L.direction === "asc" ? 1 : -1 : 0;
|
|
497
601
|
});
|
|
498
602
|
};
|
|
499
|
-
if (!
|
|
603
|
+
if (!Ve)
|
|
500
604
|
return {
|
|
501
|
-
sortedData: t(
|
|
605
|
+
sortedData: t(r),
|
|
502
606
|
sectionDividers: /* @__PURE__ */ new Map()
|
|
503
607
|
};
|
|
504
|
-
const
|
|
505
|
-
for (const
|
|
506
|
-
const
|
|
507
|
-
let
|
|
508
|
-
|
|
608
|
+
const n = [], s = /* @__PURE__ */ new Map();
|
|
609
|
+
for (const h of r) {
|
|
610
|
+
const u = Ve(h);
|
|
611
|
+
let m = s.get(u);
|
|
612
|
+
m === void 0 && (m = n.length, s.set(u, m), n.push({ key: u, records: [] })), n[m].records.push(h);
|
|
509
613
|
}
|
|
510
|
-
const a = [],
|
|
511
|
-
for (const
|
|
512
|
-
const
|
|
513
|
-
|
|
614
|
+
const a = [], f = /* @__PURE__ */ new Map();
|
|
615
|
+
for (const h of n) {
|
|
616
|
+
const u = t(h.records);
|
|
617
|
+
f.set(a.length, { key: h.key, records: u }), a.push(...u);
|
|
514
618
|
}
|
|
515
|
-
return { sortedData: a, sectionDividers:
|
|
516
|
-
}, [
|
|
517
|
-
|
|
518
|
-
},
|
|
519
|
-
var a,
|
|
520
|
-
|
|
521
|
-
},
|
|
522
|
-
|
|
523
|
-
|
|
619
|
+
return { sortedData: a, sectionDividers: f };
|
|
620
|
+
}, [r, L, e, Ve]), Vn = (t) => {
|
|
621
|
+
Bn((n) => (n == null ? void 0 : n.key) === t ? n.direction === "asc" ? { key: t, direction: "desc" } : null : { key: t, direction: "asc" });
|
|
622
|
+
}, en = (t, n) => (s) => {
|
|
623
|
+
var a, f, h;
|
|
624
|
+
Vn(t.key), (h = (f = (a = t.onHeaderCell) == null ? void 0 : a.call(t, t, n)) == null ? void 0 : f.onClick) == null || h.call(f, s);
|
|
625
|
+
}, xe = (t, n) => typeof b == "function" ? b(t) : String(t[b] ?? n), Kn = (t, n) => {
|
|
626
|
+
if (typeof b == "function")
|
|
627
|
+
return b(t);
|
|
628
|
+
const s = t[b];
|
|
629
|
+
return typeof s == "number" || typeof s == "string" ? s : String(s ?? n);
|
|
630
|
+
}, ct = typeof b == "function" ? null : b, dt = (t) => {
|
|
631
|
+
if (typeof b == "function")
|
|
632
|
+
return b(t);
|
|
633
|
+
const n = t[b];
|
|
634
|
+
return n == null ? void 0 : String(n);
|
|
635
|
+
}, ft = B == null ? void 0 : B.expandedRowKeys.map(String).join("\0"), ht = B == null ? void 0 : B.childRows, Xn = !!ht, { sortedData: G, sectionDividers: ut, rowNesting: E, rowAnchors: pt, rowIds: oe } = Ue(() => {
|
|
636
|
+
if (!ht) {
|
|
637
|
+
const u = Me.map((m, A) => xe(m, A));
|
|
638
|
+
return {
|
|
639
|
+
sortedData: Me,
|
|
640
|
+
sectionDividers: at,
|
|
641
|
+
rowNesting: void 0,
|
|
642
|
+
rowAnchors: void 0,
|
|
643
|
+
rowIds: u
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
const t = new Set(ft ? ft.split("\0") : []), n = [], s = [], a = [], f = [], h = /* @__PURE__ */ new Map();
|
|
647
|
+
return Me.forEach((u, m) => {
|
|
648
|
+
const A = at.get(m);
|
|
649
|
+
A && h.set(n.length, A);
|
|
650
|
+
const N = ht(u) ?? [], o = xe(u, m), c = Kn(u, m), p = N.length > 0 && t.has(o), P = n.length;
|
|
651
|
+
n.push(u), a.push(String(m)), f.push(o), s.push(
|
|
652
|
+
N.length > 0 ? { kind: "parent", key: o, rawKey: c, children: N, isOpen: p } : { kind: "leaf" }
|
|
653
|
+
), p && N.forEach((S, X) => {
|
|
654
|
+
const ie = dt(S);
|
|
655
|
+
n.push(S), a.push(`${m}.${X}`), f.push(`${o}\0${ie ?? `#${X}`}`), s.push({ kind: "child", parentIndex: P });
|
|
656
|
+
});
|
|
657
|
+
}), {
|
|
658
|
+
sortedData: n,
|
|
659
|
+
sectionDividers: h,
|
|
660
|
+
rowNesting: s,
|
|
661
|
+
rowAnchors: a,
|
|
662
|
+
rowIds: f
|
|
663
|
+
};
|
|
664
|
+
}, [Me, at, Xn, ft, ct]);
|
|
665
|
+
(E == null ? void 0 : E.some(
|
|
666
|
+
(t, n) => t.kind === "child" && dt(G[n]) === void 0
|
|
667
|
+
)) && Ye(
|
|
668
|
+
"table-expandable-child-rowkey",
|
|
669
|
+
"Table `expandable` child rows need a `rowKey` of their own to be selected; one without is never matched by `selectedRowKey`."
|
|
670
|
+
);
|
|
671
|
+
const tn = (t, n) => {
|
|
672
|
+
const s = E == null ? void 0 : E[t];
|
|
673
|
+
if (!B || (s == null ? void 0 : s.kind) !== "parent" || s.isOpen === n)
|
|
674
|
+
return;
|
|
675
|
+
He.current = n;
|
|
676
|
+
const a = B.expandedRowKeys.filter(
|
|
677
|
+
(f) => String(f) !== s.key
|
|
678
|
+
);
|
|
679
|
+
B.onExpandedRowKeysChange(n ? [...a, s.rawKey] : a);
|
|
680
|
+
}, nn = j(void 0), We = j(void 0);
|
|
681
|
+
le(() => {
|
|
682
|
+
if (!Xe)
|
|
524
683
|
return;
|
|
525
|
-
|
|
526
|
-
const t =
|
|
527
|
-
|
|
528
|
-
}, [
|
|
529
|
-
const
|
|
530
|
-
if (
|
|
684
|
+
We.current ?? (We.current = { ids: /* @__PURE__ */ new WeakMap(), next: 0 });
|
|
685
|
+
const t = Lr(G, b, We.current), n = nn.current;
|
|
686
|
+
n && Or(n, t) || (nn.current = t, Xe(G));
|
|
687
|
+
}, [G, ct, Xe]);
|
|
688
|
+
const J = Ue(() => {
|
|
689
|
+
if (W == null)
|
|
531
690
|
return -1;
|
|
532
|
-
const t = String(
|
|
533
|
-
return
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
ae(() => {
|
|
540
|
-
|
|
541
|
-
|
|
691
|
+
const t = String(W);
|
|
692
|
+
return G.findIndex(
|
|
693
|
+
(n, s) => {
|
|
694
|
+
var a;
|
|
695
|
+
return (((a = E == null ? void 0 : E[s]) == null ? void 0 : a.kind) === "child" ? dt(n) : xe(n, s)) === t;
|
|
696
|
+
}
|
|
697
|
+
);
|
|
698
|
+
}, [W, G, E, ct]), vt = (pt == null ? void 0 : pt[J]) ?? String(J), ae = Ue(() => {
|
|
699
|
+
const t = pe.id === void 0 ? -1 : oe.indexOf(pe.id);
|
|
700
|
+
if (t >= 0)
|
|
701
|
+
return t;
|
|
702
|
+
const n = pe.parentId === void 0 ? -1 : oe.indexOf(pe.parentId);
|
|
703
|
+
return n >= 0 ? n : Math.min(pe.index, Math.max(0, oe.length - 1));
|
|
704
|
+
}, [pe, oe]), bt = (t) => {
|
|
705
|
+
const n = E == null ? void 0 : E[t];
|
|
706
|
+
Pn({
|
|
707
|
+
id: oe[t],
|
|
708
|
+
parentId: (n == null ? void 0 : n.kind) === "child" ? oe[n.parentIndex] : void 0,
|
|
709
|
+
index: t
|
|
710
|
+
});
|
|
711
|
+
}, mt = j(!1), He = j(!1), gt = J >= 0 ? oe[J] : void 0, rn = j({
|
|
712
|
+
key: void 0
|
|
713
|
+
});
|
|
714
|
+
le(() => {
|
|
715
|
+
const t = rn.current, n = He.current;
|
|
716
|
+
He.current = !1, t.key !== W && (mt.current = !1);
|
|
717
|
+
const s = t.key !== W || t.id === void 0;
|
|
718
|
+
rn.current = { key: W, id: gt }, !(gt === void 0 || !s) && (t.key === W && (mt.current || n) || bt(J));
|
|
719
|
+
}, [W, gt]), le(() => {
|
|
720
|
+
He.current = !1;
|
|
721
|
+
});
|
|
722
|
+
const yt = j(void 0);
|
|
723
|
+
le(() => {
|
|
724
|
+
if (W == null) {
|
|
725
|
+
yt.current = void 0;
|
|
542
726
|
return;
|
|
543
727
|
}
|
|
544
|
-
if (!
|
|
728
|
+
if (!Ht || J < 0)
|
|
545
729
|
return;
|
|
546
|
-
const t =
|
|
547
|
-
if (t && t.key ===
|
|
730
|
+
const t = yt.current;
|
|
731
|
+
if (t && t.key === W && t.anchor === vt || l || d || re && !Te)
|
|
548
732
|
return;
|
|
549
|
-
const
|
|
550
|
-
if (!
|
|
733
|
+
const n = rt.current;
|
|
734
|
+
if (!n)
|
|
551
735
|
return;
|
|
552
|
-
const
|
|
553
|
-
`[data-table-id="${
|
|
554
|
-
),
|
|
555
|
-
const
|
|
556
|
-
|
|
557
|
-
},
|
|
558
|
-
if (
|
|
559
|
-
|
|
736
|
+
const s = ee && st === 0, a = (o) => n.querySelector(
|
|
737
|
+
`[data-table-id="${K}"][data-row-index="${o}"]`
|
|
738
|
+
), f = (o) => {
|
|
739
|
+
const c = ge.current, p = _e, P = c == null ? void 0 : c.scrollLeft, S = p == null ? void 0 : p.scrollLeft;
|
|
740
|
+
o.scrollIntoView({ block: "nearest", inline: "nearest" }), c && P !== void 0 && (c.scrollLeft = P), p && S !== void 0 && (p.scrollLeft = S), s || (yt.current = { key: W, anchor: vt });
|
|
741
|
+
}, h = a(J);
|
|
742
|
+
if (h) {
|
|
743
|
+
f(h);
|
|
560
744
|
return;
|
|
561
745
|
}
|
|
562
|
-
if (!
|
|
746
|
+
if (!re)
|
|
563
747
|
return;
|
|
564
|
-
const
|
|
565
|
-
(
|
|
748
|
+
const u = [...it.current.values()].find(
|
|
749
|
+
(o) => J >= o.startIndex && J < o.startIndex + o.count
|
|
566
750
|
);
|
|
567
|
-
if (!
|
|
751
|
+
if (!u)
|
|
568
752
|
return;
|
|
569
|
-
|
|
570
|
-
let
|
|
571
|
-
const
|
|
572
|
-
const
|
|
573
|
-
if (
|
|
574
|
-
|
|
753
|
+
u.scrollToIndex(J - u.startIndex);
|
|
754
|
+
let m = 0, A = 0;
|
|
755
|
+
const N = () => {
|
|
756
|
+
const o = a(J);
|
|
757
|
+
if (o) {
|
|
758
|
+
f(o);
|
|
575
759
|
return;
|
|
576
760
|
}
|
|
577
|
-
++
|
|
761
|
+
++A < Xr && (m = requestAnimationFrame(N));
|
|
578
762
|
};
|
|
579
|
-
return
|
|
763
|
+
return m = requestAnimationFrame(N), () => cancelAnimationFrame(m);
|
|
580
764
|
}, [
|
|
581
|
-
|
|
582
|
-
F,
|
|
583
|
-
Z,
|
|
584
|
-
He,
|
|
585
|
-
ge,
|
|
765
|
+
W,
|
|
586
766
|
J,
|
|
587
|
-
|
|
588
|
-
|
|
767
|
+
vt,
|
|
768
|
+
re,
|
|
769
|
+
Te,
|
|
770
|
+
_e,
|
|
771
|
+
ee,
|
|
772
|
+
st,
|
|
773
|
+
l,
|
|
589
774
|
d,
|
|
590
|
-
|
|
591
|
-
|
|
775
|
+
K,
|
|
776
|
+
Ht
|
|
592
777
|
]);
|
|
593
|
-
const
|
|
594
|
-
|
|
778
|
+
const xt = j(null), kt = (t, n) => {
|
|
779
|
+
var a;
|
|
780
|
+
const s = Math.min(Math.max(0, n), G.length - 1);
|
|
781
|
+
if (mt.current = !0, s === ae) {
|
|
782
|
+
(a = t.getRootNode().querySelector(
|
|
783
|
+
`[data-table-id="${K}"][data-row-index="${s}"]`
|
|
784
|
+
)) == null || a.focus();
|
|
785
|
+
return;
|
|
786
|
+
}
|
|
787
|
+
xt.current = t, bt(s);
|
|
595
788
|
};
|
|
596
|
-
|
|
597
|
-
const t =
|
|
789
|
+
Nn(() => {
|
|
790
|
+
const t = xt.current;
|
|
598
791
|
if (!t)
|
|
599
792
|
return;
|
|
600
|
-
|
|
601
|
-
const
|
|
602
|
-
`[data-table-id="${
|
|
603
|
-
))(
|
|
793
|
+
xt.current = null;
|
|
794
|
+
const n = t.getRootNode(), a = ((u) => n.querySelector(
|
|
795
|
+
`[data-table-id="${K}"][data-row-index="${u}"]`
|
|
796
|
+
))(ae);
|
|
604
797
|
if (a) {
|
|
605
798
|
a.focus();
|
|
606
799
|
return;
|
|
607
800
|
}
|
|
608
|
-
const
|
|
609
|
-
`[data-table-id="${
|
|
610
|
-
),
|
|
611
|
-
|
|
612
|
-
}, [
|
|
613
|
-
const
|
|
614
|
-
const a = {
|
|
615
|
-
if (a !== void 0) {
|
|
616
|
-
|
|
801
|
+
const f = n.querySelectorAll(
|
|
802
|
+
`[data-table-id="${K}"][data-row-index]`
|
|
803
|
+
), h = ae > 0 ? f[f.length - 1] : f[0];
|
|
804
|
+
h && (bt(Number(h.dataset.rowIndex)), h.focus());
|
|
805
|
+
}, [ae, K]);
|
|
806
|
+
const ln = (t, n) => (s) => {
|
|
807
|
+
const a = E == null ? void 0 : E[t], f = { ArrowRight: !0, ArrowLeft: !1 }[s.key];
|
|
808
|
+
if ((a == null ? void 0 : a.kind) === "parent" && f !== void 0 && a.isOpen !== f && s.target === s.currentTarget) {
|
|
809
|
+
s.preventDefault(), tn(t, f);
|
|
617
810
|
return;
|
|
618
811
|
}
|
|
619
|
-
if (
|
|
620
|
-
|
|
812
|
+
if ((a == null ? void 0 : a.kind) === "child" && s.key === "ArrowLeft" && s.target === s.currentTarget) {
|
|
813
|
+
s.preventDefault(), kt(s.currentTarget, a.parentIndex);
|
|
621
814
|
return;
|
|
622
815
|
}
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
816
|
+
const h = { ArrowDown: 1, ArrowUp: -1 }[s.key];
|
|
817
|
+
if (h !== void 0) {
|
|
818
|
+
s.preventDefault(), kt(s.currentTarget, t + h);
|
|
819
|
+
return;
|
|
820
|
+
}
|
|
821
|
+
if (!re && (s.key === "Home" || s.key === "End")) {
|
|
822
|
+
s.preventDefault(), kt(s.currentTarget, s.key === "Home" ? 0 : G.length - 1);
|
|
823
|
+
return;
|
|
824
|
+
}
|
|
825
|
+
n && Sr(s, n, "enter");
|
|
826
|
+
}, St = C === "detached" && !!be, [Fe, er] = te(null), [ke, tr] = te(), on = j(0), sn = re ? Te : F ? ve : null;
|
|
827
|
+
le(() => {
|
|
828
|
+
const t = ++on.current;
|
|
829
|
+
if (!St || !Fe || typeof IntersectionObserver > "u")
|
|
830
|
+
return;
|
|
831
|
+
const n = new IntersectionObserver(
|
|
832
|
+
(s) => tr({
|
|
833
|
+
inView: s.some((a) => a.isIntersecting),
|
|
834
|
+
observer: t
|
|
835
|
+
}),
|
|
836
|
+
{
|
|
837
|
+
root: sn ?? Ir(Fe),
|
|
838
|
+
rootMargin: `0px 0px ${Rr} 0px`
|
|
839
|
+
}
|
|
840
|
+
);
|
|
841
|
+
return n.observe(Fe), () => n.disconnect();
|
|
842
|
+
}, [St, Fe, sn, r.length, l, he, d]);
|
|
843
|
+
const ze = j(void 0);
|
|
844
|
+
le(() => {
|
|
845
|
+
if (l || d) {
|
|
846
|
+
ze.current = void 0;
|
|
847
|
+
return;
|
|
848
|
+
}
|
|
849
|
+
if ((ke == null ? void 0 : ke.observer) === on.current) {
|
|
850
|
+
if (!ke.inView) {
|
|
851
|
+
ze.current = void 0;
|
|
852
|
+
return;
|
|
853
|
+
}
|
|
854
|
+
!be || he || r.length === 0 || ze.current !== r.length && (ze.current = r.length, be());
|
|
855
|
+
}
|
|
856
|
+
}, [ke, be, l, he, d, r.length]), B && typeof b == "string" && r.length > 0 && Ur(r[0][b]) && Ye(
|
|
857
|
+
"table-expandable-rowkey",
|
|
858
|
+
`Table \`expandable\` resolves \`expandedRowKeys\` against \`rowKey\`, and the rows have no \`${b}\`. Pass a \`rowKey\` they carry.`
|
|
859
|
+
), C !== "detached" && (Bt || Pt || be || he) && Ye(
|
|
860
|
+
"table-detached-only",
|
|
861
|
+
'Table `expandable`, `rowThread`, `onReachEnd` and `loadingMore` work on the detached header only. Pass `headerVariant="detached"`.'
|
|
862
|
+
), C !== "detached" && pn({ title: z, subtitle: de, extra: fe }) && Ye(
|
|
626
863
|
"table-title-inline",
|
|
627
864
|
'Table `title`, `subtitle` and `extra` draw only on the detached header. Pass `headerVariant="detached"` or leave them out.'
|
|
628
865
|
);
|
|
629
|
-
const
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
),
|
|
633
|
-
|
|
866
|
+
const wt = li(
|
|
867
|
+
v,
|
|
868
|
+
C === "detached" && (_ != null && _.pageSize) ? Math.min(_.pageSize, 10) : 5
|
|
869
|
+
), an = Er(_ == null ? void 0 : _.position), Be = (t) => _ && !l && an[t] ? /* @__PURE__ */ i(
|
|
870
|
+
$r,
|
|
634
871
|
{
|
|
635
|
-
current:
|
|
636
|
-
pageSize:
|
|
637
|
-
total:
|
|
638
|
-
showSizeChanger:
|
|
639
|
-
showQuickJumper:
|
|
640
|
-
showTotal:
|
|
641
|
-
pageSizeOptions:
|
|
642
|
-
onChange:
|
|
643
|
-
onShowSizeChange:
|
|
872
|
+
current: _.current ?? 1,
|
|
873
|
+
pageSize: _.pageSize ?? 10,
|
|
874
|
+
total: _.total ?? 0,
|
|
875
|
+
showSizeChanger: _.showSizeChanger,
|
|
876
|
+
showQuickJumper: _.showQuickJumper,
|
|
877
|
+
showTotal: _.showTotal,
|
|
878
|
+
pageSizeOptions: _.pageSizeOptions,
|
|
879
|
+
onChange: _.onChange,
|
|
880
|
+
onShowSizeChange: _.onShowSizeChange,
|
|
644
881
|
edge: t,
|
|
645
|
-
align:
|
|
882
|
+
align: an[t]
|
|
646
883
|
}
|
|
647
884
|
) : null;
|
|
648
|
-
if (
|
|
649
|
-
const t =
|
|
650
|
-
...
|
|
651
|
-
...
|
|
652
|
-
}),
|
|
885
|
+
if (C === "detached") {
|
|
886
|
+
const t = V ? { minWidth: Zt } : {}, n = (o, c) => ({
|
|
887
|
+
...V && o.width === void 0 ? { minWidth: o.minWidth ?? Dn } : {},
|
|
888
|
+
...Pr(De.offsets.get(o.key), c)
|
|
889
|
+
}), s = (o) => o.key === De.edgeKey && qn ? /* @__PURE__ */ i(
|
|
653
890
|
"span",
|
|
654
891
|
{
|
|
655
892
|
"aria-hidden": "true",
|
|
656
893
|
className: "shrink-0",
|
|
657
894
|
style: {
|
|
658
895
|
position: "sticky",
|
|
659
|
-
right:
|
|
896
|
+
right: De.extent,
|
|
660
897
|
zIndex: 1
|
|
661
898
|
},
|
|
662
|
-
children: /* @__PURE__ */
|
|
899
|
+
children: /* @__PURE__ */ i("span", { style: Gr })
|
|
663
900
|
}
|
|
664
|
-
) : null, a = `${
|
|
665
|
-
border:
|
|
666
|
-
borderRadius:
|
|
901
|
+
) : null, a = `${K}-caption`, f = pn({ title: z, subtitle: de, extra: fe }) ? /* @__PURE__ */ i("div", { role: "caption", id: a, className: "w-full", children: /* @__PURE__ */ i(pr, { title: z, subtitle: de, extra: fe }) }) : null, h = ee ? It : "var(--malachite-table-background, #f7f7f7)", u = {
|
|
902
|
+
border: xr,
|
|
903
|
+
borderRadius: we,
|
|
667
904
|
overflow: "clip",
|
|
668
905
|
flexShrink: 0,
|
|
669
906
|
...t
|
|
670
|
-
},
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
907
|
+
}, m = (o, c, p = !1, P = !1, S, X = ae) => {
|
|
908
|
+
var hn;
|
|
909
|
+
const ie = oe[c] ?? xe(o, c), w = (q == null ? void 0 : q(o, c)) || {}, ir = Y == null ? void 0 : Y(o, c), Ge = c === J, Pe = Q || w.onClick ? () => {
|
|
910
|
+
var x;
|
|
911
|
+
Q == null || Q(o, c), (x = w.onClick) == null || x.call(w, o, c);
|
|
912
|
+
} : void 0, se = !!Pe, lr = p ? {} : yn, T = E == null ? void 0 : E[c], or = (T == null ? void 0 : T.kind) === "parent" ? /* @__PURE__ */ i(
|
|
913
|
+
"button",
|
|
914
|
+
{
|
|
915
|
+
type: "button",
|
|
916
|
+
id: Yt(c),
|
|
917
|
+
"aria-expanded": T.isOpen,
|
|
918
|
+
"aria-label": `${T.children.length} ${T.children.length === 1 ? "row" : "rows"}`,
|
|
919
|
+
"aria-labelledby": `${Yt(c)} ${ye(c)}`,
|
|
920
|
+
onClick: () => tn(c, !T.isOpen),
|
|
921
|
+
tabIndex: se ? -1 : void 0,
|
|
922
|
+
className: `flex items-center justify-center shrink-0 rounded cursor-pointer appearance-none bg-transparent border-0 p-0 ${In}`,
|
|
923
|
+
style: { width: Je, height: Je },
|
|
924
|
+
children: /* @__PURE__ */ i(ur, { expanded: T.isOpen })
|
|
925
|
+
}
|
|
926
|
+
) : E ? (
|
|
927
|
+
// Lines a row's content up with its parents' past their toggles, and indents a
|
|
928
|
+
// child one step further.
|
|
929
|
+
/* @__PURE__ */ i(
|
|
930
|
+
"span",
|
|
931
|
+
{
|
|
932
|
+
"aria-hidden": "true",
|
|
933
|
+
className: "shrink-0",
|
|
934
|
+
style: {
|
|
935
|
+
width: (T == null ? void 0 : T.kind) === "child" ? Tr : Je
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
)
|
|
939
|
+
) : void 0, sr = (T == null ? void 0 : T.kind) === "parent" ? (hn = B == null ? void 0 : B.summary) == null ? void 0 : hn.call(B, o, T.children) : void 0;
|
|
940
|
+
return /* @__PURE__ */ y(
|
|
676
941
|
"div",
|
|
677
942
|
{
|
|
678
|
-
ref:
|
|
679
|
-
"data-index":
|
|
680
|
-
"data-table-id":
|
|
681
|
-
"data-row-index":
|
|
943
|
+
ref: S == null ? void 0 : S.measureRef,
|
|
944
|
+
"data-index": S == null ? void 0 : S.index,
|
|
945
|
+
"data-table-id": K,
|
|
946
|
+
"data-row-index": c,
|
|
682
947
|
role: "row",
|
|
683
|
-
"aria-labelledby":
|
|
684
|
-
"aria-current":
|
|
685
|
-
tabIndex:
|
|
686
|
-
onKeyDown:
|
|
948
|
+
"aria-labelledby": se ? ye(c) : void 0,
|
|
949
|
+
"aria-current": Ge ? "true" : void 0,
|
|
950
|
+
tabIndex: se ? c === X ? 0 : -1 : void 0,
|
|
951
|
+
onKeyDown: se ? ln(c, Pe) : void 0,
|
|
687
952
|
className: `
|
|
688
953
|
group bg-[var(--malachite-table-row-background,#fff)] flex items-stretch relative w-full
|
|
689
|
-
${
|
|
690
|
-
${(
|
|
954
|
+
${se ? `cursor-pointer hover:bg-[var(--malachite-table-row-hover-background,#fafafa)] ${un}` : ""}
|
|
955
|
+
${(U == null ? void 0 : U(o, c)) || ""}
|
|
691
956
|
`,
|
|
692
957
|
style: {
|
|
693
|
-
...
|
|
958
|
+
...lr,
|
|
694
959
|
...t,
|
|
695
|
-
minHeight:
|
|
696
|
-
scrollMarginTop:
|
|
960
|
+
minHeight: tt,
|
|
961
|
+
scrollMarginTop: Qn,
|
|
697
962
|
// Echo the card's clip, or it cuts the accent bar's end into a stub.
|
|
698
|
-
...
|
|
699
|
-
borderTopLeftRadius:
|
|
700
|
-
borderTopRightRadius:
|
|
963
|
+
...P ? {
|
|
964
|
+
borderTopLeftRadius: we,
|
|
965
|
+
borderTopRightRadius: we
|
|
701
966
|
} : {},
|
|
702
|
-
...
|
|
703
|
-
borderBottomLeftRadius:
|
|
704
|
-
borderBottomRightRadius:
|
|
967
|
+
...p ? {
|
|
968
|
+
borderBottomLeftRadius: we,
|
|
969
|
+
borderBottomRightRadius: we
|
|
705
970
|
} : {},
|
|
706
971
|
// Set unconditionally it would beat `hover:bg-*` on every row.
|
|
707
|
-
...
|
|
708
|
-
...
|
|
972
|
+
...jr(ir, Ge),
|
|
973
|
+
...Ge ? {
|
|
709
974
|
// Inset box-shadow, not `ring-*` — see the classic cell.
|
|
710
|
-
boxShadow: `inset 2px 0 0 ${
|
|
975
|
+
boxShadow: `inset 2px 0 0 ${Cn}`
|
|
711
976
|
} : {}
|
|
712
977
|
},
|
|
713
|
-
onClick:
|
|
714
|
-
|
|
978
|
+
onClick: Pe ? (x) => {
|
|
979
|
+
vn(x) || Pe();
|
|
715
980
|
} : void 0,
|
|
716
|
-
onDoubleClick:
|
|
717
|
-
var
|
|
718
|
-
return (
|
|
981
|
+
onDoubleClick: w.onDoubleClick ? () => {
|
|
982
|
+
var x;
|
|
983
|
+
return (x = w.onDoubleClick) == null ? void 0 : x.call(w, o, c);
|
|
719
984
|
} : void 0,
|
|
720
|
-
onContextMenu:
|
|
721
|
-
var
|
|
722
|
-
return (
|
|
985
|
+
onContextMenu: w.onContextMenu ? () => {
|
|
986
|
+
var x;
|
|
987
|
+
return (x = w.onContextMenu) == null ? void 0 : x.call(w, o, c);
|
|
723
988
|
} : void 0,
|
|
724
|
-
onMouseEnter:
|
|
725
|
-
var
|
|
726
|
-
return (
|
|
989
|
+
onMouseEnter: w.onMouseEnter ? () => {
|
|
990
|
+
var x;
|
|
991
|
+
return (x = w.onMouseEnter) == null ? void 0 : x.call(w, o, c);
|
|
727
992
|
} : void 0,
|
|
728
|
-
onMouseLeave:
|
|
729
|
-
var
|
|
730
|
-
return (
|
|
993
|
+
onMouseLeave: w.onMouseLeave ? () => {
|
|
994
|
+
var x;
|
|
995
|
+
return (x = w.onMouseLeave) == null ? void 0 : x.call(w, o, c);
|
|
731
996
|
} : void 0,
|
|
732
997
|
children: [
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
998
|
+
ue ? /* @__PURE__ */ i(
|
|
999
|
+
ui,
|
|
1000
|
+
{
|
|
1001
|
+
thread: ue(o, c),
|
|
1002
|
+
tabIndex: se ? c === X ? 0 : -1 : void 0
|
|
1003
|
+
}
|
|
1004
|
+
) : null,
|
|
1005
|
+
e.map((x) => /* @__PURE__ */ y(je.Fragment, { children: [
|
|
1006
|
+
s(x),
|
|
1007
|
+
/* @__PURE__ */ i(
|
|
1008
|
+
fi,
|
|
737
1009
|
{
|
|
738
|
-
column:
|
|
739
|
-
record:
|
|
740
|
-
id:
|
|
741
|
-
paddingClass:
|
|
742
|
-
index:
|
|
743
|
-
size:
|
|
744
|
-
isSelected:
|
|
745
|
-
cellStyle:
|
|
1010
|
+
column: x,
|
|
1011
|
+
record: o,
|
|
1012
|
+
id: (se || (T == null ? void 0 : T.kind) === "parent") && x.key === Ce ? ye(c) : void 0,
|
|
1013
|
+
paddingClass: me,
|
|
1014
|
+
index: c,
|
|
1015
|
+
size: Z,
|
|
1016
|
+
isSelected: Ge,
|
|
1017
|
+
cellStyle: n(x, "row"),
|
|
1018
|
+
leading: x.key === Ce ? or : void 0,
|
|
1019
|
+
trailing: x.key === Ce ? sr : void 0
|
|
746
1020
|
}
|
|
747
1021
|
)
|
|
748
|
-
] },
|
|
749
|
-
|
|
1022
|
+
] }, x.key)),
|
|
1023
|
+
se && Le ? /* @__PURE__ */ i("span", { "aria-hidden": "true", className: gr }) : null
|
|
750
1024
|
]
|
|
751
1025
|
},
|
|
752
|
-
|
|
1026
|
+
ie
|
|
753
1027
|
);
|
|
754
|
-
},
|
|
1028
|
+
}, A = (o, c = !1) => /* @__PURE__ */ y(
|
|
755
1029
|
"div",
|
|
756
1030
|
{
|
|
757
1031
|
"aria-hidden": "true",
|
|
758
1032
|
className: "bg-[var(--malachite-table-row-background,#fff)] flex items-stretch w-full",
|
|
759
1033
|
style: {
|
|
760
|
-
...
|
|
1034
|
+
...c ? {} : yn,
|
|
761
1035
|
...t,
|
|
762
|
-
minHeight:
|
|
1036
|
+
minHeight: tt
|
|
763
1037
|
},
|
|
764
|
-
children:
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
1038
|
+
children: [
|
|
1039
|
+
ue ? /* @__PURE__ */ i("div", { className: "shrink-0", style: Lt }) : null,
|
|
1040
|
+
e.map((p) => {
|
|
1041
|
+
const X = (p.title === "" || p.title == null) && p.width !== void 0 ? /* @__PURE__ */ i(
|
|
1042
|
+
"div",
|
|
1043
|
+
{
|
|
1044
|
+
className: `flex items-center ${An(p.align)} shrink-0 overflow-clip ${me}`,
|
|
1045
|
+
style: {
|
|
1046
|
+
...Wt(p),
|
|
1047
|
+
...n(p, "row")
|
|
1048
|
+
},
|
|
1049
|
+
children: /* @__PURE__ */ i("div", { className: "table-skeleton-bar h-3 rounded animate-pulse w-2/5" })
|
|
1050
|
+
}
|
|
1051
|
+
) : /* @__PURE__ */ i(
|
|
1052
|
+
"div",
|
|
1053
|
+
{
|
|
1054
|
+
className: `flex flex-[1_0_0] items-center ${ce(p.align)} min-w-0 overflow-clip ${me}`,
|
|
1055
|
+
style: {
|
|
1056
|
+
...Ee(p),
|
|
1057
|
+
...n(p, "row")
|
|
1058
|
+
},
|
|
1059
|
+
children: /* @__PURE__ */ i("div", { className: "table-skeleton-bar h-3 rounded animate-pulse w-3/5" })
|
|
1060
|
+
}
|
|
1061
|
+
);
|
|
1062
|
+
return /* @__PURE__ */ y(je.Fragment, { children: [
|
|
1063
|
+
s(p),
|
|
1064
|
+
X
|
|
1065
|
+
] }, p.key);
|
|
1066
|
+
})
|
|
1067
|
+
]
|
|
791
1068
|
},
|
|
792
|
-
`skeleton-${
|
|
793
|
-
),
|
|
1069
|
+
`skeleton-${o}`
|
|
1070
|
+
), N = H ? /* @__PURE__ */ y(
|
|
794
1071
|
"div",
|
|
795
1072
|
{
|
|
796
1073
|
role: "row",
|
|
797
1074
|
className: "flex items-stretch w-full",
|
|
798
|
-
style: { ...t, minHeight:
|
|
799
|
-
children:
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
or,
|
|
1075
|
+
style: { ...t, minHeight: Jr[M] },
|
|
1076
|
+
children: [
|
|
1077
|
+
ue ? /* @__PURE__ */ i(
|
|
1078
|
+
"div",
|
|
803
1079
|
{
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
cellStyle: i(l, p)
|
|
1080
|
+
role: "columnheader",
|
|
1081
|
+
"aria-label": zn,
|
|
1082
|
+
className: "shrink-0",
|
|
1083
|
+
style: Lt
|
|
809
1084
|
}
|
|
810
|
-
)
|
|
811
|
-
|
|
1085
|
+
) : null,
|
|
1086
|
+
e.map((o, c) => /* @__PURE__ */ y(je.Fragment, { children: [
|
|
1087
|
+
s(o),
|
|
1088
|
+
/* @__PURE__ */ i(
|
|
1089
|
+
di,
|
|
1090
|
+
{
|
|
1091
|
+
column: o,
|
|
1092
|
+
paddingClass: et,
|
|
1093
|
+
sortDirection: (L == null ? void 0 : L.key) === o.key ? L.direction : null,
|
|
1094
|
+
onSort: o.sorter ? en(o, c) : void 0,
|
|
1095
|
+
cellStyle: n(o, h)
|
|
1096
|
+
}
|
|
1097
|
+
)
|
|
1098
|
+
] }, o.key))
|
|
1099
|
+
]
|
|
812
1100
|
}
|
|
813
1101
|
) : null;
|
|
814
|
-
return /* @__PURE__ */
|
|
1102
|
+
return /* @__PURE__ */ y(
|
|
815
1103
|
"div",
|
|
816
1104
|
{
|
|
817
|
-
ref:
|
|
818
|
-
className: `w-full ${
|
|
819
|
-
style: { ...
|
|
1105
|
+
ref: rt,
|
|
1106
|
+
className: `w-full ${zt}`,
|
|
1107
|
+
style: { ...Rt, ...Ze },
|
|
820
1108
|
children: [
|
|
821
|
-
|
|
822
|
-
/* @__PURE__ */
|
|
1109
|
+
Be("top"),
|
|
1110
|
+
/* @__PURE__ */ y(
|
|
823
1111
|
"div",
|
|
824
1112
|
{
|
|
825
1113
|
role: "table",
|
|
826
|
-
"aria-label":
|
|
827
|
-
"aria-labelledby":
|
|
828
|
-
"aria-busy":
|
|
829
|
-
className: `${
|
|
1114
|
+
"aria-label": g,
|
|
1115
|
+
"aria-labelledby": k ?? (g || !f ? void 0 : a),
|
|
1116
|
+
"aria-busy": l || void 0,
|
|
1117
|
+
className: `${yr} flex flex-col items-start ${ee ? "" : "overflow-clip"} relative w-full`,
|
|
830
1118
|
children: [
|
|
831
|
-
!
|
|
832
|
-
|
|
1119
|
+
!H && f,
|
|
1120
|
+
H && /* @__PURE__ */ y(
|
|
833
1121
|
"div",
|
|
834
1122
|
{
|
|
835
|
-
ref:
|
|
1123
|
+
ref: Ut,
|
|
836
1124
|
style: {
|
|
837
|
-
...
|
|
1125
|
+
...ee ? {
|
|
838
1126
|
position: "sticky",
|
|
839
|
-
top:
|
|
1127
|
+
top: Qe,
|
|
840
1128
|
zIndex: 8,
|
|
841
1129
|
// A title row sits on the frame, as a framed Card's
|
|
842
1130
|
// does; the header colour goes behind the column
|
|
843
1131
|
// headers alone.
|
|
844
|
-
backgroundColor:
|
|
845
|
-
marginInline: -
|
|
846
|
-
width: `calc(100% + ${
|
|
847
|
-
paddingInline:
|
|
1132
|
+
backgroundColor: f ? "var(--malachite-table-background, #f7f7f7)" : It,
|
|
1133
|
+
marginInline: -Se,
|
|
1134
|
+
width: `calc(100% + ${Se * 2}px)`,
|
|
1135
|
+
paddingInline: Se,
|
|
848
1136
|
// Vertically too, or the card's top frame sits above
|
|
849
1137
|
// the docked header and rows scroll through it.
|
|
850
|
-
marginTop: -
|
|
851
|
-
paddingTop:
|
|
1138
|
+
marginTop: -Se,
|
|
1139
|
+
paddingTop: Se
|
|
852
1140
|
} : { width: "100%" }
|
|
853
1141
|
},
|
|
854
1142
|
children: [
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
/* @__PURE__ */
|
|
1143
|
+
ee && /* @__PURE__ */ i(ti, {}),
|
|
1144
|
+
f,
|
|
1145
|
+
/* @__PURE__ */ i(
|
|
858
1146
|
"div",
|
|
859
1147
|
{
|
|
860
|
-
ref:
|
|
1148
|
+
ref: nt,
|
|
861
1149
|
role: "rowgroup",
|
|
862
|
-
onScroll:
|
|
863
|
-
|
|
864
|
-
|
|
1150
|
+
onScroll: V ? () => xn(
|
|
1151
|
+
nt.current,
|
|
1152
|
+
ge.current
|
|
865
1153
|
) : void 0,
|
|
866
1154
|
style: {
|
|
867
|
-
...
|
|
868
|
-
...
|
|
869
|
-
paddingRight:
|
|
1155
|
+
...V ? {
|
|
1156
|
+
...zr,
|
|
1157
|
+
paddingRight: Zn
|
|
870
1158
|
} : {},
|
|
871
|
-
...
|
|
1159
|
+
...ee && f ? { backgroundColor: It } : {}
|
|
872
1160
|
},
|
|
873
|
-
children:
|
|
1161
|
+
children: N
|
|
874
1162
|
}
|
|
875
1163
|
)
|
|
876
1164
|
]
|
|
877
1165
|
}
|
|
878
1166
|
),
|
|
879
|
-
/* @__PURE__ */
|
|
1167
|
+
/* @__PURE__ */ y(
|
|
880
1168
|
"div",
|
|
881
1169
|
{
|
|
882
|
-
ref:
|
|
1170
|
+
ref: Yn,
|
|
883
1171
|
role: "rowgroup",
|
|
884
|
-
onScroll:
|
|
885
|
-
|
|
1172
|
+
onScroll: V ? () => {
|
|
1173
|
+
xn(ge.current, nt.current), Le && Ae();
|
|
886
1174
|
} : void 0,
|
|
887
|
-
className: `flex flex-col items-start ${
|
|
1175
|
+
className: `flex flex-col items-start ${V ? "overflow-x-auto" : "overflow-x-clip"} ${ot ? "overflow-y-auto" : "overflow-y-visible"} w-full`,
|
|
888
1176
|
style: {
|
|
889
1177
|
// Firefox + modern Chromium only; older Webkit keeps its default.
|
|
890
1178
|
scrollbarWidth: "thin",
|
|
891
1179
|
scrollbarColor: "var(--malachite-text-placeholder, rgb(187, 187, 187)) transparent",
|
|
892
1180
|
// With an external virtual scroller the body is overflow-visible and
|
|
893
1181
|
// a bounded box would overlap content below it.
|
|
894
|
-
...
|
|
895
|
-
maxHeight:
|
|
1182
|
+
...F && ot ? {
|
|
1183
|
+
maxHeight: Oe ? lt : ri(F, !!_)
|
|
896
1184
|
} : {}
|
|
897
1185
|
},
|
|
898
|
-
children:
|
|
899
|
-
"div",
|
|
900
|
-
|
|
901
|
-
role: "row",
|
|
902
|
-
className: "flex flex-col items-center justify-center bg-[var(--malachite-table-row-background,#fff)] w-full px-4 py-12 text-center",
|
|
903
|
-
children: /* @__PURE__ */ $(
|
|
904
|
-
"div",
|
|
905
|
-
{
|
|
906
|
-
role: "cell",
|
|
907
|
-
"aria-colspan": e.length,
|
|
908
|
-
className: "flex flex-col items-center",
|
|
909
|
-
children: [
|
|
910
|
-
/* @__PURE__ */ r("div", { className: "text-[var(--malachite-text-secondary)] text-[14px] font-medium mb-1", children: R }),
|
|
911
|
-
/* @__PURE__ */ r("div", { className: "text-[var(--malachite-text-secondary)] text-[13px]", children: m })
|
|
912
|
-
]
|
|
913
|
-
}
|
|
914
|
-
)
|
|
915
|
-
}
|
|
916
|
-
) }) : o ? /* @__PURE__ */ r("div", { className: "flex flex-col w-full", style: v, children: Array.from({ length: qe }).map(
|
|
917
|
-
(l, s) => U(s, s === qe - 1)
|
|
918
|
-
) }) : T.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col w-full", style: v, children: /* @__PURE__ */ r(
|
|
919
|
-
"div",
|
|
920
|
-
{
|
|
921
|
-
role: "row",
|
|
922
|
-
className: "flex flex-col items-center justify-center bg-[var(--malachite-table-row-background,#fff)] w-full px-4 py-12 text-center",
|
|
923
|
-
children: /* @__PURE__ */ $(
|
|
924
|
-
"div",
|
|
925
|
-
{
|
|
926
|
-
role: "cell",
|
|
927
|
-
"aria-colspan": e.length,
|
|
928
|
-
className: "flex flex-col items-center",
|
|
929
|
-
children: [
|
|
930
|
-
/* @__PURE__ */ r("div", { className: "text-[var(--malachite-text-secondary)] text-[14px] font-medium", children: C }),
|
|
931
|
-
z && /* @__PURE__ */ r("div", { className: "text-[var(--malachite-text-secondary)] text-[13px] mt-1", children: z })
|
|
932
|
-
]
|
|
933
|
-
}
|
|
934
|
-
)
|
|
935
|
-
}
|
|
936
|
-
) }) : (() => {
|
|
937
|
-
const l = (f, H, N) => Z ? /* @__PURE__ */ r(
|
|
938
|
-
Kn,
|
|
1186
|
+
children: [
|
|
1187
|
+
d ? /* @__PURE__ */ i("div", { className: "flex flex-col w-full", style: u, children: /* @__PURE__ */ i(
|
|
1188
|
+
"div",
|
|
939
1189
|
{
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
1190
|
+
role: "row",
|
|
1191
|
+
className: "flex flex-col items-center justify-center bg-[var(--malachite-table-row-background,#fff)] w-full px-4 py-12 text-center",
|
|
1192
|
+
children: /* @__PURE__ */ y(
|
|
1193
|
+
"div",
|
|
1194
|
+
{
|
|
1195
|
+
role: "cell",
|
|
1196
|
+
"aria-colspan": Ie,
|
|
1197
|
+
className: "flex flex-col items-center",
|
|
1198
|
+
children: [
|
|
1199
|
+
/* @__PURE__ */ i("div", { className: "text-[var(--malachite-text-secondary)] text-[14px] font-medium mb-1", children: O }),
|
|
1200
|
+
/* @__PURE__ */ i("div", { className: "text-[var(--malachite-text-secondary)] text-[13px]", children: $ })
|
|
1201
|
+
]
|
|
1202
|
+
}
|
|
1203
|
+
)
|
|
1204
|
+
}
|
|
1205
|
+
) }) : l ? /* @__PURE__ */ i("div", { className: "flex flex-col w-full", style: u, children: Array.from({ length: wt }).map(
|
|
1206
|
+
(o, c) => A(c, c === wt - 1)
|
|
1207
|
+
) }) : G.length === 0 ? /* @__PURE__ */ i("div", { className: "flex flex-col w-full", style: u, children: /* @__PURE__ */ i(
|
|
952
1208
|
"div",
|
|
953
1209
|
{
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
children:
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
1210
|
+
role: "row",
|
|
1211
|
+
className: "flex flex-col items-center justify-center bg-[var(--malachite-table-row-background,#fff)] w-full px-4 py-12 text-center",
|
|
1212
|
+
children: /* @__PURE__ */ y(
|
|
1213
|
+
"div",
|
|
1214
|
+
{
|
|
1215
|
+
role: "cell",
|
|
1216
|
+
"aria-colspan": Ie,
|
|
1217
|
+
className: "flex flex-col items-center",
|
|
1218
|
+
children: [
|
|
1219
|
+
/* @__PURE__ */ i("div", { className: "text-[var(--malachite-text-secondary)] text-[14px] font-medium", children: D }),
|
|
1220
|
+
R && /* @__PURE__ */ i("div", { className: "text-[var(--malachite-text-secondary)] text-[13px] mt-1", children: R })
|
|
1221
|
+
]
|
|
1222
|
+
}
|
|
963
1223
|
)
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
1224
|
+
}
|
|
1225
|
+
) }) : (() => {
|
|
1226
|
+
const o = (p, P, S) => re ? /* @__PURE__ */ i(
|
|
1227
|
+
ni,
|
|
1228
|
+
{
|
|
1229
|
+
cardKey: S,
|
|
1230
|
+
records: p,
|
|
1231
|
+
startIndex: P,
|
|
1232
|
+
scrollElement: Te,
|
|
1233
|
+
estimateRowHeight: jn,
|
|
1234
|
+
style: u,
|
|
1235
|
+
renderRow: m,
|
|
1236
|
+
registerHandle: Gn,
|
|
1237
|
+
rovingIndex: ae
|
|
1238
|
+
},
|
|
1239
|
+
`section-card-${S}`
|
|
1240
|
+
) : /* @__PURE__ */ i(
|
|
1241
|
+
"div",
|
|
1242
|
+
{
|
|
1243
|
+
className: "flex flex-col w-full",
|
|
1244
|
+
style: u,
|
|
1245
|
+
children: p.map(
|
|
1246
|
+
(X, ie) => m(
|
|
1247
|
+
X,
|
|
1248
|
+
P + ie,
|
|
1249
|
+
ie === p.length - 1,
|
|
1250
|
+
ie === 0
|
|
1251
|
+
)
|
|
1252
|
+
)
|
|
1253
|
+
},
|
|
1254
|
+
`section-card-${S}`
|
|
977
1255
|
);
|
|
978
|
-
|
|
979
|
-
|
|
1256
|
+
if (ut.size === 0)
|
|
1257
|
+
return o(G, 0, "all");
|
|
1258
|
+
const c = [...ut.keys()].sort((p, P) => p - P);
|
|
1259
|
+
return c.map((p, P) => {
|
|
1260
|
+
const S = ut.get(p);
|
|
1261
|
+
if (!S)
|
|
1262
|
+
return null;
|
|
1263
|
+
const X = P + 1 < c.length ? c[P + 1] : G.length, ie = G.slice(p, X), w = Ke == null ? void 0 : Ke(
|
|
1264
|
+
S.key,
|
|
1265
|
+
S.records
|
|
1266
|
+
);
|
|
1267
|
+
return /* @__PURE__ */ y(je.Fragment, { children: [
|
|
1268
|
+
w != null ? /* @__PURE__ */ i(
|
|
1269
|
+
"div",
|
|
1270
|
+
{
|
|
1271
|
+
role: "row",
|
|
1272
|
+
className: "table-section-divider",
|
|
1273
|
+
style: V ? mn : void 0,
|
|
1274
|
+
children: /* @__PURE__ */ i("div", { role: "cell", "aria-colspan": Ie, children: w })
|
|
1275
|
+
}
|
|
1276
|
+
) : null,
|
|
1277
|
+
o(ie, p, S.key)
|
|
1278
|
+
] }, `section-${S.key}`);
|
|
1279
|
+
});
|
|
1280
|
+
})(),
|
|
1281
|
+
he && !l && !d ? /* @__PURE__ */ i(
|
|
1282
|
+
"div",
|
|
1283
|
+
{
|
|
1284
|
+
role: "row",
|
|
1285
|
+
className: "flex items-center justify-center w-full py-3",
|
|
1286
|
+
style: V ? mn : void 0,
|
|
1287
|
+
children: /* @__PURE__ */ y(
|
|
980
1288
|
"div",
|
|
981
1289
|
{
|
|
982
|
-
role: "
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
children:
|
|
1290
|
+
role: "cell",
|
|
1291
|
+
"aria-colspan": Ie,
|
|
1292
|
+
className: "flex items-center gap-2 text-[length:var(--malachite-font-size-small,13px)] text-[var(--malachite-text-secondary)]",
|
|
1293
|
+
children: [
|
|
1294
|
+
/* @__PURE__ */ i(br, { size: "xxxsmall" }),
|
|
1295
|
+
/* @__PURE__ */ i("span", { "aria-hidden": "true", children: Gt })
|
|
1296
|
+
]
|
|
986
1297
|
}
|
|
987
|
-
)
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
1298
|
+
)
|
|
1299
|
+
}
|
|
1300
|
+
) : null,
|
|
1301
|
+
St ? /* @__PURE__ */ i(
|
|
1302
|
+
"div",
|
|
1303
|
+
{
|
|
1304
|
+
ref: er,
|
|
1305
|
+
"aria-hidden": "true",
|
|
1306
|
+
className: "w-full shrink-0",
|
|
1307
|
+
style: { height: 1 }
|
|
1308
|
+
}
|
|
1309
|
+
) : null
|
|
1310
|
+
]
|
|
992
1311
|
}
|
|
993
1312
|
)
|
|
994
1313
|
]
|
|
995
1314
|
}
|
|
996
1315
|
),
|
|
997
|
-
|
|
1316
|
+
/* @__PURE__ */ i("span", { role: "status", style: wr, children: he && !l && !d ? Gt : "" }),
|
|
1317
|
+
Be("bottom")
|
|
998
1318
|
]
|
|
999
1319
|
}
|
|
1000
1320
|
);
|
|
1001
1321
|
}
|
|
1002
|
-
const
|
|
1003
|
-
const
|
|
1004
|
-
/* @__PURE__ */
|
|
1005
|
-
t.info && /* @__PURE__ */
|
|
1006
|
-
|
|
1007
|
-
/* @__PURE__ */
|
|
1008
|
-
|
|
1322
|
+
const $t = ne === "fixed" || e.some((t) => t.width), cn = V && (l || G.length > 0), nr = cn && $t ? Wr(e) : void 0, Et = (t) => cn && !$t ? t.minWidth : void 0, rr = (t, n) => {
|
|
1323
|
+
const s = t.sorter, f = (L == null ? void 0 : L.key) === t.key ? L == null ? void 0 : L.direction : null, h = /* @__PURE__ */ y("div", { className: `flex min-w-0 items-center gap-2 ${ce(t.align)}`, children: [
|
|
1324
|
+
/* @__PURE__ */ i("span", { className: t.titleShrinks ? "min-w-0" : void 0, children: t.title }),
|
|
1325
|
+
t.info && /* @__PURE__ */ i(qe, { info: t.info }),
|
|
1326
|
+
s && /* @__PURE__ */ y("div", { className: "flex flex-col", children: [
|
|
1327
|
+
/* @__PURE__ */ i(
|
|
1328
|
+
dr,
|
|
1009
1329
|
{
|
|
1010
1330
|
size: 12,
|
|
1011
|
-
className:
|
|
1331
|
+
className: f === "asc" ? Tt : Ot
|
|
1012
1332
|
}
|
|
1013
1333
|
),
|
|
1014
|
-
/* @__PURE__ */
|
|
1015
|
-
|
|
1334
|
+
/* @__PURE__ */ i(
|
|
1335
|
+
Rn,
|
|
1016
1336
|
{
|
|
1017
1337
|
size: 12,
|
|
1018
|
-
className: `-mt-1 ${
|
|
1338
|
+
className: `-mt-1 ${f === "desc" ? Tt : Ot}`
|
|
1019
1339
|
}
|
|
1020
1340
|
)
|
|
1021
1341
|
] })
|
|
1022
1342
|
] });
|
|
1023
|
-
return /* @__PURE__ */
|
|
1343
|
+
return /* @__PURE__ */ i(
|
|
1024
1344
|
"th",
|
|
1025
1345
|
{
|
|
1026
1346
|
className: `
|
|
1027
|
-
table-header table-cell ${
|
|
1028
|
-
${
|
|
1029
|
-
${
|
|
1347
|
+
table-header table-cell ${et} font-semibold border-0 first:rounded-tl-lg last:rounded-tr-lg
|
|
1348
|
+
${$e(Z)}
|
|
1349
|
+
${Ne(t.align)}
|
|
1030
1350
|
`,
|
|
1031
|
-
style: { width: t.width, minWidth:
|
|
1032
|
-
"aria-sort":
|
|
1033
|
-
children:
|
|
1351
|
+
style: { width: t.width, minWidth: Et(t) },
|
|
1352
|
+
"aria-sort": s ? Ln(f) : void 0,
|
|
1353
|
+
children: s ? /* @__PURE__ */ i(
|
|
1034
1354
|
"button",
|
|
1035
1355
|
{
|
|
1036
|
-
...
|
|
1037
|
-
className: `flex w-full items-center ${
|
|
1038
|
-
children:
|
|
1356
|
+
...Mn(t.title, en(t, n)),
|
|
1357
|
+
className: `flex w-full items-center ${ce(t.align)} cursor-pointer hover:opacity-80 appearance-none bg-transparent border-0 p-0 font-semibold text-inherit ${Ne(t.align)}`,
|
|
1358
|
+
children: h
|
|
1039
1359
|
}
|
|
1040
|
-
) :
|
|
1360
|
+
) : h
|
|
1041
1361
|
},
|
|
1042
1362
|
t.key
|
|
1043
1363
|
);
|
|
1044
1364
|
};
|
|
1045
|
-
return d ? /* @__PURE__ */
|
|
1365
|
+
return d ? /* @__PURE__ */ i("div", { className: "w-full", style: { ...Rt, ...Ze }, children: /* @__PURE__ */ i(
|
|
1046
1366
|
"div",
|
|
1047
1367
|
{
|
|
1048
|
-
ref:
|
|
1368
|
+
ref: Jt,
|
|
1049
1369
|
className: "overflow-x-auto",
|
|
1050
1370
|
style: {
|
|
1051
|
-
...
|
|
1371
|
+
...F ? { maxHeight: Oe ? lt : F } : {}
|
|
1052
1372
|
},
|
|
1053
|
-
children: /* @__PURE__ */
|
|
1373
|
+
children: /* @__PURE__ */ y(
|
|
1054
1374
|
"table",
|
|
1055
1375
|
{
|
|
1056
|
-
"aria-label":
|
|
1057
|
-
"aria-labelledby":
|
|
1376
|
+
"aria-label": g,
|
|
1377
|
+
"aria-labelledby": k,
|
|
1058
1378
|
className: "w-full border-collapse rounded-lg overflow-hidden",
|
|
1059
1379
|
children: [
|
|
1060
|
-
|
|
1380
|
+
H && /* @__PURE__ */ i("thead", { children: /* @__PURE__ */ i("tr", { children: e.map((t) => /* @__PURE__ */ i(
|
|
1061
1381
|
"th",
|
|
1062
1382
|
{
|
|
1063
1383
|
className: `
|
|
1064
|
-
table-header table-cell ${
|
|
1065
|
-
${
|
|
1066
|
-
${
|
|
1067
|
-
${
|
|
1068
|
-
${
|
|
1069
|
-
${
|
|
1384
|
+
table-header table-cell ${et} font-semibold border-0 first:rounded-tl-lg last:rounded-tr-lg
|
|
1385
|
+
${I ? "table-cell-bordered table-cell-bordered-top" : ""}
|
|
1386
|
+
${I && t === e[0] ? "table-cell-bordered-left" : ""}
|
|
1387
|
+
${I && t === e[e.length - 1] ? "table-cell-bordered-right" : ""}
|
|
1388
|
+
${$e(Z)}
|
|
1389
|
+
${Ne(t.align)}
|
|
1070
1390
|
`,
|
|
1071
1391
|
style: { width: t.width },
|
|
1072
|
-
children: /* @__PURE__ */
|
|
1392
|
+
children: /* @__PURE__ */ y(
|
|
1073
1393
|
"div",
|
|
1074
1394
|
{
|
|
1075
|
-
className: `flex items-center gap-2 ${
|
|
1395
|
+
className: `flex items-center gap-2 ${ce(t.align)}`,
|
|
1076
1396
|
children: [
|
|
1077
|
-
/* @__PURE__ */
|
|
1078
|
-
t.info && /* @__PURE__ */
|
|
1397
|
+
/* @__PURE__ */ i("span", { children: t.title }),
|
|
1398
|
+
t.info && /* @__PURE__ */ i(qe, { info: t.info })
|
|
1079
1399
|
]
|
|
1080
1400
|
}
|
|
1081
1401
|
)
|
|
1082
1402
|
},
|
|
1083
1403
|
t.key
|
|
1084
1404
|
)) }) }),
|
|
1085
|
-
/* @__PURE__ */
|
|
1405
|
+
/* @__PURE__ */ i("tbody", { children: /* @__PURE__ */ i("tr", { children: /* @__PURE__ */ i(
|
|
1086
1406
|
"td",
|
|
1087
1407
|
{
|
|
1088
|
-
colSpan: e.length + (
|
|
1408
|
+
colSpan: e.length + (Ft ? 1 : 0),
|
|
1089
1409
|
className: "px-4 py-12 text-center",
|
|
1090
|
-
children: /* @__PURE__ */
|
|
1091
|
-
/* @__PURE__ */
|
|
1092
|
-
/* @__PURE__ */
|
|
1093
|
-
/* @__PURE__ */
|
|
1410
|
+
children: /* @__PURE__ */ y("div", { className: "flex flex-col items-center justify-center", children: [
|
|
1411
|
+
/* @__PURE__ */ i("div", { className: "table-error-icon w-12 h-12 rounded-full flex items-center justify-center mb-4", children: /* @__PURE__ */ i(hr, { size: 24 }) }),
|
|
1412
|
+
/* @__PURE__ */ i("div", { className: "table-error-title text-lg font-semibold mb-2", children: O }),
|
|
1413
|
+
/* @__PURE__ */ i("div", { className: "table-error-subtitle text-sm", children: $ })
|
|
1094
1414
|
] })
|
|
1095
1415
|
}
|
|
1096
1416
|
) }) })
|
|
@@ -1098,137 +1418,137 @@ const Pt = 160, Cn = (e, n) => e.length === n.length && e.every((o, h) => o ===
|
|
|
1098
1418
|
}
|
|
1099
1419
|
)
|
|
1100
1420
|
}
|
|
1101
|
-
) }) : /* @__PURE__ */
|
|
1421
|
+
) }) : /* @__PURE__ */ y(
|
|
1102
1422
|
"div",
|
|
1103
1423
|
{
|
|
1104
|
-
ref:
|
|
1105
|
-
className: `w-full ${
|
|
1106
|
-
style: { ...
|
|
1424
|
+
ref: rt,
|
|
1425
|
+
className: `w-full ${zt}`,
|
|
1426
|
+
style: { ...Rt, ...Ze },
|
|
1107
1427
|
children: [
|
|
1108
|
-
|
|
1109
|
-
/* @__PURE__ */
|
|
1428
|
+
Be("top"),
|
|
1429
|
+
/* @__PURE__ */ i(
|
|
1110
1430
|
"div",
|
|
1111
1431
|
{
|
|
1112
|
-
className: `overflow-hidden rounded-lg ${
|
|
1113
|
-
"data-bordered":
|
|
1114
|
-
children: /* @__PURE__ */
|
|
1432
|
+
className: `overflow-hidden rounded-lg ${I ? "table-bordered-container" : "table-container-border"}`,
|
|
1433
|
+
"data-bordered": I ? "true" : "false",
|
|
1434
|
+
children: /* @__PURE__ */ i(
|
|
1115
1435
|
"div",
|
|
1116
1436
|
{
|
|
1117
|
-
ref:
|
|
1437
|
+
ref: Jt,
|
|
1118
1438
|
className: "overflow-x-auto",
|
|
1119
1439
|
style: {
|
|
1120
|
-
...
|
|
1440
|
+
...F ? { maxHeight: Oe ? lt : F } : {}
|
|
1121
1441
|
},
|
|
1122
|
-
children: /* @__PURE__ */
|
|
1442
|
+
children: /* @__PURE__ */ y(
|
|
1123
1443
|
"table",
|
|
1124
1444
|
{
|
|
1125
|
-
"aria-label":
|
|
1126
|
-
"aria-labelledby":
|
|
1127
|
-
"aria-busy":
|
|
1128
|
-
className: `w-full ${
|
|
1445
|
+
"aria-label": g,
|
|
1446
|
+
"aria-labelledby": k,
|
|
1447
|
+
"aria-busy": l || void 0,
|
|
1448
|
+
className: `w-full ${$t ? "table-fixed" : "table-auto"} ${I ? "border-separate table-bordered" : "border-collapse"} rounded-lg overflow-hidden`,
|
|
1129
1449
|
style: {
|
|
1130
1450
|
borderSpacing: "0",
|
|
1131
|
-
minWidth:
|
|
1451
|
+
minWidth: nr
|
|
1132
1452
|
},
|
|
1133
1453
|
children: [
|
|
1134
|
-
|
|
1135
|
-
/* @__PURE__ */
|
|
1454
|
+
H && /* @__PURE__ */ i("thead", { children: /* @__PURE__ */ i("tr", { children: e.map((t, n) => rr(t, n)) }) }),
|
|
1455
|
+
/* @__PURE__ */ i("tbody", { children: l ? Array.from({ length: wt }).map((t, n) => /* @__PURE__ */ i(
|
|
1136
1456
|
"tr",
|
|
1137
1457
|
{
|
|
1138
|
-
className: `table-row ${
|
|
1139
|
-
children: e.map((
|
|
1458
|
+
className: `table-row ${I ? "table-row-bordered" : ""}`,
|
|
1459
|
+
children: e.map((s) => /* @__PURE__ */ i(
|
|
1140
1460
|
"td",
|
|
1141
1461
|
{
|
|
1142
|
-
className: `table-cell ${
|
|
1462
|
+
className: `table-cell ${me} text-left ${$e(Z)}`,
|
|
1143
1463
|
style: {
|
|
1144
|
-
width:
|
|
1145
|
-
minWidth:
|
|
1146
|
-
height:
|
|
1464
|
+
width: s.width,
|
|
1465
|
+
minWidth: Et(s),
|
|
1466
|
+
height: jt
|
|
1147
1467
|
},
|
|
1148
|
-
children: /* @__PURE__ */
|
|
1468
|
+
children: /* @__PURE__ */ i("div", { className: "table-skeleton-bar h-4 rounded animate-pulse" })
|
|
1149
1469
|
},
|
|
1150
|
-
|
|
1470
|
+
s.key
|
|
1151
1471
|
))
|
|
1152
1472
|
},
|
|
1153
|
-
|
|
1154
|
-
)) :
|
|
1473
|
+
n
|
|
1474
|
+
)) : G.length === 0 ? /* @__PURE__ */ i("tr", { children: /* @__PURE__ */ i(
|
|
1155
1475
|
"td",
|
|
1156
1476
|
{
|
|
1157
|
-
colSpan: e.length + (
|
|
1477
|
+
colSpan: e.length + (Ft ? 1 : 0),
|
|
1158
1478
|
className: "px-4 py-12 text-center",
|
|
1159
|
-
children: /* @__PURE__ */
|
|
1160
|
-
/* @__PURE__ */
|
|
1161
|
-
|
|
1479
|
+
children: /* @__PURE__ */ y("div", { className: "flex flex-col items-center justify-center", children: [
|
|
1480
|
+
/* @__PURE__ */ i("div", { className: "text-[var(--malachite-text-secondary)] text-[14px] font-medium", children: D }),
|
|
1481
|
+
R && /* @__PURE__ */ i("div", { className: "text-[var(--malachite-text-secondary)] text-[13px] mt-1", children: R })
|
|
1162
1482
|
] })
|
|
1163
1483
|
}
|
|
1164
|
-
) }) :
|
|
1165
|
-
const
|
|
1166
|
-
var
|
|
1167
|
-
|
|
1484
|
+
) }) : G.map((t, n) => {
|
|
1485
|
+
const s = xe(t, n), a = (q == null ? void 0 : q(t, n)) || {}, f = Y == null ? void 0 : Y(t, n), h = n === 0, u = n === r.length - 1, m = n === J, A = f ? `var(--malachite-table-row-variant-${f}-background)` : void 0, N = Q || a.onClick ? () => {
|
|
1486
|
+
var o;
|
|
1487
|
+
Q == null || Q(t, n), (o = a.onClick) == null || o.call(a, t, n);
|
|
1168
1488
|
} : void 0;
|
|
1169
1489
|
return (
|
|
1170
1490
|
// Keeps `row` semantics: `role="button"` would strip the table
|
|
1171
1491
|
// structure from screen readers.
|
|
1172
|
-
/* @__PURE__ */
|
|
1492
|
+
/* @__PURE__ */ i(
|
|
1173
1493
|
"tr",
|
|
1174
1494
|
{
|
|
1175
|
-
"data-table-id":
|
|
1176
|
-
"data-row-index":
|
|
1177
|
-
"aria-current":
|
|
1178
|
-
"aria-labelledby":
|
|
1179
|
-
tabIndex:
|
|
1180
|
-
onKeyDown:
|
|
1495
|
+
"data-table-id": K,
|
|
1496
|
+
"data-row-index": n,
|
|
1497
|
+
"aria-current": m ? "true" : void 0,
|
|
1498
|
+
"aria-labelledby": N ? ye(n) : void 0,
|
|
1499
|
+
tabIndex: N ? n === ae ? 0 : -1 : void 0,
|
|
1500
|
+
onKeyDown: N ? ln(n, N) : void 0,
|
|
1181
1501
|
className: `
|
|
1182
|
-
${
|
|
1183
|
-
${(
|
|
1184
|
-
${
|
|
1502
|
+
${I ? "table-row-bordered" : `table-row ${m ? "" : "hover:opacity-80"}`}
|
|
1503
|
+
${(U == null ? void 0 : U(t, n)) || ""}
|
|
1504
|
+
${N ? `cursor-pointer ${un}` : ""}
|
|
1185
1505
|
`,
|
|
1186
|
-
onClick:
|
|
1187
|
-
|
|
1506
|
+
onClick: N ? (o) => {
|
|
1507
|
+
vn(o) || N();
|
|
1188
1508
|
} : void 0,
|
|
1189
1509
|
onDoubleClick: a.onDoubleClick ? () => {
|
|
1190
|
-
var
|
|
1191
|
-
return (
|
|
1510
|
+
var o;
|
|
1511
|
+
return (o = a.onDoubleClick) == null ? void 0 : o.call(a, t, n);
|
|
1192
1512
|
} : void 0,
|
|
1193
1513
|
onContextMenu: a.onContextMenu ? () => {
|
|
1194
|
-
var
|
|
1195
|
-
return (
|
|
1514
|
+
var o;
|
|
1515
|
+
return (o = a.onContextMenu) == null ? void 0 : o.call(a, t, n);
|
|
1196
1516
|
} : void 0,
|
|
1197
1517
|
onMouseEnter: a.onMouseEnter ? () => {
|
|
1198
|
-
var
|
|
1199
|
-
return (
|
|
1518
|
+
var o;
|
|
1519
|
+
return (o = a.onMouseEnter) == null ? void 0 : o.call(a, t, n);
|
|
1200
1520
|
} : void 0,
|
|
1201
1521
|
onMouseLeave: a.onMouseLeave ? () => {
|
|
1202
|
-
var
|
|
1203
|
-
return (
|
|
1522
|
+
var o;
|
|
1523
|
+
return (o = a.onMouseLeave) == null ? void 0 : o.call(a, t, n);
|
|
1204
1524
|
} : void 0,
|
|
1205
|
-
children: e.map((
|
|
1206
|
-
const
|
|
1207
|
-
return /* @__PURE__ */
|
|
1208
|
-
|
|
1525
|
+
children: e.map((o) => {
|
|
1526
|
+
const c = o === e[0], p = o === e[e.length - 1];
|
|
1527
|
+
return /* @__PURE__ */ i(
|
|
1528
|
+
ci,
|
|
1209
1529
|
{
|
|
1210
|
-
column:
|
|
1530
|
+
column: o,
|
|
1211
1531
|
record: t,
|
|
1212
|
-
index:
|
|
1213
|
-
size:
|
|
1214
|
-
paddingClass:
|
|
1215
|
-
height:
|
|
1216
|
-
bordered:
|
|
1217
|
-
isFirstRow:
|
|
1218
|
-
isLastRow:
|
|
1219
|
-
isFirstColumn:
|
|
1220
|
-
isLastColumn:
|
|
1221
|
-
variantBackground:
|
|
1222
|
-
isSelected:
|
|
1223
|
-
showSelectedAccent:
|
|
1224
|
-
minWidth:
|
|
1225
|
-
id:
|
|
1532
|
+
index: n,
|
|
1533
|
+
size: Z,
|
|
1534
|
+
paddingClass: me,
|
|
1535
|
+
height: jt,
|
|
1536
|
+
bordered: I,
|
|
1537
|
+
isFirstRow: h,
|
|
1538
|
+
isLastRow: u,
|
|
1539
|
+
isFirstColumn: c,
|
|
1540
|
+
isLastColumn: p,
|
|
1541
|
+
variantBackground: A,
|
|
1542
|
+
isSelected: m,
|
|
1543
|
+
showSelectedAccent: m && c,
|
|
1544
|
+
minWidth: Et(o),
|
|
1545
|
+
id: N && o.key === Ce ? ye(n) : void 0
|
|
1226
1546
|
},
|
|
1227
|
-
|
|
1547
|
+
o.key
|
|
1228
1548
|
);
|
|
1229
1549
|
})
|
|
1230
1550
|
},
|
|
1231
|
-
|
|
1551
|
+
s
|
|
1232
1552
|
)
|
|
1233
1553
|
);
|
|
1234
1554
|
}) })
|
|
@@ -1239,12 +1559,12 @@ const Pt = 160, Cn = (e, n) => e.length === n.length && e.every((o, h) => o ===
|
|
|
1239
1559
|
)
|
|
1240
1560
|
}
|
|
1241
1561
|
),
|
|
1242
|
-
|
|
1562
|
+
Be("bottom")
|
|
1243
1563
|
]
|
|
1244
1564
|
}
|
|
1245
1565
|
);
|
|
1246
1566
|
};
|
|
1247
1567
|
export {
|
|
1248
|
-
|
|
1568
|
+
Hi as default
|
|
1249
1569
|
};
|
|
1250
1570
|
//# sourceMappingURL=Table.js.map
|