@shlinkio/shlink-frontend-kit 0.8.11 → 0.8.12

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.
@@ -85,6 +85,13 @@ declare type CoverCardModalProps = CommonCardModalProps & {
85
85
  variant: 'cover';
86
86
  };
87
87
 
88
+ export declare const Details: FC<DetailsProps>;
89
+
90
+ export declare type DetailsProps = Omit<HTMLProps<HTMLDetailsElement>, 'ref'> & {
91
+ summary: ReactNode;
92
+ summaryClasses?: string;
93
+ };
94
+
88
95
  export declare const ELLIPSIS = "...";
89
96
 
90
97
  declare type Ellipsis = typeof ELLIPSIS;
package/dist/tailwind.js CHANGED
@@ -1,12 +1,21 @@
1
- import { jsx as n, jsxs as g, Fragment as F } from "react/jsx-runtime";
1
+ import { jsxs as g, jsx as n, Fragment as S } from "react/jsx-runtime";
2
2
  import i, { clsx as x } from "clsx";
3
- import { useState as $, useCallback as I, useEffect as _, createContext as H, useContext as N, forwardRef as y, useId as A, useRef as E, useMemo as O } from "react";
4
- import { Link as S, NavLink as nt } from "react-router";
3
+ import { useRef as L, useState as D, useEffect as M, useCallback as I, createContext as $, useContext as N, forwardRef as y, useId as A, useMemo as O } from "react";
4
+ import { Link as j, NavLink as nt } from "react-router";
5
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-PWLikLl6.js";
8
8
  import { createPortal as ct } from "react-dom";
