@shlinkio/shlink-frontend-kit 0.9.9 → 0.9.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 +13 -0
- package/dist/index.js +32 -31
- package/dist/ordering-pAYMfJPl.js +108 -0
- package/dist/tailwind.d.ts +62 -2
- package/dist/tailwind.js +619 -481
- package/dist/tailwind.preset.css +26 -2
- package/package.json +9 -9
- package/dist/ordering-B_hekQuu.js +0 -96
package/dist/tailwind.preset.css
CHANGED
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
--breakpoint-md: 768px;
|
|
52
52
|
--breakpoint-lg: 992px;
|
|
53
53
|
--breakpoint-xl: 1200px;
|
|
54
|
-
--breakpoint-2xl: 1400px
|
|
54
|
+
--breakpoint-2xl: 1320px; /* 1400px according to bootstrap docs, but then the container is bigger than before */
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
/* Deprecated. TODO Remove with bootstrap support */
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
hr {
|
|
153
|
-
@apply tw:my-
|
|
153
|
+
@apply tw:my-3;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
p {
|
|
@@ -160,6 +160,10 @@
|
|
|
160
160
|
code {
|
|
161
161
|
@apply tw:text-sm tw:text-pink-600 tw:dark:text-pink-500 tw:font-mono;
|
|
162
162
|
}
|
|
163
|
+
|
|
164
|
+
input[type="search"]::-webkit-search-cancel-button {
|
|
165
|
+
@apply tw:cursor-pointer;
|
|
166
|
+
}
|
|
163
167
|
}
|
|
164
168
|
|
|
165
169
|
@utility focus-ring-base {
|
|
@@ -178,6 +182,11 @@
|
|
|
178
182
|
@apply tw:focus-ring-base tw:focus-visible:ring-zinc-500/50;
|
|
179
183
|
}
|
|
180
184
|
|
|
185
|
+
@utility focus-within-ring {
|
|
186
|
+
@apply tw:outline-none tw:focus-within:ring-3 tw:focus-within:z-1 tw:transition-[box-shadow];
|
|
187
|
+
@apply tw:focus-within:ring-lm-brand/50 tw:dark:focus-within:ring-dm-brand/50;
|
|
188
|
+
}
|
|
189
|
+
|
|
181
190
|
@utility scroll-thin {
|
|
182
191
|
/* Standard. New browsers */
|
|
183
192
|
scrollbar-width: thin;
|
|
@@ -191,6 +200,21 @@
|
|
|
191
200
|
}
|
|
192
201
|
}
|
|
193
202
|
|
|
203
|
+
@utility no-clear-button {
|
|
204
|
+
&::-webkit-search-cancel-button {
|
|
205
|
+
display: none;
|
|
206
|
+
}
|
|
207
|
+
&::-ms-clear {
|
|
208
|
+
display: none;
|
|
209
|
+
}
|
|
210
|
+
&::-o-clear {
|
|
211
|
+
display: none;
|
|
212
|
+
}
|
|
213
|
+
&::-moz-clear {
|
|
214
|
+
display: none;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
194
218
|
@custom-variant highlight {
|
|
195
219
|
&:hover,
|
|
196
220
|
&:focus-visible {
|
package/package.json
CHANGED
|
@@ -59,19 +59,19 @@
|
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@shlinkio/eslint-config-js-coding-standard": "~3.5.0",
|
|
61
61
|
"@stylistic/eslint-plugin": "^4.4.1",
|
|
62
|
-
"@tailwindcss/vite": "^4.1.
|
|
62
|
+
"@tailwindcss/vite": "^4.1.10",
|
|
63
63
|
"@testing-library/jest-dom": "^6.6.3",
|
|
64
64
|
"@testing-library/react": "^16.3.0",
|
|
65
65
|
"@testing-library/user-event": "^14.6.1",
|
|
66
66
|
"@total-typescript/shoehorn": "^0.1.2",
|
|
67
|
-
"@types/react": "^19.1.
|
|
67
|
+
"@types/react": "^19.1.8",
|
|
68
68
|
"@types/react-dom": "^19.1.6",
|
|
69
|
-
"@vitejs/plugin-react": "^4.5.
|
|
70
|
-
"@vitest/browser": "^3.2.
|
|
71
|
-
"@vitest/coverage-v8": "^3.2.
|
|
69
|
+
"@vitejs/plugin-react": "^4.5.2",
|
|
70
|
+
"@vitest/browser": "^3.2.3",
|
|
71
|
+
"@vitest/coverage-v8": "^3.2.3",
|
|
72
72
|
"axe-core": "^4.10.3",
|
|
73
73
|
"bootstrap": "5.2.3",
|
|
74
|
-
"eslint": "^9.
|
|
74
|
+
"eslint": "^9.29.0",
|
|
75
75
|
"eslint-plugin-import": "^2.31.0",
|
|
76
76
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
77
77
|
"eslint-plugin-react": "^7.37.5",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
80
80
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
81
81
|
"history": "^5.3.0",
|
|
82
|
-
"playwright": "^1.
|
|
83
|
-
"sass": "^1.89.
|
|
82
|
+
"playwright": "^1.53.0",
|
|
83
|
+
"sass": "^1.89.2",
|
|
84
84
|
"typescript": "^5.8.3",
|
|
85
85
|
"typescript-eslint": "^8.34.0",
|
|
86
86
|
"vite": "^6.3.5",
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
"not ie <= 11",
|
|
94
94
|
"not op_mini all"
|
|
95
95
|
],
|
|
96
|
-
"version": "0.9.
|
|
96
|
+
"version": "0.9.11"
|
|
97
97
|
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { useMemo as b, useEffect as C, useRef as E, useCallback as d, useState as g } from "react";
|
|
2
|
-
function k(e, { elementsSelector: s, focusFirstItem: n = !1, vertical: o = !0, horizontal: t = !0 }) {
|
|
3
|
-
const r = b(() => {
|
|
4
|
-
const c = [];
|
|
5
|
-
return o && c.push("ArrowDown"), t && c.push("ArrowRight"), c;
|
|
6
|
-
}, [t, o]), u = b(() => {
|
|
7
|
-
const c = [];
|
|
8
|
-
return o && c.push("ArrowUp"), t && c.push("ArrowLeft"), c;
|
|
9
|
-
}, [t, o]), l = b(() => [...r, ...u], [r, u]);
|
|
10
|
-
C(() => {
|
|
11
|
-
const c = e.current;
|
|
12
|
-
if (!c)
|
|
13
|
-
return () => {
|
|
14
|
-
};
|
|
15
|
-
const f = new AbortController(), T = () => [...c.querySelectorAll(s)], w = T(), p = Math.max(w.findIndex((i) => i.dataset.selected === "true"), 0);
|
|
16
|
-
return w.forEach((i, a) => {
|
|
17
|
-
i.tabIndex = a === p ? 0 : -1, n && a === p && i.focus();
|
|
18
|
-
}), c.addEventListener("keydown", (i) => {
|
|
19
|
-
if (!l.includes(i.key))
|
|
20
|
-
return;
|
|
21
|
-
i.preventDefault();
|
|
22
|
-
const a = T(), h = a.findIndex((m) => m.tabIndex === 0), y = r.includes(i.key) ? a[h + 1] ?? a[0] : a[h - 1] ?? a[a.length - 1];
|
|
23
|
-
a.forEach((m) => {
|
|
24
|
-
m.tabIndex = -1;
|
|
25
|
-
}), y.tabIndex = 0, y.focus();
|
|
26
|
-
}, { signal: f.signal }), () => f.abort();
|
|
27
|
-
}, [l, e, s, n, r]);
|
|
28
|
-
}
|
|
29
|
-
function F(e, s = globalThis.setTimeout, n = globalThis.clearTimeout) {
|
|
30
|
-
const o = E(null), t = d(() => {
|
|
31
|
-
o.current && n(o.current);
|
|
32
|
-
}, [n]), r = d((u, l) => {
|
|
33
|
-
t(), o.current = s(() => {
|
|
34
|
-
u(), o.current = null;
|
|
35
|
-
}, l ?? e);
|
|
36
|
-
}, [t, e, s]);
|
|
37
|
-
return C(() => t, [t]), b(
|
|
38
|
-
() => ({ setTimeout: r, clearCurrentTimeout: t }),
|
|
39
|
-
[t, r]
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
const S = 2e3, I = (e = {}, s, n = globalThis.setTimeout, o = globalThis.clearTimeout) => {
|
|
43
|
-
const { initialValue: t = !1, delay: r = S } = typeof e == "boolean" ? {
|
|
44
|
-
initialValue: e,
|
|
45
|
-
delay: s
|
|
46
|
-
} : e, { setTimeout: u } = F(r, n, o), [l, c] = g(t), f = E(t), T = d(() => {
|
|
47
|
-
c(!f.current), u(() => c(f.current));
|
|
48
|
-
}, [u]);
|
|
49
|
-
return [l, T];
|
|
50
|
-
};
|
|
51
|
-
function L(e = !1, s = !1) {
|
|
52
|
-
const [n, o] = g(e), t = d(() => o((l) => !l), []), r = d(() => o(!0), []), u = d(() => o(!1), []);
|
|
53
|
-
return s ? { flag: n, toggle: t, setToTrue: r, setToFalse: u } : [n, t, r, u];
|
|
54
|
-
}
|
|
55
|
-
function A(e, s, n) {
|
|
56
|
-
return typeof e == "object" ? A(e.currentField, e.newField, e.currentOrderDir) : e !== s ? "ASC" : n ? {
|
|
57
|
-
ASC: "DESC",
|
|
58
|
-
DESC: void 0
|
|
59
|
-
}[n] : "ASC";
|
|
60
|
-
}
|
|
61
|
-
function x(e, s, n) {
|
|
62
|
-
if (typeof e == "object")
|
|
63
|
-
return x(e.currentField, e.newField, e.currentOrderDir);
|
|
64
|
-
const o = A(e, s, n);
|
|
65
|
-
return {
|
|
66
|
-
field: o ? s : void 0,
|
|
67
|
-
dir: o
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
const v = (e, { field: s, dir: n }) => !s || !n ? e : e.sort((o, t) => {
|
|
71
|
-
const r = n === "ASC" ? 1 : -1, u = n === "ASC" ? -1 : 1;
|
|
72
|
-
return o[s] > t[s] ? r : u;
|
|
73
|
-
}), M = (e) => e.dir ? `${e.field}-${e.dir}` : void 0, j = (e) => {
|
|
74
|
-
const [s, n] = e.split("-");
|
|
75
|
-
return { field: s, dir: n };
|
|
76
|
-
}, R = (e) => {
|
|
77
|
-
const [s, n] = g(e), o = d(
|
|
78
|
-
(t, r) => n(
|
|
79
|
-
t && typeof t == "object" ? t : { field: t, dir: r }
|
|
80
|
-
),
|
|
81
|
-
[]
|
|
82
|
-
);
|
|
83
|
-
return [s, o];
|
|
84
|
-
};
|
|
85
|
-
export {
|
|
86
|
-
k as a,
|
|
87
|
-
F as b,
|
|
88
|
-
I as c,
|
|
89
|
-
A as d,
|
|
90
|
-
x as e,
|
|
91
|
-
j as f,
|
|
92
|
-
R as g,
|
|
93
|
-
M as o,
|
|
94
|
-
v as s,
|
|
95
|
-
L as u
|
|
96
|
-
};
|