@shlinkio/shlink-frontend-kit 0.9.4 → 0.9.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.
@@ -33,10 +33,10 @@ export declare type ButtonProps = PropsWithChildren<{
33
33
  solid?: boolean;
34
34
  } & (RegularButtonProps | LinkButtonProps_2)>;
35
35
 
36
- export declare const Card: FC<CardProps> & {
37
- Body: FC<CardProps>;
38
- Header: FC<CardProps>;
39
- Footer: FC<CardProps>;
36
+ export declare const Card: ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement>> & {
37
+ Body: ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement>>;
38
+ Header: ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement>>;
39
+ Footer: ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement>>;
40
40
  };
41
41
 
42
42
  /**
@@ -46,7 +46,7 @@ export declare const CardModal: FC<CardModalProps>;
46
46
 
47
47
  export declare type CardModalProps = Omit<ModalDialogProps, 'title' | 'size'> & (CoverCardModalProps | RegularCardModalProps);
48
48
 
49
- export declare type CardProps = HTMLProps<HTMLDivElement>;
49
+ export declare type CardProps = Omit<HTMLProps<HTMLDivElement>, 'ref'>;
50
50
 
51
51
  export declare type CellProps = HTMLProps<HTMLTableCellElement> & {
52
52
  /**
@@ -373,7 +373,7 @@ declare type SelectElementProps = Omit<HTMLProps<HTMLSelectElement>, 'size' | 'c
373
373
 
374
374
  export declare type SelectProps = PropsWithChildren<SelectElementProps & BaseInputProps>;
375
375
 
376
- export declare const SimpleCard: FC<SimpleCardProps>;
376
+ export declare const SimpleCard: ForwardRefExoticComponent<SimpleCardProps & RefAttributes<HTMLDivElement>>;
377
377
 
378
378
  export declare type SimpleCardProps = Omit<CardProps, 'title' | 'size'> & {
379
379
  bodyClassName?: string;
@@ -390,7 +390,7 @@ export declare type TableElementProps = PropsWithChildren & {
390
390
  className?: string;
391
391
  };
392
392
 
393
- export declare type TableProps = HTMLProps<HTMLTableElement> & {
393
+ export declare type TableProps = Omit<HTMLProps<HTMLTableElement>, 'size'> & {
394
394
  header: ReactNode;
395
395
  footer?: ReactNode;
396
396
  /**
@@ -398,6 +398,8 @@ export declare type TableProps = HTMLProps<HTMLTableElement> & {
398
398
  * Set `responsive={false}` to avoid this behavior.
399
399
  */
400
400
  responsive?: boolean;
401
+ /** Determines the padding in every cell. Defaults to md */
402
+ size?: Size;
401
403
  };
402
404
 
