@mistersee/global-table 0.1.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/README.md +376 -0
- package/dist/ColumnToggle.d.ts +11 -0
- package/dist/LimitSelect.d.ts +6 -0
- package/dist/Pagination.d.ts +14 -0
- package/dist/SeeTable.d.ts +5 -0
- package/dist/SkeletonRows.d.ts +5 -0
- package/dist/global-table.js +2444 -0
- package/dist/icons/CheckIcon.d.ts +3 -0
- package/dist/icons/ColumnsIcon.d.ts +3 -0
- package/dist/icons/DragHandleIcon.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/types.d.ts +111 -0
- package/dist/utils/cn.d.ts +1 -0
- package/dist/utils/columnOrder.d.ts +8 -0
- package/dist/utils/pagination.d.ts +14 -0
- package/dist/utils/stickyOffsets.d.ts +13 -0
- package/media/demo-table.png +0 -0
- package/media/demo.png +0 -0
- package/package.json +53 -0
|
@@ -0,0 +1,2444 @@
|
|
|
1
|
+
import { useEffect as e, useId as t, useLayoutEffect as n, useMemo as r, useRef as i, useState as a } from "react";
|
|
2
|
+
import { AnimatePresence as o, motion as s } from "framer-motion";
|
|
3
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
4
|
+
//#region src/lib/icons/CheckIcon.tsx
|
|
5
|
+
function d({ className: e }) {
|
|
6
|
+
return /* @__PURE__ */ l("svg", {
|
|
7
|
+
className: e,
|
|
8
|
+
width: "12",
|
|
9
|
+
height: "12",
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
fill: "none",
|
|
12
|
+
stroke: "currentColor",
|
|
13
|
+
strokeWidth: "3",
|
|
14
|
+
strokeLinecap: "round",
|
|
15
|
+
strokeLinejoin: "round",
|
|
16
|
+
"aria-hidden": !0,
|
|
17
|
+
children: /* @__PURE__ */ l("path", { d: "M20 6L9 17l-5-5" })
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/lib/icons/ColumnsIcon.tsx
|
|
22
|
+
function f({ className: e }) {
|
|
23
|
+
return /* @__PURE__ */ u("svg", {
|
|
24
|
+
className: e,
|
|
25
|
+
width: "16",
|
|
26
|
+
height: "16",
|
|
27
|
+
viewBox: "0 0 24 24",
|
|
28
|
+
fill: "none",
|
|
29
|
+
stroke: "currentColor",
|
|
30
|
+
strokeWidth: "2",
|
|
31
|
+
strokeLinecap: "round",
|
|
32
|
+
strokeLinejoin: "round",
|
|
33
|
+
"aria-hidden": !0,
|
|
34
|
+
children: [/* @__PURE__ */ l("rect", {
|
|
35
|
+
x: "3",
|
|
36
|
+
y: "4",
|
|
37
|
+
width: "7",
|
|
38
|
+
height: "16",
|
|
39
|
+
rx: "1.5"
|
|
40
|
+
}), /* @__PURE__ */ l("rect", {
|
|
41
|
+
x: "14",
|
|
42
|
+
y: "4",
|
|
43
|
+
width: "7",
|
|
44
|
+
height: "16",
|
|
45
|
+
rx: "1.5"
|
|
46
|
+
})]
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region node_modules/.pnpm/tailwind-merge@3.7.0/node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
51
|
+
var p = (e, t) => {
|
|
52
|
+
let n = Array(e.length + t.length);
|
|
53
|
+
for (let t = 0; t < e.length; t++) n[t] = e[t];
|
|
54
|
+
for (let r = 0; r < t.length; r++) n[e.length + r] = t[r];
|
|
55
|
+
return n;
|
|
56
|
+
}, m = (e, t) => ({
|
|
57
|
+
classGroupId: e,
|
|
58
|
+
validator: t
|
|
59
|
+
}), h = (e = /* @__PURE__ */ new Map(), t = null, n) => ({
|
|
60
|
+
nextPart: e,
|
|
61
|
+
validators: t,
|
|
62
|
+
classGroupId: n
|
|
63
|
+
}), g = "-", _ = [], v = "arbitrary..", y = (e) => {
|
|
64
|
+
let t = S(e), { conflictingClassGroups: n, conflictingClassGroupModifiers: r } = e;
|
|
65
|
+
return {
|
|
66
|
+
getClassGroupId: (e) => {
|
|
67
|
+
if (e.startsWith("[") && e.endsWith("]")) return x(e);
|
|
68
|
+
let n = e.split(g);
|
|
69
|
+
return b(n, +(n[0] === "" && n.length > 1), t);
|
|
70
|
+
},
|
|
71
|
+
getConflictingClassGroupIds: (e, t) => {
|
|
72
|
+
if (t) {
|
|
73
|
+
let t = r[e], i = n[e];
|
|
74
|
+
return t ? i ? p(i, t) : t : i || _;
|
|
75
|
+
}
|
|
76
|
+
return n[e] || _;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}, b = (e, t, n) => {
|
|
80
|
+
if (e.length - t === 0) return n.classGroupId;
|
|
81
|
+
let r = e[t], i = n.nextPart.get(r);
|
|
82
|
+
if (i) {
|
|
83
|
+
let n = b(e, t + 1, i);
|
|
84
|
+
if (n) return n;
|
|
85
|
+
}
|
|
86
|
+
let a = n.validators;
|
|
87
|
+
if (a === null) return;
|
|
88
|
+
let o = t === 0 ? e.join(g) : e.slice(t).join(g), s = a.length;
|
|
89
|
+
for (let e = 0; e < s; e++) {
|
|
90
|
+
let t = a[e];
|
|
91
|
+
if (t.validator(o)) return t.classGroupId;
|
|
92
|
+
}
|
|
93
|
+
}, x = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
94
|
+
let t = e.slice(1, -1), n = t.indexOf(":"), r = t.slice(0, n);
|
|
95
|
+
return r ? v + r : void 0;
|
|
96
|
+
})(), S = (e) => {
|
|
97
|
+
let { theme: t, classGroups: n } = e;
|
|
98
|
+
return ee(n, t);
|
|
99
|
+
}, ee = (e, t) => {
|
|
100
|
+
let n = h();
|
|
101
|
+
for (let r in e) {
|
|
102
|
+
let i = e[r];
|
|
103
|
+
C(i, n, r, t);
|
|
104
|
+
}
|
|
105
|
+
return n;
|
|
106
|
+
}, C = (e, t, n, r) => {
|
|
107
|
+
let i = e.length;
|
|
108
|
+
for (let a = 0; a < i; a++) {
|
|
109
|
+
let i = e[a];
|
|
110
|
+
w(i, t, n, r);
|
|
111
|
+
}
|
|
112
|
+
}, w = (e, t, n, r) => {
|
|
113
|
+
if (typeof e == "string") {
|
|
114
|
+
te(e, t, n);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (typeof e == "function") {
|
|
118
|
+
ne(e, t, n, r);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
T(e, t, n, r);
|
|
122
|
+
}, te = (e, t, n) => {
|
|
123
|
+
let r = e === "" ? t : E(t, e);
|
|
124
|
+
r.classGroupId = n;
|
|
125
|
+
}, ne = (e, t, n, r) => {
|
|
126
|
+
if (re(e)) {
|
|
127
|
+
C(e(r), t, n, r);
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
t.validators === null && (t.validators = []), t.validators.push(m(n, e));
|
|
131
|
+
}, T = (e, t, n, r) => {
|
|
132
|
+
let i = Object.entries(e), a = i.length;
|
|
133
|
+
for (let e = 0; e < a; e++) {
|
|
134
|
+
let [a, o] = i[e];
|
|
135
|
+
C(o, E(t, a), n, r);
|
|
136
|
+
}
|
|
137
|
+
}, E = (e, t) => {
|
|
138
|
+
let n = e, r = t.split(g), i = r.length;
|
|
139
|
+
for (let e = 0; e < i; e++) {
|
|
140
|
+
let t = r[e], i = n.nextPart.get(t);
|
|
141
|
+
i || (i = h(), n.nextPart.set(t, i)), n = i;
|
|
142
|
+
}
|
|
143
|
+
return n;
|
|
144
|
+
}, re = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, D = (e) => {
|
|
145
|
+
if (e < 1) return {
|
|
146
|
+
get: () => void 0,
|
|
147
|
+
set: () => {}
|
|
148
|
+
};
|
|
149
|
+
let t = 0, n = Object.create(null), r = Object.create(null), i = (i, a) => {
|
|
150
|
+
n[i] = a, t++, t > e && (t = 0, r = n, n = Object.create(null));
|
|
151
|
+
};
|
|
152
|
+
return {
|
|
153
|
+
get(e) {
|
|
154
|
+
let t = n[e];
|
|
155
|
+
if (t !== void 0) return t;
|
|
156
|
+
if ((t = r[e]) !== void 0) return i(e, t), t;
|
|
157
|
+
},
|
|
158
|
+
set(e, t) {
|
|
159
|
+
e in n ? n[e] = t : i(e, t);
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
}, O = "!", k = ":", A = [], j = (e, t, n, r, i) => ({
|
|
163
|
+
modifiers: e,
|
|
164
|
+
hasImportantModifier: t,
|
|
165
|
+
baseClassName: n,
|
|
166
|
+
maybePostfixModifierPosition: r,
|
|
167
|
+
isExternal: i
|
|
168
|
+
}), M = (e) => {
|
|
169
|
+
let { prefix: t, experimentalParseClassName: n } = e, r = (e) => {
|
|
170
|
+
let t = [], n = 0, r = 0, i = 0, a, o = e.length;
|
|
171
|
+
for (let s = 0; s < o; s++) {
|
|
172
|
+
let o = e[s];
|
|
173
|
+
if (n === 0 && r === 0) {
|
|
174
|
+
if (o === k) {
|
|
175
|
+
t.push(e.slice(i, s)), i = s + 1;
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
if (o === "/") {
|
|
179
|
+
a = s;
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
o === "[" ? n++ : o === "]" ? n-- : o === "(" ? r++ : o === ")" && r--;
|
|
184
|
+
}
|
|
185
|
+
let s = t.length === 0 ? e : e.slice(i), c = s, l = !1;
|
|
186
|
+
s.endsWith(O) ? (c = s.slice(0, -1), l = !0) : s.startsWith(O) && (c = s.slice(1), l = !0);
|
|
187
|
+
let u = a && a > i ? a - i : void 0;
|
|
188
|
+
return j(t, l, c, u);
|
|
189
|
+
};
|
|
190
|
+
if (t) {
|
|
191
|
+
let e = t + k, n = r;
|
|
192
|
+
r = (t) => t.startsWith(e) ? n(t.slice(e.length)) : j(A, !1, t, void 0, !0);
|
|
193
|
+
}
|
|
194
|
+
if (n) {
|
|
195
|
+
let e = r;
|
|
196
|
+
r = (t) => n({
|
|
197
|
+
className: t,
|
|
198
|
+
parseClassName: e
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
return r;
|
|
202
|
+
}, ie = (e) => {
|
|
203
|
+
let t = /* @__PURE__ */ new Map();
|
|
204
|
+
return e.orderSensitiveModifiers.forEach((e, n) => {
|
|
205
|
+
t.set(e, 1e6 + n);
|
|
206
|
+
}), (e) => {
|
|
207
|
+
let n = [], r = [];
|
|
208
|
+
for (let i = 0; i < e.length; i++) {
|
|
209
|
+
let a = e[i], o = a[0] === "[", s = t.has(a);
|
|
210
|
+
o || s ? (r.length > 0 && (r.sort(), n.push(...r), r = []), n.push(a)) : r.push(a);
|
|
211
|
+
}
|
|
212
|
+
return r.length > 0 && (r.sort(), n.push(...r)), n;
|
|
213
|
+
};
|
|
214
|
+
}, ae = (e) => ({
|
|
215
|
+
cache: D(e.cacheSize),
|
|
216
|
+
parseClassName: M(e),
|
|
217
|
+
sortModifiers: ie(e),
|
|
218
|
+
postfixLookupClassGroupIds: oe(e),
|
|
219
|
+
...y(e)
|
|
220
|
+
}), oe = (e) => {
|
|
221
|
+
let t = Object.create(null), n = e.postfixLookupClassGroups;
|
|
222
|
+
if (n) for (let e = 0; e < n.length; e++) t[n[e]] = !0;
|
|
223
|
+
return t;
|
|
224
|
+
}, se = /\s+/, N = (e, t) => {
|
|
225
|
+
let { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: i, sortModifiers: a, postfixLookupClassGroupIds: o } = t, s = [], c = e.trim().split(se), l = "";
|
|
226
|
+
for (let e = c.length - 1; e >= 0; --e) {
|
|
227
|
+
let t = c[e], { isExternal: u, modifiers: d, hasImportantModifier: f, baseClassName: p, maybePostfixModifierPosition: m } = n(t);
|
|
228
|
+
if (u) {
|
|
229
|
+
l = t + (l.length > 0 ? " " + l : l);
|
|
230
|
+
continue;
|
|
231
|
+
}
|
|
232
|
+
let h = !!m, g;
|
|
233
|
+
if (h) {
|
|
234
|
+
g = r(p.substring(0, m));
|
|
235
|
+
let e = g && o[g] ? r(p) : void 0;
|
|
236
|
+
e && e !== g && (g = e, h = !1);
|
|
237
|
+
} else g = r(p);
|
|
238
|
+
if (!g) {
|
|
239
|
+
if (!h) {
|
|
240
|
+
l = t + (l.length > 0 ? " " + l : l);
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
if (g = r(p), !g) {
|
|
244
|
+
l = t + (l.length > 0 ? " " + l : l);
|
|
245
|
+
continue;
|
|
246
|
+
}
|
|
247
|
+
h = !1;
|
|
248
|
+
}
|
|
249
|
+
let _ = d.length === 0 ? "" : d.length === 1 ? d[0] : a(d).join(":"), v = f ? _ + O : _, y = v + g;
|
|
250
|
+
if (s.indexOf(y) > -1) continue;
|
|
251
|
+
s.push(y);
|
|
252
|
+
let b = i(g, h);
|
|
253
|
+
for (let e = 0; e < b.length; ++e) {
|
|
254
|
+
let t = b[e];
|
|
255
|
+
s.push(v + t);
|
|
256
|
+
}
|
|
257
|
+
l = t + (l.length > 0 ? " " + l : l);
|
|
258
|
+
}
|
|
259
|
+
return l;
|
|
260
|
+
}, P = (...e) => {
|
|
261
|
+
let t = 0, n, r, i = "";
|
|
262
|
+
for (; t < e.length;) (n = e[t++]) && (r = F(n)) && (i && (i += " "), i += r);
|
|
263
|
+
return i;
|
|
264
|
+
}, F = (e) => {
|
|
265
|
+
if (typeof e == "string") return e;
|
|
266
|
+
let t, n = "";
|
|
267
|
+
for (let r = 0; r < e.length; r++) e[r] && (t = F(e[r])) && (n && (n += " "), n += t);
|
|
268
|
+
return n;
|
|
269
|
+
}, I = (e, ...t) => {
|
|
270
|
+
let n, r, i, a, o = (o) => (n = ae(t.reduce((e, t) => t(e), e())), r = n.cache.get, i = n.cache.set, a = s, s(o)), s = (e) => {
|
|
271
|
+
let t = r(e);
|
|
272
|
+
if (t) return t;
|
|
273
|
+
let a = N(e, n);
|
|
274
|
+
return i(e, a), a;
|
|
275
|
+
};
|
|
276
|
+
return a = o, (...e) => a(P(...e));
|
|
277
|
+
}, L = [], R = (e) => {
|
|
278
|
+
let t = (t) => t[e] || L;
|
|
279
|
+
return t.isThemeGetter = !0, t.themeKey = e, t;
|
|
280
|
+
}, z = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, B = /^\((?:(\w[\w-]*):)?(.+)\)$/i, V = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, ce = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, H = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, le = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/, ue = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, de = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, U = (e) => V.test(e), W = (e) => !!e && !Number.isNaN(Number(e)), G = (e) => !!e && Number.isInteger(Number(e)), K = (e) => e.endsWith("%") && W(e.slice(0, -1)), q = (e) => ce.test(e), fe = () => !0, pe = (e) => H.test(e) && !le.test(e), me = () => !1, he = (e) => ue.test(e), ge = (e) => de.test(e), _e = (e) => !J(e) && !X(e), ve = (e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), ye = (e) => Z(e, Fe, me), J = (e) => z.test(e), Y = (e) => Z(e, Ie, pe), be = (e) => Z(e, Le, W), xe = (e) => Z(e, ze, fe), Se = (e) => Z(e, Re, me), Ce = (e) => Z(e, Ne, me), we = (e) => Z(e, Pe, ge), Te = (e) => Z(e, Be, he), X = (e) => B.test(e), Ee = (e) => Q(e, Ie), De = (e) => Q(e, Re), Oe = (e) => Q(e, Ne), ke = (e) => Q(e, Fe), Ae = (e) => Q(e, Pe), je = (e) => Q(e, Be, !0), Me = (e) => Q(e, ze, !0), Z = (e, t, n) => {
|
|
281
|
+
let r = z.exec(e);
|
|
282
|
+
return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
|
|
283
|
+
}, Q = (e, t, n = !1) => {
|
|
284
|
+
let r = B.exec(e);
|
|
285
|
+
return r ? r[1] ? t(r[1]) : n : !1;
|
|
286
|
+
}, Ne = (e) => e === "position" || e === "percentage", Pe = (e) => e === "image" || e === "url", Fe = (e) => e === "length" || e === "size" || e === "bg-size", Ie = (e) => e === "length", Le = (e) => e === "number", Re = (e) => e === "family-name", ze = (e) => e === "number" || e === "weight", Be = (e) => e === "shadow", Ve = /*#__PURE__*/ I(() => {
|
|
287
|
+
let e = R("color"), t = R("font"), n = R("text"), r = R("font-weight"), i = R("tracking"), a = R("leading"), o = R("breakpoint"), s = R("container"), c = R("spacing"), l = R("radius"), u = R("shadow"), d = R("inset-shadow"), f = R("text-shadow"), p = R("drop-shadow"), m = R("blur"), h = R("perspective"), g = R("aspect"), _ = R("ease"), v = R("animate"), y = () => [
|
|
288
|
+
"auto",
|
|
289
|
+
"avoid",
|
|
290
|
+
"all",
|
|
291
|
+
"avoid-page",
|
|
292
|
+
"page",
|
|
293
|
+
"left",
|
|
294
|
+
"right",
|
|
295
|
+
"column"
|
|
296
|
+
], b = () => [
|
|
297
|
+
"center",
|
|
298
|
+
"top",
|
|
299
|
+
"bottom",
|
|
300
|
+
"left",
|
|
301
|
+
"right",
|
|
302
|
+
"top-left",
|
|
303
|
+
"left-top",
|
|
304
|
+
"top-right",
|
|
305
|
+
"right-top",
|
|
306
|
+
"bottom-right",
|
|
307
|
+
"right-bottom",
|
|
308
|
+
"bottom-left",
|
|
309
|
+
"left-bottom"
|
|
310
|
+
], x = () => [
|
|
311
|
+
...b(),
|
|
312
|
+
X,
|
|
313
|
+
J
|
|
314
|
+
], S = () => [
|
|
315
|
+
"auto",
|
|
316
|
+
"hidden",
|
|
317
|
+
"clip",
|
|
318
|
+
"visible",
|
|
319
|
+
"scroll"
|
|
320
|
+
], ee = () => [
|
|
321
|
+
"auto",
|
|
322
|
+
"contain",
|
|
323
|
+
"none"
|
|
324
|
+
], C = () => [
|
|
325
|
+
X,
|
|
326
|
+
J,
|
|
327
|
+
c
|
|
328
|
+
], w = () => [
|
|
329
|
+
U,
|
|
330
|
+
"full",
|
|
331
|
+
"auto",
|
|
332
|
+
...C()
|
|
333
|
+
], te = () => [
|
|
334
|
+
G,
|
|
335
|
+
"none",
|
|
336
|
+
"subgrid",
|
|
337
|
+
X,
|
|
338
|
+
J
|
|
339
|
+
], ne = () => [
|
|
340
|
+
"auto",
|
|
341
|
+
{ span: [
|
|
342
|
+
"full",
|
|
343
|
+
G,
|
|
344
|
+
X,
|
|
345
|
+
J
|
|
346
|
+
] },
|
|
347
|
+
G,
|
|
348
|
+
X,
|
|
349
|
+
J
|
|
350
|
+
], T = () => [
|
|
351
|
+
G,
|
|
352
|
+
"auto",
|
|
353
|
+
X,
|
|
354
|
+
J
|
|
355
|
+
], E = () => [
|
|
356
|
+
"auto",
|
|
357
|
+
"min",
|
|
358
|
+
"max",
|
|
359
|
+
"fr",
|
|
360
|
+
X,
|
|
361
|
+
J
|
|
362
|
+
], re = () => [
|
|
363
|
+
"start",
|
|
364
|
+
"end",
|
|
365
|
+
"center",
|
|
366
|
+
"between",
|
|
367
|
+
"around",
|
|
368
|
+
"evenly",
|
|
369
|
+
"stretch",
|
|
370
|
+
"baseline",
|
|
371
|
+
"center-safe",
|
|
372
|
+
"end-safe"
|
|
373
|
+
], D = () => [
|
|
374
|
+
"start",
|
|
375
|
+
"end",
|
|
376
|
+
"center",
|
|
377
|
+
"stretch",
|
|
378
|
+
"center-safe",
|
|
379
|
+
"end-safe"
|
|
380
|
+
], O = () => ["auto", ...C()], k = () => [
|
|
381
|
+
U,
|
|
382
|
+
"auto",
|
|
383
|
+
"full",
|
|
384
|
+
"dvw",
|
|
385
|
+
"dvh",
|
|
386
|
+
"lvw",
|
|
387
|
+
"lvh",
|
|
388
|
+
"svw",
|
|
389
|
+
"svh",
|
|
390
|
+
"min",
|
|
391
|
+
"max",
|
|
392
|
+
"fit",
|
|
393
|
+
...C()
|
|
394
|
+
], A = () => [
|
|
395
|
+
s,
|
|
396
|
+
U,
|
|
397
|
+
"screen",
|
|
398
|
+
"full",
|
|
399
|
+
"dvw",
|
|
400
|
+
"lvw",
|
|
401
|
+
"svw",
|
|
402
|
+
"min",
|
|
403
|
+
"max",
|
|
404
|
+
"fit",
|
|
405
|
+
...C()
|
|
406
|
+
], j = () => [
|
|
407
|
+
U,
|
|
408
|
+
"screen",
|
|
409
|
+
"full",
|
|
410
|
+
"lh",
|
|
411
|
+
"dvh",
|
|
412
|
+
"lvh",
|
|
413
|
+
"svh",
|
|
414
|
+
"min",
|
|
415
|
+
"max",
|
|
416
|
+
"fit",
|
|
417
|
+
...C()
|
|
418
|
+
], M = () => [
|
|
419
|
+
e,
|
|
420
|
+
X,
|
|
421
|
+
J
|
|
422
|
+
], ie = () => [
|
|
423
|
+
...b(),
|
|
424
|
+
Oe,
|
|
425
|
+
Ce,
|
|
426
|
+
{ position: [X, J] }
|
|
427
|
+
], ae = () => ["no-repeat", { repeat: [
|
|
428
|
+
"",
|
|
429
|
+
"x",
|
|
430
|
+
"y",
|
|
431
|
+
"space",
|
|
432
|
+
"round"
|
|
433
|
+
] }], oe = () => [
|
|
434
|
+
"auto",
|
|
435
|
+
"cover",
|
|
436
|
+
"contain",
|
|
437
|
+
ke,
|
|
438
|
+
ye,
|
|
439
|
+
{ size: [X, J] }
|
|
440
|
+
], se = () => [
|
|
441
|
+
K,
|
|
442
|
+
Ee,
|
|
443
|
+
Y
|
|
444
|
+
], N = () => [
|
|
445
|
+
"",
|
|
446
|
+
"none",
|
|
447
|
+
"full",
|
|
448
|
+
l,
|
|
449
|
+
X,
|
|
450
|
+
J
|
|
451
|
+
], P = () => [
|
|
452
|
+
"",
|
|
453
|
+
W,
|
|
454
|
+
Ee,
|
|
455
|
+
Y
|
|
456
|
+
], F = () => [
|
|
457
|
+
"solid",
|
|
458
|
+
"dashed",
|
|
459
|
+
"dotted",
|
|
460
|
+
"double"
|
|
461
|
+
], I = () => [
|
|
462
|
+
"normal",
|
|
463
|
+
"multiply",
|
|
464
|
+
"screen",
|
|
465
|
+
"overlay",
|
|
466
|
+
"darken",
|
|
467
|
+
"lighten",
|
|
468
|
+
"color-dodge",
|
|
469
|
+
"color-burn",
|
|
470
|
+
"hard-light",
|
|
471
|
+
"soft-light",
|
|
472
|
+
"difference",
|
|
473
|
+
"exclusion",
|
|
474
|
+
"hue",
|
|
475
|
+
"saturation",
|
|
476
|
+
"color",
|
|
477
|
+
"luminosity"
|
|
478
|
+
], L = () => [
|
|
479
|
+
W,
|
|
480
|
+
K,
|
|
481
|
+
Oe,
|
|
482
|
+
Ce
|
|
483
|
+
], z = () => [
|
|
484
|
+
"",
|
|
485
|
+
"none",
|
|
486
|
+
m,
|
|
487
|
+
X,
|
|
488
|
+
J
|
|
489
|
+
], B = () => [
|
|
490
|
+
"none",
|
|
491
|
+
W,
|
|
492
|
+
X,
|
|
493
|
+
J
|
|
494
|
+
], V = () => [
|
|
495
|
+
"none",
|
|
496
|
+
W,
|
|
497
|
+
X,
|
|
498
|
+
J
|
|
499
|
+
], ce = () => [
|
|
500
|
+
W,
|
|
501
|
+
X,
|
|
502
|
+
J
|
|
503
|
+
], H = () => [
|
|
504
|
+
U,
|
|
505
|
+
"full",
|
|
506
|
+
...C()
|
|
507
|
+
];
|
|
508
|
+
return {
|
|
509
|
+
cacheSize: 500,
|
|
510
|
+
theme: {
|
|
511
|
+
animate: [
|
|
512
|
+
"spin",
|
|
513
|
+
"ping",
|
|
514
|
+
"pulse",
|
|
515
|
+
"bounce"
|
|
516
|
+
],
|
|
517
|
+
aspect: ["video"],
|
|
518
|
+
blur: [q],
|
|
519
|
+
breakpoint: [q],
|
|
520
|
+
color: [fe],
|
|
521
|
+
container: [q],
|
|
522
|
+
"drop-shadow": [q],
|
|
523
|
+
ease: [
|
|
524
|
+
"in",
|
|
525
|
+
"out",
|
|
526
|
+
"in-out"
|
|
527
|
+
],
|
|
528
|
+
font: [_e],
|
|
529
|
+
"font-weight": [
|
|
530
|
+
"thin",
|
|
531
|
+
"extralight",
|
|
532
|
+
"light",
|
|
533
|
+
"normal",
|
|
534
|
+
"medium",
|
|
535
|
+
"semibold",
|
|
536
|
+
"bold",
|
|
537
|
+
"extrabold",
|
|
538
|
+
"black"
|
|
539
|
+
],
|
|
540
|
+
"inset-shadow": [q],
|
|
541
|
+
leading: [
|
|
542
|
+
"none",
|
|
543
|
+
"tight",
|
|
544
|
+
"snug",
|
|
545
|
+
"normal",
|
|
546
|
+
"relaxed",
|
|
547
|
+
"loose"
|
|
548
|
+
],
|
|
549
|
+
perspective: [
|
|
550
|
+
"dramatic",
|
|
551
|
+
"near",
|
|
552
|
+
"normal",
|
|
553
|
+
"midrange",
|
|
554
|
+
"distant",
|
|
555
|
+
"none"
|
|
556
|
+
],
|
|
557
|
+
radius: [q],
|
|
558
|
+
shadow: [q],
|
|
559
|
+
spacing: ["px", W],
|
|
560
|
+
text: [q],
|
|
561
|
+
"text-shadow": [q],
|
|
562
|
+
tracking: [
|
|
563
|
+
"tighter",
|
|
564
|
+
"tight",
|
|
565
|
+
"normal",
|
|
566
|
+
"wide",
|
|
567
|
+
"wider",
|
|
568
|
+
"widest"
|
|
569
|
+
]
|
|
570
|
+
},
|
|
571
|
+
classGroups: {
|
|
572
|
+
aspect: [{ aspect: [
|
|
573
|
+
"auto",
|
|
574
|
+
"square",
|
|
575
|
+
U,
|
|
576
|
+
J,
|
|
577
|
+
X,
|
|
578
|
+
g
|
|
579
|
+
] }],
|
|
580
|
+
container: ["container"],
|
|
581
|
+
"container-type": [{ "@container": [
|
|
582
|
+
"",
|
|
583
|
+
"normal",
|
|
584
|
+
"size",
|
|
585
|
+
X,
|
|
586
|
+
J
|
|
587
|
+
] }],
|
|
588
|
+
"container-named": [ve],
|
|
589
|
+
columns: [{ columns: [
|
|
590
|
+
W,
|
|
591
|
+
"auto",
|
|
592
|
+
J,
|
|
593
|
+
X,
|
|
594
|
+
s
|
|
595
|
+
] }],
|
|
596
|
+
"break-after": [{ "break-after": y() }],
|
|
597
|
+
"break-before": [{ "break-before": y() }],
|
|
598
|
+
"break-inside": [{ "break-inside": [
|
|
599
|
+
"auto",
|
|
600
|
+
"avoid",
|
|
601
|
+
"avoid-page",
|
|
602
|
+
"avoid-column"
|
|
603
|
+
] }],
|
|
604
|
+
"box-decoration": [{ "box-decoration": ["slice", "clone"] }],
|
|
605
|
+
box: [{ box: ["border", "content"] }],
|
|
606
|
+
display: [
|
|
607
|
+
"block",
|
|
608
|
+
"inline-block",
|
|
609
|
+
"inline",
|
|
610
|
+
"flex",
|
|
611
|
+
"inline-flex",
|
|
612
|
+
"table",
|
|
613
|
+
"inline-table",
|
|
614
|
+
"table-caption",
|
|
615
|
+
"table-cell",
|
|
616
|
+
"table-column",
|
|
617
|
+
"table-column-group",
|
|
618
|
+
"table-footer-group",
|
|
619
|
+
"table-header-group",
|
|
620
|
+
"table-row-group",
|
|
621
|
+
"table-row",
|
|
622
|
+
"flow-root",
|
|
623
|
+
"grid",
|
|
624
|
+
"inline-grid",
|
|
625
|
+
"contents",
|
|
626
|
+
"list-item",
|
|
627
|
+
"hidden"
|
|
628
|
+
],
|
|
629
|
+
sr: ["sr-only", "not-sr-only"],
|
|
630
|
+
float: [{ float: [
|
|
631
|
+
"right",
|
|
632
|
+
"left",
|
|
633
|
+
"none",
|
|
634
|
+
"start",
|
|
635
|
+
"end"
|
|
636
|
+
] }],
|
|
637
|
+
clear: [{ clear: [
|
|
638
|
+
"left",
|
|
639
|
+
"right",
|
|
640
|
+
"both",
|
|
641
|
+
"none",
|
|
642
|
+
"start",
|
|
643
|
+
"end"
|
|
644
|
+
] }],
|
|
645
|
+
isolation: ["isolate", "isolation-auto"],
|
|
646
|
+
"object-fit": [{ object: [
|
|
647
|
+
"contain",
|
|
648
|
+
"cover",
|
|
649
|
+
"fill",
|
|
650
|
+
"none",
|
|
651
|
+
"scale-down"
|
|
652
|
+
] }],
|
|
653
|
+
"object-position": [{ object: x() }],
|
|
654
|
+
overflow: [{ overflow: S() }],
|
|
655
|
+
"overflow-x": [{ "overflow-x": S() }],
|
|
656
|
+
"overflow-y": [{ "overflow-y": S() }],
|
|
657
|
+
overscroll: [{ overscroll: ee() }],
|
|
658
|
+
"overscroll-x": [{ "overscroll-x": ee() }],
|
|
659
|
+
"overscroll-y": [{ "overscroll-y": ee() }],
|
|
660
|
+
position: [
|
|
661
|
+
"static",
|
|
662
|
+
"fixed",
|
|
663
|
+
"absolute",
|
|
664
|
+
"relative",
|
|
665
|
+
"sticky"
|
|
666
|
+
],
|
|
667
|
+
inset: [{ inset: w() }],
|
|
668
|
+
"inset-x": [{ "inset-x": w() }],
|
|
669
|
+
"inset-y": [{ "inset-y": w() }],
|
|
670
|
+
start: [{
|
|
671
|
+
"inset-s": w(),
|
|
672
|
+
start: w()
|
|
673
|
+
}],
|
|
674
|
+
end: [{
|
|
675
|
+
"inset-e": w(),
|
|
676
|
+
end: w()
|
|
677
|
+
}],
|
|
678
|
+
"inset-bs": [{ "inset-bs": w() }],
|
|
679
|
+
"inset-be": [{ "inset-be": w() }],
|
|
680
|
+
top: [{ top: w() }],
|
|
681
|
+
right: [{ right: w() }],
|
|
682
|
+
bottom: [{ bottom: w() }],
|
|
683
|
+
left: [{ left: w() }],
|
|
684
|
+
visibility: [
|
|
685
|
+
"visible",
|
|
686
|
+
"invisible",
|
|
687
|
+
"collapse"
|
|
688
|
+
],
|
|
689
|
+
z: [{ z: [
|
|
690
|
+
G,
|
|
691
|
+
"auto",
|
|
692
|
+
X,
|
|
693
|
+
J
|
|
694
|
+
] }],
|
|
695
|
+
basis: [{ basis: [
|
|
696
|
+
U,
|
|
697
|
+
"full",
|
|
698
|
+
"auto",
|
|
699
|
+
s,
|
|
700
|
+
...C()
|
|
701
|
+
] }],
|
|
702
|
+
"flex-direction": [{ flex: [
|
|
703
|
+
"row",
|
|
704
|
+
"row-reverse",
|
|
705
|
+
"col",
|
|
706
|
+
"col-reverse"
|
|
707
|
+
] }],
|
|
708
|
+
"flex-wrap": [{ flex: [
|
|
709
|
+
"nowrap",
|
|
710
|
+
"wrap",
|
|
711
|
+
"wrap-reverse"
|
|
712
|
+
] }],
|
|
713
|
+
flex: [{ flex: [
|
|
714
|
+
W,
|
|
715
|
+
U,
|
|
716
|
+
"auto",
|
|
717
|
+
"initial",
|
|
718
|
+
"none",
|
|
719
|
+
J
|
|
720
|
+
] }],
|
|
721
|
+
grow: [{ grow: [
|
|
722
|
+
"",
|
|
723
|
+
W,
|
|
724
|
+
X,
|
|
725
|
+
J
|
|
726
|
+
] }],
|
|
727
|
+
shrink: [{ shrink: [
|
|
728
|
+
"",
|
|
729
|
+
W,
|
|
730
|
+
X,
|
|
731
|
+
J
|
|
732
|
+
] }],
|
|
733
|
+
order: [{ order: [
|
|
734
|
+
G,
|
|
735
|
+
"first",
|
|
736
|
+
"last",
|
|
737
|
+
"none",
|
|
738
|
+
X,
|
|
739
|
+
J
|
|
740
|
+
] }],
|
|
741
|
+
"grid-cols": [{ "grid-cols": te() }],
|
|
742
|
+
"col-start-end": [{ col: ne() }],
|
|
743
|
+
"col-start": [{ "col-start": T() }],
|
|
744
|
+
"col-end": [{ "col-end": T() }],
|
|
745
|
+
"grid-rows": [{ "grid-rows": te() }],
|
|
746
|
+
"row-start-end": [{ row: ne() }],
|
|
747
|
+
"row-start": [{ "row-start": T() }],
|
|
748
|
+
"row-end": [{ "row-end": T() }],
|
|
749
|
+
"grid-flow": [{ "grid-flow": [
|
|
750
|
+
"row",
|
|
751
|
+
"col",
|
|
752
|
+
"dense",
|
|
753
|
+
"row-dense",
|
|
754
|
+
"col-dense"
|
|
755
|
+
] }],
|
|
756
|
+
"auto-cols": [{ "auto-cols": E() }],
|
|
757
|
+
"auto-rows": [{ "auto-rows": E() }],
|
|
758
|
+
gap: [{ gap: C() }],
|
|
759
|
+
"gap-x": [{ "gap-x": C() }],
|
|
760
|
+
"gap-y": [{ "gap-y": C() }],
|
|
761
|
+
"justify-content": [{ justify: [...re(), "normal"] }],
|
|
762
|
+
"justify-items": [{ "justify-items": [...D(), "normal"] }],
|
|
763
|
+
"justify-self": [{ "justify-self": ["auto", ...D()] }],
|
|
764
|
+
"align-content": [{ content: ["normal", ...re()] }],
|
|
765
|
+
"align-items": [{ items: [...D(), { baseline: ["", "last"] }] }],
|
|
766
|
+
"align-self": [{ self: [
|
|
767
|
+
"auto",
|
|
768
|
+
...D(),
|
|
769
|
+
{ baseline: ["", "last"] }
|
|
770
|
+
] }],
|
|
771
|
+
"place-content": [{ "place-content": re() }],
|
|
772
|
+
"place-items": [{ "place-items": [...D(), "baseline"] }],
|
|
773
|
+
"place-self": [{ "place-self": ["auto", ...D()] }],
|
|
774
|
+
p: [{ p: C() }],
|
|
775
|
+
px: [{ px: C() }],
|
|
776
|
+
py: [{ py: C() }],
|
|
777
|
+
ps: [{ ps: C() }],
|
|
778
|
+
pe: [{ pe: C() }],
|
|
779
|
+
pbs: [{ pbs: C() }],
|
|
780
|
+
pbe: [{ pbe: C() }],
|
|
781
|
+
pt: [{ pt: C() }],
|
|
782
|
+
pr: [{ pr: C() }],
|
|
783
|
+
pb: [{ pb: C() }],
|
|
784
|
+
pl: [{ pl: C() }],
|
|
785
|
+
m: [{ m: O() }],
|
|
786
|
+
mx: [{ mx: O() }],
|
|
787
|
+
my: [{ my: O() }],
|
|
788
|
+
ms: [{ ms: O() }],
|
|
789
|
+
me: [{ me: O() }],
|
|
790
|
+
mbs: [{ mbs: O() }],
|
|
791
|
+
mbe: [{ mbe: O() }],
|
|
792
|
+
mt: [{ mt: O() }],
|
|
793
|
+
mr: [{ mr: O() }],
|
|
794
|
+
mb: [{ mb: O() }],
|
|
795
|
+
ml: [{ ml: O() }],
|
|
796
|
+
"space-x": [{ "space-x": C() }],
|
|
797
|
+
"space-x-reverse": ["space-x-reverse"],
|
|
798
|
+
"space-y": [{ "space-y": C() }],
|
|
799
|
+
"space-y-reverse": ["space-y-reverse"],
|
|
800
|
+
size: [{ size: k() }],
|
|
801
|
+
"inline-size": [{ inline: ["auto", ...A()] }],
|
|
802
|
+
"min-inline-size": [{ "min-inline": ["auto", ...A()] }],
|
|
803
|
+
"max-inline-size": [{ "max-inline": ["none", ...A()] }],
|
|
804
|
+
"block-size": [{ block: ["auto", ...j()] }],
|
|
805
|
+
"min-block-size": [{ "min-block": ["auto", ...j()] }],
|
|
806
|
+
"max-block-size": [{ "max-block": ["none", ...j()] }],
|
|
807
|
+
w: [{ w: [
|
|
808
|
+
s,
|
|
809
|
+
"screen",
|
|
810
|
+
...k()
|
|
811
|
+
] }],
|
|
812
|
+
"min-w": [{ "min-w": [
|
|
813
|
+
s,
|
|
814
|
+
"screen",
|
|
815
|
+
"none",
|
|
816
|
+
...k()
|
|
817
|
+
] }],
|
|
818
|
+
"max-w": [{ "max-w": [
|
|
819
|
+
s,
|
|
820
|
+
"screen",
|
|
821
|
+
"none",
|
|
822
|
+
"prose",
|
|
823
|
+
{ screen: [o] },
|
|
824
|
+
...k()
|
|
825
|
+
] }],
|
|
826
|
+
h: [{ h: [
|
|
827
|
+
"screen",
|
|
828
|
+
"lh",
|
|
829
|
+
...k()
|
|
830
|
+
] }],
|
|
831
|
+
"min-h": [{ "min-h": [
|
|
832
|
+
"screen",
|
|
833
|
+
"lh",
|
|
834
|
+
"none",
|
|
835
|
+
...k()
|
|
836
|
+
] }],
|
|
837
|
+
"max-h": [{ "max-h": [
|
|
838
|
+
"screen",
|
|
839
|
+
"lh",
|
|
840
|
+
"none",
|
|
841
|
+
...k()
|
|
842
|
+
] }],
|
|
843
|
+
"font-size": [{ text: [
|
|
844
|
+
"base",
|
|
845
|
+
n,
|
|
846
|
+
Ee,
|
|
847
|
+
Y
|
|
848
|
+
] }],
|
|
849
|
+
"font-smoothing": ["antialiased", "subpixel-antialiased"],
|
|
850
|
+
"font-style": ["italic", "not-italic"],
|
|
851
|
+
"font-weight": [{ font: [
|
|
852
|
+
r,
|
|
853
|
+
Me,
|
|
854
|
+
xe
|
|
855
|
+
] }],
|
|
856
|
+
"font-stretch": [{ "font-stretch": [
|
|
857
|
+
"ultra-condensed",
|
|
858
|
+
"extra-condensed",
|
|
859
|
+
"condensed",
|
|
860
|
+
"semi-condensed",
|
|
861
|
+
"normal",
|
|
862
|
+
"semi-expanded",
|
|
863
|
+
"expanded",
|
|
864
|
+
"extra-expanded",
|
|
865
|
+
"ultra-expanded",
|
|
866
|
+
K,
|
|
867
|
+
J
|
|
868
|
+
] }],
|
|
869
|
+
"font-family": [{ font: [
|
|
870
|
+
De,
|
|
871
|
+
Se,
|
|
872
|
+
t
|
|
873
|
+
] }],
|
|
874
|
+
"font-features": [{ "font-features": [J] }],
|
|
875
|
+
"fvn-normal": ["normal-nums"],
|
|
876
|
+
"fvn-ordinal": ["ordinal"],
|
|
877
|
+
"fvn-slashed-zero": ["slashed-zero"],
|
|
878
|
+
"fvn-figure": ["lining-nums", "oldstyle-nums"],
|
|
879
|
+
"fvn-spacing": ["proportional-nums", "tabular-nums"],
|
|
880
|
+
"fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
|
|
881
|
+
tracking: [{ tracking: [
|
|
882
|
+
i,
|
|
883
|
+
X,
|
|
884
|
+
J
|
|
885
|
+
] }],
|
|
886
|
+
"line-clamp": [{ "line-clamp": [
|
|
887
|
+
W,
|
|
888
|
+
"none",
|
|
889
|
+
X,
|
|
890
|
+
be
|
|
891
|
+
] }],
|
|
892
|
+
leading: [{ leading: [
|
|
893
|
+
"none",
|
|
894
|
+
a,
|
|
895
|
+
...C()
|
|
896
|
+
] }],
|
|
897
|
+
"list-image": [{ "list-image": [
|
|
898
|
+
"none",
|
|
899
|
+
X,
|
|
900
|
+
J
|
|
901
|
+
] }],
|
|
902
|
+
"list-style-position": [{ list: ["inside", "outside"] }],
|
|
903
|
+
"list-style-type": [{ list: [
|
|
904
|
+
"disc",
|
|
905
|
+
"decimal",
|
|
906
|
+
"none",
|
|
907
|
+
X,
|
|
908
|
+
J
|
|
909
|
+
] }],
|
|
910
|
+
"text-alignment": [{ text: [
|
|
911
|
+
"left",
|
|
912
|
+
"center",
|
|
913
|
+
"right",
|
|
914
|
+
"justify",
|
|
915
|
+
"start",
|
|
916
|
+
"end"
|
|
917
|
+
] }],
|
|
918
|
+
"placeholder-color": [{ placeholder: M() }],
|
|
919
|
+
"text-color": [{ text: M() }],
|
|
920
|
+
"text-decoration": [
|
|
921
|
+
"underline",
|
|
922
|
+
"overline",
|
|
923
|
+
"line-through",
|
|
924
|
+
"no-underline"
|
|
925
|
+
],
|
|
926
|
+
"text-decoration-style": [{ decoration: [...F(), "wavy"] }],
|
|
927
|
+
"text-decoration-thickness": [{ decoration: [
|
|
928
|
+
W,
|
|
929
|
+
"from-font",
|
|
930
|
+
"auto",
|
|
931
|
+
X,
|
|
932
|
+
Y
|
|
933
|
+
] }],
|
|
934
|
+
"text-decoration-color": [{ decoration: M() }],
|
|
935
|
+
"underline-offset": [{ "underline-offset": [
|
|
936
|
+
W,
|
|
937
|
+
"auto",
|
|
938
|
+
X,
|
|
939
|
+
J
|
|
940
|
+
] }],
|
|
941
|
+
"text-transform": [
|
|
942
|
+
"uppercase",
|
|
943
|
+
"lowercase",
|
|
944
|
+
"capitalize",
|
|
945
|
+
"normal-case"
|
|
946
|
+
],
|
|
947
|
+
"text-overflow": [
|
|
948
|
+
"truncate",
|
|
949
|
+
"text-ellipsis",
|
|
950
|
+
"text-clip"
|
|
951
|
+
],
|
|
952
|
+
"text-wrap": [{ text: [
|
|
953
|
+
"wrap",
|
|
954
|
+
"nowrap",
|
|
955
|
+
"balance",
|
|
956
|
+
"pretty"
|
|
957
|
+
] }],
|
|
958
|
+
indent: [{ indent: C() }],
|
|
959
|
+
"tab-size": [{ tab: [
|
|
960
|
+
G,
|
|
961
|
+
X,
|
|
962
|
+
J
|
|
963
|
+
] }],
|
|
964
|
+
"vertical-align": [{ align: [
|
|
965
|
+
"baseline",
|
|
966
|
+
"top",
|
|
967
|
+
"middle",
|
|
968
|
+
"bottom",
|
|
969
|
+
"text-top",
|
|
970
|
+
"text-bottom",
|
|
971
|
+
"sub",
|
|
972
|
+
"super",
|
|
973
|
+
X,
|
|
974
|
+
J
|
|
975
|
+
] }],
|
|
976
|
+
whitespace: [{ whitespace: [
|
|
977
|
+
"normal",
|
|
978
|
+
"nowrap",
|
|
979
|
+
"pre",
|
|
980
|
+
"pre-line",
|
|
981
|
+
"pre-wrap",
|
|
982
|
+
"break-spaces"
|
|
983
|
+
] }],
|
|
984
|
+
break: [{ break: [
|
|
985
|
+
"normal",
|
|
986
|
+
"words",
|
|
987
|
+
"all",
|
|
988
|
+
"keep"
|
|
989
|
+
] }],
|
|
990
|
+
wrap: [{ wrap: [
|
|
991
|
+
"break-word",
|
|
992
|
+
"anywhere",
|
|
993
|
+
"normal"
|
|
994
|
+
] }],
|
|
995
|
+
hyphens: [{ hyphens: [
|
|
996
|
+
"none",
|
|
997
|
+
"manual",
|
|
998
|
+
"auto"
|
|
999
|
+
] }],
|
|
1000
|
+
content: [{ content: [
|
|
1001
|
+
"none",
|
|
1002
|
+
X,
|
|
1003
|
+
J
|
|
1004
|
+
] }],
|
|
1005
|
+
"bg-attachment": [{ bg: [
|
|
1006
|
+
"fixed",
|
|
1007
|
+
"local",
|
|
1008
|
+
"scroll"
|
|
1009
|
+
] }],
|
|
1010
|
+
"bg-clip": [{ "bg-clip": [
|
|
1011
|
+
"border",
|
|
1012
|
+
"padding",
|
|
1013
|
+
"content",
|
|
1014
|
+
"text"
|
|
1015
|
+
] }],
|
|
1016
|
+
"bg-origin": [{ "bg-origin": [
|
|
1017
|
+
"border",
|
|
1018
|
+
"padding",
|
|
1019
|
+
"content"
|
|
1020
|
+
] }],
|
|
1021
|
+
"bg-position": [{ bg: ie() }],
|
|
1022
|
+
"bg-repeat": [{ bg: ae() }],
|
|
1023
|
+
"bg-size": [{ bg: oe() }],
|
|
1024
|
+
"bg-image": [{ bg: [
|
|
1025
|
+
"none",
|
|
1026
|
+
{
|
|
1027
|
+
linear: [
|
|
1028
|
+
{ to: [
|
|
1029
|
+
"t",
|
|
1030
|
+
"tr",
|
|
1031
|
+
"r",
|
|
1032
|
+
"br",
|
|
1033
|
+
"b",
|
|
1034
|
+
"bl",
|
|
1035
|
+
"l",
|
|
1036
|
+
"tl"
|
|
1037
|
+
] },
|
|
1038
|
+
G,
|
|
1039
|
+
X,
|
|
1040
|
+
J
|
|
1041
|
+
],
|
|
1042
|
+
radial: [
|
|
1043
|
+
"",
|
|
1044
|
+
X,
|
|
1045
|
+
J
|
|
1046
|
+
],
|
|
1047
|
+
conic: [
|
|
1048
|
+
"",
|
|
1049
|
+
G,
|
|
1050
|
+
X,
|
|
1051
|
+
J
|
|
1052
|
+
]
|
|
1053
|
+
},
|
|
1054
|
+
Ae,
|
|
1055
|
+
we
|
|
1056
|
+
] }],
|
|
1057
|
+
"bg-color": [{ bg: M() }],
|
|
1058
|
+
"gradient-from-pos": [{ from: se() }],
|
|
1059
|
+
"gradient-via-pos": [{ via: se() }],
|
|
1060
|
+
"gradient-to-pos": [{ to: se() }],
|
|
1061
|
+
"gradient-from": [{ from: M() }],
|
|
1062
|
+
"gradient-via": [{ via: M() }],
|
|
1063
|
+
"gradient-to": [{ to: M() }],
|
|
1064
|
+
rounded: [{ rounded: N() }],
|
|
1065
|
+
"rounded-s": [{ "rounded-s": N() }],
|
|
1066
|
+
"rounded-e": [{ "rounded-e": N() }],
|
|
1067
|
+
"rounded-t": [{ "rounded-t": N() }],
|
|
1068
|
+
"rounded-r": [{ "rounded-r": N() }],
|
|
1069
|
+
"rounded-b": [{ "rounded-b": N() }],
|
|
1070
|
+
"rounded-l": [{ "rounded-l": N() }],
|
|
1071
|
+
"rounded-ss": [{ "rounded-ss": N() }],
|
|
1072
|
+
"rounded-se": [{ "rounded-se": N() }],
|
|
1073
|
+
"rounded-ee": [{ "rounded-ee": N() }],
|
|
1074
|
+
"rounded-es": [{ "rounded-es": N() }],
|
|
1075
|
+
"rounded-tl": [{ "rounded-tl": N() }],
|
|
1076
|
+
"rounded-tr": [{ "rounded-tr": N() }],
|
|
1077
|
+
"rounded-br": [{ "rounded-br": N() }],
|
|
1078
|
+
"rounded-bl": [{ "rounded-bl": N() }],
|
|
1079
|
+
"border-w": [{ border: P() }],
|
|
1080
|
+
"border-w-x": [{ "border-x": P() }],
|
|
1081
|
+
"border-w-y": [{ "border-y": P() }],
|
|
1082
|
+
"border-w-s": [{ "border-s": P() }],
|
|
1083
|
+
"border-w-e": [{ "border-e": P() }],
|
|
1084
|
+
"border-w-bs": [{ "border-bs": P() }],
|
|
1085
|
+
"border-w-be": [{ "border-be": P() }],
|
|
1086
|
+
"border-w-t": [{ "border-t": P() }],
|
|
1087
|
+
"border-w-r": [{ "border-r": P() }],
|
|
1088
|
+
"border-w-b": [{ "border-b": P() }],
|
|
1089
|
+
"border-w-l": [{ "border-l": P() }],
|
|
1090
|
+
"divide-x": [{ "divide-x": P() }],
|
|
1091
|
+
"divide-x-reverse": ["divide-x-reverse"],
|
|
1092
|
+
"divide-y": [{ "divide-y": P() }],
|
|
1093
|
+
"divide-y-reverse": ["divide-y-reverse"],
|
|
1094
|
+
"border-style": [{ border: [
|
|
1095
|
+
...F(),
|
|
1096
|
+
"hidden",
|
|
1097
|
+
"none"
|
|
1098
|
+
] }],
|
|
1099
|
+
"divide-style": [{ divide: [
|
|
1100
|
+
...F(),
|
|
1101
|
+
"hidden",
|
|
1102
|
+
"none"
|
|
1103
|
+
] }],
|
|
1104
|
+
"border-color": [{ border: M() }],
|
|
1105
|
+
"border-color-x": [{ "border-x": M() }],
|
|
1106
|
+
"border-color-y": [{ "border-y": M() }],
|
|
1107
|
+
"border-color-s": [{ "border-s": M() }],
|
|
1108
|
+
"border-color-e": [{ "border-e": M() }],
|
|
1109
|
+
"border-color-bs": [{ "border-bs": M() }],
|
|
1110
|
+
"border-color-be": [{ "border-be": M() }],
|
|
1111
|
+
"border-color-t": [{ "border-t": M() }],
|
|
1112
|
+
"border-color-r": [{ "border-r": M() }],
|
|
1113
|
+
"border-color-b": [{ "border-b": M() }],
|
|
1114
|
+
"border-color-l": [{ "border-l": M() }],
|
|
1115
|
+
"divide-color": [{ divide: M() }],
|
|
1116
|
+
"outline-style": [{ outline: [
|
|
1117
|
+
...F(),
|
|
1118
|
+
"none",
|
|
1119
|
+
"hidden"
|
|
1120
|
+
] }],
|
|
1121
|
+
"outline-offset": [{ "outline-offset": [
|
|
1122
|
+
W,
|
|
1123
|
+
X,
|
|
1124
|
+
J
|
|
1125
|
+
] }],
|
|
1126
|
+
"outline-w": [{ outline: [
|
|
1127
|
+
"",
|
|
1128
|
+
W,
|
|
1129
|
+
Ee,
|
|
1130
|
+
Y
|
|
1131
|
+
] }],
|
|
1132
|
+
"outline-color": [{ outline: M() }],
|
|
1133
|
+
shadow: [{ shadow: [
|
|
1134
|
+
"",
|
|
1135
|
+
"inner",
|
|
1136
|
+
"none",
|
|
1137
|
+
u,
|
|
1138
|
+
je,
|
|
1139
|
+
Te
|
|
1140
|
+
] }],
|
|
1141
|
+
"shadow-color": [{ shadow: M() }],
|
|
1142
|
+
"inset-shadow": [{ "inset-shadow": [
|
|
1143
|
+
"none",
|
|
1144
|
+
d,
|
|
1145
|
+
je,
|
|
1146
|
+
Te
|
|
1147
|
+
] }],
|
|
1148
|
+
"inset-shadow-color": [{ "inset-shadow": M() }],
|
|
1149
|
+
"ring-w": [{ ring: P() }],
|
|
1150
|
+
"ring-w-inset": ["ring-inset"],
|
|
1151
|
+
"ring-color": [{ ring: M() }],
|
|
1152
|
+
"ring-offset-w": [{ "ring-offset": [W, Y] }],
|
|
1153
|
+
"ring-offset-color": [{ "ring-offset": M() }],
|
|
1154
|
+
"inset-ring-w": [{ "inset-ring": P() }],
|
|
1155
|
+
"inset-ring-color": [{ "inset-ring": M() }],
|
|
1156
|
+
"text-shadow": [{ "text-shadow": [
|
|
1157
|
+
"none",
|
|
1158
|
+
f,
|
|
1159
|
+
je,
|
|
1160
|
+
Te
|
|
1161
|
+
] }],
|
|
1162
|
+
"text-shadow-color": [{ "text-shadow": M() }],
|
|
1163
|
+
opacity: [{ opacity: [
|
|
1164
|
+
W,
|
|
1165
|
+
X,
|
|
1166
|
+
J
|
|
1167
|
+
] }],
|
|
1168
|
+
"mix-blend": [{ "mix-blend": [
|
|
1169
|
+
...I(),
|
|
1170
|
+
"plus-darker",
|
|
1171
|
+
"plus-lighter"
|
|
1172
|
+
] }],
|
|
1173
|
+
"bg-blend": [{ "bg-blend": I() }],
|
|
1174
|
+
"mask-clip": [{ "mask-clip": [
|
|
1175
|
+
"border",
|
|
1176
|
+
"padding",
|
|
1177
|
+
"content",
|
|
1178
|
+
"fill",
|
|
1179
|
+
"stroke",
|
|
1180
|
+
"view"
|
|
1181
|
+
] }, "mask-no-clip"],
|
|
1182
|
+
"mask-composite": [{ mask: [
|
|
1183
|
+
"add",
|
|
1184
|
+
"subtract",
|
|
1185
|
+
"intersect",
|
|
1186
|
+
"exclude"
|
|
1187
|
+
] }],
|
|
1188
|
+
"mask-image-linear-pos": [{ "mask-linear": [W] }],
|
|
1189
|
+
"mask-image-linear-from-pos": [{ "mask-linear-from": L() }],
|
|
1190
|
+
"mask-image-linear-to-pos": [{ "mask-linear-to": L() }],
|
|
1191
|
+
"mask-image-linear-from-color": [{ "mask-linear-from": M() }],
|
|
1192
|
+
"mask-image-linear-to-color": [{ "mask-linear-to": M() }],
|
|
1193
|
+
"mask-image-t-from-pos": [{ "mask-t-from": L() }],
|
|
1194
|
+
"mask-image-t-to-pos": [{ "mask-t-to": L() }],
|
|
1195
|
+
"mask-image-t-from-color": [{ "mask-t-from": M() }],
|
|
1196
|
+
"mask-image-t-to-color": [{ "mask-t-to": M() }],
|
|
1197
|
+
"mask-image-r-from-pos": [{ "mask-r-from": L() }],
|
|
1198
|
+
"mask-image-r-to-pos": [{ "mask-r-to": L() }],
|
|
1199
|
+
"mask-image-r-from-color": [{ "mask-r-from": M() }],
|
|
1200
|
+
"mask-image-r-to-color": [{ "mask-r-to": M() }],
|
|
1201
|
+
"mask-image-b-from-pos": [{ "mask-b-from": L() }],
|
|
1202
|
+
"mask-image-b-to-pos": [{ "mask-b-to": L() }],
|
|
1203
|
+
"mask-image-b-from-color": [{ "mask-b-from": M() }],
|
|
1204
|
+
"mask-image-b-to-color": [{ "mask-b-to": M() }],
|
|
1205
|
+
"mask-image-l-from-pos": [{ "mask-l-from": L() }],
|
|
1206
|
+
"mask-image-l-to-pos": [{ "mask-l-to": L() }],
|
|
1207
|
+
"mask-image-l-from-color": [{ "mask-l-from": M() }],
|
|
1208
|
+
"mask-image-l-to-color": [{ "mask-l-to": M() }],
|
|
1209
|
+
"mask-image-x-from-pos": [{ "mask-x-from": L() }],
|
|
1210
|
+
"mask-image-x-to-pos": [{ "mask-x-to": L() }],
|
|
1211
|
+
"mask-image-x-from-color": [{ "mask-x-from": M() }],
|
|
1212
|
+
"mask-image-x-to-color": [{ "mask-x-to": M() }],
|
|
1213
|
+
"mask-image-y-from-pos": [{ "mask-y-from": L() }],
|
|
1214
|
+
"mask-image-y-to-pos": [{ "mask-y-to": L() }],
|
|
1215
|
+
"mask-image-y-from-color": [{ "mask-y-from": M() }],
|
|
1216
|
+
"mask-image-y-to-color": [{ "mask-y-to": M() }],
|
|
1217
|
+
"mask-image-radial": [{ "mask-radial": [X, J] }],
|
|
1218
|
+
"mask-image-radial-from-pos": [{ "mask-radial-from": L() }],
|
|
1219
|
+
"mask-image-radial-to-pos": [{ "mask-radial-to": L() }],
|
|
1220
|
+
"mask-image-radial-from-color": [{ "mask-radial-from": M() }],
|
|
1221
|
+
"mask-image-radial-to-color": [{ "mask-radial-to": M() }],
|
|
1222
|
+
"mask-image-radial-shape": [{ "mask-radial": ["circle", "ellipse"] }],
|
|
1223
|
+
"mask-image-radial-size": [{ "mask-radial": [{
|
|
1224
|
+
closest: ["side", "corner"],
|
|
1225
|
+
farthest: ["side", "corner"]
|
|
1226
|
+
}] }],
|
|
1227
|
+
"mask-image-radial-pos": [{ "mask-radial-at": b() }],
|
|
1228
|
+
"mask-image-conic-pos": [{ "mask-conic": [W] }],
|
|
1229
|
+
"mask-image-conic-from-pos": [{ "mask-conic-from": L() }],
|
|
1230
|
+
"mask-image-conic-to-pos": [{ "mask-conic-to": L() }],
|
|
1231
|
+
"mask-image-conic-from-color": [{ "mask-conic-from": M() }],
|
|
1232
|
+
"mask-image-conic-to-color": [{ "mask-conic-to": M() }],
|
|
1233
|
+
"mask-mode": [{ mask: [
|
|
1234
|
+
"alpha",
|
|
1235
|
+
"luminance",
|
|
1236
|
+
"match"
|
|
1237
|
+
] }],
|
|
1238
|
+
"mask-origin": [{ "mask-origin": [
|
|
1239
|
+
"border",
|
|
1240
|
+
"padding",
|
|
1241
|
+
"content",
|
|
1242
|
+
"fill",
|
|
1243
|
+
"stroke",
|
|
1244
|
+
"view"
|
|
1245
|
+
] }],
|
|
1246
|
+
"mask-position": [{ mask: ie() }],
|
|
1247
|
+
"mask-repeat": [{ mask: ae() }],
|
|
1248
|
+
"mask-size": [{ mask: oe() }],
|
|
1249
|
+
"mask-type": [{ "mask-type": ["alpha", "luminance"] }],
|
|
1250
|
+
"mask-image": [{ mask: [
|
|
1251
|
+
"none",
|
|
1252
|
+
X,
|
|
1253
|
+
J
|
|
1254
|
+
] }],
|
|
1255
|
+
filter: [{ filter: [
|
|
1256
|
+
"",
|
|
1257
|
+
"none",
|
|
1258
|
+
X,
|
|
1259
|
+
J
|
|
1260
|
+
] }],
|
|
1261
|
+
blur: [{ blur: z() }],
|
|
1262
|
+
brightness: [{ brightness: [
|
|
1263
|
+
W,
|
|
1264
|
+
X,
|
|
1265
|
+
J
|
|
1266
|
+
] }],
|
|
1267
|
+
contrast: [{ contrast: [
|
|
1268
|
+
W,
|
|
1269
|
+
X,
|
|
1270
|
+
J
|
|
1271
|
+
] }],
|
|
1272
|
+
"drop-shadow": [{ "drop-shadow": [
|
|
1273
|
+
"",
|
|
1274
|
+
"none",
|
|
1275
|
+
p,
|
|
1276
|
+
je,
|
|
1277
|
+
Te
|
|
1278
|
+
] }],
|
|
1279
|
+
"drop-shadow-color": [{ "drop-shadow": M() }],
|
|
1280
|
+
grayscale: [{ grayscale: [
|
|
1281
|
+
"",
|
|
1282
|
+
W,
|
|
1283
|
+
X,
|
|
1284
|
+
J
|
|
1285
|
+
] }],
|
|
1286
|
+
"hue-rotate": [{ "hue-rotate": [
|
|
1287
|
+
W,
|
|
1288
|
+
X,
|
|
1289
|
+
J
|
|
1290
|
+
] }],
|
|
1291
|
+
invert: [{ invert: [
|
|
1292
|
+
"",
|
|
1293
|
+
W,
|
|
1294
|
+
X,
|
|
1295
|
+
J
|
|
1296
|
+
] }],
|
|
1297
|
+
saturate: [{ saturate: [
|
|
1298
|
+
W,
|
|
1299
|
+
X,
|
|
1300
|
+
J
|
|
1301
|
+
] }],
|
|
1302
|
+
sepia: [{ sepia: [
|
|
1303
|
+
"",
|
|
1304
|
+
W,
|
|
1305
|
+
X,
|
|
1306
|
+
J
|
|
1307
|
+
] }],
|
|
1308
|
+
"backdrop-filter": [{ "backdrop-filter": [
|
|
1309
|
+
"",
|
|
1310
|
+
"none",
|
|
1311
|
+
X,
|
|
1312
|
+
J
|
|
1313
|
+
] }],
|
|
1314
|
+
"backdrop-blur": [{ "backdrop-blur": z() }],
|
|
1315
|
+
"backdrop-brightness": [{ "backdrop-brightness": [
|
|
1316
|
+
W,
|
|
1317
|
+
X,
|
|
1318
|
+
J
|
|
1319
|
+
] }],
|
|
1320
|
+
"backdrop-contrast": [{ "backdrop-contrast": [
|
|
1321
|
+
W,
|
|
1322
|
+
X,
|
|
1323
|
+
J
|
|
1324
|
+
] }],
|
|
1325
|
+
"backdrop-grayscale": [{ "backdrop-grayscale": [
|
|
1326
|
+
"",
|
|
1327
|
+
W,
|
|
1328
|
+
X,
|
|
1329
|
+
J
|
|
1330
|
+
] }],
|
|
1331
|
+
"backdrop-hue-rotate": [{ "backdrop-hue-rotate": [
|
|
1332
|
+
W,
|
|
1333
|
+
X,
|
|
1334
|
+
J
|
|
1335
|
+
] }],
|
|
1336
|
+
"backdrop-invert": [{ "backdrop-invert": [
|
|
1337
|
+
"",
|
|
1338
|
+
W,
|
|
1339
|
+
X,
|
|
1340
|
+
J
|
|
1341
|
+
] }],
|
|
1342
|
+
"backdrop-opacity": [{ "backdrop-opacity": [
|
|
1343
|
+
W,
|
|
1344
|
+
X,
|
|
1345
|
+
J
|
|
1346
|
+
] }],
|
|
1347
|
+
"backdrop-saturate": [{ "backdrop-saturate": [
|
|
1348
|
+
W,
|
|
1349
|
+
X,
|
|
1350
|
+
J
|
|
1351
|
+
] }],
|
|
1352
|
+
"backdrop-sepia": [{ "backdrop-sepia": [
|
|
1353
|
+
"",
|
|
1354
|
+
W,
|
|
1355
|
+
X,
|
|
1356
|
+
J
|
|
1357
|
+
] }],
|
|
1358
|
+
"border-collapse": [{ border: ["collapse", "separate"] }],
|
|
1359
|
+
"border-spacing": [{ "border-spacing": C() }],
|
|
1360
|
+
"border-spacing-x": [{ "border-spacing-x": C() }],
|
|
1361
|
+
"border-spacing-y": [{ "border-spacing-y": C() }],
|
|
1362
|
+
"table-layout": [{ table: ["auto", "fixed"] }],
|
|
1363
|
+
caption: [{ caption: ["top", "bottom"] }],
|
|
1364
|
+
transition: [{ transition: [
|
|
1365
|
+
"",
|
|
1366
|
+
"all",
|
|
1367
|
+
"colors",
|
|
1368
|
+
"opacity",
|
|
1369
|
+
"shadow",
|
|
1370
|
+
"transform",
|
|
1371
|
+
"none",
|
|
1372
|
+
X,
|
|
1373
|
+
J
|
|
1374
|
+
] }],
|
|
1375
|
+
"transition-behavior": [{ transition: ["normal", "discrete"] }],
|
|
1376
|
+
duration: [{ duration: [
|
|
1377
|
+
W,
|
|
1378
|
+
"initial",
|
|
1379
|
+
X,
|
|
1380
|
+
J
|
|
1381
|
+
] }],
|
|
1382
|
+
ease: [{ ease: [
|
|
1383
|
+
"linear",
|
|
1384
|
+
"initial",
|
|
1385
|
+
_,
|
|
1386
|
+
X,
|
|
1387
|
+
J
|
|
1388
|
+
] }],
|
|
1389
|
+
delay: [{ delay: [
|
|
1390
|
+
W,
|
|
1391
|
+
X,
|
|
1392
|
+
J
|
|
1393
|
+
] }],
|
|
1394
|
+
animate: [{ animate: [
|
|
1395
|
+
"none",
|
|
1396
|
+
v,
|
|
1397
|
+
X,
|
|
1398
|
+
J
|
|
1399
|
+
] }],
|
|
1400
|
+
backface: [{ backface: ["hidden", "visible"] }],
|
|
1401
|
+
perspective: [{ perspective: [
|
|
1402
|
+
h,
|
|
1403
|
+
X,
|
|
1404
|
+
J
|
|
1405
|
+
] }],
|
|
1406
|
+
"perspective-origin": [{ "perspective-origin": x() }],
|
|
1407
|
+
rotate: [{ rotate: B() }],
|
|
1408
|
+
"rotate-x": [{ "rotate-x": B() }],
|
|
1409
|
+
"rotate-y": [{ "rotate-y": B() }],
|
|
1410
|
+
"rotate-z": [{ "rotate-z": B() }],
|
|
1411
|
+
scale: [{ scale: V() }],
|
|
1412
|
+
"scale-x": [{ "scale-x": V() }],
|
|
1413
|
+
"scale-y": [{ "scale-y": V() }],
|
|
1414
|
+
"scale-z": [{ "scale-z": V() }],
|
|
1415
|
+
"scale-3d": ["scale-3d"],
|
|
1416
|
+
skew: [{ skew: ce() }],
|
|
1417
|
+
"skew-x": [{ "skew-x": ce() }],
|
|
1418
|
+
"skew-y": [{ "skew-y": ce() }],
|
|
1419
|
+
transform: [{ transform: [
|
|
1420
|
+
X,
|
|
1421
|
+
J,
|
|
1422
|
+
"",
|
|
1423
|
+
"none",
|
|
1424
|
+
"gpu",
|
|
1425
|
+
"cpu"
|
|
1426
|
+
] }],
|
|
1427
|
+
"transform-origin": [{ origin: x() }],
|
|
1428
|
+
"transform-style": [{ transform: ["3d", "flat"] }],
|
|
1429
|
+
translate: [{ translate: H() }],
|
|
1430
|
+
"translate-x": [{ "translate-x": H() }],
|
|
1431
|
+
"translate-y": [{ "translate-y": H() }],
|
|
1432
|
+
"translate-z": [{ "translate-z": H() }],
|
|
1433
|
+
"translate-none": ["translate-none"],
|
|
1434
|
+
zoom: [{ zoom: [
|
|
1435
|
+
G,
|
|
1436
|
+
X,
|
|
1437
|
+
J
|
|
1438
|
+
] }],
|
|
1439
|
+
accent: [{ accent: M() }],
|
|
1440
|
+
appearance: [{ appearance: ["none", "auto"] }],
|
|
1441
|
+
"caret-color": [{ caret: M() }],
|
|
1442
|
+
"color-scheme": [{ scheme: [
|
|
1443
|
+
"normal",
|
|
1444
|
+
"dark",
|
|
1445
|
+
"light",
|
|
1446
|
+
"light-dark",
|
|
1447
|
+
"only-dark",
|
|
1448
|
+
"only-light"
|
|
1449
|
+
] }],
|
|
1450
|
+
cursor: [{ cursor: [
|
|
1451
|
+
"auto",
|
|
1452
|
+
"default",
|
|
1453
|
+
"pointer",
|
|
1454
|
+
"wait",
|
|
1455
|
+
"text",
|
|
1456
|
+
"move",
|
|
1457
|
+
"help",
|
|
1458
|
+
"not-allowed",
|
|
1459
|
+
"none",
|
|
1460
|
+
"context-menu",
|
|
1461
|
+
"progress",
|
|
1462
|
+
"cell",
|
|
1463
|
+
"crosshair",
|
|
1464
|
+
"vertical-text",
|
|
1465
|
+
"alias",
|
|
1466
|
+
"copy",
|
|
1467
|
+
"no-drop",
|
|
1468
|
+
"grab",
|
|
1469
|
+
"grabbing",
|
|
1470
|
+
"all-scroll",
|
|
1471
|
+
"col-resize",
|
|
1472
|
+
"row-resize",
|
|
1473
|
+
"n-resize",
|
|
1474
|
+
"e-resize",
|
|
1475
|
+
"s-resize",
|
|
1476
|
+
"w-resize",
|
|
1477
|
+
"ne-resize",
|
|
1478
|
+
"nw-resize",
|
|
1479
|
+
"se-resize",
|
|
1480
|
+
"sw-resize",
|
|
1481
|
+
"ew-resize",
|
|
1482
|
+
"ns-resize",
|
|
1483
|
+
"nesw-resize",
|
|
1484
|
+
"nwse-resize",
|
|
1485
|
+
"zoom-in",
|
|
1486
|
+
"zoom-out",
|
|
1487
|
+
X,
|
|
1488
|
+
J
|
|
1489
|
+
] }],
|
|
1490
|
+
"field-sizing": [{ "field-sizing": ["fixed", "content"] }],
|
|
1491
|
+
"pointer-events": [{ "pointer-events": ["auto", "none"] }],
|
|
1492
|
+
resize: [{ resize: [
|
|
1493
|
+
"none",
|
|
1494
|
+
"",
|
|
1495
|
+
"y",
|
|
1496
|
+
"x"
|
|
1497
|
+
] }],
|
|
1498
|
+
"scroll-behavior": [{ scroll: ["auto", "smooth"] }],
|
|
1499
|
+
"scrollbar-thumb-color": [{ "scrollbar-thumb": M() }],
|
|
1500
|
+
"scrollbar-track-color": [{ "scrollbar-track": M() }],
|
|
1501
|
+
"scrollbar-gutter": [{ "scrollbar-gutter": [
|
|
1502
|
+
"auto",
|
|
1503
|
+
"stable",
|
|
1504
|
+
"both"
|
|
1505
|
+
] }],
|
|
1506
|
+
"scrollbar-w": [{ scrollbar: [
|
|
1507
|
+
"auto",
|
|
1508
|
+
"thin",
|
|
1509
|
+
"none"
|
|
1510
|
+
] }],
|
|
1511
|
+
"scroll-m": [{ "scroll-m": C() }],
|
|
1512
|
+
"scroll-mx": [{ "scroll-mx": C() }],
|
|
1513
|
+
"scroll-my": [{ "scroll-my": C() }],
|
|
1514
|
+
"scroll-ms": [{ "scroll-ms": C() }],
|
|
1515
|
+
"scroll-me": [{ "scroll-me": C() }],
|
|
1516
|
+
"scroll-mbs": [{ "scroll-mbs": C() }],
|
|
1517
|
+
"scroll-mbe": [{ "scroll-mbe": C() }],
|
|
1518
|
+
"scroll-mt": [{ "scroll-mt": C() }],
|
|
1519
|
+
"scroll-mr": [{ "scroll-mr": C() }],
|
|
1520
|
+
"scroll-mb": [{ "scroll-mb": C() }],
|
|
1521
|
+
"scroll-ml": [{ "scroll-ml": C() }],
|
|
1522
|
+
"scroll-p": [{ "scroll-p": C() }],
|
|
1523
|
+
"scroll-px": [{ "scroll-px": C() }],
|
|
1524
|
+
"scroll-py": [{ "scroll-py": C() }],
|
|
1525
|
+
"scroll-ps": [{ "scroll-ps": C() }],
|
|
1526
|
+
"scroll-pe": [{ "scroll-pe": C() }],
|
|
1527
|
+
"scroll-pbs": [{ "scroll-pbs": C() }],
|
|
1528
|
+
"scroll-pbe": [{ "scroll-pbe": C() }],
|
|
1529
|
+
"scroll-pt": [{ "scroll-pt": C() }],
|
|
1530
|
+
"scroll-pr": [{ "scroll-pr": C() }],
|
|
1531
|
+
"scroll-pb": [{ "scroll-pb": C() }],
|
|
1532
|
+
"scroll-pl": [{ "scroll-pl": C() }],
|
|
1533
|
+
"snap-align": [{ snap: [
|
|
1534
|
+
"start",
|
|
1535
|
+
"end",
|
|
1536
|
+
"center",
|
|
1537
|
+
"align-none"
|
|
1538
|
+
] }],
|
|
1539
|
+
"snap-stop": [{ snap: ["normal", "always"] }],
|
|
1540
|
+
"snap-type": [{ snap: [
|
|
1541
|
+
"none",
|
|
1542
|
+
"x",
|
|
1543
|
+
"y",
|
|
1544
|
+
"both"
|
|
1545
|
+
] }],
|
|
1546
|
+
"snap-strictness": [{ snap: ["mandatory", "proximity"] }],
|
|
1547
|
+
touch: [{ touch: [
|
|
1548
|
+
"auto",
|
|
1549
|
+
"none",
|
|
1550
|
+
"manipulation"
|
|
1551
|
+
] }],
|
|
1552
|
+
"touch-x": [{ "touch-pan": [
|
|
1553
|
+
"x",
|
|
1554
|
+
"left",
|
|
1555
|
+
"right"
|
|
1556
|
+
] }],
|
|
1557
|
+
"touch-y": [{ "touch-pan": [
|
|
1558
|
+
"y",
|
|
1559
|
+
"up",
|
|
1560
|
+
"down"
|
|
1561
|
+
] }],
|
|
1562
|
+
"touch-pz": ["touch-pinch-zoom"],
|
|
1563
|
+
select: [{ select: [
|
|
1564
|
+
"none",
|
|
1565
|
+
"text",
|
|
1566
|
+
"all",
|
|
1567
|
+
"auto"
|
|
1568
|
+
] }],
|
|
1569
|
+
"will-change": [{ "will-change": [
|
|
1570
|
+
"auto",
|
|
1571
|
+
"scroll",
|
|
1572
|
+
"contents",
|
|
1573
|
+
"transform",
|
|
1574
|
+
X,
|
|
1575
|
+
J
|
|
1576
|
+
] }],
|
|
1577
|
+
fill: [{ fill: ["none", ...M()] }],
|
|
1578
|
+
"stroke-w": [{ stroke: [
|
|
1579
|
+
W,
|
|
1580
|
+
Ee,
|
|
1581
|
+
Y,
|
|
1582
|
+
be
|
|
1583
|
+
] }],
|
|
1584
|
+
stroke: [{ stroke: ["none", ...M()] }],
|
|
1585
|
+
"forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
|
|
1586
|
+
},
|
|
1587
|
+
conflictingClassGroups: {
|
|
1588
|
+
"container-named": ["container-type"],
|
|
1589
|
+
overflow: ["overflow-x", "overflow-y"],
|
|
1590
|
+
overscroll: ["overscroll-x", "overscroll-y"],
|
|
1591
|
+
inset: [
|
|
1592
|
+
"inset-x",
|
|
1593
|
+
"inset-y",
|
|
1594
|
+
"inset-bs",
|
|
1595
|
+
"inset-be",
|
|
1596
|
+
"start",
|
|
1597
|
+
"end",
|
|
1598
|
+
"top",
|
|
1599
|
+
"right",
|
|
1600
|
+
"bottom",
|
|
1601
|
+
"left"
|
|
1602
|
+
],
|
|
1603
|
+
"inset-x": [
|
|
1604
|
+
"start",
|
|
1605
|
+
"end",
|
|
1606
|
+
"right",
|
|
1607
|
+
"left"
|
|
1608
|
+
],
|
|
1609
|
+
"inset-y": [
|
|
1610
|
+
"inset-bs",
|
|
1611
|
+
"inset-be",
|
|
1612
|
+
"top",
|
|
1613
|
+
"bottom"
|
|
1614
|
+
],
|
|
1615
|
+
flex: [
|
|
1616
|
+
"basis",
|
|
1617
|
+
"grow",
|
|
1618
|
+
"shrink"
|
|
1619
|
+
],
|
|
1620
|
+
gap: ["gap-x", "gap-y"],
|
|
1621
|
+
p: [
|
|
1622
|
+
"px",
|
|
1623
|
+
"py",
|
|
1624
|
+
"ps",
|
|
1625
|
+
"pe",
|
|
1626
|
+
"pbs",
|
|
1627
|
+
"pbe",
|
|
1628
|
+
"pt",
|
|
1629
|
+
"pr",
|
|
1630
|
+
"pb",
|
|
1631
|
+
"pl"
|
|
1632
|
+
],
|
|
1633
|
+
px: [
|
|
1634
|
+
"ps",
|
|
1635
|
+
"pe",
|
|
1636
|
+
"pr",
|
|
1637
|
+
"pl"
|
|
1638
|
+
],
|
|
1639
|
+
py: [
|
|
1640
|
+
"pbs",
|
|
1641
|
+
"pbe",
|
|
1642
|
+
"pt",
|
|
1643
|
+
"pb"
|
|
1644
|
+
],
|
|
1645
|
+
m: [
|
|
1646
|
+
"mx",
|
|
1647
|
+
"my",
|
|
1648
|
+
"ms",
|
|
1649
|
+
"me",
|
|
1650
|
+
"mbs",
|
|
1651
|
+
"mbe",
|
|
1652
|
+
"mt",
|
|
1653
|
+
"mr",
|
|
1654
|
+
"mb",
|
|
1655
|
+
"ml"
|
|
1656
|
+
],
|
|
1657
|
+
mx: [
|
|
1658
|
+
"ms",
|
|
1659
|
+
"me",
|
|
1660
|
+
"mr",
|
|
1661
|
+
"ml"
|
|
1662
|
+
],
|
|
1663
|
+
my: [
|
|
1664
|
+
"mbs",
|
|
1665
|
+
"mbe",
|
|
1666
|
+
"mt",
|
|
1667
|
+
"mb"
|
|
1668
|
+
],
|
|
1669
|
+
size: ["w", "h"],
|
|
1670
|
+
"font-size": ["leading"],
|
|
1671
|
+
"fvn-normal": [
|
|
1672
|
+
"fvn-ordinal",
|
|
1673
|
+
"fvn-slashed-zero",
|
|
1674
|
+
"fvn-figure",
|
|
1675
|
+
"fvn-spacing",
|
|
1676
|
+
"fvn-fraction"
|
|
1677
|
+
],
|
|
1678
|
+
"fvn-ordinal": ["fvn-normal"],
|
|
1679
|
+
"fvn-slashed-zero": ["fvn-normal"],
|
|
1680
|
+
"fvn-figure": ["fvn-normal"],
|
|
1681
|
+
"fvn-spacing": ["fvn-normal"],
|
|
1682
|
+
"fvn-fraction": ["fvn-normal"],
|
|
1683
|
+
"line-clamp": ["display", "overflow"],
|
|
1684
|
+
rounded: [
|
|
1685
|
+
"rounded-s",
|
|
1686
|
+
"rounded-e",
|
|
1687
|
+
"rounded-t",
|
|
1688
|
+
"rounded-r",
|
|
1689
|
+
"rounded-b",
|
|
1690
|
+
"rounded-l",
|
|
1691
|
+
"rounded-ss",
|
|
1692
|
+
"rounded-se",
|
|
1693
|
+
"rounded-ee",
|
|
1694
|
+
"rounded-es",
|
|
1695
|
+
"rounded-tl",
|
|
1696
|
+
"rounded-tr",
|
|
1697
|
+
"rounded-br",
|
|
1698
|
+
"rounded-bl"
|
|
1699
|
+
],
|
|
1700
|
+
"rounded-s": ["rounded-ss", "rounded-es"],
|
|
1701
|
+
"rounded-e": ["rounded-se", "rounded-ee"],
|
|
1702
|
+
"rounded-t": ["rounded-tl", "rounded-tr"],
|
|
1703
|
+
"rounded-r": ["rounded-tr", "rounded-br"],
|
|
1704
|
+
"rounded-b": ["rounded-br", "rounded-bl"],
|
|
1705
|
+
"rounded-l": ["rounded-tl", "rounded-bl"],
|
|
1706
|
+
"border-spacing": ["border-spacing-x", "border-spacing-y"],
|
|
1707
|
+
"border-w": [
|
|
1708
|
+
"border-w-x",
|
|
1709
|
+
"border-w-y",
|
|
1710
|
+
"border-w-s",
|
|
1711
|
+
"border-w-e",
|
|
1712
|
+
"border-w-bs",
|
|
1713
|
+
"border-w-be",
|
|
1714
|
+
"border-w-t",
|
|
1715
|
+
"border-w-r",
|
|
1716
|
+
"border-w-b",
|
|
1717
|
+
"border-w-l"
|
|
1718
|
+
],
|
|
1719
|
+
"border-w-x": [
|
|
1720
|
+
"border-w-s",
|
|
1721
|
+
"border-w-e",
|
|
1722
|
+
"border-w-r",
|
|
1723
|
+
"border-w-l"
|
|
1724
|
+
],
|
|
1725
|
+
"border-w-y": [
|
|
1726
|
+
"border-w-bs",
|
|
1727
|
+
"border-w-be",
|
|
1728
|
+
"border-w-t",
|
|
1729
|
+
"border-w-b"
|
|
1730
|
+
],
|
|
1731
|
+
"border-color": [
|
|
1732
|
+
"border-color-x",
|
|
1733
|
+
"border-color-y",
|
|
1734
|
+
"border-color-s",
|
|
1735
|
+
"border-color-e",
|
|
1736
|
+
"border-color-bs",
|
|
1737
|
+
"border-color-be",
|
|
1738
|
+
"border-color-t",
|
|
1739
|
+
"border-color-r",
|
|
1740
|
+
"border-color-b",
|
|
1741
|
+
"border-color-l"
|
|
1742
|
+
],
|
|
1743
|
+
"border-color-x": [
|
|
1744
|
+
"border-color-s",
|
|
1745
|
+
"border-color-e",
|
|
1746
|
+
"border-color-r",
|
|
1747
|
+
"border-color-l"
|
|
1748
|
+
],
|
|
1749
|
+
"border-color-y": [
|
|
1750
|
+
"border-color-bs",
|
|
1751
|
+
"border-color-be",
|
|
1752
|
+
"border-color-t",
|
|
1753
|
+
"border-color-b"
|
|
1754
|
+
],
|
|
1755
|
+
translate: [
|
|
1756
|
+
"translate-x",
|
|
1757
|
+
"translate-y",
|
|
1758
|
+
"translate-none"
|
|
1759
|
+
],
|
|
1760
|
+
"translate-none": [
|
|
1761
|
+
"translate",
|
|
1762
|
+
"translate-x",
|
|
1763
|
+
"translate-y",
|
|
1764
|
+
"translate-z"
|
|
1765
|
+
],
|
|
1766
|
+
"scroll-m": [
|
|
1767
|
+
"scroll-mx",
|
|
1768
|
+
"scroll-my",
|
|
1769
|
+
"scroll-ms",
|
|
1770
|
+
"scroll-me",
|
|
1771
|
+
"scroll-mbs",
|
|
1772
|
+
"scroll-mbe",
|
|
1773
|
+
"scroll-mt",
|
|
1774
|
+
"scroll-mr",
|
|
1775
|
+
"scroll-mb",
|
|
1776
|
+
"scroll-ml"
|
|
1777
|
+
],
|
|
1778
|
+
"scroll-mx": [
|
|
1779
|
+
"scroll-ms",
|
|
1780
|
+
"scroll-me",
|
|
1781
|
+
"scroll-mr",
|
|
1782
|
+
"scroll-ml"
|
|
1783
|
+
],
|
|
1784
|
+
"scroll-my": [
|
|
1785
|
+
"scroll-mbs",
|
|
1786
|
+
"scroll-mbe",
|
|
1787
|
+
"scroll-mt",
|
|
1788
|
+
"scroll-mb"
|
|
1789
|
+
],
|
|
1790
|
+
"scroll-p": [
|
|
1791
|
+
"scroll-px",
|
|
1792
|
+
"scroll-py",
|
|
1793
|
+
"scroll-ps",
|
|
1794
|
+
"scroll-pe",
|
|
1795
|
+
"scroll-pbs",
|
|
1796
|
+
"scroll-pbe",
|
|
1797
|
+
"scroll-pt",
|
|
1798
|
+
"scroll-pr",
|
|
1799
|
+
"scroll-pb",
|
|
1800
|
+
"scroll-pl"
|
|
1801
|
+
],
|
|
1802
|
+
"scroll-px": [
|
|
1803
|
+
"scroll-ps",
|
|
1804
|
+
"scroll-pe",
|
|
1805
|
+
"scroll-pr",
|
|
1806
|
+
"scroll-pl"
|
|
1807
|
+
],
|
|
1808
|
+
"scroll-py": [
|
|
1809
|
+
"scroll-pbs",
|
|
1810
|
+
"scroll-pbe",
|
|
1811
|
+
"scroll-pt",
|
|
1812
|
+
"scroll-pb"
|
|
1813
|
+
],
|
|
1814
|
+
touch: [
|
|
1815
|
+
"touch-x",
|
|
1816
|
+
"touch-y",
|
|
1817
|
+
"touch-pz"
|
|
1818
|
+
],
|
|
1819
|
+
"touch-x": ["touch"],
|
|
1820
|
+
"touch-y": ["touch"],
|
|
1821
|
+
"touch-pz": ["touch"]
|
|
1822
|
+
},
|
|
1823
|
+
conflictingClassGroupModifiers: { "font-size": ["leading"] },
|
|
1824
|
+
postfixLookupClassGroups: ["container-type"],
|
|
1825
|
+
orderSensitiveModifiers: [
|
|
1826
|
+
"*",
|
|
1827
|
+
"**",
|
|
1828
|
+
"after",
|
|
1829
|
+
"backdrop",
|
|
1830
|
+
"before",
|
|
1831
|
+
"details-content",
|
|
1832
|
+
"file",
|
|
1833
|
+
"first-letter",
|
|
1834
|
+
"first-line",
|
|
1835
|
+
"marker",
|
|
1836
|
+
"placeholder",
|
|
1837
|
+
"selection"
|
|
1838
|
+
]
|
|
1839
|
+
};
|
|
1840
|
+
});
|
|
1841
|
+
//#endregion
|
|
1842
|
+
//#region src/lib/utils/cn.ts
|
|
1843
|
+
function $(...e) {
|
|
1844
|
+
return Ve(...e.filter(Boolean));
|
|
1845
|
+
}
|
|
1846
|
+
//#endregion
|
|
1847
|
+
//#region src/lib/ColumnToggle.tsx
|
|
1848
|
+
function He({ checked: e, disabled: t }) {
|
|
1849
|
+
return /* @__PURE__ */ l("span", {
|
|
1850
|
+
"aria-hidden": !0,
|
|
1851
|
+
className: $("inline-flex size-4.5 shrink-0 items-center justify-center rounded-[5px] border transition-colors", e ? "border-zinc-900 bg-zinc-900 text-white" : "border-zinc-300 bg-white text-transparent", t && "opacity-40"),
|
|
1852
|
+
children: /* @__PURE__ */ l(d, { className: $("transition-opacity", e ? "opacity-100" : "opacity-0") })
|
|
1853
|
+
});
|
|
1854
|
+
}
|
|
1855
|
+
function Ue({ columns: n, visibleKeys: r, onChange: c, className: d, label: p = "Columns" }) {
|
|
1856
|
+
let [m, h] = a(!1), g = i(null), _ = t();
|
|
1857
|
+
return e(() => {
|
|
1858
|
+
function e(e) {
|
|
1859
|
+
g.current?.contains(e.target) || h(!1);
|
|
1860
|
+
}
|
|
1861
|
+
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
1862
|
+
}, []), /* @__PURE__ */ u("div", {
|
|
1863
|
+
ref: g,
|
|
1864
|
+
className: $("relative inline-flex", d),
|
|
1865
|
+
children: [/* @__PURE__ */ u("button", {
|
|
1866
|
+
type: "button",
|
|
1867
|
+
className: $("inline-flex cursor-pointer items-center gap-2 rounded-md border border-zinc-300 bg-white", "px-3 py-1.5 text-sm text-zinc-800 hover:bg-zinc-50"),
|
|
1868
|
+
"aria-haspopup": "true",
|
|
1869
|
+
"aria-expanded": m,
|
|
1870
|
+
"aria-controls": _,
|
|
1871
|
+
onClick: () => h((e) => !e),
|
|
1872
|
+
children: [/* @__PURE__ */ l(f, { className: "text-zinc-600" }), p]
|
|
1873
|
+
}), /* @__PURE__ */ l(o, { children: m ? /* @__PURE__ */ l(s.div, {
|
|
1874
|
+
id: _,
|
|
1875
|
+
role: "menu",
|
|
1876
|
+
initial: {
|
|
1877
|
+
opacity: 0,
|
|
1878
|
+
y: 6,
|
|
1879
|
+
scale: .98
|
|
1880
|
+
},
|
|
1881
|
+
animate: {
|
|
1882
|
+
opacity: 1,
|
|
1883
|
+
y: 0,
|
|
1884
|
+
scale: 1
|
|
1885
|
+
},
|
|
1886
|
+
exit: {
|
|
1887
|
+
opacity: 0,
|
|
1888
|
+
y: 4,
|
|
1889
|
+
scale: .98
|
|
1890
|
+
},
|
|
1891
|
+
transition: {
|
|
1892
|
+
duration: .16,
|
|
1893
|
+
ease: [
|
|
1894
|
+
.16,
|
|
1895
|
+
1,
|
|
1896
|
+
.3,
|
|
1897
|
+
1
|
|
1898
|
+
]
|
|
1899
|
+
},
|
|
1900
|
+
className: $("absolute bottom-[calc(100%+0.375rem)] right-0 z-20 origin-bottom-right", "max-h-72 w-60 overflow-auto rounded-md bg-white p-1.5", "shadow-[0_8px_30px_rgba(0,0,0,0.1)] ring-1 ring-black/5"),
|
|
1901
|
+
children: n.map((e) => {
|
|
1902
|
+
let t = r.has(e.key), n = t && r.size <= 1;
|
|
1903
|
+
return /* @__PURE__ */ u("label", {
|
|
1904
|
+
className: $("flex cursor-pointer items-center gap-3 rounded-md px-2.5 py-2 text-sm text-zinc-800", "transition-colors hover:bg-zinc-100/80", n && "cursor-not-allowed opacity-60"),
|
|
1905
|
+
children: [
|
|
1906
|
+
/* @__PURE__ */ l("input", {
|
|
1907
|
+
type: "checkbox",
|
|
1908
|
+
className: "peer sr-only",
|
|
1909
|
+
checked: t,
|
|
1910
|
+
disabled: n,
|
|
1911
|
+
onChange: () => {
|
|
1912
|
+
let n = new Set(r);
|
|
1913
|
+
if (t) {
|
|
1914
|
+
if (n.size <= 1) return;
|
|
1915
|
+
n.delete(e.key);
|
|
1916
|
+
} else n.add(e.key);
|
|
1917
|
+
c(n);
|
|
1918
|
+
}
|
|
1919
|
+
}),
|
|
1920
|
+
/* @__PURE__ */ l(He, {
|
|
1921
|
+
checked: t,
|
|
1922
|
+
disabled: n
|
|
1923
|
+
}),
|
|
1924
|
+
/* @__PURE__ */ l("span", {
|
|
1925
|
+
className: "min-w-0 flex-1 truncate",
|
|
1926
|
+
children: e.label
|
|
1927
|
+
})
|
|
1928
|
+
]
|
|
1929
|
+
}, e.key);
|
|
1930
|
+
})
|
|
1931
|
+
}) : null })]
|
|
1932
|
+
});
|
|
1933
|
+
}
|
|
1934
|
+
//#endregion
|
|
1935
|
+
//#region src/lib/icons/DragHandleIcon.tsx
|
|
1936
|
+
function We({ className: e }) {
|
|
1937
|
+
return /* @__PURE__ */ u("svg", {
|
|
1938
|
+
className: e,
|
|
1939
|
+
width: "14",
|
|
1940
|
+
height: "14",
|
|
1941
|
+
viewBox: "0 0 16 16",
|
|
1942
|
+
fill: "currentColor",
|
|
1943
|
+
"aria-hidden": !0,
|
|
1944
|
+
children: [
|
|
1945
|
+
/* @__PURE__ */ l("circle", {
|
|
1946
|
+
cx: "5",
|
|
1947
|
+
cy: "3.5",
|
|
1948
|
+
r: "1.25"
|
|
1949
|
+
}),
|
|
1950
|
+
/* @__PURE__ */ l("circle", {
|
|
1951
|
+
cx: "11",
|
|
1952
|
+
cy: "3.5",
|
|
1953
|
+
r: "1.25"
|
|
1954
|
+
}),
|
|
1955
|
+
/* @__PURE__ */ l("circle", {
|
|
1956
|
+
cx: "5",
|
|
1957
|
+
cy: "8",
|
|
1958
|
+
r: "1.25"
|
|
1959
|
+
}),
|
|
1960
|
+
/* @__PURE__ */ l("circle", {
|
|
1961
|
+
cx: "11",
|
|
1962
|
+
cy: "8",
|
|
1963
|
+
r: "1.25"
|
|
1964
|
+
}),
|
|
1965
|
+
/* @__PURE__ */ l("circle", {
|
|
1966
|
+
cx: "5",
|
|
1967
|
+
cy: "12.5",
|
|
1968
|
+
r: "1.25"
|
|
1969
|
+
}),
|
|
1970
|
+
/* @__PURE__ */ l("circle", {
|
|
1971
|
+
cx: "11",
|
|
1972
|
+
cy: "12.5",
|
|
1973
|
+
r: "1.25"
|
|
1974
|
+
})
|
|
1975
|
+
]
|
|
1976
|
+
});
|
|
1977
|
+
}
|
|
1978
|
+
//#endregion
|
|
1979
|
+
//#region src/lib/LimitSelect.tsx
|
|
1980
|
+
function Ge({ className: e }) {
|
|
1981
|
+
return /* @__PURE__ */ l("svg", {
|
|
1982
|
+
className: e,
|
|
1983
|
+
width: "16",
|
|
1984
|
+
height: "16",
|
|
1985
|
+
viewBox: "0 0 24 24",
|
|
1986
|
+
fill: "none",
|
|
1987
|
+
stroke: "currentColor",
|
|
1988
|
+
strokeWidth: "2",
|
|
1989
|
+
strokeLinecap: "round",
|
|
1990
|
+
strokeLinejoin: "round",
|
|
1991
|
+
"aria-hidden": !0,
|
|
1992
|
+
children: /* @__PURE__ */ l("path", { d: "M6 9l6 6 6-6" })
|
|
1993
|
+
});
|
|
1994
|
+
}
|
|
1995
|
+
function Ke({ className: e }) {
|
|
1996
|
+
return /* @__PURE__ */ l("svg", {
|
|
1997
|
+
className: e,
|
|
1998
|
+
width: "16",
|
|
1999
|
+
height: "16",
|
|
2000
|
+
viewBox: "0 0 24 24",
|
|
2001
|
+
fill: "none",
|
|
2002
|
+
stroke: "currentColor",
|
|
2003
|
+
strokeWidth: "2.25",
|
|
2004
|
+
strokeLinecap: "round",
|
|
2005
|
+
strokeLinejoin: "round",
|
|
2006
|
+
"aria-hidden": !0,
|
|
2007
|
+
children: /* @__PURE__ */ l("path", { d: "M20 6L9 17l-5-5" })
|
|
2008
|
+
});
|
|
2009
|
+
}
|
|
2010
|
+
function qe({ value: n, options: r, onChange: o, className: s }) {
|
|
2011
|
+
let [c, d] = a(!1), f = i(null), p = t();
|
|
2012
|
+
return e(() => {
|
|
2013
|
+
function e(e) {
|
|
2014
|
+
f.current?.contains(e.target) || d(!1);
|
|
2015
|
+
}
|
|
2016
|
+
function t(e) {
|
|
2017
|
+
e.key === "Escape" && d(!1);
|
|
2018
|
+
}
|
|
2019
|
+
return document.addEventListener("mousedown", e), document.addEventListener("keydown", t), () => {
|
|
2020
|
+
document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
|
|
2021
|
+
};
|
|
2022
|
+
}, []), /* @__PURE__ */ u("div", {
|
|
2023
|
+
ref: f,
|
|
2024
|
+
className: $("relative inline-flex", s),
|
|
2025
|
+
children: [/* @__PURE__ */ u("button", {
|
|
2026
|
+
type: "button",
|
|
2027
|
+
"aria-haspopup": "listbox",
|
|
2028
|
+
"aria-expanded": c,
|
|
2029
|
+
"aria-controls": p,
|
|
2030
|
+
"aria-label": "Rows per page",
|
|
2031
|
+
className: $("inline-flex h-9 min-w-[4.5rem] items-center justify-between gap-2", "rounded-md bg-zinc-100 px-3 text-sm text-zinc-900", "outline-none transition-colors", "hover:bg-zinc-200/80", "focus-visible:ring-2 focus-visible:ring-zinc-300"),
|
|
2032
|
+
onClick: () => d((e) => !e),
|
|
2033
|
+
children: [/* @__PURE__ */ l("span", { children: n }), /* @__PURE__ */ l(Ge, { className: $("text-zinc-500 transition-transform duration-200", c && "rotate-180") })]
|
|
2034
|
+
}), c ? /* @__PURE__ */ l("ul", {
|
|
2035
|
+
id: p,
|
|
2036
|
+
role: "listbox",
|
|
2037
|
+
"aria-label": "Rows per page",
|
|
2038
|
+
className: $("absolute bottom-[calc(100%+0.5rem)] left-0 z-30", "min-w-full overflow-hidden rounded-md bg-white py-1", "shadow-[0_8px_30px_rgba(0,0,0,0.12)] ring-1 ring-black/5"),
|
|
2039
|
+
children: r.map((e) => {
|
|
2040
|
+
let t = e === n;
|
|
2041
|
+
return /* @__PURE__ */ l("li", {
|
|
2042
|
+
role: "option",
|
|
2043
|
+
"aria-selected": t,
|
|
2044
|
+
children: /* @__PURE__ */ u("button", {
|
|
2045
|
+
type: "button",
|
|
2046
|
+
className: $("flex w-full items-center justify-between gap-4 px-3 py-2 text-left text-sm", "text-zinc-900 transition-colors", t ? "bg-zinc-50" : "hover:bg-zinc-50"),
|
|
2047
|
+
onClick: () => {
|
|
2048
|
+
o(e), d(!1);
|
|
2049
|
+
},
|
|
2050
|
+
children: [/* @__PURE__ */ l("span", { children: e }), t ? /* @__PURE__ */ l(Ke, { className: "text-zinc-800" }) : null]
|
|
2051
|
+
})
|
|
2052
|
+
}, e);
|
|
2053
|
+
})
|
|
2054
|
+
}) : null]
|
|
2055
|
+
});
|
|
2056
|
+
}
|
|
2057
|
+
//#endregion
|
|
2058
|
+
//#region src/lib/Pagination.tsx
|
|
2059
|
+
function Je(e, t) {
|
|
2060
|
+
if (t <= 7) return Array.from({ length: t }, (e, t) => t + 1);
|
|
2061
|
+
let n = e + 1, r = [];
|
|
2062
|
+
return n <= 4 ? (r.push(1, 2, 3, 4, 5, "ellipsis", t), r) : n >= t - 3 ? (r.push(1, "ellipsis", t - 4, t - 3, t - 2, t - 1, t), r) : (r.push(1, "ellipsis", n - 1, n, n + 1, "ellipsis", t), r);
|
|
2063
|
+
}
|
|
2064
|
+
function Ye({ className: e }) {
|
|
2065
|
+
return /* @__PURE__ */ l("svg", {
|
|
2066
|
+
className: e,
|
|
2067
|
+
width: "14",
|
|
2068
|
+
height: "14",
|
|
2069
|
+
viewBox: "0 0 24 24",
|
|
2070
|
+
fill: "none",
|
|
2071
|
+
stroke: "currentColor",
|
|
2072
|
+
strokeWidth: "2",
|
|
2073
|
+
strokeLinecap: "round",
|
|
2074
|
+
strokeLinejoin: "round",
|
|
2075
|
+
"aria-hidden": !0,
|
|
2076
|
+
children: /* @__PURE__ */ l("path", { d: "M15 18l-6-6 6-6" })
|
|
2077
|
+
});
|
|
2078
|
+
}
|
|
2079
|
+
function Xe({ className: e }) {
|
|
2080
|
+
return /* @__PURE__ */ l("svg", {
|
|
2081
|
+
className: e,
|
|
2082
|
+
width: "14",
|
|
2083
|
+
height: "14",
|
|
2084
|
+
viewBox: "0 0 24 24",
|
|
2085
|
+
fill: "none",
|
|
2086
|
+
stroke: "currentColor",
|
|
2087
|
+
strokeWidth: "2",
|
|
2088
|
+
strokeLinecap: "round",
|
|
2089
|
+
strokeLinejoin: "round",
|
|
2090
|
+
"aria-hidden": !0,
|
|
2091
|
+
children: /* @__PURE__ */ l("path", { d: "M9 18l6-6-6-6" })
|
|
2092
|
+
});
|
|
2093
|
+
}
|
|
2094
|
+
var Ze = "inline-flex size-9 shrink-0 items-center justify-center rounded-md border text-sm transition-colors";
|
|
2095
|
+
function Qe({ skip: e, limit: t, total: n, limitOptions: r = [
|
|
2096
|
+
10,
|
|
2097
|
+
20,
|
|
2098
|
+
50
|
|
2099
|
+
], onChange: i, className: a, startAddon: o }) {
|
|
2100
|
+
let s = Math.max(1, Math.ceil(n / t) || 1), c = Math.floor(e / t), d = Je(c, s), f = n === 0 ? 0 : e + 1, p = Math.min(e + t, n);
|
|
2101
|
+
return /* @__PURE__ */ u("div", {
|
|
2102
|
+
className: $("flex flex-wrap items-center justify-between gap-3 px-1 py-2 text-sm text-zinc-700", a),
|
|
2103
|
+
children: [/* @__PURE__ */ u("div", {
|
|
2104
|
+
className: "flex items-center gap-2 text-zinc-500",
|
|
2105
|
+
children: [
|
|
2106
|
+
o,
|
|
2107
|
+
/* @__PURE__ */ l(qe, {
|
|
2108
|
+
value: t,
|
|
2109
|
+
options: r,
|
|
2110
|
+
onChange: (e) => i({
|
|
2111
|
+
limit: e,
|
|
2112
|
+
skip: 0
|
|
2113
|
+
})
|
|
2114
|
+
}),
|
|
2115
|
+
/* @__PURE__ */ u("span", {
|
|
2116
|
+
className: "hidden text-sm sm:inline",
|
|
2117
|
+
children: [
|
|
2118
|
+
f,
|
|
2119
|
+
"-",
|
|
2120
|
+
p,
|
|
2121
|
+
" of ",
|
|
2122
|
+
n
|
|
2123
|
+
]
|
|
2124
|
+
})
|
|
2125
|
+
]
|
|
2126
|
+
}), /* @__PURE__ */ u("nav", {
|
|
2127
|
+
className: "flex items-center gap-1.5",
|
|
2128
|
+
"aria-label": "Pagination",
|
|
2129
|
+
children: [
|
|
2130
|
+
/* @__PURE__ */ l("button", {
|
|
2131
|
+
type: "button",
|
|
2132
|
+
className: $(Ze, "border-zinc-200 bg-white text-zinc-800", "disabled:cursor-not-allowed disabled:border-zinc-100 disabled:text-zinc-300", "hover:enabled:bg-zinc-50"),
|
|
2133
|
+
disabled: c <= 0,
|
|
2134
|
+
"aria-label": "Previous page",
|
|
2135
|
+
onClick: () => i({
|
|
2136
|
+
limit: t,
|
|
2137
|
+
skip: Math.max(0, e - t)
|
|
2138
|
+
}),
|
|
2139
|
+
children: /* @__PURE__ */ l(Ye, {})
|
|
2140
|
+
}),
|
|
2141
|
+
d.map((e, n) => e === "ellipsis" ? /* @__PURE__ */ l("span", {
|
|
2142
|
+
className: "inline-flex size-9 items-center justify-center text-zinc-400",
|
|
2143
|
+
"aria-hidden": !0,
|
|
2144
|
+
children: "…"
|
|
2145
|
+
}, `e-${n}`) : /* @__PURE__ */ l("button", {
|
|
2146
|
+
type: "button",
|
|
2147
|
+
"aria-label": `Page ${e}`,
|
|
2148
|
+
"aria-current": e === c + 1 ? "page" : void 0,
|
|
2149
|
+
className: $(Ze, e === c + 1 ? "border-zinc-300 bg-zinc-100 font-medium text-zinc-900" : "border-zinc-200 bg-white text-zinc-800 hover:bg-zinc-50"),
|
|
2150
|
+
onClick: () => i({
|
|
2151
|
+
limit: t,
|
|
2152
|
+
skip: (e - 1) * t
|
|
2153
|
+
}),
|
|
2154
|
+
children: e
|
|
2155
|
+
}, e)),
|
|
2156
|
+
/* @__PURE__ */ l("button", {
|
|
2157
|
+
type: "button",
|
|
2158
|
+
className: $(Ze, "border-zinc-200 bg-white text-zinc-800", "disabled:cursor-not-allowed disabled:border-zinc-100 disabled:text-zinc-300", "hover:enabled:bg-zinc-50"),
|
|
2159
|
+
disabled: c >= s - 1,
|
|
2160
|
+
"aria-label": "Next page",
|
|
2161
|
+
onClick: () => i({
|
|
2162
|
+
limit: t,
|
|
2163
|
+
skip: e + t
|
|
2164
|
+
}),
|
|
2165
|
+
children: /* @__PURE__ */ l(Xe, {})
|
|
2166
|
+
})
|
|
2167
|
+
]
|
|
2168
|
+
})]
|
|
2169
|
+
});
|
|
2170
|
+
}
|
|
2171
|
+
//#endregion
|
|
2172
|
+
//#region src/lib/SkeletonRows.tsx
|
|
2173
|
+
function $e({ rowCount: e, columnCount: t, className: n }) {
|
|
2174
|
+
return /* @__PURE__ */ l(c, { children: Array.from({ length: e }).map((e, r) => /* @__PURE__ */ l("tr", {
|
|
2175
|
+
className: $("animate-pulse", n),
|
|
2176
|
+
children: Array.from({ length: t }).map((e, t) => /* @__PURE__ */ l("td", {
|
|
2177
|
+
className: "border-b border-zinc-100 px-3 py-3",
|
|
2178
|
+
children: /* @__PURE__ */ l("div", { className: "h-3 w-full rounded bg-zinc-200" })
|
|
2179
|
+
}, t))
|
|
2180
|
+
}, r)) });
|
|
2181
|
+
}
|
|
2182
|
+
//#endregion
|
|
2183
|
+
//#region src/lib/utils/columnOrder.ts
|
|
2184
|
+
function et(e, t) {
|
|
2185
|
+
if (!t?.length) return e;
|
|
2186
|
+
let n = new Set(e), r = t.filter((e) => n.has(e)), i = e.filter((e) => !r.includes(e));
|
|
2187
|
+
return [...r, ...i];
|
|
2188
|
+
}
|
|
2189
|
+
function tt(e, t, n) {
|
|
2190
|
+
let r = e.indexOf(t), i = e.indexOf(n);
|
|
2191
|
+
if (r === -1 || i === -1 || r === i) return e;
|
|
2192
|
+
let a = e.filter((e, t) => t !== r);
|
|
2193
|
+
return a.splice(i, 0, t), a;
|
|
2194
|
+
}
|
|
2195
|
+
//#endregion
|
|
2196
|
+
//#region src/lib/utils/pagination.ts
|
|
2197
|
+
function nt(e, t, n) {
|
|
2198
|
+
if (t <= 0) return 0;
|
|
2199
|
+
let r = Math.floor((t - 1) / n) * n;
|
|
2200
|
+
return Math.min(Math.max(0, e), Math.max(0, r));
|
|
2201
|
+
}
|
|
2202
|
+
function rt(e, t, n) {
|
|
2203
|
+
return e.slice(t, t + n);
|
|
2204
|
+
}
|
|
2205
|
+
function it(e) {
|
|
2206
|
+
let t = e.total ?? e.dataLength, n = Math.max(1, e.limit), r = nt(e.skip, t, n), i = Math.max(1, Math.ceil(t / n) || 1);
|
|
2207
|
+
return {
|
|
2208
|
+
limit: n,
|
|
2209
|
+
skip: r,
|
|
2210
|
+
total: t,
|
|
2211
|
+
pageIndex: Math.floor(r / n),
|
|
2212
|
+
pageCount: i
|
|
2213
|
+
};
|
|
2214
|
+
}
|
|
2215
|
+
//#endregion
|
|
2216
|
+
//#region src/lib/utils/stickyOffsets.ts
|
|
2217
|
+
function at(e, t) {
|
|
2218
|
+
return t?.[e.key] == null ? typeof e.width == "number" ? e.width : 120 : t[e.key];
|
|
2219
|
+
}
|
|
2220
|
+
function ot(e, t) {
|
|
2221
|
+
let n = {}, r = 0;
|
|
2222
|
+
for (let i of e) i.sticky === "left" && (n[i.key] = {
|
|
2223
|
+
side: "left",
|
|
2224
|
+
offset: r
|
|
2225
|
+
}, r += at(i, t));
|
|
2226
|
+
let i = 0;
|
|
2227
|
+
for (let r = e.length - 1; r >= 0; r--) {
|
|
2228
|
+
let a = e[r];
|
|
2229
|
+
a.sticky === "right" && (n[a.key] = {
|
|
2230
|
+
side: "right",
|
|
2231
|
+
offset: i
|
|
2232
|
+
}, i += at(a, t));
|
|
2233
|
+
}
|
|
2234
|
+
return n;
|
|
2235
|
+
}
|
|
2236
|
+
//#endregion
|
|
2237
|
+
//#region src/lib/SeeTable.tsx
|
|
2238
|
+
var st = "__see_table_index__", ct = 120, lt = 310;
|
|
2239
|
+
function ut(e, t) {
|
|
2240
|
+
return t?.length ? new Set(t) : new Set(e.filter((e) => e.defaultVisible !== !1).map((e) => e.key));
|
|
2241
|
+
}
|
|
2242
|
+
function dt(e, t, n, r) {
|
|
2243
|
+
if (n?.includes(e)) return "left";
|
|
2244
|
+
if (r?.includes(e)) return "right";
|
|
2245
|
+
if (n === void 0 && r === void 0) return t;
|
|
2246
|
+
}
|
|
2247
|
+
function ft(e, t, n) {
|
|
2248
|
+
return e.map((e) => ({
|
|
2249
|
+
...e,
|
|
2250
|
+
sticky: dt(e.key, e.sticky, t, n)
|
|
2251
|
+
}));
|
|
2252
|
+
}
|
|
2253
|
+
function pt(e, t, n = "actions", r = "Actions") {
|
|
2254
|
+
return t ? (e.some((e) => e.key === n) ? e : [...e, {
|
|
2255
|
+
key: n,
|
|
2256
|
+
header: r,
|
|
2257
|
+
width: "auto"
|
|
2258
|
+
}]).map((e) => e.key === n ? {
|
|
2259
|
+
...e,
|
|
2260
|
+
width: e.width ?? "auto",
|
|
2261
|
+
cell: (e, n) => t(e, n)
|
|
2262
|
+
} : e) : e;
|
|
2263
|
+
}
|
|
2264
|
+
function mt(e, t) {
|
|
2265
|
+
let n = e.width === "auto" ? {
|
|
2266
|
+
width: "1%",
|
|
2267
|
+
whiteSpace: "nowrap",
|
|
2268
|
+
maxWidth: 310
|
|
2269
|
+
} : typeof e.width == "number" ? {
|
|
2270
|
+
width: e.width,
|
|
2271
|
+
minWidth: e.width,
|
|
2272
|
+
maxWidth: e.width
|
|
2273
|
+
} : {
|
|
2274
|
+
minWidth: 120,
|
|
2275
|
+
maxWidth: 310
|
|
2276
|
+
};
|
|
2277
|
+
return t ? {
|
|
2278
|
+
...n,
|
|
2279
|
+
[t.side]: t.offset
|
|
2280
|
+
} : n;
|
|
2281
|
+
}
|
|
2282
|
+
function ht({ columns: e, data: t, getRowId: o, defaultVisibleColumns: s, limit: c, skip: d, total: f, onPaginationChange: p, limitOptions: m = [
|
|
2283
|
+
10,
|
|
2284
|
+
20,
|
|
2285
|
+
50
|
|
2286
|
+
], loading: h = !1, stickyLeft: g, stickyRight: _, renderActions: v, actionsKey: y = "actions", actionsHeader: b = "Actions", columnOrder: x, onColumnOrderChange: S, enableColumnReorder: ee, showColumnToggle: C = !0, columnsLabel: w = "Columns", showIndex: te = !1, indexHeader: ne = "#", indexWidth: T = 56, renderIndex: E, fieldClassNames: re, classNames: D }) {
|
|
2287
|
+
let O = (ee ?? typeof S == "function") && typeof S == "function", k = i(null), [A, j] = a(null), M = c !== void 0 && d !== void 0 && typeof p == "function", [ie, ae] = a(m[0] ?? 10), [oe, se] = a(0), [N, P] = a(() => ut(e, s)), F = M ? c : ie, I = M ? d : oe, L = r(() => pt(e, v, y, b), [
|
|
2288
|
+
e,
|
|
2289
|
+
v,
|
|
2290
|
+
y,
|
|
2291
|
+
b
|
|
2292
|
+
]), R = r(() => ft(L, g, _), [
|
|
2293
|
+
L,
|
|
2294
|
+
g,
|
|
2295
|
+
_
|
|
2296
|
+
]), z = r(() => {
|
|
2297
|
+
let e = et(R.map((e) => e.key), x), t = new Map(R.map((e) => [e.key, e]));
|
|
2298
|
+
return e.map((e) => t.get(e)).filter((e) => !!e);
|
|
2299
|
+
}, [R, x]), B = r(() => te ? {
|
|
2300
|
+
key: st,
|
|
2301
|
+
header: ne,
|
|
2302
|
+
width: T,
|
|
2303
|
+
sticky: g?.includes("__see_table_index__") ? "left" : void 0,
|
|
2304
|
+
cell: (e, t) => {
|
|
2305
|
+
let n = I + t + 1;
|
|
2306
|
+
return E ? E(e, t, n) : n;
|
|
2307
|
+
}
|
|
2308
|
+
} : null, [
|
|
2309
|
+
te,
|
|
2310
|
+
ne,
|
|
2311
|
+
T,
|
|
2312
|
+
g,
|
|
2313
|
+
I,
|
|
2314
|
+
E
|
|
2315
|
+
]), V = r(() => {
|
|
2316
|
+
let e = z.filter((e) => N.has(e.key));
|
|
2317
|
+
return B ? [B, ...e] : e;
|
|
2318
|
+
}, [
|
|
2319
|
+
z,
|
|
2320
|
+
N,
|
|
2321
|
+
B
|
|
2322
|
+
]), ce = r(() => et(R.map((e) => e.key), x), [R, x]), H = r(() => z.map((e) => ({
|
|
2323
|
+
key: e.key,
|
|
2324
|
+
label: e.header
|
|
2325
|
+
})), [z]);
|
|
2326
|
+
function le(e, t) {
|
|
2327
|
+
O && e !== "__see_table_index__" && (k.current = e, t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", e));
|
|
2328
|
+
}
|
|
2329
|
+
function ue(e, t) {
|
|
2330
|
+
O && k.current && e !== "__see_table_index__" && (t.preventDefault(), t.stopPropagation(), t.dataTransfer.dropEffect = "move", A !== e && j(e));
|
|
2331
|
+
}
|
|
2332
|
+
function de(e, t) {
|
|
2333
|
+
if (!O || e === "__see_table_index__") return;
|
|
2334
|
+
t.preventDefault(), t.stopPropagation();
|
|
2335
|
+
let n = k.current ?? t.dataTransfer.getData("text/plain");
|
|
2336
|
+
k.current = null, j(null), n && n !== e && n !== "__see_table_index__" && S(tt(ce, n, e));
|
|
2337
|
+
}
|
|
2338
|
+
function U() {
|
|
2339
|
+
k.current = null, j(null);
|
|
2340
|
+
}
|
|
2341
|
+
let W = it({
|
|
2342
|
+
dataLength: t.length,
|
|
2343
|
+
limit: F,
|
|
2344
|
+
skip: I,
|
|
2345
|
+
total: f
|
|
2346
|
+
}), G = M ? t : rt(t, W.skip, W.limit), K = i({}), [q, fe] = a({});
|
|
2347
|
+
n(() => {
|
|
2348
|
+
let e = V.filter((e) => e.sticky || e.width === "auto").map((e) => K.current[e.key]).filter((e) => !!e);
|
|
2349
|
+
if (e.length === 0) return;
|
|
2350
|
+
let t = () => {
|
|
2351
|
+
let e = {};
|
|
2352
|
+
for (let t of V) {
|
|
2353
|
+
let n = K.current[t.key];
|
|
2354
|
+
if (!n) continue;
|
|
2355
|
+
let r = n.closest("table")?.querySelector(`tbody tr td:nth-child(${Array.from(n.parentElement?.children ?? []).indexOf(n) + 1})`), i = Math.ceil((r ?? n).getBoundingClientRect().width);
|
|
2356
|
+
i > 0 && (e[t.key] = i);
|
|
2357
|
+
}
|
|
2358
|
+
fe((t) => {
|
|
2359
|
+
let n = Object.keys(e);
|
|
2360
|
+
return n.length === Object.keys(t).length && n.every((n) => t[n] === e[n]) ? t : e;
|
|
2361
|
+
});
|
|
2362
|
+
};
|
|
2363
|
+
t();
|
|
2364
|
+
let n = new ResizeObserver(t);
|
|
2365
|
+
for (let t of e) n.observe(t);
|
|
2366
|
+
return () => n.disconnect();
|
|
2367
|
+
}, [
|
|
2368
|
+
V,
|
|
2369
|
+
G,
|
|
2370
|
+
h,
|
|
2371
|
+
v
|
|
2372
|
+
]);
|
|
2373
|
+
let pe = r(() => ot(V, q), [V, q]);
|
|
2374
|
+
function me(e) {
|
|
2375
|
+
M ? p(e) : (ae(e.limit), se(e.skip));
|
|
2376
|
+
}
|
|
2377
|
+
return /* @__PURE__ */ u("div", {
|
|
2378
|
+
className: $("flex w-full flex-col gap-2", D?.root),
|
|
2379
|
+
children: [/* @__PURE__ */ l("div", {
|
|
2380
|
+
className: $("w-full overflow-auto rounded border border-zinc-200/70", "scrollbar-none [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", D?.tableWrapper),
|
|
2381
|
+
children: /* @__PURE__ */ u("table", {
|
|
2382
|
+
className: $("min-w-full border-collapse text-left text-sm text-zinc-500", D?.table),
|
|
2383
|
+
children: [/* @__PURE__ */ l("thead", {
|
|
2384
|
+
className: $("bg-zinc-50", D?.thead),
|
|
2385
|
+
children: /* @__PURE__ */ l("tr", { children: V.map((e) => {
|
|
2386
|
+
let t = pe[e.key];
|
|
2387
|
+
return /* @__PURE__ */ l("th", {
|
|
2388
|
+
ref: (t) => {
|
|
2389
|
+
K.current[e.key] = t;
|
|
2390
|
+
},
|
|
2391
|
+
draggable: O && e.key !== "__see_table_index__",
|
|
2392
|
+
onDragStart: (t) => le(e.key, t),
|
|
2393
|
+
onDragOver: (t) => ue(e.key, t),
|
|
2394
|
+
onDrop: (t) => de(e.key, t),
|
|
2395
|
+
onDragEnd: U,
|
|
2396
|
+
className: $("whitespace-nowrap border-b border-zinc-200 p-3", e.width !== "auto" && typeof e.width != "number" && "overflow-hidden text-ellipsis", O && e.key !== "__see_table_index__" && "cursor-grab active:cursor-grabbing select-none", A === e.key && O && e.key !== "__see_table_index__" && "bg-zinc-200 ring-1 ring-inset ring-zinc-300", t && "sticky z-20 isolate bg-zinc-50", t?.side === "left" && "shadow-[4px_0_8px_-4px_rgba(0,0,0,0.15)]", t?.side === "right" && "shadow-[-4px_0_8px_-4px_rgba(0,0,0,0.15)]", D?.th, e.className, "font-medium"),
|
|
2397
|
+
style: mt(e, t),
|
|
2398
|
+
children: /* @__PURE__ */ u("span", {
|
|
2399
|
+
className: "inline-flex items-center gap-1.5",
|
|
2400
|
+
children: [O && e.key !== "__see_table_index__" ? /* @__PURE__ */ l(We, { className: "shrink-0 text-zinc-400" }) : null, /* @__PURE__ */ l("span", { children: e.header })]
|
|
2401
|
+
})
|
|
2402
|
+
}, e.key);
|
|
2403
|
+
}) })
|
|
2404
|
+
}), /* @__PURE__ */ l("tbody", {
|
|
2405
|
+
className: D?.tbody,
|
|
2406
|
+
children: h ? /* @__PURE__ */ l($e, {
|
|
2407
|
+
rowCount: W.limit,
|
|
2408
|
+
columnCount: V.length,
|
|
2409
|
+
className: D?.skeleton
|
|
2410
|
+
}) : G.map((e, t) => {
|
|
2411
|
+
let n = o?.(e, t) ?? String(W.skip + t);
|
|
2412
|
+
return /* @__PURE__ */ l("tr", {
|
|
2413
|
+
className: $("group bg-white", D?.tr),
|
|
2414
|
+
children: V.map((n) => {
|
|
2415
|
+
let r = pe[n.key], i = n.cell ? n.cell(e, t) : e[n.key], a = re?.[n.key], o = typeof a == "function" ? a(e, t) : a;
|
|
2416
|
+
return /* @__PURE__ */ l("td", {
|
|
2417
|
+
className: $("border-b border-zinc-100/80 px-3 py-2 text-zinc-500 transition-colors group-hover:bg-zinc-50", n.width !== "auto" && typeof n.width != "number" && "overflow-hidden text-ellipsis whitespace-nowrap", r && "sticky z-10 isolate bg-white group-hover:bg-zinc-50", r?.side === "left" && "shadow-[4px_0_8px_-4px_rgba(0,0,0,0.15)]", r?.side === "right" && "shadow-[-4px_0_8px_-4px_rgba(0,0,0,0.15)]", D?.td, n.className, o),
|
|
2418
|
+
style: mt(n, r),
|
|
2419
|
+
children: i
|
|
2420
|
+
}, n.key);
|
|
2421
|
+
})
|
|
2422
|
+
}, n);
|
|
2423
|
+
})
|
|
2424
|
+
})]
|
|
2425
|
+
})
|
|
2426
|
+
}), /* @__PURE__ */ l(Qe, {
|
|
2427
|
+
className: D?.pagination,
|
|
2428
|
+
skip: W.skip,
|
|
2429
|
+
limit: W.limit,
|
|
2430
|
+
total: W.total,
|
|
2431
|
+
limitOptions: m,
|
|
2432
|
+
onChange: me,
|
|
2433
|
+
startAddon: C ? /* @__PURE__ */ l(Ue, {
|
|
2434
|
+
className: D?.columnToggle,
|
|
2435
|
+
label: w,
|
|
2436
|
+
columns: H,
|
|
2437
|
+
visibleKeys: N,
|
|
2438
|
+
onChange: P
|
|
2439
|
+
}) : void 0
|
|
2440
|
+
})]
|
|
2441
|
+
});
|
|
2442
|
+
}
|
|
2443
|
+
//#endregion
|
|
2444
|
+
export { lt as DEFAULT_COL_MAX_WIDTH, ct as DEFAULT_COL_MIN_WIDTH, st as INDEX_COLUMN_KEY, ht as SeeTable };
|