@kingsimba/nc-ui 0.1.37 → 0.1.38
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.js +952 -908
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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
3
|
var oe = (e, t, n) => mt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { jsx as s, jsxs as
|
|
5
|
-
import { d as
|
|
6
|
-
import ze, { useState as
|
|
4
|
+
import { jsx as s, jsxs as k, Fragment as Ee } from "react/jsx-runtime";
|
|
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 P, useRef as F, useEffect as D, useMemo as Ie, createContext as ge, useContext as ce, Children as At, isValidElement as St, forwardRef as Ct, useImperativeHandle as Mt, useCallback as G, Suspense as It } from "react";
|
|
7
7
|
import { createPortal as Ae } from "react-dom";
|
|
8
8
|
import { useTranslation as re } from "react-i18next";
|
|
9
|
-
import
|
|
9
|
+
import $t from "i18next";
|
|
10
10
|
import { c as Rt } from "./clsx-OuTLNxxd.js";
|
|
11
11
|
function Qe({
|
|
12
12
|
size: e = "default",
|
|
@@ -37,8 +37,8 @@ function Qe({
|
|
|
37
37
|
);
|
|
38
38
|
return n ? /* @__PURE__ */ s("div", { className: "nc-activity-indicator-overlay", children: o }) : o;
|
|
39
39
|
}
|
|
40
|
-
function te({ variant: e = "default", block: t, size: n = "default", appearance: r = "default", className: o, disabled: i, textSelectable: a, loading: c, onClick: l, children:
|
|
41
|
-
const
|
|
40
|
+
function te({ variant: e = "default", block: t, size: n = "default", appearance: r = "default", className: o, disabled: i, textSelectable: a, loading: c, onClick: l, children: d, ...h }) {
|
|
41
|
+
const w = [
|
|
42
42
|
"nc-button",
|
|
43
43
|
e !== "default" ? `nc-${e}` : "",
|
|
44
44
|
t ? "nc-block" : "",
|
|
@@ -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__ */ k(
|
|
54
54
|
"button",
|
|
55
55
|
{
|
|
56
|
-
className:
|
|
56
|
+
className: w,
|
|
57
57
|
disabled: i || c,
|
|
58
|
-
onClick: (
|
|
58
|
+
onClick: (b) => {
|
|
59
59
|
if (!c) {
|
|
60
60
|
if (a) {
|
|
61
61
|
const A = window.getSelection();
|
|
62
62
|
if (A && A.toString().length > 0)
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
|
-
l == null || l(
|
|
65
|
+
l == null || l(b);
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
|
-
...
|
|
68
|
+
...h,
|
|
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
|
+
d
|
|
79
79
|
]
|
|
80
80
|
}
|
|
81
81
|
);
|
|
@@ -87,7 +87,7 @@ const Tt = {
|
|
|
87
87
|
error: "danger",
|
|
88
88
|
danger: "danger"
|
|
89
89
|
};
|
|
90
|
-
function
|
|
90
|
+
function Un({
|
|
91
91
|
code: e,
|
|
92
92
|
text: t,
|
|
93
93
|
type: n,
|
|
@@ -98,13 +98,13 @@ function Kn({
|
|
|
98
98
|
className: c = "",
|
|
99
99
|
style: l
|
|
100
100
|
}) {
|
|
101
|
-
const
|
|
101
|
+
const d = i ?? /* @__PURE__ */ k(Ee, { 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__ */ k("div", { className: `nc-alert nc-${n} ${c}`.trim(), style: l, children: [
|
|
106
|
+
/* @__PURE__ */ k("div", { className: "nc-alert-main", children: [
|
|
107
|
+
/* @__PURE__ */ s("div", { className: `nc-alert-message nc-${n}`, children: d }),
|
|
108
108
|
a && /* @__PURE__ */ s(
|
|
109
109
|
"button",
|
|
110
110
|
{
|
|
@@ -112,7 +112,7 @@ function Kn({
|
|
|
112
112
|
className: "nc-alert-close",
|
|
113
113
|
"aria-label": "Close alert",
|
|
114
114
|
onClick: a,
|
|
115
|
-
children: /* @__PURE__ */ s(
|
|
115
|
+
children: /* @__PURE__ */ s(Le, { size: 16 })
|
|
116
116
|
}
|
|
117
117
|
)
|
|
118
118
|
] }),
|
|
@@ -127,7 +127,7 @@ function Kn({
|
|
|
127
127
|
) })
|
|
128
128
|
] });
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function qn({
|
|
131
131
|
percentage: e = 0.5,
|
|
132
132
|
status: t = "discharging",
|
|
133
133
|
darkMode: n = !1,
|
|
@@ -136,8 +136,8 @@ function _n({
|
|
|
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, d = 14, h = 2, w = 0, u = 12, b = 0, A = 0, v = 0, y = l, x = d, m = x - b * 2, f = y - b * 2, p = Math.max(1, Math.min(4, x / 4)), g = o === 0 ? 0 : 0.05 + o * 0.95, C = l + h + u, T = 20, M = 0.65, S = Math.max(d, T * M), E = l + h + 1, N = (d - T * M) / 2;
|
|
140
|
+
return /* @__PURE__ */ k(
|
|
141
141
|
"svg",
|
|
142
142
|
{
|
|
143
143
|
className: "nc-battery",
|
|
@@ -147,37 +147,37 @@ function _n({
|
|
|
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: f * g, height: m, fill: "white" }) }) }),
|
|
151
151
|
/* @__PURE__ */ s(
|
|
152
152
|
"rect",
|
|
153
153
|
{
|
|
154
154
|
x: A,
|
|
155
155
|
y: v,
|
|
156
|
-
rx:
|
|
157
|
-
ry:
|
|
158
|
-
width:
|
|
159
|
-
height:
|
|
156
|
+
rx: p,
|
|
157
|
+
ry: p,
|
|
158
|
+
width: y,
|
|
159
|
+
height: x,
|
|
160
160
|
fill: c
|
|
161
161
|
}
|
|
162
162
|
),
|
|
163
163
|
/* @__PURE__ */ s(
|
|
164
164
|
"rect",
|
|
165
165
|
{
|
|
166
|
-
x: A +
|
|
167
|
-
y: v +
|
|
168
|
-
width:
|
|
169
|
-
height:
|
|
166
|
+
x: A + b,
|
|
167
|
+
y: v + b,
|
|
168
|
+
width: f,
|
|
169
|
+
height: m,
|
|
170
170
|
fill: a,
|
|
171
|
-
rx:
|
|
172
|
-
ry:
|
|
171
|
+
rx: p,
|
|
172
|
+
ry: p,
|
|
173
173
|
mask: `url(#nc-battery-fill-mask-${o})`
|
|
174
174
|
}
|
|
175
175
|
),
|
|
176
176
|
/* @__PURE__ */ s(
|
|
177
177
|
"text",
|
|
178
178
|
{
|
|
179
|
-
x: A +
|
|
180
|
-
y:
|
|
179
|
+
x: A + y / 2,
|
|
180
|
+
y: d - 3,
|
|
181
181
|
fontSize: 11,
|
|
182
182
|
fontWeight: "bold",
|
|
183
183
|
fill: "var(--nc-battery-text-contrast)",
|
|
@@ -188,21 +188,21 @@ function _n({
|
|
|
188
188
|
/* @__PURE__ */ s(
|
|
189
189
|
"rect",
|
|
190
190
|
{
|
|
191
|
-
x: l +
|
|
192
|
-
y:
|
|
193
|
-
width:
|
|
194
|
-
height:
|
|
191
|
+
x: l + w,
|
|
192
|
+
y: d * 0.26,
|
|
193
|
+
width: h,
|
|
194
|
+
height: d * 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(${E}, ${N}) scale(${M})`, 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
|
);
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function Xn({
|
|
206
206
|
value: e,
|
|
207
207
|
onChange: t,
|
|
208
208
|
options: n,
|
|
@@ -224,7 +224,7 @@ function Un({
|
|
|
224
224
|
);
|
|
225
225
|
}) });
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function Pt({ 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
|
{
|
|
@@ -236,15 +236,15 @@ function Et({ size: e }) {
|
|
|
236
236
|
}
|
|
237
237
|
) });
|
|
238
238
|
}
|
|
239
|
-
function
|
|
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__ */ k(
|
|
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: (d) => {
|
|
247
|
+
n || (d.preventDefault(), t(!e));
|
|
248
248
|
},
|
|
249
249
|
children: [
|
|
250
250
|
/* @__PURE__ */ s(
|
|
@@ -254,10 +254,10 @@ function qn({ 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: (d) => {
|
|
258
|
+
n || (d.key === "Enter" || d.key === " ") && (d.preventDefault(), t(!e));
|
|
259
259
|
},
|
|
260
|
-
children: e && /* @__PURE__ */ s(
|
|
260
|
+
children: e && /* @__PURE__ */ s(Pt, { 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 qn({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
|
|
|
265
265
|
}
|
|
266
266
|
);
|
|
267
267
|
}
|
|
268
|
-
function
|
|
269
|
-
const c = F(null), { t: l } = re(),
|
|
268
|
+
function Et({ option: e, onChange: t, selected: n, highlighted: r, small: o, renderOption: i, index: a }) {
|
|
269
|
+
const c = F(null), { t: l } = re(), d = e.disabled === !0;
|
|
270
270
|
return D(() => {
|
|
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" : ""} ${d ? "nc-disabled" : ""}`,
|
|
277
277
|
role: "option",
|
|
278
278
|
onClick: () => {
|
|
279
|
-
|
|
279
|
+
d || t(e.value, e.label);
|
|
280
280
|
},
|
|
281
281
|
"aria-selected": n,
|
|
282
|
-
"aria-disabled":
|
|
282
|
+
"aria-disabled": d,
|
|
283
283
|
style: {
|
|
284
|
-
cursor:
|
|
285
|
-
opacity:
|
|
286
|
-
background: r && !
|
|
284
|
+
cursor: d ? "default" : "pointer",
|
|
285
|
+
opacity: d ? 0.4 : void 0,
|
|
286
|
+
background: r && !d ? "rgba(59,130,246,0.18)" : n && !d ? "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__ */ k(Ee, { children: [
|
|
289
289
|
e.label,
|
|
290
|
-
e.default && /* @__PURE__ */
|
|
290
|
+
e.default && /* @__PURE__ */ k("span", { style: { fontSize: "0.85em", color: "var(--nc-text-weak)", marginLeft: 6 }, children: [
|
|
291
291
|
"(",
|
|
292
292
|
l("common.default"),
|
|
293
293
|
")"
|
|
@@ -296,7 +296,7 @@ function Lt({ option: e, onChange: t, selected: n, highlighted: r, small: o, ren
|
|
|
296
296
|
}
|
|
297
297
|
);
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function Lt({
|
|
300
300
|
isOpen: e,
|
|
301
301
|
options: t,
|
|
302
302
|
onSelect: n,
|
|
@@ -307,17 +307,17 @@ function Pt({
|
|
|
307
307
|
highlightedIndex: c = -1,
|
|
308
308
|
renderOption: l
|
|
309
309
|
}) {
|
|
310
|
-
const [
|
|
310
|
+
const [d, h] = P({ top: 0, left: 0, width: 0 }), [w, u] = P(o), { t: b } = re();
|
|
311
311
|
if (D(() => {
|
|
312
312
|
if (e && i.current) {
|
|
313
313
|
const v = i.current.getBoundingClientRect();
|
|
314
|
-
let
|
|
314
|
+
let y = o;
|
|
315
315
|
if (o === "bottom") {
|
|
316
|
-
const
|
|
317
|
-
|
|
316
|
+
const x = window.innerHeight - v.bottom, m = v.top;
|
|
317
|
+
x < 320 && m > x && (y = "top");
|
|
318
318
|
}
|
|
319
|
-
|
|
320
|
-
top:
|
|
319
|
+
u(y), h({
|
|
320
|
+
top: y === "top" ? v.top - 4 : v.bottom + 4,
|
|
321
321
|
left: v.left,
|
|
322
322
|
width: v.width
|
|
323
323
|
});
|
|
@@ -330,15 +330,15 @@ function Pt({
|
|
|
330
330
|
onMouseDown: (v) => v.stopPropagation(),
|
|
331
331
|
style: {
|
|
332
332
|
position: "fixed",
|
|
333
|
-
top:
|
|
334
|
-
bottom:
|
|
335
|
-
left:
|
|
336
|
-
width:
|
|
333
|
+
top: w === "top" ? void 0 : d.top,
|
|
334
|
+
bottom: w === "top" ? window.innerHeight - d.top : void 0,
|
|
335
|
+
left: d.left,
|
|
336
|
+
width: d.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: b("common.noResults") }) : t.map((v, y) => /* @__PURE__ */ s(Et, { option: v, onChange: n, selected: v.value === r, highlighted: y === c, small: a, renderOption: l, index: y }, v.value))
|
|
342
342
|
}
|
|
343
343
|
);
|
|
344
344
|
return Ae(A, document.body);
|
|
@@ -372,7 +372,7 @@ function Bt({ open: e, small: t }) {
|
|
|
372
372
|
}
|
|
373
373
|
);
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function Qn({
|
|
376
376
|
value: e,
|
|
377
377
|
onChange: t,
|
|
378
378
|
placeholder: n = "Select…",
|
|
@@ -382,20 +382,20 @@ function Xn({
|
|
|
382
382
|
renderSelected: a,
|
|
383
383
|
selectedOption: c,
|
|
384
384
|
disabled: l,
|
|
385
|
-
label:
|
|
386
|
-
clearable:
|
|
387
|
-
allowTyping:
|
|
388
|
-
placement:
|
|
389
|
-
size:
|
|
385
|
+
label: d,
|
|
386
|
+
clearable: h = !0,
|
|
387
|
+
allowTyping: w = !1,
|
|
388
|
+
placement: u = "bottom",
|
|
389
|
+
size: b = "default",
|
|
390
390
|
appearance: A = "default",
|
|
391
391
|
textAlign: v = "left",
|
|
392
|
-
style:
|
|
393
|
-
className:
|
|
392
|
+
style: y,
|
|
393
|
+
className: x
|
|
394
394
|
}) {
|
|
395
|
-
const [
|
|
395
|
+
const [m, f] = P(!1), [p, g] = P(""), [C, T] = P(-1), M = F(null), S = F(null), E = F(null), N = b === "small", { t: I } = re(), L = !!o, H = w || L, [ae, X] = P([]), [K, _] = P(() => {
|
|
396
396
|
if (r && e) {
|
|
397
|
-
const
|
|
398
|
-
return
|
|
397
|
+
const R = r.find((W) => W.value === e);
|
|
398
|
+
return R ? R.label : "";
|
|
399
399
|
}
|
|
400
400
|
return o && e ? e : "";
|
|
401
401
|
});
|
|
@@ -405,53 +405,53 @@ function Xn({
|
|
|
405
405
|
return;
|
|
406
406
|
}
|
|
407
407
|
if (r) {
|
|
408
|
-
const
|
|
409
|
-
|
|
408
|
+
const R = r.find((W) => W.value === e);
|
|
409
|
+
R && _(R.label);
|
|
410
410
|
} else o && _(e);
|
|
411
411
|
}, [e, r, o]);
|
|
412
|
-
const U = (
|
|
412
|
+
const U = (R, W = !1) => {
|
|
413
413
|
if (!o) return;
|
|
414
|
-
|
|
414
|
+
E.current && clearTimeout(E.current);
|
|
415
415
|
const B = async () => {
|
|
416
416
|
try {
|
|
417
|
-
const
|
|
418
|
-
X(
|
|
417
|
+
const Y = await o(R);
|
|
418
|
+
X(Y), T(-1);
|
|
419
419
|
} catch {
|
|
420
420
|
X([]);
|
|
421
421
|
}
|
|
422
422
|
};
|
|
423
|
-
W ? B() :
|
|
424
|
-
}, j =
|
|
425
|
-
if (
|
|
426
|
-
const
|
|
427
|
-
return H ? (r || []).filter((W) => W.label.toLowerCase().includes(
|
|
428
|
-
}, [r,
|
|
423
|
+
W ? B() : E.current = setTimeout(B, 200);
|
|
424
|
+
}, j = Ie(() => {
|
|
425
|
+
if (L) return ae;
|
|
426
|
+
const R = p.toLowerCase();
|
|
427
|
+
return H ? (r || []).filter((W) => W.label.toLowerCase().includes(R)) : r || [];
|
|
428
|
+
}, [r, p, H, L, ae]);
|
|
429
429
|
D(() => {
|
|
430
|
-
|
|
431
|
-
}, [
|
|
432
|
-
if (!
|
|
433
|
-
const
|
|
434
|
-
t(
|
|
430
|
+
m && T(-1);
|
|
431
|
+
}, [m, j]), D(() => {
|
|
432
|
+
if (!h && !e && r && r.length > 0 && t) {
|
|
433
|
+
const R = r.find((W) => W.default) || r[0];
|
|
434
|
+
t(R.value);
|
|
435
435
|
}
|
|
436
|
-
}, [
|
|
437
|
-
function
|
|
436
|
+
}, [h, e, r, t]), D(() => {
|
|
437
|
+
function R(W) {
|
|
438
438
|
var B;
|
|
439
|
-
W.target instanceof Node &&
|
|
439
|
+
W.target instanceof Node && M.current && ((B = M.current.parentElement) != null && B.contains(W.target) || f(!1));
|
|
440
440
|
}
|
|
441
|
-
return document.addEventListener("mousedown",
|
|
441
|
+
return document.addEventListener("mousedown", R), () => document.removeEventListener("mousedown", R);
|
|
442
442
|
}, []);
|
|
443
|
-
const z = c ?? (r ? r.find((
|
|
444
|
-
var
|
|
445
|
-
_(W), t == null || t(
|
|
443
|
+
const z = c ?? (r ? r.find((R) => R.value === e) : e ? { label: K, value: e } : void 0), q = z && h, le = !l && !q, pe = `nc-align-${v}`, ve = !(m && H) && !!z, de = (R, W, B = !1) => {
|
|
444
|
+
var Y;
|
|
445
|
+
_(W), t == null || t(R), f(!1), g(""), B && ((Y = M.current) == null || Y.blur());
|
|
446
446
|
}, we = () => {
|
|
447
|
-
t == null || t(void 0),
|
|
448
|
-
}, ye = (
|
|
449
|
-
if (!
|
|
450
|
-
(
|
|
447
|
+
t == null || t(void 0), g(""), f(!1);
|
|
448
|
+
}, ye = (R) => {
|
|
449
|
+
if (!m) {
|
|
450
|
+
(R.key === "ArrowDown" || R.key === "ArrowUp") && (f(!0), R.preventDefault());
|
|
451
451
|
return;
|
|
452
452
|
}
|
|
453
|
-
const W = (B,
|
|
454
|
-
if (
|
|
453
|
+
const W = (B, Y) => {
|
|
454
|
+
if (Y === 1) {
|
|
455
455
|
for (let V = B; V < j.length; V++)
|
|
456
456
|
if (!j[V].disabled) return V;
|
|
457
457
|
for (let V = 0; V < B; V++)
|
|
@@ -464,76 +464,76 @@ function Xn({
|
|
|
464
464
|
}
|
|
465
465
|
return B;
|
|
466
466
|
};
|
|
467
|
-
switch (
|
|
467
|
+
switch (R.key) {
|
|
468
468
|
case "ArrowDown":
|
|
469
|
-
|
|
470
|
-
const
|
|
469
|
+
R.preventDefault(), T((B) => {
|
|
470
|
+
const Y = B + 1, V = Y >= j.length ? 0 : Y;
|
|
471
471
|
return W(V, 1);
|
|
472
472
|
});
|
|
473
473
|
break;
|
|
474
474
|
case "ArrowUp":
|
|
475
|
-
|
|
476
|
-
const
|
|
475
|
+
R.preventDefault(), T((B) => {
|
|
476
|
+
const Y = B - 1, V = Y < 0 ? j.length - 1 : Y;
|
|
477
477
|
return W(V, -1);
|
|
478
478
|
});
|
|
479
479
|
break;
|
|
480
480
|
case "Enter":
|
|
481
|
-
|
|
481
|
+
R.preventDefault(), C >= 0 && C < j.length && !j[C].disabled && de(j[C].value, j[C].label, !0);
|
|
482
482
|
break;
|
|
483
483
|
case "Escape":
|
|
484
|
-
|
|
484
|
+
R.preventDefault(), f(!1), g("");
|
|
485
485
|
break;
|
|
486
486
|
}
|
|
487
487
|
};
|
|
488
|
-
return /* @__PURE__ */
|
|
489
|
-
|
|
490
|
-
/* @__PURE__ */
|
|
488
|
+
return /* @__PURE__ */ k("div", { className: `nc-combo-container ${A === "transparent" ? "nc-transparent" : ""} ${A === "plain" ? "nc-plain" : ""} ${m ? "nc-open" : ""} ${pe} ${x || ""}`.trim(), style: { position: "relative", ...y }, children: [
|
|
489
|
+
d && /* @__PURE__ */ s("span", { className: `nc-label ${N ? "nc-small" : ""}`, children: d }),
|
|
490
|
+
/* @__PURE__ */ k(
|
|
491
491
|
"div",
|
|
492
492
|
{
|
|
493
493
|
ref: S,
|
|
494
494
|
style: { position: "relative", display: "flex", alignItems: "center" },
|
|
495
|
-
onMouseDown: (
|
|
496
|
-
if (l || H &&
|
|
497
|
-
const W = !
|
|
498
|
-
if (
|
|
495
|
+
onMouseDown: (R) => {
|
|
496
|
+
if (l || H && R.target === M.current) return;
|
|
497
|
+
const W = !m;
|
|
498
|
+
if (f((B) => (!B && H && z && g(z.label), !B)), L && W) {
|
|
499
499
|
const B = H && z ? z.label : "";
|
|
500
500
|
X([]), setTimeout(() => U(B, !0), 0);
|
|
501
501
|
}
|
|
502
|
-
H && !
|
|
503
|
-
var B,
|
|
504
|
-
(B =
|
|
502
|
+
H && !m && setTimeout(() => {
|
|
503
|
+
var B, Y;
|
|
504
|
+
(B = M.current) == null || B.focus(), (Y = M.current) == null || Y.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: M,
|
|
512
|
+
className: `nc-input ${N ? "nc-small" : ""}`,
|
|
513
513
|
placeholder: n,
|
|
514
514
|
onFocus: () => {
|
|
515
515
|
if (!l && H) {
|
|
516
|
-
|
|
517
|
-
const
|
|
518
|
-
z && (
|
|
516
|
+
f(!0);
|
|
517
|
+
const R = z ? z.label : "";
|
|
518
|
+
z && (g(R), setTimeout(() => {
|
|
519
519
|
var W;
|
|
520
|
-
return (W =
|
|
521
|
-
}, 0)),
|
|
520
|
+
return (W = M.current) == null ? void 0 : W.select();
|
|
521
|
+
}, 0)), L && (X([]), U(R, !0));
|
|
522
522
|
}
|
|
523
523
|
},
|
|
524
|
-
onChange: (
|
|
525
|
-
const W =
|
|
526
|
-
H && (
|
|
524
|
+
onChange: (R) => {
|
|
525
|
+
const W = R.target.value;
|
|
526
|
+
H && (g(W), L && U(W));
|
|
527
527
|
},
|
|
528
528
|
onKeyDown: ye,
|
|
529
|
-
value:
|
|
529
|
+
value: m && H ? p : (z == null ? void 0 : z.label) || "",
|
|
530
530
|
readOnly: l || !H,
|
|
531
531
|
style: {
|
|
532
532
|
width: "100%",
|
|
533
|
-
paddingRight: le || q ?
|
|
534
|
-
caretColor:
|
|
535
|
-
cursor:
|
|
536
|
-
userSelect:
|
|
533
|
+
paddingRight: le || q ? N ? 32 : 44 : 12,
|
|
534
|
+
caretColor: w ? void 0 : "transparent",
|
|
535
|
+
cursor: w ? void 0 : "pointer",
|
|
536
|
+
userSelect: w ? void 0 : "none",
|
|
537
537
|
color: ve ? "transparent" : "var(--nc-text)"
|
|
538
538
|
}
|
|
539
539
|
}
|
|
@@ -545,8 +545,8 @@ function Xn({
|
|
|
545
545
|
className: `nc-combo-overlay ${pe}`,
|
|
546
546
|
style: {
|
|
547
547
|
position: "absolute",
|
|
548
|
-
left:
|
|
549
|
-
right: le || q ?
|
|
548
|
+
left: N ? 8 : 12,
|
|
549
|
+
right: le || q ? N ? 12 : 24 : N ? 8 : 12,
|
|
550
550
|
top: "50%",
|
|
551
551
|
transform: "translateY(-50%)",
|
|
552
552
|
pointerEvents: "none",
|
|
@@ -554,25 +554,25 @@ function Xn({
|
|
|
554
554
|
alignItems: "center",
|
|
555
555
|
gap: 6
|
|
556
556
|
},
|
|
557
|
-
children: a && z ? a(z) : /* @__PURE__ */
|
|
558
|
-
/* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${
|
|
559
|
-
(z == null ? void 0 : z.default) && /* @__PURE__ */
|
|
557
|
+
children: a && z ? a(z) : /* @__PURE__ */ k(Ee, { children: [
|
|
558
|
+
/* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${N ? "nc-small" : ""}`, children: z == null ? void 0 : z.label }),
|
|
559
|
+
(z == null ? void 0 : z.default) && /* @__PURE__ */ k("span", { className: `nc-combo-overlay-default ${N ? "nc-small" : ""}`, children: [
|
|
560
560
|
"(",
|
|
561
|
-
|
|
561
|
+
I("common.default"),
|
|
562
562
|
")"
|
|
563
563
|
] })
|
|
564
564
|
] })
|
|
565
565
|
}
|
|
566
566
|
),
|
|
567
|
-
q && /* @__PURE__ */ s(zt, { onClick: we, small:
|
|
568
|
-
le && /* @__PURE__ */ s(Bt, { open:
|
|
567
|
+
q && /* @__PURE__ */ s(zt, { onClick: we, small: N }),
|
|
568
|
+
le && /* @__PURE__ */ s(Bt, { open: m, small: N })
|
|
569
569
|
]
|
|
570
570
|
}
|
|
571
571
|
),
|
|
572
|
-
/* @__PURE__ */ s(
|
|
572
|
+
/* @__PURE__ */ s(Lt, { isOpen: m, options: j, onSelect: de, selectedValue: e, placement: u, anchorRef: S, small: N, highlightedIndex: C, renderOption: i })
|
|
573
573
|
] });
|
|
574
574
|
}
|
|
575
|
-
function
|
|
575
|
+
function Zn({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default", title: o, "aria-label": i }) {
|
|
576
576
|
return /* @__PURE__ */ s(
|
|
577
577
|
"button",
|
|
578
578
|
{
|
|
@@ -596,11 +596,11 @@ function Ze({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Clo
|
|
|
596
596
|
title: r,
|
|
597
597
|
"aria-label": o,
|
|
598
598
|
"data-size": n,
|
|
599
|
-
children: /* @__PURE__ */ s(
|
|
599
|
+
children: /* @__PURE__ */ s(Le, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
|
|
600
600
|
}
|
|
601
601
|
);
|
|
602
602
|
}
|
|
603
|
-
function
|
|
603
|
+
function er({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Edit", "aria-label": o = "Edit" }) {
|
|
604
604
|
return /* @__PURE__ */ s(
|
|
605
605
|
"button",
|
|
606
606
|
{
|
|
@@ -614,7 +614,7 @@ function Qn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Edi
|
|
|
614
614
|
}
|
|
615
615
|
);
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function tr({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Delete", "aria-label": o = "Delete" }) {
|
|
618
618
|
return /* @__PURE__ */ s(
|
|
619
619
|
"button",
|
|
620
620
|
{
|
|
@@ -628,7 +628,7 @@ function Zn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Del
|
|
|
628
628
|
}
|
|
629
629
|
);
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function nr({ onClick: e, disabled: t = !1, children: n, title: r, "aria-label": o, size: i = "default" }) {
|
|
632
632
|
return /* @__PURE__ */ s(
|
|
633
633
|
"button",
|
|
634
634
|
{
|
|
@@ -642,7 +642,7 @@ function er({ onClick: e, disabled: t = !1, children: n, title: r, "aria-label":
|
|
|
642
642
|
}
|
|
643
643
|
);
|
|
644
644
|
}
|
|
645
|
-
function
|
|
645
|
+
function rr({
|
|
646
646
|
open: e,
|
|
647
647
|
onClose: t,
|
|
648
648
|
options: n,
|
|
@@ -650,35 +650,35 @@ function tr({
|
|
|
650
650
|
anchor: o,
|
|
651
651
|
preferredDirection: i = "down"
|
|
652
652
|
}) {
|
|
653
|
-
const a = F(null), [c, l] =
|
|
653
|
+
const a = F(null), [c, l] = P({ top: 0, left: 0 }), d = o || (r == null ? void 0 : r.current);
|
|
654
654
|
if (D(() => {
|
|
655
|
-
if (!e || !
|
|
656
|
-
const
|
|
657
|
-
let
|
|
658
|
-
(!
|
|
659
|
-
let
|
|
660
|
-
|
|
661
|
-
let
|
|
662
|
-
|
|
663
|
-
top: Math.max(8,
|
|
655
|
+
if (!e || !d || !a.current) return;
|
|
656
|
+
const u = d.getBoundingClientRect(), b = a.current.getBoundingClientRect(), A = window.innerHeight, v = window.innerWidth, y = u.bottom + 8, x = y + b.height <= A - 8;
|
|
657
|
+
let m = i;
|
|
658
|
+
(!x && i === "down" || i === "up" && x) && (m = "up");
|
|
659
|
+
let f;
|
|
660
|
+
m === "down" ? f = y : f = u.top - b.height - 8;
|
|
661
|
+
let p = u.left;
|
|
662
|
+
p + b.width > v - 8 && (p = u.right - b.width), l({
|
|
663
|
+
top: Math.max(8, f),
|
|
664
664
|
// Ensure minimum 8px from top
|
|
665
|
-
left: Math.max(8,
|
|
665
|
+
left: Math.max(8, p)
|
|
666
666
|
// Ensure minimum 8px from left
|
|
667
667
|
});
|
|
668
|
-
}, [e,
|
|
668
|
+
}, [e, d, i]), D(() => {
|
|
669
669
|
if (!e) return;
|
|
670
|
-
const
|
|
671
|
-
a.current && !a.current.contains(A.target) &&
|
|
672
|
-
},
|
|
670
|
+
const u = (A) => {
|
|
671
|
+
a.current && !a.current.contains(A.target) && d && !d.contains(A.target) && t();
|
|
672
|
+
}, b = (A) => {
|
|
673
673
|
A.key === "Escape" && t();
|
|
674
674
|
};
|
|
675
|
-
return document.addEventListener("mousedown",
|
|
676
|
-
document.removeEventListener("mousedown",
|
|
675
|
+
return document.addEventListener("mousedown", u), document.addEventListener("keydown", b), () => {
|
|
676
|
+
document.removeEventListener("mousedown", u), document.removeEventListener("keydown", b);
|
|
677
677
|
};
|
|
678
|
-
}, [e, t,
|
|
679
|
-
const
|
|
680
|
-
|
|
681
|
-
},
|
|
678
|
+
}, [e, t, d]), !e) return null;
|
|
679
|
+
const h = (u) => {
|
|
680
|
+
u.type !== "separator" && !u.disabled && u.onClick && (u.onClick(), t());
|
|
681
|
+
}, w = n.some((u) => u.icon);
|
|
682
682
|
return Ae(
|
|
683
683
|
/* @__PURE__ */ s(
|
|
684
684
|
"div",
|
|
@@ -692,35 +692,35 @@ function tr({
|
|
|
692
692
|
zIndex: 1e4
|
|
693
693
|
},
|
|
694
694
|
role: "menu",
|
|
695
|
-
children: n.map((
|
|
696
|
-
if (
|
|
695
|
+
children: n.map((u) => {
|
|
696
|
+
if (u.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
|
+
u.id
|
|
704
704
|
);
|
|
705
|
-
const
|
|
705
|
+
const b = [
|
|
706
706
|
"nc-context-menu-item",
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
707
|
+
u.variant && u.variant !== "default" ? `nc-${u.variant}` : "",
|
|
708
|
+
u.disabled ? "nc-disabled" : "",
|
|
709
|
+
w && !u.icon ? "nc-indented" : ""
|
|
710
710
|
].filter(Boolean).join(" ");
|
|
711
|
-
return /* @__PURE__ */
|
|
711
|
+
return /* @__PURE__ */ k(
|
|
712
712
|
"button",
|
|
713
713
|
{
|
|
714
|
-
className:
|
|
715
|
-
onClick: () =>
|
|
716
|
-
disabled:
|
|
714
|
+
className: b,
|
|
715
|
+
onClick: () => h(u),
|
|
716
|
+
disabled: u.disabled,
|
|
717
717
|
role: "menuitem",
|
|
718
718
|
children: [
|
|
719
|
-
|
|
720
|
-
/* @__PURE__ */ s("span", { className: "nc-context-menu-label", children:
|
|
719
|
+
u.icon && /* @__PURE__ */ s("span", { className: "nc-context-menu-icon", children: u.icon }),
|
|
720
|
+
/* @__PURE__ */ s("span", { className: "nc-context-menu-label", children: u.label })
|
|
721
721
|
]
|
|
722
722
|
},
|
|
723
|
-
|
|
723
|
+
u.id
|
|
724
724
|
);
|
|
725
725
|
})
|
|
726
726
|
}
|
|
@@ -741,7 +741,7 @@ function fe({ children: e, onClick: t, ...n }) {
|
|
|
741
741
|
t == null || t(a), r();
|
|
742
742
|
}, ...n, children: e ?? o("common.close") });
|
|
743
743
|
}
|
|
744
|
-
function
|
|
744
|
+
function or({
|
|
745
745
|
open: e,
|
|
746
746
|
onClose: t,
|
|
747
747
|
title: n,
|
|
@@ -751,61 +751,61 @@ function nr({
|
|
|
751
751
|
footer: a,
|
|
752
752
|
onOk: c,
|
|
753
753
|
onSave: l,
|
|
754
|
-
onDelete:
|
|
755
|
-
onCancel:
|
|
756
|
-
onConnect:
|
|
757
|
-
closeOnOverlay:
|
|
758
|
-
primaryDisabled:
|
|
754
|
+
onDelete: d,
|
|
755
|
+
onCancel: h,
|
|
756
|
+
onConnect: w,
|
|
757
|
+
closeOnOverlay: u = !0,
|
|
758
|
+
primaryDisabled: b = !1,
|
|
759
759
|
fullScreen: A = !1,
|
|
760
760
|
hideTitleBar: v = !1,
|
|
761
|
-
className:
|
|
762
|
-
onContentHeightChange:
|
|
761
|
+
className: y = "",
|
|
762
|
+
onContentHeightChange: x
|
|
763
763
|
}) {
|
|
764
|
-
const
|
|
765
|
-
|
|
764
|
+
const m = F(null), f = F(null), { t: p } = re(), g = { close: t }, C = (S) => {
|
|
765
|
+
u && S.target === S.currentTarget && t();
|
|
766
766
|
};
|
|
767
767
|
if (D(() => {
|
|
768
|
-
e &&
|
|
768
|
+
e && m.current && m.current.focus();
|
|
769
769
|
}, [e]), D(() => {
|
|
770
|
-
if (!
|
|
771
|
-
const S = new ResizeObserver((
|
|
772
|
-
for (const
|
|
773
|
-
const
|
|
774
|
-
|
|
770
|
+
if (!x || !f.current) return;
|
|
771
|
+
const S = new ResizeObserver((E) => {
|
|
772
|
+
for (const N of E) {
|
|
773
|
+
const I = N.contentRect.height;
|
|
774
|
+
x(I);
|
|
775
775
|
}
|
|
776
776
|
});
|
|
777
|
-
return S.observe(
|
|
777
|
+
return S.observe(f.current), () => {
|
|
778
778
|
S.disconnect();
|
|
779
779
|
};
|
|
780
|
-
}, [
|
|
780
|
+
}, [x]), !e) return null;
|
|
781
781
|
const T = () => {
|
|
782
782
|
switch (i) {
|
|
783
783
|
case "ok":
|
|
784
|
-
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(te, { variant: "primary", onClick: c ?? t, disabled:
|
|
784
|
+
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(te, { variant: "primary", onClick: c ?? t, disabled: b, children: p("common.ok") }) });
|
|
785
785
|
case "ok-cancel":
|
|
786
|
-
return /* @__PURE__ */
|
|
787
|
-
/* @__PURE__ */ s(fe, { onClick:
|
|
788
|
-
/* @__PURE__ */ s(te, { variant: "primary", onClick: c ?? t, disabled:
|
|
786
|
+
return /* @__PURE__ */ k("div", { className: "nc-dialog-footer", children: [
|
|
787
|
+
/* @__PURE__ */ s(fe, { onClick: h, children: p("common.cancel") }),
|
|
788
|
+
/* @__PURE__ */ s(te, { variant: "primary", onClick: c ?? t, disabled: b, children: p("common.ok") })
|
|
789
789
|
] });
|
|
790
790
|
case "save-cancel":
|
|
791
|
-
return /* @__PURE__ */
|
|
792
|
-
/* @__PURE__ */ s(fe, { onClick:
|
|
793
|
-
/* @__PURE__ */ s(te, { variant: "primary", onClick: l, disabled:
|
|
791
|
+
return /* @__PURE__ */ k("div", { className: "nc-dialog-footer", children: [
|
|
792
|
+
/* @__PURE__ */ s(fe, { onClick: h, children: p("common.cancel") }),
|
|
793
|
+
/* @__PURE__ */ s(te, { variant: "primary", onClick: l, disabled: b, children: p("common.save") })
|
|
794
794
|
] });
|
|
795
795
|
case "delete-cancel":
|
|
796
|
-
return /* @__PURE__ */
|
|
797
|
-
/* @__PURE__ */ s(fe, { onClick:
|
|
798
|
-
/* @__PURE__ */ s(te, { variant: "danger", onClick:
|
|
796
|
+
return /* @__PURE__ */ k("div", { className: "nc-dialog-footer", children: [
|
|
797
|
+
/* @__PURE__ */ s(fe, { onClick: h, children: p("common.cancel") }),
|
|
798
|
+
/* @__PURE__ */ s(te, { variant: "danger", onClick: d, disabled: b, children: p("common.delete") })
|
|
799
799
|
] });
|
|
800
800
|
case "connect":
|
|
801
|
-
return /* @__PURE__ */
|
|
802
|
-
/* @__PURE__ */ s(fe, { onClick:
|
|
803
|
-
/* @__PURE__ */ s(te, { variant: "primary", onClick:
|
|
801
|
+
return /* @__PURE__ */ k("div", { className: "nc-dialog-footer", children: [
|
|
802
|
+
/* @__PURE__ */ s(fe, { onClick: h, children: p("common.cancel") }),
|
|
803
|
+
/* @__PURE__ */ s(te, { variant: "primary", onClick: w, disabled: b, children: p("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: p("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 nr({
|
|
|
813
813
|
default:
|
|
814
814
|
return null;
|
|
815
815
|
}
|
|
816
|
-
},
|
|
816
|
+
}, M = /* @__PURE__ */ s(et.Provider, { value: g, children: /* @__PURE__ */ s("div", { className: `nc-dialog-overlay${A ? " nc-fullscreen" : ""}`, onClick: C, children: /* @__PURE__ */ k(
|
|
817
817
|
"div",
|
|
818
818
|
{
|
|
819
|
-
ref:
|
|
820
|
-
className: `nc-dialog-container ${
|
|
819
|
+
ref: m,
|
|
820
|
+
className: `nc-dialog-container ${y}`,
|
|
821
821
|
style: o,
|
|
822
822
|
tabIndex: -1,
|
|
823
823
|
role: "dialog",
|
|
824
824
|
"aria-modal": "true",
|
|
825
825
|
"aria-labelledby": v ? void 0 : "nc-dialog-title",
|
|
826
826
|
children: [
|
|
827
|
-
!v && /* @__PURE__ */
|
|
827
|
+
!v && /* @__PURE__ */ k("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:
|
|
831
|
+
/* @__PURE__ */ s("div", { ref: f, className: "nc-dialog-content", children: r }),
|
|
832
832
|
T()
|
|
833
833
|
]
|
|
834
834
|
}
|
|
835
835
|
) }) });
|
|
836
|
-
return A ? Ae(
|
|
836
|
+
return A ? Ae(M, document.body) : M;
|
|
837
837
|
}
|
|
838
838
|
function Wt({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
|
|
839
839
|
const r = t === "small" ? 28 : 34;
|
|
@@ -892,7 +892,7 @@ function Ht({ visible: e, onClick: t, size: n = "default" }) {
|
|
|
892
892
|
}
|
|
893
893
|
);
|
|
894
894
|
}
|
|
895
|
-
function
|
|
895
|
+
function sr({
|
|
896
896
|
value: e,
|
|
897
897
|
defaultValue: t = "",
|
|
898
898
|
onChange: n,
|
|
@@ -902,27 +902,27 @@ function rr({
|
|
|
902
902
|
placeholder: a,
|
|
903
903
|
disabled: c,
|
|
904
904
|
label: l,
|
|
905
|
-
clearable:
|
|
906
|
-
type:
|
|
907
|
-
className:
|
|
908
|
-
size:
|
|
909
|
-
appearance:
|
|
905
|
+
clearable: d = !0,
|
|
906
|
+
type: h = "text",
|
|
907
|
+
className: w = "",
|
|
908
|
+
size: u = "default",
|
|
909
|
+
appearance: b = "default",
|
|
910
910
|
style: A,
|
|
911
911
|
leadingIcon: v,
|
|
912
|
-
showPasswordToggle:
|
|
913
|
-
multiline:
|
|
914
|
-
rows:
|
|
915
|
-
validator:
|
|
916
|
-
showErrorMessage:
|
|
912
|
+
showPasswordToggle: y = !1,
|
|
913
|
+
multiline: x = !1,
|
|
914
|
+
rows: m = 3,
|
|
915
|
+
validator: f,
|
|
916
|
+
showErrorMessage: p = !0
|
|
917
917
|
}) {
|
|
918
|
-
const
|
|
918
|
+
const g = F(null), C = F(null), T = F(!1), [M, S] = P(!1), [E, N] = P(!1), [I, L] = P(!1), H = e !== void 0, [ae, X] = P(t), K = H ? e : ae, [_, U] = P(K), j = f ? f(K) : null, z = !!j, q = !x && b === "plain", le = q && E, pe = le ? _ : K;
|
|
919
919
|
D(() => {
|
|
920
920
|
le || U(K);
|
|
921
921
|
}, [K, le]);
|
|
922
|
-
const ve =
|
|
923
|
-
let
|
|
924
|
-
we && de ?
|
|
925
|
-
const B = v ?
|
|
922
|
+
const ve = h === "password", de = ve && y && !c && !x, we = d && pe && !c && (E || I), ye = u === "small" ? 32 : 44;
|
|
923
|
+
let R = 12;
|
|
924
|
+
we && de ? R = ye * 2 : (we || de) && (R = ye);
|
|
925
|
+
const B = v ? u === "small" ? 28 : 34 : void 0, Y = () => {
|
|
926
926
|
if (!q)
|
|
927
927
|
return K;
|
|
928
928
|
const J = _ !== K;
|
|
@@ -930,19 +930,19 @@ function rr({
|
|
|
930
930
|
}, V = () => {
|
|
931
931
|
U(K);
|
|
932
932
|
}, ft = () => {
|
|
933
|
-
var J, Z,
|
|
933
|
+
var J, Z, Ye;
|
|
934
934
|
if (q) {
|
|
935
|
-
U(""), i == null || i(), (J =
|
|
935
|
+
U(""), i == null || i(), (J = g.current) == null || J.focus();
|
|
936
936
|
return;
|
|
937
937
|
}
|
|
938
|
-
H || X(""), n == null || n(""), i == null || i(),
|
|
938
|
+
H || X(""), n == null || n(""), i == null || i(), x ? (Z = C.current) == null || Z.focus() : (Ye = g.current) == null || Ye.focus();
|
|
939
939
|
}, He = (J) => {
|
|
940
940
|
if (q && J.key === "Escape") {
|
|
941
941
|
J.preventDefault(), T.current = !0, V(), J.currentTarget.blur();
|
|
942
942
|
return;
|
|
943
943
|
}
|
|
944
|
-
if (J.key === "Enter" && !
|
|
945
|
-
const Z = q ?
|
|
944
|
+
if (J.key === "Enter" && !x) {
|
|
945
|
+
const Z = q ? Y() : K;
|
|
946
946
|
q && (J.preventDefault(), T.current = !0, J.currentTarget.blur()), o == null || o(Z);
|
|
947
947
|
}
|
|
948
948
|
}, Ve = (J) => {
|
|
@@ -953,26 +953,26 @@ function rr({
|
|
|
953
953
|
}
|
|
954
954
|
H || X(Z), n == null || n(Z);
|
|
955
955
|
}, Oe = () => {
|
|
956
|
-
|
|
956
|
+
N(!0), q && U(K);
|
|
957
957
|
}, Fe = () => {
|
|
958
958
|
if (q && T.current) {
|
|
959
|
-
T.current = !1,
|
|
959
|
+
T.current = !1, N(!1);
|
|
960
960
|
return;
|
|
961
961
|
}
|
|
962
|
-
q &&
|
|
963
|
-
}, je = `nc-input ${
|
|
964
|
-
return /* @__PURE__ */
|
|
962
|
+
q && Y(), N(!1);
|
|
963
|
+
}, je = `nc-input ${u === "small" ? "nc-small " : ""}${!x && b === "plain" ? "nc-plain " : ""}${z ? "nc-error " : ""}${w}`;
|
|
964
|
+
return /* @__PURE__ */ k(
|
|
965
965
|
"div",
|
|
966
966
|
{
|
|
967
967
|
className: "nc-col",
|
|
968
968
|
style: { position: "relative", flex: 1, ...A },
|
|
969
|
-
onMouseEnter: () =>
|
|
970
|
-
onMouseLeave: () =>
|
|
969
|
+
onMouseEnter: () => L(!0),
|
|
970
|
+
onMouseLeave: () => L(!1),
|
|
971
971
|
children: [
|
|
972
972
|
l && /* @__PURE__ */ s("span", { className: "nc-label", children: l }),
|
|
973
|
-
/* @__PURE__ */
|
|
974
|
-
v && /* @__PURE__ */ s("span", { className: "nc-input-leading-icon", style: { height:
|
|
975
|
-
|
|
973
|
+
/* @__PURE__ */ k("div", { style: { position: "relative", display: "flex", alignItems: x ? "flex-start" : "center" }, children: [
|
|
974
|
+
v && /* @__PURE__ */ s("span", { className: "nc-input-leading-icon", style: { height: x ? void 0 : "100%", top: x ? 10 : void 0 }, children: v }),
|
|
975
|
+
x ? /* @__PURE__ */ s(
|
|
976
976
|
"textarea",
|
|
977
977
|
{
|
|
978
978
|
ref: C,
|
|
@@ -986,18 +986,18 @@ function rr({
|
|
|
986
986
|
readOnly: c,
|
|
987
987
|
"aria-disabled": c,
|
|
988
988
|
tabIndex: c ? -1 : void 0,
|
|
989
|
-
rows:
|
|
989
|
+
rows: m,
|
|
990
990
|
style: {
|
|
991
991
|
width: "100%",
|
|
992
|
-
paddingRight:
|
|
992
|
+
paddingRight: R,
|
|
993
993
|
...B !== void 0 ? { paddingLeft: B } : {}
|
|
994
994
|
}
|
|
995
995
|
}
|
|
996
996
|
) : /* @__PURE__ */ s(
|
|
997
997
|
"input",
|
|
998
998
|
{
|
|
999
|
-
ref:
|
|
1000
|
-
type: ve &&
|
|
999
|
+
ref: g,
|
|
1000
|
+
type: ve && M ? "text" : h,
|
|
1001
1001
|
className: je,
|
|
1002
1002
|
placeholder: a,
|
|
1003
1003
|
value: pe,
|
|
@@ -1010,20 +1010,20 @@ function rr({
|
|
|
1010
1010
|
tabIndex: c ? -1 : void 0,
|
|
1011
1011
|
style: {
|
|
1012
1012
|
width: "100%",
|
|
1013
|
-
paddingRight:
|
|
1013
|
+
paddingRight: R,
|
|
1014
1014
|
...B !== void 0 ? { paddingLeft: B } : {}
|
|
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: u, rightOffset: de ? ye + 4 : 4 }),
|
|
1019
|
+
de && /* @__PURE__ */ s(Ht, { visible: M, onClick: () => S(!M), size: u })
|
|
1020
1020
|
] }),
|
|
1021
|
-
z &&
|
|
1021
|
+
z && p && /* @__PURE__ */ s("span", { className: "nc-error-message", children: j })
|
|
1022
1022
|
]
|
|
1023
1023
|
}
|
|
1024
1024
|
);
|
|
1025
1025
|
}
|
|
1026
|
-
function
|
|
1026
|
+
function ir({
|
|
1027
1027
|
children: e,
|
|
1028
1028
|
onClick: t,
|
|
1029
1029
|
showBorder: n = !0,
|
|
@@ -1037,8 +1037,8 @@ function or({
|
|
|
1037
1037
|
onClick: (l) => {
|
|
1038
1038
|
if (t) {
|
|
1039
1039
|
if (r) {
|
|
1040
|
-
const
|
|
1041
|
-
if (
|
|
1040
|
+
const d = window.getSelection();
|
|
1041
|
+
if (d && d.toString().length > 0)
|
|
1042
1042
|
return;
|
|
1043
1043
|
}
|
|
1044
1044
|
t(l);
|
|
@@ -1058,9 +1058,9 @@ function or({
|
|
|
1058
1058
|
}
|
|
1059
1059
|
);
|
|
1060
1060
|
}
|
|
1061
|
-
function
|
|
1062
|
-
return /* @__PURE__ */
|
|
1063
|
-
(e || t) && /* @__PURE__ */
|
|
1061
|
+
function cr({ title: e, titleTools: t, children: n, style: r }) {
|
|
1062
|
+
return /* @__PURE__ */ k("div", { className: "nc-list-group", style: r, children: [
|
|
1063
|
+
(e || t) && /* @__PURE__ */ k("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
|
] }),
|
|
@@ -1073,57 +1073,57 @@ function sr({ title: e, titleTools: t, children: n, style: r }) {
|
|
|
1073
1073
|
)
|
|
1074
1074
|
] });
|
|
1075
1075
|
}
|
|
1076
|
-
function
|
|
1077
|
-
const [i, a] =
|
|
1076
|
+
function ar({ values: e, onChange: t, options: n, placeholder: r = "Select…", label: o }) {
|
|
1077
|
+
const [i, a] = P(!1), [c, l] = P(""), d = F(null), h = Ie(() => n.filter((u) => u.label.toLowerCase().includes(c.toLowerCase())), [n, c]);
|
|
1078
1078
|
D(() => {
|
|
1079
|
-
function
|
|
1080
|
-
!(
|
|
1079
|
+
function u(b) {
|
|
1080
|
+
!(b.target instanceof Node) || !d.current || d.current.contains(b.target) || a(!1);
|
|
1081
1081
|
}
|
|
1082
|
-
return document.addEventListener("mousedown",
|
|
1082
|
+
return document.addEventListener("mousedown", u), () => document.removeEventListener("mousedown", u);
|
|
1083
1083
|
}, []);
|
|
1084
|
-
const
|
|
1085
|
-
e.includes(
|
|
1084
|
+
const w = (u) => {
|
|
1085
|
+
e.includes(u) ? t(e.filter((b) => b !== u)) : t([...e, u]);
|
|
1086
1086
|
};
|
|
1087
|
-
return /* @__PURE__ */
|
|
1087
|
+
return /* @__PURE__ */ k("div", { ref: d, className: "nc-col", style: { position: "relative" }, children: [
|
|
1088
1088
|
o && /* @__PURE__ */ s("span", { className: "nc-label", children: o }),
|
|
1089
|
-
/* @__PURE__ */
|
|
1089
|
+
/* @__PURE__ */ k("div", { className: "nc-row", style: { flexWrap: "wrap", gap: 6, minHeight: 42, alignItems: "center", border: "1px solid var(--nc-button-border)", borderRadius: 8, background: "var(--nc-button-bg)", padding: "4px 8px" }, children: [
|
|
1090
1090
|
e.length === 0 && /* @__PURE__ */ s("span", { className: "nc-label", children: r }),
|
|
1091
|
-
e.map((
|
|
1092
|
-
const
|
|
1093
|
-
return
|
|
1094
|
-
|
|
1091
|
+
e.map((u) => {
|
|
1092
|
+
const b = n.find((A) => A.value === u);
|
|
1093
|
+
return b ? /* @__PURE__ */ k("span", { style: { padding: "4px 8px", borderRadius: 6, display: "inline-flex", alignItems: "center", gap: 4, background: "var(--nc-button-bg)", border: "1px solid var(--nc-button-border)" }, children: [
|
|
1094
|
+
b.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: () =>
|
|
1101
|
-
"aria-label": `Remove ${
|
|
1100
|
+
onClick: () => w(u),
|
|
1101
|
+
"aria-label": `Remove ${b.label}`,
|
|
1102
1102
|
children: "✕"
|
|
1103
1103
|
}
|
|
1104
1104
|
)
|
|
1105
|
-
] },
|
|
1105
|
+
] }, u) : 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: (u) => l(u.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__ */ k("div", { className: "nc-combo-dropdown", style: { position: "absolute", top: "100%", left: 0, right: 0, zIndex: 10, marginTop: 4, boxShadow: "0 4px 12px var(--nc-shadow)" }, children: [
|
|
1119
|
+
h.map((u) => {
|
|
1120
|
+
const b = e.includes(u.value);
|
|
1121
|
+
return /* @__PURE__ */ k("div", { className: "nc-section nc-row", style: { justifyContent: "space-between", cursor: "pointer", padding: 12 }, onMouseDown: () => w(u.value), children: [
|
|
1122
|
+
/* @__PURE__ */ s("span", { children: u.label }),
|
|
1123
|
+
/* @__PURE__ */ s("span", { children: b ? "✔️" : "" })
|
|
1124
|
+
] }, u.value);
|
|
1125
1125
|
}),
|
|
1126
|
-
|
|
1126
|
+
h.length === 0 && /* @__PURE__ */ s("div", { className: "nc-section nc-label", children: "No results" })
|
|
1127
1127
|
] })
|
|
1128
1128
|
] });
|
|
1129
1129
|
}
|
|
@@ -1147,7 +1147,7 @@ function Ne(e) {
|
|
|
1147
1147
|
}
|
|
1148
1148
|
return `${n}-${r}`;
|
|
1149
1149
|
}
|
|
1150
|
-
function
|
|
1150
|
+
function Ge(e) {
|
|
1151
1151
|
if (!e) return "";
|
|
1152
1152
|
const t = Ne(e);
|
|
1153
1153
|
if (!/^\d{4}-\d{2}$/.test(t)) return e;
|
|
@@ -1158,7 +1158,7 @@ function Ke() {
|
|
|
1158
1158
|
const e = /* @__PURE__ */ new Date(), t = e.getFullYear(), n = String(e.getMonth() + 1).padStart(2, "0");
|
|
1159
1159
|
return `${t}-${n}`;
|
|
1160
1160
|
}
|
|
1161
|
-
function
|
|
1161
|
+
function lr({
|
|
1162
1162
|
startMonth: e,
|
|
1163
1163
|
endMonth: t,
|
|
1164
1164
|
onChange: n,
|
|
@@ -1167,166 +1167,210 @@ function cr({
|
|
|
1167
1167
|
disabled: i = !1,
|
|
1168
1168
|
size: a = "default"
|
|
1169
1169
|
}) {
|
|
1170
|
-
const [c, l] =
|
|
1170
|
+
const [c, l] = P(!1), [d, h] = P(""), [w, u] = P(""), [b, A] = P({ top: 0, left: 0, width: 0, right: void 0 }), v = F(null), y = F(null);
|
|
1171
1171
|
D(() => {
|
|
1172
1172
|
if (c && v.current) {
|
|
1173
|
-
const
|
|
1174
|
-
window.innerWidth -
|
|
1175
|
-
top:
|
|
1173
|
+
const N = v.current.getBoundingClientRect(), L = Math.max(N.width, 400);
|
|
1174
|
+
window.innerWidth - N.left < L && N.right >= L ? A({
|
|
1175
|
+
top: N.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:
|
|
1178
|
+
right: window.innerWidth - N.right,
|
|
1179
|
+
width: L
|
|
1180
1180
|
}) : A({
|
|
1181
|
-
top:
|
|
1182
|
-
left:
|
|
1181
|
+
top: N.bottom + 4,
|
|
1182
|
+
left: N.left,
|
|
1183
1183
|
right: void 0,
|
|
1184
|
-
width:
|
|
1184
|
+
width: L
|
|
1185
1185
|
});
|
|
1186
1186
|
}
|
|
1187
1187
|
}, [c]), D(() => {
|
|
1188
1188
|
if (!c) return;
|
|
1189
|
-
const
|
|
1190
|
-
v.current && !v.current.contains(
|
|
1189
|
+
const N = (I) => {
|
|
1190
|
+
v.current && !v.current.contains(I.target) && y.current && !y.current.contains(I.target) && l(!1);
|
|
1191
1191
|
};
|
|
1192
|
-
return document.addEventListener("mousedown",
|
|
1192
|
+
return document.addEventListener("mousedown", N), () => document.removeEventListener("mousedown", N);
|
|
1193
1193
|
}, [c]);
|
|
1194
|
-
const
|
|
1195
|
-
|
|
1196
|
-
},
|
|
1194
|
+
const x = () => {
|
|
1195
|
+
h(e || Ke()), u(t || Ke()), l(!0);
|
|
1196
|
+
}, m = () => {
|
|
1197
1197
|
l(!1);
|
|
1198
|
-
},
|
|
1199
|
-
const
|
|
1200
|
-
if (
|
|
1198
|
+
}, f = () => {
|
|
1199
|
+
const N = Se(d), I = Se(w);
|
|
1200
|
+
if (N || I)
|
|
1201
1201
|
return;
|
|
1202
|
-
const
|
|
1203
|
-
|
|
1204
|
-
},
|
|
1202
|
+
const L = Ne(d), H = Ne(w);
|
|
1203
|
+
L && H && (n == null || n(L, H)), l(!1);
|
|
1204
|
+
}, p = e && t ? `${Ge(e)} - ${Ge(t)}` : "Select month range", g = Se(d), C = Se(w), T = Ne(d), M = Ne(w), S = T && M && T > M, E = c ? Ae(
|
|
1205
1205
|
/* @__PURE__ */ s(
|
|
1206
1206
|
"div",
|
|
1207
1207
|
{
|
|
1208
|
-
ref:
|
|
1208
|
+
ref: y,
|
|
1209
1209
|
className: "nc-month-range-picker-popup",
|
|
1210
1210
|
style: {
|
|
1211
1211
|
position: "fixed",
|
|
1212
|
-
top:
|
|
1213
|
-
...
|
|
1214
|
-
width:
|
|
1212
|
+
top: b.top,
|
|
1213
|
+
...b.right !== void 0 ? { right: b.right } : { left: b.left },
|
|
1214
|
+
width: b.width,
|
|
1215
1215
|
zIndex: 1e3
|
|
1216
1216
|
},
|
|
1217
|
-
children: /* @__PURE__ */
|
|
1218
|
-
/* @__PURE__ */
|
|
1219
|
-
/* @__PURE__ */
|
|
1217
|
+
children: /* @__PURE__ */ k("div", { className: "nc-month-range-picker-content", children: [
|
|
1218
|
+
/* @__PURE__ */ k("div", { className: "nc-month-range-picker-row", children: [
|
|
1219
|
+
/* @__PURE__ */ k("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 ${g ? "nc-error" : ""}`,
|
|
1226
|
+
value: d,
|
|
1227
|
+
onChange: (N) => h(N.target.value),
|
|
1228
1228
|
placeholder: "YY-M(M) or YYYY-M(M)"
|
|
1229
1229
|
}
|
|
1230
1230
|
),
|
|
1231
|
-
|
|
1231
|
+
g && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: g })
|
|
1232
1232
|
] }),
|
|
1233
|
-
/* @__PURE__ */
|
|
1233
|
+
/* @__PURE__ */ k("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",
|
|
1237
1237
|
{
|
|
1238
1238
|
type: "text",
|
|
1239
1239
|
className: `nc-month-input ${C ? "nc-error" : ""}`,
|
|
1240
|
-
value:
|
|
1241
|
-
onChange: (
|
|
1240
|
+
value: w,
|
|
1241
|
+
onChange: (N) => u(N.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 && !g && !C && /* @__PURE__ */ s("div", { className: "nc-month-range-error", children: "End month must be after or equal to start month" }),
|
|
1249
|
+
/* @__PURE__ */ k("div", { className: "nc-month-range-picker-footer", children: [
|
|
1250
1250
|
/* @__PURE__ */ s(
|
|
1251
1251
|
te,
|
|
1252
1252
|
{
|
|
1253
1253
|
variant: "primary",
|
|
1254
|
-
onClick:
|
|
1255
|
-
disabled: !
|
|
1254
|
+
onClick: f,
|
|
1255
|
+
disabled: !d || !w || !!g || !!C || !!S,
|
|
1256
1256
|
children: "Apply"
|
|
1257
1257
|
}
|
|
1258
1258
|
),
|
|
1259
|
-
/* @__PURE__ */ s(te, { variant: "ghost", onClick:
|
|
1259
|
+
/* @__PURE__ */ s(te, { variant: "ghost", onClick: m, children: "Cancel" })
|
|
1260
1260
|
] })
|
|
1261
1261
|
] })
|
|
1262
1262
|
}
|
|
1263
1263
|
),
|
|
1264
1264
|
document.body
|
|
1265
1265
|
) : null;
|
|
1266
|
-
return /* @__PURE__ */
|
|
1266
|
+
return /* @__PURE__ */ k("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
1271
|
ref: v,
|
|
1272
1272
|
className: `nc-month-range-picker-input${a === "small" ? " nc-small" : ""}`,
|
|
1273
|
-
onClick:
|
|
1273
|
+
onClick: x,
|
|
1274
1274
|
disabled: i,
|
|
1275
|
-
children:
|
|
1275
|
+
children: p
|
|
1276
1276
|
}
|
|
1277
1277
|
),
|
|
1278
|
-
|
|
1278
|
+
E
|
|
1279
1279
|
] });
|
|
1280
1280
|
}
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1281
|
+
const Vt = 5, Ot = 3;
|
|
1282
|
+
function dr({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disabled: a, size: c = "default" }) {
|
|
1283
|
+
const l = c === "small", d = F(null), h = F(!1), [w, u] = P(!1), b = () => {
|
|
1284
|
+
const p = e - o;
|
|
1285
|
+
n !== void 0 && p < n || t(parseFloat(p.toFixed(10)));
|
|
1286
|
+
}, A = () => {
|
|
1287
|
+
const p = e + o;
|
|
1288
|
+
r !== void 0 && p > r || t(parseFloat(p.toFixed(10)));
|
|
1289
|
+
}, v = (p) => {
|
|
1290
|
+
const g = parseFloat(p.target.value);
|
|
1291
|
+
isNaN(g) || n !== void 0 && g < n || r !== void 0 && g > r || t(g);
|
|
1292
|
+
}, y = (p) => {
|
|
1293
|
+
a || p.button !== 0 || (h.current = !1, d.current = {
|
|
1294
|
+
startY: p.clientY,
|
|
1295
|
+
startValue: e,
|
|
1296
|
+
pointerId: p.pointerId,
|
|
1297
|
+
hasMoved: !1,
|
|
1298
|
+
lastValue: e
|
|
1299
|
+
}, p.currentTarget.setPointerCapture(p.pointerId));
|
|
1300
|
+
}, x = (p) => {
|
|
1301
|
+
const g = d.current;
|
|
1302
|
+
if (!g || g.pointerId !== p.pointerId) return;
|
|
1303
|
+
const C = g.startY - p.clientY;
|
|
1304
|
+
if (Math.abs(C) >= Ot && (g.hasMoved = !0, h.current = !0, u(!0)), !g.hasMoved) return;
|
|
1305
|
+
const T = Math.trunc(C / Vt);
|
|
1306
|
+
let M = g.startValue + T * o;
|
|
1307
|
+
n !== void 0 && (M = Math.max(n, M)), r !== void 0 && (M = Math.min(r, M)), M = parseFloat(M.toFixed(10)), M !== g.lastValue && (g.lastValue = M, t(M));
|
|
1308
|
+
}, m = (p) => {
|
|
1309
|
+
const g = d.current;
|
|
1310
|
+
!g || g.pointerId !== p.pointerId || (p.currentTarget.hasPointerCapture(p.pointerId) && p.currentTarget.releasePointerCapture(p.pointerId), d.current = null, u(!1));
|
|
1311
|
+
}, f = (p) => (g) => {
|
|
1312
|
+
if (h.current) {
|
|
1313
|
+
h.current = !1, g.preventDefault();
|
|
1314
|
+
return;
|
|
1315
|
+
}
|
|
1316
|
+
p();
|
|
1288
1317
|
};
|
|
1289
|
-
return /* @__PURE__ */
|
|
1318
|
+
return /* @__PURE__ */ k("div", { className: `nc-col nc-number-input-col ${l ? "nc-small" : ""}`, children: [
|
|
1290
1319
|
i && /* @__PURE__ */ s("span", { className: `nc-label ${l ? "nc-small" : ""}`, children: i }),
|
|
1291
|
-
/* @__PURE__ */
|
|
1320
|
+
/* @__PURE__ */ k("div", { className: `nc-number-input-container ${l ? "nc-small" : ""}`, children: [
|
|
1292
1321
|
/* @__PURE__ */ s(
|
|
1293
1322
|
"input",
|
|
1294
1323
|
{
|
|
1295
1324
|
className: `nc-input nc-number-input ${l ? "nc-small" : ""}`,
|
|
1296
1325
|
type: "number",
|
|
1297
1326
|
value: e,
|
|
1298
|
-
onChange:
|
|
1299
|
-
const m = parseFloat(d.target.value);
|
|
1300
|
-
isNaN(m) || n !== void 0 && m < n || r !== void 0 && m > r || t(m);
|
|
1301
|
-
},
|
|
1327
|
+
onChange: v,
|
|
1302
1328
|
min: n,
|
|
1303
1329
|
max: r,
|
|
1304
1330
|
step: o,
|
|
1305
1331
|
disabled: a
|
|
1306
1332
|
}
|
|
1307
1333
|
),
|
|
1308
|
-
/* @__PURE__ */
|
|
1309
|
-
"
|
|
1310
|
-
{
|
|
1311
|
-
className: `nc-button nc-ghost nc-number-input-button ${l ? "nc-small" : ""}`,
|
|
1312
|
-
onClick: u,
|
|
1313
|
-
disabled: a || n !== void 0 && e <= n,
|
|
1314
|
-
children: "−"
|
|
1315
|
-
}
|
|
1316
|
-
),
|
|
1317
|
-
/* @__PURE__ */ s(
|
|
1318
|
-
"button",
|
|
1334
|
+
/* @__PURE__ */ k(
|
|
1335
|
+
"div",
|
|
1319
1336
|
{
|
|
1320
|
-
className: `nc-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1337
|
+
className: `nc-number-input-spinners ${l ? "nc-small" : ""} ${a ? "nc-disabled" : ""} ${w ? "nc-dragging" : ""}`,
|
|
1338
|
+
children: [
|
|
1339
|
+
/* @__PURE__ */ s(
|
|
1340
|
+
"button",
|
|
1341
|
+
{
|
|
1342
|
+
className: `nc-number-input-spin nc-number-input-spin-up ${l ? "nc-small" : ""}`,
|
|
1343
|
+
onClick: f(A),
|
|
1344
|
+
onPointerDown: y,
|
|
1345
|
+
onPointerMove: x,
|
|
1346
|
+
onPointerUp: m,
|
|
1347
|
+
onPointerCancel: m,
|
|
1348
|
+
disabled: a || r !== void 0 && e >= r,
|
|
1349
|
+
tabIndex: -1,
|
|
1350
|
+
children: "▲"
|
|
1351
|
+
}
|
|
1352
|
+
),
|
|
1353
|
+
/* @__PURE__ */ s(
|
|
1354
|
+
"button",
|
|
1355
|
+
{
|
|
1356
|
+
className: `nc-number-input-spin nc-number-input-spin-down ${l ? "nc-small" : ""}`,
|
|
1357
|
+
onClick: f(b),
|
|
1358
|
+
onPointerDown: y,
|
|
1359
|
+
onPointerMove: x,
|
|
1360
|
+
onPointerUp: m,
|
|
1361
|
+
onPointerCancel: m,
|
|
1362
|
+
disabled: a || n !== void 0 && e <= n,
|
|
1363
|
+
tabIndex: -1,
|
|
1364
|
+
children: "▼"
|
|
1365
|
+
}
|
|
1366
|
+
)
|
|
1367
|
+
]
|
|
1324
1368
|
}
|
|
1325
1369
|
)
|
|
1326
1370
|
] })
|
|
1327
1371
|
] });
|
|
1328
1372
|
}
|
|
1329
|
-
function
|
|
1373
|
+
function ur({
|
|
1330
1374
|
value: e,
|
|
1331
1375
|
onChange: t,
|
|
1332
1376
|
min: n = 0,
|
|
@@ -1335,30 +1379,30 @@ function lr({
|
|
|
1335
1379
|
label: i,
|
|
1336
1380
|
disabled: a,
|
|
1337
1381
|
showValue: c = !0,
|
|
1338
|
-
formatValue: l = (
|
|
1339
|
-
width:
|
|
1382
|
+
formatValue: l = (h) => h.toString(),
|
|
1383
|
+
width: d = 200
|
|
1340
1384
|
}) {
|
|
1341
|
-
const
|
|
1342
|
-
const
|
|
1343
|
-
t(
|
|
1344
|
-
},
|
|
1345
|
-
return /* @__PURE__ */
|
|
1385
|
+
const h = (u) => {
|
|
1386
|
+
const b = parseFloat(u.target.value);
|
|
1387
|
+
t(b);
|
|
1388
|
+
}, w = (e - n) / (r - n) * 100;
|
|
1389
|
+
return /* @__PURE__ */ k("div", { className: "nc-col", style: { gap: 6 }, children: [
|
|
1346
1390
|
i && /* @__PURE__ */ s("span", { className: "nc-label", children: i }),
|
|
1347
|
-
/* @__PURE__ */
|
|
1391
|
+
/* @__PURE__ */ k("div", { style: { display: "flex", gap: 12, alignItems: "center" }, children: [
|
|
1348
1392
|
/* @__PURE__ */ s(
|
|
1349
1393
|
"input",
|
|
1350
1394
|
{
|
|
1351
1395
|
type: "range",
|
|
1352
1396
|
className: "nc-slider",
|
|
1353
1397
|
value: e,
|
|
1354
|
-
onChange:
|
|
1398
|
+
onChange: h,
|
|
1355
1399
|
min: n,
|
|
1356
1400
|
max: r,
|
|
1357
1401
|
step: o,
|
|
1358
1402
|
disabled: a,
|
|
1359
1403
|
style: {
|
|
1360
|
-
width:
|
|
1361
|
-
"--nc-slider-percentage": `${
|
|
1404
|
+
width: d,
|
|
1405
|
+
"--nc-slider-percentage": `${w}%`
|
|
1362
1406
|
}
|
|
1363
1407
|
}
|
|
1364
1408
|
),
|
|
@@ -1378,13 +1422,13 @@ function lr({
|
|
|
1378
1422
|
] })
|
|
1379
1423
|
] });
|
|
1380
1424
|
}
|
|
1381
|
-
const
|
|
1382
|
-
function
|
|
1425
|
+
const Ft = ({ size: e = 24, className: t, style: n }) => /* @__PURE__ */ s("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", className: t, style: n, children: /* @__PURE__ */ s("polyline", { points: "18 15 12 9 6 15" }) });
|
|
1426
|
+
function jt({ children: e, className: t = "", style: n }) {
|
|
1383
1427
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panel ${t}`, style: n, children: e });
|
|
1384
1428
|
}
|
|
1385
|
-
function
|
|
1429
|
+
function pr({ active: e, children: t, keepMounted: n = !1, className: r = "", style: o }) {
|
|
1386
1430
|
const i = At.toArray(t).filter(
|
|
1387
|
-
(c) => St(c) && (c.type ===
|
|
1431
|
+
(c) => St(c) && (c.type === jt || c.type.displayName === "TabPanel")
|
|
1388
1432
|
);
|
|
1389
1433
|
if (n)
|
|
1390
1434
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: i.map((c) => {
|
|
@@ -1403,89 +1447,89 @@ function dr({ active: e, children: t, keepMounted: n = !1, className: r = "", st
|
|
|
1403
1447
|
const a = i.find((c) => c.props.tab === e);
|
|
1404
1448
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: a });
|
|
1405
1449
|
}
|
|
1406
|
-
function
|
|
1407
|
-
const
|
|
1450
|
+
function fr({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, className: i, toolbar: a, multiline: c, orientation: l = "horizontal", style: d }) {
|
|
1451
|
+
const h = F(null), [w, u] = P(!1), [b, A] = P(!1), v = l === "verticalLeft" || l === "verticalRight", y = F(!1), x = F(0), m = F(0), f = F(!1);
|
|
1408
1452
|
D(() => {
|
|
1409
1453
|
const S = () => {
|
|
1410
|
-
if (
|
|
1454
|
+
if (h.current)
|
|
1411
1455
|
if (v) {
|
|
1412
|
-
const { scrollTop:
|
|
1413
|
-
|
|
1456
|
+
const { scrollTop: N, scrollHeight: I, clientHeight: L } = h.current;
|
|
1457
|
+
u(N > 1), A(N < I - L - 1);
|
|
1414
1458
|
} else {
|
|
1415
|
-
const { scrollLeft:
|
|
1416
|
-
|
|
1459
|
+
const { scrollLeft: N, scrollWidth: I, clientWidth: L } = h.current;
|
|
1460
|
+
u(N > 1), A(N < I - L - 1);
|
|
1417
1461
|
}
|
|
1418
|
-
},
|
|
1419
|
-
if (
|
|
1420
|
-
return S(),
|
|
1421
|
-
|
|
1462
|
+
}, E = h.current;
|
|
1463
|
+
if (E)
|
|
1464
|
+
return S(), E.addEventListener("scroll", S), window.addEventListener("resize", S), () => {
|
|
1465
|
+
E.removeEventListener("scroll", S), window.removeEventListener("resize", S);
|
|
1422
1466
|
};
|
|
1423
1467
|
}, [e, v]);
|
|
1424
|
-
const
|
|
1425
|
-
|
|
1426
|
-
},
|
|
1427
|
-
if (!
|
|
1428
|
-
const
|
|
1429
|
-
Math.abs(
|
|
1468
|
+
const p = (S) => {
|
|
1469
|
+
h.current && (y.current = !0, f.current = !1, x.current = v ? S.clientY : S.clientX, m.current = v ? h.current.scrollTop : h.current.scrollLeft, h.current.style.cursor = "grabbing", h.current.style.userSelect = "none");
|
|
1470
|
+
}, g = (S) => {
|
|
1471
|
+
if (!y.current || !h.current) return;
|
|
1472
|
+
const E = v ? S.clientY : S.clientX, N = x.current - E;
|
|
1473
|
+
Math.abs(N) > 3 && (f.current = !0), v ? h.current.scrollTop = m.current + N : h.current.scrollLeft = m.current + N;
|
|
1430
1474
|
}, C = () => {
|
|
1431
|
-
|
|
1475
|
+
h.current && (y.current = !1, h.current.style.cursor = "", h.current.style.userSelect = "");
|
|
1432
1476
|
}, T = () => {
|
|
1433
1477
|
C();
|
|
1434
1478
|
};
|
|
1435
1479
|
D(() => {
|
|
1436
|
-
const S =
|
|
1480
|
+
const S = h.current;
|
|
1437
1481
|
if (!S || v) return;
|
|
1438
|
-
const
|
|
1439
|
-
|
|
1482
|
+
const E = (N) => {
|
|
1483
|
+
N.deltaY !== 0 && (N.preventDefault(), S.scrollLeft += N.deltaY * 0.3);
|
|
1440
1484
|
};
|
|
1441
|
-
return S.addEventListener("wheel",
|
|
1442
|
-
S.removeEventListener("wheel",
|
|
1485
|
+
return S.addEventListener("wheel", E, { passive: !1 }), () => {
|
|
1486
|
+
S.removeEventListener("wheel", E);
|
|
1443
1487
|
};
|
|
1444
1488
|
}, [v]);
|
|
1445
|
-
const
|
|
1446
|
-
|
|
1489
|
+
const M = (S) => {
|
|
1490
|
+
f.current || n(S);
|
|
1447
1491
|
};
|
|
1448
|
-
return /* @__PURE__ */
|
|
1449
|
-
/* @__PURE__ */
|
|
1450
|
-
|
|
1492
|
+
return /* @__PURE__ */ k("div", { className: `nc-tab-container ${v ? `nc-vertical nc-${l}` : ""} ${i || ""}`, style: d, children: [
|
|
1493
|
+
/* @__PURE__ */ k("div", { className: "nc-tab-scroll-wrapper", children: [
|
|
1494
|
+
w && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${v ? "nc-top" : "nc-left"}`, children: v ? /* @__PURE__ */ s(Ft, { size: 16 }) : /* @__PURE__ */ s(xt, { size: 16 }) }),
|
|
1451
1495
|
/* @__PURE__ */ s(
|
|
1452
1496
|
"div",
|
|
1453
1497
|
{
|
|
1454
|
-
ref:
|
|
1498
|
+
ref: h,
|
|
1455
1499
|
className: `nc-tab-scroll ${c ? "nc-multiline" : ""}`,
|
|
1456
|
-
onMouseDown:
|
|
1457
|
-
onMouseMove:
|
|
1500
|
+
onMouseDown: p,
|
|
1501
|
+
onMouseMove: g,
|
|
1458
1502
|
onMouseUp: C,
|
|
1459
1503
|
onMouseLeave: T,
|
|
1460
1504
|
style: { cursor: "grab" },
|
|
1461
1505
|
children: e.map((S) => {
|
|
1462
|
-
const
|
|
1463
|
-
return /* @__PURE__ */
|
|
1506
|
+
const E = typeof S == "string" ? S : S.id, N = typeof S == "string" ? S : S.label, I = r && !(o != null && o.includes(E));
|
|
1507
|
+
return /* @__PURE__ */ k(
|
|
1464
1508
|
"div",
|
|
1465
1509
|
{
|
|
1466
|
-
className: `nc-tab-item ${t ===
|
|
1467
|
-
onClick: () => E
|
|
1510
|
+
className: `nc-tab-item ${t === E ? "nc-active" : ""} ${I ? "nc-closable" : ""}`,
|
|
1511
|
+
onClick: () => M(E),
|
|
1468
1512
|
role: "button",
|
|
1469
1513
|
tabIndex: 0,
|
|
1470
|
-
onKeyDown: (
|
|
1471
|
-
(
|
|
1514
|
+
onKeyDown: (L) => {
|
|
1515
|
+
(L.key === "Enter" || L.key === " ") && n(E);
|
|
1472
1516
|
},
|
|
1473
1517
|
children: [
|
|
1474
|
-
/* @__PURE__ */ s("span", { className: "nc-tab-label", children: v ?
|
|
1475
|
-
|
|
1518
|
+
/* @__PURE__ */ s("span", { className: "nc-tab-label", children: v ? N : typeof N == "string" ? N.toUpperCase() : N }),
|
|
1519
|
+
I && /* @__PURE__ */ s(
|
|
1476
1520
|
"span",
|
|
1477
1521
|
{
|
|
1478
1522
|
className: "nc-tab-close",
|
|
1479
1523
|
role: "button",
|
|
1480
1524
|
tabIndex: 0,
|
|
1481
|
-
"aria-label": `Close ${typeof
|
|
1482
|
-
onClick: (
|
|
1483
|
-
|
|
1525
|
+
"aria-label": `Close ${typeof N == "string" ? N : E}`,
|
|
1526
|
+
onClick: (L) => {
|
|
1527
|
+
L.stopPropagation(), r(E);
|
|
1484
1528
|
},
|
|
1485
|
-
onKeyDown: (
|
|
1486
|
-
(
|
|
1529
|
+
onKeyDown: (L) => {
|
|
1530
|
+
(L.key === "Enter" || L.key === " ") && (L.stopPropagation(), r(E));
|
|
1487
1531
|
},
|
|
1488
|
-
children: /* @__PURE__ */
|
|
1532
|
+
children: /* @__PURE__ */ k("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1489
1533
|
/* @__PURE__ */ s("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1490
1534
|
/* @__PURE__ */ s("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
1491
1535
|
] })
|
|
@@ -1493,18 +1537,18 @@ function ur({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, cla
|
|
|
1493
1537
|
)
|
|
1494
1538
|
]
|
|
1495
1539
|
},
|
|
1496
|
-
|
|
1540
|
+
E
|
|
1497
1541
|
);
|
|
1498
1542
|
})
|
|
1499
1543
|
}
|
|
1500
1544
|
),
|
|
1501
|
-
|
|
1545
|
+
b && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${v ? "nc-bottom" : "nc-right"}`, children: v ? /* @__PURE__ */ s(kt, { size: 16 }) : /* @__PURE__ */ s(Nt, { size: 16 }) })
|
|
1502
1546
|
] }),
|
|
1503
1547
|
a && /* @__PURE__ */ s("div", { className: "nc-tab-toolbar", children: a })
|
|
1504
1548
|
] });
|
|
1505
1549
|
}
|
|
1506
|
-
function
|
|
1507
|
-
return /* @__PURE__ */
|
|
1550
|
+
function hr({ checked: e, onChange: t, disabled: n, label: r }) {
|
|
1551
|
+
return /* @__PURE__ */ k(
|
|
1508
1552
|
"label",
|
|
1509
1553
|
{
|
|
1510
1554
|
className: "nc-row",
|
|
@@ -1567,24 +1611,24 @@ const _e = [
|
|
|
1567
1611
|
"var(--nc-csv-col-8)",
|
|
1568
1612
|
"var(--nc-csv-col-9)"
|
|
1569
1613
|
];
|
|
1570
|
-
function
|
|
1614
|
+
function Yt(e, t) {
|
|
1571
1615
|
const r = e.slice(0, t).split(`
|
|
1572
1616
|
`), o = r.length, a = r[o - 1].split(" "), c = a.length, l = a[c - 1].length + 1;
|
|
1573
1617
|
return { line: o, column: c, character: l, offset: t };
|
|
1574
1618
|
}
|
|
1575
|
-
function
|
|
1619
|
+
function Gt(e, t, n, r) {
|
|
1576
1620
|
const o = e.split(`
|
|
1577
1621
|
`), i = Math.max(1, Math.min(t, o.length));
|
|
1578
1622
|
let a = 0;
|
|
1579
|
-
for (let
|
|
1580
|
-
a += o[
|
|
1581
|
-
const l = o[i - 1].split(" "),
|
|
1582
|
-
for (let
|
|
1583
|
-
a += l[
|
|
1584
|
-
const
|
|
1585
|
-
return a +=
|
|
1623
|
+
for (let w = 0; w < i - 1; w++)
|
|
1624
|
+
a += o[w].length + 1;
|
|
1625
|
+
const l = o[i - 1].split(" "), d = Math.max(1, Math.min(n, l.length));
|
|
1626
|
+
for (let w = 0; w < d - 1; w++)
|
|
1627
|
+
a += l[w].length + 1;
|
|
1628
|
+
const h = Math.max(1, Math.min(r, l[d - 1].length + 1));
|
|
1629
|
+
return a += h - 1, a;
|
|
1586
1630
|
}
|
|
1587
|
-
function
|
|
1631
|
+
function Kt(e, t) {
|
|
1588
1632
|
const n = e.split(`
|
|
1589
1633
|
`), r = Math.max(1, Math.min(t, n.length));
|
|
1590
1634
|
let o = 0;
|
|
@@ -1592,79 +1636,79 @@ function Gt(e, t) {
|
|
|
1592
1636
|
o += n[i].length + 1;
|
|
1593
1637
|
return o;
|
|
1594
1638
|
}
|
|
1595
|
-
const
|
|
1596
|
-
function({ value: t, onChange: n, placeholder: r, className: o, style: i, showLineNumbers: a = !1, onCursorChange: c, highlightLine: l },
|
|
1597
|
-
const
|
|
1598
|
-
|
|
1599
|
-
goToLine(
|
|
1600
|
-
const
|
|
1601
|
-
if (!
|
|
1602
|
-
const
|
|
1603
|
-
|
|
1604
|
-
const
|
|
1605
|
-
|
|
1639
|
+
const mr = Ct(
|
|
1640
|
+
function({ value: t, onChange: n, placeholder: r, className: o, style: i, showLineNumbers: a = !1, onCursorChange: c, highlightLine: l }, d) {
|
|
1641
|
+
const h = F(null), w = F(null), u = F(null);
|
|
1642
|
+
Mt(d, () => ({
|
|
1643
|
+
goToLine(m) {
|
|
1644
|
+
const f = h.current;
|
|
1645
|
+
if (!f) return;
|
|
1646
|
+
const p = Kt(t, m);
|
|
1647
|
+
f.focus(), f.setSelectionRange(p, p);
|
|
1648
|
+
const g = parseFloat(getComputedStyle(f).lineHeight) || 18;
|
|
1649
|
+
f.scrollTop = (Math.max(1, m) - 1) * g, A(), b();
|
|
1606
1650
|
},
|
|
1607
|
-
goToPosition(
|
|
1608
|
-
const
|
|
1609
|
-
if (!
|
|
1610
|
-
const C =
|
|
1611
|
-
|
|
1612
|
-
const T = parseFloat(getComputedStyle(
|
|
1613
|
-
|
|
1651
|
+
goToPosition(m, f, p) {
|
|
1652
|
+
const g = h.current;
|
|
1653
|
+
if (!g) return;
|
|
1654
|
+
const C = Gt(t, m, f, p);
|
|
1655
|
+
g.focus(), g.setSelectionRange(C, C);
|
|
1656
|
+
const T = parseFloat(getComputedStyle(g).lineHeight) || 18;
|
|
1657
|
+
g.scrollTop = (Math.max(1, m) - 1) * T, A(), b();
|
|
1614
1658
|
}
|
|
1615
1659
|
}), [t]);
|
|
1616
|
-
const
|
|
1617
|
-
if (!c || !
|
|
1618
|
-
const
|
|
1619
|
-
c(
|
|
1620
|
-
}, [c, t]), A =
|
|
1621
|
-
const
|
|
1622
|
-
|
|
1660
|
+
const b = G(() => {
|
|
1661
|
+
if (!c || !h.current) return;
|
|
1662
|
+
const m = Yt(t, h.current.selectionStart);
|
|
1663
|
+
c(m);
|
|
1664
|
+
}, [c, t]), A = G(() => {
|
|
1665
|
+
const m = h.current;
|
|
1666
|
+
m && (w.current && (w.current.scrollTop = m.scrollTop, w.current.scrollLeft = m.scrollLeft), u.current && (u.current.scrollTop = m.scrollTop));
|
|
1623
1667
|
}, []);
|
|
1624
1668
|
D(() => {
|
|
1625
1669
|
if (l == null || l < 1) return;
|
|
1626
|
-
const
|
|
1627
|
-
if (!
|
|
1628
|
-
const
|
|
1629
|
-
(
|
|
1670
|
+
const m = h.current;
|
|
1671
|
+
if (!m) return;
|
|
1672
|
+
const f = parseFloat(getComputedStyle(m).lineHeight) || 18, p = (l - 1) * f, g = p + f;
|
|
1673
|
+
(p < m.scrollTop || g > m.scrollTop + m.clientHeight) && (m.scrollTop = p - m.clientHeight / 2 + f / 2), A();
|
|
1630
1674
|
}, [l]);
|
|
1631
|
-
const v =
|
|
1632
|
-
`).length, [t]),
|
|
1633
|
-
const
|
|
1634
|
-
for (let
|
|
1635
|
-
|
|
1636
|
-
/* @__PURE__ */ s("div", { className: `nc-csv-line-number ${l ===
|
|
1675
|
+
const v = Ie(() => t.split(`
|
|
1676
|
+
`).length, [t]), y = () => {
|
|
1677
|
+
const m = [];
|
|
1678
|
+
for (let f = 1; f <= v; f++)
|
|
1679
|
+
m.push(
|
|
1680
|
+
/* @__PURE__ */ s("div", { className: `nc-csv-line-number ${l === f ? "nc-csv-highlight" : ""}`, children: f }, f)
|
|
1637
1681
|
);
|
|
1638
|
-
return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref:
|
|
1639
|
-
},
|
|
1640
|
-
`).map((
|
|
1641
|
-
const C =
|
|
1642
|
-
return /* @__PURE__ */
|
|
1643
|
-
C.map((T,
|
|
1644
|
-
|
|
1645
|
-
/* @__PURE__ */ s("span", { style: { color: _e[
|
|
1646
|
-
] },
|
|
1647
|
-
|
|
1682
|
+
return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref: u, children: m });
|
|
1683
|
+
}, x = (m) => m ? m.split(`
|
|
1684
|
+
`).map((p, g) => {
|
|
1685
|
+
const C = p.split(" ");
|
|
1686
|
+
return /* @__PURE__ */ k("div", { className: `nc-csv-line ${l === g + 1 ? "nc-csv-highlight" : ""}`, children: [
|
|
1687
|
+
C.map((T, M) => /* @__PURE__ */ k("span", { children: [
|
|
1688
|
+
M > 0 && /* @__PURE__ */ s("span", { className: "nc-csv-tab-char", children: " " }),
|
|
1689
|
+
/* @__PURE__ */ s("span", { style: { color: _e[M % _e.length] }, children: T })
|
|
1690
|
+
] }, M)),
|
|
1691
|
+
p === "" && `
|
|
1648
1692
|
`
|
|
1649
|
-
] },
|
|
1693
|
+
] }, g);
|
|
1650
1694
|
}) : null;
|
|
1651
|
-
return /* @__PURE__ */
|
|
1652
|
-
a &&
|
|
1653
|
-
/* @__PURE__ */
|
|
1654
|
-
/* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref:
|
|
1695
|
+
return /* @__PURE__ */ k("div", { className: `nc-csv-textarea-container ${a ? "nc-csv-with-gutter" : ""} ${o ?? ""}`, style: i, children: [
|
|
1696
|
+
a && y(),
|
|
1697
|
+
/* @__PURE__ */ k("div", { className: "nc-csv-textarea-editor", children: [
|
|
1698
|
+
/* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref: w, children: /* @__PURE__ */ s("pre", { className: "nc-csv-textarea-highlights", children: x(t) }) }),
|
|
1655
1699
|
/* @__PURE__ */ s(
|
|
1656
1700
|
"textarea",
|
|
1657
1701
|
{
|
|
1658
|
-
ref:
|
|
1702
|
+
ref: h,
|
|
1659
1703
|
className: "nc-csv-textarea-input",
|
|
1660
1704
|
value: t,
|
|
1661
|
-
onChange: (
|
|
1662
|
-
n(
|
|
1705
|
+
onChange: (m) => {
|
|
1706
|
+
n(m.target.value), requestAnimationFrame(b);
|
|
1663
1707
|
},
|
|
1664
1708
|
onScroll: A,
|
|
1665
|
-
onSelect:
|
|
1666
|
-
onKeyUp:
|
|
1667
|
-
onClick:
|
|
1709
|
+
onSelect: b,
|
|
1710
|
+
onKeyUp: b,
|
|
1711
|
+
onClick: b,
|
|
1668
1712
|
placeholder: r,
|
|
1669
1713
|
spellCheck: !1,
|
|
1670
1714
|
autoComplete: "off",
|
|
@@ -1685,7 +1729,7 @@ function Te() {
|
|
|
1685
1729
|
} catch {
|
|
1686
1730
|
}
|
|
1687
1731
|
}
|
|
1688
|
-
function
|
|
1732
|
+
function _t(e) {
|
|
1689
1733
|
Re.add(e);
|
|
1690
1734
|
try {
|
|
1691
1735
|
e(ue.notifications.slice());
|
|
@@ -1695,7 +1739,7 @@ function Yt(e) {
|
|
|
1695
1739
|
Re.delete(e);
|
|
1696
1740
|
};
|
|
1697
1741
|
}
|
|
1698
|
-
function
|
|
1742
|
+
function Ut(e) {
|
|
1699
1743
|
const t = `notification-${Date.now()}-${Math.random()}`, { duration: n, type: r, ...o } = e, i = {
|
|
1700
1744
|
id: t,
|
|
1701
1745
|
dismissible: !0,
|
|
@@ -1716,7 +1760,7 @@ function tt(e) {
|
|
|
1716
1760
|
}, 300);
|
|
1717
1761
|
Ue.set(e, n);
|
|
1718
1762
|
}
|
|
1719
|
-
function
|
|
1763
|
+
function qt({ type: e }) {
|
|
1720
1764
|
switch (e) {
|
|
1721
1765
|
case "success":
|
|
1722
1766
|
return /* @__PURE__ */ s("svg", { viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ s(
|
|
@@ -1730,13 +1774,13 @@ function _t({ type: e }) {
|
|
|
1730
1774
|
}
|
|
1731
1775
|
) });
|
|
1732
1776
|
case "danger":
|
|
1733
|
-
return /* @__PURE__ */
|
|
1777
|
+
return /* @__PURE__ */ k("svg", { viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
1734
1778
|
/* @__PURE__ */ s("circle", { cx: "10", cy: "10", r: "7", stroke: "currentColor", strokeWidth: "2" }),
|
|
1735
1779
|
/* @__PURE__ */ s("path", { d: "M10 6.5v4.25", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }),
|
|
1736
1780
|
/* @__PURE__ */ s("circle", { cx: "10", cy: "13.75", r: "1", fill: "currentColor" })
|
|
1737
1781
|
] });
|
|
1738
1782
|
case "warning":
|
|
1739
|
-
return /* @__PURE__ */
|
|
1783
|
+
return /* @__PURE__ */ k("svg", { viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
1740
1784
|
/* @__PURE__ */ s(
|
|
1741
1785
|
"path",
|
|
1742
1786
|
{
|
|
@@ -1750,14 +1794,14 @@ function _t({ type: e }) {
|
|
|
1750
1794
|
/* @__PURE__ */ s("circle", { cx: "10", cy: "13.25", r: "1", fill: "currentColor" })
|
|
1751
1795
|
] });
|
|
1752
1796
|
default:
|
|
1753
|
-
return /* @__PURE__ */
|
|
1797
|
+
return /* @__PURE__ */ k("svg", { viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
1754
1798
|
/* @__PURE__ */ s("circle", { cx: "10", cy: "10", r: "7", stroke: "currentColor", strokeWidth: "2" }),
|
|
1755
1799
|
/* @__PURE__ */ s("path", { d: "M10 9v4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }),
|
|
1756
1800
|
/* @__PURE__ */ s("circle", { cx: "10", cy: "6.5", r: "1", fill: "currentColor" })
|
|
1757
1801
|
] });
|
|
1758
1802
|
}
|
|
1759
1803
|
}
|
|
1760
|
-
function
|
|
1804
|
+
function Xt({ notification: e }) {
|
|
1761
1805
|
const { t } = re(), n = e.type || "info", r = () => {
|
|
1762
1806
|
if (e.title) return e.title;
|
|
1763
1807
|
switch (n) {
|
|
@@ -1777,9 +1821,9 @@ function Ut({ notification: e }) {
|
|
|
1777
1821
|
"div",
|
|
1778
1822
|
{
|
|
1779
1823
|
className: `nc-notification nc-notification-${n}`,
|
|
1780
|
-
children: /* @__PURE__ */
|
|
1781
|
-
/* @__PURE__ */ s("div", { className: `nc-notification-icon nc-notification-icon-${n}`, children: /* @__PURE__ */ s(
|
|
1782
|
-
/* @__PURE__ */
|
|
1824
|
+
children: /* @__PURE__ */ k("div", { className: "nc-notification-content", children: [
|
|
1825
|
+
/* @__PURE__ */ s("div", { className: `nc-notification-icon nc-notification-icon-${n}`, children: /* @__PURE__ */ s(qt, { type: n }) }),
|
|
1826
|
+
/* @__PURE__ */ k("div", { className: "nc-notification-body", children: [
|
|
1783
1827
|
/* @__PURE__ */ s("div", { className: "nc-notification-title", children: r() }),
|
|
1784
1828
|
/* @__PURE__ */ s("div", { className: "nc-notification-message", children: e.message })
|
|
1785
1829
|
] }),
|
|
@@ -1789,31 +1833,31 @@ function Ut({ notification: e }) {
|
|
|
1789
1833
|
className: "nc-notification-dismiss",
|
|
1790
1834
|
onClick: o,
|
|
1791
1835
|
"aria-label": t("common.close"),
|
|
1792
|
-
children: /* @__PURE__ */ s(
|
|
1836
|
+
children: /* @__PURE__ */ s(Le, { size: 16 })
|
|
1793
1837
|
}
|
|
1794
1838
|
)
|
|
1795
1839
|
] })
|
|
1796
1840
|
}
|
|
1797
1841
|
);
|
|
1798
1842
|
}
|
|
1799
|
-
function
|
|
1800
|
-
const [e, t] =
|
|
1801
|
-
return D(() =>
|
|
1802
|
-
const
|
|
1803
|
-
|
|
1843
|
+
function gr() {
|
|
1844
|
+
const [e, t] = P([]), [n, r] = P(/* @__PURE__ */ new Map()), [o, i] = P(/* @__PURE__ */ new Set()), a = F(null), c = F([]);
|
|
1845
|
+
return D(() => _t((d) => {
|
|
1846
|
+
const h = new Set(c.current.map((u) => u.id)), w = d.filter((u) => !h.has(u.id)).map((u) => u.id);
|
|
1847
|
+
w.length > 0 ? (t(d), i(new Set(w)), requestAnimationFrame(() => {
|
|
1804
1848
|
requestAnimationFrame(() => {
|
|
1805
1849
|
i(/* @__PURE__ */ new Set());
|
|
1806
1850
|
});
|
|
1807
|
-
})) : t(
|
|
1851
|
+
})) : t(d), c.current = d;
|
|
1808
1852
|
}), []), D(() => {
|
|
1809
1853
|
if (!a.current) return;
|
|
1810
1854
|
const l = /* @__PURE__ */ new Map();
|
|
1811
|
-
let
|
|
1812
|
-
const
|
|
1813
|
-
e.forEach((
|
|
1814
|
-
if (l.set(
|
|
1815
|
-
const
|
|
1816
|
-
|
|
1855
|
+
let d = 0;
|
|
1856
|
+
const h = a.current.children;
|
|
1857
|
+
e.forEach((w, u) => {
|
|
1858
|
+
if (l.set(w.id, d), h[u]) {
|
|
1859
|
+
const b = h[u].offsetHeight;
|
|
1860
|
+
w.isRemoving || (d += b + 12);
|
|
1817
1861
|
}
|
|
1818
1862
|
}), r(l);
|
|
1819
1863
|
}, [e]), /* @__PURE__ */ s(
|
|
@@ -1837,7 +1881,7 @@ function hr() {
|
|
|
1837
1881
|
width: "100%"
|
|
1838
1882
|
},
|
|
1839
1883
|
children: e.map((l) => {
|
|
1840
|
-
const
|
|
1884
|
+
const d = o.has(l.id), h = l.isRemoving, w = n.get(l.id) || 0;
|
|
1841
1885
|
return /* @__PURE__ */ s(
|
|
1842
1886
|
"div",
|
|
1843
1887
|
{
|
|
@@ -1845,13 +1889,13 @@ function hr() {
|
|
|
1845
1889
|
position: "absolute",
|
|
1846
1890
|
top: 0,
|
|
1847
1891
|
left: 0,
|
|
1848
|
-
transform:
|
|
1892
|
+
transform: d ? `translate3d(-40px, ${w}px, 0)` : `translate3d(0, ${w}px, 0)`,
|
|
1849
1893
|
// Only animate transform when not leaving, animate opacity always
|
|
1850
|
-
transition:
|
|
1851
|
-
opacity:
|
|
1894
|
+
transition: h ? "opacity 300ms ease-out" : "transform 300ms ease-out, opacity 300ms ease-out",
|
|
1895
|
+
opacity: h ? 0 : 1,
|
|
1852
1896
|
width: "100%"
|
|
1853
1897
|
},
|
|
1854
|
-
children: /* @__PURE__ */ s(
|
|
1898
|
+
children: /* @__PURE__ */ s(Xt, { notification: l })
|
|
1855
1899
|
},
|
|
1856
1900
|
l.id
|
|
1857
1901
|
);
|
|
@@ -1861,14 +1905,14 @@ function hr() {
|
|
|
1861
1905
|
}
|
|
1862
1906
|
);
|
|
1863
1907
|
}
|
|
1864
|
-
function
|
|
1865
|
-
return
|
|
1908
|
+
function Jt(e) {
|
|
1909
|
+
return Ut(e);
|
|
1866
1910
|
}
|
|
1867
|
-
const
|
|
1868
|
-
show: (e) =>
|
|
1911
|
+
const br = {
|
|
1912
|
+
show: (e) => Jt(e)
|
|
1869
1913
|
};
|
|
1870
|
-
function
|
|
1871
|
-
const t =
|
|
1914
|
+
function vr(e) {
|
|
1915
|
+
const t = $t.createInstance(), n = {};
|
|
1872
1916
|
for (const o in e)
|
|
1873
1917
|
n[o] = { translation: e[o] };
|
|
1874
1918
|
const r = typeof document < "u" && document.documentElement.lang || "en";
|
|
@@ -1888,7 +1932,7 @@ function gr(e) {
|
|
|
1888
1932
|
}
|
|
1889
1933
|
}).observe(document.documentElement, { attributes: !0 }), t;
|
|
1890
1934
|
}
|
|
1891
|
-
class
|
|
1935
|
+
class Qt {
|
|
1892
1936
|
constructor() {
|
|
1893
1937
|
oe(this, "apps", /* @__PURE__ */ new Map());
|
|
1894
1938
|
}
|
|
@@ -1928,8 +1972,8 @@ class Xt {
|
|
|
1928
1972
|
return this.apps.has(t);
|
|
1929
1973
|
}
|
|
1930
1974
|
}
|
|
1931
|
-
const me = new
|
|
1932
|
-
class
|
|
1975
|
+
const me = new Qt(), qe = "nc-ui-app-state";
|
|
1976
|
+
class Zt {
|
|
1933
1977
|
constructor() {
|
|
1934
1978
|
oe(this, "state");
|
|
1935
1979
|
oe(this, "listeners", /* @__PURE__ */ new Map());
|
|
@@ -1976,8 +2020,8 @@ class Jt {
|
|
|
1976
2020
|
(r = this.listeners.get(t)) == null || r.forEach((o) => o(n));
|
|
1977
2021
|
}
|
|
1978
2022
|
}
|
|
1979
|
-
const ne = new
|
|
1980
|
-
class
|
|
2023
|
+
const ne = new Zt();
|
|
2024
|
+
class en {
|
|
1981
2025
|
constructor() {
|
|
1982
2026
|
oe(this, "apps", []);
|
|
1983
2027
|
oe(this, "activeAppId", null);
|
|
@@ -2096,15 +2140,15 @@ class Qt {
|
|
|
2096
2140
|
this.listeners.forEach((t) => t());
|
|
2097
2141
|
}
|
|
2098
2142
|
}
|
|
2099
|
-
const Q = new
|
|
2100
|
-
function
|
|
2143
|
+
const Q = new en(), nt = ge(null);
|
|
2144
|
+
function tn() {
|
|
2101
2145
|
const e = ce(nt);
|
|
2102
2146
|
if (!e)
|
|
2103
2147
|
throw new Error("useApp must be used inside an App");
|
|
2104
2148
|
return e;
|
|
2105
2149
|
}
|
|
2106
|
-
function
|
|
2107
|
-
return /* @__PURE__ */
|
|
2150
|
+
function nn({ size: e = 16 }) {
|
|
2151
|
+
return /* @__PURE__ */ k(
|
|
2108
2152
|
"svg",
|
|
2109
2153
|
{
|
|
2110
2154
|
width: e,
|
|
@@ -2122,9 +2166,9 @@ function en({ size: e = 16 }) {
|
|
|
2122
2166
|
}
|
|
2123
2167
|
);
|
|
2124
2168
|
}
|
|
2125
|
-
function
|
|
2126
|
-
return /* @__PURE__ */
|
|
2127
|
-
/* @__PURE__ */
|
|
2169
|
+
function rn({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o }) {
|
|
2170
|
+
return /* @__PURE__ */ k("div", { className: "nc-app-title-bar", children: [
|
|
2171
|
+
/* @__PURE__ */ k("div", { className: "nc-app-title-bar-left", children: [
|
|
2128
2172
|
n && !o && /* @__PURE__ */ s(
|
|
2129
2173
|
"button",
|
|
2130
2174
|
{
|
|
@@ -2132,18 +2176,18 @@ function tn({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o })
|
|
|
2132
2176
|
onClick: n,
|
|
2133
2177
|
title: "Back",
|
|
2134
2178
|
"aria-label": "Go back",
|
|
2135
|
-
children: /* @__PURE__ */ s(
|
|
2179
|
+
children: /* @__PURE__ */ s(nn, { size: 16 })
|
|
2136
2180
|
}
|
|
2137
2181
|
),
|
|
2138
2182
|
/* @__PURE__ */ s("span", { className: "nc-app-title-bar-title", children: e })
|
|
2139
2183
|
] }),
|
|
2140
|
-
/* @__PURE__ */
|
|
2184
|
+
/* @__PURE__ */ k("div", { className: "nc-app-title-bar-right", children: [
|
|
2141
2185
|
r && /* @__PURE__ */ s("div", { className: "nc-app-title-bar-toolbar", children: r }),
|
|
2142
2186
|
/* @__PURE__ */ s(Ze, { onClick: t, "aria-label": "Close application" })
|
|
2143
2187
|
] })
|
|
2144
2188
|
] });
|
|
2145
2189
|
}
|
|
2146
|
-
class
|
|
2190
|
+
class on extends ze.Component {
|
|
2147
2191
|
constructor(t) {
|
|
2148
2192
|
super(t), this.state = { hasError: !1 };
|
|
2149
2193
|
}
|
|
@@ -2154,57 +2198,57 @@ class nn extends ze.Component {
|
|
|
2154
2198
|
console.error(`Error loading app ${this.props.appId}:`, t, n);
|
|
2155
2199
|
}
|
|
2156
2200
|
render() {
|
|
2157
|
-
return this.state.hasError ? /* @__PURE__ */
|
|
2201
|
+
return this.state.hasError ? /* @__PURE__ */ k("div", { className: "nc-app-error", children: [
|
|
2158
2202
|
/* @__PURE__ */ s("div", { children: "Failed to load app" }),
|
|
2159
2203
|
this.state.error && /* @__PURE__ */ s("div", { style: { fontSize: "12px", opacity: 0.7 }, children: this.state.error.message })
|
|
2160
2204
|
] }) : this.props.children;
|
|
2161
2205
|
}
|
|
2162
2206
|
}
|
|
2163
2207
|
function rt({ appId: e, isActive: t, onClose: n }) {
|
|
2164
|
-
const { t: r } = re(), o = me.get(e), [i, a] =
|
|
2208
|
+
const { t: r } = re(), o = me.get(e), [i, a] = P(""), [c, l] = P(null), [d, h] = P(null), [w, u] = P(!1), [b, A] = P(!1);
|
|
2165
2209
|
ze.useEffect(() => {
|
|
2166
2210
|
o != null && o.titleKey && a(r(o.titleKey));
|
|
2167
2211
|
}, [o, r]);
|
|
2168
|
-
const v =
|
|
2212
|
+
const v = G((S) => {
|
|
2169
2213
|
a(S);
|
|
2170
|
-
}, []),
|
|
2214
|
+
}, []), y = G((S) => {
|
|
2171
2215
|
l(() => S);
|
|
2172
|
-
}, []),
|
|
2216
|
+
}, []), x = G(() => {
|
|
2173
2217
|
l(null);
|
|
2174
|
-
}, []),
|
|
2175
|
-
|
|
2176
|
-
}, []),
|
|
2177
|
-
|
|
2178
|
-
}, []),
|
|
2179
|
-
|
|
2180
|
-
}, []),
|
|
2218
|
+
}, []), m = G((S) => {
|
|
2219
|
+
h(S);
|
|
2220
|
+
}, []), f = G(() => {
|
|
2221
|
+
h(null);
|
|
2222
|
+
}, []), p = G((S) => {
|
|
2223
|
+
u(S);
|
|
2224
|
+
}, []), g = G((S) => {
|
|
2181
2225
|
A(S);
|
|
2182
|
-
}, []), C =
|
|
2226
|
+
}, []), C = Ie(() => ({
|
|
2183
2227
|
setTitle: v,
|
|
2184
|
-
setBackHandler:
|
|
2185
|
-
clearBackHandler:
|
|
2186
|
-
setToolbar:
|
|
2187
|
-
clearToolbar:
|
|
2188
|
-
setHideBackButton:
|
|
2189
|
-
setHideTitleBar:
|
|
2228
|
+
setBackHandler: y,
|
|
2229
|
+
clearBackHandler: x,
|
|
2230
|
+
setToolbar: m,
|
|
2231
|
+
clearToolbar: f,
|
|
2232
|
+
setHideBackButton: p,
|
|
2233
|
+
setHideTitleBar: g,
|
|
2190
2234
|
close: n
|
|
2191
|
-
}), [v,
|
|
2235
|
+
}), [v, y, x, m, f, p, g, n]);
|
|
2192
2236
|
if (!o)
|
|
2193
2237
|
return null;
|
|
2194
|
-
const T = o.component,
|
|
2195
|
-
return /* @__PURE__ */
|
|
2238
|
+
const T = o.component, M = !o.hideTitleBar && !b;
|
|
2239
|
+
return /* @__PURE__ */ k(
|
|
2196
2240
|
"div",
|
|
2197
2241
|
{
|
|
2198
2242
|
className: `nc-app-container${t ? "" : " nc-hidden"}`,
|
|
2199
2243
|
children: [
|
|
2200
|
-
|
|
2201
|
-
|
|
2244
|
+
M && /* @__PURE__ */ s(
|
|
2245
|
+
rn,
|
|
2202
2246
|
{
|
|
2203
2247
|
title: i,
|
|
2204
2248
|
onClose: n,
|
|
2205
2249
|
onBack: c ?? void 0,
|
|
2206
|
-
toolbar:
|
|
2207
|
-
hideBackButton:
|
|
2250
|
+
toolbar: d,
|
|
2251
|
+
hideBackButton: w
|
|
2208
2252
|
}
|
|
2209
2253
|
),
|
|
2210
2254
|
/* @__PURE__ */ s(
|
|
@@ -2213,10 +2257,10 @@ function rt({ appId: e, isActive: t, onClose: n }) {
|
|
|
2213
2257
|
className: "nc-app-content-wrapper",
|
|
2214
2258
|
style: {
|
|
2215
2259
|
padding: o.padding,
|
|
2216
|
-
overflowY:
|
|
2260
|
+
overflowY: M ? "auto" : void 0
|
|
2217
2261
|
},
|
|
2218
|
-
children: /* @__PURE__ */ s(nt.Provider, { value: C, children: /* @__PURE__ */ s(
|
|
2219
|
-
|
|
2262
|
+
children: /* @__PURE__ */ s(nt.Provider, { value: C, children: /* @__PURE__ */ s(on, { appId: e, children: /* @__PURE__ */ s(
|
|
2263
|
+
It,
|
|
2220
2264
|
{
|
|
2221
2265
|
fallback: /* @__PURE__ */ s("div", { className: "nc-app-loading", children: /* @__PURE__ */ s(Qe, {}) }),
|
|
2222
2266
|
children: /* @__PURE__ */ s(T, {})
|
|
@@ -2228,21 +2272,21 @@ function rt({ appId: e, isActive: t, onClose: n }) {
|
|
|
2228
2272
|
}
|
|
2229
2273
|
);
|
|
2230
2274
|
}
|
|
2231
|
-
const Ce = 768,
|
|
2275
|
+
const Ce = 768, Me = 1024, ot = {
|
|
2232
2276
|
isMobile: !1,
|
|
2233
2277
|
isTablet: !1,
|
|
2234
2278
|
isDesktop: !0,
|
|
2235
2279
|
width: typeof window < "u" ? window.innerWidth : 1024,
|
|
2236
2280
|
height: typeof window < "u" ? window.innerHeight : 768
|
|
2237
2281
|
}, st = ge(ot);
|
|
2238
|
-
function
|
|
2239
|
-
const [t, n] =
|
|
2282
|
+
function wr({ children: e }) {
|
|
2283
|
+
const [t, n] = P(() => {
|
|
2240
2284
|
if (typeof window > "u") return ot;
|
|
2241
2285
|
const r = window.innerWidth, o = window.innerHeight;
|
|
2242
2286
|
return {
|
|
2243
2287
|
isMobile: r < Ce,
|
|
2244
|
-
isTablet: r >= Ce && r <
|
|
2245
|
-
isDesktop: r >=
|
|
2288
|
+
isTablet: r >= Ce && r < Me,
|
|
2289
|
+
isDesktop: r >= Me,
|
|
2246
2290
|
width: r,
|
|
2247
2291
|
height: o
|
|
2248
2292
|
};
|
|
@@ -2252,8 +2296,8 @@ function br({ children: e }) {
|
|
|
2252
2296
|
const o = window.innerWidth, i = window.innerHeight;
|
|
2253
2297
|
n({
|
|
2254
2298
|
isMobile: o < Ce,
|
|
2255
|
-
isTablet: o >= Ce && o <
|
|
2256
|
-
isDesktop: o >=
|
|
2299
|
+
isTablet: o >= Ce && o < Me,
|
|
2300
|
+
isDesktop: o >= Me,
|
|
2257
2301
|
width: o,
|
|
2258
2302
|
height: i
|
|
2259
2303
|
});
|
|
@@ -2264,15 +2308,15 @@ function br({ children: e }) {
|
|
|
2264
2308
|
function it() {
|
|
2265
2309
|
return ce(st);
|
|
2266
2310
|
}
|
|
2267
|
-
const Be = "-",
|
|
2268
|
-
const t =
|
|
2311
|
+
const Be = "-", sn = (e) => {
|
|
2312
|
+
const t = an(e), {
|
|
2269
2313
|
conflictingClassGroups: n,
|
|
2270
2314
|
conflictingClassGroupModifiers: r
|
|
2271
2315
|
} = e;
|
|
2272
2316
|
return {
|
|
2273
2317
|
getClassGroupId: (a) => {
|
|
2274
2318
|
const c = a.split(Be);
|
|
2275
|
-
return c[0] === "" && c.length !== 1 && c.shift(), ct(c, t) ||
|
|
2319
|
+
return c[0] === "" && c.length !== 1 && c.shift(), ct(c, t) || cn(a);
|
|
2276
2320
|
},
|
|
2277
2321
|
getConflictingClassGroupIds: (a, c) => {
|
|
2278
2322
|
const l = n[a] || [];
|
|
@@ -2292,13 +2336,13 @@ const Be = "-", rn = (e) => {
|
|
|
2292
2336
|
return (a = t.validators.find(({
|
|
2293
2337
|
validator: c
|
|
2294
2338
|
}) => c(i))) == null ? void 0 : a.classGroupId;
|
|
2295
|
-
}, Xe = /^\[(.+)\]$/,
|
|
2339
|
+
}, Xe = /^\[(.+)\]$/, cn = (e) => {
|
|
2296
2340
|
if (Xe.test(e)) {
|
|
2297
2341
|
const t = Xe.exec(e)[1], n = t == null ? void 0 : t.substring(0, t.indexOf(":"));
|
|
2298
2342
|
if (n)
|
|
2299
2343
|
return "arbitrary.." + n;
|
|
2300
2344
|
}
|
|
2301
|
-
},
|
|
2345
|
+
}, an = (e) => {
|
|
2302
2346
|
const {
|
|
2303
2347
|
theme: t,
|
|
2304
2348
|
prefix: n
|
|
@@ -2306,10 +2350,10 @@ const Be = "-", rn = (e) => {
|
|
|
2306
2350
|
nextPart: /* @__PURE__ */ new Map(),
|
|
2307
2351
|
validators: []
|
|
2308
2352
|
};
|
|
2309
|
-
return
|
|
2310
|
-
|
|
2353
|
+
return dn(Object.entries(e.classGroups), n).forEach(([i, a]) => {
|
|
2354
|
+
Pe(a, r, i, t);
|
|
2311
2355
|
}), r;
|
|
2312
|
-
},
|
|
2356
|
+
}, Pe = (e, t, n, r) => {
|
|
2313
2357
|
e.forEach((o) => {
|
|
2314
2358
|
if (typeof o == "string") {
|
|
2315
2359
|
const i = o === "" ? t : Je(t, o);
|
|
@@ -2317,8 +2361,8 @@ const Be = "-", rn = (e) => {
|
|
|
2317
2361
|
return;
|
|
2318
2362
|
}
|
|
2319
2363
|
if (typeof o == "function") {
|
|
2320
|
-
if (
|
|
2321
|
-
|
|
2364
|
+
if (ln(o)) {
|
|
2365
|
+
Pe(o(r), t, n, r);
|
|
2322
2366
|
return;
|
|
2323
2367
|
}
|
|
2324
2368
|
t.validators.push({
|
|
@@ -2328,7 +2372,7 @@ const Be = "-", rn = (e) => {
|
|
|
2328
2372
|
return;
|
|
2329
2373
|
}
|
|
2330
2374
|
Object.entries(o).forEach(([i, a]) => {
|
|
2331
|
-
|
|
2375
|
+
Pe(a, Je(t, i), n, r);
|
|
2332
2376
|
});
|
|
2333
2377
|
});
|
|
2334
2378
|
}, Je = (e, t) => {
|
|
@@ -2339,10 +2383,10 @@ const Be = "-", rn = (e) => {
|
|
|
2339
2383
|
validators: []
|
|
2340
2384
|
}), n = n.nextPart.get(r);
|
|
2341
2385
|
}), n;
|
|
2342
|
-
},
|
|
2386
|
+
}, ln = (e) => e.isThemeGetter, dn = (e, t) => t ? e.map(([n, r]) => {
|
|
2343
2387
|
const o = r.map((i) => typeof i == "string" ? t + i : typeof i == "object" ? Object.fromEntries(Object.entries(i).map(([a, c]) => [t + a, c])) : i);
|
|
2344
2388
|
return [n, o];
|
|
2345
|
-
}) : e,
|
|
2389
|
+
}) : e, un = (e) => {
|
|
2346
2390
|
if (e < 1)
|
|
2347
2391
|
return {
|
|
2348
2392
|
get: () => {
|
|
@@ -2366,31 +2410,31 @@ const Be = "-", rn = (e) => {
|
|
|
2366
2410
|
n.has(i) ? n.set(i, a) : o(i, a);
|
|
2367
2411
|
}
|
|
2368
2412
|
};
|
|
2369
|
-
}, at = "!",
|
|
2413
|
+
}, at = "!", pn = (e) => {
|
|
2370
2414
|
const {
|
|
2371
2415
|
separator: t,
|
|
2372
2416
|
experimentalParseClassName: n
|
|
2373
2417
|
} = e, r = t.length === 1, o = t[0], i = t.length, a = (c) => {
|
|
2374
2418
|
const l = [];
|
|
2375
|
-
let
|
|
2376
|
-
for (let
|
|
2377
|
-
let
|
|
2378
|
-
if (
|
|
2379
|
-
if (
|
|
2380
|
-
l.push(c.slice(
|
|
2419
|
+
let d = 0, h = 0, w;
|
|
2420
|
+
for (let y = 0; y < c.length; y++) {
|
|
2421
|
+
let x = c[y];
|
|
2422
|
+
if (d === 0) {
|
|
2423
|
+
if (x === o && (r || c.slice(y, y + i) === t)) {
|
|
2424
|
+
l.push(c.slice(h, y)), h = y + i;
|
|
2381
2425
|
continue;
|
|
2382
2426
|
}
|
|
2383
|
-
if (
|
|
2384
|
-
|
|
2427
|
+
if (x === "/") {
|
|
2428
|
+
w = y;
|
|
2385
2429
|
continue;
|
|
2386
2430
|
}
|
|
2387
2431
|
}
|
|
2388
|
-
|
|
2432
|
+
x === "[" ? d++ : x === "]" && d--;
|
|
2389
2433
|
}
|
|
2390
|
-
const
|
|
2434
|
+
const u = l.length === 0 ? c : c.substring(h), b = u.startsWith(at), A = b ? u.substring(1) : u, v = w && w > h ? w - h : void 0;
|
|
2391
2435
|
return {
|
|
2392
2436
|
modifiers: l,
|
|
2393
|
-
hasImportantModifier:
|
|
2437
|
+
hasImportantModifier: b,
|
|
2394
2438
|
baseClassName: A,
|
|
2395
2439
|
maybePostfixModifierPosition: v
|
|
2396
2440
|
};
|
|
@@ -2399,7 +2443,7 @@ const Be = "-", rn = (e) => {
|
|
|
2399
2443
|
className: c,
|
|
2400
2444
|
parseClassName: a
|
|
2401
2445
|
}) : a;
|
|
2402
|
-
},
|
|
2446
|
+
}, fn = (e) => {
|
|
2403
2447
|
if (e.length <= 1)
|
|
2404
2448
|
return e;
|
|
2405
2449
|
const t = [];
|
|
@@ -2407,50 +2451,50 @@ const Be = "-", rn = (e) => {
|
|
|
2407
2451
|
return e.forEach((r) => {
|
|
2408
2452
|
r[0] === "[" ? (t.push(...n.sort(), r), n = []) : n.push(r);
|
|
2409
2453
|
}), t.push(...n.sort()), t;
|
|
2410
|
-
},
|
|
2411
|
-
cache:
|
|
2412
|
-
parseClassName:
|
|
2413
|
-
...
|
|
2414
|
-
}),
|
|
2454
|
+
}, hn = (e) => ({
|
|
2455
|
+
cache: un(e.cacheSize),
|
|
2456
|
+
parseClassName: pn(e),
|
|
2457
|
+
...sn(e)
|
|
2458
|
+
}), mn = /\s+/, gn = (e, t) => {
|
|
2415
2459
|
const {
|
|
2416
2460
|
parseClassName: n,
|
|
2417
2461
|
getClassGroupId: r,
|
|
2418
2462
|
getConflictingClassGroupIds: o
|
|
2419
|
-
} = t, i = [], a = e.trim().split(
|
|
2463
|
+
} = t, i = [], a = e.trim().split(mn);
|
|
2420
2464
|
let c = "";
|
|
2421
2465
|
for (let l = a.length - 1; l >= 0; l -= 1) {
|
|
2422
|
-
const
|
|
2423
|
-
modifiers:
|
|
2424
|
-
hasImportantModifier:
|
|
2425
|
-
baseClassName:
|
|
2426
|
-
maybePostfixModifierPosition:
|
|
2427
|
-
} = n(
|
|
2428
|
-
let A = !!
|
|
2466
|
+
const d = a[l], {
|
|
2467
|
+
modifiers: h,
|
|
2468
|
+
hasImportantModifier: w,
|
|
2469
|
+
baseClassName: u,
|
|
2470
|
+
maybePostfixModifierPosition: b
|
|
2471
|
+
} = n(d);
|
|
2472
|
+
let A = !!b, v = r(A ? u.substring(0, b) : u);
|
|
2429
2473
|
if (!v) {
|
|
2430
2474
|
if (!A) {
|
|
2431
|
-
c =
|
|
2475
|
+
c = d + (c.length > 0 ? " " + c : c);
|
|
2432
2476
|
continue;
|
|
2433
2477
|
}
|
|
2434
|
-
if (v = r(
|
|
2435
|
-
c =
|
|
2478
|
+
if (v = r(u), !v) {
|
|
2479
|
+
c = d + (c.length > 0 ? " " + c : c);
|
|
2436
2480
|
continue;
|
|
2437
2481
|
}
|
|
2438
2482
|
A = !1;
|
|
2439
2483
|
}
|
|
2440
|
-
const
|
|
2441
|
-
if (i.includes(
|
|
2484
|
+
const y = fn(h).join(":"), x = w ? y + at : y, m = x + v;
|
|
2485
|
+
if (i.includes(m))
|
|
2442
2486
|
continue;
|
|
2443
|
-
i.push(
|
|
2444
|
-
const
|
|
2445
|
-
for (let
|
|
2446
|
-
const
|
|
2447
|
-
i.push(
|
|
2487
|
+
i.push(m);
|
|
2488
|
+
const f = o(v, A);
|
|
2489
|
+
for (let p = 0; p < f.length; ++p) {
|
|
2490
|
+
const g = f[p];
|
|
2491
|
+
i.push(x + g);
|
|
2448
2492
|
}
|
|
2449
|
-
c =
|
|
2493
|
+
c = d + (c.length > 0 ? " " + c : c);
|
|
2450
2494
|
}
|
|
2451
2495
|
return c;
|
|
2452
2496
|
};
|
|
2453
|
-
function
|
|
2497
|
+
function bn() {
|
|
2454
2498
|
let e = 0, t, n, r = "";
|
|
2455
2499
|
for (; e < arguments.length; )
|
|
2456
2500
|
(t = arguments[e++]) && (n = lt(t)) && (r && (r += " "), r += n);
|
|
@@ -2464,65 +2508,65 @@ const lt = (e) => {
|
|
|
2464
2508
|
e[r] && (t = lt(e[r])) && (n && (n += " "), n += t);
|
|
2465
2509
|
return n;
|
|
2466
2510
|
};
|
|
2467
|
-
function
|
|
2511
|
+
function vn(e, ...t) {
|
|
2468
2512
|
let n, r, o, i = a;
|
|
2469
2513
|
function a(l) {
|
|
2470
|
-
const
|
|
2471
|
-
return n =
|
|
2514
|
+
const d = t.reduce((h, w) => w(h), e());
|
|
2515
|
+
return n = hn(d), r = n.cache.get, o = n.cache.set, i = c, c(l);
|
|
2472
2516
|
}
|
|
2473
2517
|
function c(l) {
|
|
2474
|
-
const
|
|
2475
|
-
if (
|
|
2476
|
-
return
|
|
2477
|
-
const
|
|
2478
|
-
return o(l,
|
|
2518
|
+
const d = r(l);
|
|
2519
|
+
if (d)
|
|
2520
|
+
return d;
|
|
2521
|
+
const h = gn(l, n);
|
|
2522
|
+
return o(l, h), h;
|
|
2479
2523
|
}
|
|
2480
2524
|
return function() {
|
|
2481
|
-
return i(
|
|
2525
|
+
return i(bn.apply(null, arguments));
|
|
2482
2526
|
};
|
|
2483
2527
|
}
|
|
2484
2528
|
const O = (e) => {
|
|
2485
2529
|
const t = (n) => n[e] || [];
|
|
2486
2530
|
return t.isThemeGetter = !0, t;
|
|
2487
|
-
}, dt = /^\[(?:([a-z-]+):)?(.+)\]$/i,
|
|
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)\(.+\)$/, ee = (e) => he(e) || yn.has(e) || wn.test(e), se = (e) => be(e, "length", En), 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)), $ = (e) => dt.test(e), ie = (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), Pn = (e) => be(e, "", Ln), ke = () => !0, be = (e, t, n) => {
|
|
2488
2532
|
const r = dt.exec(e);
|
|
2489
2533
|
return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1;
|
|
2490
|
-
},
|
|
2534
|
+
}, En = (e) => (
|
|
2491
2535
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
2492
2536
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
2493
2537
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
2494
|
-
|
|
2495
|
-
), ut = () => !1,
|
|
2496
|
-
const e = O("colors"), t = O("spacing"), n = O("blur"), r = O("brightness"), o = O("borderColor"), i = O("borderRadius"), a = O("borderSpacing"), c = O("borderWidth"), l = O("contrast"),
|
|
2538
|
+
kn.test(e) && !Nn.test(e)
|
|
2539
|
+
), ut = () => !1, Ln = (e) => An.test(e), zn = (e) => Sn.test(e), Bn = () => {
|
|
2540
|
+
const e = O("colors"), t = O("spacing"), n = O("blur"), r = O("brightness"), o = O("borderColor"), i = O("borderRadius"), a = O("borderSpacing"), c = O("borderWidth"), l = O("contrast"), d = O("grayscale"), h = O("hueRotate"), w = O("invert"), u = O("gap"), b = O("gradientColorStops"), A = O("gradientColorStopPositions"), v = O("inset"), y = O("margin"), x = O("opacity"), m = O("padding"), f = O("saturate"), p = O("scale"), g = O("sepia"), C = O("skew"), T = O("space"), M = O("translate"), S = () => ["auto", "contain", "none"], E = () => ["auto", "hidden", "clip", "visible", "scroll"], N = () => ["auto", $, t], I = () => [$, t], L = () => ["", ee, se], H = () => ["auto", he, $], ae = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], X = () => ["solid", "dashed", "dotted", "double", "none"], K = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], _ = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], U = () => ["", "0", $], j = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], z = () => [he, $];
|
|
2497
2541
|
return {
|
|
2498
2542
|
cacheSize: 500,
|
|
2499
2543
|
separator: ":",
|
|
2500
2544
|
theme: {
|
|
2501
2545
|
colors: [ke],
|
|
2502
2546
|
spacing: [ee, se],
|
|
2503
|
-
blur: ["none", "", ie,
|
|
2547
|
+
blur: ["none", "", ie, $],
|
|
2504
2548
|
brightness: z(),
|
|
2505
2549
|
borderColor: [e],
|
|
2506
|
-
borderRadius: ["none", "", "full", ie,
|
|
2507
|
-
borderSpacing:
|
|
2508
|
-
borderWidth:
|
|
2550
|
+
borderRadius: ["none", "", "full", ie, $],
|
|
2551
|
+
borderSpacing: I(),
|
|
2552
|
+
borderWidth: L(),
|
|
2509
2553
|
contrast: z(),
|
|
2510
2554
|
grayscale: U(),
|
|
2511
2555
|
hueRotate: z(),
|
|
2512
2556
|
invert: U(),
|
|
2513
|
-
gap:
|
|
2557
|
+
gap: I(),
|
|
2514
2558
|
gradientColorStops: [e],
|
|
2515
|
-
gradientColorStopPositions: [
|
|
2516
|
-
inset:
|
|
2517
|
-
margin:
|
|
2559
|
+
gradientColorStopPositions: [Cn, se],
|
|
2560
|
+
inset: N(),
|
|
2561
|
+
margin: N(),
|
|
2518
2562
|
opacity: z(),
|
|
2519
|
-
padding:
|
|
2563
|
+
padding: I(),
|
|
2520
2564
|
saturate: z(),
|
|
2521
2565
|
scale: z(),
|
|
2522
2566
|
sepia: U(),
|
|
2523
2567
|
skew: z(),
|
|
2524
|
-
space:
|
|
2525
|
-
translate:
|
|
2568
|
+
space: I(),
|
|
2569
|
+
translate: I()
|
|
2526
2570
|
},
|
|
2527
2571
|
classGroups: {
|
|
2528
2572
|
// Layout
|
|
@@ -2531,7 +2575,7 @@ const O = (e) => {
|
|
|
2531
2575
|
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
2532
2576
|
*/
|
|
2533
2577
|
aspect: [{
|
|
2534
|
-
aspect: ["auto", "square", "video",
|
|
2578
|
+
aspect: ["auto", "square", "video", $]
|
|
2535
2579
|
}],
|
|
2536
2580
|
/**
|
|
2537
2581
|
* Container
|
|
@@ -2616,28 +2660,28 @@ const O = (e) => {
|
|
|
2616
2660
|
* @see https://tailwindcss.com/docs/object-position
|
|
2617
2661
|
*/
|
|
2618
2662
|
"object-position": [{
|
|
2619
|
-
object: [...ae(),
|
|
2663
|
+
object: [...ae(), $]
|
|
2620
2664
|
}],
|
|
2621
2665
|
/**
|
|
2622
2666
|
* Overflow
|
|
2623
2667
|
* @see https://tailwindcss.com/docs/overflow
|
|
2624
2668
|
*/
|
|
2625
2669
|
overflow: [{
|
|
2626
|
-
overflow:
|
|
2670
|
+
overflow: E()
|
|
2627
2671
|
}],
|
|
2628
2672
|
/**
|
|
2629
2673
|
* Overflow X
|
|
2630
2674
|
* @see https://tailwindcss.com/docs/overflow
|
|
2631
2675
|
*/
|
|
2632
2676
|
"overflow-x": [{
|
|
2633
|
-
"overflow-x":
|
|
2677
|
+
"overflow-x": E()
|
|
2634
2678
|
}],
|
|
2635
2679
|
/**
|
|
2636
2680
|
* Overflow Y
|
|
2637
2681
|
* @see https://tailwindcss.com/docs/overflow
|
|
2638
2682
|
*/
|
|
2639
2683
|
"overflow-y": [{
|
|
2640
|
-
"overflow-y":
|
|
2684
|
+
"overflow-y": E()
|
|
2641
2685
|
}],
|
|
2642
2686
|
/**
|
|
2643
2687
|
* Overscroll Behavior
|
|
@@ -2738,7 +2782,7 @@ const O = (e) => {
|
|
|
2738
2782
|
* @see https://tailwindcss.com/docs/z-index
|
|
2739
2783
|
*/
|
|
2740
2784
|
z: [{
|
|
2741
|
-
z: ["auto", xe,
|
|
2785
|
+
z: ["auto", xe, $]
|
|
2742
2786
|
}],
|
|
2743
2787
|
// Flexbox and Grid
|
|
2744
2788
|
/**
|
|
@@ -2746,7 +2790,7 @@ const O = (e) => {
|
|
|
2746
2790
|
* @see https://tailwindcss.com/docs/flex-basis
|
|
2747
2791
|
*/
|
|
2748
2792
|
basis: [{
|
|
2749
|
-
basis:
|
|
2793
|
+
basis: N()
|
|
2750
2794
|
}],
|
|
2751
2795
|
/**
|
|
2752
2796
|
* Flex Direction
|
|
@@ -2767,7 +2811,7 @@ const O = (e) => {
|
|
|
2767
2811
|
* @see https://tailwindcss.com/docs/flex
|
|
2768
2812
|
*/
|
|
2769
2813
|
flex: [{
|
|
2770
|
-
flex: ["1", "auto", "initial", "none",
|
|
2814
|
+
flex: ["1", "auto", "initial", "none", $]
|
|
2771
2815
|
}],
|
|
2772
2816
|
/**
|
|
2773
2817
|
* Flex Grow
|
|
@@ -2788,7 +2832,7 @@ const O = (e) => {
|
|
|
2788
2832
|
* @see https://tailwindcss.com/docs/order
|
|
2789
2833
|
*/
|
|
2790
2834
|
order: [{
|
|
2791
|
-
order: ["first", "last", "none", xe,
|
|
2835
|
+
order: ["first", "last", "none", xe, $]
|
|
2792
2836
|
}],
|
|
2793
2837
|
/**
|
|
2794
2838
|
* Grid Template Columns
|
|
@@ -2803,8 +2847,8 @@ const O = (e) => {
|
|
|
2803
2847
|
*/
|
|
2804
2848
|
"col-start-end": [{
|
|
2805
2849
|
col: ["auto", {
|
|
2806
|
-
span: ["full", xe,
|
|
2807
|
-
},
|
|
2850
|
+
span: ["full", xe, $]
|
|
2851
|
+
}, $]
|
|
2808
2852
|
}],
|
|
2809
2853
|
/**
|
|
2810
2854
|
* Grid Column Start
|
|
@@ -2833,8 +2877,8 @@ const O = (e) => {
|
|
|
2833
2877
|
*/
|
|
2834
2878
|
"row-start-end": [{
|
|
2835
2879
|
row: ["auto", {
|
|
2836
|
-
span: [xe,
|
|
2837
|
-
},
|
|
2880
|
+
span: [xe, $]
|
|
2881
|
+
}, $]
|
|
2838
2882
|
}],
|
|
2839
2883
|
/**
|
|
2840
2884
|
* Grid Row Start
|
|
@@ -2862,35 +2906,35 @@ const O = (e) => {
|
|
|
2862
2906
|
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
2863
2907
|
*/
|
|
2864
2908
|
"auto-cols": [{
|
|
2865
|
-
"auto-cols": ["auto", "min", "max", "fr",
|
|
2909
|
+
"auto-cols": ["auto", "min", "max", "fr", $]
|
|
2866
2910
|
}],
|
|
2867
2911
|
/**
|
|
2868
2912
|
* Grid Auto Rows
|
|
2869
2913
|
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
2870
2914
|
*/
|
|
2871
2915
|
"auto-rows": [{
|
|
2872
|
-
"auto-rows": ["auto", "min", "max", "fr",
|
|
2916
|
+
"auto-rows": ["auto", "min", "max", "fr", $]
|
|
2873
2917
|
}],
|
|
2874
2918
|
/**
|
|
2875
2919
|
* Gap
|
|
2876
2920
|
* @see https://tailwindcss.com/docs/gap
|
|
2877
2921
|
*/
|
|
2878
2922
|
gap: [{
|
|
2879
|
-
gap: [
|
|
2923
|
+
gap: [u]
|
|
2880
2924
|
}],
|
|
2881
2925
|
/**
|
|
2882
2926
|
* Gap X
|
|
2883
2927
|
* @see https://tailwindcss.com/docs/gap
|
|
2884
2928
|
*/
|
|
2885
2929
|
"gap-x": [{
|
|
2886
|
-
"gap-x": [
|
|
2930
|
+
"gap-x": [u]
|
|
2887
2931
|
}],
|
|
2888
2932
|
/**
|
|
2889
2933
|
* Gap Y
|
|
2890
2934
|
* @see https://tailwindcss.com/docs/gap
|
|
2891
2935
|
*/
|
|
2892
2936
|
"gap-y": [{
|
|
2893
|
-
"gap-y": [
|
|
2937
|
+
"gap-y": [u]
|
|
2894
2938
|
}],
|
|
2895
2939
|
/**
|
|
2896
2940
|
* Justify Content
|
|
@@ -2961,126 +3005,126 @@ const O = (e) => {
|
|
|
2961
3005
|
* @see https://tailwindcss.com/docs/padding
|
|
2962
3006
|
*/
|
|
2963
3007
|
p: [{
|
|
2964
|
-
p: [
|
|
3008
|
+
p: [m]
|
|
2965
3009
|
}],
|
|
2966
3010
|
/**
|
|
2967
3011
|
* Padding X
|
|
2968
3012
|
* @see https://tailwindcss.com/docs/padding
|
|
2969
3013
|
*/
|
|
2970
3014
|
px: [{
|
|
2971
|
-
px: [
|
|
3015
|
+
px: [m]
|
|
2972
3016
|
}],
|
|
2973
3017
|
/**
|
|
2974
3018
|
* Padding Y
|
|
2975
3019
|
* @see https://tailwindcss.com/docs/padding
|
|
2976
3020
|
*/
|
|
2977
3021
|
py: [{
|
|
2978
|
-
py: [
|
|
3022
|
+
py: [m]
|
|
2979
3023
|
}],
|
|
2980
3024
|
/**
|
|
2981
3025
|
* Padding Start
|
|
2982
3026
|
* @see https://tailwindcss.com/docs/padding
|
|
2983
3027
|
*/
|
|
2984
3028
|
ps: [{
|
|
2985
|
-
ps: [
|
|
3029
|
+
ps: [m]
|
|
2986
3030
|
}],
|
|
2987
3031
|
/**
|
|
2988
3032
|
* Padding End
|
|
2989
3033
|
* @see https://tailwindcss.com/docs/padding
|
|
2990
3034
|
*/
|
|
2991
3035
|
pe: [{
|
|
2992
|
-
pe: [
|
|
3036
|
+
pe: [m]
|
|
2993
3037
|
}],
|
|
2994
3038
|
/**
|
|
2995
3039
|
* Padding Top
|
|
2996
3040
|
* @see https://tailwindcss.com/docs/padding
|
|
2997
3041
|
*/
|
|
2998
3042
|
pt: [{
|
|
2999
|
-
pt: [
|
|
3043
|
+
pt: [m]
|
|
3000
3044
|
}],
|
|
3001
3045
|
/**
|
|
3002
3046
|
* Padding Right
|
|
3003
3047
|
* @see https://tailwindcss.com/docs/padding
|
|
3004
3048
|
*/
|
|
3005
3049
|
pr: [{
|
|
3006
|
-
pr: [
|
|
3050
|
+
pr: [m]
|
|
3007
3051
|
}],
|
|
3008
3052
|
/**
|
|
3009
3053
|
* Padding Bottom
|
|
3010
3054
|
* @see https://tailwindcss.com/docs/padding
|
|
3011
3055
|
*/
|
|
3012
3056
|
pb: [{
|
|
3013
|
-
pb: [
|
|
3057
|
+
pb: [m]
|
|
3014
3058
|
}],
|
|
3015
3059
|
/**
|
|
3016
3060
|
* Padding Left
|
|
3017
3061
|
* @see https://tailwindcss.com/docs/padding
|
|
3018
3062
|
*/
|
|
3019
3063
|
pl: [{
|
|
3020
|
-
pl: [
|
|
3064
|
+
pl: [m]
|
|
3021
3065
|
}],
|
|
3022
3066
|
/**
|
|
3023
3067
|
* Margin
|
|
3024
3068
|
* @see https://tailwindcss.com/docs/margin
|
|
3025
3069
|
*/
|
|
3026
3070
|
m: [{
|
|
3027
|
-
m: [
|
|
3071
|
+
m: [y]
|
|
3028
3072
|
}],
|
|
3029
3073
|
/**
|
|
3030
3074
|
* Margin X
|
|
3031
3075
|
* @see https://tailwindcss.com/docs/margin
|
|
3032
3076
|
*/
|
|
3033
3077
|
mx: [{
|
|
3034
|
-
mx: [
|
|
3078
|
+
mx: [y]
|
|
3035
3079
|
}],
|
|
3036
3080
|
/**
|
|
3037
3081
|
* Margin Y
|
|
3038
3082
|
* @see https://tailwindcss.com/docs/margin
|
|
3039
3083
|
*/
|
|
3040
3084
|
my: [{
|
|
3041
|
-
my: [
|
|
3085
|
+
my: [y]
|
|
3042
3086
|
}],
|
|
3043
3087
|
/**
|
|
3044
3088
|
* Margin Start
|
|
3045
3089
|
* @see https://tailwindcss.com/docs/margin
|
|
3046
3090
|
*/
|
|
3047
3091
|
ms: [{
|
|
3048
|
-
ms: [
|
|
3092
|
+
ms: [y]
|
|
3049
3093
|
}],
|
|
3050
3094
|
/**
|
|
3051
3095
|
* Margin End
|
|
3052
3096
|
* @see https://tailwindcss.com/docs/margin
|
|
3053
3097
|
*/
|
|
3054
3098
|
me: [{
|
|
3055
|
-
me: [
|
|
3099
|
+
me: [y]
|
|
3056
3100
|
}],
|
|
3057
3101
|
/**
|
|
3058
3102
|
* Margin Top
|
|
3059
3103
|
* @see https://tailwindcss.com/docs/margin
|
|
3060
3104
|
*/
|
|
3061
3105
|
mt: [{
|
|
3062
|
-
mt: [
|
|
3106
|
+
mt: [y]
|
|
3063
3107
|
}],
|
|
3064
3108
|
/**
|
|
3065
3109
|
* Margin Right
|
|
3066
3110
|
* @see https://tailwindcss.com/docs/margin
|
|
3067
3111
|
*/
|
|
3068
3112
|
mr: [{
|
|
3069
|
-
mr: [
|
|
3113
|
+
mr: [y]
|
|
3070
3114
|
}],
|
|
3071
3115
|
/**
|
|
3072
3116
|
* Margin Bottom
|
|
3073
3117
|
* @see https://tailwindcss.com/docs/margin
|
|
3074
3118
|
*/
|
|
3075
3119
|
mb: [{
|
|
3076
|
-
mb: [
|
|
3120
|
+
mb: [y]
|
|
3077
3121
|
}],
|
|
3078
3122
|
/**
|
|
3079
3123
|
* Margin Left
|
|
3080
3124
|
* @see https://tailwindcss.com/docs/margin
|
|
3081
3125
|
*/
|
|
3082
3126
|
ml: [{
|
|
3083
|
-
ml: [
|
|
3127
|
+
ml: [y]
|
|
3084
3128
|
}],
|
|
3085
3129
|
/**
|
|
3086
3130
|
* Space Between X
|
|
@@ -3112,21 +3156,21 @@ const O = (e) => {
|
|
|
3112
3156
|
* @see https://tailwindcss.com/docs/width
|
|
3113
3157
|
*/
|
|
3114
3158
|
w: [{
|
|
3115
|
-
w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw",
|
|
3159
|
+
w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", $, t]
|
|
3116
3160
|
}],
|
|
3117
3161
|
/**
|
|
3118
3162
|
* Min-Width
|
|
3119
3163
|
* @see https://tailwindcss.com/docs/min-width
|
|
3120
3164
|
*/
|
|
3121
3165
|
"min-w": [{
|
|
3122
|
-
"min-w": [
|
|
3166
|
+
"min-w": [$, t, "min", "max", "fit"]
|
|
3123
3167
|
}],
|
|
3124
3168
|
/**
|
|
3125
3169
|
* Max-Width
|
|
3126
3170
|
* @see https://tailwindcss.com/docs/max-width
|
|
3127
3171
|
*/
|
|
3128
3172
|
"max-w": [{
|
|
3129
|
-
"max-w": [
|
|
3173
|
+
"max-w": [$, t, "none", "full", "min", "max", "fit", "prose", {
|
|
3130
3174
|
screen: [ie]
|
|
3131
3175
|
}, ie]
|
|
3132
3176
|
}],
|
|
@@ -3135,28 +3179,28 @@ const O = (e) => {
|
|
|
3135
3179
|
* @see https://tailwindcss.com/docs/height
|
|
3136
3180
|
*/
|
|
3137
3181
|
h: [{
|
|
3138
|
-
h: [
|
|
3182
|
+
h: [$, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
3139
3183
|
}],
|
|
3140
3184
|
/**
|
|
3141
3185
|
* Min-Height
|
|
3142
3186
|
* @see https://tailwindcss.com/docs/min-height
|
|
3143
3187
|
*/
|
|
3144
3188
|
"min-h": [{
|
|
3145
|
-
"min-h": [
|
|
3189
|
+
"min-h": [$, t, "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
3146
3190
|
}],
|
|
3147
3191
|
/**
|
|
3148
3192
|
* Max-Height
|
|
3149
3193
|
* @see https://tailwindcss.com/docs/max-height
|
|
3150
3194
|
*/
|
|
3151
3195
|
"max-h": [{
|
|
3152
|
-
"max-h": [
|
|
3196
|
+
"max-h": [$, t, "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
3153
3197
|
}],
|
|
3154
3198
|
/**
|
|
3155
3199
|
* Size
|
|
3156
3200
|
* @see https://tailwindcss.com/docs/size
|
|
3157
3201
|
*/
|
|
3158
3202
|
size: [{
|
|
3159
|
-
size: [
|
|
3203
|
+
size: [$, t, "auto", "min", "max", "fit"]
|
|
3160
3204
|
}],
|
|
3161
3205
|
// Typography
|
|
3162
3206
|
/**
|
|
@@ -3181,7 +3225,7 @@ const O = (e) => {
|
|
|
3181
3225
|
* @see https://tailwindcss.com/docs/font-weight
|
|
3182
3226
|
*/
|
|
3183
3227
|
"font-weight": [{
|
|
3184
|
-
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black",
|
|
3228
|
+
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", $e]
|
|
3185
3229
|
}],
|
|
3186
3230
|
/**
|
|
3187
3231
|
* Font Family
|
|
@@ -3225,35 +3269,35 @@ const O = (e) => {
|
|
|
3225
3269
|
* @see https://tailwindcss.com/docs/letter-spacing
|
|
3226
3270
|
*/
|
|
3227
3271
|
tracking: [{
|
|
3228
|
-
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest",
|
|
3272
|
+
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", $]
|
|
3229
3273
|
}],
|
|
3230
3274
|
/**
|
|
3231
3275
|
* Line Clamp
|
|
3232
3276
|
* @see https://tailwindcss.com/docs/line-clamp
|
|
3233
3277
|
*/
|
|
3234
3278
|
"line-clamp": [{
|
|
3235
|
-
"line-clamp": ["none", he,
|
|
3279
|
+
"line-clamp": ["none", he, $e]
|
|
3236
3280
|
}],
|
|
3237
3281
|
/**
|
|
3238
3282
|
* Line Height
|
|
3239
3283
|
* @see https://tailwindcss.com/docs/line-height
|
|
3240
3284
|
*/
|
|
3241
3285
|
leading: [{
|
|
3242
|
-
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", ee,
|
|
3286
|
+
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", ee, $]
|
|
3243
3287
|
}],
|
|
3244
3288
|
/**
|
|
3245
3289
|
* List Style Image
|
|
3246
3290
|
* @see https://tailwindcss.com/docs/list-style-image
|
|
3247
3291
|
*/
|
|
3248
3292
|
"list-image": [{
|
|
3249
|
-
"list-image": ["none",
|
|
3293
|
+
"list-image": ["none", $]
|
|
3250
3294
|
}],
|
|
3251
3295
|
/**
|
|
3252
3296
|
* List Style Type
|
|
3253
3297
|
* @see https://tailwindcss.com/docs/list-style-type
|
|
3254
3298
|
*/
|
|
3255
3299
|
"list-style-type": [{
|
|
3256
|
-
list: ["none", "disc", "decimal",
|
|
3300
|
+
list: ["none", "disc", "decimal", $]
|
|
3257
3301
|
}],
|
|
3258
3302
|
/**
|
|
3259
3303
|
* List Style Position
|
|
@@ -3275,7 +3319,7 @@ const O = (e) => {
|
|
|
3275
3319
|
* @see https://tailwindcss.com/docs/placeholder-opacity
|
|
3276
3320
|
*/
|
|
3277
3321
|
"placeholder-opacity": [{
|
|
3278
|
-
"placeholder-opacity": [
|
|
3322
|
+
"placeholder-opacity": [x]
|
|
3279
3323
|
}],
|
|
3280
3324
|
/**
|
|
3281
3325
|
* Text Alignment
|
|
@@ -3296,7 +3340,7 @@ const O = (e) => {
|
|
|
3296
3340
|
* @see https://tailwindcss.com/docs/text-opacity
|
|
3297
3341
|
*/
|
|
3298
3342
|
"text-opacity": [{
|
|
3299
|
-
"text-opacity": [
|
|
3343
|
+
"text-opacity": [x]
|
|
3300
3344
|
}],
|
|
3301
3345
|
/**
|
|
3302
3346
|
* Text Decoration
|
|
@@ -3322,7 +3366,7 @@ const O = (e) => {
|
|
|
3322
3366
|
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
3323
3367
|
*/
|
|
3324
3368
|
"underline-offset": [{
|
|
3325
|
-
"underline-offset": ["auto", ee,
|
|
3369
|
+
"underline-offset": ["auto", ee, $]
|
|
3326
3370
|
}],
|
|
3327
3371
|
/**
|
|
3328
3372
|
* Text Decoration Color
|
|
@@ -3353,14 +3397,14 @@ const O = (e) => {
|
|
|
3353
3397
|
* @see https://tailwindcss.com/docs/text-indent
|
|
3354
3398
|
*/
|
|
3355
3399
|
indent: [{
|
|
3356
|
-
indent:
|
|
3400
|
+
indent: I()
|
|
3357
3401
|
}],
|
|
3358
3402
|
/**
|
|
3359
3403
|
* Vertical Alignment
|
|
3360
3404
|
* @see https://tailwindcss.com/docs/vertical-align
|
|
3361
3405
|
*/
|
|
3362
3406
|
"vertical-align": [{
|
|
3363
|
-
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super",
|
|
3407
|
+
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", $]
|
|
3364
3408
|
}],
|
|
3365
3409
|
/**
|
|
3366
3410
|
* Whitespace
|
|
@@ -3388,7 +3432,7 @@ const O = (e) => {
|
|
|
3388
3432
|
* @see https://tailwindcss.com/docs/content
|
|
3389
3433
|
*/
|
|
3390
3434
|
content: [{
|
|
3391
|
-
content: ["none",
|
|
3435
|
+
content: ["none", $]
|
|
3392
3436
|
}],
|
|
3393
3437
|
// Backgrounds
|
|
3394
3438
|
/**
|
|
@@ -3411,7 +3455,7 @@ const O = (e) => {
|
|
|
3411
3455
|
* @see https://tailwindcss.com/docs/background-opacity
|
|
3412
3456
|
*/
|
|
3413
3457
|
"bg-opacity": [{
|
|
3414
|
-
"bg-opacity": [
|
|
3458
|
+
"bg-opacity": [x]
|
|
3415
3459
|
}],
|
|
3416
3460
|
/**
|
|
3417
3461
|
* Background Origin
|
|
@@ -3441,7 +3485,7 @@ const O = (e) => {
|
|
|
3441
3485
|
* @see https://tailwindcss.com/docs/background-size
|
|
3442
3486
|
*/
|
|
3443
3487
|
"bg-size": [{
|
|
3444
|
-
bg: ["auto", "cover", "contain",
|
|
3488
|
+
bg: ["auto", "cover", "contain", In]
|
|
3445
3489
|
}],
|
|
3446
3490
|
/**
|
|
3447
3491
|
* Background Image
|
|
@@ -3450,7 +3494,7 @@ const O = (e) => {
|
|
|
3450
3494
|
"bg-image": [{
|
|
3451
3495
|
bg: ["none", {
|
|
3452
3496
|
"gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
3453
|
-
},
|
|
3497
|
+
}, Tn]
|
|
3454
3498
|
}],
|
|
3455
3499
|
/**
|
|
3456
3500
|
* Background Color
|
|
@@ -3485,21 +3529,21 @@ const O = (e) => {
|
|
|
3485
3529
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3486
3530
|
*/
|
|
3487
3531
|
"gradient-from": [{
|
|
3488
|
-
from: [
|
|
3532
|
+
from: [b]
|
|
3489
3533
|
}],
|
|
3490
3534
|
/**
|
|
3491
3535
|
* Gradient Color Stops Via
|
|
3492
3536
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3493
3537
|
*/
|
|
3494
3538
|
"gradient-via": [{
|
|
3495
|
-
via: [
|
|
3539
|
+
via: [b]
|
|
3496
3540
|
}],
|
|
3497
3541
|
/**
|
|
3498
3542
|
* Gradient Color Stops To
|
|
3499
3543
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3500
3544
|
*/
|
|
3501
3545
|
"gradient-to": [{
|
|
3502
|
-
to: [
|
|
3546
|
+
to: [b]
|
|
3503
3547
|
}],
|
|
3504
3548
|
// Borders
|
|
3505
3549
|
/**
|
|
@@ -3675,7 +3719,7 @@ const O = (e) => {
|
|
|
3675
3719
|
* @see https://tailwindcss.com/docs/border-opacity
|
|
3676
3720
|
*/
|
|
3677
3721
|
"border-opacity": [{
|
|
3678
|
-
"border-opacity": [
|
|
3722
|
+
"border-opacity": [x]
|
|
3679
3723
|
}],
|
|
3680
3724
|
/**
|
|
3681
3725
|
* Border Style
|
|
@@ -3713,7 +3757,7 @@ const O = (e) => {
|
|
|
3713
3757
|
* @see https://tailwindcss.com/docs/divide-opacity
|
|
3714
3758
|
*/
|
|
3715
3759
|
"divide-opacity": [{
|
|
3716
|
-
"divide-opacity": [
|
|
3760
|
+
"divide-opacity": [x]
|
|
3717
3761
|
}],
|
|
3718
3762
|
/**
|
|
3719
3763
|
* Divide Style
|
|
@@ -3804,7 +3848,7 @@ const O = (e) => {
|
|
|
3804
3848
|
* @see https://tailwindcss.com/docs/outline-offset
|
|
3805
3849
|
*/
|
|
3806
3850
|
"outline-offset": [{
|
|
3807
|
-
"outline-offset": [ee,
|
|
3851
|
+
"outline-offset": [ee, $]
|
|
3808
3852
|
}],
|
|
3809
3853
|
/**
|
|
3810
3854
|
* Outline Width
|
|
@@ -3825,7 +3869,7 @@ const O = (e) => {
|
|
|
3825
3869
|
* @see https://tailwindcss.com/docs/ring-width
|
|
3826
3870
|
*/
|
|
3827
3871
|
"ring-w": [{
|
|
3828
|
-
ring:
|
|
3872
|
+
ring: L()
|
|
3829
3873
|
}],
|
|
3830
3874
|
/**
|
|
3831
3875
|
* Ring Width Inset
|
|
@@ -3844,7 +3888,7 @@ const O = (e) => {
|
|
|
3844
3888
|
* @see https://tailwindcss.com/docs/ring-opacity
|
|
3845
3889
|
*/
|
|
3846
3890
|
"ring-opacity": [{
|
|
3847
|
-
"ring-opacity": [
|
|
3891
|
+
"ring-opacity": [x]
|
|
3848
3892
|
}],
|
|
3849
3893
|
/**
|
|
3850
3894
|
* Ring Offset Width
|
|
@@ -3866,7 +3910,7 @@ const O = (e) => {
|
|
|
3866
3910
|
* @see https://tailwindcss.com/docs/box-shadow
|
|
3867
3911
|
*/
|
|
3868
3912
|
shadow: [{
|
|
3869
|
-
shadow: ["", "inner", "none", ie,
|
|
3913
|
+
shadow: ["", "inner", "none", ie, Pn]
|
|
3870
3914
|
}],
|
|
3871
3915
|
/**
|
|
3872
3916
|
* Box Shadow Color
|
|
@@ -3880,7 +3924,7 @@ const O = (e) => {
|
|
|
3880
3924
|
* @see https://tailwindcss.com/docs/opacity
|
|
3881
3925
|
*/
|
|
3882
3926
|
opacity: [{
|
|
3883
|
-
opacity: [
|
|
3927
|
+
opacity: [x]
|
|
3884
3928
|
}],
|
|
3885
3929
|
/**
|
|
3886
3930
|
* Mix Blend Mode
|
|
@@ -3931,42 +3975,42 @@ const O = (e) => {
|
|
|
3931
3975
|
* @see https://tailwindcss.com/docs/drop-shadow
|
|
3932
3976
|
*/
|
|
3933
3977
|
"drop-shadow": [{
|
|
3934
|
-
"drop-shadow": ["", "none", ie,
|
|
3978
|
+
"drop-shadow": ["", "none", ie, $]
|
|
3935
3979
|
}],
|
|
3936
3980
|
/**
|
|
3937
3981
|
* Grayscale
|
|
3938
3982
|
* @see https://tailwindcss.com/docs/grayscale
|
|
3939
3983
|
*/
|
|
3940
3984
|
grayscale: [{
|
|
3941
|
-
grayscale: [
|
|
3985
|
+
grayscale: [d]
|
|
3942
3986
|
}],
|
|
3943
3987
|
/**
|
|
3944
3988
|
* Hue Rotate
|
|
3945
3989
|
* @see https://tailwindcss.com/docs/hue-rotate
|
|
3946
3990
|
*/
|
|
3947
3991
|
"hue-rotate": [{
|
|
3948
|
-
"hue-rotate": [
|
|
3992
|
+
"hue-rotate": [h]
|
|
3949
3993
|
}],
|
|
3950
3994
|
/**
|
|
3951
3995
|
* Invert
|
|
3952
3996
|
* @see https://tailwindcss.com/docs/invert
|
|
3953
3997
|
*/
|
|
3954
3998
|
invert: [{
|
|
3955
|
-
invert: [
|
|
3999
|
+
invert: [w]
|
|
3956
4000
|
}],
|
|
3957
4001
|
/**
|
|
3958
4002
|
* Saturate
|
|
3959
4003
|
* @see https://tailwindcss.com/docs/saturate
|
|
3960
4004
|
*/
|
|
3961
4005
|
saturate: [{
|
|
3962
|
-
saturate: [
|
|
4006
|
+
saturate: [f]
|
|
3963
4007
|
}],
|
|
3964
4008
|
/**
|
|
3965
4009
|
* Sepia
|
|
3966
4010
|
* @see https://tailwindcss.com/docs/sepia
|
|
3967
4011
|
*/
|
|
3968
4012
|
sepia: [{
|
|
3969
|
-
sepia: [
|
|
4013
|
+
sepia: [g]
|
|
3970
4014
|
}],
|
|
3971
4015
|
/**
|
|
3972
4016
|
* Backdrop Filter
|
|
@@ -4002,42 +4046,42 @@ const O = (e) => {
|
|
|
4002
4046
|
* @see https://tailwindcss.com/docs/backdrop-grayscale
|
|
4003
4047
|
*/
|
|
4004
4048
|
"backdrop-grayscale": [{
|
|
4005
|
-
"backdrop-grayscale": [
|
|
4049
|
+
"backdrop-grayscale": [d]
|
|
4006
4050
|
}],
|
|
4007
4051
|
/**
|
|
4008
4052
|
* Backdrop Hue Rotate
|
|
4009
4053
|
* @see https://tailwindcss.com/docs/backdrop-hue-rotate
|
|
4010
4054
|
*/
|
|
4011
4055
|
"backdrop-hue-rotate": [{
|
|
4012
|
-
"backdrop-hue-rotate": [
|
|
4056
|
+
"backdrop-hue-rotate": [h]
|
|
4013
4057
|
}],
|
|
4014
4058
|
/**
|
|
4015
4059
|
* Backdrop Invert
|
|
4016
4060
|
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
4017
4061
|
*/
|
|
4018
4062
|
"backdrop-invert": [{
|
|
4019
|
-
"backdrop-invert": [
|
|
4063
|
+
"backdrop-invert": [w]
|
|
4020
4064
|
}],
|
|
4021
4065
|
/**
|
|
4022
4066
|
* Backdrop Opacity
|
|
4023
4067
|
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
4024
4068
|
*/
|
|
4025
4069
|
"backdrop-opacity": [{
|
|
4026
|
-
"backdrop-opacity": [
|
|
4070
|
+
"backdrop-opacity": [x]
|
|
4027
4071
|
}],
|
|
4028
4072
|
/**
|
|
4029
4073
|
* Backdrop Saturate
|
|
4030
4074
|
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
4031
4075
|
*/
|
|
4032
4076
|
"backdrop-saturate": [{
|
|
4033
|
-
"backdrop-saturate": [
|
|
4077
|
+
"backdrop-saturate": [f]
|
|
4034
4078
|
}],
|
|
4035
4079
|
/**
|
|
4036
4080
|
* Backdrop Sepia
|
|
4037
4081
|
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
4038
4082
|
*/
|
|
4039
4083
|
"backdrop-sepia": [{
|
|
4040
|
-
"backdrop-sepia": [
|
|
4084
|
+
"backdrop-sepia": [g]
|
|
4041
4085
|
}],
|
|
4042
4086
|
// Tables
|
|
4043
4087
|
/**
|
|
@@ -4088,7 +4132,7 @@ const O = (e) => {
|
|
|
4088
4132
|
* @see https://tailwindcss.com/docs/transition-property
|
|
4089
4133
|
*/
|
|
4090
4134
|
transition: [{
|
|
4091
|
-
transition: ["none", "all", "", "colors", "opacity", "shadow", "transform",
|
|
4135
|
+
transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", $]
|
|
4092
4136
|
}],
|
|
4093
4137
|
/**
|
|
4094
4138
|
* Transition Duration
|
|
@@ -4102,7 +4146,7 @@ const O = (e) => {
|
|
|
4102
4146
|
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
4103
4147
|
*/
|
|
4104
4148
|
ease: [{
|
|
4105
|
-
ease: ["linear", "in", "out", "in-out",
|
|
4149
|
+
ease: ["linear", "in", "out", "in-out", $]
|
|
4106
4150
|
}],
|
|
4107
4151
|
/**
|
|
4108
4152
|
* Transition Delay
|
|
@@ -4116,7 +4160,7 @@ const O = (e) => {
|
|
|
4116
4160
|
* @see https://tailwindcss.com/docs/animation
|
|
4117
4161
|
*/
|
|
4118
4162
|
animate: [{
|
|
4119
|
-
animate: ["none", "spin", "ping", "pulse", "bounce",
|
|
4163
|
+
animate: ["none", "spin", "ping", "pulse", "bounce", $]
|
|
4120
4164
|
}],
|
|
4121
4165
|
// Transforms
|
|
4122
4166
|
/**
|
|
@@ -4131,42 +4175,42 @@ const O = (e) => {
|
|
|
4131
4175
|
* @see https://tailwindcss.com/docs/scale
|
|
4132
4176
|
*/
|
|
4133
4177
|
scale: [{
|
|
4134
|
-
scale: [
|
|
4178
|
+
scale: [p]
|
|
4135
4179
|
}],
|
|
4136
4180
|
/**
|
|
4137
4181
|
* Scale X
|
|
4138
4182
|
* @see https://tailwindcss.com/docs/scale
|
|
4139
4183
|
*/
|
|
4140
4184
|
"scale-x": [{
|
|
4141
|
-
"scale-x": [
|
|
4185
|
+
"scale-x": [p]
|
|
4142
4186
|
}],
|
|
4143
4187
|
/**
|
|
4144
4188
|
* Scale Y
|
|
4145
4189
|
* @see https://tailwindcss.com/docs/scale
|
|
4146
4190
|
*/
|
|
4147
4191
|
"scale-y": [{
|
|
4148
|
-
"scale-y": [
|
|
4192
|
+
"scale-y": [p]
|
|
4149
4193
|
}],
|
|
4150
4194
|
/**
|
|
4151
4195
|
* Rotate
|
|
4152
4196
|
* @see https://tailwindcss.com/docs/rotate
|
|
4153
4197
|
*/
|
|
4154
4198
|
rotate: [{
|
|
4155
|
-
rotate: [xe,
|
|
4199
|
+
rotate: [xe, $]
|
|
4156
4200
|
}],
|
|
4157
4201
|
/**
|
|
4158
4202
|
* Translate X
|
|
4159
4203
|
* @see https://tailwindcss.com/docs/translate
|
|
4160
4204
|
*/
|
|
4161
4205
|
"translate-x": [{
|
|
4162
|
-
"translate-x": [
|
|
4206
|
+
"translate-x": [M]
|
|
4163
4207
|
}],
|
|
4164
4208
|
/**
|
|
4165
4209
|
* Translate Y
|
|
4166
4210
|
* @see https://tailwindcss.com/docs/translate
|
|
4167
4211
|
*/
|
|
4168
4212
|
"translate-y": [{
|
|
4169
|
-
"translate-y": [
|
|
4213
|
+
"translate-y": [M]
|
|
4170
4214
|
}],
|
|
4171
4215
|
/**
|
|
4172
4216
|
* Skew X
|
|
@@ -4187,7 +4231,7 @@ const O = (e) => {
|
|
|
4187
4231
|
* @see https://tailwindcss.com/docs/transform-origin
|
|
4188
4232
|
*/
|
|
4189
4233
|
"transform-origin": [{
|
|
4190
|
-
origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left",
|
|
4234
|
+
origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", $]
|
|
4191
4235
|
}],
|
|
4192
4236
|
// Interactivity
|
|
4193
4237
|
/**
|
|
@@ -4209,7 +4253,7 @@ const O = (e) => {
|
|
|
4209
4253
|
* @see https://tailwindcss.com/docs/cursor
|
|
4210
4254
|
*/
|
|
4211
4255
|
cursor: [{
|
|
4212
|
-
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",
|
|
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", $]
|
|
4213
4257
|
}],
|
|
4214
4258
|
/**
|
|
4215
4259
|
* Caret Color
|
|
@@ -4244,126 +4288,126 @@ const O = (e) => {
|
|
|
4244
4288
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4245
4289
|
*/
|
|
4246
4290
|
"scroll-m": [{
|
|
4247
|
-
"scroll-m":
|
|
4291
|
+
"scroll-m": I()
|
|
4248
4292
|
}],
|
|
4249
4293
|
/**
|
|
4250
4294
|
* Scroll Margin X
|
|
4251
4295
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4252
4296
|
*/
|
|
4253
4297
|
"scroll-mx": [{
|
|
4254
|
-
"scroll-mx":
|
|
4298
|
+
"scroll-mx": I()
|
|
4255
4299
|
}],
|
|
4256
4300
|
/**
|
|
4257
4301
|
* Scroll Margin Y
|
|
4258
4302
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4259
4303
|
*/
|
|
4260
4304
|
"scroll-my": [{
|
|
4261
|
-
"scroll-my":
|
|
4305
|
+
"scroll-my": I()
|
|
4262
4306
|
}],
|
|
4263
4307
|
/**
|
|
4264
4308
|
* Scroll Margin Start
|
|
4265
4309
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4266
4310
|
*/
|
|
4267
4311
|
"scroll-ms": [{
|
|
4268
|
-
"scroll-ms":
|
|
4312
|
+
"scroll-ms": I()
|
|
4269
4313
|
}],
|
|
4270
4314
|
/**
|
|
4271
4315
|
* Scroll Margin End
|
|
4272
4316
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4273
4317
|
*/
|
|
4274
4318
|
"scroll-me": [{
|
|
4275
|
-
"scroll-me":
|
|
4319
|
+
"scroll-me": I()
|
|
4276
4320
|
}],
|
|
4277
4321
|
/**
|
|
4278
4322
|
* Scroll Margin Top
|
|
4279
4323
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4280
4324
|
*/
|
|
4281
4325
|
"scroll-mt": [{
|
|
4282
|
-
"scroll-mt":
|
|
4326
|
+
"scroll-mt": I()
|
|
4283
4327
|
}],
|
|
4284
4328
|
/**
|
|
4285
4329
|
* Scroll Margin Right
|
|
4286
4330
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4287
4331
|
*/
|
|
4288
4332
|
"scroll-mr": [{
|
|
4289
|
-
"scroll-mr":
|
|
4333
|
+
"scroll-mr": I()
|
|
4290
4334
|
}],
|
|
4291
4335
|
/**
|
|
4292
4336
|
* Scroll Margin Bottom
|
|
4293
4337
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4294
4338
|
*/
|
|
4295
4339
|
"scroll-mb": [{
|
|
4296
|
-
"scroll-mb":
|
|
4340
|
+
"scroll-mb": I()
|
|
4297
4341
|
}],
|
|
4298
4342
|
/**
|
|
4299
4343
|
* Scroll Margin Left
|
|
4300
4344
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4301
4345
|
*/
|
|
4302
4346
|
"scroll-ml": [{
|
|
4303
|
-
"scroll-ml":
|
|
4347
|
+
"scroll-ml": I()
|
|
4304
4348
|
}],
|
|
4305
4349
|
/**
|
|
4306
4350
|
* Scroll Padding
|
|
4307
4351
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4308
4352
|
*/
|
|
4309
4353
|
"scroll-p": [{
|
|
4310
|
-
"scroll-p":
|
|
4354
|
+
"scroll-p": I()
|
|
4311
4355
|
}],
|
|
4312
4356
|
/**
|
|
4313
4357
|
* Scroll Padding X
|
|
4314
4358
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4315
4359
|
*/
|
|
4316
4360
|
"scroll-px": [{
|
|
4317
|
-
"scroll-px":
|
|
4361
|
+
"scroll-px": I()
|
|
4318
4362
|
}],
|
|
4319
4363
|
/**
|
|
4320
4364
|
* Scroll Padding Y
|
|
4321
4365
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4322
4366
|
*/
|
|
4323
4367
|
"scroll-py": [{
|
|
4324
|
-
"scroll-py":
|
|
4368
|
+
"scroll-py": I()
|
|
4325
4369
|
}],
|
|
4326
4370
|
/**
|
|
4327
4371
|
* Scroll Padding Start
|
|
4328
4372
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4329
4373
|
*/
|
|
4330
4374
|
"scroll-ps": [{
|
|
4331
|
-
"scroll-ps":
|
|
4375
|
+
"scroll-ps": I()
|
|
4332
4376
|
}],
|
|
4333
4377
|
/**
|
|
4334
4378
|
* Scroll Padding End
|
|
4335
4379
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4336
4380
|
*/
|
|
4337
4381
|
"scroll-pe": [{
|
|
4338
|
-
"scroll-pe":
|
|
4382
|
+
"scroll-pe": I()
|
|
4339
4383
|
}],
|
|
4340
4384
|
/**
|
|
4341
4385
|
* Scroll Padding Top
|
|
4342
4386
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4343
4387
|
*/
|
|
4344
4388
|
"scroll-pt": [{
|
|
4345
|
-
"scroll-pt":
|
|
4389
|
+
"scroll-pt": I()
|
|
4346
4390
|
}],
|
|
4347
4391
|
/**
|
|
4348
4392
|
* Scroll Padding Right
|
|
4349
4393
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4350
4394
|
*/
|
|
4351
4395
|
"scroll-pr": [{
|
|
4352
|
-
"scroll-pr":
|
|
4396
|
+
"scroll-pr": I()
|
|
4353
4397
|
}],
|
|
4354
4398
|
/**
|
|
4355
4399
|
* Scroll Padding Bottom
|
|
4356
4400
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4357
4401
|
*/
|
|
4358
4402
|
"scroll-pb": [{
|
|
4359
|
-
"scroll-pb":
|
|
4403
|
+
"scroll-pb": I()
|
|
4360
4404
|
}],
|
|
4361
4405
|
/**
|
|
4362
4406
|
* Scroll Padding Left
|
|
4363
4407
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4364
4408
|
*/
|
|
4365
4409
|
"scroll-pl": [{
|
|
4366
|
-
"scroll-pl":
|
|
4410
|
+
"scroll-pl": I()
|
|
4367
4411
|
}],
|
|
4368
4412
|
/**
|
|
4369
4413
|
* Scroll Snap Align
|
|
@@ -4431,7 +4475,7 @@ const O = (e) => {
|
|
|
4431
4475
|
* @see https://tailwindcss.com/docs/will-change
|
|
4432
4476
|
*/
|
|
4433
4477
|
"will-change": [{
|
|
4434
|
-
"will-change": ["auto", "scroll", "contents", "transform",
|
|
4478
|
+
"will-change": ["auto", "scroll", "contents", "transform", $]
|
|
4435
4479
|
}],
|
|
4436
4480
|
// SVG
|
|
4437
4481
|
/**
|
|
@@ -4446,7 +4490,7 @@ const O = (e) => {
|
|
|
4446
4490
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
4447
4491
|
*/
|
|
4448
4492
|
"stroke-w": [{
|
|
4449
|
-
stroke: [ee, se,
|
|
4493
|
+
stroke: [ee, se, $e]
|
|
4450
4494
|
}],
|
|
4451
4495
|
/**
|
|
4452
4496
|
* Stroke
|
|
@@ -4521,117 +4565,117 @@ const O = (e) => {
|
|
|
4521
4565
|
"font-size": ["leading"]
|
|
4522
4566
|
}
|
|
4523
4567
|
};
|
|
4524
|
-
},
|
|
4525
|
-
function
|
|
4526
|
-
return
|
|
4568
|
+
}, Dn = /* @__PURE__ */ vn(Bn);
|
|
4569
|
+
function Wn(...e) {
|
|
4570
|
+
return Dn(Rt(e));
|
|
4527
4571
|
}
|
|
4528
|
-
function
|
|
4529
|
-
const [r, o] =
|
|
4572
|
+
function yr({ autoWidth: e = !0, className: t, style: n }) {
|
|
4573
|
+
const [r, o] = P(() => ne.getActiveAppId()), [i, a] = P(() => Q.getRunningApps()), { isMobile: c } = it();
|
|
4530
4574
|
D(() => {
|
|
4531
|
-
const
|
|
4532
|
-
o(
|
|
4575
|
+
const y = ne.subscribe("activeAppId", (x) => {
|
|
4576
|
+
o(x);
|
|
4533
4577
|
});
|
|
4534
4578
|
return () => {
|
|
4535
|
-
|
|
4579
|
+
y();
|
|
4536
4580
|
};
|
|
4537
4581
|
}, []), D(() => Q.subscribe(() => {
|
|
4538
4582
|
a(Q.getRunningApps());
|
|
4539
4583
|
}), []), D(() => {
|
|
4540
4584
|
if (!new URLSearchParams(window.location.search).has("app")) {
|
|
4541
|
-
const
|
|
4542
|
-
|
|
4585
|
+
const m = ne.getActiveAppId();
|
|
4586
|
+
m && !Q.isRunning(m) && Q.launchApp(m);
|
|
4543
4587
|
}
|
|
4544
4588
|
}, []);
|
|
4545
|
-
const l = (
|
|
4546
|
-
Q.closeApp(
|
|
4547
|
-
},
|
|
4589
|
+
const l = (y) => {
|
|
4590
|
+
Q.closeApp(y);
|
|
4591
|
+
}, d = r ? me.get(r) : null, w = (d == null ? void 0 : d.width) ?? 400, u = r !== null, v = { ...{
|
|
4548
4592
|
overflow: "hidden",
|
|
4549
|
-
display:
|
|
4593
|
+
display: u ? "flex" : "none",
|
|
4550
4594
|
flexDirection: "column",
|
|
4551
4595
|
flexShrink: 0,
|
|
4552
4596
|
// Only set width if autoWidth is enabled
|
|
4553
|
-
...e &&
|
|
4597
|
+
...e && u ? { width: c ? "100%" : w } : {}
|
|
4554
4598
|
}, ...n };
|
|
4555
|
-
return /* @__PURE__ */ s("div", { className:
|
|
4599
|
+
return /* @__PURE__ */ s("div", { className: Wn("nc-app-panel", t), style: v, children: i.map((y) => /* @__PURE__ */ s(
|
|
4556
4600
|
rt,
|
|
4557
4601
|
{
|
|
4558
|
-
appId:
|
|
4559
|
-
isActive: r ===
|
|
4560
|
-
onClose: () => l(
|
|
4602
|
+
appId: y.appId,
|
|
4603
|
+
isActive: r === y.appId,
|
|
4604
|
+
onClose: () => l(y.appId)
|
|
4561
4605
|
},
|
|
4562
|
-
|
|
4606
|
+
y.appId
|
|
4563
4607
|
)) });
|
|
4564
4608
|
}
|
|
4565
|
-
function
|
|
4609
|
+
function xr({
|
|
4566
4610
|
pinnedAppIds: e,
|
|
4567
4611
|
className: t = "",
|
|
4568
4612
|
showIndicators: n = !0,
|
|
4569
4613
|
side: r = "left",
|
|
4570
4614
|
getBadge: o
|
|
4571
4615
|
}) {
|
|
4572
|
-
const { t: i } = re(), { isMobile: a } = it(), [c, l] =
|
|
4616
|
+
const { t: i } = re(), { isMobile: a } = it(), [c, l] = P(() => ne.getActiveAppId()), [d, h] = P(() => Q.getRunningApps());
|
|
4573
4617
|
D(() => {
|
|
4574
|
-
const
|
|
4575
|
-
l(
|
|
4618
|
+
const f = ne.subscribe("activeAppId", (p) => {
|
|
4619
|
+
l(p);
|
|
4576
4620
|
});
|
|
4577
4621
|
return () => {
|
|
4578
|
-
|
|
4622
|
+
f();
|
|
4579
4623
|
};
|
|
4580
4624
|
}, []), D(() => Q.subscribe(() => {
|
|
4581
|
-
|
|
4625
|
+
h(Q.getRunningApps());
|
|
4582
4626
|
}), []);
|
|
4583
|
-
const
|
|
4584
|
-
c ===
|
|
4585
|
-
},
|
|
4586
|
-
const
|
|
4587
|
-
return
|
|
4627
|
+
const w = (f) => {
|
|
4628
|
+
c === f ? Q.setActiveApp(null) : Q.launchApp(f);
|
|
4629
|
+
}, u = e.map((f) => me.get(f)).filter((f) => !!f), b = d.filter((f) => !e.includes(f.appId)).map((f) => ({ running: f, def: me.get(f.appId) })).filter((f) => !!f.def), A = (f) => d.some((p) => p.appId === f), v = (f) => f.titleKey ? String(i(f.titleKey)) : f.id, y = (f) => typeof f == "number" && f > 99 ? "99+" : f, x = (f, p) => {
|
|
4630
|
+
const g = o == null ? void 0 : o(f, p);
|
|
4631
|
+
return g ? /* @__PURE__ */ s(
|
|
4588
4632
|
"span",
|
|
4589
4633
|
{
|
|
4590
|
-
className: `nc-app-taskbar-badge nc-${
|
|
4591
|
-
"aria-label":
|
|
4592
|
-
children:
|
|
4634
|
+
className: `nc-app-taskbar-badge nc-${g.tone ?? "default"}`,
|
|
4635
|
+
"aria-label": g.ariaLabel,
|
|
4636
|
+
children: y(g.content)
|
|
4593
4637
|
}
|
|
4594
4638
|
) : null;
|
|
4595
|
-
},
|
|
4596
|
-
return /* @__PURE__ */
|
|
4597
|
-
|
|
4598
|
-
const
|
|
4599
|
-
return /* @__PURE__ */
|
|
4639
|
+
}, m = a ? 24 : 28;
|
|
4640
|
+
return /* @__PURE__ */ k("div", { className: `nc-app-taskbar ${a ? "nc-mobile" : "nc-desktop"} nc-${r} ${t}`, children: [
|
|
4641
|
+
u.map((f) => {
|
|
4642
|
+
const p = f.icon, g = c === f.id, C = A(f.id), T = { isActive: g, isRunning: C, isPinned: !0 };
|
|
4643
|
+
return /* @__PURE__ */ k(
|
|
4600
4644
|
"button",
|
|
4601
4645
|
{
|
|
4602
|
-
className: `nc-app-taskbar-button ${
|
|
4603
|
-
onClick: () =>
|
|
4604
|
-
title: v(
|
|
4646
|
+
className: `nc-app-taskbar-button ${g ? "nc-active" : ""} ${C ? "nc-running" : ""}`,
|
|
4647
|
+
onClick: () => w(f.id),
|
|
4648
|
+
title: v(f),
|
|
4605
4649
|
children: [
|
|
4606
|
-
/* @__PURE__ */ s(
|
|
4607
|
-
|
|
4650
|
+
/* @__PURE__ */ s(p, { size: m }),
|
|
4651
|
+
x(f, T),
|
|
4608
4652
|
n && C && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
|
|
4609
4653
|
]
|
|
4610
4654
|
},
|
|
4611
|
-
|
|
4655
|
+
f.id
|
|
4612
4656
|
);
|
|
4613
4657
|
}),
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
const
|
|
4617
|
-
return /* @__PURE__ */
|
|
4658
|
+
b.length > 0 && /* @__PURE__ */ s("div", { className: "nc-app-taskbar-separator" }),
|
|
4659
|
+
b.map(({ running: f, def: p }) => {
|
|
4660
|
+
const g = p.icon, C = c === f.appId, T = { isActive: C, isRunning: !0, isPinned: !1 };
|
|
4661
|
+
return /* @__PURE__ */ k(
|
|
4618
4662
|
"button",
|
|
4619
4663
|
{
|
|
4620
4664
|
className: `nc-app-taskbar-button ${C ? "nc-active" : ""} nc-running`,
|
|
4621
|
-
onClick: () =>
|
|
4622
|
-
title: v(
|
|
4665
|
+
onClick: () => w(f.appId),
|
|
4666
|
+
title: v(p),
|
|
4623
4667
|
children: [
|
|
4624
|
-
/* @__PURE__ */ s(
|
|
4625
|
-
|
|
4668
|
+
/* @__PURE__ */ s(g, { size: m }),
|
|
4669
|
+
x(p, T),
|
|
4626
4670
|
n && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
|
|
4627
4671
|
]
|
|
4628
4672
|
},
|
|
4629
|
-
|
|
4673
|
+
f.appId
|
|
4630
4674
|
);
|
|
4631
4675
|
})
|
|
4632
4676
|
] });
|
|
4633
4677
|
}
|
|
4634
|
-
function
|
|
4678
|
+
function kr({
|
|
4635
4679
|
appId: e,
|
|
4636
4680
|
open: t,
|
|
4637
4681
|
onClose: n,
|
|
@@ -4669,68 +4713,68 @@ function yr({
|
|
|
4669
4713
|
return Ae(c, document.body);
|
|
4670
4714
|
}
|
|
4671
4715
|
const De = ge(null), pt = ge(null);
|
|
4672
|
-
function
|
|
4716
|
+
function Nr() {
|
|
4673
4717
|
const e = ce(De);
|
|
4674
4718
|
if (!e)
|
|
4675
4719
|
throw new Error("useNavStack must be used within a NavStackProvider");
|
|
4676
4720
|
return e;
|
|
4677
4721
|
}
|
|
4678
|
-
function
|
|
4722
|
+
function Ar() {
|
|
4679
4723
|
const e = ce(pt);
|
|
4680
4724
|
if (!e)
|
|
4681
4725
|
throw new Error("useNavView must be used within NavStack");
|
|
4682
4726
|
return e;
|
|
4683
4727
|
}
|
|
4684
4728
|
const We = ge(null);
|
|
4685
|
-
function
|
|
4686
|
-
const { t: n } = re(), r =
|
|
4729
|
+
function Sr({ rootView: e, children: t }) {
|
|
4730
|
+
const { t: n } = re(), r = tn(), [o, i] = P([e]), [a, c] = P([null]), l = G((p, g) => {
|
|
4687
4731
|
c((C) => {
|
|
4688
4732
|
const T = [...C];
|
|
4689
|
-
return T[
|
|
4733
|
+
return T[p] = g, T;
|
|
4690
4734
|
});
|
|
4691
|
-
}, []),
|
|
4692
|
-
c((
|
|
4693
|
-
const C = [...
|
|
4694
|
-
return C[
|
|
4735
|
+
}, []), d = G((p) => {
|
|
4736
|
+
c((g) => {
|
|
4737
|
+
const C = [...g];
|
|
4738
|
+
return C[p] = null, C;
|
|
4695
4739
|
});
|
|
4696
|
-
}, []),
|
|
4697
|
-
i((
|
|
4698
|
-
}, []),
|
|
4699
|
-
i((
|
|
4700
|
-
}, []),
|
|
4740
|
+
}, []), h = G((p) => {
|
|
4741
|
+
i((g) => [...g, p]), c((g) => [...g, null]);
|
|
4742
|
+
}, []), w = G(() => {
|
|
4743
|
+
i((p) => p.length <= 1 ? p : p.slice(0, -1)), c((p) => p.slice(0, -1));
|
|
4744
|
+
}, []), u = G(() => {
|
|
4701
4745
|
i([e]), c([null]);
|
|
4702
|
-
}, [e]),
|
|
4746
|
+
}, [e]), b = o.length, A = b > 1, v = o.length - 1, y = o[o.length - 1], x = y != null && y.titleKey ? n(y.titleKey) : (y == null ? void 0 : y.title) ?? "";
|
|
4703
4747
|
D(() => {
|
|
4704
|
-
r.setTitle(
|
|
4705
|
-
}, [
|
|
4706
|
-
A ? r.setBackHandler(
|
|
4707
|
-
}, [A,
|
|
4708
|
-
const
|
|
4709
|
-
|
|
4748
|
+
r.setTitle(x);
|
|
4749
|
+
}, [x, r]), D(() => {
|
|
4750
|
+
A ? r.setBackHandler(w) : r.clearBackHandler();
|
|
4751
|
+
}, [A, w, r]), D(() => {
|
|
4752
|
+
const p = a[a.length - 1];
|
|
4753
|
+
p ? r.setToolbar(p) : r.clearToolbar();
|
|
4710
4754
|
}, [a, r]);
|
|
4711
|
-
const
|
|
4712
|
-
push:
|
|
4713
|
-
pop:
|
|
4714
|
-
reset:
|
|
4715
|
-
depth:
|
|
4755
|
+
const m = {
|
|
4756
|
+
push: h,
|
|
4757
|
+
pop: w,
|
|
4758
|
+
reset: u,
|
|
4759
|
+
depth: b,
|
|
4716
4760
|
canGoBack: A,
|
|
4717
|
-
currentTitle:
|
|
4718
|
-
},
|
|
4761
|
+
currentTitle: x
|
|
4762
|
+
}, f = {
|
|
4719
4763
|
stack: o,
|
|
4720
4764
|
toolbarStack: a,
|
|
4721
4765
|
updateToolbar: l,
|
|
4722
|
-
clearToolbarAt:
|
|
4766
|
+
clearToolbarAt: d,
|
|
4723
4767
|
topIndex: v
|
|
4724
4768
|
};
|
|
4725
|
-
return /* @__PURE__ */ s(De.Provider, { value:
|
|
4769
|
+
return /* @__PURE__ */ s(De.Provider, { value: m, children: /* @__PURE__ */ s(We.Provider, { value: f, children: t }) });
|
|
4726
4770
|
}
|
|
4727
|
-
function
|
|
4771
|
+
function Hn({ index: e, children: t }) {
|
|
4728
4772
|
const n = ce(We);
|
|
4729
4773
|
if (!n)
|
|
4730
4774
|
throw new Error("NavViewProvider must be used within NavStackProvider");
|
|
4731
|
-
const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n, a =
|
|
4732
|
-
e === i && r(e,
|
|
4733
|
-
}, [e, i, r]), c =
|
|
4775
|
+
const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n, a = G((d) => {
|
|
4776
|
+
e === i && r(e, d);
|
|
4777
|
+
}, [e, i, r]), c = G(() => {
|
|
4734
4778
|
e === i && o(e);
|
|
4735
4779
|
}, [e, i, o]), l = {
|
|
4736
4780
|
setToolbar: a,
|
|
@@ -4738,14 +4782,14 @@ function Dn({ index: e, children: t }) {
|
|
|
4738
4782
|
};
|
|
4739
4783
|
return /* @__PURE__ */ s(pt.Provider, { value: l, children: t });
|
|
4740
4784
|
}
|
|
4741
|
-
function
|
|
4785
|
+
function Cr() {
|
|
4742
4786
|
const e = ce(De), t = ce(We);
|
|
4743
4787
|
if (!e || !t)
|
|
4744
4788
|
throw new Error("NavStackContainer must be used within a NavStackProvider");
|
|
4745
4789
|
const { stack: n } = t;
|
|
4746
4790
|
return /* @__PURE__ */ s("div", { className: "nav-stack-container", children: /* @__PURE__ */ s("div", { className: "nav-stack-content", children: n.map((r, o) => {
|
|
4747
4791
|
const i = o === n.length - 1;
|
|
4748
|
-
return /* @__PURE__ */ s(
|
|
4792
|
+
return /* @__PURE__ */ s(Hn, { index: o, children: /* @__PURE__ */ s(
|
|
4749
4793
|
"div",
|
|
4750
4794
|
{
|
|
4751
4795
|
style: { display: i ? "flex" : "none", flexDirection: "column", height: "100%" },
|
|
@@ -4756,54 +4800,54 @@ function Ar() {
|
|
|
4756
4800
|
}
|
|
4757
4801
|
export {
|
|
4758
4802
|
Qe as ActivityIndicator,
|
|
4759
|
-
|
|
4803
|
+
Un as Alert,
|
|
4760
4804
|
rt as AppContainer,
|
|
4761
4805
|
nt as AppContext,
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4806
|
+
kr as AppDialog,
|
|
4807
|
+
yr as AppPanel,
|
|
4808
|
+
xr as AppTaskbar,
|
|
4809
|
+
rn as AppTitleBar,
|
|
4810
|
+
qn as Battery,
|
|
4767
4811
|
te as Button,
|
|
4768
|
-
|
|
4769
|
-
|
|
4812
|
+
Xn as ButtonGroup,
|
|
4813
|
+
Jn as Checkbox,
|
|
4770
4814
|
Ze as CloseButton,
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4815
|
+
Qn as ComboBox,
|
|
4816
|
+
rr as ContextMenu,
|
|
4817
|
+
mr as CsvTextArea,
|
|
4818
|
+
or as Dialog,
|
|
4775
4819
|
fe as DialogClose,
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4820
|
+
er as EditButton,
|
|
4821
|
+
nr as Hyperlink,
|
|
4822
|
+
sr as Input,
|
|
4823
|
+
cr as ListGroup,
|
|
4824
|
+
ir as ListGroupItem,
|
|
4825
|
+
lr as MonthRangePicker,
|
|
4826
|
+
ar as MultiSelect,
|
|
4827
|
+
Cr as NavStackContainer,
|
|
4828
|
+
Sr as NavStackProvider,
|
|
4829
|
+
Xt as Notification,
|
|
4830
|
+
gr as NotificationContainer,
|
|
4831
|
+
dr as NumberInput,
|
|
4832
|
+
Zn as RefreshButton,
|
|
4833
|
+
ur as Slider,
|
|
4834
|
+
jt as TabPanel,
|
|
4835
|
+
pr as TabPanels,
|
|
4836
|
+
fr as Tabs,
|
|
4837
|
+
hr as Toggle,
|
|
4838
|
+
tr as TrashButton,
|
|
4839
|
+
wr as ViewportProvider,
|
|
4796
4840
|
me as appRegistry,
|
|
4797
4841
|
ne as appStateStore,
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4842
|
+
Wn as cn,
|
|
4843
|
+
vr as createAppI18nFactory,
|
|
4844
|
+
br as notificationManager,
|
|
4801
4845
|
Q as runningAppsStore,
|
|
4802
|
-
|
|
4803
|
-
|
|
4846
|
+
Jt as showNotification,
|
|
4847
|
+
tn as useApp,
|
|
4804
4848
|
Dt as useDialog,
|
|
4805
|
-
|
|
4806
|
-
|
|
4849
|
+
Nr as useNavStack,
|
|
4850
|
+
Ar as useNavView,
|
|
4807
4851
|
it as useViewport
|
|
4808
4852
|
};
|
|
4809
4853
|
//# sourceMappingURL=index.js.map
|