jcicl 0.0.301 → 0.0.305

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