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