9
- const mt = ({ className: t, ...e }) => /* @__PURE__ */ n(
9
+ const Jt = ({ children: t, summary: e, summaryClasses: r, ...o }) => {
10
+ const a = L(null), [d, l] = D(!1);
11
+ return M(() => {
12
+ const s = a.current, w = () => l(!!(s != null && s.open));
13
+ return s == null || s.addEventListener("toggle", w), () => s == null ? void 0 : s.removeEventListener("toggle", w);
14
+ }, []), /* @__PURE__ */ g("details", { ref: a, ...o, children: [
15
+ /* @__PURE__ */ n("summary", { className: x("tw:focus-ring tw:px-1 tw:-mx-1 tw:rounded-sm", r), children: e }),
16
+ d && /* @__PURE__ */ n("div", { className: "tw:mt-3 tw:flex tw:flex-col tw:gap-y-3", children: t })
17
+ ] });
18
+ }, mt = ({ className: t, ...e }) => /* @__PURE__ */ n(
10
19
  "div",
11
20
  {
12
21
  className: i(
@@ -26,7 +35,7 @@ const mt = ({ className: t, ...e }) => /* @__PURE__ */ n(
26
35
  ),
27
36
  ...e
28
37
  }
29
- ), bt = ({ className: t, ...e }) => /* @__PURE__ */ n(
38
+ ), ut = ({ className: t, ...e }) => /* @__PURE__ */ n(
30
39
  "div",
31
40
  {
32
41
  className: i(
@@ -36,7 +45,7 @@ const mt = ({ className: t, ...e }) => /* @__PURE__ */ n(
36
45
  ),
37
46
  ...e
38
47
  }
39
- ), ut = ({ className: t, ...e }) => /* @__PURE__ */ n(
48
+ ), bt = ({ className: t, ...e }) => /* @__PURE__ */ n(
40
49
  "div",
41
50
  {
42
51
  className: i(
@@ -46,7 +55,7 @@ const mt = ({ className: t, ...e }) => /* @__PURE__ */ n(
46
55
  ),
47
56
  ...e
48
57
  }
49
- ), v = Object.assign(ut, { Body: gt, Header: mt, Footer: bt }), pt = ({ bodyClassName: t, children: e, ...r }) => {
58
+ ), v = Object.assign(bt, { Body: gt, Header: mt, Footer: ut }), pt = ({ bodyClassName: t, children: e, ...r }) => {
50
59
  const { title: o, titleSize: a = "md", ...d } = "title" in r ? r : {
51
60
  ...r,
52
61
  title: void 0,
@@ -70,32 +79,32 @@ function ht({
70
79
  className: d,
71
80
  noItemsMessage: l = "No items",
72
81
  anchor: s,
73
- "aria-label": c = "Items",
74
- ...b
82
+ "aria-label": w = "Items",
83
+ ...u
75
84
  }) {
76
- const [w, u] = $(0), p = I((f) => {
77
- if (u(f), o) {
85
+ const [c, b] = D(0), p = I((f) => {
86
+ if (b(f), o) {
78
87
  const [m, h] = [...e.entries()][f];
79
88
  o(m, h);
80
89
  }
81
90
  }, [e, o]);
82
- return _(() => {
91
+ return M(() => {
83
92
  const f = s == null ? void 0 : s.current;
84
93
  if (!f)
85
94
  return;
86
95
  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]);
96
+ ["Enter", "ArrowUp", "ArrowDown"].includes(h.key) && h.preventDefault(), h.key === "ArrowDown" ? p(Math.min(c + 1, e.size - 1)) : h.key === "ArrowUp" ? p(Math.max(c - 1, 0)) : h.key === "Enter" && r([...e.values()][c]);
88
97
  };
89
98
  return f.addEventListener("keydown", m), () => f.removeEventListener("keydown", m);
90
- }, [w, s, p, e, r]), /* @__PURE__ */ g(
99
+ }, [c, s, p, e, r]), /* @__PURE__ */ g(
91
100
  v,
92
101
  {
93
102
  id: t,
94
103
  className: i("tw:py-1 tw:flex tw:flex-col", d),
95
104
  role: "listbox",
96
105
  "aria-orientation": "vertical",
97
- "aria-label": c,
98
- ...b,
106
+ "aria-label": w,
107
+ ...u,
99
108
  children: [
100
109
  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
110
  [...e.entries()].map(([f, m], h) => /* @__PURE__ */ n(
@@ -104,10 +113,10 @@ function ht({
104
113
  id: `${t}_${f}`,
105
114
  type: "button",
106
115
  role: "option",
107
- "aria-selected": h === w,
116
+ "aria-selected": h === c,
108
117
  className: i(
109
118
  "tw:px-2 tw:py-1 tw:text-left tw:truncate",
110
- { "tw:bg-lm-secondary tw:dark:bg-dm-secondary": h === w }
119
+ { "tw:bg-lm-secondary tw:dark:bg-dm-secondary": h === c }
111
120
  ),
112
121
  tabIndex: -1,
113
122
  onClick: () => r(m),
@@ -120,9 +129,9 @@ function ht({
120
129
  }
121
130
  );
122
131
  }
123
- const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className: e }) => {
132
+ const E = $(void 0), T = $({ responsive: !0 }), ft = ({ children: t, className: e }) => {
124
133
  const { responsive: r } = N(T);
125
- return /* @__PURE__ */ n(B.Provider, { value: { section: "head" }, children: /* @__PURE__ */ n(
134
+ return /* @__PURE__ */ n(E.Provider, { value: { section: "head" }, children: /* @__PURE__ */ n(
126
135
  "thead",
127
136
  {
128
137
  className: i(
@@ -134,7 +143,7 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
134
143
  ) });
135
144
  }, xt = ({ children: t, className: e }) => {
136
145
  const { responsive: r } = N(T);
137
- return /* @__PURE__ */ n(B.Provider, { value: { section: "body" }, children: /* @__PURE__ */ n(
146
+ return /* @__PURE__ */ n(E.Provider, { value: { section: "body" }, children: /* @__PURE__ */ n(
138
147
  "tbody",
139
148
  {
140
149
  className: i(
@@ -146,7 +155,7 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
146
155
  ) });
147
156
  }, yt = ({ children: t, className: e }) => {
148
157
  const { responsive: r } = N(T);
149
- return /* @__PURE__ */ n(B.Provider, { value: { section: "footer" }, children: /* @__PURE__ */ n(
158
+ return /* @__PURE__ */ n(E.Provider, { value: { section: "footer" }, children: /* @__PURE__ */ n(
150
159
  "tfoot",
151
160
  {
152
161
  className: i(
@@ -157,7 +166,7 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
157
166
  }
158
167
  ) });
159
168
  }, vt = ({ children: t, className: e, ...r }) => {
160
- const o = N(B), a = (o == null ? void 0 : o.section) === "body", { responsive: d } = N(T);
169
+ const o = N(E), a = (o == null ? void 0 : o.section) === "body", { responsive: d } = N(T);
161
170
  return /* @__PURE__ */ n(
162
171
  "tr",
163
172
  {
@@ -177,7 +186,7 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
177
186
  }
178
187
  );
179
188
  }, 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);
189
+ const d = N(E), l = o ?? ((d == null ? void 0 : d.section) !== "body" ? "th" : "td"), { responsive: s } = N(T);
181
190
  return /* @__PURE__ */ n(
182
191
  l,
183
192
  {
@@ -200,7 +209,7 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
200
209
  /* @__PURE__ */ n(ft, { children: t }),
201
210
  /* @__PURE__ */ n(xt, { children: r }),
202
211
  e && /* @__PURE__ */ n(yt, { children: e })
203
- ] }) }), Jt = Object.assign(Nt, { Row: vt, Cell: kt }), Pt = ({
212
+ ] }) }), Qt = Object.assign(Nt, { Row: vt, Cell: kt }), Pt = ({
204
213
  children: t,
205
214
  className: e,
206
215
  disabled: r,
@@ -209,13 +218,13 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
209
218
  inline: d = !1,
210
219
  solid: l = !1,
211
220
  type: s = "button",
212
- ...c
221
+ ...w
213
222
  }) => {
214
- const b = "to" in c ? S : "button", w = b === S ? void 0 : s;
223
+ const u = "to" in w ? j : "button", c = u === j ? void 0 : s;
215
224
  return (
216
225
  // @ts-expect-error We are explicitly checking for the `to` prop before using Link
217
226
  /* @__PURE__ */ n(
218
- b,
227
+ u,
219
228
  {
220
229
  className: i(
221
230
  {
@@ -263,8 +272,8 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
263
272
  e
264
273
  ),
265
274
  disabled: r,
266
- type: w,
267
- ...c,
275
+ type: c,
276
+ ...w,
268
277
  children: t
269
278
  }
270
279
  )
@@ -288,7 +297,7 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
288
297
  ...r
289
298
  }
290
299
  );
291
- }), Qt = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
300
+ }), Vt = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
292
301
  X,
293
302
  {
294
303
  ref: r,
@@ -316,7 +325,7 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
316
325
  readOnly: d,
317
326
  ...l
318
327
  }, s) => {
319
- const c = !a && !d;
328
+ const w = !a && !d;
320
329
  return /* @__PURE__ */ n(
321
330
  "input",
322
331
  {
@@ -336,10 +345,10 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
336
345
  "tw:rounded-md tw:border": !t,
337
346
  "tw:border-lm-input-border tw:dark:border-dm-input-border": !t && !r,
338
347
  "tw:border-danger": !t && r === "error",
339
- "tw:bg-lm-disabled-input tw:dark:bg-dm-disabled-input": !c,
340
- "tw:bg-lm-primary tw:dark:bg-dm-primary": c,
348
+ "tw:bg-lm-disabled-input tw:dark:bg-dm-disabled-input": !w,
349
+ "tw:bg-lm-primary tw:dark:bg-dm-primary": w,
341
350
  // Use different background color when rendered inside a card
342
- "tw:group-[&]/card:bg-lm-input tw:group-[&]/card:dark:bg-dm-input": c
351
+ "tw:group-[&]/card:bg-lm-input tw:group-[&]/card:dark:bg-dm-input": w
343
352
  },
344
353
  o
345
354
  ),
@@ -351,7 +360,7 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
351
360
  }), K = ({ required: t, children: e, className: r, ...o }) => /* @__PURE__ */ g("label", { className: x("tw:cursor-pointer", r), ...o, children: [
352
361
  e,
353
362
  t && /* @__PURE__ */ n("span", { className: "tw:text-danger tw:ml-1", "data-testid": "required-indicator", children: "*" })
354
- ] }), Vt = y(({ label: t, inputClassName: e, required: r, hiddenRequired: o, error: a, ...d }, l) => {
363
+ ] }), Xt = y(({ label: t, inputClassName: e, required: r, hiddenRequired: o, error: a, ...d }, l) => {
355
364
  const s = A();
356
365
  return /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
357
366
  /* @__PURE__ */ n(K, { htmlFor: s, required: r, children: t }),
@@ -369,16 +378,16 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
369
378
  a && /* @__PURE__ */ n("span", { className: "tw:text-danger", children: a })
370
379
  ] });
371
380
  }), It = y(({ containerClassName: t, className: e, size: r, ...o }, a) => {
372
- const [d, l, , s] = it(!1), c = E(null), b = I(({ relatedTarget: w }) => {
373
- var u;
374
- (u = c.current) != null && u.contains(w) || s();
375
- }, [c, s]);
381
+ const [d, l, , s] = it(!1), w = L(null), u = I(({ relatedTarget: c }) => {
382
+ var b;
383
+ (b = w.current) != null && b.contains(c) || s();
384
+ }, [w, s]);
376
385
  return /* @__PURE__ */ g(
377
386
  "div",
378
387
  {
379
388
  className: x("tw:group tw:relative", t),
380
- ref: c,
381
- onBlurCapture: b,
389
+ ref: w,
390
+ onBlurCapture: u,
382
391
  children: [
383
392
  /* @__PURE__ */ n(
384
393
  U,
@@ -419,7 +428,7 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
419
428
  ]
420
429
  }
421
430
  );
422
- }), Xt = y(({ label: t, inputClassName: e, required: r, hiddenRequired: o, error: a, ...d }, l) => {
431
+ }), Yt = y(({ label: t, inputClassName: e, required: r, hiddenRequired: o, error: a, ...d }, l) => {
423
432
  const s = A();
424
433
  return /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
425
434
  /* @__PURE__ */ n(K, { htmlFor: s, required: r, children: t }),
@@ -476,13 +485,13 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
476
485
  disabled: a,
477
486
  ...d
478
487
  }
479
- )), Yt = y(({ selectClassName: t, label: e, required: r, hiddenRequired: o, ...a }, d) => {
488
+ )), Zt = y(({ selectClassName: t, label: e, required: r, hiddenRequired: o, ...a }, d) => {
480
489
  const l = A();
481
490
  return /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
482
491
  /* @__PURE__ */ n(K, { htmlFor: l, required: r, children: e }),
483
492
  /* @__PURE__ */ n(Ct, { ref: d, id: l, className: t, required: r || o, ...a })
484
493
  ] });
485
- }), Tt = y(({
494
+ }), Lt = y(({
486
495
  onChange: t,
487
496
  containerClassName: e,
488
497
  inputClassName: r,
@@ -491,9 +500,9 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
491
500
  loading: a = !1,
492
501
  ...d
493
502
  }, l) => {
494
- const { setTimeout: s, clearCurrentTimeout: c } = wt(500), b = I((w) => {
495
- w ? s(() => t(w)) : (c(), t(w));
496
- }, [c, t, s]);
503
+ const { setTimeout: s, clearCurrentTimeout: w } = wt(500), u = I((c) => {
504
+ c ? s(() => t(c)) : (w(), t(c));
505
+ }, [w, t, s]);
497
506
  return /* @__PURE__ */ g("div", { className: i("tw:group tw:relative tw:focus-within:z-10", e), children: [
498
507
  /* @__PURE__ */ n(
499
508
  k,
@@ -523,14 +532,14 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
523
532
  r
524
533
  ),
525
534
  placeholder: "Search...",
526
- onChange: (w) => b(w.target.value),
535
+ onChange: (c) => u(c.target.value),
527
536
  size: o,
528
537
  ...d
529
538
  }
530
539
  )
531
540
  ] });
532
541
  });
533
- function Zt({
542
+ function te({
534
543
  searchResults: t,
535
544
  onSearch: e,
536
545
  onSelectSearchResult: r,
@@ -541,11 +550,11 @@ function Zt({
541
550
  onFocus: l,
542
551
  ...s
543
552
  }) {
544
- const c = E(null), b = A(), [w, u] = $(), p = O(
545
- () => t ? w ?? [...t.keys()][0] : void 0,
546
- [w, t]
553
+ const w = L(null), u = A(), [c, b] = D(), p = O(
554
+ () => t ? c ?? [...t.keys()][0] : void 0,
555
+ [c, t]
547
556
  ), f = I((m) => {
548
- r(m), e(""), c.current.value = "";
557
+ r(m), e(""), w.current.value = "";
549
558
  }, [e, r]);
550
559
  return /* @__PURE__ */ g(
551
560
  "div",
@@ -556,16 +565,16 @@ function Zt({
556
565
  },
557
566
  children: [
558
567
  /* @__PURE__ */ n(
559
- Tt,
568
+ Lt,
560
569
  {
561
570
  onChange: e,
562
571
  size: a,
563
- ref: c,
572
+ ref: w,
564
573
  role: "combobox",
565
574
  "aria-autocomplete": "list",
566
575
  "aria-expanded": !!t,
567
- "aria-controls": b,
568
- "aria-activedescendant": p ? `${b}_${p}` : void 0,
576
+ "aria-controls": u,
577
+ "aria-activedescendant": p ? `${u}_${p}` : void 0,
569
578
  autoComplete: "off",
570
579
  autoCorrect: "off",
571
580
  onFocus: (m) => {
@@ -577,11 +586,11 @@ function Zt({
577
586
  t && /* @__PURE__ */ n(
578
587
  ht,
579
588
  {
580
- id: b,
589
+ id: u,
581
590
  items: t,
582
- anchor: c,
591
+ anchor: w,
583
592
  onSelectItem: f,
584
- onActiveItemChange: u,
593
+ onActiveItemChange: b,
585
594
  renderItem: o,
586
595
  className: i(
587
596
  "tw:absolute tw:top-full tw:mt-1 tw:z-10",
@@ -598,7 +607,7 @@ function Zt({
598
607
  }
599
608
  );
600
609
  }
601
- const te = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
610
+ const ee = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
602
611
  X,
603
612
  {
604
613
  ref: r,
@@ -611,7 +620,7 @@ const te = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
611
620
  ),
612
621
  ...e
613
622
  }
614
- )), Lt = ({ className: t, disabled: e, size: r = "md", type: o = "button", ...a }) => /* @__PURE__ */ n(
623
+ )), Tt = ({ className: t, disabled: e, size: r = "md", type: o = "button", ...a }) => /* @__PURE__ */ n(
615
624
  "button",
616
625
  {
617
626
  className: i(
@@ -629,7 +638,7 @@ const te = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
629
638
  type: o,
630
639
  ...a
631
640
  }
632
- ), Y = H(null), Et = ({ className: t, to: e, ...r }) => {
641
+ ), Y = $(null), Bt = ({ className: t, to: e, ...r }) => {
633
642
  const o = N(Y);
634
643
  return /* @__PURE__ */ n(
635
644
  nt,
@@ -650,13 +659,13 @@ const te = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
650
659
  ...r
651
660
  }
652
661
  );
653
- }, Bt = ({ children: t, className: e, fill: r }) => /* @__PURE__ */ n(Y.Provider, { value: { fill: r }, children: /* @__PURE__ */ n(v, { 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) => {
662
+ }, Mt = ({ children: t, className: e, fill: r }) => /* @__PURE__ */ n(Y.Provider, { value: { fill: r }, children: /* @__PURE__ */ n(v, { role: "menubar", className: i("tw:flex tw:overflow-hidden", e), children: t }) }), re = Object.assign(Mt, { Pill: Bt }), Et = new Intl.NumberFormat("en-US"), _t = (t) => Et.format(Number(t)), Q = 10, oe = (t) => Math.ceil(t / Q) * Q, C = 2, R = "...", Rt = (t, e) => Array.from({ length: e - t }, (r, o) => t + o), Dt = (t, e) => {
654
663
  const r = Rt(
655
664
  Math.max(C, t - C),
656
665
  Math.min(e - 1, t + C) + 1
657
666
  );
658
667
  return t - C > C && r.unshift(R), t + C < e - 1 && r.push(R), r.unshift(1), r.push(e), r;
659
- }, L = (t) => t === R, Dt = (t) => L(t) ? t : _t(t), Ft = (t, e) => L(t) ? `${t}_${e}` : `${t}`, Z = [
668
+ }, B = (t) => t === R, At = (t) => B(t) ? t : _t(t), Ft = (t, e) => B(t) ? `${t}_${e}` : `${t}`, Z = [
660
669
  "tw:border tw:border-r-0 tw:last:border-r tw:border-lm-border tw:dark:border-dm-border",
661
670
  "tw:rounded-none tw:first:rounded-l tw:last:rounded-r"
662
671
  ], tt = (t = !1) => i(
@@ -667,52 +676,52 @@ const te = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
667
676
  "tw:highlight:bg-lm-secondary tw:dark:highlight:bg-dm-secondary tw:text-brand": !t,
668
677
  "tw:bg-lm-brand tw:dark:bg-dm-brand tw:text-white": t
669
678
  }
670
- ), 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 });
679
+ ), H = ({ 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(H, { children: R });
671
680
  function St({ children: t, active: e, isEllipsis: r, href: o, ...a }) {
672
681
  const d = O(() => tt(e), [e]);
673
- return r ? /* @__PURE__ */ n(et, {}) : /* @__PURE__ */ n(S, { className: d, to: o, ...a, children: t });
682
+ return r ? /* @__PURE__ */ n(et, {}) : /* @__PURE__ */ n(j, { className: d, to: o, ...a, children: t });
674
683
  }
675
684
  function jt({ children: t, active: e, isEllipsis: r, ...o }) {
676
685
  const a = O(() => tt(e), [e]);
677
686
  return r ? /* @__PURE__ */ n(et, {}) : /* @__PURE__ */ n("button", { type: "button", className: a, ...o, children: t });
678
687
  }
679
- const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
688
+ const ne = ({ currentPage: t, pagesCount: e, ...r }) => {
680
689
  const o = "urlForPage" in r, a = o ? St : jt, d = I(
681
- (l) => o ? { href: L(l) ? void 0 : r.urlForPage(l) } : { onClick: () => !L(l) && r.onPageChange(l) },
690
+ (l) => o ? { href: B(l) ? void 0 : r.urlForPage(l) } : { onClick: () => !B(l) && r.onPageChange(l) },
682
691
  [o, r]
683
692
  );
684
693
  return e < 2 ? null : /* @__PURE__ */ g("div", { className: "tw:select-none tw:flex", "data-testid": "paginator", children: [
685
- 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 }) }),
686
- At(t, e).map((l, s) => /* @__PURE__ */ n(
694
+ t === 1 ? /* @__PURE__ */ n(H, { 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 }) }),
695
+ Dt(t, e).map((l, s) => /* @__PURE__ */ n(
687
696
  a,
688
697
  {
689
698
  active: l === t,
690
- isEllipsis: L(l),
699
+ isEllipsis: B(l),
691
700
  ...d(l),
692
- children: Dt(l)
701
+ children: At(l)
693
702
  },
694
703
  Ft(l, s)
695
704
  )),
696
- 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 }) })
705
+ t === e ? /* @__PURE__ */ n(H, { 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 }) })
697
706
  ] });
698
- }, $t = ({
707
+ }, Ht = ({
699
708
  open: t,
700
709
  children: e,
701
710
  className: r,
702
711
  onClose: o,
703
712
  ...a
704
713
  }) => {
705
- const d = E(null);
706
- return _(() => {
707
- var b, w;
708
- const l = document.body, s = l.style.overflow, c = l.style.paddingRight;
714
+ const d = L(null);
715
+ return M(() => {
716
+ var u, c;
717
+ const l = document.body, s = l.style.overflow, w = l.style.paddingRight;
709
718
  if (t) {
710
- const u = window.outerWidth - l.clientWidth, p = l.scrollHeight > l.clientHeight;
711
- l.style.overflow = "hidden", p && (l.style.paddingRight = `${u}px`), (b = d.current) == null || b.showModal();
719
+ const b = window.outerWidth - l.clientWidth, p = l.scrollHeight > l.clientHeight;
720
+ l.style.overflow = "hidden", p && (l.style.paddingRight = `${b}px`), (u = d.current) == null || u.showModal();
712
721
  } else
713
- (w = d.current) == null || w.close();
722
+ (c = d.current) == null || c.close();
714
723
  return () => {
715
- l.style.overflow = s, l.style.paddingRight = c;
724
+ l.style.overflow = s, l.style.paddingRight = w;
716
725
  };
717
726
  }, [t]), ct(
718
727
  /* @__PURE__ */ n(
@@ -729,7 +738,7 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
729
738
  ),
730
739
  document.body
731
740
  );
732
- }, ne = ({
741
+ }, ae = ({
733
742
  open: t,
734
743
  onClose: e,
735
744
  variant: r = "default",
@@ -740,36 +749,36 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
740
749
  }) => {
741
750
  const {
742
751
  size: s = "md",
743
- confirmText: c = "Confirm",
744
- cancelText: b = "Cancel",
745
- confirmDisabled: w,
746
- onConfirm: u,
752
+ confirmText: w = "Confirm",
753
+ cancelText: u = "Cancel",
754
+ confirmDisabled: c,
755
+ onConfirm: b,
747
756
  onClosed: p,
748
757
  ...f
749
- } = "onConfirm" in l ? l : { ...l }, [m, h] = $(t), M = E(null), D = E("cancel"), rt = I(() => {
750
- D.current = "confirm", u == null || u();
751
- }, [u]);
752
- return _(() => {
758
+ } = "onConfirm" in l ? l : { ...l }, [m, h] = D(t), _ = L(null), F = L("cancel"), rt = I(() => {
759
+ F.current = "confirm", b == null || b();
760
+ }, [b]);
761
+ return M(() => {
753
762
  if (t) {
754
- D.current = "cancel", h(!0);
763
+ F.current = "cancel", h(!0);
755
764
  return;
756
765
  }
757
- const P = M.current;
766
+ const P = _.current;
758
767
  if (P) {
759
- delete M.current.dataset.open;
768
+ delete _.current.dataset.open;
760
769
  let W = !1;
761
770
  const q = (ot) => {
762
- W || ot.target !== P || (W = !0, h(!1), p == null || p(D.current));
771
+ W || ot.target !== P || (W = !0, h(!1), p == null || p(F.current));
763
772
  };
764
773
  return P.addEventListener("transitionend", q), () => {
765
774
  P.removeEventListener("transitionend", q);
766
775
  };
767
776
  }
768
- }, [p, t]), _(() => {
769
- const P = M.current;
777
+ }, [p, t]), M(() => {
778
+ const P = _.current;
770
779
  m && P && (P.dataset.open = "");
771
780
  }, [m]), /* @__PURE__ */ n(
772
- $t,
781
+ Ht,
773
782
  {
774
783
  open: m,
775
784
  onClose: e,
@@ -785,7 +794,7 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
785
794
  "div",
786
795
  {
787
796
  "data-testid": "transition-container",
788
- ref: M,
797
+ ref: _,
789
798
  className: i(
790
799
  "tw:w-full tw:m-auto tw:p-4 tw:sm:p-6",
791
800
  // CSS transitions are based on the presence of the `data-open` attribute
@@ -803,7 +812,7 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
803
812
  children: /* @__PURE__ */ n(v, { className: i(
804
813
  "tw:w-full",
805
814
  { "tw:h-full tw:relative tw:overflow-auto": r === "cover" }
806
- ), children: r === "cover" ? /* @__PURE__ */ g(F, { children: [
815
+ ), children: r === "cover" ? /* @__PURE__ */ g(S, { children: [
807
816
  /* @__PURE__ */ g(
808
817
  "div",
809
818
  {
@@ -820,7 +829,7 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
820
829
  }
821
830
  ),
822
831
  /* @__PURE__ */ n("div", { children: a })
823
- ] }) : /* @__PURE__ */ g(F, { children: [
832
+ ] }) : /* @__PURE__ */ g(S, { children: [
824
833
  /* @__PURE__ */ g(v.Header, { className: i(
825
834
  "tw:sticky tw:top-0",
826
835
  "tw:flex tw:items-center tw:justify-between tw:gap-x-2"
@@ -829,7 +838,7 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
829
838
  /* @__PURE__ */ n(J, { onClick: e, label: "Close dialog" })
830
839
  ] }),
831
840
  /* @__PURE__ */ n(v.Body, { children: a }),
832
- u && /* @__PURE__ */ g(
841
+ b && /* @__PURE__ */ g(
833
842
  v.Footer,
834
843
  {
835
844
  "data-testid": "footer",
@@ -838,15 +847,15 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
838
847
  "tw:[&]:px-3 tw:sticky tw:bottom-0"
839
848
  ),
840
849
  children: [
841
- /* @__PURE__ */ n(Lt, { onClick: e, children: b }),
850
+ /* @__PURE__ */ n(Tt, { onClick: e, children: u }),
842
851
  /* @__PURE__ */ n(
843
852
  Pt,
844
853
  {
845
854
  solid: !0,
846
855
  variant: r === "danger" ? "danger" : "primary",
847
- disabled: w,
856
+ disabled: c,
848
857
  onClick: rt,
849
- children: c
858
+ children: w
850
859
  }
851
860
  )
852
861
  ]
@@ -857,16 +866,16 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
857
866
  )
858
867
  }
859
868
  );
860
- }, ae = ({ className: t, children: e, loading: r = !1, variant: o = "default" }) => /* @__PURE__ */ n(pt, { className: x({ "tw:[&]:border-danger": o === "error" }, t), children: /* @__PURE__ */ g("h3", { className: x("tw:text-center", {
869
+ }, le = ({ className: t, children: e, loading: r = !1, variant: o = "default" }) => /* @__PURE__ */ n(pt, { className: x({ "tw:[&]:border-danger": o === "error" }, t), children: /* @__PURE__ */ g("h3", { className: x("tw:text-center", {
861
870
  "tw:text-gray-500 tw:dark:text-gray-400": o === "default",
862
871
  "tw:text-danger": o === "error"
863
872
  }), children: [
864
- r && /* @__PURE__ */ g(F, { children: [
873
+ r && /* @__PURE__ */ g(S, { children: [
865
874
  /* @__PURE__ */ n(k, { icon: V, spin: !0 }),
866
875
  /* @__PURE__ */ n("span", { className: "tw:ml-2", children: e ?? "Loading..." })
867
876
  ] }),
868
877
  !r && e
869
- ] }) }), le = ({ variant: t, className: e, size: r = "md", children: o }) => /* @__PURE__ */ n(
878
+ ] }) }), de = ({ variant: t, className: e, size: r = "md", children: o }) => /* @__PURE__ */ n(
870
879
  "div",
871
880
  {
872
881
  className: x(
@@ -888,33 +897,34 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
888
897
  export {
889
898
  Pt as Button,
890
899
  v as Card,
891
- ne as CardModal,
892
- Qt as Checkbox,
900
+ ae as CardModal,
901
+ Vt as Checkbox,
893
902
  J as CloseButton,
903
+ Jt as Details,
894
904
  R as ELLIPSIS,
895
905
  U as Input,
896
906
  K as Label,
897
- Vt as LabelledInput,
898
- Xt as LabelledRevealablePasswordInput,
899
- Yt as LabelledSelect,
900
- Lt as LinkButton,
907
+ Xt as LabelledInput,
908
+ Yt as LabelledRevealablePasswordInput,
909
+ Zt as LabelledSelect,
910
+ Tt as LinkButton,
901
911
  ht as Listbox,
902
- ae as Message,
903
- $t as ModalDialog,
904
- ee as NavPills,
905
- oe as Paginator,
906
- le as Result,
912
+ le as Message,
913
+ Ht as ModalDialog,
914
+ re as NavPills,
915
+ ne as Paginator,
916
+ de as Result,
907
917
  It as RevealablePasswordInput,
908
- Zt as SearchCombobox,
909
- Tt as SearchInput,
918
+ te as SearchCombobox,
919
+ Lt as SearchInput,
910
920
  Ct as Select,
911
921
  pt as SimpleCard,
912
- Jt as Table,
913
- te as ToggleSwitch,
922
+ Qt as Table,
923
+ ee as ToggleSwitch,
914
924
  _t as formatNumber,
915
925
  Ft as keyForPage,
916
- L as pageIsEllipsis,
917
- Dt as prettifyPageNumber,
918
- At as progressivePagination,
919
- re as roundTen
926
+ B as pageIsEllipsis,
927
+ At as prettifyPageNumber,
928
+ Dt as progressivePagination,
929
+ oe as roundTen
920
930
  };
package/package.json CHANGED
@@ -90,5 +90,5 @@
90
90
  "not ie <= 11",
91
91
  "not op_mini all"
92
92
  ],
93
- "version": "0.8.11"
93
+ "version": "0.8.12"
94
94
  }