jcicl 0.0.299 → 0.0.301

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 +230 -207
  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 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";
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: m = "",
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", m),
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, ...m }, 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
+ ...m
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 We = [
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", We);
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 Re = [
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", Re);
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: m,
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] = 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(() => {
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 f = o[a];
193
+ return f && f.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
+ }, f = [
201
+ e.join(","),
202
+ // header row
203
+ ...g.map((S) => I.map((j) => o(S[j])).join(","))
204
+ ].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) => ({
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
+ }, C = {
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
+ }), he = 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
+ }), fe = 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
+ }), W = 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
+ }), R = 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,28 @@ 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")({
377
399
  transition: "all 0.2s ease",
378
400
  cursor: "pointer",
379
401
  "&:focus, &:hover, &:focus-within": {
380
402
  backgroundColor: "#f8fff8"
381
403
  }
382
- }), ue = a("div")({
404
+ }), ye = i("div")({
383
405
  display: "flex",
384
406
  justifyContent: "center",
385
407
  alignItems: "center",
386
408
  marginTop: "20px",
387
409
  gap: "10px"
388
- }), w = a("button")({
410
+ }), k = i("button")({
389
411
  padding: "8px 12px",
390
412
  border: "1px solid #e0e0e0",
391
413
  borderRadius: "4px",
@@ -404,150 +426,151 @@ const We = ({
404
426
  opacity: 0.5,
405
427
  cursor: "not-allowed"
406
428
  }
407
- }), xe = a("div")({
429
+ }), me = i("div")({
408
430
  fontSize: "14px",
409
431
  color: "#666666",
410
432
  textAlign: "center",
411
433
  marginTop: "10px"
412
- }), O = a("span")({
434
+ }), K = i("span")({
413
435
  padding: "8px 4px",
414
436
  color: "#666666",
415
437
  fontSize: "14px"
416
438
  });
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
- }
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" })
444
+ ] }),
445
+ /* @__PURE__ */ c(pe, { children: [
446
+ /* @__PURE__ */ c(he, { children: [
447
+ /* @__PURE__ */ t(fe, { onClick: U }),
448
+ /* @__PURE__ */ t(
449
+ ue,
450
+ {
451
+ type: "text",
452
+ placeholder: "Search...",
453
+ defaultValue: v,
454
+ onChange: (e) => se(e.target.value),
455
+ onKeyDown: (e) => {
456
+ e.key === "Enter" && U();
434
457
  }
435
- )
458
+ }
459
+ )
460
+ ] }),
461
+ /* @__PURE__ */ c("div", { style: { position: "relative" }, children: [
462
+ /* @__PURE__ */ c(O, { onClick: () => P(!F), children: [
463
+ /* @__PURE__ */ t(G, { size: 16 }),
464
+ "Fields",
465
+ /* @__PURE__ */ t($, { size: 16 })
436
466
  ] }),
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
- }
467
+ F && /* @__PURE__ */ c(H, { children: [
468
+ /* @__PURE__ */ c(W, { onClick: re, children: [
469
+ /* @__PURE__ */ t(
470
+ R,
471
+ {
472
+ type: "checkbox",
473
+ checked: w.size === p.length,
474
+ onChange: () => {
452
475
  }
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
- ] })
476
+ }
477
+ ),
478
+ /* @__PURE__ */ t("span", { style: { fontWeight: "bold" }, children: "All" })
479
+ ] }),
480
+ /* @__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: () => {
483
+ } }),
484
+ /* @__PURE__ */ t("span", { children: r[e] || e })
485
+ ] }, e))
463
486
  ] })
464
487
  ] }),
465
- /* @__PURE__ */ s("div", { style: { position: "relative" }, children: [
466
- /* @__PURE__ */ s(F, { onClick: () => G(!$), children: [
467
- /* @__PURE__ */ o(De, { size: 16 }),
488
+ /* @__PURE__ */ c("div", { style: { position: "relative" }, children: [
489
+ /* @__PURE__ */ c(O, { onClick: () => X(!V), children: [
490
+ /* @__PURE__ */ t($e, { size: 16 }),
468
491
  "Columns",
469
- /* @__PURE__ */ o(j, { size: 16 })
492
+ /* @__PURE__ */ t($, { size: 16 })
470
493
  ] }),
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: () => {
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: () => {
473
496
  } }),
474
- _.has(e) ? /* @__PURE__ */ o(Be, { size: 16 }) : /* @__PURE__ */ o(ze, { size: 16 }),
475
- /* @__PURE__ */ o("span", { children: r[e] || e })
497
+ T.has(e) ? /* @__PURE__ */ t(Le, { size: 16 }) : /* @__PURE__ */ t(Me, { size: 16 }),
498
+ /* @__PURE__ */ t("span", { children: r[e] || e })
476
499
  ] }, e)) })
477
500
  ] })
478
501
  ] })
479
502
  ] }),
