@kingsimba/nc-ui 0.1.38 → 0.1.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +974 -953
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var ht = Object.defineProperty;
|
|
2
2
|
var mt = (e, t, n) => t in e ? ht(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
-
var
|
|
4
|
-
import { jsx as s, jsxs as
|
|
3
|
+
var se = (e, t, n) => mt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { jsx as s, jsxs as A, Fragment as Pe } from "react/jsx-runtime";
|
|
5
5
|
import { d as Le, E as gt, R as bt, T as vt, g as wt, V as yt, b as xt, a as kt, c as Nt } from "./GeneratedIcons-HFZmBTBT.js";
|
|
6
|
-
import ze, { useState as
|
|
6
|
+
import ze, { useState as E, useRef as Y, useEffect as V, useMemo as Ie, createContext as ge, useContext as ae, Children as At, isValidElement as St, forwardRef as Ct, useImperativeHandle as Mt, useCallback as X, Suspense as It } from "react";
|
|
7
7
|
import { createPortal as Ae } from "react-dom";
|
|
8
|
-
import { useTranslation as
|
|
8
|
+
import { useTranslation as oe } from "react-i18next";
|
|
9
9
|
import $t from "i18next";
|
|
10
10
|
import { c as Rt } from "./clsx-OuTLNxxd.js";
|
|
11
11
|
function Qe({
|
|
@@ -37,7 +37,7 @@ function Qe({
|
|
|
37
37
|
);
|
|
38
38
|
return n ? /* @__PURE__ */ s("div", { className: "nc-activity-indicator-overlay", children: o }) : o;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function ne({ variant: e = "default", block: t, size: n = "default", appearance: r = "default", className: o, disabled: i, textSelectable: a, loading: c, onClick: l, children: u, ...f }) {
|
|
41
41
|
const w = [
|
|
42
42
|
"nc-button",
|
|
43
43
|
e !== "default" ? `nc-${e}` : "",
|
|
@@ -50,22 +50,22 @@ function te({ variant: e = "default", block: t, size: n = "default", appearance:
|
|
|
50
50
|
c ? "nc-loading" : "",
|
|
51
51
|
o ?? ""
|
|
52
52
|
].filter(Boolean).join(" ");
|
|
53
|
-
return /* @__PURE__ */
|
|
53
|
+
return /* @__PURE__ */ A(
|
|
54
54
|
"button",
|
|
55
55
|
{
|
|
56
56
|
className: w,
|
|
57
57
|
disabled: i || c,
|
|
58
|
-
onClick: (
|
|
58
|
+
onClick: (g) => {
|
|
59
59
|
if (!c) {
|
|
60
60
|
if (a) {
|
|
61
|
-
const
|
|
62
|
-
if (
|
|
61
|
+
const k = window.getSelection();
|
|
62
|
+
if (k && k.toString().length > 0)
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
|
-
l == null || l(
|
|
65
|
+
l == null || l(g);
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
|
-
...
|
|
68
|
+
...f,
|
|
69
69
|
children: [
|
|
70
70
|
c && /* @__PURE__ */ s(
|
|
71
71
|
Qe,
|
|
@@ -75,7 +75,7 @@ function te({ variant: e = "default", block: t, size: n = "default", appearance:
|
|
|
75
75
|
color: r === "transparent" || e !== "default" && e !== "ghost" ? "white" : void 0
|
|
76
76
|
}
|
|
77
77
|
),
|
|
78
|
-
|
|
78
|
+
u
|
|
79
79
|
]
|
|
80
80
|
}
|
|
81
81
|
);
|
|
@@ -98,13 +98,13 @@ function Un({
|
|
|
98
98
|
className: c = "",
|
|
99
99
|
style: l
|
|
100
100
|
}) {
|
|
101
|
-
const
|
|
101
|
+
const u = i ?? /* @__PURE__ */ A(Pe, { children: [
|
|
102
102
|
e !== void 0 && /* @__PURE__ */ s("span", { className: "nc-alert-code", children: e }),
|
|
103
103
|
t
|
|
104
104
|
] });
|
|
105
|
-
return /* @__PURE__ */
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
-
/* @__PURE__ */ s("div", { className: `nc-alert-message nc-${n}`, children:
|
|
105
|
+
return /* @__PURE__ */ A("div", { className: `nc-alert nc-${n} ${c}`.trim(), style: l, children: [
|
|
106
|
+
/* @__PURE__ */ A("div", { className: "nc-alert-main", children: [
|
|
107
|
+
/* @__PURE__ */ s("div", { className: `nc-alert-message nc-${n}`, children: u }),
|
|
108
108
|
a && /* @__PURE__ */ s(
|
|
109
109
|
"button",
|
|
110
110
|
{
|
|
@@ -117,7 +117,7 @@ function Un({
|
|
|
117
117
|
)
|
|
118
118
|
] }),
|
|
119
119
|
r && /* @__PURE__ */ s("span", { className: "nc-alert-action", children: /* @__PURE__ */ s(
|
|
120
|
-
|
|
120
|
+
ne,
|
|
121
121
|
{
|
|
122
122
|
size: "small",
|
|
123
123
|
variant: r.variant ?? Tt[n],
|
|
@@ -136,8 +136,8 @@ function qn({
|
|
|
136
136
|
const o = Math.max(0, Math.min(1, Number(e) || 0)), i = o === 0 ? "-" : String(Math.round(o * 100));
|
|
137
137
|
let a;
|
|
138
138
|
r ? o < 0.1 ? a = "var(--nc-danger)" : o < 0.2 ? a = "var(--nc-warning)" : a = "var(--nc-success)" : a = n ? "rgba(255,255,255,0.35)" : "#000000";
|
|
139
|
-
const c = "var(--nc-battery-shell-bg)", l = 24,
|
|
140
|
-
return /* @__PURE__ */
|
|
139
|
+
const c = "var(--nc-battery-shell-bg)", l = 24, u = 14, f = 2, w = 0, d = 12, g = 0, k = 0, b = 0, v = l, y = u, h = y - g * 2, p = v - g * 2, m = Math.max(1, Math.min(4, y / 4)), N = o === 0 ? 0 : 0.05 + o * 0.95, C = l + f + d, P = 20, B = 0.65, S = Math.max(u, P * B), L = l + f + 1, x = (u - P * B) / 2;
|
|
140
|
+
return /* @__PURE__ */ A(
|
|
141
141
|
"svg",
|
|
142
142
|
{
|
|
143
143
|
className: "nc-battery",
|
|
@@ -147,37 +147,37 @@ function qn({
|
|
|
147
147
|
role: "img",
|
|
148
148
|
"aria-label": `Battery ${i === "-" ? "-" : `${i}%`} ${t}`,
|
|
149
149
|
children: [
|
|
150
|
-
/* @__PURE__ */ s("defs", { children: /* @__PURE__ */ s("mask", { id: `nc-battery-fill-mask-${o}`, children: /* @__PURE__ */ s("rect", { x: "0", y: "0", width:
|
|
150
|
+
/* @__PURE__ */ s("defs", { children: /* @__PURE__ */ s("mask", { id: `nc-battery-fill-mask-${o}`, children: /* @__PURE__ */ s("rect", { x: "0", y: "0", width: p * N, height: h, fill: "white" }) }) }),
|
|
151
151
|
/* @__PURE__ */ s(
|
|
152
152
|
"rect",
|
|
153
153
|
{
|
|
154
|
-
x:
|
|
155
|
-
y:
|
|
156
|
-
rx:
|
|
157
|
-
ry:
|
|
158
|
-
width:
|
|
159
|
-
height:
|
|
154
|
+
x: k,
|
|
155
|
+
y: b,
|
|
156
|
+
rx: m,
|
|
157
|
+
ry: m,
|
|
158
|
+
width: v,
|
|
159
|
+
height: y,
|
|
160
160
|
fill: c
|
|
161
161
|
}
|
|
162
162
|
),
|
|
163
163
|
/* @__PURE__ */ s(
|
|
164
164
|
"rect",
|
|
165
165
|
{
|
|
166
|
-
x:
|
|
167
|
-
y:
|
|
168
|
-
width:
|
|
169
|
-
height:
|
|
166
|
+
x: k + g,
|
|
167
|
+
y: b + g,
|
|
168
|
+
width: p,
|
|
169
|
+
height: h,
|
|
170
170
|
fill: a,
|
|
171
|
-
rx:
|
|
172
|
-
ry:
|
|
171
|
+
rx: m,
|
|
172
|
+
ry: m,
|
|
173
173
|
mask: `url(#nc-battery-fill-mask-${o})`
|
|
174
174
|
}
|
|
175
175
|
),
|
|
176
176
|
/* @__PURE__ */ s(
|
|
177
177
|
"text",
|
|
178
178
|
{
|
|
179
|
-
x:
|
|
180
|
-
y:
|
|
179
|
+
x: k + v / 2,
|
|
180
|
+
y: u - 3,
|
|
181
181
|
fontSize: 11,
|
|
182
182
|
fontWeight: "bold",
|
|
183
183
|
fill: "var(--nc-battery-text-contrast)",
|
|
@@ -189,15 +189,15 @@ function qn({
|
|
|
189
189
|
"rect",
|
|
190
190
|
{
|
|
191
191
|
x: l + w,
|
|
192
|
-
y:
|
|
193
|
-
width:
|
|
194
|
-
height:
|
|
192
|
+
y: u * 0.26,
|
|
193
|
+
width: f,
|
|
194
|
+
height: u * 0.48,
|
|
195
195
|
rx: 0.8,
|
|
196
196
|
ry: 0.8,
|
|
197
197
|
fill: o === 1 ? a : c
|
|
198
198
|
}
|
|
199
199
|
),
|
|
200
|
-
t === "charging" ? /* @__PURE__ */ s("g", { transform: `translate(${
|
|
200
|
+
t === "charging" ? /* @__PURE__ */ s("g", { transform: `translate(${L}, ${x}) scale(${B})`, fill: a, children: /* @__PURE__ */ s("path", { d: "M10 0 L2 11 H8 L5 20 L14 8 H8 L10 0 Z" }) }) : null
|
|
201
201
|
]
|
|
202
202
|
}
|
|
203
203
|
);
|
|
@@ -224,7 +224,7 @@ function Xn({
|
|
|
224
224
|
);
|
|
225
225
|
}) });
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function Et({ size: e }) {
|
|
228
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(
|
|
229
229
|
"path",
|
|
230
230
|
{
|
|
@@ -238,13 +238,13 @@ function Pt({ size: e }) {
|
|
|
238
238
|
}
|
|
239
239
|
function Jn({ checked: e, onChange: t, disabled: n, label: r, size: o = "default", labelColor: i, style: a, className: c = "" }) {
|
|
240
240
|
const l = o === "small";
|
|
241
|
-
return /* @__PURE__ */
|
|
241
|
+
return /* @__PURE__ */ A(
|
|
242
242
|
"label",
|
|
243
243
|
{
|
|
244
244
|
className: `nc-checkbox-label ${l ? "nc-small" : ""} ${n ? "nc-disabled" : ""} ${c}`.trim(),
|
|
245
245
|
style: a,
|
|
246
|
-
onClick: (
|
|
247
|
-
n || (
|
|
246
|
+
onClick: (u) => {
|
|
247
|
+
n || (u.preventDefault(), t(!e));
|
|
248
248
|
},
|
|
249
249
|
children: [
|
|
250
250
|
/* @__PURE__ */ s(
|
|
@@ -254,10 +254,10 @@ function Jn({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
|
|
|
254
254
|
"aria-checked": e,
|
|
255
255
|
tabIndex: 0,
|
|
256
256
|
className: `nc-checkbox-box ${l ? "nc-small" : ""} ${e ? "nc-checked" : ""}`,
|
|
257
|
-
onKeyDown: (
|
|
258
|
-
n || (
|
|
257
|
+
onKeyDown: (u) => {
|
|
258
|
+
n || (u.key === "Enter" || u.key === " ") && (u.preventDefault(), t(!e));
|
|
259
259
|
},
|
|
260
|
-
children: e && /* @__PURE__ */ s(
|
|
260
|
+
children: e && /* @__PURE__ */ s(Et, { size: o })
|
|
261
261
|
}
|
|
262
262
|
),
|
|
263
263
|
r && /* @__PURE__ */ s("span", { className: "nc-checkbox-text", style: i ? { color: i } : void 0, children: r })
|
|
@@ -265,29 +265,29 @@ function Jn({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
|
|
|
265
265
|
}
|
|
266
266
|
);
|
|
267
267
|
}
|
|
268
|
-
function
|
|
269
|
-
const c =
|
|
270
|
-
return
|
|
268
|
+
function Pt({ option: e, onChange: t, selected: n, highlighted: r, small: o, renderOption: i, index: a }) {
|
|
269
|
+
const c = Y(null), { t: l } = oe(), u = e.disabled === !0;
|
|
270
|
+
return V(() => {
|
|
271
271
|
r && c.current && c.current.scrollIntoView({ block: "nearest" });
|
|
272
272
|
}, [r]), /* @__PURE__ */ s(
|
|
273
273
|
"div",
|
|
274
274
|
{
|
|
275
275
|
ref: c,
|
|
276
|
-
className: `nc-combo-dropdown-option ${o ? "nc-small" : ""} ${r ? "nc-highlighted" : ""} ${
|
|
276
|
+
className: `nc-combo-dropdown-option ${o ? "nc-small" : ""} ${r ? "nc-highlighted" : ""} ${u ? "nc-disabled" : ""}`,
|
|
277
277
|
role: "option",
|
|
278
278
|
onClick: () => {
|
|
279
|
-
|
|
279
|
+
u || t(e.value, e.label);
|
|
280
280
|
},
|
|
281
281
|
"aria-selected": n,
|
|
282
|
-
"aria-disabled":
|
|
282
|
+
"aria-disabled": u,
|
|
283
283
|
style: {
|
|
284
|
-
cursor:
|
|
285
|
-
opacity:
|
|
286
|
-
background: r && !
|
|
284
|
+
cursor: u ? "default" : "pointer",
|
|
285
|
+
opacity: u ? 0.4 : void 0,
|
|
286
|
+
background: r && !u ? "rgba(59,130,246,0.18)" : n && !u ? "rgba(59,130,246,0.12)" : void 0
|
|
287
287
|
},
|
|
288
|
-
children: i ? i(e, a, !!r) : /* @__PURE__ */
|
|
288
|
+
children: i ? i(e, a, !!r) : /* @__PURE__ */ A(Pe, { children: [
|
|
289
289
|
e.label,
|
|
290
|
-
e.default && /* @__PURE__ */
|
|
290
|
+
e.default && /* @__PURE__ */ A("span", { style: { fontSize: "0.85em", color: "var(--nc-text-weak)", marginLeft: 6 }, children: [
|
|
291
291
|
"(",
|
|
292
292
|
l("common.default"),
|
|
293
293
|
")"
|
|
@@ -307,41 +307,41 @@ function Lt({
|
|
|
307
307
|
highlightedIndex: c = -1,
|
|
308
308
|
renderOption: l
|
|
309
309
|
}) {
|
|
310
|
-
const [
|
|
311
|
-
if (
|
|
310
|
+
const [u, f] = E({ top: 0, left: 0, width: 0 }), [w, d] = E(o), { t: g } = oe();
|
|
311
|
+
if (V(() => {
|
|
312
312
|
if (e && i.current) {
|
|
313
|
-
const
|
|
314
|
-
let
|
|
313
|
+
const b = i.current.getBoundingClientRect();
|
|
314
|
+
let v = o;
|
|
315
315
|
if (o === "bottom") {
|
|
316
|
-
const
|
|
317
|
-
|
|
316
|
+
const y = window.innerHeight - b.bottom, h = b.top;
|
|
317
|
+
y < 320 && h > y && (v = "top");
|
|
318
318
|
}
|
|
319
|
-
|
|
320
|
-
top:
|
|
321
|
-
left:
|
|
322
|
-
width:
|
|
319
|
+
d(v), f({
|
|
320
|
+
top: v === "top" ? b.top - 4 : b.bottom + 4,
|
|
321
|
+
left: b.left,
|
|
322
|
+
width: b.width
|
|
323
323
|
});
|
|
324
324
|
}
|
|
325
325
|
}, [e, i, o]), !e) return null;
|
|
326
|
-
const
|
|
326
|
+
const k = /* @__PURE__ */ s(
|
|
327
327
|
"div",
|
|
328
328
|
{
|
|
329
329
|
className: "nc-combo-dropdown",
|
|
330
|
-
onMouseDown: (
|
|
330
|
+
onMouseDown: (b) => b.stopPropagation(),
|
|
331
331
|
style: {
|
|
332
332
|
position: "fixed",
|
|
333
|
-
top: w === "top" ? void 0 :
|
|
334
|
-
bottom: w === "top" ? window.innerHeight -
|
|
335
|
-
left:
|
|
336
|
-
width:
|
|
333
|
+
top: w === "top" ? void 0 : u.top,
|
|
334
|
+
bottom: w === "top" ? window.innerHeight - u.top : void 0,
|
|
335
|
+
left: u.left,
|
|
336
|
+
width: u.width,
|
|
337
337
|
zIndex: 1e3,
|
|
338
338
|
maxHeight: 300,
|
|
339
339
|
overflowY: "auto"
|
|
340
340
|
},
|
|
341
|
-
children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${a ? "nc-small" : ""}`, children:
|
|
341
|
+
children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${a ? "nc-small" : ""}`, children: g("common.noResults") }) : t.map((b, v) => /* @__PURE__ */ s(Pt, { option: b, onChange: n, selected: b.value === r, highlighted: v === c, small: a, renderOption: l, index: v }, b.value))
|
|
342
342
|
}
|
|
343
343
|
);
|
|
344
|
-
return Ae(
|
|
344
|
+
return Ae(k, document.body);
|
|
345
345
|
}
|
|
346
346
|
function zt({ onClick: e, small: t }) {
|
|
347
347
|
return /* @__PURE__ */ s(
|
|
@@ -382,155 +382,155 @@ function Qn({
|
|
|
382
382
|
renderSelected: a,
|
|
383
383
|
selectedOption: c,
|
|
384
384
|
disabled: l,
|
|
385
|
-
label:
|
|
386
|
-
clearable:
|
|
385
|
+
label: u,
|
|
386
|
+
clearable: f = !0,
|
|
387
387
|
allowTyping: w = !1,
|
|
388
|
-
placement:
|
|
389
|
-
size:
|
|
390
|
-
appearance:
|
|
391
|
-
textAlign:
|
|
392
|
-
style:
|
|
393
|
-
className:
|
|
388
|
+
placement: d = "bottom",
|
|
389
|
+
size: g = "default",
|
|
390
|
+
appearance: k = "default",
|
|
391
|
+
textAlign: b = "left",
|
|
392
|
+
style: v,
|
|
393
|
+
className: y
|
|
394
394
|
}) {
|
|
395
|
-
const [
|
|
395
|
+
const [h, p] = E(!1), [m, N] = E(""), [C, P] = E(-1), B = Y(null), S = Y(null), L = Y(null), x = g === "small", { t: M } = oe(), z = !!o, F = w || z, [$, T] = E([]), [H, q] = E(() => {
|
|
396
396
|
if (r && e) {
|
|
397
|
-
const R = r.find((
|
|
397
|
+
const R = r.find((j) => j.value === e);
|
|
398
398
|
return R ? R.label : "";
|
|
399
399
|
}
|
|
400
400
|
return o && e ? e : "";
|
|
401
401
|
});
|
|
402
|
-
|
|
402
|
+
V(() => {
|
|
403
403
|
if (!e) {
|
|
404
|
-
|
|
404
|
+
q("");
|
|
405
405
|
return;
|
|
406
406
|
}
|
|
407
407
|
if (r) {
|
|
408
|
-
const R = r.find((
|
|
409
|
-
R &&
|
|
410
|
-
} else o &&
|
|
408
|
+
const R = r.find((j) => j.value === e);
|
|
409
|
+
R && q(R.label);
|
|
410
|
+
} else o && q(e);
|
|
411
411
|
}, [e, r, o]);
|
|
412
|
-
const
|
|
412
|
+
const O = (R, j = !1) => {
|
|
413
413
|
if (!o) return;
|
|
414
|
-
|
|
415
|
-
const
|
|
414
|
+
L.current && clearTimeout(L.current);
|
|
415
|
+
const W = async () => {
|
|
416
416
|
try {
|
|
417
|
-
const
|
|
418
|
-
|
|
417
|
+
const U = await o(R);
|
|
418
|
+
T(U), P(-1);
|
|
419
419
|
} catch {
|
|
420
|
-
|
|
420
|
+
T([]);
|
|
421
421
|
}
|
|
422
422
|
};
|
|
423
|
-
|
|
424
|
-
},
|
|
425
|
-
if (
|
|
426
|
-
const R =
|
|
427
|
-
return
|
|
428
|
-
}, [r,
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
}, [
|
|
432
|
-
if (!
|
|
433
|
-
const R = r.find((
|
|
423
|
+
j ? W() : L.current = setTimeout(W, 200);
|
|
424
|
+
}, _ = Ie(() => {
|
|
425
|
+
if (z) return $;
|
|
426
|
+
const R = m.toLowerCase();
|
|
427
|
+
return F ? (r || []).filter((j) => j.label.toLowerCase().includes(R)) : r || [];
|
|
428
|
+
}, [r, m, F, z, $]);
|
|
429
|
+
V(() => {
|
|
430
|
+
h && P(-1);
|
|
431
|
+
}, [h, _]), V(() => {
|
|
432
|
+
if (!f && !e && r && r.length > 0 && t) {
|
|
433
|
+
const R = r.find((j) => j.default) || r[0];
|
|
434
434
|
t(R.value);
|
|
435
435
|
}
|
|
436
|
-
}, [
|
|
437
|
-
function R(
|
|
438
|
-
var
|
|
439
|
-
|
|
436
|
+
}, [f, e, r, t]), V(() => {
|
|
437
|
+
function R(j) {
|
|
438
|
+
var W;
|
|
439
|
+
j.target instanceof Node && B.current && ((W = B.current.parentElement) != null && W.contains(j.target) || p(!1));
|
|
440
440
|
}
|
|
441
441
|
return document.addEventListener("mousedown", R), () => document.removeEventListener("mousedown", R);
|
|
442
442
|
}, []);
|
|
443
|
-
const
|
|
444
|
-
var
|
|
445
|
-
|
|
443
|
+
const D = c ?? (r ? r.find((R) => R.value === e) : e ? { label: H, value: e } : void 0), J = D && f, le = !l && !J, pe = `nc-align-${b}`, ve = !(h && F) && !!D, de = (R, j, W = !1) => {
|
|
444
|
+
var U;
|
|
445
|
+
q(j), t == null || t(R), p(!1), N(""), W && ((U = B.current) == null || U.blur());
|
|
446
446
|
}, we = () => {
|
|
447
|
-
t == null || t(void 0),
|
|
447
|
+
t == null || t(void 0), N(""), p(!1);
|
|
448
448
|
}, ye = (R) => {
|
|
449
|
-
if (!
|
|
450
|
-
(R.key === "ArrowDown" || R.key === "ArrowUp") && (
|
|
449
|
+
if (!h) {
|
|
450
|
+
(R.key === "ArrowDown" || R.key === "ArrowUp") && (p(!0), R.preventDefault());
|
|
451
451
|
return;
|
|
452
452
|
}
|
|
453
|
-
const
|
|
454
|
-
if (
|
|
455
|
-
for (let
|
|
456
|
-
if (!
|
|
457
|
-
for (let
|
|
458
|
-
if (!
|
|
453
|
+
const j = (W, U) => {
|
|
454
|
+
if (U === 1) {
|
|
455
|
+
for (let G = W; G < _.length; G++)
|
|
456
|
+
if (!_[G].disabled) return G;
|
|
457
|
+
for (let G = 0; G < W; G++)
|
|
458
|
+
if (!_[G].disabled) return G;
|
|
459
459
|
} else {
|
|
460
|
-
for (let
|
|
461
|
-
if (!
|
|
462
|
-
for (let
|
|
463
|
-
if (!
|
|
460
|
+
for (let G = W; G >= 0; G--)
|
|
461
|
+
if (!_[G].disabled) return G;
|
|
462
|
+
for (let G = _.length - 1; G > W; G--)
|
|
463
|
+
if (!_[G].disabled) return G;
|
|
464
464
|
}
|
|
465
|
-
return
|
|
465
|
+
return W;
|
|
466
466
|
};
|
|
467
467
|
switch (R.key) {
|
|
468
468
|
case "ArrowDown":
|
|
469
|
-
R.preventDefault(),
|
|
470
|
-
const
|
|
471
|
-
return
|
|
469
|
+
R.preventDefault(), P((W) => {
|
|
470
|
+
const U = W + 1, G = U >= _.length ? 0 : U;
|
|
471
|
+
return j(G, 1);
|
|
472
472
|
});
|
|
473
473
|
break;
|
|
474
474
|
case "ArrowUp":
|
|
475
|
-
R.preventDefault(),
|
|
476
|
-
const
|
|
477
|
-
return
|
|
475
|
+
R.preventDefault(), P((W) => {
|
|
476
|
+
const U = W - 1, G = U < 0 ? _.length - 1 : U;
|
|
477
|
+
return j(G, -1);
|
|
478
478
|
});
|
|
479
479
|
break;
|
|
480
480
|
case "Enter":
|
|
481
|
-
R.preventDefault(), C >= 0 && C <
|
|
481
|
+
R.preventDefault(), C >= 0 && C < _.length && !_[C].disabled && de(_[C].value, _[C].label, !0);
|
|
482
482
|
break;
|
|
483
483
|
case "Escape":
|
|
484
|
-
R.preventDefault(),
|
|
484
|
+
R.preventDefault(), p(!1), N("");
|
|
485
485
|
break;
|
|
486
486
|
}
|
|
487
487
|
};
|
|
488
|
-
return /* @__PURE__ */
|
|
489
|
-
|
|
490
|
-
/* @__PURE__ */
|
|
488
|
+
return /* @__PURE__ */ A("div", { className: `nc-combo-container ${k === "transparent" ? "nc-transparent" : ""} ${k === "plain" ? "nc-plain" : ""} ${h ? "nc-open" : ""} ${pe} ${y || ""}`.trim(), style: { position: "relative", ...v }, children: [
|
|
489
|
+
u && /* @__PURE__ */ s("span", { className: `nc-label ${x ? "nc-small" : ""}`, children: u }),
|
|
490
|
+
/* @__PURE__ */ A(
|
|
491
491
|
"div",
|
|
492
492
|
{
|
|
493
493
|
ref: S,
|
|
494
494
|
style: { position: "relative", display: "flex", alignItems: "center" },
|
|
495
495
|
onMouseDown: (R) => {
|
|
496
|
-
if (l ||
|
|
497
|
-
const
|
|
498
|
-
if (
|
|
499
|
-
const
|
|
500
|
-
|
|
496
|
+
if (l || F && R.target === B.current) return;
|
|
497
|
+
const j = !h;
|
|
498
|
+
if (p((W) => (!W && F && D && N(D.label), !W)), z && j) {
|
|
499
|
+
const W = F && D ? D.label : "";
|
|
500
|
+
T([]), setTimeout(() => O(W, !0), 0);
|
|
501
501
|
}
|
|
502
|
-
|
|
503
|
-
var
|
|
504
|
-
(
|
|
502
|
+
F && !h && setTimeout(() => {
|
|
503
|
+
var W, U;
|
|
504
|
+
(W = B.current) == null || W.focus(), (U = B.current) == null || U.select();
|
|
505
505
|
}, 0);
|
|
506
506
|
},
|
|
507
507
|
children: [
|
|
508
508
|
/* @__PURE__ */ s(
|
|
509
509
|
"input",
|
|
510
510
|
{
|
|
511
|
-
ref:
|
|
512
|
-
className: `nc-input ${
|
|
511
|
+
ref: B,
|
|
512
|
+
className: `nc-input ${x ? "nc-small" : ""}`,
|
|
513
513
|
placeholder: n,
|
|
514
514
|
onFocus: () => {
|
|
515
|
-
if (!l &&
|
|
516
|
-
|
|
517
|
-
const R =
|
|
518
|
-
|
|
519
|
-
var
|
|
520
|
-
return (
|
|
521
|
-
}, 0)),
|
|
515
|
+
if (!l && F) {
|
|
516
|
+
p(!0);
|
|
517
|
+
const R = D ? D.label : "";
|
|
518
|
+
D && (N(R), setTimeout(() => {
|
|
519
|
+
var j;
|
|
520
|
+
return (j = B.current) == null ? void 0 : j.select();
|
|
521
|
+
}, 0)), z && (T([]), O(R, !0));
|
|
522
522
|
}
|
|
523
523
|
},
|
|
524
524
|
onChange: (R) => {
|
|
525
|
-
const
|
|
526
|
-
|
|
525
|
+
const j = R.target.value;
|
|
526
|
+
F && (N(j), z && O(j));
|
|
527
527
|
},
|
|
528
528
|
onKeyDown: ye,
|
|
529
|
-
value:
|
|
530
|
-
readOnly: l || !
|
|
529
|
+
value: h && F ? m : (D == null ? void 0 : D.label) || "",
|
|
530
|
+
readOnly: l || !F,
|
|
531
531
|
style: {
|
|
532
532
|
width: "100%",
|
|
533
|
-
paddingRight: le ||
|
|
533
|
+
paddingRight: le || J ? x ? 32 : 44 : 12,
|
|
534
534
|
caretColor: w ? void 0 : "transparent",
|
|
535
535
|
cursor: w ? void 0 : "pointer",
|
|
536
536
|
userSelect: w ? void 0 : "none",
|
|
@@ -545,8 +545,8 @@ function Qn({
|
|
|
545
545
|
className: `nc-combo-overlay ${pe}`,
|
|
546
546
|
style: {
|
|
547
547
|
position: "absolute",
|
|
548
|
-
left:
|
|
549
|
-
right: le ||
|
|
548
|
+
left: x ? 8 : 12,
|
|
549
|
+
right: le || J ? x ? 12 : 24 : x ? 8 : 12,
|
|
550
550
|
top: "50%",
|
|
551
551
|
transform: "translateY(-50%)",
|
|
552
552
|
pointerEvents: "none",
|
|
@@ -554,22 +554,22 @@ function Qn({
|
|
|
554
554
|
alignItems: "center",
|
|
555
555
|
gap: 6
|
|
556
556
|
},
|
|
557
|
-
children: a &&
|
|
558
|
-
/* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${
|
|
559
|
-
(
|
|
557
|
+
children: a && D ? a(D) : /* @__PURE__ */ A(Pe, { children: [
|
|
558
|
+
/* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${x ? "nc-small" : ""}`, children: D == null ? void 0 : D.label }),
|
|
559
|
+
(D == null ? void 0 : D.default) && /* @__PURE__ */ A("span", { className: `nc-combo-overlay-default ${x ? "nc-small" : ""}`, children: [
|
|
560
560
|
"(",
|
|
561
|
-
|
|
561
|
+
M("common.default"),
|
|
562
562
|
")"
|
|
563
563
|
] })
|
|
564
564
|
] })
|
|
565
565
|
}
|
|
566
566
|
),
|
|
567
|
-
|
|
568
|
-
le && /* @__PURE__ */ s(Bt, { open:
|
|
567
|
+
J && /* @__PURE__ */ s(zt, { onClick: we, small: x }),
|
|
568
|
+
le && /* @__PURE__ */ s(Bt, { open: h, small: x })
|
|
569
569
|
]
|
|
570
570
|
}
|
|
571
571
|
),
|
|
572
|
-
/* @__PURE__ */ s(Lt, { isOpen:
|
|
572
|
+
/* @__PURE__ */ s(Lt, { isOpen: h, options: _, onSelect: de, selectedValue: e, placement: d, anchorRef: S, small: x, highlightedIndex: C, renderOption: i })
|
|
573
573
|
] });
|
|
574
574
|
}
|
|
575
575
|
function Zn({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default", title: o, "aria-label": i }) {
|
|
@@ -650,35 +650,35 @@ function rr({
|
|
|
650
650
|
anchor: o,
|
|
651
651
|
preferredDirection: i = "down"
|
|
652
652
|
}) {
|
|
653
|
-
const a =
|
|
654
|
-
if (
|
|
655
|
-
if (!e || !
|
|
656
|
-
const
|
|
657
|
-
let
|
|
658
|
-
(!
|
|
659
|
-
let
|
|
660
|
-
|
|
661
|
-
let
|
|
662
|
-
|
|
663
|
-
top: Math.max(8,
|
|
653
|
+
const a = Y(null), [c, l] = E({ top: 0, left: 0 }), u = o || (r == null ? void 0 : r.current);
|
|
654
|
+
if (V(() => {
|
|
655
|
+
if (!e || !u || !a.current) return;
|
|
656
|
+
const d = u.getBoundingClientRect(), g = a.current.getBoundingClientRect(), k = window.innerHeight, b = window.innerWidth, v = d.bottom + 8, y = v + g.height <= k - 8;
|
|
657
|
+
let h = i;
|
|
658
|
+
(!y && i === "down" || i === "up" && y) && (h = "up");
|
|
659
|
+
let p;
|
|
660
|
+
h === "down" ? p = v : p = d.top - g.height - 8;
|
|
661
|
+
let m = d.left;
|
|
662
|
+
m + g.width > b - 8 && (m = d.right - g.width), l({
|
|
663
|
+
top: Math.max(8, p),
|
|
664
664
|
// Ensure minimum 8px from top
|
|
665
|
-
left: Math.max(8,
|
|
665
|
+
left: Math.max(8, m)
|
|
666
666
|
// Ensure minimum 8px from left
|
|
667
667
|
});
|
|
668
|
-
}, [e,
|
|
668
|
+
}, [e, u, i]), V(() => {
|
|
669
669
|
if (!e) return;
|
|
670
|
-
const
|
|
671
|
-
a.current && !a.current.contains(
|
|
672
|
-
},
|
|
673
|
-
|
|
670
|
+
const d = (k) => {
|
|
671
|
+
a.current && !a.current.contains(k.target) && u && !u.contains(k.target) && t();
|
|
672
|
+
}, g = (k) => {
|
|
673
|
+
k.key === "Escape" && t();
|
|
674
674
|
};
|
|
675
|
-
return document.addEventListener("mousedown",
|
|
676
|
-
document.removeEventListener("mousedown",
|
|
675
|
+
return document.addEventListener("mousedown", d), document.addEventListener("keydown", g), () => {
|
|
676
|
+
document.removeEventListener("mousedown", d), document.removeEventListener("keydown", g);
|
|
677
677
|
};
|
|
678
|
-
}, [e, t,
|
|
679
|
-
const
|
|
680
|
-
|
|
681
|
-
}, w = n.some((
|
|
678
|
+
}, [e, t, u]), !e) return null;
|
|
679
|
+
const f = (d) => {
|
|
680
|
+
d.type !== "separator" && !d.disabled && d.onClick && (d.onClick(), t());
|
|
681
|
+
}, w = n.some((d) => d.icon);
|
|
682
682
|
return Ae(
|
|
683
683
|
/* @__PURE__ */ s(
|
|
684
684
|
"div",
|
|
@@ -692,35 +692,35 @@ function rr({
|
|
|
692
692
|
zIndex: 1e4
|
|
693
693
|
},
|
|
694
694
|
role: "menu",
|
|
695
|
-
children: n.map((
|
|
696
|
-
if (
|
|
695
|
+
children: n.map((d) => {
|
|
696
|
+
if (d.type === "separator")
|
|
697
697
|
return /* @__PURE__ */ s(
|
|
698
698
|
"div",
|
|
699
699
|
{
|
|
700
700
|
className: "nc-context-menu-separator",
|
|
701
701
|
role: "separator"
|
|
702
702
|
},
|
|
703
|
-
|
|
703
|
+
d.id
|
|
704
704
|
);
|
|
705
|
-
const
|
|
705
|
+
const g = [
|
|
706
706
|
"nc-context-menu-item",
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
w && !
|
|
707
|
+
d.variant && d.variant !== "default" ? `nc-${d.variant}` : "",
|
|
708
|
+
d.disabled ? "nc-disabled" : "",
|
|
709
|
+
w && !d.icon ? "nc-indented" : ""
|
|
710
710
|
].filter(Boolean).join(" ");
|
|
711
|
-
return /* @__PURE__ */
|
|
711
|
+
return /* @__PURE__ */ A(
|
|
712
712
|
"button",
|
|
713
713
|
{
|
|
714
|
-
className:
|
|
715
|
-
onClick: () =>
|
|
716
|
-
disabled:
|
|
714
|
+
className: g,
|
|
715
|
+
onClick: () => f(d),
|
|
716
|
+
disabled: d.disabled,
|
|
717
717
|
role: "menuitem",
|
|
718
718
|
children: [
|
|
719
|
-
|
|
720
|
-
/* @__PURE__ */ s("span", { className: "nc-context-menu-label", children:
|
|
719
|
+
d.icon && /* @__PURE__ */ s("span", { className: "nc-context-menu-icon", children: d.icon }),
|
|
720
|
+
/* @__PURE__ */ s("span", { className: "nc-context-menu-label", children: d.label })
|
|
721
721
|
]
|
|
722
722
|
},
|
|
723
|
-
|
|
723
|
+
d.id
|
|
724
724
|
);
|
|
725
725
|
})
|
|
726
726
|
}
|
|
@@ -730,14 +730,14 @@ function rr({
|
|
|
730
730
|
}
|
|
731
731
|
const et = ge(null);
|
|
732
732
|
function Dt() {
|
|
733
|
-
const e =
|
|
733
|
+
const e = ae(et);
|
|
734
734
|
if (!e)
|
|
735
735
|
throw new Error("useDialog must be used inside a Dialog component");
|
|
736
736
|
return e;
|
|
737
737
|
}
|
|
738
738
|
function fe({ children: e, onClick: t, ...n }) {
|
|
739
|
-
const { close: r } = Dt(), { t: o } =
|
|
740
|
-
return /* @__PURE__ */ s(
|
|
739
|
+
const { close: r } = Dt(), { t: o } = oe();
|
|
740
|
+
return /* @__PURE__ */ s(ne, { onClick: (a) => {
|
|
741
741
|
t == null || t(a), r();
|
|
742
742
|
}, ...n, children: e ?? o("common.close") });
|
|
743
743
|
}
|
|
@@ -751,61 +751,61 @@ function or({
|
|
|
751
751
|
footer: a,
|
|
752
752
|
onOk: c,
|
|
753
753
|
onSave: l,
|
|
754
|
-
onDelete:
|
|
755
|
-
onCancel:
|
|
754
|
+
onDelete: u,
|
|
755
|
+
onCancel: f,
|
|
756
756
|
onConnect: w,
|
|
757
|
-
closeOnOverlay:
|
|
758
|
-
primaryDisabled:
|
|
759
|
-
fullScreen:
|
|
760
|
-
hideTitleBar:
|
|
761
|
-
className:
|
|
762
|
-
onContentHeightChange:
|
|
757
|
+
closeOnOverlay: d = !0,
|
|
758
|
+
primaryDisabled: g = !1,
|
|
759
|
+
fullScreen: k = !1,
|
|
760
|
+
hideTitleBar: b = !1,
|
|
761
|
+
className: v = "",
|
|
762
|
+
onContentHeightChange: y
|
|
763
763
|
}) {
|
|
764
|
-
const
|
|
765
|
-
|
|
764
|
+
const h = Y(null), p = Y(null), { t: m } = oe(), N = { close: t }, C = (S) => {
|
|
765
|
+
d && S.target === S.currentTarget && t();
|
|
766
766
|
};
|
|
767
|
-
if (
|
|
768
|
-
e &&
|
|
769
|
-
}, [e]),
|
|
770
|
-
if (!
|
|
771
|
-
const S = new ResizeObserver((
|
|
772
|
-
for (const
|
|
773
|
-
const
|
|
774
|
-
|
|
767
|
+
if (V(() => {
|
|
768
|
+
e && h.current && h.current.focus();
|
|
769
|
+
}, [e]), V(() => {
|
|
770
|
+
if (!y || !p.current) return;
|
|
771
|
+
const S = new ResizeObserver((L) => {
|
|
772
|
+
for (const x of L) {
|
|
773
|
+
const M = x.contentRect.height;
|
|
774
|
+
y(M);
|
|
775
775
|
}
|
|
776
776
|
});
|
|
777
|
-
return S.observe(
|
|
777
|
+
return S.observe(p.current), () => {
|
|
778
778
|
S.disconnect();
|
|
779
779
|
};
|
|
780
|
-
}, [
|
|
781
|
-
const
|
|
780
|
+
}, [y]), !e) return null;
|
|
781
|
+
const P = () => {
|
|
782
782
|
switch (i) {
|
|
783
783
|
case "ok":
|
|
784
|
-
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(
|
|
784
|
+
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(ne, { variant: "primary", onClick: c ?? t, disabled: g, children: m("common.ok") }) });
|
|
785
785
|
case "ok-cancel":
|
|
786
|
-
return /* @__PURE__ */
|
|
787
|
-
/* @__PURE__ */ s(fe, { onClick:
|
|
788
|
-
/* @__PURE__ */ s(
|
|
786
|
+
return /* @__PURE__ */ A("div", { className: "nc-dialog-footer", children: [
|
|
787
|
+
/* @__PURE__ */ s(fe, { onClick: f, children: m("common.cancel") }),
|
|
788
|
+
/* @__PURE__ */ s(ne, { variant: "primary", onClick: c ?? t, disabled: g, children: m("common.ok") })
|
|
789
789
|
] });
|
|
790
790
|
case "save-cancel":
|
|
791
|
-
return /* @__PURE__ */
|
|
792
|
-
/* @__PURE__ */ s(fe, { onClick:
|
|
793
|
-
/* @__PURE__ */ s(
|
|
791
|
+
return /* @__PURE__ */ A("div", { className: "nc-dialog-footer", children: [
|
|
792
|
+
/* @__PURE__ */ s(fe, { onClick: f, children: m("common.cancel") }),
|
|
793
|
+
/* @__PURE__ */ s(ne, { variant: "primary", onClick: l, disabled: g, children: m("common.save") })
|
|
794
794
|
] });
|
|
795
795
|
case "delete-cancel":
|
|
796
|
-
return /* @__PURE__ */
|
|
797
|
-
/* @__PURE__ */ s(fe, { onClick:
|
|
798
|
-
/* @__PURE__ */ s(
|
|
796
|
+
return /* @__PURE__ */ A("div", { className: "nc-dialog-footer", children: [
|
|
797
|
+
/* @__PURE__ */ s(fe, { onClick: f, children: m("common.cancel") }),
|
|
798
|
+
/* @__PURE__ */ s(ne, { variant: "danger", onClick: u, disabled: g, children: m("common.delete") })
|
|
799
799
|
] });
|
|
800
800
|
case "connect":
|
|
801
|
-
return /* @__PURE__ */
|
|
802
|
-
/* @__PURE__ */ s(fe, { onClick:
|
|
803
|
-
/* @__PURE__ */ s(
|
|
801
|
+
return /* @__PURE__ */ A("div", { className: "nc-dialog-footer", children: [
|
|
802
|
+
/* @__PURE__ */ s(fe, { onClick: f, children: m("common.cancel") }),
|
|
803
|
+
/* @__PURE__ */ s(ne, { variant: "primary", onClick: w, disabled: g, children: m("common.connect") })
|
|
804
804
|
] });
|
|
805
805
|
case "close":
|
|
806
806
|
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(fe, { variant: "primary" }) });
|
|
807
807
|
case "gotit":
|
|
808
|
-
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(fe, { variant: "primary", children:
|
|
808
|
+
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(fe, { variant: "primary", children: m("common.gotit") }) });
|
|
809
809
|
case "custom":
|
|
810
810
|
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: a });
|
|
811
811
|
case "none":
|
|
@@ -813,27 +813,27 @@ function or({
|
|
|
813
813
|
default:
|
|
814
814
|
return null;
|
|
815
815
|
}
|
|
816
|
-
},
|
|
816
|
+
}, B = /* @__PURE__ */ s(et.Provider, { value: N, children: /* @__PURE__ */ s("div", { className: `nc-dialog-overlay${k ? " nc-fullscreen" : ""}`, onClick: C, children: /* @__PURE__ */ A(
|
|
817
817
|
"div",
|
|
818
818
|
{
|
|
819
|
-
ref:
|
|
820
|
-
className: `nc-dialog-container ${
|
|
819
|
+
ref: h,
|
|
820
|
+
className: `nc-dialog-container ${v}`,
|
|
821
821
|
style: o,
|
|
822
822
|
tabIndex: -1,
|
|
823
823
|
role: "dialog",
|
|
824
824
|
"aria-modal": "true",
|
|
825
|
-
"aria-labelledby":
|
|
825
|
+
"aria-labelledby": b ? void 0 : "nc-dialog-title",
|
|
826
826
|
children: [
|
|
827
|
-
!
|
|
827
|
+
!b && /* @__PURE__ */ A("div", { className: "nc-dialog-header", children: [
|
|
828
828
|
/* @__PURE__ */ s("h3", { id: "nc-dialog-title", className: "nc-dialog-title", children: n }),
|
|
829
829
|
/* @__PURE__ */ s(Ze, { onClick: t, "aria-label": "Close dialog" })
|
|
830
830
|
] }),
|
|
831
|
-
/* @__PURE__ */ s("div", { ref:
|
|
832
|
-
|
|
831
|
+
/* @__PURE__ */ s("div", { ref: p, className: "nc-dialog-content", children: r }),
|
|
832
|
+
P()
|
|
833
833
|
]
|
|
834
834
|
}
|
|
835
835
|
) }) });
|
|
836
|
-
return
|
|
836
|
+
return k ? Ae(B, document.body) : B;
|
|
837
837
|
}
|
|
838
838
|
function Wt({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
|
|
839
839
|
const r = t === "small" ? 28 : 34;
|
|
@@ -902,77 +902,77 @@ function sr({
|
|
|
902
902
|
placeholder: a,
|
|
903
903
|
disabled: c,
|
|
904
904
|
label: l,
|
|
905
|
-
clearable:
|
|
906
|
-
type:
|
|
905
|
+
clearable: u = !0,
|
|
906
|
+
type: f = "text",
|
|
907
907
|
className: w = "",
|
|
908
|
-
size:
|
|
909
|
-
appearance:
|
|
910
|
-
style:
|
|
911
|
-
leadingIcon:
|
|
912
|
-
showPasswordToggle:
|
|
913
|
-
multiline:
|
|
914
|
-
rows:
|
|
915
|
-
validator:
|
|
916
|
-
showErrorMessage:
|
|
908
|
+
size: d = "default",
|
|
909
|
+
appearance: g = "default",
|
|
910
|
+
style: k,
|
|
911
|
+
leadingIcon: b,
|
|
912
|
+
showPasswordToggle: v = !1,
|
|
913
|
+
multiline: y = !1,
|
|
914
|
+
rows: h = 3,
|
|
915
|
+
validator: p,
|
|
916
|
+
showErrorMessage: m = !0
|
|
917
917
|
}) {
|
|
918
|
-
const
|
|
919
|
-
|
|
920
|
-
le ||
|
|
921
|
-
}, [
|
|
922
|
-
const ve =
|
|
918
|
+
const N = Y(null), C = Y(null), P = Y(!1), [B, S] = E(!1), [L, x] = E(!1), [M, z] = E(!1), F = e !== void 0, [$, T] = E(t), H = F ? e : $, [q, O] = E(H), _ = p ? p(H) : null, D = !!_, J = !y && g === "plain", le = J && L, pe = le ? q : H;
|
|
919
|
+
V(() => {
|
|
920
|
+
le || O(H);
|
|
921
|
+
}, [H, le]);
|
|
922
|
+
const ve = f === "password", de = ve && v && !c && !y, we = u && pe && !c && (L || M), ye = d === "small" ? 32 : 44;
|
|
923
923
|
let R = 12;
|
|
924
924
|
we && de ? R = ye * 2 : (we || de) && (R = ye);
|
|
925
|
-
const
|
|
926
|
-
if (!
|
|
927
|
-
return
|
|
928
|
-
const
|
|
929
|
-
return
|
|
930
|
-
},
|
|
931
|
-
|
|
925
|
+
const W = b ? d === "small" ? 28 : 34 : void 0, U = () => {
|
|
926
|
+
if (!J)
|
|
927
|
+
return H;
|
|
928
|
+
const Q = q !== H;
|
|
929
|
+
return F || T(q), Q && (n == null || n(q), r == null || r(q)), q;
|
|
930
|
+
}, G = () => {
|
|
931
|
+
O(H);
|
|
932
932
|
}, ft = () => {
|
|
933
|
-
var
|
|
934
|
-
if (
|
|
935
|
-
|
|
933
|
+
var Q, ee, Ye;
|
|
934
|
+
if (J) {
|
|
935
|
+
O(""), i == null || i(), (Q = N.current) == null || Q.focus();
|
|
936
936
|
return;
|
|
937
937
|
}
|
|
938
|
-
|
|
939
|
-
}, He = (
|
|
940
|
-
if (
|
|
941
|
-
|
|
938
|
+
F || T(""), n == null || n(""), i == null || i(), y ? (ee = C.current) == null || ee.focus() : (Ye = N.current) == null || Ye.focus();
|
|
939
|
+
}, He = (Q) => {
|
|
940
|
+
if (J && Q.key === "Escape") {
|
|
941
|
+
Q.preventDefault(), P.current = !0, G(), Q.currentTarget.blur();
|
|
942
942
|
return;
|
|
943
943
|
}
|
|
944
|
-
if (
|
|
945
|
-
const
|
|
946
|
-
|
|
944
|
+
if (Q.key === "Enter" && !y) {
|
|
945
|
+
const ee = J ? U() : H;
|
|
946
|
+
J && (Q.preventDefault(), P.current = !0, Q.currentTarget.blur()), o == null || o(ee);
|
|
947
947
|
}
|
|
948
|
-
}, Ve = (
|
|
949
|
-
const
|
|
950
|
-
if (
|
|
951
|
-
|
|
948
|
+
}, Ve = (Q) => {
|
|
949
|
+
const ee = Q.target.value;
|
|
950
|
+
if (J) {
|
|
951
|
+
O(ee), n == null || n(ee);
|
|
952
952
|
return;
|
|
953
953
|
}
|
|
954
|
-
|
|
955
|
-
}, Oe = () => {
|
|
956
|
-
N(!0), q && U(K);
|
|
954
|
+
F || T(ee), n == null || n(ee);
|
|
957
955
|
}, Fe = () => {
|
|
958
|
-
|
|
959
|
-
|
|
956
|
+
x(!0), J && O(H);
|
|
957
|
+
}, Oe = () => {
|
|
958
|
+
if (J && P.current) {
|
|
959
|
+
P.current = !1, x(!1);
|
|
960
960
|
return;
|
|
961
961
|
}
|
|
962
|
-
|
|
963
|
-
}, je = `nc-input ${
|
|
964
|
-
return /* @__PURE__ */
|
|
962
|
+
J && U(), x(!1);
|
|
963
|
+
}, je = `nc-input ${d === "small" ? "nc-small " : ""}${!y && g === "plain" ? "nc-plain " : ""}${D ? "nc-error " : ""}${w}`;
|
|
964
|
+
return /* @__PURE__ */ A(
|
|
965
965
|
"div",
|
|
966
966
|
{
|
|
967
967
|
className: "nc-col",
|
|
968
|
-
style: { position: "relative", flex: 1, ...
|
|
969
|
-
onMouseEnter: () =>
|
|
970
|
-
onMouseLeave: () =>
|
|
968
|
+
style: { position: "relative", flex: 1, ...k },
|
|
969
|
+
onMouseEnter: () => z(!0),
|
|
970
|
+
onMouseLeave: () => z(!1),
|
|
971
971
|
children: [
|
|
972
972
|
l && /* @__PURE__ */ s("span", { className: "nc-label", children: l }),
|
|
973
|
-
/* @__PURE__ */
|
|
974
|
-
|
|
975
|
-
|
|
973
|
+
/* @__PURE__ */ A("div", { style: { position: "relative", display: "flex", alignItems: y ? "flex-start" : "center" }, children: [
|
|
974
|
+
b && /* @__PURE__ */ s("span", { className: "nc-input-leading-icon", style: { height: y ? void 0 : "100%", top: y ? 10 : void 0 }, children: b }),
|
|
975
|
+
y ? /* @__PURE__ */ s(
|
|
976
976
|
"textarea",
|
|
977
977
|
{
|
|
978
978
|
ref: C,
|
|
@@ -981,44 +981,44 @@ function sr({
|
|
|
981
981
|
value: pe,
|
|
982
982
|
onChange: Ve,
|
|
983
983
|
onKeyDown: He,
|
|
984
|
-
onFocus:
|
|
985
|
-
onBlur:
|
|
984
|
+
onFocus: Fe,
|
|
985
|
+
onBlur: Oe,
|
|
986
986
|
readOnly: c,
|
|
987
987
|
"aria-disabled": c,
|
|
988
988
|
tabIndex: c ? -1 : void 0,
|
|
989
|
-
rows:
|
|
989
|
+
rows: h,
|
|
990
990
|
style: {
|
|
991
991
|
width: "100%",
|
|
992
992
|
paddingRight: R,
|
|
993
|
-
...
|
|
993
|
+
...W !== void 0 ? { paddingLeft: W } : {}
|
|
994
994
|
}
|
|
995
995
|
}
|
|
996
996
|
) : /* @__PURE__ */ s(
|
|
997
997
|
"input",
|
|
998
998
|
{
|
|
999
|
-
ref:
|
|
1000
|
-
type: ve &&
|
|
999
|
+
ref: N,
|
|
1000
|
+
type: ve && B ? "text" : f,
|
|
1001
1001
|
className: je,
|
|
1002
1002
|
placeholder: a,
|
|
1003
1003
|
value: pe,
|
|
1004
1004
|
onChange: Ve,
|
|
1005
1005
|
onKeyDown: He,
|
|
1006
|
-
onFocus:
|
|
1007
|
-
onBlur:
|
|
1006
|
+
onFocus: Fe,
|
|
1007
|
+
onBlur: Oe,
|
|
1008
1008
|
readOnly: c,
|
|
1009
1009
|
"aria-disabled": c,
|
|
1010
1010
|
tabIndex: c ? -1 : void 0,
|
|
1011
1011
|
style: {
|
|
1012
1012
|
width: "100%",
|
|
1013
1013
|
paddingRight: R,
|
|
1014
|
-
...
|
|
1014
|
+
...W !== void 0 ? { paddingLeft: W } : {}
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
1017
|
),
|
|
1018
|
-
we && /* @__PURE__ */ s(Wt, { onClick: ft, size:
|
|
1019
|
-
de && /* @__PURE__ */ s(Ht, { visible:
|
|
1018
|
+
we && /* @__PURE__ */ s(Wt, { onClick: ft, size: d, rightOffset: de ? ye + 4 : 4 }),
|
|
1019
|
+
de && /* @__PURE__ */ s(Ht, { visible: B, onClick: () => S(!B), size: d })
|
|
1020
1020
|
] }),
|
|
1021
|
-
|
|
1021
|
+
D && m && /* @__PURE__ */ s("span", { className: "nc-error-message", children: _ })
|
|
1022
1022
|
]
|
|
1023
1023
|
}
|
|
1024
1024
|
);
|
|
@@ -1037,8 +1037,8 @@ function ir({
|
|
|
1037
1037
|
onClick: (l) => {
|
|
1038
1038
|
if (t) {
|
|
1039
1039
|
if (r) {
|
|
1040
|
-
const
|
|
1041
|
-
if (
|
|
1040
|
+
const u = window.getSelection();
|
|
1041
|
+
if (u && u.toString().length > 0)
|
|
1042
1042
|
return;
|
|
1043
1043
|
}
|
|
1044
1044
|
t(l);
|
|
@@ -1059,8 +1059,8 @@ function ir({
|
|
|
1059
1059
|
);
|
|
1060
1060
|
}
|
|
1061
1061
|
function cr({ title: e, titleTools: t, children: n, style: r }) {
|
|
1062
|
-
return /* @__PURE__ */
|
|
1063
|
-
(e || t) && /* @__PURE__ */
|
|
1062
|
+
return /* @__PURE__ */ A("div", { className: "nc-list-group", style: r, children: [
|
|
1063
|
+
(e || t) && /* @__PURE__ */ A("div", { className: "nc-list-group-title", children: [
|
|
1064
1064
|
/* @__PURE__ */ s("div", { children: e }),
|
|
1065
1065
|
t && /* @__PURE__ */ s("div", { className: "nc-list-group-title-tools", children: t })
|
|
1066
1066
|
] }),
|
|
@@ -1074,56 +1074,56 @@ function cr({ title: e, titleTools: t, children: n, style: r }) {
|
|
|
1074
1074
|
] });
|
|
1075
1075
|
}
|
|
1076
1076
|
function ar({ values: e, onChange: t, options: n, placeholder: r = "Select…", label: o }) {
|
|
1077
|
-
const [i, a] =
|
|
1078
|
-
|
|
1079
|
-
function
|
|
1080
|
-
!(
|
|
1077
|
+
const [i, a] = E(!1), [c, l] = E(""), u = Y(null), f = Ie(() => n.filter((d) => d.label.toLowerCase().includes(c.toLowerCase())), [n, c]);
|
|
1078
|
+
V(() => {
|
|
1079
|
+
function d(g) {
|
|
1080
|
+
!(g.target instanceof Node) || !u.current || u.current.contains(g.target) || a(!1);
|
|
1081
1081
|
}
|
|
1082
|
-
return document.addEventListener("mousedown",
|
|
1082
|
+
return document.addEventListener("mousedown", d), () => document.removeEventListener("mousedown", d);
|
|
1083
1083
|
}, []);
|
|
1084
|
-
const w = (
|
|
1085
|
-
e.includes(
|
|
1084
|
+
const w = (d) => {
|
|
1085
|
+
e.includes(d) ? t(e.filter((g) => g !== d)) : t([...e, d]);
|
|
1086
1086
|
};
|
|
1087
|
-
return /* @__PURE__ */
|
|
1087
|
+
return /* @__PURE__ */ A("div", { ref: u, className: "nc-col", style: { position: "relative" }, children: [
|
|
1088
1088
|
o && /* @__PURE__ */ s("span", { className: "nc-label", children: o }),
|
|
1089
|
-
/* @__PURE__ */
|
|
1089
|
+
/* @__PURE__ */ A("div", { className: "nc-row", style: { flexWrap: "wrap", gap: 6, minHeight: 42, alignItems: "center", border: "1px solid var(--nc-button-border)", borderRadius: 8, background: "var(--nc-button-bg)", padding: "4px 8px" }, children: [
|
|
1090
1090
|
e.length === 0 && /* @__PURE__ */ s("span", { className: "nc-label", children: r }),
|
|
1091
|
-
e.map((
|
|
1092
|
-
const
|
|
1093
|
-
return
|
|
1094
|
-
|
|
1091
|
+
e.map((d) => {
|
|
1092
|
+
const g = n.find((k) => k.value === d);
|
|
1093
|
+
return g ? /* @__PURE__ */ A("span", { style: { padding: "4px 8px", borderRadius: 6, display: "inline-flex", alignItems: "center", gap: 4, background: "var(--nc-button-bg)", border: "1px solid var(--nc-button-border)" }, children: [
|
|
1094
|
+
g.label,
|
|
1095
1095
|
/* @__PURE__ */ s(
|
|
1096
1096
|
"button",
|
|
1097
1097
|
{
|
|
1098
1098
|
className: "nc-button nc-ghost",
|
|
1099
1099
|
style: { padding: 0, minHeight: 0, height: 20, width: 20, display: "inline-flex", alignItems: "center", justifyContent: "center", border: "none" },
|
|
1100
|
-
onClick: () => w(
|
|
1101
|
-
"aria-label": `Remove ${
|
|
1100
|
+
onClick: () => w(d),
|
|
1101
|
+
"aria-label": `Remove ${g.label}`,
|
|
1102
1102
|
children: "✕"
|
|
1103
1103
|
}
|
|
1104
1104
|
)
|
|
1105
|
-
] },
|
|
1105
|
+
] }, d) : null;
|
|
1106
1106
|
}),
|
|
1107
1107
|
/* @__PURE__ */ s(
|
|
1108
1108
|
"input",
|
|
1109
1109
|
{
|
|
1110
1110
|
className: "nc-input",
|
|
1111
1111
|
value: c,
|
|
1112
|
-
onChange: (
|
|
1112
|
+
onChange: (d) => l(d.target.value),
|
|
1113
1113
|
onFocus: () => a(!0),
|
|
1114
1114
|
style: { minWidth: 50, border: "none", background: "transparent", padding: 4, minHeight: 32, flex: 1 }
|
|
1115
1115
|
}
|
|
1116
1116
|
)
|
|
1117
1117
|
] }),
|
|
1118
|
-
i && /* @__PURE__ */
|
|
1119
|
-
|
|
1120
|
-
const
|
|
1121
|
-
return /* @__PURE__ */
|
|
1122
|
-
/* @__PURE__ */ s("span", { children:
|
|
1123
|
-
/* @__PURE__ */ s("span", { children:
|
|
1124
|
-
] },
|
|
1118
|
+
i && /* @__PURE__ */ A("div", { className: "nc-combo-dropdown", style: { position: "absolute", top: "100%", left: 0, right: 0, zIndex: 10, marginTop: 4, boxShadow: "0 4px 12px var(--nc-shadow)" }, children: [
|
|
1119
|
+
f.map((d) => {
|
|
1120
|
+
const g = e.includes(d.value);
|
|
1121
|
+
return /* @__PURE__ */ A("div", { className: "nc-section nc-row", style: { justifyContent: "space-between", cursor: "pointer", padding: 12 }, onMouseDown: () => w(d.value), children: [
|
|
1122
|
+
/* @__PURE__ */ s("span", { children: d.label }),
|
|
1123
|
+
/* @__PURE__ */ s("span", { children: g ? "✔️" : "" })
|
|
1124
|
+
] }, d.value);
|
|
1125
1125
|
}),
|
|
1126
|
-
|
|
1126
|
+
f.length === 0 && /* @__PURE__ */ s("div", { className: "nc-section nc-label", children: "No results" })
|
|
1127
1127
|
] })
|
|
1128
1128
|
] });
|
|
1129
1129
|
}
|
|
@@ -1167,70 +1167,70 @@ function lr({
|
|
|
1167
1167
|
disabled: i = !1,
|
|
1168
1168
|
size: a = "default"
|
|
1169
1169
|
}) {
|
|
1170
|
-
const [c, l] =
|
|
1171
|
-
|
|
1172
|
-
if (c &&
|
|
1173
|
-
const
|
|
1174
|
-
window.innerWidth -
|
|
1175
|
-
top:
|
|
1170
|
+
const [c, l] = E(!1), [u, f] = E(""), [w, d] = E(""), [g, k] = E({ top: 0, left: 0, width: 0, right: void 0 }), b = Y(null), v = Y(null);
|
|
1171
|
+
V(() => {
|
|
1172
|
+
if (c && b.current) {
|
|
1173
|
+
const x = b.current.getBoundingClientRect(), z = Math.max(x.width, 400);
|
|
1174
|
+
window.innerWidth - x.left < z && x.right >= z ? k({
|
|
1175
|
+
top: x.bottom + 4,
|
|
1176
1176
|
left: 0,
|
|
1177
1177
|
// Not used but type needs it, let's just use 0
|
|
1178
|
-
right: window.innerWidth -
|
|
1179
|
-
width:
|
|
1180
|
-
}) :
|
|
1181
|
-
top:
|
|
1182
|
-
left:
|
|
1178
|
+
right: window.innerWidth - x.right,
|
|
1179
|
+
width: z
|
|
1180
|
+
}) : k({
|
|
1181
|
+
top: x.bottom + 4,
|
|
1182
|
+
left: x.left,
|
|
1183
1183
|
right: void 0,
|
|
1184
|
-
width:
|
|
1184
|
+
width: z
|
|
1185
1185
|
});
|
|
1186
1186
|
}
|
|
1187
|
-
}, [c]),
|
|
1187
|
+
}, [c]), V(() => {
|
|
1188
1188
|
if (!c) return;
|
|
1189
|
-
const
|
|
1190
|
-
|
|
1189
|
+
const x = (M) => {
|
|
1190
|
+
b.current && !b.current.contains(M.target) && v.current && !v.current.contains(M.target) && l(!1);
|
|
1191
1191
|
};
|
|
1192
|
-
return document.addEventListener("mousedown",
|
|
1192
|
+
return document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
|
|
1193
1193
|
}, [c]);
|
|
1194
|
-
const
|
|
1195
|
-
|
|
1196
|
-
},
|
|
1194
|
+
const y = () => {
|
|
1195
|
+
f(e || Ke()), d(t || Ke()), l(!0);
|
|
1196
|
+
}, h = () => {
|
|
1197
1197
|
l(!1);
|
|
1198
|
-
},
|
|
1199
|
-
const
|
|
1200
|
-
if (
|
|
1198
|
+
}, p = () => {
|
|
1199
|
+
const x = Se(u), M = Se(w);
|
|
1200
|
+
if (x || M)
|
|
1201
1201
|
return;
|
|
1202
|
-
const
|
|
1203
|
-
|
|
1204
|
-
},
|
|
1202
|
+
const z = Ne(u), F = Ne(w);
|
|
1203
|
+
z && F && (n == null || n(z, F)), l(!1);
|
|
1204
|
+
}, m = e && t ? `${Ge(e)} - ${Ge(t)}` : "Select month range", N = Se(u), C = Se(w), P = Ne(u), B = Ne(w), S = P && B && P > B, L = c ? Ae(
|
|
1205
1205
|
/* @__PURE__ */ s(
|
|
1206
1206
|
"div",
|
|
1207
1207
|
{
|
|
1208
|
-
ref:
|
|
1208
|
+
ref: v,
|
|
1209
1209
|
className: "nc-month-range-picker-popup",
|
|
1210
1210
|
style: {
|
|
1211
1211
|
position: "fixed",
|
|
1212
|
-
top:
|
|
1213
|
-
...
|
|
1214
|
-
width:
|
|
1212
|
+
top: g.top,
|
|
1213
|
+
...g.right !== void 0 ? { right: g.right } : { left: g.left },
|
|
1214
|
+
width: g.width,
|
|
1215
1215
|
zIndex: 1e3
|
|
1216
1216
|
},
|
|
1217
|
-
children: /* @__PURE__ */
|
|
1218
|
-
/* @__PURE__ */
|
|
1219
|
-
/* @__PURE__ */
|
|
1217
|
+
children: /* @__PURE__ */ A("div", { className: "nc-month-range-picker-content", children: [
|
|
1218
|
+
/* @__PURE__ */ A("div", { className: "nc-month-range-picker-row", children: [
|
|
1219
|
+
/* @__PURE__ */ A("div", { className: "nc-month-range-picker-column", children: [
|
|
1220
1220
|
/* @__PURE__ */ s("label", { className: "nc-label", children: "Start Month" }),
|
|
1221
1221
|
/* @__PURE__ */ s(
|
|
1222
1222
|
"input",
|
|
1223
1223
|
{
|
|
1224
1224
|
type: "text",
|
|
1225
|
-
className: `nc-month-input ${
|
|
1226
|
-
value:
|
|
1227
|
-
onChange: (
|
|
1225
|
+
className: `nc-month-input ${N ? "nc-error" : ""}`,
|
|
1226
|
+
value: u,
|
|
1227
|
+
onChange: (x) => f(x.target.value),
|
|
1228
1228
|
placeholder: "YY-M(M) or YYYY-M(M)"
|
|
1229
1229
|
}
|
|
1230
1230
|
),
|
|
1231
|
-
|
|
1231
|
+
N && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: N })
|
|
1232
1232
|
] }),
|
|
1233
|
-
/* @__PURE__ */
|
|
1233
|
+
/* @__PURE__ */ A("div", { className: "nc-month-range-picker-column", children: [
|
|
1234
1234
|
/* @__PURE__ */ s("label", { className: "nc-label", children: "End Month" }),
|
|
1235
1235
|
/* @__PURE__ */ s(
|
|
1236
1236
|
"input",
|
|
@@ -1238,113 +1238,134 @@ function lr({
|
|
|
1238
1238
|
type: "text",
|
|
1239
1239
|
className: `nc-month-input ${C ? "nc-error" : ""}`,
|
|
1240
1240
|
value: w,
|
|
1241
|
-
onChange: (
|
|
1241
|
+
onChange: (x) => d(x.target.value),
|
|
1242
1242
|
placeholder: "YY-M(M) or YYYY-M(M)"
|
|
1243
1243
|
}
|
|
1244
1244
|
),
|
|
1245
1245
|
C && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: C })
|
|
1246
1246
|
] })
|
|
1247
1247
|
] }),
|
|
1248
|
-
S && !
|
|
1249
|
-
/* @__PURE__ */
|
|
1248
|
+
S && !N && !C && /* @__PURE__ */ s("div", { className: "nc-month-range-error", children: "End month must be after or equal to start month" }),
|
|
1249
|
+
/* @__PURE__ */ A("div", { className: "nc-month-range-picker-footer", children: [
|
|
1250
1250
|
/* @__PURE__ */ s(
|
|
1251
|
-
|
|
1251
|
+
ne,
|
|
1252
1252
|
{
|
|
1253
1253
|
variant: "primary",
|
|
1254
|
-
onClick:
|
|
1255
|
-
disabled: !
|
|
1254
|
+
onClick: p,
|
|
1255
|
+
disabled: !u || !w || !!N || !!C || !!S,
|
|
1256
1256
|
children: "Apply"
|
|
1257
1257
|
}
|
|
1258
1258
|
),
|
|
1259
|
-
/* @__PURE__ */ s(
|
|
1259
|
+
/* @__PURE__ */ s(ne, { variant: "ghost", onClick: h, children: "Cancel" })
|
|
1260
1260
|
] })
|
|
1261
1261
|
] })
|
|
1262
1262
|
}
|
|
1263
1263
|
),
|
|
1264
1264
|
document.body
|
|
1265
1265
|
) : null;
|
|
1266
|
-
return /* @__PURE__ */
|
|
1266
|
+
return /* @__PURE__ */ A("div", { className: `nc-month-range-picker ${a === "small" ? "nc-small " : ""}${o}`, children: [
|
|
1267
1267
|
r && /* @__PURE__ */ s("label", { className: `nc-label${a === "small" ? " nc-small" : ""}`, children: r }),
|
|
1268
1268
|
/* @__PURE__ */ s(
|
|
1269
1269
|
"button",
|
|
1270
1270
|
{
|
|
1271
|
-
ref:
|
|
1271
|
+
ref: b,
|
|
1272
1272
|
className: `nc-month-range-picker-input${a === "small" ? " nc-small" : ""}`,
|
|
1273
|
-
onClick:
|
|
1273
|
+
onClick: y,
|
|
1274
1274
|
disabled: i,
|
|
1275
|
-
children:
|
|
1275
|
+
children: m
|
|
1276
1276
|
}
|
|
1277
1277
|
),
|
|
1278
|
-
|
|
1278
|
+
L
|
|
1279
1279
|
] });
|
|
1280
1280
|
}
|
|
1281
|
-
const Vt = 5,
|
|
1282
|
-
function dr({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disabled: a,
|
|
1283
|
-
const
|
|
1284
|
-
const
|
|
1285
|
-
|
|
1286
|
-
},
|
|
1287
|
-
const
|
|
1288
|
-
|
|
1289
|
-
},
|
|
1290
|
-
const
|
|
1291
|
-
|
|
1292
|
-
},
|
|
1293
|
-
|
|
1294
|
-
|
|
1281
|
+
const Vt = 5, Ft = 3;
|
|
1282
|
+
function dr({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disabled: a, className: c = "", style: l, size: u = "default" }) {
|
|
1283
|
+
const f = u === "small", w = (String(o).split(".")[1] || "").length, d = Y(null), g = Y(!1), k = Y(null), [b, v] = E(!1), [y, h] = E(() => String(e)), p = ($) => parseFloat($.toFixed(w)), m = ($) => {
|
|
1284
|
+
const T = p($);
|
|
1285
|
+
h(String(T)), t(T);
|
|
1286
|
+
}, N = () => {
|
|
1287
|
+
const $ = e - o;
|
|
1288
|
+
n !== void 0 && $ < n || m(parseFloat($.toFixed(10)));
|
|
1289
|
+
}, C = () => {
|
|
1290
|
+
const $ = e + o;
|
|
1291
|
+
r !== void 0 && $ > r || m(parseFloat($.toFixed(10)));
|
|
1292
|
+
}, P = ($) => {
|
|
1293
|
+
const T = $.target.value;
|
|
1294
|
+
if (h(T), T === "") return;
|
|
1295
|
+
const H = parseFloat(T);
|
|
1296
|
+
isNaN(H) || t(H);
|
|
1297
|
+
}, B = () => {
|
|
1298
|
+
const $ = y;
|
|
1299
|
+
if ($ === "") {
|
|
1300
|
+
m(n !== void 0 ? n : 0);
|
|
1301
|
+
return;
|
|
1302
|
+
}
|
|
1303
|
+
const T = parseFloat($);
|
|
1304
|
+
if (isNaN(T)) {
|
|
1305
|
+
m(n !== void 0 ? n : 0);
|
|
1306
|
+
return;
|
|
1307
|
+
}
|
|
1308
|
+
let H = p(T);
|
|
1309
|
+
n !== void 0 && (H = Math.max(n, H)), r !== void 0 && (H = Math.min(r, H)), H !== T ? m(H) : h(String(H));
|
|
1310
|
+
}, S = ($) => {
|
|
1311
|
+
a || $.button !== 0 || (g.current = !1, d.current = {
|
|
1312
|
+
startY: $.clientY,
|
|
1295
1313
|
startValue: e,
|
|
1296
|
-
pointerId:
|
|
1314
|
+
pointerId: $.pointerId,
|
|
1297
1315
|
hasMoved: !1,
|
|
1298
1316
|
lastValue: e
|
|
1299
|
-
},
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
const
|
|
1304
|
-
if (
|
|
1305
|
-
const
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1317
|
+
}, k.current = setTimeout(() => {
|
|
1318
|
+
g.current = !0, v(!0);
|
|
1319
|
+
}, 200), $.currentTarget.setPointerCapture($.pointerId));
|
|
1320
|
+
}, L = ($) => {
|
|
1321
|
+
const T = d.current;
|
|
1322
|
+
if (!T || T.pointerId !== $.pointerId) return;
|
|
1323
|
+
const H = T.startY - $.clientY;
|
|
1324
|
+
if (Math.abs(H) >= Ft && (T.hasMoved = !0, g.current = !0, k.current && (clearTimeout(k.current), k.current = null), v(!0)), !T.hasMoved) return;
|
|
1325
|
+
const q = Math.trunc(H / Vt);
|
|
1326
|
+
let O = T.startValue + q * o;
|
|
1327
|
+
n !== void 0 && (O = Math.max(n, O)), r !== void 0 && (O = Math.min(r, O)), O = p(O), O !== T.lastValue && (T.lastValue = O, h(String(O)), t(O));
|
|
1328
|
+
}, x = ($) => {
|
|
1329
|
+
const T = d.current;
|
|
1330
|
+
!T || T.pointerId !== $.pointerId || (k.current && (clearTimeout(k.current), k.current = null), $.currentTarget.hasPointerCapture($.pointerId) && $.currentTarget.releasePointerCapture($.pointerId), d.current = null, v(!1));
|
|
1331
|
+
}, M = ($) => (T) => {
|
|
1332
|
+
if (g.current) {
|
|
1333
|
+
g.current = !1, T.preventDefault();
|
|
1314
1334
|
return;
|
|
1315
1335
|
}
|
|
1316
|
-
|
|
1317
|
-
};
|
|
1318
|
-
return /* @__PURE__ */
|
|
1319
|
-
i && /* @__PURE__ */ s("span", { className: `nc-label ${
|
|
1320
|
-
/* @__PURE__ */
|
|
1336
|
+
$();
|
|
1337
|
+
}, z = y === "" ? NaN : parseFloat(y), F = y === "" || isNaN(z) || n !== void 0 && z < n || r !== void 0 && z > r;
|
|
1338
|
+
return /* @__PURE__ */ A("div", { className: `nc-col nc-number-input-col ${f ? "nc-small" : ""}`, children: [
|
|
1339
|
+
i && /* @__PURE__ */ s("span", { className: `nc-label ${f ? "nc-small" : ""}`, children: i }),
|
|
1340
|
+
/* @__PURE__ */ A("div", { className: `nc-number-input-container ${f ? "nc-small" : ""} ${c}`, style: l, children: [
|
|
1321
1341
|
/* @__PURE__ */ s(
|
|
1322
1342
|
"input",
|
|
1323
1343
|
{
|
|
1324
|
-
className: `nc-input nc-number-input ${
|
|
1344
|
+
className: `nc-input nc-number-input ${f ? "nc-small" : ""} ${F ? "nc-error" : ""}`,
|
|
1325
1345
|
type: "number",
|
|
1326
|
-
value:
|
|
1327
|
-
onChange:
|
|
1346
|
+
value: y,
|
|
1347
|
+
onChange: P,
|
|
1348
|
+
onBlur: B,
|
|
1328
1349
|
min: n,
|
|
1329
1350
|
max: r,
|
|
1330
1351
|
step: o,
|
|
1331
1352
|
disabled: a
|
|
1332
1353
|
}
|
|
1333
1354
|
),
|
|
1334
|
-
/* @__PURE__ */
|
|
1355
|
+
/* @__PURE__ */ A(
|
|
1335
1356
|
"div",
|
|
1336
1357
|
{
|
|
1337
|
-
className: `nc-number-input-spinners ${
|
|
1358
|
+
className: `nc-number-input-spinners ${f ? "nc-small" : ""} ${a ? "nc-disabled" : ""} ${b ? "nc-dragging" : ""}`,
|
|
1338
1359
|
children: [
|
|
1339
1360
|
/* @__PURE__ */ s(
|
|
1340
1361
|
"button",
|
|
1341
1362
|
{
|
|
1342
|
-
className: `nc-number-input-spin nc-number-input-spin-up ${
|
|
1343
|
-
onClick:
|
|
1344
|
-
onPointerDown:
|
|
1345
|
-
onPointerMove:
|
|
1346
|
-
onPointerUp:
|
|
1347
|
-
onPointerCancel:
|
|
1363
|
+
className: `nc-number-input-spin nc-number-input-spin-up ${f ? "nc-small" : ""}`,
|
|
1364
|
+
onClick: M(C),
|
|
1365
|
+
onPointerDown: S,
|
|
1366
|
+
onPointerMove: L,
|
|
1367
|
+
onPointerUp: x,
|
|
1368
|
+
onPointerCancel: x,
|
|
1348
1369
|
disabled: a || r !== void 0 && e >= r,
|
|
1349
1370
|
tabIndex: -1,
|
|
1350
1371
|
children: "▲"
|
|
@@ -1353,12 +1374,12 @@ function dr({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
|
|
|
1353
1374
|
/* @__PURE__ */ s(
|
|
1354
1375
|
"button",
|
|
1355
1376
|
{
|
|
1356
|
-
className: `nc-number-input-spin nc-number-input-spin-down ${
|
|
1357
|
-
onClick:
|
|
1358
|
-
onPointerDown:
|
|
1359
|
-
onPointerMove:
|
|
1360
|
-
onPointerUp:
|
|
1361
|
-
onPointerCancel:
|
|
1377
|
+
className: `nc-number-input-spin nc-number-input-spin-down ${f ? "nc-small" : ""}`,
|
|
1378
|
+
onClick: M(N),
|
|
1379
|
+
onPointerDown: S,
|
|
1380
|
+
onPointerMove: L,
|
|
1381
|
+
onPointerUp: x,
|
|
1382
|
+
onPointerCancel: x,
|
|
1362
1383
|
disabled: a || n !== void 0 && e <= n,
|
|
1363
1384
|
tabIndex: -1,
|
|
1364
1385
|
children: "▼"
|
|
@@ -1379,29 +1400,29 @@ function ur({
|
|
|
1379
1400
|
label: i,
|
|
1380
1401
|
disabled: a,
|
|
1381
1402
|
showValue: c = !0,
|
|
1382
|
-
formatValue: l = (
|
|
1383
|
-
width:
|
|
1403
|
+
formatValue: l = (f) => f.toString(),
|
|
1404
|
+
width: u = 200
|
|
1384
1405
|
}) {
|
|
1385
|
-
const
|
|
1386
|
-
const
|
|
1387
|
-
t(
|
|
1406
|
+
const f = (d) => {
|
|
1407
|
+
const g = parseFloat(d.target.value);
|
|
1408
|
+
t(g);
|
|
1388
1409
|
}, w = (e - n) / (r - n) * 100;
|
|
1389
|
-
return /* @__PURE__ */
|
|
1410
|
+
return /* @__PURE__ */ A("div", { className: "nc-col", style: { gap: 6 }, children: [
|
|
1390
1411
|
i && /* @__PURE__ */ s("span", { className: "nc-label", children: i }),
|
|
1391
|
-
/* @__PURE__ */
|
|
1412
|
+
/* @__PURE__ */ A("div", { style: { display: "flex", gap: 12, alignItems: "center" }, children: [
|
|
1392
1413
|
/* @__PURE__ */ s(
|
|
1393
1414
|
"input",
|
|
1394
1415
|
{
|
|
1395
1416
|
type: "range",
|
|
1396
1417
|
className: "nc-slider",
|
|
1397
1418
|
value: e,
|
|
1398
|
-
onChange:
|
|
1419
|
+
onChange: f,
|
|
1399
1420
|
min: n,
|
|
1400
1421
|
max: r,
|
|
1401
1422
|
step: o,
|
|
1402
1423
|
disabled: a,
|
|
1403
1424
|
style: {
|
|
1404
|
-
width:
|
|
1425
|
+
width: u,
|
|
1405
1426
|
"--nc-slider-percentage": `${w}%`
|
|
1406
1427
|
}
|
|
1407
1428
|
}
|
|
@@ -1422,7 +1443,7 @@ function ur({
|
|
|
1422
1443
|
] })
|
|
1423
1444
|
] });
|
|
1424
1445
|
}
|
|
1425
|
-
const
|
|
1446
|
+
const Ot = ({ 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" }) });
|
|
1426
1447
|
function jt({ children: e, className: t = "", style: n }) {
|
|
1427
1448
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panel ${t}`, style: n, children: e });
|
|
1428
1449
|
}
|
|
@@ -1447,89 +1468,89 @@ function pr({ active: e, children: t, keepMounted: n = !1, className: r = "", st
|
|
|
1447
1468
|
const a = i.find((c) => c.props.tab === e);
|
|
1448
1469
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: a });
|
|
1449
1470
|
}
|
|
1450
|
-
function fr({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, className: i, toolbar: a, multiline: c, orientation: l = "horizontal", style:
|
|
1451
|
-
const
|
|
1452
|
-
|
|
1471
|
+
function fr({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, className: i, toolbar: a, multiline: c, orientation: l = "horizontal", style: u }) {
|
|
1472
|
+
const f = Y(null), [w, d] = E(!1), [g, k] = E(!1), b = l === "verticalLeft" || l === "verticalRight", v = Y(!1), y = Y(0), h = Y(0), p = Y(!1);
|
|
1473
|
+
V(() => {
|
|
1453
1474
|
const S = () => {
|
|
1454
|
-
if (
|
|
1455
|
-
if (
|
|
1456
|
-
const { scrollTop:
|
|
1457
|
-
|
|
1475
|
+
if (f.current)
|
|
1476
|
+
if (b) {
|
|
1477
|
+
const { scrollTop: x, scrollHeight: M, clientHeight: z } = f.current;
|
|
1478
|
+
d(x > 1), k(x < M - z - 1);
|
|
1458
1479
|
} else {
|
|
1459
|
-
const { scrollLeft:
|
|
1460
|
-
|
|
1480
|
+
const { scrollLeft: x, scrollWidth: M, clientWidth: z } = f.current;
|
|
1481
|
+
d(x > 1), k(x < M - z - 1);
|
|
1461
1482
|
}
|
|
1462
|
-
},
|
|
1463
|
-
if (
|
|
1464
|
-
return S(),
|
|
1465
|
-
|
|
1483
|
+
}, L = f.current;
|
|
1484
|
+
if (L)
|
|
1485
|
+
return S(), L.addEventListener("scroll", S), window.addEventListener("resize", S), () => {
|
|
1486
|
+
L.removeEventListener("scroll", S), window.removeEventListener("resize", S);
|
|
1466
1487
|
};
|
|
1467
|
-
}, [e,
|
|
1468
|
-
const
|
|
1469
|
-
|
|
1470
|
-
},
|
|
1471
|
-
if (!
|
|
1472
|
-
const
|
|
1473
|
-
Math.abs(
|
|
1488
|
+
}, [e, b]);
|
|
1489
|
+
const m = (S) => {
|
|
1490
|
+
f.current && (v.current = !0, p.current = !1, y.current = b ? S.clientY : S.clientX, h.current = b ? f.current.scrollTop : f.current.scrollLeft, f.current.style.cursor = "grabbing", f.current.style.userSelect = "none");
|
|
1491
|
+
}, N = (S) => {
|
|
1492
|
+
if (!v.current || !f.current) return;
|
|
1493
|
+
const L = b ? S.clientY : S.clientX, x = y.current - L;
|
|
1494
|
+
Math.abs(x) > 3 && (p.current = !0), b ? f.current.scrollTop = h.current + x : f.current.scrollLeft = h.current + x;
|
|
1474
1495
|
}, C = () => {
|
|
1475
|
-
|
|
1476
|
-
},
|
|
1496
|
+
f.current && (v.current = !1, f.current.style.cursor = "", f.current.style.userSelect = "");
|
|
1497
|
+
}, P = () => {
|
|
1477
1498
|
C();
|
|
1478
1499
|
};
|
|
1479
|
-
|
|
1480
|
-
const S =
|
|
1481
|
-
if (!S ||
|
|
1482
|
-
const
|
|
1483
|
-
|
|
1500
|
+
V(() => {
|
|
1501
|
+
const S = f.current;
|
|
1502
|
+
if (!S || b) return;
|
|
1503
|
+
const L = (x) => {
|
|
1504
|
+
x.deltaY !== 0 && (x.preventDefault(), S.scrollLeft += x.deltaY * 0.3);
|
|
1484
1505
|
};
|
|
1485
|
-
return S.addEventListener("wheel",
|
|
1486
|
-
S.removeEventListener("wheel",
|
|
1506
|
+
return S.addEventListener("wheel", L, { passive: !1 }), () => {
|
|
1507
|
+
S.removeEventListener("wheel", L);
|
|
1487
1508
|
};
|
|
1488
|
-
}, [
|
|
1489
|
-
const
|
|
1490
|
-
|
|
1509
|
+
}, [b]);
|
|
1510
|
+
const B = (S) => {
|
|
1511
|
+
p.current || n(S);
|
|
1491
1512
|
};
|
|
1492
|
-
return /* @__PURE__ */
|
|
1493
|
-
/* @__PURE__ */
|
|
1494
|
-
w && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${
|
|
1513
|
+
return /* @__PURE__ */ A("div", { className: `nc-tab-container ${b ? `nc-vertical nc-${l}` : ""} ${i || ""}`, style: u, children: [
|
|
1514
|
+
/* @__PURE__ */ A("div", { className: "nc-tab-scroll-wrapper", children: [
|
|
1515
|
+
w && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${b ? "nc-top" : "nc-left"}`, children: b ? /* @__PURE__ */ s(Ot, { size: 16 }) : /* @__PURE__ */ s(xt, { size: 16 }) }),
|
|
1495
1516
|
/* @__PURE__ */ s(
|
|
1496
1517
|
"div",
|
|
1497
1518
|
{
|
|
1498
|
-
ref:
|
|
1519
|
+
ref: f,
|
|
1499
1520
|
className: `nc-tab-scroll ${c ? "nc-multiline" : ""}`,
|
|
1500
|
-
onMouseDown:
|
|
1501
|
-
onMouseMove:
|
|
1521
|
+
onMouseDown: m,
|
|
1522
|
+
onMouseMove: N,
|
|
1502
1523
|
onMouseUp: C,
|
|
1503
|
-
onMouseLeave:
|
|
1524
|
+
onMouseLeave: P,
|
|
1504
1525
|
style: { cursor: "grab" },
|
|
1505
1526
|
children: e.map((S) => {
|
|
1506
|
-
const
|
|
1507
|
-
return /* @__PURE__ */
|
|
1527
|
+
const L = typeof S == "string" ? S : S.id, x = typeof S == "string" ? S : S.label, M = r && !(o != null && o.includes(L));
|
|
1528
|
+
return /* @__PURE__ */ A(
|
|
1508
1529
|
"div",
|
|
1509
1530
|
{
|
|
1510
|
-
className: `nc-tab-item ${t ===
|
|
1511
|
-
onClick: () =>
|
|
1531
|
+
className: `nc-tab-item ${t === L ? "nc-active" : ""} ${M ? "nc-closable" : ""}`,
|
|
1532
|
+
onClick: () => B(L),
|
|
1512
1533
|
role: "button",
|
|
1513
1534
|
tabIndex: 0,
|
|
1514
|
-
onKeyDown: (
|
|
1515
|
-
(
|
|
1535
|
+
onKeyDown: (z) => {
|
|
1536
|
+
(z.key === "Enter" || z.key === " ") && n(L);
|
|
1516
1537
|
},
|
|
1517
1538
|
children: [
|
|
1518
|
-
/* @__PURE__ */ s("span", { className: "nc-tab-label", children:
|
|
1519
|
-
|
|
1539
|
+
/* @__PURE__ */ s("span", { className: "nc-tab-label", children: b ? x : typeof x == "string" ? x.toUpperCase() : x }),
|
|
1540
|
+
M && /* @__PURE__ */ s(
|
|
1520
1541
|
"span",
|
|
1521
1542
|
{
|
|
1522
1543
|
className: "nc-tab-close",
|
|
1523
1544
|
role: "button",
|
|
1524
1545
|
tabIndex: 0,
|
|
1525
|
-
"aria-label": `Close ${typeof
|
|
1526
|
-
onClick: (
|
|
1527
|
-
|
|
1546
|
+
"aria-label": `Close ${typeof x == "string" ? x : L}`,
|
|
1547
|
+
onClick: (z) => {
|
|
1548
|
+
z.stopPropagation(), r(L);
|
|
1528
1549
|
},
|
|
1529
|
-
onKeyDown: (
|
|
1530
|
-
(
|
|
1550
|
+
onKeyDown: (z) => {
|
|
1551
|
+
(z.key === "Enter" || z.key === " ") && (z.stopPropagation(), r(L));
|
|
1531
1552
|
},
|
|
1532
|
-
children: /* @__PURE__ */
|
|
1553
|
+
children: /* @__PURE__ */ A("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1533
1554
|
/* @__PURE__ */ s("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1534
1555
|
/* @__PURE__ */ s("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
1535
1556
|
] })
|
|
@@ -1537,18 +1558,18 @@ function fr({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, cla
|
|
|
1537
1558
|
)
|
|
1538
1559
|
]
|
|
1539
1560
|
},
|
|
1540
|
-
|
|
1561
|
+
L
|
|
1541
1562
|
);
|
|
1542
1563
|
})
|
|
1543
1564
|
}
|
|
1544
1565
|
),
|
|
1545
|
-
|
|
1566
|
+
g && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${b ? "nc-bottom" : "nc-right"}`, children: b ? /* @__PURE__ */ s(kt, { size: 16 }) : /* @__PURE__ */ s(Nt, { size: 16 }) })
|
|
1546
1567
|
] }),
|
|
1547
1568
|
a && /* @__PURE__ */ s("div", { className: "nc-tab-toolbar", children: a })
|
|
1548
1569
|
] });
|
|
1549
1570
|
}
|
|
1550
1571
|
function hr({ checked: e, onChange: t, disabled: n, label: r }) {
|
|
1551
|
-
return /* @__PURE__ */
|
|
1572
|
+
return /* @__PURE__ */ A(
|
|
1552
1573
|
"label",
|
|
1553
1574
|
{
|
|
1554
1575
|
className: "nc-row",
|
|
@@ -1622,11 +1643,11 @@ function Gt(e, t, n, r) {
|
|
|
1622
1643
|
let a = 0;
|
|
1623
1644
|
for (let w = 0; w < i - 1; w++)
|
|
1624
1645
|
a += o[w].length + 1;
|
|
1625
|
-
const l = o[i - 1].split(" "),
|
|
1626
|
-
for (let w = 0; w <
|
|
1646
|
+
const l = o[i - 1].split(" "), u = Math.max(1, Math.min(n, l.length));
|
|
1647
|
+
for (let w = 0; w < u - 1; w++)
|
|
1627
1648
|
a += l[w].length + 1;
|
|
1628
|
-
const
|
|
1629
|
-
return a +=
|
|
1649
|
+
const f = Math.max(1, Math.min(r, l[u - 1].length + 1));
|
|
1650
|
+
return a += f - 1, a;
|
|
1630
1651
|
}
|
|
1631
1652
|
function Kt(e, t) {
|
|
1632
1653
|
const n = e.split(`
|
|
@@ -1637,78 +1658,78 @@ function Kt(e, t) {
|
|
|
1637
1658
|
return o;
|
|
1638
1659
|
}
|
|
1639
1660
|
const mr = Ct(
|
|
1640
|
-
function({ value: t, onChange: n, placeholder: r, className: o, style: i, showLineNumbers: a = !1, onCursorChange: c, highlightLine: l },
|
|
1641
|
-
const
|
|
1642
|
-
Mt(
|
|
1643
|
-
goToLine(
|
|
1644
|
-
const
|
|
1645
|
-
if (!
|
|
1646
|
-
const
|
|
1647
|
-
|
|
1648
|
-
const
|
|
1649
|
-
|
|
1661
|
+
function({ value: t, onChange: n, placeholder: r, className: o, style: i, showLineNumbers: a = !1, onCursorChange: c, highlightLine: l }, u) {
|
|
1662
|
+
const f = Y(null), w = Y(null), d = Y(null);
|
|
1663
|
+
Mt(u, () => ({
|
|
1664
|
+
goToLine(h) {
|
|
1665
|
+
const p = f.current;
|
|
1666
|
+
if (!p) return;
|
|
1667
|
+
const m = Kt(t, h);
|
|
1668
|
+
p.focus(), p.setSelectionRange(m, m);
|
|
1669
|
+
const N = parseFloat(getComputedStyle(p).lineHeight) || 18;
|
|
1670
|
+
p.scrollTop = (Math.max(1, h) - 1) * N, k(), g();
|
|
1650
1671
|
},
|
|
1651
|
-
goToPosition(
|
|
1652
|
-
const
|
|
1653
|
-
if (!
|
|
1654
|
-
const C = Gt(t,
|
|
1655
|
-
|
|
1656
|
-
const
|
|
1657
|
-
|
|
1672
|
+
goToPosition(h, p, m) {
|
|
1673
|
+
const N = f.current;
|
|
1674
|
+
if (!N) return;
|
|
1675
|
+
const C = Gt(t, h, p, m);
|
|
1676
|
+
N.focus(), N.setSelectionRange(C, C);
|
|
1677
|
+
const P = parseFloat(getComputedStyle(N).lineHeight) || 18;
|
|
1678
|
+
N.scrollTop = (Math.max(1, h) - 1) * P, k(), g();
|
|
1658
1679
|
}
|
|
1659
1680
|
}), [t]);
|
|
1660
|
-
const
|
|
1661
|
-
if (!c || !
|
|
1662
|
-
const
|
|
1663
|
-
c(
|
|
1664
|
-
}, [c, t]),
|
|
1665
|
-
const
|
|
1666
|
-
|
|
1681
|
+
const g = X(() => {
|
|
1682
|
+
if (!c || !f.current) return;
|
|
1683
|
+
const h = Yt(t, f.current.selectionStart);
|
|
1684
|
+
c(h);
|
|
1685
|
+
}, [c, t]), k = X(() => {
|
|
1686
|
+
const h = f.current;
|
|
1687
|
+
h && (w.current && (w.current.scrollTop = h.scrollTop, w.current.scrollLeft = h.scrollLeft), d.current && (d.current.scrollTop = h.scrollTop));
|
|
1667
1688
|
}, []);
|
|
1668
|
-
|
|
1689
|
+
V(() => {
|
|
1669
1690
|
if (l == null || l < 1) return;
|
|
1670
|
-
const
|
|
1671
|
-
if (!
|
|
1672
|
-
const
|
|
1673
|
-
(
|
|
1691
|
+
const h = f.current;
|
|
1692
|
+
if (!h) return;
|
|
1693
|
+
const p = parseFloat(getComputedStyle(h).lineHeight) || 18, m = (l - 1) * p, N = m + p;
|
|
1694
|
+
(m < h.scrollTop || N > h.scrollTop + h.clientHeight) && (h.scrollTop = m - h.clientHeight / 2 + p / 2), k();
|
|
1674
1695
|
}, [l]);
|
|
1675
|
-
const
|
|
1676
|
-
`).length, [t]),
|
|
1677
|
-
const
|
|
1678
|
-
for (let
|
|
1679
|
-
|
|
1680
|
-
/* @__PURE__ */ s("div", { className: `nc-csv-line-number ${l ===
|
|
1696
|
+
const b = Ie(() => t.split(`
|
|
1697
|
+
`).length, [t]), v = () => {
|
|
1698
|
+
const h = [];
|
|
1699
|
+
for (let p = 1; p <= b; p++)
|
|
1700
|
+
h.push(
|
|
1701
|
+
/* @__PURE__ */ s("div", { className: `nc-csv-line-number ${l === p ? "nc-csv-highlight" : ""}`, children: p }, p)
|
|
1681
1702
|
);
|
|
1682
|
-
return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref:
|
|
1683
|
-
},
|
|
1684
|
-
`).map((
|
|
1685
|
-
const C =
|
|
1686
|
-
return /* @__PURE__ */
|
|
1687
|
-
C.map((
|
|
1688
|
-
|
|
1689
|
-
/* @__PURE__ */ s("span", { style: { color: _e[
|
|
1690
|
-
] },
|
|
1691
|
-
|
|
1703
|
+
return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref: d, children: h });
|
|
1704
|
+
}, y = (h) => h ? h.split(`
|
|
1705
|
+
`).map((m, N) => {
|
|
1706
|
+
const C = m.split(" ");
|
|
1707
|
+
return /* @__PURE__ */ A("div", { className: `nc-csv-line ${l === N + 1 ? "nc-csv-highlight" : ""}`, children: [
|
|
1708
|
+
C.map((P, B) => /* @__PURE__ */ A("span", { children: [
|
|
1709
|
+
B > 0 && /* @__PURE__ */ s("span", { className: "nc-csv-tab-char", children: " " }),
|
|
1710
|
+
/* @__PURE__ */ s("span", { style: { color: _e[B % _e.length] }, children: P })
|
|
1711
|
+
] }, B)),
|
|
1712
|
+
m === "" && `
|
|
1692
1713
|
`
|
|
1693
|
-
] },
|
|
1714
|
+
] }, N);
|
|
1694
1715
|
}) : null;
|
|
1695
|
-
return /* @__PURE__ */
|
|
1696
|
-
a &&
|
|
1697
|
-
/* @__PURE__ */
|
|
1698
|
-
/* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref: w, children: /* @__PURE__ */ s("pre", { className: "nc-csv-textarea-highlights", children:
|
|
1716
|
+
return /* @__PURE__ */ A("div", { className: `nc-csv-textarea-container ${a ? "nc-csv-with-gutter" : ""} ${o ?? ""}`, style: i, children: [
|
|
1717
|
+
a && v(),
|
|
1718
|
+
/* @__PURE__ */ A("div", { className: "nc-csv-textarea-editor", children: [
|
|
1719
|
+
/* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref: w, children: /* @__PURE__ */ s("pre", { className: "nc-csv-textarea-highlights", children: y(t) }) }),
|
|
1699
1720
|
/* @__PURE__ */ s(
|
|
1700
1721
|
"textarea",
|
|
1701
1722
|
{
|
|
1702
|
-
ref:
|
|
1723
|
+
ref: f,
|
|
1703
1724
|
className: "nc-csv-textarea-input",
|
|
1704
1725
|
value: t,
|
|
1705
|
-
onChange: (
|
|
1706
|
-
n(
|
|
1726
|
+
onChange: (h) => {
|
|
1727
|
+
n(h.target.value), requestAnimationFrame(g);
|
|
1707
1728
|
},
|
|
1708
|
-
onScroll:
|
|
1709
|
-
onSelect:
|
|
1710
|
-
onKeyUp:
|
|
1711
|
-
onClick:
|
|
1729
|
+
onScroll: k,
|
|
1730
|
+
onSelect: g,
|
|
1731
|
+
onKeyUp: g,
|
|
1732
|
+
onClick: g,
|
|
1712
1733
|
placeholder: r,
|
|
1713
1734
|
spellCheck: !1,
|
|
1714
1735
|
autoComplete: "off",
|
|
@@ -1774,13 +1795,13 @@ function qt({ type: e }) {
|
|
|
1774
1795
|
}
|
|
1775
1796
|
) });
|
|
1776
1797
|
case "danger":
|
|
1777
|
-
return /* @__PURE__ */
|
|
1798
|
+
return /* @__PURE__ */ A("svg", { viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
1778
1799
|
/* @__PURE__ */ s("circle", { cx: "10", cy: "10", r: "7", stroke: "currentColor", strokeWidth: "2" }),
|
|
1779
1800
|
/* @__PURE__ */ s("path", { d: "M10 6.5v4.25", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }),
|
|
1780
1801
|
/* @__PURE__ */ s("circle", { cx: "10", cy: "13.75", r: "1", fill: "currentColor" })
|
|
1781
1802
|
] });
|
|
1782
1803
|
case "warning":
|
|
1783
|
-
return /* @__PURE__ */
|
|
1804
|
+
return /* @__PURE__ */ A("svg", { viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
1784
1805
|
/* @__PURE__ */ s(
|
|
1785
1806
|
"path",
|
|
1786
1807
|
{
|
|
@@ -1794,7 +1815,7 @@ function qt({ type: e }) {
|
|
|
1794
1815
|
/* @__PURE__ */ s("circle", { cx: "10", cy: "13.25", r: "1", fill: "currentColor" })
|
|
1795
1816
|
] });
|
|
1796
1817
|
default:
|
|
1797
|
-
return /* @__PURE__ */
|
|
1818
|
+
return /* @__PURE__ */ A("svg", { viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
1798
1819
|
/* @__PURE__ */ s("circle", { cx: "10", cy: "10", r: "7", stroke: "currentColor", strokeWidth: "2" }),
|
|
1799
1820
|
/* @__PURE__ */ s("path", { d: "M10 9v4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }),
|
|
1800
1821
|
/* @__PURE__ */ s("circle", { cx: "10", cy: "6.5", r: "1", fill: "currentColor" })
|
|
@@ -1802,7 +1823,7 @@ function qt({ type: e }) {
|
|
|
1802
1823
|
}
|
|
1803
1824
|
}
|
|
1804
1825
|
function Xt({ notification: e }) {
|
|
1805
|
-
const { t } =
|
|
1826
|
+
const { t } = oe(), n = e.type || "info", r = () => {
|
|
1806
1827
|
if (e.title) return e.title;
|
|
1807
1828
|
switch (n) {
|
|
1808
1829
|
case "success":
|
|
@@ -1821,9 +1842,9 @@ function Xt({ notification: e }) {
|
|
|
1821
1842
|
"div",
|
|
1822
1843
|
{
|
|
1823
1844
|
className: `nc-notification nc-notification-${n}`,
|
|
1824
|
-
children: /* @__PURE__ */
|
|
1845
|
+
children: /* @__PURE__ */ A("div", { className: "nc-notification-content", children: [
|
|
1825
1846
|
/* @__PURE__ */ s("div", { className: `nc-notification-icon nc-notification-icon-${n}`, children: /* @__PURE__ */ s(qt, { type: n }) }),
|
|
1826
|
-
/* @__PURE__ */
|
|
1847
|
+
/* @__PURE__ */ A("div", { className: "nc-notification-body", children: [
|
|
1827
1848
|
/* @__PURE__ */ s("div", { className: "nc-notification-title", children: r() }),
|
|
1828
1849
|
/* @__PURE__ */ s("div", { className: "nc-notification-message", children: e.message })
|
|
1829
1850
|
] }),
|
|
@@ -1841,23 +1862,23 @@ function Xt({ notification: e }) {
|
|
|
1841
1862
|
);
|
|
1842
1863
|
}
|
|
1843
1864
|
function gr() {
|
|
1844
|
-
const [e, t] =
|
|
1845
|
-
return
|
|
1846
|
-
const
|
|
1847
|
-
w.length > 0 ? (t(
|
|
1865
|
+
const [e, t] = E([]), [n, r] = E(/* @__PURE__ */ new Map()), [o, i] = E(/* @__PURE__ */ new Set()), a = Y(null), c = Y([]);
|
|
1866
|
+
return V(() => _t((u) => {
|
|
1867
|
+
const f = new Set(c.current.map((d) => d.id)), w = u.filter((d) => !f.has(d.id)).map((d) => d.id);
|
|
1868
|
+
w.length > 0 ? (t(u), i(new Set(w)), requestAnimationFrame(() => {
|
|
1848
1869
|
requestAnimationFrame(() => {
|
|
1849
1870
|
i(/* @__PURE__ */ new Set());
|
|
1850
1871
|
});
|
|
1851
|
-
})) : t(
|
|
1852
|
-
}), []),
|
|
1872
|
+
})) : t(u), c.current = u;
|
|
1873
|
+
}), []), V(() => {
|
|
1853
1874
|
if (!a.current) return;
|
|
1854
1875
|
const l = /* @__PURE__ */ new Map();
|
|
1855
|
-
let
|
|
1856
|
-
const
|
|
1857
|
-
e.forEach((w,
|
|
1858
|
-
if (l.set(w.id,
|
|
1859
|
-
const
|
|
1860
|
-
w.isRemoving || (
|
|
1876
|
+
let u = 0;
|
|
1877
|
+
const f = a.current.children;
|
|
1878
|
+
e.forEach((w, d) => {
|
|
1879
|
+
if (l.set(w.id, u), f[d]) {
|
|
1880
|
+
const g = f[d].offsetHeight;
|
|
1881
|
+
w.isRemoving || (u += g + 12);
|
|
1861
1882
|
}
|
|
1862
1883
|
}), r(l);
|
|
1863
1884
|
}, [e]), /* @__PURE__ */ s(
|
|
@@ -1881,7 +1902,7 @@ function gr() {
|
|
|
1881
1902
|
width: "100%"
|
|
1882
1903
|
},
|
|
1883
1904
|
children: e.map((l) => {
|
|
1884
|
-
const
|
|
1905
|
+
const u = o.has(l.id), f = l.isRemoving, w = n.get(l.id) || 0;
|
|
1885
1906
|
return /* @__PURE__ */ s(
|
|
1886
1907
|
"div",
|
|
1887
1908
|
{
|
|
@@ -1889,10 +1910,10 @@ function gr() {
|
|
|
1889
1910
|
position: "absolute",
|
|
1890
1911
|
top: 0,
|
|
1891
1912
|
left: 0,
|
|
1892
|
-
transform:
|
|
1913
|
+
transform: u ? `translate3d(-40px, ${w}px, 0)` : `translate3d(0, ${w}px, 0)`,
|
|
1893
1914
|
// Only animate transform when not leaving, animate opacity always
|
|
1894
|
-
transition:
|
|
1895
|
-
opacity:
|
|
1915
|
+
transition: f ? "opacity 300ms ease-out" : "transform 300ms ease-out, opacity 300ms ease-out",
|
|
1916
|
+
opacity: f ? 0 : 1,
|
|
1896
1917
|
width: "100%"
|
|
1897
1918
|
},
|
|
1898
1919
|
children: /* @__PURE__ */ s(Xt, { notification: l })
|
|
@@ -1934,7 +1955,7 @@ function vr(e) {
|
|
|
1934
1955
|
}
|
|
1935
1956
|
class Qt {
|
|
1936
1957
|
constructor() {
|
|
1937
|
-
|
|
1958
|
+
se(this, "apps", /* @__PURE__ */ new Map());
|
|
1938
1959
|
}
|
|
1939
1960
|
/**
|
|
1940
1961
|
* Register an app definition.
|
|
@@ -1975,8 +1996,8 @@ class Qt {
|
|
|
1975
1996
|
const me = new Qt(), qe = "nc-ui-app-state";
|
|
1976
1997
|
class Zt {
|
|
1977
1998
|
constructor() {
|
|
1978
|
-
|
|
1979
|
-
|
|
1999
|
+
se(this, "state");
|
|
2000
|
+
se(this, "listeners", /* @__PURE__ */ new Map());
|
|
1980
2001
|
this.state = this.loadState();
|
|
1981
2002
|
}
|
|
1982
2003
|
loadState() {
|
|
@@ -2020,13 +2041,13 @@ class Zt {
|
|
|
2020
2041
|
(r = this.listeners.get(t)) == null || r.forEach((o) => o(n));
|
|
2021
2042
|
}
|
|
2022
2043
|
}
|
|
2023
|
-
const
|
|
2044
|
+
const re = new Zt();
|
|
2024
2045
|
class en {
|
|
2025
2046
|
constructor() {
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2047
|
+
se(this, "apps", []);
|
|
2048
|
+
se(this, "activeAppId", null);
|
|
2049
|
+
se(this, "listeners", /* @__PURE__ */ new Set());
|
|
2050
|
+
se(this, "refReadyResolvers", /* @__PURE__ */ new Map());
|
|
2030
2051
|
}
|
|
2031
2052
|
/**
|
|
2032
2053
|
* Launch an app and wait for it to be ready (ref populated).
|
|
@@ -2042,12 +2063,12 @@ class en {
|
|
|
2042
2063
|
return console.error(`Cannot launch app "${t}": not registered`), null;
|
|
2043
2064
|
const o = this.apps.find((a) => a.appId === t);
|
|
2044
2065
|
if (o)
|
|
2045
|
-
return r || (this.setActiveApp(t),
|
|
2066
|
+
return r || (this.setActiveApp(t), re._setActiveAppId(t)), o.ref ? o : this.waitForRef(t);
|
|
2046
2067
|
const i = {
|
|
2047
2068
|
appId: t,
|
|
2048
2069
|
launchedAt: Date.now()
|
|
2049
2070
|
};
|
|
2050
|
-
return this.apps.push(i), r || (this.activeAppId = t,
|
|
2071
|
+
return this.apps.push(i), r || (this.activeAppId = t, re._setActiveAppId(t)), this.notify(), this.waitForRef(t);
|
|
2051
2072
|
}
|
|
2052
2073
|
waitForRef(t) {
|
|
2053
2074
|
return new Promise((n) => {
|
|
@@ -2084,7 +2105,7 @@ class en {
|
|
|
2084
2105
|
const r = this.apps[n];
|
|
2085
2106
|
if (r.ref && (r.ref = void 0), this.apps.splice(n, 1), this.activeAppId === t) {
|
|
2086
2107
|
const o = window.innerWidth >= 768;
|
|
2087
|
-
this.activeAppId = o && this.apps.length > 0 ? this.apps[this.apps.length - 1].appId : null,
|
|
2108
|
+
this.activeAppId = o && this.apps.length > 0 ? this.apps[this.apps.length - 1].appId : null, re._setActiveAppId(this.activeAppId);
|
|
2088
2109
|
}
|
|
2089
2110
|
this.notify();
|
|
2090
2111
|
}
|
|
@@ -2096,7 +2117,7 @@ class en {
|
|
|
2096
2117
|
console.warn(`Cannot activate app "${t}": not running`);
|
|
2097
2118
|
return;
|
|
2098
2119
|
}
|
|
2099
|
-
this.activeAppId !== t && (this.activeAppId = t, this.notify(),
|
|
2120
|
+
this.activeAppId !== t && (this.activeAppId = t, this.notify(), re._setActiveAppId(t));
|
|
2100
2121
|
}
|
|
2101
2122
|
/**
|
|
2102
2123
|
* Toggle an app: if active, deactivate; if inactive, activate.
|
|
@@ -2140,15 +2161,15 @@ class en {
|
|
|
2140
2161
|
this.listeners.forEach((t) => t());
|
|
2141
2162
|
}
|
|
2142
2163
|
}
|
|
2143
|
-
const
|
|
2164
|
+
const Z = new en(), nt = ge(null);
|
|
2144
2165
|
function tn() {
|
|
2145
|
-
const e =
|
|
2166
|
+
const e = ae(nt);
|
|
2146
2167
|
if (!e)
|
|
2147
2168
|
throw new Error("useApp must be used inside an App");
|
|
2148
2169
|
return e;
|
|
2149
2170
|
}
|
|
2150
2171
|
function nn({ size: e = 16 }) {
|
|
2151
|
-
return /* @__PURE__ */
|
|
2172
|
+
return /* @__PURE__ */ A(
|
|
2152
2173
|
"svg",
|
|
2153
2174
|
{
|
|
2154
2175
|
width: e,
|
|
@@ -2167,8 +2188,8 @@ function nn({ size: e = 16 }) {
|
|
|
2167
2188
|
);
|
|
2168
2189
|
}
|
|
2169
2190
|
function rn({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o }) {
|
|
2170
|
-
return /* @__PURE__ */
|
|
2171
|
-
/* @__PURE__ */
|
|
2191
|
+
return /* @__PURE__ */ A("div", { className: "nc-app-title-bar", children: [
|
|
2192
|
+
/* @__PURE__ */ A("div", { className: "nc-app-title-bar-left", children: [
|
|
2172
2193
|
n && !o && /* @__PURE__ */ s(
|
|
2173
2194
|
"button",
|
|
2174
2195
|
{
|
|
@@ -2181,7 +2202,7 @@ function rn({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o })
|
|
|
2181
2202
|
),
|
|
2182
2203
|
/* @__PURE__ */ s("span", { className: "nc-app-title-bar-title", children: e })
|
|
2183
2204
|
] }),
|
|
2184
|
-
/* @__PURE__ */
|
|
2205
|
+
/* @__PURE__ */ A("div", { className: "nc-app-title-bar-right", children: [
|
|
2185
2206
|
r && /* @__PURE__ */ s("div", { className: "nc-app-title-bar-toolbar", children: r }),
|
|
2186
2207
|
/* @__PURE__ */ s(Ze, { onClick: t, "aria-label": "Close application" })
|
|
2187
2208
|
] })
|
|
@@ -2198,56 +2219,56 @@ class on extends ze.Component {
|
|
|
2198
2219
|
console.error(`Error loading app ${this.props.appId}:`, t, n);
|
|
2199
2220
|
}
|
|
2200
2221
|
render() {
|
|
2201
|
-
return this.state.hasError ? /* @__PURE__ */
|
|
2222
|
+
return this.state.hasError ? /* @__PURE__ */ A("div", { className: "nc-app-error", children: [
|
|
2202
2223
|
/* @__PURE__ */ s("div", { children: "Failed to load app" }),
|
|
2203
2224
|
this.state.error && /* @__PURE__ */ s("div", { style: { fontSize: "12px", opacity: 0.7 }, children: this.state.error.message })
|
|
2204
2225
|
] }) : this.props.children;
|
|
2205
2226
|
}
|
|
2206
2227
|
}
|
|
2207
2228
|
function rt({ appId: e, isActive: t, onClose: n }) {
|
|
2208
|
-
const { t: r } =
|
|
2229
|
+
const { t: r } = oe(), o = me.get(e), [i, a] = E(""), [c, l] = E(null), [u, f] = E(null), [w, d] = E(!1), [g, k] = E(!1);
|
|
2209
2230
|
ze.useEffect(() => {
|
|
2210
2231
|
o != null && o.titleKey && a(r(o.titleKey));
|
|
2211
2232
|
}, [o, r]);
|
|
2212
|
-
const
|
|
2233
|
+
const b = X((S) => {
|
|
2213
2234
|
a(S);
|
|
2214
|
-
}, []),
|
|
2235
|
+
}, []), v = X((S) => {
|
|
2215
2236
|
l(() => S);
|
|
2216
|
-
}, []),
|
|
2237
|
+
}, []), y = X(() => {
|
|
2217
2238
|
l(null);
|
|
2218
|
-
}, []),
|
|
2219
|
-
|
|
2220
|
-
}, []),
|
|
2221
|
-
|
|
2222
|
-
}, []),
|
|
2223
|
-
|
|
2224
|
-
}, []),
|
|
2225
|
-
|
|
2239
|
+
}, []), h = X((S) => {
|
|
2240
|
+
f(S);
|
|
2241
|
+
}, []), p = X(() => {
|
|
2242
|
+
f(null);
|
|
2243
|
+
}, []), m = X((S) => {
|
|
2244
|
+
d(S);
|
|
2245
|
+
}, []), N = X((S) => {
|
|
2246
|
+
k(S);
|
|
2226
2247
|
}, []), C = Ie(() => ({
|
|
2227
|
-
setTitle:
|
|
2228
|
-
setBackHandler:
|
|
2229
|
-
clearBackHandler:
|
|
2230
|
-
setToolbar:
|
|
2231
|
-
clearToolbar:
|
|
2232
|
-
setHideBackButton:
|
|
2233
|
-
setHideTitleBar:
|
|
2248
|
+
setTitle: b,
|
|
2249
|
+
setBackHandler: v,
|
|
2250
|
+
clearBackHandler: y,
|
|
2251
|
+
setToolbar: h,
|
|
2252
|
+
clearToolbar: p,
|
|
2253
|
+
setHideBackButton: m,
|
|
2254
|
+
setHideTitleBar: N,
|
|
2234
2255
|
close: n
|
|
2235
|
-
}), [v, y,
|
|
2256
|
+
}), [b, v, y, h, p, m, N, n]);
|
|
2236
2257
|
if (!o)
|
|
2237
2258
|
return null;
|
|
2238
|
-
const
|
|
2239
|
-
return /* @__PURE__ */
|
|
2259
|
+
const P = o.component, B = !o.hideTitleBar && !g;
|
|
2260
|
+
return /* @__PURE__ */ A(
|
|
2240
2261
|
"div",
|
|
2241
2262
|
{
|
|
2242
2263
|
className: `nc-app-container${t ? "" : " nc-hidden"}`,
|
|
2243
2264
|
children: [
|
|
2244
|
-
|
|
2265
|
+
B && /* @__PURE__ */ s(
|
|
2245
2266
|
rn,
|
|
2246
2267
|
{
|
|
2247
2268
|
title: i,
|
|
2248
2269
|
onClose: n,
|
|
2249
2270
|
onBack: c ?? void 0,
|
|
2250
|
-
toolbar:
|
|
2271
|
+
toolbar: u,
|
|
2251
2272
|
hideBackButton: w
|
|
2252
2273
|
}
|
|
2253
2274
|
),
|
|
@@ -2257,13 +2278,13 @@ function rt({ appId: e, isActive: t, onClose: n }) {
|
|
|
2257
2278
|
className: "nc-app-content-wrapper",
|
|
2258
2279
|
style: {
|
|
2259
2280
|
padding: o.padding,
|
|
2260
|
-
overflowY:
|
|
2281
|
+
overflowY: B ? "auto" : void 0
|
|
2261
2282
|
},
|
|
2262
2283
|
children: /* @__PURE__ */ s(nt.Provider, { value: C, children: /* @__PURE__ */ s(on, { appId: e, children: /* @__PURE__ */ s(
|
|
2263
2284
|
It,
|
|
2264
2285
|
{
|
|
2265
2286
|
fallback: /* @__PURE__ */ s("div", { className: "nc-app-loading", children: /* @__PURE__ */ s(Qe, {}) }),
|
|
2266
|
-
children: /* @__PURE__ */ s(
|
|
2287
|
+
children: /* @__PURE__ */ s(P, {})
|
|
2267
2288
|
}
|
|
2268
2289
|
) }) })
|
|
2269
2290
|
}
|
|
@@ -2280,7 +2301,7 @@ const Ce = 768, Me = 1024, ot = {
|
|
|
2280
2301
|
height: typeof window < "u" ? window.innerHeight : 768
|
|
2281
2302
|
}, st = ge(ot);
|
|
2282
2303
|
function wr({ children: e }) {
|
|
2283
|
-
const [t, n] =
|
|
2304
|
+
const [t, n] = E(() => {
|
|
2284
2305
|
if (typeof window > "u") return ot;
|
|
2285
2306
|
const r = window.innerWidth, o = window.innerHeight;
|
|
2286
2307
|
return {
|
|
@@ -2291,7 +2312,7 @@ function wr({ children: e }) {
|
|
|
2291
2312
|
height: o
|
|
2292
2313
|
};
|
|
2293
2314
|
});
|
|
2294
|
-
return
|
|
2315
|
+
return V(() => {
|
|
2295
2316
|
const r = () => {
|
|
2296
2317
|
const o = window.innerWidth, i = window.innerHeight;
|
|
2297
2318
|
n({
|
|
@@ -2306,7 +2327,7 @@ function wr({ children: e }) {
|
|
|
2306
2327
|
}, []), /* @__PURE__ */ s(st.Provider, { value: t, children: e });
|
|
2307
2328
|
}
|
|
2308
2329
|
function it() {
|
|
2309
|
-
return
|
|
2330
|
+
return ae(st);
|
|
2310
2331
|
}
|
|
2311
2332
|
const Be = "-", sn = (e) => {
|
|
2312
2333
|
const t = an(e), {
|
|
@@ -2351,9 +2372,9 @@ const Be = "-", sn = (e) => {
|
|
|
2351
2372
|
validators: []
|
|
2352
2373
|
};
|
|
2353
2374
|
return dn(Object.entries(e.classGroups), n).forEach(([i, a]) => {
|
|
2354
|
-
|
|
2375
|
+
Ee(a, r, i, t);
|
|
2355
2376
|
}), r;
|
|
2356
|
-
},
|
|
2377
|
+
}, Ee = (e, t, n, r) => {
|
|
2357
2378
|
e.forEach((o) => {
|
|
2358
2379
|
if (typeof o == "string") {
|
|
2359
2380
|
const i = o === "" ? t : Je(t, o);
|
|
@@ -2362,7 +2383,7 @@ const Be = "-", sn = (e) => {
|
|
|
2362
2383
|
}
|
|
2363
2384
|
if (typeof o == "function") {
|
|
2364
2385
|
if (ln(o)) {
|
|
2365
|
-
|
|
2386
|
+
Ee(o(r), t, n, r);
|
|
2366
2387
|
return;
|
|
2367
2388
|
}
|
|
2368
2389
|
t.validators.push({
|
|
@@ -2372,7 +2393,7 @@ const Be = "-", sn = (e) => {
|
|
|
2372
2393
|
return;
|
|
2373
2394
|
}
|
|
2374
2395
|
Object.entries(o).forEach(([i, a]) => {
|
|
2375
|
-
|
|
2396
|
+
Ee(a, Je(t, i), n, r);
|
|
2376
2397
|
});
|
|
2377
2398
|
});
|
|
2378
2399
|
}, Je = (e, t) => {
|
|
@@ -2416,27 +2437,27 @@ const Be = "-", sn = (e) => {
|
|
|
2416
2437
|
experimentalParseClassName: n
|
|
2417
2438
|
} = e, r = t.length === 1, o = t[0], i = t.length, a = (c) => {
|
|
2418
2439
|
const l = [];
|
|
2419
|
-
let
|
|
2420
|
-
for (let
|
|
2421
|
-
let
|
|
2422
|
-
if (
|
|
2423
|
-
if (
|
|
2424
|
-
l.push(c.slice(
|
|
2440
|
+
let u = 0, f = 0, w;
|
|
2441
|
+
for (let v = 0; v < c.length; v++) {
|
|
2442
|
+
let y = c[v];
|
|
2443
|
+
if (u === 0) {
|
|
2444
|
+
if (y === o && (r || c.slice(v, v + i) === t)) {
|
|
2445
|
+
l.push(c.slice(f, v)), f = v + i;
|
|
2425
2446
|
continue;
|
|
2426
2447
|
}
|
|
2427
|
-
if (
|
|
2428
|
-
w =
|
|
2448
|
+
if (y === "/") {
|
|
2449
|
+
w = v;
|
|
2429
2450
|
continue;
|
|
2430
2451
|
}
|
|
2431
2452
|
}
|
|
2432
|
-
|
|
2453
|
+
y === "[" ? u++ : y === "]" && u--;
|
|
2433
2454
|
}
|
|
2434
|
-
const
|
|
2455
|
+
const d = l.length === 0 ? c : c.substring(f), g = d.startsWith(at), k = g ? d.substring(1) : d, b = w && w > f ? w - f : void 0;
|
|
2435
2456
|
return {
|
|
2436
2457
|
modifiers: l,
|
|
2437
|
-
hasImportantModifier:
|
|
2438
|
-
baseClassName:
|
|
2439
|
-
maybePostfixModifierPosition:
|
|
2458
|
+
hasImportantModifier: g,
|
|
2459
|
+
baseClassName: k,
|
|
2460
|
+
maybePostfixModifierPosition: b
|
|
2440
2461
|
};
|
|
2441
2462
|
};
|
|
2442
2463
|
return n ? (c) => n({
|
|
@@ -2463,34 +2484,34 @@ const Be = "-", sn = (e) => {
|
|
|
2463
2484
|
} = t, i = [], a = e.trim().split(mn);
|
|
2464
2485
|
let c = "";
|
|
2465
2486
|
for (let l = a.length - 1; l >= 0; l -= 1) {
|
|
2466
|
-
const
|
|
2467
|
-
modifiers:
|
|
2487
|
+
const u = a[l], {
|
|
2488
|
+
modifiers: f,
|
|
2468
2489
|
hasImportantModifier: w,
|
|
2469
|
-
baseClassName:
|
|
2470
|
-
maybePostfixModifierPosition:
|
|
2471
|
-
} = n(
|
|
2472
|
-
let
|
|
2473
|
-
if (!
|
|
2474
|
-
if (!
|
|
2475
|
-
c =
|
|
2490
|
+
baseClassName: d,
|
|
2491
|
+
maybePostfixModifierPosition: g
|
|
2492
|
+
} = n(u);
|
|
2493
|
+
let k = !!g, b = r(k ? d.substring(0, g) : d);
|
|
2494
|
+
if (!b) {
|
|
2495
|
+
if (!k) {
|
|
2496
|
+
c = u + (c.length > 0 ? " " + c : c);
|
|
2476
2497
|
continue;
|
|
2477
2498
|
}
|
|
2478
|
-
if (
|
|
2479
|
-
c =
|
|
2499
|
+
if (b = r(d), !b) {
|
|
2500
|
+
c = u + (c.length > 0 ? " " + c : c);
|
|
2480
2501
|
continue;
|
|
2481
2502
|
}
|
|
2482
|
-
|
|
2503
|
+
k = !1;
|
|
2483
2504
|
}
|
|
2484
|
-
const
|
|
2485
|
-
if (i.includes(
|
|
2505
|
+
const v = fn(f).join(":"), y = w ? v + at : v, h = y + b;
|
|
2506
|
+
if (i.includes(h))
|
|
2486
2507
|
continue;
|
|
2487
|
-
i.push(
|
|
2488
|
-
const
|
|
2489
|
-
for (let
|
|
2490
|
-
const
|
|
2491
|
-
i.push(
|
|
2508
|
+
i.push(h);
|
|
2509
|
+
const p = o(b, k);
|
|
2510
|
+
for (let m = 0; m < p.length; ++m) {
|
|
2511
|
+
const N = p[m];
|
|
2512
|
+
i.push(y + N);
|
|
2492
2513
|
}
|
|
2493
|
-
c =
|
|
2514
|
+
c = u + (c.length > 0 ? " " + c : c);
|
|
2494
2515
|
}
|
|
2495
2516
|
return c;
|
|
2496
2517
|
};
|
|
@@ -2511,62 +2532,62 @@ const lt = (e) => {
|
|
|
2511
2532
|
function vn(e, ...t) {
|
|
2512
2533
|
let n, r, o, i = a;
|
|
2513
2534
|
function a(l) {
|
|
2514
|
-
const
|
|
2515
|
-
return n = hn(
|
|
2535
|
+
const u = t.reduce((f, w) => w(f), e());
|
|
2536
|
+
return n = hn(u), r = n.cache.get, o = n.cache.set, i = c, c(l);
|
|
2516
2537
|
}
|
|
2517
2538
|
function c(l) {
|
|
2518
|
-
const
|
|
2519
|
-
if (
|
|
2520
|
-
return
|
|
2521
|
-
const
|
|
2522
|
-
return o(l,
|
|
2539
|
+
const u = r(l);
|
|
2540
|
+
if (u)
|
|
2541
|
+
return u;
|
|
2542
|
+
const f = gn(l, n);
|
|
2543
|
+
return o(l, f), f;
|
|
2523
2544
|
}
|
|
2524
2545
|
return function() {
|
|
2525
2546
|
return i(bn.apply(null, arguments));
|
|
2526
2547
|
};
|
|
2527
2548
|
}
|
|
2528
|
-
const
|
|
2549
|
+
const K = (e) => {
|
|
2529
2550
|
const t = (n) => n[e] || [];
|
|
2530
2551
|
return t.isThemeGetter = !0, t;
|
|
2531
|
-
}, dt = /^\[(?:([a-z-]+):)?(.+)\]$/i, wn = /^\d+\/\d+$/, yn = /* @__PURE__ */ new Set(["px", "full", "screen"]), xn = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, kn = /\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$/, Nn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, An = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Sn = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,
|
|
2552
|
+
}, dt = /^\[(?:([a-z-]+):)?(.+)\]$/i, wn = /^\d+\/\d+$/, yn = /* @__PURE__ */ new Set(["px", "full", "screen"]), xn = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, kn = /\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$/, Nn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, An = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Sn = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, te = (e) => he(e) || yn.has(e) || wn.test(e), ie = (e) => be(e, "length", Pn), he = (e) => !!e && !Number.isNaN(Number(e)), $e = (e) => be(e, "number", he), xe = (e) => !!e && Number.isInteger(Number(e)), Cn = (e) => e.endsWith("%") && he(e.slice(0, -1)), I = (e) => dt.test(e), ce = (e) => xn.test(e), Mn = /* @__PURE__ */ new Set(["length", "size", "percentage"]), In = (e) => be(e, Mn, ut), $n = (e) => be(e, "position", ut), Rn = /* @__PURE__ */ new Set(["image", "url"]), Tn = (e) => be(e, Rn, zn), En = (e) => be(e, "", Ln), ke = () => !0, be = (e, t, n) => {
|
|
2532
2553
|
const r = dt.exec(e);
|
|
2533
2554
|
return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1;
|
|
2534
|
-
},
|
|
2555
|
+
}, Pn = (e) => (
|
|
2535
2556
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
2536
2557
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
2537
2558
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
2538
2559
|
kn.test(e) && !Nn.test(e)
|
|
2539
2560
|
), ut = () => !1, Ln = (e) => An.test(e), zn = (e) => Sn.test(e), Bn = () => {
|
|
2540
|
-
const e =
|
|
2561
|
+
const e = K("colors"), t = K("spacing"), n = K("blur"), r = K("brightness"), o = K("borderColor"), i = K("borderRadius"), a = K("borderSpacing"), c = K("borderWidth"), l = K("contrast"), u = K("grayscale"), f = K("hueRotate"), w = K("invert"), d = K("gap"), g = K("gradientColorStops"), k = K("gradientColorStopPositions"), b = K("inset"), v = K("margin"), y = K("opacity"), h = K("padding"), p = K("saturate"), m = K("scale"), N = K("sepia"), C = K("skew"), P = K("space"), B = K("translate"), S = () => ["auto", "contain", "none"], L = () => ["auto", "hidden", "clip", "visible", "scroll"], x = () => ["auto", I, t], M = () => [I, t], z = () => ["", te, ie], F = () => ["auto", he, I], $ = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], T = () => ["solid", "dashed", "dotted", "double", "none"], H = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], q = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], O = () => ["", "0", I], _ = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], D = () => [he, I];
|
|
2541
2562
|
return {
|
|
2542
2563
|
cacheSize: 500,
|
|
2543
2564
|
separator: ":",
|
|
2544
2565
|
theme: {
|
|
2545
2566
|
colors: [ke],
|
|
2546
|
-
spacing: [
|
|
2547
|
-
blur: ["none", "",
|
|
2548
|
-
brightness:
|
|
2567
|
+
spacing: [te, ie],
|
|
2568
|
+
blur: ["none", "", ce, I],
|
|
2569
|
+
brightness: D(),
|
|
2549
2570
|
borderColor: [e],
|
|
2550
|
-
borderRadius: ["none", "", "full",
|
|
2551
|
-
borderSpacing:
|
|
2552
|
-
borderWidth:
|
|
2553
|
-
contrast:
|
|
2554
|
-
grayscale:
|
|
2555
|
-
hueRotate:
|
|
2556
|
-
invert:
|
|
2557
|
-
gap:
|
|
2571
|
+
borderRadius: ["none", "", "full", ce, I],
|
|
2572
|
+
borderSpacing: M(),
|
|
2573
|
+
borderWidth: z(),
|
|
2574
|
+
contrast: D(),
|
|
2575
|
+
grayscale: O(),
|
|
2576
|
+
hueRotate: D(),
|
|
2577
|
+
invert: O(),
|
|
2578
|
+
gap: M(),
|
|
2558
2579
|
gradientColorStops: [e],
|
|
2559
|
-
gradientColorStopPositions: [Cn,
|
|
2560
|
-
inset:
|
|
2561
|
-
margin:
|
|
2562
|
-
opacity:
|
|
2563
|
-
padding:
|
|
2564
|
-
saturate:
|
|
2565
|
-
scale:
|
|
2566
|
-
sepia:
|
|
2567
|
-
skew:
|
|
2568
|
-
space:
|
|
2569
|
-
translate:
|
|
2580
|
+
gradientColorStopPositions: [Cn, ie],
|
|
2581
|
+
inset: x(),
|
|
2582
|
+
margin: x(),
|
|
2583
|
+
opacity: D(),
|
|
2584
|
+
padding: M(),
|
|
2585
|
+
saturate: D(),
|
|
2586
|
+
scale: D(),
|
|
2587
|
+
sepia: O(),
|
|
2588
|
+
skew: D(),
|
|
2589
|
+
space: M(),
|
|
2590
|
+
translate: M()
|
|
2570
2591
|
},
|
|
2571
2592
|
classGroups: {
|
|
2572
2593
|
// Layout
|
|
@@ -2575,7 +2596,7 @@ const O = (e) => {
|
|
|
2575
2596
|
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
2576
2597
|
*/
|
|
2577
2598
|
aspect: [{
|
|
2578
|
-
aspect: ["auto", "square", "video",
|
|
2599
|
+
aspect: ["auto", "square", "video", I]
|
|
2579
2600
|
}],
|
|
2580
2601
|
/**
|
|
2581
2602
|
* Container
|
|
@@ -2587,21 +2608,21 @@ const O = (e) => {
|
|
|
2587
2608
|
* @see https://tailwindcss.com/docs/columns
|
|
2588
2609
|
*/
|
|
2589
2610
|
columns: [{
|
|
2590
|
-
columns: [
|
|
2611
|
+
columns: [ce]
|
|
2591
2612
|
}],
|
|
2592
2613
|
/**
|
|
2593
2614
|
* Break After
|
|
2594
2615
|
* @see https://tailwindcss.com/docs/break-after
|
|
2595
2616
|
*/
|
|
2596
2617
|
"break-after": [{
|
|
2597
|
-
"break-after":
|
|
2618
|
+
"break-after": _()
|
|
2598
2619
|
}],
|
|
2599
2620
|
/**
|
|
2600
2621
|
* Break Before
|
|
2601
2622
|
* @see https://tailwindcss.com/docs/break-before
|
|
2602
2623
|
*/
|
|
2603
2624
|
"break-before": [{
|
|
2604
|
-
"break-before":
|
|
2625
|
+
"break-before": _()
|
|
2605
2626
|
}],
|
|
2606
2627
|
/**
|
|
2607
2628
|
* Break Inside
|
|
@@ -2660,28 +2681,28 @@ const O = (e) => {
|
|
|
2660
2681
|
* @see https://tailwindcss.com/docs/object-position
|
|
2661
2682
|
*/
|
|
2662
2683
|
"object-position": [{
|
|
2663
|
-
object: [
|
|
2684
|
+
object: [...$(), I]
|
|
2664
2685
|
}],
|
|
2665
2686
|
/**
|
|
2666
2687
|
* Overflow
|
|
2667
2688
|
* @see https://tailwindcss.com/docs/overflow
|
|
2668
2689
|
*/
|
|
2669
2690
|
overflow: [{
|
|
2670
|
-
overflow:
|
|
2691
|
+
overflow: L()
|
|
2671
2692
|
}],
|
|
2672
2693
|
/**
|
|
2673
2694
|
* Overflow X
|
|
2674
2695
|
* @see https://tailwindcss.com/docs/overflow
|
|
2675
2696
|
*/
|
|
2676
2697
|
"overflow-x": [{
|
|
2677
|
-
"overflow-x":
|
|
2698
|
+
"overflow-x": L()
|
|
2678
2699
|
}],
|
|
2679
2700
|
/**
|
|
2680
2701
|
* Overflow Y
|
|
2681
2702
|
* @see https://tailwindcss.com/docs/overflow
|
|
2682
2703
|
*/
|
|
2683
2704
|
"overflow-y": [{
|
|
2684
|
-
"overflow-y":
|
|
2705
|
+
"overflow-y": L()
|
|
2685
2706
|
}],
|
|
2686
2707
|
/**
|
|
2687
2708
|
* Overscroll Behavior
|
|
@@ -2714,63 +2735,63 @@ const O = (e) => {
|
|
|
2714
2735
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2715
2736
|
*/
|
|
2716
2737
|
inset: [{
|
|
2717
|
-
inset: [
|
|
2738
|
+
inset: [b]
|
|
2718
2739
|
}],
|
|
2719
2740
|
/**
|
|
2720
2741
|
* Right / Left
|
|
2721
2742
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2722
2743
|
*/
|
|
2723
2744
|
"inset-x": [{
|
|
2724
|
-
"inset-x": [
|
|
2745
|
+
"inset-x": [b]
|
|
2725
2746
|
}],
|
|
2726
2747
|
/**
|
|
2727
2748
|
* Top / Bottom
|
|
2728
2749
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2729
2750
|
*/
|
|
2730
2751
|
"inset-y": [{
|
|
2731
|
-
"inset-y": [
|
|
2752
|
+
"inset-y": [b]
|
|
2732
2753
|
}],
|
|
2733
2754
|
/**
|
|
2734
2755
|
* Start
|
|
2735
2756
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2736
2757
|
*/
|
|
2737
2758
|
start: [{
|
|
2738
|
-
start: [
|
|
2759
|
+
start: [b]
|
|
2739
2760
|
}],
|
|
2740
2761
|
/**
|
|
2741
2762
|
* End
|
|
2742
2763
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2743
2764
|
*/
|
|
2744
2765
|
end: [{
|
|
2745
|
-
end: [
|
|
2766
|
+
end: [b]
|
|
2746
2767
|
}],
|
|
2747
2768
|
/**
|
|
2748
2769
|
* Top
|
|
2749
2770
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2750
2771
|
*/
|
|
2751
2772
|
top: [{
|
|
2752
|
-
top: [
|
|
2773
|
+
top: [b]
|
|
2753
2774
|
}],
|
|
2754
2775
|
/**
|
|
2755
2776
|
* Right
|
|
2756
2777
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2757
2778
|
*/
|
|
2758
2779
|
right: [{
|
|
2759
|
-
right: [
|
|
2780
|
+
right: [b]
|
|
2760
2781
|
}],
|
|
2761
2782
|
/**
|
|
2762
2783
|
* Bottom
|
|
2763
2784
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2764
2785
|
*/
|
|
2765
2786
|
bottom: [{
|
|
2766
|
-
bottom: [
|
|
2787
|
+
bottom: [b]
|
|
2767
2788
|
}],
|
|
2768
2789
|
/**
|
|
2769
2790
|
* Left
|
|
2770
2791
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2771
2792
|
*/
|
|
2772
2793
|
left: [{
|
|
2773
|
-
left: [
|
|
2794
|
+
left: [b]
|
|
2774
2795
|
}],
|
|
2775
2796
|
/**
|
|
2776
2797
|
* Visibility
|
|
@@ -2782,7 +2803,7 @@ const O = (e) => {
|
|
|
2782
2803
|
* @see https://tailwindcss.com/docs/z-index
|
|
2783
2804
|
*/
|
|
2784
2805
|
z: [{
|
|
2785
|
-
z: ["auto", xe,
|
|
2806
|
+
z: ["auto", xe, I]
|
|
2786
2807
|
}],
|
|
2787
2808
|
// Flexbox and Grid
|
|
2788
2809
|
/**
|
|
@@ -2790,7 +2811,7 @@ const O = (e) => {
|
|
|
2790
2811
|
* @see https://tailwindcss.com/docs/flex-basis
|
|
2791
2812
|
*/
|
|
2792
2813
|
basis: [{
|
|
2793
|
-
basis:
|
|
2814
|
+
basis: x()
|
|
2794
2815
|
}],
|
|
2795
2816
|
/**
|
|
2796
2817
|
* Flex Direction
|
|
@@ -2811,28 +2832,28 @@ const O = (e) => {
|
|
|
2811
2832
|
* @see https://tailwindcss.com/docs/flex
|
|
2812
2833
|
*/
|
|
2813
2834
|
flex: [{
|
|
2814
|
-
flex: ["1", "auto", "initial", "none",
|
|
2835
|
+
flex: ["1", "auto", "initial", "none", I]
|
|
2815
2836
|
}],
|
|
2816
2837
|
/**
|
|
2817
2838
|
* Flex Grow
|
|
2818
2839
|
* @see https://tailwindcss.com/docs/flex-grow
|
|
2819
2840
|
*/
|
|
2820
2841
|
grow: [{
|
|
2821
|
-
grow:
|
|
2842
|
+
grow: O()
|
|
2822
2843
|
}],
|
|
2823
2844
|
/**
|
|
2824
2845
|
* Flex Shrink
|
|
2825
2846
|
* @see https://tailwindcss.com/docs/flex-shrink
|
|
2826
2847
|
*/
|
|
2827
2848
|
shrink: [{
|
|
2828
|
-
shrink:
|
|
2849
|
+
shrink: O()
|
|
2829
2850
|
}],
|
|
2830
2851
|
/**
|
|
2831
2852
|
* Order
|
|
2832
2853
|
* @see https://tailwindcss.com/docs/order
|
|
2833
2854
|
*/
|
|
2834
2855
|
order: [{
|
|
2835
|
-
order: ["first", "last", "none", xe,
|
|
2856
|
+
order: ["first", "last", "none", xe, I]
|
|
2836
2857
|
}],
|
|
2837
2858
|
/**
|
|
2838
2859
|
* Grid Template Columns
|
|
@@ -2847,22 +2868,22 @@ const O = (e) => {
|
|
|
2847
2868
|
*/
|
|
2848
2869
|
"col-start-end": [{
|
|
2849
2870
|
col: ["auto", {
|
|
2850
|
-
span: ["full", xe,
|
|
2851
|
-
},
|
|
2871
|
+
span: ["full", xe, I]
|
|
2872
|
+
}, I]
|
|
2852
2873
|
}],
|
|
2853
2874
|
/**
|
|
2854
2875
|
* Grid Column Start
|
|
2855
2876
|
* @see https://tailwindcss.com/docs/grid-column
|
|
2856
2877
|
*/
|
|
2857
2878
|
"col-start": [{
|
|
2858
|
-
"col-start":
|
|
2879
|
+
"col-start": F()
|
|
2859
2880
|
}],
|
|
2860
2881
|
/**
|
|
2861
2882
|
* Grid Column End
|
|
2862
2883
|
* @see https://tailwindcss.com/docs/grid-column
|
|
2863
2884
|
*/
|
|
2864
2885
|
"col-end": [{
|
|
2865
|
-
"col-end":
|
|
2886
|
+
"col-end": F()
|
|
2866
2887
|
}],
|
|
2867
2888
|
/**
|
|
2868
2889
|
* Grid Template Rows
|
|
@@ -2877,22 +2898,22 @@ const O = (e) => {
|
|
|
2877
2898
|
*/
|
|
2878
2899
|
"row-start-end": [{
|
|
2879
2900
|
row: ["auto", {
|
|
2880
|
-
span: [xe,
|
|
2881
|
-
},
|
|
2901
|
+
span: [xe, I]
|
|
2902
|
+
}, I]
|
|
2882
2903
|
}],
|
|
2883
2904
|
/**
|
|
2884
2905
|
* Grid Row Start
|
|
2885
2906
|
* @see https://tailwindcss.com/docs/grid-row
|
|
2886
2907
|
*/
|
|
2887
2908
|
"row-start": [{
|
|
2888
|
-
"row-start":
|
|
2909
|
+
"row-start": F()
|
|
2889
2910
|
}],
|
|
2890
2911
|
/**
|
|
2891
2912
|
* Grid Row End
|
|
2892
2913
|
* @see https://tailwindcss.com/docs/grid-row
|
|
2893
2914
|
*/
|
|
2894
2915
|
"row-end": [{
|
|
2895
|
-
"row-end":
|
|
2916
|
+
"row-end": F()
|
|
2896
2917
|
}],
|
|
2897
2918
|
/**
|
|
2898
2919
|
* Grid Auto Flow
|
|
@@ -2906,42 +2927,42 @@ const O = (e) => {
|
|
|
2906
2927
|
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
2907
2928
|
*/
|
|
2908
2929
|
"auto-cols": [{
|
|
2909
|
-
"auto-cols": ["auto", "min", "max", "fr",
|
|
2930
|
+
"auto-cols": ["auto", "min", "max", "fr", I]
|
|
2910
2931
|
}],
|
|
2911
2932
|
/**
|
|
2912
2933
|
* Grid Auto Rows
|
|
2913
2934
|
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
2914
2935
|
*/
|
|
2915
2936
|
"auto-rows": [{
|
|
2916
|
-
"auto-rows": ["auto", "min", "max", "fr",
|
|
2937
|
+
"auto-rows": ["auto", "min", "max", "fr", I]
|
|
2917
2938
|
}],
|
|
2918
2939
|
/**
|
|
2919
2940
|
* Gap
|
|
2920
2941
|
* @see https://tailwindcss.com/docs/gap
|
|
2921
2942
|
*/
|
|
2922
2943
|
gap: [{
|
|
2923
|
-
gap: [
|
|
2944
|
+
gap: [d]
|
|
2924
2945
|
}],
|
|
2925
2946
|
/**
|
|
2926
2947
|
* Gap X
|
|
2927
2948
|
* @see https://tailwindcss.com/docs/gap
|
|
2928
2949
|
*/
|
|
2929
2950
|
"gap-x": [{
|
|
2930
|
-
"gap-x": [
|
|
2951
|
+
"gap-x": [d]
|
|
2931
2952
|
}],
|
|
2932
2953
|
/**
|
|
2933
2954
|
* Gap Y
|
|
2934
2955
|
* @see https://tailwindcss.com/docs/gap
|
|
2935
2956
|
*/
|
|
2936
2957
|
"gap-y": [{
|
|
2937
|
-
"gap-y": [
|
|
2958
|
+
"gap-y": [d]
|
|
2938
2959
|
}],
|
|
2939
2960
|
/**
|
|
2940
2961
|
* Justify Content
|
|
2941
2962
|
* @see https://tailwindcss.com/docs/justify-content
|
|
2942
2963
|
*/
|
|
2943
2964
|
"justify-content": [{
|
|
2944
|
-
justify: ["normal", ...
|
|
2965
|
+
justify: ["normal", ...q()]
|
|
2945
2966
|
}],
|
|
2946
2967
|
/**
|
|
2947
2968
|
* Justify Items
|
|
@@ -2962,7 +2983,7 @@ const O = (e) => {
|
|
|
2962
2983
|
* @see https://tailwindcss.com/docs/align-content
|
|
2963
2984
|
*/
|
|
2964
2985
|
"align-content": [{
|
|
2965
|
-
content: ["normal", ...
|
|
2986
|
+
content: ["normal", ...q(), "baseline"]
|
|
2966
2987
|
}],
|
|
2967
2988
|
/**
|
|
2968
2989
|
* Align Items
|
|
@@ -2983,7 +3004,7 @@ const O = (e) => {
|
|
|
2983
3004
|
* @see https://tailwindcss.com/docs/place-content
|
|
2984
3005
|
*/
|
|
2985
3006
|
"place-content": [{
|
|
2986
|
-
"place-content": [...
|
|
3007
|
+
"place-content": [...q(), "baseline"]
|
|
2987
3008
|
}],
|
|
2988
3009
|
/**
|
|
2989
3010
|
* Place Items
|
|
@@ -3005,133 +3026,133 @@ const O = (e) => {
|
|
|
3005
3026
|
* @see https://tailwindcss.com/docs/padding
|
|
3006
3027
|
*/
|
|
3007
3028
|
p: [{
|
|
3008
|
-
p: [
|
|
3029
|
+
p: [h]
|
|
3009
3030
|
}],
|
|
3010
3031
|
/**
|
|
3011
3032
|
* Padding X
|
|
3012
3033
|
* @see https://tailwindcss.com/docs/padding
|
|
3013
3034
|
*/
|
|
3014
3035
|
px: [{
|
|
3015
|
-
px: [
|
|
3036
|
+
px: [h]
|
|
3016
3037
|
}],
|
|
3017
3038
|
/**
|
|
3018
3039
|
* Padding Y
|
|
3019
3040
|
* @see https://tailwindcss.com/docs/padding
|
|
3020
3041
|
*/
|
|
3021
3042
|
py: [{
|
|
3022
|
-
py: [
|
|
3043
|
+
py: [h]
|
|
3023
3044
|
}],
|
|
3024
3045
|
/**
|
|
3025
3046
|
* Padding Start
|
|
3026
3047
|
* @see https://tailwindcss.com/docs/padding
|
|
3027
3048
|
*/
|
|
3028
3049
|
ps: [{
|
|
3029
|
-
ps: [
|
|
3050
|
+
ps: [h]
|
|
3030
3051
|
}],
|
|
3031
3052
|
/**
|
|
3032
3053
|
* Padding End
|
|
3033
3054
|
* @see https://tailwindcss.com/docs/padding
|
|
3034
3055
|
*/
|
|
3035
3056
|
pe: [{
|
|
3036
|
-
pe: [
|
|
3057
|
+
pe: [h]
|
|
3037
3058
|
}],
|
|
3038
3059
|
/**
|
|
3039
3060
|
* Padding Top
|
|
3040
3061
|
* @see https://tailwindcss.com/docs/padding
|
|
3041
3062
|
*/
|
|
3042
3063
|
pt: [{
|
|
3043
|
-
pt: [
|
|
3064
|
+
pt: [h]
|
|
3044
3065
|
}],
|
|
3045
3066
|
/**
|
|
3046
3067
|
* Padding Right
|
|
3047
3068
|
* @see https://tailwindcss.com/docs/padding
|
|
3048
3069
|
*/
|
|
3049
3070
|
pr: [{
|
|
3050
|
-
pr: [
|
|
3071
|
+
pr: [h]
|
|
3051
3072
|
}],
|
|
3052
3073
|
/**
|
|
3053
3074
|
* Padding Bottom
|
|
3054
3075
|
* @see https://tailwindcss.com/docs/padding
|
|
3055
3076
|
*/
|
|
3056
3077
|
pb: [{
|
|
3057
|
-
pb: [
|
|
3078
|
+
pb: [h]
|
|
3058
3079
|
}],
|
|
3059
3080
|
/**
|
|
3060
3081
|
* Padding Left
|
|
3061
3082
|
* @see https://tailwindcss.com/docs/padding
|
|
3062
3083
|
*/
|
|
3063
3084
|
pl: [{
|
|
3064
|
-
pl: [
|
|
3085
|
+
pl: [h]
|
|
3065
3086
|
}],
|
|
3066
3087
|
/**
|
|
3067
3088
|
* Margin
|
|
3068
3089
|
* @see https://tailwindcss.com/docs/margin
|
|
3069
3090
|
*/
|
|
3070
3091
|
m: [{
|
|
3071
|
-
m: [
|
|
3092
|
+
m: [v]
|
|
3072
3093
|
}],
|
|
3073
3094
|
/**
|
|
3074
3095
|
* Margin X
|
|
3075
3096
|
* @see https://tailwindcss.com/docs/margin
|
|
3076
3097
|
*/
|
|
3077
3098
|
mx: [{
|
|
3078
|
-
mx: [
|
|
3099
|
+
mx: [v]
|
|
3079
3100
|
}],
|
|
3080
3101
|
/**
|
|
3081
3102
|
* Margin Y
|
|
3082
3103
|
* @see https://tailwindcss.com/docs/margin
|
|
3083
3104
|
*/
|
|
3084
3105
|
my: [{
|
|
3085
|
-
my: [
|
|
3106
|
+
my: [v]
|
|
3086
3107
|
}],
|
|
3087
3108
|
/**
|
|
3088
3109
|
* Margin Start
|
|
3089
3110
|
* @see https://tailwindcss.com/docs/margin
|
|
3090
3111
|
*/
|
|
3091
3112
|
ms: [{
|
|
3092
|
-
ms: [
|
|
3113
|
+
ms: [v]
|
|
3093
3114
|
}],
|
|
3094
3115
|
/**
|
|
3095
3116
|
* Margin End
|
|
3096
3117
|
* @see https://tailwindcss.com/docs/margin
|
|
3097
3118
|
*/
|
|
3098
3119
|
me: [{
|
|
3099
|
-
me: [
|
|
3120
|
+
me: [v]
|
|
3100
3121
|
}],
|
|
3101
3122
|
/**
|
|
3102
3123
|
* Margin Top
|
|
3103
3124
|
* @see https://tailwindcss.com/docs/margin
|
|
3104
3125
|
*/
|
|
3105
3126
|
mt: [{
|
|
3106
|
-
mt: [
|
|
3127
|
+
mt: [v]
|
|
3107
3128
|
}],
|
|
3108
3129
|
/**
|
|
3109
3130
|
* Margin Right
|
|
3110
3131
|
* @see https://tailwindcss.com/docs/margin
|
|
3111
3132
|
*/
|
|
3112
3133
|
mr: [{
|
|
3113
|
-
mr: [
|
|
3134
|
+
mr: [v]
|
|
3114
3135
|
}],
|
|
3115
3136
|
/**
|
|
3116
3137
|
* Margin Bottom
|
|
3117
3138
|
* @see https://tailwindcss.com/docs/margin
|
|
3118
3139
|
*/
|
|
3119
3140
|
mb: [{
|
|
3120
|
-
mb: [
|
|
3141
|
+
mb: [v]
|
|
3121
3142
|
}],
|
|
3122
3143
|
/**
|
|
3123
3144
|
* Margin Left
|
|
3124
3145
|
* @see https://tailwindcss.com/docs/margin
|
|
3125
3146
|
*/
|
|
3126
3147
|
ml: [{
|
|
3127
|
-
ml: [
|
|
3148
|
+
ml: [v]
|
|
3128
3149
|
}],
|
|
3129
3150
|
/**
|
|
3130
3151
|
* Space Between X
|
|
3131
3152
|
* @see https://tailwindcss.com/docs/space
|
|
3132
3153
|
*/
|
|
3133
3154
|
"space-x": [{
|
|
3134
|
-
"space-x": [
|
|
3155
|
+
"space-x": [P]
|
|
3135
3156
|
}],
|
|
3136
3157
|
/**
|
|
3137
3158
|
* Space Between X Reverse
|
|
@@ -3143,7 +3164,7 @@ const O = (e) => {
|
|
|
3143
3164
|
* @see https://tailwindcss.com/docs/space
|
|
3144
3165
|
*/
|
|
3145
3166
|
"space-y": [{
|
|
3146
|
-
"space-y": [
|
|
3167
|
+
"space-y": [P]
|
|
3147
3168
|
}],
|
|
3148
3169
|
/**
|
|
3149
3170
|
* Space Between Y Reverse
|
|
@@ -3156,51 +3177,51 @@ const O = (e) => {
|
|
|
3156
3177
|
* @see https://tailwindcss.com/docs/width
|
|
3157
3178
|
*/
|
|
3158
3179
|
w: [{
|
|
3159
|
-
w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw",
|
|
3180
|
+
w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", I, t]
|
|
3160
3181
|
}],
|
|
3161
3182
|
/**
|
|
3162
3183
|
* Min-Width
|
|
3163
3184
|
* @see https://tailwindcss.com/docs/min-width
|
|
3164
3185
|
*/
|
|
3165
3186
|
"min-w": [{
|
|
3166
|
-
"min-w": [
|
|
3187
|
+
"min-w": [I, t, "min", "max", "fit"]
|
|
3167
3188
|
}],
|
|
3168
3189
|
/**
|
|
3169
3190
|
* Max-Width
|
|
3170
3191
|
* @see https://tailwindcss.com/docs/max-width
|
|
3171
3192
|
*/
|
|
3172
3193
|
"max-w": [{
|
|
3173
|
-
"max-w": [
|
|
3174
|
-
screen: [
|
|
3175
|
-
},
|
|
3194
|
+
"max-w": [I, t, "none", "full", "min", "max", "fit", "prose", {
|
|
3195
|
+
screen: [ce]
|
|
3196
|
+
}, ce]
|
|
3176
3197
|
}],
|
|
3177
3198
|
/**
|
|
3178
3199
|
* Height
|
|
3179
3200
|
* @see https://tailwindcss.com/docs/height
|
|
3180
3201
|
*/
|
|
3181
3202
|
h: [{
|
|
3182
|
-
h: [
|
|
3203
|
+
h: [I, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
3183
3204
|
}],
|
|
3184
3205
|
/**
|
|
3185
3206
|
* Min-Height
|
|
3186
3207
|
* @see https://tailwindcss.com/docs/min-height
|
|
3187
3208
|
*/
|
|
3188
3209
|
"min-h": [{
|
|
3189
|
-
"min-h": [
|
|
3210
|
+
"min-h": [I, t, "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
3190
3211
|
}],
|
|
3191
3212
|
/**
|
|
3192
3213
|
* Max-Height
|
|
3193
3214
|
* @see https://tailwindcss.com/docs/max-height
|
|
3194
3215
|
*/
|
|
3195
3216
|
"max-h": [{
|
|
3196
|
-
"max-h": [
|
|
3217
|
+
"max-h": [I, t, "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
3197
3218
|
}],
|
|
3198
3219
|
/**
|
|
3199
3220
|
* Size
|
|
3200
3221
|
* @see https://tailwindcss.com/docs/size
|
|
3201
3222
|
*/
|
|
3202
3223
|
size: [{
|
|
3203
|
-
size: [
|
|
3224
|
+
size: [I, t, "auto", "min", "max", "fit"]
|
|
3204
3225
|
}],
|
|
3205
3226
|
// Typography
|
|
3206
3227
|
/**
|
|
@@ -3208,7 +3229,7 @@ const O = (e) => {
|
|
|
3208
3229
|
* @see https://tailwindcss.com/docs/font-size
|
|
3209
3230
|
*/
|
|
3210
3231
|
"font-size": [{
|
|
3211
|
-
text: ["base",
|
|
3232
|
+
text: ["base", ce, ie]
|
|
3212
3233
|
}],
|
|
3213
3234
|
/**
|
|
3214
3235
|
* Font Smoothing
|
|
@@ -3269,7 +3290,7 @@ const O = (e) => {
|
|
|
3269
3290
|
* @see https://tailwindcss.com/docs/letter-spacing
|
|
3270
3291
|
*/
|
|
3271
3292
|
tracking: [{
|
|
3272
|
-
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest",
|
|
3293
|
+
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", I]
|
|
3273
3294
|
}],
|
|
3274
3295
|
/**
|
|
3275
3296
|
* Line Clamp
|
|
@@ -3283,21 +3304,21 @@ const O = (e) => {
|
|
|
3283
3304
|
* @see https://tailwindcss.com/docs/line-height
|
|
3284
3305
|
*/
|
|
3285
3306
|
leading: [{
|
|
3286
|
-
leading: ["none", "tight", "snug", "normal", "relaxed", "loose",
|
|
3307
|
+
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", te, I]
|
|
3287
3308
|
}],
|
|
3288
3309
|
/**
|
|
3289
3310
|
* List Style Image
|
|
3290
3311
|
* @see https://tailwindcss.com/docs/list-style-image
|
|
3291
3312
|
*/
|
|
3292
3313
|
"list-image": [{
|
|
3293
|
-
"list-image": ["none",
|
|
3314
|
+
"list-image": ["none", I]
|
|
3294
3315
|
}],
|
|
3295
3316
|
/**
|
|
3296
3317
|
* List Style Type
|
|
3297
3318
|
* @see https://tailwindcss.com/docs/list-style-type
|
|
3298
3319
|
*/
|
|
3299
3320
|
"list-style-type": [{
|
|
3300
|
-
list: ["none", "disc", "decimal",
|
|
3321
|
+
list: ["none", "disc", "decimal", I]
|
|
3301
3322
|
}],
|
|
3302
3323
|
/**
|
|
3303
3324
|
* List Style Position
|
|
@@ -3319,7 +3340,7 @@ const O = (e) => {
|
|
|
3319
3340
|
* @see https://tailwindcss.com/docs/placeholder-opacity
|
|
3320
3341
|
*/
|
|
3321
3342
|
"placeholder-opacity": [{
|
|
3322
|
-
"placeholder-opacity": [
|
|
3343
|
+
"placeholder-opacity": [y]
|
|
3323
3344
|
}],
|
|
3324
3345
|
/**
|
|
3325
3346
|
* Text Alignment
|
|
@@ -3340,7 +3361,7 @@ const O = (e) => {
|
|
|
3340
3361
|
* @see https://tailwindcss.com/docs/text-opacity
|
|
3341
3362
|
*/
|
|
3342
3363
|
"text-opacity": [{
|
|
3343
|
-
"text-opacity": [
|
|
3364
|
+
"text-opacity": [y]
|
|
3344
3365
|
}],
|
|
3345
3366
|
/**
|
|
3346
3367
|
* Text Decoration
|
|
@@ -3352,21 +3373,21 @@ const O = (e) => {
|
|
|
3352
3373
|
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
3353
3374
|
*/
|
|
3354
3375
|
"text-decoration-style": [{
|
|
3355
|
-
decoration: [...
|
|
3376
|
+
decoration: [...T(), "wavy"]
|
|
3356
3377
|
}],
|
|
3357
3378
|
/**
|
|
3358
3379
|
* Text Decoration Thickness
|
|
3359
3380
|
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
3360
3381
|
*/
|
|
3361
3382
|
"text-decoration-thickness": [{
|
|
3362
|
-
decoration: ["auto", "from-font",
|
|
3383
|
+
decoration: ["auto", "from-font", te, ie]
|
|
3363
3384
|
}],
|
|
3364
3385
|
/**
|
|
3365
3386
|
* Text Underline Offset
|
|
3366
3387
|
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
3367
3388
|
*/
|
|
3368
3389
|
"underline-offset": [{
|
|
3369
|
-
"underline-offset": ["auto",
|
|
3390
|
+
"underline-offset": ["auto", te, I]
|
|
3370
3391
|
}],
|
|
3371
3392
|
/**
|
|
3372
3393
|
* Text Decoration Color
|
|
@@ -3397,14 +3418,14 @@ const O = (e) => {
|
|
|
3397
3418
|
* @see https://tailwindcss.com/docs/text-indent
|
|
3398
3419
|
*/
|
|
3399
3420
|
indent: [{
|
|
3400
|
-
indent:
|
|
3421
|
+
indent: M()
|
|
3401
3422
|
}],
|
|
3402
3423
|
/**
|
|
3403
3424
|
* Vertical Alignment
|
|
3404
3425
|
* @see https://tailwindcss.com/docs/vertical-align
|
|
3405
3426
|
*/
|
|
3406
3427
|
"vertical-align": [{
|
|
3407
|
-
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super",
|
|
3428
|
+
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", I]
|
|
3408
3429
|
}],
|
|
3409
3430
|
/**
|
|
3410
3431
|
* Whitespace
|
|
@@ -3432,7 +3453,7 @@ const O = (e) => {
|
|
|
3432
3453
|
* @see https://tailwindcss.com/docs/content
|
|
3433
3454
|
*/
|
|
3434
3455
|
content: [{
|
|
3435
|
-
content: ["none",
|
|
3456
|
+
content: ["none", I]
|
|
3436
3457
|
}],
|
|
3437
3458
|
// Backgrounds
|
|
3438
3459
|
/**
|
|
@@ -3455,7 +3476,7 @@ const O = (e) => {
|
|
|
3455
3476
|
* @see https://tailwindcss.com/docs/background-opacity
|
|
3456
3477
|
*/
|
|
3457
3478
|
"bg-opacity": [{
|
|
3458
|
-
"bg-opacity": [
|
|
3479
|
+
"bg-opacity": [y]
|
|
3459
3480
|
}],
|
|
3460
3481
|
/**
|
|
3461
3482
|
* Background Origin
|
|
@@ -3469,7 +3490,7 @@ const O = (e) => {
|
|
|
3469
3490
|
* @see https://tailwindcss.com/docs/background-position
|
|
3470
3491
|
*/
|
|
3471
3492
|
"bg-position": [{
|
|
3472
|
-
bg: [
|
|
3493
|
+
bg: [...$(), $n]
|
|
3473
3494
|
}],
|
|
3474
3495
|
/**
|
|
3475
3496
|
* Background Repeat
|
|
@@ -3508,42 +3529,42 @@ const O = (e) => {
|
|
|
3508
3529
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3509
3530
|
*/
|
|
3510
3531
|
"gradient-from-pos": [{
|
|
3511
|
-
from: [
|
|
3532
|
+
from: [k]
|
|
3512
3533
|
}],
|
|
3513
3534
|
/**
|
|
3514
3535
|
* Gradient Color Stops Via Position
|
|
3515
3536
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3516
3537
|
*/
|
|
3517
3538
|
"gradient-via-pos": [{
|
|
3518
|
-
via: [
|
|
3539
|
+
via: [k]
|
|
3519
3540
|
}],
|
|
3520
3541
|
/**
|
|
3521
3542
|
* Gradient Color Stops To Position
|
|
3522
3543
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3523
3544
|
*/
|
|
3524
3545
|
"gradient-to-pos": [{
|
|
3525
|
-
to: [
|
|
3546
|
+
to: [k]
|
|
3526
3547
|
}],
|
|
3527
3548
|
/**
|
|
3528
3549
|
* Gradient Color Stops From
|
|
3529
3550
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3530
3551
|
*/
|
|
3531
3552
|
"gradient-from": [{
|
|
3532
|
-
from: [
|
|
3553
|
+
from: [g]
|
|
3533
3554
|
}],
|
|
3534
3555
|
/**
|
|
3535
3556
|
* Gradient Color Stops Via
|
|
3536
3557
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3537
3558
|
*/
|
|
3538
3559
|
"gradient-via": [{
|
|
3539
|
-
via: [
|
|
3560
|
+
via: [g]
|
|
3540
3561
|
}],
|
|
3541
3562
|
/**
|
|
3542
3563
|
* Gradient Color Stops To
|
|
3543
3564
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3544
3565
|
*/
|
|
3545
3566
|
"gradient-to": [{
|
|
3546
|
-
to: [
|
|
3567
|
+
to: [g]
|
|
3547
3568
|
}],
|
|
3548
3569
|
// Borders
|
|
3549
3570
|
/**
|
|
@@ -3719,14 +3740,14 @@ const O = (e) => {
|
|
|
3719
3740
|
* @see https://tailwindcss.com/docs/border-opacity
|
|
3720
3741
|
*/
|
|
3721
3742
|
"border-opacity": [{
|
|
3722
|
-
"border-opacity": [
|
|
3743
|
+
"border-opacity": [y]
|
|
3723
3744
|
}],
|
|
3724
3745
|
/**
|
|
3725
3746
|
* Border Style
|
|
3726
3747
|
* @see https://tailwindcss.com/docs/border-style
|
|
3727
3748
|
*/
|
|
3728
3749
|
"border-style": [{
|
|
3729
|
-
border: [...
|
|
3750
|
+
border: [...T(), "hidden"]
|
|
3730
3751
|
}],
|
|
3731
3752
|
/**
|
|
3732
3753
|
* Divide Width X
|
|
@@ -3757,14 +3778,14 @@ const O = (e) => {
|
|
|
3757
3778
|
* @see https://tailwindcss.com/docs/divide-opacity
|
|
3758
3779
|
*/
|
|
3759
3780
|
"divide-opacity": [{
|
|
3760
|
-
"divide-opacity": [
|
|
3781
|
+
"divide-opacity": [y]
|
|
3761
3782
|
}],
|
|
3762
3783
|
/**
|
|
3763
3784
|
* Divide Style
|
|
3764
3785
|
* @see https://tailwindcss.com/docs/divide-style
|
|
3765
3786
|
*/
|
|
3766
3787
|
"divide-style": [{
|
|
3767
|
-
divide:
|
|
3788
|
+
divide: T()
|
|
3768
3789
|
}],
|
|
3769
3790
|
/**
|
|
3770
3791
|
* Border Color
|
|
@@ -3841,21 +3862,21 @@ const O = (e) => {
|
|
|
3841
3862
|
* @see https://tailwindcss.com/docs/outline-style
|
|
3842
3863
|
*/
|
|
3843
3864
|
"outline-style": [{
|
|
3844
|
-
outline: ["", ...
|
|
3865
|
+
outline: ["", ...T()]
|
|
3845
3866
|
}],
|
|
3846
3867
|
/**
|
|
3847
3868
|
* Outline Offset
|
|
3848
3869
|
* @see https://tailwindcss.com/docs/outline-offset
|
|
3849
3870
|
*/
|
|
3850
3871
|
"outline-offset": [{
|
|
3851
|
-
"outline-offset": [
|
|
3872
|
+
"outline-offset": [te, I]
|
|
3852
3873
|
}],
|
|
3853
3874
|
/**
|
|
3854
3875
|
* Outline Width
|
|
3855
3876
|
* @see https://tailwindcss.com/docs/outline-width
|
|
3856
3877
|
*/
|
|
3857
3878
|
"outline-w": [{
|
|
3858
|
-
outline: [
|
|
3879
|
+
outline: [te, ie]
|
|
3859
3880
|
}],
|
|
3860
3881
|
/**
|
|
3861
3882
|
* Outline Color
|
|
@@ -3869,7 +3890,7 @@ const O = (e) => {
|
|
|
3869
3890
|
* @see https://tailwindcss.com/docs/ring-width
|
|
3870
3891
|
*/
|
|
3871
3892
|
"ring-w": [{
|
|
3872
|
-
ring:
|
|
3893
|
+
ring: z()
|
|
3873
3894
|
}],
|
|
3874
3895
|
/**
|
|
3875
3896
|
* Ring Width Inset
|
|
@@ -3888,14 +3909,14 @@ const O = (e) => {
|
|
|
3888
3909
|
* @see https://tailwindcss.com/docs/ring-opacity
|
|
3889
3910
|
*/
|
|
3890
3911
|
"ring-opacity": [{
|
|
3891
|
-
"ring-opacity": [
|
|
3912
|
+
"ring-opacity": [y]
|
|
3892
3913
|
}],
|
|
3893
3914
|
/**
|
|
3894
3915
|
* Ring Offset Width
|
|
3895
3916
|
* @see https://tailwindcss.com/docs/ring-offset-width
|
|
3896
3917
|
*/
|
|
3897
3918
|
"ring-offset-w": [{
|
|
3898
|
-
"ring-offset": [
|
|
3919
|
+
"ring-offset": [te, ie]
|
|
3899
3920
|
}],
|
|
3900
3921
|
/**
|
|
3901
3922
|
* Ring Offset Color
|
|
@@ -3910,7 +3931,7 @@ const O = (e) => {
|
|
|
3910
3931
|
* @see https://tailwindcss.com/docs/box-shadow
|
|
3911
3932
|
*/
|
|
3912
3933
|
shadow: [{
|
|
3913
|
-
shadow: ["", "inner", "none",
|
|
3934
|
+
shadow: ["", "inner", "none", ce, En]
|
|
3914
3935
|
}],
|
|
3915
3936
|
/**
|
|
3916
3937
|
* Box Shadow Color
|
|
@@ -3924,21 +3945,21 @@ const O = (e) => {
|
|
|
3924
3945
|
* @see https://tailwindcss.com/docs/opacity
|
|
3925
3946
|
*/
|
|
3926
3947
|
opacity: [{
|
|
3927
|
-
opacity: [
|
|
3948
|
+
opacity: [y]
|
|
3928
3949
|
}],
|
|
3929
3950
|
/**
|
|
3930
3951
|
* Mix Blend Mode
|
|
3931
3952
|
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
3932
3953
|
*/
|
|
3933
3954
|
"mix-blend": [{
|
|
3934
|
-
"mix-blend": [...
|
|
3955
|
+
"mix-blend": [...H(), "plus-lighter", "plus-darker"]
|
|
3935
3956
|
}],
|
|
3936
3957
|
/**
|
|
3937
3958
|
* Background Blend Mode
|
|
3938
3959
|
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
3939
3960
|
*/
|
|
3940
3961
|
"bg-blend": [{
|
|
3941
|
-
"bg-blend":
|
|
3962
|
+
"bg-blend": H()
|
|
3942
3963
|
}],
|
|
3943
3964
|
// Filters
|
|
3944
3965
|
/**
|
|
@@ -3975,21 +3996,21 @@ const O = (e) => {
|
|
|
3975
3996
|
* @see https://tailwindcss.com/docs/drop-shadow
|
|
3976
3997
|
*/
|
|
3977
3998
|
"drop-shadow": [{
|
|
3978
|
-
"drop-shadow": ["", "none",
|
|
3999
|
+
"drop-shadow": ["", "none", ce, I]
|
|
3979
4000
|
}],
|
|
3980
4001
|
/**
|
|
3981
4002
|
* Grayscale
|
|
3982
4003
|
* @see https://tailwindcss.com/docs/grayscale
|
|
3983
4004
|
*/
|
|
3984
4005
|
grayscale: [{
|
|
3985
|
-
grayscale: [
|
|
4006
|
+
grayscale: [u]
|
|
3986
4007
|
}],
|
|
3987
4008
|
/**
|
|
3988
4009
|
* Hue Rotate
|
|
3989
4010
|
* @see https://tailwindcss.com/docs/hue-rotate
|
|
3990
4011
|
*/
|
|
3991
4012
|
"hue-rotate": [{
|
|
3992
|
-
"hue-rotate": [
|
|
4013
|
+
"hue-rotate": [f]
|
|
3993
4014
|
}],
|
|
3994
4015
|
/**
|
|
3995
4016
|
* Invert
|
|
@@ -4003,14 +4024,14 @@ const O = (e) => {
|
|
|
4003
4024
|
* @see https://tailwindcss.com/docs/saturate
|
|
4004
4025
|
*/
|
|
4005
4026
|
saturate: [{
|
|
4006
|
-
saturate: [
|
|
4027
|
+
saturate: [p]
|
|
4007
4028
|
}],
|
|
4008
4029
|
/**
|
|
4009
4030
|
* Sepia
|
|
4010
4031
|
* @see https://tailwindcss.com/docs/sepia
|
|
4011
4032
|
*/
|
|
4012
4033
|
sepia: [{
|
|
4013
|
-
sepia: [
|
|
4034
|
+
sepia: [N]
|
|
4014
4035
|
}],
|
|
4015
4036
|
/**
|
|
4016
4037
|
* Backdrop Filter
|
|
@@ -4046,14 +4067,14 @@ const O = (e) => {
|
|
|
4046
4067
|
* @see https://tailwindcss.com/docs/backdrop-grayscale
|
|
4047
4068
|
*/
|
|
4048
4069
|
"backdrop-grayscale": [{
|
|
4049
|
-
"backdrop-grayscale": [
|
|
4070
|
+
"backdrop-grayscale": [u]
|
|
4050
4071
|
}],
|
|
4051
4072
|
/**
|
|
4052
4073
|
* Backdrop Hue Rotate
|
|
4053
4074
|
* @see https://tailwindcss.com/docs/backdrop-hue-rotate
|
|
4054
4075
|
*/
|
|
4055
4076
|
"backdrop-hue-rotate": [{
|
|
4056
|
-
"backdrop-hue-rotate": [
|
|
4077
|
+
"backdrop-hue-rotate": [f]
|
|
4057
4078
|
}],
|
|
4058
4079
|
/**
|
|
4059
4080
|
* Backdrop Invert
|
|
@@ -4067,21 +4088,21 @@ const O = (e) => {
|
|
|
4067
4088
|
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
4068
4089
|
*/
|
|
4069
4090
|
"backdrop-opacity": [{
|
|
4070
|
-
"backdrop-opacity": [
|
|
4091
|
+
"backdrop-opacity": [y]
|
|
4071
4092
|
}],
|
|
4072
4093
|
/**
|
|
4073
4094
|
* Backdrop Saturate
|
|
4074
4095
|
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
4075
4096
|
*/
|
|
4076
4097
|
"backdrop-saturate": [{
|
|
4077
|
-
"backdrop-saturate": [
|
|
4098
|
+
"backdrop-saturate": [p]
|
|
4078
4099
|
}],
|
|
4079
4100
|
/**
|
|
4080
4101
|
* Backdrop Sepia
|
|
4081
4102
|
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
4082
4103
|
*/
|
|
4083
4104
|
"backdrop-sepia": [{
|
|
4084
|
-
"backdrop-sepia": [
|
|
4105
|
+
"backdrop-sepia": [N]
|
|
4085
4106
|
}],
|
|
4086
4107
|
// Tables
|
|
4087
4108
|
/**
|
|
@@ -4132,35 +4153,35 @@ const O = (e) => {
|
|
|
4132
4153
|
* @see https://tailwindcss.com/docs/transition-property
|
|
4133
4154
|
*/
|
|
4134
4155
|
transition: [{
|
|
4135
|
-
transition: ["none", "all", "", "colors", "opacity", "shadow", "transform",
|
|
4156
|
+
transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", I]
|
|
4136
4157
|
}],
|
|
4137
4158
|
/**
|
|
4138
4159
|
* Transition Duration
|
|
4139
4160
|
* @see https://tailwindcss.com/docs/transition-duration
|
|
4140
4161
|
*/
|
|
4141
4162
|
duration: [{
|
|
4142
|
-
duration:
|
|
4163
|
+
duration: D()
|
|
4143
4164
|
}],
|
|
4144
4165
|
/**
|
|
4145
4166
|
* Transition Timing Function
|
|
4146
4167
|
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
4147
4168
|
*/
|
|
4148
4169
|
ease: [{
|
|
4149
|
-
ease: ["linear", "in", "out", "in-out",
|
|
4170
|
+
ease: ["linear", "in", "out", "in-out", I]
|
|
4150
4171
|
}],
|
|
4151
4172
|
/**
|
|
4152
4173
|
* Transition Delay
|
|
4153
4174
|
* @see https://tailwindcss.com/docs/transition-delay
|
|
4154
4175
|
*/
|
|
4155
4176
|
delay: [{
|
|
4156
|
-
delay:
|
|
4177
|
+
delay: D()
|
|
4157
4178
|
}],
|
|
4158
4179
|
/**
|
|
4159
4180
|
* Animation
|
|
4160
4181
|
* @see https://tailwindcss.com/docs/animation
|
|
4161
4182
|
*/
|
|
4162
4183
|
animate: [{
|
|
4163
|
-
animate: ["none", "spin", "ping", "pulse", "bounce",
|
|
4184
|
+
animate: ["none", "spin", "ping", "pulse", "bounce", I]
|
|
4164
4185
|
}],
|
|
4165
4186
|
// Transforms
|
|
4166
4187
|
/**
|
|
@@ -4175,42 +4196,42 @@ const O = (e) => {
|
|
|
4175
4196
|
* @see https://tailwindcss.com/docs/scale
|
|
4176
4197
|
*/
|
|
4177
4198
|
scale: [{
|
|
4178
|
-
scale: [
|
|
4199
|
+
scale: [m]
|
|
4179
4200
|
}],
|
|
4180
4201
|
/**
|
|
4181
4202
|
* Scale X
|
|
4182
4203
|
* @see https://tailwindcss.com/docs/scale
|
|
4183
4204
|
*/
|
|
4184
4205
|
"scale-x": [{
|
|
4185
|
-
"scale-x": [
|
|
4206
|
+
"scale-x": [m]
|
|
4186
4207
|
}],
|
|
4187
4208
|
/**
|
|
4188
4209
|
* Scale Y
|
|
4189
4210
|
* @see https://tailwindcss.com/docs/scale
|
|
4190
4211
|
*/
|
|
4191
4212
|
"scale-y": [{
|
|
4192
|
-
"scale-y": [
|
|
4213
|
+
"scale-y": [m]
|
|
4193
4214
|
}],
|
|
4194
4215
|
/**
|
|
4195
4216
|
* Rotate
|
|
4196
4217
|
* @see https://tailwindcss.com/docs/rotate
|
|
4197
4218
|
*/
|
|
4198
4219
|
rotate: [{
|
|
4199
|
-
rotate: [xe,
|
|
4220
|
+
rotate: [xe, I]
|
|
4200
4221
|
}],
|
|
4201
4222
|
/**
|
|
4202
4223
|
* Translate X
|
|
4203
4224
|
* @see https://tailwindcss.com/docs/translate
|
|
4204
4225
|
*/
|
|
4205
4226
|
"translate-x": [{
|
|
4206
|
-
"translate-x": [
|
|
4227
|
+
"translate-x": [B]
|
|
4207
4228
|
}],
|
|
4208
4229
|
/**
|
|
4209
4230
|
* Translate Y
|
|
4210
4231
|
* @see https://tailwindcss.com/docs/translate
|
|
4211
4232
|
*/
|
|
4212
4233
|
"translate-y": [{
|
|
4213
|
-
"translate-y": [
|
|
4234
|
+
"translate-y": [B]
|
|
4214
4235
|
}],
|
|
4215
4236
|
/**
|
|
4216
4237
|
* Skew X
|
|
@@ -4231,7 +4252,7 @@ const O = (e) => {
|
|
|
4231
4252
|
* @see https://tailwindcss.com/docs/transform-origin
|
|
4232
4253
|
*/
|
|
4233
4254
|
"transform-origin": [{
|
|
4234
|
-
origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left",
|
|
4255
|
+
origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", I]
|
|
4235
4256
|
}],
|
|
4236
4257
|
// Interactivity
|
|
4237
4258
|
/**
|
|
@@ -4253,7 +4274,7 @@ const O = (e) => {
|
|
|
4253
4274
|
* @see https://tailwindcss.com/docs/cursor
|
|
4254
4275
|
*/
|
|
4255
4276
|
cursor: [{
|
|
4256
|
-
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",
|
|
4277
|
+
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", I]
|
|
4257
4278
|
}],
|
|
4258
4279
|
/**
|
|
4259
4280
|
* Caret Color
|
|
@@ -4288,126 +4309,126 @@ const O = (e) => {
|
|
|
4288
4309
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4289
4310
|
*/
|
|
4290
4311
|
"scroll-m": [{
|
|
4291
|
-
"scroll-m":
|
|
4312
|
+
"scroll-m": M()
|
|
4292
4313
|
}],
|
|
4293
4314
|
/**
|
|
4294
4315
|
* Scroll Margin X
|
|
4295
4316
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4296
4317
|
*/
|
|
4297
4318
|
"scroll-mx": [{
|
|
4298
|
-
"scroll-mx":
|
|
4319
|
+
"scroll-mx": M()
|
|
4299
4320
|
}],
|
|
4300
4321
|
/**
|
|
4301
4322
|
* Scroll Margin Y
|
|
4302
4323
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4303
4324
|
*/
|
|
4304
4325
|
"scroll-my": [{
|
|
4305
|
-
"scroll-my":
|
|
4326
|
+
"scroll-my": M()
|
|
4306
4327
|
}],
|
|
4307
4328
|
/**
|
|
4308
4329
|
* Scroll Margin Start
|
|
4309
4330
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4310
4331
|
*/
|
|
4311
4332
|
"scroll-ms": [{
|
|
4312
|
-
"scroll-ms":
|
|
4333
|
+
"scroll-ms": M()
|
|
4313
4334
|
}],
|
|
4314
4335
|
/**
|
|
4315
4336
|
* Scroll Margin End
|
|
4316
4337
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4317
4338
|
*/
|
|
4318
4339
|
"scroll-me": [{
|
|
4319
|
-
"scroll-me":
|
|
4340
|
+
"scroll-me": M()
|
|
4320
4341
|
}],
|
|
4321
4342
|
/**
|
|
4322
4343
|
* Scroll Margin Top
|
|
4323
4344
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4324
4345
|
*/
|
|
4325
4346
|
"scroll-mt": [{
|
|
4326
|
-
"scroll-mt":
|
|
4347
|
+
"scroll-mt": M()
|
|
4327
4348
|
}],
|
|
4328
4349
|
/**
|
|
4329
4350
|
* Scroll Margin Right
|
|
4330
4351
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4331
4352
|
*/
|
|
4332
4353
|
"scroll-mr": [{
|
|
4333
|
-
"scroll-mr":
|
|
4354
|
+
"scroll-mr": M()
|
|
4334
4355
|
}],
|
|
4335
4356
|
/**
|
|
4336
4357
|
* Scroll Margin Bottom
|
|
4337
4358
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4338
4359
|
*/
|
|
4339
4360
|
"scroll-mb": [{
|
|
4340
|
-
"scroll-mb":
|
|
4361
|
+
"scroll-mb": M()
|
|
4341
4362
|
}],
|
|
4342
4363
|
/**
|
|
4343
4364
|
* Scroll Margin Left
|
|
4344
4365
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4345
4366
|
*/
|
|
4346
4367
|
"scroll-ml": [{
|
|
4347
|
-
"scroll-ml":
|
|
4368
|
+
"scroll-ml": M()
|
|
4348
4369
|
}],
|
|
4349
4370
|
/**
|
|
4350
4371
|
* Scroll Padding
|
|
4351
4372
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4352
4373
|
*/
|
|
4353
4374
|
"scroll-p": [{
|
|
4354
|
-
"scroll-p":
|
|
4375
|
+
"scroll-p": M()
|
|
4355
4376
|
}],
|
|
4356
4377
|
/**
|
|
4357
4378
|
* Scroll Padding X
|
|
4358
4379
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4359
4380
|
*/
|
|
4360
4381
|
"scroll-px": [{
|
|
4361
|
-
"scroll-px":
|
|
4382
|
+
"scroll-px": M()
|
|
4362
4383
|
}],
|
|
4363
4384
|
/**
|
|
4364
4385
|
* Scroll Padding Y
|
|
4365
4386
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4366
4387
|
*/
|
|
4367
4388
|
"scroll-py": [{
|
|
4368
|
-
"scroll-py":
|
|
4389
|
+
"scroll-py": M()
|
|
4369
4390
|
}],
|
|
4370
4391
|
/**
|
|
4371
4392
|
* Scroll Padding Start
|
|
4372
4393
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4373
4394
|
*/
|
|
4374
4395
|
"scroll-ps": [{
|
|
4375
|
-
"scroll-ps":
|
|
4396
|
+
"scroll-ps": M()
|
|
4376
4397
|
}],
|
|
4377
4398
|
/**
|
|
4378
4399
|
* Scroll Padding End
|
|
4379
4400
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4380
4401
|
*/
|
|
4381
4402
|
"scroll-pe": [{
|
|
4382
|
-
"scroll-pe":
|
|
4403
|
+
"scroll-pe": M()
|
|
4383
4404
|
}],
|
|
4384
4405
|
/**
|
|
4385
4406
|
* Scroll Padding Top
|
|
4386
4407
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4387
4408
|
*/
|
|
4388
4409
|
"scroll-pt": [{
|
|
4389
|
-
"scroll-pt":
|
|
4410
|
+
"scroll-pt": M()
|
|
4390
4411
|
}],
|
|
4391
4412
|
/**
|
|
4392
4413
|
* Scroll Padding Right
|
|
4393
4414
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4394
4415
|
*/
|
|
4395
4416
|
"scroll-pr": [{
|
|
4396
|
-
"scroll-pr":
|
|
4417
|
+
"scroll-pr": M()
|
|
4397
4418
|
}],
|
|
4398
4419
|
/**
|
|
4399
4420
|
* Scroll Padding Bottom
|
|
4400
4421
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4401
4422
|
*/
|
|
4402
4423
|
"scroll-pb": [{
|
|
4403
|
-
"scroll-pb":
|
|
4424
|
+
"scroll-pb": M()
|
|
4404
4425
|
}],
|
|
4405
4426
|
/**
|
|
4406
4427
|
* Scroll Padding Left
|
|
4407
4428
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4408
4429
|
*/
|
|
4409
4430
|
"scroll-pl": [{
|
|
4410
|
-
"scroll-pl":
|
|
4431
|
+
"scroll-pl": M()
|
|
4411
4432
|
}],
|
|
4412
4433
|
/**
|
|
4413
4434
|
* Scroll Snap Align
|
|
@@ -4475,7 +4496,7 @@ const O = (e) => {
|
|
|
4475
4496
|
* @see https://tailwindcss.com/docs/will-change
|
|
4476
4497
|
*/
|
|
4477
4498
|
"will-change": [{
|
|
4478
|
-
"will-change": ["auto", "scroll", "contents", "transform",
|
|
4499
|
+
"will-change": ["auto", "scroll", "contents", "transform", I]
|
|
4479
4500
|
}],
|
|
4480
4501
|
// SVG
|
|
4481
4502
|
/**
|
|
@@ -4490,7 +4511,7 @@ const O = (e) => {
|
|
|
4490
4511
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
4491
4512
|
*/
|
|
4492
4513
|
"stroke-w": [{
|
|
4493
|
-
stroke: [
|
|
4514
|
+
stroke: [te, ie, $e]
|
|
4494
4515
|
}],
|
|
4495
4516
|
/**
|
|
4496
4517
|
* Stroke
|
|
@@ -4570,40 +4591,40 @@ function Wn(...e) {
|
|
|
4570
4591
|
return Dn(Rt(e));
|
|
4571
4592
|
}
|
|
4572
4593
|
function yr({ autoWidth: e = !0, className: t, style: n }) {
|
|
4573
|
-
const [r, o] =
|
|
4574
|
-
|
|
4575
|
-
const
|
|
4576
|
-
o(
|
|
4594
|
+
const [r, o] = E(() => re.getActiveAppId()), [i, a] = E(() => Z.getRunningApps()), { isMobile: c } = it();
|
|
4595
|
+
V(() => {
|
|
4596
|
+
const v = re.subscribe("activeAppId", (y) => {
|
|
4597
|
+
o(y);
|
|
4577
4598
|
});
|
|
4578
4599
|
return () => {
|
|
4579
|
-
|
|
4600
|
+
v();
|
|
4580
4601
|
};
|
|
4581
|
-
}, []),
|
|
4582
|
-
a(
|
|
4583
|
-
}), []),
|
|
4602
|
+
}, []), V(() => Z.subscribe(() => {
|
|
4603
|
+
a(Z.getRunningApps());
|
|
4604
|
+
}), []), V(() => {
|
|
4584
4605
|
if (!new URLSearchParams(window.location.search).has("app")) {
|
|
4585
|
-
const
|
|
4586
|
-
|
|
4606
|
+
const h = re.getActiveAppId();
|
|
4607
|
+
h && !Z.isRunning(h) && Z.launchApp(h);
|
|
4587
4608
|
}
|
|
4588
4609
|
}, []);
|
|
4589
|
-
const l = (
|
|
4590
|
-
|
|
4591
|
-
},
|
|
4610
|
+
const l = (v) => {
|
|
4611
|
+
Z.closeApp(v);
|
|
4612
|
+
}, u = r ? me.get(r) : null, w = (u == null ? void 0 : u.width) ?? 400, d = r !== null, b = { ...{
|
|
4592
4613
|
overflow: "hidden",
|
|
4593
|
-
display:
|
|
4614
|
+
display: d ? "flex" : "none",
|
|
4594
4615
|
flexDirection: "column",
|
|
4595
4616
|
flexShrink: 0,
|
|
4596
4617
|
// Only set width if autoWidth is enabled
|
|
4597
|
-
...e &&
|
|
4618
|
+
...e && d ? { width: c ? "100%" : w } : {}
|
|
4598
4619
|
}, ...n };
|
|
4599
|
-
return /* @__PURE__ */ s("div", { className: Wn("nc-app-panel", t), style:
|
|
4620
|
+
return /* @__PURE__ */ s("div", { className: Wn("nc-app-panel", t), style: b, children: i.map((v) => /* @__PURE__ */ s(
|
|
4600
4621
|
rt,
|
|
4601
4622
|
{
|
|
4602
|
-
appId:
|
|
4603
|
-
isActive: r ===
|
|
4604
|
-
onClose: () => l(
|
|
4623
|
+
appId: v.appId,
|
|
4624
|
+
isActive: r === v.appId,
|
|
4625
|
+
onClose: () => l(v.appId)
|
|
4605
4626
|
},
|
|
4606
|
-
|
|
4627
|
+
v.appId
|
|
4607
4628
|
)) });
|
|
4608
4629
|
}
|
|
4609
4630
|
function xr({
|
|
@@ -4613,64 +4634,64 @@ function xr({
|
|
|
4613
4634
|
side: r = "left",
|
|
4614
4635
|
getBadge: o
|
|
4615
4636
|
}) {
|
|
4616
|
-
const { t: i } =
|
|
4617
|
-
|
|
4618
|
-
const
|
|
4619
|
-
l(
|
|
4637
|
+
const { t: i } = oe(), { isMobile: a } = it(), [c, l] = E(() => re.getActiveAppId()), [u, f] = E(() => Z.getRunningApps());
|
|
4638
|
+
V(() => {
|
|
4639
|
+
const p = re.subscribe("activeAppId", (m) => {
|
|
4640
|
+
l(m);
|
|
4620
4641
|
});
|
|
4621
4642
|
return () => {
|
|
4622
|
-
|
|
4643
|
+
p();
|
|
4623
4644
|
};
|
|
4624
|
-
}, []),
|
|
4625
|
-
|
|
4645
|
+
}, []), V(() => Z.subscribe(() => {
|
|
4646
|
+
f(Z.getRunningApps());
|
|
4626
4647
|
}), []);
|
|
4627
|
-
const w = (
|
|
4628
|
-
c ===
|
|
4629
|
-
},
|
|
4630
|
-
const
|
|
4631
|
-
return
|
|
4648
|
+
const w = (p) => {
|
|
4649
|
+
c === p ? Z.setActiveApp(null) : Z.launchApp(p);
|
|
4650
|
+
}, d = e.map((p) => me.get(p)).filter((p) => !!p), g = u.filter((p) => !e.includes(p.appId)).map((p) => ({ running: p, def: me.get(p.appId) })).filter((p) => !!p.def), k = (p) => u.some((m) => m.appId === p), b = (p) => p.titleKey ? String(i(p.titleKey)) : p.id, v = (p) => typeof p == "number" && p > 99 ? "99+" : p, y = (p, m) => {
|
|
4651
|
+
const N = o == null ? void 0 : o(p, m);
|
|
4652
|
+
return N ? /* @__PURE__ */ s(
|
|
4632
4653
|
"span",
|
|
4633
4654
|
{
|
|
4634
|
-
className: `nc-app-taskbar-badge nc-${
|
|
4635
|
-
"aria-label":
|
|
4636
|
-
children:
|
|
4655
|
+
className: `nc-app-taskbar-badge nc-${N.tone ?? "default"}`,
|
|
4656
|
+
"aria-label": N.ariaLabel,
|
|
4657
|
+
children: v(N.content)
|
|
4637
4658
|
}
|
|
4638
4659
|
) : null;
|
|
4639
|
-
},
|
|
4640
|
-
return /* @__PURE__ */
|
|
4641
|
-
|
|
4642
|
-
const
|
|
4643
|
-
return /* @__PURE__ */
|
|
4660
|
+
}, h = a ? 24 : 28;
|
|
4661
|
+
return /* @__PURE__ */ A("div", { className: `nc-app-taskbar ${a ? "nc-mobile" : "nc-desktop"} nc-${r} ${t}`, children: [
|
|
4662
|
+
d.map((p) => {
|
|
4663
|
+
const m = p.icon, N = c === p.id, C = k(p.id), P = { isActive: N, isRunning: C, isPinned: !0 };
|
|
4664
|
+
return /* @__PURE__ */ A(
|
|
4644
4665
|
"button",
|
|
4645
4666
|
{
|
|
4646
|
-
className: `nc-app-taskbar-button ${
|
|
4647
|
-
onClick: () => w(
|
|
4648
|
-
title:
|
|
4667
|
+
className: `nc-app-taskbar-button ${N ? "nc-active" : ""} ${C ? "nc-running" : ""}`,
|
|
4668
|
+
onClick: () => w(p.id),
|
|
4669
|
+
title: b(p),
|
|
4649
4670
|
children: [
|
|
4650
|
-
/* @__PURE__ */ s(
|
|
4651
|
-
|
|
4671
|
+
/* @__PURE__ */ s(m, { size: h }),
|
|
4672
|
+
y(p, P),
|
|
4652
4673
|
n && C && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
|
|
4653
4674
|
]
|
|
4654
4675
|
},
|
|
4655
|
-
|
|
4676
|
+
p.id
|
|
4656
4677
|
);
|
|
4657
4678
|
}),
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
const
|
|
4661
|
-
return /* @__PURE__ */
|
|
4679
|
+
g.length > 0 && /* @__PURE__ */ s("div", { className: "nc-app-taskbar-separator" }),
|
|
4680
|
+
g.map(({ running: p, def: m }) => {
|
|
4681
|
+
const N = m.icon, C = c === p.appId, P = { isActive: C, isRunning: !0, isPinned: !1 };
|
|
4682
|
+
return /* @__PURE__ */ A(
|
|
4662
4683
|
"button",
|
|
4663
4684
|
{
|
|
4664
4685
|
className: `nc-app-taskbar-button ${C ? "nc-active" : ""} nc-running`,
|
|
4665
|
-
onClick: () => w(
|
|
4666
|
-
title:
|
|
4686
|
+
onClick: () => w(p.appId),
|
|
4687
|
+
title: b(m),
|
|
4667
4688
|
children: [
|
|
4668
|
-
/* @__PURE__ */ s(
|
|
4669
|
-
|
|
4689
|
+
/* @__PURE__ */ s(N, { size: h }),
|
|
4690
|
+
y(m, P),
|
|
4670
4691
|
n && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
|
|
4671
4692
|
]
|
|
4672
4693
|
},
|
|
4673
|
-
|
|
4694
|
+
p.appId
|
|
4674
4695
|
);
|
|
4675
4696
|
})
|
|
4676
4697
|
] });
|
|
@@ -4714,67 +4735,67 @@ function kr({
|
|
|
4714
4735
|
}
|
|
4715
4736
|
const De = ge(null), pt = ge(null);
|
|
4716
4737
|
function Nr() {
|
|
4717
|
-
const e =
|
|
4738
|
+
const e = ae(De);
|
|
4718
4739
|
if (!e)
|
|
4719
4740
|
throw new Error("useNavStack must be used within a NavStackProvider");
|
|
4720
4741
|
return e;
|
|
4721
4742
|
}
|
|
4722
4743
|
function Ar() {
|
|
4723
|
-
const e =
|
|
4744
|
+
const e = ae(pt);
|
|
4724
4745
|
if (!e)
|
|
4725
4746
|
throw new Error("useNavView must be used within NavStack");
|
|
4726
4747
|
return e;
|
|
4727
4748
|
}
|
|
4728
4749
|
const We = ge(null);
|
|
4729
4750
|
function Sr({ rootView: e, children: t }) {
|
|
4730
|
-
const { t: n } =
|
|
4751
|
+
const { t: n } = oe(), r = tn(), [o, i] = E([e]), [a, c] = E([null]), l = X((m, N) => {
|
|
4731
4752
|
c((C) => {
|
|
4732
|
-
const
|
|
4733
|
-
return
|
|
4753
|
+
const P = [...C];
|
|
4754
|
+
return P[m] = N, P;
|
|
4734
4755
|
});
|
|
4735
|
-
}, []),
|
|
4736
|
-
c((
|
|
4737
|
-
const C = [...
|
|
4738
|
-
return C[
|
|
4756
|
+
}, []), u = X((m) => {
|
|
4757
|
+
c((N) => {
|
|
4758
|
+
const C = [...N];
|
|
4759
|
+
return C[m] = null, C;
|
|
4739
4760
|
});
|
|
4740
|
-
}, []),
|
|
4741
|
-
i((
|
|
4742
|
-
}, []), w =
|
|
4743
|
-
i((
|
|
4744
|
-
}, []),
|
|
4761
|
+
}, []), f = X((m) => {
|
|
4762
|
+
i((N) => [...N, m]), c((N) => [...N, null]);
|
|
4763
|
+
}, []), w = X(() => {
|
|
4764
|
+
i((m) => m.length <= 1 ? m : m.slice(0, -1)), c((m) => m.slice(0, -1));
|
|
4765
|
+
}, []), d = X(() => {
|
|
4745
4766
|
i([e]), c([null]);
|
|
4746
|
-
}, [e]),
|
|
4747
|
-
|
|
4748
|
-
r.setTitle(
|
|
4749
|
-
}, [
|
|
4750
|
-
|
|
4751
|
-
}, [
|
|
4752
|
-
const
|
|
4753
|
-
|
|
4767
|
+
}, [e]), g = o.length, k = g > 1, b = o.length - 1, v = o[o.length - 1], y = v != null && v.titleKey ? n(v.titleKey) : (v == null ? void 0 : v.title) ?? "";
|
|
4768
|
+
V(() => {
|
|
4769
|
+
r.setTitle(y);
|
|
4770
|
+
}, [y, r]), V(() => {
|
|
4771
|
+
k ? r.setBackHandler(w) : r.clearBackHandler();
|
|
4772
|
+
}, [k, w, r]), V(() => {
|
|
4773
|
+
const m = a[a.length - 1];
|
|
4774
|
+
m ? r.setToolbar(m) : r.clearToolbar();
|
|
4754
4775
|
}, [a, r]);
|
|
4755
|
-
const
|
|
4756
|
-
push:
|
|
4776
|
+
const h = {
|
|
4777
|
+
push: f,
|
|
4757
4778
|
pop: w,
|
|
4758
|
-
reset:
|
|
4759
|
-
depth:
|
|
4760
|
-
canGoBack:
|
|
4761
|
-
currentTitle:
|
|
4762
|
-
},
|
|
4779
|
+
reset: d,
|
|
4780
|
+
depth: g,
|
|
4781
|
+
canGoBack: k,
|
|
4782
|
+
currentTitle: y
|
|
4783
|
+
}, p = {
|
|
4763
4784
|
stack: o,
|
|
4764
4785
|
toolbarStack: a,
|
|
4765
4786
|
updateToolbar: l,
|
|
4766
|
-
clearToolbarAt:
|
|
4767
|
-
topIndex:
|
|
4787
|
+
clearToolbarAt: u,
|
|
4788
|
+
topIndex: b
|
|
4768
4789
|
};
|
|
4769
|
-
return /* @__PURE__ */ s(De.Provider, { value:
|
|
4790
|
+
return /* @__PURE__ */ s(De.Provider, { value: h, children: /* @__PURE__ */ s(We.Provider, { value: p, children: t }) });
|
|
4770
4791
|
}
|
|
4771
4792
|
function Hn({ index: e, children: t }) {
|
|
4772
|
-
const n =
|
|
4793
|
+
const n = ae(We);
|
|
4773
4794
|
if (!n)
|
|
4774
4795
|
throw new Error("NavViewProvider must be used within NavStackProvider");
|
|
4775
|
-
const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n, a =
|
|
4776
|
-
e === i && r(e,
|
|
4777
|
-
}, [e, i, r]), c =
|
|
4796
|
+
const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n, a = X((u) => {
|
|
4797
|
+
e === i && r(e, u);
|
|
4798
|
+
}, [e, i, r]), c = X(() => {
|
|
4778
4799
|
e === i && o(e);
|
|
4779
4800
|
}, [e, i, o]), l = {
|
|
4780
4801
|
setToolbar: a,
|
|
@@ -4783,7 +4804,7 @@ function Hn({ index: e, children: t }) {
|
|
|
4783
4804
|
return /* @__PURE__ */ s(pt.Provider, { value: l, children: t });
|
|
4784
4805
|
}
|
|
4785
4806
|
function Cr() {
|
|
4786
|
-
const e =
|
|
4807
|
+
const e = ae(De), t = ae(We);
|
|
4787
4808
|
if (!e || !t)
|
|
4788
4809
|
throw new Error("NavStackContainer must be used within a NavStackProvider");
|
|
4789
4810
|
const { stack: n } = t;
|
|
@@ -4808,7 +4829,7 @@ export {
|
|
|
4808
4829
|
xr as AppTaskbar,
|
|
4809
4830
|
rn as AppTitleBar,
|
|
4810
4831
|
qn as Battery,
|
|
4811
|
-
|
|
4832
|
+
ne as Button,
|
|
4812
4833
|
Xn as ButtonGroup,
|
|
4813
4834
|
Jn as Checkbox,
|
|
4814
4835
|
Ze as CloseButton,
|
|
@@ -4838,11 +4859,11 @@ export {
|
|
|
4838
4859
|
tr as TrashButton,
|
|
4839
4860
|
wr as ViewportProvider,
|
|
4840
4861
|
me as appRegistry,
|
|
4841
|
-
|
|
4862
|
+
re as appStateStore,
|
|
4842
4863
|
Wn as cn,
|
|
4843
4864
|
vr as createAppI18nFactory,
|
|
4844
4865
|
br as notificationManager,
|
|
4845
|
-
|
|
4866
|
+
Z as runningAppsStore,
|
|
4846
4867
|
Jt as showNotification,
|
|
4847
4868
|
tn as useApp,
|
|
4848
4869
|
Dt as useDialog,
|