@kingsimba/nc-ui 0.1.26 → 0.1.28
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 +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.js +709 -691
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var et = Object.defineProperty;
|
|
2
2
|
var tt = (e, t, n) => t in e ? et(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
-
var
|
|
4
|
-
import { jsx as s, jsxs as
|
|
3
|
+
var q = (e, t, n) => tt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { jsx as s, jsxs as A, 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 E, useRef as W, useMemo as me, useEffect as B, createContext as se, useContext as
|
|
6
|
+
import ke, { useState as E, useRef as W, useMemo as me, useEffect as B, createContext as se, useContext as Q, 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
|
-
import { useTranslation as
|
|
8
|
+
import { useTranslation as U } from "react-i18next";
|
|
9
9
|
import { c as gt } from "./YamlTextArea-ee1d1TLc.js";
|
|
10
10
|
import { Y as fr } from "./YamlTextArea-ee1d1TLc.js";
|
|
11
11
|
import bt from "i18next";
|
|
@@ -38,8 +38,8 @@ function He({
|
|
|
38
38
|
);
|
|
39
39
|
return n ? /* @__PURE__ */ s("div", { className: "nc-activity-indicator-overlay", children: o }) : o;
|
|
40
40
|
}
|
|
41
|
-
function K({ variant: e = "default", block: t, size: n = "default", appearance: r = "default", className: o, disabled: i, textSelectable: a, loading: c, onClick: l, children:
|
|
42
|
-
const
|
|
41
|
+
function K({ variant: e = "default", block: t, size: n = "default", appearance: r = "default", className: o, disabled: i, textSelectable: a, loading: c, onClick: l, children: u, ...f }) {
|
|
42
|
+
const v = [
|
|
43
43
|
"nc-button",
|
|
44
44
|
e !== "default" ? `nc-${e}` : "",
|
|
45
45
|
t ? "nc-block" : "",
|
|
@@ -51,19 +51,19 @@ function K({ variant: e = "default", block: t, size: n = "default", appearance:
|
|
|
51
51
|
c ? "nc-loading" : "",
|
|
52
52
|
o ?? ""
|
|
53
53
|
].filter(Boolean).join(" ");
|
|
54
|
-
return /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ A(
|
|
55
55
|
"button",
|
|
56
56
|
{
|
|
57
|
-
className:
|
|
57
|
+
className: v,
|
|
58
58
|
disabled: i || c,
|
|
59
|
-
onClick: (
|
|
59
|
+
onClick: (m) => {
|
|
60
60
|
if (!c) {
|
|
61
61
|
if (a) {
|
|
62
|
-
const
|
|
63
|
-
if (
|
|
62
|
+
const y = window.getSelection();
|
|
63
|
+
if (y && y.toString().length > 0)
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
|
-
l == null || l(
|
|
66
|
+
l == null || l(m);
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
...f,
|
|
@@ -76,7 +76,7 @@ function K({ variant: e = "default", block: t, size: n = "default", appearance:
|
|
|
76
76
|
color: r === "transparent" || e !== "default" && e !== "ghost" ? "white" : void 0
|
|
77
77
|
}
|
|
78
78
|
),
|
|
79
|
-
|
|
79
|
+
u
|
|
80
80
|
]
|
|
81
81
|
}
|
|
82
82
|
);
|
|
@@ -99,13 +99,13 @@ function Tn({
|
|
|
99
99
|
className: c = "",
|
|
100
100
|
style: l
|
|
101
101
|
}) {
|
|
102
|
-
const
|
|
102
|
+
const u = i ?? /* @__PURE__ */ A(nt, { children: [
|
|
103
103
|
e !== void 0 && /* @__PURE__ */ s("span", { className: "nc-alert-code", children: e }),
|
|
104
104
|
t
|
|
105
105
|
] });
|
|
106
|
-
return /* @__PURE__ */
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
/* @__PURE__ */ s("div", { className: `nc-alert-message nc-${n}`, children:
|
|
106
|
+
return /* @__PURE__ */ A("div", { className: `nc-alert nc-${n} ${c}`.trim(), style: l, children: [
|
|
107
|
+
/* @__PURE__ */ A("div", { className: "nc-alert-main", children: [
|
|
108
|
+
/* @__PURE__ */ s("div", { className: `nc-alert-message nc-${n}`, children: u }),
|
|
109
109
|
a && /* @__PURE__ */ s(
|
|
110
110
|
"button",
|
|
111
111
|
{
|
|
@@ -134,67 +134,71 @@ function zn({
|
|
|
134
134
|
darkMode: n = !1,
|
|
135
135
|
colored: r = !1
|
|
136
136
|
}) {
|
|
137
|
-
const o = Math.max(0, Math.min(1, Number(e) || 0));
|
|
138
|
-
let
|
|
139
|
-
r ? o < 0.1 ?
|
|
140
|
-
const
|
|
141
|
-
return /* @__PURE__ */
|
|
137
|
+
const o = Math.max(0, Math.min(1, Number(e) || 0)), i = o === 0 ? "-" : String(Math.round(o * 100));
|
|
138
|
+
let a;
|
|
139
|
+
r ? o < 0.1 ? a = "var(--nc-danger)" : o < 0.2 ? a = "var(--nc-warning)" : a = "var(--nc-success)" : a = n ? "#ffffff" : "#000000";
|
|
140
|
+
const c = "var(--nc-battery-shell-bg)", l = 24, u = 14, f = 2, v = 0, d = 12, m = 0, y = 0, g = 0, w = l, k = u, b = k - m * 2, p = w - m * 2, h = Math.max(1, Math.min(4, k / 4)), N = o === 0 ? 0 : 0.05 + o * 0.95, C = l + f + d, z = 20, T = 0.65, x = Math.max(u, z * T), R = l + f + 1, S = (u - z * T) / 2;
|
|
141
|
+
return /* @__PURE__ */ A(
|
|
142
142
|
"svg",
|
|
143
143
|
{
|
|
144
144
|
className: "nc-battery",
|
|
145
|
-
width:
|
|
146
|
-
height:
|
|
147
|
-
viewBox: `0 0 ${
|
|
145
|
+
width: C,
|
|
146
|
+
height: x,
|
|
147
|
+
viewBox: `0 0 ${C} ${x}`,
|
|
148
148
|
role: "img",
|
|
149
|
-
"aria-label": `Battery ${
|
|
149
|
+
"aria-label": `Battery ${i === "-" ? "-" : `${i}%`} ${t}`,
|
|
150
150
|
children: [
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
"
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
151
|
+
/* @__PURE__ */ s("defs", { children: /* @__PURE__ */ s("mask", { id: `nc-battery-fill-mask-${o}`, children: /* @__PURE__ */ s("rect", { x: "0", y: "0", width: p * N, height: b, fill: "white" }) }) }),
|
|
152
|
+
/* @__PURE__ */ s(
|
|
153
|
+
"rect",
|
|
154
|
+
{
|
|
155
|
+
x: y,
|
|
156
|
+
y: g,
|
|
157
|
+
rx: h,
|
|
158
|
+
ry: h,
|
|
159
|
+
width: w,
|
|
160
|
+
height: k,
|
|
161
|
+
fill: c
|
|
162
|
+
}
|
|
163
|
+
),
|
|
164
|
+
/* @__PURE__ */ s(
|
|
165
|
+
"rect",
|
|
166
|
+
{
|
|
167
|
+
x: y + m,
|
|
168
|
+
y: g + m,
|
|
169
|
+
width: p,
|
|
170
|
+
height: b,
|
|
171
|
+
fill: a,
|
|
172
|
+
rx: h,
|
|
173
|
+
ry: h,
|
|
174
|
+
mask: `url(#nc-battery-fill-mask-${o})`
|
|
175
|
+
}
|
|
176
|
+
),
|
|
177
|
+
/* @__PURE__ */ s(
|
|
178
|
+
"text",
|
|
179
|
+
{
|
|
180
|
+
x: y + w / 2,
|
|
181
|
+
y: u - 3,
|
|
182
|
+
fontSize: 11,
|
|
183
|
+
fontWeight: "bold",
|
|
184
|
+
fill: "var(--nc-battery-text-contrast)",
|
|
185
|
+
textAnchor: "middle",
|
|
186
|
+
children: i
|
|
187
|
+
}
|
|
188
|
+
),
|
|
189
|
+
/* @__PURE__ */ s(
|
|
190
|
+
"rect",
|
|
191
|
+
{
|
|
192
|
+
x: l + v,
|
|
193
|
+
y: u * 0.26,
|
|
194
|
+
width: f,
|
|
195
|
+
height: u * 0.48,
|
|
196
|
+
rx: 0.8,
|
|
197
|
+
ry: 0.8,
|
|
198
|
+
fill: o === 1 ? a : c
|
|
199
|
+
}
|
|
200
|
+
),
|
|
201
|
+
t === "charging" ? /* @__PURE__ */ s("g", { transform: `translate(${R}, ${S}) scale(${T})`, fill: a, children: /* @__PURE__ */ s("path", { d: "M10 0 L2 11 H8 L5 20 L14 8 H8 L10 0 Z" }) }) : null
|
|
198
202
|
]
|
|
199
203
|
}
|
|
200
204
|
);
|
|
@@ -235,13 +239,13 @@ function wt({ size: e }) {
|
|
|
235
239
|
}
|
|
236
240
|
function Ln({ checked: e, onChange: t, disabled: n, label: r, size: o = "default", labelColor: i, style: a, className: c = "" }) {
|
|
237
241
|
const l = o === "small";
|
|
238
|
-
return /* @__PURE__ */
|
|
242
|
+
return /* @__PURE__ */ A(
|
|
239
243
|
"label",
|
|
240
244
|
{
|
|
241
245
|
className: `nc-checkbox-label ${l ? "nc-small" : ""} ${n ? "nc-disabled" : ""} ${c}`.trim(),
|
|
242
246
|
style: a,
|
|
243
|
-
onClick: (
|
|
244
|
-
n || (
|
|
247
|
+
onClick: (u) => {
|
|
248
|
+
n || (u.preventDefault(), t(!e));
|
|
245
249
|
},
|
|
246
250
|
children: [
|
|
247
251
|
/* @__PURE__ */ s(
|
|
@@ -251,8 +255,8 @@ function Ln({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
|
|
|
251
255
|
"aria-checked": e,
|
|
252
256
|
tabIndex: 0,
|
|
253
257
|
className: `nc-checkbox-box ${l ? "nc-small" : ""} ${e ? "nc-checked" : ""}`,
|
|
254
|
-
onKeyDown: (
|
|
255
|
-
n || (
|
|
258
|
+
onKeyDown: (u) => {
|
|
259
|
+
n || (u.key === "Enter" || u.key === " ") && (u.preventDefault(), t(!e));
|
|
256
260
|
},
|
|
257
261
|
children: e && /* @__PURE__ */ s(wt, { size: o })
|
|
258
262
|
}
|
|
@@ -263,10 +267,10 @@ function Ln({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
|
|
|
263
267
|
);
|
|
264
268
|
}
|
|
265
269
|
function yt({ option: e, onChange: t, selected: n, highlighted: r, small: o }) {
|
|
266
|
-
const i = W(null), { t: a } =
|
|
270
|
+
const i = W(null), { t: a } = U();
|
|
267
271
|
return B(() => {
|
|
268
272
|
r && i.current && i.current.scrollIntoView({ block: "nearest" });
|
|
269
|
-
}, [r]), /* @__PURE__ */
|
|
273
|
+
}, [r]), /* @__PURE__ */ A(
|
|
270
274
|
"div",
|
|
271
275
|
{
|
|
272
276
|
ref: i,
|
|
@@ -280,7 +284,7 @@ function yt({ option: e, onChange: t, selected: n, highlighted: r, small: o }) {
|
|
|
280
284
|
},
|
|
281
285
|
children: [
|
|
282
286
|
e.label,
|
|
283
|
-
e.default && /* @__PURE__ */
|
|
287
|
+
e.default && /* @__PURE__ */ A("span", { style: { fontSize: "0.85em", color: "var(--nc-text-weak)", marginLeft: 6 }, children: [
|
|
284
288
|
"(",
|
|
285
289
|
a("common.default"),
|
|
286
290
|
")"
|
|
@@ -299,23 +303,23 @@ function xt({
|
|
|
299
303
|
small: a,
|
|
300
304
|
highlightedIndex: c = -1
|
|
301
305
|
}) {
|
|
302
|
-
const [l,
|
|
306
|
+
const [l, u] = E({ top: 0, left: 0, width: 0 }), [f, v] = E(o), { t: d } = U();
|
|
303
307
|
if (B(() => {
|
|
304
308
|
if (e && i.current) {
|
|
305
|
-
const
|
|
306
|
-
let
|
|
309
|
+
const y = i.current.getBoundingClientRect();
|
|
310
|
+
let g = o;
|
|
307
311
|
if (o === "bottom") {
|
|
308
|
-
const
|
|
309
|
-
|
|
312
|
+
const w = window.innerHeight - y.bottom, k = y.top;
|
|
313
|
+
w < 320 && k > w && (g = "top");
|
|
310
314
|
}
|
|
311
|
-
|
|
312
|
-
top:
|
|
313
|
-
left:
|
|
314
|
-
width:
|
|
315
|
+
v(g), u({
|
|
316
|
+
top: g === "top" ? y.top - 4 : y.bottom + 4,
|
|
317
|
+
left: y.left,
|
|
318
|
+
width: y.width
|
|
315
319
|
});
|
|
316
320
|
}
|
|
317
321
|
}, [e, i, o]), !e) return null;
|
|
318
|
-
const
|
|
322
|
+
const m = /* @__PURE__ */ s(
|
|
319
323
|
"div",
|
|
320
324
|
{
|
|
321
325
|
className: "nc-combo-dropdown",
|
|
@@ -329,10 +333,10 @@ function xt({
|
|
|
329
333
|
maxHeight: 300,
|
|
330
334
|
overflowY: "auto"
|
|
331
335
|
},
|
|
332
|
-
children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${a ? "nc-small" : ""}`, children: d("common.noResults") }) : t.map((
|
|
336
|
+
children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${a ? "nc-small" : ""}`, children: d("common.noResults") }) : t.map((y, g) => /* @__PURE__ */ s(yt, { option: y, onChange: n, selected: y.value === r, highlighted: g === c, small: a }, y.value))
|
|
333
337
|
}
|
|
334
338
|
);
|
|
335
|
-
return ue(
|
|
339
|
+
return ue(m, document.body);
|
|
336
340
|
}
|
|
337
341
|
function kt({ onClick: e, small: t }) {
|
|
338
342
|
return /* @__PURE__ */ s(
|
|
@@ -368,131 +372,131 @@ function Bn({
|
|
|
368
372
|
clearable: a = !0,
|
|
369
373
|
allowTyping: c = !1,
|
|
370
374
|
placement: l = "bottom",
|
|
371
|
-
size:
|
|
375
|
+
size: u = "default",
|
|
372
376
|
appearance: f = "default",
|
|
373
|
-
textAlign:
|
|
377
|
+
textAlign: v = "left",
|
|
374
378
|
style: d,
|
|
375
|
-
className:
|
|
379
|
+
className: m
|
|
376
380
|
}) {
|
|
377
|
-
const [
|
|
378
|
-
const M =
|
|
379
|
-
return c ? r.filter((
|
|
380
|
-
}, [r,
|
|
381
|
+
const [y, g] = E(!1), [w, k] = E(""), [b, p] = E(-1), h = W(null), N = W(null), C = u === "small", { t: z } = U(), T = me(() => {
|
|
382
|
+
const M = w.toLowerCase();
|
|
383
|
+
return c ? r.filter((L) => L.label.toLowerCase().includes(M)) : r;
|
|
384
|
+
}, [r, w, c]);
|
|
381
385
|
B(() => {
|
|
382
|
-
|
|
383
|
-
}, [
|
|
386
|
+
y && p(-1);
|
|
387
|
+
}, [y, T]), B(() => {
|
|
384
388
|
if (!a && !e && r.length > 0 && t) {
|
|
385
|
-
const M = r.find((
|
|
389
|
+
const M = r.find((L) => L.default) || r[0];
|
|
386
390
|
t(M.value);
|
|
387
391
|
}
|
|
388
392
|
}, [a, e, r, t]), B(() => {
|
|
389
|
-
function M(
|
|
393
|
+
function M(L) {
|
|
390
394
|
var D;
|
|
391
|
-
|
|
395
|
+
L.target instanceof Node && h.current && ((D = h.current.parentElement) != null && D.contains(L.target) || g(!1));
|
|
392
396
|
}
|
|
393
397
|
return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
|
|
394
398
|
}, []);
|
|
395
|
-
const
|
|
399
|
+
const x = r.find((M) => M.value === e), R = x && a, S = !o && !R, $ = `nc-align-${v}`, P = !(y && c) && !!x, F = (M, L = !1) => {
|
|
396
400
|
var D;
|
|
397
|
-
t == null || t(M),
|
|
401
|
+
t == null || t(M), g(!1), k(""), L && ((D = h.current) == null || D.blur());
|
|
398
402
|
}, Z = () => {
|
|
399
|
-
t == null || t(void 0), k(""),
|
|
403
|
+
t == null || t(void 0), k(""), g(!1);
|
|
400
404
|
}, Y = (M) => {
|
|
401
|
-
if (!
|
|
402
|
-
(M.key === "ArrowDown" || M.key === "ArrowUp") && (
|
|
405
|
+
if (!y) {
|
|
406
|
+
(M.key === "ArrowDown" || M.key === "ArrowUp") && (g(!0), M.preventDefault());
|
|
403
407
|
return;
|
|
404
408
|
}
|
|
405
409
|
switch (M.key) {
|
|
406
410
|
case "ArrowDown":
|
|
407
|
-
M.preventDefault(),
|
|
408
|
-
const D =
|
|
411
|
+
M.preventDefault(), p((L) => {
|
|
412
|
+
const D = L + 1;
|
|
409
413
|
return D >= T.length ? 0 : D;
|
|
410
414
|
});
|
|
411
415
|
break;
|
|
412
416
|
case "ArrowUp":
|
|
413
|
-
M.preventDefault(),
|
|
414
|
-
const D =
|
|
417
|
+
M.preventDefault(), p((L) => {
|
|
418
|
+
const D = L - 1;
|
|
415
419
|
return D < 0 ? T.length - 1 : D;
|
|
416
420
|
});
|
|
417
421
|
break;
|
|
418
422
|
case "Enter":
|
|
419
|
-
M.preventDefault(),
|
|
423
|
+
M.preventDefault(), b >= 0 && b < T.length && F(T[b].value, !0);
|
|
420
424
|
break;
|
|
421
425
|
case "Escape":
|
|
422
|
-
M.preventDefault(),
|
|
426
|
+
M.preventDefault(), g(!1), k("");
|
|
423
427
|
break;
|
|
424
428
|
}
|
|
425
429
|
};
|
|
426
|
-
return /* @__PURE__ */
|
|
427
|
-
i && /* @__PURE__ */ s("span", { className: `nc-label ${
|
|
428
|
-
/* @__PURE__ */
|
|
430
|
+
return /* @__PURE__ */ A("div", { className: `nc-combo-container ${f === "transparent" ? "nc-transparent" : ""} ${$} ${m || ""}`.trim(), style: { position: "relative", ...d }, children: [
|
|
431
|
+
i && /* @__PURE__ */ s("span", { className: `nc-label ${C ? "nc-small" : ""}`, children: i }),
|
|
432
|
+
/* @__PURE__ */ A(
|
|
429
433
|
"div",
|
|
430
434
|
{
|
|
431
|
-
ref:
|
|
435
|
+
ref: N,
|
|
432
436
|
style: { position: "relative", display: "flex", alignItems: "center" },
|
|
433
437
|
onMouseDown: (M) => {
|
|
434
|
-
o || c && M.target ===
|
|
435
|
-
var
|
|
436
|
-
(
|
|
438
|
+
o || c && M.target === h.current || (g((L) => (!L && c && x && k(x.label), !L)), c && !y && setTimeout(() => {
|
|
439
|
+
var L, D;
|
|
440
|
+
(L = h.current) == null || L.focus(), (D = h.current) == null || D.select();
|
|
437
441
|
}, 0));
|
|
438
442
|
},
|
|
439
443
|
children: [
|
|
440
444
|
/* @__PURE__ */ s(
|
|
441
445
|
"input",
|
|
442
446
|
{
|
|
443
|
-
ref:
|
|
444
|
-
className: `nc-input ${
|
|
447
|
+
ref: h,
|
|
448
|
+
className: `nc-input ${C ? "nc-small" : ""}`,
|
|
445
449
|
placeholder: n,
|
|
446
450
|
onFocus: () => {
|
|
447
451
|
var M;
|
|
448
|
-
!o && c && (
|
|
449
|
-
var
|
|
450
|
-
return (
|
|
451
|
-
}, 0))), c || (M =
|
|
452
|
+
!o && c && (g(!0), x && (k(x.label), setTimeout(() => {
|
|
453
|
+
var L;
|
|
454
|
+
return (L = h.current) == null ? void 0 : L.select();
|
|
455
|
+
}, 0))), c || (M = h.current) == null || M.blur();
|
|
452
456
|
},
|
|
453
457
|
onChange: (M) => c && k(M.target.value),
|
|
454
458
|
onKeyDown: Y,
|
|
455
|
-
value:
|
|
459
|
+
value: y && c ? w : (x == null ? void 0 : x.label) || "",
|
|
456
460
|
readOnly: o || !c,
|
|
457
461
|
style: {
|
|
458
462
|
width: "100%",
|
|
459
|
-
paddingRight:
|
|
463
|
+
paddingRight: S || R ? C ? 32 : 44 : 12,
|
|
460
464
|
caretColor: c ? void 0 : "transparent",
|
|
461
465
|
cursor: c ? void 0 : "pointer",
|
|
462
466
|
userSelect: c ? void 0 : "none",
|
|
463
|
-
color:
|
|
467
|
+
color: P ? "transparent" : "var(--nc-text)"
|
|
464
468
|
}
|
|
465
469
|
}
|
|
466
470
|
),
|
|
467
|
-
|
|
471
|
+
P && /* @__PURE__ */ A(
|
|
468
472
|
"div",
|
|
469
473
|
{
|
|
470
474
|
"aria-hidden": !0,
|
|
471
|
-
className: `nc-combo-overlay ${
|
|
475
|
+
className: `nc-combo-overlay ${$}`,
|
|
472
476
|
style: {
|
|
473
477
|
position: "absolute",
|
|
474
|
-
left:
|
|
475
|
-
right:
|
|
478
|
+
left: C ? 8 : 12,
|
|
479
|
+
right: S || R ? C ? 12 : 24 : C ? 8 : 12,
|
|
476
480
|
top: "50%",
|
|
477
481
|
transform: "translateY(-50%)",
|
|
478
482
|
pointerEvents: "none"
|
|
479
483
|
},
|
|
480
484
|
children: [
|
|
481
|
-
/* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${
|
|
482
|
-
(
|
|
485
|
+
/* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${C ? "nc-small" : ""}`, children: x == null ? void 0 : x.label }),
|
|
486
|
+
(x == null ? void 0 : x.default) && /* @__PURE__ */ A("span", { className: `nc-combo-overlay-default ${C ? "nc-small" : ""}`, children: [
|
|
483
487
|
"(",
|
|
484
|
-
|
|
488
|
+
z("common.default"),
|
|
485
489
|
")"
|
|
486
490
|
] })
|
|
487
491
|
]
|
|
488
492
|
}
|
|
489
493
|
),
|
|
490
|
-
R && /* @__PURE__ */ s(kt, { onClick: Z, small:
|
|
491
|
-
|
|
494
|
+
R && /* @__PURE__ */ s(kt, { onClick: Z, small: C }),
|
|
495
|
+
S && /* @__PURE__ */ s(Nt, { open: y, onClick: () => g((M) => !M), small: C })
|
|
492
496
|
]
|
|
493
497
|
}
|
|
494
498
|
),
|
|
495
|
-
/* @__PURE__ */ s(xt, { isOpen:
|
|
499
|
+
/* @__PURE__ */ s(xt, { isOpen: y, options: T, onSelect: F, selectedValue: e, placement: l, anchorRef: N, small: C, highlightedIndex: b })
|
|
496
500
|
] });
|
|
497
501
|
}
|
|
498
502
|
function Dn({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default", title: o, "aria-label": i }) {
|
|
@@ -573,35 +577,35 @@ function Fn({
|
|
|
573
577
|
anchor: o,
|
|
574
578
|
preferredDirection: i = "down"
|
|
575
579
|
}) {
|
|
576
|
-
const a = W(null), [c, l] = E({ top: 0, left: 0 }),
|
|
580
|
+
const a = W(null), [c, l] = E({ top: 0, left: 0 }), u = o || (r == null ? void 0 : r.current);
|
|
577
581
|
if (B(() => {
|
|
578
|
-
if (!e || !
|
|
579
|
-
const d =
|
|
580
|
-
let
|
|
581
|
-
(!k && i === "down" || i === "up" && k) && (
|
|
582
|
-
let
|
|
583
|
-
|
|
584
|
-
let
|
|
585
|
-
|
|
586
|
-
top: Math.max(8,
|
|
582
|
+
if (!e || !u || !a.current) return;
|
|
583
|
+
const d = u.getBoundingClientRect(), m = a.current.getBoundingClientRect(), y = window.innerHeight, g = window.innerWidth, w = d.bottom + 8, k = w + m.height <= y - 8;
|
|
584
|
+
let b = i;
|
|
585
|
+
(!k && i === "down" || i === "up" && k) && (b = "up");
|
|
586
|
+
let p;
|
|
587
|
+
b === "down" ? p = w : p = d.top - m.height - 8;
|
|
588
|
+
let h = d.left;
|
|
589
|
+
h + m.width > g - 8 && (h = d.right - m.width), l({
|
|
590
|
+
top: Math.max(8, p),
|
|
587
591
|
// Ensure minimum 8px from top
|
|
588
|
-
left: Math.max(8,
|
|
592
|
+
left: Math.max(8, h)
|
|
589
593
|
// Ensure minimum 8px from left
|
|
590
594
|
});
|
|
591
|
-
}, [e,
|
|
595
|
+
}, [e, u, i]), B(() => {
|
|
592
596
|
if (!e) return;
|
|
593
|
-
const d = (
|
|
594
|
-
a.current && !a.current.contains(
|
|
595
|
-
},
|
|
596
|
-
|
|
597
|
+
const d = (y) => {
|
|
598
|
+
a.current && !a.current.contains(y.target) && u && !u.contains(y.target) && t();
|
|
599
|
+
}, m = (y) => {
|
|
600
|
+
y.key === "Escape" && t();
|
|
597
601
|
};
|
|
598
|
-
return document.addEventListener("mousedown", d), document.addEventListener("keydown",
|
|
599
|
-
document.removeEventListener("mousedown", d), document.removeEventListener("keydown",
|
|
602
|
+
return document.addEventListener("mousedown", d), document.addEventListener("keydown", m), () => {
|
|
603
|
+
document.removeEventListener("mousedown", d), document.removeEventListener("keydown", m);
|
|
600
604
|
};
|
|
601
|
-
}, [e, t,
|
|
605
|
+
}, [e, t, u]), !e) return null;
|
|
602
606
|
const f = (d) => {
|
|
603
607
|
d.type !== "separator" && !d.disabled && d.onClick && (d.onClick(), t());
|
|
604
|
-
},
|
|
608
|
+
}, v = n.some((d) => d.icon);
|
|
605
609
|
return ue(
|
|
606
610
|
/* @__PURE__ */ s(
|
|
607
611
|
"div",
|
|
@@ -625,16 +629,16 @@ function Fn({
|
|
|
625
629
|
},
|
|
626
630
|
d.id
|
|
627
631
|
);
|
|
628
|
-
const
|
|
632
|
+
const m = [
|
|
629
633
|
"nc-context-menu-item",
|
|
630
634
|
d.variant && d.variant !== "default" ? `nc-${d.variant}` : "",
|
|
631
635
|
d.disabled ? "nc-disabled" : "",
|
|
632
|
-
|
|
636
|
+
v && !d.icon ? "nc-indented" : ""
|
|
633
637
|
].filter(Boolean).join(" ");
|
|
634
|
-
return /* @__PURE__ */
|
|
638
|
+
return /* @__PURE__ */ A(
|
|
635
639
|
"button",
|
|
636
640
|
{
|
|
637
|
-
className:
|
|
641
|
+
className: m,
|
|
638
642
|
onClick: () => f(d),
|
|
639
643
|
disabled: d.disabled,
|
|
640
644
|
role: "menuitem",
|
|
@@ -653,13 +657,13 @@ function Fn({
|
|
|
653
657
|
}
|
|
654
658
|
const Oe = se(null);
|
|
655
659
|
function At() {
|
|
656
|
-
const e =
|
|
660
|
+
const e = Q(Oe);
|
|
657
661
|
if (!e)
|
|
658
662
|
throw new Error("useDialog must be used inside a Dialog component");
|
|
659
663
|
return e;
|
|
660
664
|
}
|
|
661
665
|
function ne({ children: e, onClick: t, ...n }) {
|
|
662
|
-
const { close: r } = At(), { t: o } =
|
|
666
|
+
const { close: r } = At(), { t: o } = U();
|
|
663
667
|
return /* @__PURE__ */ s(K, { onClick: (a) => {
|
|
664
668
|
t == null || t(a), r();
|
|
665
669
|
}, ...n, children: e ?? o("common.close") });
|
|
@@ -674,61 +678,61 @@ function Vn({
|
|
|
674
678
|
footer: a,
|
|
675
679
|
onOk: c,
|
|
676
680
|
onSave: l,
|
|
677
|
-
onDelete:
|
|
681
|
+
onDelete: u,
|
|
678
682
|
onCancel: f,
|
|
679
|
-
onConnect:
|
|
683
|
+
onConnect: v,
|
|
680
684
|
closeOnOverlay: d = !0,
|
|
681
|
-
primaryDisabled:
|
|
682
|
-
fullScreen:
|
|
683
|
-
hideTitleBar:
|
|
684
|
-
className:
|
|
685
|
+
primaryDisabled: m = !1,
|
|
686
|
+
fullScreen: y = !1,
|
|
687
|
+
hideTitleBar: g = !1,
|
|
688
|
+
className: w = "",
|
|
685
689
|
onContentHeightChange: k
|
|
686
690
|
}) {
|
|
687
|
-
const
|
|
688
|
-
d &&
|
|
691
|
+
const b = W(null), p = W(null), { t: h } = U(), N = { close: t }, C = (x) => {
|
|
692
|
+
d && x.target === x.currentTarget && t();
|
|
689
693
|
};
|
|
690
694
|
if (B(() => {
|
|
691
|
-
e &&
|
|
695
|
+
e && b.current && b.current.focus();
|
|
692
696
|
}, [e]), B(() => {
|
|
693
|
-
if (!k || !
|
|
694
|
-
const
|
|
695
|
-
for (const
|
|
696
|
-
const
|
|
697
|
-
k(
|
|
697
|
+
if (!k || !p.current) return;
|
|
698
|
+
const x = new ResizeObserver((R) => {
|
|
699
|
+
for (const S of R) {
|
|
700
|
+
const $ = S.contentRect.height;
|
|
701
|
+
k($);
|
|
698
702
|
}
|
|
699
703
|
});
|
|
700
|
-
return
|
|
701
|
-
|
|
704
|
+
return x.observe(p.current), () => {
|
|
705
|
+
x.disconnect();
|
|
702
706
|
};
|
|
703
707
|
}, [k]), !e) return null;
|
|
704
|
-
const
|
|
708
|
+
const z = () => {
|
|
705
709
|
switch (i) {
|
|
706
710
|
case "ok":
|
|
707
|
-
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(K, { variant: "primary", onClick: c ?? t, disabled:
|
|
711
|
+
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(K, { variant: "primary", onClick: c ?? t, disabled: m, children: h("common.ok") }) });
|
|
708
712
|
case "ok-cancel":
|
|
709
|
-
return /* @__PURE__ */
|
|
710
|
-
/* @__PURE__ */ s(
|
|
711
|
-
/* @__PURE__ */ s(
|
|
713
|
+
return /* @__PURE__ */ A("div", { className: "nc-dialog-footer", children: [
|
|
714
|
+
/* @__PURE__ */ s(ne, { onClick: f, children: h("common.cancel") }),
|
|
715
|
+
/* @__PURE__ */ s(K, { variant: "primary", onClick: c ?? t, disabled: m, children: h("common.ok") })
|
|
712
716
|
] });
|
|
713
717
|
case "save-cancel":
|
|
714
|
-
return /* @__PURE__ */
|
|
715
|
-
/* @__PURE__ */ s(
|
|
716
|
-
/* @__PURE__ */ s(
|
|
718
|
+
return /* @__PURE__ */ A("div", { className: "nc-dialog-footer", children: [
|
|
719
|
+
/* @__PURE__ */ s(ne, { onClick: f, children: h("common.cancel") }),
|
|
720
|
+
/* @__PURE__ */ s(K, { variant: "primary", onClick: l, disabled: m, children: h("common.save") })
|
|
717
721
|
] });
|
|
718
722
|
case "delete-cancel":
|
|
719
|
-
return /* @__PURE__ */
|
|
720
|
-
/* @__PURE__ */ s(
|
|
721
|
-
/* @__PURE__ */ s(
|
|
723
|
+
return /* @__PURE__ */ A("div", { className: "nc-dialog-footer", children: [
|
|
724
|
+
/* @__PURE__ */ s(ne, { onClick: f, children: h("common.cancel") }),
|
|
725
|
+
/* @__PURE__ */ s(K, { variant: "danger", onClick: u, disabled: m, children: h("common.delete") })
|
|
722
726
|
] });
|
|
723
727
|
case "connect":
|
|
724
|
-
return /* @__PURE__ */
|
|
725
|
-
/* @__PURE__ */ s(
|
|
726
|
-
/* @__PURE__ */ s(
|
|
728
|
+
return /* @__PURE__ */ A("div", { className: "nc-dialog-footer", children: [
|
|
729
|
+
/* @__PURE__ */ s(ne, { onClick: f, children: h("common.cancel") }),
|
|
730
|
+
/* @__PURE__ */ s(K, { variant: "primary", onClick: v, disabled: m, children: h("common.connect") })
|
|
727
731
|
] });
|
|
728
732
|
case "close":
|
|
729
733
|
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(ne, { variant: "primary" }) });
|
|
730
734
|
case "gotit":
|
|
731
|
-
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(ne, { variant: "primary", children:
|
|
735
|
+
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(ne, { variant: "primary", children: h("common.gotit") }) });
|
|
732
736
|
case "custom":
|
|
733
737
|
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: a });
|
|
734
738
|
case "none":
|
|
@@ -736,29 +740,29 @@ function Vn({
|
|
|
736
740
|
default:
|
|
737
741
|
return null;
|
|
738
742
|
}
|
|
739
|
-
}, T = /* @__PURE__ */ s(Oe.Provider, { value:
|
|
743
|
+
}, T = /* @__PURE__ */ s(Oe.Provider, { value: N, children: /* @__PURE__ */ s("div", { className: `nc-dialog-overlay${y ? " nc-fullscreen" : ""}`, onClick: C, children: /* @__PURE__ */ A(
|
|
740
744
|
"div",
|
|
741
745
|
{
|
|
742
|
-
ref:
|
|
743
|
-
className: `nc-dialog-container ${
|
|
746
|
+
ref: b,
|
|
747
|
+
className: `nc-dialog-container ${w}`,
|
|
744
748
|
style: o,
|
|
745
749
|
tabIndex: -1,
|
|
746
750
|
role: "dialog",
|
|
747
751
|
"aria-modal": "true",
|
|
748
|
-
"aria-labelledby":
|
|
752
|
+
"aria-labelledby": g ? void 0 : "nc-dialog-title",
|
|
749
753
|
children: [
|
|
750
|
-
!
|
|
754
|
+
!g && /* @__PURE__ */ A("div", { className: "nc-dialog-header", children: [
|
|
751
755
|
/* @__PURE__ */ s("h3", { id: "nc-dialog-title", className: "nc-dialog-title", children: n }),
|
|
752
756
|
/* @__PURE__ */ s(We, { onClick: t, "aria-label": "Close dialog" })
|
|
753
757
|
] }),
|
|
754
|
-
/* @__PURE__ */ s("div", { ref:
|
|
755
|
-
|
|
758
|
+
/* @__PURE__ */ s("div", { ref: p, className: "nc-dialog-content", children: r }),
|
|
759
|
+
z()
|
|
756
760
|
]
|
|
757
761
|
}
|
|
758
762
|
) }) });
|
|
759
|
-
return
|
|
763
|
+
return y ? ue(T, document.body) : T;
|
|
760
764
|
}
|
|
761
|
-
function
|
|
765
|
+
function St({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
|
|
762
766
|
const r = t === "small" ? 28 : 34;
|
|
763
767
|
return /* @__PURE__ */ s(
|
|
764
768
|
"button",
|
|
@@ -787,7 +791,7 @@ function Ct({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
|
|
|
787
791
|
}
|
|
788
792
|
);
|
|
789
793
|
}
|
|
790
|
-
function
|
|
794
|
+
function Ct({ visible: e, onClick: t, size: n = "default" }) {
|
|
791
795
|
const r = n === "small" ? 28 : 34, o = n === "small" ? 16 : 18;
|
|
792
796
|
return /* @__PURE__ */ s(
|
|
793
797
|
"button",
|
|
@@ -825,52 +829,52 @@ function Yn({
|
|
|
825
829
|
disabled: a,
|
|
826
830
|
label: c,
|
|
827
831
|
clearable: l = !0,
|
|
828
|
-
type:
|
|
832
|
+
type: u = "text",
|
|
829
833
|
className: f = "",
|
|
830
|
-
size:
|
|
834
|
+
size: v = "default",
|
|
831
835
|
style: d,
|
|
832
|
-
leadingIcon:
|
|
833
|
-
showPasswordToggle:
|
|
834
|
-
multiline:
|
|
835
|
-
rows:
|
|
836
|
+
leadingIcon: m,
|
|
837
|
+
showPasswordToggle: y = !1,
|
|
838
|
+
multiline: g = !1,
|
|
839
|
+
rows: w = 3,
|
|
836
840
|
validator: k,
|
|
837
|
-
showErrorMessage:
|
|
841
|
+
showErrorMessage: b = !0
|
|
838
842
|
}) {
|
|
839
|
-
const
|
|
843
|
+
const p = W(null), h = W(null), [N, C] = E(!1), [z, T] = E(!1), x = e !== void 0, [R, S] = E(t), $ = x ? e : R, P = k ? k($) : null, F = !!P, Z = u === "password", Y = Z && y && !a && !g, M = l && $ && !a && z, L = v === "small" ? 32 : 44;
|
|
840
844
|
let D = 12;
|
|
841
|
-
M && Y ? D =
|
|
842
|
-
const V =
|
|
845
|
+
M && Y ? D = L * 2 : (M || Y) && (D = L);
|
|
846
|
+
const V = m ? v === "small" ? 28 : 34 : void 0, Ze = () => {
|
|
843
847
|
var te, ce;
|
|
844
|
-
|
|
845
|
-
},
|
|
846
|
-
te.key === "Enter" && !
|
|
848
|
+
x || S(""), n == null || n(""), o == null || o(), g ? (te = h.current) == null || te.focus() : (ce = p.current) == null || ce.focus();
|
|
849
|
+
}, Ce = (te) => {
|
|
850
|
+
te.key === "Enter" && !g && (r == null || r());
|
|
847
851
|
}, $e = (te) => {
|
|
848
852
|
const ce = te.target.value;
|
|
849
|
-
|
|
853
|
+
x || S(ce), n == null || n(ce);
|
|
850
854
|
}, Ie = () => {
|
|
851
855
|
T(!0);
|
|
852
856
|
}, Me = () => {
|
|
853
857
|
T(!1);
|
|
854
|
-
}, Re = `nc-input ${
|
|
855
|
-
return /* @__PURE__ */
|
|
858
|
+
}, Re = `nc-input ${v === "small" ? "nc-small " : ""} ${F ? "nc-error " : ""}${f}`;
|
|
859
|
+
return /* @__PURE__ */ A("div", { className: "nc-col", style: { position: "relative", flex: 1, ...d }, children: [
|
|
856
860
|
c && /* @__PURE__ */ s("span", { className: "nc-label", children: c }),
|
|
857
|
-
/* @__PURE__ */
|
|
858
|
-
|
|
859
|
-
|
|
861
|
+
/* @__PURE__ */ A("div", { style: { position: "relative", display: "flex", alignItems: g ? "flex-start" : "center" }, children: [
|
|
862
|
+
m && /* @__PURE__ */ s("span", { className: "nc-input-leading-icon", style: { height: g ? void 0 : "100%", top: g ? 10 : void 0 }, children: m }),
|
|
863
|
+
g ? /* @__PURE__ */ s(
|
|
860
864
|
"textarea",
|
|
861
865
|
{
|
|
862
|
-
ref:
|
|
866
|
+
ref: h,
|
|
863
867
|
className: Re,
|
|
864
868
|
placeholder: i,
|
|
865
|
-
value:
|
|
869
|
+
value: $,
|
|
866
870
|
onChange: $e,
|
|
867
|
-
onKeyDown:
|
|
871
|
+
onKeyDown: Ce,
|
|
868
872
|
onFocus: Ie,
|
|
869
873
|
onBlur: Me,
|
|
870
874
|
readOnly: a,
|
|
871
875
|
"aria-disabled": a,
|
|
872
876
|
tabIndex: a ? -1 : void 0,
|
|
873
|
-
rows:
|
|
877
|
+
rows: w,
|
|
874
878
|
style: {
|
|
875
879
|
width: "100%",
|
|
876
880
|
paddingRight: D,
|
|
@@ -880,13 +884,13 @@ function Yn({
|
|
|
880
884
|
) : /* @__PURE__ */ s(
|
|
881
885
|
"input",
|
|
882
886
|
{
|
|
883
|
-
ref:
|
|
884
|
-
type: Z &&
|
|
887
|
+
ref: p,
|
|
888
|
+
type: Z && N ? "text" : u,
|
|
885
889
|
className: Re,
|
|
886
890
|
placeholder: i,
|
|
887
|
-
value:
|
|
891
|
+
value: $,
|
|
888
892
|
onChange: $e,
|
|
889
|
-
onKeyDown:
|
|
893
|
+
onKeyDown: Ce,
|
|
890
894
|
onFocus: Ie,
|
|
891
895
|
onBlur: Me,
|
|
892
896
|
readOnly: a,
|
|
@@ -899,10 +903,10 @@ function Yn({
|
|
|
899
903
|
}
|
|
900
904
|
}
|
|
901
905
|
),
|
|
902
|
-
M && /* @__PURE__ */ s(
|
|
903
|
-
Y && /* @__PURE__ */ s(
|
|
906
|
+
M && /* @__PURE__ */ s(St, { onClick: Ze, size: v, rightOffset: Y ? L + 4 : 4 }),
|
|
907
|
+
Y && /* @__PURE__ */ s(Ct, { visible: N, onClick: () => C(!N), size: v })
|
|
904
908
|
] }),
|
|
905
|
-
F &&
|
|
909
|
+
F && b && /* @__PURE__ */ s("span", { className: "nc-error-message", children: P })
|
|
906
910
|
] });
|
|
907
911
|
}
|
|
908
912
|
function Gn({
|
|
@@ -919,8 +923,8 @@ function Gn({
|
|
|
919
923
|
onClick: (l) => {
|
|
920
924
|
if (t) {
|
|
921
925
|
if (r) {
|
|
922
|
-
const
|
|
923
|
-
if (
|
|
926
|
+
const u = window.getSelection();
|
|
927
|
+
if (u && u.toString().length > 0)
|
|
924
928
|
return;
|
|
925
929
|
}
|
|
926
930
|
t(l);
|
|
@@ -941,8 +945,8 @@ function Gn({
|
|
|
941
945
|
);
|
|
942
946
|
}
|
|
943
947
|
function jn({ title: e, titleTools: t, children: n, style: r }) {
|
|
944
|
-
return /* @__PURE__ */
|
|
945
|
-
(e || t) && /* @__PURE__ */
|
|
948
|
+
return /* @__PURE__ */ A("div", { className: "nc-list-group", style: r, children: [
|
|
949
|
+
(e || t) && /* @__PURE__ */ A("div", { className: "nc-list-group-title", children: [
|
|
946
950
|
/* @__PURE__ */ s("div", { children: e }),
|
|
947
951
|
t && /* @__PURE__ */ s("div", { className: "nc-list-group-title-tools", children: t })
|
|
948
952
|
] }),
|
|
@@ -956,31 +960,31 @@ function jn({ title: e, titleTools: t, children: n, style: r }) {
|
|
|
956
960
|
] });
|
|
957
961
|
}
|
|
958
962
|
function Kn({ values: e, onChange: t, options: n, placeholder: r = "Select…", label: o }) {
|
|
959
|
-
const [i, a] = E(!1), [c, l] = E(""),
|
|
963
|
+
const [i, a] = E(!1), [c, l] = E(""), u = W(null), f = me(() => n.filter((d) => d.label.toLowerCase().includes(c.toLowerCase())), [n, c]);
|
|
960
964
|
B(() => {
|
|
961
|
-
function d(
|
|
962
|
-
!(
|
|
965
|
+
function d(m) {
|
|
966
|
+
!(m.target instanceof Node) || !u.current || u.current.contains(m.target) || a(!1);
|
|
963
967
|
}
|
|
964
968
|
return document.addEventListener("mousedown", d), () => document.removeEventListener("mousedown", d);
|
|
965
969
|
}, []);
|
|
966
|
-
const
|
|
967
|
-
e.includes(d) ? t(e.filter((
|
|
970
|
+
const v = (d) => {
|
|
971
|
+
e.includes(d) ? t(e.filter((m) => m !== d)) : t([...e, d]);
|
|
968
972
|
};
|
|
969
|
-
return /* @__PURE__ */
|
|
973
|
+
return /* @__PURE__ */ A("div", { ref: u, className: "nc-col", style: { position: "relative" }, children: [
|
|
970
974
|
o && /* @__PURE__ */ s("span", { className: "nc-label", children: o }),
|
|
971
|
-
/* @__PURE__ */
|
|
975
|
+
/* @__PURE__ */ A("div", { className: "nc-row", style: { flexWrap: "wrap", gap: 6, minHeight: 42, alignItems: "center", border: "1px solid var(--nc-button-border)", borderRadius: 8, background: "var(--nc-button-bg)", padding: "4px 8px" }, children: [
|
|
972
976
|
e.length === 0 && /* @__PURE__ */ s("span", { className: "nc-label", children: r }),
|
|
973
977
|
e.map((d) => {
|
|
974
|
-
const
|
|
975
|
-
return
|
|
976
|
-
|
|
978
|
+
const m = n.find((y) => y.value === d);
|
|
979
|
+
return m ? /* @__PURE__ */ A("span", { style: { padding: "4px 8px", borderRadius: 6, display: "inline-flex", alignItems: "center", gap: 4, background: "var(--nc-button-bg)", border: "1px solid var(--nc-button-border)" }, children: [
|
|
980
|
+
m.label,
|
|
977
981
|
/* @__PURE__ */ s(
|
|
978
982
|
"button",
|
|
979
983
|
{
|
|
980
984
|
className: "nc-button nc-ghost",
|
|
981
985
|
style: { padding: 0, minHeight: 0, height: 20, width: 20, display: "inline-flex", alignItems: "center", justifyContent: "center", border: "none" },
|
|
982
|
-
onClick: () =>
|
|
983
|
-
"aria-label": `Remove ${
|
|
986
|
+
onClick: () => v(d),
|
|
987
|
+
"aria-label": `Remove ${m.label}`,
|
|
984
988
|
children: "✕"
|
|
985
989
|
}
|
|
986
990
|
)
|
|
@@ -997,12 +1001,12 @@ function Kn({ values: e, onChange: t, options: n, placeholder: r = "Select…",
|
|
|
997
1001
|
}
|
|
998
1002
|
)
|
|
999
1003
|
] }),
|
|
1000
|
-
i && /* @__PURE__ */
|
|
1004
|
+
i && /* @__PURE__ */ A("div", { className: "nc-combo-dropdown", style: { position: "absolute", top: "100%", left: 0, right: 0, zIndex: 10, marginTop: 4, boxShadow: "0 4px 12px var(--nc-shadow)" }, children: [
|
|
1001
1005
|
f.map((d) => {
|
|
1002
|
-
const
|
|
1003
|
-
return /* @__PURE__ */
|
|
1006
|
+
const m = e.includes(d.value);
|
|
1007
|
+
return /* @__PURE__ */ A("div", { className: "nc-section nc-row", style: { justifyContent: "space-between", cursor: "pointer", padding: 12 }, onMouseDown: () => v(d.value), children: [
|
|
1004
1008
|
/* @__PURE__ */ s("span", { children: d.label }),
|
|
1005
|
-
/* @__PURE__ */ s("span", { children:
|
|
1009
|
+
/* @__PURE__ */ s("span", { children: m ? "✔️" : "" })
|
|
1006
1010
|
] }, d.value);
|
|
1007
1011
|
}),
|
|
1008
1012
|
f.length === 0 && /* @__PURE__ */ s("div", { className: "nc-section nc-label", children: "No results" })
|
|
@@ -1049,128 +1053,128 @@ function _n({
|
|
|
1049
1053
|
disabled: i = !1,
|
|
1050
1054
|
size: a = "default"
|
|
1051
1055
|
}) {
|
|
1052
|
-
const [c, l] = E(!1), [
|
|
1056
|
+
const [c, l] = E(!1), [u, f] = E(""), [v, d] = E(""), [m, y] = E({ top: 0, left: 0, width: 0, right: void 0 }), g = W(null), w = W(null);
|
|
1053
1057
|
B(() => {
|
|
1054
|
-
if (c &&
|
|
1055
|
-
const
|
|
1056
|
-
window.innerWidth -
|
|
1057
|
-
top:
|
|
1058
|
+
if (c && g.current) {
|
|
1059
|
+
const S = g.current.getBoundingClientRect(), P = Math.max(S.width, 400);
|
|
1060
|
+
window.innerWidth - S.left < P && S.right >= P ? y({
|
|
1061
|
+
top: S.bottom + 4,
|
|
1058
1062
|
left: 0,
|
|
1059
1063
|
// Not used but type needs it, let's just use 0
|
|
1060
|
-
right: window.innerWidth -
|
|
1061
|
-
width:
|
|
1062
|
-
}) :
|
|
1063
|
-
top:
|
|
1064
|
-
left:
|
|
1064
|
+
right: window.innerWidth - S.right,
|
|
1065
|
+
width: P
|
|
1066
|
+
}) : y({
|
|
1067
|
+
top: S.bottom + 4,
|
|
1068
|
+
left: S.left,
|
|
1065
1069
|
right: void 0,
|
|
1066
|
-
width:
|
|
1070
|
+
width: P
|
|
1067
1071
|
});
|
|
1068
1072
|
}
|
|
1069
1073
|
}, [c]), B(() => {
|
|
1070
1074
|
if (!c) return;
|
|
1071
|
-
const
|
|
1072
|
-
|
|
1075
|
+
const S = ($) => {
|
|
1076
|
+
g.current && !g.current.contains($.target) && w.current && !w.current.contains($.target) && l(!1);
|
|
1073
1077
|
};
|
|
1074
|
-
return document.addEventListener("mousedown",
|
|
1078
|
+
return document.addEventListener("mousedown", S), () => document.removeEventListener("mousedown", S);
|
|
1075
1079
|
}, [c]);
|
|
1076
1080
|
const k = () => {
|
|
1077
1081
|
f(e || Te()), d(t || Te()), l(!0);
|
|
1078
|
-
},
|
|
1082
|
+
}, b = () => {
|
|
1079
1083
|
l(!1);
|
|
1080
|
-
},
|
|
1081
|
-
const
|
|
1082
|
-
if (
|
|
1084
|
+
}, p = () => {
|
|
1085
|
+
const S = pe(u), $ = pe(v);
|
|
1086
|
+
if (S || $)
|
|
1083
1087
|
return;
|
|
1084
|
-
const
|
|
1085
|
-
|
|
1086
|
-
},
|
|
1088
|
+
const P = de(u), F = de(v);
|
|
1089
|
+
P && F && (n == null || n(P, F)), l(!1);
|
|
1090
|
+
}, h = e && t ? `${Ee(e)} - ${Ee(t)}` : "Select month range", N = pe(u), C = pe(v), z = de(u), T = de(v), x = z && T && z > T, R = c ? ue(
|
|
1087
1091
|
/* @__PURE__ */ s(
|
|
1088
1092
|
"div",
|
|
1089
1093
|
{
|
|
1090
|
-
ref:
|
|
1094
|
+
ref: w,
|
|
1091
1095
|
className: "nc-month-range-picker-popup",
|
|
1092
1096
|
style: {
|
|
1093
1097
|
position: "fixed",
|
|
1094
|
-
top:
|
|
1095
|
-
...
|
|
1096
|
-
width:
|
|
1098
|
+
top: m.top,
|
|
1099
|
+
...m.right !== void 0 ? { right: m.right } : { left: m.left },
|
|
1100
|
+
width: m.width,
|
|
1097
1101
|
zIndex: 1e3
|
|
1098
1102
|
},
|
|
1099
|
-
children: /* @__PURE__ */
|
|
1100
|
-
/* @__PURE__ */
|
|
1101
|
-
/* @__PURE__ */
|
|
1103
|
+
children: /* @__PURE__ */ A("div", { className: "nc-month-range-picker-content", children: [
|
|
1104
|
+
/* @__PURE__ */ A("div", { className: "nc-month-range-picker-row", children: [
|
|
1105
|
+
/* @__PURE__ */ A("div", { className: "nc-month-range-picker-column", children: [
|
|
1102
1106
|
/* @__PURE__ */ s("label", { className: "nc-label", children: "Start Month" }),
|
|
1103
1107
|
/* @__PURE__ */ s(
|
|
1104
1108
|
"input",
|
|
1105
1109
|
{
|
|
1106
1110
|
type: "text",
|
|
1107
|
-
className: `nc-month-input ${
|
|
1108
|
-
value:
|
|
1109
|
-
onChange: (
|
|
1111
|
+
className: `nc-month-input ${N ? "nc-error" : ""}`,
|
|
1112
|
+
value: u,
|
|
1113
|
+
onChange: (S) => f(S.target.value),
|
|
1110
1114
|
placeholder: "YY-M(M) or YYYY-M(M)"
|
|
1111
1115
|
}
|
|
1112
1116
|
),
|
|
1113
|
-
|
|
1117
|
+
N && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: N })
|
|
1114
1118
|
] }),
|
|
1115
|
-
/* @__PURE__ */
|
|
1119
|
+
/* @__PURE__ */ A("div", { className: "nc-month-range-picker-column", children: [
|
|
1116
1120
|
/* @__PURE__ */ s("label", { className: "nc-label", children: "End Month" }),
|
|
1117
1121
|
/* @__PURE__ */ s(
|
|
1118
1122
|
"input",
|
|
1119
1123
|
{
|
|
1120
1124
|
type: "text",
|
|
1121
|
-
className: `nc-month-input ${
|
|
1122
|
-
value:
|
|
1123
|
-
onChange: (
|
|
1125
|
+
className: `nc-month-input ${C ? "nc-error" : ""}`,
|
|
1126
|
+
value: v,
|
|
1127
|
+
onChange: (S) => d(S.target.value),
|
|
1124
1128
|
placeholder: "YY-M(M) or YYYY-M(M)"
|
|
1125
1129
|
}
|
|
1126
1130
|
),
|
|
1127
|
-
|
|
1131
|
+
C && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: C })
|
|
1128
1132
|
] })
|
|
1129
1133
|
] }),
|
|
1130
|
-
|
|
1131
|
-
/* @__PURE__ */
|
|
1134
|
+
x && !N && !C && /* @__PURE__ */ s("div", { className: "nc-month-range-error", children: "End month must be after or equal to start month" }),
|
|
1135
|
+
/* @__PURE__ */ A("div", { className: "nc-month-range-picker-footer", children: [
|
|
1132
1136
|
/* @__PURE__ */ s(
|
|
1133
1137
|
K,
|
|
1134
1138
|
{
|
|
1135
1139
|
variant: "primary",
|
|
1136
|
-
onClick:
|
|
1137
|
-
disabled: !
|
|
1140
|
+
onClick: p,
|
|
1141
|
+
disabled: !u || !v || !!N || !!C || !!x,
|
|
1138
1142
|
children: "Apply"
|
|
1139
1143
|
}
|
|
1140
1144
|
),
|
|
1141
|
-
/* @__PURE__ */ s(K, { variant: "ghost", onClick:
|
|
1145
|
+
/* @__PURE__ */ s(K, { variant: "ghost", onClick: b, children: "Cancel" })
|
|
1142
1146
|
] })
|
|
1143
1147
|
] })
|
|
1144
1148
|
}
|
|
1145
1149
|
),
|
|
1146
1150
|
document.body
|
|
1147
1151
|
) : null;
|
|
1148
|
-
return /* @__PURE__ */
|
|
1152
|
+
return /* @__PURE__ */ A("div", { className: `nc-month-range-picker ${a === "small" ? "nc-small " : ""}${o}`, children: [
|
|
1149
1153
|
r && /* @__PURE__ */ s("label", { className: `nc-label${a === "small" ? " nc-small" : ""}`, children: r }),
|
|
1150
1154
|
/* @__PURE__ */ s(
|
|
1151
1155
|
"button",
|
|
1152
1156
|
{
|
|
1153
|
-
ref:
|
|
1157
|
+
ref: g,
|
|
1154
1158
|
className: `nc-month-range-picker-input${a === "small" ? " nc-small" : ""}`,
|
|
1155
1159
|
onClick: k,
|
|
1156
1160
|
disabled: i,
|
|
1157
|
-
children:
|
|
1161
|
+
children: h
|
|
1158
1162
|
}
|
|
1159
1163
|
),
|
|
1160
1164
|
R
|
|
1161
1165
|
] });
|
|
1162
1166
|
}
|
|
1163
1167
|
function Un({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disabled: a, size: c = "default" }) {
|
|
1164
|
-
const l = c === "small",
|
|
1168
|
+
const l = c === "small", u = () => {
|
|
1165
1169
|
const d = e - o;
|
|
1166
1170
|
n !== void 0 && d < n || t(parseFloat(d.toFixed(10)));
|
|
1167
1171
|
}, f = () => {
|
|
1168
1172
|
const d = e + o;
|
|
1169
1173
|
r !== void 0 && d > r || t(parseFloat(d.toFixed(10)));
|
|
1170
1174
|
};
|
|
1171
|
-
return /* @__PURE__ */
|
|
1175
|
+
return /* @__PURE__ */ A("div", { className: `nc-col nc-number-input-col ${l ? "nc-small" : ""}`, children: [
|
|
1172
1176
|
i && /* @__PURE__ */ s("span", { className: `nc-label ${l ? "nc-small" : ""}`, children: i }),
|
|
1173
|
-
/* @__PURE__ */
|
|
1177
|
+
/* @__PURE__ */ A("div", { className: `nc-number-input-container ${l ? "nc-small" : ""}`, children: [
|
|
1174
1178
|
/* @__PURE__ */ s(
|
|
1175
1179
|
"input",
|
|
1176
1180
|
{
|
|
@@ -1178,8 +1182,8 @@ function Un({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
|
|
|
1178
1182
|
type: "number",
|
|
1179
1183
|
value: e,
|
|
1180
1184
|
onChange: (d) => {
|
|
1181
|
-
const
|
|
1182
|
-
isNaN(
|
|
1185
|
+
const m = parseFloat(d.target.value);
|
|
1186
|
+
isNaN(m) || n !== void 0 && m < n || r !== void 0 && m > r || t(m);
|
|
1183
1187
|
},
|
|
1184
1188
|
min: n,
|
|
1185
1189
|
max: r,
|
|
@@ -1191,7 +1195,7 @@ function Un({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
|
|
|
1191
1195
|
"button",
|
|
1192
1196
|
{
|
|
1193
1197
|
className: `nc-button nc-ghost nc-number-input-button ${l ? "nc-small" : ""}`,
|
|
1194
|
-
onClick:
|
|
1198
|
+
onClick: u,
|
|
1195
1199
|
disabled: a || n !== void 0 && e <= n,
|
|
1196
1200
|
children: "−"
|
|
1197
1201
|
}
|
|
@@ -1218,15 +1222,15 @@ function qn({
|
|
|
1218
1222
|
disabled: a,
|
|
1219
1223
|
showValue: c = !0,
|
|
1220
1224
|
formatValue: l = (f) => f.toString(),
|
|
1221
|
-
width:
|
|
1225
|
+
width: u = 200
|
|
1222
1226
|
}) {
|
|
1223
1227
|
const f = (d) => {
|
|
1224
|
-
const
|
|
1225
|
-
t(
|
|
1226
|
-
},
|
|
1227
|
-
return /* @__PURE__ */
|
|
1228
|
+
const m = parseFloat(d.target.value);
|
|
1229
|
+
t(m);
|
|
1230
|
+
}, v = (e - n) / (r - n) * 100;
|
|
1231
|
+
return /* @__PURE__ */ A("div", { className: "nc-col", style: { gap: 6 }, children: [
|
|
1228
1232
|
i && /* @__PURE__ */ s("span", { className: "nc-label", children: i }),
|
|
1229
|
-
/* @__PURE__ */
|
|
1233
|
+
/* @__PURE__ */ A("div", { style: { display: "flex", gap: 12, alignItems: "center" }, children: [
|
|
1230
1234
|
/* @__PURE__ */ s(
|
|
1231
1235
|
"input",
|
|
1232
1236
|
{
|
|
@@ -1239,8 +1243,8 @@ function qn({
|
|
|
1239
1243
|
step: o,
|
|
1240
1244
|
disabled: a,
|
|
1241
1245
|
style: {
|
|
1242
|
-
width:
|
|
1243
|
-
"--nc-slider-percentage": `${
|
|
1246
|
+
width: u,
|
|
1247
|
+
"--nc-slider-percentage": `${v}%`
|
|
1244
1248
|
}
|
|
1245
1249
|
}
|
|
1246
1250
|
),
|
|
@@ -1285,89 +1289,89 @@ function Xn({ active: e, children: t, keepMounted: n = !1, className: r = "", st
|
|
|
1285
1289
|
const a = i.find((c) => c.props.tab === e);
|
|
1286
1290
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: a });
|
|
1287
1291
|
}
|
|
1288
|
-
function Jn({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, className: i, toolbar: a, multiline: c, orientation: l = "horizontal", style:
|
|
1289
|
-
const f = W(null), [
|
|
1292
|
+
function Jn({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, className: i, toolbar: a, multiline: c, orientation: l = "horizontal", style: u }) {
|
|
1293
|
+
const f = W(null), [v, d] = E(!1), [m, y] = E(!1), g = l === "verticalLeft" || l === "verticalRight", w = W(!1), k = W(0), b = W(0), p = W(!1);
|
|
1290
1294
|
B(() => {
|
|
1291
|
-
const
|
|
1295
|
+
const x = () => {
|
|
1292
1296
|
if (f.current)
|
|
1293
|
-
if (
|
|
1294
|
-
const { scrollTop:
|
|
1295
|
-
d(
|
|
1297
|
+
if (g) {
|
|
1298
|
+
const { scrollTop: S, scrollHeight: $, clientHeight: P } = f.current;
|
|
1299
|
+
d(S > 1), y(S < $ - P - 1);
|
|
1296
1300
|
} else {
|
|
1297
|
-
const { scrollLeft:
|
|
1298
|
-
d(
|
|
1301
|
+
const { scrollLeft: S, scrollWidth: $, clientWidth: P } = f.current;
|
|
1302
|
+
d(S > 1), y(S < $ - P - 1);
|
|
1299
1303
|
}
|
|
1300
1304
|
}, R = f.current;
|
|
1301
1305
|
if (R)
|
|
1302
|
-
return
|
|
1303
|
-
R.removeEventListener("scroll",
|
|
1306
|
+
return x(), R.addEventListener("scroll", x), window.addEventListener("resize", x), () => {
|
|
1307
|
+
R.removeEventListener("scroll", x), window.removeEventListener("resize", x);
|
|
1304
1308
|
};
|
|
1305
|
-
}, [e,
|
|
1306
|
-
const
|
|
1307
|
-
f.current && (
|
|
1308
|
-
},
|
|
1309
|
-
if (!
|
|
1310
|
-
const R =
|
|
1311
|
-
Math.abs(
|
|
1312
|
-
},
|
|
1313
|
-
f.current && (
|
|
1314
|
-
},
|
|
1315
|
-
|
|
1309
|
+
}, [e, g]);
|
|
1310
|
+
const h = (x) => {
|
|
1311
|
+
f.current && (w.current = !0, p.current = !1, k.current = g ? x.clientY : x.clientX, b.current = g ? f.current.scrollTop : f.current.scrollLeft, f.current.style.cursor = "grabbing", f.current.style.userSelect = "none");
|
|
1312
|
+
}, N = (x) => {
|
|
1313
|
+
if (!w.current || !f.current) return;
|
|
1314
|
+
const R = g ? x.clientY : x.clientX, S = k.current - R;
|
|
1315
|
+
Math.abs(S) > 3 && (p.current = !0), g ? f.current.scrollTop = b.current + S : f.current.scrollLeft = b.current + S;
|
|
1316
|
+
}, C = () => {
|
|
1317
|
+
f.current && (w.current = !1, f.current.style.cursor = "", f.current.style.userSelect = "");
|
|
1318
|
+
}, z = () => {
|
|
1319
|
+
C();
|
|
1316
1320
|
};
|
|
1317
1321
|
B(() => {
|
|
1318
|
-
const
|
|
1319
|
-
if (!
|
|
1320
|
-
const R = (
|
|
1321
|
-
|
|
1322
|
+
const x = f.current;
|
|
1323
|
+
if (!x || g) return;
|
|
1324
|
+
const R = (S) => {
|
|
1325
|
+
S.deltaY !== 0 && (S.preventDefault(), x.scrollLeft += S.deltaY * 0.3);
|
|
1322
1326
|
};
|
|
1323
|
-
return
|
|
1324
|
-
|
|
1327
|
+
return x.addEventListener("wheel", R, { passive: !1 }), () => {
|
|
1328
|
+
x.removeEventListener("wheel", R);
|
|
1325
1329
|
};
|
|
1326
|
-
}, [
|
|
1327
|
-
const T = (
|
|
1328
|
-
|
|
1330
|
+
}, [g]);
|
|
1331
|
+
const T = (x) => {
|
|
1332
|
+
p.current || n(x);
|
|
1329
1333
|
};
|
|
1330
|
-
return /* @__PURE__ */
|
|
1331
|
-
/* @__PURE__ */
|
|
1332
|
-
|
|
1334
|
+
return /* @__PURE__ */ A("div", { className: `nc-tab-container ${g ? `nc-vertical nc-${l}` : ""} ${i || ""}`, style: u, children: [
|
|
1335
|
+
/* @__PURE__ */ A("div", { className: "nc-tab-scroll-wrapper", children: [
|
|
1336
|
+
v && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${g ? "nc-top" : "nc-left"}`, children: g ? /* @__PURE__ */ s($t, { size: 16 }) : /* @__PURE__ */ s(at, { size: 16 }) }),
|
|
1333
1337
|
/* @__PURE__ */ s(
|
|
1334
1338
|
"div",
|
|
1335
1339
|
{
|
|
1336
1340
|
ref: f,
|
|
1337
1341
|
className: `nc-tab-scroll ${c ? "nc-multiline" : ""}`,
|
|
1338
|
-
onMouseDown:
|
|
1339
|
-
onMouseMove:
|
|
1340
|
-
onMouseUp:
|
|
1341
|
-
onMouseLeave:
|
|
1342
|
+
onMouseDown: h,
|
|
1343
|
+
onMouseMove: N,
|
|
1344
|
+
onMouseUp: C,
|
|
1345
|
+
onMouseLeave: z,
|
|
1342
1346
|
style: { cursor: "grab" },
|
|
1343
|
-
children: e.map((
|
|
1344
|
-
const R = typeof
|
|
1345
|
-
return /* @__PURE__ */
|
|
1347
|
+
children: e.map((x) => {
|
|
1348
|
+
const R = typeof x == "string" ? x : x.id, S = typeof x == "string" ? x : x.label, $ = r && !(o != null && o.includes(R));
|
|
1349
|
+
return /* @__PURE__ */ A(
|
|
1346
1350
|
"div",
|
|
1347
1351
|
{
|
|
1348
|
-
className: `nc-tab-item ${t === R ? "nc-active" : ""} ${
|
|
1352
|
+
className: `nc-tab-item ${t === R ? "nc-active" : ""} ${$ ? "nc-closable" : ""}`,
|
|
1349
1353
|
onClick: () => T(R),
|
|
1350
1354
|
role: "button",
|
|
1351
1355
|
tabIndex: 0,
|
|
1352
|
-
onKeyDown: (
|
|
1353
|
-
(
|
|
1356
|
+
onKeyDown: (P) => {
|
|
1357
|
+
(P.key === "Enter" || P.key === " ") && n(R);
|
|
1354
1358
|
},
|
|
1355
1359
|
children: [
|
|
1356
|
-
/* @__PURE__ */ s("span", { className: "nc-tab-label", children:
|
|
1357
|
-
|
|
1360
|
+
/* @__PURE__ */ s("span", { className: "nc-tab-label", children: g ? S : typeof S == "string" ? S.toUpperCase() : S }),
|
|
1361
|
+
$ && /* @__PURE__ */ s(
|
|
1358
1362
|
"span",
|
|
1359
1363
|
{
|
|
1360
1364
|
className: "nc-tab-close",
|
|
1361
1365
|
role: "button",
|
|
1362
1366
|
tabIndex: 0,
|
|
1363
|
-
"aria-label": `Close ${typeof
|
|
1364
|
-
onClick: (
|
|
1365
|
-
|
|
1367
|
+
"aria-label": `Close ${typeof S == "string" ? S : R}`,
|
|
1368
|
+
onClick: (P) => {
|
|
1369
|
+
P.stopPropagation(), r(R);
|
|
1366
1370
|
},
|
|
1367
|
-
onKeyDown: (
|
|
1368
|
-
(
|
|
1371
|
+
onKeyDown: (P) => {
|
|
1372
|
+
(P.key === "Enter" || P.key === " ") && (P.stopPropagation(), r(R));
|
|
1369
1373
|
},
|
|
1370
|
-
children: /* @__PURE__ */
|
|
1374
|
+
children: /* @__PURE__ */ A("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1371
1375
|
/* @__PURE__ */ s("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1372
1376
|
/* @__PURE__ */ s("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
1373
1377
|
] })
|
|
@@ -1380,13 +1384,13 @@ function Jn({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, cla
|
|
|
1380
1384
|
})
|
|
1381
1385
|
}
|
|
1382
1386
|
),
|
|
1383
|
-
|
|
1387
|
+
m && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${g ? "nc-bottom" : "nc-right"}`, children: g ? /* @__PURE__ */ s(lt, { size: 16 }) : /* @__PURE__ */ s(dt, { size: 16 }) })
|
|
1384
1388
|
] }),
|
|
1385
1389
|
a && /* @__PURE__ */ s("div", { className: "nc-tab-toolbar", children: a })
|
|
1386
1390
|
] });
|
|
1387
1391
|
}
|
|
1388
1392
|
function Qn({ checked: e, onChange: t, disabled: n, label: r }) {
|
|
1389
|
-
return /* @__PURE__ */
|
|
1393
|
+
return /* @__PURE__ */ A(
|
|
1390
1394
|
"label",
|
|
1391
1395
|
{
|
|
1392
1396
|
className: "nc-row",
|
|
@@ -1458,12 +1462,12 @@ function Rt(e, t, n, r) {
|
|
|
1458
1462
|
const o = e.split(`
|
|
1459
1463
|
`), i = Math.max(1, Math.min(t, o.length));
|
|
1460
1464
|
let a = 0;
|
|
1461
|
-
for (let
|
|
1462
|
-
a += o[
|
|
1463
|
-
const l = o[i - 1].split(" "),
|
|
1464
|
-
for (let
|
|
1465
|
-
a += l[
|
|
1466
|
-
const f = Math.max(1, Math.min(r, l[
|
|
1465
|
+
for (let v = 0; v < i - 1; v++)
|
|
1466
|
+
a += o[v].length + 1;
|
|
1467
|
+
const l = o[i - 1].split(" "), u = Math.max(1, Math.min(n, l.length));
|
|
1468
|
+
for (let v = 0; v < u - 1; v++)
|
|
1469
|
+
a += l[v].length + 1;
|
|
1470
|
+
const f = Math.max(1, Math.min(r, l[u - 1].length + 1));
|
|
1467
1471
|
return a += f - 1, a;
|
|
1468
1472
|
}
|
|
1469
1473
|
function Et(e, t) {
|
|
@@ -1475,78 +1479,78 @@ function Et(e, t) {
|
|
|
1475
1479
|
return o;
|
|
1476
1480
|
}
|
|
1477
1481
|
const Zn = ft(
|
|
1478
|
-
function({ value: t, onChange: n, placeholder: r, className: o, style: i, showLineNumbers: a = !1, onCursorChange: c, highlightLine: l },
|
|
1479
|
-
const f = W(null),
|
|
1480
|
-
ht(
|
|
1481
|
-
goToLine(
|
|
1482
|
+
function({ value: t, onChange: n, placeholder: r, className: o, style: i, showLineNumbers: a = !1, onCursorChange: c, highlightLine: l }, u) {
|
|
1483
|
+
const f = W(null), v = W(null), d = W(null);
|
|
1484
|
+
ht(u, () => ({
|
|
1485
|
+
goToLine(b) {
|
|
1486
|
+
const p = f.current;
|
|
1487
|
+
if (!p) return;
|
|
1488
|
+
const h = Et(t, b);
|
|
1489
|
+
p.focus(), p.setSelectionRange(h, h);
|
|
1490
|
+
const N = parseFloat(getComputedStyle(p).lineHeight) || 18;
|
|
1491
|
+
p.scrollTop = (Math.max(1, b) - 1) * N, y(), m();
|
|
1492
|
+
},
|
|
1493
|
+
goToPosition(b, p, h) {
|
|
1482
1494
|
const N = f.current;
|
|
1483
1495
|
if (!N) return;
|
|
1484
|
-
const
|
|
1485
|
-
N.focus(), N.setSelectionRange(
|
|
1486
|
-
const
|
|
1487
|
-
N.scrollTop = (Math.max(1,
|
|
1488
|
-
},
|
|
1489
|
-
goToPosition(v, N, w) {
|
|
1490
|
-
const A = f.current;
|
|
1491
|
-
if (!A) return;
|
|
1492
|
-
const $ = Rt(t, v, N, w);
|
|
1493
|
-
A.focus(), A.setSelectionRange($, $);
|
|
1494
|
-
const L = parseFloat(getComputedStyle(A).lineHeight) || 18;
|
|
1495
|
-
A.scrollTop = (Math.max(1, v) - 1) * L, m(), u();
|
|
1496
|
+
const C = Rt(t, b, p, h);
|
|
1497
|
+
N.focus(), N.setSelectionRange(C, C);
|
|
1498
|
+
const z = parseFloat(getComputedStyle(N).lineHeight) || 18;
|
|
1499
|
+
N.scrollTop = (Math.max(1, b) - 1) * z, y(), m();
|
|
1496
1500
|
}
|
|
1497
1501
|
}), [t]);
|
|
1498
|
-
const
|
|
1502
|
+
const m = O(() => {
|
|
1499
1503
|
if (!c || !f.current) return;
|
|
1500
|
-
const
|
|
1501
|
-
c(
|
|
1502
|
-
}, [c, t]),
|
|
1503
|
-
const
|
|
1504
|
-
|
|
1504
|
+
const b = Mt(t, f.current.selectionStart);
|
|
1505
|
+
c(b);
|
|
1506
|
+
}, [c, t]), y = O(() => {
|
|
1507
|
+
const b = f.current;
|
|
1508
|
+
b && (v.current && (v.current.scrollTop = b.scrollTop, v.current.scrollLeft = b.scrollLeft), d.current && (d.current.scrollTop = b.scrollTop));
|
|
1505
1509
|
}, []);
|
|
1506
1510
|
B(() => {
|
|
1507
1511
|
if (l == null || l < 1) return;
|
|
1508
|
-
const
|
|
1509
|
-
if (!
|
|
1510
|
-
const
|
|
1511
|
-
(
|
|
1512
|
+
const b = f.current;
|
|
1513
|
+
if (!b) return;
|
|
1514
|
+
const p = parseFloat(getComputedStyle(b).lineHeight) || 18, h = (l - 1) * p, N = h + p;
|
|
1515
|
+
(h < b.scrollTop || N > b.scrollTop + b.clientHeight) && (b.scrollTop = h - b.clientHeight / 2 + p / 2), y();
|
|
1512
1516
|
}, [l]);
|
|
1513
|
-
const
|
|
1514
|
-
`).length, [t]),
|
|
1515
|
-
const
|
|
1516
|
-
for (let
|
|
1517
|
-
|
|
1518
|
-
/* @__PURE__ */ s("div", { className: `nc-csv-line-number ${l ===
|
|
1517
|
+
const g = me(() => t.split(`
|
|
1518
|
+
`).length, [t]), w = () => {
|
|
1519
|
+
const b = [];
|
|
1520
|
+
for (let p = 1; p <= g; p++)
|
|
1521
|
+
b.push(
|
|
1522
|
+
/* @__PURE__ */ s("div", { className: `nc-csv-line-number ${l === p ? "nc-csv-highlight" : ""}`, children: p }, p)
|
|
1519
1523
|
);
|
|
1520
|
-
return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref: d, children:
|
|
1521
|
-
}, k = (
|
|
1522
|
-
`).map((
|
|
1523
|
-
const
|
|
1524
|
-
return /* @__PURE__ */
|
|
1525
|
-
|
|
1524
|
+
return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref: d, children: b });
|
|
1525
|
+
}, k = (b) => b ? b.split(`
|
|
1526
|
+
`).map((h, N) => {
|
|
1527
|
+
const C = h.split(" ");
|
|
1528
|
+
return /* @__PURE__ */ A("div", { className: `nc-csv-line ${l === N + 1 ? "nc-csv-highlight" : ""}`, children: [
|
|
1529
|
+
C.map((z, T) => /* @__PURE__ */ A("span", { children: [
|
|
1526
1530
|
T > 0 && /* @__PURE__ */ s("span", { className: "nc-csv-tab-char", children: " " }),
|
|
1527
|
-
/* @__PURE__ */ s("span", { style: { color: ze[T % ze.length] }, children:
|
|
1531
|
+
/* @__PURE__ */ s("span", { style: { color: ze[T % ze.length] }, children: z })
|
|
1528
1532
|
] }, T)),
|
|
1529
|
-
|
|
1533
|
+
h === "" && `
|
|
1530
1534
|
`
|
|
1531
|
-
] },
|
|
1535
|
+
] }, N);
|
|
1532
1536
|
}) : null;
|
|
1533
|
-
return /* @__PURE__ */
|
|
1534
|
-
a &&
|
|
1535
|
-
/* @__PURE__ */
|
|
1536
|
-
/* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref:
|
|
1537
|
+
return /* @__PURE__ */ A("div", { className: `nc-csv-textarea-container ${a ? "nc-csv-with-gutter" : ""} ${o ?? ""}`, style: i, children: [
|
|
1538
|
+
a && w(),
|
|
1539
|
+
/* @__PURE__ */ A("div", { className: "nc-csv-textarea-editor", children: [
|
|
1540
|
+
/* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref: v, children: /* @__PURE__ */ s("pre", { className: "nc-csv-textarea-highlights", children: k(t) }) }),
|
|
1537
1541
|
/* @__PURE__ */ s(
|
|
1538
1542
|
"textarea",
|
|
1539
1543
|
{
|
|
1540
1544
|
ref: f,
|
|
1541
1545
|
className: "nc-csv-textarea-input",
|
|
1542
1546
|
value: t,
|
|
1543
|
-
onChange: (
|
|
1544
|
-
n(
|
|
1547
|
+
onChange: (b) => {
|
|
1548
|
+
n(b.target.value), requestAnimationFrame(m);
|
|
1545
1549
|
},
|
|
1546
|
-
onScroll:
|
|
1547
|
-
onSelect:
|
|
1548
|
-
onKeyUp:
|
|
1549
|
-
onClick:
|
|
1550
|
+
onScroll: y,
|
|
1551
|
+
onSelect: m,
|
|
1552
|
+
onKeyUp: m,
|
|
1553
|
+
onClick: m,
|
|
1550
1554
|
placeholder: r,
|
|
1551
1555
|
spellCheck: !1,
|
|
1552
1556
|
autoComplete: "off",
|
|
@@ -1599,7 +1603,7 @@ function Fe(e) {
|
|
|
1599
1603
|
Pe.set(e, n);
|
|
1600
1604
|
}
|
|
1601
1605
|
function Pt({ notification: e }) {
|
|
1602
|
-
const { t } =
|
|
1606
|
+
const { t } = U(), n = () => {
|
|
1603
1607
|
if (e.title) return e.title;
|
|
1604
1608
|
switch (e.type) {
|
|
1605
1609
|
case "success":
|
|
@@ -1618,8 +1622,8 @@ function Pt({ notification: e }) {
|
|
|
1618
1622
|
"div",
|
|
1619
1623
|
{
|
|
1620
1624
|
className: `nc-notification nc-notification-${e.type || "info"}`,
|
|
1621
|
-
children: /* @__PURE__ */
|
|
1622
|
-
/* @__PURE__ */
|
|
1625
|
+
children: /* @__PURE__ */ A("div", { className: "nc-notification-content", children: [
|
|
1626
|
+
/* @__PURE__ */ A("div", { className: "nc-notification-body", style: { paddingRight: e.dismissible ? "8px" : "0" }, children: [
|
|
1623
1627
|
/* @__PURE__ */ s("div", { className: "nc-notification-title", children: n() }),
|
|
1624
1628
|
/* @__PURE__ */ s("div", { className: "nc-notification-message", children: e.message })
|
|
1625
1629
|
] }),
|
|
@@ -1637,22 +1641,22 @@ function Pt({ notification: e }) {
|
|
|
1637
1641
|
}
|
|
1638
1642
|
function er() {
|
|
1639
1643
|
const [e, t] = E([]), [n, r] = E(/* @__PURE__ */ new Map()), [o, i] = E(/* @__PURE__ */ new Set()), a = W(null), c = W([]);
|
|
1640
|
-
return B(() => Tt((
|
|
1641
|
-
const f = new Set(c.current.map((d) => d.id)),
|
|
1642
|
-
|
|
1644
|
+
return B(() => Tt((u) => {
|
|
1645
|
+
const f = new Set(c.current.map((d) => d.id)), v = u.filter((d) => !f.has(d.id)).map((d) => d.id);
|
|
1646
|
+
v.length > 0 ? (t(u), i(new Set(v)), requestAnimationFrame(() => {
|
|
1643
1647
|
requestAnimationFrame(() => {
|
|
1644
1648
|
i(/* @__PURE__ */ new Set());
|
|
1645
1649
|
});
|
|
1646
|
-
})) : t(
|
|
1650
|
+
})) : t(u), c.current = u;
|
|
1647
1651
|
}), []), B(() => {
|
|
1648
1652
|
if (!a.current) return;
|
|
1649
1653
|
const l = /* @__PURE__ */ new Map();
|
|
1650
|
-
let
|
|
1654
|
+
let u = 0;
|
|
1651
1655
|
const f = a.current.children;
|
|
1652
|
-
e.forEach((
|
|
1653
|
-
if (l.set(
|
|
1654
|
-
const
|
|
1655
|
-
|
|
1656
|
+
e.forEach((v, d) => {
|
|
1657
|
+
if (l.set(v.id, u), f[d]) {
|
|
1658
|
+
const m = f[d].offsetHeight;
|
|
1659
|
+
v.isRemoving || (u += m + 12);
|
|
1656
1660
|
}
|
|
1657
1661
|
}), r(l);
|
|
1658
1662
|
}, [e]), /* @__PURE__ */ s(
|
|
@@ -1674,7 +1678,7 @@ function er() {
|
|
|
1674
1678
|
position: "relative"
|
|
1675
1679
|
},
|
|
1676
1680
|
children: e.map((l) => {
|
|
1677
|
-
const
|
|
1681
|
+
const u = o.has(l.id), f = l.isRemoving, v = n.get(l.id) || 0;
|
|
1678
1682
|
return /* @__PURE__ */ s(
|
|
1679
1683
|
"div",
|
|
1680
1684
|
{
|
|
@@ -1682,7 +1686,7 @@ function er() {
|
|
|
1682
1686
|
position: "absolute",
|
|
1683
1687
|
top: 0,
|
|
1684
1688
|
left: 0,
|
|
1685
|
-
transform:
|
|
1689
|
+
transform: u ? "translateY(-120px)" : `translateY(${v}px)`,
|
|
1686
1690
|
// Only animate transform when not leaving, animate opacity always
|
|
1687
1691
|
transition: f ? "opacity 300ms ease-out" : "transform 300ms ease-out, opacity 300ms ease-out",
|
|
1688
1692
|
opacity: f ? 0 : 1,
|
|
@@ -1727,7 +1731,7 @@ function nr(e) {
|
|
|
1727
1731
|
}
|
|
1728
1732
|
class Bt {
|
|
1729
1733
|
constructor() {
|
|
1730
|
-
|
|
1734
|
+
q(this, "apps", /* @__PURE__ */ new Map());
|
|
1731
1735
|
}
|
|
1732
1736
|
/**
|
|
1733
1737
|
* Register an app definition.
|
|
@@ -1768,8 +1772,8 @@ class Bt {
|
|
|
1768
1772
|
const oe = new Bt(), Le = "nc-ui-app-state";
|
|
1769
1773
|
class Dt {
|
|
1770
1774
|
constructor() {
|
|
1771
|
-
|
|
1772
|
-
|
|
1775
|
+
q(this, "state");
|
|
1776
|
+
q(this, "listeners", /* @__PURE__ */ new Map());
|
|
1773
1777
|
this.state = this.loadState();
|
|
1774
1778
|
}
|
|
1775
1779
|
loadState() {
|
|
@@ -1816,10 +1820,10 @@ class Dt {
|
|
|
1816
1820
|
const _ = new Dt();
|
|
1817
1821
|
class Ht {
|
|
1818
1822
|
constructor() {
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
+
q(this, "apps", []);
|
|
1824
|
+
q(this, "activeAppId", null);
|
|
1825
|
+
q(this, "listeners", /* @__PURE__ */ new Set());
|
|
1826
|
+
q(this, "refReadyResolvers", /* @__PURE__ */ new Map());
|
|
1823
1827
|
}
|
|
1824
1828
|
/**
|
|
1825
1829
|
* Launch an app and wait for it to be ready (ref populated).
|
|
@@ -1935,13 +1939,13 @@ class Ht {
|
|
|
1935
1939
|
}
|
|
1936
1940
|
const G = new Ht(), Ve = se(null);
|
|
1937
1941
|
function Wt() {
|
|
1938
|
-
const e =
|
|
1942
|
+
const e = Q(Ve);
|
|
1939
1943
|
if (!e)
|
|
1940
1944
|
throw new Error("useApp must be used inside an App");
|
|
1941
1945
|
return e;
|
|
1942
1946
|
}
|
|
1943
1947
|
function Ot({ size: e = 16 }) {
|
|
1944
|
-
return /* @__PURE__ */
|
|
1948
|
+
return /* @__PURE__ */ A(
|
|
1945
1949
|
"svg",
|
|
1946
1950
|
{
|
|
1947
1951
|
width: e,
|
|
@@ -1960,8 +1964,8 @@ function Ot({ size: e = 16 }) {
|
|
|
1960
1964
|
);
|
|
1961
1965
|
}
|
|
1962
1966
|
function Ft({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o }) {
|
|
1963
|
-
return /* @__PURE__ */
|
|
1964
|
-
/* @__PURE__ */
|
|
1967
|
+
return /* @__PURE__ */ A("div", { className: "nc-app-title-bar", children: [
|
|
1968
|
+
/* @__PURE__ */ A("div", { className: "nc-app-title-bar-left", children: [
|
|
1965
1969
|
n && !o && /* @__PURE__ */ s(
|
|
1966
1970
|
"button",
|
|
1967
1971
|
{
|
|
@@ -1974,7 +1978,7 @@ function Ft({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o })
|
|
|
1974
1978
|
),
|
|
1975
1979
|
/* @__PURE__ */ s("span", { className: "nc-app-title-bar-title", children: e })
|
|
1976
1980
|
] }),
|
|
1977
|
-
/* @__PURE__ */
|
|
1981
|
+
/* @__PURE__ */ A("div", { className: "nc-app-title-bar-right", children: [
|
|
1978
1982
|
r && /* @__PURE__ */ s("div", { className: "nc-app-title-bar-toolbar", children: r }),
|
|
1979
1983
|
/* @__PURE__ */ s(We, { onClick: t, "aria-label": "Close application" })
|
|
1980
1984
|
] })
|
|
@@ -1991,7 +1995,7 @@ class Vt extends ke.Component {
|
|
|
1991
1995
|
console.error(`Error loading app ${this.props.appId}:`, t, n);
|
|
1992
1996
|
}
|
|
1993
1997
|
render() {
|
|
1994
|
-
return this.state.hasError ? /* @__PURE__ */
|
|
1998
|
+
return this.state.hasError ? /* @__PURE__ */ A(
|
|
1995
1999
|
"div",
|
|
1996
2000
|
{
|
|
1997
2001
|
style: {
|
|
@@ -2014,38 +2018,38 @@ class Vt extends ke.Component {
|
|
|
2014
2018
|
}
|
|
2015
2019
|
}
|
|
2016
2020
|
function Ye({ appId: e, isActive: t, onClose: n }) {
|
|
2017
|
-
const { t: r } =
|
|
2021
|
+
const { t: r } = U(), o = oe.get(e), [i, a] = E(""), [c, l] = E(null), [u, f] = E(null), [v, d] = E(!1), [m, y] = E(!1);
|
|
2018
2022
|
ke.useEffect(() => {
|
|
2019
2023
|
o != null && o.titleKey && a(r(o.titleKey));
|
|
2020
2024
|
}, [o, r]);
|
|
2021
|
-
const
|
|
2022
|
-
a(
|
|
2023
|
-
}, []),
|
|
2024
|
-
l(() =>
|
|
2025
|
+
const g = O((x) => {
|
|
2026
|
+
a(x);
|
|
2027
|
+
}, []), w = O((x) => {
|
|
2028
|
+
l(() => x);
|
|
2025
2029
|
}, []), k = O(() => {
|
|
2026
2030
|
l(null);
|
|
2027
|
-
}, []),
|
|
2028
|
-
f(
|
|
2029
|
-
}, []),
|
|
2031
|
+
}, []), b = O((x) => {
|
|
2032
|
+
f(x);
|
|
2033
|
+
}, []), p = O(() => {
|
|
2030
2034
|
f(null);
|
|
2031
|
-
}, []),
|
|
2032
|
-
d(
|
|
2033
|
-
}, []),
|
|
2034
|
-
|
|
2035
|
-
}, []),
|
|
2036
|
-
setTitle:
|
|
2037
|
-
setBackHandler:
|
|
2035
|
+
}, []), h = O((x) => {
|
|
2036
|
+
d(x);
|
|
2037
|
+
}, []), N = O((x) => {
|
|
2038
|
+
y(x);
|
|
2039
|
+
}, []), C = me(() => ({
|
|
2040
|
+
setTitle: g,
|
|
2041
|
+
setBackHandler: w,
|
|
2038
2042
|
clearBackHandler: k,
|
|
2039
|
-
setToolbar:
|
|
2040
|
-
clearToolbar:
|
|
2041
|
-
setHideBackButton:
|
|
2042
|
-
setHideTitleBar:
|
|
2043
|
+
setToolbar: b,
|
|
2044
|
+
clearToolbar: p,
|
|
2045
|
+
setHideBackButton: h,
|
|
2046
|
+
setHideTitleBar: N,
|
|
2043
2047
|
close: n
|
|
2044
|
-
}), [
|
|
2048
|
+
}), [g, w, k, b, p, h, N, n]);
|
|
2045
2049
|
if (!o)
|
|
2046
2050
|
return null;
|
|
2047
|
-
const
|
|
2048
|
-
return /* @__PURE__ */
|
|
2051
|
+
const z = o.component, T = !o.hideTitleBar && !m;
|
|
2052
|
+
return /* @__PURE__ */ A(
|
|
2049
2053
|
"div",
|
|
2050
2054
|
{
|
|
2051
2055
|
style: {
|
|
@@ -2061,8 +2065,8 @@ function Ye({ appId: e, isActive: t, onClose: n }) {
|
|
|
2061
2065
|
title: i,
|
|
2062
2066
|
onClose: n,
|
|
2063
2067
|
onBack: c ?? void 0,
|
|
2064
|
-
toolbar:
|
|
2065
|
-
hideBackButton:
|
|
2068
|
+
toolbar: u,
|
|
2069
|
+
hideBackButton: v
|
|
2066
2070
|
}
|
|
2067
2071
|
),
|
|
2068
2072
|
/* @__PURE__ */ s(
|
|
@@ -2075,10 +2079,10 @@ function Ye({ appId: e, isActive: t, onClose: n }) {
|
|
|
2075
2079
|
minHeight: 0,
|
|
2076
2080
|
display: "flex",
|
|
2077
2081
|
flexDirection: "column",
|
|
2078
|
-
backgroundColor: "var(--nc-bg-
|
|
2082
|
+
backgroundColor: "var(--nc-bg-tertiary)",
|
|
2079
2083
|
position: "relative"
|
|
2080
2084
|
},
|
|
2081
|
-
children: /* @__PURE__ */ s(Ve.Provider, { value:
|
|
2085
|
+
children: /* @__PURE__ */ s(Ve.Provider, { value: C, children: /* @__PURE__ */ s(Vt, { appId: e, children: /* @__PURE__ */ s(
|
|
2082
2086
|
mt,
|
|
2083
2087
|
{
|
|
2084
2088
|
fallback: /* @__PURE__ */ s(
|
|
@@ -2093,7 +2097,7 @@ function Ye({ appId: e, isActive: t, onClose: n }) {
|
|
|
2093
2097
|
children: /* @__PURE__ */ s(He, {})
|
|
2094
2098
|
}
|
|
2095
2099
|
),
|
|
2096
|
-
children: /* @__PURE__ */ s(
|
|
2100
|
+
children: /* @__PURE__ */ s(z, {})
|
|
2097
2101
|
}
|
|
2098
2102
|
) }) })
|
|
2099
2103
|
}
|
|
@@ -2136,7 +2140,7 @@ function rr({ children: e }) {
|
|
|
2136
2140
|
}, []), /* @__PURE__ */ s(je.Provider, { value: t, children: e });
|
|
2137
2141
|
}
|
|
2138
2142
|
function Ke() {
|
|
2139
|
-
return
|
|
2143
|
+
return Q(je);
|
|
2140
2144
|
}
|
|
2141
2145
|
const Ne = "-", Yt = (e) => {
|
|
2142
2146
|
const t = jt(e), {
|
|
@@ -2246,27 +2250,27 @@ const Ne = "-", Yt = (e) => {
|
|
|
2246
2250
|
experimentalParseClassName: n
|
|
2247
2251
|
} = e, r = t.length === 1, o = t[0], i = t.length, a = (c) => {
|
|
2248
2252
|
const l = [];
|
|
2249
|
-
let
|
|
2250
|
-
for (let
|
|
2251
|
-
let k = c[
|
|
2252
|
-
if (
|
|
2253
|
-
if (k === o && (r || c.slice(
|
|
2254
|
-
l.push(c.slice(f,
|
|
2253
|
+
let u = 0, f = 0, v;
|
|
2254
|
+
for (let w = 0; w < c.length; w++) {
|
|
2255
|
+
let k = c[w];
|
|
2256
|
+
if (u === 0) {
|
|
2257
|
+
if (k === o && (r || c.slice(w, w + i) === t)) {
|
|
2258
|
+
l.push(c.slice(f, w)), f = w + i;
|
|
2255
2259
|
continue;
|
|
2256
2260
|
}
|
|
2257
2261
|
if (k === "/") {
|
|
2258
|
-
|
|
2262
|
+
v = w;
|
|
2259
2263
|
continue;
|
|
2260
2264
|
}
|
|
2261
2265
|
}
|
|
2262
|
-
k === "[" ?
|
|
2266
|
+
k === "[" ? u++ : k === "]" && u--;
|
|
2263
2267
|
}
|
|
2264
|
-
const d = l.length === 0 ? c : c.substring(f),
|
|
2268
|
+
const d = l.length === 0 ? c : c.substring(f), m = d.startsWith(Ue), y = m ? d.substring(1) : d, g = v && v > f ? v - f : void 0;
|
|
2265
2269
|
return {
|
|
2266
2270
|
modifiers: l,
|
|
2267
|
-
hasImportantModifier:
|
|
2268
|
-
baseClassName:
|
|
2269
|
-
maybePostfixModifierPosition:
|
|
2271
|
+
hasImportantModifier: m,
|
|
2272
|
+
baseClassName: y,
|
|
2273
|
+
maybePostfixModifierPosition: g
|
|
2270
2274
|
};
|
|
2271
2275
|
};
|
|
2272
2276
|
return n ? (c) => n({
|
|
@@ -2293,34 +2297,34 @@ const Ne = "-", Yt = (e) => {
|
|
|
2293
2297
|
} = t, i = [], a = e.trim().split(Qt);
|
|
2294
2298
|
let c = "";
|
|
2295
2299
|
for (let l = a.length - 1; l >= 0; l -= 1) {
|
|
2296
|
-
const
|
|
2300
|
+
const u = a[l], {
|
|
2297
2301
|
modifiers: f,
|
|
2298
|
-
hasImportantModifier:
|
|
2302
|
+
hasImportantModifier: v,
|
|
2299
2303
|
baseClassName: d,
|
|
2300
|
-
maybePostfixModifierPosition:
|
|
2301
|
-
} = n(
|
|
2302
|
-
let
|
|
2303
|
-
if (!
|
|
2304
|
-
if (!
|
|
2305
|
-
c =
|
|
2304
|
+
maybePostfixModifierPosition: m
|
|
2305
|
+
} = n(u);
|
|
2306
|
+
let y = !!m, g = r(y ? d.substring(0, m) : d);
|
|
2307
|
+
if (!g) {
|
|
2308
|
+
if (!y) {
|
|
2309
|
+
c = u + (c.length > 0 ? " " + c : c);
|
|
2306
2310
|
continue;
|
|
2307
2311
|
}
|
|
2308
|
-
if (
|
|
2309
|
-
c =
|
|
2312
|
+
if (g = r(d), !g) {
|
|
2313
|
+
c = u + (c.length > 0 ? " " + c : c);
|
|
2310
2314
|
continue;
|
|
2311
2315
|
}
|
|
2312
|
-
|
|
2316
|
+
y = !1;
|
|
2313
2317
|
}
|
|
2314
|
-
const
|
|
2315
|
-
if (i.includes(
|
|
2318
|
+
const w = Xt(f).join(":"), k = v ? w + Ue : w, b = k + g;
|
|
2319
|
+
if (i.includes(b))
|
|
2316
2320
|
continue;
|
|
2317
|
-
i.push(
|
|
2318
|
-
const
|
|
2319
|
-
for (let
|
|
2320
|
-
const
|
|
2321
|
-
i.push(k +
|
|
2321
|
+
i.push(b);
|
|
2322
|
+
const p = o(g, y);
|
|
2323
|
+
for (let h = 0; h < p.length; ++h) {
|
|
2324
|
+
const N = p[h];
|
|
2325
|
+
i.push(k + N);
|
|
2322
2326
|
}
|
|
2323
|
-
c =
|
|
2327
|
+
c = u + (c.length > 0 ? " " + c : c);
|
|
2324
2328
|
}
|
|
2325
2329
|
return c;
|
|
2326
2330
|
};
|
|
@@ -2341,13 +2345,13 @@ const qe = (e) => {
|
|
|
2341
2345
|
function tn(e, ...t) {
|
|
2342
2346
|
let n, r, o, i = a;
|
|
2343
2347
|
function a(l) {
|
|
2344
|
-
const
|
|
2345
|
-
return n = Jt(
|
|
2348
|
+
const u = t.reduce((f, v) => v(f), e());
|
|
2349
|
+
return n = Jt(u), r = n.cache.get, o = n.cache.set, i = c, c(l);
|
|
2346
2350
|
}
|
|
2347
2351
|
function c(l) {
|
|
2348
|
-
const
|
|
2349
|
-
if (
|
|
2350
|
-
return
|
|
2352
|
+
const u = r(l);
|
|
2353
|
+
if (u)
|
|
2354
|
+
return u;
|
|
2351
2355
|
const f = Zt(l, n);
|
|
2352
2356
|
return o(l, f), f;
|
|
2353
2357
|
}
|
|
@@ -2358,7 +2362,7 @@ function tn(e, ...t) {
|
|
|
2358
2362
|
const H = (e) => {
|
|
2359
2363
|
const t = (n) => n[e] || [];
|
|
2360
2364
|
return t.isThemeGetter = !0, t;
|
|
2361
|
-
}, 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),
|
|
2365
|
+
}, 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), X = (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), J = (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) => {
|
|
2362
2366
|
const r = Xe.exec(e);
|
|
2363
2367
|
return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1;
|
|
2364
2368
|
}, bn = (e) => (
|
|
@@ -2367,36 +2371,36 @@ const H = (e) => {
|
|
|
2367
2371
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
2368
2372
|
sn.test(e) && !cn.test(e)
|
|
2369
2373
|
), Je = () => !1, vn = (e) => an.test(e), wn = (e) => ln.test(e), yn = () => {
|
|
2370
|
-
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"),
|
|
2374
|
+
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"), u = H("grayscale"), f = H("hueRotate"), v = H("invert"), d = H("gap"), m = H("gradientColorStops"), y = H("gradientColorStopPositions"), g = H("inset"), w = H("margin"), k = H("opacity"), b = H("padding"), p = H("saturate"), h = H("scale"), N = H("sepia"), C = H("skew"), z = H("space"), T = H("translate"), x = () => ["auto", "contain", "none"], R = () => ["auto", "hidden", "clip", "visible", "scroll"], S = () => ["auto", I, t], $ = () => [I, t], P = () => ["", j, X], F = () => ["auto", re, I], Z = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], Y = () => ["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"], L = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], D = () => ["", "0", I], ge = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], V = () => [re, I];
|
|
2371
2375
|
return {
|
|
2372
2376
|
cacheSize: 500,
|
|
2373
2377
|
separator: ":",
|
|
2374
2378
|
theme: {
|
|
2375
2379
|
colors: [le],
|
|
2376
|
-
spacing: [j,
|
|
2377
|
-
blur: ["none", "",
|
|
2380
|
+
spacing: [j, X],
|
|
2381
|
+
blur: ["none", "", J, I],
|
|
2378
2382
|
brightness: V(),
|
|
2379
2383
|
borderColor: [e],
|
|
2380
|
-
borderRadius: ["none", "", "full",
|
|
2381
|
-
borderSpacing:
|
|
2382
|
-
borderWidth:
|
|
2384
|
+
borderRadius: ["none", "", "full", J, I],
|
|
2385
|
+
borderSpacing: $(),
|
|
2386
|
+
borderWidth: P(),
|
|
2383
2387
|
contrast: V(),
|
|
2384
2388
|
grayscale: D(),
|
|
2385
2389
|
hueRotate: V(),
|
|
2386
2390
|
invert: D(),
|
|
2387
|
-
gap:
|
|
2391
|
+
gap: $(),
|
|
2388
2392
|
gradientColorStops: [e],
|
|
2389
|
-
gradientColorStopPositions: [dn,
|
|
2390
|
-
inset:
|
|
2391
|
-
margin:
|
|
2393
|
+
gradientColorStopPositions: [dn, X],
|
|
2394
|
+
inset: S(),
|
|
2395
|
+
margin: S(),
|
|
2392
2396
|
opacity: V(),
|
|
2393
|
-
padding:
|
|
2397
|
+
padding: $(),
|
|
2394
2398
|
saturate: V(),
|
|
2395
2399
|
scale: V(),
|
|
2396
2400
|
sepia: D(),
|
|
2397
2401
|
skew: V(),
|
|
2398
|
-
space:
|
|
2399
|
-
translate:
|
|
2402
|
+
space: $(),
|
|
2403
|
+
translate: $()
|
|
2400
2404
|
},
|
|
2401
2405
|
classGroups: {
|
|
2402
2406
|
// Layout
|
|
@@ -2417,7 +2421,7 @@ const H = (e) => {
|
|
|
2417
2421
|
* @see https://tailwindcss.com/docs/columns
|
|
2418
2422
|
*/
|
|
2419
2423
|
columns: [{
|
|
2420
|
-
columns: [
|
|
2424
|
+
columns: [J]
|
|
2421
2425
|
}],
|
|
2422
2426
|
/**
|
|
2423
2427
|
* Break After
|
|
@@ -2518,21 +2522,21 @@ const H = (e) => {
|
|
|
2518
2522
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2519
2523
|
*/
|
|
2520
2524
|
overscroll: [{
|
|
2521
|
-
overscroll:
|
|
2525
|
+
overscroll: x()
|
|
2522
2526
|
}],
|
|
2523
2527
|
/**
|
|
2524
2528
|
* Overscroll Behavior X
|
|
2525
2529
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2526
2530
|
*/
|
|
2527
2531
|
"overscroll-x": [{
|
|
2528
|
-
"overscroll-x":
|
|
2532
|
+
"overscroll-x": x()
|
|
2529
2533
|
}],
|
|
2530
2534
|
/**
|
|
2531
2535
|
* Overscroll Behavior Y
|
|
2532
2536
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2533
2537
|
*/
|
|
2534
2538
|
"overscroll-y": [{
|
|
2535
|
-
"overscroll-y":
|
|
2539
|
+
"overscroll-y": x()
|
|
2536
2540
|
}],
|
|
2537
2541
|
/**
|
|
2538
2542
|
* Position
|
|
@@ -2544,63 +2548,63 @@ const H = (e) => {
|
|
|
2544
2548
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2545
2549
|
*/
|
|
2546
2550
|
inset: [{
|
|
2547
|
-
inset: [
|
|
2551
|
+
inset: [g]
|
|
2548
2552
|
}],
|
|
2549
2553
|
/**
|
|
2550
2554
|
* Right / Left
|
|
2551
2555
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2552
2556
|
*/
|
|
2553
2557
|
"inset-x": [{
|
|
2554
|
-
"inset-x": [
|
|
2558
|
+
"inset-x": [g]
|
|
2555
2559
|
}],
|
|
2556
2560
|
/**
|
|
2557
2561
|
* Top / Bottom
|
|
2558
2562
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2559
2563
|
*/
|
|
2560
2564
|
"inset-y": [{
|
|
2561
|
-
"inset-y": [
|
|
2565
|
+
"inset-y": [g]
|
|
2562
2566
|
}],
|
|
2563
2567
|
/**
|
|
2564
2568
|
* Start
|
|
2565
2569
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2566
2570
|
*/
|
|
2567
2571
|
start: [{
|
|
2568
|
-
start: [
|
|
2572
|
+
start: [g]
|
|
2569
2573
|
}],
|
|
2570
2574
|
/**
|
|
2571
2575
|
* End
|
|
2572
2576
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2573
2577
|
*/
|
|
2574
2578
|
end: [{
|
|
2575
|
-
end: [
|
|
2579
|
+
end: [g]
|
|
2576
2580
|
}],
|
|
2577
2581
|
/**
|
|
2578
2582
|
* Top
|
|
2579
2583
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2580
2584
|
*/
|
|
2581
2585
|
top: [{
|
|
2582
|
-
top: [
|
|
2586
|
+
top: [g]
|
|
2583
2587
|
}],
|
|
2584
2588
|
/**
|
|
2585
2589
|
* Right
|
|
2586
2590
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2587
2591
|
*/
|
|
2588
2592
|
right: [{
|
|
2589
|
-
right: [
|
|
2593
|
+
right: [g]
|
|
2590
2594
|
}],
|
|
2591
2595
|
/**
|
|
2592
2596
|
* Bottom
|
|
2593
2597
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2594
2598
|
*/
|
|
2595
2599
|
bottom: [{
|
|
2596
|
-
bottom: [
|
|
2600
|
+
bottom: [g]
|
|
2597
2601
|
}],
|
|
2598
2602
|
/**
|
|
2599
2603
|
* Left
|
|
2600
2604
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2601
2605
|
*/
|
|
2602
2606
|
left: [{
|
|
2603
|
-
left: [
|
|
2607
|
+
left: [g]
|
|
2604
2608
|
}],
|
|
2605
2609
|
/**
|
|
2606
2610
|
* Visibility
|
|
@@ -2620,7 +2624,7 @@ const H = (e) => {
|
|
|
2620
2624
|
* @see https://tailwindcss.com/docs/flex-basis
|
|
2621
2625
|
*/
|
|
2622
2626
|
basis: [{
|
|
2623
|
-
basis:
|
|
2627
|
+
basis: S()
|
|
2624
2628
|
}],
|
|
2625
2629
|
/**
|
|
2626
2630
|
* Flex Direction
|
|
@@ -2771,7 +2775,7 @@ const H = (e) => {
|
|
|
2771
2775
|
* @see https://tailwindcss.com/docs/justify-content
|
|
2772
2776
|
*/
|
|
2773
2777
|
"justify-content": [{
|
|
2774
|
-
justify: ["normal", ...
|
|
2778
|
+
justify: ["normal", ...L()]
|
|
2775
2779
|
}],
|
|
2776
2780
|
/**
|
|
2777
2781
|
* Justify Items
|
|
@@ -2792,7 +2796,7 @@ const H = (e) => {
|
|
|
2792
2796
|
* @see https://tailwindcss.com/docs/align-content
|
|
2793
2797
|
*/
|
|
2794
2798
|
"align-content": [{
|
|
2795
|
-
content: ["normal", ...
|
|
2799
|
+
content: ["normal", ...L(), "baseline"]
|
|
2796
2800
|
}],
|
|
2797
2801
|
/**
|
|
2798
2802
|
* Align Items
|
|
@@ -2813,7 +2817,7 @@ const H = (e) => {
|
|
|
2813
2817
|
* @see https://tailwindcss.com/docs/place-content
|
|
2814
2818
|
*/
|
|
2815
2819
|
"place-content": [{
|
|
2816
|
-
"place-content": [...
|
|
2820
|
+
"place-content": [...L(), "baseline"]
|
|
2817
2821
|
}],
|
|
2818
2822
|
/**
|
|
2819
2823
|
* Place Items
|
|
@@ -2835,133 +2839,133 @@ const H = (e) => {
|
|
|
2835
2839
|
* @see https://tailwindcss.com/docs/padding
|
|
2836
2840
|
*/
|
|
2837
2841
|
p: [{
|
|
2838
|
-
p: [
|
|
2842
|
+
p: [b]
|
|
2839
2843
|
}],
|
|
2840
2844
|
/**
|
|
2841
2845
|
* Padding X
|
|
2842
2846
|
* @see https://tailwindcss.com/docs/padding
|
|
2843
2847
|
*/
|
|
2844
2848
|
px: [{
|
|
2845
|
-
px: [
|
|
2849
|
+
px: [b]
|
|
2846
2850
|
}],
|
|
2847
2851
|
/**
|
|
2848
2852
|
* Padding Y
|
|
2849
2853
|
* @see https://tailwindcss.com/docs/padding
|
|
2850
2854
|
*/
|
|
2851
2855
|
py: [{
|
|
2852
|
-
py: [
|
|
2856
|
+
py: [b]
|
|
2853
2857
|
}],
|
|
2854
2858
|
/**
|
|
2855
2859
|
* Padding Start
|
|
2856
2860
|
* @see https://tailwindcss.com/docs/padding
|
|
2857
2861
|
*/
|
|
2858
2862
|
ps: [{
|
|
2859
|
-
ps: [
|
|
2863
|
+
ps: [b]
|
|
2860
2864
|
}],
|
|
2861
2865
|
/**
|
|
2862
2866
|
* Padding End
|
|
2863
2867
|
* @see https://tailwindcss.com/docs/padding
|
|
2864
2868
|
*/
|
|
2865
2869
|
pe: [{
|
|
2866
|
-
pe: [
|
|
2870
|
+
pe: [b]
|
|
2867
2871
|
}],
|
|
2868
2872
|
/**
|
|
2869
2873
|
* Padding Top
|
|
2870
2874
|
* @see https://tailwindcss.com/docs/padding
|
|
2871
2875
|
*/
|
|
2872
2876
|
pt: [{
|
|
2873
|
-
pt: [
|
|
2877
|
+
pt: [b]
|
|
2874
2878
|
}],
|
|
2875
2879
|
/**
|
|
2876
2880
|
* Padding Right
|
|
2877
2881
|
* @see https://tailwindcss.com/docs/padding
|
|
2878
2882
|
*/
|
|
2879
2883
|
pr: [{
|
|
2880
|
-
pr: [
|
|
2884
|
+
pr: [b]
|
|
2881
2885
|
}],
|
|
2882
2886
|
/**
|
|
2883
2887
|
* Padding Bottom
|
|
2884
2888
|
* @see https://tailwindcss.com/docs/padding
|
|
2885
2889
|
*/
|
|
2886
2890
|
pb: [{
|
|
2887
|
-
pb: [
|
|
2891
|
+
pb: [b]
|
|
2888
2892
|
}],
|
|
2889
2893
|
/**
|
|
2890
2894
|
* Padding Left
|
|
2891
2895
|
* @see https://tailwindcss.com/docs/padding
|
|
2892
2896
|
*/
|
|
2893
2897
|
pl: [{
|
|
2894
|
-
pl: [
|
|
2898
|
+
pl: [b]
|
|
2895
2899
|
}],
|
|
2896
2900
|
/**
|
|
2897
2901
|
* Margin
|
|
2898
2902
|
* @see https://tailwindcss.com/docs/margin
|
|
2899
2903
|
*/
|
|
2900
2904
|
m: [{
|
|
2901
|
-
m: [
|
|
2905
|
+
m: [w]
|
|
2902
2906
|
}],
|
|
2903
2907
|
/**
|
|
2904
2908
|
* Margin X
|
|
2905
2909
|
* @see https://tailwindcss.com/docs/margin
|
|
2906
2910
|
*/
|
|
2907
2911
|
mx: [{
|
|
2908
|
-
mx: [
|
|
2912
|
+
mx: [w]
|
|
2909
2913
|
}],
|
|
2910
2914
|
/**
|
|
2911
2915
|
* Margin Y
|
|
2912
2916
|
* @see https://tailwindcss.com/docs/margin
|
|
2913
2917
|
*/
|
|
2914
2918
|
my: [{
|
|
2915
|
-
my: [
|
|
2919
|
+
my: [w]
|
|
2916
2920
|
}],
|
|
2917
2921
|
/**
|
|
2918
2922
|
* Margin Start
|
|
2919
2923
|
* @see https://tailwindcss.com/docs/margin
|
|
2920
2924
|
*/
|
|
2921
2925
|
ms: [{
|
|
2922
|
-
ms: [
|
|
2926
|
+
ms: [w]
|
|
2923
2927
|
}],
|
|
2924
2928
|
/**
|
|
2925
2929
|
* Margin End
|
|
2926
2930
|
* @see https://tailwindcss.com/docs/margin
|
|
2927
2931
|
*/
|
|
2928
2932
|
me: [{
|
|
2929
|
-
me: [
|
|
2933
|
+
me: [w]
|
|
2930
2934
|
}],
|
|
2931
2935
|
/**
|
|
2932
2936
|
* Margin Top
|
|
2933
2937
|
* @see https://tailwindcss.com/docs/margin
|
|
2934
2938
|
*/
|
|
2935
2939
|
mt: [{
|
|
2936
|
-
mt: [
|
|
2940
|
+
mt: [w]
|
|
2937
2941
|
}],
|
|
2938
2942
|
/**
|
|
2939
2943
|
* Margin Right
|
|
2940
2944
|
* @see https://tailwindcss.com/docs/margin
|
|
2941
2945
|
*/
|
|
2942
2946
|
mr: [{
|
|
2943
|
-
mr: [
|
|
2947
|
+
mr: [w]
|
|
2944
2948
|
}],
|
|
2945
2949
|
/**
|
|
2946
2950
|
* Margin Bottom
|
|
2947
2951
|
* @see https://tailwindcss.com/docs/margin
|
|
2948
2952
|
*/
|
|
2949
2953
|
mb: [{
|
|
2950
|
-
mb: [
|
|
2954
|
+
mb: [w]
|
|
2951
2955
|
}],
|
|
2952
2956
|
/**
|
|
2953
2957
|
* Margin Left
|
|
2954
2958
|
* @see https://tailwindcss.com/docs/margin
|
|
2955
2959
|
*/
|
|
2956
2960
|
ml: [{
|
|
2957
|
-
ml: [
|
|
2961
|
+
ml: [w]
|
|
2958
2962
|
}],
|
|
2959
2963
|
/**
|
|
2960
2964
|
* Space Between X
|
|
2961
2965
|
* @see https://tailwindcss.com/docs/space
|
|
2962
2966
|
*/
|
|
2963
2967
|
"space-x": [{
|
|
2964
|
-
"space-x": [
|
|
2968
|
+
"space-x": [z]
|
|
2965
2969
|
}],
|
|
2966
2970
|
/**
|
|
2967
2971
|
* Space Between X Reverse
|
|
@@ -2973,7 +2977,7 @@ const H = (e) => {
|
|
|
2973
2977
|
* @see https://tailwindcss.com/docs/space
|
|
2974
2978
|
*/
|
|
2975
2979
|
"space-y": [{
|
|
2976
|
-
"space-y": [
|
|
2980
|
+
"space-y": [z]
|
|
2977
2981
|
}],
|
|
2978
2982
|
/**
|
|
2979
2983
|
* Space Between Y Reverse
|
|
@@ -3001,8 +3005,8 @@ const H = (e) => {
|
|
|
3001
3005
|
*/
|
|
3002
3006
|
"max-w": [{
|
|
3003
3007
|
"max-w": [I, t, "none", "full", "min", "max", "fit", "prose", {
|
|
3004
|
-
screen: [
|
|
3005
|
-
},
|
|
3008
|
+
screen: [J]
|
|
3009
|
+
}, J]
|
|
3006
3010
|
}],
|
|
3007
3011
|
/**
|
|
3008
3012
|
* Height
|
|
@@ -3038,7 +3042,7 @@ const H = (e) => {
|
|
|
3038
3042
|
* @see https://tailwindcss.com/docs/font-size
|
|
3039
3043
|
*/
|
|
3040
3044
|
"font-size": [{
|
|
3041
|
-
text: ["base",
|
|
3045
|
+
text: ["base", J, X]
|
|
3042
3046
|
}],
|
|
3043
3047
|
/**
|
|
3044
3048
|
* Font Smoothing
|
|
@@ -3189,7 +3193,7 @@ const H = (e) => {
|
|
|
3189
3193
|
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
3190
3194
|
*/
|
|
3191
3195
|
"text-decoration-thickness": [{
|
|
3192
|
-
decoration: ["auto", "from-font", j,
|
|
3196
|
+
decoration: ["auto", "from-font", j, X]
|
|
3193
3197
|
}],
|
|
3194
3198
|
/**
|
|
3195
3199
|
* Text Underline Offset
|
|
@@ -3227,7 +3231,7 @@ const H = (e) => {
|
|
|
3227
3231
|
* @see https://tailwindcss.com/docs/text-indent
|
|
3228
3232
|
*/
|
|
3229
3233
|
indent: [{
|
|
3230
|
-
indent:
|
|
3234
|
+
indent: $()
|
|
3231
3235
|
}],
|
|
3232
3236
|
/**
|
|
3233
3237
|
* Vertical Alignment
|
|
@@ -3338,42 +3342,42 @@ const H = (e) => {
|
|
|
3338
3342
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3339
3343
|
*/
|
|
3340
3344
|
"gradient-from-pos": [{
|
|
3341
|
-
from: [
|
|
3345
|
+
from: [y]
|
|
3342
3346
|
}],
|
|
3343
3347
|
/**
|
|
3344
3348
|
* Gradient Color Stops Via Position
|
|
3345
3349
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3346
3350
|
*/
|
|
3347
3351
|
"gradient-via-pos": [{
|
|
3348
|
-
via: [
|
|
3352
|
+
via: [y]
|
|
3349
3353
|
}],
|
|
3350
3354
|
/**
|
|
3351
3355
|
* Gradient Color Stops To Position
|
|
3352
3356
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3353
3357
|
*/
|
|
3354
3358
|
"gradient-to-pos": [{
|
|
3355
|
-
to: [
|
|
3359
|
+
to: [y]
|
|
3356
3360
|
}],
|
|
3357
3361
|
/**
|
|
3358
3362
|
* Gradient Color Stops From
|
|
3359
3363
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3360
3364
|
*/
|
|
3361
3365
|
"gradient-from": [{
|
|
3362
|
-
from: [
|
|
3366
|
+
from: [m]
|
|
3363
3367
|
}],
|
|
3364
3368
|
/**
|
|
3365
3369
|
* Gradient Color Stops Via
|
|
3366
3370
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3367
3371
|
*/
|
|
3368
3372
|
"gradient-via": [{
|
|
3369
|
-
via: [
|
|
3373
|
+
via: [m]
|
|
3370
3374
|
}],
|
|
3371
3375
|
/**
|
|
3372
3376
|
* Gradient Color Stops To
|
|
3373
3377
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3374
3378
|
*/
|
|
3375
3379
|
"gradient-to": [{
|
|
3376
|
-
to: [
|
|
3380
|
+
to: [m]
|
|
3377
3381
|
}],
|
|
3378
3382
|
// Borders
|
|
3379
3383
|
/**
|
|
@@ -3685,7 +3689,7 @@ const H = (e) => {
|
|
|
3685
3689
|
* @see https://tailwindcss.com/docs/outline-width
|
|
3686
3690
|
*/
|
|
3687
3691
|
"outline-w": [{
|
|
3688
|
-
outline: [j,
|
|
3692
|
+
outline: [j, X]
|
|
3689
3693
|
}],
|
|
3690
3694
|
/**
|
|
3691
3695
|
* Outline Color
|
|
@@ -3699,7 +3703,7 @@ const H = (e) => {
|
|
|
3699
3703
|
* @see https://tailwindcss.com/docs/ring-width
|
|
3700
3704
|
*/
|
|
3701
3705
|
"ring-w": [{
|
|
3702
|
-
ring:
|
|
3706
|
+
ring: P()
|
|
3703
3707
|
}],
|
|
3704
3708
|
/**
|
|
3705
3709
|
* Ring Width Inset
|
|
@@ -3725,7 +3729,7 @@ const H = (e) => {
|
|
|
3725
3729
|
* @see https://tailwindcss.com/docs/ring-offset-width
|
|
3726
3730
|
*/
|
|
3727
3731
|
"ring-offset-w": [{
|
|
3728
|
-
"ring-offset": [j,
|
|
3732
|
+
"ring-offset": [j, X]
|
|
3729
3733
|
}],
|
|
3730
3734
|
/**
|
|
3731
3735
|
* Ring Offset Color
|
|
@@ -3740,7 +3744,7 @@ const H = (e) => {
|
|
|
3740
3744
|
* @see https://tailwindcss.com/docs/box-shadow
|
|
3741
3745
|
*/
|
|
3742
3746
|
shadow: [{
|
|
3743
|
-
shadow: ["", "inner", "none",
|
|
3747
|
+
shadow: ["", "inner", "none", J, gn]
|
|
3744
3748
|
}],
|
|
3745
3749
|
/**
|
|
3746
3750
|
* Box Shadow Color
|
|
@@ -3805,14 +3809,14 @@ const H = (e) => {
|
|
|
3805
3809
|
* @see https://tailwindcss.com/docs/drop-shadow
|
|
3806
3810
|
*/
|
|
3807
3811
|
"drop-shadow": [{
|
|
3808
|
-
"drop-shadow": ["", "none",
|
|
3812
|
+
"drop-shadow": ["", "none", J, I]
|
|
3809
3813
|
}],
|
|
3810
3814
|
/**
|
|
3811
3815
|
* Grayscale
|
|
3812
3816
|
* @see https://tailwindcss.com/docs/grayscale
|
|
3813
3817
|
*/
|
|
3814
3818
|
grayscale: [{
|
|
3815
|
-
grayscale: [
|
|
3819
|
+
grayscale: [u]
|
|
3816
3820
|
}],
|
|
3817
3821
|
/**
|
|
3818
3822
|
* Hue Rotate
|
|
@@ -3826,21 +3830,21 @@ const H = (e) => {
|
|
|
3826
3830
|
* @see https://tailwindcss.com/docs/invert
|
|
3827
3831
|
*/
|
|
3828
3832
|
invert: [{
|
|
3829
|
-
invert: [
|
|
3833
|
+
invert: [v]
|
|
3830
3834
|
}],
|
|
3831
3835
|
/**
|
|
3832
3836
|
* Saturate
|
|
3833
3837
|
* @see https://tailwindcss.com/docs/saturate
|
|
3834
3838
|
*/
|
|
3835
3839
|
saturate: [{
|
|
3836
|
-
saturate: [
|
|
3840
|
+
saturate: [p]
|
|
3837
3841
|
}],
|
|
3838
3842
|
/**
|
|
3839
3843
|
* Sepia
|
|
3840
3844
|
* @see https://tailwindcss.com/docs/sepia
|
|
3841
3845
|
*/
|
|
3842
3846
|
sepia: [{
|
|
3843
|
-
sepia: [
|
|
3847
|
+
sepia: [N]
|
|
3844
3848
|
}],
|
|
3845
3849
|
/**
|
|
3846
3850
|
* Backdrop Filter
|
|
@@ -3876,7 +3880,7 @@ const H = (e) => {
|
|
|
3876
3880
|
* @see https://tailwindcss.com/docs/backdrop-grayscale
|
|
3877
3881
|
*/
|
|
3878
3882
|
"backdrop-grayscale": [{
|
|
3879
|
-
"backdrop-grayscale": [
|
|
3883
|
+
"backdrop-grayscale": [u]
|
|
3880
3884
|
}],
|
|
3881
3885
|
/**
|
|
3882
3886
|
* Backdrop Hue Rotate
|
|
@@ -3890,7 +3894,7 @@ const H = (e) => {
|
|
|
3890
3894
|
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
3891
3895
|
*/
|
|
3892
3896
|
"backdrop-invert": [{
|
|
3893
|
-
"backdrop-invert": [
|
|
3897
|
+
"backdrop-invert": [v]
|
|
3894
3898
|
}],
|
|
3895
3899
|
/**
|
|
3896
3900
|
* Backdrop Opacity
|
|
@@ -3904,14 +3908,14 @@ const H = (e) => {
|
|
|
3904
3908
|
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
3905
3909
|
*/
|
|
3906
3910
|
"backdrop-saturate": [{
|
|
3907
|
-
"backdrop-saturate": [
|
|
3911
|
+
"backdrop-saturate": [p]
|
|
3908
3912
|
}],
|
|
3909
3913
|
/**
|
|
3910
3914
|
* Backdrop Sepia
|
|
3911
3915
|
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
3912
3916
|
*/
|
|
3913
3917
|
"backdrop-sepia": [{
|
|
3914
|
-
"backdrop-sepia": [
|
|
3918
|
+
"backdrop-sepia": [N]
|
|
3915
3919
|
}],
|
|
3916
3920
|
// Tables
|
|
3917
3921
|
/**
|
|
@@ -4005,21 +4009,21 @@ const H = (e) => {
|
|
|
4005
4009
|
* @see https://tailwindcss.com/docs/scale
|
|
4006
4010
|
*/
|
|
4007
4011
|
scale: [{
|
|
4008
|
-
scale: [
|
|
4012
|
+
scale: [h]
|
|
4009
4013
|
}],
|
|
4010
4014
|
/**
|
|
4011
4015
|
* Scale X
|
|
4012
4016
|
* @see https://tailwindcss.com/docs/scale
|
|
4013
4017
|
*/
|
|
4014
4018
|
"scale-x": [{
|
|
4015
|
-
"scale-x": [
|
|
4019
|
+
"scale-x": [h]
|
|
4016
4020
|
}],
|
|
4017
4021
|
/**
|
|
4018
4022
|
* Scale Y
|
|
4019
4023
|
* @see https://tailwindcss.com/docs/scale
|
|
4020
4024
|
*/
|
|
4021
4025
|
"scale-y": [{
|
|
4022
|
-
"scale-y": [
|
|
4026
|
+
"scale-y": [h]
|
|
4023
4027
|
}],
|
|
4024
4028
|
/**
|
|
4025
4029
|
* Rotate
|
|
@@ -4047,14 +4051,14 @@ const H = (e) => {
|
|
|
4047
4051
|
* @see https://tailwindcss.com/docs/skew
|
|
4048
4052
|
*/
|
|
4049
4053
|
"skew-x": [{
|
|
4050
|
-
"skew-x": [
|
|
4054
|
+
"skew-x": [C]
|
|
4051
4055
|
}],
|
|
4052
4056
|
/**
|
|
4053
4057
|
* Skew Y
|
|
4054
4058
|
* @see https://tailwindcss.com/docs/skew
|
|
4055
4059
|
*/
|
|
4056
4060
|
"skew-y": [{
|
|
4057
|
-
"skew-y": [
|
|
4061
|
+
"skew-y": [C]
|
|
4058
4062
|
}],
|
|
4059
4063
|
/**
|
|
4060
4064
|
* Transform Origin
|
|
@@ -4118,126 +4122,126 @@ const H = (e) => {
|
|
|
4118
4122
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4119
4123
|
*/
|
|
4120
4124
|
"scroll-m": [{
|
|
4121
|
-
"scroll-m":
|
|
4125
|
+
"scroll-m": $()
|
|
4122
4126
|
}],
|
|
4123
4127
|
/**
|
|
4124
4128
|
* Scroll Margin X
|
|
4125
4129
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4126
4130
|
*/
|
|
4127
4131
|
"scroll-mx": [{
|
|
4128
|
-
"scroll-mx":
|
|
4132
|
+
"scroll-mx": $()
|
|
4129
4133
|
}],
|
|
4130
4134
|
/**
|
|
4131
4135
|
* Scroll Margin Y
|
|
4132
4136
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4133
4137
|
*/
|
|
4134
4138
|
"scroll-my": [{
|
|
4135
|
-
"scroll-my":
|
|
4139
|
+
"scroll-my": $()
|
|
4136
4140
|
}],
|
|
4137
4141
|
/**
|
|
4138
4142
|
* Scroll Margin Start
|
|
4139
4143
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4140
4144
|
*/
|
|
4141
4145
|
"scroll-ms": [{
|
|
4142
|
-
"scroll-ms":
|
|
4146
|
+
"scroll-ms": $()
|
|
4143
4147
|
}],
|
|
4144
4148
|
/**
|
|
4145
4149
|
* Scroll Margin End
|
|
4146
4150
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4147
4151
|
*/
|
|
4148
4152
|
"scroll-me": [{
|
|
4149
|
-
"scroll-me":
|
|
4153
|
+
"scroll-me": $()
|
|
4150
4154
|
}],
|
|
4151
4155
|
/**
|
|
4152
4156
|
* Scroll Margin Top
|
|
4153
4157
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4154
4158
|
*/
|
|
4155
4159
|
"scroll-mt": [{
|
|
4156
|
-
"scroll-mt":
|
|
4160
|
+
"scroll-mt": $()
|
|
4157
4161
|
}],
|
|
4158
4162
|
/**
|
|
4159
4163
|
* Scroll Margin Right
|
|
4160
4164
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4161
4165
|
*/
|
|
4162
4166
|
"scroll-mr": [{
|
|
4163
|
-
"scroll-mr":
|
|
4167
|
+
"scroll-mr": $()
|
|
4164
4168
|
}],
|
|
4165
4169
|
/**
|
|
4166
4170
|
* Scroll Margin Bottom
|
|
4167
4171
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4168
4172
|
*/
|
|
4169
4173
|
"scroll-mb": [{
|
|
4170
|
-
"scroll-mb":
|
|
4174
|
+
"scroll-mb": $()
|
|
4171
4175
|
}],
|
|
4172
4176
|
/**
|
|
4173
4177
|
* Scroll Margin Left
|
|
4174
4178
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4175
4179
|
*/
|
|
4176
4180
|
"scroll-ml": [{
|
|
4177
|
-
"scroll-ml":
|
|
4181
|
+
"scroll-ml": $()
|
|
4178
4182
|
}],
|
|
4179
4183
|
/**
|
|
4180
4184
|
* Scroll Padding
|
|
4181
4185
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4182
4186
|
*/
|
|
4183
4187
|
"scroll-p": [{
|
|
4184
|
-
"scroll-p":
|
|
4188
|
+
"scroll-p": $()
|
|
4185
4189
|
}],
|
|
4186
4190
|
/**
|
|
4187
4191
|
* Scroll Padding X
|
|
4188
4192
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4189
4193
|
*/
|
|
4190
4194
|
"scroll-px": [{
|
|
4191
|
-
"scroll-px":
|
|
4195
|
+
"scroll-px": $()
|
|
4192
4196
|
}],
|
|
4193
4197
|
/**
|
|
4194
4198
|
* Scroll Padding Y
|
|
4195
4199
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4196
4200
|
*/
|
|
4197
4201
|
"scroll-py": [{
|
|
4198
|
-
"scroll-py":
|
|
4202
|
+
"scroll-py": $()
|
|
4199
4203
|
}],
|
|
4200
4204
|
/**
|
|
4201
4205
|
* Scroll Padding Start
|
|
4202
4206
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4203
4207
|
*/
|
|
4204
4208
|
"scroll-ps": [{
|
|
4205
|
-
"scroll-ps":
|
|
4209
|
+
"scroll-ps": $()
|
|
4206
4210
|
}],
|
|
4207
4211
|
/**
|
|
4208
4212
|
* Scroll Padding End
|
|
4209
4213
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4210
4214
|
*/
|
|
4211
4215
|
"scroll-pe": [{
|
|
4212
|
-
"scroll-pe":
|
|
4216
|
+
"scroll-pe": $()
|
|
4213
4217
|
}],
|
|
4214
4218
|
/**
|
|
4215
4219
|
* Scroll Padding Top
|
|
4216
4220
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4217
4221
|
*/
|
|
4218
4222
|
"scroll-pt": [{
|
|
4219
|
-
"scroll-pt":
|
|
4223
|
+
"scroll-pt": $()
|
|
4220
4224
|
}],
|
|
4221
4225
|
/**
|
|
4222
4226
|
* Scroll Padding Right
|
|
4223
4227
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4224
4228
|
*/
|
|
4225
4229
|
"scroll-pr": [{
|
|
4226
|
-
"scroll-pr":
|
|
4230
|
+
"scroll-pr": $()
|
|
4227
4231
|
}],
|
|
4228
4232
|
/**
|
|
4229
4233
|
* Scroll Padding Bottom
|
|
4230
4234
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4231
4235
|
*/
|
|
4232
4236
|
"scroll-pb": [{
|
|
4233
|
-
"scroll-pb":
|
|
4237
|
+
"scroll-pb": $()
|
|
4234
4238
|
}],
|
|
4235
4239
|
/**
|
|
4236
4240
|
* Scroll Padding Left
|
|
4237
4241
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4238
4242
|
*/
|
|
4239
4243
|
"scroll-pl": [{
|
|
4240
|
-
"scroll-pl":
|
|
4244
|
+
"scroll-pl": $()
|
|
4241
4245
|
}],
|
|
4242
4246
|
/**
|
|
4243
4247
|
* Scroll Snap Align
|
|
@@ -4320,7 +4324,7 @@ const H = (e) => {
|
|
|
4320
4324
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
4321
4325
|
*/
|
|
4322
4326
|
"stroke-w": [{
|
|
4323
|
-
stroke: [j,
|
|
4327
|
+
stroke: [j, X, be]
|
|
4324
4328
|
}],
|
|
4325
4329
|
/**
|
|
4326
4330
|
* Stroke
|
|
@@ -4402,91 +4406,105 @@ function kn(...e) {
|
|
|
4402
4406
|
function or({ autoWidth: e = !0, className: t, style: n }) {
|
|
4403
4407
|
const [r, o] = E(() => _.getActiveAppId()), [i, a] = E(() => G.getRunningApps()), { isMobile: c } = Ke();
|
|
4404
4408
|
B(() => {
|
|
4405
|
-
const
|
|
4409
|
+
const w = _.subscribe("activeAppId", (k) => {
|
|
4406
4410
|
o(k);
|
|
4407
4411
|
});
|
|
4408
4412
|
return () => {
|
|
4409
|
-
|
|
4413
|
+
w();
|
|
4410
4414
|
};
|
|
4411
4415
|
}, []), B(() => G.subscribe(() => {
|
|
4412
4416
|
a(G.getRunningApps());
|
|
4413
4417
|
}), []), B(() => {
|
|
4414
4418
|
if (!new URLSearchParams(window.location.search).has("app")) {
|
|
4415
|
-
const
|
|
4416
|
-
|
|
4419
|
+
const b = _.getActiveAppId();
|
|
4420
|
+
b && !G.isRunning(b) && G.launchApp(b);
|
|
4417
4421
|
}
|
|
4418
4422
|
}, []);
|
|
4419
|
-
const l = (
|
|
4420
|
-
G.closeApp(
|
|
4421
|
-
},
|
|
4423
|
+
const l = (w) => {
|
|
4424
|
+
G.closeApp(w);
|
|
4425
|
+
}, u = r ? oe.get(r) : null, v = (u == null ? void 0 : u.width) ?? 400, d = r !== null, g = { ...{
|
|
4422
4426
|
overflow: "hidden",
|
|
4423
4427
|
display: d ? "flex" : "none",
|
|
4424
4428
|
flexDirection: "column",
|
|
4425
4429
|
flexShrink: 0,
|
|
4426
4430
|
// Only set width if autoWidth is enabled
|
|
4427
|
-
...e && d ? { width: c ? "100%" :
|
|
4431
|
+
...e && d ? { width: c ? "100%" : v } : {}
|
|
4428
4432
|
}, ...n };
|
|
4429
|
-
return /* @__PURE__ */ s("div", { className: kn("nc-app-panel", t), style:
|
|
4433
|
+
return /* @__PURE__ */ s("div", { className: kn("nc-app-panel", t), style: g, children: i.map((w) => /* @__PURE__ */ s(
|
|
4430
4434
|
Ye,
|
|
4431
4435
|
{
|
|
4432
|
-
appId:
|
|
4433
|
-
isActive: r ===
|
|
4434
|
-
onClose: () => l(
|
|
4436
|
+
appId: w.appId,
|
|
4437
|
+
isActive: r === w.appId,
|
|
4438
|
+
onClose: () => l(w.appId)
|
|
4435
4439
|
},
|
|
4436
|
-
|
|
4440
|
+
w.appId
|
|
4437
4441
|
)) });
|
|
4438
4442
|
}
|
|
4439
4443
|
function sr({
|
|
4440
4444
|
pinnedAppIds: e,
|
|
4441
4445
|
className: t = "",
|
|
4442
|
-
showIndicators: n = !0
|
|
4446
|
+
showIndicators: n = !0,
|
|
4447
|
+
side: r = "left",
|
|
4448
|
+
getBadge: o
|
|
4443
4449
|
}) {
|
|
4444
|
-
const { isMobile:
|
|
4450
|
+
const { t: i } = U(), { isMobile: a } = Ke(), [c, l] = E(() => _.getActiveAppId()), [u, f] = E(() => G.getRunningApps());
|
|
4445
4451
|
B(() => {
|
|
4446
|
-
const
|
|
4447
|
-
|
|
4452
|
+
const p = _.subscribe("activeAppId", (h) => {
|
|
4453
|
+
l(h);
|
|
4448
4454
|
});
|
|
4449
4455
|
return () => {
|
|
4450
|
-
|
|
4456
|
+
p();
|
|
4451
4457
|
};
|
|
4452
4458
|
}, []), B(() => G.subscribe(() => {
|
|
4453
|
-
|
|
4459
|
+
f(G.getRunningApps());
|
|
4454
4460
|
}), []);
|
|
4455
|
-
const
|
|
4456
|
-
|
|
4457
|
-
},
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4461
|
+
const v = (p) => {
|
|
4462
|
+
c === p ? G.setActiveApp(null) : G.launchApp(p);
|
|
4463
|
+
}, d = e.map((p) => oe.get(p)).filter((p) => !!p), m = u.filter((p) => !e.includes(p.appId)).map((p) => ({ running: p, def: oe.get(p.appId) })).filter((p) => !!p.def), y = (p) => u.some((h) => h.appId === p), g = (p) => p.titleKey ? String(i(p.titleKey)) : p.id, w = (p) => typeof p == "number" && p > 99 ? "99+" : p, k = (p, h) => {
|
|
4464
|
+
const N = o == null ? void 0 : o(p, h);
|
|
4465
|
+
return N ? /* @__PURE__ */ s(
|
|
4466
|
+
"span",
|
|
4467
|
+
{
|
|
4468
|
+
className: `nc-app-taskbar-badge nc-${N.tone ?? "default"}`,
|
|
4469
|
+
"aria-label": N.ariaLabel,
|
|
4470
|
+
children: w(N.content)
|
|
4471
|
+
}
|
|
4472
|
+
) : null;
|
|
4473
|
+
}, b = a ? 24 : 28;
|
|
4474
|
+
return /* @__PURE__ */ A("div", { className: `nc-app-taskbar ${a ? "nc-mobile" : "nc-desktop"} nc-${r} ${t}`, children: [
|
|
4475
|
+
d.map((p) => {
|
|
4476
|
+
const h = p.icon, N = c === p.id, C = y(p.id), z = { isActive: N, isRunning: C, isPinned: !0 };
|
|
4477
|
+
return /* @__PURE__ */ A(
|
|
4462
4478
|
"button",
|
|
4463
4479
|
{
|
|
4464
|
-
className: `nc-app-taskbar-button ${
|
|
4465
|
-
onClick: () =>
|
|
4466
|
-
title:
|
|
4480
|
+
className: `nc-app-taskbar-button ${N ? "nc-active" : ""} ${C ? "nc-running" : ""}`,
|
|
4481
|
+
onClick: () => v(p.id),
|
|
4482
|
+
title: g(p),
|
|
4467
4483
|
children: [
|
|
4468
|
-
/* @__PURE__ */ s(
|
|
4469
|
-
|
|
4484
|
+
/* @__PURE__ */ s(h, { size: b }),
|
|
4485
|
+
k(p, z),
|
|
4486
|
+
n && C && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
|
|
4470
4487
|
]
|
|
4471
4488
|
},
|
|
4472
|
-
|
|
4489
|
+
p.id
|
|
4473
4490
|
);
|
|
4474
4491
|
}),
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
const
|
|
4478
|
-
return /* @__PURE__ */
|
|
4492
|
+
m.length > 0 && /* @__PURE__ */ s("div", { className: "nc-app-taskbar-separator" }),
|
|
4493
|
+
m.map(({ running: p, def: h }) => {
|
|
4494
|
+
const N = h.icon, C = c === p.appId, z = { isActive: C, isRunning: !0, isPinned: !1 };
|
|
4495
|
+
return /* @__PURE__ */ A(
|
|
4479
4496
|
"button",
|
|
4480
4497
|
{
|
|
4481
|
-
className: `nc-app-taskbar-button ${
|
|
4482
|
-
onClick: () =>
|
|
4483
|
-
title:
|
|
4498
|
+
className: `nc-app-taskbar-button ${C ? "nc-active" : ""} nc-running`,
|
|
4499
|
+
onClick: () => v(p.appId),
|
|
4500
|
+
title: g(h),
|
|
4484
4501
|
children: [
|
|
4485
|
-
/* @__PURE__ */ s(
|
|
4502
|
+
/* @__PURE__ */ s(N, { size: b }),
|
|
4503
|
+
k(h, z),
|
|
4486
4504
|
n && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
|
|
4487
4505
|
]
|
|
4488
4506
|
},
|
|
4489
|
-
|
|
4507
|
+
p.appId
|
|
4490
4508
|
);
|
|
4491
4509
|
})
|
|
4492
4510
|
] });
|
|
@@ -4530,66 +4548,66 @@ function ir({
|
|
|
4530
4548
|
}
|
|
4531
4549
|
const Ae = se(null), Qe = se(null);
|
|
4532
4550
|
function cr() {
|
|
4533
|
-
const e =
|
|
4551
|
+
const e = Q(Ae);
|
|
4534
4552
|
if (!e)
|
|
4535
4553
|
throw new Error("useNavStack must be used within a NavStackProvider");
|
|
4536
4554
|
return e;
|
|
4537
4555
|
}
|
|
4538
4556
|
function ar() {
|
|
4539
|
-
const e =
|
|
4557
|
+
const e = Q(Qe);
|
|
4540
4558
|
if (!e)
|
|
4541
4559
|
throw new Error("useNavView must be used within NavStack");
|
|
4542
4560
|
return e;
|
|
4543
4561
|
}
|
|
4544
|
-
const
|
|
4562
|
+
const Se = se(null);
|
|
4545
4563
|
function lr({ rootView: e, children: t }) {
|
|
4546
|
-
const { t: n } =
|
|
4547
|
-
c((
|
|
4548
|
-
const
|
|
4549
|
-
return
|
|
4564
|
+
const { t: n } = U(), r = Wt(), [o, i] = E([e]), [a, c] = E([null]), l = O((h, N) => {
|
|
4565
|
+
c((C) => {
|
|
4566
|
+
const z = [...C];
|
|
4567
|
+
return z[h] = N, z;
|
|
4550
4568
|
});
|
|
4551
|
-
}, []),
|
|
4552
|
-
c((
|
|
4553
|
-
const
|
|
4554
|
-
return
|
|
4569
|
+
}, []), u = O((h) => {
|
|
4570
|
+
c((N) => {
|
|
4571
|
+
const C = [...N];
|
|
4572
|
+
return C[h] = null, C;
|
|
4555
4573
|
});
|
|
4556
|
-
}, []), f = O((
|
|
4557
|
-
i((
|
|
4558
|
-
}, []),
|
|
4559
|
-
i((
|
|
4574
|
+
}, []), f = O((h) => {
|
|
4575
|
+
i((N) => [...N, h]), c((N) => [...N, null]);
|
|
4576
|
+
}, []), v = O(() => {
|
|
4577
|
+
i((h) => h.length <= 1 ? h : h.slice(0, -1)), c((h) => h.slice(0, -1));
|
|
4560
4578
|
}, []), d = O(() => {
|
|
4561
4579
|
i([e]), c([null]);
|
|
4562
|
-
}, [e]),
|
|
4580
|
+
}, [e]), m = o.length, y = m > 1, g = o.length - 1, w = o[o.length - 1], k = w != null && w.titleKey ? n(w.titleKey) : (w == null ? void 0 : w.title) ?? "";
|
|
4563
4581
|
B(() => {
|
|
4564
4582
|
r.setTitle(k);
|
|
4565
4583
|
}, [k, r]), B(() => {
|
|
4566
|
-
|
|
4567
|
-
}, [
|
|
4568
|
-
const
|
|
4569
|
-
|
|
4584
|
+
y ? r.setBackHandler(v) : r.clearBackHandler();
|
|
4585
|
+
}, [y, v, r]), B(() => {
|
|
4586
|
+
const h = a[a.length - 1];
|
|
4587
|
+
h ? r.setToolbar(h) : r.clearToolbar();
|
|
4570
4588
|
}, [a, r]);
|
|
4571
|
-
const
|
|
4589
|
+
const b = {
|
|
4572
4590
|
push: f,
|
|
4573
|
-
pop:
|
|
4591
|
+
pop: v,
|
|
4574
4592
|
reset: d,
|
|
4575
|
-
depth:
|
|
4576
|
-
canGoBack:
|
|
4593
|
+
depth: m,
|
|
4594
|
+
canGoBack: y,
|
|
4577
4595
|
currentTitle: k
|
|
4578
|
-
},
|
|
4596
|
+
}, p = {
|
|
4579
4597
|
stack: o,
|
|
4580
4598
|
toolbarStack: a,
|
|
4581
4599
|
updateToolbar: l,
|
|
4582
|
-
clearToolbarAt:
|
|
4583
|
-
topIndex:
|
|
4600
|
+
clearToolbarAt: u,
|
|
4601
|
+
topIndex: g
|
|
4584
4602
|
};
|
|
4585
|
-
return /* @__PURE__ */ s(Ae.Provider, { value:
|
|
4603
|
+
return /* @__PURE__ */ s(Ae.Provider, { value: b, children: /* @__PURE__ */ s(Se.Provider, { value: p, children: t }) });
|
|
4586
4604
|
}
|
|
4587
4605
|
function Nn({ index: e, children: t }) {
|
|
4588
|
-
const n =
|
|
4606
|
+
const n = Q(Se);
|
|
4589
4607
|
if (!n)
|
|
4590
4608
|
throw new Error("NavViewProvider must be used within NavStackProvider");
|
|
4591
|
-
const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n, a = O((
|
|
4592
|
-
e === i && r(e,
|
|
4609
|
+
const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n, a = O((u) => {
|
|
4610
|
+
e === i && r(e, u);
|
|
4593
4611
|
}, [e, i, r]), c = O(() => {
|
|
4594
4612
|
e === i && o(e);
|
|
4595
4613
|
}, [e, i, o]), l = {
|
|
@@ -4599,7 +4617,7 @@ function Nn({ index: e, children: t }) {
|
|
|
4599
4617
|
return /* @__PURE__ */ s(Qe.Provider, { value: l, children: t });
|
|
4600
4618
|
}
|
|
4601
4619
|
function dr() {
|
|
4602
|
-
const e =
|
|
4620
|
+
const e = Q(Ae), t = Q(Se);
|
|
4603
4621
|
if (!e || !t)
|
|
4604
4622
|
throw new Error("NavStackContainer must be used within a NavStackProvider");
|
|
4605
4623
|
const { stack: n } = t;
|