@kingsimba/nc-ui 0.1.5 → 0.1.6
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 +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -43
- package/dist/index.js +544 -601
- package/dist/index.js.map +1 -1
- package/dist/styles.css +7 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var Fe = Object.defineProperty;
|
|
2
|
+
var Ke = (e, t, n) => t in e ? Fe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var K = (e, t, n) => Ke(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import { jsx as s, jsxs as y } from "react/jsx-runtime";
|
|
5
|
-
import ve, { useState as z, useRef as H, useMemo as we, useEffect as
|
|
5
|
+
import ve, { useState as z, useRef as H, useMemo as we, useEffect as B, createContext as ne, useContext as q, useCallback as W, Suspense as _e } from "react";
|
|
6
6
|
import { createPortal as le } from "react-dom";
|
|
7
7
|
import { useTranslation as J } from "react-i18next";
|
|
8
|
-
import { R as
|
|
9
|
-
import
|
|
10
|
-
import { c as
|
|
11
|
-
function
|
|
8
|
+
import { R as Ue, C as Re, e as qe, T as Je, E as Xe, V as Qe, b as Ze, c as et, a as tt } from "./GeneratedIcons-BMopyrwd.js";
|
|
9
|
+
import nt from "i18next";
|
|
10
|
+
import { c as rt } from "./clsx-OuTLNxxd.js";
|
|
11
|
+
function Ee({
|
|
12
12
|
size: e = "default",
|
|
13
13
|
color: t,
|
|
14
14
|
overlay: n = !1,
|
|
@@ -37,37 +37,37 @@ function ze({
|
|
|
37
37
|
);
|
|
38
38
|
return n ? /* @__PURE__ */ s("div", { className: "nc-activity-indicator-overlay", children: o }) : o;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
const
|
|
40
|
+
function j({ variant: e = "default", block: t, size: n = "default", className: r, disabled: o, textSelectable: i, loading: c, onClick: a, children: d, ...p }) {
|
|
41
|
+
const h = [
|
|
42
42
|
"nc-button",
|
|
43
43
|
e !== "default" ? `nc-${e}` : "",
|
|
44
44
|
t ? "nc-block" : "",
|
|
45
45
|
n === "small" ? "nc-small" : "",
|
|
46
46
|
n === "large" ? "nc-large" : "",
|
|
47
|
-
o ||
|
|
47
|
+
o || c ? "nc-disabled" : "",
|
|
48
48
|
i ? "nc-text-selectable" : "",
|
|
49
|
-
|
|
49
|
+
c ? "nc-loading" : "",
|
|
50
50
|
r ?? ""
|
|
51
51
|
].filter(Boolean).join(" ");
|
|
52
52
|
return /* @__PURE__ */ y(
|
|
53
53
|
"button",
|
|
54
54
|
{
|
|
55
|
-
className:
|
|
56
|
-
disabled: o ||
|
|
55
|
+
className: h,
|
|
56
|
+
disabled: o || c,
|
|
57
57
|
onClick: (l) => {
|
|
58
|
-
if (!
|
|
58
|
+
if (!c) {
|
|
59
59
|
if (i) {
|
|
60
60
|
const u = window.getSelection();
|
|
61
61
|
if (u && u.toString().length > 0)
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
a == null || a(l);
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
...p,
|
|
68
68
|
children: [
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
c && /* @__PURE__ */ s(
|
|
70
|
+
Ee,
|
|
71
71
|
{
|
|
72
72
|
size: "small",
|
|
73
73
|
className: "nc-button-spinner",
|
|
@@ -79,14 +79,14 @@ function F({ variant: e = "default", block: t, size: n = "default", className: r
|
|
|
79
79
|
}
|
|
80
80
|
);
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function fn({ code: e, text: t, type: n, button: r, onAction: o }) {
|
|
83
83
|
return /* @__PURE__ */ y("div", { className: `nc-alert nc-${n}`, children: [
|
|
84
84
|
/* @__PURE__ */ y("span", { className: `nc-alert-message nc-${n}`, children: [
|
|
85
85
|
/* @__PURE__ */ s("span", { className: "nc-alert-code", children: e }),
|
|
86
86
|
t
|
|
87
87
|
] }),
|
|
88
88
|
r && /* @__PURE__ */ s("span", { className: "nc-alert-action", children: /* @__PURE__ */ s(
|
|
89
|
-
|
|
89
|
+
j,
|
|
90
90
|
{
|
|
91
91
|
size: "small",
|
|
92
92
|
variant: r.variant ?? (n === "error" ? "danger" : "warning"),
|
|
@@ -96,7 +96,7 @@ function bn({ code: e, text: t, type: n, button: r, onAction: o }) {
|
|
|
96
96
|
) })
|
|
97
97
|
] });
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function hn({
|
|
100
100
|
percentage: e = 0.5,
|
|
101
101
|
status: t = "discharging",
|
|
102
102
|
darkMode: n = !1,
|
|
@@ -105,7 +105,7 @@ function vn({
|
|
|
105
105
|
const o = Math.max(0, Math.min(1, Number(e) || 0));
|
|
106
106
|
let i;
|
|
107
107
|
r ? o < 0.1 ? i = "var(--nc-danger)" : o < 0.2 ? i = "var(--nc-warning)" : i = "var(--nc-success)" : i = n ? "#ffffff" : "#000000";
|
|
108
|
-
const
|
|
108
|
+
const c = n ? "rgba(255, 255, 255, 0.5)" : "rgba(0, 0, 0, 0.2)", a = 24, d = 14, p = 2, h = 0, f = 12, l = 0, u = 0, m = 0, g = a, b = d, x = b - l * 2, k = g - l * 2, $ = Math.max(1, Math.min(4, b / 4)), w = o === 0 ? 0 : 0.05 + o * 0.95, C = a + p + f, S = 20, v = 0.65, I = Math.max(d, S * v), N = a + p + 1, R = (d - S * v) / 2;
|
|
109
109
|
return /* @__PURE__ */ y(
|
|
110
110
|
"svg",
|
|
111
111
|
{
|
|
@@ -133,7 +133,7 @@ function vn({
|
|
|
133
133
|
ry: $,
|
|
134
134
|
width: g,
|
|
135
135
|
height: b,
|
|
136
|
-
fill:
|
|
136
|
+
fill: c
|
|
137
137
|
}
|
|
138
138
|
),
|
|
139
139
|
/* @__PURE__ */ s(
|
|
@@ -152,13 +152,13 @@ function vn({
|
|
|
152
152
|
/* @__PURE__ */ s(
|
|
153
153
|
"rect",
|
|
154
154
|
{
|
|
155
|
-
x:
|
|
155
|
+
x: a + h,
|
|
156
156
|
y: d * 0.26,
|
|
157
157
|
width: p,
|
|
158
158
|
height: d * 0.48,
|
|
159
159
|
rx: 0.8,
|
|
160
160
|
ry: 0.8,
|
|
161
|
-
fill: o === 1 ? i :
|
|
161
|
+
fill: o === 1 ? i : c
|
|
162
162
|
}
|
|
163
163
|
),
|
|
164
164
|
t === "charging" ? /* @__PURE__ */ s("g", { transform: `translate(${N}, ${R}) scale(${v})`, fill: i, children: /* @__PURE__ */ s("path", { d: "M10 0 L2 11 H8 L5 20 L14 8 H8 L10 0 Z" }) }) : null
|
|
@@ -167,7 +167,7 @@ function vn({
|
|
|
167
167
|
}
|
|
168
168
|
);
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function mn({
|
|
171
171
|
value: e,
|
|
172
172
|
onChange: t,
|
|
173
173
|
options: n,
|
|
@@ -175,18 +175,18 @@ function wn({
|
|
|
175
175
|
labels: o,
|
|
176
176
|
size: i = "default"
|
|
177
177
|
}) {
|
|
178
|
-
return /* @__PURE__ */ s("div", { className: `nc-button-group ${i === "small" ? "nc-small" : ""}`, children: n.map((
|
|
178
|
+
return /* @__PURE__ */ s("div", { className: `nc-button-group ${i === "small" ? "nc-small" : ""}`, children: n.map((c, a) => /* @__PURE__ */ s(
|
|
179
179
|
"button",
|
|
180
180
|
{
|
|
181
|
-
className: `nc-button-group-item ${e ===
|
|
182
|
-
onClick: () => !r && t(
|
|
181
|
+
className: `nc-button-group-item ${e === c ? "nc-active" : ""} ${a < n.length - 1 ? "nc-has-border" : ""}`,
|
|
182
|
+
onClick: () => !r && t(c),
|
|
183
183
|
disabled: r,
|
|
184
|
-
children: o && o[
|
|
184
|
+
children: o && o[c] ? o[c] : c
|
|
185
185
|
},
|
|
186
|
-
|
|
186
|
+
c
|
|
187
187
|
)) });
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function ot({ size: e }) {
|
|
190
190
|
return /* @__PURE__ */ s("svg", { className: `nc-checkbox-icon ${e === "small" ? "nc-small" : ""}`, viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ s(
|
|
191
191
|
"path",
|
|
192
192
|
{
|
|
@@ -198,13 +198,13 @@ function it({ size: e }) {
|
|
|
198
198
|
}
|
|
199
199
|
) });
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function gn({ checked: e, onChange: t, disabled: n, label: r, size: o = "default", labelColor: i, style: c, className: a = "" }) {
|
|
202
202
|
const d = o === "small";
|
|
203
203
|
return /* @__PURE__ */ y(
|
|
204
204
|
"label",
|
|
205
205
|
{
|
|
206
|
-
className: `nc-checkbox-label ${d ? "nc-small" : ""} ${n ? "nc-disabled" : ""} ${
|
|
207
|
-
style:
|
|
206
|
+
className: `nc-checkbox-label ${d ? "nc-small" : ""} ${n ? "nc-disabled" : ""} ${a}`.trim(),
|
|
207
|
+
style: c,
|
|
208
208
|
onClick: (p) => {
|
|
209
209
|
n || (p.preventDefault(), t(!e));
|
|
210
210
|
},
|
|
@@ -219,7 +219,7 @@ function yn({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
|
|
|
219
219
|
onKeyDown: (p) => {
|
|
220
220
|
n || (p.key === "Enter" || p.key === " ") && (p.preventDefault(), t(!e));
|
|
221
221
|
},
|
|
222
|
-
children: e && /* @__PURE__ */ s(
|
|
222
|
+
children: e && /* @__PURE__ */ s(ot, { size: o })
|
|
223
223
|
}
|
|
224
224
|
),
|
|
225
225
|
r && /* @__PURE__ */ s("span", { className: "nc-checkbox-text", style: i ? { color: i } : void 0, children: r })
|
|
@@ -227,9 +227,9 @@ function yn({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
|
|
|
227
227
|
}
|
|
228
228
|
);
|
|
229
229
|
}
|
|
230
|
-
function
|
|
231
|
-
const i = H(null), { t:
|
|
232
|
-
return
|
|
230
|
+
function st({ option: e, onChange: t, selected: n, highlighted: r, small: o }) {
|
|
231
|
+
const i = H(null), { t: c } = J();
|
|
232
|
+
return B(() => {
|
|
233
233
|
r && i.current && i.current.scrollIntoView({ block: "nearest" });
|
|
234
234
|
}, [r]), /* @__PURE__ */ y(
|
|
235
235
|
"div",
|
|
@@ -247,25 +247,25 @@ function at({ option: e, onChange: t, selected: n, highlighted: r, small: o }) {
|
|
|
247
247
|
e.label,
|
|
248
248
|
e.default && /* @__PURE__ */ y("span", { style: { fontSize: "0.85em", color: "var(--nc-text-weak)", marginLeft: 6 }, children: [
|
|
249
249
|
"(",
|
|
250
|
-
|
|
250
|
+
c("common.default"),
|
|
251
251
|
")"
|
|
252
252
|
] })
|
|
253
253
|
]
|
|
254
254
|
}
|
|
255
255
|
);
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function it({
|
|
258
258
|
isOpen: e,
|
|
259
259
|
options: t,
|
|
260
260
|
onSelect: n,
|
|
261
261
|
selectedValue: r,
|
|
262
262
|
placement: o = "bottom",
|
|
263
263
|
anchorRef: i,
|
|
264
|
-
small:
|
|
265
|
-
highlightedIndex:
|
|
264
|
+
small: c,
|
|
265
|
+
highlightedIndex: a = -1
|
|
266
266
|
}) {
|
|
267
|
-
const [d, p] = z({ top: 0, left: 0, width: 0 }), [
|
|
268
|
-
if (
|
|
267
|
+
const [d, p] = z({ top: 0, left: 0, width: 0 }), [h, f] = z(o), { t: l } = J();
|
|
268
|
+
if (B(() => {
|
|
269
269
|
if (e && i.current) {
|
|
270
270
|
const m = i.current.getBoundingClientRect();
|
|
271
271
|
let g = o;
|
|
@@ -273,7 +273,7 @@ function ct({
|
|
|
273
273
|
const b = window.innerHeight - m.bottom, x = m.top;
|
|
274
274
|
b < 320 && x > b && (g = "top");
|
|
275
275
|
}
|
|
276
|
-
|
|
276
|
+
f(g), p({
|
|
277
277
|
top: g === "top" ? m.top - 4 : m.bottom + 4,
|
|
278
278
|
left: m.left,
|
|
279
279
|
width: m.width
|
|
@@ -286,20 +286,20 @@ function ct({
|
|
|
286
286
|
className: "nc-combo-dropdown",
|
|
287
287
|
style: {
|
|
288
288
|
position: "fixed",
|
|
289
|
-
top:
|
|
290
|
-
bottom:
|
|
289
|
+
top: h === "top" ? void 0 : d.top,
|
|
290
|
+
bottom: h === "top" ? window.innerHeight - d.top : void 0,
|
|
291
291
|
left: d.left,
|
|
292
292
|
width: d.width,
|
|
293
293
|
zIndex: 1e3,
|
|
294
294
|
maxHeight: 300,
|
|
295
295
|
overflowY: "auto"
|
|
296
296
|
},
|
|
297
|
-
children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${
|
|
297
|
+
children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${c ? "nc-small" : ""}`, children: l("common.noResults") }) : t.map((m, g) => /* @__PURE__ */ s(st, { option: m, onChange: n, selected: m.value === r, highlighted: g === a, small: c }, m.value))
|
|
298
298
|
}
|
|
299
299
|
);
|
|
300
300
|
return le(u, document.body);
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function ct({ onClick: e, small: t }) {
|
|
303
303
|
return /* @__PURE__ */ s(
|
|
304
304
|
"button",
|
|
305
305
|
{
|
|
@@ -311,7 +311,7 @@ function lt({ onClick: e, small: t }) {
|
|
|
311
311
|
}
|
|
312
312
|
);
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function at({ open: e, onClick: t, small: n }) {
|
|
315
315
|
return /* @__PURE__ */ s(
|
|
316
316
|
"button",
|
|
317
317
|
{
|
|
@@ -323,39 +323,39 @@ function dt({ open: e, onClick: t, small: n }) {
|
|
|
323
323
|
}
|
|
324
324
|
);
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function bn({
|
|
327
327
|
value: e,
|
|
328
328
|
onChange: t,
|
|
329
329
|
placeholder: n = "Select…",
|
|
330
330
|
options: r,
|
|
331
331
|
disabled: o,
|
|
332
332
|
label: i,
|
|
333
|
-
clearable:
|
|
334
|
-
allowTyping:
|
|
333
|
+
clearable: c = !0,
|
|
334
|
+
allowTyping: a = !1,
|
|
335
335
|
placement: d = "bottom",
|
|
336
336
|
size: p = "default",
|
|
337
|
-
style:
|
|
338
|
-
className:
|
|
337
|
+
style: h,
|
|
338
|
+
className: f
|
|
339
339
|
}) {
|
|
340
340
|
const [l, u] = z(!1), [m, g] = z(""), [b, x] = z(-1), k = H(null), $ = H(null), w = p === "small", { t: C } = J(), S = we(() => {
|
|
341
341
|
const M = m.toLowerCase();
|
|
342
|
-
return
|
|
343
|
-
}, [r, m,
|
|
344
|
-
|
|
342
|
+
return a ? r.filter((P) => P.label.toLowerCase().includes(M)) : r;
|
|
343
|
+
}, [r, m, a]);
|
|
344
|
+
B(() => {
|
|
345
345
|
l && x(-1);
|
|
346
|
-
}, [l, S]),
|
|
347
|
-
if (!
|
|
346
|
+
}, [l, S]), B(() => {
|
|
347
|
+
if (!c && !e && r.length > 0 && t) {
|
|
348
348
|
const M = r.find((P) => P.default) || r[0];
|
|
349
349
|
t(M.value);
|
|
350
350
|
}
|
|
351
|
-
}, [
|
|
351
|
+
}, [c, e, r, t]), B(() => {
|
|
352
352
|
function M(P) {
|
|
353
353
|
var L;
|
|
354
354
|
P.target instanceof Node && k.current && ((L = k.current.parentElement) != null && L.contains(P.target) || u(!1));
|
|
355
355
|
}
|
|
356
356
|
return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
|
|
357
357
|
}, []);
|
|
358
|
-
const v = r.find((M) => M.value === e), I = v &&
|
|
358
|
+
const v = r.find((M) => M.value === e), I = v && c, N = !o && !I, R = !(l && a) && !!v, D = (M, P = !1) => {
|
|
359
359
|
var L;
|
|
360
360
|
t == null || t(M), u(!1), g(""), P && ((L = k.current) == null || L.blur());
|
|
361
361
|
}, E = () => {
|
|
@@ -386,7 +386,7 @@ function xn({
|
|
|
386
386
|
break;
|
|
387
387
|
}
|
|
388
388
|
};
|
|
389
|
-
return /* @__PURE__ */ y("div", { className: `nc-combo-container ${
|
|
389
|
+
return /* @__PURE__ */ y("div", { className: `nc-combo-container ${f || ""}`.trim(), style: { position: "relative", ...h }, children: [
|
|
390
390
|
i && /* @__PURE__ */ s("span", { className: `nc-label ${w ? "nc-small" : ""}`, children: i }),
|
|
391
391
|
/* @__PURE__ */ y(
|
|
392
392
|
"div",
|
|
@@ -394,7 +394,7 @@ function xn({
|
|
|
394
394
|
ref: $,
|
|
395
395
|
style: { position: "relative", display: "flex", alignItems: "center" },
|
|
396
396
|
onMouseDown: (M) => {
|
|
397
|
-
o ||
|
|
397
|
+
o || a && M.target === k.current || (u((P) => (!P && a && v && g(v.label), !P)), a && !l && setTimeout(() => {
|
|
398
398
|
var P, L;
|
|
399
399
|
(P = k.current) == null || P.focus(), (L = k.current) == null || L.select();
|
|
400
400
|
}, 0));
|
|
@@ -408,21 +408,21 @@ function xn({
|
|
|
408
408
|
placeholder: n,
|
|
409
409
|
onFocus: () => {
|
|
410
410
|
var M;
|
|
411
|
-
!o &&
|
|
411
|
+
!o && a && (u(!0), v && (g(v.label), setTimeout(() => {
|
|
412
412
|
var P;
|
|
413
413
|
return (P = k.current) == null ? void 0 : P.select();
|
|
414
|
-
}, 0))),
|
|
414
|
+
}, 0))), a || (M = k.current) == null || M.blur();
|
|
415
415
|
},
|
|
416
|
-
onChange: (M) =>
|
|
416
|
+
onChange: (M) => a && g(M.target.value),
|
|
417
417
|
onKeyDown: Y,
|
|
418
|
-
value: l &&
|
|
419
|
-
readOnly: o || !
|
|
418
|
+
value: l && a ? m : (v == null ? void 0 : v.label) || "",
|
|
419
|
+
readOnly: o || !a,
|
|
420
420
|
style: {
|
|
421
421
|
width: "100%",
|
|
422
422
|
paddingRight: N || I ? w ? 32 : 44 : 12,
|
|
423
|
-
caretColor:
|
|
424
|
-
cursor:
|
|
425
|
-
userSelect:
|
|
423
|
+
caretColor: a ? void 0 : "transparent",
|
|
424
|
+
cursor: a ? void 0 : "pointer",
|
|
425
|
+
userSelect: a ? void 0 : "none",
|
|
426
426
|
color: R ? "transparent" : "var(--nc-text)"
|
|
427
427
|
}
|
|
428
428
|
}
|
|
@@ -455,15 +455,15 @@ function xn({
|
|
|
455
455
|
]
|
|
456
456
|
}
|
|
457
457
|
),
|
|
458
|
-
I && /* @__PURE__ */ s(
|
|
459
|
-
N && /* @__PURE__ */ s(
|
|
458
|
+
I && /* @__PURE__ */ s(ct, { onClick: E, small: w }),
|
|
459
|
+
N && /* @__PURE__ */ s(at, { open: l, onClick: () => u((M) => !M), small: w })
|
|
460
460
|
]
|
|
461
461
|
}
|
|
462
462
|
),
|
|
463
|
-
/* @__PURE__ */ s(
|
|
463
|
+
/* @__PURE__ */ s(it, { isOpen: l, options: S, onSelect: D, selectedValue: e, placement: d, anchorRef: $, small: w, highlightedIndex: b })
|
|
464
464
|
] });
|
|
465
465
|
}
|
|
466
|
-
function
|
|
466
|
+
function vn({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default", title: o, "aria-label": i }) {
|
|
467
467
|
return /* @__PURE__ */ s(
|
|
468
468
|
"button",
|
|
469
469
|
{
|
|
@@ -473,11 +473,11 @@ function kn({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default"
|
|
|
473
473
|
title: o ?? (t ? "Refreshing..." : "Refresh"),
|
|
474
474
|
"aria-label": i ?? (t ? "Refreshing" : "Refresh"),
|
|
475
475
|
"data-size": r,
|
|
476
|
-
children: /* @__PURE__ */ s(
|
|
476
|
+
children: /* @__PURE__ */ s(Ue, { size: r === "small" ? 14 : r === "large" ? 20 : 18, className: t ? "nc-spinning" : "" })
|
|
477
477
|
}
|
|
478
478
|
);
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function ze({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Close", "aria-label": o = "Close" }) {
|
|
481
481
|
return /* @__PURE__ */ s(
|
|
482
482
|
"button",
|
|
483
483
|
{
|
|
@@ -487,11 +487,11 @@ function Pe({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Clo
|
|
|
487
487
|
title: r,
|
|
488
488
|
"aria-label": o,
|
|
489
489
|
"data-size": n,
|
|
490
|
-
children: /* @__PURE__ */ s(
|
|
490
|
+
children: /* @__PURE__ */ s(Re, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
|
|
491
491
|
}
|
|
492
492
|
);
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function wn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Edit", "aria-label": o = "Edit" }) {
|
|
495
495
|
return /* @__PURE__ */ s(
|
|
496
496
|
"button",
|
|
497
497
|
{
|
|
@@ -501,11 +501,11 @@ function Nn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Edi
|
|
|
501
501
|
title: r,
|
|
502
502
|
"aria-label": o,
|
|
503
503
|
"data-size": n,
|
|
504
|
-
children: /* @__PURE__ */ s(
|
|
504
|
+
children: /* @__PURE__ */ s(qe, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
|
|
505
505
|
}
|
|
506
506
|
);
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function yn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Delete", "aria-label": o = "Delete" }) {
|
|
509
509
|
return /* @__PURE__ */ s(
|
|
510
510
|
"button",
|
|
511
511
|
{
|
|
@@ -515,11 +515,11 @@ function An({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Del
|
|
|
515
515
|
title: r,
|
|
516
516
|
"aria-label": o,
|
|
517
517
|
"data-size": n,
|
|
518
|
-
children: /* @__PURE__ */ s(
|
|
518
|
+
children: /* @__PURE__ */ s(Je, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
|
|
519
519
|
}
|
|
520
520
|
);
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function xn({ onClick: e, disabled: t = !1, children: n, title: r, "aria-label": o, size: i = "default" }) {
|
|
523
523
|
return /* @__PURE__ */ s(
|
|
524
524
|
"button",
|
|
525
525
|
{
|
|
@@ -533,7 +533,7 @@ function Sn({ onClick: e, disabled: t = !1, children: n, title: r, "aria-label":
|
|
|
533
533
|
}
|
|
534
534
|
);
|
|
535
535
|
}
|
|
536
|
-
function
|
|
536
|
+
function kn({
|
|
537
537
|
open: e,
|
|
538
538
|
onClose: t,
|
|
539
539
|
options: n,
|
|
@@ -541,97 +541,97 @@ function Cn({
|
|
|
541
541
|
anchor: o,
|
|
542
542
|
preferredDirection: i = "down"
|
|
543
543
|
}) {
|
|
544
|
-
const
|
|
545
|
-
if (
|
|
546
|
-
if (!e || !p || !
|
|
547
|
-
const
|
|
544
|
+
const c = H(null), [a, d] = z({ top: 0, left: 0 }), p = o || (r == null ? void 0 : r.current);
|
|
545
|
+
if (B(() => {
|
|
546
|
+
if (!e || !p || !c.current) return;
|
|
547
|
+
const f = p.getBoundingClientRect(), l = c.current.getBoundingClientRect(), u = window.innerHeight, m = window.innerWidth, g = f.bottom + 8, b = g + l.height <= u - 8;
|
|
548
548
|
let x = i;
|
|
549
549
|
(!b && i === "down" || i === "up" && b) && (x = "up");
|
|
550
550
|
let k;
|
|
551
|
-
x === "down" ? k = g : k =
|
|
552
|
-
let $ =
|
|
553
|
-
$ + l.width > m - 8 && ($ =
|
|
551
|
+
x === "down" ? k = g : k = f.top - l.height - 8;
|
|
552
|
+
let $ = f.left;
|
|
553
|
+
$ + l.width > m - 8 && ($ = f.right - l.width), d({
|
|
554
554
|
top: Math.max(8, k),
|
|
555
555
|
// Ensure minimum 8px from top
|
|
556
556
|
left: Math.max(8, $)
|
|
557
557
|
// Ensure minimum 8px from left
|
|
558
558
|
});
|
|
559
|
-
}, [e, p, i]),
|
|
559
|
+
}, [e, p, i]), B(() => {
|
|
560
560
|
if (!e) return;
|
|
561
|
-
const
|
|
562
|
-
|
|
561
|
+
const f = (u) => {
|
|
562
|
+
c.current && !c.current.contains(u.target) && p && !p.contains(u.target) && t();
|
|
563
563
|
}, l = (u) => {
|
|
564
564
|
u.key === "Escape" && t();
|
|
565
565
|
};
|
|
566
|
-
return document.addEventListener("mousedown",
|
|
567
|
-
document.removeEventListener("mousedown",
|
|
566
|
+
return document.addEventListener("mousedown", f), document.addEventListener("keydown", l), () => {
|
|
567
|
+
document.removeEventListener("mousedown", f), document.removeEventListener("keydown", l);
|
|
568
568
|
};
|
|
569
569
|
}, [e, t, p]), !e) return null;
|
|
570
|
-
const
|
|
571
|
-
|
|
570
|
+
const h = (f) => {
|
|
571
|
+
f.disabled || (f.onClick(), t());
|
|
572
572
|
};
|
|
573
573
|
return le(
|
|
574
574
|
/* @__PURE__ */ s(
|
|
575
575
|
"div",
|
|
576
576
|
{
|
|
577
|
-
ref:
|
|
577
|
+
ref: c,
|
|
578
578
|
className: "nc-context-menu",
|
|
579
579
|
style: {
|
|
580
580
|
position: "fixed",
|
|
581
|
-
top: `${
|
|
582
|
-
left: `${
|
|
581
|
+
top: `${a.top}px`,
|
|
582
|
+
left: `${a.left}px`,
|
|
583
583
|
zIndex: 1e4
|
|
584
584
|
},
|
|
585
585
|
role: "menu",
|
|
586
|
-
children: n.map((
|
|
586
|
+
children: n.map((f) => /* @__PURE__ */ y(
|
|
587
587
|
"button",
|
|
588
588
|
{
|
|
589
|
-
className: `nc-context-menu-item ${
|
|
590
|
-
onClick: () => f
|
|
591
|
-
disabled:
|
|
589
|
+
className: `nc-context-menu-item ${f.variant === "danger" ? "nc-danger" : ""} ${f.disabled ? "nc-disabled" : ""}`,
|
|
590
|
+
onClick: () => h(f),
|
|
591
|
+
disabled: f.disabled,
|
|
592
592
|
role: "menuitem",
|
|
593
593
|
children: [
|
|
594
|
-
|
|
595
|
-
/* @__PURE__ */ s("span", { className: "nc-context-menu-label", children:
|
|
594
|
+
f.icon && /* @__PURE__ */ s("span", { className: "nc-context-menu-icon", children: f.icon }),
|
|
595
|
+
/* @__PURE__ */ s("span", { className: "nc-context-menu-label", children: f.label })
|
|
596
596
|
]
|
|
597
597
|
},
|
|
598
|
-
|
|
598
|
+
f.id
|
|
599
599
|
))
|
|
600
600
|
}
|
|
601
601
|
),
|
|
602
602
|
document.body
|
|
603
603
|
);
|
|
604
604
|
}
|
|
605
|
-
const
|
|
606
|
-
function
|
|
607
|
-
const e = q(
|
|
605
|
+
const Pe = ne(null);
|
|
606
|
+
function lt() {
|
|
607
|
+
const e = q(Pe);
|
|
608
608
|
if (!e)
|
|
609
609
|
throw new Error("useDialog must be used inside a Dialog component");
|
|
610
610
|
return e;
|
|
611
611
|
}
|
|
612
612
|
function Q({ children: e, onClick: t, ...n }) {
|
|
613
|
-
const { close: r } =
|
|
614
|
-
return /* @__PURE__ */ s(
|
|
615
|
-
t == null || t(
|
|
613
|
+
const { close: r } = lt(), { t: o } = J();
|
|
614
|
+
return /* @__PURE__ */ s(j, { onClick: (c) => {
|
|
615
|
+
t == null || t(c), r();
|
|
616
616
|
}, ...n, children: e ?? o("common.close") });
|
|
617
617
|
}
|
|
618
618
|
function Z(e) {
|
|
619
619
|
if (e !== void 0)
|
|
620
620
|
return typeof e == "number" ? `${e}px` : e;
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function Nn({
|
|
623
623
|
open: e,
|
|
624
624
|
onClose: t,
|
|
625
625
|
title: n,
|
|
626
626
|
children: r,
|
|
627
627
|
width: o = 360,
|
|
628
628
|
height: i,
|
|
629
|
-
minWidth:
|
|
630
|
-
minHeight:
|
|
629
|
+
minWidth: c,
|
|
630
|
+
minHeight: a,
|
|
631
631
|
maxWidth: d = "95vw",
|
|
632
632
|
maxHeight: p = "95vh",
|
|
633
|
-
footerType:
|
|
634
|
-
footer:
|
|
633
|
+
footerType: h = "ok-cancel",
|
|
634
|
+
footer: f,
|
|
635
635
|
onOk: l,
|
|
636
636
|
onSave: u,
|
|
637
637
|
onDelete: m,
|
|
@@ -645,45 +645,45 @@ function In({
|
|
|
645
645
|
const C = H(null), { t: S } = J(), v = { close: t }, I = (D) => {
|
|
646
646
|
x && D.target === D.currentTarget && t();
|
|
647
647
|
};
|
|
648
|
-
if (
|
|
648
|
+
if (B(() => {
|
|
649
649
|
e && C.current && C.current.focus();
|
|
650
650
|
}, [e]), !e) return null;
|
|
651
651
|
const N = () => {
|
|
652
|
-
switch (
|
|
652
|
+
switch (h) {
|
|
653
653
|
case "ok":
|
|
654
|
-
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(
|
|
654
|
+
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(j, { variant: "primary", onClick: l ?? t, disabled: k, children: S("common.ok") }) });
|
|
655
655
|
case "ok-cancel":
|
|
656
656
|
return /* @__PURE__ */ y("div", { className: "nc-dialog-footer", children: [
|
|
657
|
-
/* @__PURE__ */ s(
|
|
658
|
-
/* @__PURE__ */ s(Q, {
|
|
657
|
+
/* @__PURE__ */ s(j, { variant: "primary", onClick: l ?? t, disabled: k, children: S("common.ok") }),
|
|
658
|
+
/* @__PURE__ */ s(Q, { onClick: g, children: S("common.cancel") })
|
|
659
659
|
] });
|
|
660
660
|
case "save-cancel":
|
|
661
661
|
return /* @__PURE__ */ y("div", { className: "nc-dialog-footer", children: [
|
|
662
|
-
/* @__PURE__ */ s(
|
|
663
|
-
/* @__PURE__ */ s(Q, {
|
|
662
|
+
/* @__PURE__ */ s(j, { variant: "primary", onClick: u, disabled: k, children: S("common.save") }),
|
|
663
|
+
/* @__PURE__ */ s(Q, { onClick: g, children: S("common.cancel") })
|
|
664
664
|
] });
|
|
665
665
|
case "delete-cancel":
|
|
666
666
|
return /* @__PURE__ */ y("div", { className: "nc-dialog-footer", children: [
|
|
667
|
-
/* @__PURE__ */ s(
|
|
668
|
-
/* @__PURE__ */ s(Q, {
|
|
667
|
+
/* @__PURE__ */ s(j, { variant: "danger", onClick: m, disabled: k, children: S("common.delete") }),
|
|
668
|
+
/* @__PURE__ */ s(Q, { onClick: g, children: S("common.cancel") })
|
|
669
669
|
] });
|
|
670
670
|
case "connect":
|
|
671
671
|
return /* @__PURE__ */ y("div", { className: "nc-dialog-footer", children: [
|
|
672
|
-
/* @__PURE__ */ s(
|
|
673
|
-
/* @__PURE__ */ s(Q, {
|
|
672
|
+
/* @__PURE__ */ s(j, { variant: "primary", onClick: b, disabled: k, children: S("common.connect") }),
|
|
673
|
+
/* @__PURE__ */ s(Q, { onClick: g, children: S("common.cancel") })
|
|
674
674
|
] });
|
|
675
675
|
case "close":
|
|
676
676
|
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(Q, { variant: "primary" }) });
|
|
677
677
|
case "gotit":
|
|
678
678
|
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(Q, { variant: "primary", children: S("common.gotit") }) });
|
|
679
679
|
case "custom":
|
|
680
|
-
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children:
|
|
680
|
+
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: f });
|
|
681
681
|
case "none":
|
|
682
682
|
return null;
|
|
683
683
|
default:
|
|
684
684
|
return null;
|
|
685
685
|
}
|
|
686
|
-
}, R = /* @__PURE__ */ s(
|
|
686
|
+
}, R = /* @__PURE__ */ s(Pe.Provider, { value: v, children: /* @__PURE__ */ s("div", { className: `nc-dialog-overlay${$ ? " nc-fullscreen" : ""}`, onClick: I, children: /* @__PURE__ */ y(
|
|
687
687
|
"div",
|
|
688
688
|
{
|
|
689
689
|
ref: C,
|
|
@@ -691,8 +691,8 @@ function In({
|
|
|
691
691
|
style: {
|
|
692
692
|
width: Z(o),
|
|
693
693
|
height: Z(i),
|
|
694
|
-
minWidth: Z(
|
|
695
|
-
minHeight: Z(
|
|
694
|
+
minWidth: Z(c),
|
|
695
|
+
minHeight: Z(a),
|
|
696
696
|
maxWidth: Z(d),
|
|
697
697
|
maxHeight: Z(p)
|
|
698
698
|
},
|
|
@@ -703,7 +703,7 @@ function In({
|
|
|
703
703
|
children: [
|
|
704
704
|
!w && /* @__PURE__ */ y("div", { className: "nc-dialog-header", children: [
|
|
705
705
|
/* @__PURE__ */ s("h3", { id: "nc-dialog-title", className: "nc-dialog-title", children: n }),
|
|
706
|
-
/* @__PURE__ */ s(
|
|
706
|
+
/* @__PURE__ */ s(ze, { onClick: t, "aria-label": "Close dialog" })
|
|
707
707
|
] }),
|
|
708
708
|
/* @__PURE__ */ s("div", { className: "nc-dialog-content", children: r }),
|
|
709
709
|
N()
|
|
@@ -712,7 +712,7 @@ function In({
|
|
|
712
712
|
) }) });
|
|
713
713
|
return $ ? le(R, document.body) : R;
|
|
714
714
|
}
|
|
715
|
-
function
|
|
715
|
+
function dt({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
|
|
716
716
|
const r = t === "small" ? 28 : 34;
|
|
717
717
|
return /* @__PURE__ */ s(
|
|
718
718
|
"button",
|
|
@@ -739,7 +739,7 @@ function pt({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
|
|
|
739
739
|
}
|
|
740
740
|
);
|
|
741
741
|
}
|
|
742
|
-
function
|
|
742
|
+
function ut({ visible: e, onClick: t, size: n = "default" }) {
|
|
743
743
|
const r = n === "small" ? 28 : 34, o = n === "small" ? 16 : 18;
|
|
744
744
|
return /* @__PURE__ */ s(
|
|
745
745
|
"button",
|
|
@@ -761,30 +761,30 @@ function ht({ visible: e, onClick: t, size: n = "default" }) {
|
|
|
761
761
|
alignItems: "center",
|
|
762
762
|
justifyContent: "center"
|
|
763
763
|
},
|
|
764
|
-
children: e ? /* @__PURE__ */ s(
|
|
764
|
+
children: e ? /* @__PURE__ */ s(Xe, { size: o }) : /* @__PURE__ */ s(Qe, { size: o })
|
|
765
765
|
}
|
|
766
766
|
);
|
|
767
767
|
}
|
|
768
|
-
function
|
|
768
|
+
function An({
|
|
769
769
|
value: e = "",
|
|
770
770
|
onChange: t,
|
|
771
771
|
onEnter: n,
|
|
772
772
|
onClear: r,
|
|
773
773
|
placeholder: o,
|
|
774
774
|
disabled: i,
|
|
775
|
-
label:
|
|
776
|
-
clearable:
|
|
775
|
+
label: c,
|
|
776
|
+
clearable: a = !0,
|
|
777
777
|
type: d = "text",
|
|
778
778
|
className: p = "",
|
|
779
|
-
size:
|
|
780
|
-
style:
|
|
779
|
+
size: h = "default",
|
|
780
|
+
style: f,
|
|
781
781
|
showPasswordToggle: l = !1,
|
|
782
782
|
multiline: u = !1,
|
|
783
783
|
rows: m = 3,
|
|
784
784
|
validator: g,
|
|
785
785
|
showErrorMessage: b = !0
|
|
786
786
|
}) {
|
|
787
|
-
const x = H(null), k = H(null), [$, w] = z(!1), C = g ? g(e) : null, S = !!C, v = d === "password", I = v && l && !i && !u, N =
|
|
787
|
+
const x = H(null), k = H(null), [$, w] = z(!1), C = g ? g(e) : null, S = !!C, v = d === "password", I = v && l && !i && !u, N = a && e && !i, R = h === "small" ? 32 : 44;
|
|
788
788
|
let D = 12;
|
|
789
789
|
N && I ? D = R * 2 : (N || I) && (D = R);
|
|
790
790
|
const E = () => {
|
|
@@ -794,9 +794,9 @@ function Mn({
|
|
|
794
794
|
L.key === "Enter" && !u && (n == null || n());
|
|
795
795
|
}, M = (L) => {
|
|
796
796
|
t == null || t(L.target.value);
|
|
797
|
-
}, P = `nc-input ${
|
|
798
|
-
return /* @__PURE__ */ y("div", { className: "nc-col", style: { position: "relative", flex: 1, ...
|
|
799
|
-
|
|
797
|
+
}, P = `nc-input ${h === "small" ? "nc-small " : ""} ${S ? "nc-error " : ""}${p}`;
|
|
798
|
+
return /* @__PURE__ */ y("div", { className: "nc-col", style: { position: "relative", flex: 1, ...f }, children: [
|
|
799
|
+
c && /* @__PURE__ */ s("span", { className: "nc-label", children: c }),
|
|
800
800
|
/* @__PURE__ */ y("div", { style: { position: "relative", display: "flex", alignItems: u ? "flex-start" : "center" }, children: [
|
|
801
801
|
u ? /* @__PURE__ */ s(
|
|
802
802
|
"textarea",
|
|
@@ -832,20 +832,20 @@ function Mn({
|
|
|
832
832
|
}
|
|
833
833
|
}
|
|
834
834
|
),
|
|
835
|
-
N && /* @__PURE__ */ s(
|
|
836
|
-
I && /* @__PURE__ */ s(
|
|
835
|
+
N && /* @__PURE__ */ s(dt, { onClick: E, size: h, rightOffset: I ? R + 4 : 4 }),
|
|
836
|
+
I && /* @__PURE__ */ s(ut, { visible: $, onClick: () => w(!$), size: h })
|
|
837
837
|
] }),
|
|
838
838
|
S && b && /* @__PURE__ */ s("span", { className: "nc-error-message", children: C })
|
|
839
839
|
] });
|
|
840
840
|
}
|
|
841
|
-
function
|
|
841
|
+
function Sn({
|
|
842
842
|
children: e,
|
|
843
843
|
onClick: t,
|
|
844
844
|
showBorder: n = !0,
|
|
845
845
|
selectable: r = !1,
|
|
846
846
|
style: o
|
|
847
847
|
}) {
|
|
848
|
-
const [i,
|
|
848
|
+
const [i, c] = ve.useState(!1);
|
|
849
849
|
return /* @__PURE__ */ s(
|
|
850
850
|
"div",
|
|
851
851
|
{
|
|
@@ -859,9 +859,9 @@ function $n({
|
|
|
859
859
|
t(d);
|
|
860
860
|
}
|
|
861
861
|
},
|
|
862
|
-
onMouseDown: () => t &&
|
|
863
|
-
onMouseUp: () =>
|
|
864
|
-
onMouseLeave: () =>
|
|
862
|
+
onMouseDown: () => t && c(!0),
|
|
863
|
+
onMouseUp: () => c(!1),
|
|
864
|
+
onMouseLeave: () => c(!1),
|
|
865
865
|
style: {
|
|
866
866
|
cursor: t ? "pointer" : "default",
|
|
867
867
|
userSelect: r ? "text" : void 0,
|
|
@@ -873,7 +873,7 @@ function $n({
|
|
|
873
873
|
}
|
|
874
874
|
);
|
|
875
875
|
}
|
|
876
|
-
function
|
|
876
|
+
function Cn({ title: e, titleTools: t, children: n, style: r }) {
|
|
877
877
|
return /* @__PURE__ */ y("div", { className: "nc-list-group", style: r, children: [
|
|
878
878
|
(e || t) && /* @__PURE__ */ y("div", { className: "nc-list-group-title", children: [
|
|
879
879
|
/* @__PURE__ */ s("div", { children: e }),
|
|
@@ -888,15 +888,15 @@ function Rn({ title: e, titleTools: t, children: n, style: r }) {
|
|
|
888
888
|
)
|
|
889
889
|
] });
|
|
890
890
|
}
|
|
891
|
-
function
|
|
892
|
-
const [i,
|
|
893
|
-
|
|
891
|
+
function In({ values: e, onChange: t, options: n, placeholder: r = "Select…", label: o }) {
|
|
892
|
+
const [i, c] = z(!1), [a, d] = z(""), p = H(null), h = we(() => n.filter((l) => l.label.toLowerCase().includes(a.toLowerCase())), [n, a]);
|
|
893
|
+
B(() => {
|
|
894
894
|
function l(u) {
|
|
895
|
-
!(u.target instanceof Node) || !p.current || p.current.contains(u.target) ||
|
|
895
|
+
!(u.target instanceof Node) || !p.current || p.current.contains(u.target) || c(!1);
|
|
896
896
|
}
|
|
897
897
|
return document.addEventListener("mousedown", l), () => document.removeEventListener("mousedown", l);
|
|
898
898
|
}, []);
|
|
899
|
-
const
|
|
899
|
+
const f = (l) => {
|
|
900
900
|
e.includes(l) ? t(e.filter((u) => u !== l)) : t([...e, l]);
|
|
901
901
|
};
|
|
902
902
|
return /* @__PURE__ */ y("div", { ref: p, className: "nc-col", style: { position: "relative" }, children: [
|
|
@@ -912,7 +912,7 @@ function En({ values: e, onChange: t, options: n, placeholder: r = "Select…",
|
|
|
912
912
|
{
|
|
913
913
|
className: "nc-button nc-ghost",
|
|
914
914
|
style: { padding: 0, minHeight: 0, height: 20, width: 20, display: "inline-flex", alignItems: "center", justifyContent: "center", border: "none" },
|
|
915
|
-
onClick: () =>
|
|
915
|
+
onClick: () => f(l),
|
|
916
916
|
"aria-label": `Remove ${u.label}`,
|
|
917
917
|
children: "✕"
|
|
918
918
|
}
|
|
@@ -923,26 +923,26 @@ function En({ values: e, onChange: t, options: n, placeholder: r = "Select…",
|
|
|
923
923
|
"input",
|
|
924
924
|
{
|
|
925
925
|
className: "nc-input",
|
|
926
|
-
value:
|
|
926
|
+
value: a,
|
|
927
927
|
onChange: (l) => d(l.target.value),
|
|
928
|
-
onFocus: () =>
|
|
928
|
+
onFocus: () => c(!0),
|
|
929
929
|
style: { minWidth: 50, border: "none", background: "transparent", padding: 4, minHeight: 32, flex: 1 }
|
|
930
930
|
}
|
|
931
931
|
)
|
|
932
932
|
] }),
|
|
933
933
|
i && /* @__PURE__ */ y("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: [
|
|
934
|
-
|
|
934
|
+
h.map((l) => {
|
|
935
935
|
const u = e.includes(l.value);
|
|
936
|
-
return /* @__PURE__ */ y("div", { className: "nc-section nc-row", style: { justifyContent: "space-between", cursor: "pointer", padding: 12 }, onMouseDown: () =>
|
|
936
|
+
return /* @__PURE__ */ y("div", { className: "nc-section nc-row", style: { justifyContent: "space-between", cursor: "pointer", padding: 12 }, onMouseDown: () => f(l.value), children: [
|
|
937
937
|
/* @__PURE__ */ s("span", { children: l.label }),
|
|
938
938
|
/* @__PURE__ */ s("span", { children: u ? "✔️" : "" })
|
|
939
939
|
] }, l.value);
|
|
940
940
|
}),
|
|
941
|
-
|
|
941
|
+
h.length === 0 && /* @__PURE__ */ s("div", { className: "nc-section nc-label", children: "No results" })
|
|
942
942
|
] })
|
|
943
943
|
] });
|
|
944
944
|
}
|
|
945
|
-
const
|
|
945
|
+
const pt = [
|
|
946
946
|
"January",
|
|
947
947
|
"February",
|
|
948
948
|
"March",
|
|
@@ -964,7 +964,7 @@ function de(e) {
|
|
|
964
964
|
const r = e.split("-"), o = parseInt(r[1], 10);
|
|
965
965
|
return o < 1 || o > 12 ? "Month must be between 1 and 12" : null;
|
|
966
966
|
}
|
|
967
|
-
function
|
|
967
|
+
function ae(e) {
|
|
968
968
|
if (!e) return "";
|
|
969
969
|
const t = e.split("-");
|
|
970
970
|
if (t.length !== 2) return e;
|
|
@@ -978,16 +978,16 @@ function ce(e) {
|
|
|
978
978
|
}
|
|
979
979
|
function Ae(e) {
|
|
980
980
|
if (!e) return "";
|
|
981
|
-
const t =
|
|
981
|
+
const t = ae(e);
|
|
982
982
|
if (!/^\d{4}-\d{2}$/.test(t)) return e;
|
|
983
983
|
const [n, r] = t.split("-"), o = parseInt(r, 10) - 1;
|
|
984
|
-
return `${
|
|
984
|
+
return `${pt[o]} ${n}`;
|
|
985
985
|
}
|
|
986
986
|
function Se() {
|
|
987
987
|
const e = /* @__PURE__ */ new Date(), t = e.getFullYear(), n = String(e.getMonth() + 1).padStart(2, "0");
|
|
988
988
|
return `${t}-${n}`;
|
|
989
989
|
}
|
|
990
|
-
function
|
|
990
|
+
function Mn({
|
|
991
991
|
startMonth: e,
|
|
992
992
|
endMonth: t,
|
|
993
993
|
onChange: n,
|
|
@@ -995,9 +995,9 @@ function zn({
|
|
|
995
995
|
className: o = "",
|
|
996
996
|
disabled: i = !1
|
|
997
997
|
}) {
|
|
998
|
-
const [
|
|
999
|
-
|
|
1000
|
-
if (
|
|
998
|
+
const [c, a] = z(!1), [d, p] = z(""), [h, f] = z(""), [l, u] = z({ top: 0, left: 0, width: 0 }), m = H(null), g = H(null);
|
|
999
|
+
B(() => {
|
|
1000
|
+
if (c && m.current) {
|
|
1001
1001
|
const R = m.current.getBoundingClientRect();
|
|
1002
1002
|
u({
|
|
1003
1003
|
top: R.bottom + 4,
|
|
@@ -1005,24 +1005,24 @@ function zn({
|
|
|
1005
1005
|
width: R.width
|
|
1006
1006
|
});
|
|
1007
1007
|
}
|
|
1008
|
-
}, [
|
|
1009
|
-
if (!
|
|
1008
|
+
}, [c]), B(() => {
|
|
1009
|
+
if (!c) return;
|
|
1010
1010
|
const R = (D) => {
|
|
1011
|
-
m.current && !m.current.contains(D.target) && g.current && !g.current.contains(D.target) &&
|
|
1011
|
+
m.current && !m.current.contains(D.target) && g.current && !g.current.contains(D.target) && a(!1);
|
|
1012
1012
|
};
|
|
1013
1013
|
return document.addEventListener("mousedown", R), () => document.removeEventListener("mousedown", R);
|
|
1014
|
-
}, [
|
|
1014
|
+
}, [c]);
|
|
1015
1015
|
const b = () => {
|
|
1016
|
-
p(e || Se()),
|
|
1016
|
+
p(e || Se()), f(t || Se()), a(!0);
|
|
1017
1017
|
}, x = () => {
|
|
1018
|
-
|
|
1018
|
+
a(!1);
|
|
1019
1019
|
}, k = () => {
|
|
1020
|
-
const R = de(d), D = de(
|
|
1020
|
+
const R = de(d), D = de(h);
|
|
1021
1021
|
if (R || D)
|
|
1022
1022
|
return;
|
|
1023
|
-
const E =
|
|
1024
|
-
E && Y && (n == null || n(E, Y)),
|
|
1025
|
-
}, $ = e && t ? `${Ae(e)} - ${Ae(t)}` : "Select month range", w = de(d), C = de(
|
|
1023
|
+
const E = ae(d), Y = ae(h);
|
|
1024
|
+
E && Y && (n == null || n(E, Y)), a(!1);
|
|
1025
|
+
}, $ = e && t ? `${Ae(e)} - ${Ae(t)}` : "Select month range", w = de(d), C = de(h), S = ae(d), v = ae(h), I = S && v && S > v, N = c ? le(
|
|
1026
1026
|
/* @__PURE__ */ s(
|
|
1027
1027
|
"div",
|
|
1028
1028
|
{
|
|
@@ -1058,8 +1058,8 @@ function zn({
|
|
|
1058
1058
|
{
|
|
1059
1059
|
type: "text",
|
|
1060
1060
|
className: `nc-month-input ${C ? "nc-error" : ""}`,
|
|
1061
|
-
value:
|
|
1062
|
-
onChange: (R) =>
|
|
1061
|
+
value: h,
|
|
1062
|
+
onChange: (R) => f(R.target.value),
|
|
1063
1063
|
placeholder: "YY-M(M) or YYYY-M(M)"
|
|
1064
1064
|
}
|
|
1065
1065
|
),
|
|
@@ -1069,15 +1069,15 @@ function zn({
|
|
|
1069
1069
|
I && !w && !C && /* @__PURE__ */ s("div", { className: "nc-month-range-error", children: "End month must be after or equal to start month" }),
|
|
1070
1070
|
/* @__PURE__ */ y("div", { className: "nc-month-range-picker-footer", children: [
|
|
1071
1071
|
/* @__PURE__ */ s(
|
|
1072
|
-
|
|
1072
|
+
j,
|
|
1073
1073
|
{
|
|
1074
1074
|
variant: "primary",
|
|
1075
1075
|
onClick: k,
|
|
1076
|
-
disabled: !d || !
|
|
1076
|
+
disabled: !d || !h || !!w || !!C || !!I,
|
|
1077
1077
|
children: "Apply"
|
|
1078
1078
|
}
|
|
1079
1079
|
),
|
|
1080
|
-
/* @__PURE__ */ s(
|
|
1080
|
+
/* @__PURE__ */ s(j, { variant: "ghost", onClick: x, children: "Cancel" })
|
|
1081
1081
|
] })
|
|
1082
1082
|
] })
|
|
1083
1083
|
}
|
|
@@ -1099,11 +1099,11 @@ function zn({
|
|
|
1099
1099
|
N
|
|
1100
1100
|
] });
|
|
1101
1101
|
}
|
|
1102
|
-
function
|
|
1103
|
-
const d =
|
|
1102
|
+
function $n({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disabled: c, size: a = "default" }) {
|
|
1103
|
+
const d = a === "small", p = () => {
|
|
1104
1104
|
const l = e - o;
|
|
1105
1105
|
n !== void 0 && l < n || t(parseFloat(l.toFixed(10)));
|
|
1106
|
-
},
|
|
1106
|
+
}, h = () => {
|
|
1107
1107
|
const l = e + o;
|
|
1108
1108
|
r !== void 0 && l > r || t(parseFloat(l.toFixed(10)));
|
|
1109
1109
|
};
|
|
@@ -1123,7 +1123,7 @@ function Pn({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
|
|
|
1123
1123
|
min: n,
|
|
1124
1124
|
max: r,
|
|
1125
1125
|
step: o,
|
|
1126
|
-
disabled:
|
|
1126
|
+
disabled: c
|
|
1127
1127
|
}
|
|
1128
1128
|
),
|
|
1129
1129
|
/* @__PURE__ */ s(
|
|
@@ -1131,7 +1131,7 @@ function Pn({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
|
|
|
1131
1131
|
{
|
|
1132
1132
|
className: `nc-button nc-ghost nc-number-input-button ${d ? "nc-small" : ""}`,
|
|
1133
1133
|
onClick: p,
|
|
1134
|
-
disabled:
|
|
1134
|
+
disabled: c || n !== void 0 && e <= n,
|
|
1135
1135
|
children: "−"
|
|
1136
1136
|
}
|
|
1137
1137
|
),
|
|
@@ -1139,30 +1139,30 @@ function Pn({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
|
|
|
1139
1139
|
"button",
|
|
1140
1140
|
{
|
|
1141
1141
|
className: `nc-button nc-ghost nc-number-input-button ${d ? "nc-small" : ""}`,
|
|
1142
|
-
onClick:
|
|
1143
|
-
disabled:
|
|
1142
|
+
onClick: h,
|
|
1143
|
+
disabled: c || r !== void 0 && e >= r,
|
|
1144
1144
|
children: "+"
|
|
1145
1145
|
}
|
|
1146
1146
|
)
|
|
1147
1147
|
] })
|
|
1148
1148
|
] });
|
|
1149
1149
|
}
|
|
1150
|
-
function
|
|
1150
|
+
function Rn({
|
|
1151
1151
|
value: e,
|
|
1152
1152
|
onChange: t,
|
|
1153
1153
|
min: n = 0,
|
|
1154
1154
|
max: r = 100,
|
|
1155
1155
|
step: o = 1,
|
|
1156
1156
|
label: i,
|
|
1157
|
-
disabled:
|
|
1158
|
-
showValue:
|
|
1159
|
-
formatValue: d = (
|
|
1157
|
+
disabled: c,
|
|
1158
|
+
showValue: a = !0,
|
|
1159
|
+
formatValue: d = (h) => h.toString(),
|
|
1160
1160
|
width: p = 200
|
|
1161
1161
|
}) {
|
|
1162
|
-
const
|
|
1162
|
+
const h = (l) => {
|
|
1163
1163
|
const u = parseFloat(l.target.value);
|
|
1164
1164
|
t(u);
|
|
1165
|
-
},
|
|
1165
|
+
}, f = (e - n) / (r - n) * 100;
|
|
1166
1166
|
return /* @__PURE__ */ y("div", { className: "nc-col", style: { gap: 6 }, children: [
|
|
1167
1167
|
i && /* @__PURE__ */ s("span", { className: "nc-label", children: i }),
|
|
1168
1168
|
/* @__PURE__ */ y("div", { style: { display: "flex", gap: 12, alignItems: "center" }, children: [
|
|
@@ -1172,18 +1172,18 @@ function Ln({
|
|
|
1172
1172
|
type: "range",
|
|
1173
1173
|
className: "nc-slider",
|
|
1174
1174
|
value: e,
|
|
1175
|
-
onChange:
|
|
1175
|
+
onChange: h,
|
|
1176
1176
|
min: n,
|
|
1177
1177
|
max: r,
|
|
1178
1178
|
step: o,
|
|
1179
|
-
disabled:
|
|
1179
|
+
disabled: c,
|
|
1180
1180
|
style: {
|
|
1181
1181
|
width: p,
|
|
1182
|
-
"--nc-slider-percentage": `${
|
|
1182
|
+
"--nc-slider-percentage": `${f}%`
|
|
1183
1183
|
}
|
|
1184
1184
|
}
|
|
1185
1185
|
),
|
|
1186
|
-
|
|
1186
|
+
a && /* @__PURE__ */ s(
|
|
1187
1187
|
"span",
|
|
1188
1188
|
{
|
|
1189
1189
|
style: {
|
|
@@ -1199,18 +1199,18 @@ function Ln({
|
|
|
1199
1199
|
] })
|
|
1200
1200
|
] });
|
|
1201
1201
|
}
|
|
1202
|
-
const
|
|
1203
|
-
function
|
|
1204
|
-
const d = H(null), [p,
|
|
1205
|
-
|
|
1202
|
+
const ft = ({ size: e = 24, className: t, style: n }) => /* @__PURE__ */ s("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", className: t, style: n, children: /* @__PURE__ */ s("polyline", { points: "18 15 12 9 6 15" }) });
|
|
1203
|
+
function En({ tabs: e, active: t, onChange: n, className: r, toolbar: o, multiline: i, orientation: c = "horizontal", style: a }) {
|
|
1204
|
+
const d = H(null), [p, h] = z(!1), [f, l] = z(!1), u = c === "verticalLeft" || c === "verticalRight", m = H(!1), g = H(0), b = H(0), x = H(!1);
|
|
1205
|
+
B(() => {
|
|
1206
1206
|
const v = () => {
|
|
1207
1207
|
if (d.current)
|
|
1208
1208
|
if (u) {
|
|
1209
1209
|
const { scrollTop: N, scrollHeight: R, clientHeight: D } = d.current;
|
|
1210
|
-
|
|
1210
|
+
h(N > 1), l(N < R - D - 1);
|
|
1211
1211
|
} else {
|
|
1212
1212
|
const { scrollLeft: N, scrollWidth: R, clientWidth: D } = d.current;
|
|
1213
|
-
|
|
1213
|
+
h(N > 1), l(N < R - D - 1);
|
|
1214
1214
|
}
|
|
1215
1215
|
}, I = d.current;
|
|
1216
1216
|
if (I)
|
|
@@ -1229,7 +1229,7 @@ function Tn({ tabs: e, active: t, onChange: n, className: r, toolbar: o, multili
|
|
|
1229
1229
|
}, C = () => {
|
|
1230
1230
|
w();
|
|
1231
1231
|
};
|
|
1232
|
-
|
|
1232
|
+
B(() => {
|
|
1233
1233
|
const v = d.current;
|
|
1234
1234
|
if (!v || u) return;
|
|
1235
1235
|
const I = (N) => {
|
|
@@ -1242,9 +1242,9 @@ function Tn({ tabs: e, active: t, onChange: n, className: r, toolbar: o, multili
|
|
|
1242
1242
|
const S = (v) => {
|
|
1243
1243
|
x.current || n(v);
|
|
1244
1244
|
};
|
|
1245
|
-
return /* @__PURE__ */ y("div", { className: `nc-tab-container ${u ? `nc-vertical nc-${
|
|
1245
|
+
return /* @__PURE__ */ y("div", { className: `nc-tab-container ${u ? `nc-vertical nc-${c}` : ""} ${r || ""}`, style: a, children: [
|
|
1246
1246
|
/* @__PURE__ */ y("div", { className: "nc-tab-scroll-wrapper", children: [
|
|
1247
|
-
p && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${u ? "nc-top" : "nc-left"}`, children: u ? /* @__PURE__ */ s(
|
|
1247
|
+
p && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${u ? "nc-top" : "nc-left"}`, children: u ? /* @__PURE__ */ s(ft, { size: 16 }) : /* @__PURE__ */ s(Ze, { size: 16 }) }),
|
|
1248
1248
|
/* @__PURE__ */ s(
|
|
1249
1249
|
"div",
|
|
1250
1250
|
{
|
|
@@ -1271,12 +1271,12 @@ function Tn({ tabs: e, active: t, onChange: n, className: r, toolbar: o, multili
|
|
|
1271
1271
|
))
|
|
1272
1272
|
}
|
|
1273
1273
|
),
|
|
1274
|
-
|
|
1274
|
+
f && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${u ? "nc-bottom" : "nc-right"}`, children: u ? /* @__PURE__ */ s(et, { size: 16 }) : /* @__PURE__ */ s(tt, { size: 16 }) })
|
|
1275
1275
|
] }),
|
|
1276
1276
|
o && /* @__PURE__ */ s("div", { className: "nc-tab-toolbar", children: o })
|
|
1277
1277
|
] });
|
|
1278
1278
|
}
|
|
1279
|
-
function
|
|
1279
|
+
function zn({ checked: e, onChange: t, disabled: n, label: r }) {
|
|
1280
1280
|
return /* @__PURE__ */ y(
|
|
1281
1281
|
"label",
|
|
1282
1282
|
{
|
|
@@ -1338,7 +1338,7 @@ function ge() {
|
|
|
1338
1338
|
} catch {
|
|
1339
1339
|
}
|
|
1340
1340
|
}
|
|
1341
|
-
function
|
|
1341
|
+
function ht(e) {
|
|
1342
1342
|
me.add(e);
|
|
1343
1343
|
try {
|
|
1344
1344
|
e(X.notifications.slice());
|
|
@@ -1348,7 +1348,7 @@ function gt(e) {
|
|
|
1348
1348
|
me.delete(e);
|
|
1349
1349
|
};
|
|
1350
1350
|
}
|
|
1351
|
-
function
|
|
1351
|
+
function mt(e) {
|
|
1352
1352
|
const t = `notification-${Date.now()}-${Math.random()}`, n = {
|
|
1353
1353
|
id: t,
|
|
1354
1354
|
dismissible: !0,
|
|
@@ -1356,10 +1356,10 @@ function bt(e) {
|
|
|
1356
1356
|
...e
|
|
1357
1357
|
};
|
|
1358
1358
|
return X.notifications = [n, ...X.notifications], ge(), n.lastingTime && n.lastingTime > 0 && setTimeout(() => {
|
|
1359
|
-
|
|
1359
|
+
Le(t);
|
|
1360
1360
|
}, n.lastingTime), t;
|
|
1361
1361
|
}
|
|
1362
|
-
function
|
|
1362
|
+
function Le(e) {
|
|
1363
1363
|
const t = X.notifications.find((r) => r.id === e);
|
|
1364
1364
|
if (!t) return;
|
|
1365
1365
|
t.isRemoving = !0, ge();
|
|
@@ -1368,7 +1368,7 @@ function Te(e) {
|
|
|
1368
1368
|
}, 300);
|
|
1369
1369
|
Ce.set(e, n);
|
|
1370
1370
|
}
|
|
1371
|
-
function
|
|
1371
|
+
function gt({ notification: e }) {
|
|
1372
1372
|
const { t } = J(), n = () => {
|
|
1373
1373
|
if (e.title) return e.title;
|
|
1374
1374
|
switch (e.type) {
|
|
@@ -1382,7 +1382,7 @@ function vt({ notification: e }) {
|
|
|
1382
1382
|
return t("common.info");
|
|
1383
1383
|
}
|
|
1384
1384
|
}, r = () => {
|
|
1385
|
-
|
|
1385
|
+
Le(e.id);
|
|
1386
1386
|
};
|
|
1387
1387
|
return /* @__PURE__ */ s(
|
|
1388
1388
|
"div",
|
|
@@ -1398,31 +1398,31 @@ function vt({ notification: e }) {
|
|
|
1398
1398
|
{
|
|
1399
1399
|
className: "nc-notification-dismiss",
|
|
1400
1400
|
onClick: r,
|
|
1401
|
-
children: /* @__PURE__ */ s(
|
|
1401
|
+
children: /* @__PURE__ */ s(Re, { size: 16 })
|
|
1402
1402
|
}
|
|
1403
1403
|
)
|
|
1404
1404
|
] })
|
|
1405
1405
|
}
|
|
1406
1406
|
);
|
|
1407
1407
|
}
|
|
1408
|
-
function
|
|
1409
|
-
const [e, t] = z([]), [n, r] = z(/* @__PURE__ */ new Map()), [o, i] = z(/* @__PURE__ */ new Set()),
|
|
1410
|
-
return
|
|
1411
|
-
const
|
|
1412
|
-
|
|
1408
|
+
function Pn() {
|
|
1409
|
+
const [e, t] = z([]), [n, r] = z(/* @__PURE__ */ new Map()), [o, i] = z(/* @__PURE__ */ new Set()), c = H(null), a = H([]);
|
|
1410
|
+
return B(() => ht((p) => {
|
|
1411
|
+
const h = new Set(a.current.map((l) => l.id)), f = p.filter((l) => !h.has(l.id)).map((l) => l.id);
|
|
1412
|
+
f.length > 0 ? (t(p), i(new Set(f)), requestAnimationFrame(() => {
|
|
1413
1413
|
requestAnimationFrame(() => {
|
|
1414
1414
|
i(/* @__PURE__ */ new Set());
|
|
1415
1415
|
});
|
|
1416
|
-
})) : t(p),
|
|
1417
|
-
}), []),
|
|
1418
|
-
if (!
|
|
1416
|
+
})) : t(p), a.current = p;
|
|
1417
|
+
}), []), B(() => {
|
|
1418
|
+
if (!c.current) return;
|
|
1419
1419
|
const d = /* @__PURE__ */ new Map();
|
|
1420
1420
|
let p = 0;
|
|
1421
|
-
const
|
|
1422
|
-
e.forEach((
|
|
1423
|
-
if (d.set(
|
|
1424
|
-
const u =
|
|
1425
|
-
|
|
1421
|
+
const h = c.current.children;
|
|
1422
|
+
e.forEach((f, l) => {
|
|
1423
|
+
if (d.set(f.id, p), h[l]) {
|
|
1424
|
+
const u = h[l].offsetHeight;
|
|
1425
|
+
f.isRemoving || (p += u + 12);
|
|
1426
1426
|
}
|
|
1427
1427
|
}), r(d);
|
|
1428
1428
|
}, [e]), /* @__PURE__ */ s(
|
|
@@ -1438,13 +1438,13 @@ function Dn() {
|
|
|
1438
1438
|
children: /* @__PURE__ */ s(
|
|
1439
1439
|
"div",
|
|
1440
1440
|
{
|
|
1441
|
-
ref:
|
|
1441
|
+
ref: c,
|
|
1442
1442
|
style: {
|
|
1443
1443
|
pointerEvents: "auto",
|
|
1444
1444
|
position: "relative"
|
|
1445
1445
|
},
|
|
1446
1446
|
children: e.map((d) => {
|
|
1447
|
-
const p = o.has(d.id),
|
|
1447
|
+
const p = o.has(d.id), h = d.isRemoving, f = n.get(d.id) || 0;
|
|
1448
1448
|
return /* @__PURE__ */ s(
|
|
1449
1449
|
"div",
|
|
1450
1450
|
{
|
|
@@ -1452,13 +1452,13 @@ function Dn() {
|
|
|
1452
1452
|
position: "absolute",
|
|
1453
1453
|
top: 0,
|
|
1454
1454
|
left: 0,
|
|
1455
|
-
transform: p ? "translateY(-120px)" : `translateY(${
|
|
1455
|
+
transform: p ? "translateY(-120px)" : `translateY(${f}px)`,
|
|
1456
1456
|
// Only animate transform when not leaving, animate opacity always
|
|
1457
|
-
transition:
|
|
1458
|
-
opacity:
|
|
1457
|
+
transition: h ? "opacity 300ms ease-out" : "transform 300ms ease-out, opacity 300ms ease-out",
|
|
1458
|
+
opacity: h ? 0 : 1,
|
|
1459
1459
|
width: "100%"
|
|
1460
1460
|
},
|
|
1461
|
-
children: /* @__PURE__ */ s(
|
|
1461
|
+
children: /* @__PURE__ */ s(gt, { notification: d })
|
|
1462
1462
|
},
|
|
1463
1463
|
d.id
|
|
1464
1464
|
);
|
|
@@ -1468,11 +1468,11 @@ function Dn() {
|
|
|
1468
1468
|
}
|
|
1469
1469
|
);
|
|
1470
1470
|
}
|
|
1471
|
-
const
|
|
1472
|
-
show: (e) =>
|
|
1471
|
+
const Ln = {
|
|
1472
|
+
show: (e) => mt(e)
|
|
1473
1473
|
};
|
|
1474
|
-
function
|
|
1475
|
-
const t =
|
|
1474
|
+
function Tn(e) {
|
|
1475
|
+
const t = nt.createInstance(), n = {};
|
|
1476
1476
|
for (const o in e)
|
|
1477
1477
|
n[o] = { translation: e[o] };
|
|
1478
1478
|
const r = typeof document < "u" && document.documentElement.lang || "en";
|
|
@@ -1485,16 +1485,16 @@ function Wn(e) {
|
|
|
1485
1485
|
// React already escapes by default
|
|
1486
1486
|
}
|
|
1487
1487
|
}), typeof MutationObserver < "u" && typeof document < "u" && new MutationObserver((i) => {
|
|
1488
|
-
for (const
|
|
1489
|
-
if (
|
|
1490
|
-
const
|
|
1491
|
-
t.changeLanguage(
|
|
1488
|
+
for (const c of i)
|
|
1489
|
+
if (c.type === "attributes" && c.attributeName === "lang") {
|
|
1490
|
+
const a = document.documentElement.lang || "en";
|
|
1491
|
+
t.changeLanguage(a);
|
|
1492
1492
|
}
|
|
1493
1493
|
}).observe(document.documentElement, { attributes: !0 }), t;
|
|
1494
1494
|
}
|
|
1495
|
-
class
|
|
1495
|
+
class bt {
|
|
1496
1496
|
constructor() {
|
|
1497
|
-
|
|
1497
|
+
K(this, "apps", /* @__PURE__ */ new Map());
|
|
1498
1498
|
}
|
|
1499
1499
|
/**
|
|
1500
1500
|
* Register an app definition.
|
|
@@ -1532,11 +1532,11 @@ class wt {
|
|
|
1532
1532
|
return this.apps.has(t);
|
|
1533
1533
|
}
|
|
1534
1534
|
}
|
|
1535
|
-
const te = new
|
|
1536
|
-
class
|
|
1535
|
+
const te = new bt(), Ie = "nc-ui-app-state";
|
|
1536
|
+
class vt {
|
|
1537
1537
|
constructor() {
|
|
1538
|
-
|
|
1539
|
-
|
|
1538
|
+
K(this, "state");
|
|
1539
|
+
K(this, "listeners", /* @__PURE__ */ new Map());
|
|
1540
1540
|
this.state = this.loadState();
|
|
1541
1541
|
}
|
|
1542
1542
|
loadState() {
|
|
@@ -1580,60 +1580,13 @@ class yt {
|
|
|
1580
1580
|
(r = this.listeners.get(t)) == null || r.forEach((o) => o(n));
|
|
1581
1581
|
}
|
|
1582
1582
|
}
|
|
1583
|
-
const
|
|
1584
|
-
class
|
|
1585
|
-
constructor() {
|
|
1586
|
-
V(this, "handlers", []);
|
|
1587
|
-
}
|
|
1588
|
-
/**
|
|
1589
|
-
* Register a back handler.
|
|
1590
|
-
* @param id - Unique identifier for this handler
|
|
1591
|
-
* @param priority - Higher priority handlers are called first
|
|
1592
|
-
* @param handler - Function that returns true if it handled the back action
|
|
1593
|
-
* @returns Unsubscribe function
|
|
1594
|
-
*/
|
|
1595
|
-
register(t, n, r) {
|
|
1596
|
-
return this.handlers = this.handlers.filter((o) => o.id !== t), this.handlers.push({ id: t, priority: n, handler: r }), this.handlers.sort((o, i) => i.priority - o.priority), () => {
|
|
1597
|
-
this.handlers = this.handlers.filter((o) => o.id !== t);
|
|
1598
|
-
};
|
|
1599
|
-
}
|
|
1600
|
-
/**
|
|
1601
|
-
* Trigger the back action.
|
|
1602
|
-
* Calls handlers in priority order until one returns true.
|
|
1603
|
-
* @returns true if a handler processed the back action
|
|
1604
|
-
*/
|
|
1605
|
-
handleBack() {
|
|
1606
|
-
for (const { handler: t } of this.handlers)
|
|
1607
|
-
if (t())
|
|
1608
|
-
return !0;
|
|
1609
|
-
return !1;
|
|
1610
|
-
}
|
|
1611
|
-
/**
|
|
1612
|
-
* Unregister a handler by id.
|
|
1613
|
-
*/
|
|
1614
|
-
unregister(t) {
|
|
1615
|
-
this.handlers = this.handlers.filter((n) => n.id !== t);
|
|
1616
|
-
}
|
|
1617
|
-
}
|
|
1618
|
-
const Be = new xt();
|
|
1619
|
-
function Me(e) {
|
|
1620
|
-
if (typeof window < "u" && window.history) {
|
|
1621
|
-
const t = new URL(window.location.href);
|
|
1622
|
-
t.searchParams.set("app", e), window.history.pushState({ app: e }, "", t.toString());
|
|
1623
|
-
}
|
|
1624
|
-
}
|
|
1625
|
-
function kt() {
|
|
1626
|
-
if (typeof window < "u" && window.history) {
|
|
1627
|
-
const e = new URL(window.location.href);
|
|
1628
|
-
e.searchParams.delete("app"), window.history.replaceState({}, "", e.toString());
|
|
1629
|
-
}
|
|
1630
|
-
}
|
|
1631
|
-
class Nt {
|
|
1583
|
+
const F = new vt();
|
|
1584
|
+
class wt {
|
|
1632
1585
|
constructor() {
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1586
|
+
K(this, "apps", []);
|
|
1587
|
+
K(this, "activeAppId", null);
|
|
1588
|
+
K(this, "listeners", /* @__PURE__ */ new Set());
|
|
1589
|
+
K(this, "refReadyResolvers", /* @__PURE__ */ new Map());
|
|
1637
1590
|
}
|
|
1638
1591
|
/**
|
|
1639
1592
|
* Launch an app and wait for it to be ready (ref populated).
|
|
@@ -1647,14 +1600,14 @@ class Nt {
|
|
|
1647
1600
|
const { launchInBackground: r = !1 } = n || {};
|
|
1648
1601
|
if (!te.has(t))
|
|
1649
1602
|
return console.error(`Cannot launch app "${t}": not registered`), null;
|
|
1650
|
-
const o = this.apps.find((
|
|
1603
|
+
const o = this.apps.find((c) => c.appId === t);
|
|
1651
1604
|
if (o)
|
|
1652
|
-
return r || (this.setActiveApp(t),
|
|
1605
|
+
return r || (this.setActiveApp(t), F._setActiveAppId(t)), o.ref ? o : this.waitForRef(t);
|
|
1653
1606
|
const i = {
|
|
1654
1607
|
appId: t,
|
|
1655
1608
|
launchedAt: Date.now()
|
|
1656
1609
|
};
|
|
1657
|
-
return this.apps.push(i), r || (this.activeAppId = t,
|
|
1610
|
+
return this.apps.push(i), r || (this.activeAppId = t, F._setActiveAppId(t)), this.notify(), this.waitForRef(t);
|
|
1658
1611
|
}
|
|
1659
1612
|
waitForRef(t) {
|
|
1660
1613
|
return new Promise((n) => {
|
|
@@ -1691,7 +1644,7 @@ class Nt {
|
|
|
1691
1644
|
const r = this.apps[n];
|
|
1692
1645
|
if (r.ref && (r.ref = void 0), this.apps.splice(n, 1), this.activeAppId === t) {
|
|
1693
1646
|
const o = window.innerWidth >= 768;
|
|
1694
|
-
this.activeAppId = o && this.apps.length > 0 ? this.apps[this.apps.length - 1].appId : null,
|
|
1647
|
+
this.activeAppId = o && this.apps.length > 0 ? this.apps[this.apps.length - 1].appId : null, F._setActiveAppId(this.activeAppId);
|
|
1695
1648
|
}
|
|
1696
1649
|
this.notify();
|
|
1697
1650
|
}
|
|
@@ -1703,7 +1656,7 @@ class Nt {
|
|
|
1703
1656
|
console.warn(`Cannot activate app "${t}": not running`);
|
|
1704
1657
|
return;
|
|
1705
1658
|
}
|
|
1706
|
-
this.activeAppId !== t && (this.activeAppId = t, this.notify(),
|
|
1659
|
+
this.activeAppId !== t && (this.activeAppId = t, this.notify(), F._setActiveAppId(t));
|
|
1707
1660
|
}
|
|
1708
1661
|
/**
|
|
1709
1662
|
* Toggle an app: if active, deactivate; if inactive, activate.
|
|
@@ -1747,14 +1700,14 @@ class Nt {
|
|
|
1747
1700
|
this.listeners.forEach((t) => t());
|
|
1748
1701
|
}
|
|
1749
1702
|
}
|
|
1750
|
-
const O = new
|
|
1751
|
-
function
|
|
1752
|
-
const e = q(
|
|
1703
|
+
const O = new wt(), Te = ne(null);
|
|
1704
|
+
function yt() {
|
|
1705
|
+
const e = q(Te);
|
|
1753
1706
|
if (!e)
|
|
1754
1707
|
throw new Error("useApp must be used inside an App");
|
|
1755
1708
|
return e;
|
|
1756
1709
|
}
|
|
1757
|
-
function
|
|
1710
|
+
function xt({ size: e = 16 }) {
|
|
1758
1711
|
return /* @__PURE__ */ y(
|
|
1759
1712
|
"svg",
|
|
1760
1713
|
{
|
|
@@ -1773,7 +1726,7 @@ function St({ size: e = 16 }) {
|
|
|
1773
1726
|
}
|
|
1774
1727
|
);
|
|
1775
1728
|
}
|
|
1776
|
-
function
|
|
1729
|
+
function kt({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o }) {
|
|
1777
1730
|
return /* @__PURE__ */ y("div", { className: "nc-app-title-bar", children: [
|
|
1778
1731
|
/* @__PURE__ */ y("div", { className: "nc-app-title-bar-left", children: [
|
|
1779
1732
|
n && !o && /* @__PURE__ */ s(
|
|
@@ -1783,18 +1736,18 @@ function Ct({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o })
|
|
|
1783
1736
|
onClick: n,
|
|
1784
1737
|
title: "Back",
|
|
1785
1738
|
"aria-label": "Go back",
|
|
1786
|
-
children: /* @__PURE__ */ s(
|
|
1739
|
+
children: /* @__PURE__ */ s(xt, { size: 16 })
|
|
1787
1740
|
}
|
|
1788
1741
|
),
|
|
1789
1742
|
/* @__PURE__ */ s("span", { className: "nc-app-title-bar-title", children: e })
|
|
1790
1743
|
] }),
|
|
1791
1744
|
/* @__PURE__ */ y("div", { className: "nc-app-title-bar-right", children: [
|
|
1792
1745
|
r && /* @__PURE__ */ s("div", { className: "nc-app-title-bar-toolbar", children: r }),
|
|
1793
|
-
/* @__PURE__ */ s(
|
|
1746
|
+
/* @__PURE__ */ s(ze, { onClick: t, "aria-label": "Close application" })
|
|
1794
1747
|
] })
|
|
1795
1748
|
] });
|
|
1796
1749
|
}
|
|
1797
|
-
class
|
|
1750
|
+
class Nt extends ve.Component {
|
|
1798
1751
|
constructor(t) {
|
|
1799
1752
|
super(t), this.state = { hasError: !1 };
|
|
1800
1753
|
}
|
|
@@ -1827,24 +1780,21 @@ class It extends ve.Component {
|
|
|
1827
1780
|
) : this.props.children;
|
|
1828
1781
|
}
|
|
1829
1782
|
}
|
|
1830
|
-
function
|
|
1831
|
-
const { t: r } = J(), o = te.get(e), [i,
|
|
1783
|
+
function Be({ appId: e, isActive: t, onClose: n }) {
|
|
1784
|
+
const { t: r } = J(), o = te.get(e), [i, c] = z(""), [a, d] = z(null), [p, h] = z(null), [f, l] = z(!1), [u, m] = z(!1);
|
|
1832
1785
|
ve.useEffect(() => {
|
|
1833
|
-
o != null && o.titleKey &&
|
|
1834
|
-
}, [o, r])
|
|
1835
|
-
if (t)
|
|
1836
|
-
return Be.register(`app-${e}`, 50, () => c ? (c(), !0) : (n(), !0));
|
|
1837
|
-
}, [t, c, n, e]);
|
|
1786
|
+
o != null && o.titleKey && c(r(o.titleKey));
|
|
1787
|
+
}, [o, r]);
|
|
1838
1788
|
const g = W((N) => {
|
|
1839
|
-
|
|
1789
|
+
c(N);
|
|
1840
1790
|
}, []), b = W((N) => {
|
|
1841
1791
|
d(() => N);
|
|
1842
1792
|
}, []), x = W(() => {
|
|
1843
1793
|
d(null);
|
|
1844
1794
|
}, []), k = W((N) => {
|
|
1845
|
-
|
|
1795
|
+
h(N);
|
|
1846
1796
|
}, []), $ = W(() => {
|
|
1847
|
-
|
|
1797
|
+
h(null);
|
|
1848
1798
|
}, []), w = W((N) => {
|
|
1849
1799
|
l(N);
|
|
1850
1800
|
}, []), C = W((N) => {
|
|
@@ -1873,13 +1823,13 @@ function He({ appId: e, isActive: t, onClose: n }) {
|
|
|
1873
1823
|
},
|
|
1874
1824
|
children: [
|
|
1875
1825
|
I && /* @__PURE__ */ s(
|
|
1876
|
-
|
|
1826
|
+
kt,
|
|
1877
1827
|
{
|
|
1878
1828
|
title: i,
|
|
1879
1829
|
onClose: n,
|
|
1880
|
-
onBack:
|
|
1830
|
+
onBack: a ?? void 0,
|
|
1881
1831
|
toolbar: p,
|
|
1882
|
-
hideBackButton:
|
|
1832
|
+
hideBackButton: f
|
|
1883
1833
|
}
|
|
1884
1834
|
),
|
|
1885
1835
|
/* @__PURE__ */ s(
|
|
@@ -1895,8 +1845,8 @@ function He({ appId: e, isActive: t, onClose: n }) {
|
|
|
1895
1845
|
backgroundColor: "var(--nc-bg-secondary)",
|
|
1896
1846
|
position: "relative"
|
|
1897
1847
|
},
|
|
1898
|
-
children: /* @__PURE__ */ s(
|
|
1899
|
-
|
|
1848
|
+
children: /* @__PURE__ */ s(Te.Provider, { value: S, children: /* @__PURE__ */ s(Nt, { appId: e, children: /* @__PURE__ */ s(
|
|
1849
|
+
_e,
|
|
1900
1850
|
{
|
|
1901
1851
|
fallback: /* @__PURE__ */ s(
|
|
1902
1852
|
"div",
|
|
@@ -1907,7 +1857,7 @@ function He({ appId: e, isActive: t, onClose: n }) {
|
|
|
1907
1857
|
justifyContent: "center",
|
|
1908
1858
|
flex: 1
|
|
1909
1859
|
},
|
|
1910
|
-
children: /* @__PURE__ */ s(
|
|
1860
|
+
children: /* @__PURE__ */ s(Ee, {})
|
|
1911
1861
|
}
|
|
1912
1862
|
),
|
|
1913
1863
|
children: /* @__PURE__ */ s(v, {})
|
|
@@ -1919,53 +1869,53 @@ function He({ appId: e, isActive: t, onClose: n }) {
|
|
|
1919
1869
|
}
|
|
1920
1870
|
);
|
|
1921
1871
|
}
|
|
1922
|
-
function
|
|
1923
|
-
const [r, o] = z(() =>
|
|
1924
|
-
|
|
1925
|
-
const m =
|
|
1872
|
+
function Bn({ autoWidth: e = !0, className: t, style: n }) {
|
|
1873
|
+
const [r, o] = z(() => F.getActiveAppId()), [i, c] = z(() => O.getRunningApps());
|
|
1874
|
+
B(() => {
|
|
1875
|
+
const m = F.subscribe("activeAppId", (g) => {
|
|
1926
1876
|
o(g);
|
|
1927
1877
|
});
|
|
1928
1878
|
return () => {
|
|
1929
1879
|
m();
|
|
1930
1880
|
};
|
|
1931
|
-
}, []),
|
|
1932
|
-
|
|
1933
|
-
}), []),
|
|
1881
|
+
}, []), B(() => O.subscribe(() => {
|
|
1882
|
+
c(O.getRunningApps());
|
|
1883
|
+
}), []), B(() => {
|
|
1934
1884
|
if (!new URLSearchParams(window.location.search).has("app")) {
|
|
1935
|
-
const b =
|
|
1885
|
+
const b = F.getActiveAppId();
|
|
1936
1886
|
b && !O.isRunning(b) && O.launchApp(b);
|
|
1937
1887
|
}
|
|
1938
1888
|
}, []);
|
|
1939
|
-
const
|
|
1889
|
+
const a = (m) => {
|
|
1940
1890
|
O.closeApp(m);
|
|
1941
|
-
}, d = r ? te.get(r) : null,
|
|
1891
|
+
}, d = r ? te.get(r) : null, h = (d == null ? void 0 : d.width) ?? 400, f = r !== null, u = { ...{
|
|
1942
1892
|
overflow: "hidden",
|
|
1943
|
-
display:
|
|
1893
|
+
display: f ? "flex" : "none",
|
|
1944
1894
|
flexDirection: "column",
|
|
1945
1895
|
flexShrink: 0,
|
|
1946
1896
|
// Only set width if autoWidth is enabled
|
|
1947
|
-
...e &&
|
|
1897
|
+
...e && f ? { width: h } : {}
|
|
1948
1898
|
}, ...n };
|
|
1949
1899
|
return /* @__PURE__ */ s("div", { className: t, style: u, children: i.map((m) => /* @__PURE__ */ s(
|
|
1950
|
-
|
|
1900
|
+
Be,
|
|
1951
1901
|
{
|
|
1952
1902
|
appId: m.appId,
|
|
1953
1903
|
isActive: r === m.appId,
|
|
1954
|
-
onClose: () =>
|
|
1904
|
+
onClose: () => a(m.appId)
|
|
1955
1905
|
},
|
|
1956
1906
|
m.appId
|
|
1957
1907
|
)) });
|
|
1958
1908
|
}
|
|
1959
|
-
const ue = 768, pe = 1024,
|
|
1909
|
+
const ue = 768, pe = 1024, De = {
|
|
1960
1910
|
isMobile: !1,
|
|
1961
1911
|
isTablet: !1,
|
|
1962
1912
|
isDesktop: !0,
|
|
1963
1913
|
width: typeof window < "u" ? window.innerWidth : 1024,
|
|
1964
1914
|
height: typeof window < "u" ? window.innerHeight : 768
|
|
1965
|
-
},
|
|
1966
|
-
function
|
|
1915
|
+
}, He = ne(De);
|
|
1916
|
+
function Dn({ children: e }) {
|
|
1967
1917
|
const [t, n] = z(() => {
|
|
1968
|
-
if (typeof window > "u") return
|
|
1918
|
+
if (typeof window > "u") return De;
|
|
1969
1919
|
const r = window.innerWidth, o = window.innerHeight;
|
|
1970
1920
|
return {
|
|
1971
1921
|
isMobile: r < ue,
|
|
@@ -1975,7 +1925,7 @@ function Yn({ children: e }) {
|
|
|
1975
1925
|
height: o
|
|
1976
1926
|
};
|
|
1977
1927
|
});
|
|
1978
|
-
return
|
|
1928
|
+
return B(() => {
|
|
1979
1929
|
const r = () => {
|
|
1980
1930
|
const o = window.innerWidth, i = window.innerHeight;
|
|
1981
1931
|
n({
|
|
@@ -1987,37 +1937,37 @@ function Yn({ children: e }) {
|
|
|
1987
1937
|
});
|
|
1988
1938
|
};
|
|
1989
1939
|
return window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
|
|
1990
|
-
}, []), /* @__PURE__ */ s(
|
|
1940
|
+
}, []), /* @__PURE__ */ s(He.Provider, { value: t, children: e });
|
|
1991
1941
|
}
|
|
1992
|
-
function
|
|
1993
|
-
return q(
|
|
1942
|
+
function At() {
|
|
1943
|
+
return q(He);
|
|
1994
1944
|
}
|
|
1995
|
-
function
|
|
1996
|
-
const { isMobile: n } =
|
|
1997
|
-
|
|
1998
|
-
const l =
|
|
1945
|
+
function Hn({ pinnedAppIds: e, className: t = "" }) {
|
|
1946
|
+
const { isMobile: n } = At(), [r, o] = z(() => F.getActiveAppId()), [i, c] = z(() => O.getRunningApps());
|
|
1947
|
+
B(() => {
|
|
1948
|
+
const l = F.subscribe("activeAppId", (u) => {
|
|
1999
1949
|
o(u);
|
|
2000
1950
|
});
|
|
2001
1951
|
return () => {
|
|
2002
1952
|
l();
|
|
2003
1953
|
};
|
|
2004
|
-
}, []),
|
|
2005
|
-
|
|
1954
|
+
}, []), B(() => O.subscribe(() => {
|
|
1955
|
+
c(O.getRunningApps());
|
|
2006
1956
|
}), []);
|
|
2007
|
-
const
|
|
1957
|
+
const a = (l) => {
|
|
2008
1958
|
r === l ? O.setActiveApp(null) : O.launchApp(l);
|
|
2009
|
-
}, d = e.map((l) => te.get(l)).filter((l) => !!l), p = i.filter((l) => !e.includes(l.appId)).map((l) => ({ running: l, def: te.get(l.appId) })).filter((l) => !!l.def),
|
|
1959
|
+
}, d = e.map((l) => te.get(l)).filter((l) => !!l), p = i.filter((l) => !e.includes(l.appId)).map((l) => ({ running: l, def: te.get(l.appId) })).filter((l) => !!l.def), h = (l) => i.some((u) => u.appId === l), f = n ? 24 : 28;
|
|
2010
1960
|
return /* @__PURE__ */ y("div", { className: `nc-app-taskbar ${n ? "nc-mobile" : "nc-desktop"} ${t}`, children: [
|
|
2011
1961
|
d.map((l) => {
|
|
2012
|
-
const u = l.icon, m = r === l.id, g =
|
|
1962
|
+
const u = l.icon, m = r === l.id, g = h(l.id);
|
|
2013
1963
|
return /* @__PURE__ */ y(
|
|
2014
1964
|
"button",
|
|
2015
1965
|
{
|
|
2016
1966
|
className: `nc-app-taskbar-button ${m ? "nc-active" : ""} ${g ? "nc-running" : ""}`,
|
|
2017
|
-
onClick: () =>
|
|
1967
|
+
onClick: () => a(l.id),
|
|
2018
1968
|
title: l.titleKey || l.id,
|
|
2019
1969
|
children: [
|
|
2020
|
-
/* @__PURE__ */ s(u, { size:
|
|
1970
|
+
/* @__PURE__ */ s(u, { size: f }),
|
|
2021
1971
|
g && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
|
|
2022
1972
|
]
|
|
2023
1973
|
},
|
|
@@ -2031,10 +1981,10 @@ function Gn({ pinnedAppIds: e, className: t = "" }) {
|
|
|
2031
1981
|
"button",
|
|
2032
1982
|
{
|
|
2033
1983
|
className: `nc-app-taskbar-button ${g ? "nc-active" : ""} nc-running`,
|
|
2034
|
-
onClick: () =>
|
|
1984
|
+
onClick: () => a(l.appId),
|
|
2035
1985
|
title: u.titleKey || u.id,
|
|
2036
1986
|
children: [
|
|
2037
|
-
/* @__PURE__ */ s(m, { size:
|
|
1987
|
+
/* @__PURE__ */ s(m, { size: f }),
|
|
2038
1988
|
/* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
|
|
2039
1989
|
]
|
|
2040
1990
|
},
|
|
@@ -2043,39 +1993,35 @@ function Gn({ pinnedAppIds: e, className: t = "" }) {
|
|
|
2043
1993
|
})
|
|
2044
1994
|
] });
|
|
2045
1995
|
}
|
|
2046
|
-
function
|
|
1996
|
+
function Wn({
|
|
2047
1997
|
appId: e,
|
|
2048
1998
|
open: t,
|
|
2049
1999
|
onClose: n,
|
|
2050
2000
|
closeOnBackdrop: r = !1,
|
|
2051
2001
|
className: o = "",
|
|
2052
2002
|
maxWidth: i = 1200,
|
|
2053
|
-
maxHeight:
|
|
2003
|
+
maxHeight: c = 900
|
|
2054
2004
|
}) {
|
|
2055
|
-
const
|
|
2005
|
+
const a = (p) => {
|
|
2056
2006
|
r && p.target === p.currentTarget && n();
|
|
2057
2007
|
};
|
|
2058
|
-
if (
|
|
2059
|
-
if (!t) return;
|
|
2060
|
-
const p = `app-dialog-${e}-${Date.now()}`;
|
|
2061
|
-
return Be.register(p, 100, () => (n(), !0));
|
|
2062
|
-
}, [t, n, e]), !t) return null;
|
|
2008
|
+
if (!t) return null;
|
|
2063
2009
|
const d = /* @__PURE__ */ s(
|
|
2064
2010
|
"div",
|
|
2065
2011
|
{
|
|
2066
2012
|
className: "nc-dialog-overlay nc-fullscreen",
|
|
2067
|
-
onClick:
|
|
2013
|
+
onClick: a,
|
|
2068
2014
|
children: /* @__PURE__ */ s(
|
|
2069
2015
|
"div",
|
|
2070
2016
|
{
|
|
2071
2017
|
className: `nc-app-dialog-container ${o}`,
|
|
2072
2018
|
style: {
|
|
2073
2019
|
maxWidth: `${i}px`,
|
|
2074
|
-
maxHeight: `${
|
|
2020
|
+
maxHeight: `${c}px`
|
|
2075
2021
|
},
|
|
2076
2022
|
onClick: (p) => p.stopPropagation(),
|
|
2077
2023
|
children: /* @__PURE__ */ s(
|
|
2078
|
-
|
|
2024
|
+
Be,
|
|
2079
2025
|
{
|
|
2080
2026
|
appId: e,
|
|
2081
2027
|
isActive: !0,
|
|
@@ -2088,84 +2034,84 @@ function Vn({
|
|
|
2088
2034
|
);
|
|
2089
2035
|
return le(d, document.body);
|
|
2090
2036
|
}
|
|
2091
|
-
const ye = ne(null),
|
|
2092
|
-
function
|
|
2037
|
+
const ye = ne(null), We = ne(null);
|
|
2038
|
+
function On() {
|
|
2093
2039
|
const e = q(ye);
|
|
2094
2040
|
if (!e)
|
|
2095
2041
|
throw new Error("useNavStack must be used within a NavStackProvider");
|
|
2096
2042
|
return e;
|
|
2097
2043
|
}
|
|
2098
|
-
function
|
|
2099
|
-
const e = q(
|
|
2044
|
+
function Yn() {
|
|
2045
|
+
const e = q(We);
|
|
2100
2046
|
if (!e)
|
|
2101
2047
|
throw new Error("useNavView must be used within NavStack");
|
|
2102
2048
|
return e;
|
|
2103
2049
|
}
|
|
2104
2050
|
const xe = ne(null);
|
|
2105
|
-
function
|
|
2106
|
-
const { t: n } = J(), r =
|
|
2107
|
-
|
|
2051
|
+
function Gn({ rootView: e, children: t }) {
|
|
2052
|
+
const { t: n } = J(), r = yt(), [o, i] = z([e]), [c, a] = z([null]), d = W((w, C) => {
|
|
2053
|
+
a((S) => {
|
|
2108
2054
|
const v = [...S];
|
|
2109
2055
|
return v[w] = C, v;
|
|
2110
2056
|
});
|
|
2111
2057
|
}, []), p = W((w) => {
|
|
2112
|
-
|
|
2058
|
+
a((C) => {
|
|
2113
2059
|
const S = [...C];
|
|
2114
2060
|
return S[w] = null, S;
|
|
2115
2061
|
});
|
|
2116
|
-
}, []),
|
|
2117
|
-
i((C) => [...C, w]),
|
|
2118
|
-
}, []),
|
|
2119
|
-
i((w) => w.length <= 1 ? w : w.slice(0, -1)),
|
|
2062
|
+
}, []), h = W((w) => {
|
|
2063
|
+
i((C) => [...C, w]), a((C) => [...C, null]);
|
|
2064
|
+
}, []), f = W(() => {
|
|
2065
|
+
i((w) => w.length <= 1 ? w : w.slice(0, -1)), a((w) => w.slice(0, -1));
|
|
2120
2066
|
}, []), l = W(() => {
|
|
2121
|
-
i([e]),
|
|
2067
|
+
i([e]), a([null]);
|
|
2122
2068
|
}, [e]), u = o.length, m = u > 1, g = o.length - 1, b = o[o.length - 1], x = b != null && b.titleKey ? n(b.titleKey) : (b == null ? void 0 : b.title) ?? "";
|
|
2123
|
-
|
|
2069
|
+
B(() => {
|
|
2124
2070
|
r.setTitle(x);
|
|
2125
|
-
}, [x, r]),
|
|
2126
|
-
m ? r.setBackHandler(
|
|
2127
|
-
}, [m,
|
|
2128
|
-
const w =
|
|
2071
|
+
}, [x, r]), B(() => {
|
|
2072
|
+
m ? r.setBackHandler(f) : r.clearBackHandler();
|
|
2073
|
+
}, [m, f, r]), B(() => {
|
|
2074
|
+
const w = c[c.length - 1];
|
|
2129
2075
|
w ? r.setToolbar(w) : r.clearToolbar();
|
|
2130
|
-
}, [
|
|
2076
|
+
}, [c, r]);
|
|
2131
2077
|
const k = {
|
|
2132
|
-
push:
|
|
2133
|
-
pop:
|
|
2078
|
+
push: h,
|
|
2079
|
+
pop: f,
|
|
2134
2080
|
reset: l,
|
|
2135
2081
|
depth: u,
|
|
2136
2082
|
canGoBack: m,
|
|
2137
2083
|
currentTitle: x
|
|
2138
2084
|
}, $ = {
|
|
2139
2085
|
stack: o,
|
|
2140
|
-
toolbarStack:
|
|
2086
|
+
toolbarStack: c,
|
|
2141
2087
|
updateToolbar: d,
|
|
2142
2088
|
clearToolbarAt: p,
|
|
2143
2089
|
topIndex: g
|
|
2144
2090
|
};
|
|
2145
2091
|
return /* @__PURE__ */ s(ye.Provider, { value: k, children: /* @__PURE__ */ s(xe.Provider, { value: $, children: t }) });
|
|
2146
2092
|
}
|
|
2147
|
-
function
|
|
2093
|
+
function St({ index: e, children: t }) {
|
|
2148
2094
|
const n = q(xe);
|
|
2149
2095
|
if (!n)
|
|
2150
2096
|
throw new Error("NavViewProvider must be used within NavStackProvider");
|
|
2151
|
-
const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n,
|
|
2097
|
+
const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n, c = W((p) => {
|
|
2152
2098
|
e === i && r(e, p);
|
|
2153
|
-
}, [e, i, r]),
|
|
2099
|
+
}, [e, i, r]), a = W(() => {
|
|
2154
2100
|
e === i && o(e);
|
|
2155
2101
|
}, [e, i, o]), d = {
|
|
2156
|
-
setToolbar:
|
|
2157
|
-
clearToolbar:
|
|
2102
|
+
setToolbar: c,
|
|
2103
|
+
clearToolbar: a
|
|
2158
2104
|
};
|
|
2159
|
-
return /* @__PURE__ */ s(
|
|
2105
|
+
return /* @__PURE__ */ s(We.Provider, { value: d, children: t });
|
|
2160
2106
|
}
|
|
2161
|
-
function
|
|
2107
|
+
function Vn() {
|
|
2162
2108
|
const e = q(ye), t = q(xe);
|
|
2163
2109
|
if (!e || !t)
|
|
2164
2110
|
throw new Error("NavStackContainer must be used within a NavStackProvider");
|
|
2165
2111
|
const { stack: n } = t;
|
|
2166
2112
|
return /* @__PURE__ */ s("div", { className: "nav-stack-container", children: /* @__PURE__ */ s("div", { className: "nav-stack-content", children: n.map((r, o) => {
|
|
2167
2113
|
const i = o === n.length - 1;
|
|
2168
|
-
return /* @__PURE__ */ s(
|
|
2114
|
+
return /* @__PURE__ */ s(St, { index: o, children: /* @__PURE__ */ s(
|
|
2169
2115
|
"div",
|
|
2170
2116
|
{
|
|
2171
2117
|
style: { display: i ? "flex" : "none", flexDirection: "column", height: "100%" },
|
|
@@ -2174,41 +2120,41 @@ function Un() {
|
|
|
2174
2120
|
) }, r.id);
|
|
2175
2121
|
}) }) });
|
|
2176
2122
|
}
|
|
2177
|
-
const ke = "-",
|
|
2178
|
-
const t =
|
|
2123
|
+
const ke = "-", Ct = (e) => {
|
|
2124
|
+
const t = Mt(e), {
|
|
2179
2125
|
conflictingClassGroups: n,
|
|
2180
2126
|
conflictingClassGroupModifiers: r
|
|
2181
2127
|
} = e;
|
|
2182
2128
|
return {
|
|
2183
|
-
getClassGroupId: (
|
|
2184
|
-
const
|
|
2185
|
-
return
|
|
2129
|
+
getClassGroupId: (c) => {
|
|
2130
|
+
const a = c.split(ke);
|
|
2131
|
+
return a[0] === "" && a.length !== 1 && a.shift(), Oe(a, t) || It(c);
|
|
2186
2132
|
},
|
|
2187
|
-
getConflictingClassGroupIds: (
|
|
2188
|
-
const d = n[
|
|
2189
|
-
return
|
|
2133
|
+
getConflictingClassGroupIds: (c, a) => {
|
|
2134
|
+
const d = n[c] || [];
|
|
2135
|
+
return a && r[c] ? [...d, ...r[c]] : d;
|
|
2190
2136
|
}
|
|
2191
2137
|
};
|
|
2192
|
-
},
|
|
2193
|
-
var
|
|
2138
|
+
}, Oe = (e, t) => {
|
|
2139
|
+
var c;
|
|
2194
2140
|
if (e.length === 0)
|
|
2195
2141
|
return t.classGroupId;
|
|
2196
|
-
const n = e[0], r = t.nextPart.get(n), o = r ?
|
|
2142
|
+
const n = e[0], r = t.nextPart.get(n), o = r ? Oe(e.slice(1), r) : void 0;
|
|
2197
2143
|
if (o)
|
|
2198
2144
|
return o;
|
|
2199
2145
|
if (t.validators.length === 0)
|
|
2200
2146
|
return;
|
|
2201
2147
|
const i = e.join(ke);
|
|
2202
|
-
return (
|
|
2203
|
-
validator:
|
|
2204
|
-
}) =>
|
|
2205
|
-
},
|
|
2206
|
-
if (
|
|
2207
|
-
const t =
|
|
2148
|
+
return (c = t.validators.find(({
|
|
2149
|
+
validator: a
|
|
2150
|
+
}) => a(i))) == null ? void 0 : c.classGroupId;
|
|
2151
|
+
}, Me = /^\[(.+)\]$/, It = (e) => {
|
|
2152
|
+
if (Me.test(e)) {
|
|
2153
|
+
const t = Me.exec(e)[1], n = t == null ? void 0 : t.substring(0, t.indexOf(":"));
|
|
2208
2154
|
if (n)
|
|
2209
2155
|
return "arbitrary.." + n;
|
|
2210
2156
|
}
|
|
2211
|
-
},
|
|
2157
|
+
}, Mt = (e) => {
|
|
2212
2158
|
const {
|
|
2213
2159
|
theme: t,
|
|
2214
2160
|
prefix: n
|
|
@@ -2216,18 +2162,18 @@ const ke = "-", Rt = (e) => {
|
|
|
2216
2162
|
nextPart: /* @__PURE__ */ new Map(),
|
|
2217
2163
|
validators: []
|
|
2218
2164
|
};
|
|
2219
|
-
return
|
|
2220
|
-
be(
|
|
2165
|
+
return Rt(Object.entries(e.classGroups), n).forEach(([i, c]) => {
|
|
2166
|
+
be(c, r, i, t);
|
|
2221
2167
|
}), r;
|
|
2222
2168
|
}, be = (e, t, n, r) => {
|
|
2223
2169
|
e.forEach((o) => {
|
|
2224
2170
|
if (typeof o == "string") {
|
|
2225
|
-
const i = o === "" ? t :
|
|
2171
|
+
const i = o === "" ? t : $e(t, o);
|
|
2226
2172
|
i.classGroupId = n;
|
|
2227
2173
|
return;
|
|
2228
2174
|
}
|
|
2229
2175
|
if (typeof o == "function") {
|
|
2230
|
-
if (
|
|
2176
|
+
if ($t(o)) {
|
|
2231
2177
|
be(o(r), t, n, r);
|
|
2232
2178
|
return;
|
|
2233
2179
|
}
|
|
@@ -2237,11 +2183,11 @@ const ke = "-", Rt = (e) => {
|
|
|
2237
2183
|
});
|
|
2238
2184
|
return;
|
|
2239
2185
|
}
|
|
2240
|
-
Object.entries(o).forEach(([i,
|
|
2241
|
-
be(
|
|
2186
|
+
Object.entries(o).forEach(([i, c]) => {
|
|
2187
|
+
be(c, $e(t, i), n, r);
|
|
2242
2188
|
});
|
|
2243
2189
|
});
|
|
2244
|
-
},
|
|
2190
|
+
}, $e = (e, t) => {
|
|
2245
2191
|
let n = e;
|
|
2246
2192
|
return t.split(ke).forEach((r) => {
|
|
2247
2193
|
n.nextPart.has(r) || n.nextPart.set(r, {
|
|
@@ -2249,10 +2195,10 @@ const ke = "-", Rt = (e) => {
|
|
|
2249
2195
|
validators: []
|
|
2250
2196
|
}), n = n.nextPart.get(r);
|
|
2251
2197
|
}), n;
|
|
2252
|
-
},
|
|
2253
|
-
const o = r.map((i) => typeof i == "string" ? t + i : typeof i == "object" ? Object.fromEntries(Object.entries(i).map(([
|
|
2198
|
+
}, $t = (e) => e.isThemeGetter, Rt = (e, t) => t ? e.map(([n, r]) => {
|
|
2199
|
+
const o = r.map((i) => typeof i == "string" ? t + i : typeof i == "object" ? Object.fromEntries(Object.entries(i).map(([c, a]) => [t + c, a])) : i);
|
|
2254
2200
|
return [n, o];
|
|
2255
|
-
}) : e,
|
|
2201
|
+
}) : e, Et = (e) => {
|
|
2256
2202
|
if (e < 1)
|
|
2257
2203
|
return {
|
|
2258
2204
|
get: () => {
|
|
@@ -2261,43 +2207,43 @@ const ke = "-", Rt = (e) => {
|
|
|
2261
2207
|
}
|
|
2262
2208
|
};
|
|
2263
2209
|
let t = 0, n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
2264
|
-
const o = (i,
|
|
2265
|
-
n.set(i,
|
|
2210
|
+
const o = (i, c) => {
|
|
2211
|
+
n.set(i, c), t++, t > e && (t = 0, r = n, n = /* @__PURE__ */ new Map());
|
|
2266
2212
|
};
|
|
2267
2213
|
return {
|
|
2268
2214
|
get(i) {
|
|
2269
|
-
let
|
|
2270
|
-
if (
|
|
2271
|
-
return
|
|
2272
|
-
if ((
|
|
2273
|
-
return o(i,
|
|
2215
|
+
let c = n.get(i);
|
|
2216
|
+
if (c !== void 0)
|
|
2217
|
+
return c;
|
|
2218
|
+
if ((c = r.get(i)) !== void 0)
|
|
2219
|
+
return o(i, c), c;
|
|
2274
2220
|
},
|
|
2275
|
-
set(i,
|
|
2276
|
-
n.has(i) ? n.set(i,
|
|
2221
|
+
set(i, c) {
|
|
2222
|
+
n.has(i) ? n.set(i, c) : o(i, c);
|
|
2277
2223
|
}
|
|
2278
2224
|
};
|
|
2279
|
-
},
|
|
2225
|
+
}, Ye = "!", zt = (e) => {
|
|
2280
2226
|
const {
|
|
2281
2227
|
separator: t,
|
|
2282
2228
|
experimentalParseClassName: n
|
|
2283
|
-
} = e, r = t.length === 1, o = t[0], i = t.length,
|
|
2229
|
+
} = e, r = t.length === 1, o = t[0], i = t.length, c = (a) => {
|
|
2284
2230
|
const d = [];
|
|
2285
|
-
let p = 0,
|
|
2286
|
-
for (let b = 0; b <
|
|
2287
|
-
let x =
|
|
2231
|
+
let p = 0, h = 0, f;
|
|
2232
|
+
for (let b = 0; b < a.length; b++) {
|
|
2233
|
+
let x = a[b];
|
|
2288
2234
|
if (p === 0) {
|
|
2289
|
-
if (x === o && (r ||
|
|
2290
|
-
d.push(
|
|
2235
|
+
if (x === o && (r || a.slice(b, b + i) === t)) {
|
|
2236
|
+
d.push(a.slice(h, b)), h = b + i;
|
|
2291
2237
|
continue;
|
|
2292
2238
|
}
|
|
2293
2239
|
if (x === "/") {
|
|
2294
|
-
|
|
2240
|
+
f = b;
|
|
2295
2241
|
continue;
|
|
2296
2242
|
}
|
|
2297
2243
|
}
|
|
2298
2244
|
x === "[" ? p++ : x === "]" && p--;
|
|
2299
2245
|
}
|
|
2300
|
-
const l = d.length === 0 ?
|
|
2246
|
+
const l = d.length === 0 ? a : a.substring(h), u = l.startsWith(Ye), m = u ? l.substring(1) : l, g = f && f > h ? f - h : void 0;
|
|
2301
2247
|
return {
|
|
2302
2248
|
modifiers: d,
|
|
2303
2249
|
hasImportantModifier: u,
|
|
@@ -2305,11 +2251,11 @@ const ke = "-", Rt = (e) => {
|
|
|
2305
2251
|
maybePostfixModifierPosition: g
|
|
2306
2252
|
};
|
|
2307
2253
|
};
|
|
2308
|
-
return n ? (
|
|
2309
|
-
className:
|
|
2310
|
-
parseClassName:
|
|
2311
|
-
}) :
|
|
2312
|
-
},
|
|
2254
|
+
return n ? (a) => n({
|
|
2255
|
+
className: a,
|
|
2256
|
+
parseClassName: c
|
|
2257
|
+
}) : c;
|
|
2258
|
+
}, Pt = (e) => {
|
|
2313
2259
|
if (e.length <= 1)
|
|
2314
2260
|
return e;
|
|
2315
2261
|
const t = [];
|
|
@@ -2317,37 +2263,37 @@ const ke = "-", Rt = (e) => {
|
|
|
2317
2263
|
return e.forEach((r) => {
|
|
2318
2264
|
r[0] === "[" ? (t.push(...n.sort(), r), n = []) : n.push(r);
|
|
2319
2265
|
}), t.push(...n.sort()), t;
|
|
2320
|
-
},
|
|
2321
|
-
cache:
|
|
2322
|
-
parseClassName:
|
|
2323
|
-
...
|
|
2324
|
-
}),
|
|
2266
|
+
}, Lt = (e) => ({
|
|
2267
|
+
cache: Et(e.cacheSize),
|
|
2268
|
+
parseClassName: zt(e),
|
|
2269
|
+
...Ct(e)
|
|
2270
|
+
}), Tt = /\s+/, Bt = (e, t) => {
|
|
2325
2271
|
const {
|
|
2326
2272
|
parseClassName: n,
|
|
2327
2273
|
getClassGroupId: r,
|
|
2328
2274
|
getConflictingClassGroupIds: o
|
|
2329
|
-
} = t, i = [],
|
|
2330
|
-
let
|
|
2331
|
-
for (let d =
|
|
2332
|
-
const p =
|
|
2333
|
-
modifiers:
|
|
2334
|
-
hasImportantModifier:
|
|
2275
|
+
} = t, i = [], c = e.trim().split(Tt);
|
|
2276
|
+
let a = "";
|
|
2277
|
+
for (let d = c.length - 1; d >= 0; d -= 1) {
|
|
2278
|
+
const p = c[d], {
|
|
2279
|
+
modifiers: h,
|
|
2280
|
+
hasImportantModifier: f,
|
|
2335
2281
|
baseClassName: l,
|
|
2336
2282
|
maybePostfixModifierPosition: u
|
|
2337
2283
|
} = n(p);
|
|
2338
2284
|
let m = !!u, g = r(m ? l.substring(0, u) : l);
|
|
2339
2285
|
if (!g) {
|
|
2340
2286
|
if (!m) {
|
|
2341
|
-
|
|
2287
|
+
a = p + (a.length > 0 ? " " + a : a);
|
|
2342
2288
|
continue;
|
|
2343
2289
|
}
|
|
2344
2290
|
if (g = r(l), !g) {
|
|
2345
|
-
|
|
2291
|
+
a = p + (a.length > 0 ? " " + a : a);
|
|
2346
2292
|
continue;
|
|
2347
2293
|
}
|
|
2348
2294
|
m = !1;
|
|
2349
2295
|
}
|
|
2350
|
-
const b =
|
|
2296
|
+
const b = Pt(h).join(":"), x = f ? b + Ye : b, k = x + g;
|
|
2351
2297
|
if (i.includes(k))
|
|
2352
2298
|
continue;
|
|
2353
2299
|
i.push(k);
|
|
@@ -2356,64 +2302,64 @@ const ke = "-", Rt = (e) => {
|
|
|
2356
2302
|
const C = $[w];
|
|
2357
2303
|
i.push(x + C);
|
|
2358
2304
|
}
|
|
2359
|
-
|
|
2305
|
+
a = p + (a.length > 0 ? " " + a : a);
|
|
2360
2306
|
}
|
|
2361
|
-
return
|
|
2307
|
+
return a;
|
|
2362
2308
|
};
|
|
2363
|
-
function
|
|
2309
|
+
function Dt() {
|
|
2364
2310
|
let e = 0, t, n, r = "";
|
|
2365
2311
|
for (; e < arguments.length; )
|
|
2366
|
-
(t = arguments[e++]) && (n =
|
|
2312
|
+
(t = arguments[e++]) && (n = Ge(t)) && (r && (r += " "), r += n);
|
|
2367
2313
|
return r;
|
|
2368
2314
|
}
|
|
2369
|
-
const
|
|
2315
|
+
const Ge = (e) => {
|
|
2370
2316
|
if (typeof e == "string")
|
|
2371
2317
|
return e;
|
|
2372
2318
|
let t, n = "";
|
|
2373
2319
|
for (let r = 0; r < e.length; r++)
|
|
2374
|
-
e[r] && (t =
|
|
2320
|
+
e[r] && (t = Ge(e[r])) && (n && (n += " "), n += t);
|
|
2375
2321
|
return n;
|
|
2376
2322
|
};
|
|
2377
|
-
function
|
|
2378
|
-
let n, r, o, i =
|
|
2379
|
-
function a(d) {
|
|
2380
|
-
const p = t.reduce((f, h) => h(f), e());
|
|
2381
|
-
return n = Ht(p), r = n.cache.get, o = n.cache.set, i = c, c(d);
|
|
2382
|
-
}
|
|
2323
|
+
function Ht(e, ...t) {
|
|
2324
|
+
let n, r, o, i = c;
|
|
2383
2325
|
function c(d) {
|
|
2326
|
+
const p = t.reduce((h, f) => f(h), e());
|
|
2327
|
+
return n = Lt(p), r = n.cache.get, o = n.cache.set, i = a, a(d);
|
|
2328
|
+
}
|
|
2329
|
+
function a(d) {
|
|
2384
2330
|
const p = r(d);
|
|
2385
2331
|
if (p)
|
|
2386
2332
|
return p;
|
|
2387
|
-
const
|
|
2388
|
-
return o(d,
|
|
2333
|
+
const h = Bt(d, n);
|
|
2334
|
+
return o(d, h), h;
|
|
2389
2335
|
}
|
|
2390
2336
|
return function() {
|
|
2391
|
-
return i(
|
|
2337
|
+
return i(Dt.apply(null, arguments));
|
|
2392
2338
|
};
|
|
2393
2339
|
}
|
|
2394
|
-
const
|
|
2340
|
+
const T = (e) => {
|
|
2395
2341
|
const t = (n) => n[e] || [];
|
|
2396
2342
|
return t.isThemeGetter = !0, t;
|
|
2397
|
-
},
|
|
2398
|
-
const r =
|
|
2343
|
+
}, Ve = /^\[(?:([a-z-]+):)?(.+)\]$/i, Wt = /^\d+\/\d+$/, Ot = /* @__PURE__ */ new Set(["px", "full", "screen"]), Yt = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Gt = /\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$/, Vt = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, jt = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Ft = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, V = (e) => ee(e) || Ot.has(e) || Wt.test(e), _ = (e) => re(e, "length", Zt), ee = (e) => !!e && !Number.isNaN(Number(e)), he = (e) => re(e, "number", ee), ie = (e) => !!e && Number.isInteger(Number(e)), Kt = (e) => e.endsWith("%") && ee(e.slice(0, -1)), A = (e) => Ve.test(e), U = (e) => Yt.test(e), _t = /* @__PURE__ */ new Set(["length", "size", "percentage"]), Ut = (e) => re(e, _t, je), qt = (e) => re(e, "position", je), Jt = /* @__PURE__ */ new Set(["image", "url"]), Xt = (e) => re(e, Jt, tn), Qt = (e) => re(e, "", en), ce = () => !0, re = (e, t, n) => {
|
|
2344
|
+
const r = Ve.exec(e);
|
|
2399
2345
|
return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1;
|
|
2400
|
-
},
|
|
2346
|
+
}, Zt = (e) => (
|
|
2401
2347
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
2402
2348
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
2403
2349
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
2404
|
-
|
|
2405
|
-
),
|
|
2406
|
-
const e =
|
|
2350
|
+
Gt.test(e) && !Vt.test(e)
|
|
2351
|
+
), je = () => !1, en = (e) => jt.test(e), tn = (e) => Ft.test(e), nn = () => {
|
|
2352
|
+
const e = T("colors"), t = T("spacing"), n = T("blur"), r = T("brightness"), o = T("borderColor"), i = T("borderRadius"), c = T("borderSpacing"), a = T("borderWidth"), d = T("contrast"), p = T("grayscale"), h = T("hueRotate"), f = T("invert"), l = T("gap"), u = T("gradientColorStops"), m = T("gradientColorStopPositions"), g = T("inset"), b = T("margin"), x = T("opacity"), k = T("padding"), $ = T("saturate"), w = T("scale"), C = T("sepia"), S = T("skew"), v = T("space"), I = T("translate"), N = () => ["auto", "contain", "none"], R = () => ["auto", "hidden", "clip", "visible", "scroll"], D = () => ["auto", A, t], E = () => [A, t], Y = () => ["", V, _], M = () => ["auto", ee, A], P = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], L = () => ["solid", "dashed", "dotted", "double", "none"], oe = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], fe = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], se = () => ["", "0", A], Ne = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], G = () => [ee, A];
|
|
2407
2353
|
return {
|
|
2408
2354
|
cacheSize: 500,
|
|
2409
2355
|
separator: ":",
|
|
2410
2356
|
theme: {
|
|
2411
|
-
colors: [
|
|
2412
|
-
spacing: [
|
|
2413
|
-
blur: ["none", "",
|
|
2357
|
+
colors: [ce],
|
|
2358
|
+
spacing: [V, _],
|
|
2359
|
+
blur: ["none", "", U, A],
|
|
2414
2360
|
brightness: G(),
|
|
2415
2361
|
borderColor: [e],
|
|
2416
|
-
borderRadius: ["none", "", "full",
|
|
2362
|
+
borderRadius: ["none", "", "full", U, A],
|
|
2417
2363
|
borderSpacing: E(),
|
|
2418
2364
|
borderWidth: Y(),
|
|
2419
2365
|
contrast: G(),
|
|
@@ -2422,7 +2368,7 @@ const B = (e) => {
|
|
|
2422
2368
|
invert: se(),
|
|
2423
2369
|
gap: E(),
|
|
2424
2370
|
gradientColorStops: [e],
|
|
2425
|
-
gradientColorStopPositions: [
|
|
2371
|
+
gradientColorStopPositions: [Kt, _],
|
|
2426
2372
|
inset: D(),
|
|
2427
2373
|
margin: D(),
|
|
2428
2374
|
opacity: G(),
|
|
@@ -2453,7 +2399,7 @@ const B = (e) => {
|
|
|
2453
2399
|
* @see https://tailwindcss.com/docs/columns
|
|
2454
2400
|
*/
|
|
2455
2401
|
columns: [{
|
|
2456
|
-
columns: [
|
|
2402
|
+
columns: [U]
|
|
2457
2403
|
}],
|
|
2458
2404
|
/**
|
|
2459
2405
|
* Break After
|
|
@@ -2705,7 +2651,7 @@ const B = (e) => {
|
|
|
2705
2651
|
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
2706
2652
|
*/
|
|
2707
2653
|
"grid-cols": [{
|
|
2708
|
-
"grid-cols": [
|
|
2654
|
+
"grid-cols": [ce]
|
|
2709
2655
|
}],
|
|
2710
2656
|
/**
|
|
2711
2657
|
* Grid Column Start / End
|
|
@@ -2735,7 +2681,7 @@ const B = (e) => {
|
|
|
2735
2681
|
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
2736
2682
|
*/
|
|
2737
2683
|
"grid-rows": [{
|
|
2738
|
-
"grid-rows": [
|
|
2684
|
+
"grid-rows": [ce]
|
|
2739
2685
|
}],
|
|
2740
2686
|
/**
|
|
2741
2687
|
* Grid Row Start / End
|
|
@@ -2807,7 +2753,7 @@ const B = (e) => {
|
|
|
2807
2753
|
* @see https://tailwindcss.com/docs/justify-content
|
|
2808
2754
|
*/
|
|
2809
2755
|
"justify-content": [{
|
|
2810
|
-
justify: ["normal", ...
|
|
2756
|
+
justify: ["normal", ...fe()]
|
|
2811
2757
|
}],
|
|
2812
2758
|
/**
|
|
2813
2759
|
* Justify Items
|
|
@@ -2828,7 +2774,7 @@ const B = (e) => {
|
|
|
2828
2774
|
* @see https://tailwindcss.com/docs/align-content
|
|
2829
2775
|
*/
|
|
2830
2776
|
"align-content": [{
|
|
2831
|
-
content: ["normal", ...
|
|
2777
|
+
content: ["normal", ...fe(), "baseline"]
|
|
2832
2778
|
}],
|
|
2833
2779
|
/**
|
|
2834
2780
|
* Align Items
|
|
@@ -2849,7 +2795,7 @@ const B = (e) => {
|
|
|
2849
2795
|
* @see https://tailwindcss.com/docs/place-content
|
|
2850
2796
|
*/
|
|
2851
2797
|
"place-content": [{
|
|
2852
|
-
"place-content": [...
|
|
2798
|
+
"place-content": [...fe(), "baseline"]
|
|
2853
2799
|
}],
|
|
2854
2800
|
/**
|
|
2855
2801
|
* Place Items
|
|
@@ -3037,8 +2983,8 @@ const B = (e) => {
|
|
|
3037
2983
|
*/
|
|
3038
2984
|
"max-w": [{
|
|
3039
2985
|
"max-w": [A, t, "none", "full", "min", "max", "fit", "prose", {
|
|
3040
|
-
screen: [
|
|
3041
|
-
},
|
|
2986
|
+
screen: [U]
|
|
2987
|
+
}, U]
|
|
3042
2988
|
}],
|
|
3043
2989
|
/**
|
|
3044
2990
|
* Height
|
|
@@ -3074,7 +3020,7 @@ const B = (e) => {
|
|
|
3074
3020
|
* @see https://tailwindcss.com/docs/font-size
|
|
3075
3021
|
*/
|
|
3076
3022
|
"font-size": [{
|
|
3077
|
-
text: ["base",
|
|
3023
|
+
text: ["base", U, _]
|
|
3078
3024
|
}],
|
|
3079
3025
|
/**
|
|
3080
3026
|
* Font Smoothing
|
|
@@ -3091,14 +3037,14 @@ const B = (e) => {
|
|
|
3091
3037
|
* @see https://tailwindcss.com/docs/font-weight
|
|
3092
3038
|
*/
|
|
3093
3039
|
"font-weight": [{
|
|
3094
|
-
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black",
|
|
3040
|
+
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", he]
|
|
3095
3041
|
}],
|
|
3096
3042
|
/**
|
|
3097
3043
|
* Font Family
|
|
3098
3044
|
* @see https://tailwindcss.com/docs/font-family
|
|
3099
3045
|
*/
|
|
3100
3046
|
"font-family": [{
|
|
3101
|
-
font: [
|
|
3047
|
+
font: [ce]
|
|
3102
3048
|
}],
|
|
3103
3049
|
/**
|
|
3104
3050
|
* Font Variant Numeric
|
|
@@ -3142,14 +3088,14 @@ const B = (e) => {
|
|
|
3142
3088
|
* @see https://tailwindcss.com/docs/line-clamp
|
|
3143
3089
|
*/
|
|
3144
3090
|
"line-clamp": [{
|
|
3145
|
-
"line-clamp": ["none", ee,
|
|
3091
|
+
"line-clamp": ["none", ee, he]
|
|
3146
3092
|
}],
|
|
3147
3093
|
/**
|
|
3148
3094
|
* Line Height
|
|
3149
3095
|
* @see https://tailwindcss.com/docs/line-height
|
|
3150
3096
|
*/
|
|
3151
3097
|
leading: [{
|
|
3152
|
-
leading: ["none", "tight", "snug", "normal", "relaxed", "loose",
|
|
3098
|
+
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", V, A]
|
|
3153
3099
|
}],
|
|
3154
3100
|
/**
|
|
3155
3101
|
* List Style Image
|
|
@@ -3225,14 +3171,14 @@ const B = (e) => {
|
|
|
3225
3171
|
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
3226
3172
|
*/
|
|
3227
3173
|
"text-decoration-thickness": [{
|
|
3228
|
-
decoration: ["auto", "from-font",
|
|
3174
|
+
decoration: ["auto", "from-font", V, _]
|
|
3229
3175
|
}],
|
|
3230
3176
|
/**
|
|
3231
3177
|
* Text Underline Offset
|
|
3232
3178
|
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
3233
3179
|
*/
|
|
3234
3180
|
"underline-offset": [{
|
|
3235
|
-
"underline-offset": ["auto",
|
|
3181
|
+
"underline-offset": ["auto", V, A]
|
|
3236
3182
|
}],
|
|
3237
3183
|
/**
|
|
3238
3184
|
* Text Decoration Color
|
|
@@ -3335,7 +3281,7 @@ const B = (e) => {
|
|
|
3335
3281
|
* @see https://tailwindcss.com/docs/background-position
|
|
3336
3282
|
*/
|
|
3337
3283
|
"bg-position": [{
|
|
3338
|
-
bg: [...P(),
|
|
3284
|
+
bg: [...P(), qt]
|
|
3339
3285
|
}],
|
|
3340
3286
|
/**
|
|
3341
3287
|
* Background Repeat
|
|
@@ -3351,7 +3297,7 @@ const B = (e) => {
|
|
|
3351
3297
|
* @see https://tailwindcss.com/docs/background-size
|
|
3352
3298
|
*/
|
|
3353
3299
|
"bg-size": [{
|
|
3354
|
-
bg: ["auto", "cover", "contain",
|
|
3300
|
+
bg: ["auto", "cover", "contain", Ut]
|
|
3355
3301
|
}],
|
|
3356
3302
|
/**
|
|
3357
3303
|
* Background Image
|
|
@@ -3360,7 +3306,7 @@ const B = (e) => {
|
|
|
3360
3306
|
"bg-image": [{
|
|
3361
3307
|
bg: ["none", {
|
|
3362
3308
|
"gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
3363
|
-
},
|
|
3309
|
+
}, Xt]
|
|
3364
3310
|
}],
|
|
3365
3311
|
/**
|
|
3366
3312
|
* Background Color
|
|
@@ -3522,63 +3468,63 @@ const B = (e) => {
|
|
|
3522
3468
|
* @see https://tailwindcss.com/docs/border-width
|
|
3523
3469
|
*/
|
|
3524
3470
|
"border-w": [{
|
|
3525
|
-
border: [
|
|
3471
|
+
border: [a]
|
|
3526
3472
|
}],
|
|
3527
3473
|
/**
|
|
3528
3474
|
* Border Width X
|
|
3529
3475
|
* @see https://tailwindcss.com/docs/border-width
|
|
3530
3476
|
*/
|
|
3531
3477
|
"border-w-x": [{
|
|
3532
|
-
"border-x": [
|
|
3478
|
+
"border-x": [a]
|
|
3533
3479
|
}],
|
|
3534
3480
|
/**
|
|
3535
3481
|
* Border Width Y
|
|
3536
3482
|
* @see https://tailwindcss.com/docs/border-width
|
|
3537
3483
|
*/
|
|
3538
3484
|
"border-w-y": [{
|
|
3539
|
-
"border-y": [
|
|
3485
|
+
"border-y": [a]
|
|
3540
3486
|
}],
|
|
3541
3487
|
/**
|
|
3542
3488
|
* Border Width Start
|
|
3543
3489
|
* @see https://tailwindcss.com/docs/border-width
|
|
3544
3490
|
*/
|
|
3545
3491
|
"border-w-s": [{
|
|
3546
|
-
"border-s": [
|
|
3492
|
+
"border-s": [a]
|
|
3547
3493
|
}],
|
|
3548
3494
|
/**
|
|
3549
3495
|
* Border Width End
|
|
3550
3496
|
* @see https://tailwindcss.com/docs/border-width
|
|
3551
3497
|
*/
|
|
3552
3498
|
"border-w-e": [{
|
|
3553
|
-
"border-e": [
|
|
3499
|
+
"border-e": [a]
|
|
3554
3500
|
}],
|
|
3555
3501
|
/**
|
|
3556
3502
|
* Border Width Top
|
|
3557
3503
|
* @see https://tailwindcss.com/docs/border-width
|
|
3558
3504
|
*/
|
|
3559
3505
|
"border-w-t": [{
|
|
3560
|
-
"border-t": [
|
|
3506
|
+
"border-t": [a]
|
|
3561
3507
|
}],
|
|
3562
3508
|
/**
|
|
3563
3509
|
* Border Width Right
|
|
3564
3510
|
* @see https://tailwindcss.com/docs/border-width
|
|
3565
3511
|
*/
|
|
3566
3512
|
"border-w-r": [{
|
|
3567
|
-
"border-r": [
|
|
3513
|
+
"border-r": [a]
|
|
3568
3514
|
}],
|
|
3569
3515
|
/**
|
|
3570
3516
|
* Border Width Bottom
|
|
3571
3517
|
* @see https://tailwindcss.com/docs/border-width
|
|
3572
3518
|
*/
|
|
3573
3519
|
"border-w-b": [{
|
|
3574
|
-
"border-b": [
|
|
3520
|
+
"border-b": [a]
|
|
3575
3521
|
}],
|
|
3576
3522
|
/**
|
|
3577
3523
|
* Border Width Left
|
|
3578
3524
|
* @see https://tailwindcss.com/docs/border-width
|
|
3579
3525
|
*/
|
|
3580
3526
|
"border-w-l": [{
|
|
3581
|
-
"border-l": [
|
|
3527
|
+
"border-l": [a]
|
|
3582
3528
|
}],
|
|
3583
3529
|
/**
|
|
3584
3530
|
* Border Opacity
|
|
@@ -3599,7 +3545,7 @@ const B = (e) => {
|
|
|
3599
3545
|
* @see https://tailwindcss.com/docs/divide-width
|
|
3600
3546
|
*/
|
|
3601
3547
|
"divide-x": [{
|
|
3602
|
-
"divide-x": [
|
|
3548
|
+
"divide-x": [a]
|
|
3603
3549
|
}],
|
|
3604
3550
|
/**
|
|
3605
3551
|
* Divide Width X Reverse
|
|
@@ -3611,7 +3557,7 @@ const B = (e) => {
|
|
|
3611
3557
|
* @see https://tailwindcss.com/docs/divide-width
|
|
3612
3558
|
*/
|
|
3613
3559
|
"divide-y": [{
|
|
3614
|
-
"divide-y": [
|
|
3560
|
+
"divide-y": [a]
|
|
3615
3561
|
}],
|
|
3616
3562
|
/**
|
|
3617
3563
|
* Divide Width Y Reverse
|
|
@@ -3714,14 +3660,14 @@ const B = (e) => {
|
|
|
3714
3660
|
* @see https://tailwindcss.com/docs/outline-offset
|
|
3715
3661
|
*/
|
|
3716
3662
|
"outline-offset": [{
|
|
3717
|
-
"outline-offset": [
|
|
3663
|
+
"outline-offset": [V, A]
|
|
3718
3664
|
}],
|
|
3719
3665
|
/**
|
|
3720
3666
|
* Outline Width
|
|
3721
3667
|
* @see https://tailwindcss.com/docs/outline-width
|
|
3722
3668
|
*/
|
|
3723
3669
|
"outline-w": [{
|
|
3724
|
-
outline: [
|
|
3670
|
+
outline: [V, _]
|
|
3725
3671
|
}],
|
|
3726
3672
|
/**
|
|
3727
3673
|
* Outline Color
|
|
@@ -3761,7 +3707,7 @@ const B = (e) => {
|
|
|
3761
3707
|
* @see https://tailwindcss.com/docs/ring-offset-width
|
|
3762
3708
|
*/
|
|
3763
3709
|
"ring-offset-w": [{
|
|
3764
|
-
"ring-offset": [
|
|
3710
|
+
"ring-offset": [V, _]
|
|
3765
3711
|
}],
|
|
3766
3712
|
/**
|
|
3767
3713
|
* Ring Offset Color
|
|
@@ -3776,14 +3722,14 @@ const B = (e) => {
|
|
|
3776
3722
|
* @see https://tailwindcss.com/docs/box-shadow
|
|
3777
3723
|
*/
|
|
3778
3724
|
shadow: [{
|
|
3779
|
-
shadow: ["", "inner", "none",
|
|
3725
|
+
shadow: ["", "inner", "none", U, Qt]
|
|
3780
3726
|
}],
|
|
3781
3727
|
/**
|
|
3782
3728
|
* Box Shadow Color
|
|
3783
3729
|
* @see https://tailwindcss.com/docs/box-shadow-color
|
|
3784
3730
|
*/
|
|
3785
3731
|
"shadow-color": [{
|
|
3786
|
-
shadow: [
|
|
3732
|
+
shadow: [ce]
|
|
3787
3733
|
}],
|
|
3788
3734
|
/**
|
|
3789
3735
|
* Opacity
|
|
@@ -3841,7 +3787,7 @@ const B = (e) => {
|
|
|
3841
3787
|
* @see https://tailwindcss.com/docs/drop-shadow
|
|
3842
3788
|
*/
|
|
3843
3789
|
"drop-shadow": [{
|
|
3844
|
-
"drop-shadow": ["", "none",
|
|
3790
|
+
"drop-shadow": ["", "none", U, A]
|
|
3845
3791
|
}],
|
|
3846
3792
|
/**
|
|
3847
3793
|
* Grayscale
|
|
@@ -3855,14 +3801,14 @@ const B = (e) => {
|
|
|
3855
3801
|
* @see https://tailwindcss.com/docs/hue-rotate
|
|
3856
3802
|
*/
|
|
3857
3803
|
"hue-rotate": [{
|
|
3858
|
-
"hue-rotate": [
|
|
3804
|
+
"hue-rotate": [h]
|
|
3859
3805
|
}],
|
|
3860
3806
|
/**
|
|
3861
3807
|
* Invert
|
|
3862
3808
|
* @see https://tailwindcss.com/docs/invert
|
|
3863
3809
|
*/
|
|
3864
3810
|
invert: [{
|
|
3865
|
-
invert: [
|
|
3811
|
+
invert: [f]
|
|
3866
3812
|
}],
|
|
3867
3813
|
/**
|
|
3868
3814
|
* Saturate
|
|
@@ -3919,14 +3865,14 @@ const B = (e) => {
|
|
|
3919
3865
|
* @see https://tailwindcss.com/docs/backdrop-hue-rotate
|
|
3920
3866
|
*/
|
|
3921
3867
|
"backdrop-hue-rotate": [{
|
|
3922
|
-
"backdrop-hue-rotate": [
|
|
3868
|
+
"backdrop-hue-rotate": [h]
|
|
3923
3869
|
}],
|
|
3924
3870
|
/**
|
|
3925
3871
|
* Backdrop Invert
|
|
3926
3872
|
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
3927
3873
|
*/
|
|
3928
3874
|
"backdrop-invert": [{
|
|
3929
|
-
"backdrop-invert": [
|
|
3875
|
+
"backdrop-invert": [f]
|
|
3930
3876
|
}],
|
|
3931
3877
|
/**
|
|
3932
3878
|
* Backdrop Opacity
|
|
@@ -3962,21 +3908,21 @@ const B = (e) => {
|
|
|
3962
3908
|
* @see https://tailwindcss.com/docs/border-spacing
|
|
3963
3909
|
*/
|
|
3964
3910
|
"border-spacing": [{
|
|
3965
|
-
"border-spacing": [
|
|
3911
|
+
"border-spacing": [c]
|
|
3966
3912
|
}],
|
|
3967
3913
|
/**
|
|
3968
3914
|
* Border Spacing X
|
|
3969
3915
|
* @see https://tailwindcss.com/docs/border-spacing
|
|
3970
3916
|
*/
|
|
3971
3917
|
"border-spacing-x": [{
|
|
3972
|
-
"border-spacing-x": [
|
|
3918
|
+
"border-spacing-x": [c]
|
|
3973
3919
|
}],
|
|
3974
3920
|
/**
|
|
3975
3921
|
* Border Spacing Y
|
|
3976
3922
|
* @see https://tailwindcss.com/docs/border-spacing
|
|
3977
3923
|
*/
|
|
3978
3924
|
"border-spacing-y": [{
|
|
3979
|
-
"border-spacing-y": [
|
|
3925
|
+
"border-spacing-y": [c]
|
|
3980
3926
|
}],
|
|
3981
3927
|
/**
|
|
3982
3928
|
* Table Layout
|
|
@@ -4356,7 +4302,7 @@ const B = (e) => {
|
|
|
4356
4302
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
4357
4303
|
*/
|
|
4358
4304
|
"stroke-w": [{
|
|
4359
|
-
stroke: [
|
|
4305
|
+
stroke: [V, _, he]
|
|
4360
4306
|
}],
|
|
4361
4307
|
/**
|
|
4362
4308
|
* Stroke
|
|
@@ -4431,59 +4377,56 @@ const B = (e) => {
|
|
|
4431
4377
|
"font-size": ["leading"]
|
|
4432
4378
|
}
|
|
4433
4379
|
};
|
|
4434
|
-
},
|
|
4435
|
-
function
|
|
4436
|
-
return
|
|
4380
|
+
}, rn = /* @__PURE__ */ Ht(nn);
|
|
4381
|
+
function jn(...e) {
|
|
4382
|
+
return rn(rt(e));
|
|
4437
4383
|
}
|
|
4438
4384
|
export {
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4385
|
+
Ee as ActivityIndicator,
|
|
4386
|
+
fn as Alert,
|
|
4387
|
+
Be as AppContainer,
|
|
4388
|
+
Te as AppContext,
|
|
4389
|
+
Wn as AppDialog,
|
|
4390
|
+
Bn as AppPanel,
|
|
4391
|
+
Hn as AppTaskbar,
|
|
4392
|
+
kt as AppTitleBar,
|
|
4393
|
+
hn as Battery,
|
|
4394
|
+
j as Button,
|
|
4395
|
+
mn as ButtonGroup,
|
|
4396
|
+
gn as Checkbox,
|
|
4397
|
+
ze as CloseButton,
|
|
4398
|
+
bn as ComboBox,
|
|
4399
|
+
kn as ContextMenu,
|
|
4400
|
+
Nn as Dialog,
|
|
4455
4401
|
Q as DialogClose,
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4402
|
+
wn as EditButton,
|
|
4403
|
+
xn as Hyperlink,
|
|
4404
|
+
An as Input,
|
|
4405
|
+
Cn as ListGroup,
|
|
4406
|
+
Sn as ListGroupItem,
|
|
4407
|
+
Mn as MonthRangePicker,
|
|
4408
|
+
In as MultiSelect,
|
|
4409
|
+
Vn as NavStackContainer,
|
|
4410
|
+
Gn as NavStackProvider,
|
|
4411
|
+
gt as Notification,
|
|
4412
|
+
Pn as NotificationContainer,
|
|
4413
|
+
$n as NumberInput,
|
|
4414
|
+
vn as RefreshButton,
|
|
4415
|
+
Rn as Slider,
|
|
4416
|
+
En as Tabs,
|
|
4417
|
+
zn as Toggle,
|
|
4418
|
+
yn as TrashButton,
|
|
4419
|
+
Dn as ViewportProvider,
|
|
4474
4420
|
te as appRegistry,
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
Wn as createAppI18nFactory,
|
|
4480
|
-
Hn as notificationManager,
|
|
4421
|
+
F as appStateStore,
|
|
4422
|
+
jn as cn,
|
|
4423
|
+
Tn as createAppI18nFactory,
|
|
4424
|
+
Ln as notificationManager,
|
|
4481
4425
|
O as runningAppsStore,
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
Mt as useViewport
|
|
4426
|
+
yt as useApp,
|
|
4427
|
+
lt as useDialog,
|
|
4428
|
+
On as useNavStack,
|
|
4429
|
+
Yn as useNavView,
|
|
4430
|
+
At as useViewport
|
|
4488
4431
|
};
|
|
4489
4432
|
//# sourceMappingURL=index.js.map
|