@shlinkio/shlink-frontend-kit 0.8.8 → 0.8.9

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.
@@ -15,7 +15,7 @@ export declare type BaseInputProps = {
15
15
  feedback?: 'error';
16
16
  };
17
17
 
18
- declare type BaseInputProps_2 = Omit<SearchInputProps, 'role' | 'aria-autocomplete' | 'aria-expanded' | 'aria-controls' | 'onChange'>;
18
+ declare type BaseInputProps_2 = Omit<SearchInputProps, 'role' | 'aria-autocomplete' | 'aria-expanded' | 'aria-controls' | 'aria-activedescendant' | 'onChange' | 'autoComplete' | 'autoCorrect'>;
19
19
 
20
20
  declare type BooleanControlProps = Omit<HTMLProps<HTMLInputElement>, 'type' | 'onChange' | 'value' | 'defaultValue'> & {
21
21
  onChange?: (checked: boolean, e: ChangeEvent<HTMLInputElement>) => void;
@@ -159,13 +159,15 @@ export declare type LinkButtonProps = Omit<HTMLProps<HTMLButtonElement>, 'size'
159
159
 
160
160
  declare type LinkButtonProps_2 = LinkProps;
161
161
 
162
- export declare function Listbox<Item>({ id, items, onSelectItem, renderItem, className, noItemsMessage, anchor, 'aria-label': label, ...rest }: ListboxProps<Item>): JSX.Element;
162
+ export declare function Listbox<Item>({ id, items, onSelectItem, onActiveItemChange, renderItem, className, noItemsMessage, anchor, 'aria-label': label, ...rest }: ListboxProps<Item>): JSX.Element;
163
163
 
164
164
  export declare type ListboxProps<Item> = Omit<CardProps, 'id' | 'role' | 'aria-orientation'> & {
165
165
  /** Map of items in the listbox, with a key representing them uniquely */
166
166
  items: Map<string, Item>;
167
167
  /** Invoked when the active item is selected via click or `Enter` */
168
168
  onSelectItem: (item: Item) => void;
169
+ /** Invoked when the active item changes via vertical arrows or hover */
170
+ onActiveItemChange?: (key: string, item: Item) => void;
169
171
  /** To customize the shape of an item */
170
172
  renderItem: (item: Item) => ReactNode;
171
173
  /** Used to link with the element controlling this listbox */
@@ -288,7 +290,8 @@ export declare const roundTen: (number: number) => number;
288
290
  * The main difference is that the input is used only to search in the listbox, and once an item is selected, the input
289
291
  * is cleared and the listbox is closed.
290
292
  */
291
- export declare function SearchCombobox<Item>({ searchResults, onSearch, onSelectSearchResult, renderSearchResult, size, listboxSpan, onFocus, ...rest }: SearchComboboxProps<Item>): JSX.Element;
293
+ export declare function SearchCombobox<Item>({ searchResults, onSearch, onSelectSearchResult, renderSearchResult, size, // SearchInput defaults its size to 'lg'. Change it to 'md'
294
+ listboxSpan, onFocus, ...rest }: SearchComboboxProps<Item>): JSX.Element;
292
295
 
293
296
  export declare type SearchComboboxProps<Item> = BaseInputProps_2 & {
294
297
  /** If defined, it will display a listbox with the search results */
package/dist/tailwind.js CHANGED
@@ -1,12 +1,12 @@
1
- import { jsx as o, jsxs as b, Fragment as S } from "react/jsx-runtime";
2
- import i, { clsx as x } from "clsx";
3
- import { useState as K, useEffect as M, createContext as H, useContext as v, forwardRef as p, useCallback as I, useId as _, useRef as L, useMemo as Q } from "react";
4
- import { Link as j, NavLink as nt } from "react-router";
5
- import { faClose as at, faEyeSlash as lt, faEye as dt, faCircleNotch as V, faSearch as st, faChevronLeft as q, faChevronRight as z } from "@fortawesome/free-solid-svg-icons";
1
+ import { jsx as n, jsxs as g, Fragment as F } from "react/jsx-runtime";
2
+ import i, { clsx as v } from "clsx";
3
+ import { useState as $, useCallback as I, useEffect as _, createContext as H, useContext as N, forwardRef as x, useId as A, useRef as E, useMemo as O } from "react";
4
+ import { Link as S, NavLink as nt } from "react-router";
5
+ import { faClose as at, faEyeSlash as lt, faEye as dt, faCircleNotch as V, faSearch as st, faChevronLeft as z, faChevronRight as G } from "@fortawesome/free-solid-svg-icons";
6
6
  import { FontAwesomeIcon as k } from "@fortawesome/react-fontawesome";
7
7
  import { a as it, u as wt } from "./use-toggle-CNvdDGvy.js";
8
8
  import { createPortal as ct } from "react-dom";
9
- const mt = ({ className: t, ...e }) => /* @__PURE__ */ o(
9
+ const mt = ({ className: t, ...e }) => /* @__PURE__ */ n(
10
10
  "div",
11
11
  {
12
12
  className: i(
@@ -16,7 +16,7 @@ const mt = ({ className: t, ...e }) => /* @__PURE__ */ o(
16
16
  ),
17
17
  ...e
18
18
  }
19
- ), gt = ({ className: t, ...e }) => /* @__PURE__ */ o(
19
+ ), gt = ({ className: t, ...e }) => /* @__PURE__ */ n(
20
20
  "div",
21
21
  {
22
22
  className: i(
@@ -26,7 +26,7 @@ const mt = ({ className: t, ...e }) => /* @__PURE__ */ o(
26
26
  ),
27
27
  ...e
28
28
  }
29
- ), bt = ({ className: t, ...e }) => /* @__PURE__ */ o(
29
+ ), bt = ({ className: t, ...e }) => /* @__PURE__ */ n(
30
30
  "div",
31
31
  {
32
32
  className: i(
@@ -36,7 +36,7 @@ const mt = ({ className: t, ...e }) => /* @__PURE__ */ o(
36
36
  ),
37
37
  ...e
38
38
  }
39
- ), ut = ({ className: t, ...e }) => /* @__PURE__ */ o(
39
+ ), ut = ({ className: t, ...e }) => /* @__PURE__ */ n(
40
40
  "div",
41
41
  {
42
42
  className: i(
@@ -46,76 +46,83 @@ const mt = ({ className: t, ...e }) => /* @__PURE__ */ o(
46
46
  ),
47
47
  ...e
48
48
  }
49
- ), f = Object.assign(ut, { Body: gt, Header: mt, Footer: bt }), pt = ({ bodyClassName: t, children: e, ...r }) => {
50
- const { title: n, titleSize: a = "md", ...d } = "title" in r ? r : {
49
+ ), y = Object.assign(ut, { Body: gt, Header: mt, Footer: bt }), pt = ({ bodyClassName: t, children: e, ...r }) => {
50
+ const { title: o, titleSize: a = "md", ...d } = "title" in r ? r : {
51
51
  ...r,
52
52
  title: void 0,
53
53
  titleSize: void 0
54
54
  };
55
- return /* @__PURE__ */ b(f, { ...d, children: [
56
- n && /* @__PURE__ */ b(f.Header, { children: [
57
- a === "lg" && /* @__PURE__ */ o("h4", { children: n }),
58
- a === "md" && /* @__PURE__ */ o("h5", { children: n }),
59
- a === "sm" && /* @__PURE__ */ o("h6", { children: n })
55
+ return /* @__PURE__ */ g(y, { ...d, children: [
56
+ o && /* @__PURE__ */ g(y.Header, { children: [
57
+ a === "lg" && /* @__PURE__ */ n("h4", { children: o }),
58
+ a === "md" && /* @__PURE__ */ n("h5", { children: o }),
59
+ a === "sm" && /* @__PURE__ */ n("h6", { children: o })
60
60
  ] }),
61
- /* @__PURE__ */ o(f.Body, { className: t, children: e })
61
+ /* @__PURE__ */ n(y.Body, { className: t, children: e })
62
62
  ] });
63
63
  };
64
64
  function ht({
65
65
  id: t,
66
66
  items: e,
67
67
  onSelectItem: r,
68
- renderItem: n,
69
- className: a,
70
- noItemsMessage: d = "No items",
71
- anchor: l,
72
- "aria-label": s = "Items",
73
- ...c
68
+ onActiveItemChange: o,
69
+ renderItem: a,
70
+ className: d,
71
+ noItemsMessage: l = "No items",
72
+ anchor: s,
73
+ "aria-label": c = "Items",
74
+ ...b
74
75
  }) {
75
- const [g, m] = K(0);
76
- return M(() => {
77
- const w = l == null ? void 0 : l.current;
78
- if (!w)
76
+ const [w, u] = $(0), p = I((f) => {
77
+ if (u(f), o) {
78
+ const [m, h] = [...e.entries()][f];
79
+ o(m, h);
80
+ }
81
+ }, [e, o]);
82
+ return _(() => {
83
+ const f = s == null ? void 0 : s.current;
84
+ if (!f)
79
85
  return;
80
- const u = (h) => {
81
- h.key === "ArrowDown" ? m((y) => Math.min(y + 1, e.size - 1)) : h.key === "ArrowUp" ? m((y) => Math.max(y - 1, 0)) : h.key === "Enter" && r([...e.values()][g]);
86
+ const m = (h) => {
87
+ ["Enter", "ArrowUp", "ArrowDown"].includes(h.key) && h.preventDefault(), h.key === "ArrowDown" ? p(Math.min(w + 1, e.size - 1)) : h.key === "ArrowUp" ? p(Math.max(w - 1, 0)) : h.key === "Enter" && r([...e.values()][w]);
82
88
  };
83
- return w.addEventListener("keydown", u), () => w.removeEventListener("keydown", u);
84
- }, [g, l, e, r]), /* @__PURE__ */ b(
85
- f,
89
+ return f.addEventListener("keydown", m), () => f.removeEventListener("keydown", m);
90
+ }, [w, s, p, e, r]), /* @__PURE__ */ g(
91
+ y,
86
92
  {
87
93
  id: t,
88
- className: i("tw:py-1 tw:flex tw:flex-col", a),
94
+ className: i("tw:py-1 tw:flex tw:flex-col", d),
89
95
  role: "listbox",
90
96
  "aria-orientation": "vertical",
91
- "aria-label": s,
92
- ...c,
97
+ "aria-label": c,
98
+ ...b,
93
99
  children: [
94
- e.size === 0 && /* @__PURE__ */ o("i", { role: "option", "aria-disabled": !0, "aria-selected": !1, "data-testid": "no-items", className: "tw:px-2 tw:py-1", children: d }),
95
- [...e.entries()].map(([w, u], h) => /* @__PURE__ */ o(
100
+ 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: l }),
101
+ [...e.entries()].map(([f, m], h) => /* @__PURE__ */ n(
96
102
  "button",
97
103
  {
104
+ id: `${t}_${f}`,
98
105
  type: "button",
99
106
  role: "option",
100
- "aria-selected": h === g,
107
+ "aria-selected": h === w,
101
108
  className: i(
102
109
  "tw:px-2 tw:py-1 tw:text-left tw:truncate",
103
- { "tw:bg-lm-secondary tw:dark:bg-dm-secondary": h === g }
110
+ { "tw:bg-lm-secondary tw:dark:bg-dm-secondary": h === w }
104
111
  ),
105
112
  tabIndex: -1,
106
- onClick: () => r(u),
107
- onMouseOver: () => m(h),
108
- children: n(u)
113
+ onClick: () => r(m),
114
+ onMouseOver: () => p(h),
115
+ children: a(m)
109
116
  },
110
- w
117
+ f
111
118
  ))
112
119
  ]
113
120
  }
114
121
  );
115
122
  }
116
- const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className: e }) => {
117
- const { responsive: r } = v(C);
118
- return /* @__PURE__ */ o(B.Provider, { value: { section: "head" }, children: /* @__PURE__ */ o(
123
+ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className: e }) => {
124
+ const { responsive: r } = N(T);
125
+ return /* @__PURE__ */ n(B.Provider, { value: { section: "head" }, children: /* @__PURE__ */ n(
119
126
  "thead",
120
127
  {
121
128
  className: i(
@@ -126,8 +133,8 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
126
133
  }
127
134
  ) });
128
135
  }, xt = ({ children: t, className: e }) => {
129
- const { responsive: r } = v(C);
130
- return /* @__PURE__ */ o(B.Provider, { value: { section: "body" }, children: /* @__PURE__ */ o(
136
+ const { responsive: r } = N(T);
137
+ return /* @__PURE__ */ n(B.Provider, { value: { section: "body" }, children: /* @__PURE__ */ n(
131
138
  "tbody",
132
139
  {
133
140
  className: i(
@@ -138,8 +145,8 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
138
145
  }
139
146
  ) });
140
147
  }, yt = ({ children: t, className: e }) => {
141
- const { responsive: r } = v(C);
142
- return /* @__PURE__ */ o(B.Provider, { value: { section: "footer" }, children: /* @__PURE__ */ o(
148
+ const { responsive: r } = N(T);
149
+ return /* @__PURE__ */ n(B.Provider, { value: { section: "footer" }, children: /* @__PURE__ */ n(
143
150
  "tfoot",
144
151
  {
145
152
  className: i(
@@ -149,9 +156,9 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
149
156
  children: t
150
157
  }
151
158
  ) });
152
- }, kt = ({ children: t, className: e, ...r }) => {
153
- const n = v(B), a = (n == null ? void 0 : n.section) === "body", { responsive: d } = v(C);
154
- return /* @__PURE__ */ o(
159
+ }, vt = ({ children: t, className: e, ...r }) => {
160
+ const o = N(B), a = (o == null ? void 0 : o.section) === "body", { responsive: d } = N(T);
161
+ return /* @__PURE__ */ n(
155
162
  "tr",
156
163
  {
157
164
  className: i(
@@ -169,9 +176,9 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
169
176
  children: t
170
177
  }
171
178
  );
172
- }, vt = ({ children: t, className: e, columnName: r, type: n, ...a }) => {
173
- const d = v(B), l = n ?? ((d == null ? void 0 : d.section) !== "body" ? "th" : "td"), { responsive: s } = v(C);
174
- return /* @__PURE__ */ o(
179
+ }, kt = ({ children: t, className: e, columnName: r, type: o, ...a }) => {
180
+ const d = N(B), l = o ?? ((d == null ? void 0 : d.section) !== "body" ? "th" : "td"), { responsive: s } = N(T);
181
+ return /* @__PURE__ */ n(
175
182
  l,
176
183
  {
177
184
  "data-column": s ? r : void 0,
@@ -189,26 +196,26 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
189
196
  children: t
190
197
  }
191
198
  );
192
- }, Nt = ({ header: t, footer: e, children: r, responsive: n = !0, ...a }) => /* @__PURE__ */ o(C.Provider, { value: { responsive: n }, children: /* @__PURE__ */ b("table", { className: "tw:w-full", ...a, children: [
193
- /* @__PURE__ */ o(ft, { children: t }),
194
- /* @__PURE__ */ o(xt, { children: r }),
195
- e && /* @__PURE__ */ o(yt, { children: e })
196
- ] }) }), Kt = Object.assign(Nt, { Row: kt, Cell: vt }), Pt = ({
199
+ }, Nt = ({ header: t, footer: e, children: r, responsive: o = !0, ...a }) => /* @__PURE__ */ n(T.Provider, { value: { responsive: o }, children: /* @__PURE__ */ g("table", { className: "tw:w-full", ...a, children: [
200
+ /* @__PURE__ */ n(ft, { children: t }),
201
+ /* @__PURE__ */ n(xt, { children: r }),
202
+ e && /* @__PURE__ */ n(yt, { children: e })
203
+ ] }) }), Jt = Object.assign(Nt, { Row: vt, Cell: kt }), Pt = ({
197
204
  children: t,
198
205
  className: e,
199
206
  disabled: r,
200
- variant: n = "primary",
207
+ variant: o = "primary",
201
208
  size: a = "md",
202
209
  inline: d = !1,
203
210
  solid: l = !1,
204
211
  type: s = "button",
205
212
  ...c
206
213
  }) => {
207
- const g = "to" in c ? j : "button", m = g === j ? void 0 : s;
214
+ const b = "to" in c ? S : "button", w = b === S ? void 0 : s;
208
215
  return (
209
216
  // @ts-expect-error We are explicitly checking for the `to` prop before using Link
210
- /* @__PURE__ */ o(
211
- g,
217
+ /* @__PURE__ */ n(
218
+ b,
212
219
  {
213
220
  className: i(
214
221
  {
@@ -219,8 +226,8 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
219
226
  "tw:border tw:rounded-md tw:no-underline",
220
227
  "tw:transition-colors",
221
228
  {
222
- "tw:focus-ring": n !== "danger",
223
- "tw:focus-ring-danger": n === "danger"
229
+ "tw:focus-ring": o !== "danger",
230
+ "tw:focus-ring-danger": o === "danger"
224
231
  },
225
232
  {
226
233
  "tw:px-1.5 tw:py-1 tw:text-sm": a === "sm",
@@ -228,26 +235,26 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
228
235
  "tw:px-4 tw:py-2 tw:text-lg": a === "lg"
229
236
  },
230
237
  {
231
- "tw:border-brand tw:text-brand": n === "primary",
232
- "tw:border-zinc-500": n === "secondary",
233
- "tw:text-zinc-500": n === "secondary" && !l,
234
- "tw:border-danger": n === "danger",
235
- "tw:text-danger": n === "danger" && !l
238
+ "tw:border-brand tw:text-brand": o === "primary",
239
+ "tw:border-zinc-500": o === "secondary",
240
+ "tw:text-zinc-500": o === "secondary" && !l,
241
+ "tw:border-danger": o === "danger",
242
+ "tw:text-danger": o === "danger" && !l
236
243
  },
237
244
  l && {
238
245
  "tw:text-white": !0,
239
- "tw:bg-brand": n === "primary",
240
- "tw:highlight:bg-brand-dark tw:highlight:border-brand-dark": n === "primary",
241
- "tw:bg-zinc-500": n === "secondary",
242
- "tw:highlight:bg-zinc-600 tw:highlight:border-zinc-600": n === "secondary",
243
- "tw:bg-danger": n === "danger",
244
- "tw:highlight:bg-danger-dark tw:highlight:border-danger-dark": n === "danger"
246
+ "tw:bg-brand": o === "primary",
247
+ "tw:highlight:bg-brand-dark tw:highlight:border-brand-dark": o === "primary",
248
+ "tw:bg-zinc-500": o === "secondary",
249
+ "tw:highlight:bg-zinc-600 tw:highlight:border-zinc-600": o === "secondary",
250
+ "tw:bg-danger": o === "danger",
251
+ "tw:highlight:bg-danger-dark tw:highlight:border-danger-dark": o === "danger"
245
252
  },
246
253
  !r && {
247
254
  "tw:highlight:text-white": !l,
248
- "tw:highlight:bg-brand": n === "primary",
249
- "tw:highlight:bg-zinc-500": n === "secondary",
250
- "tw:highlight:bg-danger": n === "danger"
255
+ "tw:highlight:bg-brand": o === "primary",
256
+ "tw:highlight:bg-zinc-500": o === "secondary",
257
+ "tw:highlight:bg-danger": o === "danger"
251
258
  },
252
259
  {
253
260
  "tw:pointer-events-none tw:opacity-65": r
@@ -255,20 +262,20 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
255
262
  e
256
263
  ),
257
264
  disabled: r,
258
- type: m,
265
+ type: w,
259
266
  ...c,
260
267
  children: t
261
268
  }
262
269
  )
263
270
  );
264
- }, X = p(({ className: t, onChange: e, ...r }, n) => {
271
+ }, X = x(({ className: t, onChange: e, ...r }, o) => {
265
272
  const a = I((d) => e == null ? void 0 : e(d.target.checked, d), [e]);
266
- return /* @__PURE__ */ o(
273
+ return /* @__PURE__ */ n(
267
274
  "input",
268
275
  {
269
- ref: n,
276
+ ref: o,
270
277
  type: "checkbox",
271
- className: x(
278
+ className: v(
272
279
  "tw:appearance-none tw:focus-ring",
273
280
  "tw:border-1 tw:border-lm-input-border tw:dark:border-dm-input-border",
274
281
  "tw:bg-lm-primary tw:dark:bg-dm-primary tw:checked:bg-brand tw:bg-no-repeat",
@@ -280,14 +287,14 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
280
287
  ...r
281
288
  }
282
289
  );
283
- }), Qt = p(({ className: t, ...e }, r) => /* @__PURE__ */ o(
290
+ }), Qt = x(({ className: t, ...e }, r) => /* @__PURE__ */ n(
284
291
  X,
285
292
  {
286
293
  ref: r,
287
- className: x("tw:rounded-sm tw:w-4 tw:h-4 tw:checked:bg-(image:--tick) tw:bg-center", t),
294
+ className: v("tw:rounded-sm tw:w-4 tw:h-4 tw:checked:bg-(image:--tick) tw:bg-center", t),
288
295
  ...e
289
296
  }
290
- )), G = ({ onClick: t, label: e = "Close" }) => /* @__PURE__ */ o(
297
+ )), J = ({ onClick: t, label: e = "Close" }) => /* @__PURE__ */ n(
291
298
  "button",
292
299
  {
293
300
  type: "button",
@@ -297,19 +304,19 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
297
304
  "tw:rounded-md tw:focus-ring"
298
305
  ),
299
306
  "aria-label": e,
300
- children: /* @__PURE__ */ o(k, { icon: at, size: "xl" })
307
+ children: /* @__PURE__ */ n(k, { icon: at, size: "xl" })
301
308
  }
302
- ), A = p(({
309
+ ), U = x(({
303
310
  borderless: t = !1,
304
311
  size: e = "md",
305
312
  feedback: r,
306
- className: n,
313
+ className: o,
307
314
  disabled: a,
308
315
  readOnly: d,
309
316
  ...l
310
317
  }, s) => {
311
318
  const c = !a && !d;
312
- return /* @__PURE__ */ o(
319
+ return /* @__PURE__ */ n(
313
320
  "input",
314
321
  {
315
322
  ref: s,
@@ -333,51 +340,51 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
333
340
  // Use different background color when rendered inside a card
334
341
  "tw:group-[&]/card:bg-lm-input tw:group-[&]/card:dark:bg-dm-input": c
335
342
  },
336
- n
343
+ o
337
344
  ),
338
345
  disabled: a,
339
346
  readOnly: d,
340
347
  ...l
341
348
  }
342
349
  );
343
- }), O = ({ required: t, children: e, ...r }) => /* @__PURE__ */ b("label", { ...r, children: [
350
+ }), K = ({ required: t, children: e, ...r }) => /* @__PURE__ */ g("label", { ...r, children: [
344
351
  e,
345
- t && /* @__PURE__ */ o("span", { className: "tw:text-danger tw:ml-1", "data-testid": "required-indicator", children: "*" })
346
- ] }), Vt = p(({ label: t, inputClassName: e, required: r, hiddenRequired: n, error: a, ...d }, l) => {
347
- const s = _();
348
- return /* @__PURE__ */ b("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
349
- /* @__PURE__ */ o(O, { htmlFor: s, required: r, children: t }),
350
- /* @__PURE__ */ o(
351
- A,
352
+ t && /* @__PURE__ */ n("span", { className: "tw:text-danger tw:ml-1", "data-testid": "required-indicator", children: "*" })
353
+ ] }), Vt = x(({ label: t, inputClassName: e, required: r, hiddenRequired: o, error: a, ...d }, l) => {
354
+ const s = A();
355
+ return /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
356
+ /* @__PURE__ */ n(K, { htmlFor: s, required: r, children: t }),
357
+ /* @__PURE__ */ n(
358
+ U,
352
359
  {
353
360
  ref: l,
354
361
  id: s,
355
362
  className: e,
356
- required: r || n,
363
+ required: r || o,
357
364
  feedback: a ? "error" : void 0,
358
365
  ...d
359
366
  }
360
367
  ),
361
- a && /* @__PURE__ */ o("span", { className: "tw:text-danger", children: a })
368
+ a && /* @__PURE__ */ n("span", { className: "tw:text-danger", children: a })
362
369
  ] });
363
- }), It = p(({ containerClassName: t, className: e, size: r, ...n }, a) => {
364
- const [d, l, , s] = it(!1), c = L(null), g = I(({ relatedTarget: m }) => {
365
- var w;
366
- (w = c.current) != null && w.contains(m) || s();
370
+ }), It = x(({ containerClassName: t, className: e, size: r, ...o }, a) => {
371
+ const [d, l, , s] = it(!1), c = E(null), b = I(({ relatedTarget: w }) => {
372
+ var u;
373
+ (u = c.current) != null && u.contains(w) || s();
367
374
  }, [c, s]);
368
- return /* @__PURE__ */ b(
375
+ return /* @__PURE__ */ g(
369
376
  "div",
370
377
  {
371
- className: x("tw:group tw:relative", t),
378
+ className: v("tw:group tw:relative", t),
372
379
  ref: c,
373
- onBlurCapture: g,
380
+ onBlurCapture: b,
374
381
  children: [
375
- /* @__PURE__ */ o(
376
- A,
382
+ /* @__PURE__ */ n(
383
+ U,
377
384
  {
378
385
  ref: a,
379
386
  type: d ? "text" : "password",
380
- className: x(
387
+ className: v(
381
388
  {
382
389
  "tw:pr-10": r !== "sm",
383
390
  "tw:pr-8": r === "sm"
@@ -386,17 +393,17 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
386
393
  ),
387
394
  size: r,
388
395
  "data-testid": "input",
389
- ...n
396
+ ...o
390
397
  }
391
398
  ),
392
- /* @__PURE__ */ o(
399
+ /* @__PURE__ */ n(
393
400
  "button",
394
401
  {
395
402
  type: "button",
396
403
  onClick: l,
397
404
  title: d ? "Hide password" : "Show password",
398
405
  "aria-label": d ? "Hide password" : "Show password",
399
- className: x(
406
+ className: v(
400
407
  "tw:absolute tw:top-[50%] tw:translate-y-[-50%] tw:px-1",
401
408
  "tw:text-placeholder tw:hover:text-lm-text tw:hover:dark:text-dm-text tw:transition-colors",
402
409
  {
@@ -405,37 +412,37 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
405
412
  }
406
413
  ),
407
414
  tabIndex: -1,
408
- children: /* @__PURE__ */ o(k, { fixedWidth: !0, icon: d ? lt : dt })
415
+ children: /* @__PURE__ */ n(k, { fixedWidth: !0, icon: d ? lt : dt })
409
416
  }
410
417
  )
411
418
  ]
412
419
  }
413
420
  );
414
- }), Xt = p(({ label: t, inputClassName: e, required: r, hiddenRequired: n, error: a, ...d }, l) => {
415
- const s = _();
416
- return /* @__PURE__ */ b("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
417
- /* @__PURE__ */ o(O, { htmlFor: s, required: r, children: t }),
418
- /* @__PURE__ */ o(
421
+ }), Xt = x(({ label: t, inputClassName: e, required: r, hiddenRequired: o, error: a, ...d }, l) => {
422
+ const s = A();
423
+ return /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
424
+ /* @__PURE__ */ n(K, { htmlFor: s, required: r, children: t }),
425
+ /* @__PURE__ */ n(
419
426
  It,
420
427
  {
421
428
  ref: l,
422
429
  id: s,
423
430
  className: e,
424
- required: r || n,
431
+ required: r || o,
425
432
  feedback: a ? "error" : void 0,
426
433
  ...d
427
434
  }
428
435
  ),
429
- a && /* @__PURE__ */ o("span", { className: "tw:text-danger", children: a })
436
+ a && /* @__PURE__ */ n("span", { className: "tw:text-danger", children: a })
430
437
  ] });
431
- }), Ct = p(({
438
+ }), Ct = x(({
432
439
  className: t,
433
440
  size: e = "md",
434
441
  feedback: r,
435
- style: n = {},
442
+ style: o = {},
436
443
  disabled: a,
437
444
  ...d
438
- }, l) => /* @__PURE__ */ o(
445
+ }, l) => /* @__PURE__ */ n(
439
446
  "select",
440
447
  {
441
448
  ref: l,
@@ -462,32 +469,32 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
462
469
  t
463
470
  ),
464
471
  style: {
465
- ...n,
472
+ ...o,
466
473
  background: "right 0.75rem center / 16px 12px"
467
474
  },
468
475
  disabled: a,
469
476
  ...d
470
477
  }
471
- )), Yt = p(({ selectClassName: t, label: e, required: r, hiddenRequired: n, ...a }, d) => {
472
- const l = _();
473
- return /* @__PURE__ */ b("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
474
- /* @__PURE__ */ o(O, { htmlFor: l, required: r, children: e }),
475
- /* @__PURE__ */ o(Ct, { ref: d, id: l, className: t, required: r || n, ...a })
478
+ )), Yt = x(({ selectClassName: t, label: e, required: r, hiddenRequired: o, ...a }, d) => {
479
+ const l = A();
480
+ return /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
481
+ /* @__PURE__ */ n(K, { htmlFor: l, required: r, children: e }),
482
+ /* @__PURE__ */ n(Ct, { ref: d, id: l, className: t, required: r || o, ...a })
476
483
  ] });
477
- }), Tt = p(({
484
+ }), Tt = x(({
478
485
  onChange: t,
479
486
  containerClassName: e,
480
487
  inputClassName: r,
481
488
  // Inputs have a default 'md' size. Search inputs are usually 'lg' as they are rendered at the top of sections
482
- size: n = "lg",
489
+ size: o = "lg",
483
490
  loading: a = !1,
484
491
  ...d
485
492
  }, l) => {
486
- const { setTimeout: s, clearCurrentTimeout: c } = wt(500), g = I((m) => {
487
- m ? s(() => t(m)) : (c(), t(m));
493
+ const { setTimeout: s, clearCurrentTimeout: c } = wt(500), b = I((w) => {
494
+ w ? s(() => t(w)) : (c(), t(w));
488
495
  }, [c, t, s]);
489
- return /* @__PURE__ */ b("div", { className: i("tw:group tw:relative tw:focus-within:z-10", e), children: [
490
- /* @__PURE__ */ o(
496
+ return /* @__PURE__ */ g("div", { className: i("tw:group tw:relative tw:focus-within:z-10", e), children: [
497
+ /* @__PURE__ */ n(
491
498
  k,
492
499
  {
493
500
  icon: a ? V : st,
@@ -496,27 +503,27 @@ const B = H(void 0), C = H({ responsive: !0 }), ft = ({ children: t, className:
496
503
  "tw:absolute tw:top-[50%] tw:translate-y-[-50%] tw:transition-colors",
497
504
  "tw:text-placeholder tw:group-focus-within:text-lm-text tw:dark:group-focus-within:text-dm-text",
498
505
  {
499
- "tw:left-3": n !== "sm",
500
- "tw:scale-85 tw:left-2": n === "sm"
506
+ "tw:left-3": o !== "sm",
507
+ "tw:scale-85 tw:left-2": o === "sm"
501
508
  }
502
509
  )
503
510
  }
504
511
  ),
505
- /* @__PURE__ */ o(
506
- A,
512
+ /* @__PURE__ */ n(
513
+ U,
507
514
  {
508
515
  ref: l,
509
516
  type: "search",
510
517
  className: i(
511
518
  {
512
- "tw:pl-9": n !== "sm",
513
- "tw:pl-7": n === "sm"
519
+ "tw:pl-9": o !== "sm",
520
+ "tw:pl-7": o === "sm"
514
521
  },
515
522
  r
516
523
  ),
517
524
  placeholder: "Search...",
518
- onChange: (m) => g(m.target.value),
519
- size: n,
525
+ onChange: (w) => b(w.target.value),
526
+ size: o,
520
527
  ...d
521
528
  }
522
529
  )
@@ -526,24 +533,28 @@ function Zt({
526
533
  searchResults: t,
527
534
  onSearch: e,
528
535
  onSelectSearchResult: r,
529
- renderSearchResult: n,
536
+ renderSearchResult: o,
530
537
  size: a = "md",
538
+ // SearchInput defaults its size to 'lg'. Change it to 'md'
531
539
  listboxSpan: d = "full",
532
540
  onFocus: l,
533
541
  ...s
534
542
  }) {
535
- const c = L(null), g = _(), m = I((w) => {
536
- r(w), e(""), c.current.value = "";
543
+ const c = E(null), b = A(), [w, u] = $(), p = O(
544
+ () => t ? w ?? [...t.keys()][0] : void 0,
545
+ [w, t]
546
+ ), f = I((m) => {
547
+ r(m), e(""), c.current.value = "";
537
548
  }, [e, r]);
538
- return /* @__PURE__ */ b(
549
+ return /* @__PURE__ */ g(
539
550
  "div",
540
551
  {
541
552
  className: "tw:relative",
542
- onBlur: (w) => {
543
- w.currentTarget.contains(w.relatedTarget) || e("");
553
+ onBlur: (m) => {
554
+ m.currentTarget.contains(m.relatedTarget) || e("");
544
555
  },
545
556
  children: [
546
- /* @__PURE__ */ o(
557
+ /* @__PURE__ */ n(
547
558
  Tt,
548
559
  {
549
560
  onChange: e,
@@ -552,21 +563,25 @@ function Zt({
552
563
  role: "combobox",
553
564
  "aria-autocomplete": "list",
554
565
  "aria-expanded": !!t,
555
- "aria-controls": g,
556
- onFocus: (w) => {
557
- l == null || l(w), e(w.target.value);
566
+ "aria-controls": b,
567
+ "aria-activedescendant": p ? `${b}_${p}` : void 0,
568
+ autoComplete: "off",
569
+ autoCorrect: "off",
570
+ onFocus: (m) => {
571
+ l == null || l(m), e(m.target.value);
558
572
  },
559
573
  ...s
560
574
  }
561
575
  ),
562
- t && /* @__PURE__ */ o(
576
+ t && /* @__PURE__ */ n(
563
577
  ht,
564
578
  {
565
- id: g,
579
+ id: b,
566
580
  items: t,
567
581
  anchor: c,
568
- onSelectItem: m,
569
- renderItem: n,
582
+ onSelectItem: f,
583
+ onActiveItemChange: u,
584
+ renderItem: o,
570
585
  className: i(
571
586
  "tw:absolute tw:top-full tw:mt-1 tw:z-10",
572
587
  {
@@ -582,11 +597,11 @@ function Zt({
582
597
  }
583
598
  );
584
599
  }
585
- const te = p(({ className: t, ...e }, r) => /* @__PURE__ */ o(
600
+ const te = x(({ className: t, ...e }, r) => /* @__PURE__ */ n(
586
601
  X,
587
602
  {
588
603
  ref: r,
589
- className: x(
604
+ className: v(
590
605
  "tw:rounded-full tw:w-8 tw:h-4",
591
606
  "tw:bg-(image:--circle-grey-dark) tw:dark:bg-(image:--circle-grey-light) tw:checked:bg-(image:--circle-white)",
592
607
  "tw:focus-visible:not-checked:bg-(image:--circle-light-blue)",
@@ -595,7 +610,7 @@ const te = p(({ className: t, ...e }, r) => /* @__PURE__ */ o(
595
610
  ),
596
611
  ...e
597
612
  }
598
- )), Lt = ({ className: t, disabled: e, size: r = "md", type: n = "button", ...a }) => /* @__PURE__ */ o(
613
+ )), Lt = ({ className: t, disabled: e, size: r = "md", type: o = "button", ...a }) => /* @__PURE__ */ n(
599
614
  "button",
600
615
  {
601
616
  className: i(
@@ -610,12 +625,12 @@ const te = p(({ className: t, ...e }, r) => /* @__PURE__ */ o(
610
625
  t
611
626
  ),
612
627
  disabled: e,
613
- type: n,
628
+ type: o,
614
629
  ...a
615
630
  }
616
- ), Y = H(null), Bt = ({ className: t, to: e, ...r }) => {
617
- const n = v(Y);
618
- return /* @__PURE__ */ o(
631
+ ), Y = H(null), Et = ({ className: t, to: e, ...r }) => {
632
+ const o = N(Y);
633
+ return /* @__PURE__ */ n(
619
634
  nt,
620
635
  {
621
636
  role: "menuitem",
@@ -627,20 +642,20 @@ const te = p(({ className: t, ...e }, r) => /* @__PURE__ */ o(
627
642
  {
628
643
  "tw:border-b-brand active": a,
629
644
  "tw:border-b-transparent tw:text-gray-500": !a,
630
- "tw:flex-grow": n == null ? void 0 : n.fill
645
+ "tw:flex-grow": o == null ? void 0 : o.fill
631
646
  },
632
647
  t
633
648
  ),
634
649
  ...r
635
650
  }
636
651
  );
637
- }, Et = ({ children: t, className: e, fill: r }) => /* @__PURE__ */ o(Y.Provider, { value: { fill: r }, children: /* @__PURE__ */ o(f, { role: "menubar", className: i("tw:flex tw:overflow-hidden", e), children: t }) }), ee = Object.assign(Et, { Pill: Bt }), Mt = new Intl.NumberFormat("en-US"), Rt = (t) => Mt.format(Number(t)), J = 10, re = (t) => Math.ceil(t / J) * J, P = 2, R = "...", _t = (t, e) => Array.from({ length: e - t }, (r, n) => t + n), Ft = (t, e) => {
638
- const r = _t(
639
- Math.max(P, t - P),
640
- Math.min(e - 1, t + P) + 1
652
+ }, Bt = ({ children: t, className: e, fill: r }) => /* @__PURE__ */ n(Y.Provider, { value: { fill: r }, children: /* @__PURE__ */ n(y, { role: "menubar", className: i("tw:flex tw:overflow-hidden", e), children: t }) }), ee = Object.assign(Bt, { Pill: Et }), Mt = new Intl.NumberFormat("en-US"), _t = (t) => Mt.format(Number(t)), Q = 10, re = (t) => Math.ceil(t / Q) * Q, C = 2, R = "...", Rt = (t, e) => Array.from({ length: e - t }, (r, o) => t + o), At = (t, e) => {
653
+ const r = Rt(
654
+ Math.max(C, t - C),
655
+ Math.min(e - 1, t + C) + 1
641
656
  );
642
- return t - P > P && r.unshift(R), t + P < e - 1 && r.push(R), r.unshift(1), r.push(e), r;
643
- }, T = (t) => t === R, St = (t) => T(t) ? t : Rt(t), jt = (t, e) => T(t) ? `${t}_${e}` : `${t}`, Z = [
657
+ return t - C > C && r.unshift(R), t + C < e - 1 && r.push(R), r.unshift(1), r.push(e), r;
658
+ }, L = (t) => t === R, Dt = (t) => L(t) ? t : _t(t), Ft = (t, e) => L(t) ? `${t}_${e}` : `${t}`, Z = [
644
659
  "tw:border tw:border-r-0 tw:last:border-r tw:border-lm-border tw:dark:border-dm-border",
645
660
  "tw:rounded-none tw:first:rounded-l tw:last:rounded-r"
646
661
  ], tt = (t = !1) => i(
@@ -651,61 +666,61 @@ const te = p(({ className: t, ...e }, r) => /* @__PURE__ */ o(
651
666
  "tw:highlight:bg-lm-secondary tw:dark:highlight:bg-dm-secondary tw:text-brand": !t,
652
667
  "tw:bg-lm-brand tw:dark:bg-dm-brand tw:text-white": t
653
668
  }
654
- ), D = ({ children: t }) => /* @__PURE__ */ o("span", { "aria-hidden": !0, className: i(Z, "tw:px-3 py-2 tw:text-gray-400"), children: t }), et = () => /* @__PURE__ */ o(D, { children: R });
655
- function Dt({ children: t, active: e, isEllipsis: r, href: n, ...a }) {
656
- const d = Q(() => tt(e), [e]);
657
- return r ? /* @__PURE__ */ o(et, {}) : /* @__PURE__ */ o(j, { className: d, to: n, ...a, children: t });
669
+ ), j = ({ children: t }) => /* @__PURE__ */ n("span", { "aria-hidden": !0, className: i(Z, "tw:px-3 py-2 tw:text-gray-400"), children: t }), et = () => /* @__PURE__ */ n(j, { children: R });
670
+ function St({ children: t, active: e, isEllipsis: r, href: o, ...a }) {
671
+ const d = O(() => tt(e), [e]);
672
+ return r ? /* @__PURE__ */ n(et, {}) : /* @__PURE__ */ n(S, { className: d, to: o, ...a, children: t });
658
673
  }
659
- function Ht({ children: t, active: e, isEllipsis: r, ...n }) {
660
- const a = Q(() => tt(e), [e]);
661
- return r ? /* @__PURE__ */ o(et, {}) : /* @__PURE__ */ o("button", { type: "button", className: a, ...n, children: t });
674
+ function jt({ children: t, active: e, isEllipsis: r, ...o }) {
675
+ const a = O(() => tt(e), [e]);
676
+ return r ? /* @__PURE__ */ n(et, {}) : /* @__PURE__ */ n("button", { type: "button", className: a, ...o, children: t });
662
677
  }
663
678
  const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
664
- const n = "urlForPage" in r, a = n ? Dt : Ht, d = I(
665
- (l) => n ? { href: T(l) ? void 0 : r.urlForPage(l) } : { onClick: () => !T(l) && r.onPageChange(l) },
666
- [n, r]
679
+ const o = "urlForPage" in r, a = o ? St : jt, d = I(
680
+ (l) => o ? { href: L(l) ? void 0 : r.urlForPage(l) } : { onClick: () => !L(l) && r.onPageChange(l) },
681
+ [o, r]
667
682
  );
668
- return e < 2 ? null : /* @__PURE__ */ b("div", { className: "tw:select-none tw:flex", "data-testid": "paginator", children: [
669
- t === 1 ? /* @__PURE__ */ o(D, { children: /* @__PURE__ */ o(k, { size: "xs", icon: q }) }) : /* @__PURE__ */ o(a, { ...d(Math.max(1, t - 1)), "aria-label": "Previous", children: /* @__PURE__ */ o(k, { size: "xs", icon: q }) }),
670
- Ft(t, e).map((l, s) => /* @__PURE__ */ o(
683
+ return e < 2 ? null : /* @__PURE__ */ g("div", { className: "tw:select-none tw:flex", "data-testid": "paginator", children: [
684
+ t === 1 ? /* @__PURE__ */ n(j, { children: /* @__PURE__ */ n(k, { size: "xs", icon: z }) }) : /* @__PURE__ */ n(a, { ...d(Math.max(1, t - 1)), "aria-label": "Previous", children: /* @__PURE__ */ n(k, { size: "xs", icon: z }) }),
685
+ At(t, e).map((l, s) => /* @__PURE__ */ n(
671
686
  a,
672
687
  {
673
688
  active: l === t,
674
- isEllipsis: T(l),
689
+ isEllipsis: L(l),
675
690
  ...d(l),
676
- children: St(l)
691
+ children: Dt(l)
677
692
  },
678
- jt(l, s)
693
+ Ft(l, s)
679
694
  )),
680
- t === e ? /* @__PURE__ */ o(D, { children: /* @__PURE__ */ o(k, { size: "xs", icon: z }) }) : /* @__PURE__ */ o(a, { ...d(Math.min(e, t + 1)), "aria-label": "Next", children: /* @__PURE__ */ o(k, { size: "xs", icon: z }) })
695
+ t === e ? /* @__PURE__ */ n(j, { children: /* @__PURE__ */ n(k, { size: "xs", icon: G }) }) : /* @__PURE__ */ n(a, { ...d(Math.min(e, t + 1)), "aria-label": "Next", children: /* @__PURE__ */ n(k, { size: "xs", icon: G }) })
681
696
  ] });
682
- }, At = ({
697
+ }, $t = ({
683
698
  open: t,
684
699
  children: e,
685
700
  className: r,
686
- onClose: n,
701
+ onClose: o,
687
702
  ...a
688
703
  }) => {
689
- const d = L(null);
690
- return M(() => {
691
- var g, m;
704
+ const d = E(null);
705
+ return _(() => {
706
+ var b, w;
692
707
  const l = document.body, s = l.style.overflow, c = l.style.paddingRight;
693
708
  if (t) {
694
- const w = window.outerWidth - l.clientWidth, u = l.scrollHeight > l.clientHeight;
695
- l.style.overflow = "hidden", u && (l.style.paddingRight = `${w}px`), (g = d.current) == null || g.showModal();
709
+ const u = window.outerWidth - l.clientWidth, p = l.scrollHeight > l.clientHeight;
710
+ l.style.overflow = "hidden", p && (l.style.paddingRight = `${u}px`), (b = d.current) == null || b.showModal();
696
711
  } else
697
- (m = d.current) == null || m.close();
712
+ (w = d.current) == null || w.close();
698
713
  return () => {
699
714
  l.style.overflow = s, l.style.paddingRight = c;
700
715
  };
701
716
  }, [t]), ct(
702
- /* @__PURE__ */ o(
717
+ /* @__PURE__ */ n(
703
718
  "dialog",
704
719
  {
705
720
  ref: d,
706
721
  className: i("tw:bg-transparent tw:backdrop:bg-black/50", r),
707
722
  onCancel: (l) => {
708
- l.preventDefault(), n();
723
+ l.preventDefault(), o();
709
724
  },
710
725
  ...a,
711
726
  children: t && e
@@ -717,7 +732,7 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
717
732
  open: t,
718
733
  onClose: e,
719
734
  variant: r = "default",
720
- title: n,
735
+ title: o,
721
736
  children: a,
722
737
  className: d,
723
738
  ...l
@@ -725,51 +740,51 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
725
740
  const {
726
741
  size: s = "md",
727
742
  confirmText: c = "Confirm",
728
- cancelText: g = "Cancel",
729
- confirmDisabled: m,
730
- onConfirm: w,
731
- onClosed: u,
732
- ...h
733
- } = "onConfirm" in l ? l : { ...l }, [y, $] = K(t), E = L(null), F = L("cancel"), rt = I(() => {
734
- F.current = "confirm", w == null || w();
735
- }, [w]);
736
- return M(() => {
743
+ cancelText: b = "Cancel",
744
+ confirmDisabled: w,
745
+ onConfirm: u,
746
+ onClosed: p,
747
+ ...f
748
+ } = "onConfirm" in l ? l : { ...l }, [m, h] = $(t), M = E(null), D = E("cancel"), rt = I(() => {
749
+ D.current = "confirm", u == null || u();
750
+ }, [u]);
751
+ return _(() => {
737
752
  if (t) {
738
- F.current = "cancel", $(!0);
753
+ D.current = "cancel", h(!0);
739
754
  return;
740
755
  }
741
- const N = E.current;
742
- if (N) {
743
- delete E.current.dataset.open;
744
- let U = !1;
745
- const W = (ot) => {
746
- U || ot.target !== N || (U = !0, $(!1), u == null || u(F.current));
756
+ const P = M.current;
757
+ if (P) {
758
+ delete M.current.dataset.open;
759
+ let W = !1;
760
+ const q = (ot) => {
761
+ W || ot.target !== P || (W = !0, h(!1), p == null || p(D.current));
747
762
  };
748
- return N.addEventListener("transitionend", W), () => {
749
- N.removeEventListener("transitionend", W);
763
+ return P.addEventListener("transitionend", q), () => {
764
+ P.removeEventListener("transitionend", q);
750
765
  };
751
766
  }
752
- }, [u, t]), M(() => {
753
- const N = E.current;
754
- y && N && (N.dataset.open = "");
755
- }, [y]), /* @__PURE__ */ o(
756
- At,
767
+ }, [p, t]), _(() => {
768
+ const P = M.current;
769
+ m && P && (P.dataset.open = "");
770
+ }, [m]), /* @__PURE__ */ n(
771
+ $t,
757
772
  {
758
- open: y,
773
+ open: m,
759
774
  onClose: e,
760
775
  className: i(
761
776
  {
762
- "tw:flex tw:w-screen tw:h-screen tw:max-w-screen tw:max-h-screen": y,
777
+ "tw:flex tw:w-screen tw:h-screen tw:max-w-screen tw:max-h-screen": m,
763
778
  "tw:overflow-hidden": r === "cover"
764
779
  },
765
780
  d
766
781
  ),
767
- ...h,
768
- children: /* @__PURE__ */ o(
782
+ ...f,
783
+ children: /* @__PURE__ */ n(
769
784
  "div",
770
785
  {
771
786
  "data-testid": "transition-container",
772
- ref: E,
787
+ ref: M,
773
788
  className: i(
774
789
  "tw:w-full tw:m-auto tw:p-4 tw:sm:p-6",
775
790
  // CSS transitions are based on the presence of the `data-open` attribute
@@ -784,11 +799,11 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
784
799
  },
785
800
  { "tw:h-full": r === "cover" }
786
801
  ),
787
- children: /* @__PURE__ */ o(f, { className: i(
802
+ children: /* @__PURE__ */ n(y, { className: i(
788
803
  "tw:w-full",
789
804
  { "tw:h-full tw:relative tw:overflow-auto": r === "cover" }
790
- ), children: r === "cover" ? /* @__PURE__ */ b(S, { children: [
791
- /* @__PURE__ */ b(
805
+ ), children: r === "cover" ? /* @__PURE__ */ g(F, { children: [
806
+ /* @__PURE__ */ g(
792
807
  "div",
793
808
  {
794
809
  className: i(
@@ -798,23 +813,23 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
798
813
  "tw:[text-shadow:_0_2px_4px_rgb(0_0_0/_0.8)]"
799
814
  ),
800
815
  children: [
801
- /* @__PURE__ */ o("h5", { children: n }),
802
- /* @__PURE__ */ o(G, { onClick: e, label: "Close dialog" })
816
+ /* @__PURE__ */ n("h5", { children: o }),
817
+ /* @__PURE__ */ n(J, { onClick: e, label: "Close dialog" })
803
818
  ]
804
819
  }
805
820
  ),
806
- /* @__PURE__ */ o("div", { children: a })
807
- ] }) : /* @__PURE__ */ b(S, { children: [
808
- /* @__PURE__ */ b(f.Header, { className: i(
821
+ /* @__PURE__ */ n("div", { children: a })
822
+ ] }) : /* @__PURE__ */ g(F, { children: [
823
+ /* @__PURE__ */ g(y.Header, { className: i(
809
824
  "tw:sticky tw:top-0",
810
825
  "tw:flex tw:items-center tw:justify-between tw:gap-x-2"
811
826
  ), children: [
812
- /* @__PURE__ */ o("h5", { className: i({ "tw:text-danger": r === "danger" }), children: n }),
813
- /* @__PURE__ */ o(G, { onClick: e, label: "Close dialog" })
827
+ /* @__PURE__ */ n("h5", { className: i({ "tw:text-danger": r === "danger" }), children: o }),
828
+ /* @__PURE__ */ n(J, { onClick: e, label: "Close dialog" })
814
829
  ] }),
815
- /* @__PURE__ */ o(f.Body, { children: a }),
816
- w && /* @__PURE__ */ b(
817
- f.Footer,
830
+ /* @__PURE__ */ n(y.Body, { children: a }),
831
+ u && /* @__PURE__ */ g(
832
+ y.Footer,
818
833
  {
819
834
  "data-testid": "footer",
820
835
  className: i(
@@ -822,13 +837,13 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
822
837
  "tw:[&]:px-3 tw:sticky tw:bottom-0"
823
838
  ),
824
839
  children: [
825
- /* @__PURE__ */ o(Lt, { onClick: e, children: g }),
826
- /* @__PURE__ */ o(
840
+ /* @__PURE__ */ n(Lt, { onClick: e, children: b }),
841
+ /* @__PURE__ */ n(
827
842
  Pt,
828
843
  {
829
844
  solid: !0,
830
845
  variant: r === "danger" ? "danger" : "primary",
831
- disabled: m,
846
+ disabled: w,
832
847
  onClick: rt,
833
848
  children: c
834
849
  }
@@ -841,19 +856,19 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
841
856
  )
842
857
  }
843
858
  );
844
- }, ae = ({ className: t, children: e, loading: r = !1, variant: n = "default" }) => /* @__PURE__ */ o(pt, { className: x({ "tw:[&]:border-danger": n === "error" }, t), children: /* @__PURE__ */ b("h3", { className: x("tw:text-center", {
845
- "tw:text-gray-500 tw:dark:text-gray-400": n === "default",
846
- "tw:text-danger": n === "error"
859
+ }, ae = ({ className: t, children: e, loading: r = !1, variant: o = "default" }) => /* @__PURE__ */ n(pt, { className: v({ "tw:[&]:border-danger": o === "error" }, t), children: /* @__PURE__ */ g("h3", { className: v("tw:text-center", {
860
+ "tw:text-gray-500 tw:dark:text-gray-400": o === "default",
861
+ "tw:text-danger": o === "error"
847
862
  }), children: [
848
- r && /* @__PURE__ */ b(S, { children: [
849
- /* @__PURE__ */ o(k, { icon: V, spin: !0 }),
850
- /* @__PURE__ */ o("span", { className: "tw:ml-2", children: e ?? "Loading..." })
863
+ r && /* @__PURE__ */ g(F, { children: [
864
+ /* @__PURE__ */ n(k, { icon: V, spin: !0 }),
865
+ /* @__PURE__ */ n("span", { className: "tw:ml-2", children: e ?? "Loading..." })
851
866
  ] }),
852
867
  !r && e
853
- ] }) }), le = ({ variant: t, className: e, size: r = "md", children: n }) => /* @__PURE__ */ o(
868
+ ] }) }), le = ({ variant: t, className: e, size: r = "md", children: o }) => /* @__PURE__ */ n(
854
869
  "div",
855
870
  {
856
- className: x(
871
+ className: v(
857
872
  "tw:rounded-md tw:text-center",
858
873
  {
859
874
  "tw:p-2": r === "sm",
@@ -866,25 +881,25 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
866
881
  },
867
882
  e
868
883
  ),
869
- children: n
884
+ children: o
870
885
  }
871
886
  );
872
887
  export {
873
888
  Pt as Button,
874
- f as Card,
889
+ y as Card,
875
890
  ne as CardModal,
876
891
  Qt as Checkbox,
877
- G as CloseButton,
892
+ J as CloseButton,
878
893
  R as ELLIPSIS,
879
- A as Input,
880
- O as Label,
894
+ U as Input,
895
+ K as Label,
881
896
  Vt as LabelledInput,
882
897
  Xt as LabelledRevealablePasswordInput,
883
898
  Yt as LabelledSelect,
884
899
  Lt as LinkButton,
885
900
  ht as Listbox,
886
901
  ae as Message,
887
- At as ModalDialog,
902
+ $t as ModalDialog,
888
903
  ee as NavPills,
889
904
  oe as Paginator,
890
905
  le as Result,
@@ -893,12 +908,12 @@ export {
893
908
  Tt as SearchInput,
894
909
  Ct as Select,
895
910
  pt as SimpleCard,
896
- Kt as Table,
911
+ Jt as Table,
897
912
  te as ToggleSwitch,
898
- Rt as formatNumber,
899
- jt as keyForPage,
900
- T as pageIsEllipsis,
901
- St as prettifyPageNumber,
902
- Ft as progressivePagination,
913
+ _t as formatNumber,
914
+ Ft as keyForPage,
915
+ L as pageIsEllipsis,
916
+ Dt as prettifyPageNumber,
917
+ At as progressivePagination,
903
918
  re as roundTen
904
919
  };
package/package.json CHANGED
@@ -63,6 +63,7 @@
63
63
  "@types/react": "^19.1.0",
64
64
  "@types/react-dom": "^19.1.1",
65
65
  "@vitejs/plugin-react": "^4.3.4",
66
+ "@vitest/browser": "^3.1.1",
66
67
  "@vitest/coverage-v8": "^3.1.1",
67
68
  "axe-core": "^4.10.3",
68
69
  "bootstrap": "5.2.3",
@@ -74,7 +75,7 @@
74
75
  "eslint-plugin-react-hooks": "^5.2.0",
75
76
  "eslint-plugin-simple-import-sort": "^12.1.1",
76
77
  "history": "^5.3.0",
77
- "jsdom": "^26.0.0",
78
+ "playwright": "^1.51.1",
78
79
  "resize-observer-polyfill": "^1.5.1",
79
80
  "sass": "^1.86.3",
80
81
  "typescript": "^5.8.3",
@@ -89,5 +90,5 @@
89
90
  "not ie <= 11",
90
91
  "not op_mini all"
91
92
  ],
92
- "version": "0.8.8"
93
+ "version": "0.8.9"
93
94
  }