@rotki/ui-library 1.8.0 → 1.8.1
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/components/index.es.js +1844 -1841
- package/dist/composables/index-D0JjQG2m.js +478 -0
- package/dist/composables/index.es.js +1 -1
- package/dist/icons/icons_10.d.ts +26 -0
- package/dist/icons/icons_10.es.js +282 -178
- package/dist/icons/icons_7.d.ts +26 -26
- package/dist/icons/icons_7.es.js +1480 -1480
- package/dist/icons/icons_8.d.ts +26 -26
- package/dist/icons/icons_8.es.js +1502 -1502
- package/dist/icons/icons_9.d.ts +26 -26
- package/dist/icons/icons_9.es.js +1496 -1496
- package/dist/icons/index.d.ts +1 -1
- package/dist/icons/index.es.js +1788 -1762
- package/dist/index.es.js +1894 -1868
- package/dist/style.css +1 -1
- package/dist/web-types.json +3 -3
- package/package.json +1 -1
- package/dist/composables/index-DPHuaF8f.js +0 -482
package/dist/web-types.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "http://json.schemastore.org/web-types",
|
|
3
3
|
"framework": "vue",
|
|
4
4
|
"name": "@rotki/ui-library",
|
|
5
|
-
"version": "1.8.
|
|
5
|
+
"version": "1.8.1",
|
|
6
6
|
"js-types-syntax": "typescript",
|
|
7
7
|
"description-markup": "markdown",
|
|
8
8
|
"contributions": {
|
|
@@ -336,7 +336,7 @@
|
|
|
336
336
|
"name": "close-icon",
|
|
337
337
|
"description": "",
|
|
338
338
|
"required": false,
|
|
339
|
-
"default": "'
|
|
339
|
+
"default": "'lu-circle-x'",
|
|
340
340
|
"value": {
|
|
341
341
|
"kind": "expression",
|
|
342
342
|
"type": "string | undefined"
|
|
@@ -1618,7 +1618,7 @@
|
|
|
1618
1618
|
"name": "icon",
|
|
1619
1619
|
"description": "",
|
|
1620
1620
|
"required": false,
|
|
1621
|
-
"default": "'
|
|
1621
|
+
"default": "'lu-chevron-down'",
|
|
1622
1622
|
"value": {
|
|
1623
1623
|
"kind": "expression",
|
|
1624
1624
|
"type": "string | undefined"
|
package/package.json
CHANGED
|
@@ -1,482 +0,0 @@
|
|
|
1
|
-
import { RiArrowDownLine as ie, RiArrowDropDownFill as se, RiArrowLeftDoubleLine as re, RiArrowLeftLine as ce, RiArrowLeftSLine as ae, RiArrowRightDoubleLine as le, RiArrowRightLine as fe, RiArrowRightSLine as ue, RiExpandUpDownLine as de } from "../icons/icons_1.es.js";
|
|
2
|
-
import { RiDatabase2Line as pe } from "../icons/icons_2.es.js";
|
|
3
|
-
import { RiAlertFill as me, RiAlertLine as he } from "../icons/icons_5.es.js";
|
|
4
|
-
import { RiCheckLine as ge, RiCheckboxBlankCircleFill as ye, RiCheckboxBlankCircleLine as we, RiCheckboxBlankLine as be, RiCheckboxCircleFill as Re, RiCheckboxCircleLine as Le, RiCheckboxFill as xe, RiCheckboxIndeterminateFill as Ce, RiCloseCircleLine as ve, RiCloseFill as Se, RiCloseLine as Te, RiErrorWarningFill as Ee, RiErrorWarningLine as ke, RiEyeLine as Ie, RiEyeOffLine as Pe, RiInformationFill as De, RiInformationLine as Oe, RiRadioButtonLine as Ae, RiMoreFill as $e } from "../icons/icons_6.es.js";
|
|
5
|
-
import { inject as ee, ref as h, computed as B, watch as V, onMounted as te, watchEffect as Be, nextTick as Y } from "vue";
|
|
6
|
-
import { e as Me } from "../utils/index-Cps3W0wA.js";
|
|
7
|
-
import { createSharedComposable as ze, useColorMode as Fe, useWindowSize as He, breakpointsTailwind as _e, useBreakpoints as qe, unrefElement as Z, useResizeObserver as ne, useVirtualList as je, useArrayMap as We, watchOnce as Ve, useEventListener as G, useMutationObserver as Ue } from "@vueuse/core";
|
|
8
|
-
import { d as oe, T as P } from "../types/index-DSBIGM2a.js";
|
|
9
|
-
import { get as e, set as l } from "@vueuse/shared";
|
|
10
|
-
import { c as X, p as Ne, d as Ke, a as Ge, o as Xe, f as Je, b as Qe, e as Ye, g as Ze } from "../vendor-BRFX1hnB.js";
|
|
11
|
-
const et = [
|
|
12
|
-
me,
|
|
13
|
-
he,
|
|
14
|
-
ie,
|
|
15
|
-
se,
|
|
16
|
-
re,
|
|
17
|
-
ce,
|
|
18
|
-
ae,
|
|
19
|
-
le,
|
|
20
|
-
fe,
|
|
21
|
-
ue,
|
|
22
|
-
ge,
|
|
23
|
-
ye,
|
|
24
|
-
we,
|
|
25
|
-
be,
|
|
26
|
-
Re,
|
|
27
|
-
Le,
|
|
28
|
-
xe,
|
|
29
|
-
Ce,
|
|
30
|
-
ve,
|
|
31
|
-
Se,
|
|
32
|
-
Te,
|
|
33
|
-
pe,
|
|
34
|
-
Ee,
|
|
35
|
-
ke,
|
|
36
|
-
Ie,
|
|
37
|
-
Pe,
|
|
38
|
-
De,
|
|
39
|
-
Oe,
|
|
40
|
-
Ae,
|
|
41
|
-
$e,
|
|
42
|
-
de
|
|
43
|
-
], tt = Symbol.for("rui:icons");
|
|
44
|
-
function gt(s) {
|
|
45
|
-
const u = (s == null ? void 0 : s.registeredIcons) || [];
|
|
46
|
-
return {
|
|
47
|
-
registeredIcons: {
|
|
48
|
-
...Object.fromEntries(
|
|
49
|
-
[
|
|
50
|
-
...et,
|
|
51
|
-
...u
|
|
52
|
-
].map(({ components: p, name: y }) => [y, p])
|
|
53
|
-
)
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
function yt() {
|
|
58
|
-
const s = ee(tt);
|
|
59
|
-
return Me(s, "Could not find icons injection"), s;
|
|
60
|
-
}
|
|
61
|
-
const W = h({ ...oe }), wt = ze(() => {
|
|
62
|
-
const { state: s, store: u } = Fe(), p = B(() => e(u) === P.auto), y = B(() => e(s) === P.light), c = B(() => e(s) === P.dark), g = B(() => e(y) ? e(W).light : e(W).dark), r = (n) => {
|
|
63
|
-
l(u, n || P.auto);
|
|
64
|
-
}, L = () => {
|
|
65
|
-
e(p) ? r(P.light) : e(y) ? r(P.dark) : e(c) && r(P.auto);
|
|
66
|
-
}, w = (n) => {
|
|
67
|
-
l(W, n);
|
|
68
|
-
};
|
|
69
|
-
return {
|
|
70
|
-
config: W,
|
|
71
|
-
init: (n) => {
|
|
72
|
-
r(n.mode ?? P.auto), w(n.config ?? { ...oe }), typeof window < "u" && V([y, g], ([a, C]) => {
|
|
73
|
-
const o = /* @__PURE__ */ new Map();
|
|
74
|
-
Object.entries(C).forEach(([x, v]) => {
|
|
75
|
-
o.set(`--rui-${x}-darker`, v.darker), o.set(`--rui-${x}-lighter`, v.lighter), o.set(`--rui-${x}-main`, v.DEFAULT);
|
|
76
|
-
});
|
|
77
|
-
const f = a ? P.light : P.dark;
|
|
78
|
-
o.set("--rui-text-disabled", `var(--rui-${f}-text-disabled)`), o.set("--rui-text-primary", `var(--rui-${f}-text-primary)`), o.set("--rui-text-secondary", `var(--rui-${f}-text-secondary)`);
|
|
79
|
-
const k = document.documentElement.style;
|
|
80
|
-
o.forEach((x, v) => {
|
|
81
|
-
k.setProperty(v, x);
|
|
82
|
-
});
|
|
83
|
-
}, { immediate: !0 });
|
|
84
|
-
},
|
|
85
|
-
isAutoControlled: p,
|
|
86
|
-
isDark: c,
|
|
87
|
-
isLight: y,
|
|
88
|
-
setThemeConfig: w,
|
|
89
|
-
state: s,
|
|
90
|
-
store: u,
|
|
91
|
-
switchThemeScheme: r,
|
|
92
|
-
theme: g,
|
|
93
|
-
toggleThemeMode: L
|
|
94
|
-
};
|
|
95
|
-
});
|
|
96
|
-
function bt() {
|
|
97
|
-
const { width: s } = He(), u = {
|
|
98
|
-
xs: 0,
|
|
99
|
-
..._e
|
|
100
|
-
}, p = qe(u), y = Object.keys, c = y(u), g = c.map(
|
|
101
|
-
(n, a) => [
|
|
102
|
-
n,
|
|
103
|
-
a < c.length - 1 ? p.between(n, c[a + 1]) : p[n]
|
|
104
|
-
]
|
|
105
|
-
), r = g.map(([n, a]) => [
|
|
106
|
-
X(`is_${n}`),
|
|
107
|
-
a
|
|
108
|
-
]), L = c.map((n) => [
|
|
109
|
-
X(`is_${n}_and_up`),
|
|
110
|
-
p.greaterOrEqual(n)
|
|
111
|
-
]), w = c.map((n) => [
|
|
112
|
-
X(`is_${n}_and_down`),
|
|
113
|
-
p.smaller(n)
|
|
114
|
-
]), d = B(() => {
|
|
115
|
-
var n;
|
|
116
|
-
return ((n = g.find((a) => e(a[1]))) == null ? void 0 : n[0]) || "";
|
|
117
|
-
});
|
|
118
|
-
return {
|
|
119
|
-
...Object.fromEntries(r),
|
|
120
|
-
...Object.fromEntries(L),
|
|
121
|
-
...Object.fromEntries(w),
|
|
122
|
-
name: d,
|
|
123
|
-
width: s
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
const D = {
|
|
127
|
-
adaptive: !0,
|
|
128
|
-
gpuAcceleration: !0,
|
|
129
|
-
locked: !1,
|
|
130
|
-
offsetDistance: 8,
|
|
131
|
-
offsetSkid: 0,
|
|
132
|
-
overflowPadding: 8,
|
|
133
|
-
placement: "bottom",
|
|
134
|
-
resize: !0,
|
|
135
|
-
scroll: !0,
|
|
136
|
-
strategy: "absolute"
|
|
137
|
-
}, nt = Ne({
|
|
138
|
-
defaultModifiers: [
|
|
139
|
-
...Ke,
|
|
140
|
-
Ge,
|
|
141
|
-
Xe,
|
|
142
|
-
Je,
|
|
143
|
-
Qe,
|
|
144
|
-
Ye,
|
|
145
|
-
Ze
|
|
146
|
-
]
|
|
147
|
-
});
|
|
148
|
-
function Rt(s, u = h(!1), p = h(0), y = h(0), c) {
|
|
149
|
-
const g = h(null), r = h(null), L = h(null), w = h(!1), d = h(), n = h(), a = h(!1), C = h(!1), o = () => {
|
|
150
|
-
l(a, !1);
|
|
151
|
-
}, f = () => {
|
|
152
|
-
var m;
|
|
153
|
-
(m = e(L)) == null || m.update();
|
|
154
|
-
}, k = (m = !1) => {
|
|
155
|
-
if (!e(u) && (e(n) && (clearTimeout(e(n)), l(n, void 0)), l(C, !1), !e(d))) {
|
|
156
|
-
l(a, !0);
|
|
157
|
-
const R = setTimeout(() => {
|
|
158
|
-
l(w, !0), l(d, void 0);
|
|
159
|
-
}, m ? 0 : e(p));
|
|
160
|
-
l(d, R);
|
|
161
|
-
}
|
|
162
|
-
}, x = (m = !1) => {
|
|
163
|
-
if (!e(u) && (e(d) && (clearTimeout(e(d)), l(d, void 0)), !e(n))) {
|
|
164
|
-
const R = setTimeout(() => {
|
|
165
|
-
e(w) || o(), l(w, !1), l(n, void 0);
|
|
166
|
-
}, m ? 0 : e(y));
|
|
167
|
-
l(n, R);
|
|
168
|
-
}
|
|
169
|
-
}, v = () => {
|
|
170
|
-
l(C, !0);
|
|
171
|
-
};
|
|
172
|
-
return te(() => {
|
|
173
|
-
Be((m) => {
|
|
174
|
-
if (!e(r) || !e(g) && !e(c))
|
|
175
|
-
return;
|
|
176
|
-
const R = Z(r), O = e(c) || Z(g);
|
|
177
|
-
if (!(R instanceof HTMLElement) || !O)
|
|
178
|
-
return;
|
|
179
|
-
const {
|
|
180
|
-
adaptive: M = D.adaptive,
|
|
181
|
-
gpuAcceleration: E = D.gpuAcceleration,
|
|
182
|
-
locked: z = D.locked,
|
|
183
|
-
offsetDistance: b = D.offsetDistance,
|
|
184
|
-
offsetSkid: U = D.offsetSkid,
|
|
185
|
-
overflowPadding: q = D.overflowPadding,
|
|
186
|
-
placement: j = D.placement,
|
|
187
|
-
resize: F = D.resize,
|
|
188
|
-
scroll: H = D.scroll,
|
|
189
|
-
strategy: N = D.strategy
|
|
190
|
-
} = e(s), K = nt(O, R, {
|
|
191
|
-
modifiers: [
|
|
192
|
-
{
|
|
193
|
-
enabled: !z,
|
|
194
|
-
name: "flip"
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
name: "preventOverflow",
|
|
198
|
-
options: {
|
|
199
|
-
padding: q
|
|
200
|
-
}
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
name: "offset",
|
|
204
|
-
options: {
|
|
205
|
-
offset: [U, b]
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
name: "computeStyles",
|
|
210
|
-
options: {
|
|
211
|
-
adaptive: M,
|
|
212
|
-
gpuAcceleration: E
|
|
213
|
-
}
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
name: "eventListeners",
|
|
217
|
-
options: {
|
|
218
|
-
resize: F,
|
|
219
|
-
scroll: H
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
name: "arrow",
|
|
224
|
-
options: {
|
|
225
|
-
padding: 4
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
],
|
|
229
|
-
placement: j,
|
|
230
|
-
strategy: N
|
|
231
|
-
});
|
|
232
|
-
l(L, K), m(K.destroy);
|
|
233
|
-
});
|
|
234
|
-
}), ne([g, r], async () => {
|
|
235
|
-
const m = e(L);
|
|
236
|
-
e(w) && m && await m.update();
|
|
237
|
-
}), {
|
|
238
|
-
instance: L,
|
|
239
|
-
leavePending: C,
|
|
240
|
-
onClose: x,
|
|
241
|
-
onLeavePending: v,
|
|
242
|
-
onOpen: k,
|
|
243
|
-
onPopperLeave: o,
|
|
244
|
-
open: w,
|
|
245
|
-
popper: r,
|
|
246
|
-
popperEnter: a,
|
|
247
|
-
reference: g,
|
|
248
|
-
updatePopper: f
|
|
249
|
-
};
|
|
250
|
-
}
|
|
251
|
-
function ot({
|
|
252
|
-
keyAttr: s,
|
|
253
|
-
textAttr: u
|
|
254
|
-
}) {
|
|
255
|
-
function p(c) {
|
|
256
|
-
var g;
|
|
257
|
-
return u ? typeof u == "function" ? u(c) : (g = c[u]) == null ? void 0 : g.toString() : c == null ? void 0 : c.toString();
|
|
258
|
-
}
|
|
259
|
-
function y(c) {
|
|
260
|
-
return s ? c[s] : c;
|
|
261
|
-
}
|
|
262
|
-
return {
|
|
263
|
-
getIdentifier: y,
|
|
264
|
-
getText: p
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
function Lt({
|
|
268
|
-
appendWidth: s,
|
|
269
|
-
autoFocus: u,
|
|
270
|
-
autoSelectFirst: p,
|
|
271
|
-
dense: y,
|
|
272
|
-
hideSelected: c,
|
|
273
|
-
itemHeight: g = 48,
|
|
274
|
-
keyAttr: r,
|
|
275
|
-
menuRef: L,
|
|
276
|
-
options: w,
|
|
277
|
-
overscan: d = 5,
|
|
278
|
-
prependWidth: n,
|
|
279
|
-
setValue: a,
|
|
280
|
-
textAttr: C,
|
|
281
|
-
value: o
|
|
282
|
-
}) {
|
|
283
|
-
const f = B(() => {
|
|
284
|
-
const t = e(w);
|
|
285
|
-
return c ? t.filter((i) => !F(i)) : t;
|
|
286
|
-
}), { getIdentifier: k, getText: x } = ot({
|
|
287
|
-
keyAttr: r,
|
|
288
|
-
textAttr: C
|
|
289
|
-
}), { containerProps: v, list: m, scrollTo: R, wrapperProps: O } = je(
|
|
290
|
-
f,
|
|
291
|
-
{
|
|
292
|
-
itemHeight: g,
|
|
293
|
-
overscan: d
|
|
294
|
-
}
|
|
295
|
-
), M = We(m, ({ data: t, index: i }) => ({ _index: i, item: t })), E = h(!1), z = B(() => {
|
|
296
|
-
const t = e(o);
|
|
297
|
-
return !r || !t ? t : Array.isArray(t) ? t.map((i) => i[r]) : t[r];
|
|
298
|
-
}), b = h(e(p) ? 0 : -1), U = B(() => {
|
|
299
|
-
const t = { max: 0, min: 0 }, i = 30, I = 1.5, S = e(y) ? 12 : 13;
|
|
300
|
-
e(f).forEach((A) => {
|
|
301
|
-
var J, Q;
|
|
302
|
-
const $ = ((Q = (J = x(A)) == null ? void 0 : J.toString()) == null ? void 0 : Q.length) ?? 0;
|
|
303
|
-
t.min === 0 && t.max === 0 ? (t.min = $, t.max = $) : $ < t.min ? t.min = $ : $ > t.max && (t.max = $);
|
|
304
|
-
});
|
|
305
|
-
const _ = t.max - t.min;
|
|
306
|
-
function T(A) {
|
|
307
|
-
const $ = (n ? n + 0.5 : 0) + (s ? s + 0.5 : 0);
|
|
308
|
-
return `${Math.min(A * S / 16 + I + $, i)}rem`;
|
|
309
|
-
}
|
|
310
|
-
return _ <= 5 ? T(t.max) : T(t.min + _ / 2);
|
|
311
|
-
});
|
|
312
|
-
function q(t = !1) {
|
|
313
|
-
l(E, t);
|
|
314
|
-
}
|
|
315
|
-
function j(t) {
|
|
316
|
-
const i = e(o), I = Array.isArray(i) ? i : i ? [i] : [];
|
|
317
|
-
return I.length === 0 ? -1 : I.findIndex((S) => r ? S[r] === t[r] : S === t);
|
|
318
|
-
}
|
|
319
|
-
function F(t) {
|
|
320
|
-
return j(t) !== -1;
|
|
321
|
-
}
|
|
322
|
-
async function H(t = !1) {
|
|
323
|
-
const i = e(b);
|
|
324
|
-
i > -1 && await Y(() => {
|
|
325
|
-
var S, _;
|
|
326
|
-
if ((S = e(L)) == null ? void 0 : S.parentElement) {
|
|
327
|
-
const T = e(L).getElementsByClassName("highlighted")[0];
|
|
328
|
-
if (T)
|
|
329
|
-
(_ = T.scrollIntoView) == null || _.call(T, { behavior: t ? "smooth" : "auto", block: "nearest" }), e(u) && "focus" in T && typeof T.focus == "function" && (T == null || T.focus());
|
|
330
|
-
else if (R(i), e(u)) {
|
|
331
|
-
const A = e(L).getElementsByClassName("highlighted")[0];
|
|
332
|
-
A && "focus" in A && typeof A.focus == "function" && A.focus();
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
});
|
|
336
|
-
}
|
|
337
|
-
async function N(t) {
|
|
338
|
-
await Y(() => {
|
|
339
|
-
if (t) {
|
|
340
|
-
const i = e(o);
|
|
341
|
-
if (Array.isArray(i) && i.length > 0 || i) {
|
|
342
|
-
const I = e(f).findIndex(F);
|
|
343
|
-
I > -1 && l(b, I);
|
|
344
|
-
}
|
|
345
|
-
Ve(m, async () => {
|
|
346
|
-
await H();
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
|
-
});
|
|
350
|
-
}
|
|
351
|
-
return V(E, N), V(b, async (t, i) => {
|
|
352
|
-
t !== i && await H(!0);
|
|
353
|
-
}), V(f, async () => {
|
|
354
|
-
e(b) !== -1 ? e(p) ? (l(b, 0), await H()) : (l(b, -1), R(0)) : R(0);
|
|
355
|
-
}), {
|
|
356
|
-
applyHighlighted: () => {
|
|
357
|
-
if (!a || !e(E))
|
|
358
|
-
return;
|
|
359
|
-
const t = e(b);
|
|
360
|
-
if (t === -1)
|
|
361
|
-
return;
|
|
362
|
-
const i = e(f).find((I, S) => t === S);
|
|
363
|
-
i && a(i);
|
|
364
|
-
},
|
|
365
|
-
containerProps: v,
|
|
366
|
-
getIdentifier: k,
|
|
367
|
-
getText: x,
|
|
368
|
-
highlightedIndex: b,
|
|
369
|
-
isActiveItem: F,
|
|
370
|
-
isOpen: E,
|
|
371
|
-
itemIndexInValue: j,
|
|
372
|
-
menuWidth: U,
|
|
373
|
-
moveHighlight: (t) => {
|
|
374
|
-
if (!e(E)) {
|
|
375
|
-
q(!0);
|
|
376
|
-
return;
|
|
377
|
-
}
|
|
378
|
-
let i = e(b);
|
|
379
|
-
i += t ? -1 : 1;
|
|
380
|
-
const S = e(f).length;
|
|
381
|
-
i >= S ? l(b, 0) : i < 0 ? l(b, S - 1) : l(b, i);
|
|
382
|
-
},
|
|
383
|
-
optionsWithSelectedHidden: f,
|
|
384
|
-
renderedData: M,
|
|
385
|
-
toggle: q,
|
|
386
|
-
valueKey: z,
|
|
387
|
-
wrapperProps: O
|
|
388
|
-
};
|
|
389
|
-
}
|
|
390
|
-
const it = Symbol.for("rui:table");
|
|
391
|
-
function xt(s) {
|
|
392
|
-
return {
|
|
393
|
-
globalItemsPerPage: !1,
|
|
394
|
-
itemsPerPage: h(10),
|
|
395
|
-
limits: [10, 25, 50, 100],
|
|
396
|
-
stickyOffset: h(0),
|
|
397
|
-
...s
|
|
398
|
-
};
|
|
399
|
-
}
|
|
400
|
-
function Ct() {
|
|
401
|
-
const s = ee(it);
|
|
402
|
-
if (!s)
|
|
403
|
-
throw new Error("Could not find rui table options injection");
|
|
404
|
-
return s;
|
|
405
|
-
}
|
|
406
|
-
function vt(s = h(!1), u) {
|
|
407
|
-
const p = h(null), y = h(null), c = h(!1), g = -0.5, r = {
|
|
408
|
-
head: ":scope > thead[data-id=head-main]",
|
|
409
|
-
headClone: ":scope > thead[data-id=head-clone]",
|
|
410
|
-
row: ":scope > tbody > tr:not([hidden])",
|
|
411
|
-
th: ":scope > th"
|
|
412
|
-
}, L = () => {
|
|
413
|
-
const d = e(p);
|
|
414
|
-
if (!e(s) || !d)
|
|
415
|
-
return;
|
|
416
|
-
const n = d.querySelector(
|
|
417
|
-
`${r.headClone} > tr`
|
|
418
|
-
), a = d.querySelector(`${r.head} > tr`) ?? null, C = () => {
|
|
419
|
-
const o = a == null ? void 0 : a.querySelectorAll(
|
|
420
|
-
r.th
|
|
421
|
-
), f = n == null ? void 0 : n.querySelectorAll(r.th);
|
|
422
|
-
f == null || f.forEach((k, x) => {
|
|
423
|
-
ne(k, (v) => {
|
|
424
|
-
const m = v[0].target.getBoundingClientRect(), R = o == null ? void 0 : o.item(x);
|
|
425
|
-
R && (R.style.width = `${m.width}px`);
|
|
426
|
-
});
|
|
427
|
-
});
|
|
428
|
-
};
|
|
429
|
-
Ue(n, (o) => {
|
|
430
|
-
for (const f of o)
|
|
431
|
-
(f.type === "childList" || f.type === "attributes") && C();
|
|
432
|
-
}, {
|
|
433
|
-
attributes: !0,
|
|
434
|
-
childList: !0,
|
|
435
|
-
subtree: !0
|
|
436
|
-
}), C();
|
|
437
|
-
}, w = () => {
|
|
438
|
-
var z;
|
|
439
|
-
const d = e(p);
|
|
440
|
-
if (!e(s) || !d)
|
|
441
|
-
return;
|
|
442
|
-
const n = d.getBoundingClientRect(), a = d.querySelector(
|
|
443
|
-
r.headClone
|
|
444
|
-
), C = a == null ? void 0 : a.getBoundingClientRect(), o = d.querySelector(r.head) ?? null, f = o == null ? void 0 : o.getBoundingClientRect();
|
|
445
|
-
if (!n || !C || !o || !a || !f)
|
|
446
|
-
return;
|
|
447
|
-
const {
|
|
448
|
-
height: k,
|
|
449
|
-
left: x,
|
|
450
|
-
width: v
|
|
451
|
-
} = C, { bottom: m, top: R } = n, O = e(u) ?? 0;
|
|
452
|
-
o.style.width = `${v}px`;
|
|
453
|
-
const M = d.querySelectorAll(r.row), E = (z = M.item(M.length - 1)) == null ? void 0 : z.getBoundingClientRect();
|
|
454
|
-
if (R <= O && m > O && M.length > 1) {
|
|
455
|
-
l(c, !0), o.style.left = `${x + g}px`;
|
|
456
|
-
const b = (E == null ? void 0 : E.height) ?? 0;
|
|
457
|
-
m <= b + k + O ? o.style.top = `${m - b - k}px` : o.style.top = `${O}px`;
|
|
458
|
-
} else
|
|
459
|
-
l(c, !1), o.style.left = `${g}px`, o.style.top = "0";
|
|
460
|
-
};
|
|
461
|
-
return te(() => {
|
|
462
|
-
w(), G(y, "scroll", w), G(document.body, "scroll", w), G(window, "resize", w), L();
|
|
463
|
-
}), {
|
|
464
|
-
stick: c,
|
|
465
|
-
table: p,
|
|
466
|
-
tableScroller: y
|
|
467
|
-
};
|
|
468
|
-
}
|
|
469
|
-
export {
|
|
470
|
-
tt as I,
|
|
471
|
-
it as T,
|
|
472
|
-
Rt as a,
|
|
473
|
-
ot as b,
|
|
474
|
-
Lt as c,
|
|
475
|
-
Ct as d,
|
|
476
|
-
vt as e,
|
|
477
|
-
gt as f,
|
|
478
|
-
xt as g,
|
|
479
|
-
wt as h,
|
|
480
|
-
bt as i,
|
|
481
|
-
yt as u
|
|
482
|
-
};
|