@shlinkio/shlink-frontend-kit 1.0.0 → 1.0.1

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