@shlinkio/shlink-frontend-kit 0.8.5 → 0.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/tailwind.js CHANGED
@@ -1,164 +1,165 @@
1
- import { jsx as n, jsxs as i, Fragment as S } from "react/jsx-runtime";
2
- import s, { clsx as x } from "clsx";
3
- import { createContext as M, useContext as g, useCallback as L, useId as U, useMemo as z, useRef as _, useEffect as F, useState as et } from "react";
4
- import { Link as W, NavLink as rt } from "react-router";
5
- import { faClose as ot, faSearch as nt, faChevronLeft as H, faChevronRight as O, faCircleNotch as dt } from "@fortawesome/free-solid-svg-icons";
6
- import { FontAwesomeIcon as p } from "@fortawesome/react-fontawesome";
7
- import { createPortal as lt } from "react-dom";
8
- import { u as at } from "./use-timeout-BbfWTbuj.js";
9
- const N = M(void 0), y = M({ responsive: !0 }), st = ({ children: t, className: e }) => {
10
- const { responsive: r } = g(y);
11
- return /* @__PURE__ */ n(N.Provider, { value: { section: "head" }, children: /* @__PURE__ */ n(
1
+ import { jsx as o, jsxs as i, Fragment as S } from "react/jsx-runtime";
2
+ import w, { clsx as p } from "clsx";
3
+ import { createContext as M, useContext as f, forwardRef as b, useCallback as C, useId as j, useMemo as J, useRef as E, useEffect as F, useState as rt } from "react";
4
+ import { Link as K, NavLink as ot } from "react-router";
5
+ import { faClose as nt, faEyeSlash as at, faEye as dt, faSearch as lt, faChevronLeft as U, faChevronRight as W, faCircleNotch as st } from "@fortawesome/free-solid-svg-icons";
6
+ import { FontAwesomeIcon as u } from "@fortawesome/react-fontawesome";
7
+ import { a as wt, b as it, u as ct } from "./use-toggle-DlYE68B3.js";
8
+ import { createPortal as mt } from "react-dom";
9
+ const I = M(void 0), v = M({ responsive: !0 }), gt = ({ children: t, className: r }) => {
10
+ const { responsive: e } = f(v);
11
+ return /* @__PURE__ */ o(I.Provider, { value: { section: "head" }, children: /* @__PURE__ */ o(
12
12
  "thead",
13
13
  {
14
- className: s(
15
- { "tw:hidden tw:lg:table-header-group": r },
16
- e
14
+ className: w(
15
+ { "tw:hidden tw:lg:table-header-group": e },
16
+ r
17
17
  ),
18
18
  children: t
19
19
  }
20
20
  ) });
21
- }, wt = ({ children: t, className: e }) => {
22
- const { responsive: r } = g(y);
23
- return /* @__PURE__ */ n(N.Provider, { value: { section: "body" }, children: /* @__PURE__ */ n(
21
+ }, bt = ({ children: t, className: r }) => {
22
+ const { responsive: e } = f(v);
23
+ return /* @__PURE__ */ o(I.Provider, { value: { section: "body" }, children: /* @__PURE__ */ o(
24
24
  "tbody",
25
25
  {
26
- className: s(
27
- { "tw:lg:table-row-group tw:flex tw:flex-col tw:gap-y-3": r },
28
- e
26
+ className: w(
27
+ { "tw:lg:table-row-group tw:flex tw:flex-col tw:gap-y-3": e },
28
+ r
29
29
  ),
30
30
  children: t
31
31
  }
32
32
  ) });
33
- }, it = ({ children: t, className: e }) => {
34
- const { responsive: r } = g(y);
35
- return /* @__PURE__ */ n(N.Provider, { value: { section: "footer" }, children: /* @__PURE__ */ n(
33
+ }, pt = ({ children: t, className: r }) => {
34
+ const { responsive: e } = f(v);
35
+ return /* @__PURE__ */ o(I.Provider, { value: { section: "footer" }, children: /* @__PURE__ */ o(
36
36
  "tfoot",
37
37
  {
38
- className: s(
39
- { "tw:lg:table-row-group tw:flex tw:flex-col tw:gap-y-3 tw:mt-4": r },
40
- e
38
+ className: w(
39
+ { "tw:lg:table-row-group tw:flex tw:flex-col tw:gap-y-3 tw:mt-4": e },
40
+ r
41
41
  ),
42
42
  children: t
43
43
  }
44
44
  ) });
45
- }, ct = ({ children: t, className: e, ...r }) => {
46
- const o = g(N), d = (o == null ? void 0 : o.section) === "body", { responsive: a } = g(y);
47
- return /* @__PURE__ */ n(
45
+ }, ut = ({ children: t, className: r, ...e }) => {
46
+ const n = f(I), a = (n == null ? void 0 : n.section) === "body", { responsive: l } = f(v);
47
+ return /* @__PURE__ */ o(
48
48
  "tr",
49
49
  {
50
- className: s(
50
+ className: w(
51
51
  "tw:group",
52
52
  {
53
- "tw:lg:table-row tw:flex tw:flex-col": a,
54
- "tw:lg:border-0 tw:border-y-2 tw:border-lm-border tw:dark:border-dm-border": a,
55
- "tw:hover:bg-lm-primary tw:dark:hover:bg-dm-primary": d,
53
+ "tw:lg:table-row tw:flex tw:flex-col": l,
54
+ "tw:lg:border-0 tw:border-y-2 tw:border-lm-border tw:dark:border-dm-border": l,
55
+ "tw:hover:bg-lm-primary tw:dark:hover:bg-dm-primary": a,
56
56
  // Use a different hover bg color depending on the table being inside a card or not
57
- "tw:group-[&]/card:hover:bg-lm-secondary tw:dark:group-[&]/card:hover:bg-dm-secondary": d
57
+ "tw:group-[&]/card:hover:bg-lm-secondary tw:dark:group-[&]/card:hover:bg-dm-secondary": a
58
58
  },
59
- e
59
+ r
60
60
  ),
61
- ...r,
61
+ ...e,
62
62
  children: t
63
63
  }
64
64
  );
65
- }, mt = ({ children: t, className: e, columnName: r, type: o, ...d }) => {
66
- const a = g(N), l = o ?? ((a == null ? void 0 : a.section) !== "body" ? "th" : "td"), { responsive: w } = g(y);
67
- return /* @__PURE__ */ n(
68
- l,
65
+ }, ht = ({ children: t, className: r, columnName: e, type: n, ...a }) => {
66
+ const l = f(I), d = n ?? ((l == null ? void 0 : l.section) !== "body" ? "th" : "td"), { responsive: s } = f(v);
67
+ return /* @__PURE__ */ o(
68
+ d,
69
69
  {
70
- "data-column": w ? r : void 0,
71
- className: s(
70
+ "data-column": s ? e : void 0,
71
+ className: w(
72
72
  "tw:p-2 tw:border-lm-border tw:dark:border-dm-border",
73
73
  {
74
- "tw:border-b-1": !w,
75
- "tw:block tw:lg:table-cell tw:not-last:border-b-1 tw:lg:border-b-1": w,
74
+ "tw:border-b-1": !s,
75
+ "tw:block tw:lg:table-cell tw:not-last:border-b-1 tw:lg:border-b-1": s,
76
76
  // For md and lower, display the content in data-column attribute as before
77
- "tw:before:lg:hidden tw:before:content-[attr(data-column)] tw:before:font-bold tw:before:mr-1": w && l === "td"
77
+ "tw:before:lg:hidden tw:before:content-[attr(data-column)] tw:before:font-bold tw:before:mr-1": s && d === "td"
78
78
  },
79
- e
79
+ r
80
80
  ),
81
- ...d,
81
+ ...a,
82
82
  children: t
83
83
  }
84
84
  );
85
- }, gt = ({ header: t, footer: e, children: r, responsive: o = !0, ...d }) => /* @__PURE__ */ n(y.Provider, { value: { responsive: o }, children: /* @__PURE__ */ i("table", { className: "tw:w-full", ...d, children: [
86
- /* @__PURE__ */ n(st, { children: t }),
87
- /* @__PURE__ */ n(wt, { children: r }),
88
- e && /* @__PURE__ */ n(it, { children: e })
89
- ] }) }), At = Object.assign(gt, { Row: ct, Cell: mt }), bt = ({
85
+ }, ft = ({ header: t, footer: r, children: e, responsive: n = !0, ...a }) => /* @__PURE__ */ o(v.Provider, { value: { responsive: n }, children: /* @__PURE__ */ i("table", { className: "tw:w-full", ...a, children: [
86
+ /* @__PURE__ */ o(gt, { children: t }),
87
+ /* @__PURE__ */ o(bt, { children: e }),
88
+ r && /* @__PURE__ */ o(pt, { children: r })
89
+ ] }) }), Kt = Object.assign(ft, { Row: ut, Cell: ht }), xt = ({
90
90
  children: t,
91
- className: e,
92
- disabled: r,
93
- variant: o = "primary",
94
- size: d = "md",
95
- inline: a = !1,
96
- solid: l = !1,
97
- ...w
91
+ className: r,
92
+ disabled: e,
93
+ variant: n = "primary",
94
+ size: a = "md",
95
+ inline: l = !1,
96
+ solid: d = !1,
97
+ ...s
98
98
  }) => {
99
- const c = "to" in w ? W : "button";
99
+ const c = "to" in s ? K : "button";
100
100
  return (
101
101
  // @ts-expect-error We are explicitly checking for the `to` prop before using Link
102
- /* @__PURE__ */ n(
102
+ /* @__PURE__ */ o(
103
103
  c,
104
104
  {
105
- className: s(
105
+ className: w(
106
106
  {
107
- "tw:inline-flex": a,
108
- "tw:flex": !a
107
+ "tw:inline-flex": l,
108
+ "tw:flex": !l
109
109
  },
110
110
  "tw:gap-2 tw:items-center tw:justify-center",
111
111
  "tw:border tw:rounded-md tw:no-underline",
112
112
  "tw:transition-colors",
113
113
  {
114
- "tw:focus-ring": o !== "danger",
115
- "tw:focus-ring-danger": o === "danger"
114
+ "tw:focus-ring": n !== "danger",
115
+ "tw:focus-ring-danger": n === "danger"
116
116
  },
117
117
  {
118
- "tw:px-1.5 tw:py-1 tw:text-sm": d === "sm",
119
- "tw:px-3 tw:py-1.5": d === "md",
120
- "tw:px-4 tw:py-2 tw:text-lg": d === "lg"
118
+ "tw:px-1.5 tw:py-1 tw:text-sm": a === "sm",
119
+ "tw:px-3 tw:py-1.5": a === "md",
120
+ "tw:px-4 tw:py-2 tw:text-lg": a === "lg"
121
121
  },
122
122
  {
123
- "tw:border-brand tw:text-brand": o === "primary",
124
- "tw:border-zinc-500": o === "secondary",
125
- "tw:text-zinc-500": o === "secondary" && !l,
126
- "tw:border-danger": o === "danger",
127
- "tw:text-danger": o === "danger" && !l
123
+ "tw:border-brand tw:text-brand": n === "primary",
124
+ "tw:border-zinc-500": n === "secondary",
125
+ "tw:text-zinc-500": n === "secondary" && !d,
126
+ "tw:border-danger": n === "danger",
127
+ "tw:text-danger": n === "danger" && !d
128
128
  },
129
- l && {
129
+ d && {
130
130
  "tw:text-white": !0,
131
- "tw:bg-brand": o === "primary",
132
- "tw:highlight:bg-brand-dark tw:highlight:border-brand-dark": o === "primary",
133
- "tw:bg-zinc-500": o === "secondary",
134
- "tw:highlight:bg-zinc-600 tw:highlight:border-zinc-600": o === "secondary",
135
- "tw:bg-danger": o === "danger",
136
- "tw:highlight:bg-danger-dark tw:highlight:border-danger-dark": o === "danger"
131
+ "tw:bg-brand": n === "primary",
132
+ "tw:highlight:bg-brand-dark tw:highlight:border-brand-dark": n === "primary",
133
+ "tw:bg-zinc-500": n === "secondary",
134
+ "tw:highlight:bg-zinc-600 tw:highlight:border-zinc-600": n === "secondary",
135
+ "tw:bg-danger": n === "danger",
136
+ "tw:highlight:bg-danger-dark tw:highlight:border-danger-dark": n === "danger"
137
137
  },
138
- !r && {
139
- "tw:highlight:text-white": !l,
140
- "tw:highlight:bg-brand": o === "primary",
141
- "tw:highlight:bg-zinc-500": o === "secondary",
142
- "tw:highlight:bg-danger": o === "danger"
138
+ !e && {
139
+ "tw:highlight:text-white": !d,
140
+ "tw:highlight:bg-brand": n === "primary",
141
+ "tw:highlight:bg-zinc-500": n === "secondary",
142
+ "tw:highlight:bg-danger": n === "danger"
143
143
  },
144
144
  {
145
- "tw:pointer-events-none tw:opacity-65": r
145
+ "tw:pointer-events-none tw:opacity-65": e
146
146
  },
147
- e
147
+ r
148
148
  ),
149
- disabled: r,
150
- ...w,
149
+ disabled: e,
150
+ ...s,
151
151
  children: t
152
152
  }
153
153
  )
154
154
  );
155
- }, q = ({ className: t, onChange: e, ...r }) => {
156
- const o = L((d) => e == null ? void 0 : e(d.target.checked, d), [e]);
157
- return /* @__PURE__ */ n(
155
+ }, Q = b(({ className: t, onChange: r, ...e }, n) => {
156
+ const a = C((l) => r == null ? void 0 : r(l.target.checked, l), [r]);
157
+ return /* @__PURE__ */ o(
158
158
  "input",
159
159
  {
160
+ ref: n,
160
161
  type: "checkbox",
161
- className: x(
162
+ className: p(
162
163
  "tw:appearance-none tw:focus-ring",
163
164
  "tw:border-1 tw:border-lm-input-border tw:dark:border-dm-input-border",
164
165
  "tw:bg-lm-primary tw:dark:bg-dm-primary tw:checked:bg-brand tw:bg-no-repeat",
@@ -166,475 +167,548 @@ const N = M(void 0), y = M({ responsive: !0 }), st = ({ children: t, className:
166
167
  "tw:group-[&]/card:bg-lm-input tw:group-[&]/card:dark:bg-dm-input",
167
168
  t
168
169
  ),
169
- onChange: o,
170
- ...r
170
+ onChange: a,
171
+ ...e
171
172
  }
172
173
  );
173
- }, Ut = ({ className: t, ...e }) => /* @__PURE__ */ n(
174
- q,
174
+ }), Qt = b(({ className: t, ...r }, e) => /* @__PURE__ */ o(
175
+ Q,
175
176
  {
176
- className: x("tw:rounded-sm tw:w-4 tw:h-4 tw:checked:bg-(image:--tick) tw:bg-center", t),
177
- ...e
177
+ ref: e,
178
+ className: p("tw:rounded-sm tw:w-4 tw:h-4 tw:checked:bg-(image:--tick) tw:bg-center", t),
179
+ ...r
178
180
  }
179
- ), $ = ({ onClick: t, label: e = "Close" }) => /* @__PURE__ */ n(
181
+ )), q = ({ onClick: t, label: r = "Close" }) => /* @__PURE__ */ o(
180
182
  "button",
181
183
  {
182
184
  onClick: t,
183
- className: s(
185
+ className: w(
184
186
  "tw:opacity-50 tw:highlight:opacity-80 tw:transition-opacity",
185
187
  "tw:rounded-md tw:focus-ring"
186
188
  ),
187
- "aria-label": e,
188
- children: /* @__PURE__ */ n(p, { icon: ot, size: "xl" })
189
+ "aria-label": r,
190
+ children: /* @__PURE__ */ o(u, { icon: nt, size: "xl" })
189
191
  }
190
- ), G = ({
192
+ ), H = b(({
191
193
  borderless: t = !1,
192
- size: e = "md",
193
- feedback: r,
194
- className: o,
195
- disabled: d,
196
- readOnly: a,
197
- ...l
198
- }) => {
199
- const w = !d && !a;
200
- return /* @__PURE__ */ n(
194
+ size: r = "md",
195
+ feedback: e,
196
+ className: n,
197
+ disabled: a,
198
+ readOnly: l,
199
+ ...d
200
+ }, s) => {
201
+ const c = !a && !l;
202
+ return /* @__PURE__ */ o(
201
203
  "input",
202
204
  {
203
- className: s(
205
+ ref: s,
206
+ className: w(
204
207
  "tw:w-full",
205
208
  {
206
- "tw:focus-ring": !r,
207
- "tw:focus-ring-danger": r === "error"
209
+ "tw:focus-ring": !e,
210
+ "tw:focus-ring-danger": e === "error"
208
211
  },
209
212
  {
210
- "tw:px-2 tw:py-1 tw:text-sm": e === "sm",
211
- "tw:px-3 tw:py-1.5": e === "md",
212
- "tw:px-4 tw:py-2 tw:text-xl": e === "lg"
213
+ "tw:px-2 tw:py-1 tw:text-sm": r === "sm",
214
+ "tw:px-3 tw:py-1.5": r === "md",
215
+ "tw:px-4 tw:py-2 tw:text-xl": r === "lg"
213
216
  },
214
217
  {
215
218
  "tw:rounded-md tw:border": !t,
216
- "tw:border-lm-input-border tw:dark:border-dm-input-border": !t && !r,
217
- "tw:border-danger": !t && r === "error",
218
- "tw:bg-lm-disabled-input tw:dark:bg-dm-disabled-input": !w,
219
- "tw:bg-lm-primary tw:dark:bg-dm-primary": w,
219
+ "tw:border-lm-input-border tw:dark:border-dm-input-border": !t && !e,
220
+ "tw:border-danger": !t && e === "error",
221
+ "tw:bg-lm-disabled-input tw:dark:bg-dm-disabled-input": !c,
222
+ "tw:bg-lm-primary tw:dark:bg-dm-primary": c,
220
223
  // Use different background color when rendered inside a card
221
- "tw:group-[&]/card:bg-lm-input tw:group-[&]/card:dark:bg-dm-input": w
224
+ "tw:group-[&]/card:bg-lm-input tw:group-[&]/card:dark:bg-dm-input": c
222
225
  },
223
- o
226
+ n
224
227
  ),
225
- disabled: d,
226
- readOnly: a,
227
- ...l
228
+ disabled: a,
229
+ readOnly: l,
230
+ ...d
228
231
  }
229
232
  );
230
- }, J = ({ required: t, children: e, ...r }) => /* @__PURE__ */ i("label", { ...r, children: [
231
- e,
232
- t && /* @__PURE__ */ n("span", { className: "tw:text-danger tw:ml-1", "data-testid": "required-indicator", children: "*" })
233
- ] }), zt = ({ label: t, inputClassName: e, required: r, hiddenRequired: o, error: d, ...a }) => {
234
- const l = U();
233
+ }), D = ({ required: t, children: r, ...e }) => /* @__PURE__ */ i("label", { ...e, children: [
234
+ r,
235
+ t && /* @__PURE__ */ o("span", { className: "tw:text-danger tw:ml-1", "data-testid": "required-indicator", children: "*" })
236
+ ] }), Vt = b(({ label: t, inputClassName: r, required: e, hiddenRequired: n, error: a, ...l }, d) => {
237
+ const s = j();
235
238
  return /* @__PURE__ */ i("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
236
- /* @__PURE__ */ n(J, { htmlFor: l, required: r, children: t }),
237
- /* @__PURE__ */ n(
238
- G,
239
+ /* @__PURE__ */ o(D, { htmlFor: s, required: e, children: t }),
240
+ /* @__PURE__ */ o(
241
+ H,
239
242
  {
240
- id: l,
241
- className: e,
242
- required: r || o,
243
- feedback: d ? "error" : void 0,
244
- ...a
243
+ ref: d,
244
+ id: s,
245
+ className: r,
246
+ required: e || n,
247
+ feedback: a ? "error" : void 0,
248
+ ...l
249
+ }
250
+ ),
251
+ a && /* @__PURE__ */ o("span", { className: "tw:text-danger", children: a })
252
+ ] });
253
+ }), yt = b(({ containerClassName: t, className: r, size: e, ...n }, a) => {
254
+ const [l, d, , s] = wt(!1), c = it(), m = C(({ relatedTarget: y }) => {
255
+ var g;
256
+ (g = c.current) != null && g.contains(y) || s();
257
+ }, [c, s]);
258
+ return /* @__PURE__ */ i(
259
+ "div",
260
+ {
261
+ className: p("tw:group tw:relative", t),
262
+ ref: c,
263
+ onBlurCapture: m,
264
+ children: [
265
+ /* @__PURE__ */ o(
266
+ H,
267
+ {
268
+ ref: a,
269
+ type: l ? "text" : "password",
270
+ className: p(
271
+ {
272
+ "tw:pr-10": e !== "sm",
273
+ "tw:pr-8": e === "sm"
274
+ },
275
+ r
276
+ ),
277
+ size: e,
278
+ "data-testid": "input",
279
+ ...n
280
+ }
281
+ ),
282
+ /* @__PURE__ */ o(
283
+ "button",
284
+ {
285
+ onClick: d,
286
+ title: l ? "Hide password" : "Show password",
287
+ "aria-label": l ? "Hide password" : "Show password",
288
+ className: p(
289
+ "tw:absolute tw:top-[50%] tw:translate-y-[-50%] tw:px-1",
290
+ "tw:text-placeholder tw:hover:text-lm-text tw:hover:dark:text-dm-text tw:transition-colors",
291
+ {
292
+ "tw:right-1.5": e !== "sm",
293
+ "tw:scale-85 tw:right-1": e === "sm"
294
+ }
295
+ ),
296
+ tabIndex: -1,
297
+ children: /* @__PURE__ */ o(u, { fixedWidth: !0, icon: l ? at : dt })
298
+ }
299
+ )
300
+ ]
301
+ }
302
+ );
303
+ }), Xt = b(({ label: t, inputClassName: r, required: e, hiddenRequired: n, error: a, ...l }, d) => {
304
+ const s = j();
305
+ return /* @__PURE__ */ i("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
306
+ /* @__PURE__ */ o(D, { htmlFor: s, required: e, children: t }),
307
+ /* @__PURE__ */ o(
308
+ yt,
309
+ {
310
+ ref: d,
311
+ id: s,
312
+ className: r,
313
+ required: e || n,
314
+ feedback: a ? "error" : void 0,
315
+ ...l
245
316
  }
246
317
  ),
247
- d && /* @__PURE__ */ n("span", { className: "tw:text-danger", children: d })
318
+ a && /* @__PURE__ */ o("span", { className: "tw:text-danger", children: a })
248
319
  ] });
249
- }, ut = ({
320
+ }), kt = b(({
250
321
  className: t,
251
- size: e = "md",
252
- feedback: r,
253
- style: o = {},
254
- disabled: d,
255
- ...a
256
- }) => /* @__PURE__ */ n(
322
+ size: r = "md",
323
+ feedback: e,
324
+ style: n = {},
325
+ disabled: a,
326
+ ...l
327
+ }, d) => /* @__PURE__ */ o(
257
328
  "select",
258
329
  {
259
- className: s(
330
+ ref: d,
331
+ className: w(
260
332
  "tw:w-full tw:appearance-none tw:pr-9",
261
333
  "tw:bg-(image:--chevron-down) tw:bg-no-repeat",
262
334
  {
263
- "tw:focus-ring": !r,
264
- "tw:focus-ring-danger": r === "error"
335
+ "tw:focus-ring": !e,
336
+ "tw:focus-ring-danger": e === "error"
265
337
  },
266
338
  "tw:rounded-md tw:border",
267
339
  {
268
- "tw:border-lm-input-border tw:dark:border-dm-input-border": !r,
269
- "tw:border-danger": r === "error"
340
+ "tw:border-lm-input-border tw:dark:border-dm-input-border": !e,
341
+ "tw:border-danger": e === "error"
270
342
  },
271
343
  {
272
- "tw:pl-2 tw:py-1 tw:text-sm": e === "sm",
273
- "tw:pl-3 tw:py-1.5": e === "md",
274
- "tw:pl-4 tw:py-2 tw:text-xl": e === "lg",
275
- "tw:bg-lm-disabled-input tw:dark:bg-dm-disabled-input": d,
344
+ "tw:pl-2 tw:py-1 tw:text-sm": r === "sm",
345
+ "tw:pl-3 tw:py-1.5": r === "md",
346
+ "tw:pl-4 tw:py-2 tw:text-xl": r === "lg",
347
+ "tw:bg-lm-disabled-input tw:dark:bg-dm-disabled-input": a,
276
348
  // Apply different background color when rendered inside a card
277
- "tw:bg-lm-primary tw:dark:bg-dm-primary tw:group-[&]/card:bg-lm-input tw:group-[&]/card:dark:bg-dm-input": !d
349
+ "tw:bg-lm-primary tw:dark:bg-dm-primary tw:group-[&]/card:bg-lm-input tw:group-[&]/card:dark:bg-dm-input": !a
278
350
  },
279
351
  t
280
352
  ),
281
353
  style: {
282
- ...o,
354
+ ...n,
283
355
  background: "right 0.75rem center / 16px 12px"
284
356
  },
285
- disabled: d,
286
- ...a
357
+ disabled: a,
358
+ ...l
287
359
  }
288
- ), Wt = ({ selectClassName: t, label: e, required: r, hiddenRequired: o, ...d }) => {
289
- const a = U();
360
+ )), Yt = b(({ selectClassName: t, label: r, required: e, hiddenRequired: n, ...a }, l) => {
361
+ const d = j();
290
362
  return /* @__PURE__ */ i("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
291
- /* @__PURE__ */ n(J, { htmlFor: a, required: r, children: e }),
292
- /* @__PURE__ */ n(ut, { id: a, className: t, required: r || o, ...d })
363
+ /* @__PURE__ */ o(D, { htmlFor: d, required: e, children: r }),
364
+ /* @__PURE__ */ o(kt, { ref: l, id: d, className: t, required: e || n, ...a })
293
365
  ] });
294
- }, qt = ({
366
+ }), Zt = b(({
295
367
  onChange: t,
296
- containerClassName: e,
297
- inputClassName: r,
368
+ containerClassName: r,
369
+ inputClassName: e,
298
370
  // Inputs have a default 'md' size. Search inputs are usually 'lg' as they are rendered at the top of sections
299
- size: o = "lg",
300
- ...d
301
- }) => {
302
- const { setTimeout: a, clearCurrentTimeout: l } = at(500), w = L((c) => {
303
- c ? a(() => t(c)) : (l(), t(c));
304
- }, [l, t, a]);
305
- return /* @__PURE__ */ i("div", { className: s("tw:group tw:relative tw:focus-within:z-10", e), children: [
306
- /* @__PURE__ */ n(
307
- p,
371
+ size: n = "lg",
372
+ ...a
373
+ }, l) => {
374
+ const { setTimeout: d, clearCurrentTimeout: s } = ct(500), c = C((m) => {
375
+ m ? d(() => t(m)) : (s(), t(m));
376
+ }, [s, t, d]);
377
+ return /* @__PURE__ */ i("div", { className: w("tw:group tw:relative tw:focus-within:z-10", r), children: [
378
+ /* @__PURE__ */ o(
379
+ u,
308
380
  {
309
- icon: nt,
310
- className: s(
381
+ icon: lt,
382
+ className: w(
311
383
  "tw:absolute tw:top-[50%] tw:translate-y-[-50%] tw:transition-colors",
312
384
  "tw:text-placeholder tw:group-focus-within:text-lm-text tw:dark:group-focus-within:text-dm-text",
313
385
  {
314
- "tw:left-3": o !== "sm",
315
- "tw:scale-85 tw:left-2": o === "sm"
386
+ "tw:left-3": n !== "sm",
387
+ "tw:scale-85 tw:left-2": n === "sm"
316
388
  }
317
389
  )
318
390
  }
319
391
  ),
320
- /* @__PURE__ */ n(
321
- G,
392
+ /* @__PURE__ */ o(
393
+ H,
322
394
  {
395
+ ref: l,
323
396
  type: "search",
324
- className: s(
397
+ className: w(
325
398
  {
326
- "tw:pl-9": o !== "sm",
327
- "tw:pl-7": o === "sm"
399
+ "tw:pl-9": n !== "sm",
400
+ "tw:pl-7": n === "sm"
328
401
  },
329
- r
402
+ e
330
403
  ),
331
404
  placeholder: "Search...",
332
- onChange: (c) => w(c.target.value),
333
- size: o,
334
- ...d
405
+ onChange: (m) => c(m.target.value),
406
+ size: n,
407
+ ...a
335
408
  }
336
409
  )
337
410
  ] });
338
- }, Gt = ({ className: t, ...e }) => /* @__PURE__ */ n(
339
- q,
411
+ }), zt = b(({ className: t, ...r }, e) => /* @__PURE__ */ o(
412
+ Q,
340
413
  {
341
- className: x(
414
+ ref: e,
415
+ className: p(
342
416
  "tw:rounded-full tw:w-8 tw:h-4",
343
417
  "tw:bg-(image:--circle-grey-dark) tw:dark:bg-(image:--circle-grey-light) tw:checked:bg-(image:--circle-white)",
344
418
  "tw:focus-visible:not-checked:bg-(image:--circle-light-blue)",
345
419
  "tw:checked:bg-right tw:transition-[background-position]",
346
420
  t
347
421
  ),
348
- ...e
422
+ ...r
349
423
  }
350
- ), pt = ({ className: t, disabled: e, size: r = "md", ...o }) => /* @__PURE__ */ n(
424
+ )), Nt = ({ className: t, disabled: r, size: e = "md", ...n }) => /* @__PURE__ */ o(
351
425
  "button",
352
426
  {
353
- className: s(
427
+ className: w(
354
428
  "tw:inline-flex tw:rounded-md tw:focus-ring",
355
429
  "tw:text-brand tw:highlight:text-brand-dark tw:highlight:underline",
356
430
  {
357
- "tw:px-1.5 tw:py-1 tw:text-sm": r === "sm",
358
- "tw:px-3 tw:py-1.5": r === "md",
359
- "tw:px-4 tw:py-2 tw:text-lg": r === "lg",
360
- "tw:pointer-events-none tw:opacity-65": e
431
+ "tw:px-1.5 tw:py-1 tw:text-sm": e === "sm",
432
+ "tw:px-3 tw:py-1.5": e === "md",
433
+ "tw:px-4 tw:py-2 tw:text-lg": e === "lg",
434
+ "tw:pointer-events-none tw:opacity-65": r
361
435
  },
362
436
  t
363
437
  ),
364
- disabled: e,
365
- ...o
438
+ disabled: r,
439
+ ...n
366
440
  }
367
- ), ht = ({ className: t, ...e }) => /* @__PURE__ */ n(
441
+ ), vt = ({ className: t, ...r }) => /* @__PURE__ */ o(
368
442
  "div",
369
443
  {
370
- className: s(
444
+ className: w(
371
445
  "tw:px-4 tw:py-3 tw:rounded-t-md",
372
446
  "tw:bg-lm-primary tw:dark:bg-dm-primary tw:border-b tw:border-lm-border tw:dark:border-dm-border",
373
447
  t
374
448
  ),
375
- ...e
449
+ ...r
376
450
  }
377
- ), ft = ({ className: t, ...e }) => /* @__PURE__ */ n(
451
+ ), Pt = ({ className: t, ...r }) => /* @__PURE__ */ o(
378
452
  "div",
379
453
  {
380
- className: s(
454
+ className: w(
381
455
  "tw:p-4 tw:bg-lm-primary tw:dark:bg-dm-primary tw:first:rounded-t-md",
382
456
  "tw:first:rounded-t-md tw:last:rounded-b-md",
383
457
  t
384
458
  ),
385
- ...e
459
+ ...r
386
460
  }
387
- ), xt = ({ className: t, ...e }) => /* @__PURE__ */ n(
461
+ ), Ct = ({ className: t, ...r }) => /* @__PURE__ */ o(
388
462
  "div",
389
463
  {
390
- className: s(
464
+ className: w(
391
465
  "tw:px-4 tw:py-3 tw:rounded-b-md",
392
466
  "tw:bg-lm-primary tw:dark:bg-dm-primary tw:border-t tw:border-lm-border tw:dark:border-dm-border",
393
467
  t
394
468
  ),
395
- ...e
469
+ ...r
396
470
  }
397
- ), yt = ({ className: t, ...e }) => /* @__PURE__ */ n(
471
+ ), It = ({ className: t, ...r }) => /* @__PURE__ */ o(
398
472
  "div",
399
473
  {
400
- className: s(
474
+ className: w(
401
475
  "tw:group/card tw:rounded-md tw:shadow-md",
402
476
  "tw:border tw:border-lm-border tw:dark:border-dm-border tw:bg-lm-primary tw:dark:bg-dm-primary",
403
477
  t
404
478
  ),
405
- ...e
479
+ ...r
406
480
  }
407
- ), m = Object.assign(yt, { Body: ft, Header: ht, Footer: xt }), kt = ({ bodyClassName: t, children: e, ...r }) => {
408
- const { title: o, titleSize: d = "md", ...a } = "title" in r ? r : {
409
- ...r,
481
+ ), h = Object.assign(It, { Body: Pt, Header: vt, Footer: Ct }), Rt = ({ bodyClassName: t, children: r, ...e }) => {
482
+ const { title: n, titleSize: a = "md", ...l } = "title" in e ? e : {
483
+ ...e,
410
484
  title: void 0,
411
485
  titleSize: void 0
412
486
  };
413
- return /* @__PURE__ */ i(m, { ...a, children: [
414
- o && /* @__PURE__ */ i(m.Header, { children: [
415
- d === "lg" && /* @__PURE__ */ n("h4", { children: o }),
416
- d === "md" && /* @__PURE__ */ n("h5", { children: o }),
417
- d === "sm" && /* @__PURE__ */ n("h6", { children: o })
487
+ return /* @__PURE__ */ i(h, { ...l, children: [
488
+ n && /* @__PURE__ */ i(h.Header, { children: [
489
+ a === "lg" && /* @__PURE__ */ o("h4", { children: n }),
490
+ a === "md" && /* @__PURE__ */ o("h5", { children: n }),
491
+ a === "sm" && /* @__PURE__ */ o("h6", { children: n })
418
492
  ] }),
419
- /* @__PURE__ */ n(m.Body, { className: t, children: e })
493
+ /* @__PURE__ */ o(h.Body, { className: t, children: r })
420
494
  ] });
421
- }, K = M(null), Nt = ({ className: t, to: e, ...r }) => {
422
- const o = g(K);
423
- return /* @__PURE__ */ n(
424
- rt,
495
+ }, V = M(null), Tt = ({ className: t, to: r, ...e }) => {
496
+ const n = f(V);
497
+ return /* @__PURE__ */ o(
498
+ ot,
425
499
  {
426
500
  role: "menuitem",
427
- to: e,
428
- className: ({ isActive: d }) => s(
501
+ to: r,
502
+ className: ({ isActive: a }) => w(
429
503
  "tw:px-4 tw:pt-2 tw:pb-[calc(0.5rem-3px)] tw:border-b-3",
430
504
  "tw:font-bold tw:no-underline tw:text-center tw:highlight:text-brand tw:transition-colors",
431
505
  "tw:rounded-none tw:outline-none tw:focus-visible:inset-ring-2 tw:focus-visible:inset-ring-brand/50",
432
506
  {
433
- "tw:border-b-brand active": d,
434
- "tw:border-b-transparent tw:text-gray-500": !d,
435
- "tw:flex-grow": o == null ? void 0 : o.fill
507
+ "tw:border-b-brand active": a,
508
+ "tw:border-b-transparent tw:text-gray-500": !a,
509
+ "tw:flex-grow": n == null ? void 0 : n.fill
436
510
  },
437
511
  t
438
512
  ),
439
- ...r
513
+ ...e
440
514
  }
441
515
  );
442
- }, vt = ({ children: t, className: e, fill: r }) => /* @__PURE__ */ n(K.Provider, { value: { fill: r }, children: /* @__PURE__ */ n(m, { role: "menubar", className: s("tw:flex tw:overflow-hidden", e), children: t }) }), Jt = Object.assign(vt, { Pill: Nt }), Pt = new Intl.NumberFormat("en-US"), Ct = (t) => Pt.format(Number(t)), A = 10, Kt = (t) => Math.ceil(t / A) * A, f = 2, I = "...", Tt = (t, e) => Array.from({ length: e - t }, (r, o) => t + o), It = (t, e) => {
443
- const r = Tt(
444
- Math.max(f, t - f),
445
- Math.min(e - 1, t + f) + 1
516
+ }, Bt = ({ children: t, className: r, fill: e }) => /* @__PURE__ */ o(V.Provider, { value: { fill: e }, children: /* @__PURE__ */ o(h, { role: "menubar", className: w("tw:flex tw:overflow-hidden", r), children: t }) }), te = Object.assign(Bt, { Pill: Tt }), Lt = new Intl.NumberFormat("en-US"), St = (t) => Lt.format(Number(t)), G = 10, ee = (t) => Math.ceil(t / G) * G, N = 2, B = "...", Et = (t, r) => Array.from({ length: r - t }, (e, n) => t + n), Ft = (t, r) => {
517
+ const e = Et(
518
+ Math.max(N, t - N),
519
+ Math.min(r - 1, t + N) + 1
446
520
  );
447
- return t - f > f && r.unshift(I), t + f < e - 1 && r.push(I), r.unshift(1), r.push(e), r;
448
- }, k = (t) => t === I, Lt = (t) => k(t) ? t : Ct(t), Bt = (t, e) => k(t) ? `${t}_${e}` : `${t}`, Q = [
521
+ return t - N > N && e.unshift(B), t + N < r - 1 && e.push(B), e.unshift(1), e.push(r), e;
522
+ }, P = (t) => t === B, _t = (t) => P(t) ? t : St(t), Mt = (t, r) => P(t) ? `${t}_${r}` : `${t}`, X = [
449
523
  "tw:border tw:border-r-0 tw:last:border-r tw:border-lm-border tw:dark:border-dm-border",
450
524
  "tw:rounded-none tw:first:rounded-l tw:last:rounded-r"
451
- ], V = (t = !1) => s(
452
- Q,
525
+ ], Y = (t = !1) => w(
526
+ X,
453
527
  "tw:px-3 py-2 tw:cursor-pointer tw:no-underline",
454
528
  "tw:focus-ring tw:focus-visible:z-1",
455
529
  {
456
530
  "tw:highlight:bg-lm-secondary tw:dark:highlight:bg-dm-secondary tw:text-brand": !t,
457
531
  "tw:bg-lm-brand tw:dark:bg-dm-brand tw:text-white": t
458
532
  }
459
- ), E = ({ children: t }) => /* @__PURE__ */ n("span", { "aria-hidden": !0, className: s(Q, "tw:px-3 py-2 tw:text-gray-400"), children: t }), X = () => /* @__PURE__ */ n(E, { children: I });
460
- function St({ children: t, active: e, isEllipsis: r, href: o, ...d }) {
461
- const a = z(() => V(e), [e]);
462
- return r ? /* @__PURE__ */ n(X, {}) : /* @__PURE__ */ n(W, { className: a, to: o, ...d, children: t });
533
+ ), _ = ({ children: t }) => /* @__PURE__ */ o("span", { "aria-hidden": !0, className: w(X, "tw:px-3 py-2 tw:text-gray-400"), children: t }), Z = () => /* @__PURE__ */ o(_, { children: B });
534
+ function jt({ children: t, active: r, isEllipsis: e, href: n, ...a }) {
535
+ const l = J(() => Y(r), [r]);
536
+ return e ? /* @__PURE__ */ o(Z, {}) : /* @__PURE__ */ o(K, { className: l, to: n, ...a, children: t });
463
537
  }
464
- function _t({ children: t, active: e, isEllipsis: r, ...o }) {
465
- const d = z(() => V(e), [e]);
466
- return r ? /* @__PURE__ */ n(X, {}) : /* @__PURE__ */ n("button", { type: "button", className: d, ...o, children: t });
538
+ function Ht({ children: t, active: r, isEllipsis: e, ...n }) {
539
+ const a = J(() => Y(r), [r]);
540
+ return e ? /* @__PURE__ */ o(Z, {}) : /* @__PURE__ */ o("button", { type: "button", className: a, ...n, children: t });
467
541
  }
468
- const Qt = ({ currentPage: t, pagesCount: e, ...r }) => {
469
- const o = "urlForPage" in r, d = o ? St : _t, a = L(
470
- (l) => o ? { href: k(l) ? void 0 : r.urlForPage(l) } : { onClick: () => !k(l) && r.onPageChange(l) },
471
- [o, r]
542
+ const re = ({ currentPage: t, pagesCount: r, ...e }) => {
543
+ const n = "urlForPage" in e, a = n ? jt : Ht, l = C(
544
+ (d) => n ? { href: P(d) ? void 0 : e.urlForPage(d) } : { onClick: () => !P(d) && e.onPageChange(d) },
545
+ [n, e]
472
546
  );
473
- return e < 2 ? null : /* @__PURE__ */ i("div", { className: "tw:select-none tw:flex", "data-testid": "paginator", children: [
474
- t === 1 ? /* @__PURE__ */ n(E, { children: /* @__PURE__ */ n(p, { size: "xs", icon: H }) }) : /* @__PURE__ */ n(d, { ...a(Math.max(1, t - 1)), "aria-label": "Previous", children: /* @__PURE__ */ n(p, { size: "xs", icon: H }) }),
475
- It(t, e).map((l, w) => /* @__PURE__ */ n(
476
- d,
547
+ return r < 2 ? null : /* @__PURE__ */ i("div", { className: "tw:select-none tw:flex", "data-testid": "paginator", children: [
548
+ t === 1 ? /* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(u, { size: "xs", icon: U }) }) : /* @__PURE__ */ o(a, { ...l(Math.max(1, t - 1)), "aria-label": "Previous", children: /* @__PURE__ */ o(u, { size: "xs", icon: U }) }),
549
+ Ft(t, r).map((d, s) => /* @__PURE__ */ o(
550
+ a,
477
551
  {
478
- active: l === t,
479
- isEllipsis: k(l),
480
- ...a(l),
481
- children: Lt(l)
552
+ active: d === t,
553
+ isEllipsis: P(d),
554
+ ...l(d),
555
+ children: _t(d)
482
556
  },
483
- Bt(l, w)
557
+ Mt(d, s)
484
558
  )),
485
- t === e ? /* @__PURE__ */ n(E, { children: /* @__PURE__ */ n(p, { size: "xs", icon: O }) }) : /* @__PURE__ */ n(d, { ...a(Math.min(e, t + 1)), "aria-label": "Next", children: /* @__PURE__ */ n(p, { size: "xs", icon: O }) })
559
+ t === r ? /* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(u, { size: "xs", icon: W }) }) : /* @__PURE__ */ o(a, { ...l(Math.min(r, t + 1)), "aria-label": "Next", children: /* @__PURE__ */ o(u, { size: "xs", icon: W }) })
486
560
  ] });
487
- }, Ft = ({
561
+ }, Dt = ({
488
562
  open: t,
489
- children: e,
490
- className: r,
491
- onClose: o,
492
- ...d
563
+ children: r,
564
+ className: e,
565
+ onClose: n,
566
+ ...a
493
567
  }) => {
494
- const a = _(null);
568
+ const l = E(null);
495
569
  return F(() => {
496
- var v, P;
497
- const l = document.body, w = l.style.overflow, c = l.style.paddingRight;
570
+ var m, y;
571
+ const d = document.body, s = d.style.overflow, c = d.style.paddingRight;
498
572
  if (t) {
499
- const b = window.outerWidth - l.clientWidth, h = l.scrollHeight > l.clientHeight;
500
- l.style.overflow = "hidden", h && (l.style.paddingRight = `${b}px`), (v = a.current) == null || v.showModal();
573
+ const g = window.outerWidth - d.clientWidth, k = d.scrollHeight > d.clientHeight;
574
+ d.style.overflow = "hidden", k && (d.style.paddingRight = `${g}px`), (m = l.current) == null || m.showModal();
501
575
  } else
502
- (P = a.current) == null || P.close();
576
+ (y = l.current) == null || y.close();
503
577
  return () => {
504
- l.style.overflow = w, l.style.paddingRight = c;
578
+ d.style.overflow = s, d.style.paddingRight = c;
505
579
  };
506
- }, [t]), lt(
507
- /* @__PURE__ */ n(
580
+ }, [t]), mt(
581
+ /* @__PURE__ */ o(
508
582
  "dialog",
509
583
  {
510
- ref: a,
511
- className: s("tw:bg-transparent tw:backdrop:bg-black/50", r),
512
- onCancel: (l) => {
513
- l.preventDefault(), o();
584
+ ref: l,
585
+ className: w("tw:bg-transparent tw:backdrop:bg-black/50", e),
586
+ onCancel: (d) => {
587
+ d.preventDefault(), n();
514
588
  },
515
- ...d,
516
- children: t && e
589
+ ...a,
590
+ children: t && r
517
591
  }
518
592
  ),
519
593
  document.body
520
594
  );
521
- }, Vt = ({
595
+ }, oe = ({
522
596
  open: t,
523
- onClose: e,
524
- variant: r = "default",
525
- title: o,
526
- children: d,
527
- className: a,
528
- ...l
597
+ onClose: r,
598
+ variant: e = "default",
599
+ title: n,
600
+ children: a,
601
+ className: l,
602
+ ...d
529
603
  }) => {
530
604
  const {
531
- size: w = "md",
605
+ size: s = "md",
532
606
  confirmText: c = "Confirm",
533
- cancelText: v = "Cancel",
534
- confirmDisabled: P,
535
- onConfirm: b,
536
- onClosed: h,
537
- ...Y
538
- } = "onConfirm" in l ? l : { ...l }, [C, R] = et(t), T = _(null), B = _("cancel"), Z = L(() => {
539
- B.current = "confirm", b == null || b();
540
- }, [b]);
607
+ cancelText: m = "Cancel",
608
+ confirmDisabled: y,
609
+ onConfirm: g,
610
+ onClosed: k,
611
+ ...z
612
+ } = "onConfirm" in d ? d : { ...d }, [R, O] = rt(t), T = E(null), L = E("cancel"), tt = C(() => {
613
+ L.current = "confirm", g == null || g();
614
+ }, [g]);
541
615
  return F(() => {
542
616
  if (t) {
543
- B.current = "cancel", R(!0);
617
+ L.current = "cancel", O(!0);
544
618
  return;
545
619
  }
546
- const u = T.current;
547
- if (u) {
620
+ const x = T.current;
621
+ if (x) {
548
622
  delete T.current.dataset.open;
549
- let j = !1;
550
- const D = (tt) => {
551
- j || tt.target !== u || (j = !0, R(!1), h == null || h(B.current));
623
+ let $ = !1;
624
+ const A = (et) => {
625
+ $ || et.target !== x || ($ = !0, O(!1), k == null || k(L.current));
552
626
  };
553
- return u.addEventListener("transitionend", D), () => {
554
- u.removeEventListener("transitionend", D);
627
+ return x.addEventListener("transitionend", A), () => {
628
+ x.removeEventListener("transitionend", A);
555
629
  };
556
630
  }
557
- }, [h, t]), F(() => {
558
- const u = T.current;
559
- C && u && (u.dataset.open = "");
560
- }, [C]), /* @__PURE__ */ n(
561
- Ft,
631
+ }, [k, t]), F(() => {
632
+ const x = T.current;
633
+ R && x && (x.dataset.open = "");
634
+ }, [R]), /* @__PURE__ */ o(
635
+ Dt,
562
636
  {
563
- open: C,
564
- onClose: e,
565
- className: s(
637
+ open: R,
638
+ onClose: r,
639
+ className: w(
566
640
  {
567
- "tw:flex tw:w-screen tw:h-screen tw:max-w-screen tw:max-h-screen": C,
568
- "tw:overflow-hidden": r === "cover"
641
+ "tw:flex tw:w-screen tw:h-screen tw:max-w-screen tw:max-h-screen": R,
642
+ "tw:overflow-hidden": e === "cover"
569
643
  },
570
- a
644
+ l
571
645
  ),
572
- ...Y,
573
- children: /* @__PURE__ */ n(
646
+ ...z,
647
+ children: /* @__PURE__ */ o(
574
648
  "div",
575
649
  {
576
650
  "data-testid": "transition-container",
577
651
  ref: T,
578
- className: s(
652
+ className: w(
579
653
  "tw:w-full tw:m-auto tw:p-4 tw:sm:p-6",
580
654
  // CSS transitions are based on the presence of the `data-open` attribute
581
655
  "tw:-translate-y-4 tw:data-open:translate-y-0 tw:opacity-0 tw:data-open:opacity-100",
582
656
  "tw:transition-[opacity_,_translate] tw:duration-300",
583
657
  // Handle modal dimensions for different variants and sizes
584
- r !== "cover" && {
585
- "tw:sm:w-sm": w === "sm",
586
- "tw:md:w-lg": w === "md",
587
- "tw:md:w-4xl": w === "lg",
588
- "tw:md:w-6xl": w === "xl"
658
+ e !== "cover" && {
659
+ "tw:sm:w-sm": s === "sm",
660
+ "tw:md:w-lg": s === "md",
661
+ "tw:md:w-4xl": s === "lg",
662
+ "tw:md:w-6xl": s === "xl"
589
663
  },
590
- { "tw:h-full": r === "cover" }
664
+ { "tw:h-full": e === "cover" }
591
665
  ),
592
- children: /* @__PURE__ */ n(m, { className: s(
666
+ children: /* @__PURE__ */ o(h, { className: w(
593
667
  "tw:w-full",
594
- { "tw:h-full tw:relative tw:overflow-auto": r === "cover" }
595
- ), children: r === "cover" ? /* @__PURE__ */ i(S, { children: [
668
+ { "tw:h-full tw:relative tw:overflow-auto": e === "cover" }
669
+ ), children: e === "cover" ? /* @__PURE__ */ i(S, { children: [
596
670
  /* @__PURE__ */ i(
597
671
  "div",
598
672
  {
599
- className: s(
673
+ className: w(
600
674
  "tw:px-4 tw:py-3 tw:absolute tw:top-0 tw:left-0 tw:right-0",
601
675
  "tw:flex tw:items-center tw:justify-between",
602
676
  "tw:text-white tw:bg-linear-to-b tw:from-black/70 tw:to-black/10",
603
677
  "tw:[text-shadow:_0_2px_4px_rgb(0_0_0/_0.8)]"
604
678
  ),
605
679
  children: [
606
- /* @__PURE__ */ n("h5", { children: o }),
607
- /* @__PURE__ */ n($, { onClick: e, label: "Close dialog" })
680
+ /* @__PURE__ */ o("h5", { children: n }),
681
+ /* @__PURE__ */ o(q, { onClick: r, label: "Close dialog" })
608
682
  ]
609
683
  }
610
684
  ),
611
- /* @__PURE__ */ n("div", { children: d })
685
+ /* @__PURE__ */ o("div", { children: a })
612
686
  ] }) : /* @__PURE__ */ i(S, { children: [
613
- /* @__PURE__ */ i(m.Header, { className: s(
687
+ /* @__PURE__ */ i(h.Header, { className: w(
614
688
  "tw:sticky tw:top-0",
615
689
  "tw:flex tw:items-center tw:justify-between tw:gap-x-2"
616
690
  ), children: [
617
- /* @__PURE__ */ n("h5", { className: s({ "tw:text-danger": r === "danger" }), children: o }),
618
- /* @__PURE__ */ n($, { onClick: e, label: "Close dialog" })
691
+ /* @__PURE__ */ o("h5", { className: w({ "tw:text-danger": e === "danger" }), children: n }),
692
+ /* @__PURE__ */ o(q, { onClick: r, label: "Close dialog" })
619
693
  ] }),
620
- /* @__PURE__ */ n(m.Body, { children: d }),
621
- b && /* @__PURE__ */ i(
622
- m.Footer,
694
+ /* @__PURE__ */ o(h.Body, { children: a }),
695
+ g && /* @__PURE__ */ i(
696
+ h.Footer,
623
697
  {
624
698
  "data-testid": "footer",
625
- className: s(
699
+ className: w(
626
700
  "tw:flex tw:justify-end tw:items-center tw:gap-x-2",
627
701
  "tw:[&]:px-3 tw:sticky tw:bottom-0"
628
702
  ),
629
703
  children: [
630
- /* @__PURE__ */ n(pt, { onClick: e, children: v }),
631
- /* @__PURE__ */ n(
632
- bt,
704
+ /* @__PURE__ */ o(Nt, { onClick: r, children: m }),
705
+ /* @__PURE__ */ o(
706
+ xt,
633
707
  {
634
708
  solid: !0,
635
- variant: r === "danger" ? "danger" : "primary",
636
- disabled: P,
637
- onClick: Z,
709
+ variant: e === "danger" ? "danger" : "primary",
710
+ disabled: y,
711
+ onClick: tt,
638
712
  children: c
639
713
  }
640
714
  )
@@ -646,60 +720,62 @@ const Qt = ({ currentPage: t, pagesCount: e, ...r }) => {
646
720
  )
647
721
  }
648
722
  );
649
- }, Xt = ({ className: t, children: e, loading: r = !1, variant: o = "default" }) => /* @__PURE__ */ n(kt, { className: x({ "tw:[&]:border-danger": o === "error" }, t), children: /* @__PURE__ */ i("h3", { className: x("tw:text-center", {
650
- "tw:text-gray-500 tw:dark:text-gray-400": o === "default",
651
- "tw:text-danger": o === "error"
723
+ }, ne = ({ className: t, children: r, loading: e = !1, variant: n = "default" }) => /* @__PURE__ */ o(Rt, { className: p({ "tw:[&]:border-danger": n === "error" }, t), children: /* @__PURE__ */ i("h3", { className: p("tw:text-center", {
724
+ "tw:text-gray-500 tw:dark:text-gray-400": n === "default",
725
+ "tw:text-danger": n === "error"
652
726
  }), children: [
653
- r && /* @__PURE__ */ i(S, { children: [
654
- /* @__PURE__ */ n(p, { icon: dt, spin: !0 }),
655
- /* @__PURE__ */ n("span", { className: "tw:ml-2", children: e ?? "Loading..." })
727
+ e && /* @__PURE__ */ i(S, { children: [
728
+ /* @__PURE__ */ o(u, { icon: st, spin: !0 }),
729
+ /* @__PURE__ */ o("span", { className: "tw:ml-2", children: r ?? "Loading..." })
656
730
  ] }),
657
- !r && e
658
- ] }) }), Yt = ({ variant: t, className: e, size: r = "md", children: o }) => /* @__PURE__ */ n(
731
+ !e && r
732
+ ] }) }), ae = ({ variant: t, className: r, size: e = "md", children: n }) => /* @__PURE__ */ o(
659
733
  "div",
660
734
  {
661
- className: x(
735
+ className: p(
662
736
  "tw:rounded-md tw:text-center",
663
737
  {
664
- "tw:p-2": r === "sm",
665
- "tw:p-4": r === "md",
666
- "tw:p-6": r === "lg",
738
+ "tw:p-2": e === "sm",
739
+ "tw:p-4": e === "md",
740
+ "tw:p-6": e === "lg",
667
741
  "tw:[&]:text-white": t !== "warning",
668
742
  "tw:bg-brand": t === "success",
669
743
  "tw:bg-danger": t === "error",
670
744
  "tw:bg-warning tw:text-black": t === "warning"
671
745
  },
672
- e
746
+ r
673
747
  ),
674
- children: o
748
+ children: n
675
749
  }
676
750
  );
677
751
  export {
678
- bt as Button,
679
- m as Card,
680
- Vt as CardModal,
681
- Ut as Checkbox,
682
- $ as CloseButton,
683
- I as ELLIPSIS,
684
- G as Input,
685
- J as Label,
686
- zt as LabelledInput,
687
- Wt as LabelledSelect,
688
- pt as LinkButton,
689
- Xt as Message,
690
- Ft as ModalDialog,
691
- Jt as NavPills,
692
- Qt as Paginator,
693
- Yt as Result,
694
- qt as SearchInput,
695
- ut as Select,
696
- kt as SimpleCard,
697
- At as Table,
698
- Gt as ToggleSwitch,
699
- Ct as formatNumber,
700
- Bt as keyForPage,
701
- k as pageIsEllipsis,
702
- Lt as prettifyPageNumber,
703
- It as progressivePagination,
704
- Kt as roundTen
752
+ xt as Button,
753
+ h as Card,
754
+ oe as CardModal,
755
+ Qt as Checkbox,
756
+ q as CloseButton,
757
+ B as ELLIPSIS,
758
+ H as Input,
759
+ D as Label,
760
+ Vt as LabelledInput,
761
+ Xt as LabelledRevealablePasswordInput,
762
+ Yt as LabelledSelect,
763
+ Nt as LinkButton,
764
+ ne as Message,
765
+ Dt as ModalDialog,
766
+ te as NavPills,
767
+ re as Paginator,
768
+ ae as Result,
769
+ yt as RevealablePasswordInput,
770
+ Zt as SearchInput,
771
+ kt as Select,
772
+ Rt as SimpleCard,
773
+ Kt as Table,
774
+ zt as ToggleSwitch,
775
+ St as formatNumber,
776
+ Mt as keyForPage,
777
+ P as pageIsEllipsis,
778
+ _t as prettifyPageNumber,
779
+ Ft as progressivePagination,
780
+ ee as roundTen
705
781
  };