@shlinkio/shlink-frontend-kit 1.3.1 → 1.4.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.d.ts +136 -142
- package/dist/index.js +717 -725
- package/package.json +11 -10
package/dist/index.js
CHANGED
|
@@ -1,132 +1,128 @@
|
|
|
1
|
-
import { jsxs as g, jsx as a, Fragment as
|
|
2
|
-
import { clsx as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { Link as
|
|
5
|
-
import { faClose as Ne, faEyeSlash as Ce, faEye as Te, faCircleNotch as
|
|
1
|
+
import { jsxs as g, jsx as a, Fragment as F } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as c } from "clsx";
|
|
3
|
+
import { useRef as v, useState as R, useEffect as O, useCallback as w, createContext as G, useContext as P, useId as E, useImperativeHandle as we, useMemo as L } from "react";
|
|
4
|
+
import { Link as K, useNavigate as ke, useLocation as ne, NavLink as ve } from "react-router";
|
|
5
|
+
import { faClose as Ne, faEyeSlash as Ce, faEye as Te, faCircleNotch as oe, faSearch as Ae, faCheck as Ie, faCaretDown as Oe, faChevronUp as Re, faChevronDown as Le, faChevronLeft as z, faChevronRight as ee, faEllipsisV as Pe, faSortAmountUp as Ee, faSortAmountDown as Se } from "@fortawesome/free-solid-svg-icons";
|
|
6
6
|
import { FontAwesomeIcon as N } from "@fortawesome/react-fontawesome";
|
|
7
|
-
import { useFloating as
|
|
7
|
+
import { useFloating as ae, flip as De, offset as Me, useClick as _e, useInteractions as se, autoPlacement as Fe, arrow as Be, useHover as He, useTransitionStyles as $e } from "@floating-ui/react";
|
|
8
8
|
import { faClone as je } from "@fortawesome/free-regular-svg-icons";
|
|
9
9
|
import { createPortal as Ue } from "react-dom";
|
|
10
|
-
const
|
|
11
|
-
const o =
|
|
12
|
-
return
|
|
13
|
-
const i = o.current,
|
|
14
|
-
return i?.addEventListener("toggle",
|
|
10
|
+
const zt = ({ children: e, summary: t, summaryClasses: r, ...n }) => {
|
|
11
|
+
const o = v(null), [s, l] = R(!1);
|
|
12
|
+
return O(() => {
|
|
13
|
+
const i = o.current, d = () => l(!!i?.open);
|
|
14
|
+
return i?.addEventListener("toggle", d), () => i?.removeEventListener("toggle", d);
|
|
15
15
|
}, []), /* @__PURE__ */ g("details", { ref: o, ...n, children: [
|
|
16
|
-
/* @__PURE__ */ a("summary", { className:
|
|
16
|
+
/* @__PURE__ */ a("summary", { className: c("focus-ring px-1 -mx-1 rounded-sm", r), children: t }),
|
|
17
17
|
s && /* @__PURE__ */ a("div", { className: "mt-3 flex flex-col gap-y-3", children: e })
|
|
18
18
|
] });
|
|
19
|
-
}, Ge =
|
|
19
|
+
}, Ge = ({ className: e, ...t }) => /* @__PURE__ */ a(
|
|
20
20
|
"div",
|
|
21
21
|
{
|
|
22
|
-
className:
|
|
22
|
+
className: c(
|
|
23
23
|
"px-4 py-3 rounded-t-md",
|
|
24
24
|
"bg-lm-primary dark:bg-dm-primary border-b border-lm-border dark:border-dm-border",
|
|
25
25
|
e
|
|
26
26
|
),
|
|
27
|
-
...
|
|
28
|
-
ref: t
|
|
27
|
+
...t
|
|
29
28
|
}
|
|
30
|
-
)
|
|
29
|
+
), Ke = ({ className: e, ...t }) => /* @__PURE__ */ a(
|
|
31
30
|
"div",
|
|
32
31
|
{
|
|
33
|
-
className:
|
|
32
|
+
className: c(
|
|
34
33
|
"p-4 bg-lm-primary dark:bg-dm-primary first:rounded-t-md",
|
|
35
34
|
"first:rounded-t-md last:rounded-b-md",
|
|
36
35
|
e
|
|
37
36
|
),
|
|
38
|
-
...
|
|
39
|
-
ref: t
|
|
37
|
+
...t
|
|
40
38
|
}
|
|
41
|
-
)
|
|
39
|
+
), We = ({ className: e, ...t }) => /* @__PURE__ */ a(
|
|
42
40
|
"div",
|
|
43
41
|
{
|
|
44
|
-
className:
|
|
42
|
+
className: c(
|
|
45
43
|
"px-4 py-3 rounded-b-md",
|
|
46
44
|
"bg-lm-primary dark:bg-dm-primary border-t border-lm-border dark:border-dm-border",
|
|
47
45
|
e
|
|
48
46
|
),
|
|
49
|
-
...
|
|
50
|
-
ref: t
|
|
47
|
+
...t
|
|
51
48
|
}
|
|
52
|
-
)
|
|
49
|
+
), qe = ({ className: e, ...t }) => /* @__PURE__ */ a(
|
|
53
50
|
"div",
|
|
54
51
|
{
|
|
55
|
-
className:
|
|
52
|
+
className: c(
|
|
56
53
|
"group/card rounded-md shadow-md",
|
|
57
54
|
"border border-lm-border dark:border-dm-border bg-lm-primary dark:bg-dm-primary",
|
|
58
55
|
e
|
|
59
56
|
),
|
|
60
|
-
...
|
|
61
|
-
ref: t
|
|
57
|
+
...t
|
|
62
58
|
}
|
|
63
|
-
)
|
|
64
|
-
const { title:
|
|
65
|
-
...
|
|
59
|
+
), A = Object.assign(qe, { Body: Ke, Header: Ge, Footer: We }), Qe = ({ bodyClassName: e, children: t, ...r }) => {
|
|
60
|
+
const { title: n, titleSize: o = "md", ...s } = "title" in r ? r : {
|
|
61
|
+
...r,
|
|
66
62
|
title: void 0,
|
|
67
63
|
titleSize: void 0
|
|
68
64
|
};
|
|
69
|
-
return /* @__PURE__ */ g(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
65
|
+
return /* @__PURE__ */ g(A, { ...s, children: [
|
|
66
|
+
n && /* @__PURE__ */ g(A.Header, { children: [
|
|
67
|
+
o === "lg" && /* @__PURE__ */ a("h4", { children: n }),
|
|
68
|
+
o === "md" && /* @__PURE__ */ a("h5", { children: n }),
|
|
69
|
+
o === "sm" && /* @__PURE__ */ a("h6", { children: n })
|
|
74
70
|
] }),
|
|
75
|
-
/* @__PURE__ */ a(
|
|
71
|
+
/* @__PURE__ */ a(A.Body, { className: e, children: t })
|
|
76
72
|
] });
|
|
77
|
-
}
|
|
73
|
+
};
|
|
78
74
|
function Ye({
|
|
79
75
|
id: e,
|
|
80
|
-
items:
|
|
81
|
-
onSelectItem:
|
|
76
|
+
items: t,
|
|
77
|
+
onSelectItem: r,
|
|
82
78
|
onActiveItemChange: n,
|
|
83
79
|
renderItem: o,
|
|
84
80
|
className: s,
|
|
85
81
|
noItemsMessage: l = "No items",
|
|
86
82
|
anchor: i,
|
|
87
|
-
"aria-label":
|
|
88
|
-
...
|
|
83
|
+
"aria-label": d = "Items",
|
|
84
|
+
...p
|
|
89
85
|
}) {
|
|
90
|
-
const [
|
|
91
|
-
if (
|
|
92
|
-
const [
|
|
93
|
-
n(
|
|
86
|
+
const [f, b] = R(0), x = w((h) => {
|
|
87
|
+
if (b(h), n) {
|
|
88
|
+
const [u, m] = [...t.entries()][h];
|
|
89
|
+
n(u, m);
|
|
94
90
|
}
|
|
95
|
-
}, [
|
|
96
|
-
return
|
|
91
|
+
}, [t, n]);
|
|
92
|
+
return O(() => {
|
|
97
93
|
const h = i?.current;
|
|
98
94
|
if (!h)
|
|
99
95
|
return;
|
|
100
|
-
const
|
|
101
|
-
["Enter", "ArrowUp", "ArrowDown"].includes(m.key) && m.preventDefault(), m.key === "ArrowDown" ?
|
|
96
|
+
const u = (m) => {
|
|
97
|
+
["Enter", "ArrowUp", "ArrowDown"].includes(m.key) && m.preventDefault(), m.key === "ArrowDown" ? x(Math.min(f + 1, t.size - 1)) : m.key === "ArrowUp" ? x(Math.max(f - 1, 0)) : m.key === "Enter" && r([...t.values()][f]);
|
|
102
98
|
};
|
|
103
|
-
return h.addEventListener("keydown",
|
|
104
|
-
}, [
|
|
105
|
-
|
|
99
|
+
return h.addEventListener("keydown", u), () => h.removeEventListener("keydown", u);
|
|
100
|
+
}, [f, i, x, t, r]), /* @__PURE__ */ g(
|
|
101
|
+
A,
|
|
106
102
|
{
|
|
107
103
|
id: e,
|
|
108
|
-
className:
|
|
104
|
+
className: c("py-1 flex flex-col", s),
|
|
109
105
|
role: "listbox",
|
|
110
106
|
"aria-orientation": "vertical",
|
|
111
|
-
"aria-label":
|
|
112
|
-
...
|
|
107
|
+
"aria-label": d,
|
|
108
|
+
...p,
|
|
113
109
|
children: [
|
|
114
|
-
|
|
115
|
-
[...
|
|
110
|
+
t.size === 0 && /* @__PURE__ */ a("i", { role: "option", "aria-disabled": !0, "aria-selected": !1, "data-testid": "no-items", className: "px-2 py-1", children: l }),
|
|
111
|
+
[...t.entries()].map(([h, u], m) => /* @__PURE__ */ a(
|
|
116
112
|
"button",
|
|
117
113
|
{
|
|
118
114
|
id: `${e}_${h}`,
|
|
119
115
|
type: "button",
|
|
120
116
|
role: "option",
|
|
121
|
-
"aria-selected": m ===
|
|
122
|
-
className:
|
|
117
|
+
"aria-selected": m === f,
|
|
118
|
+
className: c(
|
|
123
119
|
"px-2 py-1 text-left truncate",
|
|
124
|
-
{ "bg-lm-secondary dark:bg-dm-secondary": m ===
|
|
120
|
+
{ "bg-lm-secondary dark:bg-dm-secondary": m === f }
|
|
125
121
|
),
|
|
126
122
|
tabIndex: -1,
|
|
127
|
-
onClick: () =>
|
|
128
|
-
onMouseOver: () =>
|
|
129
|
-
children: o(
|
|
123
|
+
onClick: () => r(u),
|
|
124
|
+
onMouseOver: () => x(m),
|
|
125
|
+
children: o(u)
|
|
130
126
|
},
|
|
131
127
|
h
|
|
132
128
|
))
|
|
@@ -134,48 +130,48 @@ function Ye({
|
|
|
134
130
|
}
|
|
135
131
|
);
|
|
136
132
|
}
|
|
137
|
-
const
|
|
138
|
-
const { responsive:
|
|
139
|
-
return /* @__PURE__ */ a(
|
|
133
|
+
const B = G(void 0), D = G({ responsive: !0, size: "md" }), Xe = ({ children: e, className: t }) => {
|
|
134
|
+
const { responsive: r } = P(D);
|
|
135
|
+
return /* @__PURE__ */ a(B.Provider, { value: { section: "head" }, children: /* @__PURE__ */ a(
|
|
140
136
|
"thead",
|
|
141
137
|
{
|
|
142
|
-
className:
|
|
143
|
-
{ "hidden lg:table-header-group":
|
|
144
|
-
|
|
138
|
+
className: c(
|
|
139
|
+
{ "hidden lg:table-header-group": r },
|
|
140
|
+
t
|
|
145
141
|
),
|
|
146
142
|
children: e
|
|
147
143
|
}
|
|
148
144
|
) });
|
|
149
|
-
}, Je = ({ children: e, className:
|
|
150
|
-
const { responsive:
|
|
151
|
-
return /* @__PURE__ */ a(
|
|
145
|
+
}, Je = ({ children: e, className: t }) => {
|
|
146
|
+
const { responsive: r } = P(D);
|
|
147
|
+
return /* @__PURE__ */ a(B.Provider, { value: { section: "body" }, children: /* @__PURE__ */ a(
|
|
152
148
|
"tbody",
|
|
153
149
|
{
|
|
154
|
-
className:
|
|
155
|
-
{ "lg:table-row-group flex flex-col gap-y-3":
|
|
156
|
-
|
|
150
|
+
className: c(
|
|
151
|
+
{ "lg:table-row-group flex flex-col gap-y-3": r },
|
|
152
|
+
t
|
|
157
153
|
),
|
|
158
154
|
children: e
|
|
159
155
|
}
|
|
160
156
|
) });
|
|
161
|
-
}, Ze = ({ children: e, className:
|
|
162
|
-
const { responsive:
|
|
163
|
-
return /* @__PURE__ */ a(
|
|
157
|
+
}, Ze = ({ children: e, className: t }) => {
|
|
158
|
+
const { responsive: r } = P(D);
|
|
159
|
+
return /* @__PURE__ */ a(B.Provider, { value: { section: "footer" }, children: /* @__PURE__ */ a(
|
|
164
160
|
"tfoot",
|
|
165
161
|
{
|
|
166
|
-
className:
|
|
167
|
-
{ "lg:table-row-group flex flex-col gap-y-3 mt-4":
|
|
168
|
-
|
|
162
|
+
className: c(
|
|
163
|
+
{ "lg:table-row-group flex flex-col gap-y-3 mt-4": r },
|
|
164
|
+
t
|
|
169
165
|
),
|
|
170
166
|
children: e
|
|
171
167
|
}
|
|
172
168
|
) });
|
|
173
|
-
}, Ve = ({ children: e, className:
|
|
174
|
-
const o =
|
|
169
|
+
}, Ve = ({ children: e, className: t, ...r }) => {
|
|
170
|
+
const o = P(B)?.section === "body", { responsive: s } = P(D);
|
|
175
171
|
return /* @__PURE__ */ a(
|
|
176
172
|
"tr",
|
|
177
173
|
{
|
|
178
|
-
className:
|
|
174
|
+
className: c(
|
|
179
175
|
"group",
|
|
180
176
|
{
|
|
181
177
|
"lg:table-row flex flex-col": s,
|
|
@@ -184,56 +180,57 @@ const H = K(void 0), M = K({ responsive: !0, size: "md" }), Xe = ({ children: e,
|
|
|
184
180
|
// Use a different hover bg color depending on the table being inside a card or not
|
|
185
181
|
"group-[&]/card:hover:bg-lm-secondary dark:group-[&]/card:hover:bg-dm-secondary": o
|
|
186
182
|
},
|
|
187
|
-
|
|
183
|
+
t
|
|
188
184
|
),
|
|
189
|
-
...
|
|
185
|
+
...r,
|
|
190
186
|
children: e
|
|
191
187
|
}
|
|
192
188
|
);
|
|
193
|
-
}, ze = ({ children: e, className:
|
|
194
|
-
const s =
|
|
189
|
+
}, ze = ({ children: e, className: t, columnName: r, type: n, ...o }) => {
|
|
190
|
+
const s = P(B), l = n ?? (s?.section !== "body" ? "th" : "td"), { responsive: i, size: d } = P(D);
|
|
195
191
|
return /* @__PURE__ */ a(
|
|
196
192
|
l,
|
|
197
193
|
{
|
|
198
|
-
"data-column": i ?
|
|
199
|
-
className:
|
|
194
|
+
"data-column": i ? r : void 0,
|
|
195
|
+
className: c(
|
|
200
196
|
"border-lm-border dark:border-dm-border",
|
|
201
197
|
{
|
|
202
|
-
"p-1":
|
|
203
|
-
"p-2":
|
|
204
|
-
"p-3":
|
|
198
|
+
"p-1": d === "sm",
|
|
199
|
+
"p-2": d === "md",
|
|
200
|
+
"p-3": d === "lg",
|
|
205
201
|
"border-b-1": !i,
|
|
206
202
|
"block lg:table-cell not-last:border-b-1 lg:border-b-1": i,
|
|
207
203
|
"text-left": l === "th",
|
|
208
204
|
// For responsive tables, display the content in data-column attribute for md sizes and lower
|
|
209
205
|
"before:lg:hidden before:content-[attr(data-column)] before:font-bold before:mr-1": i && l === "td"
|
|
210
206
|
},
|
|
211
|
-
|
|
207
|
+
t
|
|
212
208
|
),
|
|
213
209
|
...o,
|
|
214
210
|
children: e
|
|
215
211
|
}
|
|
216
212
|
);
|
|
217
|
-
}, et = ({ header: e, footer:
|
|
213
|
+
}, et = ({ header: e, footer: t, children: r, responsive: n = !0, size: o = "md", ...s }) => /* @__PURE__ */ a(D.Provider, { value: { responsive: n, size: o }, children: /* @__PURE__ */ g("table", { className: "w-full", ...s, children: [
|
|
218
214
|
/* @__PURE__ */ a(Xe, { children: e }),
|
|
219
|
-
/* @__PURE__ */ a(Je, { children:
|
|
220
|
-
|
|
221
|
-
] }) }),
|
|
215
|
+
/* @__PURE__ */ a(Je, { children: r }),
|
|
216
|
+
t && /* @__PURE__ */ a(Ze, { children: t })
|
|
217
|
+
] }) }), er = Object.assign(et, { Row: Ve, Cell: ze }), le = ({
|
|
222
218
|
className: e,
|
|
223
|
-
disabled:
|
|
224
|
-
variant:
|
|
219
|
+
disabled: t,
|
|
220
|
+
variant: r = "primary",
|
|
225
221
|
size: n = "md",
|
|
226
222
|
inline: o = !1,
|
|
227
223
|
solid: s = !1,
|
|
228
224
|
type: l = "button",
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
225
|
+
ref: i,
|
|
226
|
+
...d
|
|
227
|
+
}) => {
|
|
228
|
+
const p = "to" in d && typeof d.to == "string", f = p ? K : "button", b = p ? void 0 : l;
|
|
232
229
|
return /* @__PURE__ */ a(
|
|
233
|
-
|
|
230
|
+
f,
|
|
234
231
|
{
|
|
235
|
-
ref:
|
|
236
|
-
className:
|
|
232
|
+
ref: i,
|
|
233
|
+
className: c(
|
|
237
234
|
{
|
|
238
235
|
"inline-flex": o,
|
|
239
236
|
flex: !o
|
|
@@ -242,9 +239,9 @@ const H = K(void 0), M = K({ responsive: !0, size: "md" }), Xe = ({ children: e,
|
|
|
242
239
|
"border rounded-md no-underline",
|
|
243
240
|
"transition-colors",
|
|
244
241
|
{
|
|
245
|
-
"focus-ring":
|
|
246
|
-
"focus-ring-secondary":
|
|
247
|
-
"focus-ring-danger":
|
|
242
|
+
"focus-ring": r === "primary",
|
|
243
|
+
"focus-ring-secondary": r === "secondary",
|
|
244
|
+
"focus-ring-danger": r === "danger"
|
|
248
245
|
},
|
|
249
246
|
{
|
|
250
247
|
"px-1.5 py-1 text-sm": n === "sm",
|
|
@@ -252,49 +249,49 @@ const H = K(void 0), M = K({ responsive: !0, size: "md" }), Xe = ({ children: e,
|
|
|
252
249
|
"px-4 py-2 text-lg": n === "lg"
|
|
253
250
|
},
|
|
254
251
|
{
|
|
255
|
-
"border-lm-brand dark:border-dm-brand":
|
|
256
|
-
"text-lm-brand dark:text-dm-brand":
|
|
257
|
-
"border-zinc-500":
|
|
258
|
-
"text-zinc-500":
|
|
259
|
-
"border-danger":
|
|
260
|
-
"text-danger":
|
|
252
|
+
"border-lm-brand dark:border-dm-brand": r === "primary",
|
|
253
|
+
"text-lm-brand dark:text-dm-brand": r === "primary" && !s,
|
|
254
|
+
"border-zinc-500": r === "secondary",
|
|
255
|
+
"text-zinc-500": r === "secondary" && !s,
|
|
256
|
+
"border-danger": r === "danger",
|
|
257
|
+
"text-danger": r === "danger" && !s
|
|
261
258
|
},
|
|
262
259
|
s && {
|
|
263
260
|
"text-white": !0,
|
|
264
|
-
"bg-lm-brand dark:bg-dm-brand":
|
|
265
|
-
"highlight:bg-lm-brand-dark dark:highlight:bg-dm-brand-dark":
|
|
266
|
-
"highlight:border-lm-brand-dark dark:highlight:border-dm-brand-dark":
|
|
267
|
-
"bg-zinc-500":
|
|
268
|
-
"highlight:bg-zinc-600 highlight:border-zinc-600":
|
|
269
|
-
"bg-danger":
|
|
270
|
-
"highlight:bg-danger-dark highlight:border-danger-dark":
|
|
261
|
+
"bg-lm-brand dark:bg-dm-brand": r === "primary",
|
|
262
|
+
"highlight:bg-lm-brand-dark dark:highlight:bg-dm-brand-dark": r === "primary",
|
|
263
|
+
"highlight:border-lm-brand-dark dark:highlight:border-dm-brand-dark": r === "primary",
|
|
264
|
+
"bg-zinc-500": r === "secondary",
|
|
265
|
+
"highlight:bg-zinc-600 highlight:border-zinc-600": r === "secondary",
|
|
266
|
+
"bg-danger": r === "danger",
|
|
267
|
+
"highlight:bg-danger-dark highlight:border-danger-dark": r === "danger"
|
|
271
268
|
},
|
|
272
|
-
!
|
|
269
|
+
!t && {
|
|
273
270
|
"highlight:text-white": !s,
|
|
274
|
-
"highlight:bg-lm-brand dark:highlight:bg-dm-brand":
|
|
275
|
-
"highlight:bg-zinc-500":
|
|
276
|
-
"highlight:bg-danger":
|
|
271
|
+
"highlight:bg-lm-brand dark:highlight:bg-dm-brand": r === "primary",
|
|
272
|
+
"highlight:bg-zinc-500": r === "secondary",
|
|
273
|
+
"highlight:bg-danger": r === "danger"
|
|
277
274
|
},
|
|
278
275
|
{
|
|
279
|
-
"cursor-pointer": !
|
|
280
|
-
"pointer-events-none opacity-65":
|
|
276
|
+
"cursor-pointer": !t,
|
|
277
|
+
"pointer-events-none opacity-65": t
|
|
281
278
|
},
|
|
282
279
|
e
|
|
283
280
|
),
|
|
284
|
-
disabled:
|
|
285
|
-
"aria-disabled":
|
|
286
|
-
type:
|
|
287
|
-
...
|
|
281
|
+
disabled: p ? void 0 : t,
|
|
282
|
+
"aria-disabled": p ? t : void 0,
|
|
283
|
+
type: b,
|
|
284
|
+
...d
|
|
288
285
|
}
|
|
289
286
|
);
|
|
290
|
-
}
|
|
291
|
-
const o = w((s) =>
|
|
287
|
+
}, ie = ({ className: e, onChange: t, ref: r, ...n }) => {
|
|
288
|
+
const o = w((s) => t?.(s.target.checked, s), [t]);
|
|
292
289
|
return /* @__PURE__ */ a(
|
|
293
290
|
"input",
|
|
294
291
|
{
|
|
295
|
-
ref:
|
|
292
|
+
ref: r,
|
|
296
293
|
type: "checkbox",
|
|
297
|
-
className:
|
|
294
|
+
className: c(
|
|
298
295
|
"appearance-none focus-ring cursor-[inherit]",
|
|
299
296
|
"border-1 border-lm-input-border dark:border-dm-input-border",
|
|
300
297
|
"bg-lm-primary dark:bg-dm-primary checked:bg-lm-brand dark:checked:bg-dm-brand bg-no-repeat",
|
|
@@ -303,57 +300,57 @@ const H = K(void 0), M = K({ responsive: !0, size: "md" }), Xe = ({ children: e,
|
|
|
303
300
|
e
|
|
304
301
|
),
|
|
305
302
|
onChange: o,
|
|
306
|
-
...
|
|
303
|
+
...n
|
|
307
304
|
}
|
|
308
305
|
);
|
|
309
|
-
}
|
|
310
|
-
|
|
306
|
+
}, tr = ({ className: e, ...t }) => /* @__PURE__ */ a(
|
|
307
|
+
ie,
|
|
311
308
|
{
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
...r
|
|
309
|
+
className: c("rounded-sm min-w-4 w-4 h-4 checked:bg-(image:--tick) bg-center", e),
|
|
310
|
+
...t
|
|
315
311
|
}
|
|
316
|
-
)
|
|
312
|
+
), Q = ({ onClick: e, className: t, label: r = "Close", size: n = "lg", solid: o, ref: s }) => /* @__PURE__ */ a(
|
|
317
313
|
"button",
|
|
318
314
|
{
|
|
319
315
|
ref: s,
|
|
320
316
|
type: "button",
|
|
321
317
|
onClick: e,
|
|
322
|
-
className:
|
|
318
|
+
className: c(
|
|
323
319
|
"rounded-md focus-ring cursor-pointer",
|
|
324
320
|
{
|
|
325
321
|
"opacity-50 highlight:opacity-80 transition-opacity": !o
|
|
326
322
|
},
|
|
327
|
-
|
|
323
|
+
t
|
|
328
324
|
),
|
|
329
|
-
"aria-label":
|
|
325
|
+
"aria-label": r,
|
|
330
326
|
children: /* @__PURE__ */ a(N, { icon: Ne, size: n === "lg" ? "xl" : n === "md" ? "lg" : void 0 })
|
|
331
327
|
}
|
|
332
|
-
)
|
|
328
|
+
), X = ({
|
|
333
329
|
borderless: e = !1,
|
|
334
|
-
size:
|
|
335
|
-
feedback:
|
|
330
|
+
size: t = "md",
|
|
331
|
+
feedback: r,
|
|
336
332
|
variant: n = "default",
|
|
337
333
|
className: o,
|
|
338
334
|
disabled: s,
|
|
339
|
-
|
|
340
|
-
|
|
335
|
+
ref: l,
|
|
336
|
+
...i
|
|
337
|
+
}) => /* @__PURE__ */ a(
|
|
341
338
|
"input",
|
|
342
339
|
{
|
|
343
|
-
ref:
|
|
344
|
-
className:
|
|
340
|
+
ref: l,
|
|
341
|
+
className: c(
|
|
345
342
|
"outline-none",
|
|
346
343
|
n === "default" && [
|
|
347
344
|
"w-full",
|
|
348
345
|
{
|
|
349
|
-
"focus-ring": !
|
|
350
|
-
"focus-ring-danger":
|
|
351
|
-
"px-2 py-1 text-sm":
|
|
352
|
-
"px-3 py-1.5":
|
|
353
|
-
"px-4 py-2 text-xl":
|
|
346
|
+
"focus-ring": !r,
|
|
347
|
+
"focus-ring-danger": r === "error",
|
|
348
|
+
"px-2 py-1 text-sm": t === "sm",
|
|
349
|
+
"px-3 py-1.5": t === "md",
|
|
350
|
+
"px-4 py-2 text-xl": t === "lg",
|
|
354
351
|
"rounded-md border": !e,
|
|
355
|
-
"border-lm-input-border dark:border-dm-input-border": !e && !
|
|
356
|
-
"border-danger": !e &&
|
|
352
|
+
"border-lm-input-border dark:border-dm-input-border": !e && !r,
|
|
353
|
+
"border-danger": !e && r === "error",
|
|
357
354
|
"bg-lm-disabled-input dark:bg-dm-disabled-input": s,
|
|
358
355
|
"bg-lm-primary dark:bg-dm-primary": !s,
|
|
359
356
|
// Use different background color when rendered inside a card
|
|
@@ -363,62 +360,60 @@ const H = K(void 0), M = K({ responsive: !0, size: "md" }), Xe = ({ children: e,
|
|
|
363
360
|
o
|
|
364
361
|
),
|
|
365
362
|
disabled: s,
|
|
366
|
-
...
|
|
363
|
+
...i
|
|
367
364
|
}
|
|
368
|
-
)
|
|
369
|
-
|
|
365
|
+
), J = ({ required: e, children: t, className: r, ...n }) => /* @__PURE__ */ g("label", { className: c("cursor-pointer", r), ...n, children: [
|
|
366
|
+
t,
|
|
370
367
|
e && /* @__PURE__ */ a("span", { className: "text-danger ml-1", "data-testid": "required-indicator", children: "*" })
|
|
371
|
-
] }),
|
|
368
|
+
] }), Z = ({ children: e, helpText: t, error: r, "data-testid": n }) => /* @__PURE__ */ g("div", { className: "flex flex-col gap-1", "data-testid": n, children: [
|
|
372
369
|
e,
|
|
373
|
-
|
|
370
|
+
t && /* @__PURE__ */ a(
|
|
374
371
|
"small",
|
|
375
372
|
{
|
|
376
373
|
"data-testid": n ? `${n}-help-text` : "help-text",
|
|
377
374
|
className: "text-gray-500 dark:text-gray-400",
|
|
378
|
-
children:
|
|
375
|
+
children: t
|
|
379
376
|
}
|
|
380
377
|
),
|
|
381
|
-
|
|
382
|
-
] }),
|
|
383
|
-
const
|
|
384
|
-
return /* @__PURE__ */ g(
|
|
385
|
-
/* @__PURE__ */ a(
|
|
378
|
+
r && /* @__PURE__ */ a("span", { "data-testid": n ? `${n}-error` : "error", className: "text-danger", children: r })
|
|
379
|
+
] }), rr = ({ label: e, inputClassName: t, required: r, hiddenRequired: n, error: o, helpText: s, "data-testid": l, ...i }) => {
|
|
380
|
+
const d = E();
|
|
381
|
+
return /* @__PURE__ */ g(Z, { error: o, helpText: s, "data-testid": l, children: [
|
|
382
|
+
/* @__PURE__ */ a(J, { htmlFor: d, required: r, children: e }),
|
|
386
383
|
/* @__PURE__ */ a(
|
|
387
|
-
|
|
384
|
+
X,
|
|
388
385
|
{
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
required: t || n,
|
|
386
|
+
id: d,
|
|
387
|
+
className: t,
|
|
388
|
+
required: r || n,
|
|
393
389
|
feedback: o ? "error" : void 0,
|
|
394
390
|
...i
|
|
395
391
|
}
|
|
396
392
|
)
|
|
397
393
|
] });
|
|
398
|
-
}
|
|
399
|
-
const { flag:
|
|
400
|
-
|
|
401
|
-
}, [
|
|
394
|
+
}, tt = ({ containerClassName: e, className: t, size: r, ...n }) => {
|
|
395
|
+
const { flag: o, toggle: s, setToFalse: l } = ue(), i = v(null), d = w(({ relatedTarget: p }) => {
|
|
396
|
+
i.current?.contains(p) || l();
|
|
397
|
+
}, [i, l]);
|
|
402
398
|
return /* @__PURE__ */ g(
|
|
403
399
|
"div",
|
|
404
400
|
{
|
|
405
|
-
className:
|
|
406
|
-
ref:
|
|
407
|
-
onBlurCapture:
|
|
401
|
+
className: c("group relative", e),
|
|
402
|
+
ref: i,
|
|
403
|
+
onBlurCapture: d,
|
|
408
404
|
children: [
|
|
409
405
|
/* @__PURE__ */ a(
|
|
410
|
-
|
|
406
|
+
X,
|
|
411
407
|
{
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
className: d(
|
|
408
|
+
type: o ? "text" : "password",
|
|
409
|
+
className: c(
|
|
415
410
|
{
|
|
416
|
-
"pr-10":
|
|
417
|
-
"pr-8":
|
|
411
|
+
"pr-10": r !== "sm",
|
|
412
|
+
"pr-8": r === "sm"
|
|
418
413
|
},
|
|
419
|
-
|
|
414
|
+
t
|
|
420
415
|
),
|
|
421
|
-
size:
|
|
416
|
+
size: r,
|
|
422
417
|
"data-testid": "input",
|
|
423
418
|
...n
|
|
424
419
|
}
|
|
@@ -427,61 +422,59 @@ const H = K(void 0), M = K({ responsive: !0, size: "md" }), Xe = ({ children: e,
|
|
|
427
422
|
"button",
|
|
428
423
|
{
|
|
429
424
|
type: "button",
|
|
430
|
-
onClick:
|
|
431
|
-
title:
|
|
432
|
-
"aria-label":
|
|
433
|
-
className:
|
|
425
|
+
onClick: s,
|
|
426
|
+
title: o ? "Hide password" : "Show password",
|
|
427
|
+
"aria-label": o ? "Hide password" : "Show password",
|
|
428
|
+
className: c(
|
|
434
429
|
"absolute top-[50%] translate-y-[-50%] px-1 cursor-pointer",
|
|
435
430
|
"text-placeholder hover:text-lm-text hover:dark:text-dm-text transition-colors",
|
|
436
431
|
{
|
|
437
|
-
"right-1.5":
|
|
438
|
-
"scale-85 right-1":
|
|
432
|
+
"right-1.5": r !== "sm",
|
|
433
|
+
"scale-85 right-1": r === "sm"
|
|
439
434
|
}
|
|
440
435
|
),
|
|
441
436
|
tabIndex: -1,
|
|
442
|
-
children: /* @__PURE__ */ a(N, { icon:
|
|
437
|
+
children: /* @__PURE__ */ a(N, { icon: o ? Ce : Te })
|
|
443
438
|
}
|
|
444
439
|
)
|
|
445
440
|
]
|
|
446
441
|
}
|
|
447
442
|
);
|
|
448
|
-
}
|
|
449
|
-
const
|
|
450
|
-
return /* @__PURE__ */ g(
|
|
451
|
-
/* @__PURE__ */ a(
|
|
443
|
+
}, nr = ({ label: e, inputClassName: t, required: r, hiddenRequired: n, error: o, helpText: s, "data-testid": l, ...i }) => {
|
|
444
|
+
const d = E();
|
|
445
|
+
return /* @__PURE__ */ g(Z, { error: o, helpText: s, "data-testid": l, children: [
|
|
446
|
+
/* @__PURE__ */ a(J, { htmlFor: d, required: r, children: e }),
|
|
452
447
|
/* @__PURE__ */ a(
|
|
453
448
|
tt,
|
|
454
449
|
{
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
required: t || n,
|
|
450
|
+
id: d,
|
|
451
|
+
className: t,
|
|
452
|
+
required: r || n,
|
|
459
453
|
feedback: o ? "error" : void 0,
|
|
460
454
|
...i
|
|
461
455
|
}
|
|
462
456
|
)
|
|
463
457
|
] });
|
|
464
|
-
}
|
|
458
|
+
}, rt = ({
|
|
465
459
|
className: e,
|
|
466
|
-
size:
|
|
467
|
-
feedback:
|
|
460
|
+
size: t = "md",
|
|
461
|
+
feedback: r,
|
|
468
462
|
disabled: n,
|
|
469
463
|
...o
|
|
470
|
-
}
|
|
464
|
+
}) => /* @__PURE__ */ a(
|
|
471
465
|
"select",
|
|
472
466
|
{
|
|
473
|
-
|
|
474
|
-
className: d(
|
|
467
|
+
className: c(
|
|
475
468
|
"w-full rounded-md border appearance-none pr-9",
|
|
476
469
|
"bg-(image:--chevron-down) bg-no-repeat bg-position-[right_0.75rem_center] bg-size-[16px_12px]",
|
|
477
470
|
{
|
|
478
|
-
"focus-ring": !
|
|
479
|
-
"focus-ring-danger":
|
|
480
|
-
"border-lm-input-border dark:border-dm-input-border": !
|
|
481
|
-
"border-danger":
|
|
482
|
-
"pl-2 py-1 text-sm":
|
|
483
|
-
"pl-3 py-1.5":
|
|
484
|
-
"pl-4 py-2 text-xl":
|
|
471
|
+
"focus-ring": !r,
|
|
472
|
+
"focus-ring-danger": r === "error",
|
|
473
|
+
"border-lm-input-border dark:border-dm-input-border": !r,
|
|
474
|
+
"border-danger": r === "error",
|
|
475
|
+
"pl-2 py-1 text-sm": t === "sm",
|
|
476
|
+
"pl-3 py-1.5": t === "md",
|
|
477
|
+
"pl-4 py-2 text-xl": t === "lg",
|
|
485
478
|
"bg-lm-disabled-input dark:bg-dm-disabled-input": n,
|
|
486
479
|
// Apply different background color when rendered inside a card
|
|
487
480
|
"bg-lm-primary dark:bg-dm-primary group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input": !n
|
|
@@ -491,43 +484,42 @@ const H = K(void 0), M = K({ responsive: !0, size: "md" }), Xe = ({ children: e,
|
|
|
491
484
|
disabled: n,
|
|
492
485
|
...o
|
|
493
486
|
}
|
|
494
|
-
)
|
|
495
|
-
const
|
|
496
|
-
return /* @__PURE__ */ g(
|
|
497
|
-
/* @__PURE__ */ a(
|
|
487
|
+
), or = ({ selectClassName: e, label: t, error: r, helpText: n, required: o, hiddenRequired: s, "data-testid": l, ...i }) => {
|
|
488
|
+
const d = E();
|
|
489
|
+
return /* @__PURE__ */ g(Z, { error: r, helpText: n, "data-testid": l, children: [
|
|
490
|
+
/* @__PURE__ */ a(J, { htmlFor: d, required: o, children: t }),
|
|
498
491
|
/* @__PURE__ */ a(
|
|
499
492
|
rt,
|
|
500
493
|
{
|
|
501
|
-
|
|
502
|
-
id: u,
|
|
494
|
+
id: d,
|
|
503
495
|
className: e,
|
|
504
496
|
required: o || s,
|
|
505
|
-
feedback:
|
|
497
|
+
feedback: r ? "error" : void 0,
|
|
506
498
|
...i
|
|
507
499
|
}
|
|
508
500
|
)
|
|
509
501
|
] });
|
|
510
|
-
}
|
|
502
|
+
}, nt = ({
|
|
511
503
|
onChange: e,
|
|
512
|
-
containerClassName:
|
|
513
|
-
inputClassName:
|
|
504
|
+
containerClassName: t,
|
|
505
|
+
inputClassName: r,
|
|
514
506
|
// Inputs have a default 'md' size. Search inputs are usually 'lg' as they are rendered at the top of sections
|
|
515
507
|
size: n = "lg",
|
|
516
508
|
loading: o = !1,
|
|
517
509
|
variant: s = "default",
|
|
518
510
|
immediate: l = !1,
|
|
519
511
|
...i
|
|
520
|
-
}
|
|
521
|
-
const { setTimeout:
|
|
522
|
-
!
|
|
523
|
-
}, [
|
|
524
|
-
return /* @__PURE__ */ g("div", { className:
|
|
512
|
+
}) => {
|
|
513
|
+
const { setTimeout: d, clearCurrentTimeout: p } = me(500), f = w((b) => {
|
|
514
|
+
!b || l ? (p(), e(b)) : d(() => e(b));
|
|
515
|
+
}, [p, l, e, d]);
|
|
516
|
+
return /* @__PURE__ */ g("div", { className: c("group relative focus-within:z-10", t), children: [
|
|
525
517
|
s === "default" && /* @__PURE__ */ a(
|
|
526
518
|
N,
|
|
527
519
|
{
|
|
528
|
-
icon: o ?
|
|
520
|
+
icon: o ? oe : Ae,
|
|
529
521
|
spin: o,
|
|
530
|
-
className:
|
|
522
|
+
className: c(
|
|
531
523
|
"absolute top-[50%] translate-y-[-50%] transition-colors",
|
|
532
524
|
"text-placeholder group-focus-within:text-lm-text dark:group-focus-within:text-dm-text",
|
|
533
525
|
{
|
|
@@ -538,90 +530,90 @@ const H = K(void 0), M = K({ responsive: !0, size: "md" }), Xe = ({ children: e,
|
|
|
538
530
|
}
|
|
539
531
|
),
|
|
540
532
|
/* @__PURE__ */ a(
|
|
541
|
-
|
|
533
|
+
X,
|
|
542
534
|
{
|
|
543
|
-
ref: c,
|
|
544
535
|
variant: s,
|
|
545
536
|
type: "search",
|
|
546
|
-
className:
|
|
537
|
+
className: c(
|
|
547
538
|
s === "default" && {
|
|
548
539
|
"pl-9": n !== "sm",
|
|
549
540
|
"pl-7": n === "sm"
|
|
550
541
|
},
|
|
551
|
-
|
|
542
|
+
r
|
|
552
543
|
),
|
|
553
544
|
placeholder: "Search...",
|
|
554
|
-
onChange: (
|
|
545
|
+
onChange: (b) => f(b.target.value),
|
|
555
546
|
size: n,
|
|
556
547
|
...i
|
|
557
548
|
}
|
|
558
549
|
)
|
|
559
550
|
] });
|
|
560
|
-
}
|
|
551
|
+
};
|
|
561
552
|
function ot({
|
|
562
553
|
searchResults: e,
|
|
563
|
-
onSearch:
|
|
564
|
-
onSelectSearchResult:
|
|
554
|
+
onSearch: t,
|
|
555
|
+
onSelectSearchResult: r,
|
|
565
556
|
renderSearchResult: n,
|
|
566
557
|
size: o = "md",
|
|
567
558
|
// SearchInput defaults its size to 'lg'. Change it to 'md'
|
|
568
559
|
listboxSpan: s = "full",
|
|
569
560
|
onFocus: l,
|
|
570
561
|
containerClassName: i,
|
|
571
|
-
listboxClassName:
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
562
|
+
listboxClassName: d,
|
|
563
|
+
ref: p,
|
|
564
|
+
...f
|
|
565
|
+
}) {
|
|
566
|
+
const b = E(), [x, h] = R(), u = v(null);
|
|
567
|
+
we(p, () => u.current);
|
|
568
|
+
const m = L(
|
|
569
|
+
() => e ? x ?? [...e.keys()][0] : void 0,
|
|
570
|
+
[x, e]
|
|
571
|
+
), k = w((y) => {
|
|
572
|
+
r(y), t(""), u.current.value = "";
|
|
573
|
+
}, [t, r, u]);
|
|
582
574
|
return /* @__PURE__ */ g(
|
|
583
575
|
"div",
|
|
584
576
|
{
|
|
585
|
-
className:
|
|
577
|
+
className: c("relative", i),
|
|
586
578
|
onBlur: (y) => {
|
|
587
|
-
y.currentTarget.contains(y.relatedTarget) ||
|
|
579
|
+
y.currentTarget.contains(y.relatedTarget) || t("");
|
|
588
580
|
},
|
|
589
581
|
children: [
|
|
590
582
|
/* @__PURE__ */ a(
|
|
591
583
|
nt,
|
|
592
584
|
{
|
|
593
|
-
onChange:
|
|
585
|
+
onChange: t,
|
|
594
586
|
size: o,
|
|
595
|
-
ref:
|
|
587
|
+
ref: u,
|
|
596
588
|
role: "combobox",
|
|
597
589
|
"aria-autocomplete": "list",
|
|
598
590
|
"aria-expanded": !!e,
|
|
599
|
-
"aria-controls":
|
|
600
|
-
"aria-activedescendant": m ? `${
|
|
591
|
+
"aria-controls": b,
|
|
592
|
+
"aria-activedescendant": m ? `${b}_${m}` : void 0,
|
|
601
593
|
autoComplete: "off",
|
|
602
594
|
autoCorrect: "off",
|
|
603
595
|
onFocus: (y) => {
|
|
604
|
-
l?.(y),
|
|
596
|
+
l?.(y), t(y.target.value);
|
|
605
597
|
},
|
|
606
|
-
...
|
|
598
|
+
...f
|
|
607
599
|
}
|
|
608
600
|
),
|
|
609
601
|
e && /* @__PURE__ */ a(
|
|
610
602
|
Ye,
|
|
611
603
|
{
|
|
612
|
-
id:
|
|
604
|
+
id: b,
|
|
613
605
|
items: e,
|
|
614
|
-
anchor:
|
|
615
|
-
onSelectItem:
|
|
606
|
+
anchor: u,
|
|
607
|
+
onSelectItem: k,
|
|
616
608
|
onActiveItemChange: h,
|
|
617
609
|
renderItem: n,
|
|
618
|
-
className:
|
|
610
|
+
className: c(
|
|
619
611
|
"absolute top-full mt-1 z-10",
|
|
620
612
|
{
|
|
621
613
|
"min-w-60": s === "auto",
|
|
622
614
|
"w-full": s === "full"
|
|
623
615
|
},
|
|
624
|
-
|
|
616
|
+
d
|
|
625
617
|
),
|
|
626
618
|
"aria-label": "Matching items",
|
|
627
619
|
noItemsMessage: "No results found matching search"
|
|
@@ -631,58 +623,58 @@ function ot({
|
|
|
631
623
|
}
|
|
632
624
|
);
|
|
633
625
|
}
|
|
634
|
-
const at =
|
|
635
|
-
/* @__PURE__ */ a("div", { "aria-hidden": !0, className: "w-4 h-4 rounded-full", style: { backgroundColor:
|
|
626
|
+
const at = ({ name: e, color: t }) => /* @__PURE__ */ g("div", { className: "inline-flex items-center gap-2", children: [
|
|
627
|
+
/* @__PURE__ */ a("div", { "aria-hidden": !0, className: "w-4 h-4 rounded-full", style: { backgroundColor: t } }),
|
|
636
628
|
e
|
|
637
|
-
] }),
|
|
629
|
+
] }), st = ({ tag: e, color: t, size: r, onRemove: n }) => (
|
|
638
630
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
639
631
|
/* @__PURE__ */ g(
|
|
640
632
|
"li",
|
|
641
633
|
{
|
|
642
|
-
className:
|
|
634
|
+
className: c(
|
|
643
635
|
"inline-flex items-center gap-1 font-bold [&]:rounded-md",
|
|
644
636
|
{
|
|
645
|
-
"px-1 text-sm":
|
|
646
|
-
"py-0.25 px-1.5":
|
|
647
|
-
"py-0.5 px-1.5":
|
|
637
|
+
"px-1 text-sm": r === "sm",
|
|
638
|
+
"py-0.25 px-1.5": r === "md",
|
|
639
|
+
"py-0.5 px-1.5": r === "lg"
|
|
648
640
|
}
|
|
649
641
|
),
|
|
650
642
|
style: {
|
|
651
|
-
backgroundColor:
|
|
652
|
-
color:
|
|
643
|
+
backgroundColor: t,
|
|
644
|
+
color: it(t) ? "#000" : "#fff"
|
|
653
645
|
},
|
|
654
646
|
onClick: (o) => o.stopPropagation(),
|
|
655
647
|
children: [
|
|
656
648
|
e,
|
|
657
|
-
/* @__PURE__ */ a(
|
|
649
|
+
/* @__PURE__ */ a(Q, { label: `Remove ${e}`, solid: !0, size: "sm", onClick: () => n(e) })
|
|
658
650
|
]
|
|
659
651
|
}
|
|
660
652
|
)
|
|
661
|
-
),
|
|
653
|
+
), te = "#99a1af", ar = ({
|
|
662
654
|
tags: e,
|
|
663
|
-
selectedTags:
|
|
664
|
-
onTagsChange:
|
|
655
|
+
selectedTags: t = [],
|
|
656
|
+
onTagsChange: r,
|
|
665
657
|
getColorForTag: n,
|
|
666
658
|
searchMode: o = "startsWith",
|
|
667
659
|
immutable: s = !1,
|
|
668
660
|
size: l = "md",
|
|
669
661
|
disabled: i,
|
|
670
|
-
containerClassName:
|
|
671
|
-
...
|
|
662
|
+
containerClassName: d,
|
|
663
|
+
...p
|
|
672
664
|
}) => {
|
|
673
|
-
const { searchResults:
|
|
665
|
+
const { searchResults: f, onSearch: b } = ft({ tags: e, selectedTags: t, searchMode: o, allowAdding: !s }), x = w((m) => {
|
|
674
666
|
const y = (m.match(/Add\s+"([^"]+)"\s+tag/)?.[1] ?? m).split(",").map(ce);
|
|
675
|
-
|
|
676
|
-
}, [
|
|
677
|
-
(m) =>
|
|
678
|
-
[
|
|
679
|
-
),
|
|
667
|
+
r?.([.../* @__PURE__ */ new Set([...t, ...y])]);
|
|
668
|
+
}, [r, t]), h = w(
|
|
669
|
+
(m) => r?.(t.filter((k) => k !== m)),
|
|
670
|
+
[r, t]
|
|
671
|
+
), u = v(null);
|
|
680
672
|
return (
|
|
681
673
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
682
674
|
/* @__PURE__ */ g(
|
|
683
675
|
"div",
|
|
684
676
|
{
|
|
685
|
-
className:
|
|
677
|
+
className: c(
|
|
686
678
|
"rounded-md flex flex-wrap gap-1",
|
|
687
679
|
"border border-lm-input-border dark:border-dm-input-border",
|
|
688
680
|
"cursor-text focus-within:focus-within-ring",
|
|
@@ -695,24 +687,24 @@ const at = k(ot), st = ({ name: e, color: r }) => /* @__PURE__ */ g("div", { cla
|
|
|
695
687
|
// Use different background color when rendered inside a card
|
|
696
688
|
"group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input": !i
|
|
697
689
|
},
|
|
698
|
-
|
|
690
|
+
d
|
|
699
691
|
),
|
|
700
692
|
onClick: (m) => {
|
|
701
|
-
m.target !==
|
|
693
|
+
m.target !== u.current && u.current?.focus();
|
|
702
694
|
},
|
|
703
695
|
children: [
|
|
704
|
-
/* @__PURE__ */ a("ul", { className: "m-0 p-0 flex flex-wrap gap-1", children:
|
|
705
|
-
const y = n?.(m) ??
|
|
706
|
-
return /* @__PURE__ */ a(
|
|
696
|
+
/* @__PURE__ */ a("ul", { className: "m-0 p-0 flex flex-wrap gap-1", children: t.map((m, k) => {
|
|
697
|
+
const y = n?.(m) ?? te;
|
|
698
|
+
return /* @__PURE__ */ a(st, { tag: m, color: y, onRemove: h, size: l }, `${m}${k}`);
|
|
707
699
|
}) }),
|
|
708
700
|
/* @__PURE__ */ a(
|
|
709
|
-
|
|
701
|
+
ot,
|
|
710
702
|
{
|
|
711
703
|
variant: "unstyled",
|
|
712
704
|
listboxSpan: "auto",
|
|
713
705
|
containerClassName: "flex items-center",
|
|
714
706
|
listboxClassName: "whitespace-nowrap",
|
|
715
|
-
inputClassName:
|
|
707
|
+
inputClassName: c(
|
|
716
708
|
"no-clear-button",
|
|
717
709
|
{
|
|
718
710
|
"px-1 text-sm": l === "sm",
|
|
@@ -720,75 +712,74 @@ const at = k(ot), st = ({ name: e, color: r }) => /* @__PURE__ */ g("div", { cla
|
|
|
720
712
|
"px-3 text-xl": l === "lg"
|
|
721
713
|
}
|
|
722
714
|
),
|
|
723
|
-
searchResults:
|
|
724
|
-
onSearch:
|
|
725
|
-
onSelectSearchResult:
|
|
726
|
-
renderSearchResult: (m) => m.match(/Add\s+"([^"]+)"\s+tag/) ? m : /* @__PURE__ */ a(
|
|
715
|
+
searchResults: f,
|
|
716
|
+
onSearch: b,
|
|
717
|
+
onSelectSearchResult: x,
|
|
718
|
+
renderSearchResult: (m) => m.match(/Add\s+"([^"]+)"\s+tag/) ? m : /* @__PURE__ */ a(at, { name: m, color: n?.(m) ?? te }),
|
|
727
719
|
onKeyDown: (m) => {
|
|
728
|
-
m.key === "Backspace" && !
|
|
720
|
+
m.key === "Backspace" && !f && h(t[t.length - 1]);
|
|
729
721
|
},
|
|
730
722
|
size: l,
|
|
731
723
|
disabled: i,
|
|
732
|
-
ref:
|
|
724
|
+
ref: u,
|
|
733
725
|
immediate: !0,
|
|
734
|
-
...
|
|
726
|
+
...p
|
|
735
727
|
}
|
|
736
728
|
)
|
|
737
729
|
]
|
|
738
730
|
}
|
|
739
731
|
)
|
|
740
732
|
);
|
|
741
|
-
},
|
|
742
|
-
|
|
733
|
+
}, sr = ({ className: e, ...t }) => /* @__PURE__ */ a(
|
|
734
|
+
ie,
|
|
743
735
|
{
|
|
744
|
-
|
|
745
|
-
className: d(
|
|
736
|
+
className: c(
|
|
746
737
|
"rounded-full min-w-8 w-8 h-4",
|
|
747
738
|
"bg-(image:--circle-grey-dark) dark:bg-(image:--circle-grey-light) checked:bg-(image:--circle-white)",
|
|
748
739
|
"focus-visible:not-checked:bg-(image:--circle-blue-light)",
|
|
749
740
|
"checked:bg-right transition-[background-position]",
|
|
750
741
|
e
|
|
751
742
|
),
|
|
752
|
-
...
|
|
743
|
+
...t
|
|
753
744
|
}
|
|
754
|
-
)
|
|
755
|
-
function
|
|
756
|
-
const s =
|
|
757
|
-
const
|
|
758
|
-
return n &&
|
|
759
|
-
}, [o, n]), l =
|
|
760
|
-
const
|
|
761
|
-
return n &&
|
|
762
|
-
}, [o, n]), i =
|
|
763
|
-
|
|
764
|
-
const
|
|
765
|
-
if (!
|
|
745
|
+
);
|
|
746
|
+
function de(e, { elementsSelector: t, focusFirstItem: r = !1, vertical: n = !0, horizontal: o = !0 }) {
|
|
747
|
+
const s = L(() => {
|
|
748
|
+
const d = [];
|
|
749
|
+
return n && d.push("ArrowDown"), o && d.push("ArrowRight"), d;
|
|
750
|
+
}, [o, n]), l = L(() => {
|
|
751
|
+
const d = [];
|
|
752
|
+
return n && d.push("ArrowUp"), o && d.push("ArrowLeft"), d;
|
|
753
|
+
}, [o, n]), i = L(() => [...s, ...l], [s, l]);
|
|
754
|
+
O(() => {
|
|
755
|
+
const d = e.current;
|
|
756
|
+
if (!d)
|
|
766
757
|
return () => {
|
|
767
758
|
};
|
|
768
|
-
const
|
|
769
|
-
return
|
|
770
|
-
h.tabIndex =
|
|
771
|
-
}),
|
|
759
|
+
const p = new AbortController(), f = () => [...d.querySelectorAll(t)], b = f(), x = Math.max(b.findIndex((h) => h.dataset.selected === "true"), 0);
|
|
760
|
+
return b.forEach((h, u) => {
|
|
761
|
+
h.tabIndex = u === x ? 0 : -1, r && u === x && h.focus();
|
|
762
|
+
}), d.addEventListener("keydown", (h) => {
|
|
772
763
|
if (!i.includes(h.key))
|
|
773
764
|
return;
|
|
774
765
|
h.preventDefault();
|
|
775
|
-
const
|
|
776
|
-
|
|
766
|
+
const u = f(), m = u.findIndex((y) => y.tabIndex === 0), k = s.includes(h.key) ? u[m + 1] ?? u[0] : u[m - 1] ?? u[u.length - 1];
|
|
767
|
+
u.forEach((y) => {
|
|
777
768
|
y.tabIndex = -1;
|
|
778
|
-
}),
|
|
779
|
-
}, { signal:
|
|
780
|
-
}, [i, e,
|
|
769
|
+
}), k.tabIndex = 0, k.focus();
|
|
770
|
+
}, { signal: p.signal }), () => p.abort();
|
|
771
|
+
}, [i, e, t, r, s]);
|
|
781
772
|
}
|
|
782
|
-
const
|
|
773
|
+
const lr = () => {
|
|
783
774
|
const e = ke();
|
|
784
775
|
return w(() => e(-1), [e]);
|
|
785
|
-
},
|
|
786
|
-
function
|
|
787
|
-
const [
|
|
788
|
-
return Math.round(Math.sqrt(0.299 *
|
|
776
|
+
}, lt = 128;
|
|
777
|
+
function it(e) {
|
|
778
|
+
const [t, r, n] = (e.match(/../g) ?? []).map((s) => parseInt(s, 16) || 0);
|
|
779
|
+
return Math.round(Math.sqrt(0.299 * t ** 2 + 0.587 * r ** 2 + 0.114 * n ** 2)) >= lt;
|
|
789
780
|
}
|
|
790
|
-
const
|
|
791
|
-
const [l, i] =
|
|
781
|
+
const ir = ({ text: e, className: t, size: r = "lg", initialCopied: n = !1, navigator_: o = globalThis.navigator, ...s }) => {
|
|
782
|
+
const [l, i] = yt({ initialValue: n }), d = w(
|
|
792
783
|
() => o.clipboard.writeText(e).then(i),
|
|
793
784
|
[o.clipboard, e, i]
|
|
794
785
|
);
|
|
@@ -796,244 +787,246 @@ const cr = ({ text: e, className: r, size: t = "lg", initialCopied: n = !1, navi
|
|
|
796
787
|
"button",
|
|
797
788
|
{
|
|
798
789
|
type: "button",
|
|
799
|
-
className:
|
|
790
|
+
className: c(
|
|
800
791
|
"focus-ring rounded-sm cursor-pointer",
|
|
801
792
|
{
|
|
802
|
-
"text-md":
|
|
803
|
-
"text-lg":
|
|
804
|
-
"text-xl":
|
|
793
|
+
"text-md": r === "sm",
|
|
794
|
+
"text-lg": r === "md",
|
|
795
|
+
"text-xl": r === "lg"
|
|
805
796
|
},
|
|
806
|
-
|
|
797
|
+
t
|
|
807
798
|
),
|
|
808
799
|
"aria-label": `Copy ${e} to clipboard`,
|
|
809
800
|
title: "Copy to clipboard",
|
|
810
|
-
onClick:
|
|
801
|
+
onClick: d,
|
|
811
802
|
...s,
|
|
812
803
|
children: /* @__PURE__ */ a(N, { icon: l ? Ie : je })
|
|
813
804
|
}
|
|
814
805
|
);
|
|
815
|
-
},
|
|
816
|
-
const
|
|
817
|
-
return
|
|
806
|
+
}, dt = (e) => {
|
|
807
|
+
const t = new URLSearchParams(e), r = {};
|
|
808
|
+
return t.forEach((n, o) => {
|
|
818
809
|
if (o.endsWith("[]")) {
|
|
819
810
|
const s = o.slice(0, -2);
|
|
820
|
-
|
|
811
|
+
r[s] ??= [], r[s].push(n);
|
|
821
812
|
} else
|
|
822
|
-
|
|
823
|
-
}),
|
|
824
|
-
},
|
|
825
|
-
const
|
|
826
|
-
for (const [
|
|
827
|
-
n !== void 0 && (Array.isArray(n) ? n.forEach((o) =>
|
|
828
|
-
return
|
|
829
|
-
},
|
|
830
|
-
const { search: e } =
|
|
831
|
-
return
|
|
832
|
-
},
|
|
833
|
-
const
|
|
834
|
-
Math.max(
|
|
835
|
-
Math.min(
|
|
813
|
+
r[o] = n;
|
|
814
|
+
}), r;
|
|
815
|
+
}, dr = (e) => {
|
|
816
|
+
const t = new URLSearchParams();
|
|
817
|
+
for (const [r, n] of Object.entries(e))
|
|
818
|
+
n !== void 0 && (Array.isArray(n) ? n.forEach((o) => t.append(`${r}[]`, `${o}`)) : t.append(r, `${n}`));
|
|
819
|
+
return t.toString();
|
|
820
|
+
}, cr = () => {
|
|
821
|
+
const { search: e } = ne();
|
|
822
|
+
return L(() => dt(e), [e]);
|
|
823
|
+
}, ct = /\s+/g, ce = (e) => e.trim().toLowerCase().replace(ct, "-"), mt = new Intl.NumberFormat("en-US"), ut = (e) => mt.format(Number(e)), re = 10, mr = (e) => Math.ceil(e / re) * re, S = 2, U = "...", pt = (e, t) => Array.from({ length: t - e }, (r, n) => e + n), gt = (e, t) => {
|
|
824
|
+
const r = pt(
|
|
825
|
+
Math.max(S, e - S),
|
|
826
|
+
Math.min(t - 1, e + S) + 1
|
|
836
827
|
);
|
|
837
|
-
return e -
|
|
838
|
-
},
|
|
839
|
-
function
|
|
840
|
-
const [s, l] =
|
|
841
|
-
const
|
|
842
|
-
if (!
|
|
828
|
+
return e - S > S && r.unshift(U), e + S < t - 1 && r.push(U), r.unshift(1), r.push(t), r;
|
|
829
|
+
}, _ = (e) => e === U, bt = (e) => _(e) ? e : ut(e), ht = (e, t) => _(e) ? `${e}_${t}` : `${e}`;
|
|
830
|
+
function ft({ tags: e, selectedTags: t, searchMode: r, searchLimit: n = 5, allowAdding: o = !1 }) {
|
|
831
|
+
const [s, l] = R(), i = w((d) => {
|
|
832
|
+
const p = d.toLowerCase().trim();
|
|
833
|
+
if (!p) {
|
|
843
834
|
l(void 0);
|
|
844
835
|
return;
|
|
845
836
|
}
|
|
846
|
-
const
|
|
847
|
-
o &&
|
|
848
|
-
}, [o, n,
|
|
837
|
+
const f = e.filter((b) => t.includes(b) ? !1 : b.toLowerCase()[r](p)).slice(0, n);
|
|
838
|
+
o && f.push(`Add "${p.split(",").map(ce).join(",")}" tag`), l(new Map(f.map((b) => [b, b])));
|
|
839
|
+
}, [o, n, r, t, e]);
|
|
849
840
|
return { searchResults: s, onSearch: i };
|
|
850
841
|
}
|
|
851
|
-
function me(e,
|
|
852
|
-
const n =
|
|
853
|
-
n.current &&
|
|
854
|
-
}, [
|
|
855
|
-
o(), n.current =
|
|
842
|
+
function me(e, t = globalThis.setTimeout, r = globalThis.clearTimeout) {
|
|
843
|
+
const n = v(null), o = w(() => {
|
|
844
|
+
n.current && r(n.current);
|
|
845
|
+
}, [r]), s = w((l, i) => {
|
|
846
|
+
o(), n.current = t(() => {
|
|
856
847
|
l(), n.current = null;
|
|
857
848
|
}, i ?? e);
|
|
858
|
-
}, [o, e,
|
|
859
|
-
return
|
|
849
|
+
}, [o, e, t]);
|
|
850
|
+
return O(() => o, [o]), L(
|
|
860
851
|
() => ({ setTimeout: s, clearCurrentTimeout: o }),
|
|
861
852
|
[o, s]
|
|
862
853
|
);
|
|
863
854
|
}
|
|
864
|
-
const
|
|
865
|
-
const { setTimeout: o } = me(
|
|
855
|
+
const xt = 2e3, yt = ({ initialValue: e = !1, delay: t = xt } = {}, r = globalThis.setTimeout, n = globalThis.clearTimeout) => {
|
|
856
|
+
const { setTimeout: o } = me(t, r, n), [s, l] = R(e), i = v(e), d = w(() => {
|
|
866
857
|
l(!i.current), o(() => l(i.current));
|
|
867
858
|
}, [o]);
|
|
868
|
-
return [s,
|
|
859
|
+
return [s, d];
|
|
869
860
|
};
|
|
870
861
|
function ue(e = !1) {
|
|
871
|
-
const [
|
|
872
|
-
return { flag:
|
|
862
|
+
const [t, r] = R(e), n = w(() => r((l) => !l), []), o = w(() => r(!0), []), s = w(() => r(!1), []);
|
|
863
|
+
return { flag: t, toggle: n, setToTrue: o, setToFalse: s };
|
|
873
864
|
}
|
|
874
|
-
const pe =
|
|
875
|
-
const s = "to" in o && typeof o.to == "string", l = s ?
|
|
865
|
+
const pe = G({}), wt = ({ className: e, selected: t, disabled: r, onClick: n, ...o }) => {
|
|
866
|
+
const s = "to" in o && typeof o.to == "string", l = s ? K : "button", { onItemClick: i } = P(pe);
|
|
876
867
|
return (
|
|
877
868
|
// @ts-expect-error The Tag is inferred from provided props, so they should always match
|
|
878
869
|
/* @__PURE__ */ a(
|
|
879
870
|
l,
|
|
880
871
|
{
|
|
881
872
|
role: "menuitem",
|
|
882
|
-
"data-selected":
|
|
883
|
-
className:
|
|
873
|
+
"data-selected": t,
|
|
874
|
+
className: c(
|
|
884
875
|
"flex items-center gap-2",
|
|
885
876
|
"w-full px-3 py-1.5 focus-ring",
|
|
886
877
|
// Overwrite link styles in case a Link is being used
|
|
887
878
|
"no-underline text-inherit",
|
|
888
879
|
{
|
|
889
|
-
"cursor-pointer": !
|
|
890
|
-
"pointer-events-none opacity-50":
|
|
891
|
-
"bg-lm-secondary dark:bg-dm-secondary":
|
|
892
|
-
"highlight:bg-lm-secondary dark:highlight:bg-dm-secondary highlight:z-1 relative": !
|
|
880
|
+
"cursor-pointer": !r,
|
|
881
|
+
"pointer-events-none opacity-50": r,
|
|
882
|
+
"bg-lm-secondary dark:bg-dm-secondary": t && !r,
|
|
883
|
+
"highlight:bg-lm-secondary dark:highlight:bg-dm-secondary highlight:z-1 relative": !t && !r
|
|
893
884
|
},
|
|
894
885
|
e
|
|
895
886
|
),
|
|
896
887
|
tabIndex: -1,
|
|
897
|
-
disabled: s ? void 0 :
|
|
898
|
-
"aria-disabled": s ?
|
|
888
|
+
disabled: s ? void 0 : r,
|
|
889
|
+
"aria-disabled": s ? r : void 0,
|
|
899
890
|
type: s ? void 0 : "button",
|
|
900
|
-
onClick: (
|
|
901
|
-
n?.(
|
|
891
|
+
onClick: (d) => {
|
|
892
|
+
n?.(d), i?.();
|
|
902
893
|
},
|
|
903
894
|
...o
|
|
904
895
|
}
|
|
905
896
|
)
|
|
906
897
|
);
|
|
907
|
-
},
|
|
898
|
+
}, kt = () => (
|
|
908
899
|
// TODO Use an <hr /> tag once tailwind styles are not set with !important
|
|
909
900
|
/* @__PURE__ */ a("div", { role: "separator", "aria-hidden": !0, className: "border-b border-lm-border dark:border-dm-border my-2" })
|
|
910
|
-
),
|
|
901
|
+
), vt = ({ children: e }) => /* @__PURE__ */ a(
|
|
911
902
|
"div",
|
|
912
903
|
{
|
|
913
904
|
role: "heading",
|
|
914
905
|
"aria-level": 6,
|
|
915
906
|
"aria-hidden": !0,
|
|
916
|
-
className:
|
|
907
|
+
className: c(
|
|
917
908
|
"flex items-center w-full px-3 py-1.5",
|
|
918
909
|
"text-gray-500 text-sm font-semibold"
|
|
919
910
|
),
|
|
920
|
-
onClick: (
|
|
911
|
+
onClick: (t) => t.stopPropagation(),
|
|
921
912
|
children: e
|
|
922
913
|
}
|
|
923
|
-
),
|
|
914
|
+
), Nt = ({ className: e, ...t }) => /* @__PURE__ */ a("div", { className: c("px-3 py-1.5", e), ...t }), Ct = ({
|
|
924
915
|
children: e,
|
|
925
|
-
className:
|
|
926
|
-
focusableElementsSelector:
|
|
916
|
+
className: t,
|
|
917
|
+
focusableElementsSelector: r = '[role="menuitem"]:not([disabled]):not([aria-disabled])',
|
|
927
918
|
focusFirstItem: n = !1,
|
|
928
919
|
onItemClick: o,
|
|
929
920
|
...s
|
|
930
921
|
}) => {
|
|
931
|
-
const l =
|
|
932
|
-
return
|
|
933
|
-
},
|
|
922
|
+
const l = v(null);
|
|
923
|
+
return de(l, { elementsSelector: r, focusFirstItem: n }), /* @__PURE__ */ a(A, { ref: l, role: "menu", className: c("py-2 whitespace-nowrap", t), ...s, children: /* @__PURE__ */ a(pe.Provider, { value: { onItemClick: o }, children: e }) });
|
|
924
|
+
}, M = Object.assign(Ct, { Item: wt, Separator: kt, Title: vt, Misc: Nt }), Tt = ({
|
|
934
925
|
children: e,
|
|
935
|
-
menuAlignment:
|
|
936
|
-
buttonVariant:
|
|
926
|
+
menuAlignment: t = "left",
|
|
927
|
+
buttonVariant: r = "button",
|
|
937
928
|
buttonContent: n,
|
|
938
929
|
buttonClassName: o,
|
|
939
930
|
buttonSize: s = "md",
|
|
940
931
|
buttonDisabled: l = !1,
|
|
941
932
|
containerClassName: i,
|
|
942
|
-
menuClassName:
|
|
943
|
-
caretless:
|
|
944
|
-
buttonLabel:
|
|
945
|
-
menuOffset:
|
|
933
|
+
menuClassName: d,
|
|
934
|
+
caretless: p,
|
|
935
|
+
buttonLabel: f,
|
|
936
|
+
menuOffset: b = 3
|
|
946
937
|
}) => {
|
|
947
|
-
const [
|
|
948
|
-
|
|
938
|
+
const [x, h] = R(!1), u = v(null), m = w(({ focusButton: T = !0 } = {}) => {
|
|
939
|
+
h(!1), T && u.current?.focus();
|
|
940
|
+
}, []), { refs: k, floatingStyles: y, context: W } = ae({
|
|
941
|
+
open: x,
|
|
949
942
|
onOpenChange: h,
|
|
950
|
-
placement:
|
|
951
|
-
middleware: [De(), Me(
|
|
943
|
+
placement: t === "right" ? "bottom-end" : "bottom-start",
|
|
944
|
+
middleware: [De(), Me(b)],
|
|
952
945
|
// eslint-disable-next-line react-compiler/react-compiler
|
|
953
|
-
elements: { reference:
|
|
954
|
-
}),
|
|
955
|
-
|
|
956
|
-
]),
|
|
957
|
-
return
|
|
958
|
-
const
|
|
959
|
-
if (!
|
|
946
|
+
elements: { reference: u.current }
|
|
947
|
+
}), C = _e(W), { getReferenceProps: H, getFloatingProps: $ } = se([
|
|
948
|
+
C
|
|
949
|
+
]), j = E(), q = v(null);
|
|
950
|
+
return O(() => {
|
|
951
|
+
const T = q.current;
|
|
952
|
+
if (!T || !x)
|
|
960
953
|
return () => {
|
|
961
954
|
};
|
|
962
|
-
const
|
|
955
|
+
const V = new AbortController();
|
|
963
956
|
return document.body.addEventListener("click", (ye) => {
|
|
964
|
-
ye.composedPath().includes(
|
|
965
|
-
}, { signal:
|
|
966
|
-
}, [
|
|
957
|
+
ye.composedPath().includes(T) || m();
|
|
958
|
+
}, { signal: V.signal }), () => V.abort();
|
|
959
|
+
}, [m, x]), // eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
967
960
|
/* @__PURE__ */ g(
|
|
968
961
|
"div",
|
|
969
962
|
{
|
|
970
|
-
ref:
|
|
971
|
-
className:
|
|
972
|
-
onKeyDown: (
|
|
973
|
-
|
|
963
|
+
ref: q,
|
|
964
|
+
className: c("relative inline-block", i),
|
|
965
|
+
onKeyDown: (T) => {
|
|
966
|
+
T.key === "Escape" && m();
|
|
974
967
|
},
|
|
975
|
-
onBlur: (
|
|
976
|
-
|
|
968
|
+
onBlur: (T) => {
|
|
969
|
+
T.relatedTarget && !q.current.contains(T.relatedTarget) && m({ focusButton: !1 });
|
|
977
970
|
},
|
|
978
971
|
children: [
|
|
979
972
|
/* @__PURE__ */ g(
|
|
980
973
|
"button",
|
|
981
974
|
{
|
|
982
|
-
ref:
|
|
983
|
-
|
|
975
|
+
ref: u,
|
|
976
|
+
...H(),
|
|
984
977
|
type: "button",
|
|
985
978
|
"aria-haspopup": !0,
|
|
986
|
-
"aria-expanded":
|
|
987
|
-
"aria-controls":
|
|
988
|
-
"aria-label":
|
|
979
|
+
"aria-expanded": x,
|
|
980
|
+
"aria-controls": j,
|
|
981
|
+
"aria-label": f,
|
|
989
982
|
disabled: l,
|
|
990
|
-
className:
|
|
983
|
+
className: c(
|
|
991
984
|
"flex items-center rounded-md focus-ring",
|
|
992
985
|
{
|
|
993
|
-
"justify-between": !
|
|
986
|
+
"justify-between": !p,
|
|
994
987
|
"cursor-pointer": !l,
|
|
995
988
|
"pointer-events-none opacity-50": l,
|
|
996
989
|
// Button variant
|
|
997
|
-
"border border-lm-border dark:border-dm-border":
|
|
998
|
-
"bg-lm-primary dark:bg-dm-primary":
|
|
990
|
+
"border border-lm-border dark:border-dm-border": r === "button",
|
|
991
|
+
"bg-lm-primary dark:bg-dm-primary": r === "button",
|
|
999
992
|
// Use different bg color when inside a card
|
|
1000
|
-
"group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":
|
|
993
|
+
"group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input": r === "button",
|
|
1001
994
|
// Link variant
|
|
1002
|
-
"text-lm-brand dark:text-dm-brand":
|
|
1003
|
-
"highlight:text-lm-brand-dark dark:highlight:text-dm-brand-dark highlight:underline":
|
|
995
|
+
"text-lm-brand dark:text-dm-brand": r === "link",
|
|
996
|
+
"highlight:text-lm-brand-dark dark:highlight:text-dm-brand-dark highlight:underline": r === "link",
|
|
1004
997
|
// Button sizes
|
|
1005
|
-
"px-1.5 py-1 text-sm":
|
|
1006
|
-
"px-3 py-1.5":
|
|
1007
|
-
"px-4 py-2 text-lg":
|
|
998
|
+
"px-1.5 py-1 text-sm": r !== "text" && s === "sm",
|
|
999
|
+
"px-3 py-1.5": r !== "text" && s === "md",
|
|
1000
|
+
"px-4 py-2 text-lg": r !== "text" && s === "lg",
|
|
1008
1001
|
"gap-x-1.5": s === "sm",
|
|
1009
1002
|
"gap-x-2": s !== "sm"
|
|
1010
1003
|
},
|
|
1011
1004
|
o
|
|
1012
1005
|
),
|
|
1013
|
-
onKeyDown: (
|
|
1014
|
-
|
|
1006
|
+
onKeyDown: (T) => {
|
|
1007
|
+
T.key === "ArrowDown" && (T.preventDefault(), h(!0));
|
|
1015
1008
|
},
|
|
1016
1009
|
children: [
|
|
1017
1010
|
n,
|
|
1018
|
-
!
|
|
1011
|
+
!p && /* @__PURE__ */ a(N, { icon: Oe, size: "xs", widthAuto: !0 })
|
|
1019
1012
|
]
|
|
1020
1013
|
}
|
|
1021
1014
|
),
|
|
1022
|
-
|
|
1015
|
+
x && /* @__PURE__ */ a(
|
|
1023
1016
|
"div",
|
|
1024
1017
|
{
|
|
1025
|
-
ref:
|
|
1018
|
+
ref: k.setFloating,
|
|
1026
1019
|
style: y,
|
|
1027
1020
|
className: "min-w-full z-500",
|
|
1028
|
-
|
|
1021
|
+
...$(),
|
|
1029
1022
|
children: /* @__PURE__ */ a(
|
|
1030
|
-
|
|
1023
|
+
M,
|
|
1031
1024
|
{
|
|
1032
|
-
className:
|
|
1033
|
-
id:
|
|
1025
|
+
className: d,
|
|
1026
|
+
id: j,
|
|
1034
1027
|
focusableElementsSelector: '[role="menuitem"]:not([disabled]):not([aria-disabled]),input:not([disabled]),select:not([disabled])',
|
|
1035
1028
|
focusFirstItem: !0,
|
|
1036
|
-
onItemClick:
|
|
1029
|
+
onItemClick: m,
|
|
1037
1030
|
children: e
|
|
1038
1031
|
}
|
|
1039
1032
|
)
|
|
@@ -1042,53 +1035,52 @@ const pe = K({}), vt = ({ className: e, selected: r, disabled: t, onClick: n, ..
|
|
|
1042
1035
|
]
|
|
1043
1036
|
}
|
|
1044
1037
|
);
|
|
1045
|
-
},
|
|
1046
|
-
Item:
|
|
1047
|
-
Separator:
|
|
1048
|
-
Title:
|
|
1049
|
-
Misc:
|
|
1050
|
-
}),
|
|
1038
|
+
}, I = Object.assign(Tt, {
|
|
1039
|
+
Item: M.Item,
|
|
1040
|
+
Separator: M.Separator,
|
|
1041
|
+
Title: M.Title,
|
|
1042
|
+
Misc: M.Misc
|
|
1043
|
+
}), At = ({ className: e, disabled: t, size: r = "md", type: n = "button", ...o }) => /* @__PURE__ */ a(
|
|
1051
1044
|
"button",
|
|
1052
1045
|
{
|
|
1053
|
-
className:
|
|
1046
|
+
className: c(
|
|
1054
1047
|
"inline-flex rounded-md focus-ring",
|
|
1055
1048
|
"text-lm-brand dark:text-dm-brand",
|
|
1056
1049
|
"highlight:text-lm-brand-dark dark:highlight:text-dm-brand-dark highlight:underline",
|
|
1057
1050
|
{
|
|
1058
|
-
"px-1.5 py-1 text-sm":
|
|
1059
|
-
"px-3 py-1.5":
|
|
1060
|
-
"px-4 py-2 text-lg":
|
|
1061
|
-
"cursor-pointer": !
|
|
1062
|
-
"pointer-events-none opacity-65":
|
|
1051
|
+
"px-1.5 py-1 text-sm": r === "sm",
|
|
1052
|
+
"px-3 py-1.5": r === "md",
|
|
1053
|
+
"px-4 py-2 text-lg": r === "lg",
|
|
1054
|
+
"cursor-pointer": !t,
|
|
1055
|
+
"pointer-events-none opacity-65": t
|
|
1063
1056
|
},
|
|
1064
1057
|
e
|
|
1065
1058
|
),
|
|
1066
|
-
disabled:
|
|
1059
|
+
disabled: t,
|
|
1067
1060
|
type: n,
|
|
1068
|
-
...o
|
|
1069
|
-
ref: s
|
|
1061
|
+
...o
|
|
1070
1062
|
}
|
|
1071
|
-
)
|
|
1072
|
-
|
|
1063
|
+
), It = ({ className: e, active: t, ...r }) => /* @__PURE__ */ a("li", { role: "menuitem", className: "w-full flex", "data-active": t, children: /* @__PURE__ */ a(
|
|
1064
|
+
K,
|
|
1073
1065
|
{
|
|
1074
|
-
className:
|
|
1066
|
+
className: c(
|
|
1075
1067
|
"px-2 py-3",
|
|
1076
1068
|
"max-md:w-full max-md:px-3 max-md:py-2",
|
|
1077
1069
|
"text-white no-underline highlight:opacity-100 transition-opacity",
|
|
1078
1070
|
{
|
|
1079
|
-
"opacity-60": !
|
|
1080
|
-
"opacity-100":
|
|
1071
|
+
"opacity-60": !t,
|
|
1072
|
+
"opacity-100": t
|
|
1081
1073
|
},
|
|
1082
1074
|
e
|
|
1083
1075
|
),
|
|
1084
|
-
...
|
|
1076
|
+
...r
|
|
1085
1077
|
}
|
|
1086
|
-
) }),
|
|
1087
|
-
|
|
1078
|
+
) }), Ot = ({ containerClassName: e, buttonClassName: t, menuClassName: r, active: n, ...o }) => /* @__PURE__ */ a("li", { role: "menuitem", "aria-haspopup": !0, className: "w-full flex", "data-active": n, children: /* @__PURE__ */ a(
|
|
1079
|
+
I,
|
|
1088
1080
|
{
|
|
1089
|
-
containerClassName:
|
|
1081
|
+
containerClassName: c("max-md:w-full", e),
|
|
1090
1082
|
buttonVariant: "text",
|
|
1091
|
-
buttonClassName:
|
|
1083
|
+
buttonClassName: c(
|
|
1092
1084
|
"px-2 py-3",
|
|
1093
1085
|
"max-md:w-full max-md:px-3 max-md:py-2",
|
|
1094
1086
|
"text-white highlight:opacity-100 transition-opacity",
|
|
@@ -1096,19 +1088,19 @@ const pe = K({}), vt = ({ className: e, selected: r, disabled: t, onClick: n, ..
|
|
|
1096
1088
|
"opacity-60": !n,
|
|
1097
1089
|
"opacity-100": n
|
|
1098
1090
|
},
|
|
1099
|
-
|
|
1091
|
+
t
|
|
1100
1092
|
),
|
|
1101
1093
|
menuAlignment: "right",
|
|
1102
1094
|
menuOffset: -3,
|
|
1103
|
-
menuClassName:
|
|
1095
|
+
menuClassName: c("mx-2", r),
|
|
1104
1096
|
...o
|
|
1105
1097
|
}
|
|
1106
|
-
) }),
|
|
1107
|
-
const { flag: n, toggle: o, setToFalse: s } = ue(), l =
|
|
1108
|
-
return
|
|
1098
|
+
) }), Rt = ({ className: e, brand: t, children: r }) => {
|
|
1099
|
+
const { flag: n, toggle: o, setToFalse: s } = ue(), l = E(), i = E(), { pathname: d } = ne();
|
|
1100
|
+
return O(() => s(), [d, s]), /* @__PURE__ */ g(
|
|
1109
1101
|
"nav",
|
|
1110
1102
|
{
|
|
1111
|
-
className:
|
|
1103
|
+
className: c(
|
|
1112
1104
|
"w-full relative",
|
|
1113
1105
|
"bg-lm-main dark:bg-dm-main",
|
|
1114
1106
|
"flex max-md:flex-col items-center justify-between",
|
|
@@ -1119,19 +1111,19 @@ const pe = K({}), vt = ({ className: e, selected: r, disabled: t, onClick: n, ..
|
|
|
1119
1111
|
/* @__PURE__ */ a(
|
|
1120
1112
|
"h4",
|
|
1121
1113
|
{
|
|
1122
|
-
className:
|
|
1114
|
+
className: c(
|
|
1123
1115
|
"text-white px-4 py-3",
|
|
1124
1116
|
"max-md:w-full max-md:flex max-md:flex-col items-center"
|
|
1125
1117
|
),
|
|
1126
|
-
children:
|
|
1118
|
+
children: t
|
|
1127
1119
|
}
|
|
1128
1120
|
),
|
|
1129
1121
|
/* @__PURE__ */ a(
|
|
1130
|
-
|
|
1122
|
+
le,
|
|
1131
1123
|
{
|
|
1132
1124
|
id: i,
|
|
1133
1125
|
variant: "secondary",
|
|
1134
|
-
className:
|
|
1126
|
+
className: c(
|
|
1135
1127
|
"absolute right-0 top-[50%] translate-y-[-50%]",
|
|
1136
1128
|
"md:hidden mx-2 [&]:px-2",
|
|
1137
1129
|
"opacity-60 highlight:opacity-100 transition-opacity",
|
|
@@ -1150,27 +1142,27 @@ const pe = K({}), vt = ({ className: e, selected: r, disabled: t, onClick: n, ..
|
|
|
1150
1142
|
id: l,
|
|
1151
1143
|
"aria-labelledby": i,
|
|
1152
1144
|
role: "menu",
|
|
1153
|
-
className:
|
|
1145
|
+
className: c(
|
|
1154
1146
|
"m-0 p-0",
|
|
1155
1147
|
"max-md:w-full md:mr-2 max-md:absolute max-md:top-full z-2000",
|
|
1156
1148
|
"flex max-md:flex-col items-center",
|
|
1157
1149
|
"bg-lm-main dark:bg-dm-main",
|
|
1158
1150
|
{ "max-md:hidden": !n }
|
|
1159
1151
|
),
|
|
1160
|
-
children:
|
|
1152
|
+
children: r
|
|
1161
1153
|
}
|
|
1162
1154
|
)
|
|
1163
1155
|
]
|
|
1164
1156
|
}
|
|
1165
1157
|
);
|
|
1166
|
-
},
|
|
1167
|
-
const n =
|
|
1158
|
+
}, ur = Object.assign(Rt, { MenuItem: It, Dropdown: Ot }), ge = G(null), Lt = ({ className: e, to: t, ...r }) => {
|
|
1159
|
+
const n = P(ge);
|
|
1168
1160
|
return /* @__PURE__ */ a(
|
|
1169
1161
|
ve,
|
|
1170
1162
|
{
|
|
1171
1163
|
role: "menuitem",
|
|
1172
|
-
to:
|
|
1173
|
-
className: ({ isActive: o }) =>
|
|
1164
|
+
to: t,
|
|
1165
|
+
className: ({ isActive: o }) => c(
|
|
1174
1166
|
"px-4 pt-2 pb-[calc(0.5rem-3px)] border-b-3",
|
|
1175
1167
|
"highlight:text-lm-brand dark:highlight:text-dm-brand",
|
|
1176
1168
|
"font-bold text-center no-underline transition-colors",
|
|
@@ -1184,13 +1176,13 @@ const pe = K({}), vt = ({ className: e, selected: r, disabled: t, onClick: n, ..
|
|
|
1184
1176
|
},
|
|
1185
1177
|
e
|
|
1186
1178
|
),
|
|
1187
|
-
...
|
|
1179
|
+
...r
|
|
1188
1180
|
}
|
|
1189
1181
|
);
|
|
1190
|
-
},
|
|
1182
|
+
}, Pt = ({ children: e, className: t, fill: r }) => /* @__PURE__ */ a(ge.Provider, { value: { fill: r }, children: /* @__PURE__ */ a(A, { role: "menubar", className: c("flex overflow-hidden", t), children: e }) }), pr = Object.assign(Pt, { Pill: Lt }), be = [
|
|
1191
1183
|
"border border-r-0 last:border-r border-lm-border dark:border-dm-border",
|
|
1192
1184
|
"rounded-none first:rounded-l last:rounded-r"
|
|
1193
|
-
], he = (e = !1) =>
|
|
1185
|
+
], he = (e = !1) => c(
|
|
1194
1186
|
be,
|
|
1195
1187
|
"px-3 py-2 cursor-pointer no-underline",
|
|
1196
1188
|
"focus-ring focus-visible:z-1",
|
|
@@ -1200,92 +1192,92 @@ const pe = K({}), vt = ({ className: e, selected: r, disabled: t, onClick: n, ..
|
|
|
1200
1192
|
"highlight:bg-lm-secondary dark:highlight:bg-dm-secondary"
|
|
1201
1193
|
],
|
|
1202
1194
|
e && "bg-lm-main dark:bg-dm-main text-white"
|
|
1203
|
-
),
|
|
1204
|
-
function
|
|
1205
|
-
const s =
|
|
1206
|
-
return
|
|
1195
|
+
), Y = ({ children: e }) => /* @__PURE__ */ a("span", { "aria-hidden": !0, className: c(be, "px-3 py-2 text-gray-400"), children: e }), fe = () => /* @__PURE__ */ a(Y, { children: U });
|
|
1196
|
+
function Et({ children: e, active: t, isEllipsis: r, href: n, ...o }) {
|
|
1197
|
+
const s = L(() => he(t), [t]);
|
|
1198
|
+
return r ? /* @__PURE__ */ a(fe, {}) : /* @__PURE__ */ a(K, { className: s, to: n, ...o, "data-active": t, children: e });
|
|
1207
1199
|
}
|
|
1208
|
-
function
|
|
1209
|
-
const o =
|
|
1210
|
-
return
|
|
1200
|
+
function St({ children: e, active: t, isEllipsis: r, ...n }) {
|
|
1201
|
+
const o = L(() => he(t), [t]);
|
|
1202
|
+
return r ? /* @__PURE__ */ a(fe, {}) : /* @__PURE__ */ a("button", { type: "button", className: o, ...n, "data-active": t, children: e });
|
|
1211
1203
|
}
|
|
1212
|
-
const
|
|
1213
|
-
const n = "urlForPage" in
|
|
1214
|
-
(
|
|
1215
|
-
[n,
|
|
1216
|
-
);
|
|
1217
|
-
return
|
|
1218
|
-
e === 1 ? /* @__PURE__ */ a(
|
|
1219
|
-
|
|
1204
|
+
const gr = ({ currentPage: e, pagesCount: t, ...r }) => {
|
|
1205
|
+
const n = "urlForPage" in r, o = n ? Et : St, s = w(
|
|
1206
|
+
(i) => n ? { href: _(i) ? void 0 : r.urlForPage(i) } : { onClick: () => !_(i) && r.onPageChange(i) },
|
|
1207
|
+
[n, r]
|
|
1208
|
+
), l = v(null);
|
|
1209
|
+
return de(l, { elementsSelector: "button,a", vertical: !1 }), t < 2 ? null : /* @__PURE__ */ g("div", { className: "select-none flex", "data-testid": "paginator", ref: l, children: [
|
|
1210
|
+
e === 1 ? /* @__PURE__ */ a(Y, { children: /* @__PURE__ */ a(N, { size: "xs", icon: z }) }) : /* @__PURE__ */ a(o, { ...s(Math.max(1, e - 1)), "aria-label": "Previous", children: /* @__PURE__ */ a(N, { size: "xs", icon: z }) }),
|
|
1211
|
+
gt(e, t).map((i, d) => /* @__PURE__ */ a(
|
|
1220
1212
|
o,
|
|
1221
1213
|
{
|
|
1222
|
-
active:
|
|
1223
|
-
isEllipsis:
|
|
1224
|
-
...s(
|
|
1225
|
-
children:
|
|
1214
|
+
active: i === e,
|
|
1215
|
+
isEllipsis: _(i),
|
|
1216
|
+
...s(i),
|
|
1217
|
+
children: bt(i)
|
|
1226
1218
|
},
|
|
1227
|
-
|
|
1219
|
+
ht(i, d)
|
|
1228
1220
|
)),
|
|
1229
|
-
e ===
|
|
1221
|
+
e === t ? /* @__PURE__ */ a(Y, { children: /* @__PURE__ */ a(N, { size: "xs", icon: ee }) }) : /* @__PURE__ */ a(o, { ...s(Math.min(t, e + 1)), "aria-label": "Next", children: /* @__PURE__ */ a(N, { size: "xs", icon: ee }) })
|
|
1230
1222
|
] });
|
|
1231
|
-
},
|
|
1232
|
-
|
|
1223
|
+
}, Dt = ({ buttonLabel: e = "Options", buttonSize: t = "md", ...r }) => /* @__PURE__ */ a(
|
|
1224
|
+
I,
|
|
1233
1225
|
{
|
|
1234
1226
|
buttonContent: /* @__PURE__ */ a(
|
|
1235
1227
|
N,
|
|
1236
1228
|
{
|
|
1237
1229
|
icon: Pe,
|
|
1238
1230
|
widthAuto: !0,
|
|
1239
|
-
className:
|
|
1231
|
+
className: c({ "px-1": t === "sm" })
|
|
1240
1232
|
}
|
|
1241
1233
|
),
|
|
1242
1234
|
caretless: !0,
|
|
1243
1235
|
buttonLabel: e,
|
|
1244
|
-
buttonSize:
|
|
1245
|
-
...
|
|
1236
|
+
buttonSize: t,
|
|
1237
|
+
...r
|
|
1246
1238
|
}
|
|
1247
|
-
),
|
|
1248
|
-
Item:
|
|
1249
|
-
Separator:
|
|
1250
|
-
Title:
|
|
1251
|
-
Misc:
|
|
1252
|
-
}),
|
|
1239
|
+
), br = Object.assign(Dt, {
|
|
1240
|
+
Item: I.Item,
|
|
1241
|
+
Separator: I.Separator,
|
|
1242
|
+
Title: I.Title,
|
|
1243
|
+
Misc: I.Misc
|
|
1244
|
+
}), Mt = ({
|
|
1253
1245
|
open: e,
|
|
1254
|
-
children:
|
|
1255
|
-
className:
|
|
1246
|
+
children: t,
|
|
1247
|
+
className: r,
|
|
1256
1248
|
onClose: n,
|
|
1257
1249
|
...o
|
|
1258
1250
|
}) => {
|
|
1259
|
-
const s =
|
|
1260
|
-
return
|
|
1261
|
-
const l = document.body, i = l.style.overflow,
|
|
1251
|
+
const s = v(null);
|
|
1252
|
+
return O(() => {
|
|
1253
|
+
const l = document.body, i = l.style.overflow, d = l.style.paddingRight;
|
|
1262
1254
|
if (e) {
|
|
1263
|
-
const
|
|
1264
|
-
l.style.overflow = "hidden",
|
|
1255
|
+
const p = window.outerWidth - l.clientWidth, f = l.scrollHeight > l.clientHeight;
|
|
1256
|
+
l.style.overflow = "hidden", f && (l.style.paddingRight = `${p}px`), s.current?.showModal();
|
|
1265
1257
|
} else
|
|
1266
1258
|
s.current?.close();
|
|
1267
1259
|
return () => {
|
|
1268
|
-
l.style.overflow = i, l.style.paddingRight =
|
|
1260
|
+
l.style.overflow = i, l.style.paddingRight = d;
|
|
1269
1261
|
};
|
|
1270
1262
|
}, [e]), Ue(
|
|
1271
1263
|
/* @__PURE__ */ a(
|
|
1272
1264
|
"dialog",
|
|
1273
1265
|
{
|
|
1274
1266
|
ref: s,
|
|
1275
|
-
className:
|
|
1267
|
+
className: c("bg-transparent backdrop:bg-black/50", r),
|
|
1276
1268
|
onCancel: (l) => {
|
|
1277
1269
|
l.preventDefault(), n();
|
|
1278
1270
|
},
|
|
1279
1271
|
...o,
|
|
1280
|
-
children: e &&
|
|
1272
|
+
children: e && t
|
|
1281
1273
|
}
|
|
1282
1274
|
),
|
|
1283
1275
|
document.body
|
|
1284
1276
|
);
|
|
1285
|
-
},
|
|
1277
|
+
}, hr = ({
|
|
1286
1278
|
open: e,
|
|
1287
|
-
onClose:
|
|
1288
|
-
variant:
|
|
1279
|
+
onClose: t,
|
|
1280
|
+
variant: r = "default",
|
|
1289
1281
|
title: n,
|
|
1290
1282
|
children: o,
|
|
1291
1283
|
className: s,
|
|
@@ -1293,43 +1285,43 @@ const hr = ({ currentPage: e, pagesCount: r, ...t }) => {
|
|
|
1293
1285
|
}) => {
|
|
1294
1286
|
const {
|
|
1295
1287
|
size: i = "md",
|
|
1296
|
-
confirmText:
|
|
1297
|
-
cancelText:
|
|
1298
|
-
confirmDisabled:
|
|
1299
|
-
onConfirm:
|
|
1300
|
-
onClosed:
|
|
1288
|
+
confirmText: d = "Confirm",
|
|
1289
|
+
cancelText: p = "Cancel",
|
|
1290
|
+
confirmDisabled: f,
|
|
1291
|
+
onConfirm: b,
|
|
1292
|
+
onClosed: x,
|
|
1301
1293
|
...h
|
|
1302
|
-
} = "onConfirm" in l ? l : { ...l }, [
|
|
1303
|
-
|
|
1304
|
-
}, [
|
|
1305
|
-
return
|
|
1294
|
+
} = "onConfirm" in l ? l : { ...l }, [u, m] = R(e), k = v(null), y = v("cancel"), W = w((C) => {
|
|
1295
|
+
C.preventDefault(), C.stopPropagation(), y.current = "confirm", b?.();
|
|
1296
|
+
}, [b]);
|
|
1297
|
+
return O(() => {
|
|
1306
1298
|
if (e) {
|
|
1307
1299
|
y.current = "cancel", m(!0);
|
|
1308
1300
|
return;
|
|
1309
1301
|
}
|
|
1310
|
-
const
|
|
1311
|
-
if (
|
|
1312
|
-
delete
|
|
1313
|
-
let
|
|
1314
|
-
const
|
|
1315
|
-
|
|
1302
|
+
const C = k.current;
|
|
1303
|
+
if (C) {
|
|
1304
|
+
delete k.current.dataset.open;
|
|
1305
|
+
let H = !1;
|
|
1306
|
+
const $ = (j) => {
|
|
1307
|
+
H || j.target !== C || (H = !0, m(!1), x?.(y.current));
|
|
1316
1308
|
};
|
|
1317
|
-
return
|
|
1318
|
-
|
|
1309
|
+
return C.addEventListener("transitionend", $), () => {
|
|
1310
|
+
C.removeEventListener("transitionend", $);
|
|
1319
1311
|
};
|
|
1320
1312
|
}
|
|
1321
|
-
}, [
|
|
1322
|
-
const
|
|
1323
|
-
|
|
1324
|
-
}, [
|
|
1325
|
-
|
|
1313
|
+
}, [x, e]), O(() => {
|
|
1314
|
+
const C = k.current;
|
|
1315
|
+
u && C && (C.dataset.open = "");
|
|
1316
|
+
}, [u]), /* @__PURE__ */ a(
|
|
1317
|
+
Mt,
|
|
1326
1318
|
{
|
|
1327
|
-
open:
|
|
1328
|
-
onClose:
|
|
1329
|
-
className:
|
|
1319
|
+
open: u,
|
|
1320
|
+
onClose: t,
|
|
1321
|
+
className: c(
|
|
1330
1322
|
{
|
|
1331
|
-
"flex w-screen h-screen max-w-screen max-h-screen":
|
|
1332
|
-
"overflow-hidden":
|
|
1323
|
+
"flex w-screen h-screen max-w-screen max-h-screen": u,
|
|
1324
|
+
"overflow-hidden": r === "cover"
|
|
1333
1325
|
},
|
|
1334
1326
|
s
|
|
1335
1327
|
),
|
|
@@ -1338,30 +1330,30 @@ const hr = ({ currentPage: e, pagesCount: r, ...t }) => {
|
|
|
1338
1330
|
"form",
|
|
1339
1331
|
{
|
|
1340
1332
|
"data-testid": "transition-container",
|
|
1341
|
-
ref:
|
|
1342
|
-
className:
|
|
1333
|
+
ref: k,
|
|
1334
|
+
className: c(
|
|
1343
1335
|
"w-full m-auto p-4 sm:p-6",
|
|
1344
1336
|
// CSS transitions are based on the presence of the `data-open` attribute
|
|
1345
1337
|
"-translate-y-4 data-open:translate-y-0 opacity-0 data-open:opacity-100",
|
|
1346
1338
|
"transition-[opacity_,_translate] duration-300",
|
|
1347
1339
|
// Handle modal dimensions for different variants and sizes
|
|
1348
|
-
|
|
1340
|
+
r !== "cover" && {
|
|
1349
1341
|
"sm:w-sm": i === "sm",
|
|
1350
1342
|
"md:w-lg": i === "md",
|
|
1351
1343
|
"md:w-4xl": i === "lg",
|
|
1352
1344
|
"md:w-6xl": i === "xl"
|
|
1353
1345
|
},
|
|
1354
|
-
{ "h-full":
|
|
1346
|
+
{ "h-full": r === "cover" }
|
|
1355
1347
|
),
|
|
1356
|
-
onSubmit:
|
|
1357
|
-
children: /* @__PURE__ */ a(
|
|
1348
|
+
onSubmit: W,
|
|
1349
|
+
children: /* @__PURE__ */ a(A, { className: c(
|
|
1358
1350
|
"w-full",
|
|
1359
|
-
{ "h-full relative overflow-auto":
|
|
1360
|
-
), children:
|
|
1351
|
+
{ "h-full relative overflow-auto": r === "cover" }
|
|
1352
|
+
), children: r === "cover" ? /* @__PURE__ */ g(F, { children: [
|
|
1361
1353
|
/* @__PURE__ */ g(
|
|
1362
1354
|
"div",
|
|
1363
1355
|
{
|
|
1364
|
-
className:
|
|
1356
|
+
className: c(
|
|
1365
1357
|
"px-4 py-3 absolute top-0 left-0 right-0 z-3000",
|
|
1366
1358
|
"flex items-center justify-between",
|
|
1367
1359
|
"text-white bg-linear-to-b from-black/70 to-black/10",
|
|
@@ -1369,38 +1361,38 @@ const hr = ({ currentPage: e, pagesCount: r, ...t }) => {
|
|
|
1369
1361
|
),
|
|
1370
1362
|
children: [
|
|
1371
1363
|
/* @__PURE__ */ a("h5", { children: n }),
|
|
1372
|
-
/* @__PURE__ */ a(
|
|
1364
|
+
/* @__PURE__ */ a(Q, { onClick: t, label: "Close dialog" })
|
|
1373
1365
|
]
|
|
1374
1366
|
}
|
|
1375
1367
|
),
|
|
1376
1368
|
o
|
|
1377
|
-
] }) : /* @__PURE__ */ g(
|
|
1378
|
-
/* @__PURE__ */ g(
|
|
1369
|
+
] }) : /* @__PURE__ */ g(F, { children: [
|
|
1370
|
+
/* @__PURE__ */ g(A.Header, { className: c(
|
|
1379
1371
|
"sticky top-0",
|
|
1380
1372
|
"flex items-center justify-between gap-x-2"
|
|
1381
1373
|
), children: [
|
|
1382
|
-
/* @__PURE__ */ a("h5", { className:
|
|
1383
|
-
/* @__PURE__ */ a(
|
|
1374
|
+
/* @__PURE__ */ a("h5", { className: c({ "text-danger": r === "danger" }), children: n }),
|
|
1375
|
+
/* @__PURE__ */ a(Q, { onClick: t, label: "Close dialog" })
|
|
1384
1376
|
] }),
|
|
1385
|
-
/* @__PURE__ */ a(
|
|
1386
|
-
|
|
1387
|
-
|
|
1377
|
+
/* @__PURE__ */ a(A.Body, { children: o }),
|
|
1378
|
+
b && /* @__PURE__ */ g(
|
|
1379
|
+
A.Footer,
|
|
1388
1380
|
{
|
|
1389
1381
|
"data-testid": "footer",
|
|
1390
|
-
className:
|
|
1382
|
+
className: c(
|
|
1391
1383
|
"flex justify-end items-center gap-x-2",
|
|
1392
1384
|
"[&]:px-3 sticky bottom-0"
|
|
1393
1385
|
),
|
|
1394
1386
|
children: [
|
|
1395
|
-
/* @__PURE__ */ a(
|
|
1387
|
+
/* @__PURE__ */ a(At, { onClick: t, children: p }),
|
|
1396
1388
|
/* @__PURE__ */ a(
|
|
1397
|
-
|
|
1389
|
+
le,
|
|
1398
1390
|
{
|
|
1399
1391
|
solid: !0,
|
|
1400
|
-
variant:
|
|
1401
|
-
disabled:
|
|
1392
|
+
variant: r === "danger" ? "danger" : "primary",
|
|
1393
|
+
disabled: f,
|
|
1402
1394
|
type: "submit",
|
|
1403
|
-
children:
|
|
1395
|
+
children: d
|
|
1404
1396
|
}
|
|
1405
1397
|
)
|
|
1406
1398
|
]
|
|
@@ -1411,46 +1403,46 @@ const hr = ({ currentPage: e, pagesCount: r, ...t }) => {
|
|
|
1411
1403
|
)
|
|
1412
1404
|
}
|
|
1413
1405
|
);
|
|
1414
|
-
},
|
|
1406
|
+
}, fr = ({ className: e, children: t, loading: r = !1, variant: n = "default" }) => /* @__PURE__ */ a(Qe, { className: c({ "[&]:border-danger": n === "error" }, e), children: /* @__PURE__ */ g("h3", { className: c("text-center", {
|
|
1415
1407
|
"text-gray-500 dark:text-gray-400": n === "default",
|
|
1416
1408
|
"text-danger": n === "error"
|
|
1417
1409
|
}), children: [
|
|
1418
|
-
|
|
1419
|
-
/* @__PURE__ */ a(N, { icon:
|
|
1420
|
-
/* @__PURE__ */ a("span", { className: "ml-2", children:
|
|
1410
|
+
r && /* @__PURE__ */ g(F, { children: [
|
|
1411
|
+
/* @__PURE__ */ a(N, { icon: oe, spin: !0 }),
|
|
1412
|
+
/* @__PURE__ */ a("span", { className: "ml-2", children: t ?? "Loading..." })
|
|
1421
1413
|
] }),
|
|
1422
|
-
!
|
|
1423
|
-
] }) }),
|
|
1414
|
+
!r && t
|
|
1415
|
+
] }) }), xr = ({ variant: e, className: t, size: r = "md", children: n }) => /* @__PURE__ */ a(
|
|
1424
1416
|
"div",
|
|
1425
1417
|
{
|
|
1426
|
-
className:
|
|
1418
|
+
className: c(
|
|
1427
1419
|
"rounded-md text-center",
|
|
1428
1420
|
{
|
|
1429
|
-
"p-2":
|
|
1430
|
-
"p-4":
|
|
1431
|
-
"p-6":
|
|
1421
|
+
"p-2": r === "sm",
|
|
1422
|
+
"p-4": r === "md",
|
|
1423
|
+
"p-6": r === "lg",
|
|
1432
1424
|
"[&]:text-white": e !== "warning",
|
|
1433
1425
|
"bg-lm-brand dark:bg-dm-brand": e === "success",
|
|
1434
1426
|
"bg-danger": e === "error",
|
|
1435
1427
|
"bg-warning text-black": e === "warning"
|
|
1436
1428
|
},
|
|
1437
|
-
|
|
1429
|
+
t
|
|
1438
1430
|
),
|
|
1439
1431
|
children: n
|
|
1440
1432
|
}
|
|
1441
|
-
),
|
|
1442
|
-
const
|
|
1433
|
+
), yr = ({ placement: e = "auto" } = {}) => {
|
|
1434
|
+
const t = v(null), r = (() => {
|
|
1443
1435
|
const m = [];
|
|
1444
|
-
return e === "auto" && m.push(Fe()), m.push(Be({ element:
|
|
1445
|
-
})(), [n, o] =
|
|
1436
|
+
return e === "auto" && m.push(Fe()), m.push(Be({ element: t })), m;
|
|
1437
|
+
})(), [n, o] = R(!1), { refs: s, floatingStyles: l, context: i, middlewareData: d } = ae({
|
|
1446
1438
|
placement: e === "auto" ? void 0 : e,
|
|
1447
1439
|
open: n,
|
|
1448
1440
|
onOpenChange: o,
|
|
1449
|
-
middleware:
|
|
1450
|
-
}),
|
|
1441
|
+
middleware: r
|
|
1442
|
+
}), p = He(i, {
|
|
1451
1443
|
delay: { open: 300 },
|
|
1452
1444
|
move: !0
|
|
1453
|
-
}), { getFloatingProps:
|
|
1445
|
+
}), { getFloatingProps: f, getReferenceProps: b } = se([p]), { isMounted: x, styles: h } = $e(i, { duration: 200 }), u = L(() => {
|
|
1454
1446
|
const m = i.placement.split("-")[0];
|
|
1455
1447
|
return {
|
|
1456
1448
|
top: "bottom",
|
|
@@ -1460,23 +1452,23 @@ const hr = ({ currentPage: e, pagesCount: r, ...t }) => {
|
|
|
1460
1452
|
}[m] ?? "";
|
|
1461
1453
|
}, [i.placement]);
|
|
1462
1454
|
return {
|
|
1463
|
-
anchor: { ...
|
|
1455
|
+
anchor: { ...b(), ref: s.setReference },
|
|
1464
1456
|
tooltip: {
|
|
1465
|
-
...
|
|
1457
|
+
...f(),
|
|
1466
1458
|
refSetter: s.setFloating,
|
|
1467
|
-
isMounted:
|
|
1459
|
+
isMounted: x,
|
|
1468
1460
|
styles: { ...l, ...h },
|
|
1469
|
-
arrowPos:
|
|
1470
|
-
arrowRef:
|
|
1471
|
-
arrowSide:
|
|
1461
|
+
arrowPos: d.arrow,
|
|
1462
|
+
arrowRef: t,
|
|
1463
|
+
arrowSide: u
|
|
1472
1464
|
}
|
|
1473
1465
|
};
|
|
1474
|
-
},
|
|
1466
|
+
}, wr = ({ children: e, isMounted: t, styles: r, refSetter: n, arrowRef: o, arrowPos: s, arrowSide: l, ...i }) => t && /* @__PURE__ */ a(
|
|
1475
1467
|
"div",
|
|
1476
1468
|
{
|
|
1477
1469
|
role: "tooltip",
|
|
1478
1470
|
"aria-live": "polite",
|
|
1479
|
-
className:
|
|
1471
|
+
className: c(
|
|
1480
1472
|
"z-500 max-w-64",
|
|
1481
1473
|
// Add space between anchor and tooltip via padding, so that if the tooltip is inside the anchor, you can hover it
|
|
1482
1474
|
// and it's never closed
|
|
@@ -1488,7 +1480,7 @@ const hr = ({ currentPage: e, pagesCount: r, ...t }) => {
|
|
|
1488
1480
|
}
|
|
1489
1481
|
),
|
|
1490
1482
|
ref: n,
|
|
1491
|
-
style:
|
|
1483
|
+
style: r,
|
|
1492
1484
|
...i,
|
|
1493
1485
|
children: /* @__PURE__ */ g("div", { className: "relative px-1.5 py-1 rounded bg-black/90 text-white text-center", children: [
|
|
1494
1486
|
/* @__PURE__ */ a("span", { className: "sr-only", children: "Tooltip: " }),
|
|
@@ -1497,7 +1489,7 @@ const hr = ({ currentPage: e, pagesCount: r, ...t }) => {
|
|
|
1497
1489
|
"div",
|
|
1498
1490
|
{
|
|
1499
1491
|
ref: o,
|
|
1500
|
-
className:
|
|
1492
|
+
className: c(
|
|
1501
1493
|
"absolute",
|
|
1502
1494
|
// Render as a triangle
|
|
1503
1495
|
"border-l-6 border-r-6 border-b-6 border-l-transparent border-r-transparent border-b-black/90",
|
|
@@ -1519,146 +1511,146 @@ const hr = ({ currentPage: e, pagesCount: r, ...t }) => {
|
|
|
1519
1511
|
] })
|
|
1520
1512
|
}
|
|
1521
1513
|
);
|
|
1522
|
-
function
|
|
1514
|
+
function _t(e) {
|
|
1523
1515
|
if (e.currentField !== e.newField)
|
|
1524
1516
|
return "ASC";
|
|
1525
|
-
const
|
|
1517
|
+
const t = {
|
|
1526
1518
|
ASC: "DESC",
|
|
1527
1519
|
DESC: void 0
|
|
1528
1520
|
};
|
|
1529
|
-
return e.currentOrderDir ?
|
|
1521
|
+
return e.currentOrderDir ? t[e.currentOrderDir] : "ASC";
|
|
1530
1522
|
}
|
|
1531
|
-
function
|
|
1532
|
-
const
|
|
1523
|
+
function Ft(e) {
|
|
1524
|
+
const t = _t(e);
|
|
1533
1525
|
return {
|
|
1534
|
-
field:
|
|
1535
|
-
dir:
|
|
1526
|
+
field: t ? e.newField : void 0,
|
|
1527
|
+
dir: t
|
|
1536
1528
|
};
|
|
1537
1529
|
}
|
|
1538
|
-
const
|
|
1539
|
-
const s =
|
|
1540
|
-
return n[
|
|
1541
|
-
}),
|
|
1542
|
-
const [
|
|
1543
|
-
return { field:
|
|
1530
|
+
const kr = (e, { field: t, dir: r }) => !t || !r ? e : e.sort((n, o) => {
|
|
1531
|
+
const s = r === "ASC" ? 1 : -1, l = r === "ASC" ? -1 : 1;
|
|
1532
|
+
return n[t] > o[t] ? s : l;
|
|
1533
|
+
}), vr = (e) => e.dir ? `${e.field}-${e.dir}` : void 0, Nr = (e) => {
|
|
1534
|
+
const [t, r] = e.split("-");
|
|
1535
|
+
return { field: t, dir: r };
|
|
1544
1536
|
};
|
|
1545
|
-
function
|
|
1546
|
-
const l = w((
|
|
1547
|
-
const
|
|
1548
|
-
|
|
1549
|
-
}, [
|
|
1537
|
+
function Cr({ items: e, order: t, onChange: r, prefixed: n = !0, buttonVariant: o = "button", ...s }) {
|
|
1538
|
+
const l = w((d) => {
|
|
1539
|
+
const p = Ft({ currentOrderDir: t.dir, currentField: t.field, newField: d });
|
|
1540
|
+
r(p);
|
|
1541
|
+
}, [r, t.dir, t.field]), i = o === "button";
|
|
1550
1542
|
return /* @__PURE__ */ g(
|
|
1551
|
-
|
|
1543
|
+
I,
|
|
1552
1544
|
{
|
|
1553
|
-
buttonContent: /* @__PURE__ */ g(
|
|
1545
|
+
buttonContent: /* @__PURE__ */ g(F, { children: [
|
|
1554
1546
|
!i && "Order by",
|
|
1555
|
-
i && !
|
|
1556
|
-
i &&
|
|
1547
|
+
i && !t.field && /* @__PURE__ */ a("i", { children: "Order by..." }),
|
|
1548
|
+
i && t.field && /* @__PURE__ */ g(F, { children: [
|
|
1557
1549
|
n && "Order by: ",
|
|
1558
|
-
e[
|
|
1550
|
+
e[t.field],
|
|
1559
1551
|
" - ",
|
|
1560
|
-
|
|
1552
|
+
t.dir ?? "DESC"
|
|
1561
1553
|
] })
|
|
1562
1554
|
] }),
|
|
1563
1555
|
buttonVariant: o,
|
|
1564
1556
|
...s,
|
|
1565
1557
|
children: [
|
|
1566
|
-
Object.entries(e).map(([
|
|
1567
|
-
|
|
1558
|
+
Object.entries(e).map(([d, p]) => /* @__PURE__ */ g(
|
|
1559
|
+
I.Item,
|
|
1568
1560
|
{
|
|
1569
|
-
selected:
|
|
1570
|
-
onClick: () => l(
|
|
1561
|
+
selected: t.field === d,
|
|
1562
|
+
onClick: () => l(d),
|
|
1571
1563
|
className: "flex items-center justify-between gap-2",
|
|
1572
1564
|
children: [
|
|
1573
|
-
|
|
1574
|
-
|
|
1565
|
+
p,
|
|
1566
|
+
t.field === d && /* @__PURE__ */ a(N, { icon: t.dir === "ASC" ? Ee : Se })
|
|
1575
1567
|
]
|
|
1576
1568
|
},
|
|
1577
|
-
|
|
1569
|
+
d
|
|
1578
1570
|
)),
|
|
1579
|
-
/* @__PURE__ */ a(
|
|
1580
|
-
/* @__PURE__ */ a(
|
|
1571
|
+
/* @__PURE__ */ a(I.Separator, {}),
|
|
1572
|
+
/* @__PURE__ */ a(I.Item, { disabled: !t.field, onClick: () => r({}), children: /* @__PURE__ */ a("i", { children: "Clear selection" }) })
|
|
1581
1573
|
]
|
|
1582
1574
|
}
|
|
1583
1575
|
);
|
|
1584
1576
|
}
|
|
1585
|
-
const
|
|
1586
|
-
const [
|
|
1587
|
-
return
|
|
1588
|
-
|
|
1589
|
-
}, [
|
|
1577
|
+
const Bt = "#4696e5", Ht = "rgba(70, 150, 229, 0.4)", $t = "#2078CF", jt = "rgba(32, 120, 207, 0.4)", Tr = () => xe() ? Bt : $t, Ar = () => xe() ? Ht : jt, Ir = "#f77f28", Or = "rgba(247, 127, 40, 0.4)", Rr = "white", Lr = "#161b22", Ut = (e) => document.querySelector("html")?.setAttribute("data-theme", e), xe = () => document.querySelector("html")?.getAttribute("data-theme") === "dark", Gt = (e = window.matchMedia.bind(window)) => e("(prefers-color-scheme: dark)").matches ? "dark" : "light", Pr = (e) => {
|
|
1578
|
+
const [t, r] = R(() => e ?? Gt());
|
|
1579
|
+
return O(() => {
|
|
1580
|
+
Ut(t);
|
|
1581
|
+
}, [t]), [t, r];
|
|
1590
1582
|
};
|
|
1591
1583
|
export {
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1584
|
+
Ht as BRAND_COLOR_ALPHA_DM,
|
|
1585
|
+
jt as BRAND_COLOR_ALPHA_LM,
|
|
1586
|
+
Bt as BRAND_COLOR_DM,
|
|
1587
|
+
$t as BRAND_COLOR_LM,
|
|
1588
|
+
Rt as BaseNavBar,
|
|
1589
|
+
le as Button,
|
|
1590
|
+
A as Card,
|
|
1591
|
+
hr as CardModal,
|
|
1592
|
+
tr as Checkbox,
|
|
1593
|
+
Q as CloseButton,
|
|
1594
|
+
ir as CopyToClipboardButton,
|
|
1595
|
+
zt as Details,
|
|
1596
|
+
I as Dropdown,
|
|
1597
|
+
U as ELLIPSIS,
|
|
1598
|
+
Ir as HIGHLIGHTED_COLOR,
|
|
1599
|
+
Or as HIGHLIGHTED_COLOR_ALPHA,
|
|
1600
|
+
X as Input,
|
|
1601
|
+
J as Label,
|
|
1602
|
+
rr as LabelledInput,
|
|
1603
|
+
nr as LabelledRevealablePasswordInput,
|
|
1604
|
+
or as LabelledSelect,
|
|
1605
|
+
At as LinkButton,
|
|
1614
1606
|
Ye as Listbox,
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1607
|
+
M as Menu,
|
|
1608
|
+
fr as Message,
|
|
1609
|
+
Mt as ModalDialog,
|
|
1610
|
+
ur as NavBar,
|
|
1611
|
+
pr as NavPills,
|
|
1612
|
+
Cr as OrderingDropdown,
|
|
1613
|
+
Lr as PRIMARY_DARK_COLOR,
|
|
1614
|
+
Rr as PRIMARY_LIGHT_COLOR,
|
|
1615
|
+
gr as Paginator,
|
|
1616
|
+
xr as Result,
|
|
1625
1617
|
tt as RevealablePasswordInput,
|
|
1626
|
-
|
|
1627
|
-
|
|
1618
|
+
br as RowDropdown,
|
|
1619
|
+
ot as SearchCombobox,
|
|
1628
1620
|
nt as SearchInput,
|
|
1629
1621
|
rt as Select,
|
|
1630
1622
|
Qe as SimpleCard,
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1623
|
+
er as Table,
|
|
1624
|
+
ar as TagsAutocomplete,
|
|
1625
|
+
sr as ToggleSwitch,
|
|
1626
|
+
wr as Tooltip,
|
|
1627
|
+
Tr as brandColor,
|
|
1628
|
+
Ar as brandColorAlpha,
|
|
1629
|
+
Ut as changeThemeInMarkup,
|
|
1630
|
+
Ft as determineOrder,
|
|
1631
|
+
_t as determineOrderDir,
|
|
1632
|
+
ut as formatNumber,
|
|
1633
|
+
Gt as getSystemPreferredTheme,
|
|
1642
1634
|
xe as isDarkThemeEnabled,
|
|
1643
|
-
|
|
1644
|
-
|
|
1635
|
+
it as isLightColor,
|
|
1636
|
+
ht as keyForPage,
|
|
1645
1637
|
ce as normalizeTag,
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1638
|
+
vr as orderToString,
|
|
1639
|
+
_ as pageIsEllipsis,
|
|
1640
|
+
dt as parseQueryString,
|
|
1641
|
+
bt as prettifyPageNumber,
|
|
1642
|
+
gt as progressivePagination,
|
|
1643
|
+
mr as roundTen,
|
|
1644
|
+
kr as sortList,
|
|
1645
|
+
Nr as stringToOrder,
|
|
1646
|
+
dr as stringifyQueryParams,
|
|
1647
|
+
de as useArrowKeyNavigation,
|
|
1648
|
+
lr as useGoBack,
|
|
1649
|
+
cr as useParsedQuery,
|
|
1650
|
+
ft as useTagsSearch,
|
|
1651
|
+
Pr as useTheme,
|
|
1660
1652
|
me as useTimeout,
|
|
1661
|
-
|
|
1653
|
+
yt as useTimeoutToggle,
|
|
1662
1654
|
ue as useToggle,
|
|
1663
|
-
|
|
1655
|
+
yr as useTooltip
|
|
1664
1656
|
};
|