@kingsimba/nc-ui 0.1.22 → 0.1.23
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.d.ts +3 -1
- package/dist/index.js +580 -584
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var tt = (e, t, n) => t in e ? et(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var U = (e, t, n) => tt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import { jsx as s, jsxs as x, Fragment as nt } from "react/jsx-runtime";
|
|
5
5
|
import { d as xe, E as rt, R as ot, T as st, g as it, V as ct, b as at, a as lt, c as dt } from "./GeneratedIcons-HFZmBTBT.js";
|
|
6
|
-
import ke, { useState as
|
|
6
|
+
import ke, { useState as E, useRef as W, useMemo as me, useEffect as B, createContext as se, useContext as J, Children as ut, isValidElement as pt, forwardRef as ft, useImperativeHandle as ht, useCallback as O, Suspense as mt } from "react";
|
|
7
7
|
import { createPortal as ue } from "react-dom";
|
|
8
8
|
import { useTranslation as Q } from "react-i18next";
|
|
9
9
|
import gt from "i18next";
|
|
@@ -37,7 +37,7 @@ function He({
|
|
|
37
37
|
);
|
|
38
38
|
return n ? /* @__PURE__ */ s("div", { className: "nc-activity-indicator-overlay", children: o }) : o;
|
|
39
39
|
}
|
|
40
|
-
function K({ variant: e = "default", block: t, size: n = "default", appearance: r = "default", className: o, disabled: i, textSelectable: a, loading: c, onClick:
|
|
40
|
+
function K({ variant: e = "default", block: t, size: n = "default", appearance: r = "default", className: o, disabled: i, textSelectable: a, loading: c, onClick: l, children: p, ...f }) {
|
|
41
41
|
const b = [
|
|
42
42
|
"nc-button",
|
|
43
43
|
e !== "default" ? `nc-${e}` : "",
|
|
@@ -55,14 +55,14 @@ function K({ variant: e = "default", block: t, size: n = "default", appearance:
|
|
|
55
55
|
{
|
|
56
56
|
className: b,
|
|
57
57
|
disabled: i || c,
|
|
58
|
-
onClick: (
|
|
58
|
+
onClick: (u) => {
|
|
59
59
|
if (!c) {
|
|
60
60
|
if (a) {
|
|
61
61
|
const m = window.getSelection();
|
|
62
62
|
if (m && m.toString().length > 0)
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
l == null || l(u);
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
...f,
|
|
@@ -96,13 +96,13 @@ function Tn({
|
|
|
96
96
|
children: i,
|
|
97
97
|
onClose: a,
|
|
98
98
|
className: c = "",
|
|
99
|
-
style:
|
|
99
|
+
style: l
|
|
100
100
|
}) {
|
|
101
101
|
const p = i ?? /* @__PURE__ */ x(nt, { children: [
|
|
102
102
|
e !== void 0 && /* @__PURE__ */ s("span", { className: "nc-alert-code", children: e }),
|
|
103
103
|
t
|
|
104
104
|
] });
|
|
105
|
-
return /* @__PURE__ */ x("div", { className: `nc-alert nc-${n} ${c}`.trim(), style:
|
|
105
|
+
return /* @__PURE__ */ x("div", { className: `nc-alert nc-${n} ${c}`.trim(), style: l, children: [
|
|
106
106
|
/* @__PURE__ */ x("div", { className: "nc-alert-main", children: [
|
|
107
107
|
/* @__PURE__ */ s("div", { className: `nc-alert-message nc-${n}`, children: p }),
|
|
108
108
|
a && /* @__PURE__ */ s(
|
|
@@ -136,47 +136,47 @@ function zn({
|
|
|
136
136
|
const o = Math.max(0, Math.min(1, Number(e) || 0));
|
|
137
137
|
let i;
|
|
138
138
|
r ? o < 0.1 ? i = "var(--nc-danger)" : o < 0.2 ? i = "var(--nc-warning)" : i = "var(--nc-success)" : i = n ? "#ffffff" : "#000000";
|
|
139
|
-
const a = n ? "rgba(255, 255, 255, 0.5)" : "rgba(0, 0, 0, 0.2)", c = 24,
|
|
139
|
+
const a = n ? "rgba(255, 255, 255, 0.5)" : "rgba(0, 0, 0, 0.2)", c = 24, l = 14, p = 2, f = 0, b = 12, d = 0, u = 0, m = 0, h = c, g = l, k = g - d * 2, v = h - d * 2, N = Math.max(1, Math.min(4, g / 4)), w = o === 0 ? 0 : 0.05 + o * 0.95, A = c + p + b, $ = 20, L = 0.65, T = Math.max(l, $ * L), y = c + p + 1, R = (l - $ * L) / 2;
|
|
140
140
|
return /* @__PURE__ */ x(
|
|
141
141
|
"svg",
|
|
142
142
|
{
|
|
143
143
|
className: "nc-battery",
|
|
144
|
-
width:
|
|
145
|
-
height:
|
|
146
|
-
viewBox: `0 0 ${
|
|
144
|
+
width: A,
|
|
145
|
+
height: T,
|
|
146
|
+
viewBox: `0 0 ${A} ${T}`,
|
|
147
147
|
role: "img",
|
|
148
148
|
"aria-label": `Battery ${o === 0 ? "-" : Math.round(o * 100) + "%"} ${t}`,
|
|
149
149
|
children: [
|
|
150
150
|
/* @__PURE__ */ x("defs", { children: [
|
|
151
|
-
/* @__PURE__ */ s("mask", { id: `nc-battery-fill-mask-${o}`, children: /* @__PURE__ */ s("rect", { x: "0", y: "0", width: v * w, height:
|
|
151
|
+
/* @__PURE__ */ s("mask", { id: `nc-battery-fill-mask-${o}`, children: /* @__PURE__ */ s("rect", { x: "0", y: "0", width: v * w, height: k, fill: "white" }) }),
|
|
152
152
|
/* @__PURE__ */ x("mask", { id: `nc-battery-text-mask-${o}`, children: [
|
|
153
|
-
/* @__PURE__ */ s("rect", { x: "0", y: "0", width:
|
|
154
|
-
/* @__PURE__ */ s("text", { x:
|
|
153
|
+
/* @__PURE__ */ s("rect", { x: "0", y: "0", width: A, height: T, fill: "white" }),
|
|
154
|
+
/* @__PURE__ */ s("text", { x: u + h / 2, y: l - 3, fontSize: 11, fontWeight: "bold", fill: "black", textAnchor: "middle", children: o === 0 ? "-" : Math.round(o * 100) })
|
|
155
155
|
] })
|
|
156
156
|
] }),
|
|
157
157
|
/* @__PURE__ */ x("g", { mask: `url(#nc-battery-text-mask-${o})`, children: [
|
|
158
158
|
/* @__PURE__ */ s(
|
|
159
159
|
"rect",
|
|
160
160
|
{
|
|
161
|
-
x:
|
|
161
|
+
x: u,
|
|
162
162
|
y: m,
|
|
163
|
-
rx:
|
|
164
|
-
ry:
|
|
165
|
-
width:
|
|
166
|
-
height:
|
|
163
|
+
rx: N,
|
|
164
|
+
ry: N,
|
|
165
|
+
width: h,
|
|
166
|
+
height: g,
|
|
167
167
|
fill: a
|
|
168
168
|
}
|
|
169
169
|
),
|
|
170
170
|
/* @__PURE__ */ s(
|
|
171
171
|
"rect",
|
|
172
172
|
{
|
|
173
|
-
x:
|
|
174
|
-
y: m +
|
|
173
|
+
x: u + d,
|
|
174
|
+
y: m + d,
|
|
175
175
|
width: v,
|
|
176
|
-
height:
|
|
176
|
+
height: k,
|
|
177
177
|
fill: i,
|
|
178
|
-
rx:
|
|
179
|
-
ry:
|
|
178
|
+
rx: N,
|
|
179
|
+
ry: N,
|
|
180
180
|
mask: `url(#nc-battery-fill-mask-${o})`
|
|
181
181
|
}
|
|
182
182
|
),
|
|
@@ -184,15 +184,15 @@ function zn({
|
|
|
184
184
|
"rect",
|
|
185
185
|
{
|
|
186
186
|
x: c + f,
|
|
187
|
-
y:
|
|
187
|
+
y: l * 0.26,
|
|
188
188
|
width: p,
|
|
189
|
-
height:
|
|
189
|
+
height: l * 0.48,
|
|
190
190
|
rx: 0.8,
|
|
191
191
|
ry: 0.8,
|
|
192
192
|
fill: o === 1 ? i : a
|
|
193
193
|
}
|
|
194
194
|
),
|
|
195
|
-
t === "charging" ? /* @__PURE__ */ s("g", { transform: `translate(${
|
|
195
|
+
t === "charging" ? /* @__PURE__ */ s("g", { transform: `translate(${y}, ${R}) scale(${L})`, fill: i, children: /* @__PURE__ */ s("path", { d: "M10 0 L2 11 H8 L5 20 L14 8 H8 L10 0 Z" }) }) : null
|
|
196
196
|
] })
|
|
197
197
|
]
|
|
198
198
|
}
|
|
@@ -232,11 +232,11 @@ function wt({ size: e }) {
|
|
|
232
232
|
) });
|
|
233
233
|
}
|
|
234
234
|
function Ln({ checked: e, onChange: t, disabled: n, label: r, size: o = "default", labelColor: i, style: a, className: c = "" }) {
|
|
235
|
-
const
|
|
235
|
+
const l = o === "small";
|
|
236
236
|
return /* @__PURE__ */ x(
|
|
237
237
|
"label",
|
|
238
238
|
{
|
|
239
|
-
className: `nc-checkbox-label ${
|
|
239
|
+
className: `nc-checkbox-label ${l ? "nc-small" : ""} ${n ? "nc-disabled" : ""} ${c}`.trim(),
|
|
240
240
|
style: a,
|
|
241
241
|
onClick: (p) => {
|
|
242
242
|
n || (p.preventDefault(), t(!e));
|
|
@@ -248,7 +248,7 @@ function Ln({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
|
|
|
248
248
|
role: "checkbox",
|
|
249
249
|
"aria-checked": e,
|
|
250
250
|
tabIndex: 0,
|
|
251
|
-
className: `nc-checkbox-box ${
|
|
251
|
+
className: `nc-checkbox-box ${l ? "nc-small" : ""} ${e ? "nc-checked" : ""}`,
|
|
252
252
|
onKeyDown: (p) => {
|
|
253
253
|
n || (p.key === "Enter" || p.key === " ") && (p.preventDefault(), t(!e));
|
|
254
254
|
},
|
|
@@ -297,40 +297,40 @@ function xt({
|
|
|
297
297
|
small: a,
|
|
298
298
|
highlightedIndex: c = -1
|
|
299
299
|
}) {
|
|
300
|
-
const [
|
|
300
|
+
const [l, p] = E({ top: 0, left: 0, width: 0 }), [f, b] = E(o), { t: d } = Q();
|
|
301
301
|
if (B(() => {
|
|
302
302
|
if (e && i.current) {
|
|
303
303
|
const m = i.current.getBoundingClientRect();
|
|
304
|
-
let
|
|
304
|
+
let h = o;
|
|
305
305
|
if (o === "bottom") {
|
|
306
|
-
const
|
|
307
|
-
|
|
306
|
+
const g = window.innerHeight - m.bottom, k = m.top;
|
|
307
|
+
g < 320 && k > g && (h = "top");
|
|
308
308
|
}
|
|
309
|
-
b(
|
|
310
|
-
top:
|
|
309
|
+
b(h), p({
|
|
310
|
+
top: h === "top" ? m.top - 4 : m.bottom + 4,
|
|
311
311
|
left: m.left,
|
|
312
312
|
width: m.width
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
315
|
}, [e, i, o]), !e) return null;
|
|
316
|
-
const
|
|
316
|
+
const u = /* @__PURE__ */ s(
|
|
317
317
|
"div",
|
|
318
318
|
{
|
|
319
319
|
className: "nc-combo-dropdown",
|
|
320
320
|
style: {
|
|
321
321
|
position: "fixed",
|
|
322
|
-
top: f === "top" ? void 0 :
|
|
323
|
-
bottom: f === "top" ? window.innerHeight -
|
|
324
|
-
left:
|
|
325
|
-
width:
|
|
322
|
+
top: f === "top" ? void 0 : l.top,
|
|
323
|
+
bottom: f === "top" ? window.innerHeight - l.top : void 0,
|
|
324
|
+
left: l.left,
|
|
325
|
+
width: l.width,
|
|
326
326
|
zIndex: 1e3,
|
|
327
327
|
maxHeight: 300,
|
|
328
328
|
overflowY: "auto"
|
|
329
329
|
},
|
|
330
|
-
children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${a ? "nc-small" : ""}`, children:
|
|
330
|
+
children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${a ? "nc-small" : ""}`, children: d("common.noResults") }) : t.map((m, h) => /* @__PURE__ */ s(yt, { option: m, onChange: n, selected: m.value === r, highlighted: h === c, small: a }, m.value))
|
|
331
331
|
}
|
|
332
332
|
);
|
|
333
|
-
return ue(
|
|
333
|
+
return ue(u, document.body);
|
|
334
334
|
}
|
|
335
335
|
function kt({ onClick: e, small: t }) {
|
|
336
336
|
return /* @__PURE__ */ s(
|
|
@@ -365,136 +365,132 @@ function Bn({
|
|
|
365
365
|
label: i,
|
|
366
366
|
clearable: a = !0,
|
|
367
367
|
allowTyping: c = !1,
|
|
368
|
-
placement:
|
|
368
|
+
placement: l = "bottom",
|
|
369
369
|
size: p = "default",
|
|
370
370
|
appearance: f = "default",
|
|
371
|
-
|
|
371
|
+
textAlign: b = "left",
|
|
372
|
+
style: d,
|
|
372
373
|
className: u
|
|
373
374
|
}) {
|
|
374
|
-
const [
|
|
375
|
-
const
|
|
376
|
-
return c ? r.filter((P) => P.label.toLowerCase().includes(
|
|
375
|
+
const [m, h] = E(!1), [g, k] = E(""), [v, N] = E(-1), w = W(null), A = W(null), $ = p === "small", { t: L } = Q(), T = me(() => {
|
|
376
|
+
const M = g.toLowerCase();
|
|
377
|
+
return c ? r.filter((P) => P.label.toLowerCase().includes(M)) : r;
|
|
377
378
|
}, [r, g, c]);
|
|
378
379
|
B(() => {
|
|
379
|
-
|
|
380
|
-
}, [
|
|
380
|
+
m && N(-1);
|
|
381
|
+
}, [m, T]), B(() => {
|
|
381
382
|
if (!a && !e && r.length > 0 && t) {
|
|
382
|
-
const
|
|
383
|
-
t(
|
|
383
|
+
const M = r.find((P) => P.default) || r[0];
|
|
384
|
+
t(M.value);
|
|
384
385
|
}
|
|
385
386
|
}, [a, e, r, t]), B(() => {
|
|
386
|
-
function
|
|
387
|
-
var
|
|
388
|
-
P.target instanceof Node &&
|
|
387
|
+
function M(P) {
|
|
388
|
+
var D;
|
|
389
|
+
P.target instanceof Node && w.current && ((D = w.current.parentElement) != null && D.contains(P.target) || h(!1));
|
|
389
390
|
}
|
|
390
|
-
return document.addEventListener("mousedown",
|
|
391
|
+
return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
|
|
391
392
|
}, []);
|
|
392
|
-
const
|
|
393
|
-
var
|
|
394
|
-
t == null || t(
|
|
395
|
-
},
|
|
396
|
-
t == null || t(void 0),
|
|
397
|
-
},
|
|
398
|
-
if (!
|
|
399
|
-
(
|
|
393
|
+
const y = r.find((M) => M.value === e), R = y && a, C = !o && !R, S = `nc-align-${b}`, z = !(m && c) && !!y, F = (M, P = !1) => {
|
|
394
|
+
var D;
|
|
395
|
+
t == null || t(M), h(!1), k(""), P && ((D = w.current) == null || D.blur());
|
|
396
|
+
}, Z = () => {
|
|
397
|
+
t == null || t(void 0), k(""), h(!1);
|
|
398
|
+
}, G = (M) => {
|
|
399
|
+
if (!m) {
|
|
400
|
+
(M.key === "ArrowDown" || M.key === "ArrowUp") && (h(!0), M.preventDefault());
|
|
400
401
|
return;
|
|
401
402
|
}
|
|
402
|
-
switch (
|
|
403
|
+
switch (M.key) {
|
|
403
404
|
case "ArrowDown":
|
|
404
|
-
|
|
405
|
-
const
|
|
406
|
-
return
|
|
405
|
+
M.preventDefault(), N((P) => {
|
|
406
|
+
const D = P + 1;
|
|
407
|
+
return D >= T.length ? 0 : D;
|
|
407
408
|
});
|
|
408
409
|
break;
|
|
409
410
|
case "ArrowUp":
|
|
410
|
-
|
|
411
|
-
const
|
|
412
|
-
return
|
|
411
|
+
M.preventDefault(), N((P) => {
|
|
412
|
+
const D = P - 1;
|
|
413
|
+
return D < 0 ? T.length - 1 : D;
|
|
413
414
|
});
|
|
414
415
|
break;
|
|
415
416
|
case "Enter":
|
|
416
|
-
|
|
417
|
+
M.preventDefault(), v >= 0 && v < T.length && F(T[v].value, !0);
|
|
417
418
|
break;
|
|
418
419
|
case "Escape":
|
|
419
|
-
|
|
420
|
+
M.preventDefault(), h(!1), k("");
|
|
420
421
|
break;
|
|
421
422
|
}
|
|
422
423
|
};
|
|
423
|
-
return /* @__PURE__ */ x("div", { className: `nc-combo-container ${f === "transparent" ? "nc-transparent" : ""} ${u || ""}`.trim(), style: { position: "relative", ...
|
|
424
|
-
i && /* @__PURE__ */ s("span", { className: `nc-label ${
|
|
424
|
+
return /* @__PURE__ */ x("div", { className: `nc-combo-container ${f === "transparent" ? "nc-transparent" : ""} ${S} ${u || ""}`.trim(), style: { position: "relative", ...d }, children: [
|
|
425
|
+
i && /* @__PURE__ */ s("span", { className: `nc-label ${$ ? "nc-small" : ""}`, children: i }),
|
|
425
426
|
/* @__PURE__ */ x(
|
|
426
427
|
"div",
|
|
427
428
|
{
|
|
428
|
-
ref:
|
|
429
|
+
ref: A,
|
|
429
430
|
style: { position: "relative", display: "flex", alignItems: "center" },
|
|
430
|
-
onMouseDown: (
|
|
431
|
-
o || c &&
|
|
432
|
-
var P,
|
|
433
|
-
(P =
|
|
431
|
+
onMouseDown: (M) => {
|
|
432
|
+
o || c && M.target === w.current || (h((P) => (!P && c && y && k(y.label), !P)), c && !m && setTimeout(() => {
|
|
433
|
+
var P, D;
|
|
434
|
+
(P = w.current) == null || P.focus(), (D = w.current) == null || D.select();
|
|
434
435
|
}, 0));
|
|
435
436
|
},
|
|
436
437
|
children: [
|
|
437
438
|
/* @__PURE__ */ s(
|
|
438
439
|
"input",
|
|
439
440
|
{
|
|
440
|
-
ref:
|
|
441
|
-
className: `nc-input ${
|
|
441
|
+
ref: w,
|
|
442
|
+
className: `nc-input ${$ ? "nc-small" : ""}`,
|
|
442
443
|
placeholder: n,
|
|
443
444
|
onFocus: () => {
|
|
444
|
-
var
|
|
445
|
-
!o && c && (
|
|
445
|
+
var M;
|
|
446
|
+
!o && c && (h(!0), y && (k(y.label), setTimeout(() => {
|
|
446
447
|
var P;
|
|
447
|
-
return (P =
|
|
448
|
-
}, 0))), c || (
|
|
448
|
+
return (P = w.current) == null ? void 0 : P.select();
|
|
449
|
+
}, 0))), c || (M = w.current) == null || M.blur();
|
|
449
450
|
},
|
|
450
|
-
onChange: (
|
|
451
|
-
onKeyDown:
|
|
452
|
-
value:
|
|
451
|
+
onChange: (M) => c && k(M.target.value),
|
|
452
|
+
onKeyDown: G,
|
|
453
|
+
value: m && c ? g : (y == null ? void 0 : y.label) || "",
|
|
453
454
|
readOnly: o || !c,
|
|
454
455
|
style: {
|
|
455
456
|
width: "100%",
|
|
456
|
-
paddingRight:
|
|
457
|
+
paddingRight: C || R ? $ ? 32 : 44 : 12,
|
|
457
458
|
caretColor: c ? void 0 : "transparent",
|
|
458
459
|
cursor: c ? void 0 : "pointer",
|
|
459
460
|
userSelect: c ? void 0 : "none",
|
|
460
|
-
color:
|
|
461
|
+
color: z ? "transparent" : "var(--nc-text)"
|
|
461
462
|
}
|
|
462
463
|
}
|
|
463
464
|
),
|
|
464
|
-
|
|
465
|
+
z && /* @__PURE__ */ x(
|
|
465
466
|
"div",
|
|
466
467
|
{
|
|
467
468
|
"aria-hidden": !0,
|
|
469
|
+
className: `nc-combo-overlay ${S}`,
|
|
468
470
|
style: {
|
|
469
471
|
position: "absolute",
|
|
470
|
-
left:
|
|
471
|
-
right:
|
|
472
|
+
left: $ ? 8 : 12,
|
|
473
|
+
right: C || R ? $ ? 12 : 24 : $ ? 8 : 12,
|
|
472
474
|
top: "50%",
|
|
473
475
|
transform: "translateY(-50%)",
|
|
474
|
-
pointerEvents: "none"
|
|
475
|
-
display: "flex",
|
|
476
|
-
alignItems: "center",
|
|
477
|
-
gap: 6,
|
|
478
|
-
whiteSpace: "nowrap",
|
|
479
|
-
overflow: "hidden",
|
|
480
|
-
textOverflow: "ellipsis"
|
|
476
|
+
pointerEvents: "none"
|
|
481
477
|
},
|
|
482
478
|
children: [
|
|
483
|
-
/* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${
|
|
484
|
-
(
|
|
479
|
+
/* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${$ ? "nc-small" : ""}`, children: y == null ? void 0 : y.label }),
|
|
480
|
+
(y == null ? void 0 : y.default) && /* @__PURE__ */ x("span", { className: `nc-combo-overlay-default ${$ ? "nc-small" : ""}`, children: [
|
|
485
481
|
"(",
|
|
486
|
-
|
|
482
|
+
L("common.default"),
|
|
487
483
|
")"
|
|
488
484
|
] })
|
|
489
485
|
]
|
|
490
486
|
}
|
|
491
487
|
),
|
|
492
|
-
|
|
493
|
-
|
|
488
|
+
R && /* @__PURE__ */ s(kt, { onClick: Z, small: $ }),
|
|
489
|
+
C && /* @__PURE__ */ s(Nt, { open: m, onClick: () => h((M) => !M), small: $ })
|
|
494
490
|
]
|
|
495
491
|
}
|
|
496
492
|
),
|
|
497
|
-
/* @__PURE__ */ s(xt, { isOpen:
|
|
493
|
+
/* @__PURE__ */ s(xt, { isOpen: m, options: T, onSelect: F, selectedValue: e, placement: l, anchorRef: A, small: $, highlightedIndex: v })
|
|
498
494
|
] });
|
|
499
495
|
}
|
|
500
496
|
function Dn({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default", title: o, "aria-label": i }) {
|
|
@@ -575,35 +571,35 @@ function Fn({
|
|
|
575
571
|
anchor: o,
|
|
576
572
|
preferredDirection: i = "down"
|
|
577
573
|
}) {
|
|
578
|
-
const a = W(null), [c,
|
|
574
|
+
const a = W(null), [c, l] = E({ top: 0, left: 0 }), p = o || (r == null ? void 0 : r.current);
|
|
579
575
|
if (B(() => {
|
|
580
576
|
if (!e || !p || !a.current) return;
|
|
581
|
-
const
|
|
577
|
+
const d = p.getBoundingClientRect(), u = a.current.getBoundingClientRect(), m = window.innerHeight, h = window.innerWidth, g = d.bottom + 8, k = g + u.height <= m - 8;
|
|
582
578
|
let v = i;
|
|
583
|
-
(!
|
|
584
|
-
let
|
|
585
|
-
v === "down" ?
|
|
586
|
-
let w =
|
|
587
|
-
w +
|
|
588
|
-
top: Math.max(8,
|
|
579
|
+
(!k && i === "down" || i === "up" && k) && (v = "up");
|
|
580
|
+
let N;
|
|
581
|
+
v === "down" ? N = g : N = d.top - u.height - 8;
|
|
582
|
+
let w = d.left;
|
|
583
|
+
w + u.width > h - 8 && (w = d.right - u.width), l({
|
|
584
|
+
top: Math.max(8, N),
|
|
589
585
|
// Ensure minimum 8px from top
|
|
590
586
|
left: Math.max(8, w)
|
|
591
587
|
// Ensure minimum 8px from left
|
|
592
588
|
});
|
|
593
589
|
}, [e, p, i]), B(() => {
|
|
594
590
|
if (!e) return;
|
|
595
|
-
const
|
|
591
|
+
const d = (m) => {
|
|
596
592
|
a.current && !a.current.contains(m.target) && p && !p.contains(m.target) && t();
|
|
597
|
-
},
|
|
593
|
+
}, u = (m) => {
|
|
598
594
|
m.key === "Escape" && t();
|
|
599
595
|
};
|
|
600
|
-
return document.addEventListener("mousedown",
|
|
601
|
-
document.removeEventListener("mousedown",
|
|
596
|
+
return document.addEventListener("mousedown", d), document.addEventListener("keydown", u), () => {
|
|
597
|
+
document.removeEventListener("mousedown", d), document.removeEventListener("keydown", u);
|
|
602
598
|
};
|
|
603
599
|
}, [e, t, p]), !e) return null;
|
|
604
|
-
const f = (
|
|
605
|
-
|
|
606
|
-
}, b = n.some((
|
|
600
|
+
const f = (d) => {
|
|
601
|
+
d.type !== "separator" && !d.disabled && d.onClick && (d.onClick(), t());
|
|
602
|
+
}, b = n.some((d) => d.icon);
|
|
607
603
|
return ue(
|
|
608
604
|
/* @__PURE__ */ s(
|
|
609
605
|
"div",
|
|
@@ -617,35 +613,35 @@ function Fn({
|
|
|
617
613
|
zIndex: 1e4
|
|
618
614
|
},
|
|
619
615
|
role: "menu",
|
|
620
|
-
children: n.map((
|
|
621
|
-
if (
|
|
616
|
+
children: n.map((d) => {
|
|
617
|
+
if (d.type === "separator")
|
|
622
618
|
return /* @__PURE__ */ s(
|
|
623
619
|
"div",
|
|
624
620
|
{
|
|
625
621
|
className: "nc-context-menu-separator",
|
|
626
622
|
role: "separator"
|
|
627
623
|
},
|
|
628
|
-
|
|
624
|
+
d.id
|
|
629
625
|
);
|
|
630
|
-
const
|
|
626
|
+
const u = [
|
|
631
627
|
"nc-context-menu-item",
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
b && !
|
|
628
|
+
d.variant && d.variant !== "default" ? `nc-${d.variant}` : "",
|
|
629
|
+
d.disabled ? "nc-disabled" : "",
|
|
630
|
+
b && !d.icon ? "nc-indented" : ""
|
|
635
631
|
].filter(Boolean).join(" ");
|
|
636
632
|
return /* @__PURE__ */ x(
|
|
637
633
|
"button",
|
|
638
634
|
{
|
|
639
|
-
className:
|
|
640
|
-
onClick: () => f(
|
|
641
|
-
disabled:
|
|
635
|
+
className: u,
|
|
636
|
+
onClick: () => f(d),
|
|
637
|
+
disabled: d.disabled,
|
|
642
638
|
role: "menuitem",
|
|
643
639
|
children: [
|
|
644
|
-
|
|
645
|
-
/* @__PURE__ */ s("span", { className: "nc-context-menu-label", children:
|
|
640
|
+
d.icon && /* @__PURE__ */ s("span", { className: "nc-context-menu-icon", children: d.icon }),
|
|
641
|
+
/* @__PURE__ */ s("span", { className: "nc-context-menu-label", children: d.label })
|
|
646
642
|
]
|
|
647
643
|
},
|
|
648
|
-
|
|
644
|
+
d.id
|
|
649
645
|
);
|
|
650
646
|
})
|
|
651
647
|
}
|
|
@@ -675,56 +671,56 @@ function Vn({
|
|
|
675
671
|
footerType: i = "ok-cancel",
|
|
676
672
|
footer: a,
|
|
677
673
|
onOk: c,
|
|
678
|
-
onSave:
|
|
674
|
+
onSave: l,
|
|
679
675
|
onDelete: p,
|
|
680
676
|
onCancel: f,
|
|
681
677
|
onConnect: b,
|
|
682
|
-
closeOnOverlay:
|
|
683
|
-
primaryDisabled:
|
|
678
|
+
closeOnOverlay: d = !0,
|
|
679
|
+
primaryDisabled: u = !1,
|
|
684
680
|
fullScreen: m = !1,
|
|
685
|
-
hideTitleBar:
|
|
686
|
-
className:
|
|
687
|
-
onContentHeightChange:
|
|
681
|
+
hideTitleBar: h = !1,
|
|
682
|
+
className: g = "",
|
|
683
|
+
onContentHeightChange: k
|
|
688
684
|
}) {
|
|
689
|
-
const v = W(null),
|
|
690
|
-
|
|
685
|
+
const v = W(null), N = W(null), { t: w } = Q(), A = { close: t }, $ = (y) => {
|
|
686
|
+
d && y.target === y.currentTarget && t();
|
|
691
687
|
};
|
|
692
688
|
if (B(() => {
|
|
693
689
|
e && v.current && v.current.focus();
|
|
694
690
|
}, [e]), B(() => {
|
|
695
|
-
if (!
|
|
696
|
-
const
|
|
691
|
+
if (!k || !N.current) return;
|
|
692
|
+
const y = new ResizeObserver((R) => {
|
|
697
693
|
for (const C of R) {
|
|
698
694
|
const S = C.contentRect.height;
|
|
699
|
-
|
|
695
|
+
k(S);
|
|
700
696
|
}
|
|
701
697
|
});
|
|
702
|
-
return
|
|
703
|
-
|
|
698
|
+
return y.observe(N.current), () => {
|
|
699
|
+
y.disconnect();
|
|
704
700
|
};
|
|
705
|
-
}, [
|
|
706
|
-
const
|
|
701
|
+
}, [k]), !e) return null;
|
|
702
|
+
const L = () => {
|
|
707
703
|
switch (i) {
|
|
708
704
|
case "ok":
|
|
709
|
-
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(K, { variant: "primary", onClick: c ?? t, disabled:
|
|
705
|
+
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(K, { variant: "primary", onClick: c ?? t, disabled: u, children: w("common.ok") }) });
|
|
710
706
|
case "ok-cancel":
|
|
711
707
|
return /* @__PURE__ */ x("div", { className: "nc-dialog-footer", children: [
|
|
712
|
-
/* @__PURE__ */ s(K, { variant: "primary", onClick: c ?? t, disabled:
|
|
708
|
+
/* @__PURE__ */ s(K, { variant: "primary", onClick: c ?? t, disabled: u, children: w("common.ok") }),
|
|
713
709
|
/* @__PURE__ */ s(ne, { onClick: f, children: w("common.cancel") })
|
|
714
710
|
] });
|
|
715
711
|
case "save-cancel":
|
|
716
712
|
return /* @__PURE__ */ x("div", { className: "nc-dialog-footer", children: [
|
|
717
|
-
/* @__PURE__ */ s(K, { variant: "primary", onClick:
|
|
713
|
+
/* @__PURE__ */ s(K, { variant: "primary", onClick: l, disabled: u, children: w("common.save") }),
|
|
718
714
|
/* @__PURE__ */ s(ne, { onClick: f, children: w("common.cancel") })
|
|
719
715
|
] });
|
|
720
716
|
case "delete-cancel":
|
|
721
717
|
return /* @__PURE__ */ x("div", { className: "nc-dialog-footer", children: [
|
|
722
|
-
/* @__PURE__ */ s(K, { variant: "danger", onClick: p, disabled:
|
|
718
|
+
/* @__PURE__ */ s(K, { variant: "danger", onClick: p, disabled: u, children: w("common.delete") }),
|
|
723
719
|
/* @__PURE__ */ s(ne, { onClick: f, children: w("common.cancel") })
|
|
724
720
|
] });
|
|
725
721
|
case "connect":
|
|
726
722
|
return /* @__PURE__ */ x("div", { className: "nc-dialog-footer", children: [
|
|
727
|
-
/* @__PURE__ */ s(K, { variant: "primary", onClick: b, disabled:
|
|
723
|
+
/* @__PURE__ */ s(K, { variant: "primary", onClick: b, disabled: u, children: w("common.connect") }),
|
|
728
724
|
/* @__PURE__ */ s(ne, { onClick: f, children: w("common.cancel") })
|
|
729
725
|
] });
|
|
730
726
|
case "close":
|
|
@@ -738,27 +734,27 @@ function Vn({
|
|
|
738
734
|
default:
|
|
739
735
|
return null;
|
|
740
736
|
}
|
|
741
|
-
},
|
|
737
|
+
}, T = /* @__PURE__ */ s(Oe.Provider, { value: A, children: /* @__PURE__ */ s("div", { className: `nc-dialog-overlay${m ? " nc-fullscreen" : ""}`, onClick: $, children: /* @__PURE__ */ x(
|
|
742
738
|
"div",
|
|
743
739
|
{
|
|
744
740
|
ref: v,
|
|
745
|
-
className: `nc-dialog-container ${
|
|
741
|
+
className: `nc-dialog-container ${g}`,
|
|
746
742
|
style: o,
|
|
747
743
|
tabIndex: -1,
|
|
748
744
|
role: "dialog",
|
|
749
745
|
"aria-modal": "true",
|
|
750
|
-
"aria-labelledby":
|
|
746
|
+
"aria-labelledby": h ? void 0 : "nc-dialog-title",
|
|
751
747
|
children: [
|
|
752
|
-
!
|
|
748
|
+
!h && /* @__PURE__ */ x("div", { className: "nc-dialog-header", children: [
|
|
753
749
|
/* @__PURE__ */ s("h3", { id: "nc-dialog-title", className: "nc-dialog-title", children: n }),
|
|
754
750
|
/* @__PURE__ */ s(We, { onClick: t, "aria-label": "Close dialog" })
|
|
755
751
|
] }),
|
|
756
|
-
/* @__PURE__ */ s("div", { ref:
|
|
757
|
-
|
|
752
|
+
/* @__PURE__ */ s("div", { ref: N, className: "nc-dialog-content", children: r }),
|
|
753
|
+
L()
|
|
758
754
|
]
|
|
759
755
|
}
|
|
760
756
|
) }) });
|
|
761
|
-
return m ? ue(
|
|
757
|
+
return m ? ue(T, document.body) : T;
|
|
762
758
|
}
|
|
763
759
|
function Ct({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
|
|
764
760
|
const r = t === "small" ? 28 : 34;
|
|
@@ -826,85 +822,85 @@ function Gn({
|
|
|
826
822
|
placeholder: i,
|
|
827
823
|
disabled: a,
|
|
828
824
|
label: c,
|
|
829
|
-
clearable:
|
|
825
|
+
clearable: l = !0,
|
|
830
826
|
type: p = "text",
|
|
831
827
|
className: f = "",
|
|
832
828
|
size: b = "default",
|
|
833
|
-
style:
|
|
834
|
-
leadingIcon:
|
|
829
|
+
style: d,
|
|
830
|
+
leadingIcon: u,
|
|
835
831
|
showPasswordToggle: m = !1,
|
|
836
|
-
multiline:
|
|
837
|
-
rows:
|
|
838
|
-
validator:
|
|
832
|
+
multiline: h = !1,
|
|
833
|
+
rows: g = 3,
|
|
834
|
+
validator: k,
|
|
839
835
|
showErrorMessage: v = !0
|
|
840
836
|
}) {
|
|
841
|
-
const
|
|
842
|
-
let
|
|
843
|
-
|
|
844
|
-
const
|
|
837
|
+
const N = W(null), w = W(null), [A, $] = E(!1), [L, T] = E(!1), y = e !== void 0, [R, C] = E(t), S = y ? e : R, z = k ? k(S) : null, F = !!z, Z = p === "password", G = Z && m && !a && !h, M = l && S && !a && L, P = b === "small" ? 32 : 44;
|
|
838
|
+
let D = 12;
|
|
839
|
+
M && G ? D = P * 2 : (M || G) && (D = P);
|
|
840
|
+
const V = u ? b === "small" ? 28 : 34 : void 0, Ze = () => {
|
|
845
841
|
var te, ce;
|
|
846
|
-
|
|
842
|
+
y || C(""), n == null || n(""), o == null || o(), h ? (te = w.current) == null || te.focus() : (ce = N.current) == null || ce.focus();
|
|
847
843
|
}, Se = (te) => {
|
|
848
|
-
te.key === "Enter" && !
|
|
849
|
-
},
|
|
844
|
+
te.key === "Enter" && !h && (r == null || r());
|
|
845
|
+
}, $e = (te) => {
|
|
850
846
|
const ce = te.target.value;
|
|
851
|
-
|
|
847
|
+
y || C(ce), n == null || n(ce);
|
|
848
|
+
}, Ie = () => {
|
|
849
|
+
T(!0);
|
|
852
850
|
}, Me = () => {
|
|
853
|
-
|
|
854
|
-
},
|
|
855
|
-
|
|
856
|
-
}, Re = `nc-input ${b === "small" ? "nc-small " : ""} ${V ? "nc-error " : ""}${f}`;
|
|
857
|
-
return /* @__PURE__ */ x("div", { className: "nc-col", style: { position: "relative", flex: 1, ...u }, children: [
|
|
851
|
+
T(!1);
|
|
852
|
+
}, Re = `nc-input ${b === "small" ? "nc-small " : ""} ${F ? "nc-error " : ""}${f}`;
|
|
853
|
+
return /* @__PURE__ */ x("div", { className: "nc-col", style: { position: "relative", flex: 1, ...d }, children: [
|
|
858
854
|
c && /* @__PURE__ */ s("span", { className: "nc-label", children: c }),
|
|
859
|
-
/* @__PURE__ */ x("div", { style: { position: "relative", display: "flex", alignItems:
|
|
860
|
-
|
|
861
|
-
|
|
855
|
+
/* @__PURE__ */ x("div", { style: { position: "relative", display: "flex", alignItems: h ? "flex-start" : "center" }, children: [
|
|
856
|
+
u && /* @__PURE__ */ s("span", { className: "nc-input-leading-icon", style: { height: h ? void 0 : "100%", top: h ? 10 : void 0 }, children: u }),
|
|
857
|
+
h ? /* @__PURE__ */ s(
|
|
862
858
|
"textarea",
|
|
863
859
|
{
|
|
864
860
|
ref: w,
|
|
865
861
|
className: Re,
|
|
866
862
|
placeholder: i,
|
|
867
863
|
value: S,
|
|
868
|
-
onChange:
|
|
864
|
+
onChange: $e,
|
|
869
865
|
onKeyDown: Se,
|
|
870
|
-
onFocus:
|
|
871
|
-
onBlur:
|
|
866
|
+
onFocus: Ie,
|
|
867
|
+
onBlur: Me,
|
|
872
868
|
readOnly: a,
|
|
873
869
|
"aria-disabled": a,
|
|
874
870
|
tabIndex: a ? -1 : void 0,
|
|
875
|
-
rows:
|
|
871
|
+
rows: g,
|
|
876
872
|
style: {
|
|
877
873
|
width: "100%",
|
|
878
|
-
paddingRight:
|
|
879
|
-
...
|
|
874
|
+
paddingRight: D,
|
|
875
|
+
...V !== void 0 ? { paddingLeft: V } : {}
|
|
880
876
|
}
|
|
881
877
|
}
|
|
882
878
|
) : /* @__PURE__ */ s(
|
|
883
879
|
"input",
|
|
884
880
|
{
|
|
885
|
-
ref:
|
|
886
|
-
type:
|
|
881
|
+
ref: N,
|
|
882
|
+
type: Z && A ? "text" : p,
|
|
887
883
|
className: Re,
|
|
888
884
|
placeholder: i,
|
|
889
885
|
value: S,
|
|
890
|
-
onChange:
|
|
886
|
+
onChange: $e,
|
|
891
887
|
onKeyDown: Se,
|
|
892
|
-
onFocus:
|
|
893
|
-
onBlur:
|
|
888
|
+
onFocus: Ie,
|
|
889
|
+
onBlur: Me,
|
|
894
890
|
readOnly: a,
|
|
895
891
|
"aria-disabled": a,
|
|
896
892
|
tabIndex: a ? -1 : void 0,
|
|
897
893
|
style: {
|
|
898
894
|
width: "100%",
|
|
899
|
-
paddingRight:
|
|
900
|
-
...
|
|
895
|
+
paddingRight: D,
|
|
896
|
+
...V !== void 0 ? { paddingLeft: V } : {}
|
|
901
897
|
}
|
|
902
898
|
}
|
|
903
899
|
),
|
|
904
|
-
|
|
905
|
-
|
|
900
|
+
M && /* @__PURE__ */ s(Ct, { onClick: Ze, size: b, rightOffset: G ? P + 4 : 4 }),
|
|
901
|
+
G && /* @__PURE__ */ s(St, { visible: A, onClick: () => $(!A), size: b })
|
|
906
902
|
] }),
|
|
907
|
-
|
|
903
|
+
F && v && /* @__PURE__ */ s("span", { className: "nc-error-message", children: z })
|
|
908
904
|
] });
|
|
909
905
|
}
|
|
910
906
|
function Yn({
|
|
@@ -918,14 +914,14 @@ function Yn({
|
|
|
918
914
|
return /* @__PURE__ */ s(
|
|
919
915
|
"div",
|
|
920
916
|
{
|
|
921
|
-
onClick: (
|
|
917
|
+
onClick: (l) => {
|
|
922
918
|
if (t) {
|
|
923
919
|
if (r) {
|
|
924
920
|
const p = window.getSelection();
|
|
925
921
|
if (p && p.toString().length > 0)
|
|
926
922
|
return;
|
|
927
923
|
}
|
|
928
|
-
t(
|
|
924
|
+
t(l);
|
|
929
925
|
}
|
|
930
926
|
},
|
|
931
927
|
onMouseDown: () => t && a(!0),
|
|
@@ -958,54 +954,54 @@ function jn({ title: e, titleTools: t, children: n, style: r }) {
|
|
|
958
954
|
] });
|
|
959
955
|
}
|
|
960
956
|
function Kn({ values: e, onChange: t, options: n, placeholder: r = "Select…", label: o }) {
|
|
961
|
-
const [i, a] =
|
|
957
|
+
const [i, a] = E(!1), [c, l] = E(""), p = W(null), f = me(() => n.filter((d) => d.label.toLowerCase().includes(c.toLowerCase())), [n, c]);
|
|
962
958
|
B(() => {
|
|
963
|
-
function u
|
|
964
|
-
!(
|
|
959
|
+
function d(u) {
|
|
960
|
+
!(u.target instanceof Node) || !p.current || p.current.contains(u.target) || a(!1);
|
|
965
961
|
}
|
|
966
|
-
return document.addEventListener("mousedown",
|
|
962
|
+
return document.addEventListener("mousedown", d), () => document.removeEventListener("mousedown", d);
|
|
967
963
|
}, []);
|
|
968
|
-
const b = (
|
|
969
|
-
e.includes(
|
|
964
|
+
const b = (d) => {
|
|
965
|
+
e.includes(d) ? t(e.filter((u) => u !== d)) : t([...e, d]);
|
|
970
966
|
};
|
|
971
967
|
return /* @__PURE__ */ x("div", { ref: p, className: "nc-col", style: { position: "relative" }, children: [
|
|
972
968
|
o && /* @__PURE__ */ s("span", { className: "nc-label", children: o }),
|
|
973
969
|
/* @__PURE__ */ x("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: [
|
|
974
970
|
e.length === 0 && /* @__PURE__ */ s("span", { className: "nc-label", children: r }),
|
|
975
|
-
e.map((
|
|
976
|
-
const
|
|
977
|
-
return
|
|
978
|
-
|
|
971
|
+
e.map((d) => {
|
|
972
|
+
const u = n.find((m) => m.value === d);
|
|
973
|
+
return u ? /* @__PURE__ */ x("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: [
|
|
974
|
+
u.label,
|
|
979
975
|
/* @__PURE__ */ s(
|
|
980
976
|
"button",
|
|
981
977
|
{
|
|
982
978
|
className: "nc-button nc-ghost",
|
|
983
979
|
style: { padding: 0, minHeight: 0, height: 20, width: 20, display: "inline-flex", alignItems: "center", justifyContent: "center", border: "none" },
|
|
984
|
-
onClick: () => b(
|
|
985
|
-
"aria-label": `Remove ${
|
|
980
|
+
onClick: () => b(d),
|
|
981
|
+
"aria-label": `Remove ${u.label}`,
|
|
986
982
|
children: "✕"
|
|
987
983
|
}
|
|
988
984
|
)
|
|
989
|
-
] },
|
|
985
|
+
] }, d) : null;
|
|
990
986
|
}),
|
|
991
987
|
/* @__PURE__ */ s(
|
|
992
988
|
"input",
|
|
993
989
|
{
|
|
994
990
|
className: "nc-input",
|
|
995
991
|
value: c,
|
|
996
|
-
onChange: (
|
|
992
|
+
onChange: (d) => l(d.target.value),
|
|
997
993
|
onFocus: () => a(!0),
|
|
998
994
|
style: { minWidth: 50, border: "none", background: "transparent", padding: 4, minHeight: 32, flex: 1 }
|
|
999
995
|
}
|
|
1000
996
|
)
|
|
1001
997
|
] }),
|
|
1002
998
|
i && /* @__PURE__ */ x("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: [
|
|
1003
|
-
f.map((
|
|
1004
|
-
const
|
|
1005
|
-
return /* @__PURE__ */ x("div", { className: "nc-section nc-row", style: { justifyContent: "space-between", cursor: "pointer", padding: 12 }, onMouseDown: () => b(
|
|
1006
|
-
/* @__PURE__ */ s("span", { children:
|
|
1007
|
-
/* @__PURE__ */ s("span", { children:
|
|
1008
|
-
] },
|
|
999
|
+
f.map((d) => {
|
|
1000
|
+
const u = e.includes(d.value);
|
|
1001
|
+
return /* @__PURE__ */ x("div", { className: "nc-section nc-row", style: { justifyContent: "space-between", cursor: "pointer", padding: 12 }, onMouseDown: () => b(d.value), children: [
|
|
1002
|
+
/* @__PURE__ */ s("span", { children: d.label }),
|
|
1003
|
+
/* @__PURE__ */ s("span", { children: u ? "✔️" : "" })
|
|
1004
|
+
] }, d.value);
|
|
1009
1005
|
}),
|
|
1010
1006
|
f.length === 0 && /* @__PURE__ */ s("div", { className: "nc-section nc-label", children: "No results" })
|
|
1011
1007
|
] })
|
|
@@ -1051,51 +1047,51 @@ function _n({
|
|
|
1051
1047
|
disabled: i = !1,
|
|
1052
1048
|
size: a = "default"
|
|
1053
1049
|
}) {
|
|
1054
|
-
const [c,
|
|
1050
|
+
const [c, l] = E(!1), [p, f] = E(""), [b, d] = E(""), [u, m] = E({ top: 0, left: 0, width: 0, right: void 0 }), h = W(null), g = W(null);
|
|
1055
1051
|
B(() => {
|
|
1056
|
-
if (c &&
|
|
1057
|
-
const C =
|
|
1058
|
-
window.innerWidth - C.left <
|
|
1052
|
+
if (c && h.current) {
|
|
1053
|
+
const C = h.current.getBoundingClientRect(), z = Math.max(C.width, 400);
|
|
1054
|
+
window.innerWidth - C.left < z && C.right >= z ? m({
|
|
1059
1055
|
top: C.bottom + 4,
|
|
1060
1056
|
left: 0,
|
|
1061
1057
|
// Not used but type needs it, let's just use 0
|
|
1062
1058
|
right: window.innerWidth - C.right,
|
|
1063
|
-
width:
|
|
1059
|
+
width: z
|
|
1064
1060
|
}) : m({
|
|
1065
1061
|
top: C.bottom + 4,
|
|
1066
1062
|
left: C.left,
|
|
1067
1063
|
right: void 0,
|
|
1068
|
-
width:
|
|
1064
|
+
width: z
|
|
1069
1065
|
});
|
|
1070
1066
|
}
|
|
1071
1067
|
}, [c]), B(() => {
|
|
1072
1068
|
if (!c) return;
|
|
1073
1069
|
const C = (S) => {
|
|
1074
|
-
|
|
1070
|
+
h.current && !h.current.contains(S.target) && g.current && !g.current.contains(S.target) && l(!1);
|
|
1075
1071
|
};
|
|
1076
1072
|
return document.addEventListener("mousedown", C), () => document.removeEventListener("mousedown", C);
|
|
1077
1073
|
}, [c]);
|
|
1078
|
-
const
|
|
1079
|
-
f(e || Te()),
|
|
1074
|
+
const k = () => {
|
|
1075
|
+
f(e || Te()), d(t || Te()), l(!0);
|
|
1080
1076
|
}, v = () => {
|
|
1081
|
-
|
|
1082
|
-
},
|
|
1077
|
+
l(!1);
|
|
1078
|
+
}, N = () => {
|
|
1083
1079
|
const C = pe(p), S = pe(b);
|
|
1084
1080
|
if (C || S)
|
|
1085
1081
|
return;
|
|
1086
|
-
const
|
|
1087
|
-
|
|
1088
|
-
}, w = e && t ? `${Ee(e)} - ${Ee(t)}` : "Select month range",
|
|
1082
|
+
const z = de(p), F = de(b);
|
|
1083
|
+
z && F && (n == null || n(z, F)), l(!1);
|
|
1084
|
+
}, w = e && t ? `${Ee(e)} - ${Ee(t)}` : "Select month range", A = pe(p), $ = pe(b), L = de(p), T = de(b), y = L && T && L > T, R = c ? ue(
|
|
1089
1085
|
/* @__PURE__ */ s(
|
|
1090
1086
|
"div",
|
|
1091
1087
|
{
|
|
1092
|
-
ref:
|
|
1088
|
+
ref: g,
|
|
1093
1089
|
className: "nc-month-range-picker-popup",
|
|
1094
1090
|
style: {
|
|
1095
1091
|
position: "fixed",
|
|
1096
|
-
top:
|
|
1097
|
-
...
|
|
1098
|
-
width:
|
|
1092
|
+
top: u.top,
|
|
1093
|
+
...u.right !== void 0 ? { right: u.right } : { left: u.left },
|
|
1094
|
+
width: u.width,
|
|
1099
1095
|
zIndex: 1e3
|
|
1100
1096
|
},
|
|
1101
1097
|
children: /* @__PURE__ */ x("div", { className: "nc-month-range-picker-content", children: [
|
|
@@ -1106,13 +1102,13 @@ function _n({
|
|
|
1106
1102
|
"input",
|
|
1107
1103
|
{
|
|
1108
1104
|
type: "text",
|
|
1109
|
-
className: `nc-month-input ${
|
|
1105
|
+
className: `nc-month-input ${A ? "nc-error" : ""}`,
|
|
1110
1106
|
value: p,
|
|
1111
1107
|
onChange: (C) => f(C.target.value),
|
|
1112
1108
|
placeholder: "YY-M(M) or YYYY-M(M)"
|
|
1113
1109
|
}
|
|
1114
1110
|
),
|
|
1115
|
-
|
|
1111
|
+
A && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: A })
|
|
1116
1112
|
] }),
|
|
1117
1113
|
/* @__PURE__ */ x("div", { className: "nc-month-range-picker-column", children: [
|
|
1118
1114
|
/* @__PURE__ */ s("label", { className: "nc-label", children: "End Month" }),
|
|
@@ -1120,23 +1116,23 @@ function _n({
|
|
|
1120
1116
|
"input",
|
|
1121
1117
|
{
|
|
1122
1118
|
type: "text",
|
|
1123
|
-
className: `nc-month-input ${
|
|
1119
|
+
className: `nc-month-input ${$ ? "nc-error" : ""}`,
|
|
1124
1120
|
value: b,
|
|
1125
|
-
onChange: (C) =>
|
|
1121
|
+
onChange: (C) => d(C.target.value),
|
|
1126
1122
|
placeholder: "YY-M(M) or YYYY-M(M)"
|
|
1127
1123
|
}
|
|
1128
1124
|
),
|
|
1129
|
-
|
|
1125
|
+
$ && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: $ })
|
|
1130
1126
|
] })
|
|
1131
1127
|
] }),
|
|
1132
|
-
|
|
1128
|
+
y && !A && !$ && /* @__PURE__ */ s("div", { className: "nc-month-range-error", children: "End month must be after or equal to start month" }),
|
|
1133
1129
|
/* @__PURE__ */ x("div", { className: "nc-month-range-picker-footer", children: [
|
|
1134
1130
|
/* @__PURE__ */ s(
|
|
1135
1131
|
K,
|
|
1136
1132
|
{
|
|
1137
1133
|
variant: "primary",
|
|
1138
|
-
onClick:
|
|
1139
|
-
disabled: !p || !b || !!
|
|
1134
|
+
onClick: N,
|
|
1135
|
+
disabled: !p || !b || !!A || !!$ || !!y,
|
|
1140
1136
|
children: "Apply"
|
|
1141
1137
|
}
|
|
1142
1138
|
),
|
|
@@ -1152,9 +1148,9 @@ function _n({
|
|
|
1152
1148
|
/* @__PURE__ */ s(
|
|
1153
1149
|
"button",
|
|
1154
1150
|
{
|
|
1155
|
-
ref:
|
|
1151
|
+
ref: h,
|
|
1156
1152
|
className: `nc-month-range-picker-input${a === "small" ? " nc-small" : ""}`,
|
|
1157
|
-
onClick:
|
|
1153
|
+
onClick: k,
|
|
1158
1154
|
disabled: i,
|
|
1159
1155
|
children: w
|
|
1160
1156
|
}
|
|
@@ -1163,25 +1159,25 @@ function _n({
|
|
|
1163
1159
|
] });
|
|
1164
1160
|
}
|
|
1165
1161
|
function Un({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disabled: a, size: c = "default" }) {
|
|
1166
|
-
const
|
|
1167
|
-
const
|
|
1168
|
-
n !== void 0 &&
|
|
1162
|
+
const l = c === "small", p = () => {
|
|
1163
|
+
const d = e - o;
|
|
1164
|
+
n !== void 0 && d < n || t(parseFloat(d.toFixed(10)));
|
|
1169
1165
|
}, f = () => {
|
|
1170
|
-
const
|
|
1171
|
-
r !== void 0 &&
|
|
1166
|
+
const d = e + o;
|
|
1167
|
+
r !== void 0 && d > r || t(parseFloat(d.toFixed(10)));
|
|
1172
1168
|
};
|
|
1173
|
-
return /* @__PURE__ */ x("div", { className: `nc-col nc-number-input-col ${
|
|
1174
|
-
i && /* @__PURE__ */ s("span", { className: `nc-label ${
|
|
1175
|
-
/* @__PURE__ */ x("div", { className: `nc-number-input-container ${
|
|
1169
|
+
return /* @__PURE__ */ x("div", { className: `nc-col nc-number-input-col ${l ? "nc-small" : ""}`, children: [
|
|
1170
|
+
i && /* @__PURE__ */ s("span", { className: `nc-label ${l ? "nc-small" : ""}`, children: i }),
|
|
1171
|
+
/* @__PURE__ */ x("div", { className: `nc-number-input-container ${l ? "nc-small" : ""}`, children: [
|
|
1176
1172
|
/* @__PURE__ */ s(
|
|
1177
1173
|
"input",
|
|
1178
1174
|
{
|
|
1179
|
-
className: `nc-input nc-number-input ${
|
|
1175
|
+
className: `nc-input nc-number-input ${l ? "nc-small" : ""}`,
|
|
1180
1176
|
type: "number",
|
|
1181
1177
|
value: e,
|
|
1182
|
-
onChange: (
|
|
1183
|
-
const
|
|
1184
|
-
isNaN(
|
|
1178
|
+
onChange: (d) => {
|
|
1179
|
+
const u = parseFloat(d.target.value);
|
|
1180
|
+
isNaN(u) || n !== void 0 && u < n || r !== void 0 && u > r || t(u);
|
|
1185
1181
|
},
|
|
1186
1182
|
min: n,
|
|
1187
1183
|
max: r,
|
|
@@ -1192,7 +1188,7 @@ function Un({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
|
|
|
1192
1188
|
/* @__PURE__ */ s(
|
|
1193
1189
|
"button",
|
|
1194
1190
|
{
|
|
1195
|
-
className: `nc-button nc-ghost nc-number-input-button ${
|
|
1191
|
+
className: `nc-button nc-ghost nc-number-input-button ${l ? "nc-small" : ""}`,
|
|
1196
1192
|
onClick: p,
|
|
1197
1193
|
disabled: a || n !== void 0 && e <= n,
|
|
1198
1194
|
children: "−"
|
|
@@ -1201,7 +1197,7 @@ function Un({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
|
|
|
1201
1197
|
/* @__PURE__ */ s(
|
|
1202
1198
|
"button",
|
|
1203
1199
|
{
|
|
1204
|
-
className: `nc-button nc-ghost nc-number-input-button ${
|
|
1200
|
+
className: `nc-button nc-ghost nc-number-input-button ${l ? "nc-small" : ""}`,
|
|
1205
1201
|
onClick: f,
|
|
1206
1202
|
disabled: a || r !== void 0 && e >= r,
|
|
1207
1203
|
children: "+"
|
|
@@ -1219,12 +1215,12 @@ function qn({
|
|
|
1219
1215
|
label: i,
|
|
1220
1216
|
disabled: a,
|
|
1221
1217
|
showValue: c = !0,
|
|
1222
|
-
formatValue:
|
|
1218
|
+
formatValue: l = (f) => f.toString(),
|
|
1223
1219
|
width: p = 200
|
|
1224
1220
|
}) {
|
|
1225
|
-
const f = (
|
|
1226
|
-
const
|
|
1227
|
-
t(
|
|
1221
|
+
const f = (d) => {
|
|
1222
|
+
const u = parseFloat(d.target.value);
|
|
1223
|
+
t(u);
|
|
1228
1224
|
}, b = (e - n) / (r - n) * 100;
|
|
1229
1225
|
return /* @__PURE__ */ x("div", { className: "nc-col", style: { gap: 6 }, children: [
|
|
1230
1226
|
i && /* @__PURE__ */ s("span", { className: "nc-label", children: i }),
|
|
@@ -1256,29 +1252,29 @@ function qn({
|
|
|
1256
1252
|
minWidth: 60,
|
|
1257
1253
|
textAlign: "right"
|
|
1258
1254
|
},
|
|
1259
|
-
children:
|
|
1255
|
+
children: l(e)
|
|
1260
1256
|
}
|
|
1261
1257
|
)
|
|
1262
1258
|
] })
|
|
1263
1259
|
] });
|
|
1264
1260
|
}
|
|
1265
|
-
const
|
|
1266
|
-
function
|
|
1261
|
+
const $t = ({ 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" }) });
|
|
1262
|
+
function It({ children: e, className: t = "", style: n }) {
|
|
1267
1263
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panel ${t}`, style: n, children: e });
|
|
1268
1264
|
}
|
|
1269
1265
|
function Xn({ active: e, children: t, keepMounted: n = !1, className: r = "", style: o }) {
|
|
1270
1266
|
const i = ut.toArray(t).filter(
|
|
1271
|
-
(c) => pt(c) && (c.type ===
|
|
1267
|
+
(c) => pt(c) && (c.type === It || c.type.displayName === "TabPanel")
|
|
1272
1268
|
);
|
|
1273
1269
|
if (n)
|
|
1274
1270
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: i.map((c) => {
|
|
1275
|
-
const
|
|
1271
|
+
const l = c.props.tab === e;
|
|
1276
1272
|
return /* @__PURE__ */ s(
|
|
1277
1273
|
"div",
|
|
1278
1274
|
{
|
|
1279
|
-
className: `nc-tab-panel-wrapper ${
|
|
1280
|
-
style: { display:
|
|
1281
|
-
"aria-hidden": !
|
|
1275
|
+
className: `nc-tab-panel-wrapper ${l ? "nc-active" : ""}`,
|
|
1276
|
+
style: { display: l ? void 0 : "none" },
|
|
1277
|
+
"aria-hidden": !l,
|
|
1282
1278
|
children: c
|
|
1283
1279
|
},
|
|
1284
1280
|
c.props.tab
|
|
@@ -1287,75 +1283,75 @@ function Xn({ active: e, children: t, keepMounted: n = !1, className: r = "", st
|
|
|
1287
1283
|
const a = i.find((c) => c.props.tab === e);
|
|
1288
1284
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: a });
|
|
1289
1285
|
}
|
|
1290
|
-
function Jn({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, className: i, toolbar: a, multiline: c, orientation:
|
|
1291
|
-
const f = W(null), [b,
|
|
1286
|
+
function Jn({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, className: i, toolbar: a, multiline: c, orientation: l = "horizontal", style: p }) {
|
|
1287
|
+
const f = W(null), [b, d] = E(!1), [u, m] = E(!1), h = l === "verticalLeft" || l === "verticalRight", g = W(!1), k = W(0), v = W(0), N = W(!1);
|
|
1292
1288
|
B(() => {
|
|
1293
|
-
const
|
|
1289
|
+
const y = () => {
|
|
1294
1290
|
if (f.current)
|
|
1295
|
-
if (
|
|
1296
|
-
const { scrollTop: C, scrollHeight: S, clientHeight:
|
|
1297
|
-
|
|
1291
|
+
if (h) {
|
|
1292
|
+
const { scrollTop: C, scrollHeight: S, clientHeight: z } = f.current;
|
|
1293
|
+
d(C > 1), m(C < S - z - 1);
|
|
1298
1294
|
} else {
|
|
1299
|
-
const { scrollLeft: C, scrollWidth: S, clientWidth:
|
|
1300
|
-
|
|
1295
|
+
const { scrollLeft: C, scrollWidth: S, clientWidth: z } = f.current;
|
|
1296
|
+
d(C > 1), m(C < S - z - 1);
|
|
1301
1297
|
}
|
|
1302
1298
|
}, R = f.current;
|
|
1303
1299
|
if (R)
|
|
1304
|
-
return
|
|
1305
|
-
R.removeEventListener("scroll",
|
|
1300
|
+
return y(), R.addEventListener("scroll", y), window.addEventListener("resize", y), () => {
|
|
1301
|
+
R.removeEventListener("scroll", y), window.removeEventListener("resize", y);
|
|
1306
1302
|
};
|
|
1307
|
-
}, [e,
|
|
1308
|
-
const w = (
|
|
1309
|
-
f.current && (
|
|
1310
|
-
},
|
|
1311
|
-
if (!
|
|
1312
|
-
const R =
|
|
1313
|
-
Math.abs(C) > 3 && (
|
|
1314
|
-
},
|
|
1315
|
-
f.current && (
|
|
1316
|
-
},
|
|
1317
|
-
|
|
1303
|
+
}, [e, h]);
|
|
1304
|
+
const w = (y) => {
|
|
1305
|
+
f.current && (g.current = !0, N.current = !1, k.current = h ? y.clientY : y.clientX, v.current = h ? f.current.scrollTop : f.current.scrollLeft, f.current.style.cursor = "grabbing", f.current.style.userSelect = "none");
|
|
1306
|
+
}, A = (y) => {
|
|
1307
|
+
if (!g.current || !f.current) return;
|
|
1308
|
+
const R = h ? y.clientY : y.clientX, C = k.current - R;
|
|
1309
|
+
Math.abs(C) > 3 && (N.current = !0), h ? f.current.scrollTop = v.current + C : f.current.scrollLeft = v.current + C;
|
|
1310
|
+
}, $ = () => {
|
|
1311
|
+
f.current && (g.current = !1, f.current.style.cursor = "", f.current.style.userSelect = "");
|
|
1312
|
+
}, L = () => {
|
|
1313
|
+
$();
|
|
1318
1314
|
};
|
|
1319
1315
|
B(() => {
|
|
1320
|
-
const
|
|
1321
|
-
if (!
|
|
1316
|
+
const y = f.current;
|
|
1317
|
+
if (!y || h) return;
|
|
1322
1318
|
const R = (C) => {
|
|
1323
|
-
C.deltaY !== 0 && (C.preventDefault(),
|
|
1319
|
+
C.deltaY !== 0 && (C.preventDefault(), y.scrollLeft += C.deltaY * 0.3);
|
|
1324
1320
|
};
|
|
1325
|
-
return
|
|
1326
|
-
|
|
1321
|
+
return y.addEventListener("wheel", R, { passive: !1 }), () => {
|
|
1322
|
+
y.removeEventListener("wheel", R);
|
|
1327
1323
|
};
|
|
1328
|
-
}, [
|
|
1329
|
-
const
|
|
1330
|
-
|
|
1324
|
+
}, [h]);
|
|
1325
|
+
const T = (y) => {
|
|
1326
|
+
N.current || n(y);
|
|
1331
1327
|
};
|
|
1332
|
-
return /* @__PURE__ */ x("div", { className: `nc-tab-container ${
|
|
1328
|
+
return /* @__PURE__ */ x("div", { className: `nc-tab-container ${h ? `nc-vertical nc-${l}` : ""} ${i || ""}`, style: p, children: [
|
|
1333
1329
|
/* @__PURE__ */ x("div", { className: "nc-tab-scroll-wrapper", children: [
|
|
1334
|
-
b && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${
|
|
1330
|
+
b && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${h ? "nc-top" : "nc-left"}`, children: h ? /* @__PURE__ */ s($t, { size: 16 }) : /* @__PURE__ */ s(at, { size: 16 }) }),
|
|
1335
1331
|
/* @__PURE__ */ s(
|
|
1336
1332
|
"div",
|
|
1337
1333
|
{
|
|
1338
1334
|
ref: f,
|
|
1339
1335
|
className: `nc-tab-scroll ${c ? "nc-multiline" : ""}`,
|
|
1340
1336
|
onMouseDown: w,
|
|
1341
|
-
onMouseMove:
|
|
1342
|
-
onMouseUp:
|
|
1343
|
-
onMouseLeave:
|
|
1337
|
+
onMouseMove: A,
|
|
1338
|
+
onMouseUp: $,
|
|
1339
|
+
onMouseLeave: L,
|
|
1344
1340
|
style: { cursor: "grab" },
|
|
1345
|
-
children: e.map((
|
|
1346
|
-
const R = typeof
|
|
1341
|
+
children: e.map((y) => {
|
|
1342
|
+
const R = typeof y == "string" ? y : y.id, C = typeof y == "string" ? y : y.label, S = r && !(o != null && o.includes(R));
|
|
1347
1343
|
return /* @__PURE__ */ x(
|
|
1348
1344
|
"div",
|
|
1349
1345
|
{
|
|
1350
1346
|
className: `nc-tab-item ${t === R ? "nc-active" : ""} ${S ? "nc-closable" : ""}`,
|
|
1351
|
-
onClick: () =>
|
|
1347
|
+
onClick: () => T(R),
|
|
1352
1348
|
role: "button",
|
|
1353
1349
|
tabIndex: 0,
|
|
1354
|
-
onKeyDown: (
|
|
1355
|
-
(
|
|
1350
|
+
onKeyDown: (z) => {
|
|
1351
|
+
(z.key === "Enter" || z.key === " ") && n(R);
|
|
1356
1352
|
},
|
|
1357
1353
|
children: [
|
|
1358
|
-
/* @__PURE__ */ s("span", { className: "nc-tab-label", children:
|
|
1354
|
+
/* @__PURE__ */ s("span", { className: "nc-tab-label", children: h ? C : typeof C == "string" ? C.toUpperCase() : C }),
|
|
1359
1355
|
S && /* @__PURE__ */ s(
|
|
1360
1356
|
"span",
|
|
1361
1357
|
{
|
|
@@ -1363,11 +1359,11 @@ function Jn({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, cla
|
|
|
1363
1359
|
role: "button",
|
|
1364
1360
|
tabIndex: 0,
|
|
1365
1361
|
"aria-label": `Close ${typeof C == "string" ? C : R}`,
|
|
1366
|
-
onClick: (
|
|
1367
|
-
|
|
1362
|
+
onClick: (z) => {
|
|
1363
|
+
z.stopPropagation(), r(R);
|
|
1368
1364
|
},
|
|
1369
|
-
onKeyDown: (
|
|
1370
|
-
(
|
|
1365
|
+
onKeyDown: (z) => {
|
|
1366
|
+
(z.key === "Enter" || z.key === " ") && (z.stopPropagation(), r(R));
|
|
1371
1367
|
},
|
|
1372
1368
|
children: /* @__PURE__ */ x("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1373
1369
|
/* @__PURE__ */ s("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
@@ -1382,7 +1378,7 @@ function Jn({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, cla
|
|
|
1382
1378
|
})
|
|
1383
1379
|
}
|
|
1384
1380
|
),
|
|
1385
|
-
|
|
1381
|
+
u && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${h ? "nc-bottom" : "nc-right"}`, children: h ? /* @__PURE__ */ s(lt, { size: 16 }) : /* @__PURE__ */ s(dt, { size: 16 }) })
|
|
1386
1382
|
] }),
|
|
1387
1383
|
a && /* @__PURE__ */ s("div", { className: "nc-tab-toolbar", children: a })
|
|
1388
1384
|
] });
|
|
@@ -1451,10 +1447,10 @@ const ze = [
|
|
|
1451
1447
|
"var(--nc-csv-col-8)",
|
|
1452
1448
|
"var(--nc-csv-col-9)"
|
|
1453
1449
|
];
|
|
1454
|
-
function
|
|
1450
|
+
function Mt(e, t) {
|
|
1455
1451
|
const r = e.slice(0, t).split(`
|
|
1456
|
-
`), o = r.length, a = r[o - 1].split(" "), c = a.length,
|
|
1457
|
-
return { line: o, column: c, character:
|
|
1452
|
+
`), o = r.length, a = r[o - 1].split(" "), c = a.length, l = a[c - 1].length + 1;
|
|
1453
|
+
return { line: o, column: c, character: l, offset: t };
|
|
1458
1454
|
}
|
|
1459
1455
|
function Rt(e, t, n, r) {
|
|
1460
1456
|
const o = e.split(`
|
|
@@ -1462,10 +1458,10 @@ function Rt(e, t, n, r) {
|
|
|
1462
1458
|
let a = 0;
|
|
1463
1459
|
for (let b = 0; b < i - 1; b++)
|
|
1464
1460
|
a += o[b].length + 1;
|
|
1465
|
-
const
|
|
1461
|
+
const l = o[i - 1].split(" "), p = Math.max(1, Math.min(n, l.length));
|
|
1466
1462
|
for (let b = 0; b < p - 1; b++)
|
|
1467
|
-
a +=
|
|
1468
|
-
const f = Math.max(1, Math.min(r,
|
|
1463
|
+
a += l[b].length + 1;
|
|
1464
|
+
const f = Math.max(1, Math.min(r, l[p - 1].length + 1));
|
|
1469
1465
|
return a += f - 1, a;
|
|
1470
1466
|
}
|
|
1471
1467
|
function Et(e, t) {
|
|
@@ -1477,65 +1473,65 @@ function Et(e, t) {
|
|
|
1477
1473
|
return o;
|
|
1478
1474
|
}
|
|
1479
1475
|
const Zn = ft(
|
|
1480
|
-
function({ value: t, onChange: n, placeholder: r, className: o, style: i, showLineNumbers: a = !1, onCursorChange: c, highlightLine:
|
|
1481
|
-
const f = W(null), b = W(null),
|
|
1476
|
+
function({ value: t, onChange: n, placeholder: r, className: o, style: i, showLineNumbers: a = !1, onCursorChange: c, highlightLine: l }, p) {
|
|
1477
|
+
const f = W(null), b = W(null), d = W(null);
|
|
1482
1478
|
ht(p, () => ({
|
|
1483
1479
|
goToLine(v) {
|
|
1484
|
-
const
|
|
1485
|
-
if (!
|
|
1480
|
+
const N = f.current;
|
|
1481
|
+
if (!N) return;
|
|
1486
1482
|
const w = Et(t, v);
|
|
1487
|
-
|
|
1488
|
-
const
|
|
1489
|
-
|
|
1483
|
+
N.focus(), N.setSelectionRange(w, w);
|
|
1484
|
+
const A = parseFloat(getComputedStyle(N).lineHeight) || 18;
|
|
1485
|
+
N.scrollTop = (Math.max(1, v) - 1) * A, m(), u();
|
|
1490
1486
|
},
|
|
1491
|
-
goToPosition(v,
|
|
1492
|
-
const
|
|
1493
|
-
if (!
|
|
1494
|
-
const
|
|
1495
|
-
|
|
1496
|
-
const
|
|
1497
|
-
|
|
1487
|
+
goToPosition(v, N, w) {
|
|
1488
|
+
const A = f.current;
|
|
1489
|
+
if (!A) return;
|
|
1490
|
+
const $ = Rt(t, v, N, w);
|
|
1491
|
+
A.focus(), A.setSelectionRange($, $);
|
|
1492
|
+
const L = parseFloat(getComputedStyle(A).lineHeight) || 18;
|
|
1493
|
+
A.scrollTop = (Math.max(1, v) - 1) * L, m(), u();
|
|
1498
1494
|
}
|
|
1499
1495
|
}), [t]);
|
|
1500
|
-
const
|
|
1496
|
+
const u = O(() => {
|
|
1501
1497
|
if (!c || !f.current) return;
|
|
1502
|
-
const v =
|
|
1498
|
+
const v = Mt(t, f.current.selectionStart);
|
|
1503
1499
|
c(v);
|
|
1504
1500
|
}, [c, t]), m = O(() => {
|
|
1505
1501
|
const v = f.current;
|
|
1506
|
-
v && (b.current && (b.current.scrollTop = v.scrollTop, b.current.scrollLeft = v.scrollLeft),
|
|
1502
|
+
v && (b.current && (b.current.scrollTop = v.scrollTop, b.current.scrollLeft = v.scrollLeft), d.current && (d.current.scrollTop = v.scrollTop));
|
|
1507
1503
|
}, []);
|
|
1508
1504
|
B(() => {
|
|
1509
|
-
if (
|
|
1505
|
+
if (l == null || l < 1) return;
|
|
1510
1506
|
const v = f.current;
|
|
1511
1507
|
if (!v) return;
|
|
1512
|
-
const
|
|
1513
|
-
(w < v.scrollTop ||
|
|
1514
|
-
}, [
|
|
1515
|
-
const
|
|
1516
|
-
`).length, [t]),
|
|
1508
|
+
const N = parseFloat(getComputedStyle(v).lineHeight) || 18, w = (l - 1) * N, A = w + N;
|
|
1509
|
+
(w < v.scrollTop || A > v.scrollTop + v.clientHeight) && (v.scrollTop = w - v.clientHeight / 2 + N / 2), m();
|
|
1510
|
+
}, [l]);
|
|
1511
|
+
const h = me(() => t.split(`
|
|
1512
|
+
`).length, [t]), g = () => {
|
|
1517
1513
|
const v = [];
|
|
1518
|
-
for (let
|
|
1514
|
+
for (let N = 1; N <= h; N++)
|
|
1519
1515
|
v.push(
|
|
1520
|
-
/* @__PURE__ */ s("div", { className: `nc-csv-line-number ${
|
|
1516
|
+
/* @__PURE__ */ s("div", { className: `nc-csv-line-number ${l === N ? "nc-csv-highlight" : ""}`, children: N }, N)
|
|
1521
1517
|
);
|
|
1522
|
-
return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref:
|
|
1523
|
-
},
|
|
1524
|
-
`).map((w,
|
|
1525
|
-
const
|
|
1526
|
-
return /* @__PURE__ */ x("div", { className: `nc-csv-line ${
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
/* @__PURE__ */ s("span", { style: { color: ze[
|
|
1530
|
-
] },
|
|
1518
|
+
return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref: d, children: v });
|
|
1519
|
+
}, k = (v) => v ? v.split(`
|
|
1520
|
+
`).map((w, A) => {
|
|
1521
|
+
const $ = w.split(" ");
|
|
1522
|
+
return /* @__PURE__ */ x("div", { className: `nc-csv-line ${l === A + 1 ? "nc-csv-highlight" : ""}`, children: [
|
|
1523
|
+
$.map((L, T) => /* @__PURE__ */ x("span", { children: [
|
|
1524
|
+
T > 0 && /* @__PURE__ */ s("span", { className: "nc-csv-tab-char", children: " " }),
|
|
1525
|
+
/* @__PURE__ */ s("span", { style: { color: ze[T % ze.length] }, children: L })
|
|
1526
|
+
] }, T)),
|
|
1531
1527
|
w === "" && `
|
|
1532
1528
|
`
|
|
1533
|
-
] },
|
|
1529
|
+
] }, A);
|
|
1534
1530
|
}) : null;
|
|
1535
1531
|
return /* @__PURE__ */ x("div", { className: `nc-csv-textarea-container ${a ? "nc-csv-with-gutter" : ""} ${o ?? ""}`, style: i, children: [
|
|
1536
|
-
a &&
|
|
1532
|
+
a && g(),
|
|
1537
1533
|
/* @__PURE__ */ x("div", { className: "nc-csv-textarea-editor", children: [
|
|
1538
|
-
/* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref: b, children: /* @__PURE__ */ s("pre", { className: "nc-csv-textarea-highlights", children:
|
|
1534
|
+
/* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref: b, children: /* @__PURE__ */ s("pre", { className: "nc-csv-textarea-highlights", children: k(t) }) }),
|
|
1539
1535
|
/* @__PURE__ */ s(
|
|
1540
1536
|
"textarea",
|
|
1541
1537
|
{
|
|
@@ -1543,12 +1539,12 @@ const Zn = ft(
|
|
|
1543
1539
|
className: "nc-csv-textarea-input",
|
|
1544
1540
|
value: t,
|
|
1545
1541
|
onChange: (v) => {
|
|
1546
|
-
n(v.target.value), requestAnimationFrame(
|
|
1542
|
+
n(v.target.value), requestAnimationFrame(u);
|
|
1547
1543
|
},
|
|
1548
1544
|
onScroll: m,
|
|
1549
|
-
onSelect:
|
|
1550
|
-
onKeyUp:
|
|
1551
|
-
onClick:
|
|
1545
|
+
onSelect: u,
|
|
1546
|
+
onKeyUp: u,
|
|
1547
|
+
onClick: u,
|
|
1552
1548
|
placeholder: r,
|
|
1553
1549
|
spellCheck: !1,
|
|
1554
1550
|
autoComplete: "off",
|
|
@@ -1638,9 +1634,9 @@ function Pt({ notification: e }) {
|
|
|
1638
1634
|
);
|
|
1639
1635
|
}
|
|
1640
1636
|
function er() {
|
|
1641
|
-
const [e, t] =
|
|
1637
|
+
const [e, t] = E([]), [n, r] = E(/* @__PURE__ */ new Map()), [o, i] = E(/* @__PURE__ */ new Set()), a = W(null), c = W([]);
|
|
1642
1638
|
return B(() => Tt((p) => {
|
|
1643
|
-
const f = new Set(c.current.map((
|
|
1639
|
+
const f = new Set(c.current.map((d) => d.id)), b = p.filter((d) => !f.has(d.id)).map((d) => d.id);
|
|
1644
1640
|
b.length > 0 ? (t(p), i(new Set(b)), requestAnimationFrame(() => {
|
|
1645
1641
|
requestAnimationFrame(() => {
|
|
1646
1642
|
i(/* @__PURE__ */ new Set());
|
|
@@ -1648,15 +1644,15 @@ function er() {
|
|
|
1648
1644
|
})) : t(p), c.current = p;
|
|
1649
1645
|
}), []), B(() => {
|
|
1650
1646
|
if (!a.current) return;
|
|
1651
|
-
const
|
|
1647
|
+
const l = /* @__PURE__ */ new Map();
|
|
1652
1648
|
let p = 0;
|
|
1653
1649
|
const f = a.current.children;
|
|
1654
|
-
e.forEach((b,
|
|
1655
|
-
if (
|
|
1656
|
-
const
|
|
1657
|
-
b.isRemoving || (p +=
|
|
1650
|
+
e.forEach((b, d) => {
|
|
1651
|
+
if (l.set(b.id, p), f[d]) {
|
|
1652
|
+
const u = f[d].offsetHeight;
|
|
1653
|
+
b.isRemoving || (p += u + 12);
|
|
1658
1654
|
}
|
|
1659
|
-
}), r(
|
|
1655
|
+
}), r(l);
|
|
1660
1656
|
}, [e]), /* @__PURE__ */ s(
|
|
1661
1657
|
"div",
|
|
1662
1658
|
{
|
|
@@ -1675,8 +1671,8 @@ function er() {
|
|
|
1675
1671
|
pointerEvents: "auto",
|
|
1676
1672
|
position: "relative"
|
|
1677
1673
|
},
|
|
1678
|
-
children: e.map((
|
|
1679
|
-
const p = o.has(
|
|
1674
|
+
children: e.map((l) => {
|
|
1675
|
+
const p = o.has(l.id), f = l.isRemoving, b = n.get(l.id) || 0;
|
|
1680
1676
|
return /* @__PURE__ */ s(
|
|
1681
1677
|
"div",
|
|
1682
1678
|
{
|
|
@@ -1690,9 +1686,9 @@ function er() {
|
|
|
1690
1686
|
opacity: f ? 0 : 1,
|
|
1691
1687
|
width: "100%"
|
|
1692
1688
|
},
|
|
1693
|
-
children: /* @__PURE__ */ s(Pt, { notification:
|
|
1689
|
+
children: /* @__PURE__ */ s(Pt, { notification: l })
|
|
1694
1690
|
},
|
|
1695
|
-
|
|
1691
|
+
l.id
|
|
1696
1692
|
);
|
|
1697
1693
|
})
|
|
1698
1694
|
}
|
|
@@ -1935,7 +1931,7 @@ class Ht {
|
|
|
1935
1931
|
this.listeners.forEach((t) => t());
|
|
1936
1932
|
}
|
|
1937
1933
|
}
|
|
1938
|
-
const
|
|
1934
|
+
const Y = new Ht(), Ve = se(null);
|
|
1939
1935
|
function Wt() {
|
|
1940
1936
|
const e = J(Ve);
|
|
1941
1937
|
if (!e)
|
|
@@ -2016,37 +2012,37 @@ class Vt extends ke.Component {
|
|
|
2016
2012
|
}
|
|
2017
2013
|
}
|
|
2018
2014
|
function Ge({ appId: e, isActive: t, onClose: n }) {
|
|
2019
|
-
const { t: r } = Q(), o = oe.get(e), [i, a] =
|
|
2015
|
+
const { t: r } = Q(), o = oe.get(e), [i, a] = E(""), [c, l] = E(null), [p, f] = E(null), [b, d] = E(!1), [u, m] = E(!1);
|
|
2020
2016
|
ke.useEffect(() => {
|
|
2021
2017
|
o != null && o.titleKey && a(r(o.titleKey));
|
|
2022
2018
|
}, [o, r]);
|
|
2023
|
-
const
|
|
2024
|
-
a(
|
|
2025
|
-
}, []),
|
|
2026
|
-
|
|
2027
|
-
}, []),
|
|
2028
|
-
|
|
2029
|
-
}, []), v = O((
|
|
2030
|
-
f(
|
|
2031
|
-
}, []),
|
|
2019
|
+
const h = O((y) => {
|
|
2020
|
+
a(y);
|
|
2021
|
+
}, []), g = O((y) => {
|
|
2022
|
+
l(() => y);
|
|
2023
|
+
}, []), k = O(() => {
|
|
2024
|
+
l(null);
|
|
2025
|
+
}, []), v = O((y) => {
|
|
2026
|
+
f(y);
|
|
2027
|
+
}, []), N = O(() => {
|
|
2032
2028
|
f(null);
|
|
2033
|
-
}, []), w = O((
|
|
2034
|
-
|
|
2035
|
-
}, []),
|
|
2036
|
-
m(
|
|
2037
|
-
}, []),
|
|
2038
|
-
setTitle:
|
|
2039
|
-
setBackHandler:
|
|
2040
|
-
clearBackHandler:
|
|
2029
|
+
}, []), w = O((y) => {
|
|
2030
|
+
d(y);
|
|
2031
|
+
}, []), A = O((y) => {
|
|
2032
|
+
m(y);
|
|
2033
|
+
}, []), $ = me(() => ({
|
|
2034
|
+
setTitle: h,
|
|
2035
|
+
setBackHandler: g,
|
|
2036
|
+
clearBackHandler: k,
|
|
2041
2037
|
setToolbar: v,
|
|
2042
|
-
clearToolbar:
|
|
2038
|
+
clearToolbar: N,
|
|
2043
2039
|
setHideBackButton: w,
|
|
2044
|
-
setHideTitleBar:
|
|
2040
|
+
setHideTitleBar: A,
|
|
2045
2041
|
close: n
|
|
2046
|
-
}), [
|
|
2042
|
+
}), [h, g, k, v, N, w, A, n]);
|
|
2047
2043
|
if (!o)
|
|
2048
2044
|
return null;
|
|
2049
|
-
const
|
|
2045
|
+
const L = o.component, T = !o.hideTitleBar && !u;
|
|
2050
2046
|
return /* @__PURE__ */ x(
|
|
2051
2047
|
"div",
|
|
2052
2048
|
{
|
|
@@ -2057,7 +2053,7 @@ function Ge({ appId: e, isActive: t, onClose: n }) {
|
|
|
2057
2053
|
minHeight: 0
|
|
2058
2054
|
},
|
|
2059
2055
|
children: [
|
|
2060
|
-
|
|
2056
|
+
T && /* @__PURE__ */ s(
|
|
2061
2057
|
Ft,
|
|
2062
2058
|
{
|
|
2063
2059
|
title: i,
|
|
@@ -2070,7 +2066,7 @@ function Ge({ appId: e, isActive: t, onClose: n }) {
|
|
|
2070
2066
|
/* @__PURE__ */ s(
|
|
2071
2067
|
"div",
|
|
2072
2068
|
{
|
|
2073
|
-
className:
|
|
2069
|
+
className: T ? "nc-app-content-wrapper" : "",
|
|
2074
2070
|
style: {
|
|
2075
2071
|
padding: o.padding,
|
|
2076
2072
|
flex: 1,
|
|
@@ -2080,7 +2076,7 @@ function Ge({ appId: e, isActive: t, onClose: n }) {
|
|
|
2080
2076
|
backgroundColor: "var(--nc-bg-secondary)",
|
|
2081
2077
|
position: "relative"
|
|
2082
2078
|
},
|
|
2083
|
-
children: /* @__PURE__ */ s(Ve.Provider, { value:
|
|
2079
|
+
children: /* @__PURE__ */ s(Ve.Provider, { value: $, children: /* @__PURE__ */ s(Vt, { appId: e, children: /* @__PURE__ */ s(
|
|
2084
2080
|
mt,
|
|
2085
2081
|
{
|
|
2086
2082
|
fallback: /* @__PURE__ */ s(
|
|
@@ -2095,7 +2091,7 @@ function Ge({ appId: e, isActive: t, onClose: n }) {
|
|
|
2095
2091
|
children: /* @__PURE__ */ s(He, {})
|
|
2096
2092
|
}
|
|
2097
2093
|
),
|
|
2098
|
-
children: /* @__PURE__ */ s(
|
|
2094
|
+
children: /* @__PURE__ */ s(L, {})
|
|
2099
2095
|
}
|
|
2100
2096
|
) }) })
|
|
2101
2097
|
}
|
|
@@ -2112,7 +2108,7 @@ const fe = 768, he = 1024, Ye = {
|
|
|
2112
2108
|
height: typeof window < "u" ? window.innerHeight : 768
|
|
2113
2109
|
}, je = se(Ye);
|
|
2114
2110
|
function rr({ children: e }) {
|
|
2115
|
-
const [t, n] =
|
|
2111
|
+
const [t, n] = E(() => {
|
|
2116
2112
|
if (typeof window > "u") return Ye;
|
|
2117
2113
|
const r = window.innerWidth, o = window.innerHeight;
|
|
2118
2114
|
return {
|
|
@@ -2151,8 +2147,8 @@ const Ne = "-", Gt = (e) => {
|
|
|
2151
2147
|
return c[0] === "" && c.length !== 1 && c.shift(), _e(c, t) || Yt(a);
|
|
2152
2148
|
},
|
|
2153
2149
|
getConflictingClassGroupIds: (a, c) => {
|
|
2154
|
-
const
|
|
2155
|
-
return c && r[a] ? [...
|
|
2150
|
+
const l = n[a] || [];
|
|
2151
|
+
return c && r[a] ? [...l, ...r[a]] : l;
|
|
2156
2152
|
}
|
|
2157
2153
|
};
|
|
2158
2154
|
}, _e = (e, t) => {
|
|
@@ -2247,28 +2243,28 @@ const Ne = "-", Gt = (e) => {
|
|
|
2247
2243
|
separator: t,
|
|
2248
2244
|
experimentalParseClassName: n
|
|
2249
2245
|
} = e, r = t.length === 1, o = t[0], i = t.length, a = (c) => {
|
|
2250
|
-
const
|
|
2246
|
+
const l = [];
|
|
2251
2247
|
let p = 0, f = 0, b;
|
|
2252
|
-
for (let
|
|
2253
|
-
let
|
|
2248
|
+
for (let g = 0; g < c.length; g++) {
|
|
2249
|
+
let k = c[g];
|
|
2254
2250
|
if (p === 0) {
|
|
2255
|
-
if (
|
|
2256
|
-
|
|
2251
|
+
if (k === o && (r || c.slice(g, g + i) === t)) {
|
|
2252
|
+
l.push(c.slice(f, g)), f = g + i;
|
|
2257
2253
|
continue;
|
|
2258
2254
|
}
|
|
2259
|
-
if (
|
|
2260
|
-
b =
|
|
2255
|
+
if (k === "/") {
|
|
2256
|
+
b = g;
|
|
2261
2257
|
continue;
|
|
2262
2258
|
}
|
|
2263
2259
|
}
|
|
2264
|
-
|
|
2260
|
+
k === "[" ? p++ : k === "]" && p--;
|
|
2265
2261
|
}
|
|
2266
|
-
const
|
|
2262
|
+
const d = l.length === 0 ? c : c.substring(f), u = d.startsWith(Ue), m = u ? d.substring(1) : d, h = b && b > f ? b - f : void 0;
|
|
2267
2263
|
return {
|
|
2268
|
-
modifiers:
|
|
2269
|
-
hasImportantModifier:
|
|
2264
|
+
modifiers: l,
|
|
2265
|
+
hasImportantModifier: u,
|
|
2270
2266
|
baseClassName: m,
|
|
2271
|
-
maybePostfixModifierPosition:
|
|
2267
|
+
maybePostfixModifierPosition: h
|
|
2272
2268
|
};
|
|
2273
2269
|
};
|
|
2274
2270
|
return n ? (c) => n({
|
|
@@ -2294,33 +2290,33 @@ const Ne = "-", Gt = (e) => {
|
|
|
2294
2290
|
getConflictingClassGroupIds: o
|
|
2295
2291
|
} = t, i = [], a = e.trim().split(Qt);
|
|
2296
2292
|
let c = "";
|
|
2297
|
-
for (let
|
|
2298
|
-
const p = a[
|
|
2293
|
+
for (let l = a.length - 1; l >= 0; l -= 1) {
|
|
2294
|
+
const p = a[l], {
|
|
2299
2295
|
modifiers: f,
|
|
2300
2296
|
hasImportantModifier: b,
|
|
2301
|
-
baseClassName:
|
|
2302
|
-
maybePostfixModifierPosition:
|
|
2297
|
+
baseClassName: d,
|
|
2298
|
+
maybePostfixModifierPosition: u
|
|
2303
2299
|
} = n(p);
|
|
2304
|
-
let m = !!
|
|
2305
|
-
if (!
|
|
2300
|
+
let m = !!u, h = r(m ? d.substring(0, u) : d);
|
|
2301
|
+
if (!h) {
|
|
2306
2302
|
if (!m) {
|
|
2307
2303
|
c = p + (c.length > 0 ? " " + c : c);
|
|
2308
2304
|
continue;
|
|
2309
2305
|
}
|
|
2310
|
-
if (
|
|
2306
|
+
if (h = r(d), !h) {
|
|
2311
2307
|
c = p + (c.length > 0 ? " " + c : c);
|
|
2312
2308
|
continue;
|
|
2313
2309
|
}
|
|
2314
2310
|
m = !1;
|
|
2315
2311
|
}
|
|
2316
|
-
const
|
|
2312
|
+
const g = Xt(f).join(":"), k = b ? g + Ue : g, v = k + h;
|
|
2317
2313
|
if (i.includes(v))
|
|
2318
2314
|
continue;
|
|
2319
2315
|
i.push(v);
|
|
2320
|
-
const
|
|
2321
|
-
for (let w = 0; w <
|
|
2322
|
-
const
|
|
2323
|
-
i.push(
|
|
2316
|
+
const N = o(h, m);
|
|
2317
|
+
for (let w = 0; w < N.length; ++w) {
|
|
2318
|
+
const A = N[w];
|
|
2319
|
+
i.push(k + A);
|
|
2324
2320
|
}
|
|
2325
2321
|
c = p + (c.length > 0 ? " " + c : c);
|
|
2326
2322
|
}
|
|
@@ -2342,22 +2338,22 @@ const qe = (e) => {
|
|
|
2342
2338
|
};
|
|
2343
2339
|
function tn(e, ...t) {
|
|
2344
2340
|
let n, r, o, i = a;
|
|
2345
|
-
function a(
|
|
2341
|
+
function a(l) {
|
|
2346
2342
|
const p = t.reduce((f, b) => b(f), e());
|
|
2347
|
-
return n = Jt(p), r = n.cache.get, o = n.cache.set, i = c, c(
|
|
2343
|
+
return n = Jt(p), r = n.cache.get, o = n.cache.set, i = c, c(l);
|
|
2348
2344
|
}
|
|
2349
|
-
function c(
|
|
2350
|
-
const p = r(
|
|
2345
|
+
function c(l) {
|
|
2346
|
+
const p = r(l);
|
|
2351
2347
|
if (p)
|
|
2352
2348
|
return p;
|
|
2353
|
-
const f = Zt(
|
|
2354
|
-
return o(
|
|
2349
|
+
const f = Zt(l, n);
|
|
2350
|
+
return o(l, f), f;
|
|
2355
2351
|
}
|
|
2356
2352
|
return function() {
|
|
2357
2353
|
return i(en.apply(null, arguments));
|
|
2358
2354
|
};
|
|
2359
2355
|
}
|
|
2360
|
-
const
|
|
2356
|
+
const H = (e) => {
|
|
2361
2357
|
const t = (n) => n[e] || [];
|
|
2362
2358
|
return t.isThemeGetter = !0, t;
|
|
2363
2359
|
}, Xe = /^\[(?:([a-z-]+):)?(.+)\]$/i, nn = /^\d+\/\d+$/, rn = /* @__PURE__ */ new Set(["px", "full", "screen"]), on = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, sn = /\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$/, cn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, an = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, ln = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, j = (e) => re(e) || rn.has(e) || nn.test(e), q = (e) => ie(e, "length", bn), re = (e) => !!e && !Number.isNaN(Number(e)), be = (e) => ie(e, "number", re), ae = (e) => !!e && Number.isInteger(Number(e)), dn = (e) => e.endsWith("%") && re(e.slice(0, -1)), I = (e) => Xe.test(e), X = (e) => on.test(e), un = /* @__PURE__ */ new Set(["length", "size", "percentage"]), pn = (e) => ie(e, un, Je), fn = (e) => ie(e, "position", Je), hn = /* @__PURE__ */ new Set(["image", "url"]), mn = (e) => ie(e, hn, wn), gn = (e) => ie(e, "", vn), le = () => !0, ie = (e, t, n) => {
|
|
@@ -2369,7 +2365,7 @@ const D = (e) => {
|
|
|
2369
2365
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
2370
2366
|
sn.test(e) && !cn.test(e)
|
|
2371
2367
|
), Je = () => !1, vn = (e) => an.test(e), wn = (e) => ln.test(e), yn = () => {
|
|
2372
|
-
const e =
|
|
2368
|
+
const e = H("colors"), t = H("spacing"), n = H("blur"), r = H("brightness"), o = H("borderColor"), i = H("borderRadius"), a = H("borderSpacing"), c = H("borderWidth"), l = H("contrast"), p = H("grayscale"), f = H("hueRotate"), b = H("invert"), d = H("gap"), u = H("gradientColorStops"), m = H("gradientColorStopPositions"), h = H("inset"), g = H("margin"), k = H("opacity"), v = H("padding"), N = H("saturate"), w = H("scale"), A = H("sepia"), $ = H("skew"), L = H("space"), T = H("translate"), y = () => ["auto", "contain", "none"], R = () => ["auto", "hidden", "clip", "visible", "scroll"], C = () => ["auto", I, t], S = () => [I, t], z = () => ["", j, q], F = () => ["auto", re, I], Z = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], G = () => ["solid", "dashed", "dotted", "double", "none"], M = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], P = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], D = () => ["", "0", I], ge = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], V = () => [re, I];
|
|
2373
2369
|
return {
|
|
2374
2370
|
cacheSize: 500,
|
|
2375
2371
|
separator: ":",
|
|
@@ -2377,26 +2373,26 @@ const D = (e) => {
|
|
|
2377
2373
|
colors: [le],
|
|
2378
2374
|
spacing: [j, q],
|
|
2379
2375
|
blur: ["none", "", X, I],
|
|
2380
|
-
brightness:
|
|
2376
|
+
brightness: V(),
|
|
2381
2377
|
borderColor: [e],
|
|
2382
2378
|
borderRadius: ["none", "", "full", X, I],
|
|
2383
2379
|
borderSpacing: S(),
|
|
2384
|
-
borderWidth:
|
|
2385
|
-
contrast:
|
|
2386
|
-
grayscale:
|
|
2387
|
-
hueRotate:
|
|
2388
|
-
invert:
|
|
2380
|
+
borderWidth: z(),
|
|
2381
|
+
contrast: V(),
|
|
2382
|
+
grayscale: D(),
|
|
2383
|
+
hueRotate: V(),
|
|
2384
|
+
invert: D(),
|
|
2389
2385
|
gap: S(),
|
|
2390
2386
|
gradientColorStops: [e],
|
|
2391
2387
|
gradientColorStopPositions: [dn, q],
|
|
2392
2388
|
inset: C(),
|
|
2393
2389
|
margin: C(),
|
|
2394
|
-
opacity:
|
|
2390
|
+
opacity: V(),
|
|
2395
2391
|
padding: S(),
|
|
2396
|
-
saturate:
|
|
2397
|
-
scale:
|
|
2398
|
-
sepia:
|
|
2399
|
-
skew:
|
|
2392
|
+
saturate: V(),
|
|
2393
|
+
scale: V(),
|
|
2394
|
+
sepia: D(),
|
|
2395
|
+
skew: V(),
|
|
2400
2396
|
space: S(),
|
|
2401
2397
|
translate: S()
|
|
2402
2398
|
},
|
|
@@ -2492,7 +2488,7 @@ const D = (e) => {
|
|
|
2492
2488
|
* @see https://tailwindcss.com/docs/object-position
|
|
2493
2489
|
*/
|
|
2494
2490
|
"object-position": [{
|
|
2495
|
-
object: [
|
|
2491
|
+
object: [...Z(), I]
|
|
2496
2492
|
}],
|
|
2497
2493
|
/**
|
|
2498
2494
|
* Overflow
|
|
@@ -2520,21 +2516,21 @@ const D = (e) => {
|
|
|
2520
2516
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2521
2517
|
*/
|
|
2522
2518
|
overscroll: [{
|
|
2523
|
-
overscroll:
|
|
2519
|
+
overscroll: y()
|
|
2524
2520
|
}],
|
|
2525
2521
|
/**
|
|
2526
2522
|
* Overscroll Behavior X
|
|
2527
2523
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2528
2524
|
*/
|
|
2529
2525
|
"overscroll-x": [{
|
|
2530
|
-
"overscroll-x":
|
|
2526
|
+
"overscroll-x": y()
|
|
2531
2527
|
}],
|
|
2532
2528
|
/**
|
|
2533
2529
|
* Overscroll Behavior Y
|
|
2534
2530
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2535
2531
|
*/
|
|
2536
2532
|
"overscroll-y": [{
|
|
2537
|
-
"overscroll-y":
|
|
2533
|
+
"overscroll-y": y()
|
|
2538
2534
|
}],
|
|
2539
2535
|
/**
|
|
2540
2536
|
* Position
|
|
@@ -2546,63 +2542,63 @@ const D = (e) => {
|
|
|
2546
2542
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2547
2543
|
*/
|
|
2548
2544
|
inset: [{
|
|
2549
|
-
inset: [
|
|
2545
|
+
inset: [h]
|
|
2550
2546
|
}],
|
|
2551
2547
|
/**
|
|
2552
2548
|
* Right / Left
|
|
2553
2549
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2554
2550
|
*/
|
|
2555
2551
|
"inset-x": [{
|
|
2556
|
-
"inset-x": [
|
|
2552
|
+
"inset-x": [h]
|
|
2557
2553
|
}],
|
|
2558
2554
|
/**
|
|
2559
2555
|
* Top / Bottom
|
|
2560
2556
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2561
2557
|
*/
|
|
2562
2558
|
"inset-y": [{
|
|
2563
|
-
"inset-y": [
|
|
2559
|
+
"inset-y": [h]
|
|
2564
2560
|
}],
|
|
2565
2561
|
/**
|
|
2566
2562
|
* Start
|
|
2567
2563
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2568
2564
|
*/
|
|
2569
2565
|
start: [{
|
|
2570
|
-
start: [
|
|
2566
|
+
start: [h]
|
|
2571
2567
|
}],
|
|
2572
2568
|
/**
|
|
2573
2569
|
* End
|
|
2574
2570
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2575
2571
|
*/
|
|
2576
2572
|
end: [{
|
|
2577
|
-
end: [
|
|
2573
|
+
end: [h]
|
|
2578
2574
|
}],
|
|
2579
2575
|
/**
|
|
2580
2576
|
* Top
|
|
2581
2577
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2582
2578
|
*/
|
|
2583
2579
|
top: [{
|
|
2584
|
-
top: [
|
|
2580
|
+
top: [h]
|
|
2585
2581
|
}],
|
|
2586
2582
|
/**
|
|
2587
2583
|
* Right
|
|
2588
2584
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2589
2585
|
*/
|
|
2590
2586
|
right: [{
|
|
2591
|
-
right: [
|
|
2587
|
+
right: [h]
|
|
2592
2588
|
}],
|
|
2593
2589
|
/**
|
|
2594
2590
|
* Bottom
|
|
2595
2591
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2596
2592
|
*/
|
|
2597
2593
|
bottom: [{
|
|
2598
|
-
bottom: [
|
|
2594
|
+
bottom: [h]
|
|
2599
2595
|
}],
|
|
2600
2596
|
/**
|
|
2601
2597
|
* Left
|
|
2602
2598
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2603
2599
|
*/
|
|
2604
2600
|
left: [{
|
|
2605
|
-
left: [
|
|
2601
|
+
left: [h]
|
|
2606
2602
|
}],
|
|
2607
2603
|
/**
|
|
2608
2604
|
* Visibility
|
|
@@ -2650,14 +2646,14 @@ const D = (e) => {
|
|
|
2650
2646
|
* @see https://tailwindcss.com/docs/flex-grow
|
|
2651
2647
|
*/
|
|
2652
2648
|
grow: [{
|
|
2653
|
-
grow:
|
|
2649
|
+
grow: D()
|
|
2654
2650
|
}],
|
|
2655
2651
|
/**
|
|
2656
2652
|
* Flex Shrink
|
|
2657
2653
|
* @see https://tailwindcss.com/docs/flex-shrink
|
|
2658
2654
|
*/
|
|
2659
2655
|
shrink: [{
|
|
2660
|
-
shrink:
|
|
2656
|
+
shrink: D()
|
|
2661
2657
|
}],
|
|
2662
2658
|
/**
|
|
2663
2659
|
* Order
|
|
@@ -2687,14 +2683,14 @@ const D = (e) => {
|
|
|
2687
2683
|
* @see https://tailwindcss.com/docs/grid-column
|
|
2688
2684
|
*/
|
|
2689
2685
|
"col-start": [{
|
|
2690
|
-
"col-start":
|
|
2686
|
+
"col-start": F()
|
|
2691
2687
|
}],
|
|
2692
2688
|
/**
|
|
2693
2689
|
* Grid Column End
|
|
2694
2690
|
* @see https://tailwindcss.com/docs/grid-column
|
|
2695
2691
|
*/
|
|
2696
2692
|
"col-end": [{
|
|
2697
|
-
"col-end":
|
|
2693
|
+
"col-end": F()
|
|
2698
2694
|
}],
|
|
2699
2695
|
/**
|
|
2700
2696
|
* Grid Template Rows
|
|
@@ -2717,14 +2713,14 @@ const D = (e) => {
|
|
|
2717
2713
|
* @see https://tailwindcss.com/docs/grid-row
|
|
2718
2714
|
*/
|
|
2719
2715
|
"row-start": [{
|
|
2720
|
-
"row-start":
|
|
2716
|
+
"row-start": F()
|
|
2721
2717
|
}],
|
|
2722
2718
|
/**
|
|
2723
2719
|
* Grid Row End
|
|
2724
2720
|
* @see https://tailwindcss.com/docs/grid-row
|
|
2725
2721
|
*/
|
|
2726
2722
|
"row-end": [{
|
|
2727
|
-
"row-end":
|
|
2723
|
+
"row-end": F()
|
|
2728
2724
|
}],
|
|
2729
2725
|
/**
|
|
2730
2726
|
* Grid Auto Flow
|
|
@@ -2752,28 +2748,28 @@ const D = (e) => {
|
|
|
2752
2748
|
* @see https://tailwindcss.com/docs/gap
|
|
2753
2749
|
*/
|
|
2754
2750
|
gap: [{
|
|
2755
|
-
gap: [
|
|
2751
|
+
gap: [d]
|
|
2756
2752
|
}],
|
|
2757
2753
|
/**
|
|
2758
2754
|
* Gap X
|
|
2759
2755
|
* @see https://tailwindcss.com/docs/gap
|
|
2760
2756
|
*/
|
|
2761
2757
|
"gap-x": [{
|
|
2762
|
-
"gap-x": [
|
|
2758
|
+
"gap-x": [d]
|
|
2763
2759
|
}],
|
|
2764
2760
|
/**
|
|
2765
2761
|
* Gap Y
|
|
2766
2762
|
* @see https://tailwindcss.com/docs/gap
|
|
2767
2763
|
*/
|
|
2768
2764
|
"gap-y": [{
|
|
2769
|
-
"gap-y": [
|
|
2765
|
+
"gap-y": [d]
|
|
2770
2766
|
}],
|
|
2771
2767
|
/**
|
|
2772
2768
|
* Justify Content
|
|
2773
2769
|
* @see https://tailwindcss.com/docs/justify-content
|
|
2774
2770
|
*/
|
|
2775
2771
|
"justify-content": [{
|
|
2776
|
-
justify: ["normal", ...
|
|
2772
|
+
justify: ["normal", ...P()]
|
|
2777
2773
|
}],
|
|
2778
2774
|
/**
|
|
2779
2775
|
* Justify Items
|
|
@@ -2794,7 +2790,7 @@ const D = (e) => {
|
|
|
2794
2790
|
* @see https://tailwindcss.com/docs/align-content
|
|
2795
2791
|
*/
|
|
2796
2792
|
"align-content": [{
|
|
2797
|
-
content: ["normal", ...
|
|
2793
|
+
content: ["normal", ...P(), "baseline"]
|
|
2798
2794
|
}],
|
|
2799
2795
|
/**
|
|
2800
2796
|
* Align Items
|
|
@@ -2815,7 +2811,7 @@ const D = (e) => {
|
|
|
2815
2811
|
* @see https://tailwindcss.com/docs/place-content
|
|
2816
2812
|
*/
|
|
2817
2813
|
"place-content": [{
|
|
2818
|
-
"place-content": [...
|
|
2814
|
+
"place-content": [...P(), "baseline"]
|
|
2819
2815
|
}],
|
|
2820
2816
|
/**
|
|
2821
2817
|
* Place Items
|
|
@@ -2900,70 +2896,70 @@ const D = (e) => {
|
|
|
2900
2896
|
* @see https://tailwindcss.com/docs/margin
|
|
2901
2897
|
*/
|
|
2902
2898
|
m: [{
|
|
2903
|
-
m: [
|
|
2899
|
+
m: [g]
|
|
2904
2900
|
}],
|
|
2905
2901
|
/**
|
|
2906
2902
|
* Margin X
|
|
2907
2903
|
* @see https://tailwindcss.com/docs/margin
|
|
2908
2904
|
*/
|
|
2909
2905
|
mx: [{
|
|
2910
|
-
mx: [
|
|
2906
|
+
mx: [g]
|
|
2911
2907
|
}],
|
|
2912
2908
|
/**
|
|
2913
2909
|
* Margin Y
|
|
2914
2910
|
* @see https://tailwindcss.com/docs/margin
|
|
2915
2911
|
*/
|
|
2916
2912
|
my: [{
|
|
2917
|
-
my: [
|
|
2913
|
+
my: [g]
|
|
2918
2914
|
}],
|
|
2919
2915
|
/**
|
|
2920
2916
|
* Margin Start
|
|
2921
2917
|
* @see https://tailwindcss.com/docs/margin
|
|
2922
2918
|
*/
|
|
2923
2919
|
ms: [{
|
|
2924
|
-
ms: [
|
|
2920
|
+
ms: [g]
|
|
2925
2921
|
}],
|
|
2926
2922
|
/**
|
|
2927
2923
|
* Margin End
|
|
2928
2924
|
* @see https://tailwindcss.com/docs/margin
|
|
2929
2925
|
*/
|
|
2930
2926
|
me: [{
|
|
2931
|
-
me: [
|
|
2927
|
+
me: [g]
|
|
2932
2928
|
}],
|
|
2933
2929
|
/**
|
|
2934
2930
|
* Margin Top
|
|
2935
2931
|
* @see https://tailwindcss.com/docs/margin
|
|
2936
2932
|
*/
|
|
2937
2933
|
mt: [{
|
|
2938
|
-
mt: [
|
|
2934
|
+
mt: [g]
|
|
2939
2935
|
}],
|
|
2940
2936
|
/**
|
|
2941
2937
|
* Margin Right
|
|
2942
2938
|
* @see https://tailwindcss.com/docs/margin
|
|
2943
2939
|
*/
|
|
2944
2940
|
mr: [{
|
|
2945
|
-
mr: [
|
|
2941
|
+
mr: [g]
|
|
2946
2942
|
}],
|
|
2947
2943
|
/**
|
|
2948
2944
|
* Margin Bottom
|
|
2949
2945
|
* @see https://tailwindcss.com/docs/margin
|
|
2950
2946
|
*/
|
|
2951
2947
|
mb: [{
|
|
2952
|
-
mb: [
|
|
2948
|
+
mb: [g]
|
|
2953
2949
|
}],
|
|
2954
2950
|
/**
|
|
2955
2951
|
* Margin Left
|
|
2956
2952
|
* @see https://tailwindcss.com/docs/margin
|
|
2957
2953
|
*/
|
|
2958
2954
|
ml: [{
|
|
2959
|
-
ml: [
|
|
2955
|
+
ml: [g]
|
|
2960
2956
|
}],
|
|
2961
2957
|
/**
|
|
2962
2958
|
* Space Between X
|
|
2963
2959
|
* @see https://tailwindcss.com/docs/space
|
|
2964
2960
|
*/
|
|
2965
2961
|
"space-x": [{
|
|
2966
|
-
"space-x": [
|
|
2962
|
+
"space-x": [L]
|
|
2967
2963
|
}],
|
|
2968
2964
|
/**
|
|
2969
2965
|
* Space Between X Reverse
|
|
@@ -2975,7 +2971,7 @@ const D = (e) => {
|
|
|
2975
2971
|
* @see https://tailwindcss.com/docs/space
|
|
2976
2972
|
*/
|
|
2977
2973
|
"space-y": [{
|
|
2978
|
-
"space-y": [
|
|
2974
|
+
"space-y": [L]
|
|
2979
2975
|
}],
|
|
2980
2976
|
/**
|
|
2981
2977
|
* Space Between Y Reverse
|
|
@@ -3151,7 +3147,7 @@ const D = (e) => {
|
|
|
3151
3147
|
* @see https://tailwindcss.com/docs/placeholder-opacity
|
|
3152
3148
|
*/
|
|
3153
3149
|
"placeholder-opacity": [{
|
|
3154
|
-
"placeholder-opacity": [
|
|
3150
|
+
"placeholder-opacity": [k]
|
|
3155
3151
|
}],
|
|
3156
3152
|
/**
|
|
3157
3153
|
* Text Alignment
|
|
@@ -3172,7 +3168,7 @@ const D = (e) => {
|
|
|
3172
3168
|
* @see https://tailwindcss.com/docs/text-opacity
|
|
3173
3169
|
*/
|
|
3174
3170
|
"text-opacity": [{
|
|
3175
|
-
"text-opacity": [
|
|
3171
|
+
"text-opacity": [k]
|
|
3176
3172
|
}],
|
|
3177
3173
|
/**
|
|
3178
3174
|
* Text Decoration
|
|
@@ -3184,7 +3180,7 @@ const D = (e) => {
|
|
|
3184
3180
|
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
3185
3181
|
*/
|
|
3186
3182
|
"text-decoration-style": [{
|
|
3187
|
-
decoration: [...
|
|
3183
|
+
decoration: [...G(), "wavy"]
|
|
3188
3184
|
}],
|
|
3189
3185
|
/**
|
|
3190
3186
|
* Text Decoration Thickness
|
|
@@ -3287,7 +3283,7 @@ const D = (e) => {
|
|
|
3287
3283
|
* @see https://tailwindcss.com/docs/background-opacity
|
|
3288
3284
|
*/
|
|
3289
3285
|
"bg-opacity": [{
|
|
3290
|
-
"bg-opacity": [
|
|
3286
|
+
"bg-opacity": [k]
|
|
3291
3287
|
}],
|
|
3292
3288
|
/**
|
|
3293
3289
|
* Background Origin
|
|
@@ -3301,7 +3297,7 @@ const D = (e) => {
|
|
|
3301
3297
|
* @see https://tailwindcss.com/docs/background-position
|
|
3302
3298
|
*/
|
|
3303
3299
|
"bg-position": [{
|
|
3304
|
-
bg: [
|
|
3300
|
+
bg: [...Z(), fn]
|
|
3305
3301
|
}],
|
|
3306
3302
|
/**
|
|
3307
3303
|
* Background Repeat
|
|
@@ -3361,21 +3357,21 @@ const D = (e) => {
|
|
|
3361
3357
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3362
3358
|
*/
|
|
3363
3359
|
"gradient-from": [{
|
|
3364
|
-
from: [
|
|
3360
|
+
from: [u]
|
|
3365
3361
|
}],
|
|
3366
3362
|
/**
|
|
3367
3363
|
* Gradient Color Stops Via
|
|
3368
3364
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3369
3365
|
*/
|
|
3370
3366
|
"gradient-via": [{
|
|
3371
|
-
via: [
|
|
3367
|
+
via: [u]
|
|
3372
3368
|
}],
|
|
3373
3369
|
/**
|
|
3374
3370
|
* Gradient Color Stops To
|
|
3375
3371
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3376
3372
|
*/
|
|
3377
3373
|
"gradient-to": [{
|
|
3378
|
-
to: [
|
|
3374
|
+
to: [u]
|
|
3379
3375
|
}],
|
|
3380
3376
|
// Borders
|
|
3381
3377
|
/**
|
|
@@ -3551,14 +3547,14 @@ const D = (e) => {
|
|
|
3551
3547
|
* @see https://tailwindcss.com/docs/border-opacity
|
|
3552
3548
|
*/
|
|
3553
3549
|
"border-opacity": [{
|
|
3554
|
-
"border-opacity": [
|
|
3550
|
+
"border-opacity": [k]
|
|
3555
3551
|
}],
|
|
3556
3552
|
/**
|
|
3557
3553
|
* Border Style
|
|
3558
3554
|
* @see https://tailwindcss.com/docs/border-style
|
|
3559
3555
|
*/
|
|
3560
3556
|
"border-style": [{
|
|
3561
|
-
border: [...
|
|
3557
|
+
border: [...G(), "hidden"]
|
|
3562
3558
|
}],
|
|
3563
3559
|
/**
|
|
3564
3560
|
* Divide Width X
|
|
@@ -3589,14 +3585,14 @@ const D = (e) => {
|
|
|
3589
3585
|
* @see https://tailwindcss.com/docs/divide-opacity
|
|
3590
3586
|
*/
|
|
3591
3587
|
"divide-opacity": [{
|
|
3592
|
-
"divide-opacity": [
|
|
3588
|
+
"divide-opacity": [k]
|
|
3593
3589
|
}],
|
|
3594
3590
|
/**
|
|
3595
3591
|
* Divide Style
|
|
3596
3592
|
* @see https://tailwindcss.com/docs/divide-style
|
|
3597
3593
|
*/
|
|
3598
3594
|
"divide-style": [{
|
|
3599
|
-
divide:
|
|
3595
|
+
divide: G()
|
|
3600
3596
|
}],
|
|
3601
3597
|
/**
|
|
3602
3598
|
* Border Color
|
|
@@ -3673,7 +3669,7 @@ const D = (e) => {
|
|
|
3673
3669
|
* @see https://tailwindcss.com/docs/outline-style
|
|
3674
3670
|
*/
|
|
3675
3671
|
"outline-style": [{
|
|
3676
|
-
outline: ["", ...
|
|
3672
|
+
outline: ["", ...G()]
|
|
3677
3673
|
}],
|
|
3678
3674
|
/**
|
|
3679
3675
|
* Outline Offset
|
|
@@ -3701,7 +3697,7 @@ const D = (e) => {
|
|
|
3701
3697
|
* @see https://tailwindcss.com/docs/ring-width
|
|
3702
3698
|
*/
|
|
3703
3699
|
"ring-w": [{
|
|
3704
|
-
ring:
|
|
3700
|
+
ring: z()
|
|
3705
3701
|
}],
|
|
3706
3702
|
/**
|
|
3707
3703
|
* Ring Width Inset
|
|
@@ -3720,7 +3716,7 @@ const D = (e) => {
|
|
|
3720
3716
|
* @see https://tailwindcss.com/docs/ring-opacity
|
|
3721
3717
|
*/
|
|
3722
3718
|
"ring-opacity": [{
|
|
3723
|
-
"ring-opacity": [
|
|
3719
|
+
"ring-opacity": [k]
|
|
3724
3720
|
}],
|
|
3725
3721
|
/**
|
|
3726
3722
|
* Ring Offset Width
|
|
@@ -3756,21 +3752,21 @@ const D = (e) => {
|
|
|
3756
3752
|
* @see https://tailwindcss.com/docs/opacity
|
|
3757
3753
|
*/
|
|
3758
3754
|
opacity: [{
|
|
3759
|
-
opacity: [
|
|
3755
|
+
opacity: [k]
|
|
3760
3756
|
}],
|
|
3761
3757
|
/**
|
|
3762
3758
|
* Mix Blend Mode
|
|
3763
3759
|
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
3764
3760
|
*/
|
|
3765
3761
|
"mix-blend": [{
|
|
3766
|
-
"mix-blend": [...
|
|
3762
|
+
"mix-blend": [...M(), "plus-lighter", "plus-darker"]
|
|
3767
3763
|
}],
|
|
3768
3764
|
/**
|
|
3769
3765
|
* Background Blend Mode
|
|
3770
3766
|
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
3771
3767
|
*/
|
|
3772
3768
|
"bg-blend": [{
|
|
3773
|
-
"bg-blend":
|
|
3769
|
+
"bg-blend": M()
|
|
3774
3770
|
}],
|
|
3775
3771
|
// Filters
|
|
3776
3772
|
/**
|
|
@@ -3800,7 +3796,7 @@ const D = (e) => {
|
|
|
3800
3796
|
* @see https://tailwindcss.com/docs/contrast
|
|
3801
3797
|
*/
|
|
3802
3798
|
contrast: [{
|
|
3803
|
-
contrast: [
|
|
3799
|
+
contrast: [l]
|
|
3804
3800
|
}],
|
|
3805
3801
|
/**
|
|
3806
3802
|
* Drop Shadow
|
|
@@ -3835,14 +3831,14 @@ const D = (e) => {
|
|
|
3835
3831
|
* @see https://tailwindcss.com/docs/saturate
|
|
3836
3832
|
*/
|
|
3837
3833
|
saturate: [{
|
|
3838
|
-
saturate: [
|
|
3834
|
+
saturate: [N]
|
|
3839
3835
|
}],
|
|
3840
3836
|
/**
|
|
3841
3837
|
* Sepia
|
|
3842
3838
|
* @see https://tailwindcss.com/docs/sepia
|
|
3843
3839
|
*/
|
|
3844
3840
|
sepia: [{
|
|
3845
|
-
sepia: [
|
|
3841
|
+
sepia: [A]
|
|
3846
3842
|
}],
|
|
3847
3843
|
/**
|
|
3848
3844
|
* Backdrop Filter
|
|
@@ -3871,7 +3867,7 @@ const D = (e) => {
|
|
|
3871
3867
|
* @see https://tailwindcss.com/docs/backdrop-contrast
|
|
3872
3868
|
*/
|
|
3873
3869
|
"backdrop-contrast": [{
|
|
3874
|
-
"backdrop-contrast": [
|
|
3870
|
+
"backdrop-contrast": [l]
|
|
3875
3871
|
}],
|
|
3876
3872
|
/**
|
|
3877
3873
|
* Backdrop Grayscale
|
|
@@ -3899,21 +3895,21 @@ const D = (e) => {
|
|
|
3899
3895
|
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
3900
3896
|
*/
|
|
3901
3897
|
"backdrop-opacity": [{
|
|
3902
|
-
"backdrop-opacity": [
|
|
3898
|
+
"backdrop-opacity": [k]
|
|
3903
3899
|
}],
|
|
3904
3900
|
/**
|
|
3905
3901
|
* Backdrop Saturate
|
|
3906
3902
|
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
3907
3903
|
*/
|
|
3908
3904
|
"backdrop-saturate": [{
|
|
3909
|
-
"backdrop-saturate": [
|
|
3905
|
+
"backdrop-saturate": [N]
|
|
3910
3906
|
}],
|
|
3911
3907
|
/**
|
|
3912
3908
|
* Backdrop Sepia
|
|
3913
3909
|
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
3914
3910
|
*/
|
|
3915
3911
|
"backdrop-sepia": [{
|
|
3916
|
-
"backdrop-sepia": [
|
|
3912
|
+
"backdrop-sepia": [A]
|
|
3917
3913
|
}],
|
|
3918
3914
|
// Tables
|
|
3919
3915
|
/**
|
|
@@ -3971,7 +3967,7 @@ const D = (e) => {
|
|
|
3971
3967
|
* @see https://tailwindcss.com/docs/transition-duration
|
|
3972
3968
|
*/
|
|
3973
3969
|
duration: [{
|
|
3974
|
-
duration:
|
|
3970
|
+
duration: V()
|
|
3975
3971
|
}],
|
|
3976
3972
|
/**
|
|
3977
3973
|
* Transition Timing Function
|
|
@@ -3985,7 +3981,7 @@ const D = (e) => {
|
|
|
3985
3981
|
* @see https://tailwindcss.com/docs/transition-delay
|
|
3986
3982
|
*/
|
|
3987
3983
|
delay: [{
|
|
3988
|
-
delay:
|
|
3984
|
+
delay: V()
|
|
3989
3985
|
}],
|
|
3990
3986
|
/**
|
|
3991
3987
|
* Animation
|
|
@@ -4035,28 +4031,28 @@ const D = (e) => {
|
|
|
4035
4031
|
* @see https://tailwindcss.com/docs/translate
|
|
4036
4032
|
*/
|
|
4037
4033
|
"translate-x": [{
|
|
4038
|
-
"translate-x": [
|
|
4034
|
+
"translate-x": [T]
|
|
4039
4035
|
}],
|
|
4040
4036
|
/**
|
|
4041
4037
|
* Translate Y
|
|
4042
4038
|
* @see https://tailwindcss.com/docs/translate
|
|
4043
4039
|
*/
|
|
4044
4040
|
"translate-y": [{
|
|
4045
|
-
"translate-y": [
|
|
4041
|
+
"translate-y": [T]
|
|
4046
4042
|
}],
|
|
4047
4043
|
/**
|
|
4048
4044
|
* Skew X
|
|
4049
4045
|
* @see https://tailwindcss.com/docs/skew
|
|
4050
4046
|
*/
|
|
4051
4047
|
"skew-x": [{
|
|
4052
|
-
"skew-x": [
|
|
4048
|
+
"skew-x": [$]
|
|
4053
4049
|
}],
|
|
4054
4050
|
/**
|
|
4055
4051
|
* Skew Y
|
|
4056
4052
|
* @see https://tailwindcss.com/docs/skew
|
|
4057
4053
|
*/
|
|
4058
4054
|
"skew-y": [{
|
|
4059
|
-
"skew-y": [
|
|
4055
|
+
"skew-y": [$]
|
|
4060
4056
|
}],
|
|
4061
4057
|
/**
|
|
4062
4058
|
* Transform Origin
|
|
@@ -4402,40 +4398,40 @@ function kn(...e) {
|
|
|
4402
4398
|
return xn(bt(e));
|
|
4403
4399
|
}
|
|
4404
4400
|
function or({ autoWidth: e = !0, className: t, style: n }) {
|
|
4405
|
-
const [r, o] =
|
|
4401
|
+
const [r, o] = E(() => _.getActiveAppId()), [i, a] = E(() => Y.getRunningApps()), { isMobile: c } = Ke();
|
|
4406
4402
|
B(() => {
|
|
4407
|
-
const
|
|
4408
|
-
o(
|
|
4403
|
+
const g = _.subscribe("activeAppId", (k) => {
|
|
4404
|
+
o(k);
|
|
4409
4405
|
});
|
|
4410
4406
|
return () => {
|
|
4411
|
-
|
|
4407
|
+
g();
|
|
4412
4408
|
};
|
|
4413
|
-
}, []), B(() =>
|
|
4414
|
-
a(
|
|
4409
|
+
}, []), B(() => Y.subscribe(() => {
|
|
4410
|
+
a(Y.getRunningApps());
|
|
4415
4411
|
}), []), B(() => {
|
|
4416
4412
|
if (!new URLSearchParams(window.location.search).has("app")) {
|
|
4417
4413
|
const v = _.getActiveAppId();
|
|
4418
|
-
v && !
|
|
4414
|
+
v && !Y.isRunning(v) && Y.launchApp(v);
|
|
4419
4415
|
}
|
|
4420
4416
|
}, []);
|
|
4421
|
-
const
|
|
4422
|
-
|
|
4423
|
-
}, p = r ? oe.get(r) : null, b = (p == null ? void 0 : p.width) ?? 400,
|
|
4417
|
+
const l = (g) => {
|
|
4418
|
+
Y.closeApp(g);
|
|
4419
|
+
}, p = r ? oe.get(r) : null, b = (p == null ? void 0 : p.width) ?? 400, d = r !== null, h = { ...{
|
|
4424
4420
|
overflow: "hidden",
|
|
4425
|
-
display:
|
|
4421
|
+
display: d ? "flex" : "none",
|
|
4426
4422
|
flexDirection: "column",
|
|
4427
4423
|
flexShrink: 0,
|
|
4428
4424
|
// Only set width if autoWidth is enabled
|
|
4429
|
-
...e &&
|
|
4425
|
+
...e && d ? { width: c ? "100%" : b } : {}
|
|
4430
4426
|
}, ...n };
|
|
4431
|
-
return /* @__PURE__ */ s("div", { className: kn("nc-app-panel", t), style:
|
|
4427
|
+
return /* @__PURE__ */ s("div", { className: kn("nc-app-panel", t), style: h, children: i.map((g) => /* @__PURE__ */ s(
|
|
4432
4428
|
Ge,
|
|
4433
4429
|
{
|
|
4434
|
-
appId:
|
|
4435
|
-
isActive: r ===
|
|
4436
|
-
onClose: () =>
|
|
4430
|
+
appId: g.appId,
|
|
4431
|
+
isActive: r === g.appId,
|
|
4432
|
+
onClose: () => l(g.appId)
|
|
4437
4433
|
},
|
|
4438
|
-
|
|
4434
|
+
g.appId
|
|
4439
4435
|
)) });
|
|
4440
4436
|
}
|
|
4441
4437
|
function sr({
|
|
@@ -4443,52 +4439,52 @@ function sr({
|
|
|
4443
4439
|
className: t = "",
|
|
4444
4440
|
showIndicators: n = !0
|
|
4445
4441
|
}) {
|
|
4446
|
-
const { isMobile: r } = Ke(), [o, i] =
|
|
4442
|
+
const { isMobile: r } = Ke(), [o, i] = E(() => _.getActiveAppId()), [a, c] = E(() => Y.getRunningApps());
|
|
4447
4443
|
B(() => {
|
|
4448
|
-
const
|
|
4444
|
+
const u = _.subscribe("activeAppId", (m) => {
|
|
4449
4445
|
i(m);
|
|
4450
4446
|
});
|
|
4451
4447
|
return () => {
|
|
4452
|
-
|
|
4448
|
+
u();
|
|
4453
4449
|
};
|
|
4454
|
-
}, []), B(() =>
|
|
4455
|
-
c(
|
|
4450
|
+
}, []), B(() => Y.subscribe(() => {
|
|
4451
|
+
c(Y.getRunningApps());
|
|
4456
4452
|
}), []);
|
|
4457
|
-
const
|
|
4458
|
-
o ===
|
|
4459
|
-
}, p = e.map((
|
|
4453
|
+
const l = (u) => {
|
|
4454
|
+
o === u ? Y.setActiveApp(null) : Y.launchApp(u);
|
|
4455
|
+
}, p = e.map((u) => oe.get(u)).filter((u) => !!u), f = a.filter((u) => !e.includes(u.appId)).map((u) => ({ running: u, def: oe.get(u.appId) })).filter((u) => !!u.def), b = (u) => a.some((m) => m.appId === u), d = r ? 24 : 28;
|
|
4460
4456
|
return /* @__PURE__ */ x("div", { className: `nc-app-taskbar ${r ? "nc-mobile" : "nc-desktop"} ${t}`, children: [
|
|
4461
|
-
p.map((
|
|
4462
|
-
const m =
|
|
4457
|
+
p.map((u) => {
|
|
4458
|
+
const m = u.icon, h = o === u.id, g = b(u.id);
|
|
4463
4459
|
return /* @__PURE__ */ x(
|
|
4464
4460
|
"button",
|
|
4465
4461
|
{
|
|
4466
|
-
className: `nc-app-taskbar-button ${
|
|
4467
|
-
onClick: () =>
|
|
4468
|
-
title:
|
|
4462
|
+
className: `nc-app-taskbar-button ${h ? "nc-active" : ""} ${g ? "nc-running" : ""}`,
|
|
4463
|
+
onClick: () => l(u.id),
|
|
4464
|
+
title: u.titleKey || u.id,
|
|
4469
4465
|
children: [
|
|
4470
|
-
/* @__PURE__ */ s(m, { size:
|
|
4471
|
-
n &&
|
|
4466
|
+
/* @__PURE__ */ s(m, { size: d }),
|
|
4467
|
+
n && g && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
|
|
4472
4468
|
]
|
|
4473
4469
|
},
|
|
4474
|
-
|
|
4470
|
+
u.id
|
|
4475
4471
|
);
|
|
4476
4472
|
}),
|
|
4477
4473
|
f.length > 0 && /* @__PURE__ */ s("div", { className: "nc-app-taskbar-separator" }),
|
|
4478
|
-
f.map(({ running:
|
|
4479
|
-
const
|
|
4474
|
+
f.map(({ running: u, def: m }) => {
|
|
4475
|
+
const h = m.icon, g = o === u.appId;
|
|
4480
4476
|
return /* @__PURE__ */ x(
|
|
4481
4477
|
"button",
|
|
4482
4478
|
{
|
|
4483
|
-
className: `nc-app-taskbar-button ${
|
|
4484
|
-
onClick: () =>
|
|
4479
|
+
className: `nc-app-taskbar-button ${g ? "nc-active" : ""} nc-running`,
|
|
4480
|
+
onClick: () => l(u.appId),
|
|
4485
4481
|
title: m.titleKey || m.id,
|
|
4486
4482
|
children: [
|
|
4487
|
-
/* @__PURE__ */ s(
|
|
4483
|
+
/* @__PURE__ */ s(h, { size: d }),
|
|
4488
4484
|
n && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
|
|
4489
4485
|
]
|
|
4490
4486
|
},
|
|
4491
|
-
|
|
4487
|
+
u.appId
|
|
4492
4488
|
);
|
|
4493
4489
|
})
|
|
4494
4490
|
] });
|
|
@@ -4501,8 +4497,8 @@ function ir({
|
|
|
4501
4497
|
className: o = "",
|
|
4502
4498
|
style: i
|
|
4503
4499
|
}) {
|
|
4504
|
-
const a = (
|
|
4505
|
-
r &&
|
|
4500
|
+
const a = (l) => {
|
|
4501
|
+
r && l.target === l.currentTarget && n();
|
|
4506
4502
|
};
|
|
4507
4503
|
if (!t) return null;
|
|
4508
4504
|
const c = /* @__PURE__ */ s(
|
|
@@ -4515,7 +4511,7 @@ function ir({
|
|
|
4515
4511
|
{
|
|
4516
4512
|
className: `nc-app-dialog-container ${o}`,
|
|
4517
4513
|
style: i,
|
|
4518
|
-
onClick: (
|
|
4514
|
+
onClick: (l) => l.stopPropagation(),
|
|
4519
4515
|
children: /* @__PURE__ */ s(
|
|
4520
4516
|
Ge,
|
|
4521
4517
|
{
|
|
@@ -4545,26 +4541,26 @@ function ar() {
|
|
|
4545
4541
|
}
|
|
4546
4542
|
const Ce = se(null);
|
|
4547
4543
|
function lr({ rootView: e, children: t }) {
|
|
4548
|
-
const { t: n } = Q(), r = Wt(), [o, i] =
|
|
4549
|
-
c((
|
|
4550
|
-
const
|
|
4551
|
-
return
|
|
4544
|
+
const { t: n } = Q(), r = Wt(), [o, i] = E([e]), [a, c] = E([null]), l = O((w, A) => {
|
|
4545
|
+
c(($) => {
|
|
4546
|
+
const L = [...$];
|
|
4547
|
+
return L[w] = A, L;
|
|
4552
4548
|
});
|
|
4553
4549
|
}, []), p = O((w) => {
|
|
4554
|
-
c((
|
|
4555
|
-
const
|
|
4556
|
-
return
|
|
4550
|
+
c((A) => {
|
|
4551
|
+
const $ = [...A];
|
|
4552
|
+
return $[w] = null, $;
|
|
4557
4553
|
});
|
|
4558
4554
|
}, []), f = O((w) => {
|
|
4559
|
-
i((
|
|
4555
|
+
i((A) => [...A, w]), c((A) => [...A, null]);
|
|
4560
4556
|
}, []), b = O(() => {
|
|
4561
4557
|
i((w) => w.length <= 1 ? w : w.slice(0, -1)), c((w) => w.slice(0, -1));
|
|
4562
|
-
}, []),
|
|
4558
|
+
}, []), d = O(() => {
|
|
4563
4559
|
i([e]), c([null]);
|
|
4564
|
-
}, [e]),
|
|
4560
|
+
}, [e]), u = o.length, m = u > 1, h = o.length - 1, g = o[o.length - 1], k = g != null && g.titleKey ? n(g.titleKey) : (g == null ? void 0 : g.title) ?? "";
|
|
4565
4561
|
B(() => {
|
|
4566
|
-
r.setTitle(
|
|
4567
|
-
}, [
|
|
4562
|
+
r.setTitle(k);
|
|
4563
|
+
}, [k, r]), B(() => {
|
|
4568
4564
|
m ? r.setBackHandler(b) : r.clearBackHandler();
|
|
4569
4565
|
}, [m, b, r]), B(() => {
|
|
4570
4566
|
const w = a[a.length - 1];
|
|
@@ -4573,18 +4569,18 @@ function lr({ rootView: e, children: t }) {
|
|
|
4573
4569
|
const v = {
|
|
4574
4570
|
push: f,
|
|
4575
4571
|
pop: b,
|
|
4576
|
-
reset:
|
|
4577
|
-
depth:
|
|
4572
|
+
reset: d,
|
|
4573
|
+
depth: u,
|
|
4578
4574
|
canGoBack: m,
|
|
4579
|
-
currentTitle:
|
|
4580
|
-
},
|
|
4575
|
+
currentTitle: k
|
|
4576
|
+
}, N = {
|
|
4581
4577
|
stack: o,
|
|
4582
4578
|
toolbarStack: a,
|
|
4583
|
-
updateToolbar:
|
|
4579
|
+
updateToolbar: l,
|
|
4584
4580
|
clearToolbarAt: p,
|
|
4585
|
-
topIndex:
|
|
4581
|
+
topIndex: h
|
|
4586
4582
|
};
|
|
4587
|
-
return /* @__PURE__ */ s(Ae.Provider, { value: v, children: /* @__PURE__ */ s(Ce.Provider, { value:
|
|
4583
|
+
return /* @__PURE__ */ s(Ae.Provider, { value: v, children: /* @__PURE__ */ s(Ce.Provider, { value: N, children: t }) });
|
|
4588
4584
|
}
|
|
4589
4585
|
function Nn({ index: e, children: t }) {
|
|
4590
4586
|
const n = J(Ce);
|
|
@@ -4594,11 +4590,11 @@ function Nn({ index: e, children: t }) {
|
|
|
4594
4590
|
e === i && r(e, p);
|
|
4595
4591
|
}, [e, i, r]), c = O(() => {
|
|
4596
4592
|
e === i && o(e);
|
|
4597
|
-
}, [e, i, o]),
|
|
4593
|
+
}, [e, i, o]), l = {
|
|
4598
4594
|
setToolbar: a,
|
|
4599
4595
|
clearToolbar: c
|
|
4600
4596
|
};
|
|
4601
|
-
return /* @__PURE__ */ s(Qe.Provider, { value:
|
|
4597
|
+
return /* @__PURE__ */ s(Qe.Provider, { value: l, children: t });
|
|
4602
4598
|
}
|
|
4603
4599
|
function dr() {
|
|
4604
4600
|
const e = J(Ae), t = J(Ce);
|
|
@@ -4649,7 +4645,7 @@ export {
|
|
|
4649
4645
|
Un as NumberInput,
|
|
4650
4646
|
Dn as RefreshButton,
|
|
4651
4647
|
qn as Slider,
|
|
4652
|
-
|
|
4648
|
+
It as TabPanel,
|
|
4653
4649
|
Xn as TabPanels,
|
|
4654
4650
|
Jn as Tabs,
|
|
4655
4651
|
Qn as Toggle,
|
|
@@ -4660,7 +4656,7 @@ export {
|
|
|
4660
4656
|
kn as cn,
|
|
4661
4657
|
nr as createAppI18nFactory,
|
|
4662
4658
|
tr as notificationManager,
|
|
4663
|
-
|
|
4659
|
+
Y as runningAppsStore,
|
|
4664
4660
|
Lt as showNotification,
|
|
4665
4661
|
Wt as useApp,
|
|
4666
4662
|
At as useDialog,
|