480
- /* @__PURE__ */ s(de, { children: [
481
- /* @__PURE__ */ o("thead", { children: /* @__PURE__ */ o(H, { children: E.map((e) => /* @__PURE__ */ s(
482
- pe,
503
+ /* @__PURE__ */ c(xe, { children: [
504
+ /* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t(q, { children: I.map((e) => /* @__PURE__ */ c(
505
+ ge,
483
506
  {
484
- style: d.key === e ? b.thActive : {},
485
- onClick: () => X(e),
507
+ style: d.key === e ? C.thActive : {},
508
+ onClick: () => oe(e),
486
509
  children: [
487
510
  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 } }) })
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 } }) })
489
512
  ]
490
513
  },
491
514
  e
492
515
  )) }) }),
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)) })
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)) })
494
517
  ] }),
495
- /* @__PURE__ */ s(ue, { children: [
496
- /* @__PURE__ */ o(
497
- w,
518
+ /* @__PURE__ */ c(ye, { children: [
519
+ /* @__PURE__ */ t(
520
+ k,
498
521
  {
499
- style: i === 1 ? b.paginationButtonDisabled : {},
500
- onClick: () => u(Math.max(1, i - 1)),
501
- disabled: i === 1,
522
+ style: s === 1 ? C.paginationButtonDisabled : {},
523
+ onClick: () => x(Math.max(1, s - 1)),
524
+ disabled: s === 1,
502
525
  children: "Previous"
503
526
  }
504
527
  ),
505
528
  (() => {
506
529
  const e = [];
507
530
  if (h <= 5)
508
- for (let n = 1; n <= h; n++)
531
+ for (let o = 1; o <= h; o++)
509
532
  e.push(
510
- /* @__PURE__ */ o(
511
- w,
533
+ /* @__PURE__ */ t(
534
+ k,
512
535
  {
513
- style: i === n ? b.paginationButtonActive : {},
514
- onClick: () => u(n),
515
- children: n
536
+ style: s === o ? C.paginationButtonActive : {},
537
+ onClick: () => x(o),
538
+ children: o
516
539
  },
517
- n
540
+ o
518
541
  )
519
542
  );
520
543
  else {
521
544
  e.push(
522
- /* @__PURE__ */ o(
523
- w,
545
+ /* @__PURE__ */ t(
546
+ k,
524
547
  {
525
- style: i === 1 ? b.paginationButtonActive : {},
526
- onClick: () => u(1),
548
+ style: s === 1 ? C.paginationButtonActive : {},
549
+ onClick: () => x(1),
527
550
  children: "1"
528
551
  },
529
552
  1
530
553
  )
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++)
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++)
534
557
  e.push(
535
- /* @__PURE__ */ o(
536
- w,
558
+ /* @__PURE__ */ t(
559
+ k,
537
560
  {
538
- style: i === x ? b.paginationButtonActive : {},
539
- onClick: () => u(x),
540
- children: x
561
+ style: s === f ? C.paginationButtonActive : {},
562
+ onClick: () => x(f),
563
+ children: f
541
564
  },
542
- x
565
+ f
543
566
  )
544
567
  );
545
- i < h - 2 && e.push(/* @__PURE__ */ o(O, { children: "..." }, "ellipsis2")), h > 1 && e.push(
546
- /* @__PURE__ */ o(
547
- w,
568
+ s < h - 2 && e.push(/* @__PURE__ */ t(K, { children: "..." }, "ellipsis2")), h > 1 && e.push(
569
+ /* @__PURE__ */ t(
570
+ k,
548
571
  {
549
- style: i === h ? b.paginationButtonActive : {},
550
- onClick: () => u(h),
572
+ style: s === h ? C.paginationButtonActive : {},
573
+ onClick: () => x(h),
551
574
  children: h
552
575
  },
553
576
  h
@@ -556,28 +579,28 @@ const We = ({
556
579
  }
557
580
  return e;
558
581
  })(),
559
- /* @__PURE__ */ o(
560
- w,
582
+ /* @__PURE__ */ t(
583
+ k,
561
584
  {
562
- style: i === h ? b.paginationButtonDisabled : {},
563
- onClick: () => u(Math.min(h, i + 1)),
564
- disabled: i === h,
585
+ style: s === h ? C.paginationButtonDisabled : {},
586
+ onClick: () => x(Math.min(h, s + 1)),
587
+ disabled: s === h,
565
588
  children: "Next"
566
589
  }
567
590
  )
568
591
  ] }),
569
- /* @__PURE__ */ s(xe, { children: [
592
+ /* @__PURE__ */ c(me, { children: [
570
593
  "Showing ",
571
- Math.min((i - 1) * c + 1, m.length),
594
+ Math.min((s - 1) * l + 1, g.length),
572
595
  " to",
573
596
  " ",
574
- Math.min(i * c, m.length),
597
+ Math.min(s * l, g.length),
575
598
  " of ",
576
- m.length,
599
+ g.length,
577
600
  " entries"
578
601
  ] })
579
602
  ] });
580
603
  };
581
604
  export {
582
- We as default
605
+ Ue as default
583
606
  };
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.301",
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",