@shlinkio/shlink-frontend-kit 0.9.3 → 0.9.4
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/dist/tailwind.d.ts +1 -0
- package/dist/tailwind.js +67 -65
- package/dist/tailwind.preset.css +42 -0
- package/package.json +13 -13
package/dist/tailwind.d.ts
CHANGED
package/dist/tailwind.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs as g, jsx as n, Fragment as S } from "react/jsx-runtime";
|
|
2
2
|
import w, { clsx as x } from "clsx";
|
|
3
|
-
import { useRef as I, useState as
|
|
3
|
+
import { useRef as I, useState as D, useEffect as M, useCallback as P, createContext as H, useContext as C, forwardRef as k, useId as F, useMemo as O } from "react";
|
|
4
4
|
import { Link as j, NavLink as at } from "react-router";
|
|
5
5
|
import { faClose as dt, faEyeSlash as lt, faEye as it, faCircleNotch as Y, faSearch as st, faChevronLeft as J, faChevronRight as Q, faCheck as wt } from "@fortawesome/free-solid-svg-icons";
|
|
6
|
-
import { FontAwesomeIcon as
|
|
6
|
+
import { FontAwesomeIcon as v } from "@fortawesome/react-fontawesome";
|
|
7
7
|
import { u as ct, a as mt, b as gt } from "./use-toggle-C1uZwbSD.js";
|
|
8
8
|
import { createPortal as bt } from "react-dom";
|
|
9
9
|
import { faClone as ut } from "@fortawesome/free-regular-svg-icons";
|
|
10
10
|
const zt = ({ children: t, summary: e, summaryClasses: r, ...o }) => {
|
|
11
|
-
const a = I(null), [l, d] =
|
|
11
|
+
const a = I(null), [l, d] = D(!1);
|
|
12
12
|
return M(() => {
|
|
13
13
|
const i = a.current, s = () => d(!!(i != null && i.open));
|
|
14
14
|
return i == null || i.addEventListener("toggle", s), () => i == null ? void 0 : i.removeEventListener("toggle", s);
|
|
@@ -56,19 +56,19 @@ const zt = ({ children: t, summary: e, summaryClasses: r, ...o }) => {
|
|
|
56
56
|
),
|
|
57
57
|
...e
|
|
58
58
|
}
|
|
59
|
-
),
|
|
59
|
+
), N = Object.assign(xt, { Body: ht, Header: pt, Footer: ft }), yt = ({ bodyClassName: t, children: e, ...r }) => {
|
|
60
60
|
const { title: o, titleSize: a = "md", ...l } = "title" in r ? r : {
|
|
61
61
|
...r,
|
|
62
62
|
title: void 0,
|
|
63
63
|
titleSize: void 0
|
|
64
64
|
};
|
|
65
|
-
return /* @__PURE__ */ g(
|
|
66
|
-
o && /* @__PURE__ */ g(
|
|
65
|
+
return /* @__PURE__ */ g(N, { ...l, children: [
|
|
66
|
+
o && /* @__PURE__ */ g(N.Header, { children: [
|
|
67
67
|
a === "lg" && /* @__PURE__ */ n("h4", { children: o }),
|
|
68
68
|
a === "md" && /* @__PURE__ */ n("h5", { children: o }),
|
|
69
69
|
a === "sm" && /* @__PURE__ */ n("h6", { children: o })
|
|
70
70
|
] }),
|
|
71
|
-
/* @__PURE__ */ n(
|
|
71
|
+
/* @__PURE__ */ n(N.Body, { className: t, children: e })
|
|
72
72
|
] });
|
|
73
73
|
};
|
|
74
74
|
function kt({
|
|
@@ -83,7 +83,7 @@ function kt({
|
|
|
83
83
|
"aria-label": s = "Items",
|
|
84
84
|
...c
|
|
85
85
|
}) {
|
|
86
|
-
const [m, u] =
|
|
86
|
+
const [m, u] = D(0), p = P((f) => {
|
|
87
87
|
if (u(f), o) {
|
|
88
88
|
const [b, h] = [...e.entries()][f];
|
|
89
89
|
o(b, h);
|
|
@@ -98,7 +98,7 @@ function kt({
|
|
|
98
98
|
};
|
|
99
99
|
return f.addEventListener("keydown", b), () => f.removeEventListener("keydown", b);
|
|
100
100
|
}, [m, i, p, e, r]), /* @__PURE__ */ g(
|
|
101
|
-
|
|
101
|
+
N,
|
|
102
102
|
{
|
|
103
103
|
id: t,
|
|
104
104
|
className: w("tw:py-1 tw:flex tw:flex-col", l),
|
|
@@ -131,7 +131,7 @@ function kt({
|
|
|
131
131
|
);
|
|
132
132
|
}
|
|
133
133
|
const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className: e }) => {
|
|
134
|
-
const { responsive: r } =
|
|
134
|
+
const { responsive: r } = C(L);
|
|
135
135
|
return /* @__PURE__ */ n(E.Provider, { value: { section: "head" }, children: /* @__PURE__ */ n(
|
|
136
136
|
"thead",
|
|
137
137
|
{
|
|
@@ -143,7 +143,7 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
|
|
|
143
143
|
}
|
|
144
144
|
) });
|
|
145
145
|
}, Nt = ({ children: t, className: e }) => {
|
|
146
|
-
const { responsive: r } =
|
|
146
|
+
const { responsive: r } = C(L);
|
|
147
147
|
return /* @__PURE__ */ n(E.Provider, { value: { section: "body" }, children: /* @__PURE__ */ n(
|
|
148
148
|
"tbody",
|
|
149
149
|
{
|
|
@@ -155,7 +155,7 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
|
|
|
155
155
|
}
|
|
156
156
|
) });
|
|
157
157
|
}, Ct = ({ children: t, className: e }) => {
|
|
158
|
-
const { responsive: r } =
|
|
158
|
+
const { responsive: r } = C(L);
|
|
159
159
|
return /* @__PURE__ */ n(E.Provider, { value: { section: "footer" }, children: /* @__PURE__ */ n(
|
|
160
160
|
"tfoot",
|
|
161
161
|
{
|
|
@@ -167,7 +167,7 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
|
|
|
167
167
|
}
|
|
168
168
|
) });
|
|
169
169
|
}, Pt = ({ children: t, className: e, ...r }) => {
|
|
170
|
-
const o =
|
|
170
|
+
const o = C(E), a = (o == null ? void 0 : o.section) === "body", { responsive: l } = C(L);
|
|
171
171
|
return /* @__PURE__ */ n(
|
|
172
172
|
"tr",
|
|
173
173
|
{
|
|
@@ -187,7 +187,7 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
|
|
|
187
187
|
}
|
|
188
188
|
);
|
|
189
189
|
}, Tt = ({ children: t, className: e, columnName: r, type: o, ...a }) => {
|
|
190
|
-
const l =
|
|
190
|
+
const l = C(E), d = o ?? ((l == null ? void 0 : l.section) !== "body" ? "th" : "td"), { responsive: i } = C(L);
|
|
191
191
|
return /* @__PURE__ */ n(
|
|
192
192
|
d,
|
|
193
193
|
{
|
|
@@ -281,8 +281,8 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
|
|
|
281
281
|
}
|
|
282
282
|
)
|
|
283
283
|
);
|
|
284
|
-
}, Z =
|
|
285
|
-
const a =
|
|
284
|
+
}, Z = k(({ className: t, onChange: e, ...r }, o) => {
|
|
285
|
+
const a = P((l) => e == null ? void 0 : e(l.target.checked, l), [e]);
|
|
286
286
|
return /* @__PURE__ */ n(
|
|
287
287
|
"input",
|
|
288
288
|
{
|
|
@@ -300,26 +300,27 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
|
|
|
300
300
|
...r
|
|
301
301
|
}
|
|
302
302
|
);
|
|
303
|
-
}), ee =
|
|
303
|
+
}), ee = k(({ className: t, ...e }, r) => /* @__PURE__ */ n(
|
|
304
304
|
Z,
|
|
305
305
|
{
|
|
306
306
|
ref: r,
|
|
307
307
|
className: x("tw:rounded-sm tw:w-4 tw:h-4 tw:checked:bg-(image:--tick) tw:bg-center", t),
|
|
308
308
|
...e
|
|
309
309
|
}
|
|
310
|
-
)), V = ({ onClick: t,
|
|
310
|
+
)), V = ({ onClick: t, className: e, label: r = "Close" }) => /* @__PURE__ */ n(
|
|
311
311
|
"button",
|
|
312
312
|
{
|
|
313
313
|
type: "button",
|
|
314
314
|
onClick: t,
|
|
315
315
|
className: w(
|
|
316
316
|
"tw:opacity-50 tw:highlight:opacity-80 tw:transition-opacity",
|
|
317
|
-
"tw:rounded-md tw:focus-ring"
|
|
317
|
+
"tw:rounded-md tw:focus-ring",
|
|
318
|
+
e
|
|
318
319
|
),
|
|
319
|
-
"aria-label":
|
|
320
|
-
children: /* @__PURE__ */ n(
|
|
320
|
+
"aria-label": r,
|
|
321
|
+
children: /* @__PURE__ */ n(v, { icon: dt, size: "xl" })
|
|
321
322
|
}
|
|
322
|
-
), U =
|
|
323
|
+
), U = k(({
|
|
323
324
|
borderless: t = !1,
|
|
324
325
|
size: e = "md",
|
|
325
326
|
feedback: r,
|
|
@@ -374,8 +375,8 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
|
|
|
374
375
|
}
|
|
375
376
|
),
|
|
376
377
|
r && /* @__PURE__ */ n("span", { "data-testid": o ? `${o}-error` : "error", className: "tw:text-danger", children: r })
|
|
377
|
-
] }), re =
|
|
378
|
-
const c =
|
|
378
|
+
] }), re = k(({ label: t, inputClassName: e, required: r, hiddenRequired: o, error: a, helpText: l, "data-testid": d, ...i }, s) => {
|
|
379
|
+
const c = F();
|
|
379
380
|
return /* @__PURE__ */ g(K, { error: a, helpText: l, "data-testid": d, children: [
|
|
380
381
|
/* @__PURE__ */ n(W, { htmlFor: c, required: r, children: t }),
|
|
381
382
|
/* @__PURE__ */ n(
|
|
@@ -390,8 +391,8 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
|
|
|
390
391
|
}
|
|
391
392
|
)
|
|
392
393
|
] });
|
|
393
|
-
}), Bt =
|
|
394
|
-
const [l, d, , i] = ct(!1), s = I(null), c =
|
|
394
|
+
}), Bt = k(({ containerClassName: t, className: e, size: r, ...o }, a) => {
|
|
395
|
+
const [l, d, , i] = ct(!1), s = I(null), c = P(({ relatedTarget: m }) => {
|
|
395
396
|
var u;
|
|
396
397
|
(u = s.current) != null && u.contains(m) || i();
|
|
397
398
|
}, [s, i]);
|
|
@@ -435,14 +436,14 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
|
|
|
435
436
|
}
|
|
436
437
|
),
|
|
437
438
|
tabIndex: -1,
|
|
438
|
-
children: /* @__PURE__ */ n(
|
|
439
|
+
children: /* @__PURE__ */ n(v, { fixedWidth: !0, icon: l ? lt : it })
|
|
439
440
|
}
|
|
440
441
|
)
|
|
441
442
|
]
|
|
442
443
|
}
|
|
443
444
|
);
|
|
444
|
-
}), oe =
|
|
445
|
-
const c =
|
|
445
|
+
}), oe = k(({ label: t, inputClassName: e, required: r, hiddenRequired: o, error: a, helpText: l, "data-testid": d, ...i }, s) => {
|
|
446
|
+
const c = F();
|
|
446
447
|
return /* @__PURE__ */ g(K, { error: a, helpText: l, "data-testid": d, children: [
|
|
447
448
|
/* @__PURE__ */ n(W, { htmlFor: c, required: r, children: t }),
|
|
448
449
|
/* @__PURE__ */ n(
|
|
@@ -457,7 +458,7 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
|
|
|
457
458
|
}
|
|
458
459
|
)
|
|
459
460
|
] });
|
|
460
|
-
}), Mt =
|
|
461
|
+
}), Mt = k(({
|
|
461
462
|
className: t,
|
|
462
463
|
size: e = "md",
|
|
463
464
|
feedback: r,
|
|
@@ -497,8 +498,8 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
|
|
|
497
498
|
disabled: a,
|
|
498
499
|
...l
|
|
499
500
|
}
|
|
500
|
-
)), ne =
|
|
501
|
-
const c =
|
|
501
|
+
)), ne = k(({ selectClassName: t, label: e, error: r, helpText: o, required: a, hiddenRequired: l, "data-testid": d, ...i }, s) => {
|
|
502
|
+
const c = F();
|
|
502
503
|
return /* @__PURE__ */ g(K, { error: r, helpText: o, "data-testid": d, children: [
|
|
503
504
|
/* @__PURE__ */ n(W, { htmlFor: c, required: a, children: e }),
|
|
504
505
|
/* @__PURE__ */ n(
|
|
@@ -513,7 +514,7 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
|
|
|
513
514
|
}
|
|
514
515
|
)
|
|
515
516
|
] });
|
|
516
|
-
}), Et =
|
|
517
|
+
}), Et = k(({
|
|
517
518
|
onChange: t,
|
|
518
519
|
containerClassName: e,
|
|
519
520
|
inputClassName: r,
|
|
@@ -522,12 +523,12 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
|
|
|
522
523
|
loading: a = !1,
|
|
523
524
|
...l
|
|
524
525
|
}, d) => {
|
|
525
|
-
const { setTimeout: i, clearCurrentTimeout: s } = mt(500), c =
|
|
526
|
+
const { setTimeout: i, clearCurrentTimeout: s } = mt(500), c = P((m) => {
|
|
526
527
|
m ? i(() => t(m)) : (s(), t(m));
|
|
527
528
|
}, [s, t, i]);
|
|
528
529
|
return /* @__PURE__ */ g("div", { className: w("tw:group tw:relative tw:focus-within:z-10", e), children: [
|
|
529
530
|
/* @__PURE__ */ n(
|
|
530
|
-
|
|
531
|
+
v,
|
|
531
532
|
{
|
|
532
533
|
icon: a ? Y : st,
|
|
533
534
|
spin: a,
|
|
@@ -572,10 +573,10 @@ function ae({
|
|
|
572
573
|
onFocus: d,
|
|
573
574
|
...i
|
|
574
575
|
}) {
|
|
575
|
-
const s = I(null), c =
|
|
576
|
+
const s = I(null), c = F(), [m, u] = D(), p = O(
|
|
576
577
|
() => t ? m ?? [...t.keys()][0] : void 0,
|
|
577
578
|
[m, t]
|
|
578
|
-
), f =
|
|
579
|
+
), f = P((b) => {
|
|
579
580
|
r(b), e(""), s.current.value = "";
|
|
580
581
|
}, [e, r]);
|
|
581
582
|
return /* @__PURE__ */ g(
|
|
@@ -629,7 +630,7 @@ function ae({
|
|
|
629
630
|
}
|
|
630
631
|
);
|
|
631
632
|
}
|
|
632
|
-
const de =
|
|
633
|
+
const de = k(({ className: t, ...e }, r) => /* @__PURE__ */ n(
|
|
633
634
|
Z,
|
|
634
635
|
{
|
|
635
636
|
ref: r,
|
|
@@ -662,7 +663,7 @@ const de = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
|
|
|
662
663
|
...a
|
|
663
664
|
}
|
|
664
665
|
), z = H(null), _t = ({ className: t, to: e, ...r }) => {
|
|
665
|
-
const o =
|
|
666
|
+
const o = C(z);
|
|
666
667
|
return /* @__PURE__ */ n(
|
|
667
668
|
at,
|
|
668
669
|
{
|
|
@@ -685,13 +686,13 @@ const de = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
|
|
|
685
686
|
...r
|
|
686
687
|
}
|
|
687
688
|
);
|
|
688
|
-
},
|
|
689
|
+
}, Dt = ({ children: t, className: e, fill: r }) => /* @__PURE__ */ n(z.Provider, { value: { fill: r }, children: /* @__PURE__ */ n(N, { role: "menubar", className: w("tw:flex tw:overflow-hidden", e), children: t }) }), le = Object.assign(Dt, { Pill: _t }), Ft = new Intl.NumberFormat("en-US"), $t = (t) => Ft.format(Number(t)), X = 10, ie = (t) => Math.ceil(t / X) * X, T = 2, _ = "...", St = (t, e) => Array.from({ length: e - t }, (r, o) => t + o), jt = (t, e) => {
|
|
689
690
|
const r = St(
|
|
690
691
|
Math.max(T, t - T),
|
|
691
692
|
Math.min(e - 1, t + T) + 1
|
|
692
693
|
);
|
|
693
694
|
return t - T > T && r.unshift(_), t + T < e - 1 && r.push(_), r.unshift(1), r.push(e), r;
|
|
694
|
-
}, B = (t) => t === _, At = (t) => B(t) ? t :
|
|
695
|
+
}, B = (t) => t === _, At = (t) => B(t) ? t : $t(t), Ht = (t, e) => B(t) ? `${t}_${e}` : `${t}`, tt = [
|
|
695
696
|
"tw:border tw:border-r-0 tw:last:border-r tw:border-lm-border tw:dark:border-dm-border",
|
|
696
697
|
"tw:rounded-none tw:first:rounded-l tw:last:rounded-r"
|
|
697
698
|
], et = (t = !1) => w(
|
|
@@ -714,12 +715,12 @@ function Ut({ children: t, active: e, isEllipsis: r, ...o }) {
|
|
|
714
715
|
return r ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n("button", { type: "button", className: a, ...o, children: t });
|
|
715
716
|
}
|
|
716
717
|
const se = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
717
|
-
const o = "urlForPage" in r, a = o ? Ot : Ut, l =
|
|
718
|
+
const o = "urlForPage" in r, a = o ? Ot : Ut, l = P(
|
|
718
719
|
(d) => o ? { href: B(d) ? void 0 : r.urlForPage(d) } : { onClick: () => !B(d) && r.onPageChange(d) },
|
|
719
720
|
[o, r]
|
|
720
721
|
);
|
|
721
722
|
return e < 2 ? null : /* @__PURE__ */ g("div", { className: "tw:select-none tw:flex", "data-testid": "paginator", children: [
|
|
722
|
-
t === 1 ? /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(
|
|
723
|
+
t === 1 ? /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(v, { size: "xs", icon: J }) }) : /* @__PURE__ */ n(a, { ...l(Math.max(1, t - 1)), "aria-label": "Previous", children: /* @__PURE__ */ n(v, { size: "xs", icon: J }) }),
|
|
723
724
|
jt(t, e).map((d, i) => /* @__PURE__ */ n(
|
|
724
725
|
a,
|
|
725
726
|
{
|
|
@@ -730,7 +731,7 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
730
731
|
},
|
|
731
732
|
Ht(d, i)
|
|
732
733
|
)),
|
|
733
|
-
t === e ? /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(
|
|
734
|
+
t === e ? /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(v, { size: "xs", icon: Q }) }) : /* @__PURE__ */ n(a, { ...l(Math.min(e, t + 1)), "aria-label": "Next", children: /* @__PURE__ */ n(v, { size: "xs", icon: Q }) })
|
|
734
735
|
] });
|
|
735
736
|
}, Wt = ({
|
|
736
737
|
open: t,
|
|
@@ -783,28 +784,28 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
783
784
|
onConfirm: u,
|
|
784
785
|
onClosed: p,
|
|
785
786
|
...f
|
|
786
|
-
} = "onConfirm" in d ? d : { ...d }, [b, h] =
|
|
787
|
-
|
|
787
|
+
} = "onConfirm" in d ? d : { ...d }, [b, h] = D(t), R = I(null), $ = I("cancel"), ot = P((y) => {
|
|
788
|
+
y.preventDefault(), y.stopPropagation(), $.current = "confirm", u == null || u();
|
|
788
789
|
}, [u]);
|
|
789
790
|
return M(() => {
|
|
790
791
|
if (t) {
|
|
791
|
-
|
|
792
|
+
$.current = "cancel", h(!0);
|
|
792
793
|
return;
|
|
793
794
|
}
|
|
794
|
-
const
|
|
795
|
-
if (
|
|
795
|
+
const y = R.current;
|
|
796
|
+
if (y) {
|
|
796
797
|
delete R.current.dataset.open;
|
|
797
798
|
let q = !1;
|
|
798
799
|
const G = (nt) => {
|
|
799
|
-
q || nt.target !==
|
|
800
|
+
q || nt.target !== y || (q = !0, h(!1), p == null || p($.current));
|
|
800
801
|
};
|
|
801
|
-
return
|
|
802
|
-
|
|
802
|
+
return y.addEventListener("transitionend", G), () => {
|
|
803
|
+
y.removeEventListener("transitionend", G);
|
|
803
804
|
};
|
|
804
805
|
}
|
|
805
806
|
}, [p, t]), M(() => {
|
|
806
|
-
const
|
|
807
|
-
b &&
|
|
807
|
+
const y = R.current;
|
|
808
|
+
b && y && (y.dataset.open = "");
|
|
808
809
|
}, [b]), /* @__PURE__ */ n(
|
|
809
810
|
Wt,
|
|
810
811
|
{
|
|
@@ -819,7 +820,7 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
819
820
|
),
|
|
820
821
|
...f,
|
|
821
822
|
children: /* @__PURE__ */ n(
|
|
822
|
-
"
|
|
823
|
+
"form",
|
|
823
824
|
{
|
|
824
825
|
"data-testid": "transition-container",
|
|
825
826
|
ref: R,
|
|
@@ -837,7 +838,8 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
837
838
|
},
|
|
838
839
|
{ "tw:h-full": r === "cover" }
|
|
839
840
|
),
|
|
840
|
-
|
|
841
|
+
onSubmit: ot,
|
|
842
|
+
children: /* @__PURE__ */ n(N, { className: w(
|
|
841
843
|
"tw:w-full",
|
|
842
844
|
{ "tw:h-full tw:relative tw:overflow-auto": r === "cover" }
|
|
843
845
|
), children: r === "cover" ? /* @__PURE__ */ g(S, { children: [
|
|
@@ -858,16 +860,16 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
858
860
|
),
|
|
859
861
|
/* @__PURE__ */ n("div", { children: a })
|
|
860
862
|
] }) : /* @__PURE__ */ g(S, { children: [
|
|
861
|
-
/* @__PURE__ */ g(
|
|
863
|
+
/* @__PURE__ */ g(N.Header, { className: w(
|
|
862
864
|
"tw:sticky tw:top-0",
|
|
863
865
|
"tw:flex tw:items-center tw:justify-between tw:gap-x-2"
|
|
864
866
|
), children: [
|
|
865
867
|
/* @__PURE__ */ n("h5", { className: w({ "tw:text-danger": r === "danger" }), children: o }),
|
|
866
868
|
/* @__PURE__ */ n(V, { onClick: e, label: "Close dialog" })
|
|
867
869
|
] }),
|
|
868
|
-
/* @__PURE__ */ n(
|
|
870
|
+
/* @__PURE__ */ n(N.Body, { children: a }),
|
|
869
871
|
u && /* @__PURE__ */ g(
|
|
870
|
-
|
|
872
|
+
N.Footer,
|
|
871
873
|
{
|
|
872
874
|
"data-testid": "footer",
|
|
873
875
|
className: w(
|
|
@@ -882,7 +884,7 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
882
884
|
solid: !0,
|
|
883
885
|
variant: r === "danger" ? "danger" : "primary",
|
|
884
886
|
disabled: m,
|
|
885
|
-
|
|
887
|
+
type: "submit",
|
|
886
888
|
children: s
|
|
887
889
|
}
|
|
888
890
|
)
|
|
@@ -899,7 +901,7 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
899
901
|
"tw:text-danger": o === "error"
|
|
900
902
|
}), children: [
|
|
901
903
|
r && /* @__PURE__ */ g(S, { children: [
|
|
902
|
-
/* @__PURE__ */ n(
|
|
904
|
+
/* @__PURE__ */ n(v, { icon: Y, spin: !0 }),
|
|
903
905
|
/* @__PURE__ */ n("span", { className: "tw:ml-2", children: e ?? "Loading..." })
|
|
904
906
|
] }),
|
|
905
907
|
!r && e
|
|
@@ -922,7 +924,7 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
922
924
|
children: o
|
|
923
925
|
}
|
|
924
926
|
), ge = ({ text: t, className: e, size: r = "lg", initialCopied: o = !1, navigator_: a = globalThis.navigator, ...l }) => {
|
|
925
|
-
const [d, i] = gt(o), s =
|
|
927
|
+
const [d, i] = gt(o), s = P(
|
|
926
928
|
() => a.clipboard.writeText(t).then(i),
|
|
927
929
|
[a.clipboard, t, i]
|
|
928
930
|
);
|
|
@@ -943,13 +945,13 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
943
945
|
title: "Copy to clipboard",
|
|
944
946
|
onClick: s,
|
|
945
947
|
...l,
|
|
946
|
-
children: /* @__PURE__ */ n(
|
|
948
|
+
children: /* @__PURE__ */ n(v, { icon: d ? wt : ut, fixedWidth: !0 })
|
|
947
949
|
}
|
|
948
950
|
);
|
|
949
951
|
};
|
|
950
952
|
export {
|
|
951
953
|
Lt as Button,
|
|
952
|
-
|
|
954
|
+
N as Card,
|
|
953
955
|
we as CardModal,
|
|
954
956
|
ee as Checkbox,
|
|
955
957
|
V as CloseButton,
|
|
@@ -975,7 +977,7 @@ export {
|
|
|
975
977
|
yt as SimpleCard,
|
|
976
978
|
te as Table,
|
|
977
979
|
de as ToggleSwitch,
|
|
978
|
-
|
|
980
|
+
$t as formatNumber,
|
|
979
981
|
Ht as keyForPage,
|
|
980
982
|
B as pageIsEllipsis,
|
|
981
983
|
At as prettifyPageNumber,
|
package/dist/tailwind.preset.css
CHANGED
|
@@ -197,3 +197,45 @@
|
|
|
197
197
|
@slot;
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
+
|
|
201
|
+
/* For sticky-positioned cells with a background */
|
|
202
|
+
@utility sticky-cell-base {
|
|
203
|
+
@apply tw:z-1 tw:relative tw:sticky;
|
|
204
|
+
@apply tw:before:absolute tw:before:bg-lm-table-border tw:dark:before:bg-dm-table-border tw:before:-z-2;
|
|
205
|
+
@apply tw:after:absolute tw:after:bg-lm-primary tw:dark:after:bg-dm-primary tw:after:-z-1;
|
|
206
|
+
|
|
207
|
+
&:before, &:after {
|
|
208
|
+
content: '';
|
|
209
|
+
}
|
|
210
|
+
&:first-child:after {
|
|
211
|
+
left: 0;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
@utility sticky-cell {
|
|
216
|
+
@apply tw:sticky-cell-base;
|
|
217
|
+
|
|
218
|
+
&:before {
|
|
219
|
+
inset: -1px 0 -1px 0;
|
|
220
|
+
}
|
|
221
|
+
&:first-child:before {
|
|
222
|
+
left: 0;
|
|
223
|
+
}
|
|
224
|
+
&:after {
|
|
225
|
+
inset: 0 0 0 0;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
@utility sticky-cell-separated {
|
|
230
|
+
@apply tw:sticky-cell-base;
|
|
231
|
+
|
|
232
|
+
&:before {
|
|
233
|
+
inset: -1px -1px -1px 0;
|
|
234
|
+
}
|
|
235
|
+
&:first-child:before {
|
|
236
|
+
left: -1px;
|
|
237
|
+
}
|
|
238
|
+
&:after {
|
|
239
|
+
inset: 0 0 0 1px;
|
|
240
|
+
}
|
|
241
|
+
}
|
package/package.json
CHANGED
|
@@ -57,20 +57,20 @@
|
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@shlinkio/eslint-config-js-coding-standard": "~3.5.0",
|
|
60
|
-
"@stylistic/eslint-plugin": "^4.
|
|
61
|
-
"@tailwindcss/vite": "^4.1.
|
|
60
|
+
"@stylistic/eslint-plugin": "^4.4.0",
|
|
61
|
+
"@tailwindcss/vite": "^4.1.7",
|
|
62
62
|
"@testing-library/jest-dom": "^6.6.3",
|
|
63
63
|
"@testing-library/react": "^16.3.0",
|
|
64
64
|
"@testing-library/user-event": "^14.6.1",
|
|
65
65
|
"@total-typescript/shoehorn": "^0.1.2",
|
|
66
|
-
"@types/react": "^19.1.
|
|
67
|
-
"@types/react-dom": "^19.1.
|
|
68
|
-
"@vitejs/plugin-react": "^4.
|
|
69
|
-
"@vitest/browser": "^3.1.
|
|
70
|
-
"@vitest/coverage-v8": "^3.1.
|
|
66
|
+
"@types/react": "^19.1.5",
|
|
67
|
+
"@types/react-dom": "^19.1.5",
|
|
68
|
+
"@vitejs/plugin-react": "^4.5.0",
|
|
69
|
+
"@vitest/browser": "^3.1.4",
|
|
70
|
+
"@vitest/coverage-v8": "^3.1.4",
|
|
71
71
|
"axe-core": "^4.10.3",
|
|
72
72
|
"bootstrap": "5.2.3",
|
|
73
|
-
"eslint": "^9.
|
|
73
|
+
"eslint": "^9.27.0",
|
|
74
74
|
"eslint-plugin-import": "^2.31.0",
|
|
75
75
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
76
76
|
"eslint-plugin-react": "^7.37.5",
|
|
@@ -79,11 +79,11 @@
|
|
|
79
79
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
80
80
|
"history": "^5.3.0",
|
|
81
81
|
"playwright": "^1.52.0",
|
|
82
|
-
"sass": "^1.
|
|
82
|
+
"sass": "^1.89.0",
|
|
83
83
|
"typescript": "^5.8.3",
|
|
84
|
-
"typescript-eslint": "^8.
|
|
85
|
-
"vite": "^6.3.
|
|
86
|
-
"vite-plugin-dts": "^4.5.
|
|
84
|
+
"typescript-eslint": "^8.32.1",
|
|
85
|
+
"vite": "^6.3.5",
|
|
86
|
+
"vite-plugin-dts": "^4.5.4",
|
|
87
87
|
"vitest": "^3.0.2"
|
|
88
88
|
},
|
|
89
89
|
"browserslist": [
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"not ie <= 11",
|
|
93
93
|
"not op_mini all"
|
|
94
94
|
],
|
|
95
|
-
"version": "0.9.
|
|
95
|
+
"version": "0.9.4"
|
|
96
96
|
}
|