@shlinkio/shlink-frontend-kit 0.9.3 → 0.9.5

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
  /**
@@ -70,6 +70,7 @@ export declare const CloseButton: FC<CloseButtonProps>;
70
70
  export declare type CloseButtonProps = {
71
71
  label?: string;
72
72
  onClick?: HTMLProps<HTMLButtonElement>['onClick'];
73
+ className?: string;
73
74
  };
74
75
 
75
76
  declare type CommonCardModalProps = {
@@ -372,7 +373,7 @@ declare type SelectElementProps = Omit<HTMLProps<HTMLSelectElement>, 'size' | 'c
372
373
 
373
374
  export declare type SelectProps = PropsWithChildren<SelectElementProps & BaseInputProps>;
374
375
 
375
- export declare const SimpleCard: FC<SimpleCardProps>;
376
+ export declare const SimpleCard: ForwardRefExoticComponent<SimpleCardProps & RefAttributes<HTMLDivElement>>;
376
377
 
377
378
  export declare type SimpleCardProps = Omit<CardProps, 'title' | 'size'> & {
378
379
  bodyClassName?: string;
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 F, useEffect as M, useCallback as C, createContext as H, useContext as N, forwardRef as y, useId as $, 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
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";
6
- import { FontAwesomeIcon as k } from "@fortawesome/react-fontawesome";
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 }) => {
11
- const a = I(null), [l, d] = F(!1);
10
+ const zt = ({ children: t, summary: r, summaryClasses: e, ...o }) => {
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
- ), v = 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(v, { ...l, children: [
66
- o && /* @__PURE__ */ g(v.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(v.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,22 +87,22 @@ function kt({
83
87
  "aria-label": s = "Items",
84
88
  ...c
85
89
  }) {
86
- const [m, u] = F(0), p = C((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(
101
- v,
103
+ return x.addEventListener("keydown", b), () => x.removeEventListener("keydown", b);
104
+ }, [m, i, h, r, e]), /* @__PURE__ */ g(
105
+ N,
102
106
  {
103
107
  id: t,
104
108
  className: w("tw:py-1 tw:flex tw:flex-col", l),
@@ -107,67 +111,67 @@ 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 } = N(L);
137
+ const E = H(void 0), L = H({ responsive: !0 }), 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 } = N(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 } = N(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 }) => {
170
- const o = N(E), a = (o == null ? void 0 : o.section) === "body", { responsive: l } = N(L);
173
+ }, Pt = ({ children: t, className: r, ...e }) => {
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",
173
177
  {
@@ -180,18 +184,18 @@ 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 = N(E), d = o ?? ((l == null ? void 0 : l.section) !== "body" ? "th" : "td"), { responsive: i } = N(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 } = 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
200
  "tw:p-2 tw:border-lm-border tw:dark:border-dm-border",
197
201
  {
@@ -200,20 +204,20 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
200
204
  // For md and lower, display the content in data-column attribute as before
201
205
  "tw:before:lg:hidden tw:before:content-[attr(data-column)] tw:before:font-bold tw:before:mr-1": i && d === "td"
202
206
  },
203
- e
207
+ r
204
208
  ),
205
209
  ...a,
206
210
  children: t
207
211
  }
208
212
  );
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: [
213
+ }, It = ({ header: t, footer: r, children: e, responsive: o = !0, ...a }) => /* @__PURE__ */ n(L.Provider, { value: { responsive: o }, children: /* @__PURE__ */ g("table", { className: "tw:w-full", ...a, children: [
210
214
  /* @__PURE__ */ n(vt, { children: t }),
211
- /* @__PURE__ */ n(Nt, { children: r }),
212
- e && /* @__PURE__ */ n(Ct, { children: e })
215
+ /* @__PURE__ */ n(Nt, { children: e }),
216
+ r && /* @__PURE__ */ n(Ct, { children: r })
213
217
  ] }) }), te = Object.assign(It, { Row: Pt, Cell: Tt }), Lt = ({
214
218
  children: t,
215
- className: e,
216
- disabled: r,
219
+ className: r,
220
+ disabled: e,
217
221
  variant: o = "primary",
218
222
  size: a = "md",
219
223
  inline: l = !1,
@@ -263,32 +267,32 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
263
267
  "tw:bg-danger": o === "danger",
264
268
  "tw:highlight:bg-danger-dark tw:highlight:border-danger-dark": o === "danger"
265
269
  },
266
- !r && {
270
+ !e && {
267
271
  "tw:highlight:text-white": !d,
268
272
  "tw:highlight:bg-lm-brand tw:dark:highlight:bg-dm-brand": o === "primary",
269
273
  "tw:highlight:bg-zinc-500": o === "secondary",
270
274
  "tw:highlight:bg-danger": o === "danger"
271
275
  },
272
276
  {
273
- "tw:pointer-events-none tw:opacity-65": r
277
+ "tw:pointer-events-none tw:opacity-65": e
274
278
  },
275
- e
279
+ r
276
280
  ),
277
- disabled: r,
281
+ disabled: e,
278
282
  type: m,
279
283
  ...s,
280
284
  children: t
281
285
  }
282
286
  )
283
287
  );
