jcicl 0.0.299 → 0.0.303

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