@shlinkio/shlink-frontend-kit 0.8.8 → 0.8.10
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 +157 -156
- package/dist/tailwind.d.ts +6 -3
- package/dist/tailwind.js +283 -268
- package/package.json +3 -2
package/dist/tailwind.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import i, { clsx as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { Link as
|
|
5
|
-
import { faClose as at, faEyeSlash as lt, faEye as dt, faCircleNotch as V, faSearch as st, faChevronLeft as
|
|
1
|
+
import { jsx as n, jsxs as g, Fragment as F } from "react/jsx-runtime";
|
|
2
|
+
import i, { clsx as v } from "clsx";
|
|
3
|
+
import { useState as $, useCallback as I, useEffect as _, createContext as H, useContext as N, forwardRef as x, useId as A, useRef as E, useMemo as O } from "react";
|
|
4
|
+
import { Link as S, NavLink as nt } from "react-router";
|
|
5
|
+
import { faClose as at, faEyeSlash as lt, faEye as dt, faCircleNotch as V, faSearch as st, faChevronLeft as z, faChevronRight as G } from "@fortawesome/free-solid-svg-icons";
|
|
6
6
|
import { FontAwesomeIcon as k } from "@fortawesome/react-fontawesome";
|
|
7
7
|
import { a as it, u as wt } from "./use-toggle-CNvdDGvy.js";
|
|
8
8
|
import { createPortal as ct } from "react-dom";
|
|
9
|
-
const mt = ({ className: t, ...e }) => /* @__PURE__ */
|
|
9
|
+
const mt = ({ className: t, ...e }) => /* @__PURE__ */ n(
|
|
10
10
|
"div",
|
|
11
11
|
{
|
|
12
12
|
className: i(
|
|
@@ -16,7 +16,7 @@ const mt = ({ className: t, ...e }) => /* @__PURE__ */ o(
|
|
|
16
16
|
),
|
|
17
17
|
...e
|
|
18
18
|
}
|
|
19
|
-
), gt = ({ className: t, ...e }) => /* @__PURE__ */
|
|
19
|
+
), gt = ({ className: t, ...e }) => /* @__PURE__ */ n(
|
|
20
20
|
"div",
|
|
21
21
|
{
|
|
22
22
|
className: i(
|
|
@@ -26,7 +26,7 @@ const mt = ({ className: t, ...e }) => /* @__PURE__ */ o(
|
|
|
26
26
|
),
|
|
27
27
|
...e
|
|
28
28
|
}
|
|
29
|
-
), bt = ({ className: t, ...e }) => /* @__PURE__ */
|
|
29
|
+
), bt = ({ className: t, ...e }) => /* @__PURE__ */ n(
|
|
30
30
|
"div",
|
|
31
31
|
{
|
|
32
32
|
className: i(
|
|
@@ -36,7 +36,7 @@ const mt = ({ className: t, ...e }) => /* @__PURE__ */ o(
|
|
|
36
36
|
),
|
|
37
37
|
...e
|
|
38
38
|
}
|
|
39
|
-
), ut = ({ className: t, ...e }) => /* @__PURE__ */
|
|
39
|
+
), ut = ({ className: t, ...e }) => /* @__PURE__ */ n(
|
|
40
40
|
"div",
|
|
41
41
|
{
|
|
42
42
|
className: i(
|
|
@@ -46,76 +46,83 @@ const mt = ({ className: t, ...e }) => /* @__PURE__ */ o(
|
|
|
46
46
|
),
|
|
47
47
|
...e
|
|
48
48
|
}
|
|
49
|
-
),
|
|
50
|
-
const { title:
|
|
49
|
+
), y = Object.assign(ut, { Body: gt, Header: mt, Footer: bt }), pt = ({ bodyClassName: t, children: e, ...r }) => {
|
|
50
|
+
const { title: o, titleSize: a = "md", ...d } = "title" in r ? r : {
|
|
51
51
|
...r,
|
|
52
52
|
title: void 0,
|
|
53
53
|
titleSize: void 0
|
|
54
54
|
};
|
|
55
|
-
return /* @__PURE__ */
|
|
56
|
-
|
|
57
|
-
a === "lg" && /* @__PURE__ */
|
|
58
|
-
a === "md" && /* @__PURE__ */
|
|
59
|
-
a === "sm" && /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ g(y, { ...d, children: [
|
|
56
|
+
o && /* @__PURE__ */ g(y.Header, { children: [
|
|
57
|
+
a === "lg" && /* @__PURE__ */ n("h4", { children: o }),
|
|
58
|
+
a === "md" && /* @__PURE__ */ n("h5", { children: o }),
|
|
59
|
+
a === "sm" && /* @__PURE__ */ n("h6", { children: o })
|
|
60
60
|
] }),
|
|
61
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ n(y.Body, { className: t, children: e })
|
|
62
62
|
] });
|
|
63
63
|
};
|
|
64
64
|
function ht({
|
|
65
65
|
id: t,
|
|
66
66
|
items: e,
|
|
67
67
|
onSelectItem: r,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
onActiveItemChange: o,
|
|
69
|
+
renderItem: a,
|
|
70
|
+
className: d,
|
|
71
|
+
noItemsMessage: l = "No items",
|
|
72
|
+
anchor: s,
|
|
73
|
+
"aria-label": c = "Items",
|
|
74
|
+
...b
|
|
74
75
|
}) {
|
|
75
|
-
const [
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
const [w, u] = $(0), p = I((f) => {
|
|
77
|
+
if (u(f), o) {
|
|
78
|
+
const [m, h] = [...e.entries()][f];
|
|
79
|
+
o(m, h);
|
|
80
|
+
}
|
|
81
|
+
}, [e, o]);
|
|
82
|
+
return _(() => {
|
|
83
|
+
const f = s == null ? void 0 : s.current;
|
|
84
|
+
if (!f)
|
|
79
85
|
return;
|
|
80
|
-
const
|
|
81
|
-
h.key === "ArrowDown" ?
|
|
86
|
+
const m = (h) => {
|
|
87
|
+
["Enter", "ArrowUp", "ArrowDown"].includes(h.key) && h.preventDefault(), h.key === "ArrowDown" ? p(Math.min(w + 1, e.size - 1)) : h.key === "ArrowUp" ? p(Math.max(w - 1, 0)) : h.key === "Enter" && r([...e.values()][w]);
|
|
82
88
|
};
|
|
83
|
-
return
|
|
84
|
-
}, [
|
|
85
|
-
|
|
89
|
+
return f.addEventListener("keydown", m), () => f.removeEventListener("keydown", m);
|
|
90
|
+
}, [w, s, p, e, r]), /* @__PURE__ */ g(
|
|
91
|
+
y,
|
|
86
92
|
{
|
|
87
93
|
id: t,
|
|
88
|
-
className: i("tw:py-1 tw:flex tw:flex-col",
|
|
94
|
+
className: i("tw:py-1 tw:flex tw:flex-col", d),
|
|
89
95
|
role: "listbox",
|
|
90
96
|
"aria-orientation": "vertical",
|
|
91
|
-
"aria-label":
|
|
92
|
-
...
|
|
97
|
+
"aria-label": c,
|
|
98
|
+
...b,
|
|
93
99
|
children: [
|
|
94
|
-
e.size === 0 && /* @__PURE__ */
|
|
95
|
-
[...e.entries()].map(([
|
|
100
|
+
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: l }),
|
|
101
|
+
[...e.entries()].map(([f, m], h) => /* @__PURE__ */ n(
|
|
96
102
|
"button",
|
|
97
103
|
{
|
|
104
|
+
id: `${t}_${f}`,
|
|
98
105
|
type: "button",
|
|
99
106
|
role: "option",
|
|
100
|
-
"aria-selected": h ===
|
|
107
|
+
"aria-selected": h === w,
|
|
101
108
|
className: i(
|
|
102
109
|
"tw:px-2 tw:py-1 tw:text-left tw:truncate",
|
|
103
|
-
{ "tw:bg-lm-secondary tw:dark:bg-dm-secondary": h ===
|
|
110
|
+
{ "tw:bg-lm-secondary tw:dark:bg-dm-secondary": h === w }
|
|
104
111
|
),
|
|
105
112
|
tabIndex: -1,
|
|
106
|
-
onClick: () => r(
|
|
107
|
-
onMouseOver: () =>
|
|
108
|
-
children:
|
|
113
|
+
onClick: () => r(m),
|
|
114
|
+
onMouseOver: () => p(h),
|
|
115
|
+
children: a(m)
|
|
109
116
|
},
|
|
110
|
-
|
|
117
|
+
f
|
|
111
118
|
))
|
|
112
119
|
]
|
|
113
120
|
}
|
|
114
121
|
);
|
|
115
122
|
}
|
|
116
|
-
const B = H(void 0),
|
|
117
|
-
const { responsive: r } =
|
|
118
|
-
return /* @__PURE__ */
|
|
123
|
+
const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className: e }) => {
|
|
124
|
+
const { responsive: r } = N(T);
|
|
125
|
+
return /* @__PURE__ */ n(B.Provider, { value: { section: "head" }, children: /* @__PURE__ */ n(
|
|
119
126
|
"thead",
|
|
120
127
|
{
|
|
121
128
|
className: i(
|
|
@@ -126,8 +133,8 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
126
133
|
}
|
|
127
134
|
) });
|
|
128
135
|
}, xt = ({ children: t, className: e }) => {
|
|
129
|
-
const { responsive: r } =
|
|
130
|
-
return /* @__PURE__ */
|
|
136
|
+
const { responsive: r } = N(T);
|
|
137
|
+
return /* @__PURE__ */ n(B.Provider, { value: { section: "body" }, children: /* @__PURE__ */ n(
|
|
131
138
|
"tbody",
|
|
132
139
|
{
|
|
133
140
|
className: i(
|
|
@@ -138,8 +145,8 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
138
145
|
}
|
|
139
146
|
) });
|
|
140
147
|
}, yt = ({ children: t, className: e }) => {
|
|
141
|
-
const { responsive: r } =
|
|
142
|
-
return /* @__PURE__ */
|
|
148
|
+
const { responsive: r } = N(T);
|
|
149
|
+
return /* @__PURE__ */ n(B.Provider, { value: { section: "footer" }, children: /* @__PURE__ */ n(
|
|
143
150
|
"tfoot",
|
|
144
151
|
{
|
|
145
152
|
className: i(
|
|
@@ -149,9 +156,9 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
149
156
|
children: t
|
|
150
157
|
}
|
|
151
158
|
) });
|
|
152
|
-
},
|
|
153
|
-
const
|
|
154
|
-
return /* @__PURE__ */
|
|
159
|
+
}, vt = ({ children: t, className: e, ...r }) => {
|
|
160
|
+
const o = N(B), a = (o == null ? void 0 : o.section) === "body", { responsive: d } = N(T);
|
|
161
|
+
return /* @__PURE__ */ n(
|
|
155
162
|
"tr",
|
|
156
163
|
{
|
|
157
164
|
className: i(
|
|
@@ -169,9 +176,9 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
169
176
|
children: t
|
|
170
177
|
}
|
|
171
178
|
);
|
|
172
|
-
},
|
|
173
|
-
const d =
|
|
174
|
-
return /* @__PURE__ */
|
|
179
|
+
}, kt = ({ children: t, className: e, columnName: r, type: o, ...a }) => {
|
|
180
|
+
const d = N(B), l = o ?? ((d == null ? void 0 : d.section) !== "body" ? "th" : "td"), { responsive: s } = N(T);
|
|
181
|
+
return /* @__PURE__ */ n(
|
|
175
182
|
l,
|
|
176
183
|
{
|
|
177
184
|
"data-column": s ? r : void 0,
|
|
@@ -189,26 +196,26 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
189
196
|
children: t
|
|
190
197
|
}
|
|
191
198
|
);
|
|
192
|
-
}, Nt = ({ header: t, footer: e, children: r, responsive:
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
-
/* @__PURE__ */
|
|
195
|
-
e && /* @__PURE__ */
|
|
196
|
-
] }) }),
|
|
199
|
+
}, Nt = ({ header: t, footer: e, children: r, responsive: o = !0, ...a }) => /* @__PURE__ */ n(T.Provider, { value: { responsive: o }, children: /* @__PURE__ */ g("table", { className: "tw:w-full", ...a, children: [
|
|
200
|
+
/* @__PURE__ */ n(ft, { children: t }),
|
|
201
|
+
/* @__PURE__ */ n(xt, { children: r }),
|
|
202
|
+
e && /* @__PURE__ */ n(yt, { children: e })
|
|
203
|
+
] }) }), Jt = Object.assign(Nt, { Row: vt, Cell: kt }), Pt = ({
|
|
197
204
|
children: t,
|
|
198
205
|
className: e,
|
|
199
206
|
disabled: r,
|
|
200
|
-
variant:
|
|
207
|
+
variant: o = "primary",
|
|
201
208
|
size: a = "md",
|
|
202
209
|
inline: d = !1,
|
|
203
210
|
solid: l = !1,
|
|
204
211
|
type: s = "button",
|
|
205
212
|
...c
|
|
206
213
|
}) => {
|
|
207
|
-
const
|
|
214
|
+
const b = "to" in c ? S : "button", w = b === S ? void 0 : s;
|
|
208
215
|
return (
|
|
209
216
|
// @ts-expect-error We are explicitly checking for the `to` prop before using Link
|
|
210
|
-
/* @__PURE__ */
|
|
211
|
-
|
|
217
|
+
/* @__PURE__ */ n(
|
|
218
|
+
b,
|
|
212
219
|
{
|
|
213
220
|
className: i(
|
|
214
221
|
{
|
|
@@ -219,8 +226,8 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
219
226
|
"tw:border tw:rounded-md tw:no-underline",
|
|
220
227
|
"tw:transition-colors",
|
|
221
228
|
{
|
|
222
|
-
"tw:focus-ring":
|
|
223
|
-
"tw:focus-ring-danger":
|
|
229
|
+
"tw:focus-ring": o !== "danger",
|
|
230
|
+
"tw:focus-ring-danger": o === "danger"
|
|
224
231
|
},
|
|
225
232
|
{
|
|
226
233
|
"tw:px-1.5 tw:py-1 tw:text-sm": a === "sm",
|
|
@@ -228,26 +235,26 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
228
235
|
"tw:px-4 tw:py-2 tw:text-lg": a === "lg"
|
|
229
236
|
},
|
|
230
237
|
{
|
|
231
|
-
"tw:border-brand tw:text-brand":
|
|
232
|
-
"tw:border-zinc-500":
|
|
233
|
-
"tw:text-zinc-500":
|
|
234
|
-
"tw:border-danger":
|
|
235
|
-
"tw:text-danger":
|
|
238
|
+
"tw:border-brand tw:text-brand": o === "primary",
|
|
239
|
+
"tw:border-zinc-500": o === "secondary",
|
|
240
|
+
"tw:text-zinc-500": o === "secondary" && !l,
|
|
241
|
+
"tw:border-danger": o === "danger",
|
|
242
|
+
"tw:text-danger": o === "danger" && !l
|
|
236
243
|
},
|
|
237
244
|
l && {
|
|
238
245
|
"tw:text-white": !0,
|
|
239
|
-
"tw:bg-brand":
|
|
240
|
-
"tw:highlight:bg-brand-dark tw:highlight:border-brand-dark":
|
|
241
|
-
"tw:bg-zinc-500":
|
|
242
|
-
"tw:highlight:bg-zinc-600 tw:highlight:border-zinc-600":
|
|
243
|
-
"tw:bg-danger":
|
|
244
|
-
"tw:highlight:bg-danger-dark tw:highlight:border-danger-dark":
|
|
246
|
+
"tw:bg-brand": o === "primary",
|
|
247
|
+
"tw:highlight:bg-brand-dark tw:highlight:border-brand-dark": o === "primary",
|
|
248
|
+
"tw:bg-zinc-500": o === "secondary",
|
|
249
|
+
"tw:highlight:bg-zinc-600 tw:highlight:border-zinc-600": o === "secondary",
|
|
250
|
+
"tw:bg-danger": o === "danger",
|
|
251
|
+
"tw:highlight:bg-danger-dark tw:highlight:border-danger-dark": o === "danger"
|
|
245
252
|
},
|
|
246
253
|
!r && {
|
|
247
254
|
"tw:highlight:text-white": !l,
|
|
248
|
-
"tw:highlight:bg-brand":
|
|
249
|
-
"tw:highlight:bg-zinc-500":
|
|
250
|
-
"tw:highlight:bg-danger":
|
|
255
|
+
"tw:highlight:bg-brand": o === "primary",
|
|
256
|
+
"tw:highlight:bg-zinc-500": o === "secondary",
|
|
257
|
+
"tw:highlight:bg-danger": o === "danger"
|
|
251
258
|
},
|
|
252
259
|
{
|
|
253
260
|
"tw:pointer-events-none tw:opacity-65": r
|
|
@@ -255,20 +262,20 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
255
262
|
e
|
|
256
263
|
),
|
|
257
264
|
disabled: r,
|
|
258
|
-
type:
|
|
265
|
+
type: w,
|
|
259
266
|
...c,
|
|
260
267
|
children: t
|
|
261
268
|
}
|
|
262
269
|
)
|
|
263
270
|
);
|
|
264
|
-
}, X =
|
|
271
|
+
}, X = x(({ className: t, onChange: e, ...r }, o) => {
|
|
265
272
|
const a = I((d) => e == null ? void 0 : e(d.target.checked, d), [e]);
|
|
266
|
-
return /* @__PURE__ */
|
|
273
|
+
return /* @__PURE__ */ n(
|
|
267
274
|
"input",
|
|
268
275
|
{
|
|
269
|
-
ref:
|
|
276
|
+
ref: o,
|
|
270
277
|
type: "checkbox",
|
|
271
|
-
className:
|
|
278
|
+
className: v(
|
|
272
279
|
"tw:appearance-none tw:focus-ring",
|
|
273
280
|
"tw:border-1 tw:border-lm-input-border tw:dark:border-dm-input-border",
|
|
274
281
|
"tw:bg-lm-primary tw:dark:bg-dm-primary tw:checked:bg-brand tw:bg-no-repeat",
|
|
@@ -280,14 +287,14 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
280
287
|
...r
|
|
281
288
|
}
|
|
282
289
|
);
|
|
283
|
-
}), Qt =
|
|
290
|
+
}), Qt = x(({ className: t, ...e }, r) => /* @__PURE__ */ n(
|
|
284
291
|
X,
|
|
285
292
|
{
|
|
286
293
|
ref: r,
|
|
287
|
-
className:
|
|
294
|
+
className: v("tw:rounded-sm tw:w-4 tw:h-4 tw:checked:bg-(image:--tick) tw:bg-center", t),
|
|
288
295
|
...e
|
|
289
296
|
}
|
|
290
|
-
)),
|
|
297
|
+
)), J = ({ onClick: t, label: e = "Close" }) => /* @__PURE__ */ n(
|
|
291
298
|
"button",
|
|
292
299
|
{
|
|
293
300
|
type: "button",
|
|
@@ -297,19 +304,19 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
297
304
|
"tw:rounded-md tw:focus-ring"
|
|
298
305
|
),
|
|
299
306
|
"aria-label": e,
|
|
300
|
-
children: /* @__PURE__ */
|
|
307
|
+
children: /* @__PURE__ */ n(k, { icon: at, size: "xl" })
|
|
301
308
|
}
|
|
302
|
-
),
|
|
309
|
+
), U = x(({
|
|
303
310
|
borderless: t = !1,
|
|
304
311
|
size: e = "md",
|
|
305
312
|
feedback: r,
|
|
306
|
-
className:
|
|
313
|
+
className: o,
|
|
307
314
|
disabled: a,
|
|
308
315
|
readOnly: d,
|
|
309
316
|
...l
|
|
310
317
|
}, s) => {
|
|
311
318
|
const c = !a && !d;
|
|
312
|
-
return /* @__PURE__ */
|
|
319
|
+
return /* @__PURE__ */ n(
|
|
313
320
|
"input",
|
|
314
321
|
{
|
|
315
322
|
ref: s,
|
|
@@ -333,51 +340,51 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
333
340
|
// Use different background color when rendered inside a card
|
|
334
341
|
"tw:group-[&]/card:bg-lm-input tw:group-[&]/card:dark:bg-dm-input": c
|
|
335
342
|
},
|
|
336
|
-
|
|
343
|
+
o
|
|
337
344
|
),
|
|
338
345
|
disabled: a,
|
|
339
346
|
readOnly: d,
|
|
340
347
|
...l
|
|
341
348
|
}
|
|
342
349
|
);
|
|
343
|
-
}),
|
|
350
|
+
}), K = ({ required: t, children: e, ...r }) => /* @__PURE__ */ g("label", { ...r, children: [
|
|
344
351
|
e,
|
|
345
|
-
t && /* @__PURE__ */
|
|
346
|
-
] }), Vt =
|
|
347
|
-
const s =
|
|
348
|
-
return /* @__PURE__ */
|
|
349
|
-
/* @__PURE__ */
|
|
350
|
-
/* @__PURE__ */
|
|
351
|
-
|
|
352
|
+
t && /* @__PURE__ */ n("span", { className: "tw:text-danger tw:ml-1", "data-testid": "required-indicator", children: "*" })
|
|
353
|
+
] }), Vt = x(({ label: t, inputClassName: e, required: r, hiddenRequired: o, error: a, ...d }, l) => {
|
|
354
|
+
const s = A();
|
|
355
|
+
return /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
|
|
356
|
+
/* @__PURE__ */ n(K, { htmlFor: s, required: r, children: t }),
|
|
357
|
+
/* @__PURE__ */ n(
|
|
358
|
+
U,
|
|
352
359
|
{
|
|
353
360
|
ref: l,
|
|
354
361
|
id: s,
|
|
355
362
|
className: e,
|
|
356
|
-
required: r ||
|
|
363
|
+
required: r || o,
|
|
357
364
|
feedback: a ? "error" : void 0,
|
|
358
365
|
...d
|
|
359
366
|
}
|
|
360
367
|
),
|
|
361
|
-
a && /* @__PURE__ */
|
|
368
|
+
a && /* @__PURE__ */ n("span", { className: "tw:text-danger", children: a })
|
|
362
369
|
] });
|
|
363
|
-
}), It =
|
|
364
|
-
const [d, l, , s] = it(!1), c =
|
|
365
|
-
var
|
|
366
|
-
(
|
|
370
|
+
}), It = x(({ containerClassName: t, className: e, size: r, ...o }, a) => {
|
|
371
|
+
const [d, l, , s] = it(!1), c = E(null), b = I(({ relatedTarget: w }) => {
|
|
372
|
+
var u;
|
|
373
|
+
(u = c.current) != null && u.contains(w) || s();
|
|
367
374
|
}, [c, s]);
|
|
368
|
-
return /* @__PURE__ */
|
|
375
|
+
return /* @__PURE__ */ g(
|
|
369
376
|
"div",
|
|
370
377
|
{
|
|
371
|
-
className:
|
|
378
|
+
className: v("tw:group tw:relative", t),
|
|
372
379
|
ref: c,
|
|
373
|
-
onBlurCapture:
|
|
380
|
+
onBlurCapture: b,
|
|
374
381
|
children: [
|
|
375
|
-
/* @__PURE__ */
|
|
376
|
-
|
|
382
|
+
/* @__PURE__ */ n(
|
|
383
|
+
U,
|
|
377
384
|
{
|
|
378
385
|
ref: a,
|
|
379
386
|
type: d ? "text" : "password",
|
|
380
|
-
className:
|
|
387
|
+
className: v(
|
|
381
388
|
{
|
|
382
389
|
"tw:pr-10": r !== "sm",
|
|
383
390
|
"tw:pr-8": r === "sm"
|
|
@@ -386,17 +393,17 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
386
393
|
),
|
|
387
394
|
size: r,
|
|
388
395
|
"data-testid": "input",
|
|
389
|
-
...
|
|
396
|
+
...o
|
|
390
397
|
}
|
|
391
398
|
),
|
|
392
|
-
/* @__PURE__ */
|
|
399
|
+
/* @__PURE__ */ n(
|
|
393
400
|
"button",
|
|
394
401
|
{
|
|
395
402
|
type: "button",
|
|
396
403
|
onClick: l,
|
|
397
404
|
title: d ? "Hide password" : "Show password",
|
|
398
405
|
"aria-label": d ? "Hide password" : "Show password",
|
|
399
|
-
className:
|
|
406
|
+
className: v(
|
|
400
407
|
"tw:absolute tw:top-[50%] tw:translate-y-[-50%] tw:px-1",
|
|
401
408
|
"tw:text-placeholder tw:hover:text-lm-text tw:hover:dark:text-dm-text tw:transition-colors",
|
|
402
409
|
{
|
|
@@ -405,37 +412,37 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
405
412
|
}
|
|
406
413
|
),
|
|
407
414
|
tabIndex: -1,
|
|
408
|
-
children: /* @__PURE__ */
|
|
415
|
+
children: /* @__PURE__ */ n(k, { fixedWidth: !0, icon: d ? lt : dt })
|
|
409
416
|
}
|
|
410
417
|
)
|
|
411
418
|
]
|
|
412
419
|
}
|
|
413
420
|
);
|
|
414
|
-
}), Xt =
|
|
415
|
-
const s =
|
|
416
|
-
return /* @__PURE__ */
|
|
417
|
-
/* @__PURE__ */
|
|
418
|
-
/* @__PURE__ */
|
|
421
|
+
}), Xt = x(({ label: t, inputClassName: e, required: r, hiddenRequired: o, error: a, ...d }, l) => {
|
|
422
|
+
const s = A();
|
|
423
|
+
return /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
|
|
424
|
+
/* @__PURE__ */ n(K, { htmlFor: s, required: r, children: t }),
|
|
425
|
+
/* @__PURE__ */ n(
|
|
419
426
|
It,
|
|
420
427
|
{
|
|
421
428
|
ref: l,
|
|
422
429
|
id: s,
|
|
423
430
|
className: e,
|
|
424
|
-
required: r ||
|
|
431
|
+
required: r || o,
|
|
425
432
|
feedback: a ? "error" : void 0,
|
|
426
433
|
...d
|
|
427
434
|
}
|
|
428
435
|
),
|
|
429
|
-
a && /* @__PURE__ */
|
|
436
|
+
a && /* @__PURE__ */ n("span", { className: "tw:text-danger", children: a })
|
|
430
437
|
] });
|
|
431
|
-
}), Ct =
|
|
438
|
+
}), Ct = x(({
|
|
432
439
|
className: t,
|
|
433
440
|
size: e = "md",
|
|
434
441
|
feedback: r,
|
|
435
|
-
style:
|
|
442
|
+
style: o = {},
|
|
436
443
|
disabled: a,
|
|
437
444
|
...d
|
|
438
|
-
}, l) => /* @__PURE__ */
|
|
445
|
+
}, l) => /* @__PURE__ */ n(
|
|
439
446
|
"select",
|
|
440
447
|
{
|
|
441
448
|
ref: l,
|
|
@@ -462,32 +469,32 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
462
469
|
t
|
|
463
470
|
),
|
|
464
471
|
style: {
|
|
465
|
-
...
|
|
472
|
+
...o,
|
|
466
473
|
background: "right 0.75rem center / 16px 12px"
|
|
467
474
|
},
|
|
468
475
|
disabled: a,
|
|
469
476
|
...d
|
|
470
477
|
}
|
|
471
|
-
)), Yt =
|
|
472
|
-
const l =
|
|
473
|
-
return /* @__PURE__ */
|
|
474
|
-
/* @__PURE__ */
|
|
475
|
-
/* @__PURE__ */
|
|
478
|
+
)), Yt = x(({ selectClassName: t, label: e, required: r, hiddenRequired: o, ...a }, d) => {
|
|
479
|
+
const l = A();
|
|
480
|
+
return /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
|
|
481
|
+
/* @__PURE__ */ n(K, { htmlFor: l, required: r, children: e }),
|
|
482
|
+
/* @__PURE__ */ n(Ct, { ref: d, id: l, className: t, required: r || o, ...a })
|
|
476
483
|
] });
|
|
477
|
-
}), Tt =
|
|
484
|
+
}), Tt = x(({
|
|
478
485
|
onChange: t,
|
|
479
486
|
containerClassName: e,
|
|
480
487
|
inputClassName: r,
|
|
481
488
|
// Inputs have a default 'md' size. Search inputs are usually 'lg' as they are rendered at the top of sections
|
|
482
|
-
size:
|
|
489
|
+
size: o = "lg",
|
|
483
490
|
loading: a = !1,
|
|
484
491
|
...d
|
|
485
492
|
}, l) => {
|
|
486
|
-
const { setTimeout: s, clearCurrentTimeout: c } = wt(500),
|
|
487
|
-
|
|
493
|
+
const { setTimeout: s, clearCurrentTimeout: c } = wt(500), b = I((w) => {
|
|
494
|
+
w ? s(() => t(w)) : (c(), t(w));
|
|
488
495
|
}, [c, t, s]);
|
|
489
|
-
return /* @__PURE__ */
|
|
490
|
-
/* @__PURE__ */
|
|
496
|
+
return /* @__PURE__ */ g("div", { className: i("tw:group tw:relative tw:focus-within:z-10", e), children: [
|
|
497
|
+
/* @__PURE__ */ n(
|
|
491
498
|
k,
|
|
492
499
|
{
|
|
493
500
|
icon: a ? V : st,
|
|
@@ -496,27 +503,27 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
496
503
|
"tw:absolute tw:top-[50%] tw:translate-y-[-50%] tw:transition-colors",
|
|
497
504
|
"tw:text-placeholder tw:group-focus-within:text-lm-text tw:dark:group-focus-within:text-dm-text",
|
|
498
505
|
{
|
|
499
|
-
"tw:left-3":
|
|
500
|
-
"tw:scale-85 tw:left-2":
|
|
506
|
+
"tw:left-3": o !== "sm",
|
|
507
|
+
"tw:scale-85 tw:left-2": o === "sm"
|
|
501
508
|
}
|
|
502
509
|
)
|
|
503
510
|
}
|
|
504
511
|
),
|
|
505
|
-
/* @__PURE__ */
|
|
506
|
-
|
|
512
|
+
/* @__PURE__ */ n(
|
|
513
|
+
U,
|
|
507
514
|
{
|
|
508
515
|
ref: l,
|
|
509
516
|
type: "search",
|
|
510
517
|
className: i(
|
|
511
518
|
{
|
|
512
|
-
"tw:pl-9":
|
|
513
|
-
"tw:pl-7":
|
|
519
|
+
"tw:pl-9": o !== "sm",
|
|
520
|
+
"tw:pl-7": o === "sm"
|
|
514
521
|
},
|
|
515
522
|
r
|
|
516
523
|
),
|
|
517
524
|
placeholder: "Search...",
|
|
518
|
-
onChange: (
|
|
519
|
-
size:
|
|
525
|
+
onChange: (w) => b(w.target.value),
|
|
526
|
+
size: o,
|
|
520
527
|
...d
|
|
521
528
|
}
|
|
522
529
|
)
|
|
@@ -526,24 +533,28 @@ function Zt({
|
|
|
526
533
|
searchResults: t,
|
|
527
534
|
onSearch: e,
|
|
528
535
|
onSelectSearchResult: r,
|
|
529
|
-
renderSearchResult:
|
|
536
|
+
renderSearchResult: o,
|
|
530
537
|
size: a = "md",
|
|
538
|
+
// SearchInput defaults its size to 'lg'. Change it to 'md'
|
|
531
539
|
listboxSpan: d = "full",
|
|
532
540
|
onFocus: l,
|
|
533
541
|
...s
|
|
534
542
|
}) {
|
|
535
|
-
const c =
|
|
536
|
-
|
|
543
|
+
const c = E(null), b = A(), [w, u] = $(), p = O(
|
|
544
|
+
() => t ? w ?? [...t.keys()][0] : void 0,
|
|
545
|
+
[w, t]
|
|
546
|
+
), f = I((m) => {
|
|
547
|
+
r(m), e(""), c.current.value = "";
|
|
537
548
|
}, [e, r]);
|
|
538
|
-
return /* @__PURE__ */
|
|
549
|
+
return /* @__PURE__ */ g(
|
|
539
550
|
"div",
|
|
540
551
|
{
|
|
541
552
|
className: "tw:relative",
|
|
542
|
-
onBlur: (
|
|
543
|
-
|
|
553
|
+
onBlur: (m) => {
|
|
554
|
+
m.currentTarget.contains(m.relatedTarget) || e("");
|
|
544
555
|
},
|
|
545
556
|
children: [
|
|
546
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ n(
|
|
547
558
|
Tt,
|
|
548
559
|
{
|
|
549
560
|
onChange: e,
|
|
@@ -552,21 +563,25 @@ function Zt({
|
|
|
552
563
|
role: "combobox",
|
|
553
564
|
"aria-autocomplete": "list",
|
|
554
565
|
"aria-expanded": !!t,
|
|
555
|
-
"aria-controls":
|
|
556
|
-
|
|
557
|
-
|
|
566
|
+
"aria-controls": b,
|
|
567
|
+
"aria-activedescendant": p ? `${b}_${p}` : void 0,
|
|
568
|
+
autoComplete: "off",
|
|
569
|
+
autoCorrect: "off",
|
|
570
|
+
onFocus: (m) => {
|
|
571
|
+
l == null || l(m), e(m.target.value);
|
|
558
572
|
},
|
|
559
573
|
...s
|
|
560
574
|
}
|
|
561
575
|
),
|
|
562
|
-
t && /* @__PURE__ */
|
|
576
|
+
t && /* @__PURE__ */ n(
|
|
563
577
|
ht,
|
|
564
578
|
{
|
|
565
|
-
id:
|
|
579
|
+
id: b,
|
|
566
580
|
items: t,
|
|
567
581
|
anchor: c,
|
|
568
|
-
onSelectItem:
|
|
569
|
-
|
|
582
|
+
onSelectItem: f,
|
|
583
|
+
onActiveItemChange: u,
|
|
584
|
+
renderItem: o,
|
|
570
585
|
className: i(
|
|
571
586
|
"tw:absolute tw:top-full tw:mt-1 tw:z-10",
|
|
572
587
|
{
|
|
@@ -582,11 +597,11 @@ function Zt({
|
|
|
582
597
|
}
|
|
583
598
|
);
|
|
584
599
|
}
|
|
585
|
-
const te =
|
|
600
|
+
const te = x(({ className: t, ...e }, r) => /* @__PURE__ */ n(
|
|
586
601
|
X,
|
|
587
602
|
{
|
|
588
603
|
ref: r,
|
|
589
|
-
className:
|
|
604
|
+
className: v(
|
|
590
605
|
"tw:rounded-full tw:w-8 tw:h-4",
|
|
591
606
|
"tw:bg-(image:--circle-grey-dark) tw:dark:bg-(image:--circle-grey-light) tw:checked:bg-(image:--circle-white)",
|
|
592
607
|
"tw:focus-visible:not-checked:bg-(image:--circle-light-blue)",
|
|
@@ -595,7 +610,7 @@ const te = p(({ className: t, ...e }, r) => /* @__PURE__ */ o(
|
|
|
595
610
|
),
|
|
596
611
|
...e
|
|
597
612
|
}
|
|
598
|
-
)), Lt = ({ className: t, disabled: e, size: r = "md", type:
|
|
613
|
+
)), Lt = ({ className: t, disabled: e, size: r = "md", type: o = "button", ...a }) => /* @__PURE__ */ n(
|
|
599
614
|
"button",
|
|
600
615
|
{
|
|
601
616
|
className: i(
|
|
@@ -610,12 +625,12 @@ const te = p(({ className: t, ...e }, r) => /* @__PURE__ */ o(
|
|
|
610
625
|
t
|
|
611
626
|
),
|
|
612
627
|
disabled: e,
|
|
613
|
-
type:
|
|
628
|
+
type: o,
|
|
614
629
|
...a
|
|
615
630
|
}
|
|
616
|
-
), Y = H(null),
|
|
617
|
-
const
|
|
618
|
-
return /* @__PURE__ */
|
|
631
|
+
), Y = H(null), Et = ({ className: t, to: e, ...r }) => {
|
|
632
|
+
const o = N(Y);
|
|
633
|
+
return /* @__PURE__ */ n(
|
|
619
634
|
nt,
|
|
620
635
|
{
|
|
621
636
|
role: "menuitem",
|
|
@@ -627,20 +642,20 @@ const te = p(({ className: t, ...e }, r) => /* @__PURE__ */ o(
|
|
|
627
642
|
{
|
|
628
643
|
"tw:border-b-brand active": a,
|
|
629
644
|
"tw:border-b-transparent tw:text-gray-500": !a,
|
|
630
|
-
"tw:flex-grow":
|
|
645
|
+
"tw:flex-grow": o == null ? void 0 : o.fill
|
|
631
646
|
},
|
|
632
647
|
t
|
|
633
648
|
),
|
|
634
649
|
...r
|
|
635
650
|
}
|
|
636
651
|
);
|
|
637
|
-
},
|
|
638
|
-
const r =
|
|
639
|
-
Math.max(
|
|
640
|
-
Math.min(e - 1, t +
|
|
652
|
+
}, Bt = ({ children: t, className: e, fill: r }) => /* @__PURE__ */ n(Y.Provider, { value: { fill: r }, children: /* @__PURE__ */ n(y, { role: "menubar", className: i("tw:flex tw:overflow-hidden", e), children: t }) }), ee = Object.assign(Bt, { Pill: Et }), Mt = new Intl.NumberFormat("en-US"), _t = (t) => Mt.format(Number(t)), Q = 10, re = (t) => Math.ceil(t / Q) * Q, C = 2, R = "...", Rt = (t, e) => Array.from({ length: e - t }, (r, o) => t + o), At = (t, e) => {
|
|
653
|
+
const r = Rt(
|
|
654
|
+
Math.max(C, t - C),
|
|
655
|
+
Math.min(e - 1, t + C) + 1
|
|
641
656
|
);
|
|
642
|
-
return t -
|
|
643
|
-
},
|
|
657
|
+
return t - C > C && r.unshift(R), t + C < e - 1 && r.push(R), r.unshift(1), r.push(e), r;
|
|
658
|
+
}, L = (t) => t === R, Dt = (t) => L(t) ? t : _t(t), Ft = (t, e) => L(t) ? `${t}_${e}` : `${t}`, Z = [
|
|
644
659
|
"tw:border tw:border-r-0 tw:last:border-r tw:border-lm-border tw:dark:border-dm-border",
|
|
645
660
|
"tw:rounded-none tw:first:rounded-l tw:last:rounded-r"
|
|
646
661
|
], tt = (t = !1) => i(
|
|
@@ -651,61 +666,61 @@ const te = p(({ className: t, ...e }, r) => /* @__PURE__ */ o(
|
|
|
651
666
|
"tw:highlight:bg-lm-secondary tw:dark:highlight:bg-dm-secondary tw:text-brand": !t,
|
|
652
667
|
"tw:bg-lm-brand tw:dark:bg-dm-brand tw:text-white": t
|
|
653
668
|
}
|
|
654
|
-
),
|
|
655
|
-
function
|
|
656
|
-
const d =
|
|
657
|
-
return r ? /* @__PURE__ */
|
|
669
|
+
), j = ({ children: t }) => /* @__PURE__ */ n("span", { "aria-hidden": !0, className: i(Z, "tw:px-3 py-2 tw:text-gray-400"), children: t }), et = () => /* @__PURE__ */ n(j, { children: R });
|
|
670
|
+
function St({ children: t, active: e, isEllipsis: r, href: o, ...a }) {
|
|
671
|
+
const d = O(() => tt(e), [e]);
|
|
672
|
+
return r ? /* @__PURE__ */ n(et, {}) : /* @__PURE__ */ n(S, { className: d, to: o, ...a, children: t });
|
|
658
673
|
}
|
|
659
|
-
function
|
|
660
|
-
const a =
|
|
661
|
-
return r ? /* @__PURE__ */
|
|
674
|
+
function jt({ children: t, active: e, isEllipsis: r, ...o }) {
|
|
675
|
+
const a = O(() => tt(e), [e]);
|
|
676
|
+
return r ? /* @__PURE__ */ n(et, {}) : /* @__PURE__ */ n("button", { type: "button", className: a, ...o, children: t });
|
|
662
677
|
}
|
|
663
678
|
const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
664
|
-
const
|
|
665
|
-
(l) =>
|
|
666
|
-
[
|
|
679
|
+
const o = "urlForPage" in r, a = o ? St : jt, d = I(
|
|
680
|
+
(l) => o ? { href: L(l) ? void 0 : r.urlForPage(l) } : { onClick: () => !L(l) && r.onPageChange(l) },
|
|
681
|
+
[o, r]
|
|
667
682
|
);
|
|
668
|
-
return e < 2 ? null : /* @__PURE__ */
|
|
669
|
-
t === 1 ? /* @__PURE__ */
|
|
670
|
-
|
|
683
|
+
return e < 2 ? null : /* @__PURE__ */ g("div", { className: "tw:select-none tw:flex", "data-testid": "paginator", children: [
|
|
684
|
+
t === 1 ? /* @__PURE__ */ n(j, { children: /* @__PURE__ */ n(k, { size: "xs", icon: z }) }) : /* @__PURE__ */ n(a, { ...d(Math.max(1, t - 1)), "aria-label": "Previous", children: /* @__PURE__ */ n(k, { size: "xs", icon: z }) }),
|
|
685
|
+
At(t, e).map((l, s) => /* @__PURE__ */ n(
|
|
671
686
|
a,
|
|
672
687
|
{
|
|
673
688
|
active: l === t,
|
|
674
|
-
isEllipsis:
|
|
689
|
+
isEllipsis: L(l),
|
|
675
690
|
...d(l),
|
|
676
|
-
children:
|
|
691
|
+
children: Dt(l)
|
|
677
692
|
},
|
|
678
|
-
|
|
693
|
+
Ft(l, s)
|
|
679
694
|
)),
|
|
680
|
-
t === e ? /* @__PURE__ */
|
|
695
|
+
t === e ? /* @__PURE__ */ n(j, { children: /* @__PURE__ */ n(k, { size: "xs", icon: G }) }) : /* @__PURE__ */ n(a, { ...d(Math.min(e, t + 1)), "aria-label": "Next", children: /* @__PURE__ */ n(k, { size: "xs", icon: G }) })
|
|
681
696
|
] });
|
|
682
|
-
},
|
|
697
|
+
}, $t = ({
|
|
683
698
|
open: t,
|
|
684
699
|
children: e,
|
|
685
700
|
className: r,
|
|
686
|
-
onClose:
|
|
701
|
+
onClose: o,
|
|
687
702
|
...a
|
|
688
703
|
}) => {
|
|
689
|
-
const d =
|
|
690
|
-
return
|
|
691
|
-
var
|
|
704
|
+
const d = E(null);
|
|
705
|
+
return _(() => {
|
|
706
|
+
var b, w;
|
|
692
707
|
const l = document.body, s = l.style.overflow, c = l.style.paddingRight;
|
|
693
708
|
if (t) {
|
|
694
|
-
const
|
|
695
|
-
l.style.overflow = "hidden",
|
|
709
|
+
const u = window.outerWidth - l.clientWidth, p = l.scrollHeight > l.clientHeight;
|
|
710
|
+
l.style.overflow = "hidden", p && (l.style.paddingRight = `${u}px`), (b = d.current) == null || b.showModal();
|
|
696
711
|
} else
|
|
697
|
-
(
|
|
712
|
+
(w = d.current) == null || w.close();
|
|
698
713
|
return () => {
|
|
699
714
|
l.style.overflow = s, l.style.paddingRight = c;
|
|
700
715
|
};
|
|
701
716
|
}, [t]), ct(
|
|
702
|
-
/* @__PURE__ */
|
|
717
|
+
/* @__PURE__ */ n(
|
|
703
718
|
"dialog",
|
|
704
719
|
{
|
|
705
720
|
ref: d,
|
|
706
721
|
className: i("tw:bg-transparent tw:backdrop:bg-black/50", r),
|
|
707
722
|
onCancel: (l) => {
|
|
708
|
-
l.preventDefault(),
|
|
723
|
+
l.preventDefault(), o();
|
|
709
724
|
},
|
|
710
725
|
...a,
|
|
711
726
|
children: t && e
|
|
@@ -717,7 +732,7 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
717
732
|
open: t,
|
|
718
733
|
onClose: e,
|
|
719
734
|
variant: r = "default",
|
|
720
|
-
title:
|
|
735
|
+
title: o,
|
|
721
736
|
children: a,
|
|
722
737
|
className: d,
|
|
723
738
|
...l
|
|
@@ -725,51 +740,51 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
725
740
|
const {
|
|
726
741
|
size: s = "md",
|
|
727
742
|
confirmText: c = "Confirm",
|
|
728
|
-
cancelText:
|
|
729
|
-
confirmDisabled:
|
|
730
|
-
onConfirm:
|
|
731
|
-
onClosed:
|
|
732
|
-
...
|
|
733
|
-
} = "onConfirm" in l ? l : { ...l }, [
|
|
734
|
-
|
|
735
|
-
}, [
|
|
736
|
-
return
|
|
743
|
+
cancelText: b = "Cancel",
|
|
744
|
+
confirmDisabled: w,
|
|
745
|
+
onConfirm: u,
|
|
746
|
+
onClosed: p,
|
|
747
|
+
...f
|
|
748
|
+
} = "onConfirm" in l ? l : { ...l }, [m, h] = $(t), M = E(null), D = E("cancel"), rt = I(() => {
|
|
749
|
+
D.current = "confirm", u == null || u();
|
|
750
|
+
}, [u]);
|
|
751
|
+
return _(() => {
|
|
737
752
|
if (t) {
|
|
738
|
-
|
|
753
|
+
D.current = "cancel", h(!0);
|
|
739
754
|
return;
|
|
740
755
|
}
|
|
741
|
-
const
|
|
742
|
-
if (
|
|
743
|
-
delete
|
|
744
|
-
let
|
|
745
|
-
const
|
|
746
|
-
|
|
756
|
+
const P = M.current;
|
|
757
|
+
if (P) {
|
|
758
|
+
delete M.current.dataset.open;
|
|
759
|
+
let W = !1;
|
|
760
|
+
const q = (ot) => {
|
|
761
|
+
W || ot.target !== P || (W = !0, h(!1), p == null || p(D.current));
|
|
747
762
|
};
|
|
748
|
-
return
|
|
749
|
-
|
|
763
|
+
return P.addEventListener("transitionend", q), () => {
|
|
764
|
+
P.removeEventListener("transitionend", q);
|
|
750
765
|
};
|
|
751
766
|
}
|
|
752
|
-
}, [
|
|
753
|
-
const
|
|
754
|
-
|
|
755
|
-
}, [
|
|
756
|
-
|
|
767
|
+
}, [p, t]), _(() => {
|
|
768
|
+
const P = M.current;
|
|
769
|
+
m && P && (P.dataset.open = "");
|
|
770
|
+
}, [m]), /* @__PURE__ */ n(
|
|
771
|
+
$t,
|
|
757
772
|
{
|
|
758
|
-
open:
|
|
773
|
+
open: m,
|
|
759
774
|
onClose: e,
|
|
760
775
|
className: i(
|
|
761
776
|
{
|
|
762
|
-
"tw:flex tw:w-screen tw:h-screen tw:max-w-screen tw:max-h-screen":
|
|
777
|
+
"tw:flex tw:w-screen tw:h-screen tw:max-w-screen tw:max-h-screen": m,
|
|
763
778
|
"tw:overflow-hidden": r === "cover"
|
|
764
779
|
},
|
|
765
780
|
d
|
|
766
781
|
),
|
|
767
|
-
...
|
|
768
|
-
children: /* @__PURE__ */
|
|
782
|
+
...f,
|
|
783
|
+
children: /* @__PURE__ */ n(
|
|
769
784
|
"div",
|
|
770
785
|
{
|
|
771
786
|
"data-testid": "transition-container",
|
|
772
|
-
ref:
|
|
787
|
+
ref: M,
|
|
773
788
|
className: i(
|
|
774
789
|
"tw:w-full tw:m-auto tw:p-4 tw:sm:p-6",
|
|
775
790
|
// CSS transitions are based on the presence of the `data-open` attribute
|
|
@@ -784,11 +799,11 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
784
799
|
},
|
|
785
800
|
{ "tw:h-full": r === "cover" }
|
|
786
801
|
),
|
|
787
|
-
children: /* @__PURE__ */
|
|
802
|
+
children: /* @__PURE__ */ n(y, { className: i(
|
|
788
803
|
"tw:w-full",
|
|
789
804
|
{ "tw:h-full tw:relative tw:overflow-auto": r === "cover" }
|
|
790
|
-
), children: r === "cover" ? /* @__PURE__ */
|
|
791
|
-
/* @__PURE__ */
|
|
805
|
+
), children: r === "cover" ? /* @__PURE__ */ g(F, { children: [
|
|
806
|
+
/* @__PURE__ */ g(
|
|
792
807
|
"div",
|
|
793
808
|
{
|
|
794
809
|
className: i(
|
|
@@ -798,23 +813,23 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
798
813
|
"tw:[text-shadow:_0_2px_4px_rgb(0_0_0/_0.8)]"
|
|
799
814
|
),
|
|
800
815
|
children: [
|
|
801
|
-
/* @__PURE__ */
|
|
802
|
-
/* @__PURE__ */
|
|
816
|
+
/* @__PURE__ */ n("h5", { children: o }),
|
|
817
|
+
/* @__PURE__ */ n(J, { onClick: e, label: "Close dialog" })
|
|
803
818
|
]
|
|
804
819
|
}
|
|
805
820
|
),
|
|
806
|
-
/* @__PURE__ */
|
|
807
|
-
] }) : /* @__PURE__ */
|
|
808
|
-
/* @__PURE__ */
|
|
821
|
+
/* @__PURE__ */ n("div", { children: a })
|
|
822
|
+
] }) : /* @__PURE__ */ g(F, { children: [
|
|
823
|
+
/* @__PURE__ */ g(y.Header, { className: i(
|
|
809
824
|
"tw:sticky tw:top-0",
|
|
810
825
|
"tw:flex tw:items-center tw:justify-between tw:gap-x-2"
|
|
811
826
|
), children: [
|
|
812
|
-
/* @__PURE__ */
|
|
813
|
-
/* @__PURE__ */
|
|
827
|
+
/* @__PURE__ */ n("h5", { className: i({ "tw:text-danger": r === "danger" }), children: o }),
|
|
828
|
+
/* @__PURE__ */ n(J, { onClick: e, label: "Close dialog" })
|
|
814
829
|
] }),
|
|
815
|
-
/* @__PURE__ */
|
|
816
|
-
|
|
817
|
-
|
|
830
|
+
/* @__PURE__ */ n(y.Body, { children: a }),
|
|
831
|
+
u && /* @__PURE__ */ g(
|
|
832
|
+
y.Footer,
|
|
818
833
|
{
|
|
819
834
|
"data-testid": "footer",
|
|
820
835
|
className: i(
|
|
@@ -822,13 +837,13 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
822
837
|
"tw:[&]:px-3 tw:sticky tw:bottom-0"
|
|
823
838
|
),
|
|
824
839
|
children: [
|
|
825
|
-
/* @__PURE__ */
|
|
826
|
-
/* @__PURE__ */
|
|
840
|
+
/* @__PURE__ */ n(Lt, { onClick: e, children: b }),
|
|
841
|
+
/* @__PURE__ */ n(
|
|
827
842
|
Pt,
|
|
828
843
|
{
|
|
829
844
|
solid: !0,
|
|
830
845
|
variant: r === "danger" ? "danger" : "primary",
|
|
831
|
-
disabled:
|
|
846
|
+
disabled: w,
|
|
832
847
|
onClick: rt,
|
|
833
848
|
children: c
|
|
834
849
|
}
|
|
@@ -841,19 +856,19 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
841
856
|
)
|
|
842
857
|
}
|
|
843
858
|
);
|
|
844
|
-
}, ae = ({ className: t, children: e, loading: r = !1, variant:
|
|
845
|
-
"tw:text-gray-500 tw:dark:text-gray-400":
|
|
846
|
-
"tw:text-danger":
|
|
859
|
+
}, ae = ({ className: t, children: e, loading: r = !1, variant: o = "default" }) => /* @__PURE__ */ n(pt, { className: v({ "tw:[&]:border-danger": o === "error" }, t), children: /* @__PURE__ */ g("h3", { className: v("tw:text-center", {
|
|
860
|
+
"tw:text-gray-500 tw:dark:text-gray-400": o === "default",
|
|
861
|
+
"tw:text-danger": o === "error"
|
|
847
862
|
}), children: [
|
|
848
|
-
r && /* @__PURE__ */
|
|
849
|
-
/* @__PURE__ */
|
|
850
|
-
/* @__PURE__ */
|
|
863
|
+
r && /* @__PURE__ */ g(F, { children: [
|
|
864
|
+
/* @__PURE__ */ n(k, { icon: V, spin: !0 }),
|
|
865
|
+
/* @__PURE__ */ n("span", { className: "tw:ml-2", children: e ?? "Loading..." })
|
|
851
866
|
] }),
|
|
852
867
|
!r && e
|
|
853
|
-
] }) }), le = ({ variant: t, className: e, size: r = "md", children:
|
|
868
|
+
] }) }), le = ({ variant: t, className: e, size: r = "md", children: o }) => /* @__PURE__ */ n(
|
|
854
869
|
"div",
|
|
855
870
|
{
|
|
856
|
-
className:
|
|
871
|
+
className: v(
|
|
857
872
|
"tw:rounded-md tw:text-center",
|
|
858
873
|
{
|
|
859
874
|
"tw:p-2": r === "sm",
|
|
@@ -866,25 +881,25 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
866
881
|
},
|
|
867
882
|
e
|
|
868
883
|
),
|
|
869
|
-
children:
|
|
884
|
+
children: o
|
|
870
885
|
}
|
|
871
886
|
);
|
|
872
887
|
export {
|
|
873
888
|
Pt as Button,
|
|
874
|
-
|
|
889
|
+
y as Card,
|
|
875
890
|
ne as CardModal,
|
|
876
891
|
Qt as Checkbox,
|
|
877
|
-
|
|
892
|
+
J as CloseButton,
|
|
878
893
|
R as ELLIPSIS,
|
|
879
|
-
|
|
880
|
-
|
|
894
|
+
U as Input,
|
|
895
|
+
K as Label,
|
|
881
896
|
Vt as LabelledInput,
|
|
882
897
|
Xt as LabelledRevealablePasswordInput,
|
|
883
898
|
Yt as LabelledSelect,
|
|
884
899
|
Lt as LinkButton,
|
|
885
900
|
ht as Listbox,
|
|
886
901
|
ae as Message,
|
|
887
|
-
|
|
902
|
+
$t as ModalDialog,
|
|
888
903
|
ee as NavPills,
|
|
889
904
|
oe as Paginator,
|
|
890
905
|
le as Result,
|
|
@@ -893,12 +908,12 @@ export {
|
|
|
893
908
|
Tt as SearchInput,
|
|
894
909
|
Ct as Select,
|
|
895
910
|
pt as SimpleCard,
|
|
896
|
-
|
|
911
|
+
Jt as Table,
|
|
897
912
|
te as ToggleSwitch,
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
913
|
+
_t as formatNumber,
|
|
914
|
+
Ft as keyForPage,
|
|
915
|
+
L as pageIsEllipsis,
|
|
916
|
+
Dt as prettifyPageNumber,
|
|
917
|
+
At as progressivePagination,
|
|
903
918
|
re as roundTen
|
|
904
919
|
};
|