284
- }, Z = y(({ className: t, onChange: e, ...r }, o) => {
285
- const a = C((l) => e == null ? void 0 : e(l.target.checked, l), [e]);
288
+ }, Z = u(({ className: t, onChange: r, ...e }, o) => {
289
+ const a = P((l) => r == null ? void 0 : r(l.target.checked, l), [r]);
286
290
  return /* @__PURE__ */ n(
287
291
  "input",
288
292
  {
289
293
  ref: o,
290
294
  type: "checkbox",
291
- className: x(
295
+ className: y(
292
296
  "tw:appearance-none tw:focus-ring tw:cursor-[inherit]",
293
297
  "tw:border-1 tw:border-lm-input-border tw:dark:border-dm-input-border",
294
298
  "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,32 +301,33 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
297
301
  t
298
302
  ),
299
303
  onChange: a,
300
- ...r
304
+ ...e
301
305
  }
302
306
  );
303
- }), ee = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
307
+ }), ee = u(({ className: t, ...r }, e) => /* @__PURE__ */ n(
304
308
  Z,
305
309
  {
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
310
+ ref: e,
311
+ className: y("tw:rounded-sm tw:w-4 tw:h-4 tw:checked:bg-(image:--tick) tw:bg-center", t),
312
+ ...r
309
313
  }
310
- )), V = ({ onClick: t, label: e = "Close" }) => /* @__PURE__ */ n(
314
+ )), V = ({ onClick: t, className: r, label: e = "Close" }) => /* @__PURE__ */ n(
311
315
  "button",
312
316
  {
313
317
  type: "button",
314
318
  onClick: t,
315
319
  className: w(
316
320
  "tw:opacity-50 tw:highlight:opacity-80 tw:transition-opacity",
317
- "tw:rounded-md tw:focus-ring"
321
+ "tw:rounded-md tw:focus-ring",
322
+ r
318
323
  ),
319
324
  "aria-label": e,
320
- children: /* @__PURE__ */ n(k, { icon: dt, size: "xl" })
325
+ children: /* @__PURE__ */ n(v, { icon: dt, size: "xl" })
321
326
  }
322
- ), U = y(({
327
+ ), U = u(({
323
328
  borderless: t = !1,
324
- size: e = "md",
325
- feedback: r,
329
+ size: r = "md",
330
+ feedback: e,
326
331
  className: o,
327
332
  disabled: a,
328
333
  readOnly: l,
@@ -336,18 +341,18 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
336
341
  className: w(
337
342
  "tw:w-full",
338
343
  {
339
- "tw:focus-ring": !r,
340
- "tw:focus-ring-danger": r === "error"
344
+ "tw:focus-ring": !e,
345
+ "tw:focus-ring-danger": e === "error"
341
346
  },
342
347
  {
343
- "tw:px-2 tw:py-1 tw:text-sm": e === "sm",
344
- "tw:px-3 tw:py-1.5": e === "md",
345
- "tw:px-4 tw:py-2 tw:text-xl": e === "lg"
348
+ "tw:px-2 tw:py-1 tw:text-sm": r === "sm",
349
+ "tw:px-3 tw:py-1.5": r === "md",
350
+ "tw:px-4 tw:py-2 tw:text-xl": r === "lg"
346
351
  },
347
352
  {
348
353
  "tw:rounded-md tw:border": !t,
349
- "tw:border-lm-input-border tw:dark:border-dm-input-border": !t && !r,
350
- "tw:border-danger": !t && r === "error",
354
+ "tw:border-lm-input-border tw:dark:border-dm-input-border": !t && !e,
355
+ "tw:border-danger": !t && e === "error",
351
356
  "tw:bg-lm-disabled-input tw:dark:bg-dm-disabled-input": !s,
352
357
  "tw:bg-lm-primary tw:dark:bg-dm-primary": s,
353
358
  // Use different background color when rendered inside a card
@@ -360,45 +365,45 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
360
365
  ...d
361
366
  }
362
367
  );
363
- }), W = ({ required: t, children: e, className: r, ...o }) => /* @__PURE__ */ g("label", { className: x("tw:cursor-pointer", r), ...o, children: [
364
- e,
368
+ }), W = ({ required: t, children: r, className: e, ...o }) => /* @__PURE__ */ g("label", { className: y("tw:cursor-pointer", e), ...o, children: [
369
+ r,
365
370
  t && /* @__PURE__ */ n("span", { className: "tw:text-danger tw:ml-1", "data-testid": "required-indicator", children: "*" })
366
- ] }), 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: [
371
+ ] }), 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: [
367
372
  t,
368
- e && /* @__PURE__ */ n(
373
+ r && /* @__PURE__ */ n(
369
374
  "small",
370
375
  {
371
376
  "data-testid": o ? `${o}-help-text` : "help-text",
372
377
  className: "tw:text-gray-500 tw:dark:text-gray-400",
373
- children: e
378
+ children: r
374
379
  }
375
380
  ),
376
- r && /* @__PURE__ */ n("span", { "data-testid": o ? `${o}-error` : "error", className: "tw:text-danger", children: r })
377
- ] }), re = y(({ label: t, inputClassName: e, required: r, hiddenRequired: o, error: a, helpText: l, "data-testid": d, ...i }, s) => {
378
- const c = $();
381
+ e && /* @__PURE__ */ n("span", { "data-testid": o ? `${o}-error` : "error", className: "tw:text-danger", children: e })
382
+ ] }), re = u(({ label: t, inputClassName: r, required: e, hiddenRequired: o, error: a, helpText: l, "data-testid": d, ...i }, s) => {
383
+ const c = F();
379
384
  return /* @__PURE__ */ g(K, { error: a, helpText: l, "data-testid": d, children: [
380
- /* @__PURE__ */ n(W, { htmlFor: c, required: r, children: t }),
385
+ /* @__PURE__ */ n(W, { htmlFor: c, required: e, children: t }),
381
386
  /* @__PURE__ */ n(
382
387
  U,
383
388
  {
384
389
  ref: s,
385
390
  id: c,
386
- className: e,
387
- required: r || o,
391
+ className: r,
392
+ required: e || o,
388
393
  feedback: a ? "error" : void 0,
389
394
  ...i
390
395
  }
391
396
  )
392
397
  ] });
393
- }), Bt = y(({ containerClassName: t, className: e, size: r, ...o }, a) => {
394
- const [l, d, , i] = ct(!1), s = I(null), c = C(({ relatedTarget: m }) => {
395
- var u;
396
- (u = s.current) != null && u.contains(m) || i();
398
+ }), Bt = u(({ containerClassName: t, className: r, size: e, ...o }, a) => {
399
+ const [l, d, , i] = ct(!1), s = I(null), c = P(({ relatedTarget: m }) => {
400
+ var p;
401
+ (p = s.current) != null && p.contains(m) || i();
397
402
  }, [s, i]);
398
403
  return /* @__PURE__ */ g(
399
404
  "div",
400
405
  {
401
- className: x("tw:group tw:relative", t),
406
+ className: y("tw:group tw:relative", t),
402
407
  ref: s,
403
408
  onBlurCapture: c,
404
409
  children: [
@@ -407,14 +412,14 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
407
412
  {
408
413
  ref: a,
409
414
  type: l ? "text" : "password",
410
- className: x(
415
+ className: y(
411
416
  {
412
- "tw:pr-10": r !== "sm",
413
- "tw:pr-8": r === "sm"
417
+ "tw:pr-10": e !== "sm",
418
+ "tw:pr-8": e === "sm"
414
419
  },
415
- e
420
+ r
416
421
  ),
417
- size: r,
422
+ size: e,
418
423
  "data-testid": "input",
419
424
  ...o
420
425
  }
@@ -426,41 +431,41 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
426
431
  onClick: d,
427
432
  title: l ? "Hide password" : "Show password",
428
433
  "aria-label": l ? "Hide password" : "Show password",
429
- className: x(
434
+ className: y(
430
435
  "tw:absolute tw:top-[50%] tw:translate-y-[-50%] tw:px-1",
431
436
  "tw:text-placeholder tw:hover:text-lm-text tw:hover:dark:text-dm-text tw:transition-colors",
432
437
  {
433
- "tw:right-1.5": r !== "sm",
434
- "tw:scale-85 tw:right-1": r === "sm"
438
+ "tw:right-1.5": e !== "sm",
439
+ "tw:scale-85 tw:right-1": e === "sm"
435
440
  }
436
441
  ),
437
442
  tabIndex: -1,
438
- children: /* @__PURE__ */ n(k, { fixedWidth: !0, icon: l ? lt : it })
443
+ children: /* @__PURE__ */ n(v, { fixedWidth: !0, icon: l ? lt : it })
439
444
  }
440
445
  )
441
446
  ]
442
447
  }
443
448
  );
444
- }), oe = y(({ label: t, inputClassName: e, required: r, hiddenRequired: o, error: a, helpText: l, "data-testid": d, ...i }, s) => {
445
- const c = $();
449
+ }), oe = u(({ label: t, inputClassName: r, required: e, hiddenRequired: o, error: a, helpText: l, "data-testid": d, ...i }, s) => {
450
+ const c = F();
446
451
  return /* @__PURE__ */ g(K, { error: a, helpText: l, "data-testid": d, children: [
447
- /* @__PURE__ */ n(W, { htmlFor: c, required: r, children: t }),
452
+ /* @__PURE__ */ n(W, { htmlFor: c, required: e, children: t }),
448
453
  /* @__PURE__ */ n(
449
454
  Bt,
450
455
  {
451
456
  ref: s,
452
457
  id: c,
453
- className: e,
454
- required: r || o,
458
+ className: r,
459
+ required: e || o,
455
460
  feedback: a ? "error" : void 0,
456
461
  ...i
457
462
  }
458
463
  )
459
464
  ] });
460
- }), Mt = y(({
465
+ }), Mt = u(({
461
466
  className: t,
462
- size: e = "md",
463
- feedback: r,
467
+ size: r = "md",
468
+ feedback: e,
464
469
  style: o = {},
465
470
  disabled: a,
466
471
  ...l
@@ -472,18 +477,18 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
472
477
  "tw:w-full tw:appearance-none tw:pr-9",
473
478
  "tw:bg-(image:--chevron-down) tw:bg-no-repeat",
474
479
  {
475
- "tw:focus-ring": !r,
476
- "tw:focus-ring-danger": r === "error"
480
+ "tw:focus-ring": !e,
481
+ "tw:focus-ring-danger": e === "error"
477
482
  },
478
483
  "tw:rounded-md tw:border",
479
484
  {
480
- "tw:border-lm-input-border tw:dark:border-dm-input-border": !r,
481
- "tw:border-danger": r === "error"
485
+ "tw:border-lm-input-border tw:dark:border-dm-input-border": !e,
486
+ "tw:border-danger": e === "error"
482
487
  },
483
488
  {
484
- "tw:pl-2 tw:py-1 tw:text-sm": e === "sm",
485
- "tw:pl-3 tw:py-1.5": e === "md",
486
- "tw:pl-4 tw:py-2 tw:text-xl": e === "lg",
489
+ "tw:pl-2 tw:py-1 tw:text-sm": r === "sm",
490
+ "tw:pl-3 tw:py-1.5": r === "md",
491
+ "tw:pl-4 tw:py-2 tw:text-xl": r === "lg",
487
492
  "tw:bg-lm-disabled-input tw:dark:bg-dm-disabled-input": a,
488
493
  // Apply different background color when rendered inside a card
489
494
  "tw:bg-lm-primary tw:dark:bg-dm-primary tw:group-[&]/card:bg-lm-input tw:group-[&]/card:dark:bg-dm-input": !a
@@ -497,10 +502,10 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
497
502
  disabled: a,
498
503
  ...l
499
504
  }
500
- )), ne = y(({ selectClassName: t, label: e, error: r, helpText: o, required: a, hiddenRequired: l, "data-testid": d, ...i }, s) => {
501
- const c = $();
502
- return /* @__PURE__ */ g(K, { error: r, helpText: o, "data-testid": d, children: [
503
- /* @__PURE__ */ n(W, { htmlFor: c, required: a, children: e }),
505
+ )), ne = u(({ selectClassName: t, label: r, error: e, helpText: o, required: a, hiddenRequired: l, "data-testid": d, ...i }, s) => {
506
+ const c = F();
507
+ return /* @__PURE__ */ g(K, { error: e, helpText: o, "data-testid": d, children: [
508
+ /* @__PURE__ */ n(W, { htmlFor: c, required: a, children: r }),
504
509
  /* @__PURE__ */ n(
505
510
  Mt,
506
511
  {
@@ -508,26 +513,26 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
508
513
  id: c,
509
514
  className: t,
510
515
  required: a || l,
511
- feedback: r ? "error" : void 0,
516
+ feedback: e ? "error" : void 0,
512
517
  ...i
513
518
  }
514
519
  )
515
520
  ] });
516
- }), Et = y(({
521
+ }), Et = u(({
517
522
  onChange: t,
518
- containerClassName: e,
519
- inputClassName: r,
523
+ containerClassName: r,
524
+ inputClassName: e,
520
525
  // Inputs have a default 'md' size. Search inputs are usually 'lg' as they are rendered at the top of sections
521
526
  size: o = "lg",
522
527
  loading: a = !1,
523
528
  ...l
524
529
  }, d) => {
525
- const { setTimeout: i, clearCurrentTimeout: s } = mt(500), c = C((m) => {
530
+ const { setTimeout: i, clearCurrentTimeout: s } = mt(500), c = P((m) => {
526
531
  m ? i(() => t(m)) : (s(), t(m));
527
532
  }, [s, t, i]);
528
- return /* @__PURE__ */ g("div", { className: w("tw:group tw:relative tw:focus-within:z-10", e), children: [
533
+ return /* @__PURE__ */ g("div", { className: w("tw:group tw:relative tw:focus-within:z-10", r), children: [
529
534
  /* @__PURE__ */ n(
530
- k,
535
+ v,
531
536
  {
532
537
  icon: a ? Y : st,
533
538
  spin: a,
@@ -551,7 +556,7 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
551
556
  "tw:pl-9": o !== "sm",
552
557
  "tw:pl-7": o === "sm"
553
558
  },
554
- r
559
+ e
555
560
  ),
556
561
  placeholder: "Search...",
557
562
  onChange: (m) => c(m.target.value),
@@ -563,8 +568,8 @@ const E = H(void 0), L = H({ responsive: !0 }), vt = ({ children: t, className:
563
568
  });
564
569
  function ae({
565
570
  searchResults: t,
566
- onSearch: e,
567
- onSelectSearchResult: r,
571
+ onSearch: r,
572
+ onSelectSearchResult: e,
568
573
  renderSearchResult: o,
569
574
  size: a = "md",
570
575
  // SearchInput defaults its size to 'lg'. Change it to 'md'
@@ -572,35 +577,35 @@ function ae({
572
577
  onFocus: d,
573
578
  ...i
574
579
  }) {
575
- const s = I(null), c = $(), [m, u] = F(), p = O(
580
+ const s = I(null), c = F(), [m, p] = D(), h = O(
576
581
  () => t ? m ?? [...t.keys()][0] : void 0,
577
582
  [m, t]
578
- ), f = C((b) => {
579
- r(b), e(""), s.current.value = "";
580
- }, [e, r]);
583
+ ), x = P((b) => {
584
+ e(b), r(""), s.current.value = "";
585
+ }, [r, e]);
581
586
  return /* @__PURE__ */ g(
582
587
  "div",
583
588
  {
584
589
  className: "tw:relative",
585
590
  onBlur: (b) => {
586
- b.currentTarget.contains(b.relatedTarget) || e("");
591
+ b.currentTarget.contains(b.relatedTarget) || r("");
587
592
  },
588
593
  children: [
589
594
  /* @__PURE__ */ n(
590
595
  Et,
591
596
  {
592
- onChange: e,
597
+ onChange: r,
593
598
  size: a,
594
599
  ref: s,
595
600
  role: "combobox",
596
601
  "aria-autocomplete": "list",
597
602
  "aria-expanded": !!t,
598
603
  "aria-controls": c,
599
- "aria-activedescendant": p ? `${c}_${p}` : void 0,
604
+ "aria-activedescendant": h ? `${c}_${h}` : void 0,
600
605
  autoComplete: "off",
601
606
  autoCorrect: "off",
602
607
  onFocus: (b) => {
603
- d == null || d(b), e(b.target.value);
608
+ d == null || d(b), r(b.target.value);
604
609
  },
605
610
  ...i
606
611
  }
@@ -611,8 +616,8 @@ function ae({
611
616
  id: c,
612
617
  items: t,
613
618
  anchor: s,
614
- onSelectItem: f,
615
- onActiveItemChange: u,
619
+ onSelectItem: x,
620
+ onActiveItemChange: p,
616
621
  renderItem: o,
617
622
  className: w(
618
623
  "tw:absolute tw:top-full tw:mt-1 tw:z-10",
@@ -629,20 +634,20 @@ function ae({
629
634
  }
630
635
  );
631
636
  }
632
- const de = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
637
+ const de = u(({ className: t, ...r }, e) => /* @__PURE__ */ n(
633
638
  Z,
634
639
  {
635
- ref: r,
636
- className: x(
640
+ ref: e,
641
+ className: y(
637
642
  "tw:rounded-full tw:w-8 tw:h-4",
638
643
  "tw:bg-(image:--circle-grey-dark) tw:dark:bg-(image:--circle-grey-light) tw:checked:bg-(image:--circle-white)",
639
644
  "tw:focus-visible:not-checked:bg-(image:--circle-light-blue)",
640
645
  "tw:checked:bg-right tw:transition-[background-position]",
641
646
  t
642
647
  ),
643
- ...e
648
+ ...r
644
649
  }
645
- )), Rt = ({ className: t, disabled: e, size: r = "md", type: o = "button", ...a }) => /* @__PURE__ */ n(
650
+ )), Rt = ({ className: t, disabled: r, size: e = "md", type: o = "button", ...a }) => /* @__PURE__ */ n(
646
651
  "button",
647
652
  {
648
653
  className: w(
@@ -650,24 +655,24 @@ const de = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
650
655
  "tw:text-lm-brand tw:dark:text-dm-brand",
651
656
  "tw:highlight:text-lm-brand-dark tw:dark:highlight:text-dm-brand-dark tw:highlight:underline",
652
657
  {
653
- "tw:px-1.5 tw:py-1 tw:text-sm": r === "sm",
654
- "tw:px-3 tw:py-1.5": r === "md",
655
- "tw:px-4 tw:py-2 tw:text-lg": r === "lg",
656
- "tw:pointer-events-none tw:opacity-65": e
658
+ "tw:px-1.5 tw:py-1 tw:text-sm": e === "sm",
659
+ "tw:px-3 tw:py-1.5": e === "md",
660
+ "tw:px-4 tw:py-2 tw:text-lg": e === "lg",
661
+ "tw:pointer-events-none tw:opacity-65": r
657
662
  },
658
663
  t
659
664
  ),
660
- disabled: e,
665
+ disabled: r,
661
666
  type: o,
662
667
  ...a
663
668
  }
664
- ), z = H(null), _t = ({ className: t, to: e, ...r }) => {
665
- const o = N(z);
669
+ ), z = H(null), _t = ({ className: t, to: r, ...e }) => {
670
+ const o = C(z);
666
671
  return /* @__PURE__ */ n(
667
672
  at,
668
673
  {
669
674
  role: "menuitem",
670
- to: e,
675
+ to: r,
671
676
  className: ({ isActive: a }) => w(
672
677
  "tw:px-4 tw:pt-2 tw:pb-[calc(0.5rem-3px)] tw:border-b-3",
673
678
  "tw:highlight:text-lm-brand tw:dark:highlight:text-dm-brand",
@@ -682,16 +687,16 @@ const de = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
682
687
  },
683
688
  t
684
689
  ),
685
- ...r
690
+ ...e
686
691
  }
687
692
  );
688
- }, Ft = ({ children: t, className: e, fill: r }) => /* @__PURE__ */ n(z.Provider, { value: { fill: r }, children: /* @__PURE__ */ n(v, { role: "menubar", className: w("tw:flex tw:overflow-hidden", e), children: t }) }), le = Object.assign(Ft, { Pill: _t }), $t = new Intl.NumberFormat("en-US"), Dt = (t) => $t.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) => {
689
- const r = St(
693
+ }, 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)), X = 10, ie = (t) => Math.ceil(t / X) * X, T = 2, _ = "...", St = (t, r) => Array.from({ length: r - t }, (e, o) => t + o), jt = (t, r) => {
694
+ const e = St(
690
695
  Math.max(T, t - T),
691
- Math.min(e - 1, t + T) + 1
696
+ Math.min(r - 1, t + T) + 1
692
697
  );
693
- return t - T > T && r.unshift(_), t + T < e - 1 && r.push(_), r.unshift(1), r.push(e), r;
694
- }, B = (t) => t === _, At = (t) => B(t) ? t : Dt(t), Ht = (t, e) => B(t) ? `${t}_${e}` : `${t}`, tt = [
698
+ return t - T > T && e.unshift(_), t + T < r - 1 && e.push(_), e.unshift(1), e.push(r), e;
699
+ }, B = (t) => t === _, At = (t) => B(t) ? t : $t(t), Ht = (t, r) => B(t) ? `${t}_${r}` : `${t}`, tt = [
695
700
  "tw:border tw:border-r-0 tw:last:border-r tw:border-lm-border tw:dark:border-dm-border",
696
701
  "tw:rounded-none tw:first:rounded-l tw:last:rounded-r"
697
702
  ], et = (t = !1) => w(
@@ -705,22 +710,22 @@ const de = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
705
710
  ],
706
711
  t && "tw:bg-lm-main tw:dark:bg-dm-main tw:text-white"
707
712
  ), 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: _ });
708
- function Ot({ children: t, active: e, isEllipsis: r, href: o, ...a }) {
709
- const l = O(() => et(e), [e]);
710
- return r ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n(j, { className: l, to: o, ...a, children: t });
713
+ function Ot({ children: t, active: r, isEllipsis: e, href: o, ...a }) {
714
+ const l = O(() => et(r), [r]);
715
+ return e ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n(j, { className: l, to: o, ...a, children: t });
711
716
  }
712
- function Ut({ children: t, active: e, isEllipsis: r, ...o }) {
713
- const a = O(() => et(e), [e]);
714
- return r ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n("button", { type: "button", className: a, ...o, children: t });
717
+ function Ut({ children: t, active: r, isEllipsis: e, ...o }) {
718
+ const a = O(() => et(r), [r]);
719
+ return e ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n("button", { type: "button", className: a, ...o, children: t });
715
720
  }
716
- const se = ({ currentPage: t, pagesCount: e, ...r }) => {
717
- const o = "urlForPage" in r, a = o ? Ot : Ut, l = C(
718
- (d) => o ? { href: B(d) ? void 0 : r.urlForPage(d) } : { onClick: () => !B(d) && r.onPageChange(d) },
719
- [o, r]
721
+ const se = ({ currentPage: t, pagesCount: r, ...e }) => {
722
+ const o = "urlForPage" in e, a = o ? Ot : Ut, l = P(
723
+ (d) => o ? { href: B(d) ? void 0 : e.urlForPage(d) } : { onClick: () => !B(d) && e.onPageChange(d) },
724
+ [o, e]
720
725
  );
721
- return e < 2 ? null : /* @__PURE__ */ g("div", { className: "tw:select-none tw:flex", "data-testid": "paginator", children: [
722
- t === 1 ? /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(k, { size: "xs", icon: J }) }) : /* @__PURE__ */ n(a, { ...l(Math.max(1, t - 1)), "aria-label": "Previous", children: /* @__PURE__ */ n(k, { size: "xs", icon: J }) }),
723
- jt(t, e).map((d, i) => /* @__PURE__ */ n(
726
+ return r < 2 ? null : /* @__PURE__ */ g("div", { className: "tw:select-none tw:flex", "data-testid": "paginator", children: [
727
+ 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 }) }),
728
+ jt(t, r).map((d, i) => /* @__PURE__ */ n(
724
729
  a,
725
730
  {
726
731
  active: d === t,
@@ -730,12 +735,12 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
730
735
  },
731
736
  Ht(d, i)
732
737
  )),
733
- t === e ? /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(k, { size: "xs", icon: Q }) }) : /* @__PURE__ */ n(a, { ...l(Math.min(e, t + 1)), "aria-label": "Next", children: /* @__PURE__ */ n(k, { size: "xs", icon: Q }) })
738
+ t === r ? /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(v, { size: "xs", icon: Q }) }) : /* @__PURE__ */ n(a, { ...l(Math.min(r, t + 1)), "aria-label": "Next", children: /* @__PURE__ */ n(v, { size: "xs", icon: Q }) })
734
739
  ] });
735
740
  }, Wt = ({
736
741
  open: t,
737
- children: e,
738
- className: r,
742
+ children: r,
743
+ className: e,
739
744
  onClose: o,
740
745
  ...a
741
746
  }) => {
@@ -744,8 +749,8 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
744
749
  var c, m;
745
750
  const d = document.body, i = d.style.overflow, s = d.style.paddingRight;
746
751
  if (t) {
747
- const u = window.outerWidth - d.clientWidth, p = d.scrollHeight > d.clientHeight;
748
- d.style.overflow = "hidden", p && (d.style.paddingRight = `${u}px`), (c = l.current) == null || c.showModal();
752
+ const p = window.outerWidth - d.clientWidth, h = d.scrollHeight > d.clientHeight;
753
+ d.style.overflow = "hidden", h && (d.style.paddingRight = `${p}px`), (c = l.current) == null || c.showModal();
749
754
  } else
750
755
  (m = l.current) == null || m.close();
751
756
  return () => {
@@ -756,20 +761,20 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
756
761
  "dialog",
757
762
  {
758
763
  ref: l,
759
- className: w("tw:bg-transparent tw:backdrop:bg-black/50", r),
764
+ className: w("tw:bg-transparent tw:backdrop:bg-black/50", e),
760
765
  onCancel: (d) => {
761
766
  d.preventDefault(), o();
762
767
  },
763
768
  ...a,
764
- children: t && e
769
+ children: t && r
765
770
  }
766
771
  ),
767
772
  document.body
768
773
  );
769
774
  }, we = ({
770
775
  open: t,
771
- onClose: e,
772
- variant: r = "default",
776
+ onClose: r,
777
+ variant: e = "default",
773
778
  title: o,
774
779
  children: a,
775
780
  className: l,
@@ -780,46 +785,46 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
780
785
  confirmText: s = "Confirm",
781
786
  cancelText: c = "Cancel",
782
787
  confirmDisabled: m,
783
- onConfirm: u,
784
- onClosed: p,
785
- ...f
786
- } = "onConfirm" in d ? d : { ...d }, [b, h] = F(t), R = I(null), D = I("cancel"), ot = C(() => {
787
- D.current = "confirm", u == null || u();
788
- }, [u]);
788
+ onConfirm: p,
789
+ onClosed: h,
790
+ ...x
791
+ } = "onConfirm" in d ? d : { ...d }, [b, f] = D(t), R = I(null), $ = I("cancel"), ot = P((k) => {
792
+ k.preventDefault(), k.stopPropagation(), $.current = "confirm", p == null || p();
793
+ }, [p]);
789
794
  return M(() => {
790
795
  if (t) {
791
- D.current = "cancel", h(!0);
796
+ $.current = "cancel", f(!0);
792
797
  return;
793
798
  }
794
- const P = R.current;
795
- if (P) {
799
+ const k = R.current;
800
+ if (k) {
796
801
  delete R.current.dataset.open;
797
802
  let q = !1;
798
803
  const G = (nt) => {
799
- q || nt.target !== P || (q = !0, h(!1), p == null || p(D.current));
804
+ q || nt.target !== k || (q = !0, f(!1), h == null || h($.current));
800
805
  };
801
- return P.addEventListener("transitionend", G), () => {
802
- P.removeEventListener("transitionend", G);
806
+ return k.addEventListener("transitionend", G), () => {
807
+ k.removeEventListener("transitionend", G);
803
808
  };
804
809
  }
805
- }, [p, t]), M(() => {
806
- const P = R.current;
807
- b && P && (P.dataset.open = "");
810
+ }, [h, t]), M(() => {
811
+ const k = R.current;
812
+ b && k && (k.dataset.open = "");
808
813
  }, [b]), /* @__PURE__ */ n(
809
814
  Wt,
810
815
  {
811
816
  open: b,
812
- onClose: e,
817
+ onClose: r,
813
818
  className: w(
814
819
  {
815
820
  "tw:flex tw:w-screen tw:h-screen tw:max-w-screen tw:max-h-screen": b,
816
- "tw:overflow-hidden": r === "cover"
821
+ "tw:overflow-hidden": e === "cover"
817
822
  },
818
823
  l
819
824
  ),
820
- ...f,
825
+ ...x,
821
826
  children: /* @__PURE__ */ n(
822
- "div",
827
+ "form",
823
828
  {
824
829
  "data-testid": "transition-container",
825
830
  ref: R,
@@ -829,18 +834,19 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
829
834
  "tw:-translate-y-4 tw:data-open:translate-y-0 tw:opacity-0 tw:data-open:opacity-100",
830
835
  "tw:transition-[opacity_,_translate] tw:duration-300",
831
836
  // Handle modal dimensions for different variants and sizes
832
- r !== "cover" && {
837
+ e !== "cover" && {
833
838
  "tw:sm:w-sm": i === "sm",
834
839
  "tw:md:w-lg": i === "md",
835
840
  "tw:md:w-4xl": i === "lg",
836
841
  "tw:md:w-6xl": i === "xl"
837
842
  },
838
- { "tw:h-full": r === "cover" }
843
+ { "tw:h-full": e === "cover" }
839
844
  ),
840
- children: /* @__PURE__ */ n(v, { className: w(
845
+ onSubmit: ot,
846
+ children: /* @__PURE__ */ n(N, { className: w(
841
847
  "tw:w-full",
842
- { "tw:h-full tw:relative tw:overflow-auto": r === "cover" }
843
- ), children: r === "cover" ? /* @__PURE__ */ g(S, { children: [
848
+ { "tw:h-full tw:relative tw:overflow-auto": e === "cover" }
849
+ ), children: e === "cover" ? /* @__PURE__ */ g(S, { children: [
844
850
  /* @__PURE__ */ g(
845
851
  "div",
846
852
  {
@@ -852,22 +858,22 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
852
858
  ),
853
859
  children: [
854
860
  /* @__PURE__ */ n("h5", { children: o }),
855
- /* @__PURE__ */ n(V, { onClick: e, label: "Close dialog" })
861
+ /* @__PURE__ */ n(V, { onClick: r, label: "Close dialog" })
856
862
  ]
857
863
  }
858
864
  ),
859
865
  /* @__PURE__ */ n("div", { children: a })
860
866
  ] }) : /* @__PURE__ */ g(S, { children: [
861
- /* @__PURE__ */ g(v.Header, { className: w(
867
+ /* @__PURE__ */ g(N.Header, { className: w(
862
868
  "tw:sticky tw:top-0",
863
869
  "tw:flex tw:items-center tw:justify-between tw:gap-x-2"
864
870
  ), children: [
865
- /* @__PURE__ */ n("h5", { className: w({ "tw:text-danger": r === "danger" }), children: o }),
866
- /* @__PURE__ */ n(V, { onClick: e, label: "Close dialog" })
871
+ /* @__PURE__ */ n("h5", { className: w({ "tw:text-danger": e === "danger" }), children: o }),
872
+ /* @__PURE__ */ n(V, { onClick: r, label: "Close dialog" })
867
873
  ] }),
868
- /* @__PURE__ */ n(v.Body, { children: a }),
869
- u && /* @__PURE__ */ g(
870
- v.Footer,
874
+ /* @__PURE__ */ n(N.Body, { children: a }),
875
+ p && /* @__PURE__ */ g(
876
+ N.Footer,
871
877
  {
872
878
  "data-testid": "footer",
873
879
  className: w(
@@ -875,14 +881,14 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
875
881
  "tw:[&]:px-3 tw:sticky tw:bottom-0"
876
882
  ),
877
883
  children: [
878
- /* @__PURE__ */ n(Rt, { onClick: e, children: c }),
884
+ /* @__PURE__ */ n(Rt, { onClick: r, children: c }),
879
885
  /* @__PURE__ */ n(
880
886
  Lt,
881
887
  {
882
888
  solid: !0,
883
- variant: r === "danger" ? "danger" : "primary",
889
+ variant: e === "danger" ? "danger" : "primary",
884
890
  disabled: m,
885
- onClick: ot,
891
+ type: "submit",
886
892
  children: s
887
893
  }
888
894
  )
@@ -894,35 +900,35 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
894
900
  )
895
901
  }
896
902
  );
897
- }, 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", {
903
+ }, 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", {
898
904
  "tw:text-gray-500 tw:dark:text-gray-400": o === "default",
899
905
  "tw:text-danger": o === "error"
900
906
  }), children: [
901
- r && /* @__PURE__ */ g(S, { children: [
902
- /* @__PURE__ */ n(k, { icon: Y, spin: !0 }),
903
- /* @__PURE__ */ n("span", { className: "tw:ml-2", children: e ?? "Loading..." })
907
+ e && /* @__PURE__ */ g(S, { children: [
908
+ /* @__PURE__ */ n(v, { icon: Y, spin: !0 }),
909
+ /* @__PURE__ */ n("span", { className: "tw:ml-2", children: r ?? "Loading..." })
904
910
  ] }),
905
- !r && e
906
- ] }) }), me = ({ variant: t, className: e, size: r = "md", children: o }) => /* @__PURE__ */ n(
911
+ !e && r
912
+ ] }) }), me = ({ variant: t, className: r, size: e = "md", children: o }) => /* @__PURE__ */ n(
907
913
  "div",
908
914
  {
909
- className: x(
915
+ className: y(
910
916
  "tw:rounded-md tw:text-center",
911
917
  {
912
- "tw:p-2": r === "sm",
913
- "tw:p-4": r === "md",
914
- "tw:p-6": r === "lg",
918
+ "tw:p-2": e === "sm",
919
+ "tw:p-4": e === "md",
920
+ "tw:p-6": e === "lg",
915
921
  "tw:[&]:text-white": t !== "warning",
916
922
  "tw:bg-lm-brand tw:dark:bg-dm-brand": t === "success",
917
923
  "tw:bg-danger": t === "error",
918
924
  "tw:bg-warning tw:text-black": t === "warning"
919
925
  },
920
- e
926
+ r
921
927
  ),
922
928
  children: o
923
929
  }
924
- ), ge = ({ text: t, className: e, size: r = "lg", initialCopied: o = !1, navigator_: a = globalThis.navigator, ...l }) => {
925
- const [d, i] = gt(o), s = C(
930
+ ), ge = ({ text: t, className: r, size: e = "lg", initialCopied: o = !1, navigator_: a = globalThis.navigator, ...l }) => {
931
+ const [d, i] = gt(o), s = P(
926
932
  () => a.clipboard.writeText(t).then(i),
927
933
  [a.clipboard, t, i]
928
934
  );
@@ -930,26 +936,26 @@ const se = ({ currentPage: t, pagesCount: e, ...r }) => {
930
936
  "button",
931
937
  {
932
938
  type: "button",
933
- className: x(
939
+ className: y(
934
940
  "tw:focus-ring tw:rounded-sm",
935
941
  {
936
- "tw:text-md": r === "sm",
937
- "tw:text-lg": r === "md",
938
- "tw:text-xl": r === "lg"
942
+ "tw:text-md": e === "sm",
943
+ "tw:text-lg": e === "md",
944
+ "tw:text-xl": e === "lg"
939
945
  },
940
- e
946
+ r
941
947
  ),
942
948
  "aria-label": `Copy ${t} to clipboard`,
943
949
  title: "Copy to clipboard",
944
950
  onClick: s,
945
951
  ...l,
946
- children: /* @__PURE__ */ n(k, { icon: d ? wt : ut, fixedWidth: !0 })
952
+ children: /* @__PURE__ */ n(v, { icon: d ? wt : ut, fixedWidth: !0 })
947
953
  }
948
954
  );
949
955
  };
950
956
  export {
951
957
  Lt as Button,
952
- v as Card,
958
+ N as Card,
953
959
  we as CardModal,
954
960
  ee as Checkbox,
955
961
  V as CloseButton,
@@ -975,7 +981,7 @@ export {
975
981
  yt as SimpleCard,
976
982
  te as Table,
977
983
  de as ToggleSwitch,
978
- Dt as formatNumber,
984
+ $t as formatNumber,
979
985
  Ht as keyForPage,
980
986
  B as pageIsEllipsis,
981
987
  At as prettifyPageNumber,
@@ -197,3 +197,45 @@
197
197
  @slot;
198
198
  }
199
199
  }
200
+
201
+ /* For sticky-positioned cells with a background */
202
+ @utility sticky-cell-base {
203
+ @apply tw:z-1 tw:relative tw:sticky;
204
+ @apply tw:before:absolute tw:before:bg-lm-table-border tw:dark:before:bg-dm-table-border tw:before:-z-2;
205
+ @apply tw:after:absolute tw:after:bg-lm-primary tw:dark:after:bg-dm-primary tw:after:-z-1;
206
+
207
+ &:before, &:after {
208
+ content: '';
209
+ }
210
+ &:first-child:after {
211
+ left: 0;
212
+ }
213
+ }
214
+
215
+ @utility sticky-cell {
216
+ @apply tw:sticky-cell-base;
217
+
218
+ &:before {
219
+ inset: -1px 0 -1px 0;
220
+ }
221
+ &:first-child:before {
222
+ left: 0;
223
+ }
224
+ &:after {
225
+ inset: 0 0 0 0;
226
+ }
227
+ }
228
+
229
+ @utility sticky-cell-separated {
230
+ @apply tw:sticky-cell-base;
231
+
232
+ &:before {
233
+ inset: -1px -1px -1px 0;
234
+ }
235
+ &:first-child:before {
236
+ left: -1px;
237
+ }
238
+ &:after {
239
+ inset: 0 0 0 1px;
240
+ }
241
+ }
package/package.json CHANGED
@@ -57,20 +57,20 @@
57
57
  },
58
58
  "devDependencies": {
59
59
  "@shlinkio/eslint-config-js-coding-standard": "~3.5.0",
60
- "@stylistic/eslint-plugin": "^4.2.0",
61
- "@tailwindcss/vite": "^4.1.5",
60
+ "@stylistic/eslint-plugin": "^4.4.0",
61
+ "@tailwindcss/vite": "^4.1.7",
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.2",
67
- "@types/react-dom": "^19.1.3",
68
- "@vitejs/plugin-react": "^4.4.1",
69
- "@vitest/browser": "^3.1.2",
70
- "@vitest/coverage-v8": "^3.1.2",
66
+ "@types/react": "^19.1.5",
67
+ "@types/react-dom": "^19.1.5",
68
+ "@vitejs/plugin-react": "^4.5.0",
69
+ "@vitest/browser": "^3.1.4",
70
+ "@vitest/coverage-v8": "^3.1.4",
71
71
  "axe-core": "^4.10.3",
72
72
  "bootstrap": "5.2.3",
73
- "eslint": "^9.26.0",
73
+ "eslint": "^9.27.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,11 +79,11 @@
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.87.0",
82
+ "sass": "^1.89.0",
83
83
  "typescript": "^5.8.3",
84
- "typescript-eslint": "^8.31.1",
85
- "vite": "^6.3.4",
86
- "vite-plugin-dts": "^4.5.3",
84
+ "typescript-eslint": "^8.32.1",
85
+ "vite": "^6.3.5",
86
+ "vite-plugin-dts": "^4.5.4",
87
87
  "vitest": "^3.0.2"
88
88
  },
89
89
  "browserslist": [
@@ -92,5 +92,5 @@
92
92
  "not ie <= 11",
93
93
  "not op_mini all"
94
94
  ],
95
- "version": "0.9.3"
95
+ "version": "0.9.5"
96
96
  }