@shlinkio/shlink-frontend-kit 0.8.10 → 0.8.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +19 -2
- package/dist/index.js +1 -1
- package/dist/tailwind.js +36 -35
- package/dist/tailwind.preset.css +9 -1
- package/dist/use-toggle-PWLikLl6.js +22 -0
- package/package.json +9 -9
- package/dist/use-toggle-CNvdDGvy.js +0 -22
package/dist/index.d.ts
CHANGED
|
@@ -206,7 +206,17 @@ export declare type TimeoutToggleOptions = {
|
|
|
206
206
|
delay?: number;
|
|
207
207
|
};
|
|
208
208
|
|
|
209
|
-
export declare type ToggleResult =
|
|
209
|
+
export declare type ToggleResult = ToggleResultTuple | ToggleResultObject;
|
|
210
|
+
|
|
211
|
+
export declare type ToggleResultObject = {
|
|
212
|
+
flag: boolean;
|
|
213
|
+
toggle: () => void;
|
|
214
|
+
setToTrue: () => void;
|
|
215
|
+
setToFalse: () => void;
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
/** @deprecated */
|
|
219
|
+
export declare type ToggleResultTuple = [boolean, () => void, () => void, () => void];
|
|
210
220
|
|
|
211
221
|
export declare const ToggleSwitch: FC<BooleanControlProps>;
|
|
212
222
|
|
|
@@ -242,6 +252,13 @@ export declare type UseTimeoutResult = {
|
|
|
242
252
|
*/
|
|
243
253
|
export declare const useTimeoutToggle: (initialValueOrOptions?: TimeoutToggleOptions | boolean, secondArg?: number, setTimeout_?: typeof setTimeout, clearTimeout_?: typeof clearTimeout) => [boolean, () => void];
|
|
244
254
|
|
|
245
|
-
|
|
255
|
+
/** @deprecated Returning result as tuple is deprecated */
|
|
256
|
+
export declare function useToggle(initialValue?: boolean, asObject?: false): ToggleResultTuple;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* @param asObject - Whether the result should be returned as an object or as a tuple.
|
|
260
|
+
* Deprecated. Future releases will always return an object.
|
|
261
|
+
*/
|
|
262
|
+
export declare function useToggle(initialValue: boolean, asObject: true): ToggleResultObject;
|
|
246
263
|
|
|
247
264
|
export { }
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { clsx as h } from "clsx";
|
|
|
5
5
|
import { Card as N, CardHeader as $, CardBody as G, Dropdown as k, DropdownToggle as O, DropdownMenu as S, NavItem as j, NavLink as U, Nav as V, DropdownItem as w } from "reactstrap";
|
|
6
6
|
import { useId as y, useState as g, useRef as x, useCallback as C, useMemo as q, Children as Q, isValidElement as Y, useEffect as W } from "react";
|
|
7
7
|
import { useNavigate as z, useLocation as J, NavLink as X } from "react-router";
|
|
8
|
-
import { u as Z, a as L } from "./use-toggle-
|
|
8
|
+
import { u as Z, a as L } from "./use-toggle-PWLikLl6.js";
|
|
9
9
|
const be = ({ className: e, children: r, loading: t = !1, type: n = "default", fullWidth: o = !1 }) => /* @__PURE__ */ s(
|
|
10
10
|
N,
|
|
11
11
|
{
|
package/dist/tailwind.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as n, jsxs as g, Fragment as F } from "react/jsx-runtime";
|
|
2
|
-
import i, { clsx as
|
|
3
|
-
import { useState as $, useCallback as I, useEffect as _, createContext as H, useContext as N, forwardRef as
|
|
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
4
|
import { Link as S, 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
|
-
import { a as it, u as wt } from "./use-toggle-
|
|
7
|
+
import { a as it, u as wt } from "./use-toggle-PWLikLl6.js";
|
|
8
8
|
import { createPortal as ct } from "react-dom";
|
|
9
9
|
const mt = ({ className: t, ...e }) => /* @__PURE__ */ n(
|
|
10
10
|
"div",
|
|
@@ -46,19 +46,19 @@ const mt = ({ className: t, ...e }) => /* @__PURE__ */ n(
|
|
|
46
46
|
),
|
|
47
47
|
...e
|
|
48
48
|
}
|
|
49
|
-
),
|
|
49
|
+
), v = Object.assign(ut, { Body: gt, Header: mt, Footer: bt }), pt = ({ bodyClassName: t, children: e, ...r }) => {
|
|
50
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__ */ g(
|
|
56
|
-
o && /* @__PURE__ */ g(
|
|
55
|
+
return /* @__PURE__ */ g(v, { ...d, children: [
|
|
56
|
+
o && /* @__PURE__ */ g(v.Header, { children: [
|
|
57
57
|
a === "lg" && /* @__PURE__ */ n("h4", { children: o }),
|
|
58
58
|
a === "md" && /* @__PURE__ */ n("h5", { children: o }),
|
|
59
59
|
a === "sm" && /* @__PURE__ */ n("h6", { children: o })
|
|
60
60
|
] }),
|
|
61
|
-
/* @__PURE__ */ n(
|
|
61
|
+
/* @__PURE__ */ n(v.Body, { className: t, children: e })
|
|
62
62
|
] });
|
|
63
63
|
};
|
|
64
64
|
function ht({
|
|
@@ -88,7 +88,7 @@ function ht({
|
|
|
88
88
|
};
|
|
89
89
|
return f.addEventListener("keydown", m), () => f.removeEventListener("keydown", m);
|
|
90
90
|
}, [w, s, p, e, r]), /* @__PURE__ */ g(
|
|
91
|
-
|
|
91
|
+
v,
|
|
92
92
|
{
|
|
93
93
|
id: t,
|
|
94
94
|
className: i("tw:py-1 tw:flex tw:flex-col", d),
|
|
@@ -226,7 +226,8 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
226
226
|
"tw:border tw:rounded-md tw:no-underline",
|
|
227
227
|
"tw:transition-colors",
|
|
228
228
|
{
|
|
229
|
-
"tw:focus-ring": o
|
|
229
|
+
"tw:focus-ring": o === "primary",
|
|
230
|
+
"tw:focus-ring-secondary": o === "secondary",
|
|
230
231
|
"tw:focus-ring-danger": o === "danger"
|
|
231
232
|
},
|
|
232
233
|
{
|
|
@@ -268,15 +269,15 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
268
269
|
}
|
|
269
270
|
)
|
|
270
271
|
);
|
|
271
|
-
}, X =
|
|
272
|
+
}, X = y(({ className: t, onChange: e, ...r }, o) => {
|
|
272
273
|
const a = I((d) => e == null ? void 0 : e(d.target.checked, d), [e]);
|
|
273
274
|
return /* @__PURE__ */ n(
|
|
274
275
|
"input",
|
|
275
276
|
{
|
|
276
277
|
ref: o,
|
|
277
278
|
type: "checkbox",
|
|
278
|
-
className:
|
|
279
|
-
"tw:appearance-none tw:focus-ring",
|
|
279
|
+
className: x(
|
|
280
|
+
"tw:appearance-none tw:focus-ring tw:cursor-[inherit]",
|
|
280
281
|
"tw:border-1 tw:border-lm-input-border tw:dark:border-dm-input-border",
|
|
281
282
|
"tw:bg-lm-primary tw:dark:bg-dm-primary tw:checked:bg-brand tw:bg-no-repeat",
|
|
282
283
|
// Use different background color when rendered inside a card
|
|
@@ -287,11 +288,11 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
287
288
|
...r
|
|
288
289
|
}
|
|
289
290
|
);
|
|
290
|
-
}), Qt =
|
|
291
|
+
}), Qt = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
|
|
291
292
|
X,
|
|
292
293
|
{
|
|
293
294
|
ref: r,
|
|
294
|
-
className:
|
|
295
|
+
className: x("tw:rounded-sm tw:w-4 tw:h-4 tw:checked:bg-(image:--tick) tw:bg-center", t),
|
|
295
296
|
...e
|
|
296
297
|
}
|
|
297
298
|
)), J = ({ onClick: t, label: e = "Close" }) => /* @__PURE__ */ n(
|
|
@@ -306,7 +307,7 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
306
307
|
"aria-label": e,
|
|
307
308
|
children: /* @__PURE__ */ n(k, { icon: at, size: "xl" })
|
|
308
309
|
}
|
|
309
|
-
), U =
|
|
310
|
+
), U = y(({
|
|
310
311
|
borderless: t = !1,
|
|
311
312
|
size: e = "md",
|
|
312
313
|
feedback: r,
|
|
@@ -347,10 +348,10 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
347
348
|
...l
|
|
348
349
|
}
|
|
349
350
|
);
|
|
350
|
-
}), K = ({ required: t, children: e,
|
|
351
|
+
}), K = ({ required: t, children: e, className: r, ...o }) => /* @__PURE__ */ g("label", { className: x("tw:cursor-pointer", r), ...o, children: [
|
|
351
352
|
e,
|
|
352
353
|
t && /* @__PURE__ */ n("span", { className: "tw:text-danger tw:ml-1", "data-testid": "required-indicator", children: "*" })
|
|
353
|
-
] }), Vt =
|
|
354
|
+
] }), Vt = y(({ label: t, inputClassName: e, required: r, hiddenRequired: o, error: a, ...d }, l) => {
|
|
354
355
|
const s = A();
|
|
355
356
|
return /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
|
|
356
357
|
/* @__PURE__ */ n(K, { htmlFor: s, required: r, children: t }),
|
|
@@ -367,7 +368,7 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
367
368
|
),
|
|
368
369
|
a && /* @__PURE__ */ n("span", { className: "tw:text-danger", children: a })
|
|
369
370
|
] });
|
|
370
|
-
}), It =
|
|
371
|
+
}), It = y(({ containerClassName: t, className: e, size: r, ...o }, a) => {
|
|
371
372
|
const [d, l, , s] = it(!1), c = E(null), b = I(({ relatedTarget: w }) => {
|
|
372
373
|
var u;
|
|
373
374
|
(u = c.current) != null && u.contains(w) || s();
|
|
@@ -375,7 +376,7 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
375
376
|
return /* @__PURE__ */ g(
|
|
376
377
|
"div",
|
|
377
378
|
{
|
|
378
|
-
className:
|
|
379
|
+
className: x("tw:group tw:relative", t),
|
|
379
380
|
ref: c,
|
|
380
381
|
onBlurCapture: b,
|
|
381
382
|
children: [
|
|
@@ -384,7 +385,7 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
384
385
|
{
|
|
385
386
|
ref: a,
|
|
386
387
|
type: d ? "text" : "password",
|
|
387
|
-
className:
|
|
388
|
+
className: x(
|
|
388
389
|
{
|
|
389
390
|
"tw:pr-10": r !== "sm",
|
|
390
391
|
"tw:pr-8": r === "sm"
|
|
@@ -403,7 +404,7 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
403
404
|
onClick: l,
|
|
404
405
|
title: d ? "Hide password" : "Show password",
|
|
405
406
|
"aria-label": d ? "Hide password" : "Show password",
|
|
406
|
-
className:
|
|
407
|
+
className: x(
|
|
407
408
|
"tw:absolute tw:top-[50%] tw:translate-y-[-50%] tw:px-1",
|
|
408
409
|
"tw:text-placeholder tw:hover:text-lm-text tw:hover:dark:text-dm-text tw:transition-colors",
|
|
409
410
|
{
|
|
@@ -418,7 +419,7 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
418
419
|
]
|
|
419
420
|
}
|
|
420
421
|
);
|
|
421
|
-
}), Xt =
|
|
422
|
+
}), Xt = y(({ label: t, inputClassName: e, required: r, hiddenRequired: o, error: a, ...d }, l) => {
|
|
422
423
|
const s = A();
|
|
423
424
|
return /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
|
|
424
425
|
/* @__PURE__ */ n(K, { htmlFor: s, required: r, children: t }),
|
|
@@ -435,7 +436,7 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
435
436
|
),
|
|
436
437
|
a && /* @__PURE__ */ n("span", { className: "tw:text-danger", children: a })
|
|
437
438
|
] });
|
|
438
|
-
}), Ct =
|
|
439
|
+
}), Ct = y(({
|
|
439
440
|
className: t,
|
|
440
441
|
size: e = "md",
|
|
441
442
|
feedback: r,
|
|
@@ -475,13 +476,13 @@ const B = H(void 0), T = H({ responsive: !0 }), ft = ({ children: t, className:
|
|
|
475
476
|
disabled: a,
|
|
476
477
|
...d
|
|
477
478
|
}
|
|
478
|
-
)), Yt =
|
|
479
|
+
)), Yt = y(({ selectClassName: t, label: e, required: r, hiddenRequired: o, ...a }, d) => {
|
|
479
480
|
const l = A();
|
|
480
481
|
return /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
|
|
481
482
|
/* @__PURE__ */ n(K, { htmlFor: l, required: r, children: e }),
|
|
482
483
|
/* @__PURE__ */ n(Ct, { ref: d, id: l, className: t, required: r || o, ...a })
|
|
483
484
|
] });
|
|
484
|
-
}), Tt =
|
|
485
|
+
}), Tt = y(({
|
|
485
486
|
onChange: t,
|
|
486
487
|
containerClassName: e,
|
|
487
488
|
inputClassName: r,
|
|
@@ -597,11 +598,11 @@ function Zt({
|
|
|
597
598
|
}
|
|
598
599
|
);
|
|
599
600
|
}
|
|
600
|
-
const te =
|
|
601
|
+
const te = y(({ className: t, ...e }, r) => /* @__PURE__ */ n(
|
|
601
602
|
X,
|
|
602
603
|
{
|
|
603
604
|
ref: r,
|
|
604
|
-
className:
|
|
605
|
+
className: x(
|
|
605
606
|
"tw:rounded-full tw:w-8 tw:h-4",
|
|
606
607
|
"tw:bg-(image:--circle-grey-dark) tw:dark:bg-(image:--circle-grey-light) tw:checked:bg-(image:--circle-white)",
|
|
607
608
|
"tw:focus-visible:not-checked:bg-(image:--circle-light-blue)",
|
|
@@ -649,7 +650,7 @@ const te = x(({ className: t, ...e }, r) => /* @__PURE__ */ n(
|
|
|
649
650
|
...r
|
|
650
651
|
}
|
|
651
652
|
);
|
|
652
|
-
}, Bt = ({ children: t, className: e, fill: r }) => /* @__PURE__ */ n(Y.Provider, { value: { fill: r }, children: /* @__PURE__ */ n(
|
|
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) => {
|
|
653
654
|
const r = Rt(
|
|
654
655
|
Math.max(C, t - C),
|
|
655
656
|
Math.min(e - 1, t + C) + 1
|
|
@@ -799,7 +800,7 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
799
800
|
},
|
|
800
801
|
{ "tw:h-full": r === "cover" }
|
|
801
802
|
),
|
|
802
|
-
children: /* @__PURE__ */ n(
|
|
803
|
+
children: /* @__PURE__ */ n(v, { className: i(
|
|
803
804
|
"tw:w-full",
|
|
804
805
|
{ "tw:h-full tw:relative tw:overflow-auto": r === "cover" }
|
|
805
806
|
), children: r === "cover" ? /* @__PURE__ */ g(F, { children: [
|
|
@@ -820,16 +821,16 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
820
821
|
),
|
|
821
822
|
/* @__PURE__ */ n("div", { children: a })
|
|
822
823
|
] }) : /* @__PURE__ */ g(F, { children: [
|
|
823
|
-
/* @__PURE__ */ g(
|
|
824
|
+
/* @__PURE__ */ g(v.Header, { className: i(
|
|
824
825
|
"tw:sticky tw:top-0",
|
|
825
826
|
"tw:flex tw:items-center tw:justify-between tw:gap-x-2"
|
|
826
827
|
), children: [
|
|
827
828
|
/* @__PURE__ */ n("h5", { className: i({ "tw:text-danger": r === "danger" }), children: o }),
|
|
828
829
|
/* @__PURE__ */ n(J, { onClick: e, label: "Close dialog" })
|
|
829
830
|
] }),
|
|
830
|
-
/* @__PURE__ */ n(
|
|
831
|
+
/* @__PURE__ */ n(v.Body, { children: a }),
|
|
831
832
|
u && /* @__PURE__ */ g(
|
|
832
|
-
|
|
833
|
+
v.Footer,
|
|
833
834
|
{
|
|
834
835
|
"data-testid": "footer",
|
|
835
836
|
className: i(
|
|
@@ -856,7 +857,7 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
856
857
|
)
|
|
857
858
|
}
|
|
858
859
|
);
|
|
859
|
-
}, ae = ({ className: t, children: e, loading: r = !1, variant: o = "default" }) => /* @__PURE__ */ n(pt, { className:
|
|
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", {
|
|
860
861
|
"tw:text-gray-500 tw:dark:text-gray-400": o === "default",
|
|
861
862
|
"tw:text-danger": o === "error"
|
|
862
863
|
}), children: [
|
|
@@ -868,7 +869,7 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
868
869
|
] }) }), le = ({ variant: t, className: e, size: r = "md", children: o }) => /* @__PURE__ */ n(
|
|
869
870
|
"div",
|
|
870
871
|
{
|
|
871
|
-
className:
|
|
872
|
+
className: x(
|
|
872
873
|
"tw:rounded-md tw:text-center",
|
|
873
874
|
{
|
|
874
875
|
"tw:p-2": r === "sm",
|
|
@@ -886,7 +887,7 @@ const oe = ({ currentPage: t, pagesCount: e, ...r }) => {
|
|
|
886
887
|
);
|
|
887
888
|
export {
|
|
888
889
|
Pt as Button,
|
|
889
|
-
|
|
890
|
+
v as Card,
|
|
890
891
|
ne as CardModal,
|
|
891
892
|
Qt as Checkbox,
|
|
892
893
|
J as CloseButton,
|
package/dist/tailwind.preset.css
CHANGED
|
@@ -143,6 +143,10 @@
|
|
|
143
143
|
p {
|
|
144
144
|
@apply tw:m-0;
|
|
145
145
|
}
|
|
146
|
+
|
|
147
|
+
code {
|
|
148
|
+
@apply tw:text-sm tw:text-pink-600 tw:dark:text-pink-500 tw:font-mono;
|
|
149
|
+
}
|
|
146
150
|
}
|
|
147
151
|
|
|
148
152
|
@utility focus-ring-base {
|
|
@@ -157,6 +161,10 @@
|
|
|
157
161
|
@apply tw:focus-ring-base tw:focus-visible:ring-danger/50;
|
|
158
162
|
}
|
|
159
163
|
|
|
164
|
+
@utility focus-ring-secondary {
|
|
165
|
+
@apply tw:focus-ring-base tw:focus-visible:ring-zinc-500/50;
|
|
166
|
+
}
|
|
167
|
+
|
|
160
168
|
@utility scroll-thin {
|
|
161
169
|
/* Standard. New browsers */
|
|
162
170
|
scrollbar-width: thin;
|
|
@@ -172,7 +180,7 @@
|
|
|
172
180
|
|
|
173
181
|
@custom-variant highlight {
|
|
174
182
|
&:hover,
|
|
175
|
-
&:focus {
|
|
183
|
+
&:focus-visible {
|
|
176
184
|
@slot;
|
|
177
185
|
}
|
|
178
186
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useRef as a, useCallback as o, useEffect as f, useMemo as i, useState as T } from "react";
|
|
2
|
+
function m(n, r = globalThis.setTimeout, s = globalThis.clearTimeout) {
|
|
3
|
+
const t = a(null), e = o(() => {
|
|
4
|
+
t.current && s(t.current);
|
|
5
|
+
}, [s]), u = o((l, c) => {
|
|
6
|
+
e(), t.current = r(() => {
|
|
7
|
+
l(), t.current = null;
|
|
8
|
+
}, c ?? n);
|
|
9
|
+
}, [e, n, r]);
|
|
10
|
+
return f(() => e, [e]), i(
|
|
11
|
+
() => ({ setTimeout: u, clearCurrentTimeout: e }),
|
|
12
|
+
[e, u]
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
function b(n = !1, r = !1) {
|
|
16
|
+
const [s, t] = T(n), e = o(() => t((c) => !c), []), u = o(() => t(!0), []), l = o(() => t(!1), []);
|
|
17
|
+
return r ? { flag: s, toggle: e, setToTrue: u, setToFalse: l } : [s, e, u, l];
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
b as a,
|
|
21
|
+
m as u
|
|
22
|
+
};
|
package/package.json
CHANGED
|
@@ -55,32 +55,32 @@
|
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@shlinkio/eslint-config-js-coding-standard": "~3.5.0",
|
|
57
57
|
"@stylistic/eslint-plugin": "^4.2.0",
|
|
58
|
-
"@tailwindcss/vite": "^4.1.
|
|
58
|
+
"@tailwindcss/vite": "^4.1.4",
|
|
59
59
|
"@testing-library/jest-dom": "^6.6.3",
|
|
60
60
|
"@testing-library/react": "^16.3.0",
|
|
61
61
|
"@testing-library/user-event": "^14.6.1",
|
|
62
62
|
"@total-typescript/shoehorn": "^0.1.2",
|
|
63
|
-
"@types/react": "^19.1.
|
|
64
|
-
"@types/react-dom": "^19.1.
|
|
63
|
+
"@types/react": "^19.1.2",
|
|
64
|
+
"@types/react-dom": "^19.1.2",
|
|
65
65
|
"@vitejs/plugin-react": "^4.3.4",
|
|
66
66
|
"@vitest/browser": "^3.1.1",
|
|
67
67
|
"@vitest/coverage-v8": "^3.1.1",
|
|
68
68
|
"axe-core": "^4.10.3",
|
|
69
69
|
"bootstrap": "5.2.3",
|
|
70
|
-
"eslint": "^9.
|
|
70
|
+
"eslint": "^9.25.0",
|
|
71
71
|
"eslint-plugin-import": "^2.31.0",
|
|
72
72
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
73
73
|
"eslint-plugin-react": "^7.37.5",
|
|
74
|
-
"eslint-plugin-react-compiler": "^19.0.0-beta-
|
|
74
|
+
"eslint-plugin-react-compiler": "^19.0.0-beta-ebf51a3-20250411",
|
|
75
75
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
76
76
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
77
77
|
"history": "^5.3.0",
|
|
78
|
-
"playwright": "^1.
|
|
78
|
+
"playwright": "^1.52.0",
|
|
79
79
|
"resize-observer-polyfill": "^1.5.1",
|
|
80
80
|
"sass": "^1.86.3",
|
|
81
81
|
"typescript": "^5.8.3",
|
|
82
|
-
"typescript-eslint": "^8.
|
|
83
|
-
"vite": "^6.2.
|
|
82
|
+
"typescript-eslint": "^8.30.1",
|
|
83
|
+
"vite": "^6.2.6",
|
|
84
84
|
"vite-plugin-dts": "^4.5.3",
|
|
85
85
|
"vitest": "^3.0.2"
|
|
86
86
|
},
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"not ie <= 11",
|
|
91
91
|
"not op_mini all"
|
|
92
92
|
],
|
|
93
|
-
"version": "0.8.
|
|
93
|
+
"version": "0.8.11"
|
|
94
94
|
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { useRef as a, useCallback as o, useEffect as f, useMemo as g, useState as i } from "react";
|
|
2
|
-
function m(u, r = globalThis.setTimeout, t = globalThis.clearTimeout) {
|
|
3
|
-
const s = a(null), e = o(() => {
|
|
4
|
-
s.current && t(s.current);
|
|
5
|
-
}, [t]), n = o((l, c) => {
|
|
6
|
-
e(), s.current = r(() => {
|
|
7
|
-
l(), s.current = null;
|
|
8
|
-
}, c ?? u);
|
|
9
|
-
}, [e, u, r]);
|
|
10
|
-
return f(() => e, [e]), g(
|
|
11
|
-
() => ({ setTimeout: n, clearCurrentTimeout: e }),
|
|
12
|
-
[e, n]
|
|
13
|
-
);
|
|
14
|
-
}
|
|
15
|
-
const b = (u = !1) => {
|
|
16
|
-
const [r, t] = i(u), s = o(() => t((l) => !l), []), e = o(() => t(!0), []), n = o(() => t(!1), []);
|
|
17
|
-
return [r, s, e, n];
|
|
18
|
-
};
|
|
19
|
-
export {
|
|
20
|
-
b as a,
|
|
21
|
-
m as u
|
|
22
|
-
};
|