@kingsimba/nc-ui 0.1.18 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/index.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +42 -17
- package/dist/index.js +353 -318
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var Je = Object.defineProperty;
|
|
2
2
|
var Qe = (e, t, n) => t in e ? Je(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var _ = (e, t, n) => Qe(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { jsx as s, jsxs as y } from "react/jsx-runtime";
|
|
5
|
-
import
|
|
4
|
+
import { jsx as s, jsxs as y, Fragment as Ze } from "react/jsx-runtime";
|
|
5
|
+
import { d as xe, E as et, R as tt, T as nt, g as rt, V as ot, b as st, a as it, c as ct } from "./GeneratedIcons-HFZmBTBT.js";
|
|
6
|
+
import ke, { useState as z, useRef as W, useMemo as ge, useEffect as B, createContext as se, useContext as X, Children as at, isValidElement as lt, forwardRef as dt, useImperativeHandle as ut, useCallback as O, Suspense as pt } from "react";
|
|
6
7
|
import { createPortal as pe } from "react-dom";
|
|
7
8
|
import { useTranslation as J } from "react-i18next";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { c as ft } from "./clsx-OuTLNxxd.js";
|
|
9
|
+
import ft from "i18next";
|
|
10
|
+
import { c as ht } from "./clsx-OuTLNxxd.js";
|
|
11
11
|
function Be({
|
|
12
12
|
size: e = "default",
|
|
13
13
|
color: t,
|
|
@@ -79,24 +79,54 @@ function Y({ variant: e = "default", block: t, size: n = "default", className: r
|
|
|
79
79
|
}
|
|
80
80
|
);
|
|
81
81
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
const mt = {
|
|
83
|
+
info: "primary",
|
|
84
|
+
success: "success",
|
|
85
|
+
warning: "warning",
|
|
86
|
+
error: "danger",
|
|
87
|
+
danger: "danger"
|
|
88
|
+
};
|
|
89
|
+
function $n({
|
|
90
|
+
code: e,
|
|
91
|
+
text: t,
|
|
92
|
+
type: n,
|
|
93
|
+
button: r,
|
|
94
|
+
onAction: o,
|
|
95
|
+
children: i,
|
|
96
|
+
onClose: l,
|
|
97
|
+
className: a = "",
|
|
98
|
+
style: d
|
|
99
|
+
}) {
|
|
100
|
+
const p = i ?? /* @__PURE__ */ y(Ze, { children: [
|
|
101
|
+
e !== void 0 && /* @__PURE__ */ s("span", { className: "nc-alert-code", children: e }),
|
|
102
|
+
t
|
|
103
|
+
] });
|
|
104
|
+
return /* @__PURE__ */ y("div", { className: `nc-alert nc-${n} ${a}`.trim(), style: d, children: [
|
|
105
|
+
/* @__PURE__ */ y("div", { className: "nc-alert-main", children: [
|
|
106
|
+
/* @__PURE__ */ s("div", { className: `nc-alert-message nc-${n}`, children: p }),
|
|
107
|
+
l && /* @__PURE__ */ s(
|
|
108
|
+
"button",
|
|
109
|
+
{
|
|
110
|
+
type: "button",
|
|
111
|
+
className: "nc-alert-close",
|
|
112
|
+
"aria-label": "Close alert",
|
|
113
|
+
onClick: l,
|
|
114
|
+
children: /* @__PURE__ */ s(xe, { size: 16 })
|
|
115
|
+
}
|
|
116
|
+
)
|
|
87
117
|
] }),
|
|
88
118
|
r && /* @__PURE__ */ s("span", { className: "nc-alert-action", children: /* @__PURE__ */ s(
|
|
89
119
|
Y,
|
|
90
120
|
{
|
|
91
121
|
size: "small",
|
|
92
|
-
variant: r.variant ??
|
|
122
|
+
variant: r.variant ?? mt[n],
|
|
93
123
|
onClick: o,
|
|
94
124
|
children: r.text
|
|
95
125
|
}
|
|
96
126
|
) })
|
|
97
127
|
] });
|
|
98
128
|
}
|
|
99
|
-
function
|
|
129
|
+
function Rn({
|
|
100
130
|
percentage: e = 0.5,
|
|
101
131
|
status: t = "discharging",
|
|
102
132
|
darkMode: n = !1,
|
|
@@ -105,21 +135,21 @@ function In({
|
|
|
105
135
|
const o = Math.max(0, Math.min(1, Number(e) || 0));
|
|
106
136
|
let i;
|
|
107
137
|
r ? o < 0.1 ? i = "var(--nc-danger)" : o < 0.2 ? i = "var(--nc-warning)" : i = "var(--nc-success)" : i = n ? "#ffffff" : "#000000";
|
|
108
|
-
const l = n ? "rgba(255, 255, 255, 0.5)" : "rgba(0, 0, 0, 0.2)", a = 24, d = 14, p = 2, f = 0, g = 12, c = 0, u = 0, w = 0, m = a, v = d, N = v - c * 2, h = m - c * 2, k = Math.max(1, Math.min(4, v / 4)), b = o === 0 ? 0 : 0.05 + o * 0.95,
|
|
138
|
+
const l = n ? "rgba(255, 255, 255, 0.5)" : "rgba(0, 0, 0, 0.2)", a = 24, d = 14, p = 2, f = 0, g = 12, c = 0, u = 0, w = 0, m = a, v = d, N = v - c * 2, h = m - c * 2, k = Math.max(1, Math.min(4, v / 4)), b = o === 0 ? 0 : 0.05 + o * 0.95, C = a + p + g, R = 20, I = 0.65, T = Math.max(d, R * I), x = a + p + 1, E = (d - R * I) / 2;
|
|
109
139
|
return /* @__PURE__ */ y(
|
|
110
140
|
"svg",
|
|
111
141
|
{
|
|
112
142
|
className: "nc-battery",
|
|
113
|
-
width:
|
|
114
|
-
height:
|
|
115
|
-
viewBox: `0 0 ${
|
|
143
|
+
width: C,
|
|
144
|
+
height: T,
|
|
145
|
+
viewBox: `0 0 ${C} ${T}`,
|
|
116
146
|
role: "img",
|
|
117
147
|
"aria-label": `Battery ${o === 0 ? "-" : Math.round(o * 100) + "%"} ${t}`,
|
|
118
148
|
children: [
|
|
119
149
|
/* @__PURE__ */ y("defs", { children: [
|
|
120
150
|
/* @__PURE__ */ s("mask", { id: `nc-battery-fill-mask-${o}`, children: /* @__PURE__ */ s("rect", { x: "0", y: "0", width: h * b, height: N, fill: "white" }) }),
|
|
121
151
|
/* @__PURE__ */ y("mask", { id: `nc-battery-text-mask-${o}`, children: [
|
|
122
|
-
/* @__PURE__ */ s("rect", { x: "0", y: "0", width:
|
|
152
|
+
/* @__PURE__ */ s("rect", { x: "0", y: "0", width: C, height: T, fill: "white" }),
|
|
123
153
|
/* @__PURE__ */ s("text", { x: u + m / 2, y: d - 3, fontSize: 11, fontWeight: "bold", fill: "black", textAnchor: "middle", children: o === 0 ? "-" : Math.round(o * 100) })
|
|
124
154
|
] })
|
|
125
155
|
] }),
|
|
@@ -167,7 +197,7 @@ function In({
|
|
|
167
197
|
}
|
|
168
198
|
);
|
|
169
199
|
}
|
|
170
|
-
function
|
|
200
|
+
function En({
|
|
171
201
|
value: e,
|
|
172
202
|
onChange: t,
|
|
173
203
|
options: n,
|
|
@@ -186,7 +216,7 @@ function Mn({
|
|
|
186
216
|
l
|
|
187
217
|
)) });
|
|
188
218
|
}
|
|
189
|
-
function
|
|
219
|
+
function gt({ size: e }) {
|
|
190
220
|
return /* @__PURE__ */ s("svg", { className: `nc-checkbox-icon ${e === "small" ? "nc-small" : ""}`, viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ s(
|
|
191
221
|
"path",
|
|
192
222
|
{
|
|
@@ -198,7 +228,7 @@ function ht({ size: e }) {
|
|
|
198
228
|
}
|
|
199
229
|
) });
|
|
200
230
|
}
|
|
201
|
-
function
|
|
231
|
+
function zn({ checked: e, onChange: t, disabled: n, label: r, size: o = "default", labelColor: i, style: l, className: a = "" }) {
|
|
202
232
|
const d = o === "small";
|
|
203
233
|
return /* @__PURE__ */ y(
|
|
204
234
|
"label",
|
|
@@ -219,7 +249,7 @@ function $n({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
|
|
|
219
249
|
onKeyDown: (p) => {
|
|
220
250
|
n || (p.key === "Enter" || p.key === " ") && (p.preventDefault(), t(!e));
|
|
221
251
|
},
|
|
222
|
-
children: e && /* @__PURE__ */ s(
|
|
252
|
+
children: e && /* @__PURE__ */ s(gt, { size: o })
|
|
223
253
|
}
|
|
224
254
|
),
|
|
225
255
|
r && /* @__PURE__ */ s("span", { className: "nc-checkbox-text", style: i ? { color: i } : void 0, children: r })
|
|
@@ -227,7 +257,7 @@ function $n({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
|
|
|
227
257
|
}
|
|
228
258
|
);
|
|
229
259
|
}
|
|
230
|
-
function
|
|
260
|
+
function bt({ option: e, onChange: t, selected: n, highlighted: r, small: o }) {
|
|
231
261
|
const i = W(null), { t: l } = J();
|
|
232
262
|
return B(() => {
|
|
233
263
|
r && i.current && i.current.scrollIntoView({ block: "nearest" });
|
|
@@ -254,7 +284,7 @@ function mt({ option: e, onChange: t, selected: n, highlighted: r, small: o }) {
|
|
|
254
284
|
}
|
|
255
285
|
);
|
|
256
286
|
}
|
|
257
|
-
function
|
|
287
|
+
function vt({
|
|
258
288
|
isOpen: e,
|
|
259
289
|
options: t,
|
|
260
290
|
onSelect: n,
|
|
@@ -264,7 +294,7 @@ function gt({
|
|
|
264
294
|
small: l,
|
|
265
295
|
highlightedIndex: a = -1
|
|
266
296
|
}) {
|
|
267
|
-
const [d, p] =
|
|
297
|
+
const [d, p] = z({ top: 0, left: 0, width: 0 }), [f, g] = z(o), { t: c } = J();
|
|
268
298
|
if (B(() => {
|
|
269
299
|
if (e && i.current) {
|
|
270
300
|
const w = i.current.getBoundingClientRect();
|
|
@@ -294,12 +324,12 @@ function gt({
|
|
|
294
324
|
maxHeight: 300,
|
|
295
325
|
overflowY: "auto"
|
|
296
326
|
},
|
|
297
|
-
children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${l ? "nc-small" : ""}`, children: c("common.noResults") }) : t.map((w, m) => /* @__PURE__ */ s(
|
|
327
|
+
children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${l ? "nc-small" : ""}`, children: c("common.noResults") }) : t.map((w, m) => /* @__PURE__ */ s(bt, { option: w, onChange: n, selected: w.value === r, highlighted: m === a, small: l }, w.value))
|
|
298
328
|
}
|
|
299
329
|
);
|
|
300
330
|
return pe(u, document.body);
|
|
301
331
|
}
|
|
302
|
-
function
|
|
332
|
+
function wt({ onClick: e, small: t }) {
|
|
303
333
|
return /* @__PURE__ */ s(
|
|
304
334
|
"button",
|
|
305
335
|
{
|
|
@@ -311,7 +341,7 @@ function bt({ onClick: e, small: t }) {
|
|
|
311
341
|
}
|
|
312
342
|
);
|
|
313
343
|
}
|
|
314
|
-
function
|
|
344
|
+
function yt({ open: e, onClick: t, small: n }) {
|
|
315
345
|
return /* @__PURE__ */ s(
|
|
316
346
|
"button",
|
|
317
347
|
{
|
|
@@ -323,7 +353,7 @@ function vt({ open: e, onClick: t, small: n }) {
|
|
|
323
353
|
}
|
|
324
354
|
);
|
|
325
355
|
}
|
|
326
|
-
function
|
|
356
|
+
function Tn({
|
|
327
357
|
value: e,
|
|
328
358
|
onChange: t,
|
|
329
359
|
placeholder: n = "Select…",
|
|
@@ -337,7 +367,7 @@ function Rn({
|
|
|
337
367
|
style: f,
|
|
338
368
|
className: g
|
|
339
369
|
}) {
|
|
340
|
-
const [c, u] =
|
|
370
|
+
const [c, u] = z(!1), [w, m] = z(""), [v, N] = z(-1), h = W(null), k = W(null), b = p === "small", { t: C } = J(), R = ge(() => {
|
|
341
371
|
const $ = w.toLowerCase();
|
|
342
372
|
return a ? r.filter((P) => P.label.toLowerCase().includes($)) : r;
|
|
343
373
|
}, [r, w, a]);
|
|
@@ -355,10 +385,10 @@ function Rn({
|
|
|
355
385
|
}
|
|
356
386
|
return document.addEventListener("mousedown", $), () => document.removeEventListener("mousedown", $);
|
|
357
387
|
}, []);
|
|
358
|
-
const I = r.find(($) => $.value === e),
|
|
388
|
+
const I = r.find(($) => $.value === e), T = I && l, x = !o && !T, E = !(c && a) && !!I, A = ($, P = !1) => {
|
|
359
389
|
var H;
|
|
360
390
|
t == null || t($), u(!1), m(""), P && ((H = h.current) == null || H.blur());
|
|
361
|
-
},
|
|
391
|
+
}, S = () => {
|
|
362
392
|
t == null || t(void 0), m(""), u(!1);
|
|
363
393
|
}, L = ($) => {
|
|
364
394
|
if (!c) {
|
|
@@ -419,7 +449,7 @@ function Rn({
|
|
|
419
449
|
readOnly: o || !a,
|
|
420
450
|
style: {
|
|
421
451
|
width: "100%",
|
|
422
|
-
paddingRight: x ||
|
|
452
|
+
paddingRight: x || T ? b ? 32 : 44 : 12,
|
|
423
453
|
caretColor: a ? void 0 : "transparent",
|
|
424
454
|
cursor: a ? void 0 : "pointer",
|
|
425
455
|
userSelect: a ? void 0 : "none",
|
|
@@ -434,7 +464,7 @@ function Rn({
|
|
|
434
464
|
style: {
|
|
435
465
|
position: "absolute",
|
|
436
466
|
left: b ? 8 : 12,
|
|
437
|
-
right: x ||
|
|
467
|
+
right: x || T ? b ? 12 : 24 : b ? 8 : 12,
|
|
438
468
|
top: "50%",
|
|
439
469
|
transform: "translateY(-50%)",
|
|
440
470
|
pointerEvents: "none",
|
|
@@ -449,21 +479,21 @@ function Rn({
|
|
|
449
479
|
/* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${b ? "nc-small" : ""}`, children: I == null ? void 0 : I.label }),
|
|
450
480
|
(I == null ? void 0 : I.default) && /* @__PURE__ */ y("span", { className: `nc-combo-overlay-default ${b ? "nc-small" : ""}`, children: [
|
|
451
481
|
"(",
|
|
452
|
-
|
|
482
|
+
C("common.default"),
|
|
453
483
|
")"
|
|
454
484
|
] })
|
|
455
485
|
]
|
|
456
486
|
}
|
|
457
487
|
),
|
|
458
|
-
|
|
459
|
-
x && /* @__PURE__ */ s(
|
|
488
|
+
T && /* @__PURE__ */ s(wt, { onClick: S, small: b }),
|
|
489
|
+
x && /* @__PURE__ */ s(yt, { open: c, onClick: () => u(($) => !$), small: b })
|
|
460
490
|
]
|
|
461
491
|
}
|
|
462
492
|
),
|
|
463
|
-
/* @__PURE__ */ s(
|
|
493
|
+
/* @__PURE__ */ s(vt, { isOpen: c, options: R, onSelect: A, selectedValue: e, placement: d, anchorRef: k, small: b, highlightedIndex: v })
|
|
464
494
|
] });
|
|
465
495
|
}
|
|
466
|
-
function
|
|
496
|
+
function Pn({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default", title: o, "aria-label": i }) {
|
|
467
497
|
return /* @__PURE__ */ s(
|
|
468
498
|
"button",
|
|
469
499
|
{
|
|
@@ -473,7 +503,7 @@ function En({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default"
|
|
|
473
503
|
title: o ?? (t ? "Refreshing..." : "Refresh"),
|
|
474
504
|
"aria-label": i ?? (t ? "Refreshing" : "Refresh"),
|
|
475
505
|
"data-size": r,
|
|
476
|
-
children: /* @__PURE__ */ s(
|
|
506
|
+
children: /* @__PURE__ */ s(tt, { size: r === "small" ? 14 : r === "large" ? 20 : 18, className: t ? "nc-spinning" : "" })
|
|
477
507
|
}
|
|
478
508
|
);
|
|
479
509
|
}
|
|
@@ -487,11 +517,11 @@ function De({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Clo
|
|
|
487
517
|
title: r,
|
|
488
518
|
"aria-label": o,
|
|
489
519
|
"data-size": n,
|
|
490
|
-
children: /* @__PURE__ */ s(
|
|
520
|
+
children: /* @__PURE__ */ s(xe, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
|
|
491
521
|
}
|
|
492
522
|
);
|
|
493
523
|
}
|
|
494
|
-
function
|
|
524
|
+
function Ln({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Edit", "aria-label": o = "Edit" }) {
|
|
495
525
|
return /* @__PURE__ */ s(
|
|
496
526
|
"button",
|
|
497
527
|
{
|
|
@@ -501,11 +531,11 @@ function Tn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Edi
|
|
|
501
531
|
title: r,
|
|
502
532
|
"aria-label": o,
|
|
503
533
|
"data-size": n,
|
|
504
|
-
children: /* @__PURE__ */ s(
|
|
534
|
+
children: /* @__PURE__ */ s(et, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
|
|
505
535
|
}
|
|
506
536
|
);
|
|
507
537
|
}
|
|
508
|
-
function
|
|
538
|
+
function Bn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Delete", "aria-label": o = "Delete" }) {
|
|
509
539
|
return /* @__PURE__ */ s(
|
|
510
540
|
"button",
|
|
511
541
|
{
|
|
@@ -515,11 +545,11 @@ function zn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Del
|
|
|
515
545
|
title: r,
|
|
516
546
|
"aria-label": o,
|
|
517
547
|
"data-size": n,
|
|
518
|
-
children: /* @__PURE__ */ s(
|
|
548
|
+
children: /* @__PURE__ */ s(nt, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
|
|
519
549
|
}
|
|
520
550
|
);
|
|
521
551
|
}
|
|
522
|
-
function
|
|
552
|
+
function Dn({ onClick: e, disabled: t = !1, children: n, title: r, "aria-label": o, size: i = "default" }) {
|
|
523
553
|
return /* @__PURE__ */ s(
|
|
524
554
|
"button",
|
|
525
555
|
{
|
|
@@ -533,7 +563,7 @@ function Pn({ onClick: e, disabled: t = !1, children: n, title: r, "aria-label":
|
|
|
533
563
|
}
|
|
534
564
|
);
|
|
535
565
|
}
|
|
536
|
-
function
|
|
566
|
+
function Hn({
|
|
537
567
|
open: e,
|
|
538
568
|
onClose: t,
|
|
539
569
|
options: n,
|
|
@@ -541,7 +571,7 @@ function Ln({
|
|
|
541
571
|
anchor: o,
|
|
542
572
|
preferredDirection: i = "down"
|
|
543
573
|
}) {
|
|
544
|
-
const l = W(null), [a, d] =
|
|
574
|
+
const l = W(null), [a, d] = z({ top: 0, left: 0 }), p = o || (r == null ? void 0 : r.current);
|
|
545
575
|
if (B(() => {
|
|
546
576
|
if (!e || !p || !l.current) return;
|
|
547
577
|
const c = p.getBoundingClientRect(), u = l.current.getBoundingClientRect(), w = window.innerHeight, m = window.innerWidth, v = c.bottom + 8, N = v + u.height <= w - 8;
|
|
@@ -620,19 +650,19 @@ function Ln({
|
|
|
620
650
|
);
|
|
621
651
|
}
|
|
622
652
|
const He = se(null);
|
|
623
|
-
function
|
|
653
|
+
function xt() {
|
|
624
654
|
const e = X(He);
|
|
625
655
|
if (!e)
|
|
626
656
|
throw new Error("useDialog must be used inside a Dialog component");
|
|
627
657
|
return e;
|
|
628
658
|
}
|
|
629
659
|
function ne({ children: e, onClick: t, ...n }) {
|
|
630
|
-
const { close: r } =
|
|
660
|
+
const { close: r } = xt(), { t: o } = J();
|
|
631
661
|
return /* @__PURE__ */ s(Y, { onClick: (l) => {
|
|
632
662
|
t == null || t(l), r();
|
|
633
663
|
}, ...n, children: e ?? o("common.close") });
|
|
634
664
|
}
|
|
635
|
-
function
|
|
665
|
+
function Wn({
|
|
636
666
|
open: e,
|
|
637
667
|
onClose: t,
|
|
638
668
|
title: n,
|
|
@@ -652,7 +682,7 @@ function Bn({
|
|
|
652
682
|
className: v = "",
|
|
653
683
|
onContentHeightChange: N
|
|
654
684
|
}) {
|
|
655
|
-
const h = W(null), k = W(null), { t: b } = J(),
|
|
685
|
+
const h = W(null), k = W(null), { t: b } = J(), C = { close: t }, R = (x) => {
|
|
656
686
|
c && x.target === x.currentTarget && t();
|
|
657
687
|
};
|
|
658
688
|
if (B(() => {
|
|
@@ -661,8 +691,8 @@ function Bn({
|
|
|
661
691
|
if (!N || !k.current) return;
|
|
662
692
|
const x = new ResizeObserver((E) => {
|
|
663
693
|
for (const A of E) {
|
|
664
|
-
const
|
|
665
|
-
N(
|
|
694
|
+
const S = A.contentRect.height;
|
|
695
|
+
N(S);
|
|
666
696
|
}
|
|
667
697
|
});
|
|
668
698
|
return x.observe(k.current), () => {
|
|
@@ -704,7 +734,7 @@ function Bn({
|
|
|
704
734
|
default:
|
|
705
735
|
return null;
|
|
706
736
|
}
|
|
707
|
-
},
|
|
737
|
+
}, T = /* @__PURE__ */ s(He.Provider, { value: C, children: /* @__PURE__ */ s("div", { className: `nc-dialog-overlay${w ? " nc-fullscreen" : ""}`, onClick: R, children: /* @__PURE__ */ y(
|
|
708
738
|
"div",
|
|
709
739
|
{
|
|
710
740
|
ref: h,
|
|
@@ -724,9 +754,9 @@ function Bn({
|
|
|
724
754
|
]
|
|
725
755
|
}
|
|
726
756
|
) }) });
|
|
727
|
-
return w ? pe(
|
|
757
|
+
return w ? pe(T, document.body) : T;
|
|
728
758
|
}
|
|
729
|
-
function
|
|
759
|
+
function kt({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
|
|
730
760
|
const r = t === "small" ? 28 : 34;
|
|
731
761
|
return /* @__PURE__ */ s(
|
|
732
762
|
"button",
|
|
@@ -755,7 +785,7 @@ function yt({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
|
|
|
755
785
|
}
|
|
756
786
|
);
|
|
757
787
|
}
|
|
758
|
-
function
|
|
788
|
+
function Nt({ visible: e, onClick: t, size: n = "default" }) {
|
|
759
789
|
const r = n === "small" ? 28 : 34, o = n === "small" ? 16 : 18;
|
|
760
790
|
return /* @__PURE__ */ s(
|
|
761
791
|
"button",
|
|
@@ -779,11 +809,11 @@ function xt({ visible: e, onClick: t, size: n = "default" }) {
|
|
|
779
809
|
alignItems: "center",
|
|
780
810
|
justifyContent: "center"
|
|
781
811
|
},
|
|
782
|
-
children: e ? /* @__PURE__ */ s(
|
|
812
|
+
children: e ? /* @__PURE__ */ s(rt, { size: o }) : /* @__PURE__ */ s(ot, { size: o })
|
|
783
813
|
}
|
|
784
814
|
);
|
|
785
815
|
}
|
|
786
|
-
function
|
|
816
|
+
function On({
|
|
787
817
|
value: e,
|
|
788
818
|
defaultValue: t = "",
|
|
789
819
|
onChange: n,
|
|
@@ -803,22 +833,22 @@ function Dn({
|
|
|
803
833
|
validator: v,
|
|
804
834
|
showErrorMessage: N = !0
|
|
805
835
|
}) {
|
|
806
|
-
const h = W(null), k = W(null), [b,
|
|
836
|
+
const h = W(null), k = W(null), [b, C] = z(!1), [R, I] = z(!1), T = e !== void 0, [x, E] = z(t), A = T ? e : x, S = v ? v(A) : null, L = !!S, $ = p === "password", P = $ && u && !l && !w, H = d && A && !l && R, ee = g === "small" ? 32 : 44;
|
|
807
837
|
let K = 12;
|
|
808
838
|
H && P ? K = ee * 2 : (H || P) && (K = ee);
|
|
809
839
|
const Q = () => {
|
|
810
840
|
var te, ae;
|
|
811
|
-
|
|
841
|
+
T || E(""), n == null || n(""), o == null || o(), w ? (te = k.current) == null || te.focus() : (ae = h.current) == null || ae.focus();
|
|
812
842
|
}, ce = (te) => {
|
|
813
843
|
te.key === "Enter" && !w && (r == null || r());
|
|
814
844
|
}, F = (te) => {
|
|
815
845
|
const ae = te.target.value;
|
|
816
|
-
|
|
846
|
+
T || E(ae), n == null || n(ae);
|
|
817
847
|
}, Se = () => {
|
|
818
848
|
I(!0);
|
|
819
|
-
},
|
|
849
|
+
}, Ie = () => {
|
|
820
850
|
I(!1);
|
|
821
|
-
},
|
|
851
|
+
}, Me = `nc-input ${g === "small" ? "nc-small " : ""} ${L ? "nc-error " : ""}${f}`;
|
|
822
852
|
return /* @__PURE__ */ y("div", { className: "nc-col", style: { position: "relative", flex: 1, ...c }, children: [
|
|
823
853
|
a && /* @__PURE__ */ s("span", { className: "nc-label", children: a }),
|
|
824
854
|
/* @__PURE__ */ y("div", { style: { position: "relative", display: "flex", alignItems: w ? "flex-start" : "center" }, children: [
|
|
@@ -826,13 +856,13 @@ function Dn({
|
|
|
826
856
|
"textarea",
|
|
827
857
|
{
|
|
828
858
|
ref: k,
|
|
829
|
-
className:
|
|
859
|
+
className: Me,
|
|
830
860
|
placeholder: i,
|
|
831
861
|
value: A,
|
|
832
862
|
onChange: F,
|
|
833
863
|
onKeyDown: ce,
|
|
834
864
|
onFocus: Se,
|
|
835
|
-
onBlur:
|
|
865
|
+
onBlur: Ie,
|
|
836
866
|
readOnly: l,
|
|
837
867
|
"aria-disabled": l,
|
|
838
868
|
tabIndex: l ? -1 : void 0,
|
|
@@ -847,13 +877,13 @@ function Dn({
|
|
|
847
877
|
{
|
|
848
878
|
ref: h,
|
|
849
879
|
type: $ && b ? "text" : p,
|
|
850
|
-
className:
|
|
880
|
+
className: Me,
|
|
851
881
|
placeholder: i,
|
|
852
882
|
value: A,
|
|
853
883
|
onChange: F,
|
|
854
884
|
onKeyDown: ce,
|
|
855
885
|
onFocus: Se,
|
|
856
|
-
onBlur:
|
|
886
|
+
onBlur: Ie,
|
|
857
887
|
readOnly: l,
|
|
858
888
|
"aria-disabled": l,
|
|
859
889
|
tabIndex: l ? -1 : void 0,
|
|
@@ -863,20 +893,20 @@ function Dn({
|
|
|
863
893
|
}
|
|
864
894
|
}
|
|
865
895
|
),
|
|
866
|
-
H && /* @__PURE__ */ s(
|
|
867
|
-
P && /* @__PURE__ */ s(
|
|
896
|
+
H && /* @__PURE__ */ s(kt, { onClick: Q, size: g, rightOffset: P ? ee + 4 : 4 }),
|
|
897
|
+
P && /* @__PURE__ */ s(Nt, { visible: b, onClick: () => C(!b), size: g })
|
|
868
898
|
] }),
|
|
869
|
-
L && N && /* @__PURE__ */ s("span", { className: "nc-error-message", children:
|
|
899
|
+
L && N && /* @__PURE__ */ s("span", { className: "nc-error-message", children: S })
|
|
870
900
|
] });
|
|
871
901
|
}
|
|
872
|
-
function
|
|
902
|
+
function Fn({
|
|
873
903
|
children: e,
|
|
874
904
|
onClick: t,
|
|
875
905
|
showBorder: n = !0,
|
|
876
906
|
selectable: r = !1,
|
|
877
907
|
style: o
|
|
878
908
|
}) {
|
|
879
|
-
const [i, l] =
|
|
909
|
+
const [i, l] = ke.useState(!1);
|
|
880
910
|
return /* @__PURE__ */ s(
|
|
881
911
|
"div",
|
|
882
912
|
{
|
|
@@ -904,7 +934,7 @@ function Hn({
|
|
|
904
934
|
}
|
|
905
935
|
);
|
|
906
936
|
}
|
|
907
|
-
function
|
|
937
|
+
function Vn({ title: e, titleTools: t, children: n, style: r }) {
|
|
908
938
|
return /* @__PURE__ */ y("div", { className: "nc-list-group", style: r, children: [
|
|
909
939
|
(e || t) && /* @__PURE__ */ y("div", { className: "nc-list-group-title", children: [
|
|
910
940
|
/* @__PURE__ */ s("div", { children: e }),
|
|
@@ -919,8 +949,8 @@ function Wn({ title: e, titleTools: t, children: n, style: r }) {
|
|
|
919
949
|
)
|
|
920
950
|
] });
|
|
921
951
|
}
|
|
922
|
-
function
|
|
923
|
-
const [i, l] =
|
|
952
|
+
function Gn({ values: e, onChange: t, options: n, placeholder: r = "Select…", label: o }) {
|
|
953
|
+
const [i, l] = z(!1), [a, d] = z(""), p = W(null), f = ge(() => n.filter((c) => c.label.toLowerCase().includes(a.toLowerCase())), [n, a]);
|
|
924
954
|
B(() => {
|
|
925
955
|
function c(u) {
|
|
926
956
|
!(u.target instanceof Node) || !p.current || p.current.contains(u.target) || l(!1);
|
|
@@ -993,18 +1023,18 @@ function ue(e) {
|
|
|
993
1023
|
}
|
|
994
1024
|
return `${n}-${r}`;
|
|
995
1025
|
}
|
|
996
|
-
function
|
|
1026
|
+
function $e(e) {
|
|
997
1027
|
if (!e) return "";
|
|
998
1028
|
const t = ue(e);
|
|
999
1029
|
if (!/^\d{4}-\d{2}$/.test(t)) return e;
|
|
1000
1030
|
const [n, r] = t.split("-");
|
|
1001
1031
|
return `${n}/${r}`;
|
|
1002
1032
|
}
|
|
1003
|
-
function
|
|
1033
|
+
function Re() {
|
|
1004
1034
|
const e = /* @__PURE__ */ new Date(), t = e.getFullYear(), n = String(e.getMonth() + 1).padStart(2, "0");
|
|
1005
1035
|
return `${t}-${n}`;
|
|
1006
1036
|
}
|
|
1007
|
-
function
|
|
1037
|
+
function Yn({
|
|
1008
1038
|
startMonth: e,
|
|
1009
1039
|
endMonth: t,
|
|
1010
1040
|
onChange: n,
|
|
@@ -1013,7 +1043,7 @@ function Fn({
|
|
|
1013
1043
|
disabled: i = !1,
|
|
1014
1044
|
size: l = "default"
|
|
1015
1045
|
}) {
|
|
1016
|
-
const [a, d] =
|
|
1046
|
+
const [a, d] = z(!1), [p, f] = z(""), [g, c] = z(""), [u, w] = z({ top: 0, left: 0, width: 0, right: void 0 }), m = W(null), v = W(null);
|
|
1017
1047
|
B(() => {
|
|
1018
1048
|
if (a && m.current) {
|
|
1019
1049
|
const A = m.current.getBoundingClientRect(), L = Math.max(A.width, 400);
|
|
@@ -1032,22 +1062,22 @@ function Fn({
|
|
|
1032
1062
|
}
|
|
1033
1063
|
}, [a]), B(() => {
|
|
1034
1064
|
if (!a) return;
|
|
1035
|
-
const A = (
|
|
1036
|
-
m.current && !m.current.contains(
|
|
1065
|
+
const A = (S) => {
|
|
1066
|
+
m.current && !m.current.contains(S.target) && v.current && !v.current.contains(S.target) && d(!1);
|
|
1037
1067
|
};
|
|
1038
1068
|
return document.addEventListener("mousedown", A), () => document.removeEventListener("mousedown", A);
|
|
1039
1069
|
}, [a]);
|
|
1040
1070
|
const N = () => {
|
|
1041
|
-
f(e ||
|
|
1071
|
+
f(e || Re()), c(t || Re()), d(!0);
|
|
1042
1072
|
}, h = () => {
|
|
1043
1073
|
d(!1);
|
|
1044
1074
|
}, k = () => {
|
|
1045
|
-
const A = fe(p),
|
|
1046
|
-
if (A ||
|
|
1075
|
+
const A = fe(p), S = fe(g);
|
|
1076
|
+
if (A || S)
|
|
1047
1077
|
return;
|
|
1048
1078
|
const L = ue(p), $ = ue(g);
|
|
1049
1079
|
L && $ && (n == null || n(L, $)), d(!1);
|
|
1050
|
-
}, b = e && t ? `${
|
|
1080
|
+
}, b = e && t ? `${$e(e)} - ${$e(t)}` : "Select month range", C = fe(p), R = fe(g), I = ue(p), T = ue(g), x = I && T && I > T, E = a ? pe(
|
|
1051
1081
|
/* @__PURE__ */ s(
|
|
1052
1082
|
"div",
|
|
1053
1083
|
{
|
|
@@ -1068,13 +1098,13 @@ function Fn({
|
|
|
1068
1098
|
"input",
|
|
1069
1099
|
{
|
|
1070
1100
|
type: "text",
|
|
1071
|
-
className: `nc-month-input ${
|
|
1101
|
+
className: `nc-month-input ${C ? "nc-error" : ""}`,
|
|
1072
1102
|
value: p,
|
|
1073
1103
|
onChange: (A) => f(A.target.value),
|
|
1074
1104
|
placeholder: "YY-M(M) or YYYY-M(M)"
|
|
1075
1105
|
}
|
|
1076
1106
|
),
|
|
1077
|
-
|
|
1107
|
+
C && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: C })
|
|
1078
1108
|
] }),
|
|
1079
1109
|
/* @__PURE__ */ y("div", { className: "nc-month-range-picker-column", children: [
|
|
1080
1110
|
/* @__PURE__ */ s("label", { className: "nc-label", children: "End Month" }),
|
|
@@ -1091,14 +1121,14 @@ function Fn({
|
|
|
1091
1121
|
R && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: R })
|
|
1092
1122
|
] })
|
|
1093
1123
|
] }),
|
|
1094
|
-
x && !
|
|
1124
|
+
x && !C && !R && /* @__PURE__ */ s("div", { className: "nc-month-range-error", children: "End month must be after or equal to start month" }),
|
|
1095
1125
|
/* @__PURE__ */ y("div", { className: "nc-month-range-picker-footer", children: [
|
|
1096
1126
|
/* @__PURE__ */ s(
|
|
1097
1127
|
Y,
|
|
1098
1128
|
{
|
|
1099
1129
|
variant: "primary",
|
|
1100
1130
|
onClick: k,
|
|
1101
|
-
disabled: !p || !g || !!
|
|
1131
|
+
disabled: !p || !g || !!C || !!R || !!x,
|
|
1102
1132
|
children: "Apply"
|
|
1103
1133
|
}
|
|
1104
1134
|
),
|
|
@@ -1124,7 +1154,7 @@ function Fn({
|
|
|
1124
1154
|
E
|
|
1125
1155
|
] });
|
|
1126
1156
|
}
|
|
1127
|
-
function
|
|
1157
|
+
function jn({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disabled: l, size: a = "default" }) {
|
|
1128
1158
|
const d = a === "small", p = () => {
|
|
1129
1159
|
const c = e - o;
|
|
1130
1160
|
n !== void 0 && c < n || t(parseFloat(c.toFixed(10)));
|
|
@@ -1172,7 +1202,7 @@ function Vn({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
|
|
|
1172
1202
|
] })
|
|
1173
1203
|
] });
|
|
1174
1204
|
}
|
|
1175
|
-
function
|
|
1205
|
+
function Kn({
|
|
1176
1206
|
value: e,
|
|
1177
1207
|
onChange: t,
|
|
1178
1208
|
min: n = 0,
|
|
@@ -1224,13 +1254,13 @@ function Gn({
|
|
|
1224
1254
|
] })
|
|
1225
1255
|
] });
|
|
1226
1256
|
}
|
|
1227
|
-
const
|
|
1228
|
-
function
|
|
1257
|
+
const At = ({ 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" }) });
|
|
1258
|
+
function Ct({ children: e, className: t = "", style: n }) {
|
|
1229
1259
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panel ${t}`, style: n, children: e });
|
|
1230
1260
|
}
|
|
1231
|
-
function
|
|
1232
|
-
const i =
|
|
1233
|
-
(a) =>
|
|
1261
|
+
function _n({ active: e, children: t, keepMounted: n = !1, className: r = "", style: o }) {
|
|
1262
|
+
const i = at.toArray(t).filter(
|
|
1263
|
+
(a) => lt(a) && (a.type === Ct || a.type.displayName === "TabPanel")
|
|
1234
1264
|
);
|
|
1235
1265
|
if (n)
|
|
1236
1266
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: i.map((a) => {
|
|
@@ -1249,17 +1279,17 @@ function Yn({ active: e, children: t, keepMounted: n = !1, className: r = "", st
|
|
|
1249
1279
|
const l = i.find((a) => a.props.tab === e);
|
|
1250
1280
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: l });
|
|
1251
1281
|
}
|
|
1252
|
-
function
|
|
1253
|
-
const f = W(null), [g, c] =
|
|
1282
|
+
function Un({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, className: i, toolbar: l, multiline: a, orientation: d = "horizontal", style: p }) {
|
|
1283
|
+
const f = W(null), [g, c] = z(!1), [u, w] = z(!1), m = d === "verticalLeft" || d === "verticalRight", v = W(!1), N = W(0), h = W(0), k = W(!1);
|
|
1254
1284
|
B(() => {
|
|
1255
1285
|
const x = () => {
|
|
1256
1286
|
if (f.current)
|
|
1257
1287
|
if (m) {
|
|
1258
|
-
const { scrollTop: A, scrollHeight:
|
|
1259
|
-
c(A > 1), w(A <
|
|
1288
|
+
const { scrollTop: A, scrollHeight: S, clientHeight: L } = f.current;
|
|
1289
|
+
c(A > 1), w(A < S - L - 1);
|
|
1260
1290
|
} else {
|
|
1261
|
-
const { scrollLeft: A, scrollWidth:
|
|
1262
|
-
c(A > 1), w(A <
|
|
1291
|
+
const { scrollLeft: A, scrollWidth: S, clientWidth: L } = f.current;
|
|
1292
|
+
c(A > 1), w(A < S - L - 1);
|
|
1263
1293
|
}
|
|
1264
1294
|
}, E = f.current;
|
|
1265
1295
|
if (E)
|
|
@@ -1269,7 +1299,7 @@ function jn({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, cla
|
|
|
1269
1299
|
}, [e, m]);
|
|
1270
1300
|
const b = (x) => {
|
|
1271
1301
|
f.current && (v.current = !0, k.current = !1, N.current = m ? x.clientY : x.clientX, h.current = m ? f.current.scrollTop : f.current.scrollLeft, f.current.style.cursor = "grabbing", f.current.style.userSelect = "none");
|
|
1272
|
-
},
|
|
1302
|
+
}, C = (x) => {
|
|
1273
1303
|
if (!v.current || !f.current) return;
|
|
1274
1304
|
const E = m ? x.clientY : x.clientX, A = N.current - E;
|
|
1275
1305
|
Math.abs(A) > 3 && (k.current = !0), m ? f.current.scrollTop = h.current + A : f.current.scrollLeft = h.current + A;
|
|
@@ -1288,29 +1318,29 @@ function jn({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, cla
|
|
|
1288
1318
|
x.removeEventListener("wheel", E);
|
|
1289
1319
|
};
|
|
1290
1320
|
}, [m]);
|
|
1291
|
-
const
|
|
1321
|
+
const T = (x) => {
|
|
1292
1322
|
k.current || n(x);
|
|
1293
1323
|
};
|
|
1294
1324
|
return /* @__PURE__ */ y("div", { className: `nc-tab-container ${m ? `nc-vertical nc-${d}` : ""} ${i || ""}`, style: p, children: [
|
|
1295
1325
|
/* @__PURE__ */ y("div", { className: "nc-tab-scroll-wrapper", children: [
|
|
1296
|
-
g && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${m ? "nc-top" : "nc-left"}`, children: m ? /* @__PURE__ */ s(
|
|
1326
|
+
g && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${m ? "nc-top" : "nc-left"}`, children: m ? /* @__PURE__ */ s(At, { size: 16 }) : /* @__PURE__ */ s(st, { size: 16 }) }),
|
|
1297
1327
|
/* @__PURE__ */ s(
|
|
1298
1328
|
"div",
|
|
1299
1329
|
{
|
|
1300
1330
|
ref: f,
|
|
1301
1331
|
className: `nc-tab-scroll ${a ? "nc-multiline" : ""}`,
|
|
1302
1332
|
onMouseDown: b,
|
|
1303
|
-
onMouseMove:
|
|
1333
|
+
onMouseMove: C,
|
|
1304
1334
|
onMouseUp: R,
|
|
1305
1335
|
onMouseLeave: I,
|
|
1306
1336
|
style: { cursor: "grab" },
|
|
1307
1337
|
children: e.map((x) => {
|
|
1308
|
-
const E = typeof x == "string" ? x : x.id, A = typeof x == "string" ? x : x.label,
|
|
1338
|
+
const E = typeof x == "string" ? x : x.id, A = typeof x == "string" ? x : x.label, S = r && !(o != null && o.includes(E));
|
|
1309
1339
|
return /* @__PURE__ */ y(
|
|
1310
1340
|
"div",
|
|
1311
1341
|
{
|
|
1312
|
-
className: `nc-tab-item ${t === E ? "nc-active" : ""} ${
|
|
1313
|
-
onClick: () =>
|
|
1342
|
+
className: `nc-tab-item ${t === E ? "nc-active" : ""} ${S ? "nc-closable" : ""}`,
|
|
1343
|
+
onClick: () => T(E),
|
|
1314
1344
|
role: "button",
|
|
1315
1345
|
tabIndex: 0,
|
|
1316
1346
|
onKeyDown: (L) => {
|
|
@@ -1318,7 +1348,7 @@ function jn({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, cla
|
|
|
1318
1348
|
},
|
|
1319
1349
|
children: [
|
|
1320
1350
|
/* @__PURE__ */ s("span", { className: "nc-tab-label", children: m ? A : typeof A == "string" ? A.toUpperCase() : A }),
|
|
1321
|
-
|
|
1351
|
+
S && /* @__PURE__ */ s(
|
|
1322
1352
|
"span",
|
|
1323
1353
|
{
|
|
1324
1354
|
className: "nc-tab-close",
|
|
@@ -1344,12 +1374,12 @@ function jn({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, cla
|
|
|
1344
1374
|
})
|
|
1345
1375
|
}
|
|
1346
1376
|
),
|
|
1347
|
-
u && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${m ? "nc-bottom" : "nc-right"}`, children: m ? /* @__PURE__ */ s(
|
|
1377
|
+
u && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${m ? "nc-bottom" : "nc-right"}`, children: m ? /* @__PURE__ */ s(it, { size: 16 }) : /* @__PURE__ */ s(ct, { size: 16 }) })
|
|
1348
1378
|
] }),
|
|
1349
1379
|
l && /* @__PURE__ */ s("div", { className: "nc-tab-toolbar", children: l })
|
|
1350
1380
|
] });
|
|
1351
1381
|
}
|
|
1352
|
-
function
|
|
1382
|
+
function qn({ checked: e, onChange: t, disabled: n, label: r }) {
|
|
1353
1383
|
return /* @__PURE__ */ y(
|
|
1354
1384
|
"label",
|
|
1355
1385
|
{
|
|
@@ -1401,7 +1431,7 @@ function Kn({ checked: e, onChange: t, disabled: n, label: r }) {
|
|
|
1401
1431
|
}
|
|
1402
1432
|
);
|
|
1403
1433
|
}
|
|
1404
|
-
const
|
|
1434
|
+
const Ee = [
|
|
1405
1435
|
"var(--nc-csv-col-0)",
|
|
1406
1436
|
"var(--nc-csv-col-1)",
|
|
1407
1437
|
"var(--nc-csv-col-2)",
|
|
@@ -1413,12 +1443,12 @@ const Re = [
|
|
|
1413
1443
|
"var(--nc-csv-col-8)",
|
|
1414
1444
|
"var(--nc-csv-col-9)"
|
|
1415
1445
|
];
|
|
1416
|
-
function
|
|
1446
|
+
function St(e, t) {
|
|
1417
1447
|
const r = e.slice(0, t).split(`
|
|
1418
1448
|
`), o = r.length, l = r[o - 1].split(" "), a = l.length, d = l[a - 1].length + 1;
|
|
1419
1449
|
return { line: o, column: a, character: d, offset: t };
|
|
1420
1450
|
}
|
|
1421
|
-
function
|
|
1451
|
+
function It(e, t, n, r) {
|
|
1422
1452
|
const o = e.split(`
|
|
1423
1453
|
`), i = Math.max(1, Math.min(t, o.length));
|
|
1424
1454
|
let l = 0;
|
|
@@ -1430,7 +1460,7 @@ function St(e, t, n, r) {
|
|
|
1430
1460
|
const f = Math.max(1, Math.min(r, d[p - 1].length + 1));
|
|
1431
1461
|
return l += f - 1, l;
|
|
1432
1462
|
}
|
|
1433
|
-
function
|
|
1463
|
+
function Mt(e, t) {
|
|
1434
1464
|
const n = e.split(`
|
|
1435
1465
|
`), r = Math.max(1, Math.min(t, n.length));
|
|
1436
1466
|
let o = 0;
|
|
@@ -1438,30 +1468,30 @@ function Ct(e, t) {
|
|
|
1438
1468
|
o += n[i].length + 1;
|
|
1439
1469
|
return o;
|
|
1440
1470
|
}
|
|
1441
|
-
const
|
|
1471
|
+
const Xn = dt(
|
|
1442
1472
|
function({ value: t, onChange: n, placeholder: r, className: o, style: i, showLineNumbers: l = !1, onCursorChange: a, highlightLine: d }, p) {
|
|
1443
1473
|
const f = W(null), g = W(null), c = W(null);
|
|
1444
|
-
|
|
1474
|
+
ut(p, () => ({
|
|
1445
1475
|
goToLine(h) {
|
|
1446
1476
|
const k = f.current;
|
|
1447
1477
|
if (!k) return;
|
|
1448
|
-
const b =
|
|
1478
|
+
const b = Mt(t, h);
|
|
1449
1479
|
k.focus(), k.setSelectionRange(b, b);
|
|
1450
|
-
const
|
|
1451
|
-
k.scrollTop = (Math.max(1, h) - 1) *
|
|
1480
|
+
const C = parseFloat(getComputedStyle(k).lineHeight) || 18;
|
|
1481
|
+
k.scrollTop = (Math.max(1, h) - 1) * C, w(), u();
|
|
1452
1482
|
},
|
|
1453
1483
|
goToPosition(h, k, b) {
|
|
1454
|
-
const
|
|
1455
|
-
if (!
|
|
1456
|
-
const R =
|
|
1457
|
-
|
|
1458
|
-
const I = parseFloat(getComputedStyle(
|
|
1459
|
-
|
|
1484
|
+
const C = f.current;
|
|
1485
|
+
if (!C) return;
|
|
1486
|
+
const R = It(t, h, k, b);
|
|
1487
|
+
C.focus(), C.setSelectionRange(R, R);
|
|
1488
|
+
const I = parseFloat(getComputedStyle(C).lineHeight) || 18;
|
|
1489
|
+
C.scrollTop = (Math.max(1, h) - 1) * I, w(), u();
|
|
1460
1490
|
}
|
|
1461
1491
|
}), [t]);
|
|
1462
1492
|
const u = O(() => {
|
|
1463
1493
|
if (!a || !f.current) return;
|
|
1464
|
-
const h =
|
|
1494
|
+
const h = St(t, f.current.selectionStart);
|
|
1465
1495
|
a(h);
|
|
1466
1496
|
}, [a, t]), w = O(() => {
|
|
1467
1497
|
const h = f.current;
|
|
@@ -1471,8 +1501,8 @@ const _n = tt(
|
|
|
1471
1501
|
if (d == null || d < 1) return;
|
|
1472
1502
|
const h = f.current;
|
|
1473
1503
|
if (!h) return;
|
|
1474
|
-
const k = parseFloat(getComputedStyle(h).lineHeight) || 18, b = (d - 1) * k,
|
|
1475
|
-
(b < h.scrollTop ||
|
|
1504
|
+
const k = parseFloat(getComputedStyle(h).lineHeight) || 18, b = (d - 1) * k, C = b + k;
|
|
1505
|
+
(b < h.scrollTop || C > h.scrollTop + h.clientHeight) && (h.scrollTop = b - h.clientHeight / 2 + k / 2), w();
|
|
1476
1506
|
}, [d]);
|
|
1477
1507
|
const m = ge(() => t.split(`
|
|
1478
1508
|
`).length, [t]), v = () => {
|
|
@@ -1483,16 +1513,16 @@ const _n = tt(
|
|
|
1483
1513
|
);
|
|
1484
1514
|
return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref: c, children: h });
|
|
1485
1515
|
}, N = (h) => h ? h.split(`
|
|
1486
|
-
`).map((b,
|
|
1516
|
+
`).map((b, C) => {
|
|
1487
1517
|
const R = b.split(" ");
|
|
1488
|
-
return /* @__PURE__ */ y("div", { className: `nc-csv-line ${d ===
|
|
1489
|
-
R.map((I,
|
|
1490
|
-
|
|
1491
|
-
/* @__PURE__ */ s("span", { style: { color:
|
|
1492
|
-
] },
|
|
1518
|
+
return /* @__PURE__ */ y("div", { className: `nc-csv-line ${d === C + 1 ? "nc-csv-highlight" : ""}`, children: [
|
|
1519
|
+
R.map((I, T) => /* @__PURE__ */ y("span", { children: [
|
|
1520
|
+
T > 0 && /* @__PURE__ */ s("span", { className: "nc-csv-tab-char", children: " " }),
|
|
1521
|
+
/* @__PURE__ */ s("span", { style: { color: Ee[T % Ee.length] }, children: I })
|
|
1522
|
+
] }, T)),
|
|
1493
1523
|
b === "" && `
|
|
1494
1524
|
`
|
|
1495
|
-
] },
|
|
1525
|
+
] }, C);
|
|
1496
1526
|
}) : null;
|
|
1497
1527
|
return /* @__PURE__ */ y("div", { className: `nc-csv-textarea-container ${l ? "nc-csv-with-gutter" : ""} ${o ?? ""}`, style: i, children: [
|
|
1498
1528
|
l && v(),
|
|
@@ -1522,7 +1552,7 @@ const _n = tt(
|
|
|
1522
1552
|
}
|
|
1523
1553
|
);
|
|
1524
1554
|
let Z = { notifications: [] };
|
|
1525
|
-
const ve = /* @__PURE__ */ new Set(),
|
|
1555
|
+
const ve = /* @__PURE__ */ new Set(), ze = /* @__PURE__ */ new Map();
|
|
1526
1556
|
function we() {
|
|
1527
1557
|
const e = Z.notifications.slice();
|
|
1528
1558
|
for (const t of Array.from(ve))
|
|
@@ -1531,7 +1561,7 @@ function we() {
|
|
|
1531
1561
|
} catch {
|
|
1532
1562
|
}
|
|
1533
1563
|
}
|
|
1534
|
-
function
|
|
1564
|
+
function $t(e) {
|
|
1535
1565
|
ve.add(e);
|
|
1536
1566
|
try {
|
|
1537
1567
|
e(Z.notifications.slice());
|
|
@@ -1541,27 +1571,28 @@ function It(e) {
|
|
|
1541
1571
|
ve.delete(e);
|
|
1542
1572
|
};
|
|
1543
1573
|
}
|
|
1544
|
-
function
|
|
1545
|
-
const t = `notification-${Date.now()}-${Math.random()}`, n = {
|
|
1574
|
+
function Rt(e) {
|
|
1575
|
+
const t = `notification-${Date.now()}-${Math.random()}`, { duration: n, type: r, ...o } = e, i = {
|
|
1546
1576
|
id: t,
|
|
1547
1577
|
dismissible: !0,
|
|
1548
|
-
|
|
1549
|
-
|
|
1578
|
+
...o,
|
|
1579
|
+
type: r === "error" ? "danger" : r ?? "info",
|
|
1580
|
+
duration: n ?? 5e3
|
|
1550
1581
|
};
|
|
1551
|
-
return Z.notifications = [
|
|
1582
|
+
return Z.notifications = [i, ...Z.notifications], we(), i.duration && i.duration > 0 && setTimeout(() => {
|
|
1552
1583
|
We(t);
|
|
1553
|
-
},
|
|
1584
|
+
}, i.duration), t;
|
|
1554
1585
|
}
|
|
1555
1586
|
function We(e) {
|
|
1556
1587
|
const t = Z.notifications.find((r) => r.id === e);
|
|
1557
1588
|
if (!t) return;
|
|
1558
1589
|
t.isRemoving = !0, we();
|
|
1559
1590
|
const n = window.setTimeout(() => {
|
|
1560
|
-
Z.notifications = Z.notifications.filter((r) => r.id !== e), we(),
|
|
1591
|
+
Z.notifications = Z.notifications.filter((r) => r.id !== e), we(), ze.delete(e);
|
|
1561
1592
|
}, 300);
|
|
1562
|
-
|
|
1593
|
+
ze.set(e, n);
|
|
1563
1594
|
}
|
|
1564
|
-
function
|
|
1595
|
+
function Et({ notification: e }) {
|
|
1565
1596
|
const { t } = J(), n = () => {
|
|
1566
1597
|
if (e.title) return e.title;
|
|
1567
1598
|
switch (e.type) {
|
|
@@ -1591,16 +1622,16 @@ function $t({ notification: e }) {
|
|
|
1591
1622
|
{
|
|
1592
1623
|
className: "nc-notification-dismiss",
|
|
1593
1624
|
onClick: r,
|
|
1594
|
-
children: /* @__PURE__ */ s(
|
|
1625
|
+
children: /* @__PURE__ */ s(xe, { size: 16 })
|
|
1595
1626
|
}
|
|
1596
1627
|
)
|
|
1597
1628
|
] })
|
|
1598
1629
|
}
|
|
1599
1630
|
);
|
|
1600
1631
|
}
|
|
1601
|
-
function
|
|
1602
|
-
const [e, t] =
|
|
1603
|
-
return B(() =>
|
|
1632
|
+
function Jn() {
|
|
1633
|
+
const [e, t] = z([]), [n, r] = z(/* @__PURE__ */ new Map()), [o, i] = z(/* @__PURE__ */ new Set()), l = W(null), a = W([]);
|
|
1634
|
+
return B(() => $t((p) => {
|
|
1604
1635
|
const f = new Set(a.current.map((c) => c.id)), g = p.filter((c) => !f.has(c.id)).map((c) => c.id);
|
|
1605
1636
|
g.length > 0 ? (t(p), i(new Set(g)), requestAnimationFrame(() => {
|
|
1606
1637
|
requestAnimationFrame(() => {
|
|
@@ -1651,7 +1682,7 @@ function Un() {
|
|
|
1651
1682
|
opacity: f ? 0 : 1,
|
|
1652
1683
|
width: "100%"
|
|
1653
1684
|
},
|
|
1654
|
-
children: /* @__PURE__ */ s(
|
|
1685
|
+
children: /* @__PURE__ */ s(Et, { notification: d })
|
|
1655
1686
|
},
|
|
1656
1687
|
d.id
|
|
1657
1688
|
);
|
|
@@ -1661,11 +1692,14 @@ function Un() {
|
|
|
1661
1692
|
}
|
|
1662
1693
|
);
|
|
1663
1694
|
}
|
|
1664
|
-
|
|
1665
|
-
|
|
1695
|
+
function zt(e) {
|
|
1696
|
+
return Rt(e);
|
|
1697
|
+
}
|
|
1698
|
+
const Qn = {
|
|
1699
|
+
show: (e) => zt(e)
|
|
1666
1700
|
};
|
|
1667
|
-
function
|
|
1668
|
-
const t =
|
|
1701
|
+
function Zn(e) {
|
|
1702
|
+
const t = ft.createInstance(), n = {};
|
|
1669
1703
|
for (const o in e)
|
|
1670
1704
|
n[o] = { translation: e[o] };
|
|
1671
1705
|
const r = typeof document < "u" && document.documentElement.lang || "en";
|
|
@@ -1685,7 +1719,7 @@ function Xn(e) {
|
|
|
1685
1719
|
}
|
|
1686
1720
|
}).observe(document.documentElement, { attributes: !0 }), t;
|
|
1687
1721
|
}
|
|
1688
|
-
class
|
|
1722
|
+
class Tt {
|
|
1689
1723
|
constructor() {
|
|
1690
1724
|
_(this, "apps", /* @__PURE__ */ new Map());
|
|
1691
1725
|
}
|
|
@@ -1725,8 +1759,8 @@ class Rt {
|
|
|
1725
1759
|
return this.apps.has(t);
|
|
1726
1760
|
}
|
|
1727
1761
|
}
|
|
1728
|
-
const oe = new
|
|
1729
|
-
class
|
|
1762
|
+
const oe = new Tt(), Te = "nc-ui-app-state";
|
|
1763
|
+
class Pt {
|
|
1730
1764
|
constructor() {
|
|
1731
1765
|
_(this, "state");
|
|
1732
1766
|
_(this, "listeners", /* @__PURE__ */ new Map());
|
|
@@ -1773,8 +1807,8 @@ class Et {
|
|
|
1773
1807
|
(r = this.listeners.get(t)) == null || r.forEach((o) => o(n));
|
|
1774
1808
|
}
|
|
1775
1809
|
}
|
|
1776
|
-
const j = new
|
|
1777
|
-
class
|
|
1810
|
+
const j = new Pt();
|
|
1811
|
+
class Lt {
|
|
1778
1812
|
constructor() {
|
|
1779
1813
|
_(this, "apps", []);
|
|
1780
1814
|
_(this, "activeAppId", null);
|
|
@@ -1893,14 +1927,14 @@ class Tt {
|
|
|
1893
1927
|
this.listeners.forEach((t) => t());
|
|
1894
1928
|
}
|
|
1895
1929
|
}
|
|
1896
|
-
const V = new
|
|
1897
|
-
function
|
|
1930
|
+
const V = new Lt(), Oe = se(null);
|
|
1931
|
+
function Bt() {
|
|
1898
1932
|
const e = X(Oe);
|
|
1899
1933
|
if (!e)
|
|
1900
1934
|
throw new Error("useApp must be used inside an App");
|
|
1901
1935
|
return e;
|
|
1902
1936
|
}
|
|
1903
|
-
function
|
|
1937
|
+
function Dt({ size: e = 16 }) {
|
|
1904
1938
|
return /* @__PURE__ */ y(
|
|
1905
1939
|
"svg",
|
|
1906
1940
|
{
|
|
@@ -1919,7 +1953,7 @@ function Pt({ size: e = 16 }) {
|
|
|
1919
1953
|
}
|
|
1920
1954
|
);
|
|
1921
1955
|
}
|
|
1922
|
-
function
|
|
1956
|
+
function Ht({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o }) {
|
|
1923
1957
|
return /* @__PURE__ */ y("div", { className: "nc-app-title-bar", children: [
|
|
1924
1958
|
/* @__PURE__ */ y("div", { className: "nc-app-title-bar-left", children: [
|
|
1925
1959
|
n && !o && /* @__PURE__ */ s(
|
|
@@ -1929,7 +1963,7 @@ function Lt({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o })
|
|
|
1929
1963
|
onClick: n,
|
|
1930
1964
|
title: "Back",
|
|
1931
1965
|
"aria-label": "Go back",
|
|
1932
|
-
children: /* @__PURE__ */ s(
|
|
1966
|
+
children: /* @__PURE__ */ s(Dt, { size: 16 })
|
|
1933
1967
|
}
|
|
1934
1968
|
),
|
|
1935
1969
|
/* @__PURE__ */ s("span", { className: "nc-app-title-bar-title", children: e })
|
|
@@ -1940,7 +1974,7 @@ function Lt({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o })
|
|
|
1940
1974
|
] })
|
|
1941
1975
|
] });
|
|
1942
1976
|
}
|
|
1943
|
-
class
|
|
1977
|
+
class Wt extends ke.Component {
|
|
1944
1978
|
constructor(t) {
|
|
1945
1979
|
super(t), this.state = { hasError: !1 };
|
|
1946
1980
|
}
|
|
@@ -1974,8 +2008,8 @@ class Bt extends xe.Component {
|
|
|
1974
2008
|
}
|
|
1975
2009
|
}
|
|
1976
2010
|
function Fe({ appId: e, isActive: t, onClose: n }) {
|
|
1977
|
-
const { t: r } = J(), o = oe.get(e), [i, l] =
|
|
1978
|
-
|
|
2011
|
+
const { t: r } = J(), o = oe.get(e), [i, l] = z(""), [a, d] = z(null), [p, f] = z(null), [g, c] = z(!1), [u, w] = z(!1);
|
|
2012
|
+
ke.useEffect(() => {
|
|
1979
2013
|
o != null && o.titleKey && l(r(o.titleKey));
|
|
1980
2014
|
}, [o, r]);
|
|
1981
2015
|
const m = O((x) => {
|
|
@@ -1990,7 +2024,7 @@ function Fe({ appId: e, isActive: t, onClose: n }) {
|
|
|
1990
2024
|
f(null);
|
|
1991
2025
|
}, []), b = O((x) => {
|
|
1992
2026
|
c(x);
|
|
1993
|
-
}, []),
|
|
2027
|
+
}, []), C = O((x) => {
|
|
1994
2028
|
w(x);
|
|
1995
2029
|
}, []), R = ge(() => ({
|
|
1996
2030
|
setTitle: m,
|
|
@@ -1999,12 +2033,12 @@ function Fe({ appId: e, isActive: t, onClose: n }) {
|
|
|
1999
2033
|
setToolbar: h,
|
|
2000
2034
|
clearToolbar: k,
|
|
2001
2035
|
setHideBackButton: b,
|
|
2002
|
-
setHideTitleBar:
|
|
2036
|
+
setHideTitleBar: C,
|
|
2003
2037
|
close: n
|
|
2004
|
-
}), [m, v, N, h, k, b,
|
|
2038
|
+
}), [m, v, N, h, k, b, C, n]);
|
|
2005
2039
|
if (!o)
|
|
2006
2040
|
return null;
|
|
2007
|
-
const I = o.component,
|
|
2041
|
+
const I = o.component, T = !o.hideTitleBar && !u;
|
|
2008
2042
|
return /* @__PURE__ */ y(
|
|
2009
2043
|
"div",
|
|
2010
2044
|
{
|
|
@@ -2015,8 +2049,8 @@ function Fe({ appId: e, isActive: t, onClose: n }) {
|
|
|
2015
2049
|
minHeight: 0
|
|
2016
2050
|
},
|
|
2017
2051
|
children: [
|
|
2018
|
-
|
|
2019
|
-
|
|
2052
|
+
T && /* @__PURE__ */ s(
|
|
2053
|
+
Ht,
|
|
2020
2054
|
{
|
|
2021
2055
|
title: i,
|
|
2022
2056
|
onClose: n,
|
|
@@ -2028,7 +2062,7 @@ function Fe({ appId: e, isActive: t, onClose: n }) {
|
|
|
2028
2062
|
/* @__PURE__ */ s(
|
|
2029
2063
|
"div",
|
|
2030
2064
|
{
|
|
2031
|
-
className:
|
|
2065
|
+
className: T ? "nc-app-content-wrapper" : "",
|
|
2032
2066
|
style: {
|
|
2033
2067
|
padding: o.padding,
|
|
2034
2068
|
flex: 1,
|
|
@@ -2038,8 +2072,8 @@ function Fe({ appId: e, isActive: t, onClose: n }) {
|
|
|
2038
2072
|
backgroundColor: "var(--nc-bg-secondary)",
|
|
2039
2073
|
position: "relative"
|
|
2040
2074
|
},
|
|
2041
|
-
children: /* @__PURE__ */ s(Oe.Provider, { value: R, children: /* @__PURE__ */ s(
|
|
2042
|
-
|
|
2075
|
+
children: /* @__PURE__ */ s(Oe.Provider, { value: R, children: /* @__PURE__ */ s(Wt, { appId: e, children: /* @__PURE__ */ s(
|
|
2076
|
+
pt,
|
|
2043
2077
|
{
|
|
2044
2078
|
fallback: /* @__PURE__ */ s(
|
|
2045
2079
|
"div",
|
|
@@ -2069,8 +2103,8 @@ const he = 768, me = 1024, Ve = {
|
|
|
2069
2103
|
width: typeof window < "u" ? window.innerWidth : 1024,
|
|
2070
2104
|
height: typeof window < "u" ? window.innerHeight : 768
|
|
2071
2105
|
}, Ge = se(Ve);
|
|
2072
|
-
function
|
|
2073
|
-
const [t, n] =
|
|
2106
|
+
function er({ children: e }) {
|
|
2107
|
+
const [t, n] = z(() => {
|
|
2074
2108
|
if (typeof window > "u") return Ve;
|
|
2075
2109
|
const r = window.innerWidth, o = window.innerHeight;
|
|
2076
2110
|
return {
|
|
@@ -2098,15 +2132,15 @@ function Jn({ children: e }) {
|
|
|
2098
2132
|
function Ye() {
|
|
2099
2133
|
return X(Ge);
|
|
2100
2134
|
}
|
|
2101
|
-
const
|
|
2102
|
-
const t =
|
|
2135
|
+
const Ne = "-", Ot = (e) => {
|
|
2136
|
+
const t = Vt(e), {
|
|
2103
2137
|
conflictingClassGroups: n,
|
|
2104
2138
|
conflictingClassGroupModifiers: r
|
|
2105
2139
|
} = e;
|
|
2106
2140
|
return {
|
|
2107
2141
|
getClassGroupId: (l) => {
|
|
2108
|
-
const a = l.split(
|
|
2109
|
-
return a[0] === "" && a.length !== 1 && a.shift(), je(a, t) ||
|
|
2142
|
+
const a = l.split(Ne);
|
|
2143
|
+
return a[0] === "" && a.length !== 1 && a.shift(), je(a, t) || Ft(l);
|
|
2110
2144
|
},
|
|
2111
2145
|
getConflictingClassGroupIds: (l, a) => {
|
|
2112
2146
|
const d = n[l] || [];
|
|
@@ -2122,17 +2156,17 @@ const ke = "-", Dt = (e) => {
|
|
|
2122
2156
|
return o;
|
|
2123
2157
|
if (t.validators.length === 0)
|
|
2124
2158
|
return;
|
|
2125
|
-
const i = e.join(
|
|
2159
|
+
const i = e.join(Ne);
|
|
2126
2160
|
return (l = t.validators.find(({
|
|
2127
2161
|
validator: a
|
|
2128
2162
|
}) => a(i))) == null ? void 0 : l.classGroupId;
|
|
2129
|
-
},
|
|
2130
|
-
if (
|
|
2131
|
-
const t =
|
|
2163
|
+
}, Pe = /^\[(.+)\]$/, Ft = (e) => {
|
|
2164
|
+
if (Pe.test(e)) {
|
|
2165
|
+
const t = Pe.exec(e)[1], n = t == null ? void 0 : t.substring(0, t.indexOf(":"));
|
|
2132
2166
|
if (n)
|
|
2133
2167
|
return "arbitrary.." + n;
|
|
2134
2168
|
}
|
|
2135
|
-
},
|
|
2169
|
+
}, Vt = (e) => {
|
|
2136
2170
|
const {
|
|
2137
2171
|
theme: t,
|
|
2138
2172
|
prefix: n
|
|
@@ -2140,18 +2174,18 @@ const ke = "-", Dt = (e) => {
|
|
|
2140
2174
|
nextPart: /* @__PURE__ */ new Map(),
|
|
2141
2175
|
validators: []
|
|
2142
2176
|
};
|
|
2143
|
-
return
|
|
2177
|
+
return Yt(Object.entries(e.classGroups), n).forEach(([i, l]) => {
|
|
2144
2178
|
ye(l, r, i, t);
|
|
2145
2179
|
}), r;
|
|
2146
2180
|
}, ye = (e, t, n, r) => {
|
|
2147
2181
|
e.forEach((o) => {
|
|
2148
2182
|
if (typeof o == "string") {
|
|
2149
|
-
const i = o === "" ? t :
|
|
2183
|
+
const i = o === "" ? t : Le(t, o);
|
|
2150
2184
|
i.classGroupId = n;
|
|
2151
2185
|
return;
|
|
2152
2186
|
}
|
|
2153
2187
|
if (typeof o == "function") {
|
|
2154
|
-
if (
|
|
2188
|
+
if (Gt(o)) {
|
|
2155
2189
|
ye(o(r), t, n, r);
|
|
2156
2190
|
return;
|
|
2157
2191
|
}
|
|
@@ -2162,21 +2196,21 @@ const ke = "-", Dt = (e) => {
|
|
|
2162
2196
|
return;
|
|
2163
2197
|
}
|
|
2164
2198
|
Object.entries(o).forEach(([i, l]) => {
|
|
2165
|
-
ye(l,
|
|
2199
|
+
ye(l, Le(t, i), n, r);
|
|
2166
2200
|
});
|
|
2167
2201
|
});
|
|
2168
|
-
},
|
|
2202
|
+
}, Le = (e, t) => {
|
|
2169
2203
|
let n = e;
|
|
2170
|
-
return t.split(
|
|
2204
|
+
return t.split(Ne).forEach((r) => {
|
|
2171
2205
|
n.nextPart.has(r) || n.nextPart.set(r, {
|
|
2172
2206
|
nextPart: /* @__PURE__ */ new Map(),
|
|
2173
2207
|
validators: []
|
|
2174
2208
|
}), n = n.nextPart.get(r);
|
|
2175
2209
|
}), n;
|
|
2176
|
-
},
|
|
2210
|
+
}, Gt = (e) => e.isThemeGetter, Yt = (e, t) => t ? e.map(([n, r]) => {
|
|
2177
2211
|
const o = r.map((i) => typeof i == "string" ? t + i : typeof i == "object" ? Object.fromEntries(Object.entries(i).map(([l, a]) => [t + l, a])) : i);
|
|
2178
2212
|
return [n, o];
|
|
2179
|
-
}) : e,
|
|
2213
|
+
}) : e, jt = (e) => {
|
|
2180
2214
|
if (e < 1)
|
|
2181
2215
|
return {
|
|
2182
2216
|
get: () => {
|
|
@@ -2200,7 +2234,7 @@ const ke = "-", Dt = (e) => {
|
|
|
2200
2234
|
n.has(i) ? n.set(i, l) : o(i, l);
|
|
2201
2235
|
}
|
|
2202
2236
|
};
|
|
2203
|
-
}, Ke = "!",
|
|
2237
|
+
}, Ke = "!", Kt = (e) => {
|
|
2204
2238
|
const {
|
|
2205
2239
|
separator: t,
|
|
2206
2240
|
experimentalParseClassName: n
|
|
@@ -2233,7 +2267,7 @@ const ke = "-", Dt = (e) => {
|
|
|
2233
2267
|
className: a,
|
|
2234
2268
|
parseClassName: l
|
|
2235
2269
|
}) : l;
|
|
2236
|
-
},
|
|
2270
|
+
}, _t = (e) => {
|
|
2237
2271
|
if (e.length <= 1)
|
|
2238
2272
|
return e;
|
|
2239
2273
|
const t = [];
|
|
@@ -2241,16 +2275,16 @@ const ke = "-", Dt = (e) => {
|
|
|
2241
2275
|
return e.forEach((r) => {
|
|
2242
2276
|
r[0] === "[" ? (t.push(...n.sort(), r), n = []) : n.push(r);
|
|
2243
2277
|
}), t.push(...n.sort()), t;
|
|
2244
|
-
},
|
|
2245
|
-
cache:
|
|
2246
|
-
parseClassName:
|
|
2247
|
-
...
|
|
2248
|
-
}),
|
|
2278
|
+
}, Ut = (e) => ({
|
|
2279
|
+
cache: jt(e.cacheSize),
|
|
2280
|
+
parseClassName: Kt(e),
|
|
2281
|
+
...Ot(e)
|
|
2282
|
+
}), qt = /\s+/, Xt = (e, t) => {
|
|
2249
2283
|
const {
|
|
2250
2284
|
parseClassName: n,
|
|
2251
2285
|
getClassGroupId: r,
|
|
2252
2286
|
getConflictingClassGroupIds: o
|
|
2253
|
-
} = t, i = [], l = e.trim().split(
|
|
2287
|
+
} = t, i = [], l = e.trim().split(qt);
|
|
2254
2288
|
let a = "";
|
|
2255
2289
|
for (let d = l.length - 1; d >= 0; d -= 1) {
|
|
2256
2290
|
const p = l[d], {
|
|
@@ -2271,20 +2305,20 @@ const ke = "-", Dt = (e) => {
|
|
|
2271
2305
|
}
|
|
2272
2306
|
w = !1;
|
|
2273
2307
|
}
|
|
2274
|
-
const v =
|
|
2308
|
+
const v = _t(f).join(":"), N = g ? v + Ke : v, h = N + m;
|
|
2275
2309
|
if (i.includes(h))
|
|
2276
2310
|
continue;
|
|
2277
2311
|
i.push(h);
|
|
2278
2312
|
const k = o(m, w);
|
|
2279
2313
|
for (let b = 0; b < k.length; ++b) {
|
|
2280
|
-
const
|
|
2281
|
-
i.push(N +
|
|
2314
|
+
const C = k[b];
|
|
2315
|
+
i.push(N + C);
|
|
2282
2316
|
}
|
|
2283
2317
|
a = p + (a.length > 0 ? " " + a : a);
|
|
2284
2318
|
}
|
|
2285
2319
|
return a;
|
|
2286
2320
|
};
|
|
2287
|
-
function
|
|
2321
|
+
function Jt() {
|
|
2288
2322
|
let e = 0, t, n, r = "";
|
|
2289
2323
|
for (; e < arguments.length; )
|
|
2290
2324
|
(t = arguments[e++]) && (n = _e(t)) && (r && (r += " "), r += n);
|
|
@@ -2298,36 +2332,36 @@ const _e = (e) => {
|
|
|
2298
2332
|
e[r] && (t = _e(e[r])) && (n && (n += " "), n += t);
|
|
2299
2333
|
return n;
|
|
2300
2334
|
};
|
|
2301
|
-
function
|
|
2335
|
+
function Qt(e, ...t) {
|
|
2302
2336
|
let n, r, o, i = l;
|
|
2303
2337
|
function l(d) {
|
|
2304
2338
|
const p = t.reduce((f, g) => g(f), e());
|
|
2305
|
-
return n =
|
|
2339
|
+
return n = Ut(p), r = n.cache.get, o = n.cache.set, i = a, a(d);
|
|
2306
2340
|
}
|
|
2307
2341
|
function a(d) {
|
|
2308
2342
|
const p = r(d);
|
|
2309
2343
|
if (p)
|
|
2310
2344
|
return p;
|
|
2311
|
-
const f =
|
|
2345
|
+
const f = Xt(d, n);
|
|
2312
2346
|
return o(d, f), f;
|
|
2313
2347
|
}
|
|
2314
2348
|
return function() {
|
|
2315
|
-
return i(
|
|
2349
|
+
return i(Jt.apply(null, arguments));
|
|
2316
2350
|
};
|
|
2317
2351
|
}
|
|
2318
2352
|
const D = (e) => {
|
|
2319
2353
|
const t = (n) => n[e] || [];
|
|
2320
2354
|
return t.isThemeGetter = !0, t;
|
|
2321
|
-
}, Ue = /^\[(?:([a-z-]+):)?(.+)\]$/i,
|
|
2355
|
+
}, Ue = /^\[(?:([a-z-]+):)?(.+)\]$/i, Zt = /^\d+\/\d+$/, en = /* @__PURE__ */ new Set(["px", "full", "screen"]), tn = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, nn = /\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$/, rn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, on = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, sn = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, G = (e) => re(e) || en.has(e) || Zt.test(e), U = (e) => ie(e, "length", hn), re = (e) => !!e && !Number.isNaN(Number(e)), be = (e) => ie(e, "number", re), le = (e) => !!e && Number.isInteger(Number(e)), cn = (e) => e.endsWith("%") && re(e.slice(0, -1)), M = (e) => Ue.test(e), q = (e) => tn.test(e), an = /* @__PURE__ */ new Set(["length", "size", "percentage"]), ln = (e) => ie(e, an, qe), dn = (e) => ie(e, "position", qe), un = /* @__PURE__ */ new Set(["image", "url"]), pn = (e) => ie(e, un, gn), fn = (e) => ie(e, "", mn), de = () => !0, ie = (e, t, n) => {
|
|
2322
2356
|
const r = Ue.exec(e);
|
|
2323
2357
|
return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1;
|
|
2324
|
-
},
|
|
2358
|
+
}, hn = (e) => (
|
|
2325
2359
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
2326
2360
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
2327
2361
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
2328
|
-
|
|
2329
|
-
), qe = () => !1,
|
|
2330
|
-
const e = D("colors"), t = D("spacing"), n = D("blur"), r = D("brightness"), o = D("borderColor"), i = D("borderRadius"), l = D("borderSpacing"), a = D("borderWidth"), d = D("contrast"), p = D("grayscale"), f = D("hueRotate"), g = D("invert"), c = D("gap"), u = D("gradientColorStops"), w = D("gradientColorStopPositions"), m = D("inset"), v = D("margin"), N = D("opacity"), h = D("padding"), k = D("saturate"), b = D("scale"),
|
|
2362
|
+
nn.test(e) && !rn.test(e)
|
|
2363
|
+
), qe = () => !1, mn = (e) => on.test(e), gn = (e) => sn.test(e), bn = () => {
|
|
2364
|
+
const e = D("colors"), t = D("spacing"), n = D("blur"), r = D("brightness"), o = D("borderColor"), i = D("borderRadius"), l = D("borderSpacing"), a = D("borderWidth"), d = D("contrast"), p = D("grayscale"), f = D("hueRotate"), g = D("invert"), c = D("gap"), u = D("gradientColorStops"), w = D("gradientColorStopPositions"), m = D("inset"), v = D("margin"), N = D("opacity"), h = D("padding"), k = D("saturate"), b = D("scale"), C = D("sepia"), R = D("skew"), I = D("space"), T = D("translate"), x = () => ["auto", "contain", "none"], E = () => ["auto", "hidden", "clip", "visible", "scroll"], A = () => ["auto", M, t], S = () => [M, t], L = () => ["", G, U], $ = () => ["auto", re, M], P = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], H = () => ["solid", "dashed", "dotted", "double", "none"], ee = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], K = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], Q = () => ["", "0", M], ce = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], F = () => [re, M];
|
|
2331
2365
|
return {
|
|
2332
2366
|
cacheSize: 500,
|
|
2333
2367
|
separator: ":",
|
|
@@ -2338,25 +2372,25 @@ const D = (e) => {
|
|
|
2338
2372
|
brightness: F(),
|
|
2339
2373
|
borderColor: [e],
|
|
2340
2374
|
borderRadius: ["none", "", "full", q, M],
|
|
2341
|
-
borderSpacing:
|
|
2375
|
+
borderSpacing: S(),
|
|
2342
2376
|
borderWidth: L(),
|
|
2343
2377
|
contrast: F(),
|
|
2344
2378
|
grayscale: Q(),
|
|
2345
2379
|
hueRotate: F(),
|
|
2346
2380
|
invert: Q(),
|
|
2347
|
-
gap:
|
|
2381
|
+
gap: S(),
|
|
2348
2382
|
gradientColorStops: [e],
|
|
2349
|
-
gradientColorStopPositions: [
|
|
2383
|
+
gradientColorStopPositions: [cn, U],
|
|
2350
2384
|
inset: A(),
|
|
2351
2385
|
margin: A(),
|
|
2352
2386
|
opacity: F(),
|
|
2353
|
-
padding:
|
|
2387
|
+
padding: S(),
|
|
2354
2388
|
saturate: F(),
|
|
2355
2389
|
scale: F(),
|
|
2356
2390
|
sepia: Q(),
|
|
2357
2391
|
skew: F(),
|
|
2358
|
-
space:
|
|
2359
|
-
translate:
|
|
2392
|
+
space: S(),
|
|
2393
|
+
translate: S()
|
|
2360
2394
|
},
|
|
2361
2395
|
classGroups: {
|
|
2362
2396
|
// Layout
|
|
@@ -3187,7 +3221,7 @@ const D = (e) => {
|
|
|
3187
3221
|
* @see https://tailwindcss.com/docs/text-indent
|
|
3188
3222
|
*/
|
|
3189
3223
|
indent: [{
|
|
3190
|
-
indent:
|
|
3224
|
+
indent: S()
|
|
3191
3225
|
}],
|
|
3192
3226
|
/**
|
|
3193
3227
|
* Vertical Alignment
|
|
@@ -3259,7 +3293,7 @@ const D = (e) => {
|
|
|
3259
3293
|
* @see https://tailwindcss.com/docs/background-position
|
|
3260
3294
|
*/
|
|
3261
3295
|
"bg-position": [{
|
|
3262
|
-
bg: [...P(),
|
|
3296
|
+
bg: [...P(), dn]
|
|
3263
3297
|
}],
|
|
3264
3298
|
/**
|
|
3265
3299
|
* Background Repeat
|
|
@@ -3275,7 +3309,7 @@ const D = (e) => {
|
|
|
3275
3309
|
* @see https://tailwindcss.com/docs/background-size
|
|
3276
3310
|
*/
|
|
3277
3311
|
"bg-size": [{
|
|
3278
|
-
bg: ["auto", "cover", "contain",
|
|
3312
|
+
bg: ["auto", "cover", "contain", ln]
|
|
3279
3313
|
}],
|
|
3280
3314
|
/**
|
|
3281
3315
|
* Background Image
|
|
@@ -3284,7 +3318,7 @@ const D = (e) => {
|
|
|
3284
3318
|
"bg-image": [{
|
|
3285
3319
|
bg: ["none", {
|
|
3286
3320
|
"gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
3287
|
-
},
|
|
3321
|
+
}, pn]
|
|
3288
3322
|
}],
|
|
3289
3323
|
/**
|
|
3290
3324
|
* Background Color
|
|
@@ -3700,7 +3734,7 @@ const D = (e) => {
|
|
|
3700
3734
|
* @see https://tailwindcss.com/docs/box-shadow
|
|
3701
3735
|
*/
|
|
3702
3736
|
shadow: [{
|
|
3703
|
-
shadow: ["", "inner", "none", q,
|
|
3737
|
+
shadow: ["", "inner", "none", q, fn]
|
|
3704
3738
|
}],
|
|
3705
3739
|
/**
|
|
3706
3740
|
* Box Shadow Color
|
|
@@ -3800,7 +3834,7 @@ const D = (e) => {
|
|
|
3800
3834
|
* @see https://tailwindcss.com/docs/sepia
|
|
3801
3835
|
*/
|
|
3802
3836
|
sepia: [{
|
|
3803
|
-
sepia: [
|
|
3837
|
+
sepia: [C]
|
|
3804
3838
|
}],
|
|
3805
3839
|
/**
|
|
3806
3840
|
* Backdrop Filter
|
|
@@ -3871,7 +3905,7 @@ const D = (e) => {
|
|
|
3871
3905
|
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
3872
3906
|
*/
|
|
3873
3907
|
"backdrop-sepia": [{
|
|
3874
|
-
"backdrop-sepia": [
|
|
3908
|
+
"backdrop-sepia": [C]
|
|
3875
3909
|
}],
|
|
3876
3910
|
// Tables
|
|
3877
3911
|
/**
|
|
@@ -3993,14 +4027,14 @@ const D = (e) => {
|
|
|
3993
4027
|
* @see https://tailwindcss.com/docs/translate
|
|
3994
4028
|
*/
|
|
3995
4029
|
"translate-x": [{
|
|
3996
|
-
"translate-x": [
|
|
4030
|
+
"translate-x": [T]
|
|
3997
4031
|
}],
|
|
3998
4032
|
/**
|
|
3999
4033
|
* Translate Y
|
|
4000
4034
|
* @see https://tailwindcss.com/docs/translate
|
|
4001
4035
|
*/
|
|
4002
4036
|
"translate-y": [{
|
|
4003
|
-
"translate-y": [
|
|
4037
|
+
"translate-y": [T]
|
|
4004
4038
|
}],
|
|
4005
4039
|
/**
|
|
4006
4040
|
* Skew X
|
|
@@ -4078,126 +4112,126 @@ const D = (e) => {
|
|
|
4078
4112
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4079
4113
|
*/
|
|
4080
4114
|
"scroll-m": [{
|
|
4081
|
-
"scroll-m":
|
|
4115
|
+
"scroll-m": S()
|
|
4082
4116
|
}],
|
|
4083
4117
|
/**
|
|
4084
4118
|
* Scroll Margin X
|
|
4085
4119
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4086
4120
|
*/
|
|
4087
4121
|
"scroll-mx": [{
|
|
4088
|
-
"scroll-mx":
|
|
4122
|
+
"scroll-mx": S()
|
|
4089
4123
|
}],
|
|
4090
4124
|
/**
|
|
4091
4125
|
* Scroll Margin Y
|
|
4092
4126
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4093
4127
|
*/
|
|
4094
4128
|
"scroll-my": [{
|
|
4095
|
-
"scroll-my":
|
|
4129
|
+
"scroll-my": S()
|
|
4096
4130
|
}],
|
|
4097
4131
|
/**
|
|
4098
4132
|
* Scroll Margin Start
|
|
4099
4133
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4100
4134
|
*/
|
|
4101
4135
|
"scroll-ms": [{
|
|
4102
|
-
"scroll-ms":
|
|
4136
|
+
"scroll-ms": S()
|
|
4103
4137
|
}],
|
|
4104
4138
|
/**
|
|
4105
4139
|
* Scroll Margin End
|
|
4106
4140
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4107
4141
|
*/
|
|
4108
4142
|
"scroll-me": [{
|
|
4109
|
-
"scroll-me":
|
|
4143
|
+
"scroll-me": S()
|
|
4110
4144
|
}],
|
|
4111
4145
|
/**
|
|
4112
4146
|
* Scroll Margin Top
|
|
4113
4147
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4114
4148
|
*/
|
|
4115
4149
|
"scroll-mt": [{
|
|
4116
|
-
"scroll-mt":
|
|
4150
|
+
"scroll-mt": S()
|
|
4117
4151
|
}],
|
|
4118
4152
|
/**
|
|
4119
4153
|
* Scroll Margin Right
|
|
4120
4154
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4121
4155
|
*/
|
|
4122
4156
|
"scroll-mr": [{
|
|
4123
|
-
"scroll-mr":
|
|
4157
|
+
"scroll-mr": S()
|
|
4124
4158
|
}],
|
|
4125
4159
|
/**
|
|
4126
4160
|
* Scroll Margin Bottom
|
|
4127
4161
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4128
4162
|
*/
|
|
4129
4163
|
"scroll-mb": [{
|
|
4130
|
-
"scroll-mb":
|
|
4164
|
+
"scroll-mb": S()
|
|
4131
4165
|
}],
|
|
4132
4166
|
/**
|
|
4133
4167
|
* Scroll Margin Left
|
|
4134
4168
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4135
4169
|
*/
|
|
4136
4170
|
"scroll-ml": [{
|
|
4137
|
-
"scroll-ml":
|
|
4171
|
+
"scroll-ml": S()
|
|
4138
4172
|
}],
|
|
4139
4173
|
/**
|
|
4140
4174
|
* Scroll Padding
|
|
4141
4175
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4142
4176
|
*/
|
|
4143
4177
|
"scroll-p": [{
|
|
4144
|
-
"scroll-p":
|
|
4178
|
+
"scroll-p": S()
|
|
4145
4179
|
}],
|
|
4146
4180
|
/**
|
|
4147
4181
|
* Scroll Padding X
|
|
4148
4182
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4149
4183
|
*/
|
|
4150
4184
|
"scroll-px": [{
|
|
4151
|
-
"scroll-px":
|
|
4185
|
+
"scroll-px": S()
|
|
4152
4186
|
}],
|
|
4153
4187
|
/**
|
|
4154
4188
|
* Scroll Padding Y
|
|
4155
4189
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4156
4190
|
*/
|
|
4157
4191
|
"scroll-py": [{
|
|
4158
|
-
"scroll-py":
|
|
4192
|
+
"scroll-py": S()
|
|
4159
4193
|
}],
|
|
4160
4194
|
/**
|
|
4161
4195
|
* Scroll Padding Start
|
|
4162
4196
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4163
4197
|
*/
|
|
4164
4198
|
"scroll-ps": [{
|
|
4165
|
-
"scroll-ps":
|
|
4199
|
+
"scroll-ps": S()
|
|
4166
4200
|
}],
|
|
4167
4201
|
/**
|
|
4168
4202
|
* Scroll Padding End
|
|
4169
4203
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4170
4204
|
*/
|
|
4171
4205
|
"scroll-pe": [{
|
|
4172
|
-
"scroll-pe":
|
|
4206
|
+
"scroll-pe": S()
|
|
4173
4207
|
}],
|
|
4174
4208
|
/**
|
|
4175
4209
|
* Scroll Padding Top
|
|
4176
4210
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4177
4211
|
*/
|
|
4178
4212
|
"scroll-pt": [{
|
|
4179
|
-
"scroll-pt":
|
|
4213
|
+
"scroll-pt": S()
|
|
4180
4214
|
}],
|
|
4181
4215
|
/**
|
|
4182
4216
|
* Scroll Padding Right
|
|
4183
4217
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4184
4218
|
*/
|
|
4185
4219
|
"scroll-pr": [{
|
|
4186
|
-
"scroll-pr":
|
|
4220
|
+
"scroll-pr": S()
|
|
4187
4221
|
}],
|
|
4188
4222
|
/**
|
|
4189
4223
|
* Scroll Padding Bottom
|
|
4190
4224
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4191
4225
|
*/
|
|
4192
4226
|
"scroll-pb": [{
|
|
4193
|
-
"scroll-pb":
|
|
4227
|
+
"scroll-pb": S()
|
|
4194
4228
|
}],
|
|
4195
4229
|
/**
|
|
4196
4230
|
* Scroll Padding Left
|
|
4197
4231
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4198
4232
|
*/
|
|
4199
4233
|
"scroll-pl": [{
|
|
4200
|
-
"scroll-pl":
|
|
4234
|
+
"scroll-pl": S()
|
|
4201
4235
|
}],
|
|
4202
4236
|
/**
|
|
4203
4237
|
* Scroll Snap Align
|
|
@@ -4355,12 +4389,12 @@ const D = (e) => {
|
|
|
4355
4389
|
"font-size": ["leading"]
|
|
4356
4390
|
}
|
|
4357
4391
|
};
|
|
4358
|
-
},
|
|
4359
|
-
function
|
|
4360
|
-
return
|
|
4392
|
+
}, vn = /* @__PURE__ */ Qt(bn);
|
|
4393
|
+
function wn(...e) {
|
|
4394
|
+
return vn(ht(e));
|
|
4361
4395
|
}
|
|
4362
|
-
function
|
|
4363
|
-
const [r, o] =
|
|
4396
|
+
function tr({ autoWidth: e = !0, className: t, style: n }) {
|
|
4397
|
+
const [r, o] = z(() => j.getActiveAppId()), [i, l] = z(() => V.getRunningApps()), { isMobile: a } = Ye();
|
|
4364
4398
|
B(() => {
|
|
4365
4399
|
const v = j.subscribe("activeAppId", (N) => {
|
|
4366
4400
|
o(N);
|
|
@@ -4386,7 +4420,7 @@ function Qn({ autoWidth: e = !0, className: t, style: n }) {
|
|
|
4386
4420
|
// Only set width if autoWidth is enabled
|
|
4387
4421
|
...e && c ? { width: a ? "100%" : g } : {}
|
|
4388
4422
|
}, ...n };
|
|
4389
|
-
return /* @__PURE__ */ s("div", { className:
|
|
4423
|
+
return /* @__PURE__ */ s("div", { className: wn("nc-app-panel", t), style: m, children: i.map((v) => /* @__PURE__ */ s(
|
|
4390
4424
|
Fe,
|
|
4391
4425
|
{
|
|
4392
4426
|
appId: v.appId,
|
|
@@ -4396,8 +4430,8 @@ function Qn({ autoWidth: e = !0, className: t, style: n }) {
|
|
|
4396
4430
|
v.appId
|
|
4397
4431
|
)) });
|
|
4398
4432
|
}
|
|
4399
|
-
function
|
|
4400
|
-
const { isMobile: n } = Ye(), [r, o] =
|
|
4433
|
+
function nr({ pinnedAppIds: e, className: t = "" }) {
|
|
4434
|
+
const { isMobile: n } = Ye(), [r, o] = z(() => j.getActiveAppId()), [i, l] = z(() => V.getRunningApps());
|
|
4401
4435
|
B(() => {
|
|
4402
4436
|
const c = j.subscribe("activeAppId", (u) => {
|
|
4403
4437
|
o(u);
|
|
@@ -4447,7 +4481,7 @@ function Zn({ pinnedAppIds: e, className: t = "" }) {
|
|
|
4447
4481
|
})
|
|
4448
4482
|
] });
|
|
4449
4483
|
}
|
|
4450
|
-
function
|
|
4484
|
+
function rr({
|
|
4451
4485
|
appId: e,
|
|
4452
4486
|
open: t,
|
|
4453
4487
|
onClose: n,
|
|
@@ -4484,33 +4518,33 @@ function er({
|
|
|
4484
4518
|
);
|
|
4485
4519
|
return pe(a, document.body);
|
|
4486
4520
|
}
|
|
4487
|
-
const
|
|
4488
|
-
function
|
|
4489
|
-
const e = X(
|
|
4521
|
+
const Ae = se(null), Xe = se(null);
|
|
4522
|
+
function or() {
|
|
4523
|
+
const e = X(Ae);
|
|
4490
4524
|
if (!e)
|
|
4491
4525
|
throw new Error("useNavStack must be used within a NavStackProvider");
|
|
4492
4526
|
return e;
|
|
4493
4527
|
}
|
|
4494
|
-
function
|
|
4528
|
+
function sr() {
|
|
4495
4529
|
const e = X(Xe);
|
|
4496
4530
|
if (!e)
|
|
4497
4531
|
throw new Error("useNavView must be used within NavStack");
|
|
4498
4532
|
return e;
|
|
4499
4533
|
}
|
|
4500
|
-
const
|
|
4501
|
-
function
|
|
4502
|
-
const { t: n } = J(), r =
|
|
4534
|
+
const Ce = se(null);
|
|
4535
|
+
function ir({ rootView: e, children: t }) {
|
|
4536
|
+
const { t: n } = J(), r = Bt(), [o, i] = z([e]), [l, a] = z([null]), d = O((b, C) => {
|
|
4503
4537
|
a((R) => {
|
|
4504
4538
|
const I = [...R];
|
|
4505
|
-
return I[b] =
|
|
4539
|
+
return I[b] = C, I;
|
|
4506
4540
|
});
|
|
4507
4541
|
}, []), p = O((b) => {
|
|
4508
|
-
a((
|
|
4509
|
-
const R = [...
|
|
4542
|
+
a((C) => {
|
|
4543
|
+
const R = [...C];
|
|
4510
4544
|
return R[b] = null, R;
|
|
4511
4545
|
});
|
|
4512
4546
|
}, []), f = O((b) => {
|
|
4513
|
-
i((
|
|
4547
|
+
i((C) => [...C, b]), a((C) => [...C, null]);
|
|
4514
4548
|
}, []), g = O(() => {
|
|
4515
4549
|
i((b) => b.length <= 1 ? b : b.slice(0, -1)), a((b) => b.slice(0, -1));
|
|
4516
4550
|
}, []), c = O(() => {
|
|
@@ -4538,10 +4572,10 @@ function rr({ rootView: e, children: t }) {
|
|
|
4538
4572
|
clearToolbarAt: p,
|
|
4539
4573
|
topIndex: m
|
|
4540
4574
|
};
|
|
4541
|
-
return /* @__PURE__ */ s(
|
|
4575
|
+
return /* @__PURE__ */ s(Ae.Provider, { value: h, children: /* @__PURE__ */ s(Ce.Provider, { value: k, children: t }) });
|
|
4542
4576
|
}
|
|
4543
|
-
function
|
|
4544
|
-
const n = X(
|
|
4577
|
+
function yn({ index: e, children: t }) {
|
|
4578
|
+
const n = X(Ce);
|
|
4545
4579
|
if (!n)
|
|
4546
4580
|
throw new Error("NavViewProvider must be used within NavStackProvider");
|
|
4547
4581
|
const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n, l = O((p) => {
|
|
@@ -4554,14 +4588,14 @@ function bn({ index: e, children: t }) {
|
|
|
4554
4588
|
};
|
|
4555
4589
|
return /* @__PURE__ */ s(Xe.Provider, { value: d, children: t });
|
|
4556
4590
|
}
|
|
4557
|
-
function
|
|
4558
|
-
const e = X(
|
|
4591
|
+
function cr() {
|
|
4592
|
+
const e = X(Ae), t = X(Ce);
|
|
4559
4593
|
if (!e || !t)
|
|
4560
4594
|
throw new Error("NavStackContainer must be used within a NavStackProvider");
|
|
4561
4595
|
const { stack: n } = t;
|
|
4562
4596
|
return /* @__PURE__ */ s("div", { className: "nav-stack-container", children: /* @__PURE__ */ s("div", { className: "nav-stack-content", children: n.map((r, o) => {
|
|
4563
4597
|
const i = o === n.length - 1;
|
|
4564
|
-
return /* @__PURE__ */ s(
|
|
4598
|
+
return /* @__PURE__ */ s(yn, { index: o, children: /* @__PURE__ */ s(
|
|
4565
4599
|
"div",
|
|
4566
4600
|
{
|
|
4567
4601
|
style: { display: i ? "flex" : "none", flexDirection: "column", height: "100%" },
|
|
@@ -4572,53 +4606,54 @@ function or() {
|
|
|
4572
4606
|
}
|
|
4573
4607
|
export {
|
|
4574
4608
|
Be as ActivityIndicator,
|
|
4575
|
-
|
|
4609
|
+
$n as Alert,
|
|
4576
4610
|
Fe as AppContainer,
|
|
4577
4611
|
Oe as AppContext,
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4612
|
+
rr as AppDialog,
|
|
4613
|
+
tr as AppPanel,
|
|
4614
|
+
nr as AppTaskbar,
|
|
4615
|
+
Ht as AppTitleBar,
|
|
4616
|
+
Rn as Battery,
|
|
4583
4617
|
Y as Button,
|
|
4584
|
-
|
|
4585
|
-
|
|
4618
|
+
En as ButtonGroup,
|
|
4619
|
+
zn as Checkbox,
|
|
4586
4620
|
De as CloseButton,
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4621
|
+
Tn as ComboBox,
|
|
4622
|
+
Hn as ContextMenu,
|
|
4623
|
+
Xn as CsvTextArea,
|
|
4624
|
+
Wn as Dialog,
|
|
4591
4625
|
ne as DialogClose,
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4626
|
+
Ln as EditButton,
|
|
4627
|
+
Dn as Hyperlink,
|
|
4628
|
+
On as Input,
|
|
4629
|
+
Vn as ListGroup,
|
|
4630
|
+
Fn as ListGroupItem,
|
|
4631
|
+
Yn as MonthRangePicker,
|
|
4632
|
+
Gn as MultiSelect,
|
|
4633
|
+
cr as NavStackContainer,
|
|
4634
|
+
ir as NavStackProvider,
|
|
4635
|
+
Et as Notification,
|
|
4636
|
+
Jn as NotificationContainer,
|
|
4637
|
+
jn as NumberInput,
|
|
4638
|
+
Pn as RefreshButton,
|
|
4639
|
+
Kn as Slider,
|
|
4640
|
+
Ct as TabPanel,
|
|
4641
|
+
_n as TabPanels,
|
|
4642
|
+
Un as Tabs,
|
|
4643
|
+
qn as Toggle,
|
|
4644
|
+
Bn as TrashButton,
|
|
4645
|
+
er as ViewportProvider,
|
|
4612
4646
|
oe as appRegistry,
|
|
4613
4647
|
j as appStateStore,
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4648
|
+
wn as cn,
|
|
4649
|
+
Zn as createAppI18nFactory,
|
|
4650
|
+
Qn as notificationManager,
|
|
4617
4651
|
V as runningAppsStore,
|
|
4618
|
-
zt as
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4652
|
+
zt as showNotification,
|
|
4653
|
+
Bt as useApp,
|
|
4654
|
+
xt as useDialog,
|
|
4655
|
+
or as useNavStack,
|
|
4656
|
+
sr as useNavView,
|
|
4622
4657
|
Ye as useViewport
|
|
4623
4658
|
};
|
|
4624
4659
|
//# sourceMappingURL=index.js.map
|