@shlinkio/shlink-frontend-kit 0.8.5 → 0.8.7

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