@kingsimba/nc-ui 0.1.28 → 0.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -27
- package/dist/clsx-C11secjj.cjs +2 -0
- package/dist/clsx-C11secjj.cjs.map +1 -0
- package/dist/clsx-OuTLNxxd.js +17 -0
- package/dist/clsx-OuTLNxxd.js.map +1 -0
- package/dist/index.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -18
- package/dist/index.js +736 -692
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/yaml.cjs +100 -1
- package/dist/yaml.cjs.map +1 -1
- package/dist/yaml.js +4697 -5
- package/dist/yaml.js.map +1 -1
- package/package.json +1 -1
- package/dist/YamlTextArea-Cn98kXG6.cjs +0 -101
- package/dist/YamlTextArea-Cn98kXG6.cjs.map +0 -1
- package/dist/YamlTextArea-ee1d1TLc.js +0 -4713
- package/dist/YamlTextArea-ee1d1TLc.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var q = (e, t, n) =>
|
|
4
|
-
import { jsx as s, jsxs as
|
|
5
|
-
import { d as
|
|
6
|
-
import
|
|
7
|
-
import { createPortal as
|
|
1
|
+
var tt = Object.defineProperty;
|
|
2
|
+
var nt = (e, t, n) => t in e ? tt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var q = (e, t, n) => nt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { jsx as s, jsxs as k, Fragment as rt } from "react/jsx-runtime";
|
|
5
|
+
import { d as ke, E as ot, R as st, T as it, g as ct, V as at, b as lt, a as dt, c as ut } from "./GeneratedIcons-HFZmBTBT.js";
|
|
6
|
+
import Ne, { useState as E, useRef as H, useMemo as be, useEffect as B, createContext as ie, useContext as Z, Children as pt, isValidElement as ft, forwardRef as ht, useImperativeHandle as mt, useCallback as O, Suspense as gt } from "react";
|
|
7
|
+
import { createPortal as pe } from "react-dom";
|
|
8
8
|
import { useTranslation as U } from "react-i18next";
|
|
9
|
-
import { c as gt } from "./YamlTextArea-ee1d1TLc.js";
|
|
10
|
-
import { Y as fr } from "./YamlTextArea-ee1d1TLc.js";
|
|
11
9
|
import bt from "i18next";
|
|
10
|
+
import { c as vt } from "./clsx-OuTLNxxd.js";
|
|
12
11
|
function He({
|
|
13
12
|
size: e = "default",
|
|
14
13
|
color: t,
|
|
@@ -51,7 +50,7 @@ function K({ variant: e = "default", block: t, size: n = "default", appearance:
|
|
|
51
50
|
c ? "nc-loading" : "",
|
|
52
51
|
o ?? ""
|
|
53
52
|
].filter(Boolean).join(" ");
|
|
54
|
-
return /* @__PURE__ */
|
|
53
|
+
return /* @__PURE__ */ k(
|
|
55
54
|
"button",
|
|
56
55
|
{
|
|
57
56
|
className: v,
|
|
@@ -81,14 +80,14 @@ function K({ variant: e = "default", block: t, size: n = "default", appearance:
|
|
|
81
80
|
}
|
|
82
81
|
);
|
|
83
82
|
}
|
|
84
|
-
const
|
|
83
|
+
const wt = {
|
|
85
84
|
info: "primary",
|
|
86
85
|
success: "success",
|
|
87
86
|
warning: "warning",
|
|
88
87
|
error: "danger",
|
|
89
88
|
danger: "danger"
|
|
90
89
|
};
|
|
91
|
-
function
|
|
90
|
+
function zn({
|
|
92
91
|
code: e,
|
|
93
92
|
text: t,
|
|
94
93
|
type: n,
|
|
@@ -99,12 +98,12 @@ function Tn({
|
|
|
99
98
|
className: c = "",
|
|
100
99
|
style: l
|
|
101
100
|
}) {
|
|
102
|
-
const u = i ?? /* @__PURE__ */
|
|
101
|
+
const u = i ?? /* @__PURE__ */ k(rt, { children: [
|
|
103
102
|
e !== void 0 && /* @__PURE__ */ s("span", { className: "nc-alert-code", children: e }),
|
|
104
103
|
t
|
|
105
104
|
] });
|
|
106
|
-
return /* @__PURE__ */
|
|
107
|
-
/* @__PURE__ */
|
|
105
|
+
return /* @__PURE__ */ k("div", { className: `nc-alert nc-${n} ${c}`.trim(), style: l, children: [
|
|
106
|
+
/* @__PURE__ */ k("div", { className: "nc-alert-main", children: [
|
|
108
107
|
/* @__PURE__ */ s("div", { className: `nc-alert-message nc-${n}`, children: u }),
|
|
109
108
|
a && /* @__PURE__ */ s(
|
|
110
109
|
"button",
|
|
@@ -113,7 +112,7 @@ function Tn({
|
|
|
113
112
|
className: "nc-alert-close",
|
|
114
113
|
"aria-label": "Close alert",
|
|
115
114
|
onClick: a,
|
|
116
|
-
children: /* @__PURE__ */ s(
|
|
115
|
+
children: /* @__PURE__ */ s(ke, { size: 16 })
|
|
117
116
|
}
|
|
118
117
|
)
|
|
119
118
|
] }),
|
|
@@ -121,14 +120,14 @@ function Tn({
|
|
|
121
120
|
K,
|
|
122
121
|
{
|
|
123
122
|
size: "small",
|
|
124
|
-
variant: r.variant ??
|
|
123
|
+
variant: r.variant ?? wt[n],
|
|
125
124
|
onClick: o,
|
|
126
125
|
children: r.text
|
|
127
126
|
}
|
|
128
127
|
) })
|
|
129
128
|
] });
|
|
130
129
|
}
|
|
131
|
-
function
|
|
130
|
+
function Pn({
|
|
132
131
|
percentage: e = 0.5,
|
|
133
132
|
status: t = "discharging",
|
|
134
133
|
darkMode: n = !1,
|
|
@@ -137,8 +136,8 @@ function zn({
|
|
|
137
136
|
const o = Math.max(0, Math.min(1, Number(e) || 0)), i = o === 0 ? "-" : String(Math.round(o * 100));
|
|
138
137
|
let a;
|
|
139
138
|
r ? o < 0.1 ? a = "var(--nc-danger)" : o < 0.2 ? a = "var(--nc-warning)" : a = "var(--nc-success)" : a = n ? "#ffffff" : "#000000";
|
|
140
|
-
const c = "var(--nc-battery-shell-bg)", l = 24, u = 14, f = 2, v = 0, d = 12, m = 0, y = 0,
|
|
141
|
-
return /* @__PURE__ */
|
|
139
|
+
const c = "var(--nc-battery-shell-bg)", l = 24, u = 14, f = 2, v = 0, d = 12, m = 0, y = 0, w = 0, g = l, N = u, b = N - m * 2, p = g - m * 2, h = Math.max(1, Math.min(4, N / 4)), A = o === 0 ? 0 : 0.05 + o * 0.95, C = l + f + d, z = 20, T = 0.65, x = Math.max(u, z * T), I = l + f + 1, S = (u - z * T) / 2;
|
|
140
|
+
return /* @__PURE__ */ k(
|
|
142
141
|
"svg",
|
|
143
142
|
{
|
|
144
143
|
className: "nc-battery",
|
|
@@ -148,16 +147,16 @@ function zn({
|
|
|
148
147
|
role: "img",
|
|
149
148
|
"aria-label": `Battery ${i === "-" ? "-" : `${i}%`} ${t}`,
|
|
150
149
|
children: [
|
|
151
|
-
/* @__PURE__ */ s("defs", { children: /* @__PURE__ */ s("mask", { id: `nc-battery-fill-mask-${o}`, children: /* @__PURE__ */ s("rect", { x: "0", y: "0", width: p *
|
|
150
|
+
/* @__PURE__ */ s("defs", { children: /* @__PURE__ */ s("mask", { id: `nc-battery-fill-mask-${o}`, children: /* @__PURE__ */ s("rect", { x: "0", y: "0", width: p * A, height: b, fill: "white" }) }) }),
|
|
152
151
|
/* @__PURE__ */ s(
|
|
153
152
|
"rect",
|
|
154
153
|
{
|
|
155
154
|
x: y,
|
|
156
|
-
y:
|
|
155
|
+
y: w,
|
|
157
156
|
rx: h,
|
|
158
157
|
ry: h,
|
|
159
|
-
width:
|
|
160
|
-
height:
|
|
158
|
+
width: g,
|
|
159
|
+
height: N,
|
|
161
160
|
fill: c
|
|
162
161
|
}
|
|
163
162
|
),
|
|
@@ -165,7 +164,7 @@ function zn({
|
|
|
165
164
|
"rect",
|
|
166
165
|
{
|
|
167
166
|
x: y + m,
|
|
168
|
-
y:
|
|
167
|
+
y: w + m,
|
|
169
168
|
width: p,
|
|
170
169
|
height: b,
|
|
171
170
|
fill: a,
|
|
@@ -177,7 +176,7 @@ function zn({
|
|
|
177
176
|
/* @__PURE__ */ s(
|
|
178
177
|
"text",
|
|
179
178
|
{
|
|
180
|
-
x: y +
|
|
179
|
+
x: y + g / 2,
|
|
181
180
|
y: u - 3,
|
|
182
181
|
fontSize: 11,
|
|
183
182
|
fontWeight: "bold",
|
|
@@ -198,12 +197,12 @@ function zn({
|
|
|
198
197
|
fill: o === 1 ? a : c
|
|
199
198
|
}
|
|
200
199
|
),
|
|
201
|
-
t === "charging" ? /* @__PURE__ */ s("g", { transform: `translate(${
|
|
200
|
+
t === "charging" ? /* @__PURE__ */ s("g", { transform: `translate(${I}, ${S}) scale(${T})`, fill: a, children: /* @__PURE__ */ s("path", { d: "M10 0 L2 11 H8 L5 20 L14 8 H8 L10 0 Z" }) }) : null
|
|
202
201
|
]
|
|
203
202
|
}
|
|
204
203
|
);
|
|
205
204
|
}
|
|
206
|
-
function
|
|
205
|
+
function Bn({
|
|
207
206
|
value: e,
|
|
208
207
|
onChange: t,
|
|
209
208
|
options: n,
|
|
@@ -225,7 +224,7 @@ function Pn({
|
|
|
225
224
|
);
|
|
226
225
|
}) });
|
|
227
226
|
}
|
|
228
|
-
function
|
|
227
|
+
function yt({ size: e }) {
|
|
229
228
|
return /* @__PURE__ */ s("svg", { className: `nc-checkbox-icon ${e === "small" ? "nc-small" : ""}`, viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ s(
|
|
230
229
|
"path",
|
|
231
230
|
{
|
|
@@ -237,9 +236,9 @@ function wt({ size: e }) {
|
|
|
237
236
|
}
|
|
238
237
|
) });
|
|
239
238
|
}
|
|
240
|
-
function
|
|
239
|
+
function Dn({ checked: e, onChange: t, disabled: n, label: r, size: o = "default", labelColor: i, style: a, className: c = "" }) {
|
|
241
240
|
const l = o === "small";
|
|
242
|
-
return /* @__PURE__ */
|
|
241
|
+
return /* @__PURE__ */ k(
|
|
243
242
|
"label",
|
|
244
243
|
{
|
|
245
244
|
className: `nc-checkbox-label ${l ? "nc-small" : ""} ${n ? "nc-disabled" : ""} ${c}`.trim(),
|
|
@@ -258,7 +257,7 @@ function Ln({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
|
|
|
258
257
|
onKeyDown: (u) => {
|
|
259
258
|
n || (u.key === "Enter" || u.key === " ") && (u.preventDefault(), t(!e));
|
|
260
259
|
},
|
|
261
|
-
children: e && /* @__PURE__ */ s(
|
|
260
|
+
children: e && /* @__PURE__ */ s(yt, { size: o })
|
|
262
261
|
}
|
|
263
262
|
),
|
|
264
263
|
r && /* @__PURE__ */ s("span", { className: "nc-checkbox-text", style: i ? { color: i } : void 0, children: r })
|
|
@@ -266,11 +265,11 @@ function Ln({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
|
|
|
266
265
|
}
|
|
267
266
|
);
|
|
268
267
|
}
|
|
269
|
-
function
|
|
270
|
-
const i =
|
|
268
|
+
function xt({ option: e, onChange: t, selected: n, highlighted: r, small: o }) {
|
|
269
|
+
const i = H(null), { t: a } = U();
|
|
271
270
|
return B(() => {
|
|
272
271
|
r && i.current && i.current.scrollIntoView({ block: "nearest" });
|
|
273
|
-
}, [r]), /* @__PURE__ */
|
|
272
|
+
}, [r]), /* @__PURE__ */ k(
|
|
274
273
|
"div",
|
|
275
274
|
{
|
|
276
275
|
ref: i,
|
|
@@ -284,7 +283,7 @@ function yt({ option: e, onChange: t, selected: n, highlighted: r, small: o }) {
|
|
|
284
283
|
},
|
|
285
284
|
children: [
|
|
286
285
|
e.label,
|
|
287
|
-
e.default && /* @__PURE__ */
|
|
286
|
+
e.default && /* @__PURE__ */ k("span", { style: { fontSize: "0.85em", color: "var(--nc-text-weak)", marginLeft: 6 }, children: [
|
|
288
287
|
"(",
|
|
289
288
|
a("common.default"),
|
|
290
289
|
")"
|
|
@@ -293,7 +292,7 @@ function yt({ option: e, onChange: t, selected: n, highlighted: r, small: o }) {
|
|
|
293
292
|
}
|
|
294
293
|
);
|
|
295
294
|
}
|
|
296
|
-
function
|
|
295
|
+
function kt({
|
|
297
296
|
isOpen: e,
|
|
298
297
|
options: t,
|
|
299
298
|
onSelect: n,
|
|
@@ -307,13 +306,13 @@ function xt({
|
|
|
307
306
|
if (B(() => {
|
|
308
307
|
if (e && i.current) {
|
|
309
308
|
const y = i.current.getBoundingClientRect();
|
|
310
|
-
let
|
|
309
|
+
let w = o;
|
|
311
310
|
if (o === "bottom") {
|
|
312
|
-
const
|
|
313
|
-
|
|
311
|
+
const g = window.innerHeight - y.bottom, N = y.top;
|
|
312
|
+
g < 320 && N > g && (w = "top");
|
|
314
313
|
}
|
|
315
|
-
v(
|
|
316
|
-
top:
|
|
314
|
+
v(w), u({
|
|
315
|
+
top: w === "top" ? y.top - 4 : y.bottom + 4,
|
|
317
316
|
left: y.left,
|
|
318
317
|
width: y.width
|
|
319
318
|
});
|
|
@@ -333,12 +332,12 @@ function xt({
|
|
|
333
332
|
maxHeight: 300,
|
|
334
333
|
overflowY: "auto"
|
|
335
334
|
},
|
|
336
|
-
children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${a ? "nc-small" : ""}`, children: d("common.noResults") }) : t.map((y,
|
|
335
|
+
children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${a ? "nc-small" : ""}`, children: d("common.noResults") }) : t.map((y, w) => /* @__PURE__ */ s(xt, { option: y, onChange: n, selected: y.value === r, highlighted: w === c, small: a }, y.value))
|
|
337
336
|
}
|
|
338
337
|
);
|
|
339
|
-
return
|
|
338
|
+
return pe(m, document.body);
|
|
340
339
|
}
|
|
341
|
-
function
|
|
340
|
+
function Nt({ onClick: e, small: t }) {
|
|
342
341
|
return /* @__PURE__ */ s(
|
|
343
342
|
"button",
|
|
344
343
|
{
|
|
@@ -350,7 +349,7 @@ function kt({ onClick: e, small: t }) {
|
|
|
350
349
|
}
|
|
351
350
|
);
|
|
352
351
|
}
|
|
353
|
-
function
|
|
352
|
+
function At({ open: e, onClick: t, small: n }) {
|
|
354
353
|
return /* @__PURE__ */ s(
|
|
355
354
|
"button",
|
|
356
355
|
{
|
|
@@ -362,7 +361,7 @@ function Nt({ open: e, onClick: t, small: n }) {
|
|
|
362
361
|
}
|
|
363
362
|
);
|
|
364
363
|
}
|
|
365
|
-
function
|
|
364
|
+
function Wn({
|
|
366
365
|
value: e,
|
|
367
366
|
onChange: t,
|
|
368
367
|
placeholder: n = "Select…",
|
|
@@ -378,66 +377,66 @@ function Bn({
|
|
|
378
377
|
style: d,
|
|
379
378
|
className: m
|
|
380
379
|
}) {
|
|
381
|
-
const [y,
|
|
382
|
-
const
|
|
383
|
-
return c ? r.filter((
|
|
384
|
-
}, [r,
|
|
380
|
+
const [y, w] = E(!1), [g, N] = E(""), [b, p] = E(-1), h = H(null), A = H(null), C = u === "small", { t: z } = U(), T = be(() => {
|
|
381
|
+
const R = g.toLowerCase();
|
|
382
|
+
return c ? r.filter((P) => P.label.toLowerCase().includes(R)) : r;
|
|
383
|
+
}, [r, g, c]);
|
|
385
384
|
B(() => {
|
|
386
385
|
y && p(-1);
|
|
387
386
|
}, [y, T]), B(() => {
|
|
388
387
|
if (!a && !e && r.length > 0 && t) {
|
|
389
|
-
const
|
|
390
|
-
t(
|
|
388
|
+
const R = r.find((P) => P.default) || r[0];
|
|
389
|
+
t(R.value);
|
|
391
390
|
}
|
|
392
391
|
}, [a, e, r, t]), B(() => {
|
|
393
|
-
function
|
|
394
|
-
var
|
|
395
|
-
|
|
392
|
+
function R(P) {
|
|
393
|
+
var W;
|
|
394
|
+
P.target instanceof Node && h.current && ((W = h.current.parentElement) != null && W.contains(P.target) || w(!1));
|
|
396
395
|
}
|
|
397
|
-
return document.addEventListener("mousedown",
|
|
396
|
+
return document.addEventListener("mousedown", R), () => document.removeEventListener("mousedown", R);
|
|
398
397
|
}, []);
|
|
399
|
-
const x = r.find((
|
|
400
|
-
var
|
|
401
|
-
t == null || t(
|
|
402
|
-
},
|
|
403
|
-
t == null || t(void 0),
|
|
404
|
-
},
|
|
398
|
+
const x = r.find((R) => R.value === e), I = x && a, S = !o && !I, $ = `nc-align-${v}`, L = !(y && c) && !!x, F = (R, P = !1) => {
|
|
399
|
+
var W;
|
|
400
|
+
t == null || t(R), w(!1), N(""), P && ((W = h.current) == null || W.blur());
|
|
401
|
+
}, Q = () => {
|
|
402
|
+
t == null || t(void 0), N(""), w(!1);
|
|
403
|
+
}, G = (R) => {
|
|
405
404
|
if (!y) {
|
|
406
|
-
(
|
|
405
|
+
(R.key === "ArrowDown" || R.key === "ArrowUp") && (w(!0), R.preventDefault());
|
|
407
406
|
return;
|
|
408
407
|
}
|
|
409
|
-
switch (
|
|
408
|
+
switch (R.key) {
|
|
410
409
|
case "ArrowDown":
|
|
411
|
-
|
|
412
|
-
const
|
|
413
|
-
return
|
|
410
|
+
R.preventDefault(), p((P) => {
|
|
411
|
+
const W = P + 1;
|
|
412
|
+
return W >= T.length ? 0 : W;
|
|
414
413
|
});
|
|
415
414
|
break;
|
|
416
415
|
case "ArrowUp":
|
|
417
|
-
|
|
418
|
-
const
|
|
419
|
-
return
|
|
416
|
+
R.preventDefault(), p((P) => {
|
|
417
|
+
const W = P - 1;
|
|
418
|
+
return W < 0 ? T.length - 1 : W;
|
|
420
419
|
});
|
|
421
420
|
break;
|
|
422
421
|
case "Enter":
|
|
423
|
-
|
|
422
|
+
R.preventDefault(), b >= 0 && b < T.length && F(T[b].value, !0);
|
|
424
423
|
break;
|
|
425
424
|
case "Escape":
|
|
426
|
-
|
|
425
|
+
R.preventDefault(), w(!1), N("");
|
|
427
426
|
break;
|
|
428
427
|
}
|
|
429
428
|
};
|
|
430
|
-
return /* @__PURE__ */
|
|
429
|
+
return /* @__PURE__ */ k("div", { className: `nc-combo-container ${f === "transparent" ? "nc-transparent" : ""} ${f === "plain" ? "nc-plain" : ""} ${y ? "nc-open" : ""} ${$} ${m || ""}`.trim(), style: { position: "relative", ...d }, children: [
|
|
431
430
|
i && /* @__PURE__ */ s("span", { className: `nc-label ${C ? "nc-small" : ""}`, children: i }),
|
|
432
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ k(
|
|
433
432
|
"div",
|
|
434
433
|
{
|
|
435
|
-
ref:
|
|
434
|
+
ref: A,
|
|
436
435
|
style: { position: "relative", display: "flex", alignItems: "center" },
|
|
437
|
-
onMouseDown: (
|
|
438
|
-
o || c &&
|
|
439
|
-
var
|
|
440
|
-
(
|
|
436
|
+
onMouseDown: (R) => {
|
|
437
|
+
o || c && R.target === h.current || (w((P) => (!P && c && x && N(x.label), !P)), c && !y && setTimeout(() => {
|
|
438
|
+
var P, W;
|
|
439
|
+
(P = h.current) == null || P.focus(), (W = h.current) == null || W.select();
|
|
441
440
|
}, 0));
|
|
442
441
|
},
|
|
443
442
|
children: [
|
|
@@ -448,27 +447,27 @@ function Bn({
|
|
|
448
447
|
className: `nc-input ${C ? "nc-small" : ""}`,
|
|
449
448
|
placeholder: n,
|
|
450
449
|
onFocus: () => {
|
|
451
|
-
var
|
|
452
|
-
!o && c && (
|
|
453
|
-
var
|
|
454
|
-
return (
|
|
455
|
-
}, 0))), c || (
|
|
450
|
+
var R;
|
|
451
|
+
!o && c && (w(!0), x && (N(x.label), setTimeout(() => {
|
|
452
|
+
var P;
|
|
453
|
+
return (P = h.current) == null ? void 0 : P.select();
|
|
454
|
+
}, 0))), c || (R = h.current) == null || R.blur();
|
|
456
455
|
},
|
|
457
|
-
onChange: (
|
|
458
|
-
onKeyDown:
|
|
459
|
-
value: y && c ?
|
|
456
|
+
onChange: (R) => c && N(R.target.value),
|
|
457
|
+
onKeyDown: G,
|
|
458
|
+
value: y && c ? g : (x == null ? void 0 : x.label) || "",
|
|
460
459
|
readOnly: o || !c,
|
|
461
460
|
style: {
|
|
462
461
|
width: "100%",
|
|
463
|
-
paddingRight: S ||
|
|
462
|
+
paddingRight: S || I ? C ? 32 : 44 : 12,
|
|
464
463
|
caretColor: c ? void 0 : "transparent",
|
|
465
464
|
cursor: c ? void 0 : "pointer",
|
|
466
465
|
userSelect: c ? void 0 : "none",
|
|
467
|
-
color:
|
|
466
|
+
color: L ? "transparent" : "var(--nc-text)"
|
|
468
467
|
}
|
|
469
468
|
}
|
|
470
469
|
),
|
|
471
|
-
|
|
470
|
+
L && /* @__PURE__ */ k(
|
|
472
471
|
"div",
|
|
473
472
|
{
|
|
474
473
|
"aria-hidden": !0,
|
|
@@ -476,14 +475,14 @@ function Bn({
|
|
|
476
475
|
style: {
|
|
477
476
|
position: "absolute",
|
|
478
477
|
left: C ? 8 : 12,
|
|
479
|
-
right: S ||
|
|
478
|
+
right: S || I ? C ? 12 : 24 : C ? 8 : 12,
|
|
480
479
|
top: "50%",
|
|
481
480
|
transform: "translateY(-50%)",
|
|
482
481
|
pointerEvents: "none"
|
|
483
482
|
},
|
|
484
483
|
children: [
|
|
485
484
|
/* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${C ? "nc-small" : ""}`, children: x == null ? void 0 : x.label }),
|
|
486
|
-
(x == null ? void 0 : x.default) && /* @__PURE__ */
|
|
485
|
+
(x == null ? void 0 : x.default) && /* @__PURE__ */ k("span", { className: `nc-combo-overlay-default ${C ? "nc-small" : ""}`, children: [
|
|
487
486
|
"(",
|
|
488
487
|
z("common.default"),
|
|
489
488
|
")"
|
|
@@ -491,15 +490,15 @@ function Bn({
|
|
|
491
490
|
]
|
|
492
491
|
}
|
|
493
492
|
),
|
|
494
|
-
|
|
495
|
-
S && /* @__PURE__ */ s(
|
|
493
|
+
I && /* @__PURE__ */ s(Nt, { onClick: Q, small: C }),
|
|
494
|
+
S && /* @__PURE__ */ s(At, { open: y, onClick: () => w((R) => !R), small: C })
|
|
496
495
|
]
|
|
497
496
|
}
|
|
498
497
|
),
|
|
499
|
-
/* @__PURE__ */ s(
|
|
498
|
+
/* @__PURE__ */ s(kt, { isOpen: y, options: T, onSelect: F, selectedValue: e, placement: l, anchorRef: A, small: C, highlightedIndex: b })
|
|
500
499
|
] });
|
|
501
500
|
}
|
|
502
|
-
function
|
|
501
|
+
function Hn({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default", title: o, "aria-label": i }) {
|
|
503
502
|
return /* @__PURE__ */ s(
|
|
504
503
|
"button",
|
|
505
504
|
{
|
|
@@ -509,11 +508,11 @@ function Dn({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default"
|
|
|
509
508
|
title: o ?? (t ? "Refreshing..." : "Refresh"),
|
|
510
509
|
"aria-label": i ?? (t ? "Refreshing" : "Refresh"),
|
|
511
510
|
"data-size": r,
|
|
512
|
-
children: /* @__PURE__ */ s(
|
|
511
|
+
children: /* @__PURE__ */ s(st, { size: r === "small" ? 14 : r === "large" ? 20 : 18, className: t ? "nc-spinning" : "" })
|
|
513
512
|
}
|
|
514
513
|
);
|
|
515
514
|
}
|
|
516
|
-
function
|
|
515
|
+
function Oe({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Close", "aria-label": o = "Close" }) {
|
|
517
516
|
return /* @__PURE__ */ s(
|
|
518
517
|
"button",
|
|
519
518
|
{
|
|
@@ -523,11 +522,11 @@ function We({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Clo
|
|
|
523
522
|
title: r,
|
|
524
523
|
"aria-label": o,
|
|
525
524
|
"data-size": n,
|
|
526
|
-
children: /* @__PURE__ */ s(
|
|
525
|
+
children: /* @__PURE__ */ s(ke, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
|
|
527
526
|
}
|
|
528
527
|
);
|
|
529
528
|
}
|
|
530
|
-
function
|
|
529
|
+
function On({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Edit", "aria-label": o = "Edit" }) {
|
|
531
530
|
return /* @__PURE__ */ s(
|
|
532
531
|
"button",
|
|
533
532
|
{
|
|
@@ -537,11 +536,11 @@ function Hn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Edi
|
|
|
537
536
|
title: r,
|
|
538
537
|
"aria-label": o,
|
|
539
538
|
"data-size": n,
|
|
540
|
-
children: /* @__PURE__ */ s(
|
|
539
|
+
children: /* @__PURE__ */ s(ot, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
|
|
541
540
|
}
|
|
542
541
|
);
|
|
543
542
|
}
|
|
544
|
-
function
|
|
543
|
+
function Fn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Delete", "aria-label": o = "Delete" }) {
|
|
545
544
|
return /* @__PURE__ */ s(
|
|
546
545
|
"button",
|
|
547
546
|
{
|
|
@@ -551,11 +550,11 @@ function Wn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Del
|
|
|
551
550
|
title: r,
|
|
552
551
|
"aria-label": o,
|
|
553
552
|
"data-size": n,
|
|
554
|
-
children: /* @__PURE__ */ s(
|
|
553
|
+
children: /* @__PURE__ */ s(it, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
|
|
555
554
|
}
|
|
556
555
|
);
|
|
557
556
|
}
|
|
558
|
-
function
|
|
557
|
+
function Vn({ onClick: e, disabled: t = !1, children: n, title: r, "aria-label": o, size: i = "default" }) {
|
|
559
558
|
return /* @__PURE__ */ s(
|
|
560
559
|
"button",
|
|
561
560
|
{
|
|
@@ -569,7 +568,7 @@ function On({ onClick: e, disabled: t = !1, children: n, title: r, "aria-label":
|
|
|
569
568
|
}
|
|
570
569
|
);
|
|
571
570
|
}
|
|
572
|
-
function
|
|
571
|
+
function jn({
|
|
573
572
|
open: e,
|
|
574
573
|
onClose: t,
|
|
575
574
|
options: n,
|
|
@@ -577,16 +576,16 @@ function Fn({
|
|
|
577
576
|
anchor: o,
|
|
578
577
|
preferredDirection: i = "down"
|
|
579
578
|
}) {
|
|
580
|
-
const a =
|
|
579
|
+
const a = H(null), [c, l] = E({ top: 0, left: 0 }), u = o || (r == null ? void 0 : r.current);
|
|
581
580
|
if (B(() => {
|
|
582
581
|
if (!e || !u || !a.current) return;
|
|
583
|
-
const d = u.getBoundingClientRect(), m = a.current.getBoundingClientRect(), y = window.innerHeight,
|
|
582
|
+
const d = u.getBoundingClientRect(), m = a.current.getBoundingClientRect(), y = window.innerHeight, w = window.innerWidth, g = d.bottom + 8, N = g + m.height <= y - 8;
|
|
584
583
|
let b = i;
|
|
585
|
-
(!
|
|
584
|
+
(!N && i === "down" || i === "up" && N) && (b = "up");
|
|
586
585
|
let p;
|
|
587
|
-
b === "down" ? p =
|
|
586
|
+
b === "down" ? p = g : p = d.top - m.height - 8;
|
|
588
587
|
let h = d.left;
|
|
589
|
-
h + m.width >
|
|
588
|
+
h + m.width > w - 8 && (h = d.right - m.width), l({
|
|
590
589
|
top: Math.max(8, p),
|
|
591
590
|
// Ensure minimum 8px from top
|
|
592
591
|
left: Math.max(8, h)
|
|
@@ -606,7 +605,7 @@ function Fn({
|
|
|
606
605
|
const f = (d) => {
|
|
607
606
|
d.type !== "separator" && !d.disabled && d.onClick && (d.onClick(), t());
|
|
608
607
|
}, v = n.some((d) => d.icon);
|
|
609
|
-
return
|
|
608
|
+
return pe(
|
|
610
609
|
/* @__PURE__ */ s(
|
|
611
610
|
"div",
|
|
612
611
|
{
|
|
@@ -635,7 +634,7 @@ function Fn({
|
|
|
635
634
|
d.disabled ? "nc-disabled" : "",
|
|
636
635
|
v && !d.icon ? "nc-indented" : ""
|
|
637
636
|
].filter(Boolean).join(" ");
|
|
638
|
-
return /* @__PURE__ */
|
|
637
|
+
return /* @__PURE__ */ k(
|
|
639
638
|
"button",
|
|
640
639
|
{
|
|
641
640
|
className: m,
|
|
@@ -655,20 +654,20 @@ function Fn({
|
|
|
655
654
|
document.body
|
|
656
655
|
);
|
|
657
656
|
}
|
|
658
|
-
const
|
|
659
|
-
function
|
|
660
|
-
const e =
|
|
657
|
+
const Fe = ie(null);
|
|
658
|
+
function Ct() {
|
|
659
|
+
const e = Z(Fe);
|
|
661
660
|
if (!e)
|
|
662
661
|
throw new Error("useDialog must be used inside a Dialog component");
|
|
663
662
|
return e;
|
|
664
663
|
}
|
|
665
|
-
function
|
|
666
|
-
const { close: r } =
|
|
664
|
+
function re({ children: e, onClick: t, ...n }) {
|
|
665
|
+
const { close: r } = Ct(), { t: o } = U();
|
|
667
666
|
return /* @__PURE__ */ s(K, { onClick: (a) => {
|
|
668
667
|
t == null || t(a), r();
|
|
669
668
|
}, ...n, children: e ?? o("common.close") });
|
|
670
669
|
}
|
|
671
|
-
function
|
|
670
|
+
function Gn({
|
|
672
671
|
open: e,
|
|
673
672
|
onClose: t,
|
|
674
673
|
title: n,
|
|
@@ -684,55 +683,55 @@ function Vn({
|
|
|
684
683
|
closeOnOverlay: d = !0,
|
|
685
684
|
primaryDisabled: m = !1,
|
|
686
685
|
fullScreen: y = !1,
|
|
687
|
-
hideTitleBar:
|
|
688
|
-
className:
|
|
689
|
-
onContentHeightChange:
|
|
686
|
+
hideTitleBar: w = !1,
|
|
687
|
+
className: g = "",
|
|
688
|
+
onContentHeightChange: N
|
|
690
689
|
}) {
|
|
691
|
-
const b =
|
|
690
|
+
const b = H(null), p = H(null), { t: h } = U(), A = { close: t }, C = (x) => {
|
|
692
691
|
d && x.target === x.currentTarget && t();
|
|
693
692
|
};
|
|
694
693
|
if (B(() => {
|
|
695
694
|
e && b.current && b.current.focus();
|
|
696
695
|
}, [e]), B(() => {
|
|
697
|
-
if (!
|
|
698
|
-
const x = new ResizeObserver((
|
|
699
|
-
for (const S of
|
|
696
|
+
if (!N || !p.current) return;
|
|
697
|
+
const x = new ResizeObserver((I) => {
|
|
698
|
+
for (const S of I) {
|
|
700
699
|
const $ = S.contentRect.height;
|
|
701
|
-
|
|
700
|
+
N($);
|
|
702
701
|
}
|
|
703
702
|
});
|
|
704
703
|
return x.observe(p.current), () => {
|
|
705
704
|
x.disconnect();
|
|
706
705
|
};
|
|
707
|
-
}, [
|
|
706
|
+
}, [N]), !e) return null;
|
|
708
707
|
const z = () => {
|
|
709
708
|
switch (i) {
|
|
710
709
|
case "ok":
|
|
711
710
|
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(K, { variant: "primary", onClick: c ?? t, disabled: m, children: h("common.ok") }) });
|
|
712
711
|
case "ok-cancel":
|
|
713
|
-
return /* @__PURE__ */
|
|
714
|
-
/* @__PURE__ */ s(
|
|
712
|
+
return /* @__PURE__ */ k("div", { className: "nc-dialog-footer", children: [
|
|
713
|
+
/* @__PURE__ */ s(re, { onClick: f, children: h("common.cancel") }),
|
|
715
714
|
/* @__PURE__ */ s(K, { variant: "primary", onClick: c ?? t, disabled: m, children: h("common.ok") })
|
|
716
715
|
] });
|
|
717
716
|
case "save-cancel":
|
|
718
|
-
return /* @__PURE__ */
|
|
719
|
-
/* @__PURE__ */ s(
|
|
717
|
+
return /* @__PURE__ */ k("div", { className: "nc-dialog-footer", children: [
|
|
718
|
+
/* @__PURE__ */ s(re, { onClick: f, children: h("common.cancel") }),
|
|
720
719
|
/* @__PURE__ */ s(K, { variant: "primary", onClick: l, disabled: m, children: h("common.save") })
|
|
721
720
|
] });
|
|
722
721
|
case "delete-cancel":
|
|
723
|
-
return /* @__PURE__ */
|
|
724
|
-
/* @__PURE__ */ s(
|
|
722
|
+
return /* @__PURE__ */ k("div", { className: "nc-dialog-footer", children: [
|
|
723
|
+
/* @__PURE__ */ s(re, { onClick: f, children: h("common.cancel") }),
|
|
725
724
|
/* @__PURE__ */ s(K, { variant: "danger", onClick: u, disabled: m, children: h("common.delete") })
|
|
726
725
|
] });
|
|
727
726
|
case "connect":
|
|
728
|
-
return /* @__PURE__ */
|
|
729
|
-
/* @__PURE__ */ s(
|
|
727
|
+
return /* @__PURE__ */ k("div", { className: "nc-dialog-footer", children: [
|
|
728
|
+
/* @__PURE__ */ s(re, { onClick: f, children: h("common.cancel") }),
|
|
730
729
|
/* @__PURE__ */ s(K, { variant: "primary", onClick: v, disabled: m, children: h("common.connect") })
|
|
731
730
|
] });
|
|
732
731
|
case "close":
|
|
733
|
-
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(
|
|
732
|
+
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(re, { variant: "primary" }) });
|
|
734
733
|
case "gotit":
|
|
735
|
-
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(
|
|
734
|
+
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(re, { variant: "primary", children: h("common.gotit") }) });
|
|
736
735
|
case "custom":
|
|
737
736
|
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: a });
|
|
738
737
|
case "none":
|
|
@@ -740,27 +739,27 @@ function Vn({
|
|
|
740
739
|
default:
|
|
741
740
|
return null;
|
|
742
741
|
}
|
|
743
|
-
}, T = /* @__PURE__ */ s(
|
|
742
|
+
}, T = /* @__PURE__ */ s(Fe.Provider, { value: A, children: /* @__PURE__ */ s("div", { className: `nc-dialog-overlay${y ? " nc-fullscreen" : ""}`, onClick: C, children: /* @__PURE__ */ k(
|
|
744
743
|
"div",
|
|
745
744
|
{
|
|
746
745
|
ref: b,
|
|
747
|
-
className: `nc-dialog-container ${
|
|
746
|
+
className: `nc-dialog-container ${g}`,
|
|
748
747
|
style: o,
|
|
749
748
|
tabIndex: -1,
|
|
750
749
|
role: "dialog",
|
|
751
750
|
"aria-modal": "true",
|
|
752
|
-
"aria-labelledby":
|
|
751
|
+
"aria-labelledby": w ? void 0 : "nc-dialog-title",
|
|
753
752
|
children: [
|
|
754
|
-
!
|
|
753
|
+
!w && /* @__PURE__ */ k("div", { className: "nc-dialog-header", children: [
|
|
755
754
|
/* @__PURE__ */ s("h3", { id: "nc-dialog-title", className: "nc-dialog-title", children: n }),
|
|
756
|
-
/* @__PURE__ */ s(
|
|
755
|
+
/* @__PURE__ */ s(Oe, { onClick: t, "aria-label": "Close dialog" })
|
|
757
756
|
] }),
|
|
758
757
|
/* @__PURE__ */ s("div", { ref: p, className: "nc-dialog-content", children: r }),
|
|
759
758
|
z()
|
|
760
759
|
]
|
|
761
760
|
}
|
|
762
761
|
) }) });
|
|
763
|
-
return y ?
|
|
762
|
+
return y ? pe(T, document.body) : T;
|
|
764
763
|
}
|
|
765
764
|
function St({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
|
|
766
765
|
const r = t === "small" ? 28 : 34;
|
|
@@ -791,7 +790,7 @@ function St({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
|
|
|
791
790
|
}
|
|
792
791
|
);
|
|
793
792
|
}
|
|
794
|
-
function
|
|
793
|
+
function $t({ visible: e, onClick: t, size: n = "default" }) {
|
|
795
794
|
const r = n === "small" ? 28 : 34, o = n === "small" ? 16 : 18;
|
|
796
795
|
return /* @__PURE__ */ s(
|
|
797
796
|
"button",
|
|
@@ -815,7 +814,7 @@ function Ct({ visible: e, onClick: t, size: n = "default" }) {
|
|
|
815
814
|
alignItems: "center",
|
|
816
815
|
justifyContent: "center"
|
|
817
816
|
},
|
|
818
|
-
children: e ? /* @__PURE__ */ s(
|
|
817
|
+
children: e ? /* @__PURE__ */ s(ct, { size: o }) : /* @__PURE__ */ s(at, { size: o })
|
|
819
818
|
}
|
|
820
819
|
);
|
|
821
820
|
}
|
|
@@ -832,91 +831,92 @@ function Yn({
|
|
|
832
831
|
type: u = "text",
|
|
833
832
|
className: f = "",
|
|
834
833
|
size: v = "default",
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
834
|
+
appearance: d = "default",
|
|
835
|
+
style: m,
|
|
836
|
+
leadingIcon: y,
|
|
837
|
+
showPasswordToggle: w = !1,
|
|
838
838
|
multiline: g = !1,
|
|
839
|
-
rows:
|
|
840
|
-
validator:
|
|
841
|
-
showErrorMessage:
|
|
839
|
+
rows: N = 3,
|
|
840
|
+
validator: b,
|
|
841
|
+
showErrorMessage: p = !0
|
|
842
842
|
}) {
|
|
843
|
-
const
|
|
844
|
-
let
|
|
845
|
-
|
|
846
|
-
const
|
|
847
|
-
var
|
|
848
|
-
|
|
849
|
-
},
|
|
850
|
-
|
|
851
|
-
},
|
|
852
|
-
const
|
|
853
|
-
|
|
843
|
+
const h = H(null), A = H(null), [C, z] = E(!1), [T, x] = E(!1), I = e !== void 0, [S, $] = E(t), L = I ? e : S, F = b ? b(L) : null, Q = !!F, G = u === "password", R = G && w && !a && !g, P = l && L && !a && T, W = v === "small" ? 32 : 44;
|
|
844
|
+
let ee = 12;
|
|
845
|
+
P && R ? ee = W * 2 : (P || R) && (ee = W);
|
|
846
|
+
const fe = y ? v === "small" ? 28 : 34 : void 0, et = () => {
|
|
847
|
+
var ne, ae;
|
|
848
|
+
I || $(""), n == null || n(""), o == null || o(), g ? (ne = A.current) == null || ne.focus() : (ae = h.current) == null || ae.focus();
|
|
849
|
+
}, $e = (ne) => {
|
|
850
|
+
ne.key === "Enter" && !g && (r == null || r());
|
|
851
|
+
}, Me = (ne) => {
|
|
852
|
+
const ae = ne.target.value;
|
|
853
|
+
I || $(ae), n == null || n(ae);
|
|
854
854
|
}, Ie = () => {
|
|
855
|
-
|
|
856
|
-
},
|
|
857
|
-
|
|
858
|
-
},
|
|
859
|
-
return /* @__PURE__ */
|
|
855
|
+
x(!0);
|
|
856
|
+
}, Re = () => {
|
|
857
|
+
x(!1);
|
|
858
|
+
}, Ee = `nc-input ${v === "small" ? "nc-small " : ""}${!g && d === "plain" ? "nc-plain " : ""}${Q ? "nc-error " : ""}${f}`;
|
|
859
|
+
return /* @__PURE__ */ k("div", { className: "nc-col", style: { position: "relative", flex: 1, ...m }, children: [
|
|
860
860
|
c && /* @__PURE__ */ s("span", { className: "nc-label", children: c }),
|
|
861
|
-
/* @__PURE__ */
|
|
862
|
-
|
|
861
|
+
/* @__PURE__ */ k("div", { style: { position: "relative", display: "flex", alignItems: g ? "flex-start" : "center" }, children: [
|
|
862
|
+
y && /* @__PURE__ */ s("span", { className: "nc-input-leading-icon", style: { height: g ? void 0 : "100%", top: g ? 10 : void 0 }, children: y }),
|
|
863
863
|
g ? /* @__PURE__ */ s(
|
|
864
864
|
"textarea",
|
|
865
865
|
{
|
|
866
|
-
ref:
|
|
867
|
-
className:
|
|
866
|
+
ref: A,
|
|
867
|
+
className: Ee,
|
|
868
868
|
placeholder: i,
|
|
869
|
-
value:
|
|
870
|
-
onChange:
|
|
871
|
-
onKeyDown:
|
|
869
|
+
value: L,
|
|
870
|
+
onChange: Me,
|
|
871
|
+
onKeyDown: $e,
|
|
872
872
|
onFocus: Ie,
|
|
873
|
-
onBlur:
|
|
873
|
+
onBlur: Re,
|
|
874
874
|
readOnly: a,
|
|
875
875
|
"aria-disabled": a,
|
|
876
876
|
tabIndex: a ? -1 : void 0,
|
|
877
|
-
rows:
|
|
877
|
+
rows: N,
|
|
878
878
|
style: {
|
|
879
879
|
width: "100%",
|
|
880
|
-
paddingRight:
|
|
881
|
-
...
|
|
880
|
+
paddingRight: ee,
|
|
881
|
+
...fe !== void 0 ? { paddingLeft: fe } : {}
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
884
|
) : /* @__PURE__ */ s(
|
|
885
885
|
"input",
|
|
886
886
|
{
|
|
887
|
-
ref:
|
|
888
|
-
type:
|
|
889
|
-
className:
|
|
887
|
+
ref: h,
|
|
888
|
+
type: G && C ? "text" : u,
|
|
889
|
+
className: Ee,
|
|
890
890
|
placeholder: i,
|
|
891
|
-
value:
|
|
892
|
-
onChange:
|
|
893
|
-
onKeyDown:
|
|
891
|
+
value: L,
|
|
892
|
+
onChange: Me,
|
|
893
|
+
onKeyDown: $e,
|
|
894
894
|
onFocus: Ie,
|
|
895
|
-
onBlur:
|
|
895
|
+
onBlur: Re,
|
|
896
896
|
readOnly: a,
|
|
897
897
|
"aria-disabled": a,
|
|
898
898
|
tabIndex: a ? -1 : void 0,
|
|
899
899
|
style: {
|
|
900
900
|
width: "100%",
|
|
901
|
-
paddingRight:
|
|
902
|
-
...
|
|
901
|
+
paddingRight: ee,
|
|
902
|
+
...fe !== void 0 ? { paddingLeft: fe } : {}
|
|
903
903
|
}
|
|
904
904
|
}
|
|
905
905
|
),
|
|
906
|
-
|
|
907
|
-
|
|
906
|
+
P && /* @__PURE__ */ s(St, { onClick: et, size: v, rightOffset: R ? W + 4 : 4 }),
|
|
907
|
+
R && /* @__PURE__ */ s($t, { visible: C, onClick: () => z(!C), size: v })
|
|
908
908
|
] }),
|
|
909
|
-
|
|
909
|
+
Q && p && /* @__PURE__ */ s("span", { className: "nc-error-message", children: F })
|
|
910
910
|
] });
|
|
911
911
|
}
|
|
912
|
-
function
|
|
912
|
+
function Kn({
|
|
913
913
|
children: e,
|
|
914
914
|
onClick: t,
|
|
915
915
|
showBorder: n = !0,
|
|
916
916
|
selectable: r = !1,
|
|
917
917
|
style: o
|
|
918
918
|
}) {
|
|
919
|
-
const [i, a] =
|
|
919
|
+
const [i, a] = Ne.useState(!1);
|
|
920
920
|
return /* @__PURE__ */ s(
|
|
921
921
|
"div",
|
|
922
922
|
{
|
|
@@ -944,9 +944,9 @@ function Gn({
|
|
|
944
944
|
}
|
|
945
945
|
);
|
|
946
946
|
}
|
|
947
|
-
function
|
|
948
|
-
return /* @__PURE__ */
|
|
949
|
-
(e || t) && /* @__PURE__ */
|
|
947
|
+
function _n({ title: e, titleTools: t, children: n, style: r }) {
|
|
948
|
+
return /* @__PURE__ */ k("div", { className: "nc-list-group", style: r, children: [
|
|
949
|
+
(e || t) && /* @__PURE__ */ k("div", { className: "nc-list-group-title", children: [
|
|
950
950
|
/* @__PURE__ */ s("div", { children: e }),
|
|
951
951
|
t && /* @__PURE__ */ s("div", { className: "nc-list-group-title-tools", children: t })
|
|
952
952
|
] }),
|
|
@@ -959,8 +959,8 @@ function jn({ title: e, titleTools: t, children: n, style: r }) {
|
|
|
959
959
|
)
|
|
960
960
|
] });
|
|
961
961
|
}
|
|
962
|
-
function
|
|
963
|
-
const [i, a] = E(!1), [c, l] = E(""), u =
|
|
962
|
+
function Un({ values: e, onChange: t, options: n, placeholder: r = "Select…", label: o }) {
|
|
963
|
+
const [i, a] = E(!1), [c, l] = E(""), u = H(null), f = be(() => n.filter((d) => d.label.toLowerCase().includes(c.toLowerCase())), [n, c]);
|
|
964
964
|
B(() => {
|
|
965
965
|
function d(m) {
|
|
966
966
|
!(m.target instanceof Node) || !u.current || u.current.contains(m.target) || a(!1);
|
|
@@ -970,13 +970,13 @@ function Kn({ values: e, onChange: t, options: n, placeholder: r = "Select…",
|
|
|
970
970
|
const v = (d) => {
|
|
971
971
|
e.includes(d) ? t(e.filter((m) => m !== d)) : t([...e, d]);
|
|
972
972
|
};
|
|
973
|
-
return /* @__PURE__ */
|
|
973
|
+
return /* @__PURE__ */ k("div", { ref: u, className: "nc-col", style: { position: "relative" }, children: [
|
|
974
974
|
o && /* @__PURE__ */ s("span", { className: "nc-label", children: o }),
|
|
975
|
-
/* @__PURE__ */
|
|
975
|
+
/* @__PURE__ */ k("div", { className: "nc-row", style: { flexWrap: "wrap", gap: 6, minHeight: 42, alignItems: "center", border: "1px solid var(--nc-button-border)", borderRadius: 8, background: "var(--nc-button-bg)", padding: "4px 8px" }, children: [
|
|
976
976
|
e.length === 0 && /* @__PURE__ */ s("span", { className: "nc-label", children: r }),
|
|
977
977
|
e.map((d) => {
|
|
978
978
|
const m = n.find((y) => y.value === d);
|
|
979
|
-
return m ? /* @__PURE__ */
|
|
979
|
+
return m ? /* @__PURE__ */ k("span", { style: { padding: "4px 8px", borderRadius: 6, display: "inline-flex", alignItems: "center", gap: 4, background: "var(--nc-button-bg)", border: "1px solid var(--nc-button-border)" }, children: [
|
|
980
980
|
m.label,
|
|
981
981
|
/* @__PURE__ */ s(
|
|
982
982
|
"button",
|
|
@@ -1001,10 +1001,10 @@ function Kn({ values: e, onChange: t, options: n, placeholder: r = "Select…",
|
|
|
1001
1001
|
}
|
|
1002
1002
|
)
|
|
1003
1003
|
] }),
|
|
1004
|
-
i && /* @__PURE__ */
|
|
1004
|
+
i && /* @__PURE__ */ k("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: [
|
|
1005
1005
|
f.map((d) => {
|
|
1006
1006
|
const m = e.includes(d.value);
|
|
1007
|
-
return /* @__PURE__ */
|
|
1007
|
+
return /* @__PURE__ */ k("div", { className: "nc-section nc-row", style: { justifyContent: "space-between", cursor: "pointer", padding: 12 }, onMouseDown: () => v(d.value), children: [
|
|
1008
1008
|
/* @__PURE__ */ s("span", { children: d.label }),
|
|
1009
1009
|
/* @__PURE__ */ s("span", { children: m ? "✔️" : "" })
|
|
1010
1010
|
] }, d.value);
|
|
@@ -1013,7 +1013,7 @@ function Kn({ values: e, onChange: t, options: n, placeholder: r = "Select…",
|
|
|
1013
1013
|
] })
|
|
1014
1014
|
] });
|
|
1015
1015
|
}
|
|
1016
|
-
function
|
|
1016
|
+
function he(e) {
|
|
1017
1017
|
if (!e) return null;
|
|
1018
1018
|
const t = /^\d{2}-\d{1,2}$/, n = /^\d{4}-\d{1,2}$/;
|
|
1019
1019
|
if (!t.test(e) && !n.test(e))
|
|
@@ -1021,7 +1021,7 @@ function pe(e) {
|
|
|
1021
1021
|
const r = e.split("-"), o = parseInt(r[1], 10);
|
|
1022
1022
|
return o < 1 || o > 12 ? "Month must be between 1 and 12" : null;
|
|
1023
1023
|
}
|
|
1024
|
-
function
|
|
1024
|
+
function ue(e) {
|
|
1025
1025
|
if (!e) return "";
|
|
1026
1026
|
const t = e.split("-");
|
|
1027
1027
|
if (t.length !== 2) return e;
|
|
@@ -1033,9 +1033,9 @@ function de(e) {
|
|
|
1033
1033
|
}
|
|
1034
1034
|
return `${n}-${r}`;
|
|
1035
1035
|
}
|
|
1036
|
-
function
|
|
1036
|
+
function Le(e) {
|
|
1037
1037
|
if (!e) return "";
|
|
1038
|
-
const t =
|
|
1038
|
+
const t = ue(e);
|
|
1039
1039
|
if (!/^\d{4}-\d{2}$/.test(t)) return e;
|
|
1040
1040
|
const [n, r] = t.split("-");
|
|
1041
1041
|
return `${n}/${r}`;
|
|
@@ -1044,7 +1044,7 @@ function Te() {
|
|
|
1044
1044
|
const e = /* @__PURE__ */ new Date(), t = e.getFullYear(), n = String(e.getMonth() + 1).padStart(2, "0");
|
|
1045
1045
|
return `${t}-${n}`;
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1047
|
+
function qn({
|
|
1048
1048
|
startMonth: e,
|
|
1049
1049
|
endMonth: t,
|
|
1050
1050
|
onChange: n,
|
|
@@ -1053,45 +1053,45 @@ function _n({
|
|
|
1053
1053
|
disabled: i = !1,
|
|
1054
1054
|
size: a = "default"
|
|
1055
1055
|
}) {
|
|
1056
|
-
const [c, l] = E(!1), [u, f] = E(""), [v, d] = E(""), [m, y] = E({ top: 0, left: 0, width: 0, right: void 0 }),
|
|
1056
|
+
const [c, l] = E(!1), [u, f] = E(""), [v, d] = E(""), [m, y] = E({ top: 0, left: 0, width: 0, right: void 0 }), w = H(null), g = H(null);
|
|
1057
1057
|
B(() => {
|
|
1058
|
-
if (c &&
|
|
1059
|
-
const S =
|
|
1060
|
-
window.innerWidth - S.left <
|
|
1058
|
+
if (c && w.current) {
|
|
1059
|
+
const S = w.current.getBoundingClientRect(), L = Math.max(S.width, 400);
|
|
1060
|
+
window.innerWidth - S.left < L && S.right >= L ? y({
|
|
1061
1061
|
top: S.bottom + 4,
|
|
1062
1062
|
left: 0,
|
|
1063
1063
|
// Not used but type needs it, let's just use 0
|
|
1064
1064
|
right: window.innerWidth - S.right,
|
|
1065
|
-
width:
|
|
1065
|
+
width: L
|
|
1066
1066
|
}) : y({
|
|
1067
1067
|
top: S.bottom + 4,
|
|
1068
1068
|
left: S.left,
|
|
1069
1069
|
right: void 0,
|
|
1070
|
-
width:
|
|
1070
|
+
width: L
|
|
1071
1071
|
});
|
|
1072
1072
|
}
|
|
1073
1073
|
}, [c]), B(() => {
|
|
1074
1074
|
if (!c) return;
|
|
1075
1075
|
const S = ($) => {
|
|
1076
|
-
|
|
1076
|
+
w.current && !w.current.contains($.target) && g.current && !g.current.contains($.target) && l(!1);
|
|
1077
1077
|
};
|
|
1078
1078
|
return document.addEventListener("mousedown", S), () => document.removeEventListener("mousedown", S);
|
|
1079
1079
|
}, [c]);
|
|
1080
|
-
const
|
|
1080
|
+
const N = () => {
|
|
1081
1081
|
f(e || Te()), d(t || Te()), l(!0);
|
|
1082
1082
|
}, b = () => {
|
|
1083
1083
|
l(!1);
|
|
1084
1084
|
}, p = () => {
|
|
1085
|
-
const S =
|
|
1085
|
+
const S = he(u), $ = he(v);
|
|
1086
1086
|
if (S || $)
|
|
1087
1087
|
return;
|
|
1088
|
-
const
|
|
1089
|
-
|
|
1090
|
-
}, h = e && t ? `${
|
|
1088
|
+
const L = ue(u), F = ue(v);
|
|
1089
|
+
L && F && (n == null || n(L, F)), l(!1);
|
|
1090
|
+
}, h = e && t ? `${Le(e)} - ${Le(t)}` : "Select month range", A = he(u), C = he(v), z = ue(u), T = ue(v), x = z && T && z > T, I = c ? pe(
|
|
1091
1091
|
/* @__PURE__ */ s(
|
|
1092
1092
|
"div",
|
|
1093
1093
|
{
|
|
1094
|
-
ref:
|
|
1094
|
+
ref: g,
|
|
1095
1095
|
className: "nc-month-range-picker-popup",
|
|
1096
1096
|
style: {
|
|
1097
1097
|
position: "fixed",
|
|
@@ -1100,23 +1100,23 @@ function _n({
|
|
|
1100
1100
|
width: m.width,
|
|
1101
1101
|
zIndex: 1e3
|
|
1102
1102
|
},
|
|
1103
|
-
children: /* @__PURE__ */
|
|
1104
|
-
/* @__PURE__ */
|
|
1105
|
-
/* @__PURE__ */
|
|
1103
|
+
children: /* @__PURE__ */ k("div", { className: "nc-month-range-picker-content", children: [
|
|
1104
|
+
/* @__PURE__ */ k("div", { className: "nc-month-range-picker-row", children: [
|
|
1105
|
+
/* @__PURE__ */ k("div", { className: "nc-month-range-picker-column", children: [
|
|
1106
1106
|
/* @__PURE__ */ s("label", { className: "nc-label", children: "Start Month" }),
|
|
1107
1107
|
/* @__PURE__ */ s(
|
|
1108
1108
|
"input",
|
|
1109
1109
|
{
|
|
1110
1110
|
type: "text",
|
|
1111
|
-
className: `nc-month-input ${
|
|
1111
|
+
className: `nc-month-input ${A ? "nc-error" : ""}`,
|
|
1112
1112
|
value: u,
|
|
1113
1113
|
onChange: (S) => f(S.target.value),
|
|
1114
1114
|
placeholder: "YY-M(M) or YYYY-M(M)"
|
|
1115
1115
|
}
|
|
1116
1116
|
),
|
|
1117
|
-
|
|
1117
|
+
A && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: A })
|
|
1118
1118
|
] }),
|
|
1119
|
-
/* @__PURE__ */
|
|
1119
|
+
/* @__PURE__ */ k("div", { className: "nc-month-range-picker-column", children: [
|
|
1120
1120
|
/* @__PURE__ */ s("label", { className: "nc-label", children: "End Month" }),
|
|
1121
1121
|
/* @__PURE__ */ s(
|
|
1122
1122
|
"input",
|
|
@@ -1131,14 +1131,14 @@ function _n({
|
|
|
1131
1131
|
C && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: C })
|
|
1132
1132
|
] })
|
|
1133
1133
|
] }),
|
|
1134
|
-
x && !
|
|
1135
|
-
/* @__PURE__ */
|
|
1134
|
+
x && !A && !C && /* @__PURE__ */ s("div", { className: "nc-month-range-error", children: "End month must be after or equal to start month" }),
|
|
1135
|
+
/* @__PURE__ */ k("div", { className: "nc-month-range-picker-footer", children: [
|
|
1136
1136
|
/* @__PURE__ */ s(
|
|
1137
1137
|
K,
|
|
1138
1138
|
{
|
|
1139
1139
|
variant: "primary",
|
|
1140
1140
|
onClick: p,
|
|
1141
|
-
disabled: !u || !v || !!
|
|
1141
|
+
disabled: !u || !v || !!A || !!C || !!x,
|
|
1142
1142
|
children: "Apply"
|
|
1143
1143
|
}
|
|
1144
1144
|
),
|
|
@@ -1149,22 +1149,22 @@ function _n({
|
|
|
1149
1149
|
),
|
|
1150
1150
|
document.body
|
|
1151
1151
|
) : null;
|
|
1152
|
-
return /* @__PURE__ */
|
|
1152
|
+
return /* @__PURE__ */ k("div", { className: `nc-month-range-picker ${a === "small" ? "nc-small " : ""}${o}`, children: [
|
|
1153
1153
|
r && /* @__PURE__ */ s("label", { className: `nc-label${a === "small" ? " nc-small" : ""}`, children: r }),
|
|
1154
1154
|
/* @__PURE__ */ s(
|
|
1155
1155
|
"button",
|
|
1156
1156
|
{
|
|
1157
|
-
ref:
|
|
1157
|
+
ref: w,
|
|
1158
1158
|
className: `nc-month-range-picker-input${a === "small" ? " nc-small" : ""}`,
|
|
1159
|
-
onClick:
|
|
1159
|
+
onClick: N,
|
|
1160
1160
|
disabled: i,
|
|
1161
1161
|
children: h
|
|
1162
1162
|
}
|
|
1163
1163
|
),
|
|
1164
|
-
|
|
1164
|
+
I
|
|
1165
1165
|
] });
|
|
1166
1166
|
}
|
|
1167
|
-
function
|
|
1167
|
+
function Xn({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disabled: a, size: c = "default" }) {
|
|
1168
1168
|
const l = c === "small", u = () => {
|
|
1169
1169
|
const d = e - o;
|
|
1170
1170
|
n !== void 0 && d < n || t(parseFloat(d.toFixed(10)));
|
|
@@ -1172,9 +1172,9 @@ function Un({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
|
|
|
1172
1172
|
const d = e + o;
|
|
1173
1173
|
r !== void 0 && d > r || t(parseFloat(d.toFixed(10)));
|
|
1174
1174
|
};
|
|
1175
|
-
return /* @__PURE__ */
|
|
1175
|
+
return /* @__PURE__ */ k("div", { className: `nc-col nc-number-input-col ${l ? "nc-small" : ""}`, children: [
|
|
1176
1176
|
i && /* @__PURE__ */ s("span", { className: `nc-label ${l ? "nc-small" : ""}`, children: i }),
|
|
1177
|
-
/* @__PURE__ */
|
|
1177
|
+
/* @__PURE__ */ k("div", { className: `nc-number-input-container ${l ? "nc-small" : ""}`, children: [
|
|
1178
1178
|
/* @__PURE__ */ s(
|
|
1179
1179
|
"input",
|
|
1180
1180
|
{
|
|
@@ -1212,7 +1212,7 @@ function Un({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
|
|
|
1212
1212
|
] })
|
|
1213
1213
|
] });
|
|
1214
1214
|
}
|
|
1215
|
-
function
|
|
1215
|
+
function Jn({
|
|
1216
1216
|
value: e,
|
|
1217
1217
|
onChange: t,
|
|
1218
1218
|
min: n = 0,
|
|
@@ -1228,9 +1228,9 @@ function qn({
|
|
|
1228
1228
|
const m = parseFloat(d.target.value);
|
|
1229
1229
|
t(m);
|
|
1230
1230
|
}, v = (e - n) / (r - n) * 100;
|
|
1231
|
-
return /* @__PURE__ */
|
|
1231
|
+
return /* @__PURE__ */ k("div", { className: "nc-col", style: { gap: 6 }, children: [
|
|
1232
1232
|
i && /* @__PURE__ */ s("span", { className: "nc-label", children: i }),
|
|
1233
|
-
/* @__PURE__ */
|
|
1233
|
+
/* @__PURE__ */ k("div", { style: { display: "flex", gap: 12, alignItems: "center" }, children: [
|
|
1234
1234
|
/* @__PURE__ */ s(
|
|
1235
1235
|
"input",
|
|
1236
1236
|
{
|
|
@@ -1264,13 +1264,13 @@ function qn({
|
|
|
1264
1264
|
] })
|
|
1265
1265
|
] });
|
|
1266
1266
|
}
|
|
1267
|
-
const
|
|
1267
|
+
const Mt = ({ 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" }) });
|
|
1268
1268
|
function It({ children: e, className: t = "", style: n }) {
|
|
1269
1269
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panel ${t}`, style: n, children: e });
|
|
1270
1270
|
}
|
|
1271
|
-
function
|
|
1272
|
-
const i =
|
|
1273
|
-
(c) =>
|
|
1271
|
+
function Zn({ active: e, children: t, keepMounted: n = !1, className: r = "", style: o }) {
|
|
1272
|
+
const i = pt.toArray(t).filter(
|
|
1273
|
+
(c) => ft(c) && (c.type === It || c.type.displayName === "TabPanel")
|
|
1274
1274
|
);
|
|
1275
1275
|
if (n)
|
|
1276
1276
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: i.map((c) => {
|
|
@@ -1289,89 +1289,89 @@ function Xn({ active: e, children: t, keepMounted: n = !1, className: r = "", st
|
|
|
1289
1289
|
const a = i.find((c) => c.props.tab === e);
|
|
1290
1290
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: a });
|
|
1291
1291
|
}
|
|
1292
|
-
function
|
|
1293
|
-
const f =
|
|
1292
|
+
function Qn({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, className: i, toolbar: a, multiline: c, orientation: l = "horizontal", style: u }) {
|
|
1293
|
+
const f = H(null), [v, d] = E(!1), [m, y] = E(!1), w = l === "verticalLeft" || l === "verticalRight", g = H(!1), N = H(0), b = H(0), p = H(!1);
|
|
1294
1294
|
B(() => {
|
|
1295
1295
|
const x = () => {
|
|
1296
1296
|
if (f.current)
|
|
1297
|
-
if (
|
|
1298
|
-
const { scrollTop: S, scrollHeight: $, clientHeight:
|
|
1299
|
-
d(S > 1), y(S < $ -
|
|
1297
|
+
if (w) {
|
|
1298
|
+
const { scrollTop: S, scrollHeight: $, clientHeight: L } = f.current;
|
|
1299
|
+
d(S > 1), y(S < $ - L - 1);
|
|
1300
1300
|
} else {
|
|
1301
|
-
const { scrollLeft: S, scrollWidth: $, clientWidth:
|
|
1302
|
-
d(S > 1), y(S < $ -
|
|
1301
|
+
const { scrollLeft: S, scrollWidth: $, clientWidth: L } = f.current;
|
|
1302
|
+
d(S > 1), y(S < $ - L - 1);
|
|
1303
1303
|
}
|
|
1304
|
-
},
|
|
1305
|
-
if (
|
|
1306
|
-
return x(),
|
|
1307
|
-
|
|
1304
|
+
}, I = f.current;
|
|
1305
|
+
if (I)
|
|
1306
|
+
return x(), I.addEventListener("scroll", x), window.addEventListener("resize", x), () => {
|
|
1307
|
+
I.removeEventListener("scroll", x), window.removeEventListener("resize", x);
|
|
1308
1308
|
};
|
|
1309
|
-
}, [e,
|
|
1309
|
+
}, [e, w]);
|
|
1310
1310
|
const h = (x) => {
|
|
1311
|
-
f.current && (
|
|
1312
|
-
},
|
|
1313
|
-
if (!
|
|
1314
|
-
const
|
|
1315
|
-
Math.abs(S) > 3 && (p.current = !0),
|
|
1311
|
+
f.current && (g.current = !0, p.current = !1, N.current = w ? x.clientY : x.clientX, b.current = w ? f.current.scrollTop : f.current.scrollLeft, f.current.style.cursor = "grabbing", f.current.style.userSelect = "none");
|
|
1312
|
+
}, A = (x) => {
|
|
1313
|
+
if (!g.current || !f.current) return;
|
|
1314
|
+
const I = w ? x.clientY : x.clientX, S = N.current - I;
|
|
1315
|
+
Math.abs(S) > 3 && (p.current = !0), w ? f.current.scrollTop = b.current + S : f.current.scrollLeft = b.current + S;
|
|
1316
1316
|
}, C = () => {
|
|
1317
|
-
f.current && (
|
|
1317
|
+
f.current && (g.current = !1, f.current.style.cursor = "", f.current.style.userSelect = "");
|
|
1318
1318
|
}, z = () => {
|
|
1319
1319
|
C();
|
|
1320
1320
|
};
|
|
1321
1321
|
B(() => {
|
|
1322
1322
|
const x = f.current;
|
|
1323
|
-
if (!x ||
|
|
1324
|
-
const
|
|
1323
|
+
if (!x || w) return;
|
|
1324
|
+
const I = (S) => {
|
|
1325
1325
|
S.deltaY !== 0 && (S.preventDefault(), x.scrollLeft += S.deltaY * 0.3);
|
|
1326
1326
|
};
|
|
1327
|
-
return x.addEventListener("wheel",
|
|
1328
|
-
x.removeEventListener("wheel",
|
|
1327
|
+
return x.addEventListener("wheel", I, { passive: !1 }), () => {
|
|
1328
|
+
x.removeEventListener("wheel", I);
|
|
1329
1329
|
};
|
|
1330
|
-
}, [
|
|
1330
|
+
}, [w]);
|
|
1331
1331
|
const T = (x) => {
|
|
1332
1332
|
p.current || n(x);
|
|
1333
1333
|
};
|
|
1334
|
-
return /* @__PURE__ */
|
|
1335
|
-
/* @__PURE__ */
|
|
1336
|
-
v && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${
|
|
1334
|
+
return /* @__PURE__ */ k("div", { className: `nc-tab-container ${w ? `nc-vertical nc-${l}` : ""} ${i || ""}`, style: u, children: [
|
|
1335
|
+
/* @__PURE__ */ k("div", { className: "nc-tab-scroll-wrapper", children: [
|
|
1336
|
+
v && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${w ? "nc-top" : "nc-left"}`, children: w ? /* @__PURE__ */ s(Mt, { size: 16 }) : /* @__PURE__ */ s(lt, { size: 16 }) }),
|
|
1337
1337
|
/* @__PURE__ */ s(
|
|
1338
1338
|
"div",
|
|
1339
1339
|
{
|
|
1340
1340
|
ref: f,
|
|
1341
1341
|
className: `nc-tab-scroll ${c ? "nc-multiline" : ""}`,
|
|
1342
1342
|
onMouseDown: h,
|
|
1343
|
-
onMouseMove:
|
|
1343
|
+
onMouseMove: A,
|
|
1344
1344
|
onMouseUp: C,
|
|
1345
1345
|
onMouseLeave: z,
|
|
1346
1346
|
style: { cursor: "grab" },
|
|
1347
1347
|
children: e.map((x) => {
|
|
1348
|
-
const
|
|
1349
|
-
return /* @__PURE__ */
|
|
1348
|
+
const I = typeof x == "string" ? x : x.id, S = typeof x == "string" ? x : x.label, $ = r && !(o != null && o.includes(I));
|
|
1349
|
+
return /* @__PURE__ */ k(
|
|
1350
1350
|
"div",
|
|
1351
1351
|
{
|
|
1352
|
-
className: `nc-tab-item ${t ===
|
|
1353
|
-
onClick: () => T(
|
|
1352
|
+
className: `nc-tab-item ${t === I ? "nc-active" : ""} ${$ ? "nc-closable" : ""}`,
|
|
1353
|
+
onClick: () => T(I),
|
|
1354
1354
|
role: "button",
|
|
1355
1355
|
tabIndex: 0,
|
|
1356
|
-
onKeyDown: (
|
|
1357
|
-
(
|
|
1356
|
+
onKeyDown: (L) => {
|
|
1357
|
+
(L.key === "Enter" || L.key === " ") && n(I);
|
|
1358
1358
|
},
|
|
1359
1359
|
children: [
|
|
1360
|
-
/* @__PURE__ */ s("span", { className: "nc-tab-label", children:
|
|
1360
|
+
/* @__PURE__ */ s("span", { className: "nc-tab-label", children: w ? S : typeof S == "string" ? S.toUpperCase() : S }),
|
|
1361
1361
|
$ && /* @__PURE__ */ s(
|
|
1362
1362
|
"span",
|
|
1363
1363
|
{
|
|
1364
1364
|
className: "nc-tab-close",
|
|
1365
1365
|
role: "button",
|
|
1366
1366
|
tabIndex: 0,
|
|
1367
|
-
"aria-label": `Close ${typeof S == "string" ? S :
|
|
1368
|
-
onClick: (
|
|
1369
|
-
|
|
1367
|
+
"aria-label": `Close ${typeof S == "string" ? S : I}`,
|
|
1368
|
+
onClick: (L) => {
|
|
1369
|
+
L.stopPropagation(), r(I);
|
|
1370
1370
|
},
|
|
1371
|
-
onKeyDown: (
|
|
1372
|
-
(
|
|
1371
|
+
onKeyDown: (L) => {
|
|
1372
|
+
(L.key === "Enter" || L.key === " ") && (L.stopPropagation(), r(I));
|
|
1373
1373
|
},
|
|
1374
|
-
children: /* @__PURE__ */
|
|
1374
|
+
children: /* @__PURE__ */ k("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1375
1375
|
/* @__PURE__ */ s("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1376
1376
|
/* @__PURE__ */ s("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
1377
1377
|
] })
|
|
@@ -1379,18 +1379,18 @@ function Jn({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, cla
|
|
|
1379
1379
|
)
|
|
1380
1380
|
]
|
|
1381
1381
|
},
|
|
1382
|
-
|
|
1382
|
+
I
|
|
1383
1383
|
);
|
|
1384
1384
|
})
|
|
1385
1385
|
}
|
|
1386
1386
|
),
|
|
1387
|
-
m && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${
|
|
1387
|
+
m && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${w ? "nc-bottom" : "nc-right"}`, children: w ? /* @__PURE__ */ s(dt, { size: 16 }) : /* @__PURE__ */ s(ut, { size: 16 }) })
|
|
1388
1388
|
] }),
|
|
1389
1389
|
a && /* @__PURE__ */ s("div", { className: "nc-tab-toolbar", children: a })
|
|
1390
1390
|
] });
|
|
1391
1391
|
}
|
|
1392
|
-
function
|
|
1393
|
-
return /* @__PURE__ */
|
|
1392
|
+
function er({ checked: e, onChange: t, disabled: n, label: r }) {
|
|
1393
|
+
return /* @__PURE__ */ k(
|
|
1394
1394
|
"label",
|
|
1395
1395
|
{
|
|
1396
1396
|
className: "nc-row",
|
|
@@ -1453,12 +1453,12 @@ const ze = [
|
|
|
1453
1453
|
"var(--nc-csv-col-8)",
|
|
1454
1454
|
"var(--nc-csv-col-9)"
|
|
1455
1455
|
];
|
|
1456
|
-
function
|
|
1456
|
+
function Rt(e, t) {
|
|
1457
1457
|
const r = e.slice(0, t).split(`
|
|
1458
1458
|
`), o = r.length, a = r[o - 1].split(" "), c = a.length, l = a[c - 1].length + 1;
|
|
1459
1459
|
return { line: o, column: c, character: l, offset: t };
|
|
1460
1460
|
}
|
|
1461
|
-
function
|
|
1461
|
+
function Et(e, t, n, r) {
|
|
1462
1462
|
const o = e.split(`
|
|
1463
1463
|
`), i = Math.max(1, Math.min(t, o.length));
|
|
1464
1464
|
let a = 0;
|
|
@@ -1470,7 +1470,7 @@ function Rt(e, t, n, r) {
|
|
|
1470
1470
|
const f = Math.max(1, Math.min(r, l[u - 1].length + 1));
|
|
1471
1471
|
return a += f - 1, a;
|
|
1472
1472
|
}
|
|
1473
|
-
function
|
|
1473
|
+
function Lt(e, t) {
|
|
1474
1474
|
const n = e.split(`
|
|
1475
1475
|
`), r = Math.max(1, Math.min(t, n.length));
|
|
1476
1476
|
let o = 0;
|
|
@@ -1478,30 +1478,30 @@ function Et(e, t) {
|
|
|
1478
1478
|
o += n[i].length + 1;
|
|
1479
1479
|
return o;
|
|
1480
1480
|
}
|
|
1481
|
-
const
|
|
1481
|
+
const tr = ht(
|
|
1482
1482
|
function({ value: t, onChange: n, placeholder: r, className: o, style: i, showLineNumbers: a = !1, onCursorChange: c, highlightLine: l }, u) {
|
|
1483
|
-
const f =
|
|
1484
|
-
|
|
1483
|
+
const f = H(null), v = H(null), d = H(null);
|
|
1484
|
+
mt(u, () => ({
|
|
1485
1485
|
goToLine(b) {
|
|
1486
1486
|
const p = f.current;
|
|
1487
1487
|
if (!p) return;
|
|
1488
|
-
const h =
|
|
1488
|
+
const h = Lt(t, b);
|
|
1489
1489
|
p.focus(), p.setSelectionRange(h, h);
|
|
1490
|
-
const
|
|
1491
|
-
p.scrollTop = (Math.max(1, b) - 1) *
|
|
1490
|
+
const A = parseFloat(getComputedStyle(p).lineHeight) || 18;
|
|
1491
|
+
p.scrollTop = (Math.max(1, b) - 1) * A, y(), m();
|
|
1492
1492
|
},
|
|
1493
1493
|
goToPosition(b, p, h) {
|
|
1494
|
-
const
|
|
1495
|
-
if (!
|
|
1496
|
-
const C =
|
|
1497
|
-
|
|
1498
|
-
const z = parseFloat(getComputedStyle(
|
|
1499
|
-
|
|
1494
|
+
const A = f.current;
|
|
1495
|
+
if (!A) return;
|
|
1496
|
+
const C = Et(t, b, p, h);
|
|
1497
|
+
A.focus(), A.setSelectionRange(C, C);
|
|
1498
|
+
const z = parseFloat(getComputedStyle(A).lineHeight) || 18;
|
|
1499
|
+
A.scrollTop = (Math.max(1, b) - 1) * z, y(), m();
|
|
1500
1500
|
}
|
|
1501
1501
|
}), [t]);
|
|
1502
1502
|
const m = O(() => {
|
|
1503
1503
|
if (!c || !f.current) return;
|
|
1504
|
-
const b =
|
|
1504
|
+
const b = Rt(t, f.current.selectionStart);
|
|
1505
1505
|
c(b);
|
|
1506
1506
|
}, [c, t]), y = O(() => {
|
|
1507
1507
|
const b = f.current;
|
|
@@ -1511,33 +1511,33 @@ const Zn = ft(
|
|
|
1511
1511
|
if (l == null || l < 1) return;
|
|
1512
1512
|
const b = f.current;
|
|
1513
1513
|
if (!b) return;
|
|
1514
|
-
const p = parseFloat(getComputedStyle(b).lineHeight) || 18, h = (l - 1) * p,
|
|
1515
|
-
(h < b.scrollTop ||
|
|
1514
|
+
const p = parseFloat(getComputedStyle(b).lineHeight) || 18, h = (l - 1) * p, A = h + p;
|
|
1515
|
+
(h < b.scrollTop || A > b.scrollTop + b.clientHeight) && (b.scrollTop = h - b.clientHeight / 2 + p / 2), y();
|
|
1516
1516
|
}, [l]);
|
|
1517
|
-
const
|
|
1518
|
-
`).length, [t]),
|
|
1517
|
+
const w = be(() => t.split(`
|
|
1518
|
+
`).length, [t]), g = () => {
|
|
1519
1519
|
const b = [];
|
|
1520
|
-
for (let p = 1; p <=
|
|
1520
|
+
for (let p = 1; p <= w; p++)
|
|
1521
1521
|
b.push(
|
|
1522
1522
|
/* @__PURE__ */ s("div", { className: `nc-csv-line-number ${l === p ? "nc-csv-highlight" : ""}`, children: p }, p)
|
|
1523
1523
|
);
|
|
1524
1524
|
return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref: d, children: b });
|
|
1525
|
-
},
|
|
1526
|
-
`).map((h,
|
|
1525
|
+
}, N = (b) => b ? b.split(`
|
|
1526
|
+
`).map((h, A) => {
|
|
1527
1527
|
const C = h.split(" ");
|
|
1528
|
-
return /* @__PURE__ */
|
|
1529
|
-
C.map((z, T) => /* @__PURE__ */
|
|
1528
|
+
return /* @__PURE__ */ k("div", { className: `nc-csv-line ${l === A + 1 ? "nc-csv-highlight" : ""}`, children: [
|
|
1529
|
+
C.map((z, T) => /* @__PURE__ */ k("span", { children: [
|
|
1530
1530
|
T > 0 && /* @__PURE__ */ s("span", { className: "nc-csv-tab-char", children: " " }),
|
|
1531
1531
|
/* @__PURE__ */ s("span", { style: { color: ze[T % ze.length] }, children: z })
|
|
1532
1532
|
] }, T)),
|
|
1533
1533
|
h === "" && `
|
|
1534
1534
|
`
|
|
1535
|
-
] },
|
|
1535
|
+
] }, A);
|
|
1536
1536
|
}) : null;
|
|
1537
|
-
return /* @__PURE__ */
|
|
1538
|
-
a &&
|
|
1539
|
-
/* @__PURE__ */
|
|
1540
|
-
/* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref: v, children: /* @__PURE__ */ s("pre", { className: "nc-csv-textarea-highlights", children:
|
|
1537
|
+
return /* @__PURE__ */ k("div", { className: `nc-csv-textarea-container ${a ? "nc-csv-with-gutter" : ""} ${o ?? ""}`, style: i, children: [
|
|
1538
|
+
a && g(),
|
|
1539
|
+
/* @__PURE__ */ k("div", { className: "nc-csv-textarea-editor", children: [
|
|
1540
|
+
/* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref: v, children: /* @__PURE__ */ s("pre", { className: "nc-csv-textarea-highlights", children: N(t) }) }),
|
|
1541
1541
|
/* @__PURE__ */ s(
|
|
1542
1542
|
"textarea",
|
|
1543
1543
|
{
|
|
@@ -1561,24 +1561,24 @@ const Zn = ft(
|
|
|
1561
1561
|
] });
|
|
1562
1562
|
}
|
|
1563
1563
|
);
|
|
1564
|
-
let
|
|
1565
|
-
const
|
|
1566
|
-
function
|
|
1567
|
-
const e =
|
|
1568
|
-
for (const t of Array.from(
|
|
1564
|
+
let te = { notifications: [] };
|
|
1565
|
+
const we = /* @__PURE__ */ new Set(), Pe = /* @__PURE__ */ new Map();
|
|
1566
|
+
function ye() {
|
|
1567
|
+
const e = te.notifications.slice();
|
|
1568
|
+
for (const t of Array.from(we))
|
|
1569
1569
|
try {
|
|
1570
1570
|
t(e);
|
|
1571
1571
|
} catch {
|
|
1572
1572
|
}
|
|
1573
1573
|
}
|
|
1574
1574
|
function Tt(e) {
|
|
1575
|
-
|
|
1575
|
+
we.add(e);
|
|
1576
1576
|
try {
|
|
1577
|
-
e(
|
|
1577
|
+
e(te.notifications.slice());
|
|
1578
1578
|
} catch {
|
|
1579
1579
|
}
|
|
1580
1580
|
return () => {
|
|
1581
|
-
|
|
1581
|
+
we.delete(e);
|
|
1582
1582
|
};
|
|
1583
1583
|
}
|
|
1584
1584
|
function zt(e) {
|
|
@@ -1589,23 +1589,64 @@ function zt(e) {
|
|
|
1589
1589
|
type: r === "error" ? "danger" : r ?? "info",
|
|
1590
1590
|
duration: n ?? 5e3
|
|
1591
1591
|
};
|
|
1592
|
-
return
|
|
1593
|
-
|
|
1592
|
+
return te.notifications = [i, ...te.notifications], ye(), i.duration && i.duration > 0 && setTimeout(() => {
|
|
1593
|
+
Ve(t);
|
|
1594
1594
|
}, i.duration), t;
|
|
1595
1595
|
}
|
|
1596
|
-
function
|
|
1597
|
-
const t =
|
|
1596
|
+
function Ve(e) {
|
|
1597
|
+
const t = te.notifications.find((r) => r.id === e);
|
|
1598
1598
|
if (!t) return;
|
|
1599
|
-
t.isRemoving = !0,
|
|
1599
|
+
t.isRemoving = !0, ye();
|
|
1600
1600
|
const n = window.setTimeout(() => {
|
|
1601
|
-
|
|
1601
|
+
te.notifications = te.notifications.filter((r) => r.id !== e), ye(), Pe.delete(e);
|
|
1602
1602
|
}, 300);
|
|
1603
1603
|
Pe.set(e, n);
|
|
1604
1604
|
}
|
|
1605
|
-
function Pt({
|
|
1606
|
-
|
|
1605
|
+
function Pt({ type: e }) {
|
|
1606
|
+
switch (e) {
|
|
1607
|
+
case "success":
|
|
1608
|
+
return /* @__PURE__ */ s("svg", { viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ s(
|
|
1609
|
+
"path",
|
|
1610
|
+
{
|
|
1611
|
+
d: "M5 10.5l3.1 3.1L15 6.8",
|
|
1612
|
+
stroke: "currentColor",
|
|
1613
|
+
strokeWidth: "2",
|
|
1614
|
+
strokeLinecap: "round",
|
|
1615
|
+
strokeLinejoin: "round"
|
|
1616
|
+
}
|
|
1617
|
+
) });
|
|
1618
|
+
case "danger":
|
|
1619
|
+
return /* @__PURE__ */ k("svg", { viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
1620
|
+
/* @__PURE__ */ s("circle", { cx: "10", cy: "10", r: "7", stroke: "currentColor", strokeWidth: "2" }),
|
|
1621
|
+
/* @__PURE__ */ s("path", { d: "M10 6.5v4.25", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }),
|
|
1622
|
+
/* @__PURE__ */ s("circle", { cx: "10", cy: "13.75", r: "1", fill: "currentColor" })
|
|
1623
|
+
] });
|
|
1624
|
+
case "warning":
|
|
1625
|
+
return /* @__PURE__ */ k("svg", { viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
1626
|
+
/* @__PURE__ */ s(
|
|
1627
|
+
"path",
|
|
1628
|
+
{
|
|
1629
|
+
d: "M10 3.5 16 15H4L10 3.5Z",
|
|
1630
|
+
stroke: "currentColor",
|
|
1631
|
+
strokeWidth: "2",
|
|
1632
|
+
strokeLinejoin: "round"
|
|
1633
|
+
}
|
|
1634
|
+
),
|
|
1635
|
+
/* @__PURE__ */ s("path", { d: "M10 7.5v3.5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }),
|
|
1636
|
+
/* @__PURE__ */ s("circle", { cx: "10", cy: "13.25", r: "1", fill: "currentColor" })
|
|
1637
|
+
] });
|
|
1638
|
+
default:
|
|
1639
|
+
return /* @__PURE__ */ k("svg", { viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
1640
|
+
/* @__PURE__ */ s("circle", { cx: "10", cy: "10", r: "7", stroke: "currentColor", strokeWidth: "2" }),
|
|
1641
|
+
/* @__PURE__ */ s("path", { d: "M10 9v4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }),
|
|
1642
|
+
/* @__PURE__ */ s("circle", { cx: "10", cy: "6.5", r: "1", fill: "currentColor" })
|
|
1643
|
+
] });
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
function Bt({ notification: e }) {
|
|
1647
|
+
const { t } = U(), n = e.type || "info", r = () => {
|
|
1607
1648
|
if (e.title) return e.title;
|
|
1608
|
-
switch (
|
|
1649
|
+
switch (n) {
|
|
1609
1650
|
case "success":
|
|
1610
1651
|
return t("common.success");
|
|
1611
1652
|
case "danger":
|
|
@@ -1615,32 +1656,34 @@ function Pt({ notification: e }) {
|
|
|
1615
1656
|
default:
|
|
1616
1657
|
return t("common.info");
|
|
1617
1658
|
}
|
|
1618
|
-
},
|
|
1619
|
-
|
|
1659
|
+
}, o = () => {
|
|
1660
|
+
Ve(e.id);
|
|
1620
1661
|
};
|
|
1621
1662
|
return /* @__PURE__ */ s(
|
|
1622
1663
|
"div",
|
|
1623
1664
|
{
|
|
1624
|
-
className: `nc-notification nc-notification-${
|
|
1625
|
-
children: /* @__PURE__ */
|
|
1626
|
-
/* @__PURE__ */
|
|
1627
|
-
|
|
1665
|
+
className: `nc-notification nc-notification-${n}`,
|
|
1666
|
+
children: /* @__PURE__ */ k("div", { className: "nc-notification-content", children: [
|
|
1667
|
+
/* @__PURE__ */ s("div", { className: `nc-notification-icon nc-notification-icon-${n}`, children: /* @__PURE__ */ s(Pt, { type: n }) }),
|
|
1668
|
+
/* @__PURE__ */ k("div", { className: "nc-notification-body", children: [
|
|
1669
|
+
/* @__PURE__ */ s("div", { className: "nc-notification-title", children: r() }),
|
|
1628
1670
|
/* @__PURE__ */ s("div", { className: "nc-notification-message", children: e.message })
|
|
1629
1671
|
] }),
|
|
1630
1672
|
e.dismissible && /* @__PURE__ */ s(
|
|
1631
1673
|
"button",
|
|
1632
1674
|
{
|
|
1633
1675
|
className: "nc-notification-dismiss",
|
|
1634
|
-
onClick:
|
|
1635
|
-
|
|
1676
|
+
onClick: o,
|
|
1677
|
+
"aria-label": t("common.close"),
|
|
1678
|
+
children: /* @__PURE__ */ s(ke, { size: 16 })
|
|
1636
1679
|
}
|
|
1637
1680
|
)
|
|
1638
1681
|
] })
|
|
1639
1682
|
}
|
|
1640
1683
|
);
|
|
1641
1684
|
}
|
|
1642
|
-
function
|
|
1643
|
-
const [e, t] = E([]), [n, r] = E(/* @__PURE__ */ new Map()), [o, i] = E(/* @__PURE__ */ new Set()), a =
|
|
1685
|
+
function nr() {
|
|
1686
|
+
const [e, t] = E([]), [n, r] = E(/* @__PURE__ */ new Map()), [o, i] = E(/* @__PURE__ */ new Set()), a = H(null), c = H([]);
|
|
1644
1687
|
return B(() => Tt((u) => {
|
|
1645
1688
|
const f = new Set(c.current.map((d) => d.id)), v = u.filter((d) => !f.has(d.id)).map((d) => d.id);
|
|
1646
1689
|
v.length > 0 ? (t(u), i(new Set(v)), requestAnimationFrame(() => {
|
|
@@ -1664,10 +1707,11 @@ function er() {
|
|
|
1664
1707
|
{
|
|
1665
1708
|
style: {
|
|
1666
1709
|
position: "fixed",
|
|
1667
|
-
top: "
|
|
1668
|
-
left: "
|
|
1710
|
+
top: "24px",
|
|
1711
|
+
left: "24px",
|
|
1669
1712
|
zIndex: 9999,
|
|
1670
|
-
pointerEvents: "none"
|
|
1713
|
+
pointerEvents: "none",
|
|
1714
|
+
width: "min(340px, calc(100vw - 32px))"
|
|
1671
1715
|
},
|
|
1672
1716
|
children: /* @__PURE__ */ s(
|
|
1673
1717
|
"div",
|
|
@@ -1675,7 +1719,8 @@ function er() {
|
|
|
1675
1719
|
ref: a,
|
|
1676
1720
|
style: {
|
|
1677
1721
|
pointerEvents: "auto",
|
|
1678
|
-
position: "relative"
|
|
1722
|
+
position: "relative",
|
|
1723
|
+
width: "100%"
|
|
1679
1724
|
},
|
|
1680
1725
|
children: e.map((l) => {
|
|
1681
1726
|
const u = o.has(l.id), f = l.isRemoving, v = n.get(l.id) || 0;
|
|
@@ -1686,13 +1731,13 @@ function er() {
|
|
|
1686
1731
|
position: "absolute",
|
|
1687
1732
|
top: 0,
|
|
1688
1733
|
left: 0,
|
|
1689
|
-
transform: u ?
|
|
1734
|
+
transform: u ? `translate3d(-40px, ${v}px, 0)` : `translate3d(0, ${v}px, 0)`,
|
|
1690
1735
|
// Only animate transform when not leaving, animate opacity always
|
|
1691
1736
|
transition: f ? "opacity 300ms ease-out" : "transform 300ms ease-out, opacity 300ms ease-out",
|
|
1692
1737
|
opacity: f ? 0 : 1,
|
|
1693
1738
|
width: "100%"
|
|
1694
1739
|
},
|
|
1695
|
-
children: /* @__PURE__ */ s(
|
|
1740
|
+
children: /* @__PURE__ */ s(Bt, { notification: l })
|
|
1696
1741
|
},
|
|
1697
1742
|
l.id
|
|
1698
1743
|
);
|
|
@@ -1702,13 +1747,13 @@ function er() {
|
|
|
1702
1747
|
}
|
|
1703
1748
|
);
|
|
1704
1749
|
}
|
|
1705
|
-
function
|
|
1750
|
+
function Dt(e) {
|
|
1706
1751
|
return zt(e);
|
|
1707
1752
|
}
|
|
1708
|
-
const
|
|
1709
|
-
show: (e) =>
|
|
1753
|
+
const rr = {
|
|
1754
|
+
show: (e) => Dt(e)
|
|
1710
1755
|
};
|
|
1711
|
-
function
|
|
1756
|
+
function or(e) {
|
|
1712
1757
|
const t = bt.createInstance(), n = {};
|
|
1713
1758
|
for (const o in e)
|
|
1714
1759
|
n[o] = { translation: e[o] };
|
|
@@ -1729,7 +1774,7 @@ function nr(e) {
|
|
|
1729
1774
|
}
|
|
1730
1775
|
}).observe(document.documentElement, { attributes: !0 }), t;
|
|
1731
1776
|
}
|
|
1732
|
-
class
|
|
1777
|
+
class Wt {
|
|
1733
1778
|
constructor() {
|
|
1734
1779
|
q(this, "apps", /* @__PURE__ */ new Map());
|
|
1735
1780
|
}
|
|
@@ -1769,8 +1814,8 @@ class Bt {
|
|
|
1769
1814
|
return this.apps.has(t);
|
|
1770
1815
|
}
|
|
1771
1816
|
}
|
|
1772
|
-
const
|
|
1773
|
-
class
|
|
1817
|
+
const se = new Wt(), Be = "nc-ui-app-state";
|
|
1818
|
+
class Ht {
|
|
1774
1819
|
constructor() {
|
|
1775
1820
|
q(this, "state");
|
|
1776
1821
|
q(this, "listeners", /* @__PURE__ */ new Map());
|
|
@@ -1778,7 +1823,7 @@ class Dt {
|
|
|
1778
1823
|
}
|
|
1779
1824
|
loadState() {
|
|
1780
1825
|
try {
|
|
1781
|
-
const t = localStorage.getItem(
|
|
1826
|
+
const t = localStorage.getItem(Be);
|
|
1782
1827
|
if (t)
|
|
1783
1828
|
return JSON.parse(t);
|
|
1784
1829
|
} catch {
|
|
@@ -1787,7 +1832,7 @@ class Dt {
|
|
|
1787
1832
|
}
|
|
1788
1833
|
saveState() {
|
|
1789
1834
|
try {
|
|
1790
|
-
localStorage.setItem(
|
|
1835
|
+
localStorage.setItem(Be, JSON.stringify(this.state));
|
|
1791
1836
|
} catch {
|
|
1792
1837
|
}
|
|
1793
1838
|
}
|
|
@@ -1817,8 +1862,8 @@ class Dt {
|
|
|
1817
1862
|
(r = this.listeners.get(t)) == null || r.forEach((o) => o(n));
|
|
1818
1863
|
}
|
|
1819
1864
|
}
|
|
1820
|
-
const _ = new
|
|
1821
|
-
class
|
|
1865
|
+
const _ = new Ht();
|
|
1866
|
+
class Ot {
|
|
1822
1867
|
constructor() {
|
|
1823
1868
|
q(this, "apps", []);
|
|
1824
1869
|
q(this, "activeAppId", null);
|
|
@@ -1835,7 +1880,7 @@ class Ht {
|
|
|
1835
1880
|
*/
|
|
1836
1881
|
async launchApp(t, n) {
|
|
1837
1882
|
const { launchInBackground: r = !1 } = n || {};
|
|
1838
|
-
if (!
|
|
1883
|
+
if (!se.has(t))
|
|
1839
1884
|
return console.error(`Cannot launch app "${t}": not registered`), null;
|
|
1840
1885
|
const o = this.apps.find((a) => a.appId === t);
|
|
1841
1886
|
if (o)
|
|
@@ -1911,7 +1956,7 @@ class Ht {
|
|
|
1911
1956
|
* Get the currently active app definition.
|
|
1912
1957
|
*/
|
|
1913
1958
|
getActiveApp() {
|
|
1914
|
-
return this.activeAppId ?
|
|
1959
|
+
return this.activeAppId ? se.get(this.activeAppId) ?? null : null;
|
|
1915
1960
|
}
|
|
1916
1961
|
/**
|
|
1917
1962
|
* Get all running apps.
|
|
@@ -1937,15 +1982,15 @@ class Ht {
|
|
|
1937
1982
|
this.listeners.forEach((t) => t());
|
|
1938
1983
|
}
|
|
1939
1984
|
}
|
|
1940
|
-
const
|
|
1941
|
-
function
|
|
1942
|
-
const e =
|
|
1985
|
+
const V = new Ot(), je = ie(null);
|
|
1986
|
+
function Ft() {
|
|
1987
|
+
const e = Z(je);
|
|
1943
1988
|
if (!e)
|
|
1944
1989
|
throw new Error("useApp must be used inside an App");
|
|
1945
1990
|
return e;
|
|
1946
1991
|
}
|
|
1947
|
-
function
|
|
1948
|
-
return /* @__PURE__ */
|
|
1992
|
+
function Vt({ size: e = 16 }) {
|
|
1993
|
+
return /* @__PURE__ */ k(
|
|
1949
1994
|
"svg",
|
|
1950
1995
|
{
|
|
1951
1996
|
width: e,
|
|
@@ -1963,9 +2008,9 @@ function Ot({ size: e = 16 }) {
|
|
|
1963
2008
|
}
|
|
1964
2009
|
);
|
|
1965
2010
|
}
|
|
1966
|
-
function
|
|
1967
|
-
return /* @__PURE__ */
|
|
1968
|
-
/* @__PURE__ */
|
|
2011
|
+
function jt({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o }) {
|
|
2012
|
+
return /* @__PURE__ */ k("div", { className: "nc-app-title-bar", children: [
|
|
2013
|
+
/* @__PURE__ */ k("div", { className: "nc-app-title-bar-left", children: [
|
|
1969
2014
|
n && !o && /* @__PURE__ */ s(
|
|
1970
2015
|
"button",
|
|
1971
2016
|
{
|
|
@@ -1973,18 +2018,18 @@ function Ft({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o })
|
|
|
1973
2018
|
onClick: n,
|
|
1974
2019
|
title: "Back",
|
|
1975
2020
|
"aria-label": "Go back",
|
|
1976
|
-
children: /* @__PURE__ */ s(
|
|
2021
|
+
children: /* @__PURE__ */ s(Vt, { size: 16 })
|
|
1977
2022
|
}
|
|
1978
2023
|
),
|
|
1979
2024
|
/* @__PURE__ */ s("span", { className: "nc-app-title-bar-title", children: e })
|
|
1980
2025
|
] }),
|
|
1981
|
-
/* @__PURE__ */
|
|
2026
|
+
/* @__PURE__ */ k("div", { className: "nc-app-title-bar-right", children: [
|
|
1982
2027
|
r && /* @__PURE__ */ s("div", { className: "nc-app-title-bar-toolbar", children: r }),
|
|
1983
|
-
/* @__PURE__ */ s(
|
|
2028
|
+
/* @__PURE__ */ s(Oe, { onClick: t, "aria-label": "Close application" })
|
|
1984
2029
|
] })
|
|
1985
2030
|
] });
|
|
1986
2031
|
}
|
|
1987
|
-
class
|
|
2032
|
+
class Gt extends Ne.Component {
|
|
1988
2033
|
constructor(t) {
|
|
1989
2034
|
super(t), this.state = { hasError: !1 };
|
|
1990
2035
|
}
|
|
@@ -1995,7 +2040,7 @@ class Vt extends ke.Component {
|
|
|
1995
2040
|
console.error(`Error loading app ${this.props.appId}:`, t, n);
|
|
1996
2041
|
}
|
|
1997
2042
|
render() {
|
|
1998
|
-
return this.state.hasError ? /* @__PURE__ */
|
|
2043
|
+
return this.state.hasError ? /* @__PURE__ */ k(
|
|
1999
2044
|
"div",
|
|
2000
2045
|
{
|
|
2001
2046
|
style: {
|
|
@@ -2017,16 +2062,16 @@ class Vt extends ke.Component {
|
|
|
2017
2062
|
) : this.props.children;
|
|
2018
2063
|
}
|
|
2019
2064
|
}
|
|
2020
|
-
function
|
|
2021
|
-
const { t: r } = U(), o =
|
|
2022
|
-
|
|
2065
|
+
function Ge({ appId: e, isActive: t, onClose: n }) {
|
|
2066
|
+
const { t: r } = U(), o = se.get(e), [i, a] = E(""), [c, l] = E(null), [u, f] = E(null), [v, d] = E(!1), [m, y] = E(!1);
|
|
2067
|
+
Ne.useEffect(() => {
|
|
2023
2068
|
o != null && o.titleKey && a(r(o.titleKey));
|
|
2024
2069
|
}, [o, r]);
|
|
2025
|
-
const
|
|
2070
|
+
const w = O((x) => {
|
|
2026
2071
|
a(x);
|
|
2027
|
-
}, []),
|
|
2072
|
+
}, []), g = O((x) => {
|
|
2028
2073
|
l(() => x);
|
|
2029
|
-
}, []),
|
|
2074
|
+
}, []), N = O(() => {
|
|
2030
2075
|
l(null);
|
|
2031
2076
|
}, []), b = O((x) => {
|
|
2032
2077
|
f(x);
|
|
@@ -2034,22 +2079,22 @@ function Ye({ appId: e, isActive: t, onClose: n }) {
|
|
|
2034
2079
|
f(null);
|
|
2035
2080
|
}, []), h = O((x) => {
|
|
2036
2081
|
d(x);
|
|
2037
|
-
}, []),
|
|
2082
|
+
}, []), A = O((x) => {
|
|
2038
2083
|
y(x);
|
|
2039
|
-
}, []), C =
|
|
2040
|
-
setTitle:
|
|
2041
|
-
setBackHandler:
|
|
2042
|
-
clearBackHandler:
|
|
2084
|
+
}, []), C = be(() => ({
|
|
2085
|
+
setTitle: w,
|
|
2086
|
+
setBackHandler: g,
|
|
2087
|
+
clearBackHandler: N,
|
|
2043
2088
|
setToolbar: b,
|
|
2044
2089
|
clearToolbar: p,
|
|
2045
2090
|
setHideBackButton: h,
|
|
2046
|
-
setHideTitleBar:
|
|
2091
|
+
setHideTitleBar: A,
|
|
2047
2092
|
close: n
|
|
2048
|
-
}), [
|
|
2093
|
+
}), [w, g, N, b, p, h, A, n]);
|
|
2049
2094
|
if (!o)
|
|
2050
2095
|
return null;
|
|
2051
2096
|
const z = o.component, T = !o.hideTitleBar && !m;
|
|
2052
|
-
return /* @__PURE__ */
|
|
2097
|
+
return /* @__PURE__ */ k(
|
|
2053
2098
|
"div",
|
|
2054
2099
|
{
|
|
2055
2100
|
style: {
|
|
@@ -2060,7 +2105,7 @@ function Ye({ appId: e, isActive: t, onClose: n }) {
|
|
|
2060
2105
|
},
|
|
2061
2106
|
children: [
|
|
2062
2107
|
T && /* @__PURE__ */ s(
|
|
2063
|
-
|
|
2108
|
+
jt,
|
|
2064
2109
|
{
|
|
2065
2110
|
title: i,
|
|
2066
2111
|
onClose: n,
|
|
@@ -2082,8 +2127,8 @@ function Ye({ appId: e, isActive: t, onClose: n }) {
|
|
|
2082
2127
|
backgroundColor: "var(--nc-bg-tertiary)",
|
|
2083
2128
|
position: "relative"
|
|
2084
2129
|
},
|
|
2085
|
-
children: /* @__PURE__ */ s(
|
|
2086
|
-
|
|
2130
|
+
children: /* @__PURE__ */ s(je.Provider, { value: C, children: /* @__PURE__ */ s(Gt, { appId: e, children: /* @__PURE__ */ s(
|
|
2131
|
+
gt,
|
|
2087
2132
|
{
|
|
2088
2133
|
fallback: /* @__PURE__ */ s(
|
|
2089
2134
|
"div",
|
|
@@ -2106,21 +2151,21 @@ function Ye({ appId: e, isActive: t, onClose: n }) {
|
|
|
2106
2151
|
}
|
|
2107
2152
|
);
|
|
2108
2153
|
}
|
|
2109
|
-
const
|
|
2154
|
+
const me = 768, ge = 1024, Ye = {
|
|
2110
2155
|
isMobile: !1,
|
|
2111
2156
|
isTablet: !1,
|
|
2112
2157
|
isDesktop: !0,
|
|
2113
2158
|
width: typeof window < "u" ? window.innerWidth : 1024,
|
|
2114
2159
|
height: typeof window < "u" ? window.innerHeight : 768
|
|
2115
|
-
},
|
|
2116
|
-
function
|
|
2160
|
+
}, Ke = ie(Ye);
|
|
2161
|
+
function sr({ children: e }) {
|
|
2117
2162
|
const [t, n] = E(() => {
|
|
2118
|
-
if (typeof window > "u") return
|
|
2163
|
+
if (typeof window > "u") return Ye;
|
|
2119
2164
|
const r = window.innerWidth, o = window.innerHeight;
|
|
2120
2165
|
return {
|
|
2121
|
-
isMobile: r <
|
|
2122
|
-
isTablet: r >=
|
|
2123
|
-
isDesktop: r >=
|
|
2166
|
+
isMobile: r < me,
|
|
2167
|
+
isTablet: r >= me && r < ge,
|
|
2168
|
+
isDesktop: r >= ge,
|
|
2124
2169
|
width: r,
|
|
2125
2170
|
height: o
|
|
2126
2171
|
};
|
|
@@ -2129,54 +2174,54 @@ function rr({ children: e }) {
|
|
|
2129
2174
|
const r = () => {
|
|
2130
2175
|
const o = window.innerWidth, i = window.innerHeight;
|
|
2131
2176
|
n({
|
|
2132
|
-
isMobile: o <
|
|
2133
|
-
isTablet: o >=
|
|
2134
|
-
isDesktop: o >=
|
|
2177
|
+
isMobile: o < me,
|
|
2178
|
+
isTablet: o >= me && o < ge,
|
|
2179
|
+
isDesktop: o >= ge,
|
|
2135
2180
|
width: o,
|
|
2136
2181
|
height: i
|
|
2137
2182
|
});
|
|
2138
2183
|
};
|
|
2139
2184
|
return window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
|
|
2140
|
-
}, []), /* @__PURE__ */ s(
|
|
2185
|
+
}, []), /* @__PURE__ */ s(Ke.Provider, { value: t, children: e });
|
|
2141
2186
|
}
|
|
2142
|
-
function
|
|
2143
|
-
return
|
|
2187
|
+
function _e() {
|
|
2188
|
+
return Z(Ke);
|
|
2144
2189
|
}
|
|
2145
|
-
const
|
|
2146
|
-
const t =
|
|
2190
|
+
const Ae = "-", Yt = (e) => {
|
|
2191
|
+
const t = _t(e), {
|
|
2147
2192
|
conflictingClassGroups: n,
|
|
2148
2193
|
conflictingClassGroupModifiers: r
|
|
2149
2194
|
} = e;
|
|
2150
2195
|
return {
|
|
2151
2196
|
getClassGroupId: (a) => {
|
|
2152
|
-
const c = a.split(
|
|
2153
|
-
return c[0] === "" && c.length !== 1 && c.shift(),
|
|
2197
|
+
const c = a.split(Ae);
|
|
2198
|
+
return c[0] === "" && c.length !== 1 && c.shift(), Ue(c, t) || Kt(a);
|
|
2154
2199
|
},
|
|
2155
2200
|
getConflictingClassGroupIds: (a, c) => {
|
|
2156
2201
|
const l = n[a] || [];
|
|
2157
2202
|
return c && r[a] ? [...l, ...r[a]] : l;
|
|
2158
2203
|
}
|
|
2159
2204
|
};
|
|
2160
|
-
},
|
|
2205
|
+
}, Ue = (e, t) => {
|
|
2161
2206
|
var a;
|
|
2162
2207
|
if (e.length === 0)
|
|
2163
2208
|
return t.classGroupId;
|
|
2164
|
-
const n = e[0], r = t.nextPart.get(n), o = r ?
|
|
2209
|
+
const n = e[0], r = t.nextPart.get(n), o = r ? Ue(e.slice(1), r) : void 0;
|
|
2165
2210
|
if (o)
|
|
2166
2211
|
return o;
|
|
2167
2212
|
if (t.validators.length === 0)
|
|
2168
2213
|
return;
|
|
2169
|
-
const i = e.join(
|
|
2214
|
+
const i = e.join(Ae);
|
|
2170
2215
|
return (a = t.validators.find(({
|
|
2171
2216
|
validator: c
|
|
2172
2217
|
}) => c(i))) == null ? void 0 : a.classGroupId;
|
|
2173
|
-
},
|
|
2174
|
-
if (
|
|
2175
|
-
const t =
|
|
2218
|
+
}, De = /^\[(.+)\]$/, Kt = (e) => {
|
|
2219
|
+
if (De.test(e)) {
|
|
2220
|
+
const t = De.exec(e)[1], n = t == null ? void 0 : t.substring(0, t.indexOf(":"));
|
|
2176
2221
|
if (n)
|
|
2177
2222
|
return "arbitrary.." + n;
|
|
2178
2223
|
}
|
|
2179
|
-
},
|
|
2224
|
+
}, _t = (e) => {
|
|
2180
2225
|
const {
|
|
2181
2226
|
theme: t,
|
|
2182
2227
|
prefix: n
|
|
@@ -2184,19 +2229,19 @@ const Ne = "-", Yt = (e) => {
|
|
|
2184
2229
|
nextPart: /* @__PURE__ */ new Map(),
|
|
2185
2230
|
validators: []
|
|
2186
2231
|
};
|
|
2187
|
-
return
|
|
2188
|
-
|
|
2232
|
+
return qt(Object.entries(e.classGroups), n).forEach(([i, a]) => {
|
|
2233
|
+
xe(a, r, i, t);
|
|
2189
2234
|
}), r;
|
|
2190
|
-
},
|
|
2235
|
+
}, xe = (e, t, n, r) => {
|
|
2191
2236
|
e.forEach((o) => {
|
|
2192
2237
|
if (typeof o == "string") {
|
|
2193
|
-
const i = o === "" ? t :
|
|
2238
|
+
const i = o === "" ? t : We(t, o);
|
|
2194
2239
|
i.classGroupId = n;
|
|
2195
2240
|
return;
|
|
2196
2241
|
}
|
|
2197
2242
|
if (typeof o == "function") {
|
|
2198
|
-
if (
|
|
2199
|
-
|
|
2243
|
+
if (Ut(o)) {
|
|
2244
|
+
xe(o(r), t, n, r);
|
|
2200
2245
|
return;
|
|
2201
2246
|
}
|
|
2202
2247
|
t.validators.push({
|
|
@@ -2206,21 +2251,21 @@ const Ne = "-", Yt = (e) => {
|
|
|
2206
2251
|
return;
|
|
2207
2252
|
}
|
|
2208
2253
|
Object.entries(o).forEach(([i, a]) => {
|
|
2209
|
-
|
|
2254
|
+
xe(a, We(t, i), n, r);
|
|
2210
2255
|
});
|
|
2211
2256
|
});
|
|
2212
|
-
},
|
|
2257
|
+
}, We = (e, t) => {
|
|
2213
2258
|
let n = e;
|
|
2214
|
-
return t.split(
|
|
2259
|
+
return t.split(Ae).forEach((r) => {
|
|
2215
2260
|
n.nextPart.has(r) || n.nextPart.set(r, {
|
|
2216
2261
|
nextPart: /* @__PURE__ */ new Map(),
|
|
2217
2262
|
validators: []
|
|
2218
2263
|
}), n = n.nextPart.get(r);
|
|
2219
2264
|
}), n;
|
|
2220
|
-
},
|
|
2265
|
+
}, Ut = (e) => e.isThemeGetter, qt = (e, t) => t ? e.map(([n, r]) => {
|
|
2221
2266
|
const o = r.map((i) => typeof i == "string" ? t + i : typeof i == "object" ? Object.fromEntries(Object.entries(i).map(([a, c]) => [t + a, c])) : i);
|
|
2222
2267
|
return [n, o];
|
|
2223
|
-
}) : e,
|
|
2268
|
+
}) : e, Xt = (e) => {
|
|
2224
2269
|
if (e < 1)
|
|
2225
2270
|
return {
|
|
2226
2271
|
get: () => {
|
|
@@ -2244,40 +2289,40 @@ const Ne = "-", Yt = (e) => {
|
|
|
2244
2289
|
n.has(i) ? n.set(i, a) : o(i, a);
|
|
2245
2290
|
}
|
|
2246
2291
|
};
|
|
2247
|
-
},
|
|
2292
|
+
}, qe = "!", Jt = (e) => {
|
|
2248
2293
|
const {
|
|
2249
2294
|
separator: t,
|
|
2250
2295
|
experimentalParseClassName: n
|
|
2251
2296
|
} = e, r = t.length === 1, o = t[0], i = t.length, a = (c) => {
|
|
2252
2297
|
const l = [];
|
|
2253
2298
|
let u = 0, f = 0, v;
|
|
2254
|
-
for (let
|
|
2255
|
-
let
|
|
2299
|
+
for (let g = 0; g < c.length; g++) {
|
|
2300
|
+
let N = c[g];
|
|
2256
2301
|
if (u === 0) {
|
|
2257
|
-
if (
|
|
2258
|
-
l.push(c.slice(f,
|
|
2302
|
+
if (N === o && (r || c.slice(g, g + i) === t)) {
|
|
2303
|
+
l.push(c.slice(f, g)), f = g + i;
|
|
2259
2304
|
continue;
|
|
2260
2305
|
}
|
|
2261
|
-
if (
|
|
2262
|
-
v =
|
|
2306
|
+
if (N === "/") {
|
|
2307
|
+
v = g;
|
|
2263
2308
|
continue;
|
|
2264
2309
|
}
|
|
2265
2310
|
}
|
|
2266
|
-
|
|
2311
|
+
N === "[" ? u++ : N === "]" && u--;
|
|
2267
2312
|
}
|
|
2268
|
-
const d = l.length === 0 ? c : c.substring(f), m = d.startsWith(
|
|
2313
|
+
const d = l.length === 0 ? c : c.substring(f), m = d.startsWith(qe), y = m ? d.substring(1) : d, w = v && v > f ? v - f : void 0;
|
|
2269
2314
|
return {
|
|
2270
2315
|
modifiers: l,
|
|
2271
2316
|
hasImportantModifier: m,
|
|
2272
2317
|
baseClassName: y,
|
|
2273
|
-
maybePostfixModifierPosition:
|
|
2318
|
+
maybePostfixModifierPosition: w
|
|
2274
2319
|
};
|
|
2275
2320
|
};
|
|
2276
2321
|
return n ? (c) => n({
|
|
2277
2322
|
className: c,
|
|
2278
2323
|
parseClassName: a
|
|
2279
2324
|
}) : a;
|
|
2280
|
-
},
|
|
2325
|
+
}, Zt = (e) => {
|
|
2281
2326
|
if (e.length <= 1)
|
|
2282
2327
|
return e;
|
|
2283
2328
|
const t = [];
|
|
@@ -2285,16 +2330,16 @@ const Ne = "-", Yt = (e) => {
|
|
|
2285
2330
|
return e.forEach((r) => {
|
|
2286
2331
|
r[0] === "[" ? (t.push(...n.sort(), r), n = []) : n.push(r);
|
|
2287
2332
|
}), t.push(...n.sort()), t;
|
|
2288
|
-
},
|
|
2289
|
-
cache:
|
|
2290
|
-
parseClassName:
|
|
2333
|
+
}, Qt = (e) => ({
|
|
2334
|
+
cache: Xt(e.cacheSize),
|
|
2335
|
+
parseClassName: Jt(e),
|
|
2291
2336
|
...Yt(e)
|
|
2292
|
-
}),
|
|
2337
|
+
}), en = /\s+/, tn = (e, t) => {
|
|
2293
2338
|
const {
|
|
2294
2339
|
parseClassName: n,
|
|
2295
2340
|
getClassGroupId: r,
|
|
2296
2341
|
getConflictingClassGroupIds: o
|
|
2297
|
-
} = t, i = [], a = e.trim().split(
|
|
2342
|
+
} = t, i = [], a = e.trim().split(en);
|
|
2298
2343
|
let c = "";
|
|
2299
2344
|
for (let l = a.length - 1; l >= 0; l -= 1) {
|
|
2300
2345
|
const u = a[l], {
|
|
@@ -2303,102 +2348,102 @@ const Ne = "-", Yt = (e) => {
|
|
|
2303
2348
|
baseClassName: d,
|
|
2304
2349
|
maybePostfixModifierPosition: m
|
|
2305
2350
|
} = n(u);
|
|
2306
|
-
let y = !!m,
|
|
2307
|
-
if (!
|
|
2351
|
+
let y = !!m, w = r(y ? d.substring(0, m) : d);
|
|
2352
|
+
if (!w) {
|
|
2308
2353
|
if (!y) {
|
|
2309
2354
|
c = u + (c.length > 0 ? " " + c : c);
|
|
2310
2355
|
continue;
|
|
2311
2356
|
}
|
|
2312
|
-
if (
|
|
2357
|
+
if (w = r(d), !w) {
|
|
2313
2358
|
c = u + (c.length > 0 ? " " + c : c);
|
|
2314
2359
|
continue;
|
|
2315
2360
|
}
|
|
2316
2361
|
y = !1;
|
|
2317
2362
|
}
|
|
2318
|
-
const
|
|
2363
|
+
const g = Zt(f).join(":"), N = v ? g + qe : g, b = N + w;
|
|
2319
2364
|
if (i.includes(b))
|
|
2320
2365
|
continue;
|
|
2321
2366
|
i.push(b);
|
|
2322
|
-
const p = o(
|
|
2367
|
+
const p = o(w, y);
|
|
2323
2368
|
for (let h = 0; h < p.length; ++h) {
|
|
2324
|
-
const
|
|
2325
|
-
i.push(
|
|
2369
|
+
const A = p[h];
|
|
2370
|
+
i.push(N + A);
|
|
2326
2371
|
}
|
|
2327
2372
|
c = u + (c.length > 0 ? " " + c : c);
|
|
2328
2373
|
}
|
|
2329
2374
|
return c;
|
|
2330
2375
|
};
|
|
2331
|
-
function
|
|
2376
|
+
function nn() {
|
|
2332
2377
|
let e = 0, t, n, r = "";
|
|
2333
2378
|
for (; e < arguments.length; )
|
|
2334
|
-
(t = arguments[e++]) && (n =
|
|
2379
|
+
(t = arguments[e++]) && (n = Xe(t)) && (r && (r += " "), r += n);
|
|
2335
2380
|
return r;
|
|
2336
2381
|
}
|
|
2337
|
-
const
|
|
2382
|
+
const Xe = (e) => {
|
|
2338
2383
|
if (typeof e == "string")
|
|
2339
2384
|
return e;
|
|
2340
2385
|
let t, n = "";
|
|
2341
2386
|
for (let r = 0; r < e.length; r++)
|
|
2342
|
-
e[r] && (t =
|
|
2387
|
+
e[r] && (t = Xe(e[r])) && (n && (n += " "), n += t);
|
|
2343
2388
|
return n;
|
|
2344
2389
|
};
|
|
2345
|
-
function
|
|
2390
|
+
function rn(e, ...t) {
|
|
2346
2391
|
let n, r, o, i = a;
|
|
2347
2392
|
function a(l) {
|
|
2348
2393
|
const u = t.reduce((f, v) => v(f), e());
|
|
2349
|
-
return n =
|
|
2394
|
+
return n = Qt(u), r = n.cache.get, o = n.cache.set, i = c, c(l);
|
|
2350
2395
|
}
|
|
2351
2396
|
function c(l) {
|
|
2352
2397
|
const u = r(l);
|
|
2353
2398
|
if (u)
|
|
2354
2399
|
return u;
|
|
2355
|
-
const f =
|
|
2400
|
+
const f = tn(l, n);
|
|
2356
2401
|
return o(l, f), f;
|
|
2357
2402
|
}
|
|
2358
2403
|
return function() {
|
|
2359
|
-
return i(
|
|
2404
|
+
return i(nn.apply(null, arguments));
|
|
2360
2405
|
};
|
|
2361
2406
|
}
|
|
2362
|
-
const
|
|
2407
|
+
const D = (e) => {
|
|
2363
2408
|
const t = (n) => n[e] || [];
|
|
2364
2409
|
return t.isThemeGetter = !0, t;
|
|
2365
|
-
},
|
|
2366
|
-
const r =
|
|
2410
|
+
}, Je = /^\[(?:([a-z-]+):)?(.+)\]$/i, on = /^\d+\/\d+$/, sn = /* @__PURE__ */ new Set(["px", "full", "screen"]), cn = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, an = /\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$/, ln = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, dn = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, un = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Y = (e) => oe(e) || sn.has(e) || on.test(e), X = (e) => ce(e, "length", wn), oe = (e) => !!e && !Number.isNaN(Number(e)), ve = (e) => ce(e, "number", oe), le = (e) => !!e && Number.isInteger(Number(e)), pn = (e) => e.endsWith("%") && oe(e.slice(0, -1)), M = (e) => Je.test(e), J = (e) => cn.test(e), fn = /* @__PURE__ */ new Set(["length", "size", "percentage"]), hn = (e) => ce(e, fn, Ze), mn = (e) => ce(e, "position", Ze), gn = /* @__PURE__ */ new Set(["image", "url"]), bn = (e) => ce(e, gn, xn), vn = (e) => ce(e, "", yn), de = () => !0, ce = (e, t, n) => {
|
|
2411
|
+
const r = Je.exec(e);
|
|
2367
2412
|
return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1;
|
|
2368
|
-
},
|
|
2413
|
+
}, wn = (e) => (
|
|
2369
2414
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
2370
2415
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
2371
2416
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
2372
|
-
|
|
2373
|
-
),
|
|
2374
|
-
const e =
|
|
2417
|
+
an.test(e) && !ln.test(e)
|
|
2418
|
+
), Ze = () => !1, yn = (e) => dn.test(e), xn = (e) => un.test(e), kn = () => {
|
|
2419
|
+
const e = D("colors"), t = D("spacing"), n = D("blur"), r = D("brightness"), o = D("borderColor"), i = D("borderRadius"), a = D("borderSpacing"), c = D("borderWidth"), l = D("contrast"), u = D("grayscale"), f = D("hueRotate"), v = D("invert"), d = D("gap"), m = D("gradientColorStops"), y = D("gradientColorStopPositions"), w = D("inset"), g = D("margin"), N = D("opacity"), b = D("padding"), p = D("saturate"), h = D("scale"), A = D("sepia"), C = D("skew"), z = D("space"), T = D("translate"), x = () => ["auto", "contain", "none"], I = () => ["auto", "hidden", "clip", "visible", "scroll"], S = () => ["auto", M, t], $ = () => [M, t], L = () => ["", Y, X], F = () => ["auto", oe, M], Q = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], G = () => ["solid", "dashed", "dotted", "double", "none"], R = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], P = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], W = () => ["", "0", M], ee = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], j = () => [oe, M];
|
|
2375
2420
|
return {
|
|
2376
2421
|
cacheSize: 500,
|
|
2377
2422
|
separator: ":",
|
|
2378
2423
|
theme: {
|
|
2379
|
-
colors: [
|
|
2380
|
-
spacing: [
|
|
2381
|
-
blur: ["none", "", J,
|
|
2382
|
-
brightness:
|
|
2424
|
+
colors: [de],
|
|
2425
|
+
spacing: [Y, X],
|
|
2426
|
+
blur: ["none", "", J, M],
|
|
2427
|
+
brightness: j(),
|
|
2383
2428
|
borderColor: [e],
|
|
2384
|
-
borderRadius: ["none", "", "full", J,
|
|
2429
|
+
borderRadius: ["none", "", "full", J, M],
|
|
2385
2430
|
borderSpacing: $(),
|
|
2386
|
-
borderWidth:
|
|
2387
|
-
contrast:
|
|
2388
|
-
grayscale:
|
|
2389
|
-
hueRotate:
|
|
2390
|
-
invert:
|
|
2431
|
+
borderWidth: L(),
|
|
2432
|
+
contrast: j(),
|
|
2433
|
+
grayscale: W(),
|
|
2434
|
+
hueRotate: j(),
|
|
2435
|
+
invert: W(),
|
|
2391
2436
|
gap: $(),
|
|
2392
2437
|
gradientColorStops: [e],
|
|
2393
|
-
gradientColorStopPositions: [
|
|
2438
|
+
gradientColorStopPositions: [pn, X],
|
|
2394
2439
|
inset: S(),
|
|
2395
2440
|
margin: S(),
|
|
2396
|
-
opacity:
|
|
2441
|
+
opacity: j(),
|
|
2397
2442
|
padding: $(),
|
|
2398
|
-
saturate:
|
|
2399
|
-
scale:
|
|
2400
|
-
sepia:
|
|
2401
|
-
skew:
|
|
2443
|
+
saturate: j(),
|
|
2444
|
+
scale: j(),
|
|
2445
|
+
sepia: W(),
|
|
2446
|
+
skew: j(),
|
|
2402
2447
|
space: $(),
|
|
2403
2448
|
translate: $()
|
|
2404
2449
|
},
|
|
@@ -2409,7 +2454,7 @@ const H = (e) => {
|
|
|
2409
2454
|
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
2410
2455
|
*/
|
|
2411
2456
|
aspect: [{
|
|
2412
|
-
aspect: ["auto", "square", "video",
|
|
2457
|
+
aspect: ["auto", "square", "video", M]
|
|
2413
2458
|
}],
|
|
2414
2459
|
/**
|
|
2415
2460
|
* Container
|
|
@@ -2428,14 +2473,14 @@ const H = (e) => {
|
|
|
2428
2473
|
* @see https://tailwindcss.com/docs/break-after
|
|
2429
2474
|
*/
|
|
2430
2475
|
"break-after": [{
|
|
2431
|
-
"break-after":
|
|
2476
|
+
"break-after": ee()
|
|
2432
2477
|
}],
|
|
2433
2478
|
/**
|
|
2434
2479
|
* Break Before
|
|
2435
2480
|
* @see https://tailwindcss.com/docs/break-before
|
|
2436
2481
|
*/
|
|
2437
2482
|
"break-before": [{
|
|
2438
|
-
"break-before":
|
|
2483
|
+
"break-before": ee()
|
|
2439
2484
|
}],
|
|
2440
2485
|
/**
|
|
2441
2486
|
* Break Inside
|
|
@@ -2494,28 +2539,28 @@ const H = (e) => {
|
|
|
2494
2539
|
* @see https://tailwindcss.com/docs/object-position
|
|
2495
2540
|
*/
|
|
2496
2541
|
"object-position": [{
|
|
2497
|
-
object: [...
|
|
2542
|
+
object: [...Q(), M]
|
|
2498
2543
|
}],
|
|
2499
2544
|
/**
|
|
2500
2545
|
* Overflow
|
|
2501
2546
|
* @see https://tailwindcss.com/docs/overflow
|
|
2502
2547
|
*/
|
|
2503
2548
|
overflow: [{
|
|
2504
|
-
overflow:
|
|
2549
|
+
overflow: I()
|
|
2505
2550
|
}],
|
|
2506
2551
|
/**
|
|
2507
2552
|
* Overflow X
|
|
2508
2553
|
* @see https://tailwindcss.com/docs/overflow
|
|
2509
2554
|
*/
|
|
2510
2555
|
"overflow-x": [{
|
|
2511
|
-
"overflow-x":
|
|
2556
|
+
"overflow-x": I()
|
|
2512
2557
|
}],
|
|
2513
2558
|
/**
|
|
2514
2559
|
* Overflow Y
|
|
2515
2560
|
* @see https://tailwindcss.com/docs/overflow
|
|
2516
2561
|
*/
|
|
2517
2562
|
"overflow-y": [{
|
|
2518
|
-
"overflow-y":
|
|
2563
|
+
"overflow-y": I()
|
|
2519
2564
|
}],
|
|
2520
2565
|
/**
|
|
2521
2566
|
* Overscroll Behavior
|
|
@@ -2548,63 +2593,63 @@ const H = (e) => {
|
|
|
2548
2593
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2549
2594
|
*/
|
|
2550
2595
|
inset: [{
|
|
2551
|
-
inset: [
|
|
2596
|
+
inset: [w]
|
|
2552
2597
|
}],
|
|
2553
2598
|
/**
|
|
2554
2599
|
* Right / Left
|
|
2555
2600
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2556
2601
|
*/
|
|
2557
2602
|
"inset-x": [{
|
|
2558
|
-
"inset-x": [
|
|
2603
|
+
"inset-x": [w]
|
|
2559
2604
|
}],
|
|
2560
2605
|
/**
|
|
2561
2606
|
* Top / Bottom
|
|
2562
2607
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2563
2608
|
*/
|
|
2564
2609
|
"inset-y": [{
|
|
2565
|
-
"inset-y": [
|
|
2610
|
+
"inset-y": [w]
|
|
2566
2611
|
}],
|
|
2567
2612
|
/**
|
|
2568
2613
|
* Start
|
|
2569
2614
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2570
2615
|
*/
|
|
2571
2616
|
start: [{
|
|
2572
|
-
start: [
|
|
2617
|
+
start: [w]
|
|
2573
2618
|
}],
|
|
2574
2619
|
/**
|
|
2575
2620
|
* End
|
|
2576
2621
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2577
2622
|
*/
|
|
2578
2623
|
end: [{
|
|
2579
|
-
end: [
|
|
2624
|
+
end: [w]
|
|
2580
2625
|
}],
|
|
2581
2626
|
/**
|
|
2582
2627
|
* Top
|
|
2583
2628
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2584
2629
|
*/
|
|
2585
2630
|
top: [{
|
|
2586
|
-
top: [
|
|
2631
|
+
top: [w]
|
|
2587
2632
|
}],
|
|
2588
2633
|
/**
|
|
2589
2634
|
* Right
|
|
2590
2635
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2591
2636
|
*/
|
|
2592
2637
|
right: [{
|
|
2593
|
-
right: [
|
|
2638
|
+
right: [w]
|
|
2594
2639
|
}],
|
|
2595
2640
|
/**
|
|
2596
2641
|
* Bottom
|
|
2597
2642
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2598
2643
|
*/
|
|
2599
2644
|
bottom: [{
|
|
2600
|
-
bottom: [
|
|
2645
|
+
bottom: [w]
|
|
2601
2646
|
}],
|
|
2602
2647
|
/**
|
|
2603
2648
|
* Left
|
|
2604
2649
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2605
2650
|
*/
|
|
2606
2651
|
left: [{
|
|
2607
|
-
left: [
|
|
2652
|
+
left: [w]
|
|
2608
2653
|
}],
|
|
2609
2654
|
/**
|
|
2610
2655
|
* Visibility
|
|
@@ -2616,7 +2661,7 @@ const H = (e) => {
|
|
|
2616
2661
|
* @see https://tailwindcss.com/docs/z-index
|
|
2617
2662
|
*/
|
|
2618
2663
|
z: [{
|
|
2619
|
-
z: ["auto",
|
|
2664
|
+
z: ["auto", le, M]
|
|
2620
2665
|
}],
|
|
2621
2666
|
// Flexbox and Grid
|
|
2622
2667
|
/**
|
|
@@ -2645,35 +2690,35 @@ const H = (e) => {
|
|
|
2645
2690
|
* @see https://tailwindcss.com/docs/flex
|
|
2646
2691
|
*/
|
|
2647
2692
|
flex: [{
|
|
2648
|
-
flex: ["1", "auto", "initial", "none",
|
|
2693
|
+
flex: ["1", "auto", "initial", "none", M]
|
|
2649
2694
|
}],
|
|
2650
2695
|
/**
|
|
2651
2696
|
* Flex Grow
|
|
2652
2697
|
* @see https://tailwindcss.com/docs/flex-grow
|
|
2653
2698
|
*/
|
|
2654
2699
|
grow: [{
|
|
2655
|
-
grow:
|
|
2700
|
+
grow: W()
|
|
2656
2701
|
}],
|
|
2657
2702
|
/**
|
|
2658
2703
|
* Flex Shrink
|
|
2659
2704
|
* @see https://tailwindcss.com/docs/flex-shrink
|
|
2660
2705
|
*/
|
|
2661
2706
|
shrink: [{
|
|
2662
|
-
shrink:
|
|
2707
|
+
shrink: W()
|
|
2663
2708
|
}],
|
|
2664
2709
|
/**
|
|
2665
2710
|
* Order
|
|
2666
2711
|
* @see https://tailwindcss.com/docs/order
|
|
2667
2712
|
*/
|
|
2668
2713
|
order: [{
|
|
2669
|
-
order: ["first", "last", "none",
|
|
2714
|
+
order: ["first", "last", "none", le, M]
|
|
2670
2715
|
}],
|
|
2671
2716
|
/**
|
|
2672
2717
|
* Grid Template Columns
|
|
2673
2718
|
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
2674
2719
|
*/
|
|
2675
2720
|
"grid-cols": [{
|
|
2676
|
-
"grid-cols": [
|
|
2721
|
+
"grid-cols": [de]
|
|
2677
2722
|
}],
|
|
2678
2723
|
/**
|
|
2679
2724
|
* Grid Column Start / End
|
|
@@ -2681,8 +2726,8 @@ const H = (e) => {
|
|
|
2681
2726
|
*/
|
|
2682
2727
|
"col-start-end": [{
|
|
2683
2728
|
col: ["auto", {
|
|
2684
|
-
span: ["full",
|
|
2685
|
-
},
|
|
2729
|
+
span: ["full", le, M]
|
|
2730
|
+
}, M]
|
|
2686
2731
|
}],
|
|
2687
2732
|
/**
|
|
2688
2733
|
* Grid Column Start
|
|
@@ -2703,7 +2748,7 @@ const H = (e) => {
|
|
|
2703
2748
|
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
2704
2749
|
*/
|
|
2705
2750
|
"grid-rows": [{
|
|
2706
|
-
"grid-rows": [
|
|
2751
|
+
"grid-rows": [de]
|
|
2707
2752
|
}],
|
|
2708
2753
|
/**
|
|
2709
2754
|
* Grid Row Start / End
|
|
@@ -2711,8 +2756,8 @@ const H = (e) => {
|
|
|
2711
2756
|
*/
|
|
2712
2757
|
"row-start-end": [{
|
|
2713
2758
|
row: ["auto", {
|
|
2714
|
-
span: [
|
|
2715
|
-
},
|
|
2759
|
+
span: [le, M]
|
|
2760
|
+
}, M]
|
|
2716
2761
|
}],
|
|
2717
2762
|
/**
|
|
2718
2763
|
* Grid Row Start
|
|
@@ -2740,14 +2785,14 @@ const H = (e) => {
|
|
|
2740
2785
|
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
2741
2786
|
*/
|
|
2742
2787
|
"auto-cols": [{
|
|
2743
|
-
"auto-cols": ["auto", "min", "max", "fr",
|
|
2788
|
+
"auto-cols": ["auto", "min", "max", "fr", M]
|
|
2744
2789
|
}],
|
|
2745
2790
|
/**
|
|
2746
2791
|
* Grid Auto Rows
|
|
2747
2792
|
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
2748
2793
|
*/
|
|
2749
2794
|
"auto-rows": [{
|
|
2750
|
-
"auto-rows": ["auto", "min", "max", "fr",
|
|
2795
|
+
"auto-rows": ["auto", "min", "max", "fr", M]
|
|
2751
2796
|
}],
|
|
2752
2797
|
/**
|
|
2753
2798
|
* Gap
|
|
@@ -2775,7 +2820,7 @@ const H = (e) => {
|
|
|
2775
2820
|
* @see https://tailwindcss.com/docs/justify-content
|
|
2776
2821
|
*/
|
|
2777
2822
|
"justify-content": [{
|
|
2778
|
-
justify: ["normal", ...
|
|
2823
|
+
justify: ["normal", ...P()]
|
|
2779
2824
|
}],
|
|
2780
2825
|
/**
|
|
2781
2826
|
* Justify Items
|
|
@@ -2796,7 +2841,7 @@ const H = (e) => {
|
|
|
2796
2841
|
* @see https://tailwindcss.com/docs/align-content
|
|
2797
2842
|
*/
|
|
2798
2843
|
"align-content": [{
|
|
2799
|
-
content: ["normal", ...
|
|
2844
|
+
content: ["normal", ...P(), "baseline"]
|
|
2800
2845
|
}],
|
|
2801
2846
|
/**
|
|
2802
2847
|
* Align Items
|
|
@@ -2817,7 +2862,7 @@ const H = (e) => {
|
|
|
2817
2862
|
* @see https://tailwindcss.com/docs/place-content
|
|
2818
2863
|
*/
|
|
2819
2864
|
"place-content": [{
|
|
2820
|
-
"place-content": [...
|
|
2865
|
+
"place-content": [...P(), "baseline"]
|
|
2821
2866
|
}],
|
|
2822
2867
|
/**
|
|
2823
2868
|
* Place Items
|
|
@@ -2902,63 +2947,63 @@ const H = (e) => {
|
|
|
2902
2947
|
* @see https://tailwindcss.com/docs/margin
|
|
2903
2948
|
*/
|
|
2904
2949
|
m: [{
|
|
2905
|
-
m: [
|
|
2950
|
+
m: [g]
|
|
2906
2951
|
}],
|
|
2907
2952
|
/**
|
|
2908
2953
|
* Margin X
|
|
2909
2954
|
* @see https://tailwindcss.com/docs/margin
|
|
2910
2955
|
*/
|
|
2911
2956
|
mx: [{
|
|
2912
|
-
mx: [
|
|
2957
|
+
mx: [g]
|
|
2913
2958
|
}],
|
|
2914
2959
|
/**
|
|
2915
2960
|
* Margin Y
|
|
2916
2961
|
* @see https://tailwindcss.com/docs/margin
|
|
2917
2962
|
*/
|
|
2918
2963
|
my: [{
|
|
2919
|
-
my: [
|
|
2964
|
+
my: [g]
|
|
2920
2965
|
}],
|
|
2921
2966
|
/**
|
|
2922
2967
|
* Margin Start
|
|
2923
2968
|
* @see https://tailwindcss.com/docs/margin
|
|
2924
2969
|
*/
|
|
2925
2970
|
ms: [{
|
|
2926
|
-
ms: [
|
|
2971
|
+
ms: [g]
|
|
2927
2972
|
}],
|
|
2928
2973
|
/**
|
|
2929
2974
|
* Margin End
|
|
2930
2975
|
* @see https://tailwindcss.com/docs/margin
|
|
2931
2976
|
*/
|
|
2932
2977
|
me: [{
|
|
2933
|
-
me: [
|
|
2978
|
+
me: [g]
|
|
2934
2979
|
}],
|
|
2935
2980
|
/**
|
|
2936
2981
|
* Margin Top
|
|
2937
2982
|
* @see https://tailwindcss.com/docs/margin
|
|
2938
2983
|
*/
|
|
2939
2984
|
mt: [{
|
|
2940
|
-
mt: [
|
|
2985
|
+
mt: [g]
|
|
2941
2986
|
}],
|
|
2942
2987
|
/**
|
|
2943
2988
|
* Margin Right
|
|
2944
2989
|
* @see https://tailwindcss.com/docs/margin
|
|
2945
2990
|
*/
|
|
2946
2991
|
mr: [{
|
|
2947
|
-
mr: [
|
|
2992
|
+
mr: [g]
|
|
2948
2993
|
}],
|
|
2949
2994
|
/**
|
|
2950
2995
|
* Margin Bottom
|
|
2951
2996
|
* @see https://tailwindcss.com/docs/margin
|
|
2952
2997
|
*/
|
|
2953
2998
|
mb: [{
|
|
2954
|
-
mb: [
|
|
2999
|
+
mb: [g]
|
|
2955
3000
|
}],
|
|
2956
3001
|
/**
|
|
2957
3002
|
* Margin Left
|
|
2958
3003
|
* @see https://tailwindcss.com/docs/margin
|
|
2959
3004
|
*/
|
|
2960
3005
|
ml: [{
|
|
2961
|
-
ml: [
|
|
3006
|
+
ml: [g]
|
|
2962
3007
|
}],
|
|
2963
3008
|
/**
|
|
2964
3009
|
* Space Between X
|
|
@@ -2990,21 +3035,21 @@ const H = (e) => {
|
|
|
2990
3035
|
* @see https://tailwindcss.com/docs/width
|
|
2991
3036
|
*/
|
|
2992
3037
|
w: [{
|
|
2993
|
-
w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw",
|
|
3038
|
+
w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", M, t]
|
|
2994
3039
|
}],
|
|
2995
3040
|
/**
|
|
2996
3041
|
* Min-Width
|
|
2997
3042
|
* @see https://tailwindcss.com/docs/min-width
|
|
2998
3043
|
*/
|
|
2999
3044
|
"min-w": [{
|
|
3000
|
-
"min-w": [
|
|
3045
|
+
"min-w": [M, t, "min", "max", "fit"]
|
|
3001
3046
|
}],
|
|
3002
3047
|
/**
|
|
3003
3048
|
* Max-Width
|
|
3004
3049
|
* @see https://tailwindcss.com/docs/max-width
|
|
3005
3050
|
*/
|
|
3006
3051
|
"max-w": [{
|
|
3007
|
-
"max-w": [
|
|
3052
|
+
"max-w": [M, t, "none", "full", "min", "max", "fit", "prose", {
|
|
3008
3053
|
screen: [J]
|
|
3009
3054
|
}, J]
|
|
3010
3055
|
}],
|
|
@@ -3013,28 +3058,28 @@ const H = (e) => {
|
|
|
3013
3058
|
* @see https://tailwindcss.com/docs/height
|
|
3014
3059
|
*/
|
|
3015
3060
|
h: [{
|
|
3016
|
-
h: [
|
|
3061
|
+
h: [M, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
3017
3062
|
}],
|
|
3018
3063
|
/**
|
|
3019
3064
|
* Min-Height
|
|
3020
3065
|
* @see https://tailwindcss.com/docs/min-height
|
|
3021
3066
|
*/
|
|
3022
3067
|
"min-h": [{
|
|
3023
|
-
"min-h": [
|
|
3068
|
+
"min-h": [M, t, "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
3024
3069
|
}],
|
|
3025
3070
|
/**
|
|
3026
3071
|
* Max-Height
|
|
3027
3072
|
* @see https://tailwindcss.com/docs/max-height
|
|
3028
3073
|
*/
|
|
3029
3074
|
"max-h": [{
|
|
3030
|
-
"max-h": [
|
|
3075
|
+
"max-h": [M, t, "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
3031
3076
|
}],
|
|
3032
3077
|
/**
|
|
3033
3078
|
* Size
|
|
3034
3079
|
* @see https://tailwindcss.com/docs/size
|
|
3035
3080
|
*/
|
|
3036
3081
|
size: [{
|
|
3037
|
-
size: [
|
|
3082
|
+
size: [M, t, "auto", "min", "max", "fit"]
|
|
3038
3083
|
}],
|
|
3039
3084
|
// Typography
|
|
3040
3085
|
/**
|
|
@@ -3059,14 +3104,14 @@ const H = (e) => {
|
|
|
3059
3104
|
* @see https://tailwindcss.com/docs/font-weight
|
|
3060
3105
|
*/
|
|
3061
3106
|
"font-weight": [{
|
|
3062
|
-
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black",
|
|
3107
|
+
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", ve]
|
|
3063
3108
|
}],
|
|
3064
3109
|
/**
|
|
3065
3110
|
* Font Family
|
|
3066
3111
|
* @see https://tailwindcss.com/docs/font-family
|
|
3067
3112
|
*/
|
|
3068
3113
|
"font-family": [{
|
|
3069
|
-
font: [
|
|
3114
|
+
font: [de]
|
|
3070
3115
|
}],
|
|
3071
3116
|
/**
|
|
3072
3117
|
* Font Variant Numeric
|
|
@@ -3103,35 +3148,35 @@ const H = (e) => {
|
|
|
3103
3148
|
* @see https://tailwindcss.com/docs/letter-spacing
|
|
3104
3149
|
*/
|
|
3105
3150
|
tracking: [{
|
|
3106
|
-
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest",
|
|
3151
|
+
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", M]
|
|
3107
3152
|
}],
|
|
3108
3153
|
/**
|
|
3109
3154
|
* Line Clamp
|
|
3110
3155
|
* @see https://tailwindcss.com/docs/line-clamp
|
|
3111
3156
|
*/
|
|
3112
3157
|
"line-clamp": [{
|
|
3113
|
-
"line-clamp": ["none",
|
|
3158
|
+
"line-clamp": ["none", oe, ve]
|
|
3114
3159
|
}],
|
|
3115
3160
|
/**
|
|
3116
3161
|
* Line Height
|
|
3117
3162
|
* @see https://tailwindcss.com/docs/line-height
|
|
3118
3163
|
*/
|
|
3119
3164
|
leading: [{
|
|
3120
|
-
leading: ["none", "tight", "snug", "normal", "relaxed", "loose",
|
|
3165
|
+
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", Y, M]
|
|
3121
3166
|
}],
|
|
3122
3167
|
/**
|
|
3123
3168
|
* List Style Image
|
|
3124
3169
|
* @see https://tailwindcss.com/docs/list-style-image
|
|
3125
3170
|
*/
|
|
3126
3171
|
"list-image": [{
|
|
3127
|
-
"list-image": ["none",
|
|
3172
|
+
"list-image": ["none", M]
|
|
3128
3173
|
}],
|
|
3129
3174
|
/**
|
|
3130
3175
|
* List Style Type
|
|
3131
3176
|
* @see https://tailwindcss.com/docs/list-style-type
|
|
3132
3177
|
*/
|
|
3133
3178
|
"list-style-type": [{
|
|
3134
|
-
list: ["none", "disc", "decimal",
|
|
3179
|
+
list: ["none", "disc", "decimal", M]
|
|
3135
3180
|
}],
|
|
3136
3181
|
/**
|
|
3137
3182
|
* List Style Position
|
|
@@ -3153,7 +3198,7 @@ const H = (e) => {
|
|
|
3153
3198
|
* @see https://tailwindcss.com/docs/placeholder-opacity
|
|
3154
3199
|
*/
|
|
3155
3200
|
"placeholder-opacity": [{
|
|
3156
|
-
"placeholder-opacity": [
|
|
3201
|
+
"placeholder-opacity": [N]
|
|
3157
3202
|
}],
|
|
3158
3203
|
/**
|
|
3159
3204
|
* Text Alignment
|
|
@@ -3174,7 +3219,7 @@ const H = (e) => {
|
|
|
3174
3219
|
* @see https://tailwindcss.com/docs/text-opacity
|
|
3175
3220
|
*/
|
|
3176
3221
|
"text-opacity": [{
|
|
3177
|
-
"text-opacity": [
|
|
3222
|
+
"text-opacity": [N]
|
|
3178
3223
|
}],
|
|
3179
3224
|
/**
|
|
3180
3225
|
* Text Decoration
|
|
@@ -3186,21 +3231,21 @@ const H = (e) => {
|
|
|
3186
3231
|
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
3187
3232
|
*/
|
|
3188
3233
|
"text-decoration-style": [{
|
|
3189
|
-
decoration: [...
|
|
3234
|
+
decoration: [...G(), "wavy"]
|
|
3190
3235
|
}],
|
|
3191
3236
|
/**
|
|
3192
3237
|
* Text Decoration Thickness
|
|
3193
3238
|
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
3194
3239
|
*/
|
|
3195
3240
|
"text-decoration-thickness": [{
|
|
3196
|
-
decoration: ["auto", "from-font",
|
|
3241
|
+
decoration: ["auto", "from-font", Y, X]
|
|
3197
3242
|
}],
|
|
3198
3243
|
/**
|
|
3199
3244
|
* Text Underline Offset
|
|
3200
3245
|
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
3201
3246
|
*/
|
|
3202
3247
|
"underline-offset": [{
|
|
3203
|
-
"underline-offset": ["auto",
|
|
3248
|
+
"underline-offset": ["auto", Y, M]
|
|
3204
3249
|
}],
|
|
3205
3250
|
/**
|
|
3206
3251
|
* Text Decoration Color
|
|
@@ -3238,7 +3283,7 @@ const H = (e) => {
|
|
|
3238
3283
|
* @see https://tailwindcss.com/docs/vertical-align
|
|
3239
3284
|
*/
|
|
3240
3285
|
"vertical-align": [{
|
|
3241
|
-
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super",
|
|
3286
|
+
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", M]
|
|
3242
3287
|
}],
|
|
3243
3288
|
/**
|
|
3244
3289
|
* Whitespace
|
|
@@ -3266,7 +3311,7 @@ const H = (e) => {
|
|
|
3266
3311
|
* @see https://tailwindcss.com/docs/content
|
|
3267
3312
|
*/
|
|
3268
3313
|
content: [{
|
|
3269
|
-
content: ["none",
|
|
3314
|
+
content: ["none", M]
|
|
3270
3315
|
}],
|
|
3271
3316
|
// Backgrounds
|
|
3272
3317
|
/**
|
|
@@ -3289,7 +3334,7 @@ const H = (e) => {
|
|
|
3289
3334
|
* @see https://tailwindcss.com/docs/background-opacity
|
|
3290
3335
|
*/
|
|
3291
3336
|
"bg-opacity": [{
|
|
3292
|
-
"bg-opacity": [
|
|
3337
|
+
"bg-opacity": [N]
|
|
3293
3338
|
}],
|
|
3294
3339
|
/**
|
|
3295
3340
|
* Background Origin
|
|
@@ -3303,7 +3348,7 @@ const H = (e) => {
|
|
|
3303
3348
|
* @see https://tailwindcss.com/docs/background-position
|
|
3304
3349
|
*/
|
|
3305
3350
|
"bg-position": [{
|
|
3306
|
-
bg: [...
|
|
3351
|
+
bg: [...Q(), mn]
|
|
3307
3352
|
}],
|
|
3308
3353
|
/**
|
|
3309
3354
|
* Background Repeat
|
|
@@ -3319,7 +3364,7 @@ const H = (e) => {
|
|
|
3319
3364
|
* @see https://tailwindcss.com/docs/background-size
|
|
3320
3365
|
*/
|
|
3321
3366
|
"bg-size": [{
|
|
3322
|
-
bg: ["auto", "cover", "contain",
|
|
3367
|
+
bg: ["auto", "cover", "contain", hn]
|
|
3323
3368
|
}],
|
|
3324
3369
|
/**
|
|
3325
3370
|
* Background Image
|
|
@@ -3328,7 +3373,7 @@ const H = (e) => {
|
|
|
3328
3373
|
"bg-image": [{
|
|
3329
3374
|
bg: ["none", {
|
|
3330
3375
|
"gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
3331
|
-
},
|
|
3376
|
+
}, bn]
|
|
3332
3377
|
}],
|
|
3333
3378
|
/**
|
|
3334
3379
|
* Background Color
|
|
@@ -3553,14 +3598,14 @@ const H = (e) => {
|
|
|
3553
3598
|
* @see https://tailwindcss.com/docs/border-opacity
|
|
3554
3599
|
*/
|
|
3555
3600
|
"border-opacity": [{
|
|
3556
|
-
"border-opacity": [
|
|
3601
|
+
"border-opacity": [N]
|
|
3557
3602
|
}],
|
|
3558
3603
|
/**
|
|
3559
3604
|
* Border Style
|
|
3560
3605
|
* @see https://tailwindcss.com/docs/border-style
|
|
3561
3606
|
*/
|
|
3562
3607
|
"border-style": [{
|
|
3563
|
-
border: [...
|
|
3608
|
+
border: [...G(), "hidden"]
|
|
3564
3609
|
}],
|
|
3565
3610
|
/**
|
|
3566
3611
|
* Divide Width X
|
|
@@ -3591,14 +3636,14 @@ const H = (e) => {
|
|
|
3591
3636
|
* @see https://tailwindcss.com/docs/divide-opacity
|
|
3592
3637
|
*/
|
|
3593
3638
|
"divide-opacity": [{
|
|
3594
|
-
"divide-opacity": [
|
|
3639
|
+
"divide-opacity": [N]
|
|
3595
3640
|
}],
|
|
3596
3641
|
/**
|
|
3597
3642
|
* Divide Style
|
|
3598
3643
|
* @see https://tailwindcss.com/docs/divide-style
|
|
3599
3644
|
*/
|
|
3600
3645
|
"divide-style": [{
|
|
3601
|
-
divide:
|
|
3646
|
+
divide: G()
|
|
3602
3647
|
}],
|
|
3603
3648
|
/**
|
|
3604
3649
|
* Border Color
|
|
@@ -3675,21 +3720,21 @@ const H = (e) => {
|
|
|
3675
3720
|
* @see https://tailwindcss.com/docs/outline-style
|
|
3676
3721
|
*/
|
|
3677
3722
|
"outline-style": [{
|
|
3678
|
-
outline: ["", ...
|
|
3723
|
+
outline: ["", ...G()]
|
|
3679
3724
|
}],
|
|
3680
3725
|
/**
|
|
3681
3726
|
* Outline Offset
|
|
3682
3727
|
* @see https://tailwindcss.com/docs/outline-offset
|
|
3683
3728
|
*/
|
|
3684
3729
|
"outline-offset": [{
|
|
3685
|
-
"outline-offset": [
|
|
3730
|
+
"outline-offset": [Y, M]
|
|
3686
3731
|
}],
|
|
3687
3732
|
/**
|
|
3688
3733
|
* Outline Width
|
|
3689
3734
|
* @see https://tailwindcss.com/docs/outline-width
|
|
3690
3735
|
*/
|
|
3691
3736
|
"outline-w": [{
|
|
3692
|
-
outline: [
|
|
3737
|
+
outline: [Y, X]
|
|
3693
3738
|
}],
|
|
3694
3739
|
/**
|
|
3695
3740
|
* Outline Color
|
|
@@ -3703,7 +3748,7 @@ const H = (e) => {
|
|
|
3703
3748
|
* @see https://tailwindcss.com/docs/ring-width
|
|
3704
3749
|
*/
|
|
3705
3750
|
"ring-w": [{
|
|
3706
|
-
ring:
|
|
3751
|
+
ring: L()
|
|
3707
3752
|
}],
|
|
3708
3753
|
/**
|
|
3709
3754
|
* Ring Width Inset
|
|
@@ -3722,14 +3767,14 @@ const H = (e) => {
|
|
|
3722
3767
|
* @see https://tailwindcss.com/docs/ring-opacity
|
|
3723
3768
|
*/
|
|
3724
3769
|
"ring-opacity": [{
|
|
3725
|
-
"ring-opacity": [
|
|
3770
|
+
"ring-opacity": [N]
|
|
3726
3771
|
}],
|
|
3727
3772
|
/**
|
|
3728
3773
|
* Ring Offset Width
|
|
3729
3774
|
* @see https://tailwindcss.com/docs/ring-offset-width
|
|
3730
3775
|
*/
|
|
3731
3776
|
"ring-offset-w": [{
|
|
3732
|
-
"ring-offset": [
|
|
3777
|
+
"ring-offset": [Y, X]
|
|
3733
3778
|
}],
|
|
3734
3779
|
/**
|
|
3735
3780
|
* Ring Offset Color
|
|
@@ -3744,35 +3789,35 @@ const H = (e) => {
|
|
|
3744
3789
|
* @see https://tailwindcss.com/docs/box-shadow
|
|
3745
3790
|
*/
|
|
3746
3791
|
shadow: [{
|
|
3747
|
-
shadow: ["", "inner", "none", J,
|
|
3792
|
+
shadow: ["", "inner", "none", J, vn]
|
|
3748
3793
|
}],
|
|
3749
3794
|
/**
|
|
3750
3795
|
* Box Shadow Color
|
|
3751
3796
|
* @see https://tailwindcss.com/docs/box-shadow-color
|
|
3752
3797
|
*/
|
|
3753
3798
|
"shadow-color": [{
|
|
3754
|
-
shadow: [
|
|
3799
|
+
shadow: [de]
|
|
3755
3800
|
}],
|
|
3756
3801
|
/**
|
|
3757
3802
|
* Opacity
|
|
3758
3803
|
* @see https://tailwindcss.com/docs/opacity
|
|
3759
3804
|
*/
|
|
3760
3805
|
opacity: [{
|
|
3761
|
-
opacity: [
|
|
3806
|
+
opacity: [N]
|
|
3762
3807
|
}],
|
|
3763
3808
|
/**
|
|
3764
3809
|
* Mix Blend Mode
|
|
3765
3810
|
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
3766
3811
|
*/
|
|
3767
3812
|
"mix-blend": [{
|
|
3768
|
-
"mix-blend": [...
|
|
3813
|
+
"mix-blend": [...R(), "plus-lighter", "plus-darker"]
|
|
3769
3814
|
}],
|
|
3770
3815
|
/**
|
|
3771
3816
|
* Background Blend Mode
|
|
3772
3817
|
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
3773
3818
|
*/
|
|
3774
3819
|
"bg-blend": [{
|
|
3775
|
-
"bg-blend":
|
|
3820
|
+
"bg-blend": R()
|
|
3776
3821
|
}],
|
|
3777
3822
|
// Filters
|
|
3778
3823
|
/**
|
|
@@ -3809,7 +3854,7 @@ const H = (e) => {
|
|
|
3809
3854
|
* @see https://tailwindcss.com/docs/drop-shadow
|
|
3810
3855
|
*/
|
|
3811
3856
|
"drop-shadow": [{
|
|
3812
|
-
"drop-shadow": ["", "none", J,
|
|
3857
|
+
"drop-shadow": ["", "none", J, M]
|
|
3813
3858
|
}],
|
|
3814
3859
|
/**
|
|
3815
3860
|
* Grayscale
|
|
@@ -3844,7 +3889,7 @@ const H = (e) => {
|
|
|
3844
3889
|
* @see https://tailwindcss.com/docs/sepia
|
|
3845
3890
|
*/
|
|
3846
3891
|
sepia: [{
|
|
3847
|
-
sepia: [
|
|
3892
|
+
sepia: [A]
|
|
3848
3893
|
}],
|
|
3849
3894
|
/**
|
|
3850
3895
|
* Backdrop Filter
|
|
@@ -3901,7 +3946,7 @@ const H = (e) => {
|
|
|
3901
3946
|
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
3902
3947
|
*/
|
|
3903
3948
|
"backdrop-opacity": [{
|
|
3904
|
-
"backdrop-opacity": [
|
|
3949
|
+
"backdrop-opacity": [N]
|
|
3905
3950
|
}],
|
|
3906
3951
|
/**
|
|
3907
3952
|
* Backdrop Saturate
|
|
@@ -3915,7 +3960,7 @@ const H = (e) => {
|
|
|
3915
3960
|
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
3916
3961
|
*/
|
|
3917
3962
|
"backdrop-sepia": [{
|
|
3918
|
-
"backdrop-sepia": [
|
|
3963
|
+
"backdrop-sepia": [A]
|
|
3919
3964
|
}],
|
|
3920
3965
|
// Tables
|
|
3921
3966
|
/**
|
|
@@ -3966,35 +4011,35 @@ const H = (e) => {
|
|
|
3966
4011
|
* @see https://tailwindcss.com/docs/transition-property
|
|
3967
4012
|
*/
|
|
3968
4013
|
transition: [{
|
|
3969
|
-
transition: ["none", "all", "", "colors", "opacity", "shadow", "transform",
|
|
4014
|
+
transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", M]
|
|
3970
4015
|
}],
|
|
3971
4016
|
/**
|
|
3972
4017
|
* Transition Duration
|
|
3973
4018
|
* @see https://tailwindcss.com/docs/transition-duration
|
|
3974
4019
|
*/
|
|
3975
4020
|
duration: [{
|
|
3976
|
-
duration:
|
|
4021
|
+
duration: j()
|
|
3977
4022
|
}],
|
|
3978
4023
|
/**
|
|
3979
4024
|
* Transition Timing Function
|
|
3980
4025
|
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
3981
4026
|
*/
|
|
3982
4027
|
ease: [{
|
|
3983
|
-
ease: ["linear", "in", "out", "in-out",
|
|
4028
|
+
ease: ["linear", "in", "out", "in-out", M]
|
|
3984
4029
|
}],
|
|
3985
4030
|
/**
|
|
3986
4031
|
* Transition Delay
|
|
3987
4032
|
* @see https://tailwindcss.com/docs/transition-delay
|
|
3988
4033
|
*/
|
|
3989
4034
|
delay: [{
|
|
3990
|
-
delay:
|
|
4035
|
+
delay: j()
|
|
3991
4036
|
}],
|
|
3992
4037
|
/**
|
|
3993
4038
|
* Animation
|
|
3994
4039
|
* @see https://tailwindcss.com/docs/animation
|
|
3995
4040
|
*/
|
|
3996
4041
|
animate: [{
|
|
3997
|
-
animate: ["none", "spin", "ping", "pulse", "bounce",
|
|
4042
|
+
animate: ["none", "spin", "ping", "pulse", "bounce", M]
|
|
3998
4043
|
}],
|
|
3999
4044
|
// Transforms
|
|
4000
4045
|
/**
|
|
@@ -4030,7 +4075,7 @@ const H = (e) => {
|
|
|
4030
4075
|
* @see https://tailwindcss.com/docs/rotate
|
|
4031
4076
|
*/
|
|
4032
4077
|
rotate: [{
|
|
4033
|
-
rotate: [
|
|
4078
|
+
rotate: [le, M]
|
|
4034
4079
|
}],
|
|
4035
4080
|
/**
|
|
4036
4081
|
* Translate X
|
|
@@ -4065,7 +4110,7 @@ const H = (e) => {
|
|
|
4065
4110
|
* @see https://tailwindcss.com/docs/transform-origin
|
|
4066
4111
|
*/
|
|
4067
4112
|
"transform-origin": [{
|
|
4068
|
-
origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left",
|
|
4113
|
+
origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", M]
|
|
4069
4114
|
}],
|
|
4070
4115
|
// Interactivity
|
|
4071
4116
|
/**
|
|
@@ -4087,7 +4132,7 @@ const H = (e) => {
|
|
|
4087
4132
|
* @see https://tailwindcss.com/docs/cursor
|
|
4088
4133
|
*/
|
|
4089
4134
|
cursor: [{
|
|
4090
|
-
cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out",
|
|
4135
|
+
cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", M]
|
|
4091
4136
|
}],
|
|
4092
4137
|
/**
|
|
4093
4138
|
* Caret Color
|
|
@@ -4309,7 +4354,7 @@ const H = (e) => {
|
|
|
4309
4354
|
* @see https://tailwindcss.com/docs/will-change
|
|
4310
4355
|
*/
|
|
4311
4356
|
"will-change": [{
|
|
4312
|
-
"will-change": ["auto", "scroll", "contents", "transform",
|
|
4357
|
+
"will-change": ["auto", "scroll", "contents", "transform", M]
|
|
4313
4358
|
}],
|
|
4314
4359
|
// SVG
|
|
4315
4360
|
/**
|
|
@@ -4324,7 +4369,7 @@ const H = (e) => {
|
|
|
4324
4369
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
4325
4370
|
*/
|
|
4326
4371
|
"stroke-w": [{
|
|
4327
|
-
stroke: [
|
|
4372
|
+
stroke: [Y, X, ve]
|
|
4328
4373
|
}],
|
|
4329
4374
|
/**
|
|
4330
4375
|
* Stroke
|
|
@@ -4399,30 +4444,30 @@ const H = (e) => {
|
|
|
4399
4444
|
"font-size": ["leading"]
|
|
4400
4445
|
}
|
|
4401
4446
|
};
|
|
4402
|
-
},
|
|
4403
|
-
function
|
|
4404
|
-
return
|
|
4447
|
+
}, Nn = /* @__PURE__ */ rn(kn);
|
|
4448
|
+
function An(...e) {
|
|
4449
|
+
return Nn(vt(e));
|
|
4405
4450
|
}
|
|
4406
|
-
function
|
|
4407
|
-
const [r, o] = E(() => _.getActiveAppId()), [i, a] = E(() =>
|
|
4451
|
+
function ir({ autoWidth: e = !0, className: t, style: n }) {
|
|
4452
|
+
const [r, o] = E(() => _.getActiveAppId()), [i, a] = E(() => V.getRunningApps()), { isMobile: c } = _e();
|
|
4408
4453
|
B(() => {
|
|
4409
|
-
const
|
|
4410
|
-
o(
|
|
4454
|
+
const g = _.subscribe("activeAppId", (N) => {
|
|
4455
|
+
o(N);
|
|
4411
4456
|
});
|
|
4412
4457
|
return () => {
|
|
4413
|
-
|
|
4458
|
+
g();
|
|
4414
4459
|
};
|
|
4415
|
-
}, []), B(() =>
|
|
4416
|
-
a(
|
|
4460
|
+
}, []), B(() => V.subscribe(() => {
|
|
4461
|
+
a(V.getRunningApps());
|
|
4417
4462
|
}), []), B(() => {
|
|
4418
4463
|
if (!new URLSearchParams(window.location.search).has("app")) {
|
|
4419
4464
|
const b = _.getActiveAppId();
|
|
4420
|
-
b && !
|
|
4465
|
+
b && !V.isRunning(b) && V.launchApp(b);
|
|
4421
4466
|
}
|
|
4422
4467
|
}, []);
|
|
4423
|
-
const l = (
|
|
4424
|
-
|
|
4425
|
-
}, u = r ?
|
|
4468
|
+
const l = (g) => {
|
|
4469
|
+
V.closeApp(g);
|
|
4470
|
+
}, u = r ? se.get(r) : null, v = (u == null ? void 0 : u.width) ?? 400, d = r !== null, w = { ...{
|
|
4426
4471
|
overflow: "hidden",
|
|
4427
4472
|
display: d ? "flex" : "none",
|
|
4428
4473
|
flexDirection: "column",
|
|
@@ -4430,24 +4475,24 @@ function or({ autoWidth: e = !0, className: t, style: n }) {
|
|
|
4430
4475
|
// Only set width if autoWidth is enabled
|
|
4431
4476
|
...e && d ? { width: c ? "100%" : v } : {}
|
|
4432
4477
|
}, ...n };
|
|
4433
|
-
return /* @__PURE__ */ s("div", { className:
|
|
4434
|
-
|
|
4478
|
+
return /* @__PURE__ */ s("div", { className: An("nc-app-panel", t), style: w, children: i.map((g) => /* @__PURE__ */ s(
|
|
4479
|
+
Ge,
|
|
4435
4480
|
{
|
|
4436
|
-
appId:
|
|
4437
|
-
isActive: r ===
|
|
4438
|
-
onClose: () => l(
|
|
4481
|
+
appId: g.appId,
|
|
4482
|
+
isActive: r === g.appId,
|
|
4483
|
+
onClose: () => l(g.appId)
|
|
4439
4484
|
},
|
|
4440
|
-
|
|
4485
|
+
g.appId
|
|
4441
4486
|
)) });
|
|
4442
4487
|
}
|
|
4443
|
-
function
|
|
4488
|
+
function cr({
|
|
4444
4489
|
pinnedAppIds: e,
|
|
4445
4490
|
className: t = "",
|
|
4446
4491
|
showIndicators: n = !0,
|
|
4447
4492
|
side: r = "left",
|
|
4448
4493
|
getBadge: o
|
|
4449
4494
|
}) {
|
|
4450
|
-
const { t: i } = U(), { isMobile: a } =
|
|
4495
|
+
const { t: i } = U(), { isMobile: a } = _e(), [c, l] = E(() => _.getActiveAppId()), [u, f] = E(() => V.getRunningApps());
|
|
4451
4496
|
B(() => {
|
|
4452
4497
|
const p = _.subscribe("activeAppId", (h) => {
|
|
4453
4498
|
l(h);
|
|
@@ -4455,34 +4500,34 @@ function sr({
|
|
|
4455
4500
|
return () => {
|
|
4456
4501
|
p();
|
|
4457
4502
|
};
|
|
4458
|
-
}, []), B(() =>
|
|
4459
|
-
f(
|
|
4503
|
+
}, []), B(() => V.subscribe(() => {
|
|
4504
|
+
f(V.getRunningApps());
|
|
4460
4505
|
}), []);
|
|
4461
4506
|
const v = (p) => {
|
|
4462
|
-
c === p ?
|
|
4463
|
-
}, d = e.map((p) =>
|
|
4464
|
-
const
|
|
4465
|
-
return
|
|
4507
|
+
c === p ? V.setActiveApp(null) : V.launchApp(p);
|
|
4508
|
+
}, d = e.map((p) => se.get(p)).filter((p) => !!p), m = u.filter((p) => !e.includes(p.appId)).map((p) => ({ running: p, def: se.get(p.appId) })).filter((p) => !!p.def), y = (p) => u.some((h) => h.appId === p), w = (p) => p.titleKey ? String(i(p.titleKey)) : p.id, g = (p) => typeof p == "number" && p > 99 ? "99+" : p, N = (p, h) => {
|
|
4509
|
+
const A = o == null ? void 0 : o(p, h);
|
|
4510
|
+
return A ? /* @__PURE__ */ s(
|
|
4466
4511
|
"span",
|
|
4467
4512
|
{
|
|
4468
|
-
className: `nc-app-taskbar-badge nc-${
|
|
4469
|
-
"aria-label":
|
|
4470
|
-
children:
|
|
4513
|
+
className: `nc-app-taskbar-badge nc-${A.tone ?? "default"}`,
|
|
4514
|
+
"aria-label": A.ariaLabel,
|
|
4515
|
+
children: g(A.content)
|
|
4471
4516
|
}
|
|
4472
4517
|
) : null;
|
|
4473
4518
|
}, b = a ? 24 : 28;
|
|
4474
|
-
return /* @__PURE__ */
|
|
4519
|
+
return /* @__PURE__ */ k("div", { className: `nc-app-taskbar ${a ? "nc-mobile" : "nc-desktop"} nc-${r} ${t}`, children: [
|
|
4475
4520
|
d.map((p) => {
|
|
4476
|
-
const h = p.icon,
|
|
4477
|
-
return /* @__PURE__ */
|
|
4521
|
+
const h = p.icon, A = c === p.id, C = y(p.id), z = { isActive: A, isRunning: C, isPinned: !0 };
|
|
4522
|
+
return /* @__PURE__ */ k(
|
|
4478
4523
|
"button",
|
|
4479
4524
|
{
|
|
4480
|
-
className: `nc-app-taskbar-button ${
|
|
4525
|
+
className: `nc-app-taskbar-button ${A ? "nc-active" : ""} ${C ? "nc-running" : ""}`,
|
|
4481
4526
|
onClick: () => v(p.id),
|
|
4482
|
-
title:
|
|
4527
|
+
title: w(p),
|
|
4483
4528
|
children: [
|
|
4484
4529
|
/* @__PURE__ */ s(h, { size: b }),
|
|
4485
|
-
|
|
4530
|
+
N(p, z),
|
|
4486
4531
|
n && C && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
|
|
4487
4532
|
]
|
|
4488
4533
|
},
|
|
@@ -4491,16 +4536,16 @@ function sr({
|
|
|
4491
4536
|
}),
|
|
4492
4537
|
m.length > 0 && /* @__PURE__ */ s("div", { className: "nc-app-taskbar-separator" }),
|
|
4493
4538
|
m.map(({ running: p, def: h }) => {
|
|
4494
|
-
const
|
|
4495
|
-
return /* @__PURE__ */
|
|
4539
|
+
const A = h.icon, C = c === p.appId, z = { isActive: C, isRunning: !0, isPinned: !1 };
|
|
4540
|
+
return /* @__PURE__ */ k(
|
|
4496
4541
|
"button",
|
|
4497
4542
|
{
|
|
4498
4543
|
className: `nc-app-taskbar-button ${C ? "nc-active" : ""} nc-running`,
|
|
4499
4544
|
onClick: () => v(p.appId),
|
|
4500
|
-
title:
|
|
4545
|
+
title: w(h),
|
|
4501
4546
|
children: [
|
|
4502
|
-
/* @__PURE__ */ s(
|
|
4503
|
-
|
|
4547
|
+
/* @__PURE__ */ s(A, { size: b }),
|
|
4548
|
+
N(h, z),
|
|
4504
4549
|
n && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
|
|
4505
4550
|
]
|
|
4506
4551
|
},
|
|
@@ -4509,7 +4554,7 @@ function sr({
|
|
|
4509
4554
|
})
|
|
4510
4555
|
] });
|
|
4511
4556
|
}
|
|
4512
|
-
function
|
|
4557
|
+
function ar({
|
|
4513
4558
|
appId: e,
|
|
4514
4559
|
open: t,
|
|
4515
4560
|
onClose: n,
|
|
@@ -4533,7 +4578,7 @@ function ir({
|
|
|
4533
4578
|
style: i,
|
|
4534
4579
|
onClick: (l) => l.stopPropagation(),
|
|
4535
4580
|
children: /* @__PURE__ */ s(
|
|
4536
|
-
|
|
4581
|
+
Ge,
|
|
4537
4582
|
{
|
|
4538
4583
|
appId: e,
|
|
4539
4584
|
isActive: !0,
|
|
@@ -4544,43 +4589,43 @@ function ir({
|
|
|
4544
4589
|
)
|
|
4545
4590
|
}
|
|
4546
4591
|
);
|
|
4547
|
-
return
|
|
4592
|
+
return pe(c, document.body);
|
|
4548
4593
|
}
|
|
4549
|
-
const
|
|
4550
|
-
function
|
|
4551
|
-
const e =
|
|
4594
|
+
const Ce = ie(null), Qe = ie(null);
|
|
4595
|
+
function lr() {
|
|
4596
|
+
const e = Z(Ce);
|
|
4552
4597
|
if (!e)
|
|
4553
4598
|
throw new Error("useNavStack must be used within a NavStackProvider");
|
|
4554
4599
|
return e;
|
|
4555
4600
|
}
|
|
4556
|
-
function
|
|
4557
|
-
const e =
|
|
4601
|
+
function dr() {
|
|
4602
|
+
const e = Z(Qe);
|
|
4558
4603
|
if (!e)
|
|
4559
4604
|
throw new Error("useNavView must be used within NavStack");
|
|
4560
4605
|
return e;
|
|
4561
4606
|
}
|
|
4562
|
-
const Se =
|
|
4563
|
-
function
|
|
4564
|
-
const { t: n } = U(), r =
|
|
4607
|
+
const Se = ie(null);
|
|
4608
|
+
function ur({ rootView: e, children: t }) {
|
|
4609
|
+
const { t: n } = U(), r = Ft(), [o, i] = E([e]), [a, c] = E([null]), l = O((h, A) => {
|
|
4565
4610
|
c((C) => {
|
|
4566
4611
|
const z = [...C];
|
|
4567
|
-
return z[h] =
|
|
4612
|
+
return z[h] = A, z;
|
|
4568
4613
|
});
|
|
4569
4614
|
}, []), u = O((h) => {
|
|
4570
|
-
c((
|
|
4571
|
-
const C = [...
|
|
4615
|
+
c((A) => {
|
|
4616
|
+
const C = [...A];
|
|
4572
4617
|
return C[h] = null, C;
|
|
4573
4618
|
});
|
|
4574
4619
|
}, []), f = O((h) => {
|
|
4575
|
-
i((
|
|
4620
|
+
i((A) => [...A, h]), c((A) => [...A, null]);
|
|
4576
4621
|
}, []), v = O(() => {
|
|
4577
4622
|
i((h) => h.length <= 1 ? h : h.slice(0, -1)), c((h) => h.slice(0, -1));
|
|
4578
4623
|
}, []), d = O(() => {
|
|
4579
4624
|
i([e]), c([null]);
|
|
4580
|
-
}, [e]), m = o.length, y = m > 1,
|
|
4625
|
+
}, [e]), m = o.length, y = m > 1, w = o.length - 1, g = o[o.length - 1], N = g != null && g.titleKey ? n(g.titleKey) : (g == null ? void 0 : g.title) ?? "";
|
|
4581
4626
|
B(() => {
|
|
4582
|
-
r.setTitle(
|
|
4583
|
-
}, [
|
|
4627
|
+
r.setTitle(N);
|
|
4628
|
+
}, [N, r]), B(() => {
|
|
4584
4629
|
y ? r.setBackHandler(v) : r.clearBackHandler();
|
|
4585
4630
|
}, [y, v, r]), B(() => {
|
|
4586
4631
|
const h = a[a.length - 1];
|
|
@@ -4592,18 +4637,18 @@ function lr({ rootView: e, children: t }) {
|
|
|
4592
4637
|
reset: d,
|
|
4593
4638
|
depth: m,
|
|
4594
4639
|
canGoBack: y,
|
|
4595
|
-
currentTitle:
|
|
4640
|
+
currentTitle: N
|
|
4596
4641
|
}, p = {
|
|
4597
4642
|
stack: o,
|
|
4598
4643
|
toolbarStack: a,
|
|
4599
4644
|
updateToolbar: l,
|
|
4600
4645
|
clearToolbarAt: u,
|
|
4601
|
-
topIndex:
|
|
4646
|
+
topIndex: w
|
|
4602
4647
|
};
|
|
4603
|
-
return /* @__PURE__ */ s(
|
|
4648
|
+
return /* @__PURE__ */ s(Ce.Provider, { value: b, children: /* @__PURE__ */ s(Se.Provider, { value: p, children: t }) });
|
|
4604
4649
|
}
|
|
4605
|
-
function
|
|
4606
|
-
const n =
|
|
4650
|
+
function Cn({ index: e, children: t }) {
|
|
4651
|
+
const n = Z(Se);
|
|
4607
4652
|
if (!n)
|
|
4608
4653
|
throw new Error("NavViewProvider must be used within NavStackProvider");
|
|
4609
4654
|
const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n, a = O((u) => {
|
|
@@ -4616,14 +4661,14 @@ function Nn({ index: e, children: t }) {
|
|
|
4616
4661
|
};
|
|
4617
4662
|
return /* @__PURE__ */ s(Qe.Provider, { value: l, children: t });
|
|
4618
4663
|
}
|
|
4619
|
-
function
|
|
4620
|
-
const e =
|
|
4664
|
+
function pr() {
|
|
4665
|
+
const e = Z(Ce), t = Z(Se);
|
|
4621
4666
|
if (!e || !t)
|
|
4622
4667
|
throw new Error("NavStackContainer must be used within a NavStackProvider");
|
|
4623
4668
|
const { stack: n } = t;
|
|
4624
4669
|
return /* @__PURE__ */ s("div", { className: "nav-stack-container", children: /* @__PURE__ */ s("div", { className: "nav-stack-content", children: n.map((r, o) => {
|
|
4625
4670
|
const i = o === n.length - 1;
|
|
4626
|
-
return /* @__PURE__ */ s(
|
|
4671
|
+
return /* @__PURE__ */ s(Cn, { index: o, children: /* @__PURE__ */ s(
|
|
4627
4672
|
"div",
|
|
4628
4673
|
{
|
|
4629
4674
|
style: { display: i ? "flex" : "none", flexDirection: "column", height: "100%" },
|
|
@@ -4634,55 +4679,54 @@ function dr() {
|
|
|
4634
4679
|
}
|
|
4635
4680
|
export {
|
|
4636
4681
|
He as ActivityIndicator,
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4682
|
+
zn as Alert,
|
|
4683
|
+
Ge as AppContainer,
|
|
4684
|
+
je as AppContext,
|
|
4685
|
+
ar as AppDialog,
|
|
4686
|
+
ir as AppPanel,
|
|
4687
|
+
cr as AppTaskbar,
|
|
4688
|
+
jt as AppTitleBar,
|
|
4689
|
+
Pn as Battery,
|
|
4645
4690
|
K as Button,
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4691
|
+
Bn as ButtonGroup,
|
|
4692
|
+
Dn as Checkbox,
|
|
4693
|
+
Oe as CloseButton,
|
|
4694
|
+
Wn as ComboBox,
|
|
4695
|
+
jn as ContextMenu,
|
|
4696
|
+
tr as CsvTextArea,
|
|
4697
|
+
Gn as Dialog,
|
|
4698
|
+
re as DialogClose,
|
|
4699
|
+
On as EditButton,
|
|
4700
|
+
Vn as Hyperlink,
|
|
4656
4701
|
Yn as Input,
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4702
|
+
_n as ListGroup,
|
|
4703
|
+
Kn as ListGroupItem,
|
|
4704
|
+
qn as MonthRangePicker,
|
|
4705
|
+
Un as MultiSelect,
|
|
4706
|
+
pr as NavStackContainer,
|
|
4707
|
+
ur as NavStackProvider,
|
|
4708
|
+
Bt as Notification,
|
|
4709
|
+
nr as NotificationContainer,
|
|
4710
|
+
Xn as NumberInput,
|
|
4711
|
+
Hn as RefreshButton,
|
|
4712
|
+
Jn as Slider,
|
|
4668
4713
|
It as TabPanel,
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
oe as appRegistry,
|
|
4714
|
+
Zn as TabPanels,
|
|
4715
|
+
Qn as Tabs,
|
|
4716
|
+
er as Toggle,
|
|
4717
|
+
Fn as TrashButton,
|
|
4718
|
+
sr as ViewportProvider,
|
|
4719
|
+
se as appRegistry,
|
|
4676
4720
|
_ as appStateStore,
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4721
|
+
An as cn,
|
|
4722
|
+
or as createAppI18nFactory,
|
|
4723
|
+
rr as notificationManager,
|
|
4724
|
+
V as runningAppsStore,
|
|
4725
|
+
Dt as showNotification,
|
|
4726
|
+
Ft as useApp,
|
|
4727
|
+
Ct as useDialog,
|
|
4728
|
+
lr as useNavStack,
|
|
4729
|
+
dr as useNavView,
|
|
4730
|
+
_e as useViewport
|
|
4687
4731
|
};
|
|
4688
4732
|
//# sourceMappingURL=index.js.map
|