jcicl 0.0.289 → 0.0.293
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/AppContainer/AppContainer.d.ts +1 -0
- package/AppContainer/AppContainer.js +414 -413
- package/Table/Table.d.ts +9 -1
- package/Table/Table.js +581 -1
- package/Table/index.d.ts +1 -0
- package/Table/index.js +4 -0
- package/package.json +2 -1
package/Table/Table.d.ts
CHANGED
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface TableProps {
|
|
3
|
+
data: Record<string, any>[];
|
|
4
|
+
columnTitles?: Record<string, string>;
|
|
5
|
+
rowsPerPage?: number;
|
|
6
|
+
title?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const Table: React.FC<TableProps>;
|
|
9
|
+
export default Table;
|
package/Table/Table.js
CHANGED
|
@@ -1 +1,581 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsxs as s, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import ue, { forwardRef as q, createElement as T, useState as C, useMemo as v } from "react";
|
|
3
|
+
import { n as a } from "../.chunks/emotion-styled.browser.esm.js";
|
|
4
|
+
/**
|
|
5
|
+
* @license lucide-react v0.525.0 - ISC
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the ISC license.
|
|
8
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/
|
|
10
|
+
const xe = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ge = (t) => t.replace(
|
|
11
|
+
/^([A-Z])|[\s-_]+(\w)/g,
|
|
12
|
+
(i, c, u) => u ? u.toUpperCase() : c.toLowerCase()
|
|
13
|
+
), H = (t) => {
|
|
14
|
+
const i = ge(t);
|
|
15
|
+
return i.charAt(0).toUpperCase() + i.slice(1);
|
|
16
|
+
}, K = (...t) => t.filter((i, c, u) => !!i && i.trim() !== "" && u.indexOf(i) === c).join(" ").trim(), be = (t) => {
|
|
17
|
+
for (const i in t)
|
|
18
|
+
if (i.startsWith("aria-") || i === "role" || i === "title")
|
|
19
|
+
return !0;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @license lucide-react v0.525.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/
|
|
27
|
+
var Ce = {
|
|
28
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
29
|
+
width: 24,
|
|
30
|
+
height: 24,
|
|
31
|
+
viewBox: "0 0 24 24",
|
|
32
|
+
fill: "none",
|
|
33
|
+
stroke: "currentColor",
|
|
34
|
+
strokeWidth: 2,
|
|
35
|
+
strokeLinecap: "round",
|
|
36
|
+
strokeLinejoin: "round"
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* @license lucide-react v0.525.0 - ISC
|
|
40
|
+
*
|
|
41
|
+
* This source code is licensed under the ISC license.
|
|
42
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
43
|
+
*/
|
|
44
|
+
const ye = q(
|
|
45
|
+
({
|
|
46
|
+
color: t = "currentColor",
|
|
47
|
+
size: i = 24,
|
|
48
|
+
strokeWidth: c = 2,
|
|
49
|
+
absoluteStrokeWidth: u,
|
|
50
|
+
className: n = "",
|
|
51
|
+
children: p,
|
|
52
|
+
iconNode: z,
|
|
53
|
+
...d
|
|
54
|
+
}, A) => T(
|
|
55
|
+
"svg",
|
|
56
|
+
{
|
|
57
|
+
ref: A,
|
|
58
|
+
...Ce,
|
|
59
|
+
width: i,
|
|
60
|
+
height: i,
|
|
61
|
+
stroke: t,
|
|
62
|
+
strokeWidth: u ? Number(c) * 24 / Number(i) : c,
|
|
63
|
+
className: K("lucide", n),
|
|
64
|
+
...!p && !be(d) && { "aria-hidden": "true" },
|
|
65
|
+
...d
|
|
66
|
+
},
|
|
67
|
+
[
|
|
68
|
+
...z.map(([g, y]) => T(g, y)),
|
|
69
|
+
...Array.isArray(p) ? p : [p]
|
|
70
|
+
]
|
|
71
|
+
)
|
|
72
|
+
);
|
|
73
|
+
/**
|
|
74
|
+
* @license lucide-react v0.525.0 - ISC
|
|
75
|
+
*
|
|
76
|
+
* This source code is licensed under the ISC license.
|
|
77
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
+
*/
|
|
79
|
+
const S = (t, i) => {
|
|
80
|
+
const c = q(
|
|
81
|
+
({ className: u, ...n }, p) => T(ye, {
|
|
82
|
+
ref: p,
|
|
83
|
+
iconNode: i,
|
|
84
|
+
className: K(
|
|
85
|
+
`lucide-${xe(H(t))}`,
|
|
86
|
+
`lucide-${t}`,
|
|
87
|
+
u
|
|
88
|
+
),
|
|
89
|
+
...n
|
|
90
|
+
})
|
|
91
|
+
);
|
|
92
|
+
return c.displayName = H(t), c;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* @license lucide-react v0.525.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/
|
|
100
|
+
const ke = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], M = S("chevron-down", ke);
|
|
101
|
+
/**
|
|
102
|
+
* @license lucide-react v0.525.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/
|
|
107
|
+
const we = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], O = S("chevron-up", we);
|
|
108
|
+
/**
|
|
109
|
+
* @license lucide-react v0.525.0 - ISC
|
|
110
|
+
*
|
|
111
|
+
* This source code is licensed under the ISC license.
|
|
112
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
+
*/
|
|
114
|
+
const me = [
|
|
115
|
+
[
|
|
116
|
+
"path",
|
|
117
|
+
{
|
|
118
|
+
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
|
|
119
|
+
key: "ct8e1f"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
["path", { d: "M14.084 14.158a3 3 0 0 1-4.242-4.242", key: "151rxh" }],
|
|
123
|
+
[
|
|
124
|
+
"path",
|
|
125
|
+
{
|
|
126
|
+
d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",
|
|
127
|
+
key: "13bj9a"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
131
|
+
], Se = S("eye-off", me);
|
|
132
|
+
/**
|
|
133
|
+
* @license lucide-react v0.525.0 - ISC
|
|
134
|
+
*
|
|
135
|
+
* This source code is licensed under the ISC license.
|
|
136
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
+
*/
|
|
138
|
+
const ve = [
|
|
139
|
+
[
|
|
140
|
+
"path",
|
|
141
|
+
{
|
|
142
|
+
d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
|
|
143
|
+
key: "1nclc0"
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
147
|
+
], ze = S("eye", ve);
|
|
148
|
+
/**
|
|
149
|
+
* @license lucide-react v0.525.0 - ISC
|
|
150
|
+
*
|
|
151
|
+
* This source code is licensed under the ISC license.
|
|
152
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
153
|
+
*/
|
|
154
|
+
const Ae = [
|
|
155
|
+
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
156
|
+
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
157
|
+
], U = S("search", Ae);
|
|
158
|
+
/**
|
|
159
|
+
* @license lucide-react v0.525.0 - ISC
|
|
160
|
+
*
|
|
161
|
+
* This source code is licensed under the ISC license.
|
|
162
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
163
|
+
*/
|
|
164
|
+
const Be = [
|
|
165
|
+
[
|
|
166
|
+
"path",
|
|
167
|
+
{
|
|
168
|
+
d: "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",
|
|
169
|
+
key: "1qme2f"
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
173
|
+
], Ie = S("settings", Be);
|
|
174
|
+
let m = "";
|
|
175
|
+
const Te = ({
|
|
176
|
+
data: t = [],
|
|
177
|
+
columnTitles: i = {},
|
|
178
|
+
rowsPerPage: c = 19,
|
|
179
|
+
title: u = "Data Table"
|
|
180
|
+
}) => {
|
|
181
|
+
const [n, p] = C(1), [, z] = C(""), [d, A] = C({ key: "", direction: "asc" }), [g, y] = C(/* @__PURE__ */ new Set()), [B, j] = C(/* @__PURE__ */ new Set()), [W, Y] = C(!1), [L, Z] = C(!1), h = v(() => t.length === 0 ? [] : Object.keys(t[0]), [t]);
|
|
182
|
+
ue.useEffect(() => {
|
|
183
|
+
h.length > 0 && (j(new Set(h)), y(new Set(h)));
|
|
184
|
+
}, [h]);
|
|
185
|
+
const I = v(() => {
|
|
186
|
+
if (!m) return t;
|
|
187
|
+
const e = g.size > 0 ? g : new Set(h);
|
|
188
|
+
return t.filter((r) => Array.from(e).some((l) => {
|
|
189
|
+
const x = r[l];
|
|
190
|
+
return x && x.toString().toLowerCase().includes(m.toLowerCase());
|
|
191
|
+
}));
|
|
192
|
+
}, [t, m, g, h]), k = v(() => d.key ? [...I].sort((e, r) => e[d.key] < r[d.key] ? d.direction === "asc" ? -1 : 1 : e[d.key] > r[d.key] ? d.direction === "asc" ? 1 : -1 : 0) : I, [I, d]), G = v(() => {
|
|
193
|
+
const e = (n - 1) * c;
|
|
194
|
+
return k.slice(e, e + c);
|
|
195
|
+
}, [k, n, c]), f = Math.ceil(k.length / c), J = (e) => {
|
|
196
|
+
A((r) => ({
|
|
197
|
+
key: e,
|
|
198
|
+
direction: r.key === e && r.direction === "asc" ? "desc" : "asc"
|
|
199
|
+
}));
|
|
200
|
+
}, Q = (e) => {
|
|
201
|
+
y((r) => {
|
|
202
|
+
const l = new Set(r);
|
|
203
|
+
return l.has(e) ? l.delete(e) : l.add(e), l;
|
|
204
|
+
});
|
|
205
|
+
}, X = () => {
|
|
206
|
+
g.size === h.length ? y(/* @__PURE__ */ new Set()) : y(new Set(h));
|
|
207
|
+
}, P = (e) => {
|
|
208
|
+
j((r) => {
|
|
209
|
+
const l = new Set(r);
|
|
210
|
+
return l.has(e) ? l.delete(e) : l.add(e), l;
|
|
211
|
+
});
|
|
212
|
+
}, ee = (e) => {
|
|
213
|
+
m = e;
|
|
214
|
+
}, R = () => {
|
|
215
|
+
z(m);
|
|
216
|
+
}, $ = h.filter((e) => B.has(e)), b = {
|
|
217
|
+
thActive: {
|
|
218
|
+
backgroundColor: "#009200",
|
|
219
|
+
color: "#ffffff"
|
|
220
|
+
},
|
|
221
|
+
paginationButtonActive: {
|
|
222
|
+
backgroundColor: "#009200",
|
|
223
|
+
color: "#ffffff",
|
|
224
|
+
borderColor: "#009200"
|
|
225
|
+
},
|
|
226
|
+
paginationButtonDisabled: {
|
|
227
|
+
opacity: 0.5,
|
|
228
|
+
cursor: "not-allowed"
|
|
229
|
+
},
|
|
230
|
+
info: {
|
|
231
|
+
fontSize: "14px",
|
|
232
|
+
color: "#666666",
|
|
233
|
+
textAlign: "center",
|
|
234
|
+
marginTop: "10px"
|
|
235
|
+
}
|
|
236
|
+
}, oe = a("div")({
|
|
237
|
+
backgroundColor: "#ffffff",
|
|
238
|
+
borderRadius: "8px",
|
|
239
|
+
boxShadow: "0 2px 10px rgba(0, 0, 0, 0.1)",
|
|
240
|
+
padding: "20px",
|
|
241
|
+
fontFamily: "Arial, sans-serif",
|
|
242
|
+
maxWidth: "100%",
|
|
243
|
+
overflow: "auto"
|
|
244
|
+
}), te = a("div")({
|
|
245
|
+
display: "flex",
|
|
246
|
+
justifyContent: "space-between",
|
|
247
|
+
alignItems: "center",
|
|
248
|
+
marginBottom: "20px",
|
|
249
|
+
flexWrap: "wrap",
|
|
250
|
+
gap: "10px"
|
|
251
|
+
}), ne = a("h2")({
|
|
252
|
+
fontSize: "24px",
|
|
253
|
+
fontWeight: "bold",
|
|
254
|
+
color: "#000000",
|
|
255
|
+
margin: 0
|
|
256
|
+
}), re = a("div")({
|
|
257
|
+
display: "flex",
|
|
258
|
+
gap: "15px",
|
|
259
|
+
alignItems: "center",
|
|
260
|
+
flexWrap: "wrap"
|
|
261
|
+
}), ie = a("div")({
|
|
262
|
+
position: "relative",
|
|
263
|
+
display: "flex",
|
|
264
|
+
alignItems: "center",
|
|
265
|
+
gap: "10px"
|
|
266
|
+
}), ae = a(U)({
|
|
267
|
+
position: "absolute",
|
|
268
|
+
left: "13px",
|
|
269
|
+
top: "10px",
|
|
270
|
+
color: "#666666",
|
|
271
|
+
width: "19px",
|
|
272
|
+
height: "19px",
|
|
273
|
+
transition: "all 313ms ease",
|
|
274
|
+
"&:focus, &:hover, &:focus-within": {
|
|
275
|
+
cursor: "pointer",
|
|
276
|
+
color: "#009200"
|
|
277
|
+
}
|
|
278
|
+
}), se = a("input")({
|
|
279
|
+
padding: "10px 15px 10px 40px",
|
|
280
|
+
border: "2px solid #e0e0e0",
|
|
281
|
+
borderRadius: "25px",
|
|
282
|
+
fontSize: "14px",
|
|
283
|
+
width: "250px",
|
|
284
|
+
transition: "all 313ms ease",
|
|
285
|
+
outline: "none",
|
|
286
|
+
backgroundColor: "#ffffff",
|
|
287
|
+
"&:focus, &:hover, &:focus-within": {
|
|
288
|
+
borderColor: "#009200",
|
|
289
|
+
boxShadow: "0 0 0 3px rgba(0, 146, 0, 0.1)"
|
|
290
|
+
}
|
|
291
|
+
}), N = a("button")({
|
|
292
|
+
padding: "10px 15px",
|
|
293
|
+
border: "2px solid #009200",
|
|
294
|
+
borderRadius: "6px",
|
|
295
|
+
backgroundColor: "#ffffff",
|
|
296
|
+
color: "#009200",
|
|
297
|
+
cursor: "pointer",
|
|
298
|
+
display: "flex",
|
|
299
|
+
alignItems: "center",
|
|
300
|
+
gap: "8px",
|
|
301
|
+
fontSize: "14px",
|
|
302
|
+
fontWeight: "500",
|
|
303
|
+
transition: "all 0.3s ease",
|
|
304
|
+
outline: "none",
|
|
305
|
+
"&:focus, &:hover, &:focus-within": {
|
|
306
|
+
backgroundColor: "#009200",
|
|
307
|
+
color: "#ffffff",
|
|
308
|
+
transform: "translateY(-1px)",
|
|
309
|
+
boxShadow: "0 4px 12px rgba(0, 146, 0, 0.3)"
|
|
310
|
+
}
|
|
311
|
+
}), E = a("div")({
|
|
312
|
+
position: "absolute",
|
|
313
|
+
top: "100%",
|
|
314
|
+
right: 0,
|
|
315
|
+
marginTop: "5px",
|
|
316
|
+
backgroundColor: "#ffffff",
|
|
317
|
+
border: "1px solid #e0e0e0",
|
|
318
|
+
borderRadius: "6px",
|
|
319
|
+
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.15)",
|
|
320
|
+
zIndex: 1e3,
|
|
321
|
+
minWidth: "200px",
|
|
322
|
+
maxHeight: "300px",
|
|
323
|
+
overflowY: "auto"
|
|
324
|
+
}), _ = a("div")({
|
|
325
|
+
padding: "12px 16px",
|
|
326
|
+
display: "flex",
|
|
327
|
+
alignItems: "center",
|
|
328
|
+
gap: "10px",
|
|
329
|
+
cursor: "pointer",
|
|
330
|
+
fontSize: "14px",
|
|
331
|
+
color: "#333333",
|
|
332
|
+
transition: "all 0.2s ease",
|
|
333
|
+
"&:focus, &:hover, &:focus-within": {
|
|
334
|
+
backgroundColor: "#f0f8f0",
|
|
335
|
+
color: "#005c00"
|
|
336
|
+
}
|
|
337
|
+
}), D = a("input")({
|
|
338
|
+
width: "16px",
|
|
339
|
+
height: "16px",
|
|
340
|
+
accentColor: "#009200"
|
|
341
|
+
}), ce = a("table")({
|
|
342
|
+
width: "100%",
|
|
343
|
+
borderCollapse: "collapse",
|
|
344
|
+
backgroundColor: "#ffffff",
|
|
345
|
+
borderRadius: "8px",
|
|
346
|
+
overflow: "hidden",
|
|
347
|
+
boxShadow: "0 1px 3px rgba(0, 0, 0, 0.1)"
|
|
348
|
+
}), le = a("th")({
|
|
349
|
+
backgroundColor: "#f8f9fa",
|
|
350
|
+
color: "#333333",
|
|
351
|
+
padding: "16px 12px",
|
|
352
|
+
textAlign: "left",
|
|
353
|
+
fontSize: "14px",
|
|
354
|
+
fontWeight: "600",
|
|
355
|
+
borderBottom: "2px solid #e0e0e0",
|
|
356
|
+
cursor: "pointer",
|
|
357
|
+
userSelect: "none",
|
|
358
|
+
transition: "all 0.2s ease",
|
|
359
|
+
position: "relative",
|
|
360
|
+
whiteSpace: "nowrap",
|
|
361
|
+
"&:focus, &:hover, &:focus-within": {
|
|
362
|
+
backgroundColor: "#e8f5e8",
|
|
363
|
+
color: "#005c00"
|
|
364
|
+
}
|
|
365
|
+
}), de = a("td")({
|
|
366
|
+
padding: "14px 12px",
|
|
367
|
+
borderBottom: "1px solid #f0f0f0",
|
|
368
|
+
fontSize: "14px",
|
|
369
|
+
color: "#333333",
|
|
370
|
+
transition: "all 0.2s ease"
|
|
371
|
+
}), pe = a("span")({
|
|
372
|
+
marginLeft: "8px",
|
|
373
|
+
opacity: 0.6
|
|
374
|
+
}), F = a("tr")({
|
|
375
|
+
transition: "all 0.2s ease",
|
|
376
|
+
cursor: "pointer",
|
|
377
|
+
"&:focus, &:hover, &:focus-within": {
|
|
378
|
+
backgroundColor: "#f8fff8"
|
|
379
|
+
}
|
|
380
|
+
}), he = a("div")({
|
|
381
|
+
display: "flex",
|
|
382
|
+
justifyContent: "center",
|
|
383
|
+
alignItems: "center",
|
|
384
|
+
marginTop: "20px",
|
|
385
|
+
gap: "10px"
|
|
386
|
+
}), w = a("button")({
|
|
387
|
+
padding: "8px 12px",
|
|
388
|
+
border: "1px solid #e0e0e0",
|
|
389
|
+
borderRadius: "4px",
|
|
390
|
+
backgroundColor: "#ffffff",
|
|
391
|
+
color: "#333333",
|
|
392
|
+
cursor: "pointer",
|
|
393
|
+
fontSize: "14px",
|
|
394
|
+
transition: "all 0.2s ease",
|
|
395
|
+
outline: "none",
|
|
396
|
+
"&:focus, &:hover, &:focus-within": {
|
|
397
|
+
backgroundColor: "#009200",
|
|
398
|
+
color: "#ffffff",
|
|
399
|
+
borderColor: "#009200"
|
|
400
|
+
},
|
|
401
|
+
"&:disabled": {
|
|
402
|
+
opacity: 0.5,
|
|
403
|
+
cursor: "not-allowed"
|
|
404
|
+
}
|
|
405
|
+
}), fe = a("div")({
|
|
406
|
+
fontSize: "14px",
|
|
407
|
+
color: "#666666",
|
|
408
|
+
textAlign: "center",
|
|
409
|
+
marginTop: "10px"
|
|
410
|
+
}), V = a("span")({
|
|
411
|
+
padding: "8px 4px",
|
|
412
|
+
color: "#666666",
|
|
413
|
+
fontSize: "14px"
|
|
414
|
+
});
|
|
415
|
+
return /* @__PURE__ */ s(oe, { children: [
|
|
416
|
+
/* @__PURE__ */ s(te, { children: [
|
|
417
|
+
/* @__PURE__ */ o(ne, { children: u }),
|
|
418
|
+
/* @__PURE__ */ s(re, { children: [
|
|
419
|
+
/* @__PURE__ */ s(ie, { children: [
|
|
420
|
+
/* @__PURE__ */ s("div", { style: { position: "relative" }, children: [
|
|
421
|
+
/* @__PURE__ */ o(ae, { onClick: R }),
|
|
422
|
+
/* @__PURE__ */ o(
|
|
423
|
+
se,
|
|
424
|
+
{
|
|
425
|
+
type: "text",
|
|
426
|
+
placeholder: "Search...",
|
|
427
|
+
defaultValue: m,
|
|
428
|
+
onChange: (e) => ee(e.target.value),
|
|
429
|
+
onKeyDown: (e) => {
|
|
430
|
+
e.key === "Enter" && R();
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
)
|
|
434
|
+
] }),
|
|
435
|
+
/* @__PURE__ */ s("div", { style: { position: "relative" }, children: [
|
|
436
|
+
/* @__PURE__ */ s(N, { onClick: () => Z(!L), children: [
|
|
437
|
+
/* @__PURE__ */ o(U, { size: 16 }),
|
|
438
|
+
"Fields",
|
|
439
|
+
/* @__PURE__ */ o(M, { size: 16 })
|
|
440
|
+
] }),
|
|
441
|
+
L && /* @__PURE__ */ s(E, { children: [
|
|
442
|
+
/* @__PURE__ */ s(_, { onClick: X, children: [
|
|
443
|
+
/* @__PURE__ */ o(
|
|
444
|
+
D,
|
|
445
|
+
{
|
|
446
|
+
type: "checkbox",
|
|
447
|
+
checked: g.size === h.length,
|
|
448
|
+
onChange: () => {
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
),
|
|
452
|
+
/* @__PURE__ */ o("span", { style: { fontWeight: "bold" }, children: "All" })
|
|
453
|
+
] }),
|
|
454
|
+
/* @__PURE__ */ o("div", { style: { height: "1px", backgroundColor: "#e0e0e0", margin: "4px 0" } }),
|
|
455
|
+
h.map((e) => /* @__PURE__ */ s(_, { onClick: () => Q(e), children: [
|
|
456
|
+
/* @__PURE__ */ o(D, { type: "checkbox", checked: g.has(e), onChange: () => {
|
|
457
|
+
} }),
|
|
458
|
+
/* @__PURE__ */ o("span", { children: i[e] || e })
|
|
459
|
+
] }, e))
|
|
460
|
+
] })
|
|
461
|
+
] })
|
|
462
|
+
] }),
|
|
463
|
+
/* @__PURE__ */ s("div", { style: { position: "relative" }, children: [
|
|
464
|
+
/* @__PURE__ */ s(N, { onClick: () => Y(!W), children: [
|
|
465
|
+
/* @__PURE__ */ o(Ie, { size: 16 }),
|
|
466
|
+
"Columns",
|
|
467
|
+
/* @__PURE__ */ o(M, { size: 16 })
|
|
468
|
+
] }),
|
|
469
|
+
W && /* @__PURE__ */ o(E, { children: h.map((e) => /* @__PURE__ */ s(_, { onClick: () => P(e), children: [
|
|
470
|
+
/* @__PURE__ */ o(D, { type: "checkbox", checked: B.has(e), onChange: () => {
|
|
471
|
+
} }),
|
|
472
|
+
B.has(e) ? /* @__PURE__ */ o(ze, { size: 16 }) : /* @__PURE__ */ o(Se, { size: 16 }),
|
|
473
|
+
/* @__PURE__ */ o("span", { children: i[e] || e })
|
|
474
|
+
] }, e)) })
|
|
475
|
+
] })
|
|
476
|
+
] })
|
|
477
|
+
] }),
|
|
478
|
+
/* @__PURE__ */ s(ce, { children: [
|
|
479
|
+
/* @__PURE__ */ o("thead", { children: /* @__PURE__ */ o(F, { children: $.map((e) => /* @__PURE__ */ s(
|
|
480
|
+
le,
|
|
481
|
+
{
|
|
482
|
+
style: d.key === e ? b.thActive : {},
|
|
483
|
+
onClick: () => J(e),
|
|
484
|
+
children: [
|
|
485
|
+
i[e] || e,
|
|
486
|
+
/* @__PURE__ */ o(pe, { children: d.key === e ? d.direction === "asc" ? /* @__PURE__ */ o(O, { size: 16 }) : /* @__PURE__ */ o(M, { size: 16 }) : /* @__PURE__ */ o(O, { size: 16, style: { opacity: 0.313 } }) })
|
|
487
|
+
]
|
|
488
|
+
},
|
|
489
|
+
e
|
|
490
|
+
)) }) }),
|
|
491
|
+
/* @__PURE__ */ o("tbody", { children: G.map((e, r) => /* @__PURE__ */ o(F, { children: $.map((l) => /* @__PURE__ */ o(de, { children: e[l] }, l)) }, r)) })
|
|
492
|
+
] }),
|
|
493
|
+
/* @__PURE__ */ s(he, { children: [
|
|
494
|
+
/* @__PURE__ */ o(
|
|
495
|
+
w,
|
|
496
|
+
{
|
|
497
|
+
style: n === 1 ? b.paginationButtonDisabled : {},
|
|
498
|
+
onClick: () => p(Math.max(1, n - 1)),
|
|
499
|
+
disabled: n === 1,
|
|
500
|
+
children: "Previous"
|
|
501
|
+
}
|
|
502
|
+
),
|
|
503
|
+
(() => {
|
|
504
|
+
const e = [];
|
|
505
|
+
if (f <= 5)
|
|
506
|
+
for (let r = 1; r <= f; r++)
|
|
507
|
+
e.push(
|
|
508
|
+
/* @__PURE__ */ o(
|
|
509
|
+
w,
|
|
510
|
+
{
|
|
511
|
+
style: n === r ? b.paginationButtonActive : {},
|
|
512
|
+
onClick: () => p(r),
|
|
513
|
+
children: r
|
|
514
|
+
},
|
|
515
|
+
r
|
|
516
|
+
)
|
|
517
|
+
);
|
|
518
|
+
else {
|
|
519
|
+
e.push(
|
|
520
|
+
/* @__PURE__ */ o(
|
|
521
|
+
w,
|
|
522
|
+
{
|
|
523
|
+
style: n === 1 ? b.paginationButtonActive : {},
|
|
524
|
+
onClick: () => p(1),
|
|
525
|
+
children: "1"
|
|
526
|
+
},
|
|
527
|
+
1
|
|
528
|
+
)
|
|
529
|
+
), n > 3 && e.push(/* @__PURE__ */ o(V, { children: "..." }, "ellipsis1"));
|
|
530
|
+
const r = Math.max(2, n - 1), l = Math.min(f - 1, n + 1);
|
|
531
|
+
for (let x = r; x <= l; x++)
|
|
532
|
+
e.push(
|
|
533
|
+
/* @__PURE__ */ o(
|
|
534
|
+
w,
|
|
535
|
+
{
|
|
536
|
+
style: n === x ? b.paginationButtonActive : {},
|
|
537
|
+
onClick: () => p(x),
|
|
538
|
+
children: x
|
|
539
|
+
},
|
|
540
|
+
x
|
|
541
|
+
)
|
|
542
|
+
);
|
|
543
|
+
n < f - 2 && e.push(/* @__PURE__ */ o(V, { children: "..." }, "ellipsis2")), f > 1 && e.push(
|
|
544
|
+
/* @__PURE__ */ o(
|
|
545
|
+
w,
|
|
546
|
+
{
|
|
547
|
+
style: n === f ? b.paginationButtonActive : {},
|
|
548
|
+
onClick: () => p(f),
|
|
549
|
+
children: f
|
|
550
|
+
},
|
|
551
|
+
f
|
|
552
|
+
)
|
|
553
|
+
);
|
|
554
|
+
}
|
|
555
|
+
return e;
|
|
556
|
+
})(),
|
|
557
|
+
/* @__PURE__ */ o(
|
|
558
|
+
w,
|
|
559
|
+
{
|
|
560
|
+
style: n === f ? b.paginationButtonDisabled : {},
|
|
561
|
+
onClick: () => p(Math.min(f, n + 1)),
|
|
562
|
+
disabled: n === f,
|
|
563
|
+
children: "Next"
|
|
564
|
+
}
|
|
565
|
+
)
|
|
566
|
+
] }),
|
|
567
|
+
/* @__PURE__ */ s(fe, { children: [
|
|
568
|
+
"Showing ",
|
|
569
|
+
Math.min((n - 1) * c + 1, k.length),
|
|
570
|
+
" to",
|
|
571
|
+
" ",
|
|
572
|
+
Math.min(n * c, k.length),
|
|
573
|
+
" of ",
|
|
574
|
+
k.length,
|
|
575
|
+
" entries"
|
|
576
|
+
] })
|
|
577
|
+
] });
|
|
578
|
+
};
|
|
579
|
+
export {
|
|
580
|
+
Te as default
|
|
581
|
+
};
|
package/Table/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, type TableProps } from './Table';
|
package/Table/index.js
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jcicl",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.293",
|
|
5
5
|
"description": "Component library for the websites of Johnson County Iowa",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://devops.jc.net/JCIT/Business%20Solutions%20Delivery/_git/JCComponentLibrary?path=%2FREADME.md&version=GBmaster",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"@mui/icons-material": "^6.1.3",
|
|
21
21
|
"@mui/material": "^6.1.1",
|
|
22
22
|
"@react-hook/resize-observer": "^2.0.2",
|
|
23
|
+
"lucide-react": "^0.525.0",
|
|
23
24
|
"overlayscrollbars-react": "^0.5.6",
|
|
24
25
|
"react-device-detect": "^2.2.3"
|
|
25
26
|
}
|