@shlinkio/shlink-frontend-kit 0.8.13 → 0.9.0
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/index.js +124 -131
- package/dist/tailwind.d.ts +14 -1
- package/dist/tailwind.js +233 -198
- package/dist/tailwind.preset.css +15 -16
- package/dist/use-toggle-C1uZwbSD.js +32 -0
- package/package.json +11 -8
- package/dist/use-toggle-PWLikLl6.js +0 -22
package/dist/tailwind.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { jsxs as g, jsx as n, Fragment as
|
|
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
|
|
4
|
-
import { Link as
|
|
5
|
-
import { faClose as dt, faEyeSlash as lt, faEye as
|
|
3
|
+
import { useRef as I, useState as F, useEffect as M, useCallback as C, createContext as H, useContext as N, forwardRef as y, useId as $, useMemo as O } from "react";
|
|
4
|
+
import { Link as j, NavLink as at } from "react-router";
|
|
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
6
|
import { FontAwesomeIcon as k } from "@fortawesome/react-fontawesome";
|
|
7
|
-
import { a as
|
|
8
|
-
import { createPortal as
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
import { u as ct, a as mt, b as gt } from "./use-toggle-C1uZwbSD.js";
|
|
8
|
+
import { createPortal as bt } from "react-dom";
|
|
9
|
+
import { faClone as ut } from "@fortawesome/free-regular-svg-icons";
|
|
10
|
+
const zt = ({ children: t, summary: e, summaryClasses: r, ...o }) => {
|
|
11
|
+
const a = I(null), [l, d] = F(!1);
|
|
11
12
|
return M(() => {
|
|
12
|
-
const
|
|
13
|
-
return
|
|
13
|
+
const i = a.current, s = () => d(!!(i != null && i.open));
|
|
14
|
+
return i == null || i.addEventListener("toggle", s), () => i == null ? void 0 : i.removeEventListener("toggle", s);
|
|
14
15
|
}, []), /* @__PURE__ */ g("details", { ref: a, ...o, children: [
|
|
15
16
|
/* @__PURE__ */ n("summary", { className: x("tw:focus-ring tw:px-1 tw:-mx-1 tw:rounded-sm", r), children: e }),
|
|
16
17
|
l && /* @__PURE__ */ n("div", { className: "tw:mt-3 tw:flex tw:flex-col tw:gap-y-3", children: t })
|
|
17
18
|
] });
|
|
18
|
-
},
|
|
19
|
+
}, pt = ({ className: t, ...e }) => /* @__PURE__ */ n(
|
|
19
20
|
"div",
|
|
20
21
|
{
|
|
21
22
|
className: w(
|
|
@@ -25,7 +26,7 @@ const Qt = ({ children: t, summary: e, summaryClasses: r, ...o }) => {
|
|
|
25
26
|
),
|
|
26
27
|
...e
|
|
27
28
|
}
|
|
28
|
-
),
|
|
29
|
+
), ht = ({ className: t, ...e }) => /* @__PURE__ */ n(
|
|
29
30
|
"div",
|
|
30
31
|
{
|
|
31
32
|
className: w(
|
|
@@ -35,7 +36,7 @@ const Qt = ({ children: t, summary: e, summaryClasses: r, ...o }) => {
|
|
|
35
36
|
),
|
|
36
37
|
...e
|
|
37
38
|
}
|
|
38
|
-
),
|
|
39
|
+
), ft = ({ className: t, ...e }) => /* @__PURE__ */ n(
|
|
39
40
|
"div",
|
|
40
41
|
{
|
|
41
42
|
className: w(
|
|
@@ -45,7 +46,7 @@ const Qt = ({ children: t, summary: e, summaryClasses: r, ...o }) => {
|
|
|
45
46
|
),
|
|
46
47
|
...e
|
|
47
48
|
}
|
|
48
|
-
),
|
|
49
|
+
), xt = ({ className: t, ...e }) => /* @__PURE__ */ n(
|
|
49
50
|
"div",
|
|
50
51
|
{
|
|
51
52
|
className: w(
|
|
@@ -55,7 +56,7 @@ const Qt = ({ children: t, summary: e, summaryClasses: r, ...o }) => {
|
|
|
55
56
|
),
|
|
56
57
|
...e
|
|
57
58
|
}
|
|
58
|
-
), v = Object.assign(
|
|
59
|
+
), v = Object.assign(xt, { Body: ht, Header: pt, Footer: ft }), yt = ({ bodyClassName: t, children: e, ...r }) => {
|
|
59
60
|
const { title: o, titleSize: a = "md", ...l } = "title" in r ? r : {
|
|
60
61
|
...r,
|
|
61
62
|
title: void 0,
|
|
@@ -70,7 +71,7 @@ const Qt = ({ children: t, summary: e, summaryClasses: r, ...o }) => {
|
|
|
70
71
|
/* @__PURE__ */ n(v.Body, { className: t, children: e })
|
|
71
72
|
] });
|
|
72
73
|
};
|
|
73
|
-
function
|
|
74
|
+
function kt({
|
|
74
75
|
id: t,
|
|
75
76
|
items: e,
|
|
76
77
|
onSelectItem: r,
|
|
@@ -78,8 +79,8 @@ function ft({
|
|
|
78
79
|
renderItem: a,
|
|
79
80
|
className: l,
|
|
80
81
|
noItemsMessage: d = "No items",
|
|
81
|
-
anchor:
|
|
82
|
-
"aria-label":
|
|
82
|
+
anchor: i,
|
|
83
|
+
"aria-label": s = "Items",
|
|
83
84
|
...c
|
|
84
85
|
}) {
|
|
85
86
|
const [m, u] = F(0), p = C((f) => {
|
|
@@ -89,21 +90,21 @@ function ft({
|
|
|
89
90
|
}
|
|
90
91
|
}, [e, o]);
|
|
91
92
|
return M(() => {
|
|
92
|
-
const f =
|
|
93
|
+
const f = i == null ? void 0 : i.current;
|
|
93
94
|
if (!f)
|
|
94
95
|
return;
|
|
95
96
|
const b = (h) => {
|
|
96
97
|
["Enter", "ArrowUp", "ArrowDown"].includes(h.key) && h.preventDefault(), h.key === "ArrowDown" ? p(Math.min(m + 1, e.size - 1)) : h.key === "ArrowUp" ? p(Math.max(m - 1, 0)) : h.key === "Enter" && r([...e.values()][m]);
|
|
97
98
|
};
|
|
98
99
|
return f.addEventListener("keydown", b), () => f.removeEventListener("keydown", b);
|
|
99
|
-
}, [m,
|
|
100
|
+
}, [m, i, p, e, r]), /* @__PURE__ */ g(
|
|
100
101
|
v,
|
|
101
102
|
{
|
|
102
103
|
id: t,
|
|
103
104
|
className: w("tw:py-1 tw:flex tw:flex-col", l),
|
|
104
105
|
role: "listbox",
|
|
105
106
|
"aria-orientation": "vertical",
|
|
106
|
-
"aria-label":
|
|
107
|
+
"aria-label": s,
|
|
107
108
|
...c,
|
|
108
109
|
children: [
|
|
109
110
|
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: d }),
|
|
@@ -129,8 +130,8 @@ function ft({
|
|
|
129
130
|
}
|
|
130
131
|
);
|
|
131
132
|
}
|
|
132
|
-
const E = H(void 0),
|
|
133
|
-
const { responsive: r } = N(
|
|
133
|
+
const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className: e }) => {
|
|
134
|
+
const { responsive: r } = N(L);
|
|
134
135
|
return /* @__PURE__ */ n(E.Provider, { value: { section: "head" }, children: /* @__PURE__ */ n(
|
|
135
136
|
"thead",
|
|
136
137
|
{
|
|
@@ -141,8 +142,8 @@ const E = H(void 0), T = H({ responsive: !0 }), xt = ({ children: t, className:
|
|
|
141
142
|
children: t
|
|
142
143
|
}
|
|
143
144
|
) });
|
|
144
|
-
},
|
|
145
|
-
const { responsive: r } = N(
|
|
145
|
+
}, Nt = ({ children: t, className: e }) => {
|
|
146
|
+
const { responsive: r } = N(L);
|
|
146
147
|
return /* @__PURE__ */ n(E.Provider, { value: { section: "body" }, children: /* @__PURE__ */ n(
|
|
147
148
|
"tbody",
|
|
148
149
|
{
|
|
@@ -153,8 +154,8 @@ const E = H(void 0), T = H({ responsive: !0 }), xt = ({ children: t, className:
|
|
|
153
154
|
children: t
|
|
154
155
|
}
|
|
155
156
|
) });
|
|
156
|
-
},
|
|
157
|
-
const { responsive: r } = N(
|
|
157
|
+
}, Ct = ({ children: t, className: e }) => {
|
|
158
|
+
const { responsive: r } = N(L);
|
|
158
159
|
return /* @__PURE__ */ n(E.Provider, { value: { section: "footer" }, children: /* @__PURE__ */ n(
|
|
159
160
|
"tfoot",
|
|
160
161
|
{
|
|
@@ -165,8 +166,8 @@ const E = H(void 0), T = H({ responsive: !0 }), xt = ({ children: t, className:
|
|
|
165
166
|
children: t
|
|
166
167
|
}
|
|
167
168
|
) });
|
|
168
|
-
},
|
|
169
|
-
const o = N(E), a = (o == null ? void 0 : o.section) === "body", { responsive: l } = N(
|
|
169
|
+
}, Pt = ({ children: t, className: e, ...r }) => {
|
|
170
|
+
const o = N(E), a = (o == null ? void 0 : o.section) === "body", { responsive: l } = N(L);
|
|
170
171
|
return /* @__PURE__ */ n(
|
|
171
172
|
"tr",
|
|
172
173
|
{
|
|
@@ -185,19 +186,19 @@ const E = H(void 0), T = H({ responsive: !0 }), xt = ({ children: t, className:
|
|
|
185
186
|
children: t
|
|
186
187
|
}
|
|
187
188
|
);
|
|
188
|
-
},
|
|
189
|
-
const l = N(E), d = o ?? ((l == null ? void 0 : l.section) !== "body" ? "th" : "td"), { responsive:
|
|
189
|
+
}, Tt = ({ children: t, className: e, columnName: r, type: o, ...a }) => {
|
|
190
|
+
const l = N(E), d = o ?? ((l == null ? void 0 : l.section) !== "body" ? "th" : "td"), { responsive: i } = N(L);
|
|
190
191
|
return /* @__PURE__ */ n(
|
|
191
192
|
d,
|
|
192
193
|
{
|
|
193
|
-
"data-column":
|
|
194
|
+
"data-column": i ? r : void 0,
|
|
194
195
|
className: w(
|
|
195
196
|
"tw:p-2 tw:border-lm-border tw:dark:border-dm-border",
|
|
196
197
|
{
|
|
197
|
-
"tw:border-b-1": !
|
|
198
|
-
"tw:block tw:lg:table-cell tw:not-last:border-b-1 tw:lg:border-b-1":
|
|
198
|
+
"tw:border-b-1": !i,
|
|
199
|
+
"tw:block tw:lg:table-cell tw:not-last:border-b-1 tw:lg:border-b-1": i,
|
|
199
200
|
// For md and lower, display the content in data-column attribute as before
|
|
200
|
-
"tw:before:lg:hidden tw:before:content-[attr(data-column)] tw:before:font-bold tw:before:mr-1":
|
|
201
|
+
"tw:before:lg:hidden tw:before:content-[attr(data-column)] tw:before:font-bold tw:before:mr-1": i && d === "td"
|
|
201
202
|
},
|
|
202
203
|
e
|
|
203
204
|
),
|
|
@@ -205,11 +206,11 @@ const E = H(void 0), T = H({ responsive: !0 }), xt = ({ children: t, className:
|
|
|
205
206
|
children: t
|
|
206
207
|
}
|
|
207
208
|
);
|
|
208
|
-
},
|
|
209
|
-
/* @__PURE__ */ n(
|
|
210
|
-
/* @__PURE__ */ n(
|
|
211
|
-
e && /* @__PURE__ */ n(
|
|
212
|
-
] }) }),
|
|
209
|
+
}, It = ({ header: t, footer: e, children: r, responsive: o = !0, ...a }) => /* @__PURE__ */ n(L.Provider, { value: { responsive: o }, children: /* @__PURE__ */ g("table", { className: "tw:w-full", ...a, children: [
|
|
210
|
+
/* @__PURE__ */ n(vt, { children: t }),
|
|
211
|
+
/* @__PURE__ */ n(Nt, { children: r }),
|
|
212
|
+
e && /* @__PURE__ */ n(Ct, { children: e })
|
|
213
|
+
] }) }), te = Object.assign(It, { Row: Pt, Cell: Tt }), Lt = ({
|
|
213
214
|
children: t,
|
|
214
215
|
className: e,
|
|
215
216
|
disabled: r,
|
|
@@ -217,10 +218,10 @@ const E = H(void 0), T = H({ responsive: !0 }), xt = ({ children: t, className:
|
|
|
217
218
|
size: a = "md",
|
|
218
219
|
inline: l = !1,
|
|
219
220
|
solid: d = !1,
|
|
220
|
-
type:
|
|
221
|
-
...
|
|
221
|
+
type: i = "button",
|
|
222
|
+
...s
|
|
222
223
|
}) => {
|
|
223
|
-
const c = "to" in
|
|
224
|
+
const c = "to" in s ? j : "button", m = c === j ? void 0 : i;
|
|
224
225
|
return (
|
|
225
226
|
// @ts-expect-error We are explicitly checking for the `to` prop before using Link
|
|
226
227
|
/* @__PURE__ */ n(
|
|
@@ -245,7 +246,8 @@ const E = H(void 0), T = H({ responsive: !0 }), xt = ({ children: t, className:
|
|
|
245
246
|
"tw:px-4 tw:py-2 tw:text-lg": a === "lg"
|
|
246
247
|
},
|
|
247
248
|
{
|
|
248
|
-
"tw:border-brand tw:
|
|
249
|
+
"tw:border-lm-brand tw:dark:border-dm-brand": o === "primary",
|
|
250
|
+
"tw:text-lm-brand tw:dark:text-dm-brand": o === "primary" && !d,
|
|
249
251
|
"tw:border-zinc-500": o === "secondary",
|
|
250
252
|
"tw:text-zinc-500": o === "secondary" && !d,
|
|
251
253
|
"tw:border-danger": o === "danger",
|
|
@@ -253,8 +255,9 @@ const E = H(void 0), T = H({ responsive: !0 }), xt = ({ children: t, className:
|
|
|
253
255
|
},
|
|
254
256
|
d && {
|
|
255
257
|
"tw:text-white": !0,
|
|
256
|
-
"tw:bg-brand": o === "primary",
|
|
257
|
-
"tw:highlight:bg-brand-dark tw:highlight:
|
|
258
|
+
"tw:bg-lm-brand tw:dark:bg-dm-brand": o === "primary",
|
|
259
|
+
"tw:highlight:bg-lm-brand-dark tw:dark:highlight:bg-dm-brand-dark": o === "primary",
|
|
260
|
+
"tw:highlight:border-lm-brand-dark tw:dark:highlight:border-dm-brand-dark": o === "primary",
|
|
258
261
|
"tw:bg-zinc-500": o === "secondary",
|
|
259
262
|
"tw:highlight:bg-zinc-600 tw:highlight:border-zinc-600": o === "secondary",
|
|
260
263
|
"tw:bg-danger": o === "danger",
|
|
@@ -262,7 +265,7 @@ const E = H(void 0), T = H({ responsive: !0 }), xt = ({ children: t, className:
|
|
|
262
265
|
},
|
|
263
266
|
!r && {
|
|
264
267
|
"tw:highlight:text-white": !d,
|
|
265
|
-
"tw:highlight:bg-brand": o === "primary",
|
|
268
|
+
"tw:highlight:bg-lm-brand tw:dark:highlight:bg-dm-brand": o === "primary",
|
|
266
269
|
"tw:highlight:bg-zinc-500": o === "secondary",
|
|
267
270
|
"tw:highlight:bg-danger": o === "danger"
|
|
268
271
|
},
|
|
@@ -273,12 +276,12 @@ const E = H(void 0), T = H({ responsive: !0 }), xt = ({ children: t, className:
|
|
|
273
276
|
),
|
|
274
277
|
disabled: r,
|
|
275
278
|
type: m,
|
|
276
|
-
...
|
|
279
|
+
...s,
|
|
277
280
|
children: t
|
|
278
281
|
}
|
|
279
282
|
)
|
|
280
283
|
);
|
|
281
|
-
},
|
|
284
|
+
}, Z = y(({ className: t, onChange: e, ...r }, o) => {
|
|
282
285
|
const a = C((l) => e == null ? void 0 : e(l.target.checked, l), [e]);
|
|
283
286
|
return /* @__PURE__ */ n(
|
|
284
287
|
"input",
|
|
@@ -288,7 +291,7 @@ const E = H(void 0), T = H({ responsive: !0 }), xt = ({ children: t, className:
|
|
|
288
291
|
className: x(
|
|
289
292
|
"tw:appearance-none tw:focus-ring tw:cursor-[inherit]",
|
|
290
293
|
"tw:border-1 tw:border-lm-input-border tw:dark:border-dm-input-border",
|
|
291
|
-
"tw:bg-lm-primary tw:dark:bg-dm-primary tw:checked:bg-brand tw:bg-no-repeat",
|
|
294
|
+
"tw:bg-lm-primary tw:dark:bg-dm-primary tw:checked:bg-lm-brand tw:dark:checked:bg-dm-brand tw:bg-no-repeat",
|
|
292
295
|
// Use different background color when rendered inside a card
|
|
293
296
|
"tw:group-[&]/card:bg-lm-input tw:group-[&]/card:dark:bg-dm-input",
|
|
294
297
|
t
|
|
@@ -297,14 +300,14 @@ const E = H(void 0), T = H({ responsive: !0 }), xt = ({ children: t, className:
|
|
|
297
300
|
...r
|
|
298
301
|
}
|
|
299
302
|
);
|
|
300
|
-
}),
|
|
301
|
-
|
|
303
|
+
}), ee = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
|
|
304
|
+
Z,
|
|
302
305
|
{
|
|
303
306
|
ref: r,
|
|
304
307
|
className: x("tw:rounded-sm tw:w-4 tw:h-4 tw:checked:bg-(image:--tick) tw:bg-center", t),
|
|
305
308
|
...e
|
|
306
309
|
}
|
|
307
|
-
)),
|
|
310
|
+
)), V = ({ onClick: t, label: e = "Close" }) => /* @__PURE__ */ n(
|
|
308
311
|
"button",
|
|
309
312
|
{
|
|
310
313
|
type: "button",
|
|
@@ -324,12 +327,12 @@ const E = H(void 0), T = H({ responsive: !0 }), xt = ({ children: t, className:
|
|
|
324
327
|
disabled: a,
|
|
325
328
|
readOnly: l,
|
|
326
329
|
...d
|
|
327
|
-
},
|
|
328
|
-
const
|
|
330
|
+
}, i) => {
|
|
331
|
+
const s = !a && !l;
|
|
329
332
|
return /* @__PURE__ */ n(
|
|
330
333
|
"input",
|
|
331
334
|
{
|
|
332
|
-
ref:
|
|
335
|
+
ref: i,
|
|
333
336
|
className: w(
|
|
334
337
|
"tw:w-full",
|
|
335
338
|
{
|
|
@@ -345,10 +348,10 @@ const E = H(void 0), T = H({ responsive: !0 }), xt = ({ children: t, className:
|
|
|
345
348
|
"tw:rounded-md tw:border": !t,
|
|
346
349
|
"tw:border-lm-input-border tw:dark:border-dm-input-border": !t && !r,
|
|
347
350
|
"tw:border-danger": !t && r === "error",
|
|
348
|
-
"tw:bg-lm-disabled-input tw:dark:bg-dm-disabled-input": !
|
|
349
|
-
"tw:bg-lm-primary tw:dark:bg-dm-primary":
|
|
351
|
+
"tw:bg-lm-disabled-input tw:dark:bg-dm-disabled-input": !s,
|
|
352
|
+
"tw:bg-lm-primary tw:dark:bg-dm-primary": s,
|
|
350
353
|
// Use different background color when rendered inside a card
|
|
351
|
-
"tw:group-[&]/card:bg-lm-input tw:group-[&]/card:dark:bg-dm-input":
|
|
354
|
+
"tw:group-[&]/card:bg-lm-input tw:group-[&]/card:dark:bg-dm-input": s
|
|
352
355
|
},
|
|
353
356
|
o
|
|
354
357
|
),
|
|
@@ -357,10 +360,10 @@ const E = H(void 0), T = H({ responsive: !0 }), xt = ({ children: t, className:
|
|
|
357
360
|
...d
|
|
358
361
|
}
|
|
359
362
|
);
|
|
360
|
-
}),
|
|
363
|
+
}), W = ({ required: t, children: e, className: r, ...o }) => /* @__PURE__ */ g("label", { className: x("tw:cursor-pointer", r), ...o, children: [
|
|
361
364
|
e,
|
|
362
365
|
t && /* @__PURE__ */ n("span", { className: "tw:text-danger tw:ml-1", "data-testid": "required-indicator", children: "*" })
|
|
363
|
-
] }),
|
|
366
|
+
] }), K = ({ children: t, helpText: e, error: r, "data-testid": o }) => /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:gap-1", "data-testid": o, children: [
|
|
364
367
|
t,
|
|
365
368
|
e && /* @__PURE__ */ n(
|
|
366
369
|
"small",
|
|
@@ -371,32 +374,32 @@ const E = H(void 0), T = H({ responsive: !0 }), xt = ({ children: t, className:
|
|
|
371
374
|
}
|
|
372
375
|
),
|
|
373
376
|
r && /* @__PURE__ */ n("span", { "data-testid": o ? `${o}-error` : "error", className: "tw:text-danger", children: r })
|
|
374
|
-
] }),
|
|
375
|
-
const c =
|
|
376
|
-
return /* @__PURE__ */ g(
|
|
377
|
-
/* @__PURE__ */ n(
|
|
377
|
+
] }), re = y(({ label: t, inputClassName: e, required: r, hiddenRequired: o, error: a, helpText: l, "data-testid": d, ...i }, s) => {
|
|
378
|
+
const c = $();
|
|
379
|
+
return /* @__PURE__ */ g(K, { error: a, helpText: l, "data-testid": d, children: [
|
|
380
|
+
/* @__PURE__ */ n(W, { htmlFor: c, required: r, children: t }),
|
|
378
381
|
/* @__PURE__ */ n(
|
|
379
382
|
U,
|
|
380
383
|
{
|
|
381
|
-
ref:
|
|
384
|
+
ref: s,
|
|
382
385
|
id: c,
|
|
383
386
|
className: e,
|
|
384
387
|
required: r || o,
|
|
385
388
|
feedback: a ? "error" : void 0,
|
|
386
|
-
...
|
|
389
|
+
...i
|
|
387
390
|
}
|
|
388
391
|
)
|
|
389
392
|
] });
|
|
390
|
-
}),
|
|
391
|
-
const [l, d, ,
|
|
393
|
+
}), Bt = y(({ containerClassName: t, className: e, size: r, ...o }, a) => {
|
|
394
|
+
const [l, d, , i] = ct(!1), s = I(null), c = C(({ relatedTarget: m }) => {
|
|
392
395
|
var u;
|
|
393
|
-
(u =
|
|
394
|
-
}, [
|
|
396
|
+
(u = s.current) != null && u.contains(m) || i();
|
|
397
|
+
}, [s, i]);
|
|
395
398
|
return /* @__PURE__ */ g(
|
|
396
399
|
"div",
|
|
397
400
|
{
|
|
398
401
|
className: x("tw:group tw:relative", t),
|
|
399
|
-
ref:
|
|
402
|
+
ref: s,
|
|
400
403
|
onBlurCapture: c,
|
|
401
404
|
children: [
|
|
402
405
|
/* @__PURE__ */ n(
|
|
@@ -432,29 +435,29 @@ const E = H(void 0), T = H({ responsive: !0 }), xt = ({ children: t, className:
|
|
|
432
435
|
}
|
|
433
436
|
),
|
|
434
437
|
tabIndex: -1,
|
|
435
|
-
children: /* @__PURE__ */ n(k, { fixedWidth: !0, icon: l ? lt :
|
|
438
|
+
children: /* @__PURE__ */ n(k, { fixedWidth: !0, icon: l ? lt : it })
|
|
436
439
|
}
|
|
437
440
|
)
|
|
438
441
|
]
|
|
439
442
|
}
|
|
440
443
|
);
|
|
441
|
-
}),
|
|
442
|
-
const c =
|
|
443
|
-
return /* @__PURE__ */ g(
|
|
444
|
-
/* @__PURE__ */ n(
|
|
444
|
+
}), oe = y(({ label: t, inputClassName: e, required: r, hiddenRequired: o, error: a, helpText: l, "data-testid": d, ...i }, s) => {
|
|
445
|
+
const c = $();
|
|
446
|
+
return /* @__PURE__ */ g(K, { error: a, helpText: l, "data-testid": d, children: [
|
|
447
|
+
/* @__PURE__ */ n(W, { htmlFor: c, required: r, children: t }),
|
|
445
448
|
/* @__PURE__ */ n(
|
|
446
|
-
|
|
449
|
+
Bt,
|
|
447
450
|
{
|
|
448
|
-
ref:
|
|
451
|
+
ref: s,
|
|
449
452
|
id: c,
|
|
450
453
|
className: e,
|
|
451
454
|
required: r || o,
|
|
452
455
|
feedback: a ? "error" : void 0,
|
|
453
|
-
...
|
|
456
|
+
...i
|
|
454
457
|
}
|
|
455
458
|
)
|
|
456
459
|
] });
|
|
457
|
-
}),
|
|
460
|
+
}), Mt = y(({
|
|
458
461
|
className: t,
|
|
459
462
|
size: e = "md",
|
|
460
463
|
feedback: r,
|
|
@@ -494,23 +497,23 @@ const E = H(void 0), T = H({ responsive: !0 }), xt = ({ children: t, className:
|
|
|
494
497
|
disabled: a,
|
|
495
498
|
...l
|
|
496
499
|
}
|
|
497
|
-
)),
|
|
498
|
-
const c =
|
|
499
|
-
return /* @__PURE__ */ g(
|
|
500
|
-
/* @__PURE__ */ n(
|
|
500
|
+
)), ne = y(({ selectClassName: t, label: e, error: r, helpText: o, required: a, hiddenRequired: l, "data-testid": d, ...i }, s) => {
|
|
501
|
+
const c = $();
|
|
502
|
+
return /* @__PURE__ */ g(K, { error: r, helpText: o, "data-testid": d, children: [
|
|
503
|
+
/* @__PURE__ */ n(W, { htmlFor: c, required: a, children: e }),
|
|
501
504
|
/* @__PURE__ */ n(
|
|
502
|
-
|
|
505
|
+
Mt,
|
|
503
506
|
{
|
|
504
|
-
ref:
|
|
507
|
+
ref: s,
|
|
505
508
|
id: c,
|
|
506
509
|
className: t,
|
|
507
510
|
required: a || l,
|
|
508
511
|
feedback: r ? "error" : void 0,
|
|
509
|
-
...
|
|
512
|
+
...i
|
|
510
513
|
}
|
|
511
514
|
)
|
|
512
515
|
] });
|
|
513
|
-
}),
|
|
516
|
+
}), Et = y(({
|
|
514
517
|
onChange: t,
|
|
515
518
|
containerClassName: e,
|
|
516
519
|
inputClassName: r,
|
|
@@ -519,14 +522,14 @@ const E = H(void 0), T = H({ responsive: !0 }), xt = ({ children: t, className:
|
|
|
519
522
|
loading: a = !1,
|
|
520
523
|
...l
|
|
521
524
|
}, d) => {
|
|
522
|
-
const { setTimeout:
|
|
523
|
-
m ?
|
|
524
|
-
}, [
|
|
525
|
+
const { setTimeout: i, clearCurrentTimeout: s } = mt(500), c = C((m) => {
|
|
526
|
+
m ? i(() => t(m)) : (s(), t(m));
|
|
527
|
+
}, [s, t, i]);
|
|
525
528
|
return /* @__PURE__ */ g("div", { className: w("tw:group tw:relative tw:focus-within:z-10", e), children: [
|
|
526
529
|
/* @__PURE__ */ n(
|
|
527
530
|
k,
|
|
528
531
|
{
|
|
529
|
-
icon: a ?
|
|
532
|
+
icon: a ? Y : st,
|
|
530
533
|
spin: a,
|
|
531
534
|
className: w(
|
|
532
535
|
"tw:absolute tw:top-[50%] tw:translate-y-[-50%] tw:transition-colors",
|
|
@@ -558,7 +561,7 @@ const E = H(void 0), T = H({ responsive: !0 }), xt = ({ children: t, className:
|
|
|
558
561
|
)
|
|
559
562
|
] });
|
|
560
563
|
});
|
|
561
|
-
function
|
|
564
|
+
function ae({
|
|
562
565
|
searchResults: t,
|
|
563
566
|
onSearch: e,
|
|
564
567
|
onSelectSearchResult: r,
|
|
@@ -567,13 +570,13 @@ function ee({
|
|
|
567
570
|
// SearchInput defaults its size to 'lg'. Change it to 'md'
|
|
568
571
|
listboxSpan: l = "full",
|
|
569
572
|
onFocus: d,
|
|
570
|
-
...
|
|
573
|
+
...i
|
|
571
574
|
}) {
|
|
572
|
-
const
|
|
575
|
+
const s = I(null), c = $(), [m, u] = F(), p = O(
|
|
573
576
|
() => t ? m ?? [...t.keys()][0] : void 0,
|
|
574
577
|
[m, t]
|
|
575
578
|
), f = C((b) => {
|
|
576
|
-
r(b), e(""),
|
|
579
|
+
r(b), e(""), s.current.value = "";
|
|
577
580
|
}, [e, r]);
|
|
578
581
|
return /* @__PURE__ */ g(
|
|
579
582
|
"div",
|
|
@@ -584,11 +587,11 @@ function ee({
|
|
|
584
587
|
},
|
|
585
588
|
children: [
|
|
586
589
|
/* @__PURE__ */ n(
|
|
587
|
-
|
|
590
|
+
Et,
|
|
588
591
|
{
|
|
589
592
|
onChange: e,
|
|
590
593
|
size: a,
|
|
591
|
-
ref:
|
|
594
|
+
ref: s,
|
|
592
595
|
role: "combobox",
|
|
593
596
|
"aria-autocomplete": "list",
|
|
594
597
|
"aria-expanded": !!t,
|
|
@@ -599,15 +602,15 @@ function ee({
|
|
|
599
602
|
onFocus: (b) => {
|
|
600
603
|
d == null || d(b), e(b.target.value);
|
|
601
604
|
},
|
|
602
|
-
...
|
|
605
|
+
...i
|
|
603
606
|
}
|
|
604
607
|
),
|
|
605
608
|
t && /* @__PURE__ */ n(
|
|
606
|
-
|
|
609
|
+
kt,
|
|
607
610
|
{
|
|
608
611
|
id: c,
|
|
609
612
|
items: t,
|
|
610
|
-
anchor:
|
|
613
|
+
anchor: s,
|
|
611
614
|
onSelectItem: f,
|
|
612
615
|
onActiveItemChange: u,
|
|
613
616
|
renderItem: o,
|
|
@@ -626,8 +629,8 @@ function ee({
|
|
|
626
629
|
}
|
|
627
630
|
);
|
|
628
631
|
}
|
|
629
|
-
const
|
|
630
|
-
|
|
632
|
+
const de = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
|
|
633
|
+
Z,
|
|
631
634
|
{
|
|
632
635
|
ref: r,
|
|
633
636
|
className: x(
|
|
@@ -639,12 +642,13 @@ const re = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
|
|
|
639
642
|
),
|
|
640
643
|
...e
|
|
641
644
|
}
|
|
642
|
-
)),
|
|
645
|
+
)), Rt = ({ className: t, disabled: e, size: r = "md", type: o = "button", ...a }) => /* @__PURE__ */ n(
|
|
643
646
|
"button",
|
|
644
647
|
{
|
|
645
648
|
className: w(
|
|
646
649
|
"tw:inline-flex tw:rounded-md tw:focus-ring",
|
|
647
|
-
"tw:text-brand tw:
|
|
650
|
+
"tw:text-lm-brand tw:dark:text-dm-brand",
|
|
651
|
+
"tw:highlight:text-lm-brand-dark tw:dark:highlight:text-dm-brand-dark tw:highlight:underline",
|
|
648
652
|
{
|
|
649
653
|
"tw:px-1.5 tw:py-1 tw:text-sm": r === "sm",
|
|
650
654
|
"tw:px-3 tw:py-1.5": r === "md",
|
|
@@ -657,8 +661,8 @@ const re = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
|
|
|
657
661
|
type: o,
|
|
658
662
|
...a
|
|
659
663
|
}
|
|
660
|
-
),
|
|
661
|
-
const o = N(
|
|
664
|
+
), z = H(null), _t = ({ className: t, to: e, ...r }) => {
|
|
665
|
+
const o = N(z);
|
|
662
666
|
return /* @__PURE__ */ n(
|
|
663
667
|
at,
|
|
664
668
|
{
|
|
@@ -666,10 +670,13 @@ const re = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
|
|
|
666
670
|
to: e,
|
|
667
671
|
className: ({ isActive: a }) => w(
|
|
668
672
|
"tw:px-4 tw:pt-2 tw:pb-[calc(0.5rem-3px)] tw:border-b-3",
|
|
669
|
-
"tw:
|
|
670
|
-
"tw:
|
|
673
|
+
"tw:highlight:text-lm-brand tw:dark:highlight:text-dm-brand",
|
|
674
|
+
"tw:font-bold tw:text-center tw:no-underline tw:transition-colors",
|
|
675
|
+
"tw:rounded-none tw:outline-none tw:focus-visible:inset-ring-2",
|
|
676
|
+
"tw:focus-visible:inset-ring-lm-brand/50 tw:dark:focus-visible:inset-ring-dm-brand/50",
|
|
671
677
|
{
|
|
672
|
-
"tw:
|
|
678
|
+
"tw:text-lm-brand tw:dark:text-dm-brand": a,
|
|
679
|
+
"tw:border-b-lm-brand tw:dark:border-b-dm-brand active": a,
|
|
673
680
|
"tw:border-b-transparent tw:text-gray-500": !a,
|
|
674
681
|
"tw:flex-grow": o == null ? void 0 : o.fill
|
|
675
682
|
},
|
|
@@ -678,71 +685,73 @@ const re = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
|
|
|
678
685
|
...r
|
|
679
686
|
}
|
|
680
687
|
);
|
|
681
|
-
},
|
|
682
|
-
const r =
|
|
683
|
-
Math.max(
|
|
684
|
-
Math.min(e - 1, t +
|
|
688
|
+
}, Ft = ({ children: t, className: e, fill: r }) => /* @__PURE__ */ n(z.Provider, { value: { fill: r }, children: /* @__PURE__ */ n(v, { role: "menubar", className: w("tw:flex tw:overflow-hidden", e), children: t }) }), le = Object.assign(Ft, { Pill: _t }), $t = new Intl.NumberFormat("en-US"), Dt = (t) => $t.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
|
+
const r = St(
|
|
690
|
+
Math.max(T, t - T),
|
|
691
|
+
Math.min(e - 1, t + T) + 1
|
|
685
692
|
);
|
|
686
|
-
return t -
|
|
687
|
-
}, B = (t) => t ===
|
|
693
|
+
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 : Dt(t), Ht = (t, e) => B(t) ? `${t}_${e}` : `${t}`, tt = [
|
|
688
695
|
"tw:border tw:border-r-0 tw:last:border-r tw:border-lm-border tw:dark:border-dm-border",
|
|
689
696
|
"tw:rounded-none tw:first:rounded-l tw:last:rounded-r"
|
|
690
697
|
], et = (t = !1) => w(
|
|
691
698
|
tt,
|
|
692
699
|
"tw:px-3 py-2 tw:cursor-pointer tw:no-underline",
|
|
693
700
|
"tw:focus-ring tw:focus-visible:z-1",
|
|
694
|
-
|
|
695
|
-
"tw:
|
|
696
|
-
"tw:bg-lm-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
701
|
+
!t && [
|
|
702
|
+
"tw:text-lm-brand tw:dark:text-dm-brand",
|
|
703
|
+
"tw:bg-lm-primary tw:dark:bg-dm-primary",
|
|
704
|
+
"tw:highlight:bg-lm-secondary tw:dark:highlight:bg-dm-secondary"
|
|
705
|
+
],
|
|
706
|
+
t && "tw:bg-lm-main tw:dark:bg-dm-main tw:text-white"
|
|
707
|
+
), A = ({ children: t }) => /* @__PURE__ */ n("span", { "aria-hidden": !0, className: w(tt, "tw:px-3 py-2 tw:text-gray-400"), children: t }), rt = () => /* @__PURE__ */ n(A, { children: _ });
|
|
708
|
+
function Ot({ children: t, active: e, isEllipsis: r, href: o, ...a }) {
|
|
700
709
|
const l = O(() => et(e), [e]);
|
|
701
|
-
return r ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n(
|
|
710
|
+
return r ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n(j, { className: l, to: o, ...a, children: t });
|
|
702
711
|
}
|
|
703
|
-
function
|
|
712
|
+
function Ut({ children: t, active: e, isEllipsis: r, ...o }) {
|
|
704
713
|
const a = O(() => et(e), [e]);
|
|
705
714
|
return r ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n("button", { type: "button", className: a, ...o, children: t });
|
|
706
715
|
}
|
|
707
|
-
const
|
|
708
|
-
const o = "urlForPage" in r, a = o ?
|
|
716
|
+
const se = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
717
|
+
const o = "urlForPage" in r, a = o ? Ot : Ut, l = C(
|
|
709
718
|
(d) => o ? { href: B(d) ? void 0 : r.urlForPage(d) } : { onClick: () => !B(d) && r.onPageChange(d) },
|
|
710
719
|
[o, r]
|
|
711
720
|
);
|
|
712
721
|
return e < 2 ? null : /* @__PURE__ */ g("div", { className: "tw:select-none tw:flex", "data-testid": "paginator", children: [
|
|
713
|
-
t === 1 ? /* @__PURE__ */ n(
|
|
714
|
-
|
|
722
|
+
t === 1 ? /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(k, { size: "xs", icon: J }) }) : /* @__PURE__ */ n(a, { ...l(Math.max(1, t - 1)), "aria-label": "Previous", children: /* @__PURE__ */ n(k, { size: "xs", icon: J }) }),
|
|
723
|
+
jt(t, e).map((d, i) => /* @__PURE__ */ n(
|
|
715
724
|
a,
|
|
716
725
|
{
|
|
717
726
|
active: d === t,
|
|
718
727
|
isEllipsis: B(d),
|
|
719
728
|
...l(d),
|
|
720
|
-
children:
|
|
729
|
+
children: At(d)
|
|
721
730
|
},
|
|
722
|
-
|
|
731
|
+
Ht(d, i)
|
|
723
732
|
)),
|
|
724
|
-
t === e ? /* @__PURE__ */ n(
|
|
733
|
+
t === e ? /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(k, { size: "xs", icon: Q }) }) : /* @__PURE__ */ n(a, { ...l(Math.min(e, t + 1)), "aria-label": "Next", children: /* @__PURE__ */ n(k, { size: "xs", icon: Q }) })
|
|
725
734
|
] });
|
|
726
|
-
},
|
|
735
|
+
}, Wt = ({
|
|
727
736
|
open: t,
|
|
728
737
|
children: e,
|
|
729
738
|
className: r,
|
|
730
739
|
onClose: o,
|
|
731
740
|
...a
|
|
732
741
|
}) => {
|
|
733
|
-
const l =
|
|
742
|
+
const l = I(null);
|
|
734
743
|
return M(() => {
|
|
735
744
|
var c, m;
|
|
736
|
-
const d = document.body,
|
|
745
|
+
const d = document.body, i = d.style.overflow, s = d.style.paddingRight;
|
|
737
746
|
if (t) {
|
|
738
747
|
const u = window.outerWidth - d.clientWidth, p = d.scrollHeight > d.clientHeight;
|
|
739
748
|
d.style.overflow = "hidden", p && (d.style.paddingRight = `${u}px`), (c = l.current) == null || c.showModal();
|
|
740
749
|
} else
|
|
741
750
|
(m = l.current) == null || m.close();
|
|
742
751
|
return () => {
|
|
743
|
-
d.style.overflow =
|
|
752
|
+
d.style.overflow = i, d.style.paddingRight = s;
|
|
744
753
|
};
|
|
745
|
-
}, [t]),
|
|
754
|
+
}, [t]), bt(
|
|
746
755
|
/* @__PURE__ */ n(
|
|
747
756
|
"dialog",
|
|
748
757
|
{
|
|
@@ -757,7 +766,7 @@ const ae = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
757
766
|
),
|
|
758
767
|
document.body
|
|
759
768
|
);
|
|
760
|
-
},
|
|
769
|
+
}, we = ({
|
|
761
770
|
open: t,
|
|
762
771
|
onClose: e,
|
|
763
772
|
variant: r = "default",
|
|
@@ -767,37 +776,37 @@ const ae = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
767
776
|
...d
|
|
768
777
|
}) => {
|
|
769
778
|
const {
|
|
770
|
-
size:
|
|
771
|
-
confirmText:
|
|
779
|
+
size: i = "md",
|
|
780
|
+
confirmText: s = "Confirm",
|
|
772
781
|
cancelText: c = "Cancel",
|
|
773
782
|
confirmDisabled: m,
|
|
774
783
|
onConfirm: u,
|
|
775
784
|
onClosed: p,
|
|
776
785
|
...f
|
|
777
|
-
} = "onConfirm" in d ? d : { ...d }, [b, h] = F(t),
|
|
778
|
-
|
|
786
|
+
} = "onConfirm" in d ? d : { ...d }, [b, h] = F(t), R = I(null), D = I("cancel"), ot = C(() => {
|
|
787
|
+
D.current = "confirm", u == null || u();
|
|
779
788
|
}, [u]);
|
|
780
789
|
return M(() => {
|
|
781
790
|
if (t) {
|
|
782
|
-
|
|
791
|
+
D.current = "cancel", h(!0);
|
|
783
792
|
return;
|
|
784
793
|
}
|
|
785
|
-
const P =
|
|
794
|
+
const P = R.current;
|
|
786
795
|
if (P) {
|
|
787
|
-
delete
|
|
796
|
+
delete R.current.dataset.open;
|
|
788
797
|
let q = !1;
|
|
789
|
-
const
|
|
790
|
-
q || nt.target !== P || (q = !0, h(!1), p == null || p(
|
|
798
|
+
const G = (nt) => {
|
|
799
|
+
q || nt.target !== P || (q = !0, h(!1), p == null || p(D.current));
|
|
791
800
|
};
|
|
792
|
-
return P.addEventListener("transitionend",
|
|
793
|
-
P.removeEventListener("transitionend",
|
|
801
|
+
return P.addEventListener("transitionend", G), () => {
|
|
802
|
+
P.removeEventListener("transitionend", G);
|
|
794
803
|
};
|
|
795
804
|
}
|
|
796
805
|
}, [p, t]), M(() => {
|
|
797
|
-
const P =
|
|
806
|
+
const P = R.current;
|
|
798
807
|
b && P && (P.dataset.open = "");
|
|
799
808
|
}, [b]), /* @__PURE__ */ n(
|
|
800
|
-
|
|
809
|
+
Wt,
|
|
801
810
|
{
|
|
802
811
|
open: b,
|
|
803
812
|
onClose: e,
|
|
@@ -813,7 +822,7 @@ const ae = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
813
822
|
"div",
|
|
814
823
|
{
|
|
815
824
|
"data-testid": "transition-container",
|
|
816
|
-
ref:
|
|
825
|
+
ref: R,
|
|
817
826
|
className: w(
|
|
818
827
|
"tw:w-full tw:m-auto tw:p-4 tw:sm:p-6",
|
|
819
828
|
// CSS transitions are based on the presence of the `data-open` attribute
|
|
@@ -821,17 +830,17 @@ const ae = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
821
830
|
"tw:transition-[opacity_,_translate] tw:duration-300",
|
|
822
831
|
// Handle modal dimensions for different variants and sizes
|
|
823
832
|
r !== "cover" && {
|
|
824
|
-
"tw:sm:w-sm":
|
|
825
|
-
"tw:md:w-lg":
|
|
826
|
-
"tw:md:w-4xl":
|
|
827
|
-
"tw:md:w-6xl":
|
|
833
|
+
"tw:sm:w-sm": i === "sm",
|
|
834
|
+
"tw:md:w-lg": i === "md",
|
|
835
|
+
"tw:md:w-4xl": i === "lg",
|
|
836
|
+
"tw:md:w-6xl": i === "xl"
|
|
828
837
|
},
|
|
829
838
|
{ "tw:h-full": r === "cover" }
|
|
830
839
|
),
|
|
831
840
|
children: /* @__PURE__ */ n(v, { className: w(
|
|
832
841
|
"tw:w-full",
|
|
833
842
|
{ "tw:h-full tw:relative tw:overflow-auto": r === "cover" }
|
|
834
|
-
), children: r === "cover" ? /* @__PURE__ */ g(
|
|
843
|
+
), children: r === "cover" ? /* @__PURE__ */ g(S, { children: [
|
|
835
844
|
/* @__PURE__ */ g(
|
|
836
845
|
"div",
|
|
837
846
|
{
|
|
@@ -843,18 +852,18 @@ const ae = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
843
852
|
),
|
|
844
853
|
children: [
|
|
845
854
|
/* @__PURE__ */ n("h5", { children: o }),
|
|
846
|
-
/* @__PURE__ */ n(
|
|
855
|
+
/* @__PURE__ */ n(V, { onClick: e, label: "Close dialog" })
|
|
847
856
|
]
|
|
848
857
|
}
|
|
849
858
|
),
|
|
850
859
|
/* @__PURE__ */ n("div", { children: a })
|
|
851
|
-
] }) : /* @__PURE__ */ g(
|
|
860
|
+
] }) : /* @__PURE__ */ g(S, { children: [
|
|
852
861
|
/* @__PURE__ */ g(v.Header, { className: w(
|
|
853
862
|
"tw:sticky tw:top-0",
|
|
854
863
|
"tw:flex tw:items-center tw:justify-between tw:gap-x-2"
|
|
855
864
|
), children: [
|
|
856
865
|
/* @__PURE__ */ n("h5", { className: w({ "tw:text-danger": r === "danger" }), children: o }),
|
|
857
|
-
/* @__PURE__ */ n(
|
|
866
|
+
/* @__PURE__ */ n(V, { onClick: e, label: "Close dialog" })
|
|
858
867
|
] }),
|
|
859
868
|
/* @__PURE__ */ n(v.Body, { children: a }),
|
|
860
869
|
u && /* @__PURE__ */ g(
|
|
@@ -866,15 +875,15 @@ const ae = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
866
875
|
"tw:[&]:px-3 tw:sticky tw:bottom-0"
|
|
867
876
|
),
|
|
868
877
|
children: [
|
|
869
|
-
/* @__PURE__ */ n(
|
|
878
|
+
/* @__PURE__ */ n(Rt, { onClick: e, children: c }),
|
|
870
879
|
/* @__PURE__ */ n(
|
|
871
|
-
|
|
880
|
+
Lt,
|
|
872
881
|
{
|
|
873
882
|
solid: !0,
|
|
874
883
|
variant: r === "danger" ? "danger" : "primary",
|
|
875
884
|
disabled: m,
|
|
876
885
|
onClick: ot,
|
|
877
|
-
children:
|
|
886
|
+
children: s
|
|
878
887
|
}
|
|
879
888
|
)
|
|
880
889
|
]
|
|
@@ -885,16 +894,16 @@ const ae = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
885
894
|
)
|
|
886
895
|
}
|
|
887
896
|
);
|
|
888
|
-
},
|
|
897
|
+
}, ce = ({ className: t, children: e, loading: r = !1, variant: o = "default" }) => /* @__PURE__ */ n(yt, { className: x({ "tw:[&]:border-danger": o === "error" }, t), children: /* @__PURE__ */ g("h3", { className: x("tw:text-center", {
|
|
889
898
|
"tw:text-gray-500 tw:dark:text-gray-400": o === "default",
|
|
890
899
|
"tw:text-danger": o === "error"
|
|
891
900
|
}), children: [
|
|
892
|
-
r && /* @__PURE__ */ g(
|
|
893
|
-
/* @__PURE__ */ n(k, { icon:
|
|
901
|
+
r && /* @__PURE__ */ g(S, { children: [
|
|
902
|
+
/* @__PURE__ */ n(k, { icon: Y, spin: !0 }),
|
|
894
903
|
/* @__PURE__ */ n("span", { className: "tw:ml-2", children: e ?? "Loading..." })
|
|
895
904
|
] }),
|
|
896
905
|
!r && e
|
|
897
|
-
] }) }),
|
|
906
|
+
] }) }), me = ({ variant: t, className: e, size: r = "md", children: o }) => /* @__PURE__ */ n(
|
|
898
907
|
"div",
|
|
899
908
|
{
|
|
900
909
|
className: x(
|
|
@@ -904,7 +913,7 @@ const ae = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
904
913
|
"tw:p-4": r === "md",
|
|
905
914
|
"tw:p-6": r === "lg",
|
|
906
915
|
"tw:[&]:text-white": t !== "warning",
|
|
907
|
-
"tw:bg-brand": t === "success",
|
|
916
|
+
"tw:bg-lm-brand tw:dark:bg-dm-brand": t === "success",
|
|
908
917
|
"tw:bg-danger": t === "error",
|
|
909
918
|
"tw:bg-warning tw:text-black": t === "warning"
|
|
910
919
|
},
|
|
@@ -912,38 +921,64 @@ const ae = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
912
921
|
),
|
|
913
922
|
children: o
|
|
914
923
|
}
|
|
915
|
-
)
|
|
924
|
+
), ge = ({ text: t, className: e, size: r = "lg", initialCopied: o = !1, navigator_: a = globalThis.navigator, ...l }) => {
|
|
925
|
+
const [d, i] = gt(o), s = C(
|
|
926
|
+
() => a.clipboard.writeText(t).then(i),
|
|
927
|
+
[a.clipboard, t, i]
|
|
928
|
+
);
|
|
929
|
+
return /* @__PURE__ */ n(
|
|
930
|
+
"button",
|
|
931
|
+
{
|
|
932
|
+
type: "button",
|
|
933
|
+
className: x(
|
|
934
|
+
"tw:focus-ring tw:rounded-sm",
|
|
935
|
+
{
|
|
936
|
+
"tw:text-md": r === "sm",
|
|
937
|
+
"tw:text-lg": r === "md",
|
|
938
|
+
"tw:text-xl": r === "lg"
|
|
939
|
+
},
|
|
940
|
+
e
|
|
941
|
+
),
|
|
942
|
+
"aria-label": `Copy ${t} to clipboard`,
|
|
943
|
+
title: "Copy to clipboard",
|
|
944
|
+
onClick: s,
|
|
945
|
+
...l,
|
|
946
|
+
children: /* @__PURE__ */ n(k, { icon: d ? wt : ut, fixedWidth: !0 })
|
|
947
|
+
}
|
|
948
|
+
);
|
|
949
|
+
};
|
|
916
950
|
export {
|
|
917
|
-
|
|
951
|
+
Lt as Button,
|
|
918
952
|
v as Card,
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
953
|
+
we as CardModal,
|
|
954
|
+
ee as Checkbox,
|
|
955
|
+
V as CloseButton,
|
|
956
|
+
ge as CopyToClipboardButton,
|
|
957
|
+
zt as Details,
|
|
958
|
+
_ as ELLIPSIS,
|
|
924
959
|
U as Input,
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
960
|
+
W as Label,
|
|
961
|
+
re as LabelledInput,
|
|
962
|
+
oe as LabelledRevealablePasswordInput,
|
|
963
|
+
ne as LabelledSelect,
|
|
964
|
+
Rt as LinkButton,
|
|
965
|
+
kt as Listbox,
|
|
966
|
+
ce as Message,
|
|
967
|
+
Wt as ModalDialog,
|
|
968
|
+
le as NavPills,
|
|
969
|
+
se as Paginator,
|
|
970
|
+
me as Result,
|
|
971
|
+
Bt as RevealablePasswordInput,
|
|
972
|
+
ae as SearchCombobox,
|
|
973
|
+
Et as SearchInput,
|
|
974
|
+
Mt as Select,
|
|
975
|
+
yt as SimpleCard,
|
|
976
|
+
te as Table,
|
|
977
|
+
de as ToggleSwitch,
|
|
978
|
+
Dt as formatNumber,
|
|
979
|
+
Ht as keyForPage,
|
|
945
980
|
B as pageIsEllipsis,
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
981
|
+
At as prettifyPageNumber,
|
|
982
|
+
jt as progressivePagination,
|
|
983
|
+
ie as roundTen
|
|
949
984
|
};
|