@shlinkio/shlink-frontend-kit 0.9.12 → 0.9.13
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.js +170 -166
- package/package.json +1 -1
package/dist/tailwind.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsxs as m, jsx as n, Fragment as
|
|
1
|
+
import { jsxs as m, jsx as n, Fragment as W } from "react/jsx-runtime";
|
|
2
2
|
import c, { clsx as p } from "clsx";
|
|
3
|
-
import { useRef as O, useState as
|
|
3
|
+
import { useRef as O, useState as A, useEffect as M, forwardRef as v, useCallback as I, createContext as Q, useContext as S, useId as E, useImperativeHandle as ht, useMemo as G } from "react";
|
|
4
4
|
import { Link as q, useLocation as ft, NavLink as xt } from "react-router";
|
|
5
5
|
import { faClose as yt, faEyeSlash as kt, faEye as vt, faCircleNotch as lt, faSearch as Nt, faCaretDown as Ct, faChevronUp as It, faChevronDown as Ot, faChevronLeft as et, faChevronRight as rt, faEllipsisV as Rt, faSortAmountUp as Pt, faSortAmountDown as Lt, faCheck as Dt } from "@fortawesome/free-solid-svg-icons";
|
|
6
6
|
import { FontAwesomeIcon as C } from "@fortawesome/react-fontawesome";
|
|
7
|
-
import { u as it, b as St, i as
|
|
8
|
-
import { useFloating as
|
|
7
|
+
import { u as it, b as St, i as Bt, a as Mt, e as Et, c as At } from "./ordering-pAYMfJPl.js";
|
|
8
|
+
import { useFloating as dt, flip as Tt, offset as _t, useClick as $t, useInteractions as st, autoPlacement as jt, arrow as Ft, useHover as Ht, useTransitionStyles as Wt } from "@floating-ui/react";
|
|
9
9
|
import { createPortal as Ut } from "react-dom";
|
|
10
10
|
import "reactstrap";
|
|
11
11
|
import { faClone as Kt } from "@fortawesome/free-regular-svg-icons";
|
|
12
12
|
const Ke = ({ children: r, summary: e, summaryClasses: t, ...o }) => {
|
|
13
|
-
const l = O(null), [a, i] =
|
|
14
|
-
return
|
|
15
|
-
const
|
|
16
|
-
return
|
|
13
|
+
const l = O(null), [a, i] = A(!1);
|
|
14
|
+
return M(() => {
|
|
15
|
+
const d = l.current, s = () => i(!!(d != null && d.open));
|
|
16
|
+
return d == null || d.addEventListener("toggle", s), () => d == null ? void 0 : d.removeEventListener("toggle", s);
|
|
17
17
|
}, []), /* @__PURE__ */ m("details", { ref: l, ...o, children: [
|
|
18
18
|
/* @__PURE__ */ n("summary", { className: p("tw:focus-ring tw:px-1 tw:-mx-1 tw:rounded-sm", t), children: e }),
|
|
19
19
|
a && /* @__PURE__ */ n("div", { className: "tw:mt-3 tw:flex tw:flex-col tw:gap-y-3", children: r })
|
|
@@ -85,32 +85,32 @@ function Yt({
|
|
|
85
85
|
renderItem: l,
|
|
86
86
|
className: a,
|
|
87
87
|
noItemsMessage: i = "No items",
|
|
88
|
-
anchor:
|
|
89
|
-
"aria-label":
|
|
88
|
+
anchor: d,
|
|
89
|
+
"aria-label": s = "Items",
|
|
90
90
|
...w
|
|
91
91
|
}) {
|
|
92
|
-
const [f, x] =
|
|
92
|
+
const [f, x] = A(0), g = I((k) => {
|
|
93
93
|
if (x(k), o) {
|
|
94
94
|
const [y, u] = [...e.entries()][k];
|
|
95
95
|
o(y, u);
|
|
96
96
|
}
|
|
97
97
|
}, [e, o]);
|
|
98
|
-
return
|
|
99
|
-
const k =
|
|
98
|
+
return M(() => {
|
|
99
|
+
const k = d == null ? void 0 : d.current;
|
|
100
100
|
if (!k)
|
|
101
101
|
return;
|
|
102
102
|
const y = (u) => {
|
|
103
103
|
["Enter", "ArrowUp", "ArrowDown"].includes(u.key) && u.preventDefault(), u.key === "ArrowDown" ? g(Math.min(f + 1, e.size - 1)) : u.key === "ArrowUp" ? g(Math.max(f - 1, 0)) : u.key === "Enter" && t([...e.values()][f]);
|
|
104
104
|
};
|
|
105
105
|
return k.addEventListener("keydown", y), () => k.removeEventListener("keydown", y);
|
|
106
|
-
}, [f,
|
|
106
|
+
}, [f, d, g, e, t]), /* @__PURE__ */ m(
|
|
107
107
|
P,
|
|
108
108
|
{
|
|
109
109
|
id: r,
|
|
110
110
|
className: c("tw:py-1 tw:flex tw:flex-col", a),
|
|
111
111
|
role: "listbox",
|
|
112
112
|
"aria-orientation": "vertical",
|
|
113
|
-
"aria-label":
|
|
113
|
+
"aria-label": s,
|
|
114
114
|
...w,
|
|
115
115
|
children: [
|
|
116
116
|
e.size === 0 && /* @__PURE__ */ n("i", { role: "option", "aria-disabled": !0, "aria-selected": !1, "data-testid": "no-items", className: "tw:px-2 tw:py-1", children: i }),
|
|
@@ -136,8 +136,8 @@ function Yt({
|
|
|
136
136
|
}
|
|
137
137
|
);
|
|
138
138
|
}
|
|
139
|
-
const U = Q(void 0),
|
|
140
|
-
const { responsive: t } = S(
|
|
139
|
+
const U = Q(void 0), _ = Q({ responsive: !0, size: "md" }), Zt = ({ children: r, className: e }) => {
|
|
140
|
+
const { responsive: t } = S(_);
|
|
141
141
|
return /* @__PURE__ */ n(U.Provider, { value: { section: "head" }, children: /* @__PURE__ */ n(
|
|
142
142
|
"thead",
|
|
143
143
|
{
|
|
@@ -149,7 +149,7 @@ const U = Q(void 0), T = Q({ responsive: !0, size: "md" }), Zt = ({ children: r,
|
|
|
149
149
|
}
|
|
150
150
|
) });
|
|
151
151
|
}, zt = ({ children: r, className: e }) => {
|
|
152
|
-
const { responsive: t } = S(
|
|
152
|
+
const { responsive: t } = S(_);
|
|
153
153
|
return /* @__PURE__ */ n(U.Provider, { value: { section: "body" }, children: /* @__PURE__ */ n(
|
|
154
154
|
"tbody",
|
|
155
155
|
{
|
|
@@ -161,7 +161,7 @@ const U = Q(void 0), T = Q({ responsive: !0, size: "md" }), Zt = ({ children: r,
|
|
|
161
161
|
}
|
|
162
162
|
) });
|
|
163
163
|
}, Vt = ({ children: r, className: e }) => {
|
|
164
|
-
const { responsive: t } = S(
|
|
164
|
+
const { responsive: t } = S(_);
|
|
165
165
|
return /* @__PURE__ */ n(U.Provider, { value: { section: "footer" }, children: /* @__PURE__ */ n(
|
|
166
166
|
"tfoot",
|
|
167
167
|
{
|
|
@@ -173,7 +173,7 @@ const U = Q(void 0), T = Q({ responsive: !0, size: "md" }), Zt = ({ children: r,
|
|
|
173
173
|
}
|
|
174
174
|
) });
|
|
175
175
|
}, te = ({ children: r, className: e, ...t }) => {
|
|
176
|
-
const o = S(U), l = (o == null ? void 0 : o.section) === "body", { responsive: a } = S(
|
|
176
|
+
const o = S(U), l = (o == null ? void 0 : o.section) === "body", { responsive: a } = S(_);
|
|
177
177
|
return /* @__PURE__ */ n(
|
|
178
178
|
"tr",
|
|
179
179
|
{
|
|
@@ -193,22 +193,22 @@ const U = Q(void 0), T = Q({ responsive: !0, size: "md" }), Zt = ({ children: r,
|
|
|
193
193
|
}
|
|
194
194
|
);
|
|
195
195
|
}, ee = ({ children: r, className: e, columnName: t, type: o, ...l }) => {
|
|
196
|
-
const a = S(U), i = o ?? ((a == null ? void 0 : a.section) !== "body" ? "th" : "td"), { responsive:
|
|
196
|
+
const a = S(U), i = o ?? ((a == null ? void 0 : a.section) !== "body" ? "th" : "td"), { responsive: d, size: s } = S(_);
|
|
197
197
|
return /* @__PURE__ */ n(
|
|
198
198
|
i,
|
|
199
199
|
{
|
|
200
|
-
"data-column":
|
|
200
|
+
"data-column": d ? t : void 0,
|
|
201
201
|
className: c(
|
|
202
202
|
"tw:border-lm-border tw:dark:border-dm-border",
|
|
203
203
|
{
|
|
204
|
-
"tw:p-1":
|
|
205
|
-
"tw:p-2":
|
|
206
|
-
"tw:p-3":
|
|
207
|
-
"tw:border-b-1": !
|
|
208
|
-
"tw:block tw:lg:table-cell tw:not-last:border-b-1 tw:lg:border-b-1":
|
|
204
|
+
"tw:p-1": s === "sm",
|
|
205
|
+
"tw:p-2": s === "md",
|
|
206
|
+
"tw:p-3": s === "lg",
|
|
207
|
+
"tw:border-b-1": !d,
|
|
208
|
+
"tw:block tw:lg:table-cell tw:not-last:border-b-1 tw:lg:border-b-1": d,
|
|
209
209
|
"tw:text-left": i === "th",
|
|
210
210
|
// For responsive tables, display the content in data-column attribute for md sizes and lower
|
|
211
|
-
"tw:before:lg:hidden tw:before:content-[attr(data-column)] tw:before:font-bold tw:before:mr-1":
|
|
211
|
+
"tw:before:lg:hidden tw:before:content-[attr(data-column)] tw:before:font-bold tw:before:mr-1": d && i === "td"
|
|
212
212
|
},
|
|
213
213
|
e
|
|
214
214
|
),
|
|
@@ -216,7 +216,7 @@ const U = Q(void 0), T = Q({ responsive: !0, size: "md" }), Zt = ({ children: r,
|
|
|
216
216
|
children: r
|
|
217
217
|
}
|
|
218
218
|
);
|
|
219
|
-
}, re = ({ header: r, footer: e, children: t, responsive: o = !0, size: l = "md", ...a }) => /* @__PURE__ */ n(
|
|
219
|
+
}, re = ({ header: r, footer: e, children: t, responsive: o = !0, size: l = "md", ...a }) => /* @__PURE__ */ n(_.Provider, { value: { responsive: o, size: l }, children: /* @__PURE__ */ m("table", { className: "tw:w-full", ...a, children: [
|
|
220
220
|
/* @__PURE__ */ n(Zt, { children: r }),
|
|
221
221
|
/* @__PURE__ */ n(zt, { children: t }),
|
|
222
222
|
e && /* @__PURE__ */ n(Vt, { children: e })
|
|
@@ -228,13 +228,13 @@ const U = Q(void 0), T = Q({ responsive: !0, size: "md" }), Zt = ({ children: r,
|
|
|
228
228
|
inline: l = !1,
|
|
229
229
|
solid: a = !1,
|
|
230
230
|
type: i = "button",
|
|
231
|
-
...
|
|
232
|
-
},
|
|
233
|
-
const w = "to" in
|
|
231
|
+
...d
|
|
232
|
+
}, s) => {
|
|
233
|
+
const w = "to" in d && typeof d.to == "string", f = w ? q : "button", x = w ? void 0 : i;
|
|
234
234
|
return /* @__PURE__ */ n(
|
|
235
235
|
f,
|
|
236
236
|
{
|
|
237
|
-
ref:
|
|
237
|
+
ref: s,
|
|
238
238
|
className: c(
|
|
239
239
|
{
|
|
240
240
|
"tw:inline-flex": l,
|
|
@@ -286,7 +286,7 @@ const U = Q(void 0), T = Q({ responsive: !0, size: "md" }), Zt = ({ children: r,
|
|
|
286
286
|
disabled: w ? void 0 : e,
|
|
287
287
|
"aria-disabled": w ? e : void 0,
|
|
288
288
|
type: x,
|
|
289
|
-
...
|
|
289
|
+
...d
|
|
290
290
|
}
|
|
291
291
|
);
|
|
292
292
|
}), ct = v(({ className: r, onChange: e, ...t }, o) => {
|
|
@@ -339,10 +339,10 @@ const U = Q(void 0), T = Q({ responsive: !0, size: "md" }), Zt = ({ children: r,
|
|
|
339
339
|
className: l,
|
|
340
340
|
disabled: a,
|
|
341
341
|
...i
|
|
342
|
-
},
|
|
342
|
+
}, d) => /* @__PURE__ */ n(
|
|
343
343
|
"input",
|
|
344
344
|
{
|
|
345
|
-
ref:
|
|
345
|
+
ref: d,
|
|
346
346
|
className: c(
|
|
347
347
|
"tw:outline-none",
|
|
348
348
|
o === "default" && [
|
|
@@ -381,32 +381,32 @@ const U = Q(void 0), T = Q({ responsive: !0, size: "md" }), Zt = ({ children: r,
|
|
|
381
381
|
}
|
|
382
382
|
),
|
|
383
383
|
t && /* @__PURE__ */ n("span", { "data-testid": o ? `${o}-error` : "error", className: "tw:text-danger", children: t })
|
|
384
|
-
] }), Xe = v(({ label: r, inputClassName: e, required: t, hiddenRequired: o, error: l, helpText: a, "data-testid": i, ...
|
|
385
|
-
const w =
|
|
384
|
+
] }), Xe = v(({ label: r, inputClassName: e, required: t, hiddenRequired: o, error: l, helpText: a, "data-testid": i, ...d }, s) => {
|
|
385
|
+
const w = E();
|
|
386
386
|
return /* @__PURE__ */ m(z, { error: l, helpText: a, "data-testid": i, children: [
|
|
387
387
|
/* @__PURE__ */ n(Z, { htmlFor: w, required: t, children: r }),
|
|
388
388
|
/* @__PURE__ */ n(
|
|
389
389
|
Y,
|
|
390
390
|
{
|
|
391
|
-
ref:
|
|
391
|
+
ref: s,
|
|
392
392
|
id: w,
|
|
393
393
|
className: e,
|
|
394
394
|
required: t || o,
|
|
395
395
|
feedback: l ? "error" : void 0,
|
|
396
|
-
...
|
|
396
|
+
...d
|
|
397
397
|
}
|
|
398
398
|
)
|
|
399
399
|
] });
|
|
400
400
|
}), ne = v(({ containerClassName: r, className: e, size: t, ...o }, l) => {
|
|
401
|
-
const [a, i, ,
|
|
401
|
+
const [a, i, , d] = it(!1), s = O(null), w = I(({ relatedTarget: f }) => {
|
|
402
402
|
var x;
|
|
403
|
-
(x =
|
|
404
|
-
}, [
|
|
403
|
+
(x = s.current) != null && x.contains(f) || d();
|
|
404
|
+
}, [s, d]);
|
|
405
405
|
return /* @__PURE__ */ m(
|
|
406
406
|
"div",
|
|
407
407
|
{
|
|
408
408
|
className: p("tw:group tw:relative", r),
|
|
409
|
-
ref:
|
|
409
|
+
ref: s,
|
|
410
410
|
onBlurCapture: w,
|
|
411
411
|
children: [
|
|
412
412
|
/* @__PURE__ */ n(
|
|
@@ -448,19 +448,19 @@ const U = Q(void 0), T = Q({ responsive: !0, size: "md" }), Zt = ({ children: r,
|
|
|
448
448
|
]
|
|
449
449
|
}
|
|
450
450
|
);
|
|
451
|
-
}), Je = v(({ label: r, inputClassName: e, required: t, hiddenRequired: o, error: l, helpText: a, "data-testid": i, ...
|
|
452
|
-
const w =
|
|
451
|
+
}), Je = v(({ label: r, inputClassName: e, required: t, hiddenRequired: o, error: l, helpText: a, "data-testid": i, ...d }, s) => {
|
|
452
|
+
const w = E();
|
|
453
453
|
return /* @__PURE__ */ m(z, { error: l, helpText: a, "data-testid": i, children: [
|
|
454
454
|
/* @__PURE__ */ n(Z, { htmlFor: w, required: t, children: r }),
|
|
455
455
|
/* @__PURE__ */ n(
|
|
456
456
|
ne,
|
|
457
457
|
{
|
|
458
|
-
ref:
|
|
458
|
+
ref: s,
|
|
459
459
|
id: w,
|
|
460
460
|
className: e,
|
|
461
461
|
required: t || o,
|
|
462
462
|
feedback: l ? "error" : void 0,
|
|
463
|
-
...
|
|
463
|
+
...d
|
|
464
464
|
}
|
|
465
465
|
)
|
|
466
466
|
] });
|
|
@@ -504,19 +504,19 @@ const U = Q(void 0), T = Q({ responsive: !0, size: "md" }), Zt = ({ children: r,
|
|
|
504
504
|
disabled: l,
|
|
505
505
|
...a
|
|
506
506
|
}
|
|
507
|
-
)), Qe = v(({ selectClassName: r, label: e, error: t, helpText: o, required: l, hiddenRequired: a, "data-testid": i, ...
|
|
508
|
-
const w =
|
|
507
|
+
)), Qe = v(({ selectClassName: r, label: e, error: t, helpText: o, required: l, hiddenRequired: a, "data-testid": i, ...d }, s) => {
|
|
508
|
+
const w = E();
|
|
509
509
|
return /* @__PURE__ */ m(z, { error: t, helpText: o, "data-testid": i, children: [
|
|
510
510
|
/* @__PURE__ */ n(Z, { htmlFor: w, required: l, children: e }),
|
|
511
511
|
/* @__PURE__ */ n(
|
|
512
512
|
oe,
|
|
513
513
|
{
|
|
514
|
-
ref:
|
|
514
|
+
ref: s,
|
|
515
515
|
id: w,
|
|
516
516
|
className: r,
|
|
517
517
|
required: l || a,
|
|
518
518
|
feedback: t ? "error" : void 0,
|
|
519
|
-
...
|
|
519
|
+
...d
|
|
520
520
|
}
|
|
521
521
|
)
|
|
522
522
|
] });
|
|
@@ -529,8 +529,8 @@ const U = Q(void 0), T = Q({ responsive: !0, size: "md" }), Zt = ({ children: r,
|
|
|
529
529
|
loading: l = !1,
|
|
530
530
|
variant: a = "default",
|
|
531
531
|
immediate: i = !1,
|
|
532
|
-
...
|
|
533
|
-
},
|
|
532
|
+
...d
|
|
533
|
+
}, s) => {
|
|
534
534
|
const { setTimeout: w, clearCurrentTimeout: f } = St(500), x = I((g) => {
|
|
535
535
|
!g || i ? (f(), r(g)) : w(() => r(g));
|
|
536
536
|
}, [f, i, r, w]);
|
|
@@ -553,7 +553,7 @@ const U = Q(void 0), T = Q({ responsive: !0, size: "md" }), Zt = ({ children: r,
|
|
|
553
553
|
/* @__PURE__ */ n(
|
|
554
554
|
Y,
|
|
555
555
|
{
|
|
556
|
-
ref:
|
|
556
|
+
ref: s,
|
|
557
557
|
variant: a,
|
|
558
558
|
type: "search",
|
|
559
559
|
className: c(
|
|
@@ -566,7 +566,7 @@ const U = Q(void 0), T = Q({ responsive: !0, size: "md" }), Zt = ({ children: r,
|
|
|
566
566
|
placeholder: "Search...",
|
|
567
567
|
onChange: (g) => x(g.target.value),
|
|
568
568
|
size: o,
|
|
569
|
-
...
|
|
569
|
+
...d
|
|
570
570
|
}
|
|
571
571
|
)
|
|
572
572
|
] });
|
|
@@ -580,11 +580,11 @@ function le({
|
|
|
580
580
|
// SearchInput defaults its size to 'lg'. Change it to 'md'
|
|
581
581
|
listboxSpan: a = "full",
|
|
582
582
|
onFocus: i,
|
|
583
|
-
containerClassName:
|
|
584
|
-
listboxClassName:
|
|
583
|
+
containerClassName: d,
|
|
584
|
+
listboxClassName: s,
|
|
585
585
|
...w
|
|
586
586
|
}, f) {
|
|
587
|
-
const x =
|
|
587
|
+
const x = E(), [g, k] = A(), y = O(null);
|
|
588
588
|
ht(f, () => y.current);
|
|
589
589
|
const u = G(
|
|
590
590
|
() => r ? g ?? [...r.keys()][0] : void 0,
|
|
@@ -595,7 +595,7 @@ function le({
|
|
|
595
595
|
return /* @__PURE__ */ m(
|
|
596
596
|
"div",
|
|
597
597
|
{
|
|
598
|
-
className: c("tw:relative",
|
|
598
|
+
className: c("tw:relative", d),
|
|
599
599
|
onBlur: (b) => {
|
|
600
600
|
b.currentTarget.contains(b.relatedTarget) || e("");
|
|
601
601
|
},
|
|
@@ -634,7 +634,7 @@ function le({
|
|
|
634
634
|
"tw:min-w-60": a === "auto",
|
|
635
635
|
"tw:w-full": a === "full"
|
|
636
636
|
},
|
|
637
|
-
|
|
637
|
+
s
|
|
638
638
|
),
|
|
639
639
|
"aria-label": "Matching items",
|
|
640
640
|
noItemsMessage: "No results found matching search"
|
|
@@ -644,10 +644,10 @@ function le({
|
|
|
644
644
|
}
|
|
645
645
|
);
|
|
646
646
|
}
|
|
647
|
-
const ie = v(le),
|
|
647
|
+
const ie = v(le), de = ({ name: r, color: e }) => /* @__PURE__ */ m("div", { className: "tw:inline-flex tw:items-center tw:gap-2", children: [
|
|
648
648
|
/* @__PURE__ */ n("div", { "aria-hidden": !0, className: "tw:w-4 tw:h-4 tw:rounded-full", style: { backgroundColor: e } }),
|
|
649
649
|
r
|
|
650
|
-
] }),
|
|
650
|
+
] }), se = ({ tag: r, color: e, size: t, onRemove: o }) => (
|
|
651
651
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
652
652
|
/* @__PURE__ */ m(
|
|
653
653
|
"li",
|
|
@@ -662,7 +662,7 @@ const ie = v(le), se = ({ name: r, color: e }) => /* @__PURE__ */ m("div", { cla
|
|
|
662
662
|
),
|
|
663
663
|
style: {
|
|
664
664
|
backgroundColor: e,
|
|
665
|
-
color:
|
|
665
|
+
color: Bt(e) ? "#000" : "#fff"
|
|
666
666
|
},
|
|
667
667
|
onClick: (l) => l.stopPropagation(),
|
|
668
668
|
children: [
|
|
@@ -679,11 +679,11 @@ const ie = v(le), se = ({ name: r, color: e }) => /* @__PURE__ */ m("div", { cla
|
|
|
679
679
|
searchMode: l = "startsWith",
|
|
680
680
|
immutable: a = !1,
|
|
681
681
|
size: i = "md",
|
|
682
|
-
disabled:
|
|
683
|
-
containerClassName:
|
|
682
|
+
disabled: d,
|
|
683
|
+
containerClassName: s,
|
|
684
684
|
...w
|
|
685
685
|
}) => {
|
|
686
|
-
const [f, x] =
|
|
686
|
+
const [f, x] = A(), g = I((h) => {
|
|
687
687
|
const b = h.toLowerCase().trim();
|
|
688
688
|
if (!b) {
|
|
689
689
|
x(void 0);
|
|
@@ -692,8 +692,8 @@ const ie = v(le), se = ({ name: r, color: e }) => /* @__PURE__ */ m("div", { cla
|
|
|
692
692
|
const R = r.filter((N) => {
|
|
693
693
|
if (e.includes(N))
|
|
694
694
|
return !1;
|
|
695
|
-
const
|
|
696
|
-
return l === "startsWith" ?
|
|
695
|
+
const B = N.toLowerCase();
|
|
696
|
+
return l === "startsWith" ? B.startsWith(b) : B.includes(b);
|
|
697
697
|
}).slice(0, 5);
|
|
698
698
|
a || R.push(`Add "${b.split(",").map(ot).join(",")}" tag`), x(new Map(R.map((N) => [N, N])));
|
|
699
699
|
}, [a, l, e, r]), k = I((h) => {
|
|
@@ -716,12 +716,12 @@ const ie = v(le), se = ({ name: r, color: e }) => /* @__PURE__ */ m("div", { cla
|
|
|
716
716
|
"tw:p-0.5": i === "sm",
|
|
717
717
|
"tw:p-1.25": i === "md",
|
|
718
718
|
"tw:p-2": i === "lg",
|
|
719
|
-
"tw:bg-lm-disabled-input tw:dark:bg-dm-disabled-input":
|
|
720
|
-
"tw:bg-lm-primary tw:dark:bg-dm-primary": !
|
|
719
|
+
"tw:bg-lm-disabled-input tw:dark:bg-dm-disabled-input": d,
|
|
720
|
+
"tw:bg-lm-primary tw:dark:bg-dm-primary": !d,
|
|
721
721
|
// Use different background color when rendered inside a card
|
|
722
|
-
"tw:group-[&]/card:bg-lm-input tw:group-[&]/card:dark:bg-dm-input": !
|
|
722
|
+
"tw:group-[&]/card:bg-lm-input tw:group-[&]/card:dark:bg-dm-input": !d
|
|
723
723
|
},
|
|
724
|
-
|
|
724
|
+
s
|
|
725
725
|
),
|
|
726
726
|
onClick: (h) => {
|
|
727
727
|
var b;
|
|
@@ -730,7 +730,7 @@ const ie = v(le), se = ({ name: r, color: e }) => /* @__PURE__ */ m("div", { cla
|
|
|
730
730
|
children: [
|
|
731
731
|
/* @__PURE__ */ n("ul", { className: "tw:m-0 tw:p-0 tw:flex tw:flex-wrap tw:gap-1", children: e.map((h, b) => {
|
|
732
732
|
const R = (o == null ? void 0 : o(h)) ?? nt;
|
|
733
|
-
return /* @__PURE__ */ n(
|
|
733
|
+
return /* @__PURE__ */ n(se, { tag: h, color: R, onRemove: y, size: i }, `${h}${b}`);
|
|
734
734
|
}) }),
|
|
735
735
|
/* @__PURE__ */ n(
|
|
736
736
|
ie,
|
|
@@ -750,12 +750,12 @@ const ie = v(le), se = ({ name: r, color: e }) => /* @__PURE__ */ m("div", { cla
|
|
|
750
750
|
searchResults: f,
|
|
751
751
|
onSearch: g,
|
|
752
752
|
onSelectSearchResult: k,
|
|
753
|
-
renderSearchResult: (h) => h.match(/Add\s+"([^"]+)"\s+tag/) ? h : /* @__PURE__ */ n(
|
|
753
|
+
renderSearchResult: (h) => h.match(/Add\s+"([^"]+)"\s+tag/) ? h : /* @__PURE__ */ n(de, { name: h, color: (o == null ? void 0 : o(h)) ?? nt }),
|
|
754
754
|
onKeyDown: (h) => {
|
|
755
755
|
h.key === "Backspace" && !f && y(e[e.length - 1]);
|
|
756
756
|
},
|
|
757
757
|
size: i,
|
|
758
|
-
disabled:
|
|
758
|
+
disabled: d,
|
|
759
759
|
ref: u,
|
|
760
760
|
immediate: !0,
|
|
761
761
|
...w
|
|
@@ -843,8 +843,8 @@ const ie = v(le), se = ({ name: r, color: e }) => /* @__PURE__ */ m("div", { cla
|
|
|
843
843
|
...l
|
|
844
844
|
}) => {
|
|
845
845
|
const a = O(null);
|
|
846
|
-
return
|
|
847
|
-
},
|
|
846
|
+
return Mt(a, { elementsSelector: t, focusFirstItem: o }), /* @__PURE__ */ n(P, { ref: a, role: "menu", className: p("tw:py-2 tw:whitespace-nowrap", e), ...l, children: r });
|
|
847
|
+
}, F = Object.assign(be, { Item: ce, Separator: me, Title: pe, Misc: ue }), ge = ({
|
|
848
848
|
children: r,
|
|
849
849
|
menuAlignment: e = "left",
|
|
850
850
|
buttonVariant: t = "button",
|
|
@@ -852,24 +852,24 @@ const ie = v(le), se = ({ name: r, color: e }) => /* @__PURE__ */ m("div", { cla
|
|
|
852
852
|
buttonClassName: l,
|
|
853
853
|
buttonSize: a = "md",
|
|
854
854
|
buttonDisabled: i = !1,
|
|
855
|
-
containerClassName:
|
|
856
|
-
menuClassName:
|
|
855
|
+
containerClassName: d,
|
|
856
|
+
menuClassName: s,
|
|
857
857
|
caretless: w,
|
|
858
858
|
buttonLabel: f,
|
|
859
859
|
menuOffset: x = 3
|
|
860
860
|
}) => {
|
|
861
|
-
const [g, k] =
|
|
861
|
+
const [g, k] = A(!1), y = O(null), { refs: u, floatingStyles: h, context: b } = dt({
|
|
862
862
|
open: g,
|
|
863
863
|
onOpenChange: k,
|
|
864
864
|
placement: e === "right" ? "bottom-end" : "bottom-start",
|
|
865
865
|
middleware: [Tt(), _t(x)],
|
|
866
866
|
// eslint-disable-next-line react-compiler/react-compiler
|
|
867
867
|
elements: { reference: y.current }
|
|
868
|
-
}), R = $t(b), { getReferenceProps: N, getFloatingProps:
|
|
868
|
+
}), R = $t(b), { getReferenceProps: N, getFloatingProps: B } = st([
|
|
869
869
|
R
|
|
870
|
-
]),
|
|
871
|
-
return
|
|
872
|
-
const D =
|
|
870
|
+
]), $ = E(), j = O(null);
|
|
871
|
+
return M(() => {
|
|
872
|
+
const D = j.current, V = y.current;
|
|
873
873
|
if (!D || !V)
|
|
874
874
|
return () => {
|
|
875
875
|
};
|
|
@@ -881,13 +881,13 @@ const ie = v(le), se = ({ name: r, color: e }) => /* @__PURE__ */ m("div", { cla
|
|
|
881
881
|
/* @__PURE__ */ m(
|
|
882
882
|
"div",
|
|
883
883
|
{
|
|
884
|
-
ref:
|
|
885
|
-
className: p("tw:relative tw:inline-block",
|
|
884
|
+
ref: j,
|
|
885
|
+
className: p("tw:relative tw:inline-block", d),
|
|
886
886
|
onKeyDown: (D) => {
|
|
887
887
|
D.key === "Escape" && k(!1);
|
|
888
888
|
},
|
|
889
889
|
onBlur: (D) => {
|
|
890
|
-
D.relatedTarget &&
|
|
890
|
+
D.relatedTarget && !j.current.contains(D.relatedTarget) && k(!1);
|
|
891
891
|
},
|
|
892
892
|
children: [
|
|
893
893
|
/* @__PURE__ */ m(
|
|
@@ -898,7 +898,7 @@ const ie = v(le), se = ({ name: r, color: e }) => /* @__PURE__ */ m("div", { cla
|
|
|
898
898
|
type: "button",
|
|
899
899
|
"aria-haspopup": !0,
|
|
900
900
|
"aria-expanded": g,
|
|
901
|
-
"aria-controls":
|
|
901
|
+
"aria-controls": $,
|
|
902
902
|
"aria-label": f,
|
|
903
903
|
disabled: i,
|
|
904
904
|
className: p(
|
|
@@ -939,12 +939,12 @@ const ie = v(le), se = ({ name: r, color: e }) => /* @__PURE__ */ m("div", { cla
|
|
|
939
939
|
ref: u.setFloating,
|
|
940
940
|
style: h,
|
|
941
941
|
className: "tw:min-w-full tw:z-500",
|
|
942
|
-
...
|
|
942
|
+
...B(),
|
|
943
943
|
children: /* @__PURE__ */ n(
|
|
944
|
-
|
|
944
|
+
F,
|
|
945
945
|
{
|
|
946
|
-
className:
|
|
947
|
-
id:
|
|
946
|
+
className: s,
|
|
947
|
+
id: $,
|
|
948
948
|
focusableElementsSelector: '[role="menuitem"]:not([disabled]):not([aria-disabled]),input:not([disabled]),select:not([disabled])',
|
|
949
949
|
focusFirstItem: !0,
|
|
950
950
|
children: r
|
|
@@ -956,10 +956,10 @@ const ie = v(le), se = ({ name: r, color: e }) => /* @__PURE__ */ m("div", { cla
|
|
|
956
956
|
}
|
|
957
957
|
);
|
|
958
958
|
}, L = Object.assign(ge, {
|
|
959
|
-
Item:
|
|
960
|
-
Separator:
|
|
961
|
-
Title:
|
|
962
|
-
Misc:
|
|
959
|
+
Item: F.Item,
|
|
960
|
+
Separator: F.Separator,
|
|
961
|
+
Title: F.Title,
|
|
962
|
+
Misc: F.Misc
|
|
963
963
|
}), he = v(({ className: r, disabled: e, size: t = "md", type: o = "button", ...l }, a) => /* @__PURE__ */ n(
|
|
964
964
|
"button",
|
|
965
965
|
{
|
|
@@ -981,7 +981,7 @@ const ie = v(le), se = ({ name: r, color: e }) => /* @__PURE__ */ m("div", { cla
|
|
|
981
981
|
...l,
|
|
982
982
|
ref: a
|
|
983
983
|
}
|
|
984
|
-
)), fe = ({ className: r, active: e, ...t }) => /* @__PURE__ */ n("li", { role: "menuitem", className: "tw:w-full tw:flex", children: /* @__PURE__ */ n(
|
|
984
|
+
)), fe = ({ className: r, active: e, ...t }) => /* @__PURE__ */ n("li", { role: "menuitem", className: "tw:w-full tw:flex", "data-active": e, children: /* @__PURE__ */ n(
|
|
985
985
|
q,
|
|
986
986
|
{
|
|
987
987
|
className: p(
|
|
@@ -996,7 +996,7 @@ const ie = v(le), se = ({ name: r, color: e }) => /* @__PURE__ */ m("div", { cla
|
|
|
996
996
|
),
|
|
997
997
|
...t
|
|
998
998
|
}
|
|
999
|
-
) }), xe = ({ containerClassName: r, buttonClassName: e, menuClassName: t, active: o, ...l }) => /* @__PURE__ */ n("li", { role: "menuitem", className: "tw:w-full tw:flex", children: /* @__PURE__ */ n(
|
|
999
|
+
) }), xe = ({ containerClassName: r, buttonClassName: e, menuClassName: t, active: o, ...l }) => /* @__PURE__ */ n("li", { role: "menuitem", "aria-haspopup": !0, className: "tw:w-full tw:flex", "data-active": o, children: /* @__PURE__ */ n(
|
|
1000
1000
|
L,
|
|
1001
1001
|
{
|
|
1002
1002
|
containerClassName: p("tw:max-md:w-full", r),
|
|
@@ -1017,8 +1017,8 @@ const ie = v(le), se = ({ name: r, color: e }) => /* @__PURE__ */ m("div", { cla
|
|
|
1017
1017
|
...l
|
|
1018
1018
|
}
|
|
1019
1019
|
) }), ye = ({ className: r, brand: e, children: t }) => {
|
|
1020
|
-
const { flag: o, toggle: l, setToFalse: a } = it(!1, !0), { pathname:
|
|
1021
|
-
return
|
|
1020
|
+
const { flag: o, toggle: l, setToFalse: a } = it(!1, !0), i = E(), d = E(), { pathname: s } = ft();
|
|
1021
|
+
return M(() => a(), [s, a]), /* @__PURE__ */ m(
|
|
1022
1022
|
"nav",
|
|
1023
1023
|
{
|
|
1024
1024
|
className: p(
|
|
@@ -1042,6 +1042,7 @@ const ie = v(le), se = ({ name: r, color: e }) => /* @__PURE__ */ m("div", { cla
|
|
|
1042
1042
|
/* @__PURE__ */ n(
|
|
1043
1043
|
wt,
|
|
1044
1044
|
{
|
|
1045
|
+
id: d,
|
|
1045
1046
|
variant: "secondary",
|
|
1046
1047
|
className: p(
|
|
1047
1048
|
"tw:absolute tw:right-0 tw:top-[50%] tw:translate-y-[-50%]",
|
|
@@ -1051,6 +1052,7 @@ const ie = v(le), se = ({ name: r, color: e }) => /* @__PURE__ */ m("div", { cla
|
|
|
1051
1052
|
),
|
|
1052
1053
|
onClick: l,
|
|
1053
1054
|
"aria-label": `${o ? "Hide" : "Show"} menu`,
|
|
1055
|
+
"aria-controls": i,
|
|
1054
1056
|
children: /* @__PURE__ */ n(C, { icon: o ? It : Ot })
|
|
1055
1057
|
}
|
|
1056
1058
|
)
|
|
@@ -1058,6 +1060,8 @@ const ie = v(le), se = ({ name: r, color: e }) => /* @__PURE__ */ m("div", { cla
|
|
|
1058
1060
|
/* @__PURE__ */ n(
|
|
1059
1061
|
"ul",
|
|
1060
1062
|
{
|
|
1063
|
+
id: i,
|
|
1064
|
+
"aria-labelledby": d,
|
|
1061
1065
|
role: "menu",
|
|
1062
1066
|
className: p(
|
|
1063
1067
|
"tw:m-0 tw:p-0",
|
|
@@ -1096,13 +1100,13 @@ const ie = v(le), se = ({ name: r, color: e }) => /* @__PURE__ */ m("div", { cla
|
|
|
1096
1100
|
...t
|
|
1097
1101
|
}
|
|
1098
1102
|
);
|
|
1099
|
-
}, ve = ({ children: r, className: e, fill: t }) => /* @__PURE__ */ n(mt.Provider, { value: { fill: t }, children: /* @__PURE__ */ n(P, { role: "menubar", className: c("tw:flex tw:overflow-hidden", e), children: r }) }), Ve = Object.assign(ve, { Pill: ke }), Ne = new Intl.NumberFormat("en-US"), Ce = (r) => Ne.format(Number(r)), at = 10, tr = (r) => Math.ceil(r / at) * at,
|
|
1103
|
+
}, ve = ({ children: r, className: e, fill: t }) => /* @__PURE__ */ n(mt.Provider, { value: { fill: t }, children: /* @__PURE__ */ n(P, { role: "menubar", className: c("tw:flex tw:overflow-hidden", e), children: r }) }), Ve = Object.assign(ve, { Pill: ke }), Ne = new Intl.NumberFormat("en-US"), Ce = (r) => Ne.format(Number(r)), at = 10, tr = (r) => Math.ceil(r / at) * at, T = 2, K = "...", Ie = (r, e) => Array.from({ length: e - r }, (t, o) => r + o), Oe = (r, e) => {
|
|
1100
1104
|
const t = Ie(
|
|
1101
|
-
Math.max(
|
|
1102
|
-
Math.min(e - 1, r +
|
|
1105
|
+
Math.max(T, r - T),
|
|
1106
|
+
Math.min(e - 1, r + T) + 1
|
|
1103
1107
|
);
|
|
1104
|
-
return r -
|
|
1105
|
-
},
|
|
1108
|
+
return r - T > T && t.unshift(K), r + T < e - 1 && t.push(K), t.unshift(1), t.push(e), t;
|
|
1109
|
+
}, H = (r) => r === K, Re = (r) => H(r) ? r : Ce(r), Pe = (r, e) => H(r) ? `${r}_${e}` : `${r}`, pt = [
|
|
1106
1110
|
"tw:border tw:border-r-0 tw:last:border-r tw:border-lm-border tw:dark:border-dm-border",
|
|
1107
1111
|
"tw:rounded-none tw:first:rounded-l tw:last:rounded-r"
|
|
1108
1112
|
], ut = (r = !1) => c(
|
|
@@ -1126,20 +1130,20 @@ function De({ children: r, active: e, isEllipsis: t, ...o }) {
|
|
|
1126
1130
|
}
|
|
1127
1131
|
const er = ({ currentPage: r, pagesCount: e, ...t }) => {
|
|
1128
1132
|
const o = "urlForPage" in t, l = o ? Le : De, a = I(
|
|
1129
|
-
(i) => o ? { href:
|
|
1133
|
+
(i) => o ? { href: H(i) ? void 0 : t.urlForPage(i) } : { onClick: () => !H(i) && t.onPageChange(i) },
|
|
1130
1134
|
[o, t]
|
|
1131
1135
|
);
|
|
1132
1136
|
return e < 2 ? null : /* @__PURE__ */ m("div", { className: "tw:select-none tw:flex", "data-testid": "paginator", children: [
|
|
1133
1137
|
r === 1 ? /* @__PURE__ */ n(J, { children: /* @__PURE__ */ n(C, { size: "xs", icon: et }) }) : /* @__PURE__ */ n(l, { ...a(Math.max(1, r - 1)), "aria-label": "Previous", children: /* @__PURE__ */ n(C, { size: "xs", icon: et }) }),
|
|
1134
|
-
Oe(r, e).map((i,
|
|
1138
|
+
Oe(r, e).map((i, d) => /* @__PURE__ */ n(
|
|
1135
1139
|
l,
|
|
1136
1140
|
{
|
|
1137
1141
|
active: i === r,
|
|
1138
|
-
isEllipsis:
|
|
1142
|
+
isEllipsis: H(i),
|
|
1139
1143
|
...a(i),
|
|
1140
1144
|
children: Re(i)
|
|
1141
1145
|
},
|
|
1142
|
-
Pe(i,
|
|
1146
|
+
Pe(i, d)
|
|
1143
1147
|
)),
|
|
1144
1148
|
r === e ? /* @__PURE__ */ n(J, { children: /* @__PURE__ */ n(C, { size: "xs", icon: rt }) }) : /* @__PURE__ */ n(l, { ...a(Math.min(e, r + 1)), "aria-label": "Next", children: /* @__PURE__ */ n(C, { size: "xs", icon: rt }) })
|
|
1145
1149
|
] });
|
|
@@ -1163,7 +1167,7 @@ const er = ({ currentPage: r, pagesCount: e, ...t }) => {
|
|
|
1163
1167
|
Separator: L.Separator,
|
|
1164
1168
|
Title: L.Title,
|
|
1165
1169
|
Misc: L.Misc
|
|
1166
|
-
}),
|
|
1170
|
+
}), Be = ({
|
|
1167
1171
|
open: r,
|
|
1168
1172
|
children: e,
|
|
1169
1173
|
className: t,
|
|
@@ -1171,16 +1175,16 @@ const er = ({ currentPage: r, pagesCount: e, ...t }) => {
|
|
|
1171
1175
|
...l
|
|
1172
1176
|
}) => {
|
|
1173
1177
|
const a = O(null);
|
|
1174
|
-
return
|
|
1178
|
+
return M(() => {
|
|
1175
1179
|
var w, f;
|
|
1176
|
-
const i = document.body,
|
|
1180
|
+
const i = document.body, d = i.style.overflow, s = i.style.paddingRight;
|
|
1177
1181
|
if (r) {
|
|
1178
1182
|
const x = window.outerWidth - i.clientWidth, g = i.scrollHeight > i.clientHeight;
|
|
1179
1183
|
i.style.overflow = "hidden", g && (i.style.paddingRight = `${x}px`), (w = a.current) == null || w.showModal();
|
|
1180
1184
|
} else
|
|
1181
1185
|
(f = a.current) == null || f.close();
|
|
1182
1186
|
return () => {
|
|
1183
|
-
i.style.overflow =
|
|
1187
|
+
i.style.overflow = d, i.style.paddingRight = s;
|
|
1184
1188
|
};
|
|
1185
1189
|
}, [r]), Ut(
|
|
1186
1190
|
/* @__PURE__ */ n(
|
|
@@ -1207,17 +1211,17 @@ const er = ({ currentPage: r, pagesCount: e, ...t }) => {
|
|
|
1207
1211
|
...i
|
|
1208
1212
|
}) => {
|
|
1209
1213
|
const {
|
|
1210
|
-
size:
|
|
1211
|
-
confirmText:
|
|
1214
|
+
size: d = "md",
|
|
1215
|
+
confirmText: s = "Confirm",
|
|
1212
1216
|
cancelText: w = "Cancel",
|
|
1213
1217
|
confirmDisabled: f,
|
|
1214
1218
|
onConfirm: x,
|
|
1215
1219
|
onClosed: g,
|
|
1216
1220
|
...k
|
|
1217
|
-
} = "onConfirm" in i ? i : { ...i }, [y, u] =
|
|
1221
|
+
} = "onConfirm" in i ? i : { ...i }, [y, u] = A(r), h = O(null), b = O("cancel"), R = I((N) => {
|
|
1218
1222
|
N.preventDefault(), N.stopPropagation(), b.current = "confirm", x == null || x();
|
|
1219
1223
|
}, [x]);
|
|
1220
|
-
return
|
|
1224
|
+
return M(() => {
|
|
1221
1225
|
if (r) {
|
|
1222
1226
|
b.current = "cancel", u(!0);
|
|
1223
1227
|
return;
|
|
@@ -1225,19 +1229,19 @@ const er = ({ currentPage: r, pagesCount: e, ...t }) => {
|
|
|
1225
1229
|
const N = h.current;
|
|
1226
1230
|
if (N) {
|
|
1227
1231
|
delete h.current.dataset.open;
|
|
1228
|
-
let
|
|
1229
|
-
const
|
|
1230
|
-
|
|
1232
|
+
let B = !1;
|
|
1233
|
+
const $ = (j) => {
|
|
1234
|
+
B || j.target !== N || (B = !0, u(!1), g == null || g(b.current));
|
|
1231
1235
|
};
|
|
1232
|
-
return N.addEventListener("transitionend",
|
|
1233
|
-
N.removeEventListener("transitionend",
|
|
1236
|
+
return N.addEventListener("transitionend", $), () => {
|
|
1237
|
+
N.removeEventListener("transitionend", $);
|
|
1234
1238
|
};
|
|
1235
1239
|
}
|
|
1236
|
-
}, [g, r]),
|
|
1240
|
+
}, [g, r]), M(() => {
|
|
1237
1241
|
const N = h.current;
|
|
1238
1242
|
y && N && (N.dataset.open = "");
|
|
1239
1243
|
}, [y]), /* @__PURE__ */ n(
|
|
1240
|
-
|
|
1244
|
+
Be,
|
|
1241
1245
|
{
|
|
1242
1246
|
open: y,
|
|
1243
1247
|
onClose: e,
|
|
@@ -1261,10 +1265,10 @@ const er = ({ currentPage: r, pagesCount: e, ...t }) => {
|
|
|
1261
1265
|
"tw:transition-[opacity_,_translate] tw:duration-300",
|
|
1262
1266
|
// Handle modal dimensions for different variants and sizes
|
|
1263
1267
|
t !== "cover" && {
|
|
1264
|
-
"tw:sm:w-sm":
|
|
1265
|
-
"tw:md:w-lg":
|
|
1266
|
-
"tw:md:w-4xl":
|
|
1267
|
-
"tw:md:w-6xl":
|
|
1268
|
+
"tw:sm:w-sm": d === "sm",
|
|
1269
|
+
"tw:md:w-lg": d === "md",
|
|
1270
|
+
"tw:md:w-4xl": d === "lg",
|
|
1271
|
+
"tw:md:w-6xl": d === "xl"
|
|
1268
1272
|
},
|
|
1269
1273
|
{ "tw:h-full": t === "cover" }
|
|
1270
1274
|
),
|
|
@@ -1272,7 +1276,7 @@ const er = ({ currentPage: r, pagesCount: e, ...t }) => {
|
|
|
1272
1276
|
children: /* @__PURE__ */ n(P, { className: c(
|
|
1273
1277
|
"tw:w-full",
|
|
1274
1278
|
{ "tw:h-full tw:relative tw:overflow-auto": t === "cover" }
|
|
1275
|
-
), children: t === "cover" ? /* @__PURE__ */ m(
|
|
1279
|
+
), children: t === "cover" ? /* @__PURE__ */ m(W, { children: [
|
|
1276
1280
|
/* @__PURE__ */ m(
|
|
1277
1281
|
"div",
|
|
1278
1282
|
{
|
|
@@ -1289,7 +1293,7 @@ const er = ({ currentPage: r, pagesCount: e, ...t }) => {
|
|
|
1289
1293
|
}
|
|
1290
1294
|
),
|
|
1291
1295
|
l
|
|
1292
|
-
] }) : /* @__PURE__ */ m(
|
|
1296
|
+
] }) : /* @__PURE__ */ m(W, { children: [
|
|
1293
1297
|
/* @__PURE__ */ m(P.Header, { className: c(
|
|
1294
1298
|
"tw:sticky tw:top-0",
|
|
1295
1299
|
"tw:flex tw:items-center tw:justify-between tw:gap-x-2"
|
|
@@ -1315,7 +1319,7 @@ const er = ({ currentPage: r, pagesCount: e, ...t }) => {
|
|
|
1315
1319
|
variant: t === "danger" ? "danger" : "primary",
|
|
1316
1320
|
disabled: f,
|
|
1317
1321
|
type: "submit",
|
|
1318
|
-
children:
|
|
1322
|
+
children: s
|
|
1319
1323
|
}
|
|
1320
1324
|
)
|
|
1321
1325
|
]
|
|
@@ -1330,7 +1334,7 @@ const er = ({ currentPage: r, pagesCount: e, ...t }) => {
|
|
|
1330
1334
|
"tw:text-gray-500 tw:dark:text-gray-400": o === "default",
|
|
1331
1335
|
"tw:text-danger": o === "error"
|
|
1332
1336
|
}), children: [
|
|
1333
|
-
t && /* @__PURE__ */ m(
|
|
1337
|
+
t && /* @__PURE__ */ m(W, { children: [
|
|
1334
1338
|
/* @__PURE__ */ n(C, { icon: lt, spin: !0 }),
|
|
1335
1339
|
/* @__PURE__ */ n("span", { className: "tw:ml-2", children: e ?? "Loading..." })
|
|
1336
1340
|
] }),
|
|
@@ -1357,23 +1361,23 @@ const er = ({ currentPage: r, pagesCount: e, ...t }) => {
|
|
|
1357
1361
|
const e = O(null), t = (() => {
|
|
1358
1362
|
const u = [];
|
|
1359
1363
|
return r === "auto" && u.push(jt()), u.push(Ft({ element: e })), u;
|
|
1360
|
-
})(), [o, l] =
|
|
1364
|
+
})(), [o, l] = A(!1), { refs: a, floatingStyles: i, context: d, middlewareData: s } = dt({
|
|
1361
1365
|
placement: r === "auto" ? void 0 : r,
|
|
1362
1366
|
open: o,
|
|
1363
1367
|
onOpenChange: l,
|
|
1364
1368
|
middleware: t
|
|
1365
|
-
}), w = Ht(
|
|
1369
|
+
}), w = Ht(d, {
|
|
1366
1370
|
delay: { open: 300 },
|
|
1367
1371
|
move: !0
|
|
1368
|
-
}), { getFloatingProps: f, getReferenceProps: x } =
|
|
1369
|
-
const u =
|
|
1372
|
+
}), { getFloatingProps: f, getReferenceProps: x } = st([w]), { isMounted: g, styles: k } = Wt(d, { duration: 200 }), y = G(() => {
|
|
1373
|
+
const u = d.placement.split("-")[0];
|
|
1370
1374
|
return {
|
|
1371
1375
|
top: "bottom",
|
|
1372
1376
|
right: "left",
|
|
1373
1377
|
bottom: "top",
|
|
1374
1378
|
left: "right"
|
|
1375
1379
|
}[u] ?? "";
|
|
1376
|
-
}, [
|
|
1380
|
+
}, [d.placement]);
|
|
1377
1381
|
return {
|
|
1378
1382
|
anchor: { ...x(), ref: a.setReference },
|
|
1379
1383
|
tooltip: {
|
|
@@ -1381,13 +1385,13 @@ const er = ({ currentPage: r, pagesCount: e, ...t }) => {
|
|
|
1381
1385
|
refSetter: a.setFloating,
|
|
1382
1386
|
isMounted: g,
|
|
1383
1387
|
styles: { ...i, ...k },
|
|
1384
|
-
arrowPos:
|
|
1388
|
+
arrowPos: s.arrow,
|
|
1385
1389
|
arrowRef: e,
|
|
1386
1390
|
arrowSide: y
|
|
1387
1391
|
}
|
|
1388
1392
|
};
|
|
1389
|
-
}, ir = ({ children: r, isMounted: e, styles: t, refSetter: o, arrowRef: l, arrowPos: a, arrowSide: i, ...
|
|
1390
|
-
var
|
|
1393
|
+
}, ir = ({ children: r, isMounted: e, styles: t, refSetter: o, arrowRef: l, arrowPos: a, arrowSide: i, ...d }) => {
|
|
1394
|
+
var s;
|
|
1391
1395
|
return e && /* @__PURE__ */ n(
|
|
1392
1396
|
"div",
|
|
1393
1397
|
{
|
|
@@ -1406,7 +1410,7 @@ const er = ({ currentPage: r, pagesCount: e, ...t }) => {
|
|
|
1406
1410
|
),
|
|
1407
1411
|
ref: o,
|
|
1408
1412
|
style: t,
|
|
1409
|
-
...
|
|
1413
|
+
...d,
|
|
1410
1414
|
children: /* @__PURE__ */ m("div", { className: "tw:relative tw:px-1.5 tw:py-1 tw:rounded tw:bg-black/90 tw:text-white tw:text-center", children: [
|
|
1411
1415
|
/* @__PURE__ */ n("span", { className: "tw:sr-only", children: "Tooltip: " }),
|
|
1412
1416
|
r,
|
|
@@ -1428,7 +1432,7 @@ const er = ({ currentPage: r, pagesCount: e, ...t }) => {
|
|
|
1428
1432
|
style: {
|
|
1429
1433
|
left: a == null ? void 0 : a.x,
|
|
1430
1434
|
top: a == null ? void 0 : a.y,
|
|
1431
|
-
[i]: `${-(((
|
|
1435
|
+
[i]: `${-(((s = l.current) == null ? void 0 : s.offsetWidth) ?? 0) / 2}px`
|
|
1432
1436
|
},
|
|
1433
1437
|
"data-testid": "arrow"
|
|
1434
1438
|
}
|
|
@@ -1437,18 +1441,18 @@ const er = ({ currentPage: r, pagesCount: e, ...t }) => {
|
|
|
1437
1441
|
}
|
|
1438
1442
|
);
|
|
1439
1443
|
};
|
|
1440
|
-
function
|
|
1441
|
-
const i = I((
|
|
1442
|
-
const w = Et({ currentOrderDir: e.dir, currentField: e.field, newField:
|
|
1444
|
+
function dr({ items: r, order: e, onChange: t, prefixed: o = !0, buttonVariant: l = "button", ...a }) {
|
|
1445
|
+
const i = I((s) => {
|
|
1446
|
+
const w = Et({ currentOrderDir: e.dir, currentField: e.field, newField: s });
|
|
1443
1447
|
t(w);
|
|
1444
|
-
}, [t, e.dir, e.field]),
|
|
1448
|
+
}, [t, e.dir, e.field]), d = l === "button";
|
|
1445
1449
|
return /* @__PURE__ */ m(
|
|
1446
1450
|
L,
|
|
1447
1451
|
{
|
|
1448
|
-
buttonContent: /* @__PURE__ */ m(
|
|
1449
|
-
!
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
+
buttonContent: /* @__PURE__ */ m(W, { children: [
|
|
1453
|
+
!d && "Order by",
|
|
1454
|
+
d && !e.field && /* @__PURE__ */ n("i", { children: "Order by..." }),
|
|
1455
|
+
d && e.field && /* @__PURE__ */ m(W, { children: [
|
|
1452
1456
|
o && "Order by: ",
|
|
1453
1457
|
r[e.field],
|
|
1454
1458
|
" - ",
|
|
@@ -1458,18 +1462,18 @@ function sr({ items: r, order: e, onChange: t, prefixed: o = !0, buttonVariant:
|
|
|
1458
1462
|
buttonVariant: l,
|
|
1459
1463
|
...a,
|
|
1460
1464
|
children: [
|
|
1461
|
-
Object.entries(r).map(([
|
|
1465
|
+
Object.entries(r).map(([s, w]) => /* @__PURE__ */ m(
|
|
1462
1466
|
L.Item,
|
|
1463
1467
|
{
|
|
1464
|
-
selected: e.field ===
|
|
1465
|
-
onClick: () => i(
|
|
1468
|
+
selected: e.field === s,
|
|
1469
|
+
onClick: () => i(s),
|
|
1466
1470
|
className: "tw:flex tw:items-center tw:justify-between tw:gap-2",
|
|
1467
1471
|
children: [
|
|
1468
1472
|
w,
|
|
1469
|
-
e.field ===
|
|
1473
|
+
e.field === s && /* @__PURE__ */ n(C, { icon: e.dir === "ASC" ? Pt : Lt })
|
|
1470
1474
|
]
|
|
1471
1475
|
},
|
|
1472
|
-
|
|
1476
|
+
s
|
|
1473
1477
|
)),
|
|
1474
1478
|
/* @__PURE__ */ n(L.Separator, {}),
|
|
1475
1479
|
/* @__PURE__ */ n(L.Item, { disabled: !e.field, onClick: () => t({}), children: /* @__PURE__ */ n("i", { children: "Clear selection" }) })
|
|
@@ -1477,10 +1481,10 @@ function sr({ items: r, order: e, onChange: t, prefixed: o = !0, buttonVariant:
|
|
|
1477
1481
|
}
|
|
1478
1482
|
);
|
|
1479
1483
|
}
|
|
1480
|
-
const
|
|
1481
|
-
const [i,
|
|
1482
|
-
() => l.clipboard.writeText(r).then(
|
|
1483
|
-
[l.clipboard, r,
|
|
1484
|
+
const sr = ({ text: r, className: e, size: t = "lg", initialCopied: o = !1, navigator_: l = globalThis.navigator, ...a }) => {
|
|
1485
|
+
const [i, d] = At(o), s = I(
|
|
1486
|
+
() => l.clipboard.writeText(r).then(d),
|
|
1487
|
+
[l.clipboard, r, d]
|
|
1484
1488
|
);
|
|
1485
1489
|
return /* @__PURE__ */ n(
|
|
1486
1490
|
"button",
|
|
@@ -1497,7 +1501,7 @@ const dr = ({ text: r, className: e, size: t = "lg", initialCopied: o = !1, navi
|
|
|
1497
1501
|
),
|
|
1498
1502
|
"aria-label": `Copy ${r} to clipboard`,
|
|
1499
1503
|
title: "Copy to clipboard",
|
|
1500
|
-
onClick:
|
|
1504
|
+
onClick: s,
|
|
1501
1505
|
...a,
|
|
1502
1506
|
children: /* @__PURE__ */ n(C, { icon: i ? Dt : Kt, fixedWidth: !0 })
|
|
1503
1507
|
}
|
|
@@ -1510,7 +1514,7 @@ export {
|
|
|
1510
1514
|
nr as CardModal,
|
|
1511
1515
|
qe as Checkbox,
|
|
1512
1516
|
X as CloseButton,
|
|
1513
|
-
|
|
1517
|
+
sr as CopyToClipboardButton,
|
|
1514
1518
|
Ke as Details,
|
|
1515
1519
|
L as Dropdown,
|
|
1516
1520
|
K as ELLIPSIS,
|
|
@@ -1521,12 +1525,12 @@ export {
|
|
|
1521
1525
|
Qe as LabelledSelect,
|
|
1522
1526
|
he as LinkButton,
|
|
1523
1527
|
Yt as Listbox,
|
|
1524
|
-
|
|
1528
|
+
F as Menu,
|
|
1525
1529
|
or as Message,
|
|
1526
|
-
|
|
1530
|
+
Be as ModalDialog,
|
|
1527
1531
|
ze as NavBar,
|
|
1528
1532
|
Ve as NavPills,
|
|
1529
|
-
|
|
1533
|
+
dr as OrderingDropdown,
|
|
1530
1534
|
er as Paginator,
|
|
1531
1535
|
ar as Result,
|
|
1532
1536
|
ne as RevealablePasswordInput,
|
|
@@ -1541,7 +1545,7 @@ export {
|
|
|
1541
1545
|
ir as Tooltip,
|
|
1542
1546
|
Ce as formatNumber,
|
|
1543
1547
|
Pe as keyForPage,
|
|
1544
|
-
|
|
1548
|
+
H as pageIsEllipsis,
|
|
1545
1549
|
Re as prettifyPageNumber,
|
|
1546
1550
|
Oe as progressivePagination,
|
|
1547
1551
|
tr as roundTen,
|
package/package.json
CHANGED