403
405
  declare type TitleProps = {
package/dist/tailwind.js CHANGED
@@ -1,22 +1,22 @@
1
1
  import { jsxs as g, jsx as n, Fragment as S } from "react/jsx-runtime";
2
- import w, { clsx as x } from "clsx";
3
- import { useRef as I, useState as D, useEffect as M, useCallback as P, createContext as H, useContext as C, forwardRef as k, useId as F, useMemo as O } from "react";
2
+ import w, { clsx as y } from "clsx";
3
+ import { useRef as I, useState as D, useEffect as M, forwardRef as u, useCallback as P, createContext as H, useContext as C, useId as F, useMemo as O } from "react";
4
4
  import { Link as j, NavLink as at } from "react-router";
5
- import { faClose as dt, faEyeSlash as lt, faEye as it, faCircleNotch as Y, faSearch as st, faChevronLeft as J, faChevronRight as Q, faCheck as wt } from "@fortawesome/free-solid-svg-icons";
5
+ import { faClose as dt, faEyeSlash as lt, faEye as it, faCircleNotch as X, faSearch as st, faChevronLeft as G, faChevronRight as J, faCheck as wt } from "@fortawesome/free-solid-svg-icons";
6
6
  import { FontAwesomeIcon as v } from "@fortawesome/react-fontawesome";
7
7
  import { u as ct, a as mt, b as gt } from "./use-toggle-C1uZwbSD.js";
8
8
  import { createPortal as bt } from "react-dom";
9
9
  import { faClone as ut } from "@fortawesome/free-regular-svg-icons";
10
- const zt = ({ children: t, summary: e, summaryClasses: r, ...o }) => {
10
+ const Zt = ({ children: t, summary: r, summaryClasses: e, ...o }) => {
11
11
  const a = I(null), [l, d] = D(!1);
12
12
  return M(() => {
13
13
  const i = a.current, s = () => d(!!(i != null && i.open));
14
14
  return i == null || i.addEventListener("toggle", s), () => i == null ? void 0 : i.removeEventListener("toggle", s);
15
15
  }, []), /* @__PURE__ */ g("details", { ref: a, ...o, children: [
16
- /* @__PURE__ */ n("summary", { className: x("tw:focus-ring tw:px-1 tw:-mx-1 tw:rounded-sm", r), children: e }),
16
+ /* @__PURE__ */ n("summary", { className: y("tw:focus-ring tw:px-1 tw:-mx-1 tw:rounded-sm", e), children: r }),
17
17
  l && /* @__PURE__ */ n("div", { className: "tw:mt-3 tw:flex tw:flex-col tw:gap-y-3", children: t })
18
18
  ] });
19
- }, pt = ({ className: t, ...e }) => /* @__PURE__ */ n(
19
+ }, pt = u(({ className: t, ...r }, e) => /* @__PURE__ */ n(
20
20
  "div",
21
21
  {
22
22
  className: w(
@@ -24,9 +24,10 @@ const zt = ({ children: t, summary: e, summaryClasses: r, ...o }) => {
24
24
  "tw:bg-lm-primary tw:dark:bg-dm-primary tw:border-b tw:border-lm-border tw:dark:border-dm-border",
25
25
  t
26
26
  ),
27
- ...e
27
+ ...r,
28
+ ref: e
28
29
  }
29
- ), ht = ({ className: t, ...e }) => /* @__PURE__ */ n(
30
+ )), ht = u(({ className: t, ...r }, e) => /* @__PURE__ */ n(
30
31
  "div",
31
32
  {
32
33
  className: w(
@@ -34,9 +35,10 @@ const zt = ({ children: t, summary: e, summaryClasses: r, ...o }) => {
34
35
  "tw:first:rounded-t-md tw:last:rounded-b-md",
35
36
  t
36
37
  ),
37
- ...e
38
+ ...r,
39
+ ref: e
38
40
  }
39
- ), ft = ({ className: t, ...e }) => /* @__PURE__ */ n(
41
+ )), ft = u(({ className: t, ...r }, e) => /* @__PURE__ */ n(
40
42
  "div",
41
43
  {
42
44
  className: w(
@@ -44,9 +46,10 @@ const zt = ({ children: t, summary: e, summaryClasses: r, ...o }) => {
44
46
  "tw:bg-lm-primary tw:dark:bg-dm-primary tw:border-t tw:border-lm-border tw:dark:border-dm-border",
45
47
  t
46
48
  ),
47
- ...e
49
+ ...r,
50
+ ref: e
48
51
  }
49
- ), xt = ({ className: t, ...e }) => /* @__PURE__ */ n(
52
+ )), xt = u(({ className: t, ...r }, e) => /* @__PURE__ */ n(
50
53
  "div",
51
54
  {
52
55
  className: w(
@@ -54,27 +57,28 @@ const zt = ({ children: t, summary: e, summaryClasses: r, ...o }) => {
54
57
  "tw:border tw:border-lm-border tw:dark:border-dm-border tw:bg-lm-primary tw:dark:bg-dm-primary",
55
58
  t
56
59
  ),
57
- ...e
58
- }
59
- ), N = Object.assign(xt, { Body: ht, Header: pt, Footer: ft }), yt = ({ bodyClassName: t, children: e, ...r }) => {
60
- const { title: o, titleSize: a = "md", ...l } = "title" in r ? r : {
61
60
  ...r,
61
+ ref: e
62
+ }
63
+ )), N = Object.assign(xt, { Body: ht, Header: pt, Footer: ft }), yt = u(({ bodyClassName: t, children: r, ...e }, o) => {
64
+ const { title: a, titleSize: l = "md", ...d } = "title" in e ? e : {
65
+ ...e,
62
66
  title: void 0,
63
67
  titleSize: void 0
64
68
  };
65
- return /* @__PURE__ */ g(N, { ...l, children: [
66
- o && /* @__PURE__ */ g(N.Header, { children: [
67
- a === "lg" && /* @__PURE__ */ n("h4", { children: o }),
68
- a === "md" && /* @__PURE__ */ n("h5", { children: o }),
69
- a === "sm" && /* @__PURE__ */ n("h6", { children: o })
69
+ return /* @__PURE__ */ g(N, { ...d, ref: o, children: [
70
+ a && /* @__PURE__ */ g(N.Header, { children: [
71
+ l === "lg" && /* @__PURE__ */ n("h4", { children: a }),
72
+ l === "md" && /* @__PURE__ */ n("h5", { children: a }),
73
+ l === "sm" && /* @__PURE__ */ n("h6", { children: a })
70
74
  ] }),
71
- /* @__PURE__ */ n(N.Body, { className: t, children: e })
75
+ /* @__PURE__ */ n(N.Body, { className: t, children: r })
72
76
  ] });
73
- };
77
+ });
74
78
  function kt({
75
79
  id: t,
76
- items: e,
77
- onSelectItem: r,
80
+ items: r,
81
+ onSelectItem: e,
78
82
  onActiveItemChange: o,
79
83
  renderItem: a,
80
84
  className: l,
@@ -83,21 +87,21 @@ function kt({
83
87
  "aria-label": s = "Items",
84
88
  ...c
85
89
  }) {
86
- const [m, u] = D(0), p = P((f) => {
87
- if (u(f), o) {
88
- const [b, h] = [...e.entries()][f];
89
- o(b, h);
90
+ const [m, p] = D(0), h = P((x) => {
91
+ if (p(x), o) {
92
+ const [b, f] = [...r.entries()][x];
93
+ o(b, f);
90
94
  }
91
- }, [e, o]);
95
+ }, [r, o]);
92
96
  return M(() => {
93
- const f = i == null ? void 0 : i.current;
94
- if (!f)
97
+ const x = i == null ? void 0 : i.current;
98
+ if (!x)
95
99
  return;
96
- const b = (h) => {
97
- ["Enter", "ArrowUp", "ArrowDown"].includes(h.key) && h.preventDefault(), h.key === "ArrowDown" ? p(Math.min(m + 1, e.size - 1)) : h.key === "ArrowUp" ? p(Math.max(m - 1, 0)) : h.key === "Enter" && r([...e.values()][m]);
100
+ const b = (f) => {
101
+ ["Enter", "ArrowUp", "ArrowDown"].includes(f.key) && f.preventDefault(), f.key === "ArrowDown" ? h(Math.min(m + 1, r.size - 1)) : f.key === "ArrowUp" ? h(Math.max(m - 1, 0)) : f.key === "Enter" && e([...r.values()][m]);
98
102
  };
99
- return f.addEventListener("keydown", b), () => f.removeEventListener("keydown", b);
100
- }, [m, i, p, e, r]), /* @__PURE__ */ g(
103
+ return x.addEventListener("keydown", b), () => x.removeEventListener("keydown", b);
104
+ }, [m, i, h, r, e]), /* @__PURE__ */ g(
101
105
  N,
102
106
  {
103
107
  id: t,
@@ -107,66 +111,66 @@ function kt({
107
111
  "aria-label": s,
108
112
  ...c,
109
113
  children: [
110
- e.size === 0 && /* @__PURE__ */ n("i", { role: "option", "aria-disabled": !0, "aria-selected": !1, "data-testid": "no-items", className: "tw:px-2 tw:py-1", children: d }),
111
- [...e.entries()].map(([f, b], h) => /* @__PURE__ */ n(
114
+ r.size === 0 && /* @__PURE__ */ n("i", { role: "option", "aria-disabled": !0, "aria-selected": !1, "data-testid": "no-items", className: "tw:px-2 tw:py-1", children: d }),
115
+ [...r.entries()].map(([x, b], f) => /* @__PURE__ */ n(
112
116
  "button",
113
117
  {
114
- id: `${t}_${f}`,
118
+ id: `${t}_${x}`,
115
119
  type: "button",
116
120
  role: "option",
117
- "aria-selected": h === m,
121
+ "aria-selected": f === m,
118
122
  className: w(
119
123
  "tw:px-2 tw:py-1 tw:text-left tw:truncate",
120
- { "tw:bg-lm-secondary tw:dark:bg-dm-secondary": h === m }
124
+ { "tw:bg-lm-secondary tw:dark:bg-dm-secondary": f === m }
121
125
  ),
122
126
  tabIndex: -1,
123
- onClick: () => r(b),
124
- onMouseOver: () => p(h),
127
+ onClick: () => e(b),
128
+ onMouseOver: () => h(f),
125
129
  children: a(b)
126
130
  },
127
- f
131
+ x
128
132
  ))
129
133
  ]
130
134
  }
131
135
  );
132
136
  }
133
- const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className: e }) => {
134
- const { responsive: r } = C(L);
137
+ const E = H(void 0), L = H({ responsive: !0, size: "md" }), vt = ({ children: t, className: r }) => {
138
+ const { responsive: e } = C(L);
135
139
  return /* @__PURE__ */ n(E.Provider, { value: { section: "head" }, children: /* @__PURE__ */ n(
136
140
  "thead",
137
141
  {
138
142
  className: w(
139
- { "tw:hidden tw:lg:table-header-group": r },
140
- e
143
+ { "tw:hidden tw:lg:table-header-group": e },
144
+ r
141
145
  ),
142
146
  children: t
143
147
  }
144
148
  ) });
145
- }, Nt = ({ children: t, className: e }) => {
146
- const { responsive: r } = C(L);
149
+ }, Nt = ({ children: t, className: r }) => {
150
+ const { responsive: e } = C(L);
147
151
  return /* @__PURE__ */ n(E.Provider, { value: { section: "body" }, children: /* @__PURE__ */ n(
148
152
  "tbody",
149
153
  {
150
154
  className: w(
151
- { "tw:lg:table-row-group tw:flex tw:flex-col tw:gap-y-3": r },
152
- e
155
+ { "tw:lg:table-row-group tw:flex tw:flex-col tw:gap-y-3": e },
156
+ r
153
157
  ),
154
158
  children: t
155
159
  }
156
160
  ) });
157
- }, Ct = ({ children: t, className: e }) => {
158
- const { responsive: r } = C(L);
161
+ }, Ct = ({ children: t, className: r }) => {
162
+ const { responsive: e } = C(L);
159
163
  return /* @__PURE__ */ n(E.Provider, { value: { section: "footer" }, children: /* @__PURE__ */ n(
160
164
  "tfoot",
161
165
  {
162
166
  className: w(
163
- { "tw:lg:table-row-group tw:flex tw:flex-col tw:gap-y-3 tw:mt-4": r },
164
- e
167
+ { "tw:lg:table-row-group tw:flex tw:flex-col tw:gap-y-3 tw:mt-4": e },
168
+ r
165
169
  ),
166
170
  children: t
167
171
  }
168
172
  ) });
169
- }, Pt = ({ children: t, className: e, ...r }) => {
173
+ }, Pt = ({ children: t, className: r, ...e }) => {
170
174
  const o = C(E), a = (o == null ? void 0 : o.section) === "body", { responsive: l } = C(L);
171
175
  return /* @__PURE__ */ n(
172
176
  "tr",
@@ -180,40 +184,43 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
180
184
  // Use a different hover bg color depending on the table being inside a card or not
181
185
  "tw:group-[&]/card:hover:bg-lm-secondary tw:dark:group-[&]/card:hover:bg-dm-secondary": a
182
186
  },
183
- e
187
+ r
184
188
  ),
185
- ...r,
189
+ ...e,
186
190
  children: t
187
191
  }
188
192
  );
189
- }, Tt = ({ children: t, className: e, columnName: r, type: o, ...a }) => {
190
- const l = C(E), d = o ?? ((l == null ? void 0 : l.section) !== "body" ? "th" : "td"), { responsive: i } = C(L);
193
+ }, Tt = ({ children: t, className: r, columnName: e, type: o, ...a }) => {
194
+ const l = C(E), d = o ?? ((l == null ? void 0 : l.section) !== "body" ? "th" : "td"), { responsive: i, size: s } = C(L);
191
195
  return /* @__PURE__ */ n(
192
196
  d,
193
197
  {
194
- "data-column": i ? r : void 0,
198
+ "data-column": i ? e : void 0,
195
199
  className: w(
196
- "tw:p-2 tw:border-lm-border tw:dark:border-dm-border",
200
+ "tw:border-lm-border tw:dark:border-dm-border",
197
201
  {
202
+ "tw:p-1": s === "sm",
203
+ "tw:p-2": s === "md",
204
+ "tw:p-3": s === "lg",
198
205
  "tw:border-b-1": !i,
199
206
  "tw:block tw:lg:table-cell tw:not-last:border-b-1 tw:lg:border-b-1": i,
200
- // For md and lower, display the content in data-column attribute as before
207
+ // For responsive tables, display the content in data-column attribute for md sizes and lower
201
208
  "tw:before:lg:hidden tw:before:content-[attr(data-column)] tw:before:font-bold tw:before:mr-1": i && d === "td"
202
209
  },
203
- e
210
+ r
204
211
  ),
205
212
  ...a,
206
213
  children: t
207
214
  }
208
215
  );
209
- }, It = ({ header: t, footer: e, children: r, responsive: o = !0, ...a }) => /* @__PURE__ */ n(L.Provider, { value: { responsive: o }, children: /* @__PURE__ */ g("table", { className: "tw:w-full", ...a, children: [
216
+ }, It = ({ header: t, footer: r, children: e, responsive: o = !0, size: a = "md", ...l }) => /* @__PURE__ */ n(L.Provider, { value: { responsive: o, size: a }, children: /* @__PURE__ */ g("table", { className: "tw:w-full", ...l, children: [
210
217
  /* @__PURE__ */ n(vt, { children: t }),
211
- /* @__PURE__ */ n(Nt, { children: r }),
212
- e && /* @__PURE__ */ n(Ct, { children: e })
218
+ /* @__PURE__ */ n(Nt, { children: e }),
219
+ r && /* @__PURE__ */ n(Ct, { children: r })
213
220
  ] }) }), te = Object.assign(It, { Row: Pt, Cell: Tt }), Lt = ({
214
221
  children: t,
215
- className: e,
216
- disabled: r,
222
+ className: r,
223
+ disabled: e,
217
224
  variant: o = "primary",
218
225
  size: a = "md",
219
226
  inline: l = !1,
@@ -263,32 +270,32 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
263
270
  "tw:bg-danger": o === "danger",
264
271
  "tw:highlight:bg-danger-dark tw:highlight:border-danger-dark": o === "danger"
265
272
  },
266
- !r && {
273
+ !e && {
267
274
  "tw:highlight:text-white": !d,
268
275
  "tw:highlight:bg-lm-brand tw:dark:highlight:bg-dm-brand": o === "primary",
269
276
  "tw:highlight:bg-zinc-500": o === "secondary",
270
277
  "tw:highlight:bg-danger": o === "danger"
271
278
  },
272
279
  {
273
- "tw:pointer-events-none tw:opacity-65": r
280
+ "tw:pointer-events-none tw:opacity-65": e
274
281
  },
275
- e
282
+ r
276
283
  ),
277
- disabled: r,
284
+ disabled: e,
278
285
  type: m,
279
286
  ...s,
280
287
  children: t
281
288
  }
282
289
  )
283
290
  );
284
- }, Z = k(({ className: t, onChange: e, ...r }, o) => {
285
- const a = P((l) => e == null ? void 0 : e(l.target.checked, l), [e]);
291
+ }, Y = u(({ className: t, onChange: r, ...e }, o) => {
292
+ const a = P((l) => r == null ? void 0 : r(l.target.checked, l), [r]);
286
293
  return /* @__PURE__ */ n(
287
294
  "input",
288
295
  {
289
296
  ref: o,
290
297
  type: "checkbox",
291
- className: x(
298
+ className: y(
292
299
  "tw:appearance-none tw:focus-ring tw:cursor-[inherit]",
293
300
  "tw:border-1 tw:border-lm-input-border tw:dark:border-dm-input-border",
294
301
  "tw:bg-lm-primary tw:dark:bg-dm-primary tw:checked:bg-lm-brand tw:dark:checked:bg-dm-brand tw:bg-no-repeat",
@@ -297,17 +304,17 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
297
304
  t
298
305
  ),
299
306
  onChange: a,
300
- ...r
307
+ ...e
301
308
  }
302
309
  );
303
- }), ee = k(({ className: t, ...e }, r) => /* @__PURE__ */ n(
304
- Z,
310
+ }), ee = u(({ className: t, ...r }, e) => /* @__PURE__ */ n(
311
+ Y,
305
312
  {
306
- ref: r,
307
- className: x("tw:rounded-sm tw:w-4 tw:h-4 tw:checked:bg-(image:--tick) tw:bg-center", t),
308
- ...e
313
+ ref: e,
314
+ className: y("tw:rounded-sm tw:w-4 tw:h-4 tw:checked:bg-(image:--tick) tw:bg-center", t),
315
+ ...r
309
316
  }
310
- )), V = ({ onClick: t, className: e, label: r = "Close" }) => /* @__PURE__ */ n(
317
+ )), Q = ({ onClick: t, className: r, label: e = "Close" }) => /* @__PURE__ */ n(
311
318
  "button",
312
319
  {
313
320
  type: "button",
@@ -315,15 +322,15 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
315
322
  className: w(
316
323
  "tw:opacity-50 tw:highlight:opacity-80 tw:transition-opacity",
317
324
  "tw:rounded-md tw:focus-ring",
318
- e
325
+ r
319
326
  ),
320
- "aria-label": r,
327
+ "aria-label": e,
321
328
  children: /* @__PURE__ */ n(v, { icon: dt, size: "xl" })
322
329
  }
323
- ), U = k(({
330
+ ), U = u(({
324
331
  borderless: t = !1,
325
- size: e = "md",
326
- feedback: r,
332
+ size: r = "md",
333
+ feedback: e,
327
334
  className: o,
328
335
  disabled: a,
329
336
  readOnly: l,
@@ -337,18 +344,18 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
337
344
  className: w(
338
345
  "tw:w-full",
339
346
  {
340
- "tw:focus-ring": !r,
341
- "tw:focus-ring-danger": r === "error"
347
+ "tw:focus-ring": !e,
348
+ "tw:focus-ring-danger": e === "error"
342
349
  },
343
350
  {
344
- "tw:px-2 tw:py-1 tw:text-sm": e === "sm",
345
- "tw:px-3 tw:py-1.5": e === "md",
346
- "tw:px-4 tw:py-2 tw:text-xl": e === "lg"
351
+ "tw:px-2 tw:py-1 tw:text-sm": r === "sm",
352
+ "tw:px-3 tw:py-1.5": r === "md",
353
+ "tw:px-4 tw:py-2 tw:text-xl": r === "lg"
347
354
  },
348
355
  {
349
356
  "tw:rounded-md tw:border": !t,
350
- "tw:border-lm-input-border tw:dark:border-dm-input-border": !t && !r,
351
- "tw:border-danger": !t && r === "error",
357
+ "tw:border-lm-input-border tw:dark:border-dm-input-border": !t && !e,
358
+ "tw:border-danger": !t && e === "error",
352
359
  "tw:bg-lm-disabled-input tw:dark:bg-dm-disabled-input": !s,
353
360
  "tw:bg-lm-primary tw:dark:bg-dm-primary": s,
354
361
  // Use different background color when rendered inside a card
@@ -361,45 +368,45 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
361
368
  ...d
362
369
  }
363
370
  );
364
- }), W = ({ required: t, children: e, className: r, ...o }) => /* @__PURE__ */ g("label", { className: x("tw:cursor-pointer", r), ...o, children: [
365
- e,
371
+ }), W = ({ required: t, children: r, className: e, ...o }) => /* @__PURE__ */ g("label", { className: y("tw:cursor-pointer", e), ...o, children: [
372
+ r,
366
373
  t && /* @__PURE__ */ n("span", { className: "tw:text-danger tw:ml-1", "data-testid": "required-indicator", children: "*" })
367
- ] }), K = ({ children: t, helpText: e, error: r, "data-testid": o }) => /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:gap-1", "data-testid": o, children: [
374
+ ] }), K = ({ children: t, helpText: r, error: e, "data-testid": o }) => /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:gap-1", "data-testid": o, children: [
368
375
  t,
369
- e && /* @__PURE__ */ n(
376
+ r && /* @__PURE__ */ n(
370
377
  "small",
371
378
  {
372
379
  "data-testid": o ? `${o}-help-text` : "help-text",
373
380
  className: "tw:text-gray-500 tw:dark:text-gray-400",
374
- children: e
381
+ children: r
375
382
  }
376
383
  ),
377
- r && /* @__PURE__ */ n("span", { "data-testid": o ? `${o}-error` : "error", className: "tw:text-danger", children: r })
378
- ] }), re = k(({ label: t, inputClassName: e, required: r, hiddenRequired: o, error: a, helpText: l, "data-testid": d, ...i }, s) => {
384
+ e && /* @__PURE__ */ n("span", { "data-testid": o ? `${o}-error` : "error", className: "tw:text-danger", children: e })
385
+ ] }), re = u(({ label: t, inputClassName: r, required: e, hiddenRequired: o, error: a, helpText: l, "data-testid": d, ...i }, s) => {
379
386
  const c = F();
380
387
  return /* @__PURE__ */ g(K, { error: a, helpText: l, "data-testid": d, children: [
381
- /* @__PURE__ */ n(W, { htmlFor: c, required: r, children: t }),
388
+ /* @__PURE__ */ n(W, { htmlFor: c, required: e, children: t }),
382
389
  /* @__PURE__ */ n(
383
390
  U,
384
391
  {
385
392
  ref: s,
386
393
  id: c,
387
- className: e,
388
- required: r || o,
394
+ className: r,
395
+ required: e || o,
389
396
  feedback: a ? "error" : void 0,
390
397
  ...i
391
398
  }
392
399
  )
393
400
  ] });
394
- }), Bt = k(({ containerClassName: t, className: e, size: r, ...o }, a) => {
401
+ }), Bt = u(({ containerClassName: t, className: r, size: e, ...o }, a) => {
395
402
  const [l, d, , i] = ct(!1), s = I(null), c = P(({ relatedTarget: m }) => {
396
- var u;
397
- (u = s.current) != null && u.contains(m) || i();
403
+ var p;
404
+ (p = s.current) != null && p.contains(m) || i();
398
405
  }, [s, i]);
399
406
  return /* @__PURE__ */ g(
400
407
  "div",
401
408
  {
402
- className: x("tw:group tw:relative", t),
409
+ className: y("tw:group tw:relative", t),
403
410
  ref: s,
404
411
  onBlurCapture: c,
405
412
  children: [
@@ -408,14 +415,14 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
408
415
  {
409
416
  ref: a,
410
417
  type: l ? "text" : "password",
411
- className: x(
418
+ className: y(
412
419
  {
413
- "tw:pr-10": r !== "sm",
414
- "tw:pr-8": r === "sm"
420
+ "tw:pr-10": e !== "sm",
421
+ "tw:pr-8": e === "sm"
415
422
  },
416
- e
423
+ r
417
424
  ),
418
- size: r,
425
+ size: e,
419
426
  "data-testid": "input",
420
427
  ...o
421
428
  }
@@ -427,12 +434,12 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
427
434
  onClick: d,
428
435
  title: l ? "Hide password" : "Show password",
429
436
  "aria-label": l ? "Hide password" : "Show password",
430
- className: x(
437
+ className: y(
431
438
  "tw:absolute tw:top-[50%] tw:translate-y-[-50%] tw:px-1",
432
439
  "tw:text-placeholder tw:hover:text-lm-text tw:hover:dark:text-dm-text tw:transition-colors",
433
440
  {
434
- "tw:right-1.5": r !== "sm",
435
- "tw:scale-85 tw:right-1": r === "sm"
441
+ "tw:right-1.5": e !== "sm",
442
+ "tw:scale-85 tw:right-1": e === "sm"
436
443
  }
437
444
  ),
438
445
  tabIndex: -1,
@@ -442,26 +449,26 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
442
449
  ]
443
450
  }
444
451
  );
445
- }), oe = k(({ label: t, inputClassName: e, required: r, hiddenRequired: o, error: a, helpText: l, "data-testid": d, ...i }, s) => {
452
+ }), oe = u(({ label: t, inputClassName: r, required: e, hiddenRequired: o, error: a, helpText: l, "data-testid": d, ...i }, s) => {
446
453
  const c = F();
447
454
  return /* @__PURE__ */ g(K, { error: a, helpText: l, "data-testid": d, children: [
448
- /* @__PURE__ */ n(W, { htmlFor: c, required: r, children: t }),
455
+ /* @__PURE__ */ n(W, { htmlFor: c, required: e, children: t }),
449
456
  /* @__PURE__ */ n(
450
457
  Bt,
451
458
  {
452
459
  ref: s,
453
460
  id: c,
454
- className: e,
455
- required: r || o,
461
+ className: r,
462
+ required: e || o,
456
463
  feedback: a ? "error" : void 0,
457
464
  ...i
458
465
  }
459
466
  )
460
467
  ] });
461
- }), Mt = k(({
468
+ }), Mt = u(({
462
469
  className: t,
463
- size: e = "md",
464
- feedback: r,
470
+ size: r = "md",
471
+ feedback: e,
465
472
  style: o = {},
466
473
  disabled: a,
467
474
  ...l
@@ -473,18 +480,18 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
473
480
  "tw:w-full tw:appearance-none tw:pr-9",
474
481
  "tw:bg-(image:--chevron-down) tw:bg-no-repeat",
475
482
  {
476
- "tw:focus-ring": !r,
477
- "tw:focus-ring-danger": r === "error"
483
+ "tw:focus-ring": !e,
484
+ "tw:focus-ring-danger": e === "error"
478
485
  },
479
486
  "tw:rounded-md tw:border",
480
487
  {
481
- "tw:border-lm-input-border tw:dark:border-dm-input-border": !r,
482
- "tw:border-danger": r === "error"
488
+ "tw:border-lm-input-border tw:dark:border-dm-input-border": !e,
489
+ "tw:border-danger": e === "error"
483
490
  },
484
491
  {
485
- "tw:pl-2 tw:py-1 tw:text-sm": e === "sm",
486
- "tw:pl-3 tw:py-1.5": e === "md",
487
- "tw:pl-4 tw:py-2 tw:text-xl": e === "lg",
492
+ "tw:pl-2 tw:py-1 tw:text-sm": r === "sm",
493
+ "tw:pl-3 tw:py-1.5": r === "md",
494
+ "tw:pl-4 tw:py-2 tw:text-xl": r === "lg",
488
495
  "tw:bg-lm-disabled-input tw:dark:bg-dm-disabled-input": a,
489
496
  // Apply different background color when rendered inside a card
490
497
  "tw:bg-lm-primary tw:dark:bg-dm-primary tw:group-[&]/card:bg-lm-input tw:group-[&]/card:dark:bg-dm-input": !a
@@ -498,10 +505,10 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
498
505
  disabled: a,
499
506
  ...l
500
507
  }
501
- )), ne = k(({ selectClassName: t, label: e, error: r, helpText: o, required: a, hiddenRequired: l, "data-testid": d, ...i }, s) => {
508
+ )), ne = u(({ selectClassName: t, label: r, error: e, helpText: o, required: a, hiddenRequired: l, "data-testid": d, ...i }, s) => {
502
509
  const c = F();
503
- return /* @__PURE__ */ g(K, { error: r, helpText: o, "data-testid": d, children: [
504
- /* @__PURE__ */ n(W, { htmlFor: c, required: a, children: e }),
510
+ return /* @__PURE__ */ g(K, { error: e, helpText: o, "data-testid": d, children: [
511
+ /* @__PURE__ */ n(W, { htmlFor: c, required: a, children: r }),
505
512
  /* @__PURE__ */ n(
506
513
  Mt,
507
514
  {
@@ -509,15 +516,15 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
509
516
  id: c,
510
517
  className: t,
511
518
  required: a || l,
512
- feedback: r ? "error" : void 0,
519
+ feedback: e ? "error" : void 0,
513
520
  ...i
514
521
  }
515
522
  )
516
523
  ] });
517
- }), Et = k(({
524
+ }), Et = u(({
518
525
  onChange: t,
519
- containerClassName: e,
520
- inputClassName: r,
526
+ containerClassName: r,
527
+ inputClassName: e,
521
528
  // Inputs have a default 'md' size. Search inputs are usually 'lg' as they are rendered at the top of sections
522
529
  size: o = "lg",
523
530
  loading: a = !1,
@@ -526,11 +533,11 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
526
533
  const { setTimeout: i, clearCurrentTimeout: s } = mt(500), c = P((m) => {
527
534
  m ? i(() => t(m)) : (s(), t(m));
528
535
  }, [s, t, i]);
529
- return /* @__PURE__ */ g("div", { className: w("tw:group tw:relative tw:focus-within:z-10", e), children: [
536
+ return /* @__PURE__ */ g("div", { className: w("tw:group tw:relative tw:focus-within:z-10", r), children: [
530
537
  /* @__PURE__ */ n(
531
538
  v,
532
539
  {
533
- icon: a ? Y : st,
540
+ icon: a ? X : st,
534
541
  spin: a,
535
542
  className: w(
536
543
  "tw:absolute tw:top-[50%] tw:translate-y-[-50%] tw:transition-colors",
@@ -552,7 +559,7 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
552
559
  "tw:pl-9": o !== "sm",
553
560
  "tw:pl-7": o === "sm"
554
561
  },
555
- r
562
+ e
556
563
  ),
557
564
  placeholder: "Search...",
558
565
  onChange: (m) => c(m.target.value),
@@ -564,8 +571,8 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
564
571
  });
565
572
  function ae({
566
573
  searchResults: t,
567
- onSearch: e,
568
- onSelectSearchResult: r,
574
+ onSearch: r,
575
+ onSelectSearchResult: e,
569
576
  renderSearchResult: o,
570
577
  size: a = "md",
571
578
  // SearchInput defaults its size to 'lg'. Change it to 'md'
@@ -573,35 +580,35 @@ function ae({
573
580
  onFocus: d,
574
581
  ...i
575
582
  }) {
576
- const s = I(null), c = F(), [m, u] = D(), p = O(
583
+ const s = I(null), c = F(), [m, p] = D(), h = O(
577
584
  () => t ? m ?? [...t.keys()][0] : void 0,
578
585
  [m, t]
579
- ), f = P((b) => {
580
- r(b), e(""), s.current.value = "";
581
- }, [e, r]);
586
+ ), x = P((b) => {
587
+ e(b), r(""), s.current.value = "";
588
+ }, [r, e]);
582
589
  return /* @__PURE__ */ g(
583
590
  "div",
584
591
  {
585
592
  className: "tw:relative",
586
593
  onBlur: (b) => {
587
- b.currentTarget.contains(b.relatedTarget) || e("");
594
+ b.currentTarget.contains(b.relatedTarget) || r("");
588
595
  },
589
596
  children: [
590
597
  /* @__PURE__ */ n(
591
598
  Et,
592
599
  {
593
- onChange: e,
600
+ onChange: r,
594
601
  size: a,
595
602
  ref: s,
596
603
  role: "combobox",
597
604
  "aria-autocomplete": "list",
598
605
  "aria-expanded": !!t,
599
606
  "aria-controls": c,
600
- "aria-activedescendant": p ? `${c}_${p}` : void 0,
607
+ "aria-activedescendant": h ? `${c}_${h}` : void 0,
601
608
  autoComplete: "off",
602
609
  autoCorrect: "off",
603
610
  onFocus: (b) => {
604
- d == null || d(b), e(b.target.value);
611
+ d == null || d(b), r(b.target.value);
605
612
  },
606
613
  ...i
607
614
  }
@@ -612,8 +619,8 @@ function ae({
612
619
  id: c,
613
620
  items: t,
614
621
  anchor: s,
615
- onSelectItem: f,
616
- onActiveItemChange: u,
622
+ onSelectItem: x,
623
+ onActiveItemChange: p,
617
624
  renderItem: o,
618
625
  className: w(
619
626
  "tw:absolute tw:top-full tw:mt-1 tw:z-10",
@@ -630,20 +637,20 @@ function ae({
630
637
  }
631
638
  );
632
639
  }
633
- const de = k(({ className: t, ...e }, r) => /* @__PURE__ */ n(
634
- Z,
640
+ const de = u(({ className: t, ...r }, e) => /* @__PURE__ */ n(
641
+ Y,
635
642
  {
636
- ref: r,
637
- className: x(
643
+ ref: e,
644
+ className: y(
638
645
  "tw:rounded-full tw:w-8 tw:h-4",
639
646
  "tw:bg-(image:--circle-grey-dark) tw:dark:bg-(image:--circle-grey-light) tw:checked:bg-(image:--circle-white)",
640
647
  "tw:focus-visible:not-checked:bg-(image:--circle-light-blue)",
641
648
  "tw:checked:bg-right tw:transition-[background-position]",
642
649
  t
643
650
  ),
644
- ...e
651
+ ...r
645
652
  }
646
- )), Rt = ({ className: t, disabled: e, size: r = "md", type: o = "button", ...a }) => /* @__PURE__ */ n(
653
+ )), Rt = ({ className: t, disabled: r, size: e = "md", type: o = "button", ...a }) => /* @__PURE__ */ n(
647
654
  "button",
648
655
  {
649
656
  className: w(
@@ -651,24 +658,24 @@ const de = k(({ className: t, ...e }, r) => /* @__PURE__ */ n(
651
658
  "tw:text-lm-brand tw:dark:text-dm-brand",
652
659
  "tw:highlight:text-lm-brand-dark tw:dark:highlight:text-dm-brand-dark tw:highlight:underline",
653
660
  {
654
- "tw:px-1.5 tw:py-1 tw:text-sm": r === "sm",
655
- "tw:px-3 tw:py-1.5": r === "md",
656
- "tw:px-4 tw:py-2 tw:text-lg": r === "lg",
657
- "tw:pointer-events-none tw:opacity-65": e
661
+ "tw:px-1.5 tw:py-1 tw:text-sm": e === "sm",
662
+ "tw:px-3 tw:py-1.5": e === "md",
663
+ "tw:px-4 tw:py-2 tw:text-lg": e === "lg",
664
+ "tw:pointer-events-none tw:opacity-65": r
658
665
  },
659
666
  t
660
667
  ),
661
- disabled: e,
668
+ disabled: r,
662
669
  type: o,
663
670
  ...a
664
671
  }
665
- ), z = H(null), _t = ({ className: t, to: e, ...r }) => {
666
- const o = C(z);
672
+ ), Z = H(null), _t = ({ className: t, to: r, ...e }) => {
673
+ const o = C(Z);
667
674
  return /* @__PURE__ */ n(
668
675
  at,
669
676
  {
670
677
  role: "menuitem",
671
- to: e,
678
+ to: r,
672
679
  className: ({ isActive: a }) => w(
673
680
  "tw:px-4 tw:pt-2 tw:pb-[calc(0.5rem-3px)] tw:border-b-3",
674
681
  "tw:highlight:text-lm-brand tw:dark:highlight:text-dm-brand",
@@ -683,16 +690,16 @@ const de = k(({ className: t, ...e }, r) => /* @__PURE__ */ n(
683
690
  },
684
691
  t
685
692
  ),
686
- ...r
693
+ ...e
687
694
  }
688
695
  );
689
- }, Dt = ({ children: t, className: e, fill: r }) => /* @__PURE__ */ n(z.Provider, { value: { fill: r }, children: /* @__PURE__ */ n(N, { role: "menubar", className: w("tw:flex tw:overflow-hidden", e), children: t }) }), le = Object.assign(Dt, { Pill: _t }), Ft = new Intl.NumberFormat("en-US"), $t = (t) => Ft.format(Number(t)), X = 10, ie = (t) => Math.ceil(t / X) * X, T = 2, _ = "...", St = (t, e) => Array.from({ length: e - t }, (r, o) => t + o), jt = (t, e) => {
690
- const r = St(
696
+ }, Dt = ({ children: t, className: r, fill: e }) => /* @__PURE__ */ n(Z.Provider, { value: { fill: e }, children: /* @__PURE__ */ n(N, { role: "menubar", className: w("tw:flex tw:overflow-hidden", r), children: t }) }), le = Object.assign(Dt, { Pill: _t }), Ft = new Intl.NumberFormat("en-US"), $t = (t) => Ft.format(Number(t)), V = 10, ie = (t) => Math.ceil(t / V) * V, T = 2, _ = "...", St = (t, r) => Array.from({ length: r - t }, (e, o) => t + o), jt = (t, r) => {
697
+ const e = St(
691
698
  Math.max(T, t - T),
692
- Math.min(e - 1, t + T) + 1
699
+ Math.min(r - 1, t + T) + 1
693
700
  );
694
- return t - T > T && r.unshift(_), t + T < e - 1 && r.push(_), r.unshift(1), r.push(e), r;
695
- }, B = (t) => t === _, At = (t) => B(t) ? t : $t(t), Ht = (t, e) => B(t) ? `${t}_${e}` : `${t}`, tt = [
701
+ return t - T > T && e.unshift(_), t + T < r - 1 && e.push(_), e.unshift(1), e.push(r), e;
702
+ }, B = (t) => t === _, At = (t) => B(t) ? t : $t(t), Ht = (t, r) => B(t) ? `${t}_${r}` : `${t}`, tt = [
696
703
  "tw:border tw:border-r-0 tw:last:border-r tw:border-lm-border tw:dark:border-dm-border",
697
704
  "tw:rounded-none tw:first:rounded-l tw:last:rounded-r"
698
705
  ], et = (t = !1) => w(
@@ -706,22 +713,22 @@ const de = k(({ className: t, ...e }, r) => /* @__PURE__ */ n(
706
713
  ],
707
714
  t && "tw:bg-lm-main tw:dark:bg-dm-main tw:text-white"
708
715
  ), A = ({ children: t }) => /* @__PURE__ */ n("span", { "aria-hidden": !0, className: w(tt, "tw:px-3 py-2 tw:text-gray-400"), children: t }), rt = () => /* @__PURE__ */ n(A, { children: _ });
709
- function Ot({ children: t, active: e, isEllipsis: r, href: o, ...a }) {
710
- const l = O(() => et(e), [e]);
711
- return r ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n(j, { className: l, to: o, ...a, children: t });
716
+ function Ot({ children: t, active: r, isEllipsis: e, href: o, ...a }) {
717
+ const l = O(() => et(r), [r]);
718
+ return e ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n(j, { className: l, to: o, ...a, children: t });
712
719
  }
713
- function Ut({ children: t, active: e, isEllipsis: r, ...o }) {
714
- const a = O(() => et(e), [e]);
715
- return r ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n("button", { type: "button", className: a, ...o, children: t });
720
+ function Ut({ children: t, active: r, isEllipsis: e, ...o }) {
721
+ const a = O(() => et(r), [r]);
722
+ return e ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n("button", { type: "button", className: a, ...o, children: t });
716
723
  }
717
- const se = ({ currentPage: t, pagesCount: e, ...r }) => {
718
- const o = "urlForPage" in r, a = o ? Ot : Ut, l = P(
719
- (d) => o ? { href: B(d) ? void 0 : r.urlForPage(d) } : { onClick: () => !B(d) && r.onPageChange(d) },
720
- [o, r]
724
+ const se = ({ currentPage: t, pagesCount: r, ...e }) => {
725
+ const o = "urlForPage" in e, a = o ? Ot : Ut, l = P(
726
+ (d) => o ? { href: B(d) ? void 0 : e.urlForPage(d) } : { onClick: () => !B(d) && e.onPageChange(d) },
727
+ [o, e]
721
728
  );
722
- return e < 2 ? null : /* @__PURE__ */ g("div", { className: "tw:select-none tw:flex", "data-testid": "paginator", children: [
723
- t === 1 ? /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(v, { size: "xs", icon: J }) }) : /* @__PURE__ */ n(a, { ...l(Math.max(1, t - 1)), "aria-label": "Previous", children: /* @__PURE__ */ n(v, { size: "xs", icon: J }) }),
724
- jt(t, e).map((d, i) => /* @__PURE__ */ n(
729
+ return r < 2 ? null : /* @__PURE__ */ g("div", { className: "tw:select-none tw:flex", "data-testid": "paginator", children: [
730
+ t === 1 ? /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(v, { size: "xs", icon: G }) }) : /* @__PURE__ */ n(a, { ...l(Math.max(1, t - 1)), "aria-label": "Previous", children: /* @__PURE__ */ n(v, { size: "xs", icon: G }) }),
731
+ jt(t, r).map((d, i) => /* @__PURE__ */ n(
725
732
  a,
726
733
  {
727
734
  active: d === t,
@@ -731,12 +738,12 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
731
738
  },
732
739
  Ht(d, i)
733
740
  )),
734
- t === e ? /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(v, { size: "xs", icon: Q }) }) : /* @__PURE__ */ n(a, { ...l(Math.min(e, t + 1)), "aria-label": "Next", children: /* @__PURE__ */ n(v, { size: "xs", icon: Q }) })
741
+ t === r ? /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(v, { size: "xs", icon: J }) }) : /* @__PURE__ */ n(a, { ...l(Math.min(r, t + 1)), "aria-label": "Next", children: /* @__PURE__ */ n(v, { size: "xs", icon: J }) })
735
742
  ] });
736
743
  }, Wt = ({
737
744
  open: t,
738
- children: e,
739
- className: r,
745
+ children: r,
746
+ className: e,
740
747
  onClose: o,
741
748
  ...a
742
749
  }) => {
@@ -745,8 +752,8 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
745
752
  var c, m;
746
753
  const d = document.body, i = d.style.overflow, s = d.style.paddingRight;
747
754
  if (t) {
748
- const u = window.outerWidth - d.clientWidth, p = d.scrollHeight > d.clientHeight;
749
- d.style.overflow = "hidden", p && (d.style.paddingRight = `${u}px`), (c = l.current) == null || c.showModal();
755
+ const p = window.outerWidth - d.clientWidth, h = d.scrollHeight > d.clientHeight;
756
+ d.style.overflow = "hidden", h && (d.style.paddingRight = `${p}px`), (c = l.current) == null || c.showModal();
750
757
  } else
751
758
  (m = l.current) == null || m.close();
752
759
  return () => {
@@ -757,20 +764,20 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
757
764
  "dialog",
758
765
  {
759
766
  ref: l,
760
- className: w("tw:bg-transparent tw:backdrop:bg-black/50", r),
767
+ className: w("tw:bg-transparent tw:backdrop:bg-black/50", e),
761
768
  onCancel: (d) => {
762
769
  d.preventDefault(), o();
763
770
  },
764
771
  ...a,
765
- children: t && e
772
+ children: t && r
766
773
  }
767
774
  ),
768
775
  document.body
769
776
  );
770
777
  }, we = ({
771
778
  open: t,
772
- onClose: e,
773
- variant: r = "default",
779
+ onClose: r,
780
+ variant: e = "default",
774
781
  title: o,
775
782
  children: a,
776
783
  className: l,
@@ -781,44 +788,44 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
781
788
  confirmText: s = "Confirm",
782
789
  cancelText: c = "Cancel",
783
790
  confirmDisabled: m,
784
- onConfirm: u,
785
- onClosed: p,
786
- ...f
787
- } = "onConfirm" in d ? d : { ...d }, [b, h] = D(t), R = I(null), $ = I("cancel"), ot = P((y) => {
788
- y.preventDefault(), y.stopPropagation(), $.current = "confirm", u == null || u();
789
- }, [u]);
791
+ onConfirm: p,
792
+ onClosed: h,
793
+ ...x
794
+ } = "onConfirm" in d ? d : { ...d }, [b, f] = D(t), R = I(null), $ = I("cancel"), ot = P((k) => {
795
+ k.preventDefault(), k.stopPropagation(), $.current = "confirm", p == null || p();
796
+ }, [p]);
790
797
  return M(() => {
791
798
  if (t) {
792
- $.current = "cancel", h(!0);
799
+ $.current = "cancel", f(!0);
793
800
  return;
794
801
  }
795
- const y = R.current;
796
- if (y) {
802
+ const k = R.current;
803
+ if (k) {
797
804
  delete R.current.dataset.open;
798
805
  let q = !1;
799
- const G = (nt) => {
800
- q || nt.target !== y || (q = !0, h(!1), p == null || p($.current));
806
+ const z = (nt) => {
807
+ q || nt.target !== k || (q = !0, f(!1), h == null || h($.current));
801
808
  };
802
- return y.addEventListener("transitionend", G), () => {
803
- y.removeEventListener("transitionend", G);
809
+ return k.addEventListener("transitionend", z), () => {
810
+ k.removeEventListener("transitionend", z);
804
811
  };
805
812
  }
806
- }, [p, t]), M(() => {
807
- const y = R.current;
808
- b && y && (y.dataset.open = "");
813
+ }, [h, t]), M(() => {
814
+ const k = R.current;
815
+ b && k && (k.dataset.open = "");
809
816
  }, [b]), /* @__PURE__ */ n(
810
817
  Wt,
811
818
  {
812
819
  open: b,
813
- onClose: e,
820
+ onClose: r,
814
821
  className: w(
815
822
  {
816
823
  "tw:flex tw:w-screen tw:h-screen tw:max-w-screen tw:max-h-screen": b,
817
- "tw:overflow-hidden": r === "cover"
824
+ "tw:overflow-hidden": e === "cover"
818
825
  },
819
826
  l
820
827
  ),
821
- ...f,
828
+ ...x,
822
829
  children: /* @__PURE__ */ n(
823
830
  "form",
824
831
  {
@@ -830,19 +837,19 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
830
837
  "tw:-translate-y-4 tw:data-open:translate-y-0 tw:opacity-0 tw:data-open:opacity-100",
831
838
  "tw:transition-[opacity_,_translate] tw:duration-300",
832
839
  // Handle modal dimensions for different variants and sizes
833
- r !== "cover" && {
840
+ e !== "cover" && {
834
841
  "tw:sm:w-sm": i === "sm",
835
842
  "tw:md:w-lg": i === "md",
836
843
  "tw:md:w-4xl": i === "lg",
837
844
  "tw:md:w-6xl": i === "xl"
838
845
  },
839
- { "tw:h-full": r === "cover" }
846
+ { "tw:h-full": e === "cover" }
840
847
  ),
841
848
  onSubmit: ot,
842
849
  children: /* @__PURE__ */ n(N, { className: w(
843
850
  "tw:w-full",
844
- { "tw:h-full tw:relative tw:overflow-auto": r === "cover" }
845
- ), children: r === "cover" ? /* @__PURE__ */ g(S, { children: [
851
+ { "tw:h-full tw:relative tw:overflow-auto": e === "cover" }
852
+ ), children: e === "cover" ? /* @__PURE__ */ g(S, { children: [
846
853
  /* @__PURE__ */ g(
847
854
  "div",
848
855
  {
@@ -854,7 +861,7 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
854
861
  ),
855
862
  children: [
856
863
  /* @__PURE__ */ n("h5", { children: o }),
857
- /* @__PURE__ */ n(V, { onClick: e, label: "Close dialog" })
864
+ /* @__PURE__ */ n(Q, { onClick: r, label: "Close dialog" })
858
865
  ]
859
866
  }
860
867
  ),
@@ -864,11 +871,11 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
864
871
  "tw:sticky tw:top-0",
865
872
  "tw:flex tw:items-center tw:justify-between tw:gap-x-2"
866
873
  ), children: [
867
- /* @__PURE__ */ n("h5", { className: w({ "tw:text-danger": r === "danger" }), children: o }),
868
- /* @__PURE__ */ n(V, { onClick: e, label: "Close dialog" })
874
+ /* @__PURE__ */ n("h5", { className: w({ "tw:text-danger": e === "danger" }), children: o }),
875
+ /* @__PURE__ */ n(Q, { onClick: r, label: "Close dialog" })
869
876
  ] }),
870
877
  /* @__PURE__ */ n(N.Body, { children: a }),
871
- u && /* @__PURE__ */ g(
878
+ p && /* @__PURE__ */ g(
872
879
  N.Footer,
873
880
  {
874
881
  "data-testid": "footer",
@@ -877,12 +884,12 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
877
884
  "tw:[&]:px-3 tw:sticky tw:bottom-0"
878
885
  ),
879
886
  children: [
880
- /* @__PURE__ */ n(Rt, { onClick: e, children: c }),
887
+ /* @__PURE__ */ n(Rt, { onClick: r, children: c }),
881
888
  /* @__PURE__ */ n(
882
889
  Lt,
883
890
  {
884
891
  solid: !0,
885
- variant: r === "danger" ? "danger" : "primary",
892
+ variant: e === "danger" ? "danger" : "primary",
886
893
  disabled: m,
887
894
  type: "submit",
888
895
  children: s
@@ -896,34 +903,34 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
896
903
  )
897
904
  }
898
905
  );
899
- }, ce = ({ className: t, children: e, loading: r = !1, variant: o = "default" }) => /* @__PURE__ */ n(yt, { className: x({ "tw:[&]:border-danger": o === "error" }, t), children: /* @__PURE__ */ g("h3", { className: x("tw:text-center", {
906
+ }, ce = ({ className: t, children: r, loading: e = !1, variant: o = "default" }) => /* @__PURE__ */ n(yt, { className: y({ "tw:[&]:border-danger": o === "error" }, t), children: /* @__PURE__ */ g("h3", { className: y("tw:text-center", {
900
907
  "tw:text-gray-500 tw:dark:text-gray-400": o === "default",
901
908
  "tw:text-danger": o === "error"
902
909
  }), children: [
903
- r && /* @__PURE__ */ g(S, { children: [
904
- /* @__PURE__ */ n(v, { icon: Y, spin: !0 }),
905
- /* @__PURE__ */ n("span", { className: "tw:ml-2", children: e ?? "Loading..." })
910
+ e && /* @__PURE__ */ g(S, { children: [
911
+ /* @__PURE__ */ n(v, { icon: X, spin: !0 }),
912
+ /* @__PURE__ */ n("span", { className: "tw:ml-2", children: r ?? "Loading..." })
906
913
  ] }),
907
- !r && e
908
- ] }) }), me = ({ variant: t, className: e, size: r = "md", children: o }) => /* @__PURE__ */ n(
914
+ !e && r
915
+ ] }) }), me = ({ variant: t, className: r, size: e = "md", children: o }) => /* @__PURE__ */ n(
909
916
  "div",
910
917
  {
911
- className: x(
918
+ className: y(
912
919
  "tw:rounded-md tw:text-center",
913
920
  {
914
- "tw:p-2": r === "sm",
915
- "tw:p-4": r === "md",
916
- "tw:p-6": r === "lg",
921
+ "tw:p-2": e === "sm",
922
+ "tw:p-4": e === "md",
923
+ "tw:p-6": e === "lg",
917
924
  "tw:[&]:text-white": t !== "warning",
918
925
  "tw:bg-lm-brand tw:dark:bg-dm-brand": t === "success",
919
926
  "tw:bg-danger": t === "error",
920
927
  "tw:bg-warning tw:text-black": t === "warning"
921
928
  },
922
- e
929
+ r
923
930
  ),
924
931
  children: o
925
932
  }
926
- ), ge = ({ text: t, className: e, size: r = "lg", initialCopied: o = !1, navigator_: a = globalThis.navigator, ...l }) => {
933
+ ), ge = ({ text: t, className: r, size: e = "lg", initialCopied: o = !1, navigator_: a = globalThis.navigator, ...l }) => {
927
934
  const [d, i] = gt(o), s = P(
928
935
  () => a.clipboard.writeText(t).then(i),
929
936
  [a.clipboard, t, i]
@@ -932,14 +939,14 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
932
939
  "button",
933
940
  {
934
941
  type: "button",
935
- className: x(
942
+ className: y(
936
943
  "tw:focus-ring tw:rounded-sm",
937
944
  {
938
- "tw:text-md": r === "sm",
939
- "tw:text-lg": r === "md",
940
- "tw:text-xl": r === "lg"
945
+ "tw:text-md": e === "sm",
946
+ "tw:text-lg": e === "md",
947
+ "tw:text-xl": e === "lg"
941
948
  },
942
- e
949
+ r
943
950
  ),
944
951
  "aria-label": `Copy ${t} to clipboard`,
945
952
  title: "Copy to clipboard",
@@ -954,9 +961,9 @@ export {
954
961
  N as Card,
955
962
  we as CardModal,
956
963
  ee as Checkbox,
957
- V as CloseButton,
964
+ Q as CloseButton,
958
965
  ge as CopyToClipboardButton,
959
- zt as Details,
966
+ Zt as Details,
960
967
  _ as ELLIPSIS,
961
968
  U as Input,
962
969
  W as Label,
package/package.json CHANGED
@@ -58,19 +58,19 @@
58
58
  "devDependencies": {
59
59
  "@shlinkio/eslint-config-js-coding-standard": "~3.5.0",
60
60
  "@stylistic/eslint-plugin": "^4.4.0",
61
- "@tailwindcss/vite": "^4.1.7",
61
+ "@tailwindcss/vite": "^4.1.8",
62
62
  "@testing-library/jest-dom": "^6.6.3",
63
63
  "@testing-library/react": "^16.3.0",
64
64
  "@testing-library/user-event": "^14.6.1",
65
65
  "@total-typescript/shoehorn": "^0.1.2",
66
- "@types/react": "^19.1.5",
66
+ "@types/react": "^19.1.6",
67
67
  "@types/react-dom": "^19.1.5",
68
68
  "@vitejs/plugin-react": "^4.5.0",
69
69
  "@vitest/browser": "^3.1.4",
70
70
  "@vitest/coverage-v8": "^3.1.4",
71
71
  "axe-core": "^4.10.3",
72
72
  "bootstrap": "5.2.3",
73
- "eslint": "^9.27.0",
73
+ "eslint": "^9.28.0",
74
74
  "eslint-plugin-import": "^2.31.0",
75
75
  "eslint-plugin-jsx-a11y": "^6.10.2",
76
76
  "eslint-plugin-react": "^7.37.5",
@@ -79,9 +79,9 @@
79
79
  "eslint-plugin-simple-import-sort": "^12.1.1",
80
80
  "history": "^5.3.0",
81
81
  "playwright": "^1.52.0",
82
- "sass": "^1.89.0",
82
+ "sass": "^1.89.1",
83
83
  "typescript": "^5.8.3",
84
- "typescript-eslint": "^8.32.1",
84
+ "typescript-eslint": "^8.33.0",
85
85
  "vite": "^6.3.5",
86
86
  "vite-plugin-dts": "^4.5.4",
87
87
  "vitest": "^3.0.2"
@@ -92,5 +92,5 @@
92
92
  "not ie <= 11",
93
93
  "not op_mini all"
94
94
  ],
95
- "version": "0.9.4"
95
+ "version": "0.9.6"
96
96
  }