@kingsimba/nc-ui 0.1.37 → 0.1.39
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 +5 -1
- package/dist/index.js +715 -671
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var ht = Object.defineProperty;
|
|
2
2
|
var mt = (e, t, n) => t in e ? ht(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var oe = (e, t, n) => mt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { jsx as s, jsxs as N, Fragment as
|
|
5
|
-
import { d as
|
|
6
|
-
import ze, { useState as
|
|
4
|
+
import { jsx as s, jsxs as N, Fragment as Ee } from "react/jsx-runtime";
|
|
5
|
+
import { d as Le, E as gt, R as bt, T as vt, g as wt, V as yt, b as xt, a as kt, c as Nt } from "./GeneratedIcons-HFZmBTBT.js";
|
|
6
|
+
import ze, { useState as E, useRef as F, useEffect as D, useMemo as Ie, createContext as ge, useContext as ce, Children as At, isValidElement as St, forwardRef as Ct, useImperativeHandle as Mt, useCallback as G, Suspense as It } from "react";
|
|
7
7
|
import { createPortal as Ae } from "react-dom";
|
|
8
8
|
import { useTranslation as re } from "react-i18next";
|
|
9
|
-
import
|
|
9
|
+
import $t from "i18next";
|
|
10
10
|
import { c as Rt } from "./clsx-OuTLNxxd.js";
|
|
11
11
|
function Qe({
|
|
12
12
|
size: e = "default",
|
|
@@ -38,7 +38,7 @@ function Qe({
|
|
|
38
38
|
return n ? /* @__PURE__ */ s("div", { className: "nc-activity-indicator-overlay", children: o }) : o;
|
|
39
39
|
}
|
|
40
40
|
function te({ variant: e = "default", block: t, size: n = "default", appearance: r = "default", className: o, disabled: i, textSelectable: a, loading: c, onClick: l, children: u, ...f }) {
|
|
41
|
-
const
|
|
41
|
+
const g = [
|
|
42
42
|
"nc-button",
|
|
43
43
|
e !== "default" ? `nc-${e}` : "",
|
|
44
44
|
t ? "nc-block" : "",
|
|
@@ -53,16 +53,16 @@ function te({ variant: e = "default", block: t, size: n = "default", appearance:
|
|
|
53
53
|
return /* @__PURE__ */ N(
|
|
54
54
|
"button",
|
|
55
55
|
{
|
|
56
|
-
className:
|
|
56
|
+
className: g,
|
|
57
57
|
disabled: i || c,
|
|
58
|
-
onClick: (
|
|
58
|
+
onClick: (b) => {
|
|
59
59
|
if (!c) {
|
|
60
60
|
if (a) {
|
|
61
|
-
const
|
|
62
|
-
if (
|
|
61
|
+
const S = window.getSelection();
|
|
62
|
+
if (S && S.toString().length > 0)
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
|
-
l == null || l(
|
|
65
|
+
l == null || l(b);
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
...f,
|
|
@@ -87,7 +87,7 @@ const Tt = {
|
|
|
87
87
|
error: "danger",
|
|
88
88
|
danger: "danger"
|
|
89
89
|
};
|
|
90
|
-
function
|
|
90
|
+
function Un({
|
|
91
91
|
code: e,
|
|
92
92
|
text: t,
|
|
93
93
|
type: n,
|
|
@@ -98,7 +98,7 @@ function Kn({
|
|
|
98
98
|
className: c = "",
|
|
99
99
|
style: l
|
|
100
100
|
}) {
|
|
101
|
-
const u = i ?? /* @__PURE__ */ N(
|
|
101
|
+
const u = i ?? /* @__PURE__ */ N(Ee, { children: [
|
|
102
102
|
e !== void 0 && /* @__PURE__ */ s("span", { className: "nc-alert-code", children: e }),
|
|
103
103
|
t
|
|
104
104
|
] });
|
|
@@ -112,7 +112,7 @@ function Kn({
|
|
|
112
112
|
className: "nc-alert-close",
|
|
113
113
|
"aria-label": "Close alert",
|
|
114
114
|
onClick: a,
|
|
115
|
-
children: /* @__PURE__ */ s(
|
|
115
|
+
children: /* @__PURE__ */ s(Le, { size: 16 })
|
|
116
116
|
}
|
|
117
117
|
)
|
|
118
118
|
] }),
|
|
@@ -127,7 +127,7 @@ function Kn({
|
|
|
127
127
|
) })
|
|
128
128
|
] });
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function qn({
|
|
131
131
|
percentage: e = 0.5,
|
|
132
132
|
status: t = "discharging",
|
|
133
133
|
darkMode: n = !1,
|
|
@@ -136,14 +136,14 @@ function _n({
|
|
|
136
136
|
const o = Math.max(0, Math.min(1, Number(e) || 0)), i = o === 0 ? "-" : String(Math.round(o * 100));
|
|
137
137
|
let a;
|
|
138
138
|
r ? o < 0.1 ? a = "var(--nc-danger)" : o < 0.2 ? a = "var(--nc-warning)" : a = "var(--nc-success)" : a = n ? "rgba(255,255,255,0.35)" : "#000000";
|
|
139
|
-
const c = "var(--nc-battery-shell-bg)", l = 24, u = 14, f = 2,
|
|
139
|
+
const c = "var(--nc-battery-shell-bg)", l = 24, u = 14, f = 2, g = 0, d = 12, b = 0, S = 0, v = 0, w = l, k = u, h = k - b * 2, p = w - b * 2, m = Math.max(1, Math.min(4, k / 4)), x = o === 0 ? 0 : 0.05 + o * 0.95, y = l + f + d, M = 20, P = 0.65, C = Math.max(u, M * P), I = l + f + 1, A = (u - M * P) / 2;
|
|
140
140
|
return /* @__PURE__ */ N(
|
|
141
141
|
"svg",
|
|
142
142
|
{
|
|
143
143
|
className: "nc-battery",
|
|
144
|
-
width:
|
|
145
|
-
height:
|
|
146
|
-
viewBox: `0 0 ${
|
|
144
|
+
width: y,
|
|
145
|
+
height: C,
|
|
146
|
+
viewBox: `0 0 ${y} ${C}`,
|
|
147
147
|
role: "img",
|
|
148
148
|
"aria-label": `Battery ${i === "-" ? "-" : `${i}%`} ${t}`,
|
|
149
149
|
children: [
|
|
@@ -151,32 +151,32 @@ function _n({
|
|
|
151
151
|
/* @__PURE__ */ s(
|
|
152
152
|
"rect",
|
|
153
153
|
{
|
|
154
|
-
x:
|
|
154
|
+
x: S,
|
|
155
155
|
y: v,
|
|
156
|
-
rx:
|
|
157
|
-
ry:
|
|
156
|
+
rx: m,
|
|
157
|
+
ry: m,
|
|
158
158
|
width: w,
|
|
159
|
-
height:
|
|
159
|
+
height: k,
|
|
160
160
|
fill: c
|
|
161
161
|
}
|
|
162
162
|
),
|
|
163
163
|
/* @__PURE__ */ s(
|
|
164
164
|
"rect",
|
|
165
165
|
{
|
|
166
|
-
x:
|
|
167
|
-
y: v +
|
|
166
|
+
x: S + b,
|
|
167
|
+
y: v + b,
|
|
168
168
|
width: p,
|
|
169
169
|
height: h,
|
|
170
170
|
fill: a,
|
|
171
|
-
rx:
|
|
172
|
-
ry:
|
|
171
|
+
rx: m,
|
|
172
|
+
ry: m,
|
|
173
173
|
mask: `url(#nc-battery-fill-mask-${o})`
|
|
174
174
|
}
|
|
175
175
|
),
|
|
176
176
|
/* @__PURE__ */ s(
|
|
177
177
|
"text",
|
|
178
178
|
{
|
|
179
|
-
x:
|
|
179
|
+
x: S + w / 2,
|
|
180
180
|
y: u - 3,
|
|
181
181
|
fontSize: 11,
|
|
182
182
|
fontWeight: "bold",
|
|
@@ -188,7 +188,7 @@ function _n({
|
|
|
188
188
|
/* @__PURE__ */ s(
|
|
189
189
|
"rect",
|
|
190
190
|
{
|
|
191
|
-
x: l +
|
|
191
|
+
x: l + g,
|
|
192
192
|
y: u * 0.26,
|
|
193
193
|
width: f,
|
|
194
194
|
height: u * 0.48,
|
|
@@ -197,12 +197,12 @@ function _n({
|
|
|
197
197
|
fill: o === 1 ? a : c
|
|
198
198
|
}
|
|
199
199
|
),
|
|
200
|
-
t === "charging" ? /* @__PURE__ */ s("g", { transform: `translate(${
|
|
200
|
+
t === "charging" ? /* @__PURE__ */ s("g", { transform: `translate(${I}, ${A}) scale(${P})`, fill: a, children: /* @__PURE__ */ s("path", { d: "M10 0 L2 11 H8 L5 20 L14 8 H8 L10 0 Z" }) }) : null
|
|
201
201
|
]
|
|
202
202
|
}
|
|
203
203
|
);
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function Xn({
|
|
206
206
|
value: e,
|
|
207
207
|
onChange: t,
|
|
208
208
|
options: n,
|
|
@@ -224,7 +224,7 @@ function Un({
|
|
|
224
224
|
);
|
|
225
225
|
}) });
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function Pt({ size: e }) {
|
|
228
228
|
return /* @__PURE__ */ s("svg", { className: `nc-checkbox-icon ${e === "small" ? "nc-small" : ""}`, viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ s(
|
|
229
229
|
"path",
|
|
230
230
|
{
|
|
@@ -236,7 +236,7 @@ function Et({ size: e }) {
|
|
|
236
236
|
}
|
|
237
237
|
) });
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function Jn({ checked: e, onChange: t, disabled: n, label: r, size: o = "default", labelColor: i, style: a, className: c = "" }) {
|
|
240
240
|
const l = o === "small";
|
|
241
241
|
return /* @__PURE__ */ N(
|
|
242
242
|
"label",
|
|
@@ -257,7 +257,7 @@ function qn({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
|
|
|
257
257
|
onKeyDown: (u) => {
|
|
258
258
|
n || (u.key === "Enter" || u.key === " ") && (u.preventDefault(), t(!e));
|
|
259
259
|
},
|
|
260
|
-
children: e && /* @__PURE__ */ s(
|
|
260
|
+
children: e && /* @__PURE__ */ s(Pt, { size: o })
|
|
261
261
|
}
|
|
262
262
|
),
|
|
263
263
|
r && /* @__PURE__ */ s("span", { className: "nc-checkbox-text", style: i ? { color: i } : void 0, children: r })
|
|
@@ -265,7 +265,7 @@ function qn({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
|
|
|
265
265
|
}
|
|
266
266
|
);
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function Et({ option: e, onChange: t, selected: n, highlighted: r, small: o, renderOption: i, index: a }) {
|
|
269
269
|
const c = F(null), { t: l } = re(), u = e.disabled === !0;
|
|
270
270
|
return D(() => {
|
|
271
271
|
r && c.current && c.current.scrollIntoView({ block: "nearest" });
|
|
@@ -285,7 +285,7 @@ function Lt({ option: e, onChange: t, selected: n, highlighted: r, small: o, ren
|
|
|
285
285
|
opacity: u ? 0.4 : void 0,
|
|
286
286
|
background: r && !u ? "rgba(59,130,246,0.18)" : n && !u ? "rgba(59,130,246,0.12)" : void 0
|
|
287
287
|
},
|
|
288
|
-
children: i ? i(e, a, !!r) : /* @__PURE__ */ N(
|
|
288
|
+
children: i ? i(e, a, !!r) : /* @__PURE__ */ N(Ee, { children: [
|
|
289
289
|
e.label,
|
|
290
290
|
e.default && /* @__PURE__ */ N("span", { style: { fontSize: "0.85em", color: "var(--nc-text-weak)", marginLeft: 6 }, children: [
|
|
291
291
|
"(",
|
|
@@ -296,7 +296,7 @@ function Lt({ option: e, onChange: t, selected: n, highlighted: r, small: o, ren
|
|
|
296
296
|
}
|
|
297
297
|
);
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function Lt({
|
|
300
300
|
isOpen: e,
|
|
301
301
|
options: t,
|
|
302
302
|
onSelect: n,
|
|
@@ -307,14 +307,14 @@ function Pt({
|
|
|
307
307
|
highlightedIndex: c = -1,
|
|
308
308
|
renderOption: l
|
|
309
309
|
}) {
|
|
310
|
-
const [u, f] =
|
|
310
|
+
const [u, f] = E({ top: 0, left: 0, width: 0 }), [g, d] = E(o), { t: b } = re();
|
|
311
311
|
if (D(() => {
|
|
312
312
|
if (e && i.current) {
|
|
313
313
|
const v = i.current.getBoundingClientRect();
|
|
314
314
|
let w = o;
|
|
315
315
|
if (o === "bottom") {
|
|
316
|
-
const
|
|
317
|
-
|
|
316
|
+
const k = window.innerHeight - v.bottom, h = v.top;
|
|
317
|
+
k < 320 && h > k && (w = "top");
|
|
318
318
|
}
|
|
319
319
|
d(w), f({
|
|
320
320
|
top: w === "top" ? v.top - 4 : v.bottom + 4,
|
|
@@ -323,25 +323,25 @@ function Pt({
|
|
|
323
323
|
});
|
|
324
324
|
}
|
|
325
325
|
}, [e, i, o]), !e) return null;
|
|
326
|
-
const
|
|
326
|
+
const S = /* @__PURE__ */ s(
|
|
327
327
|
"div",
|
|
328
328
|
{
|
|
329
329
|
className: "nc-combo-dropdown",
|
|
330
330
|
onMouseDown: (v) => v.stopPropagation(),
|
|
331
331
|
style: {
|
|
332
332
|
position: "fixed",
|
|
333
|
-
top:
|
|
334
|
-
bottom:
|
|
333
|
+
top: g === "top" ? void 0 : u.top,
|
|
334
|
+
bottom: g === "top" ? window.innerHeight - u.top : void 0,
|
|
335
335
|
left: u.left,
|
|
336
336
|
width: u.width,
|
|
337
337
|
zIndex: 1e3,
|
|
338
338
|
maxHeight: 300,
|
|
339
339
|
overflowY: "auto"
|
|
340
340
|
},
|
|
341
|
-
children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${a ? "nc-small" : ""}`, children:
|
|
341
|
+
children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${a ? "nc-small" : ""}`, children: b("common.noResults") }) : t.map((v, w) => /* @__PURE__ */ s(Et, { option: v, onChange: n, selected: v.value === r, highlighted: w === c, small: a, renderOption: l, index: w }, v.value))
|
|
342
342
|
}
|
|
343
343
|
);
|
|
344
|
-
return Ae(
|
|
344
|
+
return Ae(S, document.body);
|
|
345
345
|
}
|
|
346
346
|
function zt({ onClick: e, small: t }) {
|
|
347
347
|
return /* @__PURE__ */ s(
|
|
@@ -372,7 +372,7 @@ function Bt({ open: e, small: t }) {
|
|
|
372
372
|
}
|
|
373
373
|
);
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function Qn({
|
|
376
376
|
value: e,
|
|
377
377
|
onChange: t,
|
|
378
378
|
placeholder: n = "Select…",
|
|
@@ -384,18 +384,18 @@ function Xn({
|
|
|
384
384
|
disabled: l,
|
|
385
385
|
label: u,
|
|
386
386
|
clearable: f = !0,
|
|
387
|
-
allowTyping:
|
|
387
|
+
allowTyping: g = !1,
|
|
388
388
|
placement: d = "bottom",
|
|
389
|
-
size:
|
|
390
|
-
appearance:
|
|
389
|
+
size: b = "default",
|
|
390
|
+
appearance: S = "default",
|
|
391
391
|
textAlign: v = "left",
|
|
392
392
|
style: w,
|
|
393
|
-
className:
|
|
393
|
+
className: k
|
|
394
394
|
}) {
|
|
395
|
-
const [h, p] =
|
|
395
|
+
const [h, p] = E(!1), [m, x] = E(""), [y, M] = E(-1), P = F(null), C = F(null), I = F(null), A = b === "small", { t: $ } = re(), L = !!o, H = g || L, [ae, X] = E([]), [K, _] = E(() => {
|
|
396
396
|
if (r && e) {
|
|
397
|
-
const
|
|
398
|
-
return
|
|
397
|
+
const T = r.find((W) => W.value === e);
|
|
398
|
+
return T ? T.label : "";
|
|
399
399
|
}
|
|
400
400
|
return o && e ? e : "";
|
|
401
401
|
});
|
|
@@ -405,53 +405,53 @@ function Xn({
|
|
|
405
405
|
return;
|
|
406
406
|
}
|
|
407
407
|
if (r) {
|
|
408
|
-
const
|
|
409
|
-
|
|
408
|
+
const T = r.find((W) => W.value === e);
|
|
409
|
+
T && _(T.label);
|
|
410
410
|
} else o && _(e);
|
|
411
411
|
}, [e, r, o]);
|
|
412
|
-
const U = (
|
|
412
|
+
const U = (T, W = !1) => {
|
|
413
413
|
if (!o) return;
|
|
414
|
-
|
|
414
|
+
I.current && clearTimeout(I.current);
|
|
415
415
|
const B = async () => {
|
|
416
416
|
try {
|
|
417
|
-
const
|
|
418
|
-
X(
|
|
417
|
+
const Y = await o(T);
|
|
418
|
+
X(Y), M(-1);
|
|
419
419
|
} catch {
|
|
420
420
|
X([]);
|
|
421
421
|
}
|
|
422
422
|
};
|
|
423
|
-
W ? B() :
|
|
424
|
-
}, j =
|
|
425
|
-
if (
|
|
426
|
-
const
|
|
427
|
-
return H ? (r || []).filter((W) => W.label.toLowerCase().includes(
|
|
428
|
-
}, [r,
|
|
423
|
+
W ? B() : I.current = setTimeout(B, 200);
|
|
424
|
+
}, j = Ie(() => {
|
|
425
|
+
if (L) return ae;
|
|
426
|
+
const T = m.toLowerCase();
|
|
427
|
+
return H ? (r || []).filter((W) => W.label.toLowerCase().includes(T)) : r || [];
|
|
428
|
+
}, [r, m, H, L, ae]);
|
|
429
429
|
D(() => {
|
|
430
|
-
h &&
|
|
430
|
+
h && M(-1);
|
|
431
431
|
}, [h, j]), D(() => {
|
|
432
432
|
if (!f && !e && r && r.length > 0 && t) {
|
|
433
|
-
const
|
|
434
|
-
t(
|
|
433
|
+
const T = r.find((W) => W.default) || r[0];
|
|
434
|
+
t(T.value);
|
|
435
435
|
}
|
|
436
436
|
}, [f, e, r, t]), D(() => {
|
|
437
|
-
function
|
|
437
|
+
function T(W) {
|
|
438
438
|
var B;
|
|
439
|
-
W.target instanceof Node &&
|
|
439
|
+
W.target instanceof Node && P.current && ((B = P.current.parentElement) != null && B.contains(W.target) || p(!1));
|
|
440
440
|
}
|
|
441
|
-
return document.addEventListener("mousedown",
|
|
441
|
+
return document.addEventListener("mousedown", T), () => document.removeEventListener("mousedown", T);
|
|
442
442
|
}, []);
|
|
443
|
-
const z = c ?? (r ? r.find((
|
|
444
|
-
var
|
|
445
|
-
_(W), t == null || t(
|
|
443
|
+
const z = c ?? (r ? r.find((T) => T.value === e) : e ? { label: K, value: e } : void 0), q = z && f, le = !l && !q, pe = `nc-align-${v}`, ve = !(h && H) && !!z, de = (T, W, B = !1) => {
|
|
444
|
+
var Y;
|
|
445
|
+
_(W), t == null || t(T), p(!1), x(""), B && ((Y = P.current) == null || Y.blur());
|
|
446
446
|
}, we = () => {
|
|
447
447
|
t == null || t(void 0), x(""), p(!1);
|
|
448
|
-
}, ye = (
|
|
448
|
+
}, ye = (T) => {
|
|
449
449
|
if (!h) {
|
|
450
|
-
(
|
|
450
|
+
(T.key === "ArrowDown" || T.key === "ArrowUp") && (p(!0), T.preventDefault());
|
|
451
451
|
return;
|
|
452
452
|
}
|
|
453
|
-
const W = (B,
|
|
454
|
-
if (
|
|
453
|
+
const W = (B, Y) => {
|
|
454
|
+
if (Y === 1) {
|
|
455
455
|
for (let V = B; V < j.length; V++)
|
|
456
456
|
if (!j[V].disabled) return V;
|
|
457
457
|
for (let V = 0; V < B; V++)
|
|
@@ -464,76 +464,76 @@ function Xn({
|
|
|
464
464
|
}
|
|
465
465
|
return B;
|
|
466
466
|
};
|
|
467
|
-
switch (
|
|
467
|
+
switch (T.key) {
|
|
468
468
|
case "ArrowDown":
|
|
469
|
-
|
|
470
|
-
const
|
|
469
|
+
T.preventDefault(), M((B) => {
|
|
470
|
+
const Y = B + 1, V = Y >= j.length ? 0 : Y;
|
|
471
471
|
return W(V, 1);
|
|
472
472
|
});
|
|
473
473
|
break;
|
|
474
474
|
case "ArrowUp":
|
|
475
|
-
|
|
476
|
-
const
|
|
475
|
+
T.preventDefault(), M((B) => {
|
|
476
|
+
const Y = B - 1, V = Y < 0 ? j.length - 1 : Y;
|
|
477
477
|
return W(V, -1);
|
|
478
478
|
});
|
|
479
479
|
break;
|
|
480
480
|
case "Enter":
|
|
481
|
-
|
|
481
|
+
T.preventDefault(), y >= 0 && y < j.length && !j[y].disabled && de(j[y].value, j[y].label, !0);
|
|
482
482
|
break;
|
|
483
483
|
case "Escape":
|
|
484
|
-
|
|
484
|
+
T.preventDefault(), p(!1), x("");
|
|
485
485
|
break;
|
|
486
486
|
}
|
|
487
487
|
};
|
|
488
|
-
return /* @__PURE__ */ N("div", { className: `nc-combo-container ${
|
|
489
|
-
u && /* @__PURE__ */ s("span", { className: `nc-label ${
|
|
488
|
+
return /* @__PURE__ */ N("div", { className: `nc-combo-container ${S === "transparent" ? "nc-transparent" : ""} ${S === "plain" ? "nc-plain" : ""} ${h ? "nc-open" : ""} ${pe} ${k || ""}`.trim(), style: { position: "relative", ...w }, children: [
|
|
489
|
+
u && /* @__PURE__ */ s("span", { className: `nc-label ${A ? "nc-small" : ""}`, children: u }),
|
|
490
490
|
/* @__PURE__ */ N(
|
|
491
491
|
"div",
|
|
492
492
|
{
|
|
493
|
-
ref:
|
|
493
|
+
ref: C,
|
|
494
494
|
style: { position: "relative", display: "flex", alignItems: "center" },
|
|
495
|
-
onMouseDown: (
|
|
496
|
-
if (l || H &&
|
|
495
|
+
onMouseDown: (T) => {
|
|
496
|
+
if (l || H && T.target === P.current) return;
|
|
497
497
|
const W = !h;
|
|
498
|
-
if (p((B) => (!B && H && z && x(z.label), !B)),
|
|
498
|
+
if (p((B) => (!B && H && z && x(z.label), !B)), L && W) {
|
|
499
499
|
const B = H && z ? z.label : "";
|
|
500
500
|
X([]), setTimeout(() => U(B, !0), 0);
|
|
501
501
|
}
|
|
502
502
|
H && !h && setTimeout(() => {
|
|
503
|
-
var B,
|
|
504
|
-
(B =
|
|
503
|
+
var B, Y;
|
|
504
|
+
(B = P.current) == null || B.focus(), (Y = P.current) == null || Y.select();
|
|
505
505
|
}, 0);
|
|
506
506
|
},
|
|
507
507
|
children: [
|
|
508
508
|
/* @__PURE__ */ s(
|
|
509
509
|
"input",
|
|
510
510
|
{
|
|
511
|
-
ref:
|
|
512
|
-
className: `nc-input ${
|
|
511
|
+
ref: P,
|
|
512
|
+
className: `nc-input ${A ? "nc-small" : ""}`,
|
|
513
513
|
placeholder: n,
|
|
514
514
|
onFocus: () => {
|
|
515
515
|
if (!l && H) {
|
|
516
516
|
p(!0);
|
|
517
|
-
const
|
|
518
|
-
z && (x(
|
|
517
|
+
const T = z ? z.label : "";
|
|
518
|
+
z && (x(T), setTimeout(() => {
|
|
519
519
|
var W;
|
|
520
|
-
return (W =
|
|
521
|
-
}, 0)),
|
|
520
|
+
return (W = P.current) == null ? void 0 : W.select();
|
|
521
|
+
}, 0)), L && (X([]), U(T, !0));
|
|
522
522
|
}
|
|
523
523
|
},
|
|
524
|
-
onChange: (
|
|
525
|
-
const W =
|
|
526
|
-
H && (x(W),
|
|
524
|
+
onChange: (T) => {
|
|
525
|
+
const W = T.target.value;
|
|
526
|
+
H && (x(W), L && U(W));
|
|
527
527
|
},
|
|
528
528
|
onKeyDown: ye,
|
|
529
|
-
value: h && H ?
|
|
529
|
+
value: h && H ? m : (z == null ? void 0 : z.label) || "",
|
|
530
530
|
readOnly: l || !H,
|
|
531
531
|
style: {
|
|
532
532
|
width: "100%",
|
|
533
|
-
paddingRight: le || q ?
|
|
534
|
-
caretColor:
|
|
535
|
-
cursor:
|
|
536
|
-
userSelect:
|
|
533
|
+
paddingRight: le || q ? A ? 32 : 44 : 12,
|
|
534
|
+
caretColor: g ? void 0 : "transparent",
|
|
535
|
+
cursor: g ? void 0 : "pointer",
|
|
536
|
+
userSelect: g ? void 0 : "none",
|
|
537
537
|
color: ve ? "transparent" : "var(--nc-text)"
|
|
538
538
|
}
|
|
539
539
|
}
|
|
@@ -545,8 +545,8 @@ function Xn({
|
|
|
545
545
|
className: `nc-combo-overlay ${pe}`,
|
|
546
546
|
style: {
|
|
547
547
|
position: "absolute",
|
|
548
|
-
left:
|
|
549
|
-
right: le || q ?
|
|
548
|
+
left: A ? 8 : 12,
|
|
549
|
+
right: le || q ? A ? 12 : 24 : A ? 8 : 12,
|
|
550
550
|
top: "50%",
|
|
551
551
|
transform: "translateY(-50%)",
|
|
552
552
|
pointerEvents: "none",
|
|
@@ -554,9 +554,9 @@ function Xn({
|
|
|
554
554
|
alignItems: "center",
|
|
555
555
|
gap: 6
|
|
556
556
|
},
|
|
557
|
-
children: a && z ? a(z) : /* @__PURE__ */ N(
|
|
558
|
-
/* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${
|
|
559
|
-
(z == null ? void 0 : z.default) && /* @__PURE__ */ N("span", { className: `nc-combo-overlay-default ${
|
|
557
|
+
children: a && z ? a(z) : /* @__PURE__ */ N(Ee, { children: [
|
|
558
|
+
/* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${A ? "nc-small" : ""}`, children: z == null ? void 0 : z.label }),
|
|
559
|
+
(z == null ? void 0 : z.default) && /* @__PURE__ */ N("span", { className: `nc-combo-overlay-default ${A ? "nc-small" : ""}`, children: [
|
|
560
560
|
"(",
|
|
561
561
|
$("common.default"),
|
|
562
562
|
")"
|
|
@@ -564,15 +564,15 @@ function Xn({
|
|
|
564
564
|
] })
|
|
565
565
|
}
|
|
566
566
|
),
|
|
567
|
-
q && /* @__PURE__ */ s(zt, { onClick: we, small:
|
|
568
|
-
le && /* @__PURE__ */ s(Bt, { open: h, small:
|
|
567
|
+
q && /* @__PURE__ */ s(zt, { onClick: we, small: A }),
|
|
568
|
+
le && /* @__PURE__ */ s(Bt, { open: h, small: A })
|
|
569
569
|
]
|
|
570
570
|
}
|
|
571
571
|
),
|
|
572
|
-
/* @__PURE__ */ s(
|
|
572
|
+
/* @__PURE__ */ s(Lt, { isOpen: h, options: j, onSelect: de, selectedValue: e, placement: d, anchorRef: C, small: A, highlightedIndex: y, renderOption: i })
|
|
573
573
|
] });
|
|
574
574
|
}
|
|
575
|
-
function
|
|
575
|
+
function Zn({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default", title: o, "aria-label": i }) {
|
|
576
576
|
return /* @__PURE__ */ s(
|
|
577
577
|
"button",
|
|
578
578
|
{
|
|
@@ -596,11 +596,11 @@ function Ze({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Clo
|
|
|
596
596
|
title: r,
|
|
597
597
|
"aria-label": o,
|
|
598
598
|
"data-size": n,
|
|
599
|
-
children: /* @__PURE__ */ s(
|
|
599
|
+
children: /* @__PURE__ */ s(Le, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
|
|
600
600
|
}
|
|
601
601
|
);
|
|
602
602
|
}
|
|
603
|
-
function
|
|
603
|
+
function er({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Edit", "aria-label": o = "Edit" }) {
|
|
604
604
|
return /* @__PURE__ */ s(
|
|
605
605
|
"button",
|
|
606
606
|
{
|
|
@@ -614,7 +614,7 @@ function Qn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Edi
|
|
|
614
614
|
}
|
|
615
615
|
);
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function tr({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Delete", "aria-label": o = "Delete" }) {
|
|
618
618
|
return /* @__PURE__ */ s(
|
|
619
619
|
"button",
|
|
620
620
|
{
|
|
@@ -628,7 +628,7 @@ function Zn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Del
|
|
|
628
628
|
}
|
|
629
629
|
);
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function nr({ onClick: e, disabled: t = !1, children: n, title: r, "aria-label": o, size: i = "default" }) {
|
|
632
632
|
return /* @__PURE__ */ s(
|
|
633
633
|
"button",
|
|
634
634
|
{
|
|
@@ -642,7 +642,7 @@ function er({ onClick: e, disabled: t = !1, children: n, title: r, "aria-label":
|
|
|
642
642
|
}
|
|
643
643
|
);
|
|
644
644
|
}
|
|
645
|
-
function
|
|
645
|
+
function rr({
|
|
646
646
|
open: e,
|
|
647
647
|
onClose: t,
|
|
648
648
|
options: n,
|
|
@@ -650,35 +650,35 @@ function tr({
|
|
|
650
650
|
anchor: o,
|
|
651
651
|
preferredDirection: i = "down"
|
|
652
652
|
}) {
|
|
653
|
-
const a = F(null), [c, l] =
|
|
653
|
+
const a = F(null), [c, l] = E({ top: 0, left: 0 }), u = o || (r == null ? void 0 : r.current);
|
|
654
654
|
if (D(() => {
|
|
655
655
|
if (!e || !u || !a.current) return;
|
|
656
|
-
const d = u.getBoundingClientRect(),
|
|
656
|
+
const d = u.getBoundingClientRect(), b = a.current.getBoundingClientRect(), S = window.innerHeight, v = window.innerWidth, w = d.bottom + 8, k = w + b.height <= S - 8;
|
|
657
657
|
let h = i;
|
|
658
|
-
(!
|
|
658
|
+
(!k && i === "down" || i === "up" && k) && (h = "up");
|
|
659
659
|
let p;
|
|
660
|
-
h === "down" ? p = w : p = d.top -
|
|
661
|
-
let
|
|
662
|
-
|
|
660
|
+
h === "down" ? p = w : p = d.top - b.height - 8;
|
|
661
|
+
let m = d.left;
|
|
662
|
+
m + b.width > v - 8 && (m = d.right - b.width), l({
|
|
663
663
|
top: Math.max(8, p),
|
|
664
664
|
// Ensure minimum 8px from top
|
|
665
|
-
left: Math.max(8,
|
|
665
|
+
left: Math.max(8, m)
|
|
666
666
|
// Ensure minimum 8px from left
|
|
667
667
|
});
|
|
668
668
|
}, [e, u, i]), D(() => {
|
|
669
669
|
if (!e) return;
|
|
670
|
-
const d = (
|
|
671
|
-
a.current && !a.current.contains(
|
|
672
|
-
},
|
|
673
|
-
|
|
670
|
+
const d = (S) => {
|
|
671
|
+
a.current && !a.current.contains(S.target) && u && !u.contains(S.target) && t();
|
|
672
|
+
}, b = (S) => {
|
|
673
|
+
S.key === "Escape" && t();
|
|
674
674
|
};
|
|
675
|
-
return document.addEventListener("mousedown", d), document.addEventListener("keydown",
|
|
676
|
-
document.removeEventListener("mousedown", d), document.removeEventListener("keydown",
|
|
675
|
+
return document.addEventListener("mousedown", d), document.addEventListener("keydown", b), () => {
|
|
676
|
+
document.removeEventListener("mousedown", d), document.removeEventListener("keydown", b);
|
|
677
677
|
};
|
|
678
678
|
}, [e, t, u]), !e) return null;
|
|
679
679
|
const f = (d) => {
|
|
680
680
|
d.type !== "separator" && !d.disabled && d.onClick && (d.onClick(), t());
|
|
681
|
-
},
|
|
681
|
+
}, g = n.some((d) => d.icon);
|
|
682
682
|
return Ae(
|
|
683
683
|
/* @__PURE__ */ s(
|
|
684
684
|
"div",
|
|
@@ -702,16 +702,16 @@ function tr({
|
|
|
702
702
|
},
|
|
703
703
|
d.id
|
|
704
704
|
);
|
|
705
|
-
const
|
|
705
|
+
const b = [
|
|
706
706
|
"nc-context-menu-item",
|
|
707
707
|
d.variant && d.variant !== "default" ? `nc-${d.variant}` : "",
|
|
708
708
|
d.disabled ? "nc-disabled" : "",
|
|
709
|
-
|
|
709
|
+
g && !d.icon ? "nc-indented" : ""
|
|
710
710
|
].filter(Boolean).join(" ");
|
|
711
711
|
return /* @__PURE__ */ N(
|
|
712
712
|
"button",
|
|
713
713
|
{
|
|
714
|
-
className:
|
|
714
|
+
className: b,
|
|
715
715
|
onClick: () => f(d),
|
|
716
716
|
disabled: d.disabled,
|
|
717
717
|
role: "menuitem",
|
|
@@ -741,7 +741,7 @@ function fe({ children: e, onClick: t, ...n }) {
|
|
|
741
741
|
t == null || t(a), r();
|
|
742
742
|
}, ...n, children: e ?? o("common.close") });
|
|
743
743
|
}
|
|
744
|
-
function
|
|
744
|
+
function or({
|
|
745
745
|
open: e,
|
|
746
746
|
onClose: t,
|
|
747
747
|
title: n,
|
|
@@ -753,59 +753,59 @@ function nr({
|
|
|
753
753
|
onSave: l,
|
|
754
754
|
onDelete: u,
|
|
755
755
|
onCancel: f,
|
|
756
|
-
onConnect:
|
|
756
|
+
onConnect: g,
|
|
757
757
|
closeOnOverlay: d = !0,
|
|
758
|
-
primaryDisabled:
|
|
759
|
-
fullScreen:
|
|
758
|
+
primaryDisabled: b = !1,
|
|
759
|
+
fullScreen: S = !1,
|
|
760
760
|
hideTitleBar: v = !1,
|
|
761
761
|
className: w = "",
|
|
762
|
-
onContentHeightChange:
|
|
762
|
+
onContentHeightChange: k
|
|
763
763
|
}) {
|
|
764
|
-
const h = F(null), p = F(null), { t:
|
|
765
|
-
d &&
|
|
764
|
+
const h = F(null), p = F(null), { t: m } = re(), x = { close: t }, y = (C) => {
|
|
765
|
+
d && C.target === C.currentTarget && t();
|
|
766
766
|
};
|
|
767
767
|
if (D(() => {
|
|
768
768
|
e && h.current && h.current.focus();
|
|
769
769
|
}, [e]), D(() => {
|
|
770
|
-
if (!
|
|
771
|
-
const
|
|
772
|
-
for (const
|
|
773
|
-
const $ =
|
|
774
|
-
|
|
770
|
+
if (!k || !p.current) return;
|
|
771
|
+
const C = new ResizeObserver((I) => {
|
|
772
|
+
for (const A of I) {
|
|
773
|
+
const $ = A.contentRect.height;
|
|
774
|
+
k($);
|
|
775
775
|
}
|
|
776
776
|
});
|
|
777
|
-
return
|
|
778
|
-
|
|
777
|
+
return C.observe(p.current), () => {
|
|
778
|
+
C.disconnect();
|
|
779
779
|
};
|
|
780
|
-
}, [
|
|
781
|
-
const
|
|
780
|
+
}, [k]), !e) return null;
|
|
781
|
+
const M = () => {
|
|
782
782
|
switch (i) {
|
|
783
783
|
case "ok":
|
|
784
|
-
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(te, { variant: "primary", onClick: c ?? t, disabled:
|
|
784
|
+
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(te, { variant: "primary", onClick: c ?? t, disabled: b, children: m("common.ok") }) });
|
|
785
785
|
case "ok-cancel":
|
|
786
786
|
return /* @__PURE__ */ N("div", { className: "nc-dialog-footer", children: [
|
|
787
|
-
/* @__PURE__ */ s(fe, { onClick: f, children:
|
|
788
|
-
/* @__PURE__ */ s(te, { variant: "primary", onClick: c ?? t, disabled:
|
|
787
|
+
/* @__PURE__ */ s(fe, { onClick: f, children: m("common.cancel") }),
|
|
788
|
+
/* @__PURE__ */ s(te, { variant: "primary", onClick: c ?? t, disabled: b, children: m("common.ok") })
|
|
789
789
|
] });
|
|
790
790
|
case "save-cancel":
|
|
791
791
|
return /* @__PURE__ */ N("div", { className: "nc-dialog-footer", children: [
|
|
792
|
-
/* @__PURE__ */ s(fe, { onClick: f, children:
|
|
793
|
-
/* @__PURE__ */ s(te, { variant: "primary", onClick: l, disabled:
|
|
792
|
+
/* @__PURE__ */ s(fe, { onClick: f, children: m("common.cancel") }),
|
|
793
|
+
/* @__PURE__ */ s(te, { variant: "primary", onClick: l, disabled: b, children: m("common.save") })
|
|
794
794
|
] });
|
|
795
795
|
case "delete-cancel":
|
|
796
796
|
return /* @__PURE__ */ N("div", { className: "nc-dialog-footer", children: [
|
|
797
|
-
/* @__PURE__ */ s(fe, { onClick: f, children:
|
|
798
|
-
/* @__PURE__ */ s(te, { variant: "danger", onClick: u, disabled:
|
|
797
|
+
/* @__PURE__ */ s(fe, { onClick: f, children: m("common.cancel") }),
|
|
798
|
+
/* @__PURE__ */ s(te, { variant: "danger", onClick: u, disabled: b, children: m("common.delete") })
|
|
799
799
|
] });
|
|
800
800
|
case "connect":
|
|
801
801
|
return /* @__PURE__ */ N("div", { className: "nc-dialog-footer", children: [
|
|
802
|
-
/* @__PURE__ */ s(fe, { onClick: f, children:
|
|
803
|
-
/* @__PURE__ */ s(te, { variant: "primary", onClick:
|
|
802
|
+
/* @__PURE__ */ s(fe, { onClick: f, children: m("common.cancel") }),
|
|
803
|
+
/* @__PURE__ */ s(te, { variant: "primary", onClick: g, disabled: b, children: m("common.connect") })
|
|
804
804
|
] });
|
|
805
805
|
case "close":
|
|
806
806
|
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(fe, { variant: "primary" }) });
|
|
807
807
|
case "gotit":
|
|
808
|
-
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(fe, { variant: "primary", children:
|
|
808
|
+
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(fe, { variant: "primary", children: m("common.gotit") }) });
|
|
809
809
|
case "custom":
|
|
810
810
|
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: a });
|
|
811
811
|
case "none":
|
|
@@ -813,7 +813,7 @@ function nr({
|
|
|
813
813
|
default:
|
|
814
814
|
return null;
|
|
815
815
|
}
|
|
816
|
-
},
|
|
816
|
+
}, P = /* @__PURE__ */ s(et.Provider, { value: x, children: /* @__PURE__ */ s("div", { className: `nc-dialog-overlay${S ? " nc-fullscreen" : ""}`, onClick: y, children: /* @__PURE__ */ N(
|
|
817
817
|
"div",
|
|
818
818
|
{
|
|
819
819
|
ref: h,
|
|
@@ -829,11 +829,11 @@ function nr({
|
|
|
829
829
|
/* @__PURE__ */ s(Ze, { onClick: t, "aria-label": "Close dialog" })
|
|
830
830
|
] }),
|
|
831
831
|
/* @__PURE__ */ s("div", { ref: p, className: "nc-dialog-content", children: r }),
|
|
832
|
-
|
|
832
|
+
M()
|
|
833
833
|
]
|
|
834
834
|
}
|
|
835
835
|
) }) });
|
|
836
|
-
return
|
|
836
|
+
return S ? Ae(P, document.body) : P;
|
|
837
837
|
}
|
|
838
838
|
function Wt({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
|
|
839
839
|
const r = t === "small" ? 28 : 34;
|
|
@@ -892,7 +892,7 @@ function Ht({ visible: e, onClick: t, size: n = "default" }) {
|
|
|
892
892
|
}
|
|
893
893
|
);
|
|
894
894
|
}
|
|
895
|
-
function
|
|
895
|
+
function sr({
|
|
896
896
|
value: e,
|
|
897
897
|
defaultValue: t = "",
|
|
898
898
|
onChange: n,
|
|
@@ -904,25 +904,25 @@ function rr({
|
|
|
904
904
|
label: l,
|
|
905
905
|
clearable: u = !0,
|
|
906
906
|
type: f = "text",
|
|
907
|
-
className:
|
|
907
|
+
className: g = "",
|
|
908
908
|
size: d = "default",
|
|
909
|
-
appearance:
|
|
910
|
-
style:
|
|
909
|
+
appearance: b = "default",
|
|
910
|
+
style: S,
|
|
911
911
|
leadingIcon: v,
|
|
912
912
|
showPasswordToggle: w = !1,
|
|
913
|
-
multiline:
|
|
913
|
+
multiline: k = !1,
|
|
914
914
|
rows: h = 3,
|
|
915
915
|
validator: p,
|
|
916
|
-
showErrorMessage:
|
|
916
|
+
showErrorMessage: m = !0
|
|
917
917
|
}) {
|
|
918
|
-
const x = F(null),
|
|
918
|
+
const x = F(null), y = F(null), M = F(!1), [P, C] = E(!1), [I, A] = E(!1), [$, L] = E(!1), H = e !== void 0, [ae, X] = E(t), K = H ? e : ae, [_, U] = E(K), j = p ? p(K) : null, z = !!j, q = !k && b === "plain", le = q && I, pe = le ? _ : K;
|
|
919
919
|
D(() => {
|
|
920
920
|
le || U(K);
|
|
921
921
|
}, [K, le]);
|
|
922
|
-
const ve = f === "password", de = ve && w && !c && !
|
|
923
|
-
let
|
|
924
|
-
we && de ?
|
|
925
|
-
const B = v ? d === "small" ? 28 : 34 : void 0,
|
|
922
|
+
const ve = f === "password", de = ve && w && !c && !k, we = u && pe && !c && (I || $), ye = d === "small" ? 32 : 44;
|
|
923
|
+
let T = 12;
|
|
924
|
+
we && de ? T = ye * 2 : (we || de) && (T = ye);
|
|
925
|
+
const B = v ? d === "small" ? 28 : 34 : void 0, Y = () => {
|
|
926
926
|
if (!q)
|
|
927
927
|
return K;
|
|
928
928
|
const J = _ !== K;
|
|
@@ -930,20 +930,20 @@ function rr({
|
|
|
930
930
|
}, V = () => {
|
|
931
931
|
U(K);
|
|
932
932
|
}, ft = () => {
|
|
933
|
-
var J, Z,
|
|
933
|
+
var J, Z, Ye;
|
|
934
934
|
if (q) {
|
|
935
935
|
U(""), i == null || i(), (J = x.current) == null || J.focus();
|
|
936
936
|
return;
|
|
937
937
|
}
|
|
938
|
-
H || X(""), n == null || n(""), i == null || i(),
|
|
938
|
+
H || X(""), n == null || n(""), i == null || i(), k ? (Z = y.current) == null || Z.focus() : (Ye = x.current) == null || Ye.focus();
|
|
939
939
|
}, He = (J) => {
|
|
940
940
|
if (q && J.key === "Escape") {
|
|
941
|
-
J.preventDefault(),
|
|
941
|
+
J.preventDefault(), M.current = !0, V(), J.currentTarget.blur();
|
|
942
942
|
return;
|
|
943
943
|
}
|
|
944
|
-
if (J.key === "Enter" && !
|
|
945
|
-
const Z = q ?
|
|
946
|
-
q && (J.preventDefault(),
|
|
944
|
+
if (J.key === "Enter" && !k) {
|
|
945
|
+
const Z = q ? Y() : K;
|
|
946
|
+
q && (J.preventDefault(), M.current = !0, J.currentTarget.blur()), o == null || o(Z);
|
|
947
947
|
}
|
|
948
948
|
}, Ve = (J) => {
|
|
949
949
|
const Z = J.target.value;
|
|
@@ -953,29 +953,29 @@ function rr({
|
|
|
953
953
|
}
|
|
954
954
|
H || X(Z), n == null || n(Z);
|
|
955
955
|
}, Oe = () => {
|
|
956
|
-
|
|
956
|
+
A(!0), q && U(K);
|
|
957
957
|
}, Fe = () => {
|
|
958
|
-
if (q &&
|
|
959
|
-
|
|
958
|
+
if (q && M.current) {
|
|
959
|
+
M.current = !1, A(!1);
|
|
960
960
|
return;
|
|
961
961
|
}
|
|
962
|
-
q &&
|
|
963
|
-
}, je = `nc-input ${d === "small" ? "nc-small " : ""}${!
|
|
962
|
+
q && Y(), A(!1);
|
|
963
|
+
}, je = `nc-input ${d === "small" ? "nc-small " : ""}${!k && b === "plain" ? "nc-plain " : ""}${z ? "nc-error " : ""}${g}`;
|
|
964
964
|
return /* @__PURE__ */ N(
|
|
965
965
|
"div",
|
|
966
966
|
{
|
|
967
967
|
className: "nc-col",
|
|
968
|
-
style: { position: "relative", flex: 1, ...
|
|
969
|
-
onMouseEnter: () =>
|
|
970
|
-
onMouseLeave: () =>
|
|
968
|
+
style: { position: "relative", flex: 1, ...S },
|
|
969
|
+
onMouseEnter: () => L(!0),
|
|
970
|
+
onMouseLeave: () => L(!1),
|
|
971
971
|
children: [
|
|
972
972
|
l && /* @__PURE__ */ s("span", { className: "nc-label", children: l }),
|
|
973
|
-
/* @__PURE__ */ N("div", { style: { position: "relative", display: "flex", alignItems:
|
|
974
|
-
v && /* @__PURE__ */ s("span", { className: "nc-input-leading-icon", style: { height:
|
|
975
|
-
|
|
973
|
+
/* @__PURE__ */ N("div", { style: { position: "relative", display: "flex", alignItems: k ? "flex-start" : "center" }, children: [
|
|
974
|
+
v && /* @__PURE__ */ s("span", { className: "nc-input-leading-icon", style: { height: k ? void 0 : "100%", top: k ? 10 : void 0 }, children: v }),
|
|
975
|
+
k ? /* @__PURE__ */ s(
|
|
976
976
|
"textarea",
|
|
977
977
|
{
|
|
978
|
-
ref:
|
|
978
|
+
ref: y,
|
|
979
979
|
className: je,
|
|
980
980
|
placeholder: a,
|
|
981
981
|
value: pe,
|
|
@@ -989,7 +989,7 @@ function rr({
|
|
|
989
989
|
rows: h,
|
|
990
990
|
style: {
|
|
991
991
|
width: "100%",
|
|
992
|
-
paddingRight:
|
|
992
|
+
paddingRight: T,
|
|
993
993
|
...B !== void 0 ? { paddingLeft: B } : {}
|
|
994
994
|
}
|
|
995
995
|
}
|
|
@@ -997,7 +997,7 @@ function rr({
|
|
|
997
997
|
"input",
|
|
998
998
|
{
|
|
999
999
|
ref: x,
|
|
1000
|
-
type: ve &&
|
|
1000
|
+
type: ve && P ? "text" : f,
|
|
1001
1001
|
className: je,
|
|
1002
1002
|
placeholder: a,
|
|
1003
1003
|
value: pe,
|
|
@@ -1010,20 +1010,20 @@ function rr({
|
|
|
1010
1010
|
tabIndex: c ? -1 : void 0,
|
|
1011
1011
|
style: {
|
|
1012
1012
|
width: "100%",
|
|
1013
|
-
paddingRight:
|
|
1013
|
+
paddingRight: T,
|
|
1014
1014
|
...B !== void 0 ? { paddingLeft: B } : {}
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
1017
|
),
|
|
1018
1018
|
we && /* @__PURE__ */ s(Wt, { onClick: ft, size: d, rightOffset: de ? ye + 4 : 4 }),
|
|
1019
|
-
de && /* @__PURE__ */ s(Ht, { visible:
|
|
1019
|
+
de && /* @__PURE__ */ s(Ht, { visible: P, onClick: () => C(!P), size: d })
|
|
1020
1020
|
] }),
|
|
1021
|
-
z &&
|
|
1021
|
+
z && m && /* @__PURE__ */ s("span", { className: "nc-error-message", children: j })
|
|
1022
1022
|
]
|
|
1023
1023
|
}
|
|
1024
1024
|
);
|
|
1025
1025
|
}
|
|
1026
|
-
function
|
|
1026
|
+
function ir({
|
|
1027
1027
|
children: e,
|
|
1028
1028
|
onClick: t,
|
|
1029
1029
|
showBorder: n = !0,
|
|
@@ -1058,7 +1058,7 @@ function or({
|
|
|
1058
1058
|
}
|
|
1059
1059
|
);
|
|
1060
1060
|
}
|
|
1061
|
-
function
|
|
1061
|
+
function cr({ title: e, titleTools: t, children: n, style: r }) {
|
|
1062
1062
|
return /* @__PURE__ */ N("div", { className: "nc-list-group", style: r, children: [
|
|
1063
1063
|
(e || t) && /* @__PURE__ */ N("div", { className: "nc-list-group-title", children: [
|
|
1064
1064
|
/* @__PURE__ */ s("div", { children: e }),
|
|
@@ -1073,32 +1073,32 @@ function sr({ title: e, titleTools: t, children: n, style: r }) {
|
|
|
1073
1073
|
)
|
|
1074
1074
|
] });
|
|
1075
1075
|
}
|
|
1076
|
-
function
|
|
1077
|
-
const [i, a] =
|
|
1076
|
+
function ar({ values: e, onChange: t, options: n, placeholder: r = "Select…", label: o }) {
|
|
1077
|
+
const [i, a] = E(!1), [c, l] = E(""), u = F(null), f = Ie(() => n.filter((d) => d.label.toLowerCase().includes(c.toLowerCase())), [n, c]);
|
|
1078
1078
|
D(() => {
|
|
1079
|
-
function d(
|
|
1080
|
-
!(
|
|
1079
|
+
function d(b) {
|
|
1080
|
+
!(b.target instanceof Node) || !u.current || u.current.contains(b.target) || a(!1);
|
|
1081
1081
|
}
|
|
1082
1082
|
return document.addEventListener("mousedown", d), () => document.removeEventListener("mousedown", d);
|
|
1083
1083
|
}, []);
|
|
1084
|
-
const
|
|
1085
|
-
e.includes(d) ? t(e.filter((
|
|
1084
|
+
const g = (d) => {
|
|
1085
|
+
e.includes(d) ? t(e.filter((b) => b !== d)) : t([...e, d]);
|
|
1086
1086
|
};
|
|
1087
1087
|
return /* @__PURE__ */ N("div", { ref: u, className: "nc-col", style: { position: "relative" }, children: [
|
|
1088
1088
|
o && /* @__PURE__ */ s("span", { className: "nc-label", children: o }),
|
|
1089
1089
|
/* @__PURE__ */ N("div", { className: "nc-row", style: { flexWrap: "wrap", gap: 6, minHeight: 42, alignItems: "center", border: "1px solid var(--nc-button-border)", borderRadius: 8, background: "var(--nc-button-bg)", padding: "4px 8px" }, children: [
|
|
1090
1090
|
e.length === 0 && /* @__PURE__ */ s("span", { className: "nc-label", children: r }),
|
|
1091
1091
|
e.map((d) => {
|
|
1092
|
-
const
|
|
1093
|
-
return
|
|
1094
|
-
|
|
1092
|
+
const b = n.find((S) => S.value === d);
|
|
1093
|
+
return b ? /* @__PURE__ */ N("span", { style: { padding: "4px 8px", borderRadius: 6, display: "inline-flex", alignItems: "center", gap: 4, background: "var(--nc-button-bg)", border: "1px solid var(--nc-button-border)" }, children: [
|
|
1094
|
+
b.label,
|
|
1095
1095
|
/* @__PURE__ */ s(
|
|
1096
1096
|
"button",
|
|
1097
1097
|
{
|
|
1098
1098
|
className: "nc-button nc-ghost",
|
|
1099
1099
|
style: { padding: 0, minHeight: 0, height: 20, width: 20, display: "inline-flex", alignItems: "center", justifyContent: "center", border: "none" },
|
|
1100
|
-
onClick: () =>
|
|
1101
|
-
"aria-label": `Remove ${
|
|
1100
|
+
onClick: () => g(d),
|
|
1101
|
+
"aria-label": `Remove ${b.label}`,
|
|
1102
1102
|
children: "✕"
|
|
1103
1103
|
}
|
|
1104
1104
|
)
|
|
@@ -1117,10 +1117,10 @@ function ir({ values: e, onChange: t, options: n, placeholder: r = "Select…",
|
|
|
1117
1117
|
] }),
|
|
1118
1118
|
i && /* @__PURE__ */ N("div", { className: "nc-combo-dropdown", style: { position: "absolute", top: "100%", left: 0, right: 0, zIndex: 10, marginTop: 4, boxShadow: "0 4px 12px var(--nc-shadow)" }, children: [
|
|
1119
1119
|
f.map((d) => {
|
|
1120
|
-
const
|
|
1121
|
-
return /* @__PURE__ */ N("div", { className: "nc-section nc-row", style: { justifyContent: "space-between", cursor: "pointer", padding: 12 }, onMouseDown: () =>
|
|
1120
|
+
const b = e.includes(d.value);
|
|
1121
|
+
return /* @__PURE__ */ N("div", { className: "nc-section nc-row", style: { justifyContent: "space-between", cursor: "pointer", padding: 12 }, onMouseDown: () => g(d.value), children: [
|
|
1122
1122
|
/* @__PURE__ */ s("span", { children: d.label }),
|
|
1123
|
-
/* @__PURE__ */ s("span", { children:
|
|
1123
|
+
/* @__PURE__ */ s("span", { children: b ? "✔️" : "" })
|
|
1124
1124
|
] }, d.value);
|
|
1125
1125
|
}),
|
|
1126
1126
|
f.length === 0 && /* @__PURE__ */ s("div", { className: "nc-section nc-label", children: "No results" })
|
|
@@ -1147,7 +1147,7 @@ function Ne(e) {
|
|
|
1147
1147
|
}
|
|
1148
1148
|
return `${n}-${r}`;
|
|
1149
1149
|
}
|
|
1150
|
-
function
|
|
1150
|
+
function Ge(e) {
|
|
1151
1151
|
if (!e) return "";
|
|
1152
1152
|
const t = Ne(e);
|
|
1153
1153
|
if (!/^\d{4}-\d{2}$/.test(t)) return e;
|
|
@@ -1158,7 +1158,7 @@ function Ke() {
|
|
|
1158
1158
|
const e = /* @__PURE__ */ new Date(), t = e.getFullYear(), n = String(e.getMonth() + 1).padStart(2, "0");
|
|
1159
1159
|
return `${t}-${n}`;
|
|
1160
1160
|
}
|
|
1161
|
-
function
|
|
1161
|
+
function lr({
|
|
1162
1162
|
startMonth: e,
|
|
1163
1163
|
endMonth: t,
|
|
1164
1164
|
onChange: n,
|
|
@@ -1167,41 +1167,41 @@ function cr({
|
|
|
1167
1167
|
disabled: i = !1,
|
|
1168
1168
|
size: a = "default"
|
|
1169
1169
|
}) {
|
|
1170
|
-
const [c, l] =
|
|
1170
|
+
const [c, l] = E(!1), [u, f] = E(""), [g, d] = E(""), [b, S] = E({ top: 0, left: 0, width: 0, right: void 0 }), v = F(null), w = F(null);
|
|
1171
1171
|
D(() => {
|
|
1172
1172
|
if (c && v.current) {
|
|
1173
|
-
const
|
|
1174
|
-
window.innerWidth -
|
|
1175
|
-
top:
|
|
1173
|
+
const A = v.current.getBoundingClientRect(), L = Math.max(A.width, 400);
|
|
1174
|
+
window.innerWidth - A.left < L && A.right >= L ? S({
|
|
1175
|
+
top: A.bottom + 4,
|
|
1176
1176
|
left: 0,
|
|
1177
1177
|
// Not used but type needs it, let's just use 0
|
|
1178
|
-
right: window.innerWidth -
|
|
1179
|
-
width:
|
|
1180
|
-
}) :
|
|
1181
|
-
top:
|
|
1182
|
-
left:
|
|
1178
|
+
right: window.innerWidth - A.right,
|
|
1179
|
+
width: L
|
|
1180
|
+
}) : S({
|
|
1181
|
+
top: A.bottom + 4,
|
|
1182
|
+
left: A.left,
|
|
1183
1183
|
right: void 0,
|
|
1184
|
-
width:
|
|
1184
|
+
width: L
|
|
1185
1185
|
});
|
|
1186
1186
|
}
|
|
1187
1187
|
}, [c]), D(() => {
|
|
1188
1188
|
if (!c) return;
|
|
1189
|
-
const
|
|
1189
|
+
const A = ($) => {
|
|
1190
1190
|
v.current && !v.current.contains($.target) && w.current && !w.current.contains($.target) && l(!1);
|
|
1191
1191
|
};
|
|
1192
|
-
return document.addEventListener("mousedown",
|
|
1192
|
+
return document.addEventListener("mousedown", A), () => document.removeEventListener("mousedown", A);
|
|
1193
1193
|
}, [c]);
|
|
1194
|
-
const
|
|
1194
|
+
const k = () => {
|
|
1195
1195
|
f(e || Ke()), d(t || Ke()), l(!0);
|
|
1196
1196
|
}, h = () => {
|
|
1197
1197
|
l(!1);
|
|
1198
1198
|
}, p = () => {
|
|
1199
|
-
const
|
|
1200
|
-
if (
|
|
1199
|
+
const A = Se(u), $ = Se(g);
|
|
1200
|
+
if (A || $)
|
|
1201
1201
|
return;
|
|
1202
|
-
const
|
|
1203
|
-
|
|
1204
|
-
},
|
|
1202
|
+
const L = Ne(u), H = Ne(g);
|
|
1203
|
+
L && H && (n == null || n(L, H)), l(!1);
|
|
1204
|
+
}, m = e && t ? `${Ge(e)} - ${Ge(t)}` : "Select month range", x = Se(u), y = Se(g), M = Ne(u), P = Ne(g), C = M && P && M > P, I = c ? Ae(
|
|
1205
1205
|
/* @__PURE__ */ s(
|
|
1206
1206
|
"div",
|
|
1207
1207
|
{
|
|
@@ -1209,9 +1209,9 @@ function cr({
|
|
|
1209
1209
|
className: "nc-month-range-picker-popup",
|
|
1210
1210
|
style: {
|
|
1211
1211
|
position: "fixed",
|
|
1212
|
-
top:
|
|
1213
|
-
...
|
|
1214
|
-
width:
|
|
1212
|
+
top: b.top,
|
|
1213
|
+
...b.right !== void 0 ? { right: b.right } : { left: b.left },
|
|
1214
|
+
width: b.width,
|
|
1215
1215
|
zIndex: 1e3
|
|
1216
1216
|
},
|
|
1217
1217
|
children: /* @__PURE__ */ N("div", { className: "nc-month-range-picker-content", children: [
|
|
@@ -1224,7 +1224,7 @@ function cr({
|
|
|
1224
1224
|
type: "text",
|
|
1225
1225
|
className: `nc-month-input ${x ? "nc-error" : ""}`,
|
|
1226
1226
|
value: u,
|
|
1227
|
-
onChange: (
|
|
1227
|
+
onChange: (A) => f(A.target.value),
|
|
1228
1228
|
placeholder: "YY-M(M) or YYYY-M(M)"
|
|
1229
1229
|
}
|
|
1230
1230
|
),
|
|
@@ -1236,23 +1236,23 @@ function cr({
|
|
|
1236
1236
|
"input",
|
|
1237
1237
|
{
|
|
1238
1238
|
type: "text",
|
|
1239
|
-
className: `nc-month-input ${
|
|
1240
|
-
value:
|
|
1241
|
-
onChange: (
|
|
1239
|
+
className: `nc-month-input ${y ? "nc-error" : ""}`,
|
|
1240
|
+
value: g,
|
|
1241
|
+
onChange: (A) => d(A.target.value),
|
|
1242
1242
|
placeholder: "YY-M(M) or YYYY-M(M)"
|
|
1243
1243
|
}
|
|
1244
1244
|
),
|
|
1245
|
-
|
|
1245
|
+
y && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: y })
|
|
1246
1246
|
] })
|
|
1247
1247
|
] }),
|
|
1248
|
-
|
|
1248
|
+
C && !x && !y && /* @__PURE__ */ s("div", { className: "nc-month-range-error", children: "End month must be after or equal to start month" }),
|
|
1249
1249
|
/* @__PURE__ */ N("div", { className: "nc-month-range-picker-footer", children: [
|
|
1250
1250
|
/* @__PURE__ */ s(
|
|
1251
1251
|
te,
|
|
1252
1252
|
{
|
|
1253
1253
|
variant: "primary",
|
|
1254
1254
|
onClick: p,
|
|
1255
|
-
disabled: !u || !
|
|
1255
|
+
disabled: !u || !g || !!x || !!y || !!C,
|
|
1256
1256
|
children: "Apply"
|
|
1257
1257
|
}
|
|
1258
1258
|
),
|
|
@@ -1270,63 +1270,107 @@ function cr({
|
|
|
1270
1270
|
{
|
|
1271
1271
|
ref: v,
|
|
1272
1272
|
className: `nc-month-range-picker-input${a === "small" ? " nc-small" : ""}`,
|
|
1273
|
-
onClick:
|
|
1273
|
+
onClick: k,
|
|
1274
1274
|
disabled: i,
|
|
1275
|
-
children:
|
|
1275
|
+
children: m
|
|
1276
1276
|
}
|
|
1277
1277
|
),
|
|
1278
|
-
|
|
1278
|
+
I
|
|
1279
1279
|
] });
|
|
1280
1280
|
}
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1281
|
+
const Vt = 5, Ot = 3;
|
|
1282
|
+
function dr({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disabled: a, className: c = "", style: l, size: u = "default" }) {
|
|
1283
|
+
const f = u === "small", g = F(null), d = F(!1), [b, S] = E(!1), v = () => {
|
|
1284
|
+
const y = e - o;
|
|
1285
|
+
n !== void 0 && y < n || t(parseFloat(y.toFixed(10)));
|
|
1286
|
+
}, w = () => {
|
|
1287
|
+
const y = e + o;
|
|
1288
|
+
r !== void 0 && y > r || t(parseFloat(y.toFixed(10)));
|
|
1289
|
+
}, k = (y) => {
|
|
1290
|
+
const M = parseFloat(y.target.value);
|
|
1291
|
+
isNaN(M) || n !== void 0 && M < n || r !== void 0 && M > r || t(M);
|
|
1292
|
+
}, h = (y) => {
|
|
1293
|
+
a || y.button !== 0 || (d.current = !1, g.current = {
|
|
1294
|
+
startY: y.clientY,
|
|
1295
|
+
startValue: e,
|
|
1296
|
+
pointerId: y.pointerId,
|
|
1297
|
+
hasMoved: !1,
|
|
1298
|
+
lastValue: e
|
|
1299
|
+
}, y.currentTarget.setPointerCapture(y.pointerId));
|
|
1300
|
+
}, p = (y) => {
|
|
1301
|
+
const M = g.current;
|
|
1302
|
+
if (!M || M.pointerId !== y.pointerId) return;
|
|
1303
|
+
const P = M.startY - y.clientY;
|
|
1304
|
+
if (Math.abs(P) >= Ot && (M.hasMoved = !0, d.current = !0, S(!0)), !M.hasMoved) return;
|
|
1305
|
+
const C = Math.trunc(P / Vt);
|
|
1306
|
+
let I = M.startValue + C * o;
|
|
1307
|
+
n !== void 0 && (I = Math.max(n, I)), r !== void 0 && (I = Math.min(r, I)), I = parseFloat(I.toFixed(10)), I !== M.lastValue && (M.lastValue = I, t(I));
|
|
1308
|
+
}, m = (y) => {
|
|
1309
|
+
const M = g.current;
|
|
1310
|
+
!M || M.pointerId !== y.pointerId || (y.currentTarget.hasPointerCapture(y.pointerId) && y.currentTarget.releasePointerCapture(y.pointerId), g.current = null, S(!1));
|
|
1311
|
+
}, x = (y) => (M) => {
|
|
1312
|
+
if (d.current) {
|
|
1313
|
+
d.current = !1, M.preventDefault();
|
|
1314
|
+
return;
|
|
1315
|
+
}
|
|
1316
|
+
y();
|
|
1288
1317
|
};
|
|
1289
|
-
return /* @__PURE__ */ N("div", { className: `nc-col nc-number-input-col ${
|
|
1290
|
-
i && /* @__PURE__ */ s("span", { className: `nc-label ${
|
|
1291
|
-
/* @__PURE__ */ N("div", { className: `nc-number-input-container ${
|
|
1318
|
+
return /* @__PURE__ */ N("div", { className: `nc-col nc-number-input-col ${f ? "nc-small" : ""}`, children: [
|
|
1319
|
+
i && /* @__PURE__ */ s("span", { className: `nc-label ${f ? "nc-small" : ""}`, children: i }),
|
|
1320
|
+
/* @__PURE__ */ N("div", { className: `nc-number-input-container ${f ? "nc-small" : ""} ${c}`, style: l, children: [
|
|
1292
1321
|
/* @__PURE__ */ s(
|
|
1293
1322
|
"input",
|
|
1294
1323
|
{
|
|
1295
|
-
className: `nc-input nc-number-input ${
|
|
1324
|
+
className: `nc-input nc-number-input ${f ? "nc-small" : ""}`,
|
|
1296
1325
|
type: "number",
|
|
1297
1326
|
value: e,
|
|
1298
|
-
onChange:
|
|
1299
|
-
const m = parseFloat(d.target.value);
|
|
1300
|
-
isNaN(m) || n !== void 0 && m < n || r !== void 0 && m > r || t(m);
|
|
1301
|
-
},
|
|
1327
|
+
onChange: k,
|
|
1302
1328
|
min: n,
|
|
1303
1329
|
max: r,
|
|
1304
1330
|
step: o,
|
|
1305
1331
|
disabled: a
|
|
1306
1332
|
}
|
|
1307
1333
|
),
|
|
1308
|
-
/* @__PURE__ */
|
|
1309
|
-
"
|
|
1310
|
-
{
|
|
1311
|
-
className: `nc-button nc-ghost nc-number-input-button ${l ? "nc-small" : ""}`,
|
|
1312
|
-
onClick: u,
|
|
1313
|
-
disabled: a || n !== void 0 && e <= n,
|
|
1314
|
-
children: "−"
|
|
1315
|
-
}
|
|
1316
|
-
),
|
|
1317
|
-
/* @__PURE__ */ s(
|
|
1318
|
-
"button",
|
|
1334
|
+
/* @__PURE__ */ N(
|
|
1335
|
+
"div",
|
|
1319
1336
|
{
|
|
1320
|
-
className: `nc-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1337
|
+
className: `nc-number-input-spinners ${f ? "nc-small" : ""} ${a ? "nc-disabled" : ""} ${b ? "nc-dragging" : ""}`,
|
|
1338
|
+
children: [
|
|
1339
|
+
/* @__PURE__ */ s(
|
|
1340
|
+
"button",
|
|
1341
|
+
{
|
|
1342
|
+
className: `nc-number-input-spin nc-number-input-spin-up ${f ? "nc-small" : ""}`,
|
|
1343
|
+
onClick: x(w),
|
|
1344
|
+
onPointerDown: h,
|
|
1345
|
+
onPointerMove: p,
|
|
1346
|
+
onPointerUp: m,
|
|
1347
|
+
onPointerCancel: m,
|
|
1348
|
+
disabled: a || r !== void 0 && e >= r,
|
|
1349
|
+
tabIndex: -1,
|
|
1350
|
+
children: "▲"
|
|
1351
|
+
}
|
|
1352
|
+
),
|
|
1353
|
+
/* @__PURE__ */ s(
|
|
1354
|
+
"button",
|
|
1355
|
+
{
|
|
1356
|
+
className: `nc-number-input-spin nc-number-input-spin-down ${f ? "nc-small" : ""}`,
|
|
1357
|
+
onClick: x(v),
|
|
1358
|
+
onPointerDown: h,
|
|
1359
|
+
onPointerMove: p,
|
|
1360
|
+
onPointerUp: m,
|
|
1361
|
+
onPointerCancel: m,
|
|
1362
|
+
disabled: a || n !== void 0 && e <= n,
|
|
1363
|
+
tabIndex: -1,
|
|
1364
|
+
children: "▼"
|
|
1365
|
+
}
|
|
1366
|
+
)
|
|
1367
|
+
]
|
|
1324
1368
|
}
|
|
1325
1369
|
)
|
|
1326
1370
|
] })
|
|
1327
1371
|
] });
|
|
1328
1372
|
}
|
|
1329
|
-
function
|
|
1373
|
+
function ur({
|
|
1330
1374
|
value: e,
|
|
1331
1375
|
onChange: t,
|
|
1332
1376
|
min: n = 0,
|
|
@@ -1339,9 +1383,9 @@ function lr({
|
|
|
1339
1383
|
width: u = 200
|
|
1340
1384
|
}) {
|
|
1341
1385
|
const f = (d) => {
|
|
1342
|
-
const
|
|
1343
|
-
t(
|
|
1344
|
-
},
|
|
1386
|
+
const b = parseFloat(d.target.value);
|
|
1387
|
+
t(b);
|
|
1388
|
+
}, g = (e - n) / (r - n) * 100;
|
|
1345
1389
|
return /* @__PURE__ */ N("div", { className: "nc-col", style: { gap: 6 }, children: [
|
|
1346
1390
|
i && /* @__PURE__ */ s("span", { className: "nc-label", children: i }),
|
|
1347
1391
|
/* @__PURE__ */ N("div", { style: { display: "flex", gap: 12, alignItems: "center" }, children: [
|
|
@@ -1358,7 +1402,7 @@ function lr({
|
|
|
1358
1402
|
disabled: a,
|
|
1359
1403
|
style: {
|
|
1360
1404
|
width: u,
|
|
1361
|
-
"--nc-slider-percentage": `${
|
|
1405
|
+
"--nc-slider-percentage": `${g}%`
|
|
1362
1406
|
}
|
|
1363
1407
|
}
|
|
1364
1408
|
),
|
|
@@ -1378,13 +1422,13 @@ function lr({
|
|
|
1378
1422
|
] })
|
|
1379
1423
|
] });
|
|
1380
1424
|
}
|
|
1381
|
-
const
|
|
1382
|
-
function
|
|
1425
|
+
const Ft = ({ size: e = 24, className: t, style: n }) => /* @__PURE__ */ s("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", className: t, style: n, children: /* @__PURE__ */ s("polyline", { points: "18 15 12 9 6 15" }) });
|
|
1426
|
+
function jt({ children: e, className: t = "", style: n }) {
|
|
1383
1427
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panel ${t}`, style: n, children: e });
|
|
1384
1428
|
}
|
|
1385
|
-
function
|
|
1429
|
+
function pr({ active: e, children: t, keepMounted: n = !1, className: r = "", style: o }) {
|
|
1386
1430
|
const i = At.toArray(t).filter(
|
|
1387
|
-
(c) => St(c) && (c.type ===
|
|
1431
|
+
(c) => St(c) && (c.type === jt || c.type.displayName === "TabPanel")
|
|
1388
1432
|
);
|
|
1389
1433
|
if (n)
|
|
1390
1434
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: i.map((c) => {
|
|
@@ -1403,87 +1447,87 @@ function dr({ active: e, children: t, keepMounted: n = !1, className: r = "", st
|
|
|
1403
1447
|
const a = i.find((c) => c.props.tab === e);
|
|
1404
1448
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: a });
|
|
1405
1449
|
}
|
|
1406
|
-
function
|
|
1407
|
-
const f = F(null), [
|
|
1450
|
+
function fr({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, className: i, toolbar: a, multiline: c, orientation: l = "horizontal", style: u }) {
|
|
1451
|
+
const f = F(null), [g, d] = E(!1), [b, S] = E(!1), v = l === "verticalLeft" || l === "verticalRight", w = F(!1), k = F(0), h = F(0), p = F(!1);
|
|
1408
1452
|
D(() => {
|
|
1409
|
-
const
|
|
1453
|
+
const C = () => {
|
|
1410
1454
|
if (f.current)
|
|
1411
1455
|
if (v) {
|
|
1412
|
-
const { scrollTop:
|
|
1413
|
-
d(
|
|
1456
|
+
const { scrollTop: A, scrollHeight: $, clientHeight: L } = f.current;
|
|
1457
|
+
d(A > 1), S(A < $ - L - 1);
|
|
1414
1458
|
} else {
|
|
1415
|
-
const { scrollLeft:
|
|
1416
|
-
d(
|
|
1459
|
+
const { scrollLeft: A, scrollWidth: $, clientWidth: L } = f.current;
|
|
1460
|
+
d(A > 1), S(A < $ - L - 1);
|
|
1417
1461
|
}
|
|
1418
|
-
},
|
|
1419
|
-
if (
|
|
1420
|
-
return
|
|
1421
|
-
|
|
1462
|
+
}, I = f.current;
|
|
1463
|
+
if (I)
|
|
1464
|
+
return C(), I.addEventListener("scroll", C), window.addEventListener("resize", C), () => {
|
|
1465
|
+
I.removeEventListener("scroll", C), window.removeEventListener("resize", C);
|
|
1422
1466
|
};
|
|
1423
1467
|
}, [e, v]);
|
|
1424
|
-
const
|
|
1425
|
-
f.current && (w.current = !0, p.current = !1,
|
|
1426
|
-
}, x = (
|
|
1468
|
+
const m = (C) => {
|
|
1469
|
+
f.current && (w.current = !0, p.current = !1, k.current = v ? C.clientY : C.clientX, h.current = v ? f.current.scrollTop : f.current.scrollLeft, f.current.style.cursor = "grabbing", f.current.style.userSelect = "none");
|
|
1470
|
+
}, x = (C) => {
|
|
1427
1471
|
if (!w.current || !f.current) return;
|
|
1428
|
-
const
|
|
1429
|
-
Math.abs(
|
|
1430
|
-
},
|
|
1472
|
+
const I = v ? C.clientY : C.clientX, A = k.current - I;
|
|
1473
|
+
Math.abs(A) > 3 && (p.current = !0), v ? f.current.scrollTop = h.current + A : f.current.scrollLeft = h.current + A;
|
|
1474
|
+
}, y = () => {
|
|
1431
1475
|
f.current && (w.current = !1, f.current.style.cursor = "", f.current.style.userSelect = "");
|
|
1432
|
-
},
|
|
1433
|
-
|
|
1476
|
+
}, M = () => {
|
|
1477
|
+
y();
|
|
1434
1478
|
};
|
|
1435
1479
|
D(() => {
|
|
1436
|
-
const
|
|
1437
|
-
if (!
|
|
1438
|
-
const
|
|
1439
|
-
|
|
1480
|
+
const C = f.current;
|
|
1481
|
+
if (!C || v) return;
|
|
1482
|
+
const I = (A) => {
|
|
1483
|
+
A.deltaY !== 0 && (A.preventDefault(), C.scrollLeft += A.deltaY * 0.3);
|
|
1440
1484
|
};
|
|
1441
|
-
return
|
|
1442
|
-
|
|
1485
|
+
return C.addEventListener("wheel", I, { passive: !1 }), () => {
|
|
1486
|
+
C.removeEventListener("wheel", I);
|
|
1443
1487
|
};
|
|
1444
1488
|
}, [v]);
|
|
1445
|
-
const
|
|
1446
|
-
p.current || n(
|
|
1489
|
+
const P = (C) => {
|
|
1490
|
+
p.current || n(C);
|
|
1447
1491
|
};
|
|
1448
1492
|
return /* @__PURE__ */ N("div", { className: `nc-tab-container ${v ? `nc-vertical nc-${l}` : ""} ${i || ""}`, style: u, children: [
|
|
1449
1493
|
/* @__PURE__ */ N("div", { className: "nc-tab-scroll-wrapper", children: [
|
|
1450
|
-
|
|
1494
|
+
g && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${v ? "nc-top" : "nc-left"}`, children: v ? /* @__PURE__ */ s(Ft, { size: 16 }) : /* @__PURE__ */ s(xt, { size: 16 }) }),
|
|
1451
1495
|
/* @__PURE__ */ s(
|
|
1452
1496
|
"div",
|
|
1453
1497
|
{
|
|
1454
1498
|
ref: f,
|
|
1455
1499
|
className: `nc-tab-scroll ${c ? "nc-multiline" : ""}`,
|
|
1456
|
-
onMouseDown:
|
|
1500
|
+
onMouseDown: m,
|
|
1457
1501
|
onMouseMove: x,
|
|
1458
|
-
onMouseUp:
|
|
1459
|
-
onMouseLeave:
|
|
1502
|
+
onMouseUp: y,
|
|
1503
|
+
onMouseLeave: M,
|
|
1460
1504
|
style: { cursor: "grab" },
|
|
1461
|
-
children: e.map((
|
|
1462
|
-
const
|
|
1505
|
+
children: e.map((C) => {
|
|
1506
|
+
const I = typeof C == "string" ? C : C.id, A = typeof C == "string" ? C : C.label, $ = r && !(o != null && o.includes(I));
|
|
1463
1507
|
return /* @__PURE__ */ N(
|
|
1464
1508
|
"div",
|
|
1465
1509
|
{
|
|
1466
|
-
className: `nc-tab-item ${t ===
|
|
1467
|
-
onClick: () =>
|
|
1510
|
+
className: `nc-tab-item ${t === I ? "nc-active" : ""} ${$ ? "nc-closable" : ""}`,
|
|
1511
|
+
onClick: () => P(I),
|
|
1468
1512
|
role: "button",
|
|
1469
1513
|
tabIndex: 0,
|
|
1470
|
-
onKeyDown: (
|
|
1471
|
-
(
|
|
1514
|
+
onKeyDown: (L) => {
|
|
1515
|
+
(L.key === "Enter" || L.key === " ") && n(I);
|
|
1472
1516
|
},
|
|
1473
1517
|
children: [
|
|
1474
|
-
/* @__PURE__ */ s("span", { className: "nc-tab-label", children: v ?
|
|
1518
|
+
/* @__PURE__ */ s("span", { className: "nc-tab-label", children: v ? A : typeof A == "string" ? A.toUpperCase() : A }),
|
|
1475
1519
|
$ && /* @__PURE__ */ s(
|
|
1476
1520
|
"span",
|
|
1477
1521
|
{
|
|
1478
1522
|
className: "nc-tab-close",
|
|
1479
1523
|
role: "button",
|
|
1480
1524
|
tabIndex: 0,
|
|
1481
|
-
"aria-label": `Close ${typeof
|
|
1482
|
-
onClick: (
|
|
1483
|
-
|
|
1525
|
+
"aria-label": `Close ${typeof A == "string" ? A : I}`,
|
|
1526
|
+
onClick: (L) => {
|
|
1527
|
+
L.stopPropagation(), r(I);
|
|
1484
1528
|
},
|
|
1485
|
-
onKeyDown: (
|
|
1486
|
-
(
|
|
1529
|
+
onKeyDown: (L) => {
|
|
1530
|
+
(L.key === "Enter" || L.key === " ") && (L.stopPropagation(), r(I));
|
|
1487
1531
|
},
|
|
1488
1532
|
children: /* @__PURE__ */ N("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1489
1533
|
/* @__PURE__ */ s("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
@@ -1493,17 +1537,17 @@ function ur({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, cla
|
|
|
1493
1537
|
)
|
|
1494
1538
|
]
|
|
1495
1539
|
},
|
|
1496
|
-
|
|
1540
|
+
I
|
|
1497
1541
|
);
|
|
1498
1542
|
})
|
|
1499
1543
|
}
|
|
1500
1544
|
),
|
|
1501
|
-
|
|
1545
|
+
b && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${v ? "nc-bottom" : "nc-right"}`, children: v ? /* @__PURE__ */ s(kt, { size: 16 }) : /* @__PURE__ */ s(Nt, { size: 16 }) })
|
|
1502
1546
|
] }),
|
|
1503
1547
|
a && /* @__PURE__ */ s("div", { className: "nc-tab-toolbar", children: a })
|
|
1504
1548
|
] });
|
|
1505
1549
|
}
|
|
1506
|
-
function
|
|
1550
|
+
function hr({ checked: e, onChange: t, disabled: n, label: r }) {
|
|
1507
1551
|
return /* @__PURE__ */ N(
|
|
1508
1552
|
"label",
|
|
1509
1553
|
{
|
|
@@ -1567,24 +1611,24 @@ const _e = [
|
|
|
1567
1611
|
"var(--nc-csv-col-8)",
|
|
1568
1612
|
"var(--nc-csv-col-9)"
|
|
1569
1613
|
];
|
|
1570
|
-
function
|
|
1614
|
+
function Yt(e, t) {
|
|
1571
1615
|
const r = e.slice(0, t).split(`
|
|
1572
1616
|
`), o = r.length, a = r[o - 1].split(" "), c = a.length, l = a[c - 1].length + 1;
|
|
1573
1617
|
return { line: o, column: c, character: l, offset: t };
|
|
1574
1618
|
}
|
|
1575
|
-
function
|
|
1619
|
+
function Gt(e, t, n, r) {
|
|
1576
1620
|
const o = e.split(`
|
|
1577
1621
|
`), i = Math.max(1, Math.min(t, o.length));
|
|
1578
1622
|
let a = 0;
|
|
1579
|
-
for (let
|
|
1580
|
-
a += o[
|
|
1623
|
+
for (let g = 0; g < i - 1; g++)
|
|
1624
|
+
a += o[g].length + 1;
|
|
1581
1625
|
const l = o[i - 1].split(" "), u = Math.max(1, Math.min(n, l.length));
|
|
1582
|
-
for (let
|
|
1583
|
-
a += l[
|
|
1626
|
+
for (let g = 0; g < u - 1; g++)
|
|
1627
|
+
a += l[g].length + 1;
|
|
1584
1628
|
const f = Math.max(1, Math.min(r, l[u - 1].length + 1));
|
|
1585
1629
|
return a += f - 1, a;
|
|
1586
1630
|
}
|
|
1587
|
-
function
|
|
1631
|
+
function Kt(e, t) {
|
|
1588
1632
|
const n = e.split(`
|
|
1589
1633
|
`), r = Math.max(1, Math.min(t, n.length));
|
|
1590
1634
|
let o = 0;
|
|
@@ -1592,43 +1636,43 @@ function Gt(e, t) {
|
|
|
1592
1636
|
o += n[i].length + 1;
|
|
1593
1637
|
return o;
|
|
1594
1638
|
}
|
|
1595
|
-
const
|
|
1639
|
+
const mr = Ct(
|
|
1596
1640
|
function({ value: t, onChange: n, placeholder: r, className: o, style: i, showLineNumbers: a = !1, onCursorChange: c, highlightLine: l }, u) {
|
|
1597
|
-
const f = F(null),
|
|
1598
|
-
|
|
1641
|
+
const f = F(null), g = F(null), d = F(null);
|
|
1642
|
+
Mt(u, () => ({
|
|
1599
1643
|
goToLine(h) {
|
|
1600
1644
|
const p = f.current;
|
|
1601
1645
|
if (!p) return;
|
|
1602
|
-
const
|
|
1603
|
-
p.focus(), p.setSelectionRange(
|
|
1646
|
+
const m = Kt(t, h);
|
|
1647
|
+
p.focus(), p.setSelectionRange(m, m);
|
|
1604
1648
|
const x = parseFloat(getComputedStyle(p).lineHeight) || 18;
|
|
1605
|
-
p.scrollTop = (Math.max(1, h) - 1) * x,
|
|
1649
|
+
p.scrollTop = (Math.max(1, h) - 1) * x, S(), b();
|
|
1606
1650
|
},
|
|
1607
|
-
goToPosition(h, p,
|
|
1651
|
+
goToPosition(h, p, m) {
|
|
1608
1652
|
const x = f.current;
|
|
1609
1653
|
if (!x) return;
|
|
1610
|
-
const
|
|
1611
|
-
x.focus(), x.setSelectionRange(
|
|
1612
|
-
const
|
|
1613
|
-
x.scrollTop = (Math.max(1, h) - 1) *
|
|
1654
|
+
const y = Gt(t, h, p, m);
|
|
1655
|
+
x.focus(), x.setSelectionRange(y, y);
|
|
1656
|
+
const M = parseFloat(getComputedStyle(x).lineHeight) || 18;
|
|
1657
|
+
x.scrollTop = (Math.max(1, h) - 1) * M, S(), b();
|
|
1614
1658
|
}
|
|
1615
1659
|
}), [t]);
|
|
1616
|
-
const
|
|
1660
|
+
const b = G(() => {
|
|
1617
1661
|
if (!c || !f.current) return;
|
|
1618
|
-
const h =
|
|
1662
|
+
const h = Yt(t, f.current.selectionStart);
|
|
1619
1663
|
c(h);
|
|
1620
|
-
}, [c, t]),
|
|
1664
|
+
}, [c, t]), S = G(() => {
|
|
1621
1665
|
const h = f.current;
|
|
1622
|
-
h && (
|
|
1666
|
+
h && (g.current && (g.current.scrollTop = h.scrollTop, g.current.scrollLeft = h.scrollLeft), d.current && (d.current.scrollTop = h.scrollTop));
|
|
1623
1667
|
}, []);
|
|
1624
1668
|
D(() => {
|
|
1625
1669
|
if (l == null || l < 1) return;
|
|
1626
1670
|
const h = f.current;
|
|
1627
1671
|
if (!h) return;
|
|
1628
|
-
const p = parseFloat(getComputedStyle(h).lineHeight) || 18,
|
|
1629
|
-
(
|
|
1672
|
+
const p = parseFloat(getComputedStyle(h).lineHeight) || 18, m = (l - 1) * p, x = m + p;
|
|
1673
|
+
(m < h.scrollTop || x > h.scrollTop + h.clientHeight) && (h.scrollTop = m - h.clientHeight / 2 + p / 2), S();
|
|
1630
1674
|
}, [l]);
|
|
1631
|
-
const v =
|
|
1675
|
+
const v = Ie(() => t.split(`
|
|
1632
1676
|
`).length, [t]), w = () => {
|
|
1633
1677
|
const h = [];
|
|
1634
1678
|
for (let p = 1; p <= v; p++)
|
|
@@ -1636,22 +1680,22 @@ const fr = Ct(
|
|
|
1636
1680
|
/* @__PURE__ */ s("div", { className: `nc-csv-line-number ${l === p ? "nc-csv-highlight" : ""}`, children: p }, p)
|
|
1637
1681
|
);
|
|
1638
1682
|
return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref: d, children: h });
|
|
1639
|
-
},
|
|
1640
|
-
`).map((
|
|
1641
|
-
const
|
|
1683
|
+
}, k = (h) => h ? h.split(`
|
|
1684
|
+
`).map((m, x) => {
|
|
1685
|
+
const y = m.split(" ");
|
|
1642
1686
|
return /* @__PURE__ */ N("div", { className: `nc-csv-line ${l === x + 1 ? "nc-csv-highlight" : ""}`, children: [
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
/* @__PURE__ */ s("span", { style: { color: _e[
|
|
1646
|
-
] },
|
|
1647
|
-
|
|
1687
|
+
y.map((M, P) => /* @__PURE__ */ N("span", { children: [
|
|
1688
|
+
P > 0 && /* @__PURE__ */ s("span", { className: "nc-csv-tab-char", children: " " }),
|
|
1689
|
+
/* @__PURE__ */ s("span", { style: { color: _e[P % _e.length] }, children: M })
|
|
1690
|
+
] }, P)),
|
|
1691
|
+
m === "" && `
|
|
1648
1692
|
`
|
|
1649
1693
|
] }, x);
|
|
1650
1694
|
}) : null;
|
|
1651
1695
|
return /* @__PURE__ */ N("div", { className: `nc-csv-textarea-container ${a ? "nc-csv-with-gutter" : ""} ${o ?? ""}`, style: i, children: [
|
|
1652
1696
|
a && w(),
|
|
1653
1697
|
/* @__PURE__ */ N("div", { className: "nc-csv-textarea-editor", children: [
|
|
1654
|
-
/* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref:
|
|
1698
|
+
/* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref: g, children: /* @__PURE__ */ s("pre", { className: "nc-csv-textarea-highlights", children: k(t) }) }),
|
|
1655
1699
|
/* @__PURE__ */ s(
|
|
1656
1700
|
"textarea",
|
|
1657
1701
|
{
|
|
@@ -1659,12 +1703,12 @@ const fr = Ct(
|
|
|
1659
1703
|
className: "nc-csv-textarea-input",
|
|
1660
1704
|
value: t,
|
|
1661
1705
|
onChange: (h) => {
|
|
1662
|
-
n(h.target.value), requestAnimationFrame(
|
|
1706
|
+
n(h.target.value), requestAnimationFrame(b);
|
|
1663
1707
|
},
|
|
1664
|
-
onScroll:
|
|
1665
|
-
onSelect:
|
|
1666
|
-
onKeyUp:
|
|
1667
|
-
onClick:
|
|
1708
|
+
onScroll: S,
|
|
1709
|
+
onSelect: b,
|
|
1710
|
+
onKeyUp: b,
|
|
1711
|
+
onClick: b,
|
|
1668
1712
|
placeholder: r,
|
|
1669
1713
|
spellCheck: !1,
|
|
1670
1714
|
autoComplete: "off",
|
|
@@ -1685,7 +1729,7 @@ function Te() {
|
|
|
1685
1729
|
} catch {
|
|
1686
1730
|
}
|
|
1687
1731
|
}
|
|
1688
|
-
function
|
|
1732
|
+
function _t(e) {
|
|
1689
1733
|
Re.add(e);
|
|
1690
1734
|
try {
|
|
1691
1735
|
e(ue.notifications.slice());
|
|
@@ -1695,7 +1739,7 @@ function Yt(e) {
|
|
|
1695
1739
|
Re.delete(e);
|
|
1696
1740
|
};
|
|
1697
1741
|
}
|
|
1698
|
-
function
|
|
1742
|
+
function Ut(e) {
|
|
1699
1743
|
const t = `notification-${Date.now()}-${Math.random()}`, { duration: n, type: r, ...o } = e, i = {
|
|
1700
1744
|
id: t,
|
|
1701
1745
|
dismissible: !0,
|
|
@@ -1716,7 +1760,7 @@ function tt(e) {
|
|
|
1716
1760
|
}, 300);
|
|
1717
1761
|
Ue.set(e, n);
|
|
1718
1762
|
}
|
|
1719
|
-
function
|
|
1763
|
+
function qt({ type: e }) {
|
|
1720
1764
|
switch (e) {
|
|
1721
1765
|
case "success":
|
|
1722
1766
|
return /* @__PURE__ */ s("svg", { viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ s(
|
|
@@ -1757,7 +1801,7 @@ function _t({ type: e }) {
|
|
|
1757
1801
|
] });
|
|
1758
1802
|
}
|
|
1759
1803
|
}
|
|
1760
|
-
function
|
|
1804
|
+
function Xt({ notification: e }) {
|
|
1761
1805
|
const { t } = re(), n = e.type || "info", r = () => {
|
|
1762
1806
|
if (e.title) return e.title;
|
|
1763
1807
|
switch (n) {
|
|
@@ -1778,7 +1822,7 @@ function Ut({ notification: e }) {
|
|
|
1778
1822
|
{
|
|
1779
1823
|
className: `nc-notification nc-notification-${n}`,
|
|
1780
1824
|
children: /* @__PURE__ */ N("div", { className: "nc-notification-content", children: [
|
|
1781
|
-
/* @__PURE__ */ s("div", { className: `nc-notification-icon nc-notification-icon-${n}`, children: /* @__PURE__ */ s(
|
|
1825
|
+
/* @__PURE__ */ s("div", { className: `nc-notification-icon nc-notification-icon-${n}`, children: /* @__PURE__ */ s(qt, { type: n }) }),
|
|
1782
1826
|
/* @__PURE__ */ N("div", { className: "nc-notification-body", children: [
|
|
1783
1827
|
/* @__PURE__ */ s("div", { className: "nc-notification-title", children: r() }),
|
|
1784
1828
|
/* @__PURE__ */ s("div", { className: "nc-notification-message", children: e.message })
|
|
@@ -1789,18 +1833,18 @@ function Ut({ notification: e }) {
|
|
|
1789
1833
|
className: "nc-notification-dismiss",
|
|
1790
1834
|
onClick: o,
|
|
1791
1835
|
"aria-label": t("common.close"),
|
|
1792
|
-
children: /* @__PURE__ */ s(
|
|
1836
|
+
children: /* @__PURE__ */ s(Le, { size: 16 })
|
|
1793
1837
|
}
|
|
1794
1838
|
)
|
|
1795
1839
|
] })
|
|
1796
1840
|
}
|
|
1797
1841
|
);
|
|
1798
1842
|
}
|
|
1799
|
-
function
|
|
1800
|
-
const [e, t] =
|
|
1801
|
-
return D(() =>
|
|
1802
|
-
const f = new Set(c.current.map((d) => d.id)),
|
|
1803
|
-
|
|
1843
|
+
function gr() {
|
|
1844
|
+
const [e, t] = E([]), [n, r] = E(/* @__PURE__ */ new Map()), [o, i] = E(/* @__PURE__ */ new Set()), a = F(null), c = F([]);
|
|
1845
|
+
return D(() => _t((u) => {
|
|
1846
|
+
const f = new Set(c.current.map((d) => d.id)), g = u.filter((d) => !f.has(d.id)).map((d) => d.id);
|
|
1847
|
+
g.length > 0 ? (t(u), i(new Set(g)), requestAnimationFrame(() => {
|
|
1804
1848
|
requestAnimationFrame(() => {
|
|
1805
1849
|
i(/* @__PURE__ */ new Set());
|
|
1806
1850
|
});
|
|
@@ -1810,10 +1854,10 @@ function hr() {
|
|
|
1810
1854
|
const l = /* @__PURE__ */ new Map();
|
|
1811
1855
|
let u = 0;
|
|
1812
1856
|
const f = a.current.children;
|
|
1813
|
-
e.forEach((
|
|
1814
|
-
if (l.set(
|
|
1815
|
-
const
|
|
1816
|
-
|
|
1857
|
+
e.forEach((g, d) => {
|
|
1858
|
+
if (l.set(g.id, u), f[d]) {
|
|
1859
|
+
const b = f[d].offsetHeight;
|
|
1860
|
+
g.isRemoving || (u += b + 12);
|
|
1817
1861
|
}
|
|
1818
1862
|
}), r(l);
|
|
1819
1863
|
}, [e]), /* @__PURE__ */ s(
|
|
@@ -1837,7 +1881,7 @@ function hr() {
|
|
|
1837
1881
|
width: "100%"
|
|
1838
1882
|
},
|
|
1839
1883
|
children: e.map((l) => {
|
|
1840
|
-
const u = o.has(l.id), f = l.isRemoving,
|
|
1884
|
+
const u = o.has(l.id), f = l.isRemoving, g = n.get(l.id) || 0;
|
|
1841
1885
|
return /* @__PURE__ */ s(
|
|
1842
1886
|
"div",
|
|
1843
1887
|
{
|
|
@@ -1845,13 +1889,13 @@ function hr() {
|
|
|
1845
1889
|
position: "absolute",
|
|
1846
1890
|
top: 0,
|
|
1847
1891
|
left: 0,
|
|
1848
|
-
transform: u ? `translate3d(-40px, ${
|
|
1892
|
+
transform: u ? `translate3d(-40px, ${g}px, 0)` : `translate3d(0, ${g}px, 0)`,
|
|
1849
1893
|
// Only animate transform when not leaving, animate opacity always
|
|
1850
1894
|
transition: f ? "opacity 300ms ease-out" : "transform 300ms ease-out, opacity 300ms ease-out",
|
|
1851
1895
|
opacity: f ? 0 : 1,
|
|
1852
1896
|
width: "100%"
|
|
1853
1897
|
},
|
|
1854
|
-
children: /* @__PURE__ */ s(
|
|
1898
|
+
children: /* @__PURE__ */ s(Xt, { notification: l })
|
|
1855
1899
|
},
|
|
1856
1900
|
l.id
|
|
1857
1901
|
);
|
|
@@ -1861,14 +1905,14 @@ function hr() {
|
|
|
1861
1905
|
}
|
|
1862
1906
|
);
|
|
1863
1907
|
}
|
|
1864
|
-
function
|
|
1865
|
-
return
|
|
1908
|
+
function Jt(e) {
|
|
1909
|
+
return Ut(e);
|
|
1866
1910
|
}
|
|
1867
|
-
const
|
|
1868
|
-
show: (e) =>
|
|
1911
|
+
const br = {
|
|
1912
|
+
show: (e) => Jt(e)
|
|
1869
1913
|
};
|
|
1870
|
-
function
|
|
1871
|
-
const t =
|
|
1914
|
+
function vr(e) {
|
|
1915
|
+
const t = $t.createInstance(), n = {};
|
|
1872
1916
|
for (const o in e)
|
|
1873
1917
|
n[o] = { translation: e[o] };
|
|
1874
1918
|
const r = typeof document < "u" && document.documentElement.lang || "en";
|
|
@@ -1888,7 +1932,7 @@ function gr(e) {
|
|
|
1888
1932
|
}
|
|
1889
1933
|
}).observe(document.documentElement, { attributes: !0 }), t;
|
|
1890
1934
|
}
|
|
1891
|
-
class
|
|
1935
|
+
class Qt {
|
|
1892
1936
|
constructor() {
|
|
1893
1937
|
oe(this, "apps", /* @__PURE__ */ new Map());
|
|
1894
1938
|
}
|
|
@@ -1928,8 +1972,8 @@ class Xt {
|
|
|
1928
1972
|
return this.apps.has(t);
|
|
1929
1973
|
}
|
|
1930
1974
|
}
|
|
1931
|
-
const me = new
|
|
1932
|
-
class
|
|
1975
|
+
const me = new Qt(), qe = "nc-ui-app-state";
|
|
1976
|
+
class Zt {
|
|
1933
1977
|
constructor() {
|
|
1934
1978
|
oe(this, "state");
|
|
1935
1979
|
oe(this, "listeners", /* @__PURE__ */ new Map());
|
|
@@ -1976,8 +2020,8 @@ class Jt {
|
|
|
1976
2020
|
(r = this.listeners.get(t)) == null || r.forEach((o) => o(n));
|
|
1977
2021
|
}
|
|
1978
2022
|
}
|
|
1979
|
-
const ne = new
|
|
1980
|
-
class
|
|
2023
|
+
const ne = new Zt();
|
|
2024
|
+
class en {
|
|
1981
2025
|
constructor() {
|
|
1982
2026
|
oe(this, "apps", []);
|
|
1983
2027
|
oe(this, "activeAppId", null);
|
|
@@ -2096,14 +2140,14 @@ class Qt {
|
|
|
2096
2140
|
this.listeners.forEach((t) => t());
|
|
2097
2141
|
}
|
|
2098
2142
|
}
|
|
2099
|
-
const Q = new
|
|
2100
|
-
function
|
|
2143
|
+
const Q = new en(), nt = ge(null);
|
|
2144
|
+
function tn() {
|
|
2101
2145
|
const e = ce(nt);
|
|
2102
2146
|
if (!e)
|
|
2103
2147
|
throw new Error("useApp must be used inside an App");
|
|
2104
2148
|
return e;
|
|
2105
2149
|
}
|
|
2106
|
-
function
|
|
2150
|
+
function nn({ size: e = 16 }) {
|
|
2107
2151
|
return /* @__PURE__ */ N(
|
|
2108
2152
|
"svg",
|
|
2109
2153
|
{
|
|
@@ -2122,7 +2166,7 @@ function en({ size: e = 16 }) {
|
|
|
2122
2166
|
}
|
|
2123
2167
|
);
|
|
2124
2168
|
}
|
|
2125
|
-
function
|
|
2169
|
+
function rn({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o }) {
|
|
2126
2170
|
return /* @__PURE__ */ N("div", { className: "nc-app-title-bar", children: [
|
|
2127
2171
|
/* @__PURE__ */ N("div", { className: "nc-app-title-bar-left", children: [
|
|
2128
2172
|
n && !o && /* @__PURE__ */ s(
|
|
@@ -2132,7 +2176,7 @@ function tn({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o })
|
|
|
2132
2176
|
onClick: n,
|
|
2133
2177
|
title: "Back",
|
|
2134
2178
|
"aria-label": "Go back",
|
|
2135
|
-
children: /* @__PURE__ */ s(
|
|
2179
|
+
children: /* @__PURE__ */ s(nn, { size: 16 })
|
|
2136
2180
|
}
|
|
2137
2181
|
),
|
|
2138
2182
|
/* @__PURE__ */ s("span", { className: "nc-app-title-bar-title", children: e })
|
|
@@ -2143,7 +2187,7 @@ function tn({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o })
|
|
|
2143
2187
|
] })
|
|
2144
2188
|
] });
|
|
2145
2189
|
}
|
|
2146
|
-
class
|
|
2190
|
+
class on extends ze.Component {
|
|
2147
2191
|
constructor(t) {
|
|
2148
2192
|
super(t), this.state = { hasError: !1 };
|
|
2149
2193
|
}
|
|
@@ -2161,50 +2205,50 @@ class nn extends ze.Component {
|
|
|
2161
2205
|
}
|
|
2162
2206
|
}
|
|
2163
2207
|
function rt({ appId: e, isActive: t, onClose: n }) {
|
|
2164
|
-
const { t: r } = re(), o = me.get(e), [i, a] =
|
|
2208
|
+
const { t: r } = re(), o = me.get(e), [i, a] = E(""), [c, l] = E(null), [u, f] = E(null), [g, d] = E(!1), [b, S] = E(!1);
|
|
2165
2209
|
ze.useEffect(() => {
|
|
2166
2210
|
o != null && o.titleKey && a(r(o.titleKey));
|
|
2167
2211
|
}, [o, r]);
|
|
2168
|
-
const v =
|
|
2169
|
-
a(
|
|
2170
|
-
}, []), w =
|
|
2171
|
-
l(() =>
|
|
2172
|
-
}, []),
|
|
2212
|
+
const v = G((C) => {
|
|
2213
|
+
a(C);
|
|
2214
|
+
}, []), w = G((C) => {
|
|
2215
|
+
l(() => C);
|
|
2216
|
+
}, []), k = G(() => {
|
|
2173
2217
|
l(null);
|
|
2174
|
-
}, []), h =
|
|
2175
|
-
f(
|
|
2176
|
-
}, []), p =
|
|
2218
|
+
}, []), h = G((C) => {
|
|
2219
|
+
f(C);
|
|
2220
|
+
}, []), p = G(() => {
|
|
2177
2221
|
f(null);
|
|
2178
|
-
}, []),
|
|
2179
|
-
d(
|
|
2180
|
-
}, []), x =
|
|
2181
|
-
|
|
2182
|
-
}, []),
|
|
2222
|
+
}, []), m = G((C) => {
|
|
2223
|
+
d(C);
|
|
2224
|
+
}, []), x = G((C) => {
|
|
2225
|
+
S(C);
|
|
2226
|
+
}, []), y = Ie(() => ({
|
|
2183
2227
|
setTitle: v,
|
|
2184
2228
|
setBackHandler: w,
|
|
2185
|
-
clearBackHandler:
|
|
2229
|
+
clearBackHandler: k,
|
|
2186
2230
|
setToolbar: h,
|
|
2187
2231
|
clearToolbar: p,
|
|
2188
|
-
setHideBackButton:
|
|
2232
|
+
setHideBackButton: m,
|
|
2189
2233
|
setHideTitleBar: x,
|
|
2190
2234
|
close: n
|
|
2191
|
-
}), [v, w,
|
|
2235
|
+
}), [v, w, k, h, p, m, x, n]);
|
|
2192
2236
|
if (!o)
|
|
2193
2237
|
return null;
|
|
2194
|
-
const
|
|
2238
|
+
const M = o.component, P = !o.hideTitleBar && !b;
|
|
2195
2239
|
return /* @__PURE__ */ N(
|
|
2196
2240
|
"div",
|
|
2197
2241
|
{
|
|
2198
2242
|
className: `nc-app-container${t ? "" : " nc-hidden"}`,
|
|
2199
2243
|
children: [
|
|
2200
|
-
|
|
2201
|
-
|
|
2244
|
+
P && /* @__PURE__ */ s(
|
|
2245
|
+
rn,
|
|
2202
2246
|
{
|
|
2203
2247
|
title: i,
|
|
2204
2248
|
onClose: n,
|
|
2205
2249
|
onBack: c ?? void 0,
|
|
2206
2250
|
toolbar: u,
|
|
2207
|
-
hideBackButton:
|
|
2251
|
+
hideBackButton: g
|
|
2208
2252
|
}
|
|
2209
2253
|
),
|
|
2210
2254
|
/* @__PURE__ */ s(
|
|
@@ -2213,13 +2257,13 @@ function rt({ appId: e, isActive: t, onClose: n }) {
|
|
|
2213
2257
|
className: "nc-app-content-wrapper",
|
|
2214
2258
|
style: {
|
|
2215
2259
|
padding: o.padding,
|
|
2216
|
-
overflowY:
|
|
2260
|
+
overflowY: P ? "auto" : void 0
|
|
2217
2261
|
},
|
|
2218
|
-
children: /* @__PURE__ */ s(nt.Provider, { value:
|
|
2219
|
-
|
|
2262
|
+
children: /* @__PURE__ */ s(nt.Provider, { value: y, children: /* @__PURE__ */ s(on, { appId: e, children: /* @__PURE__ */ s(
|
|
2263
|
+
It,
|
|
2220
2264
|
{
|
|
2221
2265
|
fallback: /* @__PURE__ */ s("div", { className: "nc-app-loading", children: /* @__PURE__ */ s(Qe, {}) }),
|
|
2222
|
-
children: /* @__PURE__ */ s(
|
|
2266
|
+
children: /* @__PURE__ */ s(M, {})
|
|
2223
2267
|
}
|
|
2224
2268
|
) }) })
|
|
2225
2269
|
}
|
|
@@ -2228,21 +2272,21 @@ function rt({ appId: e, isActive: t, onClose: n }) {
|
|
|
2228
2272
|
}
|
|
2229
2273
|
);
|
|
2230
2274
|
}
|
|
2231
|
-
const Ce = 768,
|
|
2275
|
+
const Ce = 768, Me = 1024, ot = {
|
|
2232
2276
|
isMobile: !1,
|
|
2233
2277
|
isTablet: !1,
|
|
2234
2278
|
isDesktop: !0,
|
|
2235
2279
|
width: typeof window < "u" ? window.innerWidth : 1024,
|
|
2236
2280
|
height: typeof window < "u" ? window.innerHeight : 768
|
|
2237
2281
|
}, st = ge(ot);
|
|
2238
|
-
function
|
|
2239
|
-
const [t, n] =
|
|
2282
|
+
function wr({ children: e }) {
|
|
2283
|
+
const [t, n] = E(() => {
|
|
2240
2284
|
if (typeof window > "u") return ot;
|
|
2241
2285
|
const r = window.innerWidth, o = window.innerHeight;
|
|
2242
2286
|
return {
|
|
2243
2287
|
isMobile: r < Ce,
|
|
2244
|
-
isTablet: r >= Ce && r <
|
|
2245
|
-
isDesktop: r >=
|
|
2288
|
+
isTablet: r >= Ce && r < Me,
|
|
2289
|
+
isDesktop: r >= Me,
|
|
2246
2290
|
width: r,
|
|
2247
2291
|
height: o
|
|
2248
2292
|
};
|
|
@@ -2252,8 +2296,8 @@ function br({ children: e }) {
|
|
|
2252
2296
|
const o = window.innerWidth, i = window.innerHeight;
|
|
2253
2297
|
n({
|
|
2254
2298
|
isMobile: o < Ce,
|
|
2255
|
-
isTablet: o >= Ce && o <
|
|
2256
|
-
isDesktop: o >=
|
|
2299
|
+
isTablet: o >= Ce && o < Me,
|
|
2300
|
+
isDesktop: o >= Me,
|
|
2257
2301
|
width: o,
|
|
2258
2302
|
height: i
|
|
2259
2303
|
});
|
|
@@ -2264,15 +2308,15 @@ function br({ children: e }) {
|
|
|
2264
2308
|
function it() {
|
|
2265
2309
|
return ce(st);
|
|
2266
2310
|
}
|
|
2267
|
-
const Be = "-",
|
|
2268
|
-
const t =
|
|
2311
|
+
const Be = "-", sn = (e) => {
|
|
2312
|
+
const t = an(e), {
|
|
2269
2313
|
conflictingClassGroups: n,
|
|
2270
2314
|
conflictingClassGroupModifiers: r
|
|
2271
2315
|
} = e;
|
|
2272
2316
|
return {
|
|
2273
2317
|
getClassGroupId: (a) => {
|
|
2274
2318
|
const c = a.split(Be);
|
|
2275
|
-
return c[0] === "" && c.length !== 1 && c.shift(), ct(c, t) ||
|
|
2319
|
+
return c[0] === "" && c.length !== 1 && c.shift(), ct(c, t) || cn(a);
|
|
2276
2320
|
},
|
|
2277
2321
|
getConflictingClassGroupIds: (a, c) => {
|
|
2278
2322
|
const l = n[a] || [];
|
|
@@ -2292,13 +2336,13 @@ const Be = "-", rn = (e) => {
|
|
|
2292
2336
|
return (a = t.validators.find(({
|
|
2293
2337
|
validator: c
|
|
2294
2338
|
}) => c(i))) == null ? void 0 : a.classGroupId;
|
|
2295
|
-
}, Xe = /^\[(.+)\]$/,
|
|
2339
|
+
}, Xe = /^\[(.+)\]$/, cn = (e) => {
|
|
2296
2340
|
if (Xe.test(e)) {
|
|
2297
2341
|
const t = Xe.exec(e)[1], n = t == null ? void 0 : t.substring(0, t.indexOf(":"));
|
|
2298
2342
|
if (n)
|
|
2299
2343
|
return "arbitrary.." + n;
|
|
2300
2344
|
}
|
|
2301
|
-
},
|
|
2345
|
+
}, an = (e) => {
|
|
2302
2346
|
const {
|
|
2303
2347
|
theme: t,
|
|
2304
2348
|
prefix: n
|
|
@@ -2306,10 +2350,10 @@ const Be = "-", rn = (e) => {
|
|
|
2306
2350
|
nextPart: /* @__PURE__ */ new Map(),
|
|
2307
2351
|
validators: []
|
|
2308
2352
|
};
|
|
2309
|
-
return
|
|
2310
|
-
|
|
2353
|
+
return dn(Object.entries(e.classGroups), n).forEach(([i, a]) => {
|
|
2354
|
+
Pe(a, r, i, t);
|
|
2311
2355
|
}), r;
|
|
2312
|
-
},
|
|
2356
|
+
}, Pe = (e, t, n, r) => {
|
|
2313
2357
|
e.forEach((o) => {
|
|
2314
2358
|
if (typeof o == "string") {
|
|
2315
2359
|
const i = o === "" ? t : Je(t, o);
|
|
@@ -2317,8 +2361,8 @@ const Be = "-", rn = (e) => {
|
|
|
2317
2361
|
return;
|
|
2318
2362
|
}
|
|
2319
2363
|
if (typeof o == "function") {
|
|
2320
|
-
if (
|
|
2321
|
-
|
|
2364
|
+
if (ln(o)) {
|
|
2365
|
+
Pe(o(r), t, n, r);
|
|
2322
2366
|
return;
|
|
2323
2367
|
}
|
|
2324
2368
|
t.validators.push({
|
|
@@ -2328,7 +2372,7 @@ const Be = "-", rn = (e) => {
|
|
|
2328
2372
|
return;
|
|
2329
2373
|
}
|
|
2330
2374
|
Object.entries(o).forEach(([i, a]) => {
|
|
2331
|
-
|
|
2375
|
+
Pe(a, Je(t, i), n, r);
|
|
2332
2376
|
});
|
|
2333
2377
|
});
|
|
2334
2378
|
}, Je = (e, t) => {
|
|
@@ -2339,10 +2383,10 @@ const Be = "-", rn = (e) => {
|
|
|
2339
2383
|
validators: []
|
|
2340
2384
|
}), n = n.nextPart.get(r);
|
|
2341
2385
|
}), n;
|
|
2342
|
-
},
|
|
2386
|
+
}, ln = (e) => e.isThemeGetter, dn = (e, t) => t ? e.map(([n, r]) => {
|
|
2343
2387
|
const o = r.map((i) => typeof i == "string" ? t + i : typeof i == "object" ? Object.fromEntries(Object.entries(i).map(([a, c]) => [t + a, c])) : i);
|
|
2344
2388
|
return [n, o];
|
|
2345
|
-
}) : e,
|
|
2389
|
+
}) : e, un = (e) => {
|
|
2346
2390
|
if (e < 1)
|
|
2347
2391
|
return {
|
|
2348
2392
|
get: () => {
|
|
@@ -2366,32 +2410,32 @@ const Be = "-", rn = (e) => {
|
|
|
2366
2410
|
n.has(i) ? n.set(i, a) : o(i, a);
|
|
2367
2411
|
}
|
|
2368
2412
|
};
|
|
2369
|
-
}, at = "!",
|
|
2413
|
+
}, at = "!", pn = (e) => {
|
|
2370
2414
|
const {
|
|
2371
2415
|
separator: t,
|
|
2372
2416
|
experimentalParseClassName: n
|
|
2373
2417
|
} = e, r = t.length === 1, o = t[0], i = t.length, a = (c) => {
|
|
2374
2418
|
const l = [];
|
|
2375
|
-
let u = 0, f = 0,
|
|
2419
|
+
let u = 0, f = 0, g;
|
|
2376
2420
|
for (let w = 0; w < c.length; w++) {
|
|
2377
|
-
let
|
|
2421
|
+
let k = c[w];
|
|
2378
2422
|
if (u === 0) {
|
|
2379
|
-
if (
|
|
2423
|
+
if (k === o && (r || c.slice(w, w + i) === t)) {
|
|
2380
2424
|
l.push(c.slice(f, w)), f = w + i;
|
|
2381
2425
|
continue;
|
|
2382
2426
|
}
|
|
2383
|
-
if (
|
|
2384
|
-
|
|
2427
|
+
if (k === "/") {
|
|
2428
|
+
g = w;
|
|
2385
2429
|
continue;
|
|
2386
2430
|
}
|
|
2387
2431
|
}
|
|
2388
|
-
|
|
2432
|
+
k === "[" ? u++ : k === "]" && u--;
|
|
2389
2433
|
}
|
|
2390
|
-
const d = l.length === 0 ? c : c.substring(f),
|
|
2434
|
+
const d = l.length === 0 ? c : c.substring(f), b = d.startsWith(at), S = b ? d.substring(1) : d, v = g && g > f ? g - f : void 0;
|
|
2391
2435
|
return {
|
|
2392
2436
|
modifiers: l,
|
|
2393
|
-
hasImportantModifier:
|
|
2394
|
-
baseClassName:
|
|
2437
|
+
hasImportantModifier: b,
|
|
2438
|
+
baseClassName: S,
|
|
2395
2439
|
maybePostfixModifierPosition: v
|
|
2396
2440
|
};
|
|
2397
2441
|
};
|
|
@@ -2399,7 +2443,7 @@ const Be = "-", rn = (e) => {
|
|
|
2399
2443
|
className: c,
|
|
2400
2444
|
parseClassName: a
|
|
2401
2445
|
}) : a;
|
|
2402
|
-
},
|
|
2446
|
+
}, fn = (e) => {
|
|
2403
2447
|
if (e.length <= 1)
|
|
2404
2448
|
return e;
|
|
2405
2449
|
const t = [];
|
|
@@ -2407,27 +2451,27 @@ const Be = "-", rn = (e) => {
|
|
|
2407
2451
|
return e.forEach((r) => {
|
|
2408
2452
|
r[0] === "[" ? (t.push(...n.sort(), r), n = []) : n.push(r);
|
|
2409
2453
|
}), t.push(...n.sort()), t;
|
|
2410
|
-
},
|
|
2411
|
-
cache:
|
|
2412
|
-
parseClassName:
|
|
2413
|
-
...
|
|
2414
|
-
}),
|
|
2454
|
+
}, hn = (e) => ({
|
|
2455
|
+
cache: un(e.cacheSize),
|
|
2456
|
+
parseClassName: pn(e),
|
|
2457
|
+
...sn(e)
|
|
2458
|
+
}), mn = /\s+/, gn = (e, t) => {
|
|
2415
2459
|
const {
|
|
2416
2460
|
parseClassName: n,
|
|
2417
2461
|
getClassGroupId: r,
|
|
2418
2462
|
getConflictingClassGroupIds: o
|
|
2419
|
-
} = t, i = [], a = e.trim().split(
|
|
2463
|
+
} = t, i = [], a = e.trim().split(mn);
|
|
2420
2464
|
let c = "";
|
|
2421
2465
|
for (let l = a.length - 1; l >= 0; l -= 1) {
|
|
2422
2466
|
const u = a[l], {
|
|
2423
2467
|
modifiers: f,
|
|
2424
|
-
hasImportantModifier:
|
|
2468
|
+
hasImportantModifier: g,
|
|
2425
2469
|
baseClassName: d,
|
|
2426
|
-
maybePostfixModifierPosition:
|
|
2470
|
+
maybePostfixModifierPosition: b
|
|
2427
2471
|
} = n(u);
|
|
2428
|
-
let
|
|
2472
|
+
let S = !!b, v = r(S ? d.substring(0, b) : d);
|
|
2429
2473
|
if (!v) {
|
|
2430
|
-
if (!
|
|
2474
|
+
if (!S) {
|
|
2431
2475
|
c = u + (c.length > 0 ? " " + c : c);
|
|
2432
2476
|
continue;
|
|
2433
2477
|
}
|
|
@@ -2435,22 +2479,22 @@ const Be = "-", rn = (e) => {
|
|
|
2435
2479
|
c = u + (c.length > 0 ? " " + c : c);
|
|
2436
2480
|
continue;
|
|
2437
2481
|
}
|
|
2438
|
-
|
|
2482
|
+
S = !1;
|
|
2439
2483
|
}
|
|
2440
|
-
const w =
|
|
2484
|
+
const w = fn(f).join(":"), k = g ? w + at : w, h = k + v;
|
|
2441
2485
|
if (i.includes(h))
|
|
2442
2486
|
continue;
|
|
2443
2487
|
i.push(h);
|
|
2444
|
-
const p = o(v,
|
|
2445
|
-
for (let
|
|
2446
|
-
const x = p[
|
|
2447
|
-
i.push(
|
|
2488
|
+
const p = o(v, S);
|
|
2489
|
+
for (let m = 0; m < p.length; ++m) {
|
|
2490
|
+
const x = p[m];
|
|
2491
|
+
i.push(k + x);
|
|
2448
2492
|
}
|
|
2449
2493
|
c = u + (c.length > 0 ? " " + c : c);
|
|
2450
2494
|
}
|
|
2451
2495
|
return c;
|
|
2452
2496
|
};
|
|
2453
|
-
function
|
|
2497
|
+
function bn() {
|
|
2454
2498
|
let e = 0, t, n, r = "";
|
|
2455
2499
|
for (; e < arguments.length; )
|
|
2456
2500
|
(t = arguments[e++]) && (n = lt(t)) && (r && (r += " "), r += n);
|
|
@@ -2464,57 +2508,57 @@ const lt = (e) => {
|
|
|
2464
2508
|
e[r] && (t = lt(e[r])) && (n && (n += " "), n += t);
|
|
2465
2509
|
return n;
|
|
2466
2510
|
};
|
|
2467
|
-
function
|
|
2511
|
+
function vn(e, ...t) {
|
|
2468
2512
|
let n, r, o, i = a;
|
|
2469
2513
|
function a(l) {
|
|
2470
|
-
const u = t.reduce((f,
|
|
2471
|
-
return n =
|
|
2514
|
+
const u = t.reduce((f, g) => g(f), e());
|
|
2515
|
+
return n = hn(u), r = n.cache.get, o = n.cache.set, i = c, c(l);
|
|
2472
2516
|
}
|
|
2473
2517
|
function c(l) {
|
|
2474
2518
|
const u = r(l);
|
|
2475
2519
|
if (u)
|
|
2476
2520
|
return u;
|
|
2477
|
-
const f =
|
|
2521
|
+
const f = gn(l, n);
|
|
2478
2522
|
return o(l, f), f;
|
|
2479
2523
|
}
|
|
2480
2524
|
return function() {
|
|
2481
|
-
return i(
|
|
2525
|
+
return i(bn.apply(null, arguments));
|
|
2482
2526
|
};
|
|
2483
2527
|
}
|
|
2484
2528
|
const O = (e) => {
|
|
2485
2529
|
const t = (n) => n[e] || [];
|
|
2486
2530
|
return t.isThemeGetter = !0, t;
|
|
2487
|
-
}, dt = /^\[(?:([a-z-]+):)?(.+)\]$/i,
|
|
2531
|
+
}, dt = /^\[(?:([a-z-]+):)?(.+)\]$/i, wn = /^\d+\/\d+$/, yn = /* @__PURE__ */ new Set(["px", "full", "screen"]), xn = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, kn = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Nn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, An = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Sn = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, ee = (e) => he(e) || yn.has(e) || wn.test(e), se = (e) => be(e, "length", En), he = (e) => !!e && !Number.isNaN(Number(e)), $e = (e) => be(e, "number", he), xe = (e) => !!e && Number.isInteger(Number(e)), Cn = (e) => e.endsWith("%") && he(e.slice(0, -1)), R = (e) => dt.test(e), ie = (e) => xn.test(e), Mn = /* @__PURE__ */ new Set(["length", "size", "percentage"]), In = (e) => be(e, Mn, ut), $n = (e) => be(e, "position", ut), Rn = /* @__PURE__ */ new Set(["image", "url"]), Tn = (e) => be(e, Rn, zn), Pn = (e) => be(e, "", Ln), ke = () => !0, be = (e, t, n) => {
|
|
2488
2532
|
const r = dt.exec(e);
|
|
2489
2533
|
return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1;
|
|
2490
|
-
},
|
|
2534
|
+
}, En = (e) => (
|
|
2491
2535
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
2492
2536
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
2493
2537
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
2494
|
-
|
|
2495
|
-
), ut = () => !1,
|
|
2496
|
-
const e = O("colors"), t = O("spacing"), n = O("blur"), r = O("brightness"), o = O("borderColor"), i = O("borderRadius"), a = O("borderSpacing"), c = O("borderWidth"), l = O("contrast"), u = O("grayscale"), f = O("hueRotate"),
|
|
2538
|
+
kn.test(e) && !Nn.test(e)
|
|
2539
|
+
), ut = () => !1, Ln = (e) => An.test(e), zn = (e) => Sn.test(e), Bn = () => {
|
|
2540
|
+
const e = O("colors"), t = O("spacing"), n = O("blur"), r = O("brightness"), o = O("borderColor"), i = O("borderRadius"), a = O("borderSpacing"), c = O("borderWidth"), l = O("contrast"), u = O("grayscale"), f = O("hueRotate"), g = O("invert"), d = O("gap"), b = O("gradientColorStops"), S = O("gradientColorStopPositions"), v = O("inset"), w = O("margin"), k = O("opacity"), h = O("padding"), p = O("saturate"), m = O("scale"), x = O("sepia"), y = O("skew"), M = O("space"), P = O("translate"), C = () => ["auto", "contain", "none"], I = () => ["auto", "hidden", "clip", "visible", "scroll"], A = () => ["auto", R, t], $ = () => [R, t], L = () => ["", ee, se], H = () => ["auto", he, R], ae = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], X = () => ["solid", "dashed", "dotted", "double", "none"], K = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], _ = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], U = () => ["", "0", R], j = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], z = () => [he, R];
|
|
2497
2541
|
return {
|
|
2498
2542
|
cacheSize: 500,
|
|
2499
2543
|
separator: ":",
|
|
2500
2544
|
theme: {
|
|
2501
2545
|
colors: [ke],
|
|
2502
2546
|
spacing: [ee, se],
|
|
2503
|
-
blur: ["none", "", ie,
|
|
2547
|
+
blur: ["none", "", ie, R],
|
|
2504
2548
|
brightness: z(),
|
|
2505
2549
|
borderColor: [e],
|
|
2506
|
-
borderRadius: ["none", "", "full", ie,
|
|
2550
|
+
borderRadius: ["none", "", "full", ie, R],
|
|
2507
2551
|
borderSpacing: $(),
|
|
2508
|
-
borderWidth:
|
|
2552
|
+
borderWidth: L(),
|
|
2509
2553
|
contrast: z(),
|
|
2510
2554
|
grayscale: U(),
|
|
2511
2555
|
hueRotate: z(),
|
|
2512
2556
|
invert: U(),
|
|
2513
2557
|
gap: $(),
|
|
2514
2558
|
gradientColorStops: [e],
|
|
2515
|
-
gradientColorStopPositions: [
|
|
2516
|
-
inset:
|
|
2517
|
-
margin:
|
|
2559
|
+
gradientColorStopPositions: [Cn, se],
|
|
2560
|
+
inset: A(),
|
|
2561
|
+
margin: A(),
|
|
2518
2562
|
opacity: z(),
|
|
2519
2563
|
padding: $(),
|
|
2520
2564
|
saturate: z(),
|
|
@@ -2531,7 +2575,7 @@ const O = (e) => {
|
|
|
2531
2575
|
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
2532
2576
|
*/
|
|
2533
2577
|
aspect: [{
|
|
2534
|
-
aspect: ["auto", "square", "video",
|
|
2578
|
+
aspect: ["auto", "square", "video", R]
|
|
2535
2579
|
}],
|
|
2536
2580
|
/**
|
|
2537
2581
|
* Container
|
|
@@ -2616,49 +2660,49 @@ const O = (e) => {
|
|
|
2616
2660
|
* @see https://tailwindcss.com/docs/object-position
|
|
2617
2661
|
*/
|
|
2618
2662
|
"object-position": [{
|
|
2619
|
-
object: [...ae(),
|
|
2663
|
+
object: [...ae(), R]
|
|
2620
2664
|
}],
|
|
2621
2665
|
/**
|
|
2622
2666
|
* Overflow
|
|
2623
2667
|
* @see https://tailwindcss.com/docs/overflow
|
|
2624
2668
|
*/
|
|
2625
2669
|
overflow: [{
|
|
2626
|
-
overflow:
|
|
2670
|
+
overflow: I()
|
|
2627
2671
|
}],
|
|
2628
2672
|
/**
|
|
2629
2673
|
* Overflow X
|
|
2630
2674
|
* @see https://tailwindcss.com/docs/overflow
|
|
2631
2675
|
*/
|
|
2632
2676
|
"overflow-x": [{
|
|
2633
|
-
"overflow-x":
|
|
2677
|
+
"overflow-x": I()
|
|
2634
2678
|
}],
|
|
2635
2679
|
/**
|
|
2636
2680
|
* Overflow Y
|
|
2637
2681
|
* @see https://tailwindcss.com/docs/overflow
|
|
2638
2682
|
*/
|
|
2639
2683
|
"overflow-y": [{
|
|
2640
|
-
"overflow-y":
|
|
2684
|
+
"overflow-y": I()
|
|
2641
2685
|
}],
|
|
2642
2686
|
/**
|
|
2643
2687
|
* Overscroll Behavior
|
|
2644
2688
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2645
2689
|
*/
|
|
2646
2690
|
overscroll: [{
|
|
2647
|
-
overscroll:
|
|
2691
|
+
overscroll: C()
|
|
2648
2692
|
}],
|
|
2649
2693
|
/**
|
|
2650
2694
|
* Overscroll Behavior X
|
|
2651
2695
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2652
2696
|
*/
|
|
2653
2697
|
"overscroll-x": [{
|
|
2654
|
-
"overscroll-x":
|
|
2698
|
+
"overscroll-x": C()
|
|
2655
2699
|
}],
|
|
2656
2700
|
/**
|
|
2657
2701
|
* Overscroll Behavior Y
|
|
2658
2702
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2659
2703
|
*/
|
|
2660
2704
|
"overscroll-y": [{
|
|
2661
|
-
"overscroll-y":
|
|
2705
|
+
"overscroll-y": C()
|
|
2662
2706
|
}],
|
|
2663
2707
|
/**
|
|
2664
2708
|
* Position
|
|
@@ -2738,7 +2782,7 @@ const O = (e) => {
|
|
|
2738
2782
|
* @see https://tailwindcss.com/docs/z-index
|
|
2739
2783
|
*/
|
|
2740
2784
|
z: [{
|
|
2741
|
-
z: ["auto", xe,
|
|
2785
|
+
z: ["auto", xe, R]
|
|
2742
2786
|
}],
|
|
2743
2787
|
// Flexbox and Grid
|
|
2744
2788
|
/**
|
|
@@ -2746,7 +2790,7 @@ const O = (e) => {
|
|
|
2746
2790
|
* @see https://tailwindcss.com/docs/flex-basis
|
|
2747
2791
|
*/
|
|
2748
2792
|
basis: [{
|
|
2749
|
-
basis:
|
|
2793
|
+
basis: A()
|
|
2750
2794
|
}],
|
|
2751
2795
|
/**
|
|
2752
2796
|
* Flex Direction
|
|
@@ -2767,7 +2811,7 @@ const O = (e) => {
|
|
|
2767
2811
|
* @see https://tailwindcss.com/docs/flex
|
|
2768
2812
|
*/
|
|
2769
2813
|
flex: [{
|
|
2770
|
-
flex: ["1", "auto", "initial", "none",
|
|
2814
|
+
flex: ["1", "auto", "initial", "none", R]
|
|
2771
2815
|
}],
|
|
2772
2816
|
/**
|
|
2773
2817
|
* Flex Grow
|
|
@@ -2788,7 +2832,7 @@ const O = (e) => {
|
|
|
2788
2832
|
* @see https://tailwindcss.com/docs/order
|
|
2789
2833
|
*/
|
|
2790
2834
|
order: [{
|
|
2791
|
-
order: ["first", "last", "none", xe,
|
|
2835
|
+
order: ["first", "last", "none", xe, R]
|
|
2792
2836
|
}],
|
|
2793
2837
|
/**
|
|
2794
2838
|
* Grid Template Columns
|
|
@@ -2803,8 +2847,8 @@ const O = (e) => {
|
|
|
2803
2847
|
*/
|
|
2804
2848
|
"col-start-end": [{
|
|
2805
2849
|
col: ["auto", {
|
|
2806
|
-
span: ["full", xe,
|
|
2807
|
-
},
|
|
2850
|
+
span: ["full", xe, R]
|
|
2851
|
+
}, R]
|
|
2808
2852
|
}],
|
|
2809
2853
|
/**
|
|
2810
2854
|
* Grid Column Start
|
|
@@ -2833,8 +2877,8 @@ const O = (e) => {
|
|
|
2833
2877
|
*/
|
|
2834
2878
|
"row-start-end": [{
|
|
2835
2879
|
row: ["auto", {
|
|
2836
|
-
span: [xe,
|
|
2837
|
-
},
|
|
2880
|
+
span: [xe, R]
|
|
2881
|
+
}, R]
|
|
2838
2882
|
}],
|
|
2839
2883
|
/**
|
|
2840
2884
|
* Grid Row Start
|
|
@@ -2862,14 +2906,14 @@ const O = (e) => {
|
|
|
2862
2906
|
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
2863
2907
|
*/
|
|
2864
2908
|
"auto-cols": [{
|
|
2865
|
-
"auto-cols": ["auto", "min", "max", "fr",
|
|
2909
|
+
"auto-cols": ["auto", "min", "max", "fr", R]
|
|
2866
2910
|
}],
|
|
2867
2911
|
/**
|
|
2868
2912
|
* Grid Auto Rows
|
|
2869
2913
|
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
2870
2914
|
*/
|
|
2871
2915
|
"auto-rows": [{
|
|
2872
|
-
"auto-rows": ["auto", "min", "max", "fr",
|
|
2916
|
+
"auto-rows": ["auto", "min", "max", "fr", R]
|
|
2873
2917
|
}],
|
|
2874
2918
|
/**
|
|
2875
2919
|
* Gap
|
|
@@ -3087,7 +3131,7 @@ const O = (e) => {
|
|
|
3087
3131
|
* @see https://tailwindcss.com/docs/space
|
|
3088
3132
|
*/
|
|
3089
3133
|
"space-x": [{
|
|
3090
|
-
"space-x": [
|
|
3134
|
+
"space-x": [M]
|
|
3091
3135
|
}],
|
|
3092
3136
|
/**
|
|
3093
3137
|
* Space Between X Reverse
|
|
@@ -3099,7 +3143,7 @@ const O = (e) => {
|
|
|
3099
3143
|
* @see https://tailwindcss.com/docs/space
|
|
3100
3144
|
*/
|
|
3101
3145
|
"space-y": [{
|
|
3102
|
-
"space-y": [
|
|
3146
|
+
"space-y": [M]
|
|
3103
3147
|
}],
|
|
3104
3148
|
/**
|
|
3105
3149
|
* Space Between Y Reverse
|
|
@@ -3112,21 +3156,21 @@ const O = (e) => {
|
|
|
3112
3156
|
* @see https://tailwindcss.com/docs/width
|
|
3113
3157
|
*/
|
|
3114
3158
|
w: [{
|
|
3115
|
-
w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw",
|
|
3159
|
+
w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", R, t]
|
|
3116
3160
|
}],
|
|
3117
3161
|
/**
|
|
3118
3162
|
* Min-Width
|
|
3119
3163
|
* @see https://tailwindcss.com/docs/min-width
|
|
3120
3164
|
*/
|
|
3121
3165
|
"min-w": [{
|
|
3122
|
-
"min-w": [
|
|
3166
|
+
"min-w": [R, t, "min", "max", "fit"]
|
|
3123
3167
|
}],
|
|
3124
3168
|
/**
|
|
3125
3169
|
* Max-Width
|
|
3126
3170
|
* @see https://tailwindcss.com/docs/max-width
|
|
3127
3171
|
*/
|
|
3128
3172
|
"max-w": [{
|
|
3129
|
-
"max-w": [
|
|
3173
|
+
"max-w": [R, t, "none", "full", "min", "max", "fit", "prose", {
|
|
3130
3174
|
screen: [ie]
|
|
3131
3175
|
}, ie]
|
|
3132
3176
|
}],
|
|
@@ -3135,28 +3179,28 @@ const O = (e) => {
|
|
|
3135
3179
|
* @see https://tailwindcss.com/docs/height
|
|
3136
3180
|
*/
|
|
3137
3181
|
h: [{
|
|
3138
|
-
h: [
|
|
3182
|
+
h: [R, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
3139
3183
|
}],
|
|
3140
3184
|
/**
|
|
3141
3185
|
* Min-Height
|
|
3142
3186
|
* @see https://tailwindcss.com/docs/min-height
|
|
3143
3187
|
*/
|
|
3144
3188
|
"min-h": [{
|
|
3145
|
-
"min-h": [
|
|
3189
|
+
"min-h": [R, t, "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
3146
3190
|
}],
|
|
3147
3191
|
/**
|
|
3148
3192
|
* Max-Height
|
|
3149
3193
|
* @see https://tailwindcss.com/docs/max-height
|
|
3150
3194
|
*/
|
|
3151
3195
|
"max-h": [{
|
|
3152
|
-
"max-h": [
|
|
3196
|
+
"max-h": [R, t, "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
3153
3197
|
}],
|
|
3154
3198
|
/**
|
|
3155
3199
|
* Size
|
|
3156
3200
|
* @see https://tailwindcss.com/docs/size
|
|
3157
3201
|
*/
|
|
3158
3202
|
size: [{
|
|
3159
|
-
size: [
|
|
3203
|
+
size: [R, t, "auto", "min", "max", "fit"]
|
|
3160
3204
|
}],
|
|
3161
3205
|
// Typography
|
|
3162
3206
|
/**
|
|
@@ -3181,7 +3225,7 @@ const O = (e) => {
|
|
|
3181
3225
|
* @see https://tailwindcss.com/docs/font-weight
|
|
3182
3226
|
*/
|
|
3183
3227
|
"font-weight": [{
|
|
3184
|
-
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black",
|
|
3228
|
+
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", $e]
|
|
3185
3229
|
}],
|
|
3186
3230
|
/**
|
|
3187
3231
|
* Font Family
|
|
@@ -3225,35 +3269,35 @@ const O = (e) => {
|
|
|
3225
3269
|
* @see https://tailwindcss.com/docs/letter-spacing
|
|
3226
3270
|
*/
|
|
3227
3271
|
tracking: [{
|
|
3228
|
-
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest",
|
|
3272
|
+
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", R]
|
|
3229
3273
|
}],
|
|
3230
3274
|
/**
|
|
3231
3275
|
* Line Clamp
|
|
3232
3276
|
* @see https://tailwindcss.com/docs/line-clamp
|
|
3233
3277
|
*/
|
|
3234
3278
|
"line-clamp": [{
|
|
3235
|
-
"line-clamp": ["none", he,
|
|
3279
|
+
"line-clamp": ["none", he, $e]
|
|
3236
3280
|
}],
|
|
3237
3281
|
/**
|
|
3238
3282
|
* Line Height
|
|
3239
3283
|
* @see https://tailwindcss.com/docs/line-height
|
|
3240
3284
|
*/
|
|
3241
3285
|
leading: [{
|
|
3242
|
-
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", ee,
|
|
3286
|
+
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", ee, R]
|
|
3243
3287
|
}],
|
|
3244
3288
|
/**
|
|
3245
3289
|
* List Style Image
|
|
3246
3290
|
* @see https://tailwindcss.com/docs/list-style-image
|
|
3247
3291
|
*/
|
|
3248
3292
|
"list-image": [{
|
|
3249
|
-
"list-image": ["none",
|
|
3293
|
+
"list-image": ["none", R]
|
|
3250
3294
|
}],
|
|
3251
3295
|
/**
|
|
3252
3296
|
* List Style Type
|
|
3253
3297
|
* @see https://tailwindcss.com/docs/list-style-type
|
|
3254
3298
|
*/
|
|
3255
3299
|
"list-style-type": [{
|
|
3256
|
-
list: ["none", "disc", "decimal",
|
|
3300
|
+
list: ["none", "disc", "decimal", R]
|
|
3257
3301
|
}],
|
|
3258
3302
|
/**
|
|
3259
3303
|
* List Style Position
|
|
@@ -3275,7 +3319,7 @@ const O = (e) => {
|
|
|
3275
3319
|
* @see https://tailwindcss.com/docs/placeholder-opacity
|
|
3276
3320
|
*/
|
|
3277
3321
|
"placeholder-opacity": [{
|
|
3278
|
-
"placeholder-opacity": [
|
|
3322
|
+
"placeholder-opacity": [k]
|
|
3279
3323
|
}],
|
|
3280
3324
|
/**
|
|
3281
3325
|
* Text Alignment
|
|
@@ -3296,7 +3340,7 @@ const O = (e) => {
|
|
|
3296
3340
|
* @see https://tailwindcss.com/docs/text-opacity
|
|
3297
3341
|
*/
|
|
3298
3342
|
"text-opacity": [{
|
|
3299
|
-
"text-opacity": [
|
|
3343
|
+
"text-opacity": [k]
|
|
3300
3344
|
}],
|
|
3301
3345
|
/**
|
|
3302
3346
|
* Text Decoration
|
|
@@ -3322,7 +3366,7 @@ const O = (e) => {
|
|
|
3322
3366
|
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
3323
3367
|
*/
|
|
3324
3368
|
"underline-offset": [{
|
|
3325
|
-
"underline-offset": ["auto", ee,
|
|
3369
|
+
"underline-offset": ["auto", ee, R]
|
|
3326
3370
|
}],
|
|
3327
3371
|
/**
|
|
3328
3372
|
* Text Decoration Color
|
|
@@ -3360,7 +3404,7 @@ const O = (e) => {
|
|
|
3360
3404
|
* @see https://tailwindcss.com/docs/vertical-align
|
|
3361
3405
|
*/
|
|
3362
3406
|
"vertical-align": [{
|
|
3363
|
-
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super",
|
|
3407
|
+
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", R]
|
|
3364
3408
|
}],
|
|
3365
3409
|
/**
|
|
3366
3410
|
* Whitespace
|
|
@@ -3388,7 +3432,7 @@ const O = (e) => {
|
|
|
3388
3432
|
* @see https://tailwindcss.com/docs/content
|
|
3389
3433
|
*/
|
|
3390
3434
|
content: [{
|
|
3391
|
-
content: ["none",
|
|
3435
|
+
content: ["none", R]
|
|
3392
3436
|
}],
|
|
3393
3437
|
// Backgrounds
|
|
3394
3438
|
/**
|
|
@@ -3411,7 +3455,7 @@ const O = (e) => {
|
|
|
3411
3455
|
* @see https://tailwindcss.com/docs/background-opacity
|
|
3412
3456
|
*/
|
|
3413
3457
|
"bg-opacity": [{
|
|
3414
|
-
"bg-opacity": [
|
|
3458
|
+
"bg-opacity": [k]
|
|
3415
3459
|
}],
|
|
3416
3460
|
/**
|
|
3417
3461
|
* Background Origin
|
|
@@ -3441,7 +3485,7 @@ const O = (e) => {
|
|
|
3441
3485
|
* @see https://tailwindcss.com/docs/background-size
|
|
3442
3486
|
*/
|
|
3443
3487
|
"bg-size": [{
|
|
3444
|
-
bg: ["auto", "cover", "contain",
|
|
3488
|
+
bg: ["auto", "cover", "contain", In]
|
|
3445
3489
|
}],
|
|
3446
3490
|
/**
|
|
3447
3491
|
* Background Image
|
|
@@ -3450,7 +3494,7 @@ const O = (e) => {
|
|
|
3450
3494
|
"bg-image": [{
|
|
3451
3495
|
bg: ["none", {
|
|
3452
3496
|
"gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
3453
|
-
},
|
|
3497
|
+
}, Tn]
|
|
3454
3498
|
}],
|
|
3455
3499
|
/**
|
|
3456
3500
|
* Background Color
|
|
@@ -3464,42 +3508,42 @@ const O = (e) => {
|
|
|
3464
3508
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3465
3509
|
*/
|
|
3466
3510
|
"gradient-from-pos": [{
|
|
3467
|
-
from: [
|
|
3511
|
+
from: [S]
|
|
3468
3512
|
}],
|
|
3469
3513
|
/**
|
|
3470
3514
|
* Gradient Color Stops Via Position
|
|
3471
3515
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3472
3516
|
*/
|
|
3473
3517
|
"gradient-via-pos": [{
|
|
3474
|
-
via: [
|
|
3518
|
+
via: [S]
|
|
3475
3519
|
}],
|
|
3476
3520
|
/**
|
|
3477
3521
|
* Gradient Color Stops To Position
|
|
3478
3522
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3479
3523
|
*/
|
|
3480
3524
|
"gradient-to-pos": [{
|
|
3481
|
-
to: [
|
|
3525
|
+
to: [S]
|
|
3482
3526
|
}],
|
|
3483
3527
|
/**
|
|
3484
3528
|
* Gradient Color Stops From
|
|
3485
3529
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3486
3530
|
*/
|
|
3487
3531
|
"gradient-from": [{
|
|
3488
|
-
from: [
|
|
3532
|
+
from: [b]
|
|
3489
3533
|
}],
|
|
3490
3534
|
/**
|
|
3491
3535
|
* Gradient Color Stops Via
|
|
3492
3536
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3493
3537
|
*/
|
|
3494
3538
|
"gradient-via": [{
|
|
3495
|
-
via: [
|
|
3539
|
+
via: [b]
|
|
3496
3540
|
}],
|
|
3497
3541
|
/**
|
|
3498
3542
|
* Gradient Color Stops To
|
|
3499
3543
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3500
3544
|
*/
|
|
3501
3545
|
"gradient-to": [{
|
|
3502
|
-
to: [
|
|
3546
|
+
to: [b]
|
|
3503
3547
|
}],
|
|
3504
3548
|
// Borders
|
|
3505
3549
|
/**
|
|
@@ -3675,7 +3719,7 @@ const O = (e) => {
|
|
|
3675
3719
|
* @see https://tailwindcss.com/docs/border-opacity
|
|
3676
3720
|
*/
|
|
3677
3721
|
"border-opacity": [{
|
|
3678
|
-
"border-opacity": [
|
|
3722
|
+
"border-opacity": [k]
|
|
3679
3723
|
}],
|
|
3680
3724
|
/**
|
|
3681
3725
|
* Border Style
|
|
@@ -3713,7 +3757,7 @@ const O = (e) => {
|
|
|
3713
3757
|
* @see https://tailwindcss.com/docs/divide-opacity
|
|
3714
3758
|
*/
|
|
3715
3759
|
"divide-opacity": [{
|
|
3716
|
-
"divide-opacity": [
|
|
3760
|
+
"divide-opacity": [k]
|
|
3717
3761
|
}],
|
|
3718
3762
|
/**
|
|
3719
3763
|
* Divide Style
|
|
@@ -3804,7 +3848,7 @@ const O = (e) => {
|
|
|
3804
3848
|
* @see https://tailwindcss.com/docs/outline-offset
|
|
3805
3849
|
*/
|
|
3806
3850
|
"outline-offset": [{
|
|
3807
|
-
"outline-offset": [ee,
|
|
3851
|
+
"outline-offset": [ee, R]
|
|
3808
3852
|
}],
|
|
3809
3853
|
/**
|
|
3810
3854
|
* Outline Width
|
|
@@ -3825,7 +3869,7 @@ const O = (e) => {
|
|
|
3825
3869
|
* @see https://tailwindcss.com/docs/ring-width
|
|
3826
3870
|
*/
|
|
3827
3871
|
"ring-w": [{
|
|
3828
|
-
ring:
|
|
3872
|
+
ring: L()
|
|
3829
3873
|
}],
|
|
3830
3874
|
/**
|
|
3831
3875
|
* Ring Width Inset
|
|
@@ -3844,7 +3888,7 @@ const O = (e) => {
|
|
|
3844
3888
|
* @see https://tailwindcss.com/docs/ring-opacity
|
|
3845
3889
|
*/
|
|
3846
3890
|
"ring-opacity": [{
|
|
3847
|
-
"ring-opacity": [
|
|
3891
|
+
"ring-opacity": [k]
|
|
3848
3892
|
}],
|
|
3849
3893
|
/**
|
|
3850
3894
|
* Ring Offset Width
|
|
@@ -3866,7 +3910,7 @@ const O = (e) => {
|
|
|
3866
3910
|
* @see https://tailwindcss.com/docs/box-shadow
|
|
3867
3911
|
*/
|
|
3868
3912
|
shadow: [{
|
|
3869
|
-
shadow: ["", "inner", "none", ie,
|
|
3913
|
+
shadow: ["", "inner", "none", ie, Pn]
|
|
3870
3914
|
}],
|
|
3871
3915
|
/**
|
|
3872
3916
|
* Box Shadow Color
|
|
@@ -3880,7 +3924,7 @@ const O = (e) => {
|
|
|
3880
3924
|
* @see https://tailwindcss.com/docs/opacity
|
|
3881
3925
|
*/
|
|
3882
3926
|
opacity: [{
|
|
3883
|
-
opacity: [
|
|
3927
|
+
opacity: [k]
|
|
3884
3928
|
}],
|
|
3885
3929
|
/**
|
|
3886
3930
|
* Mix Blend Mode
|
|
@@ -3931,7 +3975,7 @@ const O = (e) => {
|
|
|
3931
3975
|
* @see https://tailwindcss.com/docs/drop-shadow
|
|
3932
3976
|
*/
|
|
3933
3977
|
"drop-shadow": [{
|
|
3934
|
-
"drop-shadow": ["", "none", ie,
|
|
3978
|
+
"drop-shadow": ["", "none", ie, R]
|
|
3935
3979
|
}],
|
|
3936
3980
|
/**
|
|
3937
3981
|
* Grayscale
|
|
@@ -3952,7 +3996,7 @@ const O = (e) => {
|
|
|
3952
3996
|
* @see https://tailwindcss.com/docs/invert
|
|
3953
3997
|
*/
|
|
3954
3998
|
invert: [{
|
|
3955
|
-
invert: [
|
|
3999
|
+
invert: [g]
|
|
3956
4000
|
}],
|
|
3957
4001
|
/**
|
|
3958
4002
|
* Saturate
|
|
@@ -4016,14 +4060,14 @@ const O = (e) => {
|
|
|
4016
4060
|
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
4017
4061
|
*/
|
|
4018
4062
|
"backdrop-invert": [{
|
|
4019
|
-
"backdrop-invert": [
|
|
4063
|
+
"backdrop-invert": [g]
|
|
4020
4064
|
}],
|
|
4021
4065
|
/**
|
|
4022
4066
|
* Backdrop Opacity
|
|
4023
4067
|
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
4024
4068
|
*/
|
|
4025
4069
|
"backdrop-opacity": [{
|
|
4026
|
-
"backdrop-opacity": [
|
|
4070
|
+
"backdrop-opacity": [k]
|
|
4027
4071
|
}],
|
|
4028
4072
|
/**
|
|
4029
4073
|
* Backdrop Saturate
|
|
@@ -4088,7 +4132,7 @@ const O = (e) => {
|
|
|
4088
4132
|
* @see https://tailwindcss.com/docs/transition-property
|
|
4089
4133
|
*/
|
|
4090
4134
|
transition: [{
|
|
4091
|
-
transition: ["none", "all", "", "colors", "opacity", "shadow", "transform",
|
|
4135
|
+
transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", R]
|
|
4092
4136
|
}],
|
|
4093
4137
|
/**
|
|
4094
4138
|
* Transition Duration
|
|
@@ -4102,7 +4146,7 @@ const O = (e) => {
|
|
|
4102
4146
|
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
4103
4147
|
*/
|
|
4104
4148
|
ease: [{
|
|
4105
|
-
ease: ["linear", "in", "out", "in-out",
|
|
4149
|
+
ease: ["linear", "in", "out", "in-out", R]
|
|
4106
4150
|
}],
|
|
4107
4151
|
/**
|
|
4108
4152
|
* Transition Delay
|
|
@@ -4116,7 +4160,7 @@ const O = (e) => {
|
|
|
4116
4160
|
* @see https://tailwindcss.com/docs/animation
|
|
4117
4161
|
*/
|
|
4118
4162
|
animate: [{
|
|
4119
|
-
animate: ["none", "spin", "ping", "pulse", "bounce",
|
|
4163
|
+
animate: ["none", "spin", "ping", "pulse", "bounce", R]
|
|
4120
4164
|
}],
|
|
4121
4165
|
// Transforms
|
|
4122
4166
|
/**
|
|
@@ -4131,63 +4175,63 @@ const O = (e) => {
|
|
|
4131
4175
|
* @see https://tailwindcss.com/docs/scale
|
|
4132
4176
|
*/
|
|
4133
4177
|
scale: [{
|
|
4134
|
-
scale: [
|
|
4178
|
+
scale: [m]
|
|
4135
4179
|
}],
|
|
4136
4180
|
/**
|
|
4137
4181
|
* Scale X
|
|
4138
4182
|
* @see https://tailwindcss.com/docs/scale
|
|
4139
4183
|
*/
|
|
4140
4184
|
"scale-x": [{
|
|
4141
|
-
"scale-x": [
|
|
4185
|
+
"scale-x": [m]
|
|
4142
4186
|
}],
|
|
4143
4187
|
/**
|
|
4144
4188
|
* Scale Y
|
|
4145
4189
|
* @see https://tailwindcss.com/docs/scale
|
|
4146
4190
|
*/
|
|
4147
4191
|
"scale-y": [{
|
|
4148
|
-
"scale-y": [
|
|
4192
|
+
"scale-y": [m]
|
|
4149
4193
|
}],
|
|
4150
4194
|
/**
|
|
4151
4195
|
* Rotate
|
|
4152
4196
|
* @see https://tailwindcss.com/docs/rotate
|
|
4153
4197
|
*/
|
|
4154
4198
|
rotate: [{
|
|
4155
|
-
rotate: [xe,
|
|
4199
|
+
rotate: [xe, R]
|
|
4156
4200
|
}],
|
|
4157
4201
|
/**
|
|
4158
4202
|
* Translate X
|
|
4159
4203
|
* @see https://tailwindcss.com/docs/translate
|
|
4160
4204
|
*/
|
|
4161
4205
|
"translate-x": [{
|
|
4162
|
-
"translate-x": [
|
|
4206
|
+
"translate-x": [P]
|
|
4163
4207
|
}],
|
|
4164
4208
|
/**
|
|
4165
4209
|
* Translate Y
|
|
4166
4210
|
* @see https://tailwindcss.com/docs/translate
|
|
4167
4211
|
*/
|
|
4168
4212
|
"translate-y": [{
|
|
4169
|
-
"translate-y": [
|
|
4213
|
+
"translate-y": [P]
|
|
4170
4214
|
}],
|
|
4171
4215
|
/**
|
|
4172
4216
|
* Skew X
|
|
4173
4217
|
* @see https://tailwindcss.com/docs/skew
|
|
4174
4218
|
*/
|
|
4175
4219
|
"skew-x": [{
|
|
4176
|
-
"skew-x": [
|
|
4220
|
+
"skew-x": [y]
|
|
4177
4221
|
}],
|
|
4178
4222
|
/**
|
|
4179
4223
|
* Skew Y
|
|
4180
4224
|
* @see https://tailwindcss.com/docs/skew
|
|
4181
4225
|
*/
|
|
4182
4226
|
"skew-y": [{
|
|
4183
|
-
"skew-y": [
|
|
4227
|
+
"skew-y": [y]
|
|
4184
4228
|
}],
|
|
4185
4229
|
/**
|
|
4186
4230
|
* Transform Origin
|
|
4187
4231
|
* @see https://tailwindcss.com/docs/transform-origin
|
|
4188
4232
|
*/
|
|
4189
4233
|
"transform-origin": [{
|
|
4190
|
-
origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left",
|
|
4234
|
+
origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", R]
|
|
4191
4235
|
}],
|
|
4192
4236
|
// Interactivity
|
|
4193
4237
|
/**
|
|
@@ -4209,7 +4253,7 @@ const O = (e) => {
|
|
|
4209
4253
|
* @see https://tailwindcss.com/docs/cursor
|
|
4210
4254
|
*/
|
|
4211
4255
|
cursor: [{
|
|
4212
|
-
cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out",
|
|
4256
|
+
cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", R]
|
|
4213
4257
|
}],
|
|
4214
4258
|
/**
|
|
4215
4259
|
* Caret Color
|
|
@@ -4431,7 +4475,7 @@ const O = (e) => {
|
|
|
4431
4475
|
* @see https://tailwindcss.com/docs/will-change
|
|
4432
4476
|
*/
|
|
4433
4477
|
"will-change": [{
|
|
4434
|
-
"will-change": ["auto", "scroll", "contents", "transform",
|
|
4478
|
+
"will-change": ["auto", "scroll", "contents", "transform", R]
|
|
4435
4479
|
}],
|
|
4436
4480
|
// SVG
|
|
4437
4481
|
/**
|
|
@@ -4446,7 +4490,7 @@ const O = (e) => {
|
|
|
4446
4490
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
4447
4491
|
*/
|
|
4448
4492
|
"stroke-w": [{
|
|
4449
|
-
stroke: [ee, se,
|
|
4493
|
+
stroke: [ee, se, $e]
|
|
4450
4494
|
}],
|
|
4451
4495
|
/**
|
|
4452
4496
|
* Stroke
|
|
@@ -4521,15 +4565,15 @@ const O = (e) => {
|
|
|
4521
4565
|
"font-size": ["leading"]
|
|
4522
4566
|
}
|
|
4523
4567
|
};
|
|
4524
|
-
},
|
|
4525
|
-
function
|
|
4526
|
-
return
|
|
4568
|
+
}, Dn = /* @__PURE__ */ vn(Bn);
|
|
4569
|
+
function Wn(...e) {
|
|
4570
|
+
return Dn(Rt(e));
|
|
4527
4571
|
}
|
|
4528
|
-
function
|
|
4529
|
-
const [r, o] =
|
|
4572
|
+
function yr({ autoWidth: e = !0, className: t, style: n }) {
|
|
4573
|
+
const [r, o] = E(() => ne.getActiveAppId()), [i, a] = E(() => Q.getRunningApps()), { isMobile: c } = it();
|
|
4530
4574
|
D(() => {
|
|
4531
|
-
const w = ne.subscribe("activeAppId", (
|
|
4532
|
-
o(
|
|
4575
|
+
const w = ne.subscribe("activeAppId", (k) => {
|
|
4576
|
+
o(k);
|
|
4533
4577
|
});
|
|
4534
4578
|
return () => {
|
|
4535
4579
|
w();
|
|
@@ -4544,15 +4588,15 @@ function vr({ autoWidth: e = !0, className: t, style: n }) {
|
|
|
4544
4588
|
}, []);
|
|
4545
4589
|
const l = (w) => {
|
|
4546
4590
|
Q.closeApp(w);
|
|
4547
|
-
}, u = r ? me.get(r) : null,
|
|
4591
|
+
}, u = r ? me.get(r) : null, g = (u == null ? void 0 : u.width) ?? 400, d = r !== null, v = { ...{
|
|
4548
4592
|
overflow: "hidden",
|
|
4549
4593
|
display: d ? "flex" : "none",
|
|
4550
4594
|
flexDirection: "column",
|
|
4551
4595
|
flexShrink: 0,
|
|
4552
4596
|
// Only set width if autoWidth is enabled
|
|
4553
|
-
...e && d ? { width: c ? "100%" :
|
|
4597
|
+
...e && d ? { width: c ? "100%" : g } : {}
|
|
4554
4598
|
}, ...n };
|
|
4555
|
-
return /* @__PURE__ */ s("div", { className:
|
|
4599
|
+
return /* @__PURE__ */ s("div", { className: Wn("nc-app-panel", t), style: v, children: i.map((w) => /* @__PURE__ */ s(
|
|
4556
4600
|
rt,
|
|
4557
4601
|
{
|
|
4558
4602
|
appId: w.appId,
|
|
@@ -4562,17 +4606,17 @@ function vr({ autoWidth: e = !0, className: t, style: n }) {
|
|
|
4562
4606
|
w.appId
|
|
4563
4607
|
)) });
|
|
4564
4608
|
}
|
|
4565
|
-
function
|
|
4609
|
+
function xr({
|
|
4566
4610
|
pinnedAppIds: e,
|
|
4567
4611
|
className: t = "",
|
|
4568
4612
|
showIndicators: n = !0,
|
|
4569
4613
|
side: r = "left",
|
|
4570
4614
|
getBadge: o
|
|
4571
4615
|
}) {
|
|
4572
|
-
const { t: i } = re(), { isMobile: a } = it(), [c, l] =
|
|
4616
|
+
const { t: i } = re(), { isMobile: a } = it(), [c, l] = E(() => ne.getActiveAppId()), [u, f] = E(() => Q.getRunningApps());
|
|
4573
4617
|
D(() => {
|
|
4574
|
-
const p = ne.subscribe("activeAppId", (
|
|
4575
|
-
l(
|
|
4618
|
+
const p = ne.subscribe("activeAppId", (m) => {
|
|
4619
|
+
l(m);
|
|
4576
4620
|
});
|
|
4577
4621
|
return () => {
|
|
4578
4622
|
p();
|
|
@@ -4580,10 +4624,10 @@ function wr({
|
|
|
4580
4624
|
}, []), D(() => Q.subscribe(() => {
|
|
4581
4625
|
f(Q.getRunningApps());
|
|
4582
4626
|
}), []);
|
|
4583
|
-
const
|
|
4627
|
+
const g = (p) => {
|
|
4584
4628
|
c === p ? Q.setActiveApp(null) : Q.launchApp(p);
|
|
4585
|
-
}, d = e.map((p) => me.get(p)).filter((p) => !!p),
|
|
4586
|
-
const x = o == null ? void 0 : o(p,
|
|
4629
|
+
}, d = e.map((p) => me.get(p)).filter((p) => !!p), b = u.filter((p) => !e.includes(p.appId)).map((p) => ({ running: p, def: me.get(p.appId) })).filter((p) => !!p.def), S = (p) => u.some((m) => m.appId === p), v = (p) => p.titleKey ? String(i(p.titleKey)) : p.id, w = (p) => typeof p == "number" && p > 99 ? "99+" : p, k = (p, m) => {
|
|
4630
|
+
const x = o == null ? void 0 : o(p, m);
|
|
4587
4631
|
return x ? /* @__PURE__ */ s(
|
|
4588
4632
|
"span",
|
|
4589
4633
|
{
|
|
@@ -4595,34 +4639,34 @@ function wr({
|
|
|
4595
4639
|
}, h = a ? 24 : 28;
|
|
4596
4640
|
return /* @__PURE__ */ N("div", { className: `nc-app-taskbar ${a ? "nc-mobile" : "nc-desktop"} nc-${r} ${t}`, children: [
|
|
4597
4641
|
d.map((p) => {
|
|
4598
|
-
const
|
|
4642
|
+
const m = p.icon, x = c === p.id, y = S(p.id), M = { isActive: x, isRunning: y, isPinned: !0 };
|
|
4599
4643
|
return /* @__PURE__ */ N(
|
|
4600
4644
|
"button",
|
|
4601
4645
|
{
|
|
4602
|
-
className: `nc-app-taskbar-button ${x ? "nc-active" : ""} ${
|
|
4603
|
-
onClick: () =>
|
|
4646
|
+
className: `nc-app-taskbar-button ${x ? "nc-active" : ""} ${y ? "nc-running" : ""}`,
|
|
4647
|
+
onClick: () => g(p.id),
|
|
4604
4648
|
title: v(p),
|
|
4605
4649
|
children: [
|
|
4606
|
-
/* @__PURE__ */ s(
|
|
4607
|
-
|
|
4608
|
-
n &&
|
|
4650
|
+
/* @__PURE__ */ s(m, { size: h }),
|
|
4651
|
+
k(p, M),
|
|
4652
|
+
n && y && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
|
|
4609
4653
|
]
|
|
4610
4654
|
},
|
|
4611
4655
|
p.id
|
|
4612
4656
|
);
|
|
4613
4657
|
}),
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
const x =
|
|
4658
|
+
b.length > 0 && /* @__PURE__ */ s("div", { className: "nc-app-taskbar-separator" }),
|
|
4659
|
+
b.map(({ running: p, def: m }) => {
|
|
4660
|
+
const x = m.icon, y = c === p.appId, M = { isActive: y, isRunning: !0, isPinned: !1 };
|
|
4617
4661
|
return /* @__PURE__ */ N(
|
|
4618
4662
|
"button",
|
|
4619
4663
|
{
|
|
4620
|
-
className: `nc-app-taskbar-button ${
|
|
4621
|
-
onClick: () =>
|
|
4622
|
-
title: v(
|
|
4664
|
+
className: `nc-app-taskbar-button ${y ? "nc-active" : ""} nc-running`,
|
|
4665
|
+
onClick: () => g(p.appId),
|
|
4666
|
+
title: v(m),
|
|
4623
4667
|
children: [
|
|
4624
4668
|
/* @__PURE__ */ s(x, { size: h }),
|
|
4625
|
-
|
|
4669
|
+
k(m, M),
|
|
4626
4670
|
n && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
|
|
4627
4671
|
]
|
|
4628
4672
|
},
|
|
@@ -4631,7 +4675,7 @@ function wr({
|
|
|
4631
4675
|
})
|
|
4632
4676
|
] });
|
|
4633
4677
|
}
|
|
4634
|
-
function
|
|
4678
|
+
function kr({
|
|
4635
4679
|
appId: e,
|
|
4636
4680
|
open: t,
|
|
4637
4681
|
onClose: n,
|
|
@@ -4669,52 +4713,52 @@ function yr({
|
|
|
4669
4713
|
return Ae(c, document.body);
|
|
4670
4714
|
}
|
|
4671
4715
|
const De = ge(null), pt = ge(null);
|
|
4672
|
-
function
|
|
4716
|
+
function Nr() {
|
|
4673
4717
|
const e = ce(De);
|
|
4674
4718
|
if (!e)
|
|
4675
4719
|
throw new Error("useNavStack must be used within a NavStackProvider");
|
|
4676
4720
|
return e;
|
|
4677
4721
|
}
|
|
4678
|
-
function
|
|
4722
|
+
function Ar() {
|
|
4679
4723
|
const e = ce(pt);
|
|
4680
4724
|
if (!e)
|
|
4681
4725
|
throw new Error("useNavView must be used within NavStack");
|
|
4682
4726
|
return e;
|
|
4683
4727
|
}
|
|
4684
4728
|
const We = ge(null);
|
|
4685
|
-
function
|
|
4686
|
-
const { t: n } = re(), r =
|
|
4687
|
-
c((
|
|
4688
|
-
const
|
|
4689
|
-
return
|
|
4729
|
+
function Sr({ rootView: e, children: t }) {
|
|
4730
|
+
const { t: n } = re(), r = tn(), [o, i] = E([e]), [a, c] = E([null]), l = G((m, x) => {
|
|
4731
|
+
c((y) => {
|
|
4732
|
+
const M = [...y];
|
|
4733
|
+
return M[m] = x, M;
|
|
4690
4734
|
});
|
|
4691
|
-
}, []), u =
|
|
4735
|
+
}, []), u = G((m) => {
|
|
4692
4736
|
c((x) => {
|
|
4693
|
-
const
|
|
4694
|
-
return
|
|
4737
|
+
const y = [...x];
|
|
4738
|
+
return y[m] = null, y;
|
|
4695
4739
|
});
|
|
4696
|
-
}, []), f =
|
|
4697
|
-
i((x) => [...x,
|
|
4698
|
-
}, []),
|
|
4699
|
-
i((
|
|
4700
|
-
}, []), d =
|
|
4740
|
+
}, []), f = G((m) => {
|
|
4741
|
+
i((x) => [...x, m]), c((x) => [...x, null]);
|
|
4742
|
+
}, []), g = G(() => {
|
|
4743
|
+
i((m) => m.length <= 1 ? m : m.slice(0, -1)), c((m) => m.slice(0, -1));
|
|
4744
|
+
}, []), d = G(() => {
|
|
4701
4745
|
i([e]), c([null]);
|
|
4702
|
-
}, [e]),
|
|
4746
|
+
}, [e]), b = o.length, S = b > 1, v = o.length - 1, w = o[o.length - 1], k = w != null && w.titleKey ? n(w.titleKey) : (w == null ? void 0 : w.title) ?? "";
|
|
4703
4747
|
D(() => {
|
|
4704
|
-
r.setTitle(
|
|
4705
|
-
}, [
|
|
4706
|
-
|
|
4707
|
-
}, [
|
|
4708
|
-
const
|
|
4709
|
-
|
|
4748
|
+
r.setTitle(k);
|
|
4749
|
+
}, [k, r]), D(() => {
|
|
4750
|
+
S ? r.setBackHandler(g) : r.clearBackHandler();
|
|
4751
|
+
}, [S, g, r]), D(() => {
|
|
4752
|
+
const m = a[a.length - 1];
|
|
4753
|
+
m ? r.setToolbar(m) : r.clearToolbar();
|
|
4710
4754
|
}, [a, r]);
|
|
4711
4755
|
const h = {
|
|
4712
4756
|
push: f,
|
|
4713
|
-
pop:
|
|
4757
|
+
pop: g,
|
|
4714
4758
|
reset: d,
|
|
4715
|
-
depth:
|
|
4716
|
-
canGoBack:
|
|
4717
|
-
currentTitle:
|
|
4759
|
+
depth: b,
|
|
4760
|
+
canGoBack: S,
|
|
4761
|
+
currentTitle: k
|
|
4718
4762
|
}, p = {
|
|
4719
4763
|
stack: o,
|
|
4720
4764
|
toolbarStack: a,
|
|
@@ -4724,13 +4768,13 @@ function Nr({ rootView: e, children: t }) {
|
|
|
4724
4768
|
};
|
|
4725
4769
|
return /* @__PURE__ */ s(De.Provider, { value: h, children: /* @__PURE__ */ s(We.Provider, { value: p, children: t }) });
|
|
4726
4770
|
}
|
|
4727
|
-
function
|
|
4771
|
+
function Hn({ index: e, children: t }) {
|
|
4728
4772
|
const n = ce(We);
|
|
4729
4773
|
if (!n)
|
|
4730
4774
|
throw new Error("NavViewProvider must be used within NavStackProvider");
|
|
4731
|
-
const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n, a =
|
|
4775
|
+
const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n, a = G((u) => {
|
|
4732
4776
|
e === i && r(e, u);
|
|
4733
|
-
}, [e, i, r]), c =
|
|
4777
|
+
}, [e, i, r]), c = G(() => {
|
|
4734
4778
|
e === i && o(e);
|
|
4735
4779
|
}, [e, i, o]), l = {
|
|
4736
4780
|
setToolbar: a,
|
|
@@ -4738,14 +4782,14 @@ function Dn({ index: e, children: t }) {
|
|
|
4738
4782
|
};
|
|
4739
4783
|
return /* @__PURE__ */ s(pt.Provider, { value: l, children: t });
|
|
4740
4784
|
}
|
|
4741
|
-
function
|
|
4785
|
+
function Cr() {
|
|
4742
4786
|
const e = ce(De), t = ce(We);
|
|
4743
4787
|
if (!e || !t)
|
|
4744
4788
|
throw new Error("NavStackContainer must be used within a NavStackProvider");
|
|
4745
4789
|
const { stack: n } = t;
|
|
4746
4790
|
return /* @__PURE__ */ s("div", { className: "nav-stack-container", children: /* @__PURE__ */ s("div", { className: "nav-stack-content", children: n.map((r, o) => {
|
|
4747
4791
|
const i = o === n.length - 1;
|
|
4748
|
-
return /* @__PURE__ */ s(
|
|
4792
|
+
return /* @__PURE__ */ s(Hn, { index: o, children: /* @__PURE__ */ s(
|
|
4749
4793
|
"div",
|
|
4750
4794
|
{
|
|
4751
4795
|
style: { display: i ? "flex" : "none", flexDirection: "column", height: "100%" },
|
|
@@ -4756,54 +4800,54 @@ function Ar() {
|
|
|
4756
4800
|
}
|
|
4757
4801
|
export {
|
|
4758
4802
|
Qe as ActivityIndicator,
|
|
4759
|
-
|
|
4803
|
+
Un as Alert,
|
|
4760
4804
|
rt as AppContainer,
|
|
4761
4805
|
nt as AppContext,
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4806
|
+
kr as AppDialog,
|
|
4807
|
+
yr as AppPanel,
|
|
4808
|
+
xr as AppTaskbar,
|
|
4809
|
+
rn as AppTitleBar,
|
|
4810
|
+
qn as Battery,
|
|
4767
4811
|
te as Button,
|
|
4768
|
-
|
|
4769
|
-
|
|
4812
|
+
Xn as ButtonGroup,
|
|
4813
|
+
Jn as Checkbox,
|
|
4770
4814
|
Ze as CloseButton,
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4815
|
+
Qn as ComboBox,
|
|
4816
|
+
rr as ContextMenu,
|
|
4817
|
+
mr as CsvTextArea,
|
|
4818
|
+
or as Dialog,
|
|
4775
4819
|
fe as DialogClose,
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4820
|
+
er as EditButton,
|
|
4821
|
+
nr as Hyperlink,
|
|
4822
|
+
sr as Input,
|
|
4823
|
+
cr as ListGroup,
|
|
4824
|
+
ir as ListGroupItem,
|
|
4825
|
+
lr as MonthRangePicker,
|
|
4826
|
+
ar as MultiSelect,
|
|
4827
|
+
Cr as NavStackContainer,
|
|
4828
|
+
Sr as NavStackProvider,
|
|
4829
|
+
Xt as Notification,
|
|
4830
|
+
gr as NotificationContainer,
|
|
4831
|
+
dr as NumberInput,
|
|
4832
|
+
Zn as RefreshButton,
|
|
4833
|
+
ur as Slider,
|
|
4834
|
+
jt as TabPanel,
|
|
4835
|
+
pr as TabPanels,
|
|
4836
|
+
fr as Tabs,
|
|
4837
|
+
hr as Toggle,
|
|
4838
|
+
tr as TrashButton,
|
|
4839
|
+
wr as ViewportProvider,
|
|
4796
4840
|
me as appRegistry,
|
|
4797
4841
|
ne as appStateStore,
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4842
|
+
Wn as cn,
|
|
4843
|
+
vr as createAppI18nFactory,
|
|
4844
|
+
br as notificationManager,
|
|
4801
4845
|
Q as runningAppsStore,
|
|
4802
|
-
|
|
4803
|
-
|
|
4846
|
+
Jt as showNotification,
|
|
4847
|
+
tn as useApp,
|
|
4804
4848
|
Dt as useDialog,
|
|
4805
|
-
|
|
4806
|
-
|
|
4849
|
+
Nr as useNavStack,
|
|
4850
|
+
Ar as useNavView,
|
|
4807
4851
|
it as useViewport
|
|
4808
4852
|
};
|
|
4809
4853
|
//# sourceMappingURL=index.js.map
|