react-flexi-datatable 1.0.3 → 1.0.5
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/README.md +153 -6
- package/dist/index.cjs +3 -3
- package/dist/index.js +527 -481
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -6,106 +6,137 @@ var pe = "border border-slate-200 rounded-lg bg-white", me = {
|
|
|
6
6
|
Active: "bg-emerald-50 text-emerald-700",
|
|
7
7
|
Inactive: "bg-slate-100 text-slate-600",
|
|
8
8
|
Pending: "bg-amber-50 text-amber-700"
|
|
9
|
+
}, p = {
|
|
10
|
+
default: {
|
|
11
|
+
header: "bg-slate-50 text-slate-600",
|
|
12
|
+
footer: "bg-white text-slate-500",
|
|
13
|
+
toolbar: "bg-white text-slate-900"
|
|
14
|
+
},
|
|
15
|
+
dark: {
|
|
16
|
+
header: "bg-slate-900 text-slate-100",
|
|
17
|
+
footer: "bg-slate-900 text-slate-300",
|
|
18
|
+
toolbar: "bg-slate-900 text-slate-100"
|
|
19
|
+
},
|
|
20
|
+
indigo: {
|
|
21
|
+
header: "bg-indigo-900 text-indigo-100",
|
|
22
|
+
footer: "bg-indigo-50 text-indigo-800",
|
|
23
|
+
toolbar: "bg-indigo-50/50 text-indigo-900"
|
|
24
|
+
},
|
|
25
|
+
emerald: {
|
|
26
|
+
header: "bg-emerald-900 text-emerald-100",
|
|
27
|
+
footer: "bg-emerald-50 text-emerald-800",
|
|
28
|
+
toolbar: "bg-emerald-50/50 text-emerald-900"
|
|
29
|
+
},
|
|
30
|
+
slate: {
|
|
31
|
+
header: "bg-slate-800 text-slate-100",
|
|
32
|
+
footer: "bg-slate-100 text-slate-700",
|
|
33
|
+
toolbar: "bg-slate-100 text-slate-800"
|
|
34
|
+
},
|
|
35
|
+
blue: {
|
|
36
|
+
header: "bg-blue-900 text-blue-100",
|
|
37
|
+
footer: "bg-blue-50 text-blue-800",
|
|
38
|
+
toolbar: "bg-blue-50/50 text-blue-900"
|
|
39
|
+
}
|
|
9
40
|
};
|
|
10
|
-
function
|
|
11
|
-
let
|
|
41
|
+
function m({ config: m, data: h = [], onView: g, onEdit: he, onDelete: ge, onBulkEdit: _e }) {
|
|
42
|
+
let _ = `table_cols_${m.id || m.title || "default"}`, [ve, ye] = r(h), [v, be] = r(""), [y, xe] = r({}), [b, Se] = r({
|
|
12
43
|
key: null,
|
|
13
44
|
dir: null
|
|
14
|
-
}), [
|
|
45
|
+
}), [Ce, x] = r(1), [S, we] = r(m.pageSize || 10), [C, Te] = r(() => {
|
|
15
46
|
try {
|
|
16
|
-
let e = localStorage.getItem(`${
|
|
47
|
+
let e = localStorage.getItem(`${_}_visible`);
|
|
17
48
|
if (e) return JSON.parse(e);
|
|
18
49
|
} catch {}
|
|
19
|
-
return Object.fromEntries(
|
|
20
|
-
}), [
|
|
50
|
+
return Object.fromEntries(m.columns.map((e) => [e.key, e.visible !== !1]));
|
|
51
|
+
}), [w, Ee] = r(() => {
|
|
21
52
|
try {
|
|
22
|
-
let e = localStorage.getItem(`${
|
|
53
|
+
let e = localStorage.getItem(`${_}_order`);
|
|
23
54
|
if (e) return JSON.parse(e);
|
|
24
55
|
} catch {}
|
|
25
|
-
return
|
|
26
|
-
}), [
|
|
56
|
+
return m.columns.map((e) => e.key);
|
|
57
|
+
}), [T, De] = r(() => {
|
|
27
58
|
try {
|
|
28
|
-
let e = localStorage.getItem(`${
|
|
59
|
+
let e = localStorage.getItem(`${_}_widths`);
|
|
29
60
|
if (e) return JSON.parse(e);
|
|
30
61
|
} catch {}
|
|
31
|
-
return Object.fromEntries(
|
|
32
|
-
}), [
|
|
62
|
+
return Object.fromEntries(m.columns.map((e) => [e.key, e.width || 160]));
|
|
63
|
+
}), [Oe, ke] = r(null), [E, D] = r(null), [Ae, O] = r(null), [k, A] = r([]), [j, M] = r(null), [je, Me] = r(!1), [Ne, Pe] = r(!1), [N, P] = r({
|
|
33
64
|
row: 0,
|
|
34
65
|
col: 0
|
|
35
|
-
}), [
|
|
66
|
+
}), [Fe, Ie] = r(null), [F, I] = r({}), [L, Le] = r(!1), [Re, R] = r([]), [z, B] = r({}), [V, H] = r(1), ze = n(null), Be = n(null), Ve = n(null), U = n(null);
|
|
36
67
|
e(() => {
|
|
37
|
-
|
|
38
|
-
}, [
|
|
68
|
+
m.searchable && U.current && U.current.focus();
|
|
69
|
+
}, [m.searchable]), e(() => {
|
|
39
70
|
let e = (e) => {
|
|
40
|
-
|
|
71
|
+
Be.current && !Be.current.contains(e.target) && Pe(!1), Ve.current && !Ve.current.contains(e.target) && Me(!1);
|
|
41
72
|
};
|
|
42
73
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
43
|
-
}, []), e(() =>
|
|
74
|
+
}, []), e(() => ye(h), [h]), e(() => x(1), [
|
|
44
75
|
v,
|
|
45
76
|
y,
|
|
46
|
-
|
|
77
|
+
S
|
|
47
78
|
]), e(() => {
|
|
48
79
|
try {
|
|
49
|
-
localStorage.setItem(`${
|
|
80
|
+
localStorage.setItem(`${_}_order`, JSON.stringify(w));
|
|
50
81
|
} catch {}
|
|
51
|
-
}, [
|
|
82
|
+
}, [w, _]), e(() => {
|
|
52
83
|
try {
|
|
53
|
-
localStorage.setItem(`${
|
|
84
|
+
localStorage.setItem(`${_}_visible`, JSON.stringify(C));
|
|
54
85
|
} catch {}
|
|
55
|
-
}, [
|
|
86
|
+
}, [C, _]), e(() => {
|
|
56
87
|
try {
|
|
57
|
-
localStorage.setItem(`${
|
|
88
|
+
localStorage.setItem(`${_}_widths`, JSON.stringify(T));
|
|
58
89
|
} catch {}
|
|
59
|
-
}, [
|
|
60
|
-
let
|
|
61
|
-
let e =
|
|
62
|
-
|
|
90
|
+
}, [T, _]);
|
|
91
|
+
let He = () => {
|
|
92
|
+
let e = m.columns.map((e) => e.key), t = Object.fromEntries(m.columns.map((e) => [e.key, e.visible !== !1])), n = Object.fromEntries(m.columns.map((e) => [e.key, e.width || 160]));
|
|
93
|
+
Ee(e), Te(t), De(n);
|
|
63
94
|
try {
|
|
64
|
-
localStorage.removeItem(`${
|
|
95
|
+
localStorage.removeItem(`${_}_order`), localStorage.removeItem(`${_}_visible`), localStorage.removeItem(`${_}_widths`);
|
|
65
96
|
} catch {}
|
|
66
|
-
},
|
|
97
|
+
}, Ue = (e, t) => {
|
|
67
98
|
e.preventDefault(), e.stopPropagation();
|
|
68
|
-
let n = e.clientX, r =
|
|
99
|
+
let n = e.clientX, r = T[t] || 160, i = (e) => {
|
|
69
100
|
let i = e.clientX - n, a = Math.max(70, r + i);
|
|
70
|
-
|
|
101
|
+
De((e) => ({
|
|
71
102
|
...e,
|
|
72
103
|
[t]: a
|
|
73
104
|
}));
|
|
74
105
|
}, a = () => {
|
|
75
|
-
document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", a),
|
|
106
|
+
document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", a), ke(null);
|
|
76
107
|
};
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
let e = Object.fromEntries(
|
|
80
|
-
return
|
|
108
|
+
ke(t), document.addEventListener("mousemove", i), document.addEventListener("mouseup", a);
|
|
109
|
+
}, W = t(() => {
|
|
110
|
+
let e = Object.fromEntries(m.columns.map((e) => [e.key, e]));
|
|
111
|
+
return w.map((t) => e[t]).filter((e) => e && C[e.key]);
|
|
81
112
|
}, [
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
]),
|
|
113
|
+
m.columns,
|
|
114
|
+
w,
|
|
115
|
+
C
|
|
116
|
+
]), We = t(() => m.columns.filter((e) => e.editable !== !1), [m.columns]), Ge = (e) => {
|
|
86
117
|
if (e.options) return e.options;
|
|
87
|
-
let t =
|
|
118
|
+
let t = m.filters?.find((t) => t.key === e.key);
|
|
88
119
|
return t?.options ? t.options.filter((e) => e.value !== "all").map((e) => e.value) : null;
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
e.preventDefault(),
|
|
93
|
-
},
|
|
120
|
+
}, G = m.columnordering !== !1 && m.columnOrdering !== !1, Ke = G && m.dropcolumn !== !1 && m.dropColumn !== !1, qe = m.columnwidth !== !1 && m.columnWidth !== !1 && m.resizable !== !1 && m.columnResizing !== !1, K = m.selectable !== !1 && m.checkbox !== !1 && m.checkboxes !== !1 && m.selection !== !1 && (m.selectable || m.checkbox || m.checkboxes || m.selection || !1), Je = m.pagination !== !1, Ye = Je && !!(m.topPagination || m.toppagination || m.paginationTop), Xe = Je && m.bottomPagination !== !1, q = m.theme, Ze = typeof q == "string" && p[q], Qe = m.headerTheme || (typeof q == "object" ? q.header : null) || (Ze ? p[q].header : "bg-slate-50 text-slate-600"), $e = m.footerTheme || (typeof q == "object" ? q.footer : null) || (Ze ? p[q].footer : "bg-white text-slate-500"), et = m.toolbarTheme || (typeof q == "object" ? q.toolbar : null) || (Ze ? p[q].toolbar : "bg-white"), J = m.tableWidth ?? m.tablewidth ?? m.width, Y = m.tableHeight ?? m.tableheight ?? m.height, tt = J && J !== "auto" && J !== !0 ? typeof J == "number" ? `${J}px` : J : "100%", nt = !!(m.tabledatavertivallscroll || m.tableDataVerticalScroll || m.verticalScroll), rt = Y && Y !== "auto" && Y !== !0 ? typeof Y == "number" ? `${Y}px` : Y : nt ? "320px" : null, it = m.tabledatavertivallscroll !== !1 && m.tableDataVerticalScroll !== !1 && m.verticalScroll !== !1 && !!(nt || rt), at = m.tabledatahorizontalscroll !== !1 && m.tableDataHorizontalScroll !== !1 && m.horizontalScroll !== !1, ot = (e, t) => {
|
|
121
|
+
G && (D(t), e.dataTransfer.setData("text/plain", t), e.dataTransfer.effectAllowed = "move");
|
|
122
|
+
}, st = (e, t) => {
|
|
123
|
+
e.preventDefault(), Ke && (e.dataTransfer.dropEffect = "move", Ae !== t && O(t));
|
|
124
|
+
}, ct = (e, t) => {
|
|
94
125
|
e.preventDefault(), e.stopPropagation();
|
|
95
|
-
let n = e.dataTransfer.getData("text/plain") ||
|
|
96
|
-
n && n !== t &&
|
|
126
|
+
let n = e.dataTransfer.getData("text/plain") || E;
|
|
127
|
+
n && n !== t && Ee((e) => {
|
|
97
128
|
let r = [...e], i = r.indexOf(n), a = r.indexOf(t);
|
|
98
129
|
return i !== -1 && a !== -1 && (r.splice(i, 1), r.splice(a, 0, n)), r;
|
|
99
|
-
}),
|
|
100
|
-
},
|
|
101
|
-
e && (
|
|
130
|
+
}), D(null), O(null);
|
|
131
|
+
}, lt = (e) => {
|
|
132
|
+
e && (Te((t) => Object.values(t).filter(Boolean).length <= 1 ? t : {
|
|
102
133
|
...t,
|
|
103
134
|
[e]: !1
|
|
104
|
-
}),
|
|
135
|
+
}), D(null), O(null));
|
|
105
136
|
}, X = t(() => {
|
|
106
137
|
let e = [...ve];
|
|
107
138
|
if (v.trim()) {
|
|
108
|
-
let t = v.toLowerCase(), n =
|
|
139
|
+
let t = v.toLowerCase(), n = m.columns.filter((e) => e.searchable !== !1).map((e) => e.key);
|
|
109
140
|
e = e.filter((e) => n.some((n) => String(e[n] ?? "").toLowerCase().includes(t)));
|
|
110
141
|
}
|
|
111
142
|
return Object.entries(y).forEach(([t, n]) => {
|
|
@@ -119,43 +150,48 @@ function p({ config: p, data: m = [], onView: h, onEdit: he, onDelete: ge, onBul
|
|
|
119
150
|
v,
|
|
120
151
|
y,
|
|
121
152
|
b,
|
|
122
|
-
|
|
123
|
-
]), Z = Math.max(1, Math.ceil(X.length /
|
|
124
|
-
if (b.key !== e) return
|
|
153
|
+
m.columns
|
|
154
|
+
]), Z = Math.max(1, Math.ceil(X.length / S)), Q = Math.min(Ce, Z), $ = X.slice((Q - 1) * S, Q * S), ut = t(() => k.length > 0 ? k : $.map((e) => e.id), [k, $]), dt = (e) => {
|
|
155
|
+
if (b.key !== e) return Se({
|
|
125
156
|
key: e,
|
|
126
157
|
dir: "asc"
|
|
127
158
|
});
|
|
128
|
-
if (b.dir === "asc") return
|
|
159
|
+
if (b.dir === "asc") return Se({
|
|
129
160
|
key: e,
|
|
130
161
|
dir: "desc"
|
|
131
162
|
});
|
|
132
|
-
|
|
163
|
+
Se({
|
|
133
164
|
key: null,
|
|
134
165
|
dir: null
|
|
135
166
|
});
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
-
},
|
|
139
|
-
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
-
},
|
|
143
|
-
let e = {}, t =
|
|
167
|
+
}, ft = (e) => A(e ? $.map((e) => e.id) : []), pt = (e) => A((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]), mt = (e) => {
|
|
168
|
+
Ie(e.id), I({ ...e });
|
|
169
|
+
}, ht = () => {
|
|
170
|
+
Ie(null), I({});
|
|
171
|
+
}, gt = () => {
|
|
172
|
+
ye((e) => e.map((e) => e.id === Fe ? F : e)), he?.(F), Ie(null), I({});
|
|
173
|
+
}, _t = () => {
|
|
174
|
+
let e = {}, t = k.length > 0 ? k : $.map((e) => e.id);
|
|
144
175
|
ve.forEach((n) => {
|
|
145
176
|
t.includes(n.id) && (e[n.id] = { ...n });
|
|
146
|
-
}),
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
},
|
|
150
|
-
let e =
|
|
151
|
-
|
|
177
|
+
}), B(e), R(We.map((e) => e.key)), Le(!0);
|
|
178
|
+
}, vt = () => {
|
|
179
|
+
Le(!1), B({}), R([]);
|
|
180
|
+
}, yt = () => {
|
|
181
|
+
let e = k.length > 0 ? k : $.map((e) => e.id);
|
|
182
|
+
ye((t) => t.map((t) => e.includes(t.id) && z[t.id] || t)), _e?.(e, z), Le(!1), B({}), R([]);
|
|
183
|
+
}, bt = () => {
|
|
184
|
+
ye((e) => e.filter((e) => e.id !== j.id)), A((e) => e.filter((e) => e !== j.id)), M(null), ge?.(j);
|
|
185
|
+
}, xt = () => {
|
|
186
|
+
let e = W.map((e) => e.label).join(","), t = X.map((e) => W.map((t) => `"${String(e[t.key] ?? "").replaceAll("\"", "\"\"")}"`).join(",")).join("\n"), n = new Blob([e + "\n" + t], { type: "text/csv" }), r = document.createElement("a");
|
|
187
|
+
r.href = URL.createObjectURL(n), r.download = "table-export.csv", r.click(), URL.revokeObjectURL(r.href);
|
|
152
188
|
};
|
|
153
|
-
|
|
189
|
+
e(() => {
|
|
154
190
|
let e = (e) => {
|
|
155
|
-
if (!
|
|
191
|
+
if (!m.keyboardNavigation || !$.length) return;
|
|
156
192
|
let t = document.activeElement;
|
|
157
193
|
if (t && (["TEXTAREA"].includes(t.tagName) || t.tagName === "INPUT" && t.type !== "checkbox" || t.tagName === "SELECT")) return;
|
|
158
|
-
let n = !!(
|
|
194
|
+
let n = !!(m.actions?.view || m.actions?.edit || m.actions?.delete), r = W.length + +!!K, i = W.length + +!!K + +!!n, a = t?.closest("[data-cell]"), o = N.row, s = N.col;
|
|
159
195
|
if (a) {
|
|
160
196
|
let e = a.getAttribute("data-cell");
|
|
161
197
|
if (e) {
|
|
@@ -166,95 +202,164 @@ function p({ config: p, data: m = [], onView: h, onEdit: he, onDelete: ge, onBul
|
|
|
166
202
|
if (e.key === "ArrowDown") {
|
|
167
203
|
e.preventDefault();
|
|
168
204
|
let t = Math.min($.length - 1, o + 1);
|
|
169
|
-
|
|
205
|
+
P({
|
|
170
206
|
row: t,
|
|
171
207
|
col: s
|
|
172
208
|
});
|
|
173
209
|
} else if (e.key === "ArrowUp") {
|
|
174
210
|
e.preventDefault();
|
|
175
211
|
let t = Math.max(-1, o - 1);
|
|
176
|
-
|
|
212
|
+
P({
|
|
177
213
|
row: t,
|
|
178
214
|
col: s
|
|
179
215
|
});
|
|
180
216
|
} else if (e.key === "ArrowRight") {
|
|
181
217
|
if (e.preventDefault(), n && s === r) {
|
|
182
|
-
let e =
|
|
183
|
-
if (
|
|
184
|
-
|
|
218
|
+
let e = ze.current?.querySelector(`[data-cell="${o}-${s}"]`), t = e ? Array.from(e.querySelectorAll("button")) : [];
|
|
219
|
+
if (V < t.length - 1) {
|
|
220
|
+
H((e) => e + 1);
|
|
185
221
|
return;
|
|
186
222
|
}
|
|
187
223
|
}
|
|
188
224
|
let t = Math.min(i - 1, s + 1);
|
|
189
|
-
|
|
225
|
+
P({
|
|
190
226
|
row: o,
|
|
191
227
|
col: t
|
|
192
228
|
});
|
|
193
229
|
} else if (e.key === "ArrowLeft") {
|
|
194
|
-
if (e.preventDefault(), n && s === r &&
|
|
195
|
-
|
|
230
|
+
if (e.preventDefault(), n && s === r && V > 0) {
|
|
231
|
+
H((e) => e - 1);
|
|
196
232
|
return;
|
|
197
233
|
}
|
|
198
234
|
let t = Math.max(0, s - 1);
|
|
199
|
-
|
|
235
|
+
P({
|
|
200
236
|
row: o,
|
|
201
237
|
col: t
|
|
202
238
|
});
|
|
203
239
|
} else if (e.key === "Enter" || e.key === " ") {
|
|
204
240
|
if (o === -1) {
|
|
205
|
-
if (
|
|
241
|
+
if (K && s === 0) e.preventDefault(), ft($.length > 0 && !$.every((e) => k.includes(e.id)));
|
|
206
242
|
else {
|
|
207
|
-
let t =
|
|
208
|
-
n && n.sortable && (e.preventDefault(),
|
|
243
|
+
let t = K ? s - 1 : s, n = W[t];
|
|
244
|
+
n && n.sortable && (e.preventDefault(), dt(n.key));
|
|
209
245
|
}
|
|
210
246
|
} else {
|
|
211
247
|
let i = $[o];
|
|
212
|
-
t && (t.type === "checkbox" || t.tagName === "BUTTON") ? (e.key === "Enter" || e.key === " ") && (e.preventDefault(), t.click()) : i && (
|
|
248
|
+
t && (t.type === "checkbox" || t.tagName === "BUTTON") ? (e.key === "Enter" || e.key === " ") && (e.preventDefault(), t.click()) : i && (K && s === 0 ? (e.preventDefault(), pt(i.id)) : n && s === r ? (e.preventDefault(), mt(i)) : e.key === "Enter" && (e.preventDefault(), g?.(i)));
|
|
213
249
|
}
|
|
214
250
|
}
|
|
215
251
|
};
|
|
216
252
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
217
253
|
}, [
|
|
218
|
-
|
|
254
|
+
m.keyboardNavigation,
|
|
219
255
|
$,
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
256
|
+
W,
|
|
257
|
+
N,
|
|
258
|
+
V,
|
|
259
|
+
pt,
|
|
260
|
+
ft,
|
|
261
|
+
dt,
|
|
262
|
+
g,
|
|
263
|
+
K,
|
|
264
|
+
k
|
|
229
265
|
]), e(() => {
|
|
230
|
-
if (!
|
|
231
|
-
let e =
|
|
266
|
+
if (!m.keyboardNavigation || !ze.current || document.activeElement === U.current) return;
|
|
267
|
+
let e = ze.current.querySelector(`[data-cell="${N.row}-${N.col}"]`);
|
|
232
268
|
if (e) {
|
|
233
269
|
let t = Array.from(e.querySelectorAll("input, button, select"));
|
|
234
|
-
t.length > 0 ? (t[Math.min(
|
|
270
|
+
t.length > 0 ? (t[Math.min(V, t.length - 1)] || t[0]).focus() : e.focus();
|
|
235
271
|
}
|
|
236
272
|
}, [
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
273
|
+
N,
|
|
274
|
+
V,
|
|
275
|
+
m.keyboardNavigation,
|
|
240
276
|
$
|
|
241
|
-
])
|
|
277
|
+
]);
|
|
278
|
+
let St = (e = "bottom") => !Je || e === "top" && !Ye || e === "bottom" && !Xe ? null : /* @__PURE__ */ f("div", {
|
|
279
|
+
className: `flex flex-col gap-3 ${e === "top" ? "border-b" : "border-t"} border-slate-200 px-4 py-3 sm:flex-row sm:items-center sm:justify-between ${$e}`,
|
|
280
|
+
children: [/* @__PURE__ */ f("div", {
|
|
281
|
+
className: "text-sm opacity-85",
|
|
282
|
+
children: [
|
|
283
|
+
"Showing ",
|
|
284
|
+
X.length ? (Q - 1) * S + 1 : 0,
|
|
285
|
+
"–",
|
|
286
|
+
Math.min(Q * S, X.length),
|
|
287
|
+
" of ",
|
|
288
|
+
X.length
|
|
289
|
+
]
|
|
290
|
+
}), /* @__PURE__ */ f("div", {
|
|
291
|
+
className: "flex items-center gap-2",
|
|
292
|
+
children: [
|
|
293
|
+
m.pageSizeOptions && m.pageSizeOptions.length > 0 && /* @__PURE__ */ d("select", {
|
|
294
|
+
value: S,
|
|
295
|
+
onChange: (e) => we(Number(e.target.value)),
|
|
296
|
+
className: "rounded-lg border border-slate-200/80 bg-white/95 text-slate-800 px-2 py-1.5 text-sm outline-none focus:border-indigo-500",
|
|
297
|
+
children: m.pageSizeOptions.map((e) => /* @__PURE__ */ f("option", {
|
|
298
|
+
value: e,
|
|
299
|
+
children: [e, "/page"]
|
|
300
|
+
}, e))
|
|
301
|
+
}),
|
|
302
|
+
/* @__PURE__ */ d("button", {
|
|
303
|
+
disabled: Q === 1,
|
|
304
|
+
onClick: () => x(1),
|
|
305
|
+
className: "rounded-md border border-slate-200/80 bg-white/90 p-1.5 text-slate-700 hover:bg-slate-100 disabled:opacity-40 disabled:hover:bg-transparent",
|
|
306
|
+
title: "First page",
|
|
307
|
+
children: /* @__PURE__ */ d(ee, { size: 16 })
|
|
308
|
+
}),
|
|
309
|
+
/* @__PURE__ */ d("button", {
|
|
310
|
+
disabled: Q === 1,
|
|
311
|
+
onClick: () => x((e) => Math.max(1, e - 1)),
|
|
312
|
+
className: "rounded-md border border-slate-200/80 bg-white/90 p-1.5 text-slate-700 hover:bg-slate-100 disabled:opacity-40 disabled:hover:bg-transparent",
|
|
313
|
+
title: "Previous page",
|
|
314
|
+
children: /* @__PURE__ */ d(o, { size: 16 })
|
|
315
|
+
}),
|
|
316
|
+
/* @__PURE__ */ f("span", {
|
|
317
|
+
className: "px-2 text-sm opacity-90",
|
|
318
|
+
children: [
|
|
319
|
+
"Page ",
|
|
320
|
+
Q,
|
|
321
|
+
" of ",
|
|
322
|
+
Z
|
|
323
|
+
]
|
|
324
|
+
}),
|
|
325
|
+
/* @__PURE__ */ d("button", {
|
|
326
|
+
disabled: Q === Z,
|
|
327
|
+
onClick: () => x((e) => Math.min(Z, e + 1)),
|
|
328
|
+
className: "rounded-md border border-slate-200/80 bg-white/90 p-1.5 text-slate-700 hover:bg-slate-100 disabled:opacity-40 disabled:hover:bg-transparent",
|
|
329
|
+
title: "Next page",
|
|
330
|
+
children: /* @__PURE__ */ d(s, { size: 16 })
|
|
331
|
+
}),
|
|
332
|
+
/* @__PURE__ */ d("button", {
|
|
333
|
+
disabled: Q === Z,
|
|
334
|
+
onClick: () => x(Z),
|
|
335
|
+
className: "rounded-md border border-slate-200/80 bg-white/90 p-1.5 text-slate-700 hover:bg-slate-100 disabled:opacity-40 disabled:hover:bg-transparent",
|
|
336
|
+
title: "Last page",
|
|
337
|
+
children: /* @__PURE__ */ d(l, { size: 16 })
|
|
338
|
+
})
|
|
339
|
+
]
|
|
340
|
+
})]
|
|
341
|
+
}, e);
|
|
342
|
+
return /* @__PURE__ */ f("div", {
|
|
242
343
|
className: "space-y-3",
|
|
344
|
+
style: {
|
|
345
|
+
width: tt,
|
|
346
|
+
maxWidth: "100%"
|
|
347
|
+
},
|
|
243
348
|
children: [
|
|
244
349
|
/* @__PURE__ */ d("div", {
|
|
245
|
-
className: `${pe} p-4`,
|
|
350
|
+
className: `${pe} p-4 ${et}`,
|
|
246
351
|
children: /* @__PURE__ */ f("div", {
|
|
247
352
|
className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
|
|
248
353
|
children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h2", {
|
|
249
354
|
className: "text-lg font-semibold",
|
|
250
|
-
children:
|
|
355
|
+
children: m.title
|
|
251
356
|
}), /* @__PURE__ */ f("p", {
|
|
252
357
|
className: "text-sm text-slate-500",
|
|
253
358
|
children: [X.length, " records"]
|
|
254
359
|
})] }), /* @__PURE__ */ f("div", {
|
|
255
360
|
className: "flex flex-wrap gap-2",
|
|
256
361
|
children: [
|
|
257
|
-
|
|
362
|
+
!!m.searchable && /* @__PURE__ */ f("div", {
|
|
258
363
|
className: "relative",
|
|
259
364
|
children: [
|
|
260
365
|
/* @__PURE__ */ d(le, {
|
|
@@ -262,39 +367,39 @@ function p({ config: p, data: m = [], onView: h, onEdit: he, onDelete: ge, onBul
|
|
|
262
367
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-slate-400"
|
|
263
368
|
}),
|
|
264
369
|
/* @__PURE__ */ d("input", {
|
|
265
|
-
ref:
|
|
370
|
+
ref: U,
|
|
266
371
|
autoFocus: !0,
|
|
267
372
|
value: v,
|
|
268
|
-
onChange: (e) =>
|
|
373
|
+
onChange: (e) => be(e.target.value),
|
|
269
374
|
placeholder: "Search...",
|
|
270
375
|
className: "w-56 rounded-lg border border-slate-200 py-2 pl-9 pr-8 text-sm outline-none focus:border-indigo-500 focus:ring-2 focus:ring-indigo-500/20"
|
|
271
376
|
}),
|
|
272
377
|
v && /* @__PURE__ */ d("button", {
|
|
273
378
|
onClick: () => {
|
|
274
|
-
|
|
379
|
+
be(""), U.current?.focus();
|
|
275
380
|
},
|
|
276
381
|
className: "absolute right-2 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600",
|
|
277
382
|
children: /* @__PURE__ */ d(fe, { size: 15 })
|
|
278
383
|
})
|
|
279
384
|
]
|
|
280
385
|
}),
|
|
281
|
-
|
|
282
|
-
ref:
|
|
386
|
+
!!(m.filterable !== !1 && m.filters && m.filters.length > 0) && /* @__PURE__ */ f("div", {
|
|
387
|
+
ref: Be,
|
|
283
388
|
className: "relative",
|
|
284
389
|
children: [/* @__PURE__ */ f("button", {
|
|
285
|
-
onClick: () =>
|
|
390
|
+
onClick: () => Pe((e) => !e),
|
|
286
391
|
className: "flex items-center gap-2 rounded-lg border border-slate-200 px-3 py-2 text-sm",
|
|
287
392
|
children: [/* @__PURE__ */ d(ue, { size: 16 }), "Filter"]
|
|
288
|
-
}),
|
|
393
|
+
}), Ne && /* @__PURE__ */ f("div", {
|
|
289
394
|
className: "absolute right-0 z-30 mt-2 w-64 rounded-xl border bg-white p-4 shadow-xl",
|
|
290
|
-
children: [
|
|
395
|
+
children: [m.filters?.map((e) => /* @__PURE__ */ f("label", {
|
|
291
396
|
className: "mb-3 block text-sm",
|
|
292
397
|
children: [/* @__PURE__ */ d("span", {
|
|
293
398
|
className: "mb-1 block font-medium",
|
|
294
399
|
children: e.label
|
|
295
400
|
}), /* @__PURE__ */ d("select", {
|
|
296
401
|
value: y[e.key] || "all",
|
|
297
|
-
onChange: (t) =>
|
|
402
|
+
onChange: (t) => xe((n) => ({
|
|
298
403
|
...n,
|
|
299
404
|
[e.key]: t.target.value
|
|
300
405
|
})),
|
|
@@ -305,20 +410,20 @@ function p({ config: p, data: m = [], onView: h, onEdit: he, onDelete: ge, onBul
|
|
|
305
410
|
}, e.value))
|
|
306
411
|
})]
|
|
307
412
|
}, e.key)), /* @__PURE__ */ d("button", {
|
|
308
|
-
onClick: () =>
|
|
413
|
+
onClick: () => xe({}),
|
|
309
414
|
className: "text-sm font-medium text-slate-600",
|
|
310
415
|
children: "Clear filters"
|
|
311
416
|
})]
|
|
312
417
|
})]
|
|
313
418
|
}),
|
|
314
|
-
|
|
315
|
-
ref:
|
|
419
|
+
!!m.columnVisibility && /* @__PURE__ */ f("div", {
|
|
420
|
+
ref: Ve,
|
|
316
421
|
className: "relative",
|
|
317
422
|
children: [/* @__PURE__ */ f("button", {
|
|
318
|
-
onClick: () =>
|
|
423
|
+
onClick: () => Me((e) => !e),
|
|
319
424
|
className: "flex items-center gap-2 rounded-lg border border-slate-200 px-3 py-2 text-sm",
|
|
320
425
|
children: [/* @__PURE__ */ d(te, { size: 16 }), "Columns"]
|
|
321
|
-
}),
|
|
426
|
+
}), je && /* @__PURE__ */ f("div", {
|
|
322
427
|
className: "absolute right-0 z-30 mt-2 w-64 rounded-xl border bg-white p-3.5 shadow-xl",
|
|
323
428
|
children: [
|
|
324
429
|
/* @__PURE__ */ f("div", {
|
|
@@ -327,7 +432,7 @@ function p({ config: p, data: m = [], onView: h, onEdit: he, onDelete: ge, onBul
|
|
|
327
432
|
className: "text-xs font-semibold uppercase tracking-wider text-slate-500",
|
|
328
433
|
children: "Columns & Layout"
|
|
329
434
|
}), /* @__PURE__ */ f("button", {
|
|
330
|
-
onClick:
|
|
435
|
+
onClick: He,
|
|
331
436
|
className: "flex items-center gap-1 text-xs text-indigo-600 hover:text-indigo-800 font-medium",
|
|
332
437
|
title: "Reset default layout",
|
|
333
438
|
children: [/* @__PURE__ */ d(ce, { size: 12 }), "Reset"]
|
|
@@ -335,16 +440,16 @@ function p({ config: p, data: m = [], onView: h, onEdit: he, onDelete: ge, onBul
|
|
|
335
440
|
}),
|
|
336
441
|
/* @__PURE__ */ d("div", {
|
|
337
442
|
className: "space-y-1 max-h-64 overflow-y-auto",
|
|
338
|
-
children:
|
|
339
|
-
let t =
|
|
443
|
+
children: w.map((e) => {
|
|
444
|
+
let t = m.columns.find((t) => t.key === e);
|
|
340
445
|
if (!t) return null;
|
|
341
|
-
let n =
|
|
446
|
+
let n = C[e] !== !1;
|
|
342
447
|
return /* @__PURE__ */ f("div", {
|
|
343
448
|
draggable: !0,
|
|
344
|
-
onDragStart: (e) =>
|
|
345
|
-
onDragOver: (e) =>
|
|
346
|
-
onDrop: (e) =>
|
|
347
|
-
className: `flex items-center justify-between p-2 text-sm rounded-lg hover:bg-slate-50 cursor-grab active:cursor-grabbing transition-colors ${
|
|
449
|
+
onDragStart: (e) => ot(e, t.key),
|
|
450
|
+
onDragOver: (e) => st(e, t.key),
|
|
451
|
+
onDrop: (e) => ct(e, t.key),
|
|
452
|
+
className: `flex items-center justify-between p-2 text-sm rounded-lg hover:bg-slate-50 cursor-grab active:cursor-grabbing transition-colors ${E === t.key ? "opacity-30 bg-slate-100" : ""} ${Ae === t.key && E !== t.key ? "border-l-4 border-l-indigo-600 bg-indigo-50/60" : ""}`,
|
|
348
453
|
children: [/* @__PURE__ */ f("div", {
|
|
349
454
|
className: "flex items-center gap-2",
|
|
350
455
|
children: [/* @__PURE__ */ d("span", {
|
|
@@ -356,7 +461,7 @@ function p({ config: p, data: m = [], onView: h, onEdit: he, onDelete: ge, onBul
|
|
|
356
461
|
children: [/* @__PURE__ */ d("input", {
|
|
357
462
|
type: "checkbox",
|
|
358
463
|
checked: n,
|
|
359
|
-
onChange: () =>
|
|
464
|
+
onChange: () => Te((e) => {
|
|
360
465
|
let n = Object.values(e).filter(Boolean).length;
|
|
361
466
|
return e[t.key] && n === 1 ? e : {
|
|
362
467
|
...e,
|
|
@@ -369,34 +474,31 @@ function p({ config: p, data: m = [], onView: h, onEdit: he, onDelete: ge, onBul
|
|
|
369
474
|
children: t.label
|
|
370
475
|
})]
|
|
371
476
|
})]
|
|
372
|
-
}), /* @__PURE__ */ f("span", {
|
|
477
|
+
}), qe && /* @__PURE__ */ f("span", {
|
|
373
478
|
className: "text-xs text-slate-400 font-mono",
|
|
374
|
-
children: [
|
|
479
|
+
children: [T[t.key] || 160, "px"]
|
|
375
480
|
})]
|
|
376
481
|
}, t.key);
|
|
377
482
|
})
|
|
378
483
|
}),
|
|
379
484
|
/* @__PURE__ */ d("p", {
|
|
380
485
|
className: "mt-2.5 pt-2 border-t text-[11px] text-slate-400 text-center",
|
|
381
|
-
children: "Drag handles to reorder | Drag column edge to resize"
|
|
486
|
+
children: G && qe ? "Drag handles to reorder | Drag column edge to resize" : G ? "Drag handles to reorder" : qe ? "Drag column edge to resize" : "Column layout options"
|
|
382
487
|
})
|
|
383
488
|
]
|
|
384
489
|
})]
|
|
385
490
|
}),
|
|
386
|
-
|
|
387
|
-
onClick:
|
|
388
|
-
className: `flex items-center gap-2 rounded-lg border px-3 py-2 text-sm font-medium transition-colors ${
|
|
491
|
+
m.bulkEditable !== !1 && We.length > 0 && /* @__PURE__ */ f("button", {
|
|
492
|
+
onClick: _t,
|
|
493
|
+
className: `flex items-center gap-2 rounded-lg border px-3 py-2 text-sm font-medium transition-colors ${L ? "border-indigo-500 bg-indigo-600 text-white" : k.length > 0 ? "border-indigo-300 bg-indigo-50 text-indigo-700 hover:bg-indigo-100" : "border-slate-200 bg-white text-slate-700 hover:bg-slate-50"}`,
|
|
389
494
|
children: [
|
|
390
495
|
/* @__PURE__ */ d(re, { size: 16 }),
|
|
391
496
|
"Bulk Edit",
|
|
392
|
-
|
|
497
|
+
k.length > 0 ? ` (${k.length})` : ""
|
|
393
498
|
]
|
|
394
499
|
}),
|
|
395
|
-
|
|
396
|
-
onClick:
|
|
397
|
-
let e = q.map((e) => e.label).join(","), t = X.map((e) => q.map((t) => `"${String(e[t.key] ?? "").replaceAll("\"", "\"\"")}"`).join(",")).join("\n"), n = new Blob([e + "\n" + t], { type: "text/csv" }), r = document.createElement("a");
|
|
398
|
-
r.href = URL.createObjectURL(n), r.download = "table-export.csv", r.click(), URL.revokeObjectURL(r.href);
|
|
399
|
-
},
|
|
500
|
+
m.exportable && /* @__PURE__ */ f("button", {
|
|
501
|
+
onClick: xt,
|
|
400
502
|
className: "flex items-center gap-2 rounded-lg border border-slate-200 px-3 py-2 text-sm",
|
|
401
503
|
children: [/* @__PURE__ */ d(ne, { size: 16 }), "Export"]
|
|
402
504
|
})
|
|
@@ -404,25 +506,25 @@ function p({ config: p, data: m = [], onView: h, onEdit: he, onDelete: ge, onBul
|
|
|
404
506
|
})]
|
|
405
507
|
})
|
|
406
508
|
}),
|
|
407
|
-
|
|
509
|
+
Ke && /* @__PURE__ */ d("div", {
|
|
408
510
|
onDragOver: (e) => {
|
|
409
511
|
e.preventDefault(), e.dataTransfer.dropEffect = "move";
|
|
410
512
|
},
|
|
411
513
|
onDrop: (e) => {
|
|
412
514
|
e.preventDefault();
|
|
413
|
-
let t = e.dataTransfer.getData("text/plain") ||
|
|
414
|
-
t &&
|
|
515
|
+
let t = e.dataTransfer.getData("text/plain") || E;
|
|
516
|
+
t && lt(t);
|
|
415
517
|
},
|
|
416
|
-
className: `transition-all duration-200 overflow-hidden ${
|
|
518
|
+
className: `transition-all duration-200 overflow-hidden ${E ? "max-h-24 opacity-100 my-2" : "max-h-0 opacity-0 my-0 pointer-events-none"}`,
|
|
417
519
|
children: /* @__PURE__ */ f("div", {
|
|
418
520
|
className: "flex items-center justify-center gap-2 rounded-xl border-2 border-dashed border-rose-400 bg-rose-50 p-3 text-sm font-semibold text-rose-700 shadow-sm",
|
|
419
521
|
children: [/* @__PURE__ */ d(de, {
|
|
420
522
|
size: 20,
|
|
421
523
|
className: "text-rose-600 animate-bounce"
|
|
422
|
-
}), /* @__PURE__ */ f("span", { children: ["Drop column header here to hide column ", /* @__PURE__ */ d("b", { children:
|
|
524
|
+
}), /* @__PURE__ */ f("span", { children: ["Drop column header here to hide column ", /* @__PURE__ */ d("b", { children: m.columns.find((e) => e.key === E)?.label })] })]
|
|
423
525
|
})
|
|
424
526
|
}),
|
|
425
|
-
|
|
527
|
+
L && /* @__PURE__ */ f("div", {
|
|
426
528
|
className: "flex flex-wrap items-center justify-between gap-3 rounded-xl border border-indigo-200 bg-indigo-50/80 p-3.5 shadow-sm",
|
|
427
529
|
children: [/* @__PURE__ */ f("div", {
|
|
428
530
|
className: "flex flex-wrap items-center gap-3",
|
|
@@ -435,7 +537,7 @@ function p({ config: p, data: m = [], onView: h, onEdit: he, onDelete: ge, onBul
|
|
|
435
537
|
className: "font-semibold text-slate-900 text-sm",
|
|
436
538
|
children: [
|
|
437
539
|
"Bulk Edit Mode (",
|
|
438
|
-
|
|
540
|
+
ut.length,
|
|
439
541
|
" records):"
|
|
440
542
|
]
|
|
441
543
|
})]
|
|
@@ -444,12 +546,12 @@ function p({ config: p, data: m = [], onView: h, onEdit: he, onDelete: ge, onBul
|
|
|
444
546
|
children: [/* @__PURE__ */ d("span", {
|
|
445
547
|
className: "text-xs font-medium text-slate-600",
|
|
446
548
|
children: "Select columns to edit:"
|
|
447
|
-
}),
|
|
448
|
-
let t =
|
|
549
|
+
}), We.map((e) => {
|
|
550
|
+
let t = Re.includes(e.key);
|
|
449
551
|
return /* @__PURE__ */ f("button", {
|
|
450
552
|
type: "button",
|
|
451
553
|
onClick: () => {
|
|
452
|
-
|
|
554
|
+
R(t ? (t) => t.filter((t) => t !== e.key) : (t) => [...t, e.key]);
|
|
453
555
|
},
|
|
454
556
|
className: `flex items-center gap-1.5 rounded-lg px-2.5 py-1 text-xs font-medium border transition-all ${t ? "border-indigo-500 bg-indigo-600 text-white shadow-xs" : "border-slate-200 bg-white text-slate-700 hover:border-slate-300 hover:bg-slate-50"}`,
|
|
455
557
|
children: [/* @__PURE__ */ d("span", {
|
|
@@ -465,14 +567,14 @@ function p({ config: p, data: m = [], onView: h, onEdit: he, onDelete: ge, onBul
|
|
|
465
567
|
}), /* @__PURE__ */ f("div", {
|
|
466
568
|
className: "flex items-center gap-2",
|
|
467
569
|
children: [/* @__PURE__ */ f("button", {
|
|
468
|
-
onClick:
|
|
570
|
+
onClick: vt,
|
|
469
571
|
className: "flex items-center gap-1.5 rounded-lg border border-slate-200 bg-white px-3 py-1.5 text-xs font-medium text-slate-700 hover:bg-slate-50 transition-colors",
|
|
470
572
|
children: [/* @__PURE__ */ d(fe, {
|
|
471
573
|
size: 14,
|
|
472
574
|
className: "text-rose-500"
|
|
473
575
|
}), "Cancel"]
|
|
474
576
|
}), /* @__PURE__ */ f("button", {
|
|
475
|
-
onClick:
|
|
577
|
+
onClick: yt,
|
|
476
578
|
className: "flex items-center gap-1.5 rounded-lg bg-emerald-600 px-3.5 py-1.5 text-xs font-medium text-white hover:bg-emerald-700 shadow-sm transition-colors",
|
|
477
579
|
children: [/* @__PURE__ */ d(i, { size: 14 }), "Save"]
|
|
478
580
|
})]
|
|
@@ -480,354 +582,300 @@ function p({ config: p, data: m = [], onView: h, onEdit: he, onDelete: ge, onBul
|
|
|
480
582
|
}),
|
|
481
583
|
/* @__PURE__ */ f("div", {
|
|
482
584
|
className: `${pe} overflow-hidden`,
|
|
483
|
-
children: [
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
className: "
|
|
488
|
-
children:
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
onChange: (e) => Je(e.target.checked),
|
|
498
|
-
onFocus: () => I({
|
|
499
|
-
row: -1,
|
|
500
|
-
col: 0
|
|
501
|
-
})
|
|
502
|
-
})
|
|
503
|
-
}),
|
|
504
|
-
q.map((e, t) => {
|
|
505
|
-
let n = p.selectable ? t + 1 : t, r = O === e.key, i = De === e.key && O !== e.key, o = D[e.key] || e.width || 160;
|
|
506
|
-
return /* @__PURE__ */ f("th", {
|
|
507
|
-
"data-cell": `-1-${n}`,
|
|
508
|
-
style: {
|
|
509
|
-
width: `${o}px`,
|
|
510
|
-
minWidth: `${o}px`
|
|
511
|
-
},
|
|
512
|
-
draggable: Y,
|
|
513
|
-
onDragStart: (t) => He(t, e.key),
|
|
514
|
-
onDragOver: (t) => Ue(t, e.key),
|
|
515
|
-
onDragLeave: () => A(null),
|
|
516
|
-
onDrop: (t) => We(t, e.key),
|
|
517
|
-
onDragEnd: () => {
|
|
518
|
-
k(null), A(null);
|
|
519
|
-
},
|
|
520
|
-
"aria-sort": b.key === e.key ? b.dir : "none",
|
|
521
|
-
className: `group relative whitespace-nowrap px-4 py-3 text-left font-semibold text-slate-600 ${Y ? "cursor-grab active:cursor-grabbing" : ""} transition-colors select-none ${r ? "opacity-30 bg-slate-100" : ""} ${i ? "border-l-4 border-l-indigo-600 bg-indigo-50/60" : ""}`,
|
|
522
|
-
children: [/* @__PURE__ */ f("div", {
|
|
523
|
-
className: "flex items-center justify-between gap-1.5 pr-2",
|
|
524
|
-
children: [/* @__PURE__ */ f("div", {
|
|
525
|
-
className: "flex items-center gap-1.5 overflow-hidden",
|
|
526
|
-
children: [Y && /* @__PURE__ */ d("span", {
|
|
527
|
-
title: "Drag header to reorder",
|
|
528
|
-
className: "text-slate-300 group-hover:text-slate-500 cursor-grab shrink-0",
|
|
529
|
-
children: /* @__PURE__ */ d(oe, { size: 14 })
|
|
530
|
-
}), /* @__PURE__ */ f("button", {
|
|
531
|
-
disabled: !e.sortable,
|
|
532
|
-
onClick: () => e.sortable && qe(e.key),
|
|
533
|
-
className: `flex items-center gap-1 truncate ${e.sortable ? "hover:text-slate-900" : ""}`,
|
|
534
|
-
children: [/* @__PURE__ */ d("span", {
|
|
535
|
-
className: "truncate",
|
|
536
|
-
children: e.label
|
|
537
|
-
}), e.sortable && (b.key === e.key ? b.dir === "asc" ? /* @__PURE__ */ d(c, {
|
|
538
|
-
size: 15,
|
|
539
|
-
className: "shrink-0"
|
|
540
|
-
}) : /* @__PURE__ */ d(a, {
|
|
541
|
-
size: 15,
|
|
542
|
-
className: "shrink-0"
|
|
543
|
-
}) : /* @__PURE__ */ d(u, {
|
|
544
|
-
size: 15,
|
|
545
|
-
className: "text-slate-400 shrink-0"
|
|
546
|
-
}))]
|
|
547
|
-
})]
|
|
548
|
-
}), /* @__PURE__ */ d("button", {
|
|
549
|
-
type: "button",
|
|
550
|
-
title: "Hide column",
|
|
551
|
-
onClick: (t) => {
|
|
552
|
-
t.stopPropagation(), Ge(e.key);
|
|
553
|
-
},
|
|
554
|
-
className: "opacity-0 group-hover:opacity-100 transition-opacity p-0.5 text-slate-400 hover:text-rose-600 rounded shrink-0",
|
|
555
|
-
children: /* @__PURE__ */ d(ae, { size: 13 })
|
|
556
|
-
})]
|
|
557
|
-
}), /* @__PURE__ */ d("div", {
|
|
558
|
-
draggable: !1,
|
|
559
|
-
onMouseDown: (t) => ze(t, e.key),
|
|
560
|
-
onDoubleClick: (t) => {
|
|
561
|
-
t.stopPropagation(), we((t) => ({
|
|
562
|
-
...t,
|
|
563
|
-
[e.key]: e.width || 160
|
|
564
|
-
}));
|
|
565
|
-
},
|
|
566
|
-
title: "Drag to resize column width",
|
|
567
|
-
className: `absolute right-0 top-0 bottom-0 w-2.5 cursor-col-resize group-hover:bg-indigo-300/50 hover:!bg-indigo-500 transition-colors z-10 ${Te === e.key ? "bg-indigo-600 w-1" : ""}`
|
|
568
|
-
})]
|
|
569
|
-
}, e.key);
|
|
570
|
-
}),
|
|
571
|
-
(p.actions?.view || p.actions?.edit || p.actions?.delete) && /* @__PURE__ */ d("th", {
|
|
572
|
-
className: "sticky right-0 bg-slate-50 px-4 py-3 text-right font-semibold text-slate-600 w-32",
|
|
573
|
-
children: "Actions"
|
|
574
|
-
})
|
|
575
|
-
] })
|
|
576
|
-
}), /* @__PURE__ */ f("tbody", { children: [$.map((e, t) => {
|
|
577
|
-
let n = Me === e.id, r = z && Ke.includes(e.id);
|
|
578
|
-
return /* @__PURE__ */ f("tr", {
|
|
579
|
-
className: `border-b last:border-0 ${n || r ? "bg-indigo-50/20" : "hover:bg-slate-50"}`,
|
|
580
|
-
children: [
|
|
581
|
-
p.selectable && /* @__PURE__ */ d("td", {
|
|
582
|
-
"data-cell": `${t}-0`,
|
|
583
|
-
className: "px-4 py-3",
|
|
585
|
+
children: [
|
|
586
|
+
St("top"),
|
|
587
|
+
/* @__PURE__ */ d("div", {
|
|
588
|
+
style: { maxHeight: rt || void 0 },
|
|
589
|
+
className: `${at ? "overflow-x-auto" : ""} ${it ? "overflow-y-auto" : ""}`,
|
|
590
|
+
children: /* @__PURE__ */ f("table", {
|
|
591
|
+
ref: ze,
|
|
592
|
+
className: "min-w-full text-sm table-fixed",
|
|
593
|
+
children: [/* @__PURE__ */ d("thead", {
|
|
594
|
+
className: `sticky top-0 z-20 border-b border-slate-200 ${Qe}`,
|
|
595
|
+
children: /* @__PURE__ */ f("tr", { children: [
|
|
596
|
+
K && /* @__PURE__ */ d("th", {
|
|
597
|
+
"data-cell": "-1-0",
|
|
598
|
+
className: "w-12 px-4 py-3",
|
|
584
599
|
children: /* @__PURE__ */ d("input", {
|
|
585
600
|
type: "checkbox",
|
|
586
|
-
checked:
|
|
587
|
-
onChange: () =>
|
|
588
|
-
onFocus: () =>
|
|
589
|
-
row:
|
|
601
|
+
checked: $.length > 0 && $.every((e) => k.includes(e.id)),
|
|
602
|
+
onChange: (e) => ft(e.target.checked),
|
|
603
|
+
onFocus: () => P({
|
|
604
|
+
row: -1,
|
|
590
605
|
col: 0
|
|
591
606
|
})
|
|
592
607
|
})
|
|
593
608
|
}),
|
|
594
|
-
|
|
595
|
-
let
|
|
596
|
-
return /* @__PURE__ */
|
|
597
|
-
"data-cell":
|
|
609
|
+
W.map((e, t) => {
|
|
610
|
+
let n = K ? t + 1 : t, r = E === e.key, i = Ae === e.key && E !== e.key, o = T[e.key] || e.width || 160;
|
|
611
|
+
return /* @__PURE__ */ f("th", {
|
|
612
|
+
"data-cell": `-1-${n}`,
|
|
598
613
|
style: {
|
|
599
|
-
width: `${
|
|
600
|
-
minWidth: `${
|
|
614
|
+
width: `${o}px`,
|
|
615
|
+
minWidth: `${o}px`
|
|
601
616
|
},
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
children:
|
|
620
|
-
},
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
617
|
+
draggable: G,
|
|
618
|
+
onDragStart: (t) => ot(t, e.key),
|
|
619
|
+
onDragOver: (t) => st(t, e.key),
|
|
620
|
+
onDragLeave: () => O(null),
|
|
621
|
+
onDrop: (t) => ct(t, e.key),
|
|
622
|
+
onDragEnd: () => {
|
|
623
|
+
D(null), O(null);
|
|
624
|
+
},
|
|
625
|
+
"aria-sort": b.key === e.key ? b.dir : "none",
|
|
626
|
+
className: `group relative whitespace-nowrap px-4 py-3 text-left font-semibold ${G ? "cursor-grab active:cursor-grabbing" : ""} transition-colors select-none ${r ? "opacity-30 bg-slate-100" : ""} ${i ? "border-l-4 border-l-indigo-600 bg-indigo-50/60" : ""}`,
|
|
627
|
+
children: [/* @__PURE__ */ f("div", {
|
|
628
|
+
className: "flex items-center justify-between gap-1.5 pr-2",
|
|
629
|
+
children: [/* @__PURE__ */ f("div", {
|
|
630
|
+
className: "flex items-center gap-1.5 overflow-hidden",
|
|
631
|
+
children: [G && /* @__PURE__ */ d("span", {
|
|
632
|
+
title: "Drag header to reorder",
|
|
633
|
+
className: "opacity-60 group-hover:opacity-100 cursor-grab shrink-0",
|
|
634
|
+
children: /* @__PURE__ */ d(oe, { size: 14 })
|
|
635
|
+
}), /* @__PURE__ */ f("button", {
|
|
636
|
+
disabled: !e.sortable,
|
|
637
|
+
onClick: () => e.sortable && dt(e.key),
|
|
638
|
+
className: `flex items-center gap-1 truncate ${e.sortable ? "hover:opacity-80" : ""}`,
|
|
639
|
+
children: [/* @__PURE__ */ d("span", {
|
|
640
|
+
className: "truncate",
|
|
641
|
+
children: e.label
|
|
642
|
+
}), e.sortable && (b.key === e.key ? b.dir === "asc" ? /* @__PURE__ */ d(c, {
|
|
643
|
+
size: 15,
|
|
644
|
+
className: "shrink-0"
|
|
645
|
+
}) : /* @__PURE__ */ d(a, {
|
|
646
|
+
size: 15,
|
|
647
|
+
className: "shrink-0"
|
|
648
|
+
}) : /* @__PURE__ */ d(u, {
|
|
649
|
+
size: 15,
|
|
650
|
+
className: "opacity-50 shrink-0"
|
|
651
|
+
}))]
|
|
652
|
+
})]
|
|
653
|
+
}), /* @__PURE__ */ d("button", {
|
|
654
|
+
type: "button",
|
|
655
|
+
title: "Hide column",
|
|
656
|
+
onClick: (t) => {
|
|
657
|
+
t.stopPropagation(), lt(e.key);
|
|
658
|
+
},
|
|
659
|
+
className: "opacity-0 group-hover:opacity-100 transition-opacity p-0.5 hover:text-rose-400 rounded shrink-0",
|
|
660
|
+
children: /* @__PURE__ */ d(ae, { size: 13 })
|
|
661
|
+
})]
|
|
662
|
+
}), qe && /* @__PURE__ */ d("div", {
|
|
663
|
+
draggable: !1,
|
|
664
|
+
onMouseDown: (t) => Ue(t, e.key),
|
|
665
|
+
onDoubleClick: (t) => {
|
|
666
|
+
t.stopPropagation(), De((t) => ({
|
|
667
|
+
...t,
|
|
668
|
+
[e.key]: e.width || 160
|
|
669
|
+
}));
|
|
644
670
|
},
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
671
|
+
title: "Drag to resize column width",
|
|
672
|
+
className: `absolute right-0 top-0 bottom-0 w-2.5 cursor-col-resize group-hover:bg-indigo-300/50 hover:!bg-indigo-500 transition-colors z-10 ${Oe === e.key ? "bg-indigo-600 w-1" : ""}`
|
|
673
|
+
})]
|
|
674
|
+
}, e.key);
|
|
675
|
+
}),
|
|
676
|
+
(m.actions?.view || m.actions?.edit || m.actions?.delete) && /* @__PURE__ */ d("th", {
|
|
677
|
+
className: `sticky right-0 top-0 z-30 px-4 py-3 text-right font-semibold w-32 ${Qe}`,
|
|
678
|
+
children: "Actions"
|
|
679
|
+
})
|
|
680
|
+
] })
|
|
681
|
+
}), /* @__PURE__ */ f("tbody", { children: [$.map((e, t) => {
|
|
682
|
+
let n = Fe === e.id, r = L && ut.includes(e.id);
|
|
683
|
+
return /* @__PURE__ */ f("tr", {
|
|
684
|
+
className: `border-b last:border-0 ${n || r ? "bg-indigo-50/20" : "hover:bg-slate-50"}`,
|
|
685
|
+
children: [
|
|
686
|
+
K && /* @__PURE__ */ d("td", {
|
|
687
|
+
"data-cell": `${t}-0`,
|
|
688
|
+
className: "px-4 py-3",
|
|
689
|
+
children: /* @__PURE__ */ d("input", {
|
|
690
|
+
type: "checkbox",
|
|
691
|
+
checked: k.includes(e.id),
|
|
692
|
+
onChange: () => pt(e.id),
|
|
693
|
+
onFocus: () => P({
|
|
694
|
+
row: t,
|
|
695
|
+
col: 0
|
|
652
696
|
})
|
|
653
|
-
})
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
}
|
|
662
|
-
})),
|
|
663
|
-
onKeyDown: (e) => {
|
|
664
|
-
e.key === "Enter" && tt(), e.key === "Escape" && et();
|
|
697
|
+
})
|
|
698
|
+
}),
|
|
699
|
+
W.map((i, a) => {
|
|
700
|
+
let o = K ? a + 1 : a, s = r && Re.includes(i.key) && i.editable !== !1, c = Ge(i), ee = T[i.key] || i.width || 160, l = e[i.key], u = l == null ? "" : String(l), te = u.length > 25;
|
|
701
|
+
return /* @__PURE__ */ d("td", {
|
|
702
|
+
"data-cell": `${t}-${o}`,
|
|
703
|
+
style: {
|
|
704
|
+
width: `${ee}px`,
|
|
705
|
+
minWidth: `${ee}px`
|
|
665
706
|
},
|
|
666
|
-
className: "
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
children:
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
"data-cell": `${t}-${q.length + +!!p.selectable}`,
|
|
678
|
-
className: "sticky right-0 bg-white px-4 py-3 w-32",
|
|
679
|
-
children: n ? /* @__PURE__ */ f("div", {
|
|
680
|
-
className: "flex justify-end gap-1",
|
|
681
|
-
children: [/* @__PURE__ */ d("button", {
|
|
682
|
-
title: "Save",
|
|
683
|
-
onClick: Qe,
|
|
684
|
-
className: "rounded-md bg-emerald-100 p-2 text-emerald-700 hover:bg-emerald-200",
|
|
685
|
-
children: /* @__PURE__ */ d(i, { size: 16 })
|
|
686
|
-
}), /* @__PURE__ */ d("button", {
|
|
687
|
-
title: "Cancel",
|
|
688
|
-
onClick: Ze,
|
|
689
|
-
className: "rounded-md bg-rose-100 p-2 text-rose-700 hover:bg-rose-200",
|
|
690
|
-
children: /* @__PURE__ */ d(fe, { size: 16 })
|
|
691
|
-
})]
|
|
692
|
-
}) : /* @__PURE__ */ f("div", {
|
|
693
|
-
className: "flex justify-end gap-1",
|
|
694
|
-
children: [
|
|
695
|
-
p.actions.view && /* @__PURE__ */ d("button", {
|
|
696
|
-
title: "View",
|
|
697
|
-
onClick: () => h?.(e),
|
|
698
|
-
onFocus: () => {
|
|
699
|
-
I({
|
|
700
|
-
row: t,
|
|
701
|
-
col: q.length + +!!p.selectable
|
|
702
|
-
}), W(0);
|
|
707
|
+
className: "px-4 py-3 truncate",
|
|
708
|
+
tabIndex: -1,
|
|
709
|
+
title: te ? u : void 0,
|
|
710
|
+
children: n && i.editable !== !1 ? c ? /* @__PURE__ */ d("select", {
|
|
711
|
+
value: F[i.key] ?? "",
|
|
712
|
+
onChange: (e) => I({
|
|
713
|
+
...F,
|
|
714
|
+
[i.key]: e.target.value
|
|
715
|
+
}),
|
|
716
|
+
onKeyDown: (e) => {
|
|
717
|
+
e.key === "Enter" && gt(), e.key === "Escape" && ht();
|
|
703
718
|
},
|
|
704
|
-
className: "rounded-md
|
|
705
|
-
children:
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
719
|
+
className: "w-full rounded-md border border-indigo-300 bg-white px-2 py-1 text-sm outline-none focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500",
|
|
720
|
+
children: c.map((e) => {
|
|
721
|
+
let t = typeof e == "object" ? e.value : e, n = typeof e == "object" ? e.label : e;
|
|
722
|
+
return /* @__PURE__ */ d("option", {
|
|
723
|
+
value: t,
|
|
724
|
+
children: n
|
|
725
|
+
}, t);
|
|
726
|
+
})
|
|
727
|
+
}) : /* @__PURE__ */ d("input", {
|
|
728
|
+
type: "text",
|
|
729
|
+
value: F[i.key] ?? "",
|
|
730
|
+
onChange: (e) => I({
|
|
731
|
+
...F,
|
|
732
|
+
[i.key]: e.target.value
|
|
733
|
+
}),
|
|
734
|
+
onKeyDown: (e) => {
|
|
735
|
+
e.key === "Enter" && gt(), e.key === "Escape" && ht();
|
|
715
736
|
},
|
|
716
|
-
className: "rounded-md
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
737
|
+
className: "w-full rounded-md border border-indigo-300 bg-white px-2 py-1 text-sm outline-none focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500"
|
|
738
|
+
}) : s ? c ? /* @__PURE__ */ d("select", {
|
|
739
|
+
value: z[e.id]?.[i.key] ?? e[i.key] ?? "",
|
|
740
|
+
onChange: (t) => B((n) => ({
|
|
741
|
+
...n,
|
|
742
|
+
[e.id]: {
|
|
743
|
+
...n[e.id] || e,
|
|
744
|
+
[i.key]: t.target.value
|
|
745
|
+
}
|
|
746
|
+
})),
|
|
747
|
+
onKeyDown: (e) => {
|
|
748
|
+
e.key === "Enter" && yt(), e.key === "Escape" && vt();
|
|
727
749
|
},
|
|
728
|
-
className: "rounded-md
|
|
729
|
-
children:
|
|
730
|
-
|
|
731
|
-
|
|
750
|
+
className: "w-full rounded-md border border-indigo-400 bg-white px-2 py-1 text-sm outline-none focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500",
|
|
751
|
+
children: c.map((e) => {
|
|
752
|
+
let t = typeof e == "object" ? e.value : e, n = typeof e == "object" ? e.label : e;
|
|
753
|
+
return /* @__PURE__ */ d("option", {
|
|
754
|
+
value: t,
|
|
755
|
+
children: n
|
|
756
|
+
}, t);
|
|
757
|
+
})
|
|
758
|
+
}) : /* @__PURE__ */ d("input", {
|
|
759
|
+
type: "text",
|
|
760
|
+
value: z[e.id]?.[i.key] ?? e[i.key] ?? "",
|
|
761
|
+
onChange: (t) => B((n) => ({
|
|
762
|
+
...n,
|
|
763
|
+
[e.id]: {
|
|
764
|
+
...n[e.id] || e,
|
|
765
|
+
[i.key]: t.target.value
|
|
766
|
+
}
|
|
767
|
+
})),
|
|
768
|
+
onKeyDown: (e) => {
|
|
769
|
+
e.key === "Enter" && yt(), e.key === "Escape" && vt();
|
|
770
|
+
},
|
|
771
|
+
className: "w-full rounded-md border border-indigo-400 bg-white px-2 py-1 text-sm outline-none focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500"
|
|
772
|
+
}) : i.render ? i.render(l, e, t) : i.key === "status" ? /* @__PURE__ */ d("span", {
|
|
773
|
+
className: `rounded-full px-2.5 py-1 text-xs font-medium ${me[l] || "bg-slate-100 text-slate-600"}`,
|
|
774
|
+
children: l
|
|
775
|
+
}) : te ? /* @__PURE__ */ f("span", {
|
|
776
|
+
title: u,
|
|
777
|
+
children: [u.slice(0, 25), "..."]
|
|
778
|
+
}) : u
|
|
779
|
+
}, i.key);
|
|
780
|
+
}),
|
|
781
|
+
(m.actions?.view || m.actions?.edit || m.actions?.delete) && /* @__PURE__ */ d("td", {
|
|
782
|
+
"data-cell": `${t}-${W.length + +!!K}`,
|
|
783
|
+
className: "sticky right-0 bg-white px-4 py-3 w-32 z-10",
|
|
784
|
+
children: n ? /* @__PURE__ */ f("div", {
|
|
785
|
+
className: "flex justify-end gap-1",
|
|
786
|
+
children: [/* @__PURE__ */ d("button", {
|
|
787
|
+
title: "Save",
|
|
788
|
+
onClick: gt,
|
|
789
|
+
className: "rounded-md bg-emerald-100 p-2 text-emerald-700 hover:bg-emerald-200",
|
|
790
|
+
children: /* @__PURE__ */ d(i, { size: 16 })
|
|
791
|
+
}), /* @__PURE__ */ d("button", {
|
|
792
|
+
title: "Cancel",
|
|
793
|
+
onClick: ht,
|
|
794
|
+
className: "rounded-md bg-rose-100 p-2 text-rose-700 hover:bg-rose-200",
|
|
795
|
+
children: /* @__PURE__ */ d(fe, { size: 16 })
|
|
796
|
+
})]
|
|
797
|
+
}) : /* @__PURE__ */ f("div", {
|
|
798
|
+
className: "flex justify-end gap-1",
|
|
799
|
+
children: [
|
|
800
|
+
m.actions.view && /* @__PURE__ */ d("button", {
|
|
801
|
+
title: "View",
|
|
802
|
+
onClick: () => g?.(e),
|
|
803
|
+
onFocus: () => {
|
|
804
|
+
P({
|
|
805
|
+
row: t,
|
|
806
|
+
col: W.length + +!!K
|
|
807
|
+
}), H(0);
|
|
808
|
+
},
|
|
809
|
+
className: "rounded-md p-2 hover:bg-slate-100 focus:outline-none focus:ring-2 focus:ring-slate-400",
|
|
810
|
+
children: /* @__PURE__ */ d(ie, { size: 16 })
|
|
811
|
+
}),
|
|
812
|
+
m.actions.edit && /* @__PURE__ */ d("button", {
|
|
813
|
+
title: "Edit",
|
|
814
|
+
onClick: () => mt(e),
|
|
815
|
+
onFocus: () => {
|
|
816
|
+
P({
|
|
817
|
+
row: t,
|
|
818
|
+
col: W.length + +!!K
|
|
819
|
+
}), H(1);
|
|
820
|
+
},
|
|
821
|
+
className: "rounded-md p-2 hover:bg-slate-100 focus:outline-none focus:ring-2 focus:ring-slate-400",
|
|
822
|
+
children: /* @__PURE__ */ d(se, { size: 16 })
|
|
823
|
+
}),
|
|
824
|
+
m.actions.delete && /* @__PURE__ */ d("button", {
|
|
825
|
+
title: "Delete",
|
|
826
|
+
onClick: () => M(e),
|
|
827
|
+
onFocus: () => {
|
|
828
|
+
P({
|
|
829
|
+
row: t,
|
|
830
|
+
col: W.length + +!!K
|
|
831
|
+
}), H(2);
|
|
832
|
+
},
|
|
833
|
+
className: "rounded-md p-2 text-red-600 hover:bg-red-50 focus:outline-none focus:ring-2 focus:ring-red-400",
|
|
834
|
+
children: /* @__PURE__ */ d(de, { size: 16 })
|
|
835
|
+
})
|
|
836
|
+
]
|
|
837
|
+
})
|
|
732
838
|
})
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
},
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
})]
|
|
746
|
-
})
|
|
747
|
-
})
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
children: [/* @__PURE__ */ f("div", {
|
|
751
|
-
className: "text-sm text-slate-500",
|
|
752
|
-
children: [
|
|
753
|
-
"Showing ",
|
|
754
|
-
X.length ? (Q - 1) * C + 1 : 0,
|
|
755
|
-
"–",
|
|
756
|
-
Math.min(Q * C, X.length),
|
|
757
|
-
" of ",
|
|
758
|
-
X.length
|
|
759
|
-
]
|
|
760
|
-
}), /* @__PURE__ */ f("div", {
|
|
761
|
-
className: "flex items-center gap-2",
|
|
762
|
-
children: [
|
|
763
|
-
/* @__PURE__ */ d("select", {
|
|
764
|
-
value: C,
|
|
765
|
-
onChange: (e) => Se(Number(e.target.value)),
|
|
766
|
-
className: "rounded-lg border border-slate-200 px-2 py-1.5 text-sm",
|
|
767
|
-
children: p.pageSizeOptions.map((e) => /* @__PURE__ */ f("option", {
|
|
768
|
-
value: e,
|
|
769
|
-
children: [e, "/page"]
|
|
770
|
-
}, e))
|
|
771
|
-
}),
|
|
772
|
-
/* @__PURE__ */ d("button", {
|
|
773
|
-
disabled: Q === 1,
|
|
774
|
-
onClick: () => S(1),
|
|
775
|
-
className: "rounded-md border p-1.5 disabled:opacity-40",
|
|
776
|
-
children: /* @__PURE__ */ d(ee, { size: 16 })
|
|
777
|
-
}),
|
|
778
|
-
/* @__PURE__ */ d("button", {
|
|
779
|
-
disabled: Q === 1,
|
|
780
|
-
onClick: () => S((e) => e - 1),
|
|
781
|
-
className: "rounded-md border p-1.5 disabled:opacity-40",
|
|
782
|
-
children: /* @__PURE__ */ d(o, { size: 16 })
|
|
783
|
-
}),
|
|
784
|
-
/* @__PURE__ */ f("span", {
|
|
785
|
-
className: "px-2 text-sm",
|
|
786
|
-
children: [
|
|
787
|
-
"Page ",
|
|
788
|
-
Q,
|
|
789
|
-
" of ",
|
|
790
|
-
Z
|
|
791
|
-
]
|
|
792
|
-
}),
|
|
793
|
-
/* @__PURE__ */ d("button", {
|
|
794
|
-
disabled: Q === Z,
|
|
795
|
-
onClick: () => S((e) => e + 1),
|
|
796
|
-
className: "rounded-md border p-1.5 disabled:opacity-40",
|
|
797
|
-
children: /* @__PURE__ */ d(s, { size: 16 })
|
|
798
|
-
}),
|
|
799
|
-
/* @__PURE__ */ d("button", {
|
|
800
|
-
disabled: Q === Z,
|
|
801
|
-
onClick: () => S(Z),
|
|
802
|
-
className: "rounded-md border p-1.5 disabled:opacity-40",
|
|
803
|
-
children: /* @__PURE__ */ d(l, { size: 16 })
|
|
804
|
-
})
|
|
805
|
-
]
|
|
806
|
-
})]
|
|
807
|
-
})]
|
|
839
|
+
]
|
|
840
|
+
}, e.id);
|
|
841
|
+
}), !$.length && /* @__PURE__ */ d("tr", { children: /* @__PURE__ */ f("td", {
|
|
842
|
+
colSpan: W.length + +!!K + 1,
|
|
843
|
+
className: "px-6 py-16 text-center",
|
|
844
|
+
children: [/* @__PURE__ */ d("div", {
|
|
845
|
+
className: "font-medium",
|
|
846
|
+
children: "No records found"
|
|
847
|
+
}), /* @__PURE__ */ d("div", {
|
|
848
|
+
className: "mt-1 text-sm text-slate-500",
|
|
849
|
+
children: "Try changing your search or filters."
|
|
850
|
+
})]
|
|
851
|
+
}) })] })]
|
|
852
|
+
})
|
|
853
|
+
}),
|
|
854
|
+
St("bottom")
|
|
855
|
+
]
|
|
808
856
|
}),
|
|
809
|
-
|
|
857
|
+
k.length > 0 && !L && /* @__PURE__ */ f("div", {
|
|
810
858
|
className: "fixed bottom-5 left-1/2 z-40 flex -translate-x-1/2 items-center gap-3 rounded-xl bg-slate-900 px-4 py-2.5 text-sm text-white shadow-xl",
|
|
811
859
|
children: [
|
|
812
860
|
/* @__PURE__ */ f("span", {
|
|
813
861
|
className: "font-medium pl-1",
|
|
814
|
-
children: [
|
|
862
|
+
children: [k.length, " selected"]
|
|
815
863
|
}),
|
|
816
|
-
|
|
817
|
-
onClick:
|
|
864
|
+
m.bulkEditable !== !1 && We.length > 0 && /* @__PURE__ */ f("button", {
|
|
865
|
+
onClick: _t,
|
|
818
866
|
className: "flex items-center gap-1.5 rounded-lg bg-indigo-600 px-3 py-1.5 text-xs font-semibold text-white hover:bg-indigo-500 transition-colors shadow-sm",
|
|
819
867
|
children: [/* @__PURE__ */ d(re, { size: 14 }), "Bulk Edit"]
|
|
820
868
|
}),
|
|
821
869
|
/* @__PURE__ */ d("button", {
|
|
822
|
-
onClick: () =>
|
|
870
|
+
onClick: () => A([]),
|
|
823
871
|
className: "text-xs text-slate-400 hover:text-white underline pr-1",
|
|
824
872
|
children: "Clear"
|
|
825
873
|
})
|
|
826
874
|
]
|
|
827
875
|
}),
|
|
828
|
-
|
|
876
|
+
j && /* @__PURE__ */ d("div", {
|
|
829
877
|
onClick: (e) => {
|
|
830
|
-
e.target === e.currentTarget &&
|
|
878
|
+
e.target === e.currentTarget && M(null);
|
|
831
879
|
},
|
|
832
880
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",
|
|
833
881
|
children: /* @__PURE__ */ f("div", {
|
|
@@ -841,20 +889,18 @@ function p({ config: p, data: m = [], onView: h, onEdit: he, onDelete: ge, onBul
|
|
|
841
889
|
className: "mt-2 text-sm text-slate-500",
|
|
842
890
|
children: [
|
|
843
891
|
"Are you sure you want to delete ",
|
|
844
|
-
/* @__PURE__ */ d("b", { children:
|
|
892
|
+
/* @__PURE__ */ d("b", { children: j.name }),
|
|
845
893
|
"? This action cannot be undone."
|
|
846
894
|
]
|
|
847
895
|
}),
|
|
848
896
|
/* @__PURE__ */ f("div", {
|
|
849
897
|
className: "mt-6 flex justify-end gap-2",
|
|
850
898
|
children: [/* @__PURE__ */ d("button", {
|
|
851
|
-
onClick: () =>
|
|
899
|
+
onClick: () => M(null),
|
|
852
900
|
className: "rounded-lg border px-4 py-2 text-sm",
|
|
853
901
|
children: "Cancel"
|
|
854
902
|
}), /* @__PURE__ */ d("button", {
|
|
855
|
-
onClick:
|
|
856
|
-
_((e) => e.filter((e) => e.id !== N.id)), M((e) => e.filter((e) => e !== N.id)), P(null), ge?.(N);
|
|
857
|
-
},
|
|
903
|
+
onClick: bt,
|
|
858
904
|
className: "rounded-lg bg-red-600 px-4 py-2 text-sm font-medium text-white",
|
|
859
905
|
children: "Delete"
|
|
860
906
|
})]
|
|
@@ -867,16 +913,16 @@ function p({ config: p, data: m = [], onView: h, onEdit: he, onDelete: ge, onBul
|
|
|
867
913
|
}
|
|
868
914
|
//#endregion
|
|
869
915
|
//#region src/index.css?inline
|
|
870
|
-
var m = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-400:oklch(70.4% .191 22.216);--color-red-600:oklch(57.7% .245 27.325);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-700:oklch(55.5% .163 48.998);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-indigo-800:oklch(39.8% .195 277.366);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-rose-700:oklch(51.4% .222 16.935);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wider:.05em;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-bounce:bounce 1s infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.visible\\!{visibility:visible!important}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.top-0{top:0}.top-1{top:var(--spacing)}.top-1\\/2{top:50%}.right-0{right:0}.right-2{right:calc(var(--spacing) * 2)}.bottom-0{bottom:0}.bottom-5{bottom:calc(var(--spacing) * 5)}.left-1{left:var(--spacing)}.left-1\\/2{left:50%}.left-3{left:calc(var(--spacing) * 3)}.z-10{z-index:10}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.mx-auto{margin-inline:auto}.my-0{margin-block:0}.my-2{margin-block:calc(var(--spacing) * 2)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.block{display:block}.flex{display:flex}.grid{display:grid}.table{display:table}.h-3{height:calc(var(--spacing) * 3)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.max-h-0{max-height:0}.max-h-24{max-height:calc(var(--spacing) * 24)}.max-h-64{max-height:calc(var(--spacing) * 64)}.min-h-screen{min-height:100vh}.w-1{width:var(--spacing)}.w-2{width:calc(var(--spacing) * 2)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-12{width:calc(var(--spacing) * 12)}.w-32{width:calc(var(--spacing) * 32)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-full{width:100%}.max-w-7xl{max-width:var(--container-7xl)}.max-w-sm{max-width:var(--container-sm)}.min-w-full{min-width:100%}.shrink-0{flex-shrink:0}.table-fixed{table-layout:fixed}.-translate-x-1{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.animate-bounce{animation:var(--animate-bounce)}.cursor-col-resize{cursor:col-resize}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-emerald-200{border-color:var(--color-emerald-200)}.border-indigo-200{border-color:var(--color-indigo-200)}.border-indigo-300{border-color:var(--color-indigo-300)}.border-indigo-400{border-color:var(--color-indigo-400)}.border-indigo-500{border-color:var(--color-indigo-500)}.border-rose-400{border-color:var(--color-rose-400)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-300{border-color:var(--color-slate-300)}.border-white{border-color:var(--color-white)}.border-l-indigo-600{border-left-color:var(--color-indigo-600)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-black{background-color:var(--color-black)}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab, red, red)){.bg-black\\/40{background-color:color-mix(in oklab, var(--color-black) 40%, transparent)}}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-indigo-50{background-color:var(--color-indigo-50)}.bg-indigo-50\\/20{background-color:#eef2ff33}@supports (color:color-mix(in lab, red, red)){.bg-indigo-50\\/20{background-color:color-mix(in oklab, var(--color-indigo-50) 20%, transparent)}}.bg-indigo-50\\/60{background-color:#eef2ff99}@supports (color:color-mix(in lab, red, red)){.bg-indigo-50\\/60{background-color:color-mix(in oklab, var(--color-indigo-50) 60%, transparent)}}.bg-indigo-50\\/80{background-color:#eef2ffcc}@supports (color:color-mix(in lab, red, red)){.bg-indigo-50\\/80{background-color:color-mix(in oklab, var(--color-indigo-50) 80%, transparent)}}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-red-600{background-color:var(--color-red-600)}.bg-rose-50{background-color:var(--color-rose-50)}.bg-rose-100{background-color:var(--color-rose-100)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-900{background-color:var(--color-slate-900)}.bg-white{background-color:var(--color-white)}.p-0{padding:0}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pl-1{padding-left:var(--spacing)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[11px\\]{font-size:11px}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.whitespace-nowrap{white-space:nowrap}.text-amber-700{color:var(--color-amber-700)}.text-emerald-700{color:var(--color-emerald-700)}.text-indigo-600{color:var(--color-indigo-600)}.text-indigo-700{color:var(--color-indigo-700)}.text-red-600{color:var(--color-red-600)}.text-rose-500{color:var(--color-rose-500)}.text-rose-600{color:var(--color-rose-600)}.text-rose-700{color:var(--color-rose-700)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-100{opacity:1}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.group-hover\\:bg-indigo-300\\/50:is(:where(.group):hover *){background-color:#a4b3ff80}@supports (color:color-mix(in lab, red, red)){.group-hover\\:bg-indigo-300\\/50:is(:where(.group):hover *){background-color:color-mix(in oklab, var(--color-indigo-300) 50%, transparent)}}.group-hover\\:text-slate-500:is(:where(.group):hover *){color:var(--color-slate-500)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.last\\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media (hover:hover){.hover\\:border-slate-300:hover{border-color:var(--color-slate-300)}.hover\\:\\!bg-indigo-500:hover{background-color:var(--color-indigo-500)!important}.hover\\:bg-emerald-200:hover{background-color:var(--color-emerald-200)}.hover\\:bg-emerald-700:hover{background-color:var(--color-emerald-700)}.hover\\:bg-indigo-100:hover{background-color:var(--color-indigo-100)}.hover\\:bg-indigo-500:hover{background-color:var(--color-indigo-500)}.hover\\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\\:bg-rose-200:hover{background-color:var(--color-rose-200)}.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\\:text-indigo-800:hover{color:var(--color-indigo-800)}.hover\\:text-rose-600:hover{color:var(--color-rose-600)}.hover\\:text-slate-500:hover{color:var(--color-slate-500)}.hover\\:text-slate-600:hover{color:var(--color-slate-600)}.hover\\:text-slate-900:hover{color:var(--color-slate-900)}.hover\\:text-white:hover{color:var(--color-white)}}.focus\\:border-indigo-500:focus{border-color:var(--color-indigo-500)}.focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-indigo-500:focus{--tw-ring-color:var(--color-indigo-500)}.focus\\:ring-indigo-500\\/20:focus{--tw-ring-color:#625fff33}@supports (color:color-mix(in lab, red, red)){.focus\\:ring-indigo-500\\/20:focus{--tw-ring-color:color-mix(in oklab, var(--color-indigo-500) 20%, transparent)}}.focus\\:ring-red-400:focus{--tw-ring-color:var(--color-red-400)}.focus\\:ring-slate-400:focus{--tw-ring-color:var(--color-slate-400)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\\:cursor-grabbing:active{cursor:grabbing}.disabled\\:opacity-40:disabled{opacity:.4}@media (width>=40rem){.sm\\:flex-row{flex-direction:row}.sm\\:items-center{align-items:center}.sm\\:justify-between{justify-content:space-between}.sm\\:p-6{padding:calc(var(--spacing) * 6)}}@media (width>=64rem){.lg\\:flex-row{flex-direction:row}.lg\\:items-center{align-items:center}.lg\\:justify-between{justify-content:space-between}.lg\\:p-10{padding:calc(var(--spacing) * 10)}}}*{box-sizing:border-box}body{color:#0f172a;background:#f8fafc;margin:0;font-family:Inter,ui-sans-serif,system-ui,sans-serif}button,input,select{font:inherit}button{cursor:pointer}@property --tw-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\"*\";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-tracking{syntax:\"*\";inherits:false}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:\"*\";inherits:false}@property --tw-brightness{syntax:\"*\";inherits:false}@property --tw-contrast{syntax:\"*\";inherits:false}@property --tw-grayscale{syntax:\"*\";inherits:false}@property --tw-hue-rotate{syntax:\"*\";inherits:false}@property --tw-invert{syntax:\"*\";inherits:false}@property --tw-opacity{syntax:\"*\";inherits:false}@property --tw-saturate{syntax:\"*\";inherits:false}@property --tw-sepia{syntax:\"*\";inherits:false}@property --tw-drop-shadow{syntax:\"*\";inherits:false}@property --tw-drop-shadow-color{syntax:\"*\";inherits:false}@property --tw-drop-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:\"*\";inherits:false}@property --tw-duration{syntax:\"*\";inherits:false}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}";
|
|
916
|
+
var h = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-400:oklch(70.4% .191 22.216);--color-red-600:oklch(57.7% .245 27.325);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-700:oklch(55.5% .163 48.998);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-indigo-800:oklch(39.8% .195 277.366);--color-indigo-900:oklch(35.9% .144 278.697);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-rose-700:oklch(51.4% .222 16.935);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wider:.05em;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-bounce:bounce 1s infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.top-0{top:0}.top-1\\/2{top:50%}.right-0{right:0}.right-2{right:calc(var(--spacing) * 2)}.bottom-0{bottom:0}.bottom-5{bottom:calc(var(--spacing) * 5)}.left-1\\/2{left:50%}.left-3{left:calc(var(--spacing) * 3)}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.my-0{margin-block:0}.my-2{margin-block:calc(var(--spacing) * 2)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.table{display:table}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.max-h-0{max-height:0}.max-h-24{max-height:calc(var(--spacing) * 24)}.max-h-64{max-height:calc(var(--spacing) * 64)}.min-h-screen{min-height:100vh}.w-1{width:var(--spacing)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-12{width:calc(var(--spacing) * 12)}.w-32{width:calc(var(--spacing) * 32)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-full{width:100%}.max-w-7xl{max-width:var(--container-7xl)}.max-w-sm{max-width:var(--container-sm)}.min-w-full{min-width:100%}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.table-fixed{table-layout:fixed}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.animate-bounce{animation:var(--animate-bounce)}.cursor-col-resize{cursor:col-resize}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-emerald-200{border-color:var(--color-emerald-200)}.border-indigo-200{border-color:var(--color-indigo-200)}.border-indigo-300{border-color:var(--color-indigo-300)}.border-indigo-400{border-color:var(--color-indigo-400)}.border-indigo-500{border-color:var(--color-indigo-500)}.border-rose-400{border-color:var(--color-rose-400)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-200\\/80{border-color:#e2e8f0cc}@supports (color:color-mix(in lab, red, red)){.border-slate-200\\/80{border-color:color-mix(in oklab, var(--color-slate-200) 80%, transparent)}}.border-slate-300{border-color:var(--color-slate-300)}.border-white{border-color:var(--color-white)}.border-l-indigo-600{border-left-color:var(--color-indigo-600)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab, red, red)){.bg-black\\/40{background-color:color-mix(in oklab, var(--color-black) 40%, transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-50\\/50{background-color:#eff6ff80}@supports (color:color-mix(in lab, red, red)){.bg-blue-50\\/50{background-color:color-mix(in oklab, var(--color-blue-50) 50%, transparent)}}.bg-blue-900{background-color:var(--color-blue-900)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-50\\/50{background-color:#ecfdf580}@supports (color:color-mix(in lab, red, red)){.bg-emerald-50\\/50{background-color:color-mix(in oklab, var(--color-emerald-50) 50%, transparent)}}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-emerald-900{background-color:var(--color-emerald-900)}.bg-indigo-50{background-color:var(--color-indigo-50)}.bg-indigo-50\\/20{background-color:#eef2ff33}@supports (color:color-mix(in lab, red, red)){.bg-indigo-50\\/20{background-color:color-mix(in oklab, var(--color-indigo-50) 20%, transparent)}}.bg-indigo-50\\/50{background-color:#eef2ff80}@supports (color:color-mix(in lab, red, red)){.bg-indigo-50\\/50{background-color:color-mix(in oklab, var(--color-indigo-50) 50%, transparent)}}.bg-indigo-50\\/60{background-color:#eef2ff99}@supports (color:color-mix(in lab, red, red)){.bg-indigo-50\\/60{background-color:color-mix(in oklab, var(--color-indigo-50) 60%, transparent)}}.bg-indigo-50\\/80{background-color:#eef2ffcc}@supports (color:color-mix(in lab, red, red)){.bg-indigo-50\\/80{background-color:color-mix(in oklab, var(--color-indigo-50) 80%, transparent)}}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-indigo-900{background-color:var(--color-indigo-900)}.bg-red-600{background-color:var(--color-red-600)}.bg-rose-50{background-color:var(--color-rose-50)}.bg-rose-100{background-color:var(--color-rose-100)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-900{background-color:var(--color-slate-900)}.bg-white{background-color:var(--color-white)}.bg-white\\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.bg-white\\/90{background-color:color-mix(in oklab, var(--color-white) 90%, transparent)}}.bg-white\\/95{background-color:#fffffff2}@supports (color:color-mix(in lab, red, red)){.bg-white\\/95{background-color:color-mix(in oklab, var(--color-white) 95%, transparent)}}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pl-1{padding-left:var(--spacing)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[11px\\]{font-size:11px}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.whitespace-nowrap{white-space:nowrap}.text-amber-700{color:var(--color-amber-700)}.text-blue-100{color:var(--color-blue-100)}.text-blue-800{color:var(--color-blue-800)}.text-blue-900{color:var(--color-blue-900)}.text-emerald-100{color:var(--color-emerald-100)}.text-emerald-700{color:var(--color-emerald-700)}.text-emerald-800{color:var(--color-emerald-800)}.text-emerald-900{color:var(--color-emerald-900)}.text-indigo-100{color:var(--color-indigo-100)}.text-indigo-600{color:var(--color-indigo-600)}.text-indigo-700{color:var(--color-indigo-700)}.text-indigo-800{color:var(--color-indigo-800)}.text-indigo-900{color:var(--color-indigo-900)}.text-red-600{color:var(--color-red-600)}.text-rose-500{color:var(--color-rose-500)}.text-rose-600{color:var(--color-rose-600)}.text-rose-700{color:var(--color-rose-700)}.text-slate-100{color:var(--color-slate-100)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-85{opacity:.85}.opacity-90{opacity:.9}.opacity-100{opacity:1}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.group-hover\\:bg-indigo-300\\/50:is(:where(.group):hover *){background-color:#a4b3ff80}@supports (color:color-mix(in lab, red, red)){.group-hover\\:bg-indigo-300\\/50:is(:where(.group):hover *){background-color:color-mix(in oklab, var(--color-indigo-300) 50%, transparent)}}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.last\\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media (hover:hover){.hover\\:border-slate-300:hover{border-color:var(--color-slate-300)}.hover\\:\\!bg-indigo-500:hover{background-color:var(--color-indigo-500)!important}.hover\\:bg-emerald-200:hover{background-color:var(--color-emerald-200)}.hover\\:bg-emerald-700:hover{background-color:var(--color-emerald-700)}.hover\\:bg-indigo-100:hover{background-color:var(--color-indigo-100)}.hover\\:bg-indigo-500:hover{background-color:var(--color-indigo-500)}.hover\\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\\:bg-rose-200:hover{background-color:var(--color-rose-200)}.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\\:text-indigo-800:hover{color:var(--color-indigo-800)}.hover\\:text-rose-400:hover{color:var(--color-rose-400)}.hover\\:text-slate-500:hover{color:var(--color-slate-500)}.hover\\:text-slate-600:hover{color:var(--color-slate-600)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:opacity-80:hover{opacity:.8}}.focus\\:border-indigo-500:focus{border-color:var(--color-indigo-500)}.focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-indigo-500:focus{--tw-ring-color:var(--color-indigo-500)}.focus\\:ring-indigo-500\\/20:focus{--tw-ring-color:#625fff33}@supports (color:color-mix(in lab, red, red)){.focus\\:ring-indigo-500\\/20:focus{--tw-ring-color:color-mix(in oklab, var(--color-indigo-500) 20%, transparent)}}.focus\\:ring-red-400:focus{--tw-ring-color:var(--color-red-400)}.focus\\:ring-slate-400:focus{--tw-ring-color:var(--color-slate-400)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\\:cursor-grabbing:active{cursor:grabbing}.disabled\\:opacity-40:disabled{opacity:.4}@media (hover:hover){.disabled\\:hover\\:bg-transparent:disabled:hover{background-color:#0000}}@media (width>=40rem){.sm\\:flex-row{flex-direction:row}.sm\\:items-center{align-items:center}.sm\\:justify-between{justify-content:space-between}.sm\\:p-6{padding:calc(var(--spacing) * 6)}}@media (width>=64rem){.lg\\:flex-row{flex-direction:row}.lg\\:items-center{align-items:center}.lg\\:justify-between{justify-content:space-between}.lg\\:p-10{padding:calc(var(--spacing) * 10)}}}*{box-sizing:border-box}body{color:#0f172a;background:#f8fafc;margin:0;font-family:Inter,ui-sans-serif,system-ui,sans-serif}button,input,select{font:inherit}button{cursor:pointer}@property --tw-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\"*\";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-tracking{syntax:\"*\";inherits:false}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:\"*\";inherits:false}@property --tw-brightness{syntax:\"*\";inherits:false}@property --tw-contrast{syntax:\"*\";inherits:false}@property --tw-grayscale{syntax:\"*\";inherits:false}@property --tw-hue-rotate{syntax:\"*\";inherits:false}@property --tw-invert{syntax:\"*\";inherits:false}@property --tw-opacity{syntax:\"*\";inherits:false}@property --tw-saturate{syntax:\"*\";inherits:false}@property --tw-sepia{syntax:\"*\";inherits:false}@property --tw-drop-shadow{syntax:\"*\";inherits:false}@property --tw-drop-shadow-color{syntax:\"*\";inherits:false}@property --tw-drop-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:\"*\";inherits:false}@property --tw-duration{syntax:\"*\";inherits:false}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}";
|
|
871
917
|
//#endregion
|
|
872
918
|
//#region src/index.js
|
|
873
919
|
if (typeof document < "u") {
|
|
874
920
|
let e = "react-flexi-datatable-styles";
|
|
875
921
|
if (!document.getElementById(e)) {
|
|
876
922
|
let t = document.createElement("style");
|
|
877
|
-
t.id = e, t.textContent =
|
|
923
|
+
t.id = e, t.textContent = h, document.head.appendChild(t);
|
|
878
924
|
}
|
|
879
925
|
}
|
|
880
|
-
var
|
|
926
|
+
var g = m;
|
|
881
927
|
//#endregion
|
|
882
|
-
export {
|
|
928
|
+
export { m as DataTable, g as default };
|