@kingsimba/nc-ui 0.1.39 → 0.1.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +840 -819
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var ht = Object.defineProperty;
|
|
2
2
|
var mt = (e, t, n) => t in e ? ht(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
-
var
|
|
4
|
-
import { jsx as s, jsxs as
|
|
3
|
+
var se = (e, t, n) => mt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { jsx as s, jsxs as A, Fragment as Pe } from "react/jsx-runtime";
|
|
5
5
|
import { d as Le, E as gt, R as bt, T as vt, g as wt, V as yt, b as xt, a as kt, c as Nt } from "./GeneratedIcons-HFZmBTBT.js";
|
|
6
|
-
import ze, { useState as E, useRef as
|
|
6
|
+
import ze, { useState as E, useRef as Y, useEffect as V, useMemo as Ie, createContext as ge, useContext as ae, Children as At, isValidElement as St, forwardRef as Ct, useImperativeHandle as Mt, useCallback as X, Suspense as It } from "react";
|
|
7
7
|
import { createPortal as Ae } from "react-dom";
|
|
8
|
-
import { useTranslation as
|
|
8
|
+
import { useTranslation as oe } from "react-i18next";
|
|
9
9
|
import $t from "i18next";
|
|
10
10
|
import { c as Rt } from "./clsx-OuTLNxxd.js";
|
|
11
11
|
function Qe({
|
|
@@ -37,8 +37,8 @@ function Qe({
|
|
|
37
37
|
);
|
|
38
38
|
return n ? /* @__PURE__ */ s("div", { className: "nc-activity-indicator-overlay", children: o }) : o;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
const
|
|
40
|
+
function ne({ variant: e = "default", block: t, size: n = "default", appearance: r = "default", className: o, disabled: i, textSelectable: a, loading: c, onClick: l, children: u, ...f }) {
|
|
41
|
+
const w = [
|
|
42
42
|
"nc-button",
|
|
43
43
|
e !== "default" ? `nc-${e}` : "",
|
|
44
44
|
t ? "nc-block" : "",
|
|
@@ -50,19 +50,19 @@ function te({ variant: e = "default", block: t, size: n = "default", appearance:
|
|
|
50
50
|
c ? "nc-loading" : "",
|
|
51
51
|
o ?? ""
|
|
52
52
|
].filter(Boolean).join(" ");
|
|
53
|
-
return /* @__PURE__ */
|
|
53
|
+
return /* @__PURE__ */ A(
|
|
54
54
|
"button",
|
|
55
55
|
{
|
|
56
|
-
className:
|
|
56
|
+
className: w,
|
|
57
57
|
disabled: i || c,
|
|
58
|
-
onClick: (
|
|
58
|
+
onClick: (g) => {
|
|
59
59
|
if (!c) {
|
|
60
60
|
if (a) {
|
|
61
|
-
const
|
|
62
|
-
if (
|
|
61
|
+
const k = window.getSelection();
|
|
62
|
+
if (k && k.toString().length > 0)
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
|
-
l == null || l(
|
|
65
|
+
l == null || l(g);
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
...f,
|
|
@@ -98,12 +98,12 @@ function Un({
|
|
|
98
98
|
className: c = "",
|
|
99
99
|
style: l
|
|
100
100
|
}) {
|
|
101
|
-
const u = i ?? /* @__PURE__ */
|
|
101
|
+
const u = i ?? /* @__PURE__ */ A(Pe, { children: [
|
|
102
102
|
e !== void 0 && /* @__PURE__ */ s("span", { className: "nc-alert-code", children: e }),
|
|
103
103
|
t
|
|
104
104
|
] });
|
|
105
|
-
return /* @__PURE__ */
|
|
106
|
-
/* @__PURE__ */
|
|
105
|
+
return /* @__PURE__ */ A("div", { className: `nc-alert nc-${n} ${c}`.trim(), style: l, children: [
|
|
106
|
+
/* @__PURE__ */ A("div", { className: "nc-alert-main", children: [
|
|
107
107
|
/* @__PURE__ */ s("div", { className: `nc-alert-message nc-${n}`, children: u }),
|
|
108
108
|
a && /* @__PURE__ */ s(
|
|
109
109
|
"button",
|
|
@@ -117,7 +117,7 @@ function Un({
|
|
|
117
117
|
)
|
|
118
118
|
] }),
|
|
119
119
|
r && /* @__PURE__ */ s("span", { className: "nc-alert-action", children: /* @__PURE__ */ s(
|
|
120
|
-
|
|
120
|
+
ne,
|
|
121
121
|
{
|
|
122
122
|
size: "small",
|
|
123
123
|
variant: r.variant ?? Tt[n],
|
|
@@ -136,35 +136,35 @@ function qn({
|
|
|
136
136
|
const o = Math.max(0, Math.min(1, Number(e) || 0)), i = o === 0 ? "-" : String(Math.round(o * 100));
|
|
137
137
|
let a;
|
|
138
138
|
r ? o < 0.1 ? a = "var(--nc-danger)" : o < 0.2 ? a = "var(--nc-warning)" : a = "var(--nc-success)" : a = n ? "rgba(255,255,255,0.35)" : "#000000";
|
|
139
|
-
const c = "var(--nc-battery-shell-bg)", l = 24, u = 14, f = 2,
|
|
140
|
-
return /* @__PURE__ */
|
|
139
|
+
const c = "var(--nc-battery-shell-bg)", l = 24, u = 14, f = 2, w = 0, d = 12, g = 0, k = 0, b = 0, v = l, y = u, h = y - g * 2, p = v - g * 2, m = Math.max(1, Math.min(4, y / 4)), N = o === 0 ? 0 : 0.05 + o * 0.95, C = l + f + d, P = 20, B = 0.65, S = Math.max(u, P * B), L = l + f + 1, x = (u - P * B) / 2;
|
|
140
|
+
return /* @__PURE__ */ A(
|
|
141
141
|
"svg",
|
|
142
142
|
{
|
|
143
143
|
className: "nc-battery",
|
|
144
|
-
width:
|
|
145
|
-
height:
|
|
146
|
-
viewBox: `0 0 ${
|
|
144
|
+
width: C,
|
|
145
|
+
height: S,
|
|
146
|
+
viewBox: `0 0 ${C} ${S}`,
|
|
147
147
|
role: "img",
|
|
148
148
|
"aria-label": `Battery ${i === "-" ? "-" : `${i}%`} ${t}`,
|
|
149
149
|
children: [
|
|
150
|
-
/* @__PURE__ */ s("defs", { children: /* @__PURE__ */ s("mask", { id: `nc-battery-fill-mask-${o}`, children: /* @__PURE__ */ s("rect", { x: "0", y: "0", width: p *
|
|
150
|
+
/* @__PURE__ */ s("defs", { children: /* @__PURE__ */ s("mask", { id: `nc-battery-fill-mask-${o}`, children: /* @__PURE__ */ s("rect", { x: "0", y: "0", width: p * N, height: h, fill: "white" }) }) }),
|
|
151
151
|
/* @__PURE__ */ s(
|
|
152
152
|
"rect",
|
|
153
153
|
{
|
|
154
|
-
x:
|
|
155
|
-
y:
|
|
154
|
+
x: k,
|
|
155
|
+
y: b,
|
|
156
156
|
rx: m,
|
|
157
157
|
ry: m,
|
|
158
|
-
width:
|
|
159
|
-
height:
|
|
158
|
+
width: v,
|
|
159
|
+
height: y,
|
|
160
160
|
fill: c
|
|
161
161
|
}
|
|
162
162
|
),
|
|
163
163
|
/* @__PURE__ */ s(
|
|
164
164
|
"rect",
|
|
165
165
|
{
|
|
166
|
-
x:
|
|
167
|
-
y:
|
|
166
|
+
x: k + g,
|
|
167
|
+
y: b + g,
|
|
168
168
|
width: p,
|
|
169
169
|
height: h,
|
|
170
170
|
fill: a,
|
|
@@ -176,7 +176,7 @@ function qn({
|
|
|
176
176
|
/* @__PURE__ */ s(
|
|
177
177
|
"text",
|
|
178
178
|
{
|
|
179
|
-
x:
|
|
179
|
+
x: k + v / 2,
|
|
180
180
|
y: u - 3,
|
|
181
181
|
fontSize: 11,
|
|
182
182
|
fontWeight: "bold",
|
|
@@ -188,7 +188,7 @@ function qn({
|
|
|
188
188
|
/* @__PURE__ */ s(
|
|
189
189
|
"rect",
|
|
190
190
|
{
|
|
191
|
-
x: l +
|
|
191
|
+
x: l + w,
|
|
192
192
|
y: u * 0.26,
|
|
193
193
|
width: f,
|
|
194
194
|
height: u * 0.48,
|
|
@@ -197,7 +197,7 @@ function qn({
|
|
|
197
197
|
fill: o === 1 ? a : c
|
|
198
198
|
}
|
|
199
199
|
),
|
|
200
|
-
t === "charging" ? /* @__PURE__ */ s("g", { transform: `translate(${
|
|
200
|
+
t === "charging" ? /* @__PURE__ */ s("g", { transform: `translate(${L}, ${x}) scale(${B})`, fill: a, children: /* @__PURE__ */ s("path", { d: "M10 0 L2 11 H8 L5 20 L14 8 H8 L10 0 Z" }) }) : null
|
|
201
201
|
]
|
|
202
202
|
}
|
|
203
203
|
);
|
|
@@ -224,7 +224,7 @@ function Xn({
|
|
|
224
224
|
);
|
|
225
225
|
}) });
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function Et({ size: e }) {
|
|
228
228
|
return /* @__PURE__ */ s("svg", { className: `nc-checkbox-icon ${e === "small" ? "nc-small" : ""}`, viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ s(
|
|
229
229
|
"path",
|
|
230
230
|
{
|
|
@@ -238,7 +238,7 @@ function Pt({ size: e }) {
|
|
|
238
238
|
}
|
|
239
239
|
function Jn({ checked: e, onChange: t, disabled: n, label: r, size: o = "default", labelColor: i, style: a, className: c = "" }) {
|
|
240
240
|
const l = o === "small";
|
|
241
|
-
return /* @__PURE__ */
|
|
241
|
+
return /* @__PURE__ */ A(
|
|
242
242
|
"label",
|
|
243
243
|
{
|
|
244
244
|
className: `nc-checkbox-label ${l ? "nc-small" : ""} ${n ? "nc-disabled" : ""} ${c}`.trim(),
|
|
@@ -257,7 +257,7 @@ function Jn({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
|
|
|
257
257
|
onKeyDown: (u) => {
|
|
258
258
|
n || (u.key === "Enter" || u.key === " ") && (u.preventDefault(), t(!e));
|
|
259
259
|
},
|
|
260
|
-
children: e && /* @__PURE__ */ s(
|
|
260
|
+
children: e && /* @__PURE__ */ s(Et, { size: o })
|
|
261
261
|
}
|
|
262
262
|
),
|
|
263
263
|
r && /* @__PURE__ */ s("span", { className: "nc-checkbox-text", style: i ? { color: i } : void 0, children: r })
|
|
@@ -265,9 +265,9 @@ function Jn({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
|
|
|
265
265
|
}
|
|
266
266
|
);
|
|
267
267
|
}
|
|
268
|
-
function
|
|
269
|
-
const c =
|
|
270
|
-
return
|
|
268
|
+
function Pt({ option: e, onChange: t, selected: n, highlighted: r, small: o, renderOption: i, index: a }) {
|
|
269
|
+
const c = Y(null), { t: l } = oe(), u = e.disabled === !0;
|
|
270
|
+
return V(() => {
|
|
271
271
|
r && c.current && c.current.scrollIntoView({ block: "nearest" });
|
|
272
272
|
}, [r]), /* @__PURE__ */ s(
|
|
273
273
|
"div",
|
|
@@ -285,9 +285,9 @@ function Et({ option: e, onChange: t, selected: n, highlighted: r, small: o, ren
|
|
|
285
285
|
opacity: u ? 0.4 : void 0,
|
|
286
286
|
background: r && !u ? "rgba(59,130,246,0.18)" : n && !u ? "rgba(59,130,246,0.12)" : void 0
|
|
287
287
|
},
|
|
288
|
-
children: i ? i(e, a, !!r) : /* @__PURE__ */
|
|
288
|
+
children: i ? i(e, a, !!r) : /* @__PURE__ */ A(Pe, { children: [
|
|
289
289
|
e.label,
|
|
290
|
-
e.default && /* @__PURE__ */
|
|
290
|
+
e.default && /* @__PURE__ */ A("span", { style: { fontSize: "0.85em", color: "var(--nc-text-weak)", marginLeft: 6 }, children: [
|
|
291
291
|
"(",
|
|
292
292
|
l("common.default"),
|
|
293
293
|
")"
|
|
@@ -307,41 +307,41 @@ function Lt({
|
|
|
307
307
|
highlightedIndex: c = -1,
|
|
308
308
|
renderOption: l
|
|
309
309
|
}) {
|
|
310
|
-
const [u, f] = E({ top: 0, left: 0, width: 0 }), [
|
|
311
|
-
if (
|
|
310
|
+
const [u, f] = E({ top: 0, left: 0, width: 0 }), [w, d] = E(o), { t: g } = oe();
|
|
311
|
+
if (V(() => {
|
|
312
312
|
if (e && i.current) {
|
|
313
|
-
const
|
|
314
|
-
let
|
|
313
|
+
const b = i.current.getBoundingClientRect();
|
|
314
|
+
let v = o;
|
|
315
315
|
if (o === "bottom") {
|
|
316
|
-
const
|
|
317
|
-
|
|
316
|
+
const y = window.innerHeight - b.bottom, h = b.top;
|
|
317
|
+
y < 320 && h > y && (v = "top");
|
|
318
318
|
}
|
|
319
|
-
d(
|
|
320
|
-
top:
|
|
321
|
-
left:
|
|
322
|
-
width:
|
|
319
|
+
d(v), f({
|
|
320
|
+
top: v === "top" ? b.top - 4 : b.bottom + 4,
|
|
321
|
+
left: b.left,
|
|
322
|
+
width: b.width
|
|
323
323
|
});
|
|
324
324
|
}
|
|
325
325
|
}, [e, i, o]), !e) return null;
|
|
326
|
-
const
|
|
326
|
+
const k = /* @__PURE__ */ s(
|
|
327
327
|
"div",
|
|
328
328
|
{
|
|
329
329
|
className: "nc-combo-dropdown",
|
|
330
|
-
onMouseDown: (
|
|
330
|
+
onMouseDown: (b) => b.stopPropagation(),
|
|
331
331
|
style: {
|
|
332
332
|
position: "fixed",
|
|
333
|
-
top:
|
|
334
|
-
bottom:
|
|
333
|
+
top: w === "top" ? void 0 : u.top,
|
|
334
|
+
bottom: w === "top" ? window.innerHeight - u.top : void 0,
|
|
335
335
|
left: u.left,
|
|
336
336
|
width: u.width,
|
|
337
337
|
zIndex: 1e3,
|
|
338
338
|
maxHeight: 300,
|
|
339
339
|
overflowY: "auto"
|
|
340
340
|
},
|
|
341
|
-
children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${a ? "nc-small" : ""}`, children:
|
|
341
|
+
children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${a ? "nc-small" : ""}`, children: g("common.noResults") }) : t.map((b, v) => /* @__PURE__ */ s(Pt, { option: b, onChange: n, selected: b.value === r, highlighted: v === c, small: a, renderOption: l, index: v }, b.value))
|
|
342
342
|
}
|
|
343
343
|
);
|
|
344
|
-
return Ae(
|
|
344
|
+
return Ae(k, document.body);
|
|
345
345
|
}
|
|
346
346
|
function zt({ onClick: e, small: t }) {
|
|
347
347
|
return /* @__PURE__ */ s(
|
|
@@ -384,156 +384,156 @@ function Qn({
|
|
|
384
384
|
disabled: l,
|
|
385
385
|
label: u,
|
|
386
386
|
clearable: f = !0,
|
|
387
|
-
allowTyping:
|
|
387
|
+
allowTyping: w = !1,
|
|
388
388
|
placement: d = "bottom",
|
|
389
|
-
size:
|
|
390
|
-
appearance:
|
|
391
|
-
textAlign:
|
|
392
|
-
style:
|
|
393
|
-
className:
|
|
389
|
+
size: g = "default",
|
|
390
|
+
appearance: k = "default",
|
|
391
|
+
textAlign: b = "left",
|
|
392
|
+
style: v,
|
|
393
|
+
className: y
|
|
394
394
|
}) {
|
|
395
|
-
const [h, p] = E(!1), [m,
|
|
395
|
+
const [h, p] = E(!1), [m, N] = E(""), [C, P] = E(-1), B = Y(null), S = Y(null), L = Y(null), x = g === "small", { t: M } = oe(), z = !!o, F = w || z, [$, T] = E([]), [H, q] = E(() => {
|
|
396
396
|
if (r && e) {
|
|
397
|
-
const
|
|
398
|
-
return
|
|
397
|
+
const R = r.find((j) => j.value === e);
|
|
398
|
+
return R ? R.label : "";
|
|
399
399
|
}
|
|
400
400
|
return o && e ? e : "";
|
|
401
401
|
});
|
|
402
|
-
|
|
402
|
+
V(() => {
|
|
403
403
|
if (!e) {
|
|
404
|
-
|
|
404
|
+
q("");
|
|
405
405
|
return;
|
|
406
406
|
}
|
|
407
407
|
if (r) {
|
|
408
|
-
const
|
|
409
|
-
|
|
410
|
-
} else o &&
|
|
408
|
+
const R = r.find((j) => j.value === e);
|
|
409
|
+
R && q(R.label);
|
|
410
|
+
} else o && q(e);
|
|
411
411
|
}, [e, r, o]);
|
|
412
|
-
const
|
|
412
|
+
const O = (R, j = !1) => {
|
|
413
413
|
if (!o) return;
|
|
414
|
-
|
|
415
|
-
const
|
|
414
|
+
L.current && clearTimeout(L.current);
|
|
415
|
+
const W = async () => {
|
|
416
416
|
try {
|
|
417
|
-
const
|
|
418
|
-
|
|
417
|
+
const U = await o(R);
|
|
418
|
+
T(U), P(-1);
|
|
419
419
|
} catch {
|
|
420
|
-
|
|
420
|
+
T([]);
|
|
421
421
|
}
|
|
422
422
|
};
|
|
423
|
-
|
|
424
|
-
},
|
|
425
|
-
if (
|
|
426
|
-
const
|
|
427
|
-
return
|
|
428
|
-
}, [r, m,
|
|
429
|
-
|
|
430
|
-
h &&
|
|
431
|
-
}, [h,
|
|
423
|
+
j ? W() : L.current = setTimeout(W, 200);
|
|
424
|
+
}, _ = Ie(() => {
|
|
425
|
+
if (z) return $;
|
|
426
|
+
const R = m.toLowerCase();
|
|
427
|
+
return F ? (r || []).filter((j) => j.label.toLowerCase().includes(R)) : r || [];
|
|
428
|
+
}, [r, m, F, z, $]);
|
|
429
|
+
V(() => {
|
|
430
|
+
h && P(-1);
|
|
431
|
+
}, [h, _]), V(() => {
|
|
432
432
|
if (!f && !e && r && r.length > 0 && t) {
|
|
433
|
-
const
|
|
434
|
-
t(
|
|
433
|
+
const R = r.find((j) => j.default) || r[0];
|
|
434
|
+
t(R.value);
|
|
435
435
|
}
|
|
436
|
-
}, [f, e, r, t]),
|
|
437
|
-
function
|
|
438
|
-
var
|
|
439
|
-
|
|
436
|
+
}, [f, e, r, t]), V(() => {
|
|
437
|
+
function R(j) {
|
|
438
|
+
var W;
|
|
439
|
+
j.target instanceof Node && B.current && ((W = B.current.parentElement) != null && W.contains(j.target) || p(!1));
|
|
440
440
|
}
|
|
441
|
-
return document.addEventListener("mousedown",
|
|
441
|
+
return document.addEventListener("mousedown", R), () => document.removeEventListener("mousedown", R);
|
|
442
442
|
}, []);
|
|
443
|
-
const
|
|
444
|
-
var
|
|
445
|
-
|
|
443
|
+
const D = c ?? (r ? r.find((R) => R.value === e) : e ? { label: H, value: e } : void 0), J = D && f, le = !l && !J, pe = `nc-align-${b}`, ve = !(h && F) && !!D, de = (R, j, W = !1) => {
|
|
444
|
+
var U;
|
|
445
|
+
q(j), t == null || t(R), p(!1), N(""), W && ((U = B.current) == null || U.blur());
|
|
446
446
|
}, we = () => {
|
|
447
|
-
t == null || t(void 0),
|
|
448
|
-
}, ye = (
|
|
447
|
+
t == null || t(void 0), N(""), p(!1);
|
|
448
|
+
}, ye = (R) => {
|
|
449
449
|
if (!h) {
|
|
450
|
-
(
|
|
450
|
+
(R.key === "ArrowDown" || R.key === "ArrowUp") && (p(!0), R.preventDefault());
|
|
451
451
|
return;
|
|
452
452
|
}
|
|
453
|
-
const
|
|
454
|
-
if (
|
|
455
|
-
for (let
|
|
456
|
-
if (!
|
|
457
|
-
for (let
|
|
458
|
-
if (!
|
|
453
|
+
const j = (W, U) => {
|
|
454
|
+
if (U === 1) {
|
|
455
|
+
for (let G = W; G < _.length; G++)
|
|
456
|
+
if (!_[G].disabled) return G;
|
|
457
|
+
for (let G = 0; G < W; G++)
|
|
458
|
+
if (!_[G].disabled) return G;
|
|
459
459
|
} else {
|
|
460
|
-
for (let
|
|
461
|
-
if (!
|
|
462
|
-
for (let
|
|
463
|
-
if (!
|
|
460
|
+
for (let G = W; G >= 0; G--)
|
|
461
|
+
if (!_[G].disabled) return G;
|
|
462
|
+
for (let G = _.length - 1; G > W; G--)
|
|
463
|
+
if (!_[G].disabled) return G;
|
|
464
464
|
}
|
|
465
|
-
return
|
|
465
|
+
return W;
|
|
466
466
|
};
|
|
467
|
-
switch (
|
|
467
|
+
switch (R.key) {
|
|
468
468
|
case "ArrowDown":
|
|
469
|
-
|
|
470
|
-
const
|
|
471
|
-
return
|
|
469
|
+
R.preventDefault(), P((W) => {
|
|
470
|
+
const U = W + 1, G = U >= _.length ? 0 : U;
|
|
471
|
+
return j(G, 1);
|
|
472
472
|
});
|
|
473
473
|
break;
|
|
474
474
|
case "ArrowUp":
|
|
475
|
-
|
|
476
|
-
const
|
|
477
|
-
return
|
|
475
|
+
R.preventDefault(), P((W) => {
|
|
476
|
+
const U = W - 1, G = U < 0 ? _.length - 1 : U;
|
|
477
|
+
return j(G, -1);
|
|
478
478
|
});
|
|
479
479
|
break;
|
|
480
480
|
case "Enter":
|
|
481
|
-
|
|
481
|
+
R.preventDefault(), C >= 0 && C < _.length && !_[C].disabled && de(_[C].value, _[C].label, !0);
|
|
482
482
|
break;
|
|
483
483
|
case "Escape":
|
|
484
|
-
|
|
484
|
+
R.preventDefault(), p(!1), N("");
|
|
485
485
|
break;
|
|
486
486
|
}
|
|
487
487
|
};
|
|
488
|
-
return /* @__PURE__ */
|
|
489
|
-
u && /* @__PURE__ */ s("span", { className: `nc-label ${
|
|
490
|
-
/* @__PURE__ */
|
|
488
|
+
return /* @__PURE__ */ A("div", { className: `nc-combo-container ${k === "transparent" ? "nc-transparent" : ""} ${k === "plain" ? "nc-plain" : ""} ${h ? "nc-open" : ""} ${pe} ${y || ""}`.trim(), style: { position: "relative", ...v }, children: [
|
|
489
|
+
u && /* @__PURE__ */ s("span", { className: `nc-label ${x ? "nc-small" : ""}`, children: u }),
|
|
490
|
+
/* @__PURE__ */ A(
|
|
491
491
|
"div",
|
|
492
492
|
{
|
|
493
|
-
ref:
|
|
493
|
+
ref: S,
|
|
494
494
|
style: { position: "relative", display: "flex", alignItems: "center" },
|
|
495
|
-
onMouseDown: (
|
|
496
|
-
if (l ||
|
|
497
|
-
const
|
|
498
|
-
if (p((
|
|
499
|
-
const
|
|
500
|
-
|
|
495
|
+
onMouseDown: (R) => {
|
|
496
|
+
if (l || F && R.target === B.current) return;
|
|
497
|
+
const j = !h;
|
|
498
|
+
if (p((W) => (!W && F && D && N(D.label), !W)), z && j) {
|
|
499
|
+
const W = F && D ? D.label : "";
|
|
500
|
+
T([]), setTimeout(() => O(W, !0), 0);
|
|
501
501
|
}
|
|
502
|
-
|
|
503
|
-
var
|
|
504
|
-
(
|
|
502
|
+
F && !h && setTimeout(() => {
|
|
503
|
+
var W, U;
|
|
504
|
+
(W = B.current) == null || W.focus(), (U = B.current) == null || U.select();
|
|
505
505
|
}, 0);
|
|
506
506
|
},
|
|
507
507
|
children: [
|
|
508
508
|
/* @__PURE__ */ s(
|
|
509
509
|
"input",
|
|
510
510
|
{
|
|
511
|
-
ref:
|
|
512
|
-
className: `nc-input ${
|
|
511
|
+
ref: B,
|
|
512
|
+
className: `nc-input ${x ? "nc-small" : ""}`,
|
|
513
513
|
placeholder: n,
|
|
514
514
|
onFocus: () => {
|
|
515
|
-
if (!l &&
|
|
515
|
+
if (!l && F) {
|
|
516
516
|
p(!0);
|
|
517
|
-
const
|
|
518
|
-
|
|
519
|
-
var
|
|
520
|
-
return (
|
|
521
|
-
}, 0)),
|
|
517
|
+
const R = D ? D.label : "";
|
|
518
|
+
D && (N(R), setTimeout(() => {
|
|
519
|
+
var j;
|
|
520
|
+
return (j = B.current) == null ? void 0 : j.select();
|
|
521
|
+
}, 0)), z && (T([]), O(R, !0));
|
|
522
522
|
}
|
|
523
523
|
},
|
|
524
|
-
onChange: (
|
|
525
|
-
const
|
|
526
|
-
|
|
524
|
+
onChange: (R) => {
|
|
525
|
+
const j = R.target.value;
|
|
526
|
+
F && (N(j), z && O(j));
|
|
527
527
|
},
|
|
528
528
|
onKeyDown: ye,
|
|
529
|
-
value: h &&
|
|
530
|
-
readOnly: l || !
|
|
529
|
+
value: h && F ? m : (D == null ? void 0 : D.label) || "",
|
|
530
|
+
readOnly: l || !F,
|
|
531
531
|
style: {
|
|
532
532
|
width: "100%",
|
|
533
|
-
paddingRight: le ||
|
|
534
|
-
caretColor:
|
|
535
|
-
cursor:
|
|
536
|
-
userSelect:
|
|
533
|
+
paddingRight: le || J ? x ? 32 : 44 : 12,
|
|
534
|
+
caretColor: w ? void 0 : "transparent",
|
|
535
|
+
cursor: w ? void 0 : "pointer",
|
|
536
|
+
userSelect: w ? void 0 : "none",
|
|
537
537
|
color: ve ? "transparent" : "var(--nc-text)"
|
|
538
538
|
}
|
|
539
539
|
}
|
|
@@ -545,8 +545,8 @@ function Qn({
|
|
|
545
545
|
className: `nc-combo-overlay ${pe}`,
|
|
546
546
|
style: {
|
|
547
547
|
position: "absolute",
|
|
548
|
-
left:
|
|
549
|
-
right: le ||
|
|
548
|
+
left: x ? 8 : 12,
|
|
549
|
+
right: le || J ? x ? 12 : 24 : x ? 8 : 12,
|
|
550
550
|
top: "50%",
|
|
551
551
|
transform: "translateY(-50%)",
|
|
552
552
|
pointerEvents: "none",
|
|
@@ -554,22 +554,22 @@ function Qn({
|
|
|
554
554
|
alignItems: "center",
|
|
555
555
|
gap: 6
|
|
556
556
|
},
|
|
557
|
-
children: a &&
|
|
558
|
-
/* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${
|
|
559
|
-
(
|
|
557
|
+
children: a && D ? a(D) : /* @__PURE__ */ A(Pe, { children: [
|
|
558
|
+
/* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${x ? "nc-small" : ""}`, children: D == null ? void 0 : D.label }),
|
|
559
|
+
(D == null ? void 0 : D.default) && /* @__PURE__ */ A("span", { className: `nc-combo-overlay-default ${x ? "nc-small" : ""}`, children: [
|
|
560
560
|
"(",
|
|
561
|
-
|
|
561
|
+
M("common.default"),
|
|
562
562
|
")"
|
|
563
563
|
] })
|
|
564
564
|
] })
|
|
565
565
|
}
|
|
566
566
|
),
|
|
567
|
-
|
|
568
|
-
le && /* @__PURE__ */ s(Bt, { open: h, small:
|
|
567
|
+
J && /* @__PURE__ */ s(zt, { onClick: we, small: x }),
|
|
568
|
+
le && /* @__PURE__ */ s(Bt, { open: h, small: x })
|
|
569
569
|
]
|
|
570
570
|
}
|
|
571
571
|
),
|
|
572
|
-
/* @__PURE__ */ s(Lt, { isOpen: h, options:
|
|
572
|
+
/* @__PURE__ */ s(Lt, { isOpen: h, options: _, onSelect: de, selectedValue: e, placement: d, anchorRef: S, small: x, highlightedIndex: C, renderOption: i })
|
|
573
573
|
] });
|
|
574
574
|
}
|
|
575
575
|
function Zn({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default", title: o, "aria-label": i }) {
|
|
@@ -650,35 +650,35 @@ function rr({
|
|
|
650
650
|
anchor: o,
|
|
651
651
|
preferredDirection: i = "down"
|
|
652
652
|
}) {
|
|
653
|
-
const a =
|
|
654
|
-
if (
|
|
653
|
+
const a = Y(null), [c, l] = E({ top: 0, left: 0 }), u = o || (r == null ? void 0 : r.current);
|
|
654
|
+
if (V(() => {
|
|
655
655
|
if (!e || !u || !a.current) return;
|
|
656
|
-
const d = u.getBoundingClientRect(),
|
|
656
|
+
const d = u.getBoundingClientRect(), g = a.current.getBoundingClientRect(), k = window.innerHeight, b = window.innerWidth, v = d.bottom + 8, y = v + g.height <= k - 8;
|
|
657
657
|
let h = i;
|
|
658
|
-
(!
|
|
658
|
+
(!y && i === "down" || i === "up" && y) && (h = "up");
|
|
659
659
|
let p;
|
|
660
|
-
h === "down" ? p =
|
|
660
|
+
h === "down" ? p = v : p = d.top - g.height - 8;
|
|
661
661
|
let m = d.left;
|
|
662
|
-
m +
|
|
662
|
+
m + g.width > b - 8 && (m = d.right - g.width), l({
|
|
663
663
|
top: Math.max(8, p),
|
|
664
664
|
// Ensure minimum 8px from top
|
|
665
665
|
left: Math.max(8, m)
|
|
666
666
|
// Ensure minimum 8px from left
|
|
667
667
|
});
|
|
668
|
-
}, [e, u, i]),
|
|
668
|
+
}, [e, u, i]), V(() => {
|
|
669
669
|
if (!e) return;
|
|
670
|
-
const d = (
|
|
671
|
-
a.current && !a.current.contains(
|
|
672
|
-
},
|
|
673
|
-
|
|
670
|
+
const d = (k) => {
|
|
671
|
+
a.current && !a.current.contains(k.target) && u && !u.contains(k.target) && t();
|
|
672
|
+
}, g = (k) => {
|
|
673
|
+
k.key === "Escape" && t();
|
|
674
674
|
};
|
|
675
|
-
return document.addEventListener("mousedown", d), document.addEventListener("keydown",
|
|
676
|
-
document.removeEventListener("mousedown", d), document.removeEventListener("keydown",
|
|
675
|
+
return document.addEventListener("mousedown", d), document.addEventListener("keydown", g), () => {
|
|
676
|
+
document.removeEventListener("mousedown", d), document.removeEventListener("keydown", g);
|
|
677
677
|
};
|
|
678
678
|
}, [e, t, u]), !e) return null;
|
|
679
679
|
const f = (d) => {
|
|
680
680
|
d.type !== "separator" && !d.disabled && d.onClick && (d.onClick(), t());
|
|
681
|
-
},
|
|
681
|
+
}, w = n.some((d) => d.icon);
|
|
682
682
|
return Ae(
|
|
683
683
|
/* @__PURE__ */ s(
|
|
684
684
|
"div",
|
|
@@ -702,16 +702,16 @@ function rr({
|
|
|
702
702
|
},
|
|
703
703
|
d.id
|
|
704
704
|
);
|
|
705
|
-
const
|
|
705
|
+
const g = [
|
|
706
706
|
"nc-context-menu-item",
|
|
707
707
|
d.variant && d.variant !== "default" ? `nc-${d.variant}` : "",
|
|
708
708
|
d.disabled ? "nc-disabled" : "",
|
|
709
|
-
|
|
709
|
+
w && !d.icon ? "nc-indented" : ""
|
|
710
710
|
].filter(Boolean).join(" ");
|
|
711
|
-
return /* @__PURE__ */
|
|
711
|
+
return /* @__PURE__ */ A(
|
|
712
712
|
"button",
|
|
713
713
|
{
|
|
714
|
-
className:
|
|
714
|
+
className: g,
|
|
715
715
|
onClick: () => f(d),
|
|
716
716
|
disabled: d.disabled,
|
|
717
717
|
role: "menuitem",
|
|
@@ -730,14 +730,14 @@ function rr({
|
|
|
730
730
|
}
|
|
731
731
|
const et = ge(null);
|
|
732
732
|
function Dt() {
|
|
733
|
-
const e =
|
|
733
|
+
const e = ae(et);
|
|
734
734
|
if (!e)
|
|
735
735
|
throw new Error("useDialog must be used inside a Dialog component");
|
|
736
736
|
return e;
|
|
737
737
|
}
|
|
738
738
|
function fe({ children: e, onClick: t, ...n }) {
|
|
739
|
-
const { close: r } = Dt(), { t: o } =
|
|
740
|
-
return /* @__PURE__ */ s(
|
|
739
|
+
const { close: r } = Dt(), { t: o } = oe();
|
|
740
|
+
return /* @__PURE__ */ s(ne, { onClick: (a) => {
|
|
741
741
|
t == null || t(a), r();
|
|
742
742
|
}, ...n, children: e ?? o("common.close") });
|
|
743
743
|
}
|
|
@@ -753,54 +753,54 @@ function or({
|
|
|
753
753
|
onSave: l,
|
|
754
754
|
onDelete: u,
|
|
755
755
|
onCancel: f,
|
|
756
|
-
onConnect:
|
|
756
|
+
onConnect: w,
|
|
757
757
|
closeOnOverlay: d = !0,
|
|
758
|
-
primaryDisabled:
|
|
759
|
-
fullScreen:
|
|
760
|
-
hideTitleBar:
|
|
761
|
-
className:
|
|
762
|
-
onContentHeightChange:
|
|
758
|
+
primaryDisabled: g = !1,
|
|
759
|
+
fullScreen: k = !1,
|
|
760
|
+
hideTitleBar: b = !1,
|
|
761
|
+
className: v = "",
|
|
762
|
+
onContentHeightChange: y
|
|
763
763
|
}) {
|
|
764
|
-
const h =
|
|
765
|
-
d &&
|
|
764
|
+
const h = Y(null), p = Y(null), { t: m } = oe(), N = { close: t }, C = (S) => {
|
|
765
|
+
d && S.target === S.currentTarget && t();
|
|
766
766
|
};
|
|
767
|
-
if (
|
|
767
|
+
if (V(() => {
|
|
768
768
|
e && h.current && h.current.focus();
|
|
769
|
-
}, [e]),
|
|
770
|
-
if (!
|
|
771
|
-
const
|
|
772
|
-
for (const
|
|
773
|
-
const
|
|
774
|
-
|
|
769
|
+
}, [e]), V(() => {
|
|
770
|
+
if (!y || !p.current) return;
|
|
771
|
+
const S = new ResizeObserver((L) => {
|
|
772
|
+
for (const x of L) {
|
|
773
|
+
const M = x.contentRect.height;
|
|
774
|
+
y(M);
|
|
775
775
|
}
|
|
776
776
|
});
|
|
777
|
-
return
|
|
778
|
-
|
|
777
|
+
return S.observe(p.current), () => {
|
|
778
|
+
S.disconnect();
|
|
779
779
|
};
|
|
780
|
-
}, [
|
|
781
|
-
const
|
|
780
|
+
}, [y]), !e) return null;
|
|
781
|
+
const P = () => {
|
|
782
782
|
switch (i) {
|
|
783
783
|
case "ok":
|
|
784
|
-
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(
|
|
784
|
+
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(ne, { variant: "primary", onClick: c ?? t, disabled: g, children: m("common.ok") }) });
|
|
785
785
|
case "ok-cancel":
|
|
786
|
-
return /* @__PURE__ */
|
|
786
|
+
return /* @__PURE__ */ A("div", { className: "nc-dialog-footer", children: [
|
|
787
787
|
/* @__PURE__ */ s(fe, { onClick: f, children: m("common.cancel") }),
|
|
788
|
-
/* @__PURE__ */ s(
|
|
788
|
+
/* @__PURE__ */ s(ne, { variant: "primary", onClick: c ?? t, disabled: g, children: m("common.ok") })
|
|
789
789
|
] });
|
|
790
790
|
case "save-cancel":
|
|
791
|
-
return /* @__PURE__ */
|
|
791
|
+
return /* @__PURE__ */ A("div", { className: "nc-dialog-footer", children: [
|
|
792
792
|
/* @__PURE__ */ s(fe, { onClick: f, children: m("common.cancel") }),
|
|
793
|
-
/* @__PURE__ */ s(
|
|
793
|
+
/* @__PURE__ */ s(ne, { variant: "primary", onClick: l, disabled: g, children: m("common.save") })
|
|
794
794
|
] });
|
|
795
795
|
case "delete-cancel":
|
|
796
|
-
return /* @__PURE__ */
|
|
796
|
+
return /* @__PURE__ */ A("div", { className: "nc-dialog-footer", children: [
|
|
797
797
|
/* @__PURE__ */ s(fe, { onClick: f, children: m("common.cancel") }),
|
|
798
|
-
/* @__PURE__ */ s(
|
|
798
|
+
/* @__PURE__ */ s(ne, { variant: "danger", onClick: u, disabled: g, children: m("common.delete") })
|
|
799
799
|
] });
|
|
800
800
|
case "connect":
|
|
801
|
-
return /* @__PURE__ */
|
|
801
|
+
return /* @__PURE__ */ A("div", { className: "nc-dialog-footer", children: [
|
|
802
802
|
/* @__PURE__ */ s(fe, { onClick: f, children: m("common.cancel") }),
|
|
803
|
-
/* @__PURE__ */ s(
|
|
803
|
+
/* @__PURE__ */ s(ne, { variant: "primary", onClick: w, disabled: g, children: m("common.connect") })
|
|
804
804
|
] });
|
|
805
805
|
case "close":
|
|
806
806
|
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(fe, { variant: "primary" }) });
|
|
@@ -813,27 +813,27 @@ function or({
|
|
|
813
813
|
default:
|
|
814
814
|
return null;
|
|
815
815
|
}
|
|
816
|
-
},
|
|
816
|
+
}, B = /* @__PURE__ */ s(et.Provider, { value: N, children: /* @__PURE__ */ s("div", { className: `nc-dialog-overlay${k ? " nc-fullscreen" : ""}`, onClick: C, children: /* @__PURE__ */ A(
|
|
817
817
|
"div",
|
|
818
818
|
{
|
|
819
819
|
ref: h,
|
|
820
|
-
className: `nc-dialog-container ${
|
|
820
|
+
className: `nc-dialog-container ${v}`,
|
|
821
821
|
style: o,
|
|
822
822
|
tabIndex: -1,
|
|
823
823
|
role: "dialog",
|
|
824
824
|
"aria-modal": "true",
|
|
825
|
-
"aria-labelledby":
|
|
825
|
+
"aria-labelledby": b ? void 0 : "nc-dialog-title",
|
|
826
826
|
children: [
|
|
827
|
-
!
|
|
827
|
+
!b && /* @__PURE__ */ A("div", { className: "nc-dialog-header", children: [
|
|
828
828
|
/* @__PURE__ */ s("h3", { id: "nc-dialog-title", className: "nc-dialog-title", children: n }),
|
|
829
829
|
/* @__PURE__ */ s(Ze, { onClick: t, "aria-label": "Close dialog" })
|
|
830
830
|
] }),
|
|
831
831
|
/* @__PURE__ */ s("div", { ref: p, className: "nc-dialog-content", children: r }),
|
|
832
|
-
|
|
832
|
+
P()
|
|
833
833
|
]
|
|
834
834
|
}
|
|
835
835
|
) }) });
|
|
836
|
-
return
|
|
836
|
+
return k ? Ae(B, document.body) : B;
|
|
837
837
|
}
|
|
838
838
|
function Wt({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
|
|
839
839
|
const r = t === "small" ? 28 : 34;
|
|
@@ -904,121 +904,121 @@ function sr({
|
|
|
904
904
|
label: l,
|
|
905
905
|
clearable: u = !0,
|
|
906
906
|
type: f = "text",
|
|
907
|
-
className:
|
|
907
|
+
className: w = "",
|
|
908
908
|
size: d = "default",
|
|
909
|
-
appearance:
|
|
910
|
-
style:
|
|
911
|
-
leadingIcon:
|
|
912
|
-
showPasswordToggle:
|
|
913
|
-
multiline:
|
|
909
|
+
appearance: g = "default",
|
|
910
|
+
style: k,
|
|
911
|
+
leadingIcon: b,
|
|
912
|
+
showPasswordToggle: v = !1,
|
|
913
|
+
multiline: y = !1,
|
|
914
914
|
rows: h = 3,
|
|
915
915
|
validator: p,
|
|
916
916
|
showErrorMessage: m = !0
|
|
917
917
|
}) {
|
|
918
|
-
const
|
|
919
|
-
|
|
920
|
-
le ||
|
|
921
|
-
}, [
|
|
922
|
-
const ve = f === "password", de = ve &&
|
|
923
|
-
let
|
|
924
|
-
we && de ?
|
|
925
|
-
const
|
|
926
|
-
if (!
|
|
927
|
-
return
|
|
928
|
-
const
|
|
929
|
-
return
|
|
930
|
-
},
|
|
931
|
-
|
|
918
|
+
const N = Y(null), C = Y(null), P = Y(!1), [B, S] = E(!1), [L, x] = E(!1), [M, z] = E(!1), F = e !== void 0, [$, T] = E(t), H = F ? e : $, [q, O] = E(H), _ = p ? p(H) : null, D = !!_, J = !y && g === "plain", le = J && L, pe = le ? q : H;
|
|
919
|
+
V(() => {
|
|
920
|
+
le || O(H);
|
|
921
|
+
}, [H, le]);
|
|
922
|
+
const ve = f === "password", de = ve && v && !c && !y, we = u && pe && !c && (L || M), ye = d === "small" ? 32 : 44;
|
|
923
|
+
let R = 12;
|
|
924
|
+
we && de ? R = ye * 2 : (we || de) && (R = ye);
|
|
925
|
+
const W = b ? d === "small" ? 28 : 34 : void 0, U = () => {
|
|
926
|
+
if (!J)
|
|
927
|
+
return H;
|
|
928
|
+
const Q = q !== H;
|
|
929
|
+
return F || T(q), Q && (n == null || n(q), r == null || r(q)), q;
|
|
930
|
+
}, G = () => {
|
|
931
|
+
O(H);
|
|
932
932
|
}, ft = () => {
|
|
933
|
-
var
|
|
934
|
-
if (
|
|
935
|
-
|
|
933
|
+
var Q, ee, Ye;
|
|
934
|
+
if (J) {
|
|
935
|
+
O(""), i == null || i(), (Q = N.current) == null || Q.focus();
|
|
936
936
|
return;
|
|
937
937
|
}
|
|
938
|
-
|
|
939
|
-
}, He = (
|
|
940
|
-
if (
|
|
941
|
-
|
|
938
|
+
F || T(""), n == null || n(""), i == null || i(), y ? (ee = C.current) == null || ee.focus() : (Ye = N.current) == null || Ye.focus();
|
|
939
|
+
}, He = (Q) => {
|
|
940
|
+
if (J && Q.key === "Escape") {
|
|
941
|
+
Q.preventDefault(), P.current = !0, G(), Q.currentTarget.blur();
|
|
942
942
|
return;
|
|
943
943
|
}
|
|
944
|
-
if (
|
|
945
|
-
const
|
|
946
|
-
|
|
944
|
+
if (Q.key === "Enter" && !y) {
|
|
945
|
+
const ee = J ? U() : H;
|
|
946
|
+
J && (Q.preventDefault(), P.current = !0, Q.currentTarget.blur()), o == null || o(ee);
|
|
947
947
|
}
|
|
948
|
-
}, Ve = (
|
|
949
|
-
const
|
|
950
|
-
if (
|
|
951
|
-
|
|
948
|
+
}, Ve = (Q) => {
|
|
949
|
+
const ee = Q.target.value;
|
|
950
|
+
if (J) {
|
|
951
|
+
O(ee), n == null || n(ee);
|
|
952
952
|
return;
|
|
953
953
|
}
|
|
954
|
-
|
|
955
|
-
}, Oe = () => {
|
|
956
|
-
A(!0), q && U(K);
|
|
954
|
+
F || T(ee), n == null || n(ee);
|
|
957
955
|
}, Fe = () => {
|
|
958
|
-
|
|
959
|
-
|
|
956
|
+
x(!0), J && O(H);
|
|
957
|
+
}, Oe = () => {
|
|
958
|
+
if (J && P.current) {
|
|
959
|
+
P.current = !1, x(!1);
|
|
960
960
|
return;
|
|
961
961
|
}
|
|
962
|
-
|
|
963
|
-
}, je = `nc-input ${d === "small" ? "nc-small " : ""}${!
|
|
964
|
-
return /* @__PURE__ */
|
|
962
|
+
J && U(), x(!1);
|
|
963
|
+
}, je = `nc-input ${d === "small" ? "nc-small " : ""}${!y && g === "plain" ? "nc-plain " : ""}${D ? "nc-error " : ""}${w}`;
|
|
964
|
+
return /* @__PURE__ */ A(
|
|
965
965
|
"div",
|
|
966
966
|
{
|
|
967
967
|
className: "nc-col",
|
|
968
|
-
style: { position: "relative", flex: 1, ...
|
|
969
|
-
onMouseEnter: () =>
|
|
970
|
-
onMouseLeave: () =>
|
|
968
|
+
style: { position: "relative", flex: 1, ...k },
|
|
969
|
+
onMouseEnter: () => z(!0),
|
|
970
|
+
onMouseLeave: () => z(!1),
|
|
971
971
|
children: [
|
|
972
972
|
l && /* @__PURE__ */ s("span", { className: "nc-label", children: l }),
|
|
973
|
-
/* @__PURE__ */
|
|
974
|
-
|
|
975
|
-
|
|
973
|
+
/* @__PURE__ */ A("div", { style: { position: "relative", display: "flex", alignItems: y ? "flex-start" : "center" }, children: [
|
|
974
|
+
b && /* @__PURE__ */ s("span", { className: "nc-input-leading-icon", style: { height: y ? void 0 : "100%", top: y ? 10 : void 0 }, children: b }),
|
|
975
|
+
y ? /* @__PURE__ */ s(
|
|
976
976
|
"textarea",
|
|
977
977
|
{
|
|
978
|
-
ref:
|
|
978
|
+
ref: C,
|
|
979
979
|
className: je,
|
|
980
980
|
placeholder: a,
|
|
981
981
|
value: pe,
|
|
982
982
|
onChange: Ve,
|
|
983
983
|
onKeyDown: He,
|
|
984
|
-
onFocus:
|
|
985
|
-
onBlur:
|
|
984
|
+
onFocus: Fe,
|
|
985
|
+
onBlur: Oe,
|
|
986
986
|
readOnly: c,
|
|
987
987
|
"aria-disabled": c,
|
|
988
988
|
tabIndex: c ? -1 : void 0,
|
|
989
989
|
rows: h,
|
|
990
990
|
style: {
|
|
991
991
|
width: "100%",
|
|
992
|
-
paddingRight:
|
|
993
|
-
...
|
|
992
|
+
paddingRight: R,
|
|
993
|
+
...W !== void 0 ? { paddingLeft: W } : {}
|
|
994
994
|
}
|
|
995
995
|
}
|
|
996
996
|
) : /* @__PURE__ */ s(
|
|
997
997
|
"input",
|
|
998
998
|
{
|
|
999
|
-
ref:
|
|
1000
|
-
type: ve &&
|
|
999
|
+
ref: N,
|
|
1000
|
+
type: ve && B ? "text" : f,
|
|
1001
1001
|
className: je,
|
|
1002
1002
|
placeholder: a,
|
|
1003
1003
|
value: pe,
|
|
1004
1004
|
onChange: Ve,
|
|
1005
1005
|
onKeyDown: He,
|
|
1006
|
-
onFocus:
|
|
1007
|
-
onBlur:
|
|
1006
|
+
onFocus: Fe,
|
|
1007
|
+
onBlur: Oe,
|
|
1008
1008
|
readOnly: c,
|
|
1009
1009
|
"aria-disabled": c,
|
|
1010
1010
|
tabIndex: c ? -1 : void 0,
|
|
1011
1011
|
style: {
|
|
1012
1012
|
width: "100%",
|
|
1013
|
-
paddingRight:
|
|
1014
|
-
...
|
|
1013
|
+
paddingRight: R,
|
|
1014
|
+
...W !== void 0 ? { paddingLeft: W } : {}
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
1017
|
),
|
|
1018
1018
|
we && /* @__PURE__ */ s(Wt, { onClick: ft, size: d, rightOffset: de ? ye + 4 : 4 }),
|
|
1019
|
-
de && /* @__PURE__ */ s(Ht, { visible:
|
|
1019
|
+
de && /* @__PURE__ */ s(Ht, { visible: B, onClick: () => S(!B), size: d })
|
|
1020
1020
|
] }),
|
|
1021
|
-
|
|
1021
|
+
D && m && /* @__PURE__ */ s("span", { className: "nc-error-message", children: _ })
|
|
1022
1022
|
]
|
|
1023
1023
|
}
|
|
1024
1024
|
);
|
|
@@ -1059,8 +1059,8 @@ function ir({
|
|
|
1059
1059
|
);
|
|
1060
1060
|
}
|
|
1061
1061
|
function cr({ title: e, titleTools: t, children: n, style: r }) {
|
|
1062
|
-
return /* @__PURE__ */
|
|
1063
|
-
(e || t) && /* @__PURE__ */
|
|
1062
|
+
return /* @__PURE__ */ A("div", { className: "nc-list-group", style: r, children: [
|
|
1063
|
+
(e || t) && /* @__PURE__ */ A("div", { className: "nc-list-group-title", children: [
|
|
1064
1064
|
/* @__PURE__ */ s("div", { children: e }),
|
|
1065
1065
|
t && /* @__PURE__ */ s("div", { className: "nc-list-group-title-tools", children: t })
|
|
1066
1066
|
] }),
|
|
@@ -1074,31 +1074,31 @@ function cr({ title: e, titleTools: t, children: n, style: r }) {
|
|
|
1074
1074
|
] });
|
|
1075
1075
|
}
|
|
1076
1076
|
function ar({ values: e, onChange: t, options: n, placeholder: r = "Select…", label: o }) {
|
|
1077
|
-
const [i, a] = E(!1), [c, l] = E(""), u =
|
|
1078
|
-
|
|
1079
|
-
function d(
|
|
1080
|
-
!(
|
|
1077
|
+
const [i, a] = E(!1), [c, l] = E(""), u = Y(null), f = Ie(() => n.filter((d) => d.label.toLowerCase().includes(c.toLowerCase())), [n, c]);
|
|
1078
|
+
V(() => {
|
|
1079
|
+
function d(g) {
|
|
1080
|
+
!(g.target instanceof Node) || !u.current || u.current.contains(g.target) || a(!1);
|
|
1081
1081
|
}
|
|
1082
1082
|
return document.addEventListener("mousedown", d), () => document.removeEventListener("mousedown", d);
|
|
1083
1083
|
}, []);
|
|
1084
|
-
const
|
|
1085
|
-
e.includes(d) ? t(e.filter((
|
|
1084
|
+
const w = (d) => {
|
|
1085
|
+
e.includes(d) ? t(e.filter((g) => g !== d)) : t([...e, d]);
|
|
1086
1086
|
};
|
|
1087
|
-
return /* @__PURE__ */
|
|
1087
|
+
return /* @__PURE__ */ A("div", { ref: u, className: "nc-col", style: { position: "relative" }, children: [
|
|
1088
1088
|
o && /* @__PURE__ */ s("span", { className: "nc-label", children: o }),
|
|
1089
|
-
/* @__PURE__ */
|
|
1089
|
+
/* @__PURE__ */ A("div", { className: "nc-row", style: { flexWrap: "wrap", gap: 6, minHeight: 42, alignItems: "center", border: "1px solid var(--nc-button-border)", borderRadius: 8, background: "var(--nc-button-bg)", padding: "4px 8px" }, children: [
|
|
1090
1090
|
e.length === 0 && /* @__PURE__ */ s("span", { className: "nc-label", children: r }),
|
|
1091
1091
|
e.map((d) => {
|
|
1092
|
-
const
|
|
1093
|
-
return
|
|
1094
|
-
|
|
1092
|
+
const g = n.find((k) => k.value === d);
|
|
1093
|
+
return g ? /* @__PURE__ */ A("span", { style: { padding: "4px 8px", borderRadius: 6, display: "inline-flex", alignItems: "center", gap: 4, background: "var(--nc-button-bg)", border: "1px solid var(--nc-button-border)" }, children: [
|
|
1094
|
+
g.label,
|
|
1095
1095
|
/* @__PURE__ */ s(
|
|
1096
1096
|
"button",
|
|
1097
1097
|
{
|
|
1098
1098
|
className: "nc-button nc-ghost",
|
|
1099
1099
|
style: { padding: 0, minHeight: 0, height: 20, width: 20, display: "inline-flex", alignItems: "center", justifyContent: "center", border: "none" },
|
|
1100
|
-
onClick: () =>
|
|
1101
|
-
"aria-label": `Remove ${
|
|
1100
|
+
onClick: () => w(d),
|
|
1101
|
+
"aria-label": `Remove ${g.label}`,
|
|
1102
1102
|
children: "✕"
|
|
1103
1103
|
}
|
|
1104
1104
|
)
|
|
@@ -1115,12 +1115,12 @@ function ar({ values: e, onChange: t, options: n, placeholder: r = "Select…",
|
|
|
1115
1115
|
}
|
|
1116
1116
|
)
|
|
1117
1117
|
] }),
|
|
1118
|
-
i && /* @__PURE__ */
|
|
1118
|
+
i && /* @__PURE__ */ A("div", { className: "nc-combo-dropdown", style: { position: "absolute", top: "100%", left: 0, right: 0, zIndex: 10, marginTop: 4, boxShadow: "0 4px 12px var(--nc-shadow)" }, children: [
|
|
1119
1119
|
f.map((d) => {
|
|
1120
|
-
const
|
|
1121
|
-
return /* @__PURE__ */
|
|
1120
|
+
const g = e.includes(d.value);
|
|
1121
|
+
return /* @__PURE__ */ A("div", { className: "nc-section nc-row", style: { justifyContent: "space-between", cursor: "pointer", padding: 12 }, onMouseDown: () => w(d.value), children: [
|
|
1122
1122
|
/* @__PURE__ */ s("span", { children: d.label }),
|
|
1123
|
-
/* @__PURE__ */ s("span", { children:
|
|
1123
|
+
/* @__PURE__ */ s("span", { children: g ? "✔️" : "" })
|
|
1124
1124
|
] }, d.value);
|
|
1125
1125
|
}),
|
|
1126
1126
|
f.length === 0 && /* @__PURE__ */ s("div", { className: "nc-section nc-label", children: "No results" })
|
|
@@ -1167,171 +1167,192 @@ function lr({
|
|
|
1167
1167
|
disabled: i = !1,
|
|
1168
1168
|
size: a = "default"
|
|
1169
1169
|
}) {
|
|
1170
|
-
const [c, l] = E(!1), [u, f] = E(""), [
|
|
1171
|
-
|
|
1172
|
-
if (c &&
|
|
1173
|
-
const
|
|
1174
|
-
window.innerWidth -
|
|
1175
|
-
top:
|
|
1170
|
+
const [c, l] = E(!1), [u, f] = E(""), [w, d] = E(""), [g, k] = E({ top: 0, left: 0, width: 0, right: void 0 }), b = Y(null), v = Y(null);
|
|
1171
|
+
V(() => {
|
|
1172
|
+
if (c && b.current) {
|
|
1173
|
+
const x = b.current.getBoundingClientRect(), z = Math.max(x.width, 400);
|
|
1174
|
+
window.innerWidth - x.left < z && x.right >= z ? k({
|
|
1175
|
+
top: x.bottom + 4,
|
|
1176
1176
|
left: 0,
|
|
1177
1177
|
// Not used but type needs it, let's just use 0
|
|
1178
|
-
right: window.innerWidth -
|
|
1179
|
-
width:
|
|
1180
|
-
}) :
|
|
1181
|
-
top:
|
|
1182
|
-
left:
|
|
1178
|
+
right: window.innerWidth - x.right,
|
|
1179
|
+
width: z
|
|
1180
|
+
}) : k({
|
|
1181
|
+
top: x.bottom + 4,
|
|
1182
|
+
left: x.left,
|
|
1183
1183
|
right: void 0,
|
|
1184
|
-
width:
|
|
1184
|
+
width: z
|
|
1185
1185
|
});
|
|
1186
1186
|
}
|
|
1187
|
-
}, [c]),
|
|
1187
|
+
}, [c]), V(() => {
|
|
1188
1188
|
if (!c) return;
|
|
1189
|
-
const
|
|
1190
|
-
|
|
1189
|
+
const x = (M) => {
|
|
1190
|
+
b.current && !b.current.contains(M.target) && v.current && !v.current.contains(M.target) && l(!1);
|
|
1191
1191
|
};
|
|
1192
|
-
return document.addEventListener("mousedown",
|
|
1192
|
+
return document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
|
|
1193
1193
|
}, [c]);
|
|
1194
|
-
const
|
|
1194
|
+
const y = () => {
|
|
1195
1195
|
f(e || Ke()), d(t || Ke()), l(!0);
|
|
1196
1196
|
}, h = () => {
|
|
1197
1197
|
l(!1);
|
|
1198
1198
|
}, p = () => {
|
|
1199
|
-
const
|
|
1200
|
-
if (
|
|
1199
|
+
const x = Se(u), M = Se(w);
|
|
1200
|
+
if (x || M)
|
|
1201
1201
|
return;
|
|
1202
|
-
const
|
|
1203
|
-
|
|
1204
|
-
}, m = e && t ? `${Ge(e)} - ${Ge(t)}` : "Select month range",
|
|
1202
|
+
const z = Ne(u), F = Ne(w);
|
|
1203
|
+
z && F && (n == null || n(z, F)), l(!1);
|
|
1204
|
+
}, m = e && t ? `${Ge(e)} - ${Ge(t)}` : "Select month range", N = Se(u), C = Se(w), P = Ne(u), B = Ne(w), S = P && B && P > B, L = c ? Ae(
|
|
1205
1205
|
/* @__PURE__ */ s(
|
|
1206
1206
|
"div",
|
|
1207
1207
|
{
|
|
1208
|
-
ref:
|
|
1208
|
+
ref: v,
|
|
1209
1209
|
className: "nc-month-range-picker-popup",
|
|
1210
1210
|
style: {
|
|
1211
1211
|
position: "fixed",
|
|
1212
|
-
top:
|
|
1213
|
-
...
|
|
1214
|
-
width:
|
|
1212
|
+
top: g.top,
|
|
1213
|
+
...g.right !== void 0 ? { right: g.right } : { left: g.left },
|
|
1214
|
+
width: g.width,
|
|
1215
1215
|
zIndex: 1e3
|
|
1216
1216
|
},
|
|
1217
|
-
children: /* @__PURE__ */
|
|
1218
|
-
/* @__PURE__ */
|
|
1219
|
-
/* @__PURE__ */
|
|
1217
|
+
children: /* @__PURE__ */ A("div", { className: "nc-month-range-picker-content", children: [
|
|
1218
|
+
/* @__PURE__ */ A("div", { className: "nc-month-range-picker-row", children: [
|
|
1219
|
+
/* @__PURE__ */ A("div", { className: "nc-month-range-picker-column", children: [
|
|
1220
1220
|
/* @__PURE__ */ s("label", { className: "nc-label", children: "Start Month" }),
|
|
1221
1221
|
/* @__PURE__ */ s(
|
|
1222
1222
|
"input",
|
|
1223
1223
|
{
|
|
1224
1224
|
type: "text",
|
|
1225
|
-
className: `nc-month-input ${
|
|
1225
|
+
className: `nc-month-input ${N ? "nc-error" : ""}`,
|
|
1226
1226
|
value: u,
|
|
1227
|
-
onChange: (
|
|
1227
|
+
onChange: (x) => f(x.target.value),
|
|
1228
1228
|
placeholder: "YY-M(M) or YYYY-M(M)"
|
|
1229
1229
|
}
|
|
1230
1230
|
),
|
|
1231
|
-
|
|
1231
|
+
N && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: N })
|
|
1232
1232
|
] }),
|
|
1233
|
-
/* @__PURE__ */
|
|
1233
|
+
/* @__PURE__ */ A("div", { className: "nc-month-range-picker-column", children: [
|
|
1234
1234
|
/* @__PURE__ */ s("label", { className: "nc-label", children: "End Month" }),
|
|
1235
1235
|
/* @__PURE__ */ s(
|
|
1236
1236
|
"input",
|
|
1237
1237
|
{
|
|
1238
1238
|
type: "text",
|
|
1239
|
-
className: `nc-month-input ${
|
|
1240
|
-
value:
|
|
1241
|
-
onChange: (
|
|
1239
|
+
className: `nc-month-input ${C ? "nc-error" : ""}`,
|
|
1240
|
+
value: w,
|
|
1241
|
+
onChange: (x) => d(x.target.value),
|
|
1242
1242
|
placeholder: "YY-M(M) or YYYY-M(M)"
|
|
1243
1243
|
}
|
|
1244
1244
|
),
|
|
1245
|
-
|
|
1245
|
+
C && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: C })
|
|
1246
1246
|
] })
|
|
1247
1247
|
] }),
|
|
1248
|
-
|
|
1249
|
-
/* @__PURE__ */
|
|
1248
|
+
S && !N && !C && /* @__PURE__ */ s("div", { className: "nc-month-range-error", children: "End month must be after or equal to start month" }),
|
|
1249
|
+
/* @__PURE__ */ A("div", { className: "nc-month-range-picker-footer", children: [
|
|
1250
1250
|
/* @__PURE__ */ s(
|
|
1251
|
-
|
|
1251
|
+
ne,
|
|
1252
1252
|
{
|
|
1253
1253
|
variant: "primary",
|
|
1254
1254
|
onClick: p,
|
|
1255
|
-
disabled: !u || !
|
|
1255
|
+
disabled: !u || !w || !!N || !!C || !!S,
|
|
1256
1256
|
children: "Apply"
|
|
1257
1257
|
}
|
|
1258
1258
|
),
|
|
1259
|
-
/* @__PURE__ */ s(
|
|
1259
|
+
/* @__PURE__ */ s(ne, { variant: "ghost", onClick: h, children: "Cancel" })
|
|
1260
1260
|
] })
|
|
1261
1261
|
] })
|
|
1262
1262
|
}
|
|
1263
1263
|
),
|
|
1264
1264
|
document.body
|
|
1265
1265
|
) : null;
|
|
1266
|
-
return /* @__PURE__ */
|
|
1266
|
+
return /* @__PURE__ */ A("div", { className: `nc-month-range-picker ${a === "small" ? "nc-small " : ""}${o}`, children: [
|
|
1267
1267
|
r && /* @__PURE__ */ s("label", { className: `nc-label${a === "small" ? " nc-small" : ""}`, children: r }),
|
|
1268
1268
|
/* @__PURE__ */ s(
|
|
1269
1269
|
"button",
|
|
1270
1270
|
{
|
|
1271
|
-
ref:
|
|
1271
|
+
ref: b,
|
|
1272
1272
|
className: `nc-month-range-picker-input${a === "small" ? " nc-small" : ""}`,
|
|
1273
|
-
onClick:
|
|
1273
|
+
onClick: y,
|
|
1274
1274
|
disabled: i,
|
|
1275
1275
|
children: m
|
|
1276
1276
|
}
|
|
1277
1277
|
),
|
|
1278
|
-
|
|
1278
|
+
L
|
|
1279
1279
|
] });
|
|
1280
1280
|
}
|
|
1281
|
-
const Vt = 5,
|
|
1281
|
+
const Vt = 5, Ft = 3;
|
|
1282
1282
|
function dr({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disabled: a, className: c = "", style: l, size: u = "default" }) {
|
|
1283
|
-
const f = u === "small",
|
|
1284
|
-
const
|
|
1285
|
-
|
|
1286
|
-
},
|
|
1287
|
-
const
|
|
1288
|
-
|
|
1289
|
-
},
|
|
1290
|
-
const
|
|
1291
|
-
|
|
1292
|
-
},
|
|
1293
|
-
|
|
1294
|
-
|
|
1283
|
+
const f = u === "small", w = (String(o).split(".")[1] || "").length, d = Y(null), g = Y(!1), k = Y(null), [b, v] = E(!1), [y, h] = E(() => String(e)), p = ($) => parseFloat($.toFixed(w)), m = ($) => {
|
|
1284
|
+
const T = p($);
|
|
1285
|
+
h(String(T)), t(T);
|
|
1286
|
+
}, N = () => {
|
|
1287
|
+
const $ = e - o;
|
|
1288
|
+
n !== void 0 && $ < n || m(parseFloat($.toFixed(10)));
|
|
1289
|
+
}, C = () => {
|
|
1290
|
+
const $ = e + o;
|
|
1291
|
+
r !== void 0 && $ > r || m(parseFloat($.toFixed(10)));
|
|
1292
|
+
}, P = ($) => {
|
|
1293
|
+
const T = $.target.value;
|
|
1294
|
+
if (h(T), T === "") return;
|
|
1295
|
+
const H = parseFloat(T);
|
|
1296
|
+
isNaN(H) || t(H);
|
|
1297
|
+
}, B = () => {
|
|
1298
|
+
const $ = y;
|
|
1299
|
+
if ($ === "") {
|
|
1300
|
+
m(n !== void 0 ? n : 0);
|
|
1301
|
+
return;
|
|
1302
|
+
}
|
|
1303
|
+
const T = parseFloat($);
|
|
1304
|
+
if (isNaN(T)) {
|
|
1305
|
+
m(n !== void 0 ? n : 0);
|
|
1306
|
+
return;
|
|
1307
|
+
}
|
|
1308
|
+
let H = p(T);
|
|
1309
|
+
n !== void 0 && (H = Math.max(n, H)), r !== void 0 && (H = Math.min(r, H)), H !== T ? m(H) : h(String(H));
|
|
1310
|
+
}, S = ($) => {
|
|
1311
|
+
a || $.button !== 0 || (g.current = !1, d.current = {
|
|
1312
|
+
startY: $.clientY,
|
|
1295
1313
|
startValue: e,
|
|
1296
|
-
pointerId:
|
|
1314
|
+
pointerId: $.pointerId,
|
|
1297
1315
|
hasMoved: !1,
|
|
1298
1316
|
lastValue: e
|
|
1299
|
-
},
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
const
|
|
1304
|
-
if (
|
|
1305
|
-
const
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1317
|
+
}, k.current = setTimeout(() => {
|
|
1318
|
+
g.current = !0, v(!0);
|
|
1319
|
+
}, 200), $.currentTarget.setPointerCapture($.pointerId));
|
|
1320
|
+
}, L = ($) => {
|
|
1321
|
+
const T = d.current;
|
|
1322
|
+
if (!T || T.pointerId !== $.pointerId) return;
|
|
1323
|
+
const H = T.startY - $.clientY;
|
|
1324
|
+
if (Math.abs(H) >= Ft && (T.hasMoved = !0, g.current = !0, k.current && (clearTimeout(k.current), k.current = null), v(!0)), !T.hasMoved) return;
|
|
1325
|
+
const q = Math.trunc(H / Vt);
|
|
1326
|
+
let O = T.startValue + q * o;
|
|
1327
|
+
n !== void 0 && (O = Math.max(n, O)), r !== void 0 && (O = Math.min(r, O)), O = p(O), O !== T.lastValue && (T.lastValue = O, h(String(O)), t(O));
|
|
1328
|
+
}, x = ($) => {
|
|
1329
|
+
const T = d.current;
|
|
1330
|
+
!T || T.pointerId !== $.pointerId || (k.current && (clearTimeout(k.current), k.current = null), $.currentTarget.hasPointerCapture($.pointerId) && $.currentTarget.releasePointerCapture($.pointerId), d.current = null, v(!1));
|
|
1331
|
+
}, M = ($) => (T) => {
|
|
1332
|
+
if (g.current) {
|
|
1333
|
+
g.current = !1, T.preventDefault();
|
|
1314
1334
|
return;
|
|
1315
1335
|
}
|
|
1316
|
-
|
|
1317
|
-
};
|
|
1318
|
-
return /* @__PURE__ */
|
|
1336
|
+
$();
|
|
1337
|
+
}, z = y === "" ? NaN : parseFloat(y), F = y === "" || isNaN(z) || n !== void 0 && z < n || r !== void 0 && z > r;
|
|
1338
|
+
return /* @__PURE__ */ A("div", { className: `nc-col nc-number-input-col ${f ? "nc-small" : ""}`, children: [
|
|
1319
1339
|
i && /* @__PURE__ */ s("span", { className: `nc-label ${f ? "nc-small" : ""}`, children: i }),
|
|
1320
|
-
/* @__PURE__ */
|
|
1340
|
+
/* @__PURE__ */ A("div", { className: `nc-number-input-container ${f ? "nc-small" : ""} ${c}`, style: l, children: [
|
|
1321
1341
|
/* @__PURE__ */ s(
|
|
1322
1342
|
"input",
|
|
1323
1343
|
{
|
|
1324
|
-
className: `nc-input nc-number-input ${f ? "nc-small" : ""}`,
|
|
1344
|
+
className: `nc-input nc-number-input ${f ? "nc-small" : ""} ${F ? "nc-error" : ""}`,
|
|
1325
1345
|
type: "number",
|
|
1326
|
-
value:
|
|
1327
|
-
onChange:
|
|
1346
|
+
value: y,
|
|
1347
|
+
onChange: P,
|
|
1348
|
+
onBlur: B,
|
|
1328
1349
|
min: n,
|
|
1329
1350
|
max: r,
|
|
1330
1351
|
step: o,
|
|
1331
1352
|
disabled: a
|
|
1332
1353
|
}
|
|
1333
1354
|
),
|
|
1334
|
-
/* @__PURE__ */
|
|
1355
|
+
/* @__PURE__ */ A(
|
|
1335
1356
|
"div",
|
|
1336
1357
|
{
|
|
1337
1358
|
className: `nc-number-input-spinners ${f ? "nc-small" : ""} ${a ? "nc-disabled" : ""} ${b ? "nc-dragging" : ""}`,
|
|
@@ -1340,11 +1361,11 @@ function dr({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
|
|
|
1340
1361
|
"button",
|
|
1341
1362
|
{
|
|
1342
1363
|
className: `nc-number-input-spin nc-number-input-spin-up ${f ? "nc-small" : ""}`,
|
|
1343
|
-
onClick:
|
|
1344
|
-
onPointerDown:
|
|
1345
|
-
onPointerMove:
|
|
1346
|
-
onPointerUp:
|
|
1347
|
-
onPointerCancel:
|
|
1364
|
+
onClick: M(C),
|
|
1365
|
+
onPointerDown: S,
|
|
1366
|
+
onPointerMove: L,
|
|
1367
|
+
onPointerUp: x,
|
|
1368
|
+
onPointerCancel: x,
|
|
1348
1369
|
disabled: a || r !== void 0 && e >= r,
|
|
1349
1370
|
tabIndex: -1,
|
|
1350
1371
|
children: "▲"
|
|
@@ -1354,11 +1375,11 @@ function dr({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
|
|
|
1354
1375
|
"button",
|
|
1355
1376
|
{
|
|
1356
1377
|
className: `nc-number-input-spin nc-number-input-spin-down ${f ? "nc-small" : ""}`,
|
|
1357
|
-
onClick:
|
|
1358
|
-
onPointerDown:
|
|
1359
|
-
onPointerMove:
|
|
1360
|
-
onPointerUp:
|
|
1361
|
-
onPointerCancel:
|
|
1378
|
+
onClick: M(N),
|
|
1379
|
+
onPointerDown: S,
|
|
1380
|
+
onPointerMove: L,
|
|
1381
|
+
onPointerUp: x,
|
|
1382
|
+
onPointerCancel: x,
|
|
1362
1383
|
disabled: a || n !== void 0 && e <= n,
|
|
1363
1384
|
tabIndex: -1,
|
|
1364
1385
|
children: "▼"
|
|
@@ -1383,12 +1404,12 @@ function ur({
|
|
|
1383
1404
|
width: u = 200
|
|
1384
1405
|
}) {
|
|
1385
1406
|
const f = (d) => {
|
|
1386
|
-
const
|
|
1387
|
-
t(
|
|
1388
|
-
},
|
|
1389
|
-
return /* @__PURE__ */
|
|
1407
|
+
const g = parseFloat(d.target.value);
|
|
1408
|
+
t(g);
|
|
1409
|
+
}, w = (e - n) / (r - n) * 100;
|
|
1410
|
+
return /* @__PURE__ */ A("div", { className: "nc-col", style: { gap: 6 }, children: [
|
|
1390
1411
|
i && /* @__PURE__ */ s("span", { className: "nc-label", children: i }),
|
|
1391
|
-
/* @__PURE__ */
|
|
1412
|
+
/* @__PURE__ */ A("div", { style: { display: "flex", gap: 12, alignItems: "center" }, children: [
|
|
1392
1413
|
/* @__PURE__ */ s(
|
|
1393
1414
|
"input",
|
|
1394
1415
|
{
|
|
@@ -1402,7 +1423,7 @@ function ur({
|
|
|
1402
1423
|
disabled: a,
|
|
1403
1424
|
style: {
|
|
1404
1425
|
width: u,
|
|
1405
|
-
"--nc-slider-percentage": `${
|
|
1426
|
+
"--nc-slider-percentage": `${w}%`
|
|
1406
1427
|
}
|
|
1407
1428
|
}
|
|
1408
1429
|
),
|
|
@@ -1422,7 +1443,7 @@ function ur({
|
|
|
1422
1443
|
] })
|
|
1423
1444
|
] });
|
|
1424
1445
|
}
|
|
1425
|
-
const
|
|
1446
|
+
const Ot = ({ size: e = 24, className: t, style: n }) => /* @__PURE__ */ s("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", className: t, style: n, children: /* @__PURE__ */ s("polyline", { points: "18 15 12 9 6 15" }) });
|
|
1426
1447
|
function jt({ children: e, className: t = "", style: n }) {
|
|
1427
1448
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panel ${t}`, style: n, children: e });
|
|
1428
1449
|
}
|
|
@@ -1448,88 +1469,88 @@ function pr({ active: e, children: t, keepMounted: n = !1, className: r = "", st
|
|
|
1448
1469
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: a });
|
|
1449
1470
|
}
|
|
1450
1471
|
function fr({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, className: i, toolbar: a, multiline: c, orientation: l = "horizontal", style: u }) {
|
|
1451
|
-
const f =
|
|
1452
|
-
|
|
1453
|
-
const
|
|
1472
|
+
const f = Y(null), [w, d] = E(!1), [g, k] = E(!1), b = l === "verticalLeft" || l === "verticalRight", v = Y(!1), y = Y(0), h = Y(0), p = Y(!1);
|
|
1473
|
+
V(() => {
|
|
1474
|
+
const S = () => {
|
|
1454
1475
|
if (f.current)
|
|
1455
|
-
if (
|
|
1456
|
-
const { scrollTop:
|
|
1457
|
-
d(
|
|
1476
|
+
if (b) {
|
|
1477
|
+
const { scrollTop: x, scrollHeight: M, clientHeight: z } = f.current;
|
|
1478
|
+
d(x > 1), k(x < M - z - 1);
|
|
1458
1479
|
} else {
|
|
1459
|
-
const { scrollLeft:
|
|
1460
|
-
d(
|
|
1480
|
+
const { scrollLeft: x, scrollWidth: M, clientWidth: z } = f.current;
|
|
1481
|
+
d(x > 1), k(x < M - z - 1);
|
|
1461
1482
|
}
|
|
1462
|
-
},
|
|
1463
|
-
if (
|
|
1464
|
-
return
|
|
1465
|
-
|
|
1483
|
+
}, L = f.current;
|
|
1484
|
+
if (L)
|
|
1485
|
+
return S(), L.addEventListener("scroll", S), window.addEventListener("resize", S), () => {
|
|
1486
|
+
L.removeEventListener("scroll", S), window.removeEventListener("resize", S);
|
|
1466
1487
|
};
|
|
1467
|
-
}, [e,
|
|
1468
|
-
const m = (
|
|
1469
|
-
f.current && (
|
|
1470
|
-
},
|
|
1471
|
-
if (!
|
|
1472
|
-
const
|
|
1473
|
-
Math.abs(
|
|
1474
|
-
},
|
|
1475
|
-
f.current && (
|
|
1476
|
-
},
|
|
1477
|
-
|
|
1488
|
+
}, [e, b]);
|
|
1489
|
+
const m = (S) => {
|
|
1490
|
+
f.current && (v.current = !0, p.current = !1, y.current = b ? S.clientY : S.clientX, h.current = b ? f.current.scrollTop : f.current.scrollLeft, f.current.style.cursor = "grabbing", f.current.style.userSelect = "none");
|
|
1491
|
+
}, N = (S) => {
|
|
1492
|
+
if (!v.current || !f.current) return;
|
|
1493
|
+
const L = b ? S.clientY : S.clientX, x = y.current - L;
|
|
1494
|
+
Math.abs(x) > 3 && (p.current = !0), b ? f.current.scrollTop = h.current + x : f.current.scrollLeft = h.current + x;
|
|
1495
|
+
}, C = () => {
|
|
1496
|
+
f.current && (v.current = !1, f.current.style.cursor = "", f.current.style.userSelect = "");
|
|
1497
|
+
}, P = () => {
|
|
1498
|
+
C();
|
|
1478
1499
|
};
|
|
1479
|
-
|
|
1480
|
-
const
|
|
1481
|
-
if (!
|
|
1482
|
-
const
|
|
1483
|
-
|
|
1500
|
+
V(() => {
|
|
1501
|
+
const S = f.current;
|
|
1502
|
+
if (!S || b) return;
|
|
1503
|
+
const L = (x) => {
|
|
1504
|
+
x.deltaY !== 0 && (x.preventDefault(), S.scrollLeft += x.deltaY * 0.3);
|
|
1484
1505
|
};
|
|
1485
|
-
return
|
|
1486
|
-
|
|
1506
|
+
return S.addEventListener("wheel", L, { passive: !1 }), () => {
|
|
1507
|
+
S.removeEventListener("wheel", L);
|
|
1487
1508
|
};
|
|
1488
|
-
}, [
|
|
1489
|
-
const
|
|
1490
|
-
p.current || n(
|
|
1509
|
+
}, [b]);
|
|
1510
|
+
const B = (S) => {
|
|
1511
|
+
p.current || n(S);
|
|
1491
1512
|
};
|
|
1492
|
-
return /* @__PURE__ */
|
|
1493
|
-
/* @__PURE__ */
|
|
1494
|
-
|
|
1513
|
+
return /* @__PURE__ */ A("div", { className: `nc-tab-container ${b ? `nc-vertical nc-${l}` : ""} ${i || ""}`, style: u, children: [
|
|
1514
|
+
/* @__PURE__ */ A("div", { className: "nc-tab-scroll-wrapper", children: [
|
|
1515
|
+
w && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${b ? "nc-top" : "nc-left"}`, children: b ? /* @__PURE__ */ s(Ot, { size: 16 }) : /* @__PURE__ */ s(xt, { size: 16 }) }),
|
|
1495
1516
|
/* @__PURE__ */ s(
|
|
1496
1517
|
"div",
|
|
1497
1518
|
{
|
|
1498
1519
|
ref: f,
|
|
1499
1520
|
className: `nc-tab-scroll ${c ? "nc-multiline" : ""}`,
|
|
1500
1521
|
onMouseDown: m,
|
|
1501
|
-
onMouseMove:
|
|
1502
|
-
onMouseUp:
|
|
1503
|
-
onMouseLeave:
|
|
1522
|
+
onMouseMove: N,
|
|
1523
|
+
onMouseUp: C,
|
|
1524
|
+
onMouseLeave: P,
|
|
1504
1525
|
style: { cursor: "grab" },
|
|
1505
|
-
children: e.map((
|
|
1506
|
-
const
|
|
1507
|
-
return /* @__PURE__ */
|
|
1526
|
+
children: e.map((S) => {
|
|
1527
|
+
const L = typeof S == "string" ? S : S.id, x = typeof S == "string" ? S : S.label, M = r && !(o != null && o.includes(L));
|
|
1528
|
+
return /* @__PURE__ */ A(
|
|
1508
1529
|
"div",
|
|
1509
1530
|
{
|
|
1510
|
-
className: `nc-tab-item ${t ===
|
|
1511
|
-
onClick: () =>
|
|
1531
|
+
className: `nc-tab-item ${t === L ? "nc-active" : ""} ${M ? "nc-closable" : ""}`,
|
|
1532
|
+
onClick: () => B(L),
|
|
1512
1533
|
role: "button",
|
|
1513
1534
|
tabIndex: 0,
|
|
1514
|
-
onKeyDown: (
|
|
1515
|
-
(
|
|
1535
|
+
onKeyDown: (z) => {
|
|
1536
|
+
(z.key === "Enter" || z.key === " ") && n(L);
|
|
1516
1537
|
},
|
|
1517
1538
|
children: [
|
|
1518
|
-
/* @__PURE__ */ s("span", { className: "nc-tab-label", children:
|
|
1519
|
-
|
|
1539
|
+
/* @__PURE__ */ s("span", { className: "nc-tab-label", children: b ? x : typeof x == "string" ? x.toUpperCase() : x }),
|
|
1540
|
+
M && /* @__PURE__ */ s(
|
|
1520
1541
|
"span",
|
|
1521
1542
|
{
|
|
1522
1543
|
className: "nc-tab-close",
|
|
1523
1544
|
role: "button",
|
|
1524
1545
|
tabIndex: 0,
|
|
1525
|
-
"aria-label": `Close ${typeof
|
|
1526
|
-
onClick: (
|
|
1527
|
-
|
|
1546
|
+
"aria-label": `Close ${typeof x == "string" ? x : L}`,
|
|
1547
|
+
onClick: (z) => {
|
|
1548
|
+
z.stopPropagation(), r(L);
|
|
1528
1549
|
},
|
|
1529
|
-
onKeyDown: (
|
|
1530
|
-
(
|
|
1550
|
+
onKeyDown: (z) => {
|
|
1551
|
+
(z.key === "Enter" || z.key === " ") && (z.stopPropagation(), r(L));
|
|
1531
1552
|
},
|
|
1532
|
-
children: /* @__PURE__ */
|
|
1553
|
+
children: /* @__PURE__ */ A("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1533
1554
|
/* @__PURE__ */ s("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1534
1555
|
/* @__PURE__ */ s("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
1535
1556
|
] })
|
|
@@ -1537,18 +1558,18 @@ function fr({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, cla
|
|
|
1537
1558
|
)
|
|
1538
1559
|
]
|
|
1539
1560
|
},
|
|
1540
|
-
|
|
1561
|
+
L
|
|
1541
1562
|
);
|
|
1542
1563
|
})
|
|
1543
1564
|
}
|
|
1544
1565
|
),
|
|
1545
|
-
|
|
1566
|
+
g && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${b ? "nc-bottom" : "nc-right"}`, children: b ? /* @__PURE__ */ s(kt, { size: 16 }) : /* @__PURE__ */ s(Nt, { size: 16 }) })
|
|
1546
1567
|
] }),
|
|
1547
1568
|
a && /* @__PURE__ */ s("div", { className: "nc-tab-toolbar", children: a })
|
|
1548
1569
|
] });
|
|
1549
1570
|
}
|
|
1550
1571
|
function hr({ checked: e, onChange: t, disabled: n, label: r }) {
|
|
1551
|
-
return /* @__PURE__ */
|
|
1572
|
+
return /* @__PURE__ */ A(
|
|
1552
1573
|
"label",
|
|
1553
1574
|
{
|
|
1554
1575
|
className: "nc-row",
|
|
@@ -1620,11 +1641,11 @@ function Gt(e, t, n, r) {
|
|
|
1620
1641
|
const o = e.split(`
|
|
1621
1642
|
`), i = Math.max(1, Math.min(t, o.length));
|
|
1622
1643
|
let a = 0;
|
|
1623
|
-
for (let
|
|
1624
|
-
a += o[
|
|
1644
|
+
for (let w = 0; w < i - 1; w++)
|
|
1645
|
+
a += o[w].length + 1;
|
|
1625
1646
|
const l = o[i - 1].split(" "), u = Math.max(1, Math.min(n, l.length));
|
|
1626
|
-
for (let
|
|
1627
|
-
a += l[
|
|
1647
|
+
for (let w = 0; w < u - 1; w++)
|
|
1648
|
+
a += l[w].length + 1;
|
|
1628
1649
|
const f = Math.max(1, Math.min(r, l[u - 1].length + 1));
|
|
1629
1650
|
return a += f - 1, a;
|
|
1630
1651
|
}
|
|
@@ -1638,64 +1659,64 @@ function Kt(e, t) {
|
|
|
1638
1659
|
}
|
|
1639
1660
|
const mr = Ct(
|
|
1640
1661
|
function({ value: t, onChange: n, placeholder: r, className: o, style: i, showLineNumbers: a = !1, onCursorChange: c, highlightLine: l }, u) {
|
|
1641
|
-
const f =
|
|
1662
|
+
const f = Y(null), w = Y(null), d = Y(null);
|
|
1642
1663
|
Mt(u, () => ({
|
|
1643
1664
|
goToLine(h) {
|
|
1644
1665
|
const p = f.current;
|
|
1645
1666
|
if (!p) return;
|
|
1646
1667
|
const m = Kt(t, h);
|
|
1647
1668
|
p.focus(), p.setSelectionRange(m, m);
|
|
1648
|
-
const
|
|
1649
|
-
p.scrollTop = (Math.max(1, h) - 1) *
|
|
1669
|
+
const N = parseFloat(getComputedStyle(p).lineHeight) || 18;
|
|
1670
|
+
p.scrollTop = (Math.max(1, h) - 1) * N, k(), g();
|
|
1650
1671
|
},
|
|
1651
1672
|
goToPosition(h, p, m) {
|
|
1652
|
-
const
|
|
1653
|
-
if (!
|
|
1654
|
-
const
|
|
1655
|
-
|
|
1656
|
-
const
|
|
1657
|
-
|
|
1673
|
+
const N = f.current;
|
|
1674
|
+
if (!N) return;
|
|
1675
|
+
const C = Gt(t, h, p, m);
|
|
1676
|
+
N.focus(), N.setSelectionRange(C, C);
|
|
1677
|
+
const P = parseFloat(getComputedStyle(N).lineHeight) || 18;
|
|
1678
|
+
N.scrollTop = (Math.max(1, h) - 1) * P, k(), g();
|
|
1658
1679
|
}
|
|
1659
1680
|
}), [t]);
|
|
1660
|
-
const
|
|
1681
|
+
const g = X(() => {
|
|
1661
1682
|
if (!c || !f.current) return;
|
|
1662
1683
|
const h = Yt(t, f.current.selectionStart);
|
|
1663
1684
|
c(h);
|
|
1664
|
-
}, [c, t]),
|
|
1685
|
+
}, [c, t]), k = X(() => {
|
|
1665
1686
|
const h = f.current;
|
|
1666
|
-
h && (
|
|
1687
|
+
h && (w.current && (w.current.scrollTop = h.scrollTop, w.current.scrollLeft = h.scrollLeft), d.current && (d.current.scrollTop = h.scrollTop));
|
|
1667
1688
|
}, []);
|
|
1668
|
-
|
|
1689
|
+
V(() => {
|
|
1669
1690
|
if (l == null || l < 1) return;
|
|
1670
1691
|
const h = f.current;
|
|
1671
1692
|
if (!h) return;
|
|
1672
|
-
const p = parseFloat(getComputedStyle(h).lineHeight) || 18, m = (l - 1) * p,
|
|
1673
|
-
(m < h.scrollTop ||
|
|
1693
|
+
const p = parseFloat(getComputedStyle(h).lineHeight) || 18, m = (l - 1) * p, N = m + p;
|
|
1694
|
+
(m < h.scrollTop || N > h.scrollTop + h.clientHeight) && (h.scrollTop = m - h.clientHeight / 2 + p / 2), k();
|
|
1674
1695
|
}, [l]);
|
|
1675
|
-
const
|
|
1676
|
-
`).length, [t]),
|
|
1696
|
+
const b = Ie(() => t.split(`
|
|
1697
|
+
`).length, [t]), v = () => {
|
|
1677
1698
|
const h = [];
|
|
1678
|
-
for (let p = 1; p <=
|
|
1699
|
+
for (let p = 1; p <= b; p++)
|
|
1679
1700
|
h.push(
|
|
1680
1701
|
/* @__PURE__ */ s("div", { className: `nc-csv-line-number ${l === p ? "nc-csv-highlight" : ""}`, children: p }, p)
|
|
1681
1702
|
);
|
|
1682
1703
|
return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref: d, children: h });
|
|
1683
|
-
},
|
|
1684
|
-
`).map((m,
|
|
1685
|
-
const
|
|
1686
|
-
return /* @__PURE__ */
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
/* @__PURE__ */ s("span", { style: { color: _e[
|
|
1690
|
-
] },
|
|
1704
|
+
}, y = (h) => h ? h.split(`
|
|
1705
|
+
`).map((m, N) => {
|
|
1706
|
+
const C = m.split(" ");
|
|
1707
|
+
return /* @__PURE__ */ A("div", { className: `nc-csv-line ${l === N + 1 ? "nc-csv-highlight" : ""}`, children: [
|
|
1708
|
+
C.map((P, B) => /* @__PURE__ */ A("span", { children: [
|
|
1709
|
+
B > 0 && /* @__PURE__ */ s("span", { className: "nc-csv-tab-char", children: " " }),
|
|
1710
|
+
/* @__PURE__ */ s("span", { style: { color: _e[B % _e.length] }, children: P })
|
|
1711
|
+
] }, B)),
|
|
1691
1712
|
m === "" && `
|
|
1692
1713
|
`
|
|
1693
|
-
] },
|
|
1714
|
+
] }, N);
|
|
1694
1715
|
}) : null;
|
|
1695
|
-
return /* @__PURE__ */
|
|
1696
|
-
a &&
|
|
1697
|
-
/* @__PURE__ */
|
|
1698
|
-
/* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref:
|
|
1716
|
+
return /* @__PURE__ */ A("div", { className: `nc-csv-textarea-container ${a ? "nc-csv-with-gutter" : ""} ${o ?? ""}`, style: i, children: [
|
|
1717
|
+
a && v(),
|
|
1718
|
+
/* @__PURE__ */ A("div", { className: "nc-csv-textarea-editor", children: [
|
|
1719
|
+
/* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref: w, children: /* @__PURE__ */ s("pre", { className: "nc-csv-textarea-highlights", children: y(t) }) }),
|
|
1699
1720
|
/* @__PURE__ */ s(
|
|
1700
1721
|
"textarea",
|
|
1701
1722
|
{
|
|
@@ -1703,12 +1724,12 @@ const mr = Ct(
|
|
|
1703
1724
|
className: "nc-csv-textarea-input",
|
|
1704
1725
|
value: t,
|
|
1705
1726
|
onChange: (h) => {
|
|
1706
|
-
n(h.target.value), requestAnimationFrame(
|
|
1727
|
+
n(h.target.value), requestAnimationFrame(g);
|
|
1707
1728
|
},
|
|
1708
|
-
onScroll:
|
|
1709
|
-
onSelect:
|
|
1710
|
-
onKeyUp:
|
|
1711
|
-
onClick:
|
|
1729
|
+
onScroll: k,
|
|
1730
|
+
onSelect: g,
|
|
1731
|
+
onKeyUp: g,
|
|
1732
|
+
onClick: g,
|
|
1712
1733
|
placeholder: r,
|
|
1713
1734
|
spellCheck: !1,
|
|
1714
1735
|
autoComplete: "off",
|
|
@@ -1774,13 +1795,13 @@ function qt({ type: e }) {
|
|
|
1774
1795
|
}
|
|
1775
1796
|
) });
|
|
1776
1797
|
case "danger":
|
|
1777
|
-
return /* @__PURE__ */
|
|
1798
|
+
return /* @__PURE__ */ A("svg", { viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
1778
1799
|
/* @__PURE__ */ s("circle", { cx: "10", cy: "10", r: "7", stroke: "currentColor", strokeWidth: "2" }),
|
|
1779
1800
|
/* @__PURE__ */ s("path", { d: "M10 6.5v4.25", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }),
|
|
1780
1801
|
/* @__PURE__ */ s("circle", { cx: "10", cy: "13.75", r: "1", fill: "currentColor" })
|
|
1781
1802
|
] });
|
|
1782
1803
|
case "warning":
|
|
1783
|
-
return /* @__PURE__ */
|
|
1804
|
+
return /* @__PURE__ */ A("svg", { viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
1784
1805
|
/* @__PURE__ */ s(
|
|
1785
1806
|
"path",
|
|
1786
1807
|
{
|
|
@@ -1794,7 +1815,7 @@ function qt({ type: e }) {
|
|
|
1794
1815
|
/* @__PURE__ */ s("circle", { cx: "10", cy: "13.25", r: "1", fill: "currentColor" })
|
|
1795
1816
|
] });
|
|
1796
1817
|
default:
|
|
1797
|
-
return /* @__PURE__ */
|
|
1818
|
+
return /* @__PURE__ */ A("svg", { viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
1798
1819
|
/* @__PURE__ */ s("circle", { cx: "10", cy: "10", r: "7", stroke: "currentColor", strokeWidth: "2" }),
|
|
1799
1820
|
/* @__PURE__ */ s("path", { d: "M10 9v4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }),
|
|
1800
1821
|
/* @__PURE__ */ s("circle", { cx: "10", cy: "6.5", r: "1", fill: "currentColor" })
|
|
@@ -1802,7 +1823,7 @@ function qt({ type: e }) {
|
|
|
1802
1823
|
}
|
|
1803
1824
|
}
|
|
1804
1825
|
function Xt({ notification: e }) {
|
|
1805
|
-
const { t } =
|
|
1826
|
+
const { t } = oe(), n = e.type || "info", r = () => {
|
|
1806
1827
|
if (e.title) return e.title;
|
|
1807
1828
|
switch (n) {
|
|
1808
1829
|
case "success":
|
|
@@ -1821,9 +1842,9 @@ function Xt({ notification: e }) {
|
|
|
1821
1842
|
"div",
|
|
1822
1843
|
{
|
|
1823
1844
|
className: `nc-notification nc-notification-${n}`,
|
|
1824
|
-
children: /* @__PURE__ */
|
|
1845
|
+
children: /* @__PURE__ */ A("div", { className: "nc-notification-content", children: [
|
|
1825
1846
|
/* @__PURE__ */ s("div", { className: `nc-notification-icon nc-notification-icon-${n}`, children: /* @__PURE__ */ s(qt, { type: n }) }),
|
|
1826
|
-
/* @__PURE__ */
|
|
1847
|
+
/* @__PURE__ */ A("div", { className: "nc-notification-body", children: [
|
|
1827
1848
|
/* @__PURE__ */ s("div", { className: "nc-notification-title", children: r() }),
|
|
1828
1849
|
/* @__PURE__ */ s("div", { className: "nc-notification-message", children: e.message })
|
|
1829
1850
|
] }),
|
|
@@ -1841,23 +1862,23 @@ function Xt({ notification: e }) {
|
|
|
1841
1862
|
);
|
|
1842
1863
|
}
|
|
1843
1864
|
function gr() {
|
|
1844
|
-
const [e, t] = E([]), [n, r] = E(/* @__PURE__ */ new Map()), [o, i] = E(/* @__PURE__ */ new Set()), a =
|
|
1845
|
-
return
|
|
1846
|
-
const f = new Set(c.current.map((d) => d.id)),
|
|
1847
|
-
|
|
1865
|
+
const [e, t] = E([]), [n, r] = E(/* @__PURE__ */ new Map()), [o, i] = E(/* @__PURE__ */ new Set()), a = Y(null), c = Y([]);
|
|
1866
|
+
return V(() => _t((u) => {
|
|
1867
|
+
const f = new Set(c.current.map((d) => d.id)), w = u.filter((d) => !f.has(d.id)).map((d) => d.id);
|
|
1868
|
+
w.length > 0 ? (t(u), i(new Set(w)), requestAnimationFrame(() => {
|
|
1848
1869
|
requestAnimationFrame(() => {
|
|
1849
1870
|
i(/* @__PURE__ */ new Set());
|
|
1850
1871
|
});
|
|
1851
1872
|
})) : t(u), c.current = u;
|
|
1852
|
-
}), []),
|
|
1873
|
+
}), []), V(() => {
|
|
1853
1874
|
if (!a.current) return;
|
|
1854
1875
|
const l = /* @__PURE__ */ new Map();
|
|
1855
1876
|
let u = 0;
|
|
1856
1877
|
const f = a.current.children;
|
|
1857
|
-
e.forEach((
|
|
1858
|
-
if (l.set(
|
|
1859
|
-
const
|
|
1860
|
-
|
|
1878
|
+
e.forEach((w, d) => {
|
|
1879
|
+
if (l.set(w.id, u), f[d]) {
|
|
1880
|
+
const g = f[d].offsetHeight;
|
|
1881
|
+
w.isRemoving || (u += g + 12);
|
|
1861
1882
|
}
|
|
1862
1883
|
}), r(l);
|
|
1863
1884
|
}, [e]), /* @__PURE__ */ s(
|
|
@@ -1881,7 +1902,7 @@ function gr() {
|
|
|
1881
1902
|
width: "100%"
|
|
1882
1903
|
},
|
|
1883
1904
|
children: e.map((l) => {
|
|
1884
|
-
const u = o.has(l.id), f = l.isRemoving,
|
|
1905
|
+
const u = o.has(l.id), f = l.isRemoving, w = n.get(l.id) || 0;
|
|
1885
1906
|
return /* @__PURE__ */ s(
|
|
1886
1907
|
"div",
|
|
1887
1908
|
{
|
|
@@ -1889,7 +1910,7 @@ function gr() {
|
|
|
1889
1910
|
position: "absolute",
|
|
1890
1911
|
top: 0,
|
|
1891
1912
|
left: 0,
|
|
1892
|
-
transform: u ? `translate3d(-40px, ${
|
|
1913
|
+
transform: u ? `translate3d(-40px, ${w}px, 0)` : `translate3d(0, ${w}px, 0)`,
|
|
1893
1914
|
// Only animate transform when not leaving, animate opacity always
|
|
1894
1915
|
transition: f ? "opacity 300ms ease-out" : "transform 300ms ease-out, opacity 300ms ease-out",
|
|
1895
1916
|
opacity: f ? 0 : 1,
|
|
@@ -1934,7 +1955,7 @@ function vr(e) {
|
|
|
1934
1955
|
}
|
|
1935
1956
|
class Qt {
|
|
1936
1957
|
constructor() {
|
|
1937
|
-
|
|
1958
|
+
se(this, "apps", /* @__PURE__ */ new Map());
|
|
1938
1959
|
}
|
|
1939
1960
|
/**
|
|
1940
1961
|
* Register an app definition.
|
|
@@ -1975,8 +1996,8 @@ class Qt {
|
|
|
1975
1996
|
const me = new Qt(), qe = "nc-ui-app-state";
|
|
1976
1997
|
class Zt {
|
|
1977
1998
|
constructor() {
|
|
1978
|
-
|
|
1979
|
-
|
|
1999
|
+
se(this, "state");
|
|
2000
|
+
se(this, "listeners", /* @__PURE__ */ new Map());
|
|
1980
2001
|
this.state = this.loadState();
|
|
1981
2002
|
}
|
|
1982
2003
|
loadState() {
|
|
@@ -2020,13 +2041,13 @@ class Zt {
|
|
|
2020
2041
|
(r = this.listeners.get(t)) == null || r.forEach((o) => o(n));
|
|
2021
2042
|
}
|
|
2022
2043
|
}
|
|
2023
|
-
const
|
|
2044
|
+
const re = new Zt();
|
|
2024
2045
|
class en {
|
|
2025
2046
|
constructor() {
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2047
|
+
se(this, "apps", []);
|
|
2048
|
+
se(this, "activeAppId", null);
|
|
2049
|
+
se(this, "listeners", /* @__PURE__ */ new Set());
|
|
2050
|
+
se(this, "refReadyResolvers", /* @__PURE__ */ new Map());
|
|
2030
2051
|
}
|
|
2031
2052
|
/**
|
|
2032
2053
|
* Launch an app and wait for it to be ready (ref populated).
|
|
@@ -2042,12 +2063,12 @@ class en {
|
|
|
2042
2063
|
return console.error(`Cannot launch app "${t}": not registered`), null;
|
|
2043
2064
|
const o = this.apps.find((a) => a.appId === t);
|
|
2044
2065
|
if (o)
|
|
2045
|
-
return r || (this.setActiveApp(t),
|
|
2066
|
+
return r || (this.setActiveApp(t), re._setActiveAppId(t)), o.ref ? o : this.waitForRef(t);
|
|
2046
2067
|
const i = {
|
|
2047
2068
|
appId: t,
|
|
2048
2069
|
launchedAt: Date.now()
|
|
2049
2070
|
};
|
|
2050
|
-
return this.apps.push(i), r || (this.activeAppId = t,
|
|
2071
|
+
return this.apps.push(i), r || (this.activeAppId = t, re._setActiveAppId(t)), this.notify(), this.waitForRef(t);
|
|
2051
2072
|
}
|
|
2052
2073
|
waitForRef(t) {
|
|
2053
2074
|
return new Promise((n) => {
|
|
@@ -2084,7 +2105,7 @@ class en {
|
|
|
2084
2105
|
const r = this.apps[n];
|
|
2085
2106
|
if (r.ref && (r.ref = void 0), this.apps.splice(n, 1), this.activeAppId === t) {
|
|
2086
2107
|
const o = window.innerWidth >= 768;
|
|
2087
|
-
this.activeAppId = o && this.apps.length > 0 ? this.apps[this.apps.length - 1].appId : null,
|
|
2108
|
+
this.activeAppId = o && this.apps.length > 0 ? this.apps[this.apps.length - 1].appId : null, re._setActiveAppId(this.activeAppId);
|
|
2088
2109
|
}
|
|
2089
2110
|
this.notify();
|
|
2090
2111
|
}
|
|
@@ -2096,7 +2117,7 @@ class en {
|
|
|
2096
2117
|
console.warn(`Cannot activate app "${t}": not running`);
|
|
2097
2118
|
return;
|
|
2098
2119
|
}
|
|
2099
|
-
this.activeAppId !== t && (this.activeAppId = t, this.notify(),
|
|
2120
|
+
this.activeAppId !== t && (this.activeAppId = t, this.notify(), re._setActiveAppId(t));
|
|
2100
2121
|
}
|
|
2101
2122
|
/**
|
|
2102
2123
|
* Toggle an app: if active, deactivate; if inactive, activate.
|
|
@@ -2140,15 +2161,15 @@ class en {
|
|
|
2140
2161
|
this.listeners.forEach((t) => t());
|
|
2141
2162
|
}
|
|
2142
2163
|
}
|
|
2143
|
-
const
|
|
2164
|
+
const Z = new en(), nt = ge(null);
|
|
2144
2165
|
function tn() {
|
|
2145
|
-
const e =
|
|
2166
|
+
const e = ae(nt);
|
|
2146
2167
|
if (!e)
|
|
2147
2168
|
throw new Error("useApp must be used inside an App");
|
|
2148
2169
|
return e;
|
|
2149
2170
|
}
|
|
2150
2171
|
function nn({ size: e = 16 }) {
|
|
2151
|
-
return /* @__PURE__ */
|
|
2172
|
+
return /* @__PURE__ */ A(
|
|
2152
2173
|
"svg",
|
|
2153
2174
|
{
|
|
2154
2175
|
width: e,
|
|
@@ -2167,8 +2188,8 @@ function nn({ size: e = 16 }) {
|
|
|
2167
2188
|
);
|
|
2168
2189
|
}
|
|
2169
2190
|
function rn({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o }) {
|
|
2170
|
-
return /* @__PURE__ */
|
|
2171
|
-
/* @__PURE__ */
|
|
2191
|
+
return /* @__PURE__ */ A("div", { className: "nc-app-title-bar", children: [
|
|
2192
|
+
/* @__PURE__ */ A("div", { className: "nc-app-title-bar-left", children: [
|
|
2172
2193
|
n && !o && /* @__PURE__ */ s(
|
|
2173
2194
|
"button",
|
|
2174
2195
|
{
|
|
@@ -2181,7 +2202,7 @@ function rn({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o })
|
|
|
2181
2202
|
),
|
|
2182
2203
|
/* @__PURE__ */ s("span", { className: "nc-app-title-bar-title", children: e })
|
|
2183
2204
|
] }),
|
|
2184
|
-
/* @__PURE__ */
|
|
2205
|
+
/* @__PURE__ */ A("div", { className: "nc-app-title-bar-right", children: [
|
|
2185
2206
|
r && /* @__PURE__ */ s("div", { className: "nc-app-title-bar-toolbar", children: r }),
|
|
2186
2207
|
/* @__PURE__ */ s(Ze, { onClick: t, "aria-label": "Close application" })
|
|
2187
2208
|
] })
|
|
@@ -2198,57 +2219,57 @@ class on extends ze.Component {
|
|
|
2198
2219
|
console.error(`Error loading app ${this.props.appId}:`, t, n);
|
|
2199
2220
|
}
|
|
2200
2221
|
render() {
|
|
2201
|
-
return this.state.hasError ? /* @__PURE__ */
|
|
2222
|
+
return this.state.hasError ? /* @__PURE__ */ A("div", { className: "nc-app-error", children: [
|
|
2202
2223
|
/* @__PURE__ */ s("div", { children: "Failed to load app" }),
|
|
2203
2224
|
this.state.error && /* @__PURE__ */ s("div", { style: { fontSize: "12px", opacity: 0.7 }, children: this.state.error.message })
|
|
2204
2225
|
] }) : this.props.children;
|
|
2205
2226
|
}
|
|
2206
2227
|
}
|
|
2207
2228
|
function rt({ appId: e, isActive: t, onClose: n }) {
|
|
2208
|
-
const { t: r } =
|
|
2229
|
+
const { t: r } = oe(), o = me.get(e), [i, a] = E(""), [c, l] = E(null), [u, f] = E(null), [w, d] = E(!1), [g, k] = E(!1);
|
|
2209
2230
|
ze.useEffect(() => {
|
|
2210
2231
|
o != null && o.titleKey && a(r(o.titleKey));
|
|
2211
2232
|
}, [o, r]);
|
|
2212
|
-
const
|
|
2213
|
-
a(
|
|
2214
|
-
}, []),
|
|
2215
|
-
l(() =>
|
|
2216
|
-
}, []),
|
|
2233
|
+
const b = X((S) => {
|
|
2234
|
+
a(S);
|
|
2235
|
+
}, []), v = X((S) => {
|
|
2236
|
+
l(() => S);
|
|
2237
|
+
}, []), y = X(() => {
|
|
2217
2238
|
l(null);
|
|
2218
|
-
}, []), h =
|
|
2219
|
-
f(
|
|
2220
|
-
}, []), p =
|
|
2239
|
+
}, []), h = X((S) => {
|
|
2240
|
+
f(S);
|
|
2241
|
+
}, []), p = X(() => {
|
|
2221
2242
|
f(null);
|
|
2222
|
-
}, []), m =
|
|
2223
|
-
d(
|
|
2224
|
-
}, []),
|
|
2225
|
-
S
|
|
2226
|
-
}, []),
|
|
2227
|
-
setTitle:
|
|
2228
|
-
setBackHandler:
|
|
2229
|
-
clearBackHandler:
|
|
2243
|
+
}, []), m = X((S) => {
|
|
2244
|
+
d(S);
|
|
2245
|
+
}, []), N = X((S) => {
|
|
2246
|
+
k(S);
|
|
2247
|
+
}, []), C = Ie(() => ({
|
|
2248
|
+
setTitle: b,
|
|
2249
|
+
setBackHandler: v,
|
|
2250
|
+
clearBackHandler: y,
|
|
2230
2251
|
setToolbar: h,
|
|
2231
2252
|
clearToolbar: p,
|
|
2232
2253
|
setHideBackButton: m,
|
|
2233
|
-
setHideTitleBar:
|
|
2254
|
+
setHideTitleBar: N,
|
|
2234
2255
|
close: n
|
|
2235
|
-
}), [
|
|
2256
|
+
}), [b, v, y, h, p, m, N, n]);
|
|
2236
2257
|
if (!o)
|
|
2237
2258
|
return null;
|
|
2238
|
-
const
|
|
2239
|
-
return /* @__PURE__ */
|
|
2259
|
+
const P = o.component, B = !o.hideTitleBar && !g;
|
|
2260
|
+
return /* @__PURE__ */ A(
|
|
2240
2261
|
"div",
|
|
2241
2262
|
{
|
|
2242
2263
|
className: `nc-app-container${t ? "" : " nc-hidden"}`,
|
|
2243
2264
|
children: [
|
|
2244
|
-
|
|
2265
|
+
B && /* @__PURE__ */ s(
|
|
2245
2266
|
rn,
|
|
2246
2267
|
{
|
|
2247
2268
|
title: i,
|
|
2248
2269
|
onClose: n,
|
|
2249
2270
|
onBack: c ?? void 0,
|
|
2250
2271
|
toolbar: u,
|
|
2251
|
-
hideBackButton:
|
|
2272
|
+
hideBackButton: w
|
|
2252
2273
|
}
|
|
2253
2274
|
),
|
|
2254
2275
|
/* @__PURE__ */ s(
|
|
@@ -2257,13 +2278,13 @@ function rt({ appId: e, isActive: t, onClose: n }) {
|
|
|
2257
2278
|
className: "nc-app-content-wrapper",
|
|
2258
2279
|
style: {
|
|
2259
2280
|
padding: o.padding,
|
|
2260
|
-
overflowY:
|
|
2281
|
+
overflowY: B ? "auto" : void 0
|
|
2261
2282
|
},
|
|
2262
|
-
children: /* @__PURE__ */ s(nt.Provider, { value:
|
|
2283
|
+
children: /* @__PURE__ */ s(nt.Provider, { value: C, children: /* @__PURE__ */ s(on, { appId: e, children: /* @__PURE__ */ s(
|
|
2263
2284
|
It,
|
|
2264
2285
|
{
|
|
2265
2286
|
fallback: /* @__PURE__ */ s("div", { className: "nc-app-loading", children: /* @__PURE__ */ s(Qe, {}) }),
|
|
2266
|
-
children: /* @__PURE__ */ s(
|
|
2287
|
+
children: /* @__PURE__ */ s(P, {})
|
|
2267
2288
|
}
|
|
2268
2289
|
) }) })
|
|
2269
2290
|
}
|
|
@@ -2291,7 +2312,7 @@ function wr({ children: e }) {
|
|
|
2291
2312
|
height: o
|
|
2292
2313
|
};
|
|
2293
2314
|
});
|
|
2294
|
-
return
|
|
2315
|
+
return V(() => {
|
|
2295
2316
|
const r = () => {
|
|
2296
2317
|
const o = window.innerWidth, i = window.innerHeight;
|
|
2297
2318
|
n({
|
|
@@ -2306,7 +2327,7 @@ function wr({ children: e }) {
|
|
|
2306
2327
|
}, []), /* @__PURE__ */ s(st.Provider, { value: t, children: e });
|
|
2307
2328
|
}
|
|
2308
2329
|
function it() {
|
|
2309
|
-
return
|
|
2330
|
+
return ae(st);
|
|
2310
2331
|
}
|
|
2311
2332
|
const Be = "-", sn = (e) => {
|
|
2312
2333
|
const t = an(e), {
|
|
@@ -2351,9 +2372,9 @@ const Be = "-", sn = (e) => {
|
|
|
2351
2372
|
validators: []
|
|
2352
2373
|
};
|
|
2353
2374
|
return dn(Object.entries(e.classGroups), n).forEach(([i, a]) => {
|
|
2354
|
-
|
|
2375
|
+
Ee(a, r, i, t);
|
|
2355
2376
|
}), r;
|
|
2356
|
-
},
|
|
2377
|
+
}, Ee = (e, t, n, r) => {
|
|
2357
2378
|
e.forEach((o) => {
|
|
2358
2379
|
if (typeof o == "string") {
|
|
2359
2380
|
const i = o === "" ? t : Je(t, o);
|
|
@@ -2362,7 +2383,7 @@ const Be = "-", sn = (e) => {
|
|
|
2362
2383
|
}
|
|
2363
2384
|
if (typeof o == "function") {
|
|
2364
2385
|
if (ln(o)) {
|
|
2365
|
-
|
|
2386
|
+
Ee(o(r), t, n, r);
|
|
2366
2387
|
return;
|
|
2367
2388
|
}
|
|
2368
2389
|
t.validators.push({
|
|
@@ -2372,7 +2393,7 @@ const Be = "-", sn = (e) => {
|
|
|
2372
2393
|
return;
|
|
2373
2394
|
}
|
|
2374
2395
|
Object.entries(o).forEach(([i, a]) => {
|
|
2375
|
-
|
|
2396
|
+
Ee(a, Je(t, i), n, r);
|
|
2376
2397
|
});
|
|
2377
2398
|
});
|
|
2378
2399
|
}, Je = (e, t) => {
|
|
@@ -2416,27 +2437,27 @@ const Be = "-", sn = (e) => {
|
|
|
2416
2437
|
experimentalParseClassName: n
|
|
2417
2438
|
} = e, r = t.length === 1, o = t[0], i = t.length, a = (c) => {
|
|
2418
2439
|
const l = [];
|
|
2419
|
-
let u = 0, f = 0,
|
|
2420
|
-
for (let
|
|
2421
|
-
let
|
|
2440
|
+
let u = 0, f = 0, w;
|
|
2441
|
+
for (let v = 0; v < c.length; v++) {
|
|
2442
|
+
let y = c[v];
|
|
2422
2443
|
if (u === 0) {
|
|
2423
|
-
if (
|
|
2424
|
-
l.push(c.slice(f,
|
|
2444
|
+
if (y === o && (r || c.slice(v, v + i) === t)) {
|
|
2445
|
+
l.push(c.slice(f, v)), f = v + i;
|
|
2425
2446
|
continue;
|
|
2426
2447
|
}
|
|
2427
|
-
if (
|
|
2428
|
-
|
|
2448
|
+
if (y === "/") {
|
|
2449
|
+
w = v;
|
|
2429
2450
|
continue;
|
|
2430
2451
|
}
|
|
2431
2452
|
}
|
|
2432
|
-
|
|
2453
|
+
y === "[" ? u++ : y === "]" && u--;
|
|
2433
2454
|
}
|
|
2434
|
-
const d = l.length === 0 ? c : c.substring(f),
|
|
2455
|
+
const d = l.length === 0 ? c : c.substring(f), g = d.startsWith(at), k = g ? d.substring(1) : d, b = w && w > f ? w - f : void 0;
|
|
2435
2456
|
return {
|
|
2436
2457
|
modifiers: l,
|
|
2437
|
-
hasImportantModifier:
|
|
2438
|
-
baseClassName:
|
|
2439
|
-
maybePostfixModifierPosition:
|
|
2458
|
+
hasImportantModifier: g,
|
|
2459
|
+
baseClassName: k,
|
|
2460
|
+
maybePostfixModifierPosition: b
|
|
2440
2461
|
};
|
|
2441
2462
|
};
|
|
2442
2463
|
return n ? (c) => n({
|
|
@@ -2465,30 +2486,30 @@ const Be = "-", sn = (e) => {
|
|
|
2465
2486
|
for (let l = a.length - 1; l >= 0; l -= 1) {
|
|
2466
2487
|
const u = a[l], {
|
|
2467
2488
|
modifiers: f,
|
|
2468
|
-
hasImportantModifier:
|
|
2489
|
+
hasImportantModifier: w,
|
|
2469
2490
|
baseClassName: d,
|
|
2470
|
-
maybePostfixModifierPosition:
|
|
2491
|
+
maybePostfixModifierPosition: g
|
|
2471
2492
|
} = n(u);
|
|
2472
|
-
let
|
|
2473
|
-
if (!
|
|
2474
|
-
if (!
|
|
2493
|
+
let k = !!g, b = r(k ? d.substring(0, g) : d);
|
|
2494
|
+
if (!b) {
|
|
2495
|
+
if (!k) {
|
|
2475
2496
|
c = u + (c.length > 0 ? " " + c : c);
|
|
2476
2497
|
continue;
|
|
2477
2498
|
}
|
|
2478
|
-
if (
|
|
2499
|
+
if (b = r(d), !b) {
|
|
2479
2500
|
c = u + (c.length > 0 ? " " + c : c);
|
|
2480
2501
|
continue;
|
|
2481
2502
|
}
|
|
2482
|
-
|
|
2503
|
+
k = !1;
|
|
2483
2504
|
}
|
|
2484
|
-
const
|
|
2505
|
+
const v = fn(f).join(":"), y = w ? v + at : v, h = y + b;
|
|
2485
2506
|
if (i.includes(h))
|
|
2486
2507
|
continue;
|
|
2487
2508
|
i.push(h);
|
|
2488
|
-
const p = o(
|
|
2509
|
+
const p = o(b, k);
|
|
2489
2510
|
for (let m = 0; m < p.length; ++m) {
|
|
2490
|
-
const
|
|
2491
|
-
i.push(
|
|
2511
|
+
const N = p[m];
|
|
2512
|
+
i.push(y + N);
|
|
2492
2513
|
}
|
|
2493
2514
|
c = u + (c.length > 0 ? " " + c : c);
|
|
2494
2515
|
}
|
|
@@ -2511,7 +2532,7 @@ const lt = (e) => {
|
|
|
2511
2532
|
function vn(e, ...t) {
|
|
2512
2533
|
let n, r, o, i = a;
|
|
2513
2534
|
function a(l) {
|
|
2514
|
-
const u = t.reduce((f,
|
|
2535
|
+
const u = t.reduce((f, w) => w(f), e());
|
|
2515
2536
|
return n = hn(u), r = n.cache.get, o = n.cache.set, i = c, c(l);
|
|
2516
2537
|
}
|
|
2517
2538
|
function c(l) {
|
|
@@ -2525,48 +2546,48 @@ function vn(e, ...t) {
|
|
|
2525
2546
|
return i(bn.apply(null, arguments));
|
|
2526
2547
|
};
|
|
2527
2548
|
}
|
|
2528
|
-
const
|
|
2549
|
+
const K = (e) => {
|
|
2529
2550
|
const t = (n) => n[e] || [];
|
|
2530
2551
|
return t.isThemeGetter = !0, t;
|
|
2531
|
-
}, dt = /^\[(?:([a-z-]+):)?(.+)\]$/i, wn = /^\d+\/\d+$/, yn = /* @__PURE__ */ new Set(["px", "full", "screen"]), xn = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, kn = /\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$/, Nn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, An = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Sn = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,
|
|
2552
|
+
}, dt = /^\[(?:([a-z-]+):)?(.+)\]$/i, wn = /^\d+\/\d+$/, yn = /* @__PURE__ */ new Set(["px", "full", "screen"]), xn = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, kn = /\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$/, Nn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, An = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Sn = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, te = (e) => he(e) || yn.has(e) || wn.test(e), ie = (e) => be(e, "length", Pn), he = (e) => !!e && !Number.isNaN(Number(e)), $e = (e) => be(e, "number", he), xe = (e) => !!e && Number.isInteger(Number(e)), Cn = (e) => e.endsWith("%") && he(e.slice(0, -1)), I = (e) => dt.test(e), ce = (e) => xn.test(e), Mn = /* @__PURE__ */ new Set(["length", "size", "percentage"]), In = (e) => be(e, Mn, ut), $n = (e) => be(e, "position", ut), Rn = /* @__PURE__ */ new Set(["image", "url"]), Tn = (e) => be(e, Rn, zn), En = (e) => be(e, "", Ln), ke = () => !0, be = (e, t, n) => {
|
|
2532
2553
|
const r = dt.exec(e);
|
|
2533
2554
|
return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1;
|
|
2534
|
-
},
|
|
2555
|
+
}, Pn = (e) => (
|
|
2535
2556
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
2536
2557
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
2537
2558
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
2538
2559
|
kn.test(e) && !Nn.test(e)
|
|
2539
2560
|
), ut = () => !1, Ln = (e) => An.test(e), zn = (e) => Sn.test(e), Bn = () => {
|
|
2540
|
-
const e =
|
|
2561
|
+
const e = K("colors"), t = K("spacing"), n = K("blur"), r = K("brightness"), o = K("borderColor"), i = K("borderRadius"), a = K("borderSpacing"), c = K("borderWidth"), l = K("contrast"), u = K("grayscale"), f = K("hueRotate"), w = K("invert"), d = K("gap"), g = K("gradientColorStops"), k = K("gradientColorStopPositions"), b = K("inset"), v = K("margin"), y = K("opacity"), h = K("padding"), p = K("saturate"), m = K("scale"), N = K("sepia"), C = K("skew"), P = K("space"), B = K("translate"), S = () => ["auto", "contain", "none"], L = () => ["auto", "hidden", "clip", "visible", "scroll"], x = () => ["auto", I, t], M = () => [I, t], z = () => ["", te, ie], F = () => ["auto", he, I], $ = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], T = () => ["solid", "dashed", "dotted", "double", "none"], H = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], q = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], O = () => ["", "0", I], _ = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], D = () => [he, I];
|
|
2541
2562
|
return {
|
|
2542
2563
|
cacheSize: 500,
|
|
2543
2564
|
separator: ":",
|
|
2544
2565
|
theme: {
|
|
2545
2566
|
colors: [ke],
|
|
2546
|
-
spacing: [
|
|
2547
|
-
blur: ["none", "",
|
|
2548
|
-
brightness:
|
|
2567
|
+
spacing: [te, ie],
|
|
2568
|
+
blur: ["none", "", ce, I],
|
|
2569
|
+
brightness: D(),
|
|
2549
2570
|
borderColor: [e],
|
|
2550
|
-
borderRadius: ["none", "", "full",
|
|
2551
|
-
borderSpacing:
|
|
2552
|
-
borderWidth:
|
|
2553
|
-
contrast:
|
|
2554
|
-
grayscale:
|
|
2555
|
-
hueRotate:
|
|
2556
|
-
invert:
|
|
2557
|
-
gap:
|
|
2571
|
+
borderRadius: ["none", "", "full", ce, I],
|
|
2572
|
+
borderSpacing: M(),
|
|
2573
|
+
borderWidth: z(),
|
|
2574
|
+
contrast: D(),
|
|
2575
|
+
grayscale: O(),
|
|
2576
|
+
hueRotate: D(),
|
|
2577
|
+
invert: O(),
|
|
2578
|
+
gap: M(),
|
|
2558
2579
|
gradientColorStops: [e],
|
|
2559
|
-
gradientColorStopPositions: [Cn,
|
|
2560
|
-
inset:
|
|
2561
|
-
margin:
|
|
2562
|
-
opacity:
|
|
2563
|
-
padding:
|
|
2564
|
-
saturate:
|
|
2565
|
-
scale:
|
|
2566
|
-
sepia:
|
|
2567
|
-
skew:
|
|
2568
|
-
space:
|
|
2569
|
-
translate:
|
|
2580
|
+
gradientColorStopPositions: [Cn, ie],
|
|
2581
|
+
inset: x(),
|
|
2582
|
+
margin: x(),
|
|
2583
|
+
opacity: D(),
|
|
2584
|
+
padding: M(),
|
|
2585
|
+
saturate: D(),
|
|
2586
|
+
scale: D(),
|
|
2587
|
+
sepia: O(),
|
|
2588
|
+
skew: D(),
|
|
2589
|
+
space: M(),
|
|
2590
|
+
translate: M()
|
|
2570
2591
|
},
|
|
2571
2592
|
classGroups: {
|
|
2572
2593
|
// Layout
|
|
@@ -2575,7 +2596,7 @@ const O = (e) => {
|
|
|
2575
2596
|
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
2576
2597
|
*/
|
|
2577
2598
|
aspect: [{
|
|
2578
|
-
aspect: ["auto", "square", "video",
|
|
2599
|
+
aspect: ["auto", "square", "video", I]
|
|
2579
2600
|
}],
|
|
2580
2601
|
/**
|
|
2581
2602
|
* Container
|
|
@@ -2587,21 +2608,21 @@ const O = (e) => {
|
|
|
2587
2608
|
* @see https://tailwindcss.com/docs/columns
|
|
2588
2609
|
*/
|
|
2589
2610
|
columns: [{
|
|
2590
|
-
columns: [
|
|
2611
|
+
columns: [ce]
|
|
2591
2612
|
}],
|
|
2592
2613
|
/**
|
|
2593
2614
|
* Break After
|
|
2594
2615
|
* @see https://tailwindcss.com/docs/break-after
|
|
2595
2616
|
*/
|
|
2596
2617
|
"break-after": [{
|
|
2597
|
-
"break-after":
|
|
2618
|
+
"break-after": _()
|
|
2598
2619
|
}],
|
|
2599
2620
|
/**
|
|
2600
2621
|
* Break Before
|
|
2601
2622
|
* @see https://tailwindcss.com/docs/break-before
|
|
2602
2623
|
*/
|
|
2603
2624
|
"break-before": [{
|
|
2604
|
-
"break-before":
|
|
2625
|
+
"break-before": _()
|
|
2605
2626
|
}],
|
|
2606
2627
|
/**
|
|
2607
2628
|
* Break Inside
|
|
@@ -2660,49 +2681,49 @@ const O = (e) => {
|
|
|
2660
2681
|
* @see https://tailwindcss.com/docs/object-position
|
|
2661
2682
|
*/
|
|
2662
2683
|
"object-position": [{
|
|
2663
|
-
object: [
|
|
2684
|
+
object: [...$(), I]
|
|
2664
2685
|
}],
|
|
2665
2686
|
/**
|
|
2666
2687
|
* Overflow
|
|
2667
2688
|
* @see https://tailwindcss.com/docs/overflow
|
|
2668
2689
|
*/
|
|
2669
2690
|
overflow: [{
|
|
2670
|
-
overflow:
|
|
2691
|
+
overflow: L()
|
|
2671
2692
|
}],
|
|
2672
2693
|
/**
|
|
2673
2694
|
* Overflow X
|
|
2674
2695
|
* @see https://tailwindcss.com/docs/overflow
|
|
2675
2696
|
*/
|
|
2676
2697
|
"overflow-x": [{
|
|
2677
|
-
"overflow-x":
|
|
2698
|
+
"overflow-x": L()
|
|
2678
2699
|
}],
|
|
2679
2700
|
/**
|
|
2680
2701
|
* Overflow Y
|
|
2681
2702
|
* @see https://tailwindcss.com/docs/overflow
|
|
2682
2703
|
*/
|
|
2683
2704
|
"overflow-y": [{
|
|
2684
|
-
"overflow-y":
|
|
2705
|
+
"overflow-y": L()
|
|
2685
2706
|
}],
|
|
2686
2707
|
/**
|
|
2687
2708
|
* Overscroll Behavior
|
|
2688
2709
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2689
2710
|
*/
|
|
2690
2711
|
overscroll: [{
|
|
2691
|
-
overscroll:
|
|
2712
|
+
overscroll: S()
|
|
2692
2713
|
}],
|
|
2693
2714
|
/**
|
|
2694
2715
|
* Overscroll Behavior X
|
|
2695
2716
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2696
2717
|
*/
|
|
2697
2718
|
"overscroll-x": [{
|
|
2698
|
-
"overscroll-x":
|
|
2719
|
+
"overscroll-x": S()
|
|
2699
2720
|
}],
|
|
2700
2721
|
/**
|
|
2701
2722
|
* Overscroll Behavior Y
|
|
2702
2723
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2703
2724
|
*/
|
|
2704
2725
|
"overscroll-y": [{
|
|
2705
|
-
"overscroll-y":
|
|
2726
|
+
"overscroll-y": S()
|
|
2706
2727
|
}],
|
|
2707
2728
|
/**
|
|
2708
2729
|
* Position
|
|
@@ -2714,63 +2735,63 @@ const O = (e) => {
|
|
|
2714
2735
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2715
2736
|
*/
|
|
2716
2737
|
inset: [{
|
|
2717
|
-
inset: [
|
|
2738
|
+
inset: [b]
|
|
2718
2739
|
}],
|
|
2719
2740
|
/**
|
|
2720
2741
|
* Right / Left
|
|
2721
2742
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2722
2743
|
*/
|
|
2723
2744
|
"inset-x": [{
|
|
2724
|
-
"inset-x": [
|
|
2745
|
+
"inset-x": [b]
|
|
2725
2746
|
}],
|
|
2726
2747
|
/**
|
|
2727
2748
|
* Top / Bottom
|
|
2728
2749
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2729
2750
|
*/
|
|
2730
2751
|
"inset-y": [{
|
|
2731
|
-
"inset-y": [
|
|
2752
|
+
"inset-y": [b]
|
|
2732
2753
|
}],
|
|
2733
2754
|
/**
|
|
2734
2755
|
* Start
|
|
2735
2756
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2736
2757
|
*/
|
|
2737
2758
|
start: [{
|
|
2738
|
-
start: [
|
|
2759
|
+
start: [b]
|
|
2739
2760
|
}],
|
|
2740
2761
|
/**
|
|
2741
2762
|
* End
|
|
2742
2763
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2743
2764
|
*/
|
|
2744
2765
|
end: [{
|
|
2745
|
-
end: [
|
|
2766
|
+
end: [b]
|
|
2746
2767
|
}],
|
|
2747
2768
|
/**
|
|
2748
2769
|
* Top
|
|
2749
2770
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2750
2771
|
*/
|
|
2751
2772
|
top: [{
|
|
2752
|
-
top: [
|
|
2773
|
+
top: [b]
|
|
2753
2774
|
}],
|
|
2754
2775
|
/**
|
|
2755
2776
|
* Right
|
|
2756
2777
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2757
2778
|
*/
|
|
2758
2779
|
right: [{
|
|
2759
|
-
right: [
|
|
2780
|
+
right: [b]
|
|
2760
2781
|
}],
|
|
2761
2782
|
/**
|
|
2762
2783
|
* Bottom
|
|
2763
2784
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2764
2785
|
*/
|
|
2765
2786
|
bottom: [{
|
|
2766
|
-
bottom: [
|
|
2787
|
+
bottom: [b]
|
|
2767
2788
|
}],
|
|
2768
2789
|
/**
|
|
2769
2790
|
* Left
|
|
2770
2791
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2771
2792
|
*/
|
|
2772
2793
|
left: [{
|
|
2773
|
-
left: [
|
|
2794
|
+
left: [b]
|
|
2774
2795
|
}],
|
|
2775
2796
|
/**
|
|
2776
2797
|
* Visibility
|
|
@@ -2782,7 +2803,7 @@ const O = (e) => {
|
|
|
2782
2803
|
* @see https://tailwindcss.com/docs/z-index
|
|
2783
2804
|
*/
|
|
2784
2805
|
z: [{
|
|
2785
|
-
z: ["auto", xe,
|
|
2806
|
+
z: ["auto", xe, I]
|
|
2786
2807
|
}],
|
|
2787
2808
|
// Flexbox and Grid
|
|
2788
2809
|
/**
|
|
@@ -2790,7 +2811,7 @@ const O = (e) => {
|
|
|
2790
2811
|
* @see https://tailwindcss.com/docs/flex-basis
|
|
2791
2812
|
*/
|
|
2792
2813
|
basis: [{
|
|
2793
|
-
basis:
|
|
2814
|
+
basis: x()
|
|
2794
2815
|
}],
|
|
2795
2816
|
/**
|
|
2796
2817
|
* Flex Direction
|
|
@@ -2811,28 +2832,28 @@ const O = (e) => {
|
|
|
2811
2832
|
* @see https://tailwindcss.com/docs/flex
|
|
2812
2833
|
*/
|
|
2813
2834
|
flex: [{
|
|
2814
|
-
flex: ["1", "auto", "initial", "none",
|
|
2835
|
+
flex: ["1", "auto", "initial", "none", I]
|
|
2815
2836
|
}],
|
|
2816
2837
|
/**
|
|
2817
2838
|
* Flex Grow
|
|
2818
2839
|
* @see https://tailwindcss.com/docs/flex-grow
|
|
2819
2840
|
*/
|
|
2820
2841
|
grow: [{
|
|
2821
|
-
grow:
|
|
2842
|
+
grow: O()
|
|
2822
2843
|
}],
|
|
2823
2844
|
/**
|
|
2824
2845
|
* Flex Shrink
|
|
2825
2846
|
* @see https://tailwindcss.com/docs/flex-shrink
|
|
2826
2847
|
*/
|
|
2827
2848
|
shrink: [{
|
|
2828
|
-
shrink:
|
|
2849
|
+
shrink: O()
|
|
2829
2850
|
}],
|
|
2830
2851
|
/**
|
|
2831
2852
|
* Order
|
|
2832
2853
|
* @see https://tailwindcss.com/docs/order
|
|
2833
2854
|
*/
|
|
2834
2855
|
order: [{
|
|
2835
|
-
order: ["first", "last", "none", xe,
|
|
2856
|
+
order: ["first", "last", "none", xe, I]
|
|
2836
2857
|
}],
|
|
2837
2858
|
/**
|
|
2838
2859
|
* Grid Template Columns
|
|
@@ -2847,22 +2868,22 @@ const O = (e) => {
|
|
|
2847
2868
|
*/
|
|
2848
2869
|
"col-start-end": [{
|
|
2849
2870
|
col: ["auto", {
|
|
2850
|
-
span: ["full", xe,
|
|
2851
|
-
},
|
|
2871
|
+
span: ["full", xe, I]
|
|
2872
|
+
}, I]
|
|
2852
2873
|
}],
|
|
2853
2874
|
/**
|
|
2854
2875
|
* Grid Column Start
|
|
2855
2876
|
* @see https://tailwindcss.com/docs/grid-column
|
|
2856
2877
|
*/
|
|
2857
2878
|
"col-start": [{
|
|
2858
|
-
"col-start":
|
|
2879
|
+
"col-start": F()
|
|
2859
2880
|
}],
|
|
2860
2881
|
/**
|
|
2861
2882
|
* Grid Column End
|
|
2862
2883
|
* @see https://tailwindcss.com/docs/grid-column
|
|
2863
2884
|
*/
|
|
2864
2885
|
"col-end": [{
|
|
2865
|
-
"col-end":
|
|
2886
|
+
"col-end": F()
|
|
2866
2887
|
}],
|
|
2867
2888
|
/**
|
|
2868
2889
|
* Grid Template Rows
|
|
@@ -2877,22 +2898,22 @@ const O = (e) => {
|
|
|
2877
2898
|
*/
|
|
2878
2899
|
"row-start-end": [{
|
|
2879
2900
|
row: ["auto", {
|
|
2880
|
-
span: [xe,
|
|
2881
|
-
},
|
|
2901
|
+
span: [xe, I]
|
|
2902
|
+
}, I]
|
|
2882
2903
|
}],
|
|
2883
2904
|
/**
|
|
2884
2905
|
* Grid Row Start
|
|
2885
2906
|
* @see https://tailwindcss.com/docs/grid-row
|
|
2886
2907
|
*/
|
|
2887
2908
|
"row-start": [{
|
|
2888
|
-
"row-start":
|
|
2909
|
+
"row-start": F()
|
|
2889
2910
|
}],
|
|
2890
2911
|
/**
|
|
2891
2912
|
* Grid Row End
|
|
2892
2913
|
* @see https://tailwindcss.com/docs/grid-row
|
|
2893
2914
|
*/
|
|
2894
2915
|
"row-end": [{
|
|
2895
|
-
"row-end":
|
|
2916
|
+
"row-end": F()
|
|
2896
2917
|
}],
|
|
2897
2918
|
/**
|
|
2898
2919
|
* Grid Auto Flow
|
|
@@ -2906,14 +2927,14 @@ const O = (e) => {
|
|
|
2906
2927
|
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
2907
2928
|
*/
|
|
2908
2929
|
"auto-cols": [{
|
|
2909
|
-
"auto-cols": ["auto", "min", "max", "fr",
|
|
2930
|
+
"auto-cols": ["auto", "min", "max", "fr", I]
|
|
2910
2931
|
}],
|
|
2911
2932
|
/**
|
|
2912
2933
|
* Grid Auto Rows
|
|
2913
2934
|
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
2914
2935
|
*/
|
|
2915
2936
|
"auto-rows": [{
|
|
2916
|
-
"auto-rows": ["auto", "min", "max", "fr",
|
|
2937
|
+
"auto-rows": ["auto", "min", "max", "fr", I]
|
|
2917
2938
|
}],
|
|
2918
2939
|
/**
|
|
2919
2940
|
* Gap
|
|
@@ -2941,7 +2962,7 @@ const O = (e) => {
|
|
|
2941
2962
|
* @see https://tailwindcss.com/docs/justify-content
|
|
2942
2963
|
*/
|
|
2943
2964
|
"justify-content": [{
|
|
2944
|
-
justify: ["normal", ...
|
|
2965
|
+
justify: ["normal", ...q()]
|
|
2945
2966
|
}],
|
|
2946
2967
|
/**
|
|
2947
2968
|
* Justify Items
|
|
@@ -2962,7 +2983,7 @@ const O = (e) => {
|
|
|
2962
2983
|
* @see https://tailwindcss.com/docs/align-content
|
|
2963
2984
|
*/
|
|
2964
2985
|
"align-content": [{
|
|
2965
|
-
content: ["normal", ...
|
|
2986
|
+
content: ["normal", ...q(), "baseline"]
|
|
2966
2987
|
}],
|
|
2967
2988
|
/**
|
|
2968
2989
|
* Align Items
|
|
@@ -2983,7 +3004,7 @@ const O = (e) => {
|
|
|
2983
3004
|
* @see https://tailwindcss.com/docs/place-content
|
|
2984
3005
|
*/
|
|
2985
3006
|
"place-content": [{
|
|
2986
|
-
"place-content": [...
|
|
3007
|
+
"place-content": [...q(), "baseline"]
|
|
2987
3008
|
}],
|
|
2988
3009
|
/**
|
|
2989
3010
|
* Place Items
|
|
@@ -3068,70 +3089,70 @@ const O = (e) => {
|
|
|
3068
3089
|
* @see https://tailwindcss.com/docs/margin
|
|
3069
3090
|
*/
|
|
3070
3091
|
m: [{
|
|
3071
|
-
m: [
|
|
3092
|
+
m: [v]
|
|
3072
3093
|
}],
|
|
3073
3094
|
/**
|
|
3074
3095
|
* Margin X
|
|
3075
3096
|
* @see https://tailwindcss.com/docs/margin
|
|
3076
3097
|
*/
|
|
3077
3098
|
mx: [{
|
|
3078
|
-
mx: [
|
|
3099
|
+
mx: [v]
|
|
3079
3100
|
}],
|
|
3080
3101
|
/**
|
|
3081
3102
|
* Margin Y
|
|
3082
3103
|
* @see https://tailwindcss.com/docs/margin
|
|
3083
3104
|
*/
|
|
3084
3105
|
my: [{
|
|
3085
|
-
my: [
|
|
3106
|
+
my: [v]
|
|
3086
3107
|
}],
|
|
3087
3108
|
/**
|
|
3088
3109
|
* Margin Start
|
|
3089
3110
|
* @see https://tailwindcss.com/docs/margin
|
|
3090
3111
|
*/
|
|
3091
3112
|
ms: [{
|
|
3092
|
-
ms: [
|
|
3113
|
+
ms: [v]
|
|
3093
3114
|
}],
|
|
3094
3115
|
/**
|
|
3095
3116
|
* Margin End
|
|
3096
3117
|
* @see https://tailwindcss.com/docs/margin
|
|
3097
3118
|
*/
|
|
3098
3119
|
me: [{
|
|
3099
|
-
me: [
|
|
3120
|
+
me: [v]
|
|
3100
3121
|
}],
|
|
3101
3122
|
/**
|
|
3102
3123
|
* Margin Top
|
|
3103
3124
|
* @see https://tailwindcss.com/docs/margin
|
|
3104
3125
|
*/
|
|
3105
3126
|
mt: [{
|
|
3106
|
-
mt: [
|
|
3127
|
+
mt: [v]
|
|
3107
3128
|
}],
|
|
3108
3129
|
/**
|
|
3109
3130
|
* Margin Right
|
|
3110
3131
|
* @see https://tailwindcss.com/docs/margin
|
|
3111
3132
|
*/
|
|
3112
3133
|
mr: [{
|
|
3113
|
-
mr: [
|
|
3134
|
+
mr: [v]
|
|
3114
3135
|
}],
|
|
3115
3136
|
/**
|
|
3116
3137
|
* Margin Bottom
|
|
3117
3138
|
* @see https://tailwindcss.com/docs/margin
|
|
3118
3139
|
*/
|
|
3119
3140
|
mb: [{
|
|
3120
|
-
mb: [
|
|
3141
|
+
mb: [v]
|
|
3121
3142
|
}],
|
|
3122
3143
|
/**
|
|
3123
3144
|
* Margin Left
|
|
3124
3145
|
* @see https://tailwindcss.com/docs/margin
|
|
3125
3146
|
*/
|
|
3126
3147
|
ml: [{
|
|
3127
|
-
ml: [
|
|
3148
|
+
ml: [v]
|
|
3128
3149
|
}],
|
|
3129
3150
|
/**
|
|
3130
3151
|
* Space Between X
|
|
3131
3152
|
* @see https://tailwindcss.com/docs/space
|
|
3132
3153
|
*/
|
|
3133
3154
|
"space-x": [{
|
|
3134
|
-
"space-x": [
|
|
3155
|
+
"space-x": [P]
|
|
3135
3156
|
}],
|
|
3136
3157
|
/**
|
|
3137
3158
|
* Space Between X Reverse
|
|
@@ -3143,7 +3164,7 @@ const O = (e) => {
|
|
|
3143
3164
|
* @see https://tailwindcss.com/docs/space
|
|
3144
3165
|
*/
|
|
3145
3166
|
"space-y": [{
|
|
3146
|
-
"space-y": [
|
|
3167
|
+
"space-y": [P]
|
|
3147
3168
|
}],
|
|
3148
3169
|
/**
|
|
3149
3170
|
* Space Between Y Reverse
|
|
@@ -3156,51 +3177,51 @@ const O = (e) => {
|
|
|
3156
3177
|
* @see https://tailwindcss.com/docs/width
|
|
3157
3178
|
*/
|
|
3158
3179
|
w: [{
|
|
3159
|
-
w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw",
|
|
3180
|
+
w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", I, t]
|
|
3160
3181
|
}],
|
|
3161
3182
|
/**
|
|
3162
3183
|
* Min-Width
|
|
3163
3184
|
* @see https://tailwindcss.com/docs/min-width
|
|
3164
3185
|
*/
|
|
3165
3186
|
"min-w": [{
|
|
3166
|
-
"min-w": [
|
|
3187
|
+
"min-w": [I, t, "min", "max", "fit"]
|
|
3167
3188
|
}],
|
|
3168
3189
|
/**
|
|
3169
3190
|
* Max-Width
|
|
3170
3191
|
* @see https://tailwindcss.com/docs/max-width
|
|
3171
3192
|
*/
|
|
3172
3193
|
"max-w": [{
|
|
3173
|
-
"max-w": [
|
|
3174
|
-
screen: [
|
|
3175
|
-
},
|
|
3194
|
+
"max-w": [I, t, "none", "full", "min", "max", "fit", "prose", {
|
|
3195
|
+
screen: [ce]
|
|
3196
|
+
}, ce]
|
|
3176
3197
|
}],
|
|
3177
3198
|
/**
|
|
3178
3199
|
* Height
|
|
3179
3200
|
* @see https://tailwindcss.com/docs/height
|
|
3180
3201
|
*/
|
|
3181
3202
|
h: [{
|
|
3182
|
-
h: [
|
|
3203
|
+
h: [I, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
3183
3204
|
}],
|
|
3184
3205
|
/**
|
|
3185
3206
|
* Min-Height
|
|
3186
3207
|
* @see https://tailwindcss.com/docs/min-height
|
|
3187
3208
|
*/
|
|
3188
3209
|
"min-h": [{
|
|
3189
|
-
"min-h": [
|
|
3210
|
+
"min-h": [I, t, "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
3190
3211
|
}],
|
|
3191
3212
|
/**
|
|
3192
3213
|
* Max-Height
|
|
3193
3214
|
* @see https://tailwindcss.com/docs/max-height
|
|
3194
3215
|
*/
|
|
3195
3216
|
"max-h": [{
|
|
3196
|
-
"max-h": [
|
|
3217
|
+
"max-h": [I, t, "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
3197
3218
|
}],
|
|
3198
3219
|
/**
|
|
3199
3220
|
* Size
|
|
3200
3221
|
* @see https://tailwindcss.com/docs/size
|
|
3201
3222
|
*/
|
|
3202
3223
|
size: [{
|
|
3203
|
-
size: [
|
|
3224
|
+
size: [I, t, "auto", "min", "max", "fit"]
|
|
3204
3225
|
}],
|
|
3205
3226
|
// Typography
|
|
3206
3227
|
/**
|
|
@@ -3208,7 +3229,7 @@ const O = (e) => {
|
|
|
3208
3229
|
* @see https://tailwindcss.com/docs/font-size
|
|
3209
3230
|
*/
|
|
3210
3231
|
"font-size": [{
|
|
3211
|
-
text: ["base",
|
|
3232
|
+
text: ["base", ce, ie]
|
|
3212
3233
|
}],
|
|
3213
3234
|
/**
|
|
3214
3235
|
* Font Smoothing
|
|
@@ -3269,7 +3290,7 @@ const O = (e) => {
|
|
|
3269
3290
|
* @see https://tailwindcss.com/docs/letter-spacing
|
|
3270
3291
|
*/
|
|
3271
3292
|
tracking: [{
|
|
3272
|
-
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest",
|
|
3293
|
+
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", I]
|
|
3273
3294
|
}],
|
|
3274
3295
|
/**
|
|
3275
3296
|
* Line Clamp
|
|
@@ -3283,21 +3304,21 @@ const O = (e) => {
|
|
|
3283
3304
|
* @see https://tailwindcss.com/docs/line-height
|
|
3284
3305
|
*/
|
|
3285
3306
|
leading: [{
|
|
3286
|
-
leading: ["none", "tight", "snug", "normal", "relaxed", "loose",
|
|
3307
|
+
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", te, I]
|
|
3287
3308
|
}],
|
|
3288
3309
|
/**
|
|
3289
3310
|
* List Style Image
|
|
3290
3311
|
* @see https://tailwindcss.com/docs/list-style-image
|
|
3291
3312
|
*/
|
|
3292
3313
|
"list-image": [{
|
|
3293
|
-
"list-image": ["none",
|
|
3314
|
+
"list-image": ["none", I]
|
|
3294
3315
|
}],
|
|
3295
3316
|
/**
|
|
3296
3317
|
* List Style Type
|
|
3297
3318
|
* @see https://tailwindcss.com/docs/list-style-type
|
|
3298
3319
|
*/
|
|
3299
3320
|
"list-style-type": [{
|
|
3300
|
-
list: ["none", "disc", "decimal",
|
|
3321
|
+
list: ["none", "disc", "decimal", I]
|
|
3301
3322
|
}],
|
|
3302
3323
|
/**
|
|
3303
3324
|
* List Style Position
|
|
@@ -3319,7 +3340,7 @@ const O = (e) => {
|
|
|
3319
3340
|
* @see https://tailwindcss.com/docs/placeholder-opacity
|
|
3320
3341
|
*/
|
|
3321
3342
|
"placeholder-opacity": [{
|
|
3322
|
-
"placeholder-opacity": [
|
|
3343
|
+
"placeholder-opacity": [y]
|
|
3323
3344
|
}],
|
|
3324
3345
|
/**
|
|
3325
3346
|
* Text Alignment
|
|
@@ -3340,7 +3361,7 @@ const O = (e) => {
|
|
|
3340
3361
|
* @see https://tailwindcss.com/docs/text-opacity
|
|
3341
3362
|
*/
|
|
3342
3363
|
"text-opacity": [{
|
|
3343
|
-
"text-opacity": [
|
|
3364
|
+
"text-opacity": [y]
|
|
3344
3365
|
}],
|
|
3345
3366
|
/**
|
|
3346
3367
|
* Text Decoration
|
|
@@ -3352,21 +3373,21 @@ const O = (e) => {
|
|
|
3352
3373
|
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
3353
3374
|
*/
|
|
3354
3375
|
"text-decoration-style": [{
|
|
3355
|
-
decoration: [...
|
|
3376
|
+
decoration: [...T(), "wavy"]
|
|
3356
3377
|
}],
|
|
3357
3378
|
/**
|
|
3358
3379
|
* Text Decoration Thickness
|
|
3359
3380
|
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
3360
3381
|
*/
|
|
3361
3382
|
"text-decoration-thickness": [{
|
|
3362
|
-
decoration: ["auto", "from-font",
|
|
3383
|
+
decoration: ["auto", "from-font", te, ie]
|
|
3363
3384
|
}],
|
|
3364
3385
|
/**
|
|
3365
3386
|
* Text Underline Offset
|
|
3366
3387
|
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
3367
3388
|
*/
|
|
3368
3389
|
"underline-offset": [{
|
|
3369
|
-
"underline-offset": ["auto",
|
|
3390
|
+
"underline-offset": ["auto", te, I]
|
|
3370
3391
|
}],
|
|
3371
3392
|
/**
|
|
3372
3393
|
* Text Decoration Color
|
|
@@ -3397,14 +3418,14 @@ const O = (e) => {
|
|
|
3397
3418
|
* @see https://tailwindcss.com/docs/text-indent
|
|
3398
3419
|
*/
|
|
3399
3420
|
indent: [{
|
|
3400
|
-
indent:
|
|
3421
|
+
indent: M()
|
|
3401
3422
|
}],
|
|
3402
3423
|
/**
|
|
3403
3424
|
* Vertical Alignment
|
|
3404
3425
|
* @see https://tailwindcss.com/docs/vertical-align
|
|
3405
3426
|
*/
|
|
3406
3427
|
"vertical-align": [{
|
|
3407
|
-
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super",
|
|
3428
|
+
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", I]
|
|
3408
3429
|
}],
|
|
3409
3430
|
/**
|
|
3410
3431
|
* Whitespace
|
|
@@ -3432,7 +3453,7 @@ const O = (e) => {
|
|
|
3432
3453
|
* @see https://tailwindcss.com/docs/content
|
|
3433
3454
|
*/
|
|
3434
3455
|
content: [{
|
|
3435
|
-
content: ["none",
|
|
3456
|
+
content: ["none", I]
|
|
3436
3457
|
}],
|
|
3437
3458
|
// Backgrounds
|
|
3438
3459
|
/**
|
|
@@ -3455,7 +3476,7 @@ const O = (e) => {
|
|
|
3455
3476
|
* @see https://tailwindcss.com/docs/background-opacity
|
|
3456
3477
|
*/
|
|
3457
3478
|
"bg-opacity": [{
|
|
3458
|
-
"bg-opacity": [
|
|
3479
|
+
"bg-opacity": [y]
|
|
3459
3480
|
}],
|
|
3460
3481
|
/**
|
|
3461
3482
|
* Background Origin
|
|
@@ -3469,7 +3490,7 @@ const O = (e) => {
|
|
|
3469
3490
|
* @see https://tailwindcss.com/docs/background-position
|
|
3470
3491
|
*/
|
|
3471
3492
|
"bg-position": [{
|
|
3472
|
-
bg: [
|
|
3493
|
+
bg: [...$(), $n]
|
|
3473
3494
|
}],
|
|
3474
3495
|
/**
|
|
3475
3496
|
* Background Repeat
|
|
@@ -3508,42 +3529,42 @@ const O = (e) => {
|
|
|
3508
3529
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3509
3530
|
*/
|
|
3510
3531
|
"gradient-from-pos": [{
|
|
3511
|
-
from: [
|
|
3532
|
+
from: [k]
|
|
3512
3533
|
}],
|
|
3513
3534
|
/**
|
|
3514
3535
|
* Gradient Color Stops Via Position
|
|
3515
3536
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3516
3537
|
*/
|
|
3517
3538
|
"gradient-via-pos": [{
|
|
3518
|
-
via: [
|
|
3539
|
+
via: [k]
|
|
3519
3540
|
}],
|
|
3520
3541
|
/**
|
|
3521
3542
|
* Gradient Color Stops To Position
|
|
3522
3543
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3523
3544
|
*/
|
|
3524
3545
|
"gradient-to-pos": [{
|
|
3525
|
-
to: [
|
|
3546
|
+
to: [k]
|
|
3526
3547
|
}],
|
|
3527
3548
|
/**
|
|
3528
3549
|
* Gradient Color Stops From
|
|
3529
3550
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3530
3551
|
*/
|
|
3531
3552
|
"gradient-from": [{
|
|
3532
|
-
from: [
|
|
3553
|
+
from: [g]
|
|
3533
3554
|
}],
|
|
3534
3555
|
/**
|
|
3535
3556
|
* Gradient Color Stops Via
|
|
3536
3557
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3537
3558
|
*/
|
|
3538
3559
|
"gradient-via": [{
|
|
3539
|
-
via: [
|
|
3560
|
+
via: [g]
|
|
3540
3561
|
}],
|
|
3541
3562
|
/**
|
|
3542
3563
|
* Gradient Color Stops To
|
|
3543
3564
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3544
3565
|
*/
|
|
3545
3566
|
"gradient-to": [{
|
|
3546
|
-
to: [
|
|
3567
|
+
to: [g]
|
|
3547
3568
|
}],
|
|
3548
3569
|
// Borders
|
|
3549
3570
|
/**
|
|
@@ -3719,14 +3740,14 @@ const O = (e) => {
|
|
|
3719
3740
|
* @see https://tailwindcss.com/docs/border-opacity
|
|
3720
3741
|
*/
|
|
3721
3742
|
"border-opacity": [{
|
|
3722
|
-
"border-opacity": [
|
|
3743
|
+
"border-opacity": [y]
|
|
3723
3744
|
}],
|
|
3724
3745
|
/**
|
|
3725
3746
|
* Border Style
|
|
3726
3747
|
* @see https://tailwindcss.com/docs/border-style
|
|
3727
3748
|
*/
|
|
3728
3749
|
"border-style": [{
|
|
3729
|
-
border: [...
|
|
3750
|
+
border: [...T(), "hidden"]
|
|
3730
3751
|
}],
|
|
3731
3752
|
/**
|
|
3732
3753
|
* Divide Width X
|
|
@@ -3757,14 +3778,14 @@ const O = (e) => {
|
|
|
3757
3778
|
* @see https://tailwindcss.com/docs/divide-opacity
|
|
3758
3779
|
*/
|
|
3759
3780
|
"divide-opacity": [{
|
|
3760
|
-
"divide-opacity": [
|
|
3781
|
+
"divide-opacity": [y]
|
|
3761
3782
|
}],
|
|
3762
3783
|
/**
|
|
3763
3784
|
* Divide Style
|
|
3764
3785
|
* @see https://tailwindcss.com/docs/divide-style
|
|
3765
3786
|
*/
|
|
3766
3787
|
"divide-style": [{
|
|
3767
|
-
divide:
|
|
3788
|
+
divide: T()
|
|
3768
3789
|
}],
|
|
3769
3790
|
/**
|
|
3770
3791
|
* Border Color
|
|
@@ -3841,21 +3862,21 @@ const O = (e) => {
|
|
|
3841
3862
|
* @see https://tailwindcss.com/docs/outline-style
|
|
3842
3863
|
*/
|
|
3843
3864
|
"outline-style": [{
|
|
3844
|
-
outline: ["", ...
|
|
3865
|
+
outline: ["", ...T()]
|
|
3845
3866
|
}],
|
|
3846
3867
|
/**
|
|
3847
3868
|
* Outline Offset
|
|
3848
3869
|
* @see https://tailwindcss.com/docs/outline-offset
|
|
3849
3870
|
*/
|
|
3850
3871
|
"outline-offset": [{
|
|
3851
|
-
"outline-offset": [
|
|
3872
|
+
"outline-offset": [te, I]
|
|
3852
3873
|
}],
|
|
3853
3874
|
/**
|
|
3854
3875
|
* Outline Width
|
|
3855
3876
|
* @see https://tailwindcss.com/docs/outline-width
|
|
3856
3877
|
*/
|
|
3857
3878
|
"outline-w": [{
|
|
3858
|
-
outline: [
|
|
3879
|
+
outline: [te, ie]
|
|
3859
3880
|
}],
|
|
3860
3881
|
/**
|
|
3861
3882
|
* Outline Color
|
|
@@ -3869,7 +3890,7 @@ const O = (e) => {
|
|
|
3869
3890
|
* @see https://tailwindcss.com/docs/ring-width
|
|
3870
3891
|
*/
|
|
3871
3892
|
"ring-w": [{
|
|
3872
|
-
ring:
|
|
3893
|
+
ring: z()
|
|
3873
3894
|
}],
|
|
3874
3895
|
/**
|
|
3875
3896
|
* Ring Width Inset
|
|
@@ -3888,14 +3909,14 @@ const O = (e) => {
|
|
|
3888
3909
|
* @see https://tailwindcss.com/docs/ring-opacity
|
|
3889
3910
|
*/
|
|
3890
3911
|
"ring-opacity": [{
|
|
3891
|
-
"ring-opacity": [
|
|
3912
|
+
"ring-opacity": [y]
|
|
3892
3913
|
}],
|
|
3893
3914
|
/**
|
|
3894
3915
|
* Ring Offset Width
|
|
3895
3916
|
* @see https://tailwindcss.com/docs/ring-offset-width
|
|
3896
3917
|
*/
|
|
3897
3918
|
"ring-offset-w": [{
|
|
3898
|
-
"ring-offset": [
|
|
3919
|
+
"ring-offset": [te, ie]
|
|
3899
3920
|
}],
|
|
3900
3921
|
/**
|
|
3901
3922
|
* Ring Offset Color
|
|
@@ -3910,7 +3931,7 @@ const O = (e) => {
|
|
|
3910
3931
|
* @see https://tailwindcss.com/docs/box-shadow
|
|
3911
3932
|
*/
|
|
3912
3933
|
shadow: [{
|
|
3913
|
-
shadow: ["", "inner", "none",
|
|
3934
|
+
shadow: ["", "inner", "none", ce, En]
|
|
3914
3935
|
}],
|
|
3915
3936
|
/**
|
|
3916
3937
|
* Box Shadow Color
|
|
@@ -3924,21 +3945,21 @@ const O = (e) => {
|
|
|
3924
3945
|
* @see https://tailwindcss.com/docs/opacity
|
|
3925
3946
|
*/
|
|
3926
3947
|
opacity: [{
|
|
3927
|
-
opacity: [
|
|
3948
|
+
opacity: [y]
|
|
3928
3949
|
}],
|
|
3929
3950
|
/**
|
|
3930
3951
|
* Mix Blend Mode
|
|
3931
3952
|
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
3932
3953
|
*/
|
|
3933
3954
|
"mix-blend": [{
|
|
3934
|
-
"mix-blend": [...
|
|
3955
|
+
"mix-blend": [...H(), "plus-lighter", "plus-darker"]
|
|
3935
3956
|
}],
|
|
3936
3957
|
/**
|
|
3937
3958
|
* Background Blend Mode
|
|
3938
3959
|
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
3939
3960
|
*/
|
|
3940
3961
|
"bg-blend": [{
|
|
3941
|
-
"bg-blend":
|
|
3962
|
+
"bg-blend": H()
|
|
3942
3963
|
}],
|
|
3943
3964
|
// Filters
|
|
3944
3965
|
/**
|
|
@@ -3975,7 +3996,7 @@ const O = (e) => {
|
|
|
3975
3996
|
* @see https://tailwindcss.com/docs/drop-shadow
|
|
3976
3997
|
*/
|
|
3977
3998
|
"drop-shadow": [{
|
|
3978
|
-
"drop-shadow": ["", "none",
|
|
3999
|
+
"drop-shadow": ["", "none", ce, I]
|
|
3979
4000
|
}],
|
|
3980
4001
|
/**
|
|
3981
4002
|
* Grayscale
|
|
@@ -3996,7 +4017,7 @@ const O = (e) => {
|
|
|
3996
4017
|
* @see https://tailwindcss.com/docs/invert
|
|
3997
4018
|
*/
|
|
3998
4019
|
invert: [{
|
|
3999
|
-
invert: [
|
|
4020
|
+
invert: [w]
|
|
4000
4021
|
}],
|
|
4001
4022
|
/**
|
|
4002
4023
|
* Saturate
|
|
@@ -4010,7 +4031,7 @@ const O = (e) => {
|
|
|
4010
4031
|
* @see https://tailwindcss.com/docs/sepia
|
|
4011
4032
|
*/
|
|
4012
4033
|
sepia: [{
|
|
4013
|
-
sepia: [
|
|
4034
|
+
sepia: [N]
|
|
4014
4035
|
}],
|
|
4015
4036
|
/**
|
|
4016
4037
|
* Backdrop Filter
|
|
@@ -4060,14 +4081,14 @@ const O = (e) => {
|
|
|
4060
4081
|
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
4061
4082
|
*/
|
|
4062
4083
|
"backdrop-invert": [{
|
|
4063
|
-
"backdrop-invert": [
|
|
4084
|
+
"backdrop-invert": [w]
|
|
4064
4085
|
}],
|
|
4065
4086
|
/**
|
|
4066
4087
|
* Backdrop Opacity
|
|
4067
4088
|
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
4068
4089
|
*/
|
|
4069
4090
|
"backdrop-opacity": [{
|
|
4070
|
-
"backdrop-opacity": [
|
|
4091
|
+
"backdrop-opacity": [y]
|
|
4071
4092
|
}],
|
|
4072
4093
|
/**
|
|
4073
4094
|
* Backdrop Saturate
|
|
@@ -4081,7 +4102,7 @@ const O = (e) => {
|
|
|
4081
4102
|
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
4082
4103
|
*/
|
|
4083
4104
|
"backdrop-sepia": [{
|
|
4084
|
-
"backdrop-sepia": [
|
|
4105
|
+
"backdrop-sepia": [N]
|
|
4085
4106
|
}],
|
|
4086
4107
|
// Tables
|
|
4087
4108
|
/**
|
|
@@ -4132,35 +4153,35 @@ const O = (e) => {
|
|
|
4132
4153
|
* @see https://tailwindcss.com/docs/transition-property
|
|
4133
4154
|
*/
|
|
4134
4155
|
transition: [{
|
|
4135
|
-
transition: ["none", "all", "", "colors", "opacity", "shadow", "transform",
|
|
4156
|
+
transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", I]
|
|
4136
4157
|
}],
|
|
4137
4158
|
/**
|
|
4138
4159
|
* Transition Duration
|
|
4139
4160
|
* @see https://tailwindcss.com/docs/transition-duration
|
|
4140
4161
|
*/
|
|
4141
4162
|
duration: [{
|
|
4142
|
-
duration:
|
|
4163
|
+
duration: D()
|
|
4143
4164
|
}],
|
|
4144
4165
|
/**
|
|
4145
4166
|
* Transition Timing Function
|
|
4146
4167
|
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
4147
4168
|
*/
|
|
4148
4169
|
ease: [{
|
|
4149
|
-
ease: ["linear", "in", "out", "in-out",
|
|
4170
|
+
ease: ["linear", "in", "out", "in-out", I]
|
|
4150
4171
|
}],
|
|
4151
4172
|
/**
|
|
4152
4173
|
* Transition Delay
|
|
4153
4174
|
* @see https://tailwindcss.com/docs/transition-delay
|
|
4154
4175
|
*/
|
|
4155
4176
|
delay: [{
|
|
4156
|
-
delay:
|
|
4177
|
+
delay: D()
|
|
4157
4178
|
}],
|
|
4158
4179
|
/**
|
|
4159
4180
|
* Animation
|
|
4160
4181
|
* @see https://tailwindcss.com/docs/animation
|
|
4161
4182
|
*/
|
|
4162
4183
|
animate: [{
|
|
4163
|
-
animate: ["none", "spin", "ping", "pulse", "bounce",
|
|
4184
|
+
animate: ["none", "spin", "ping", "pulse", "bounce", I]
|
|
4164
4185
|
}],
|
|
4165
4186
|
// Transforms
|
|
4166
4187
|
/**
|
|
@@ -4196,42 +4217,42 @@ const O = (e) => {
|
|
|
4196
4217
|
* @see https://tailwindcss.com/docs/rotate
|
|
4197
4218
|
*/
|
|
4198
4219
|
rotate: [{
|
|
4199
|
-
rotate: [xe,
|
|
4220
|
+
rotate: [xe, I]
|
|
4200
4221
|
}],
|
|
4201
4222
|
/**
|
|
4202
4223
|
* Translate X
|
|
4203
4224
|
* @see https://tailwindcss.com/docs/translate
|
|
4204
4225
|
*/
|
|
4205
4226
|
"translate-x": [{
|
|
4206
|
-
"translate-x": [
|
|
4227
|
+
"translate-x": [B]
|
|
4207
4228
|
}],
|
|
4208
4229
|
/**
|
|
4209
4230
|
* Translate Y
|
|
4210
4231
|
* @see https://tailwindcss.com/docs/translate
|
|
4211
4232
|
*/
|
|
4212
4233
|
"translate-y": [{
|
|
4213
|
-
"translate-y": [
|
|
4234
|
+
"translate-y": [B]
|
|
4214
4235
|
}],
|
|
4215
4236
|
/**
|
|
4216
4237
|
* Skew X
|
|
4217
4238
|
* @see https://tailwindcss.com/docs/skew
|
|
4218
4239
|
*/
|
|
4219
4240
|
"skew-x": [{
|
|
4220
|
-
"skew-x": [
|
|
4241
|
+
"skew-x": [C]
|
|
4221
4242
|
}],
|
|
4222
4243
|
/**
|
|
4223
4244
|
* Skew Y
|
|
4224
4245
|
* @see https://tailwindcss.com/docs/skew
|
|
4225
4246
|
*/
|
|
4226
4247
|
"skew-y": [{
|
|
4227
|
-
"skew-y": [
|
|
4248
|
+
"skew-y": [C]
|
|
4228
4249
|
}],
|
|
4229
4250
|
/**
|
|
4230
4251
|
* Transform Origin
|
|
4231
4252
|
* @see https://tailwindcss.com/docs/transform-origin
|
|
4232
4253
|
*/
|
|
4233
4254
|
"transform-origin": [{
|
|
4234
|
-
origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left",
|
|
4255
|
+
origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", I]
|
|
4235
4256
|
}],
|
|
4236
4257
|
// Interactivity
|
|
4237
4258
|
/**
|
|
@@ -4253,7 +4274,7 @@ const O = (e) => {
|
|
|
4253
4274
|
* @see https://tailwindcss.com/docs/cursor
|
|
4254
4275
|
*/
|
|
4255
4276
|
cursor: [{
|
|
4256
|
-
cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out",
|
|
4277
|
+
cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", I]
|
|
4257
4278
|
}],
|
|
4258
4279
|
/**
|
|
4259
4280
|
* Caret Color
|
|
@@ -4288,126 +4309,126 @@ const O = (e) => {
|
|
|
4288
4309
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4289
4310
|
*/
|
|
4290
4311
|
"scroll-m": [{
|
|
4291
|
-
"scroll-m":
|
|
4312
|
+
"scroll-m": M()
|
|
4292
4313
|
}],
|
|
4293
4314
|
/**
|
|
4294
4315
|
* Scroll Margin X
|
|
4295
4316
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4296
4317
|
*/
|
|
4297
4318
|
"scroll-mx": [{
|
|
4298
|
-
"scroll-mx":
|
|
4319
|
+
"scroll-mx": M()
|
|
4299
4320
|
}],
|
|
4300
4321
|
/**
|
|
4301
4322
|
* Scroll Margin Y
|
|
4302
4323
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4303
4324
|
*/
|
|
4304
4325
|
"scroll-my": [{
|
|
4305
|
-
"scroll-my":
|
|
4326
|
+
"scroll-my": M()
|
|
4306
4327
|
}],
|
|
4307
4328
|
/**
|
|
4308
4329
|
* Scroll Margin Start
|
|
4309
4330
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4310
4331
|
*/
|
|
4311
4332
|
"scroll-ms": [{
|
|
4312
|
-
"scroll-ms":
|
|
4333
|
+
"scroll-ms": M()
|
|
4313
4334
|
}],
|
|
4314
4335
|
/**
|
|
4315
4336
|
* Scroll Margin End
|
|
4316
4337
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4317
4338
|
*/
|
|
4318
4339
|
"scroll-me": [{
|
|
4319
|
-
"scroll-me":
|
|
4340
|
+
"scroll-me": M()
|
|
4320
4341
|
}],
|
|
4321
4342
|
/**
|
|
4322
4343
|
* Scroll Margin Top
|
|
4323
4344
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4324
4345
|
*/
|
|
4325
4346
|
"scroll-mt": [{
|
|
4326
|
-
"scroll-mt":
|
|
4347
|
+
"scroll-mt": M()
|
|
4327
4348
|
}],
|
|
4328
4349
|
/**
|
|
4329
4350
|
* Scroll Margin Right
|
|
4330
4351
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4331
4352
|
*/
|
|
4332
4353
|
"scroll-mr": [{
|
|
4333
|
-
"scroll-mr":
|
|
4354
|
+
"scroll-mr": M()
|
|
4334
4355
|
}],
|
|
4335
4356
|
/**
|
|
4336
4357
|
* Scroll Margin Bottom
|
|
4337
4358
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4338
4359
|
*/
|
|
4339
4360
|
"scroll-mb": [{
|
|
4340
|
-
"scroll-mb":
|
|
4361
|
+
"scroll-mb": M()
|
|
4341
4362
|
}],
|
|
4342
4363
|
/**
|
|
4343
4364
|
* Scroll Margin Left
|
|
4344
4365
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4345
4366
|
*/
|
|
4346
4367
|
"scroll-ml": [{
|
|
4347
|
-
"scroll-ml":
|
|
4368
|
+
"scroll-ml": M()
|
|
4348
4369
|
}],
|
|
4349
4370
|
/**
|
|
4350
4371
|
* Scroll Padding
|
|
4351
4372
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4352
4373
|
*/
|
|
4353
4374
|
"scroll-p": [{
|
|
4354
|
-
"scroll-p":
|
|
4375
|
+
"scroll-p": M()
|
|
4355
4376
|
}],
|
|
4356
4377
|
/**
|
|
4357
4378
|
* Scroll Padding X
|
|
4358
4379
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4359
4380
|
*/
|
|
4360
4381
|
"scroll-px": [{
|
|
4361
|
-
"scroll-px":
|
|
4382
|
+
"scroll-px": M()
|
|
4362
4383
|
}],
|
|
4363
4384
|
/**
|
|
4364
4385
|
* Scroll Padding Y
|
|
4365
4386
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4366
4387
|
*/
|
|
4367
4388
|
"scroll-py": [{
|
|
4368
|
-
"scroll-py":
|
|
4389
|
+
"scroll-py": M()
|
|
4369
4390
|
}],
|
|
4370
4391
|
/**
|
|
4371
4392
|
* Scroll Padding Start
|
|
4372
4393
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4373
4394
|
*/
|
|
4374
4395
|
"scroll-ps": [{
|
|
4375
|
-
"scroll-ps":
|
|
4396
|
+
"scroll-ps": M()
|
|
4376
4397
|
}],
|
|
4377
4398
|
/**
|
|
4378
4399
|
* Scroll Padding End
|
|
4379
4400
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4380
4401
|
*/
|
|
4381
4402
|
"scroll-pe": [{
|
|
4382
|
-
"scroll-pe":
|
|
4403
|
+
"scroll-pe": M()
|
|
4383
4404
|
}],
|
|
4384
4405
|
/**
|
|
4385
4406
|
* Scroll Padding Top
|
|
4386
4407
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4387
4408
|
*/
|
|
4388
4409
|
"scroll-pt": [{
|
|
4389
|
-
"scroll-pt":
|
|
4410
|
+
"scroll-pt": M()
|
|
4390
4411
|
}],
|
|
4391
4412
|
/**
|
|
4392
4413
|
* Scroll Padding Right
|
|
4393
4414
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4394
4415
|
*/
|
|
4395
4416
|
"scroll-pr": [{
|
|
4396
|
-
"scroll-pr":
|
|
4417
|
+
"scroll-pr": M()
|
|
4397
4418
|
}],
|
|
4398
4419
|
/**
|
|
4399
4420
|
* Scroll Padding Bottom
|
|
4400
4421
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4401
4422
|
*/
|
|
4402
4423
|
"scroll-pb": [{
|
|
4403
|
-
"scroll-pb":
|
|
4424
|
+
"scroll-pb": M()
|
|
4404
4425
|
}],
|
|
4405
4426
|
/**
|
|
4406
4427
|
* Scroll Padding Left
|
|
4407
4428
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4408
4429
|
*/
|
|
4409
4430
|
"scroll-pl": [{
|
|
4410
|
-
"scroll-pl":
|
|
4431
|
+
"scroll-pl": M()
|
|
4411
4432
|
}],
|
|
4412
4433
|
/**
|
|
4413
4434
|
* Scroll Snap Align
|
|
@@ -4475,7 +4496,7 @@ const O = (e) => {
|
|
|
4475
4496
|
* @see https://tailwindcss.com/docs/will-change
|
|
4476
4497
|
*/
|
|
4477
4498
|
"will-change": [{
|
|
4478
|
-
"will-change": ["auto", "scroll", "contents", "transform",
|
|
4499
|
+
"will-change": ["auto", "scroll", "contents", "transform", I]
|
|
4479
4500
|
}],
|
|
4480
4501
|
// SVG
|
|
4481
4502
|
/**
|
|
@@ -4490,7 +4511,7 @@ const O = (e) => {
|
|
|
4490
4511
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
4491
4512
|
*/
|
|
4492
4513
|
"stroke-w": [{
|
|
4493
|
-
stroke: [
|
|
4514
|
+
stroke: [te, ie, $e]
|
|
4494
4515
|
}],
|
|
4495
4516
|
/**
|
|
4496
4517
|
* Stroke
|
|
@@ -4570,40 +4591,40 @@ function Wn(...e) {
|
|
|
4570
4591
|
return Dn(Rt(e));
|
|
4571
4592
|
}
|
|
4572
4593
|
function yr({ autoWidth: e = !0, className: t, style: n }) {
|
|
4573
|
-
const [r, o] = E(() =>
|
|
4574
|
-
|
|
4575
|
-
const
|
|
4576
|
-
o(
|
|
4594
|
+
const [r, o] = E(() => re.getActiveAppId()), [i, a] = E(() => Z.getRunningApps()), { isMobile: c } = it();
|
|
4595
|
+
V(() => {
|
|
4596
|
+
const v = re.subscribe("activeAppId", (y) => {
|
|
4597
|
+
o(y);
|
|
4577
4598
|
});
|
|
4578
4599
|
return () => {
|
|
4579
|
-
|
|
4600
|
+
v();
|
|
4580
4601
|
};
|
|
4581
|
-
}, []),
|
|
4582
|
-
a(
|
|
4583
|
-
}), []),
|
|
4602
|
+
}, []), V(() => Z.subscribe(() => {
|
|
4603
|
+
a(Z.getRunningApps());
|
|
4604
|
+
}), []), V(() => {
|
|
4584
4605
|
if (!new URLSearchParams(window.location.search).has("app")) {
|
|
4585
|
-
const h =
|
|
4586
|
-
h && !
|
|
4606
|
+
const h = re.getActiveAppId();
|
|
4607
|
+
h && !Z.isRunning(h) && Z.launchApp(h);
|
|
4587
4608
|
}
|
|
4588
4609
|
}, []);
|
|
4589
|
-
const l = (
|
|
4590
|
-
|
|
4591
|
-
}, u = r ? me.get(r) : null,
|
|
4610
|
+
const l = (v) => {
|
|
4611
|
+
Z.closeApp(v);
|
|
4612
|
+
}, u = r ? me.get(r) : null, w = (u == null ? void 0 : u.width) ?? 400, d = r !== null, b = { ...{
|
|
4592
4613
|
overflow: "hidden",
|
|
4593
4614
|
display: d ? "flex" : "none",
|
|
4594
4615
|
flexDirection: "column",
|
|
4595
4616
|
flexShrink: 0,
|
|
4596
4617
|
// Only set width if autoWidth is enabled
|
|
4597
|
-
...e && d ? { width: c ? "100%" :
|
|
4618
|
+
...e && d ? { width: c ? "100%" : w } : {}
|
|
4598
4619
|
}, ...n };
|
|
4599
|
-
return /* @__PURE__ */ s("div", { className: Wn("nc-app-panel", t), style:
|
|
4620
|
+
return /* @__PURE__ */ s("div", { className: Wn("nc-app-panel", t), style: b, children: i.map((v) => /* @__PURE__ */ s(
|
|
4600
4621
|
rt,
|
|
4601
4622
|
{
|
|
4602
|
-
appId:
|
|
4603
|
-
isActive: r ===
|
|
4604
|
-
onClose: () => l(
|
|
4623
|
+
appId: v.appId,
|
|
4624
|
+
isActive: r === v.appId,
|
|
4625
|
+
onClose: () => l(v.appId)
|
|
4605
4626
|
},
|
|
4606
|
-
|
|
4627
|
+
v.appId
|
|
4607
4628
|
)) });
|
|
4608
4629
|
}
|
|
4609
4630
|
function xr({
|
|
@@ -4613,60 +4634,60 @@ function xr({
|
|
|
4613
4634
|
side: r = "left",
|
|
4614
4635
|
getBadge: o
|
|
4615
4636
|
}) {
|
|
4616
|
-
const { t: i } =
|
|
4617
|
-
|
|
4618
|
-
const p =
|
|
4637
|
+
const { t: i } = oe(), { isMobile: a } = it(), [c, l] = E(() => re.getActiveAppId()), [u, f] = E(() => Z.getRunningApps());
|
|
4638
|
+
V(() => {
|
|
4639
|
+
const p = re.subscribe("activeAppId", (m) => {
|
|
4619
4640
|
l(m);
|
|
4620
4641
|
});
|
|
4621
4642
|
return () => {
|
|
4622
4643
|
p();
|
|
4623
4644
|
};
|
|
4624
|
-
}, []),
|
|
4625
|
-
f(
|
|
4645
|
+
}, []), V(() => Z.subscribe(() => {
|
|
4646
|
+
f(Z.getRunningApps());
|
|
4626
4647
|
}), []);
|
|
4627
|
-
const
|
|
4628
|
-
c === p ?
|
|
4629
|
-
}, d = e.map((p) => me.get(p)).filter((p) => !!p),
|
|
4630
|
-
const
|
|
4631
|
-
return
|
|
4648
|
+
const w = (p) => {
|
|
4649
|
+
c === p ? Z.setActiveApp(null) : Z.launchApp(p);
|
|
4650
|
+
}, d = e.map((p) => me.get(p)).filter((p) => !!p), g = u.filter((p) => !e.includes(p.appId)).map((p) => ({ running: p, def: me.get(p.appId) })).filter((p) => !!p.def), k = (p) => u.some((m) => m.appId === p), b = (p) => p.titleKey ? String(i(p.titleKey)) : p.id, v = (p) => typeof p == "number" && p > 99 ? "99+" : p, y = (p, m) => {
|
|
4651
|
+
const N = o == null ? void 0 : o(p, m);
|
|
4652
|
+
return N ? /* @__PURE__ */ s(
|
|
4632
4653
|
"span",
|
|
4633
4654
|
{
|
|
4634
|
-
className: `nc-app-taskbar-badge nc-${
|
|
4635
|
-
"aria-label":
|
|
4636
|
-
children:
|
|
4655
|
+
className: `nc-app-taskbar-badge nc-${N.tone ?? "default"}`,
|
|
4656
|
+
"aria-label": N.ariaLabel,
|
|
4657
|
+
children: v(N.content)
|
|
4637
4658
|
}
|
|
4638
4659
|
) : null;
|
|
4639
4660
|
}, h = a ? 24 : 28;
|
|
4640
|
-
return /* @__PURE__ */
|
|
4661
|
+
return /* @__PURE__ */ A("div", { className: `nc-app-taskbar ${a ? "nc-mobile" : "nc-desktop"} nc-${r} ${t}`, children: [
|
|
4641
4662
|
d.map((p) => {
|
|
4642
|
-
const m = p.icon,
|
|
4643
|
-
return /* @__PURE__ */
|
|
4663
|
+
const m = p.icon, N = c === p.id, C = k(p.id), P = { isActive: N, isRunning: C, isPinned: !0 };
|
|
4664
|
+
return /* @__PURE__ */ A(
|
|
4644
4665
|
"button",
|
|
4645
4666
|
{
|
|
4646
|
-
className: `nc-app-taskbar-button ${
|
|
4647
|
-
onClick: () =>
|
|
4648
|
-
title:
|
|
4667
|
+
className: `nc-app-taskbar-button ${N ? "nc-active" : ""} ${C ? "nc-running" : ""}`,
|
|
4668
|
+
onClick: () => w(p.id),
|
|
4669
|
+
title: b(p),
|
|
4649
4670
|
children: [
|
|
4650
4671
|
/* @__PURE__ */ s(m, { size: h }),
|
|
4651
|
-
|
|
4652
|
-
n &&
|
|
4672
|
+
y(p, P),
|
|
4673
|
+
n && C && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
|
|
4653
4674
|
]
|
|
4654
4675
|
},
|
|
4655
4676
|
p.id
|
|
4656
4677
|
);
|
|
4657
4678
|
}),
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
const
|
|
4661
|
-
return /* @__PURE__ */
|
|
4679
|
+
g.length > 0 && /* @__PURE__ */ s("div", { className: "nc-app-taskbar-separator" }),
|
|
4680
|
+
g.map(({ running: p, def: m }) => {
|
|
4681
|
+
const N = m.icon, C = c === p.appId, P = { isActive: C, isRunning: !0, isPinned: !1 };
|
|
4682
|
+
return /* @__PURE__ */ A(
|
|
4662
4683
|
"button",
|
|
4663
4684
|
{
|
|
4664
|
-
className: `nc-app-taskbar-button ${
|
|
4665
|
-
onClick: () =>
|
|
4666
|
-
title:
|
|
4685
|
+
className: `nc-app-taskbar-button ${C ? "nc-active" : ""} nc-running`,
|
|
4686
|
+
onClick: () => w(p.appId),
|
|
4687
|
+
title: b(m),
|
|
4667
4688
|
children: [
|
|
4668
|
-
/* @__PURE__ */ s(
|
|
4669
|
-
|
|
4689
|
+
/* @__PURE__ */ s(N, { size: h }),
|
|
4690
|
+
y(m, P),
|
|
4670
4691
|
n && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
|
|
4671
4692
|
]
|
|
4672
4693
|
},
|
|
@@ -4714,67 +4735,67 @@ function kr({
|
|
|
4714
4735
|
}
|
|
4715
4736
|
const De = ge(null), pt = ge(null);
|
|
4716
4737
|
function Nr() {
|
|
4717
|
-
const e =
|
|
4738
|
+
const e = ae(De);
|
|
4718
4739
|
if (!e)
|
|
4719
4740
|
throw new Error("useNavStack must be used within a NavStackProvider");
|
|
4720
4741
|
return e;
|
|
4721
4742
|
}
|
|
4722
4743
|
function Ar() {
|
|
4723
|
-
const e =
|
|
4744
|
+
const e = ae(pt);
|
|
4724
4745
|
if (!e)
|
|
4725
4746
|
throw new Error("useNavView must be used within NavStack");
|
|
4726
4747
|
return e;
|
|
4727
4748
|
}
|
|
4728
4749
|
const We = ge(null);
|
|
4729
4750
|
function Sr({ rootView: e, children: t }) {
|
|
4730
|
-
const { t: n } =
|
|
4731
|
-
c((
|
|
4732
|
-
const
|
|
4733
|
-
return
|
|
4751
|
+
const { t: n } = oe(), r = tn(), [o, i] = E([e]), [a, c] = E([null]), l = X((m, N) => {
|
|
4752
|
+
c((C) => {
|
|
4753
|
+
const P = [...C];
|
|
4754
|
+
return P[m] = N, P;
|
|
4734
4755
|
});
|
|
4735
|
-
}, []), u =
|
|
4736
|
-
c((
|
|
4737
|
-
const
|
|
4738
|
-
return
|
|
4756
|
+
}, []), u = X((m) => {
|
|
4757
|
+
c((N) => {
|
|
4758
|
+
const C = [...N];
|
|
4759
|
+
return C[m] = null, C;
|
|
4739
4760
|
});
|
|
4740
|
-
}, []), f =
|
|
4741
|
-
i((
|
|
4742
|
-
}, []),
|
|
4761
|
+
}, []), f = X((m) => {
|
|
4762
|
+
i((N) => [...N, m]), c((N) => [...N, null]);
|
|
4763
|
+
}, []), w = X(() => {
|
|
4743
4764
|
i((m) => m.length <= 1 ? m : m.slice(0, -1)), c((m) => m.slice(0, -1));
|
|
4744
|
-
}, []), d =
|
|
4765
|
+
}, []), d = X(() => {
|
|
4745
4766
|
i([e]), c([null]);
|
|
4746
|
-
}, [e]),
|
|
4747
|
-
|
|
4748
|
-
r.setTitle(
|
|
4749
|
-
}, [
|
|
4750
|
-
|
|
4751
|
-
}, [
|
|
4767
|
+
}, [e]), g = o.length, k = g > 1, b = o.length - 1, v = o[o.length - 1], y = v != null && v.titleKey ? n(v.titleKey) : (v == null ? void 0 : v.title) ?? "";
|
|
4768
|
+
V(() => {
|
|
4769
|
+
r.setTitle(y);
|
|
4770
|
+
}, [y, r]), V(() => {
|
|
4771
|
+
k ? r.setBackHandler(w) : r.clearBackHandler();
|
|
4772
|
+
}, [k, w, r]), V(() => {
|
|
4752
4773
|
const m = a[a.length - 1];
|
|
4753
4774
|
m ? r.setToolbar(m) : r.clearToolbar();
|
|
4754
4775
|
}, [a, r]);
|
|
4755
4776
|
const h = {
|
|
4756
4777
|
push: f,
|
|
4757
|
-
pop:
|
|
4778
|
+
pop: w,
|
|
4758
4779
|
reset: d,
|
|
4759
|
-
depth:
|
|
4760
|
-
canGoBack:
|
|
4761
|
-
currentTitle:
|
|
4780
|
+
depth: g,
|
|
4781
|
+
canGoBack: k,
|
|
4782
|
+
currentTitle: y
|
|
4762
4783
|
}, p = {
|
|
4763
4784
|
stack: o,
|
|
4764
4785
|
toolbarStack: a,
|
|
4765
4786
|
updateToolbar: l,
|
|
4766
4787
|
clearToolbarAt: u,
|
|
4767
|
-
topIndex:
|
|
4788
|
+
topIndex: b
|
|
4768
4789
|
};
|
|
4769
4790
|
return /* @__PURE__ */ s(De.Provider, { value: h, children: /* @__PURE__ */ s(We.Provider, { value: p, children: t }) });
|
|
4770
4791
|
}
|
|
4771
4792
|
function Hn({ index: e, children: t }) {
|
|
4772
|
-
const n =
|
|
4793
|
+
const n = ae(We);
|
|
4773
4794
|
if (!n)
|
|
4774
4795
|
throw new Error("NavViewProvider must be used within NavStackProvider");
|
|
4775
|
-
const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n, a =
|
|
4796
|
+
const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n, a = X((u) => {
|
|
4776
4797
|
e === i && r(e, u);
|
|
4777
|
-
}, [e, i, r]), c =
|
|
4798
|
+
}, [e, i, r]), c = X(() => {
|
|
4778
4799
|
e === i && o(e);
|
|
4779
4800
|
}, [e, i, o]), l = {
|
|
4780
4801
|
setToolbar: a,
|
|
@@ -4783,7 +4804,7 @@ function Hn({ index: e, children: t }) {
|
|
|
4783
4804
|
return /* @__PURE__ */ s(pt.Provider, { value: l, children: t });
|
|
4784
4805
|
}
|
|
4785
4806
|
function Cr() {
|
|
4786
|
-
const e =
|
|
4807
|
+
const e = ae(De), t = ae(We);
|
|
4787
4808
|
if (!e || !t)
|
|
4788
4809
|
throw new Error("NavStackContainer must be used within a NavStackProvider");
|
|
4789
4810
|
const { stack: n } = t;
|
|
@@ -4808,7 +4829,7 @@ export {
|
|
|
4808
4829
|
xr as AppTaskbar,
|
|
4809
4830
|
rn as AppTitleBar,
|
|
4810
4831
|
qn as Battery,
|
|
4811
|
-
|
|
4832
|
+
ne as Button,
|
|
4812
4833
|
Xn as ButtonGroup,
|
|
4813
4834
|
Jn as Checkbox,
|
|
4814
4835
|
Ze as CloseButton,
|
|
@@ -4838,11 +4859,11 @@ export {
|
|
|
4838
4859
|
tr as TrashButton,
|
|
4839
4860
|
wr as ViewportProvider,
|
|
4840
4861
|
me as appRegistry,
|
|
4841
|
-
|
|
4862
|
+
re as appStateStore,
|
|
4842
4863
|
Wn as cn,
|
|
4843
4864
|
vr as createAppI18nFactory,
|
|
4844
4865
|
br as notificationManager,
|
|
4845
|
-
|
|
4866
|
+
Z as runningAppsStore,
|
|
4846
4867
|
Jt as showNotification,
|
|
4847
4868
|
tn as useApp,
|
|
4848
4869
|
Dt as useDialog,
|