@kingsimba/nc-ui 0.1.34 → 0.1.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -3
- package/dist/index.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +15 -4
- package/dist/index.js +998 -919
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { jsx as s, jsxs as N, Fragment as
|
|
5
|
-
import { d as
|
|
6
|
-
import
|
|
7
|
-
import { createPortal as
|
|
8
|
-
import { useTranslation as
|
|
9
|
-
import
|
|
10
|
-
import { c as
|
|
11
|
-
function
|
|
1
|
+
var ht = Object.defineProperty;
|
|
2
|
+
var mt = (e, t, n) => t in e ? ht(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var oe = (e, t, n) => mt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { jsx as s, jsxs as N, Fragment as Le } from "react/jsx-runtime";
|
|
5
|
+
import { d as Pe, 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 R, useRef as F, useEffect as D, useMemo as Me, createContext as ge, useContext as ce, Children as At, isValidElement as St, forwardRef as Ct, useImperativeHandle as $t, useCallback as Y, Suspense as Mt } from "react";
|
|
7
|
+
import { createPortal as Ae } from "react-dom";
|
|
8
|
+
import { useTranslation as re } from "react-i18next";
|
|
9
|
+
import It from "i18next";
|
|
10
|
+
import { c as Rt } from "./clsx-OuTLNxxd.js";
|
|
11
|
+
function Qe({
|
|
12
12
|
size: e = "default",
|
|
13
13
|
color: t,
|
|
14
14
|
overlay: n = !1,
|
|
@@ -37,8 +37,8 @@ function _e({
|
|
|
37
37
|
);
|
|
38
38
|
return n ? /* @__PURE__ */ s("div", { className: "nc-activity-indicator-overlay", children: o }) : o;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
const
|
|
40
|
+
function te({ variant: e = "default", block: t, size: n = "default", appearance: r = "default", className: o, disabled: i, textSelectable: a, loading: c, onClick: l, children: u, ...f }) {
|
|
41
|
+
const b = [
|
|
42
42
|
"nc-button",
|
|
43
43
|
e !== "default" ? `nc-${e}` : "",
|
|
44
44
|
t ? "nc-block" : "",
|
|
@@ -53,13 +53,13 @@ function X({ variant: e = "default", block: t, size: n = "default", appearance:
|
|
|
53
53
|
return /* @__PURE__ */ N(
|
|
54
54
|
"button",
|
|
55
55
|
{
|
|
56
|
-
className:
|
|
56
|
+
className: b,
|
|
57
57
|
disabled: i || c,
|
|
58
58
|
onClick: (m) => {
|
|
59
59
|
if (!c) {
|
|
60
60
|
if (a) {
|
|
61
|
-
const
|
|
62
|
-
if (
|
|
61
|
+
const A = window.getSelection();
|
|
62
|
+
if (A && A.toString().length > 0)
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
65
|
l == null || l(m);
|
|
@@ -68,7 +68,7 @@ function X({ variant: e = "default", block: t, size: n = "default", appearance:
|
|
|
68
68
|
...f,
|
|
69
69
|
children: [
|
|
70
70
|
c && /* @__PURE__ */ s(
|
|
71
|
-
|
|
71
|
+
Qe,
|
|
72
72
|
{
|
|
73
73
|
size: "small",
|
|
74
74
|
className: "nc-button-spinner",
|
|
@@ -80,14 +80,14 @@ function X({ variant: e = "default", block: t, size: n = "default", appearance:
|
|
|
80
80
|
}
|
|
81
81
|
);
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const Tt = {
|
|
84
84
|
info: "primary",
|
|
85
85
|
success: "success",
|
|
86
86
|
warning: "warning",
|
|
87
87
|
error: "danger",
|
|
88
88
|
danger: "danger"
|
|
89
89
|
};
|
|
90
|
-
function
|
|
90
|
+
function Kn({
|
|
91
91
|
code: e,
|
|
92
92
|
text: t,
|
|
93
93
|
type: n,
|
|
@@ -98,7 +98,7 @@ function Gn({
|
|
|
98
98
|
className: c = "",
|
|
99
99
|
style: l
|
|
100
100
|
}) {
|
|
101
|
-
const u = i ?? /* @__PURE__ */ N(
|
|
101
|
+
const u = i ?? /* @__PURE__ */ N(Le, { children: [
|
|
102
102
|
e !== void 0 && /* @__PURE__ */ s("span", { className: "nc-alert-code", children: e }),
|
|
103
103
|
t
|
|
104
104
|
] });
|
|
@@ -112,22 +112,22 @@ function Gn({
|
|
|
112
112
|
className: "nc-alert-close",
|
|
113
113
|
"aria-label": "Close alert",
|
|
114
114
|
onClick: a,
|
|
115
|
-
children: /* @__PURE__ */ s(
|
|
115
|
+
children: /* @__PURE__ */ s(Pe, { size: 16 })
|
|
116
116
|
}
|
|
117
117
|
)
|
|
118
118
|
] }),
|
|
119
119
|
r && /* @__PURE__ */ s("span", { className: "nc-alert-action", children: /* @__PURE__ */ s(
|
|
120
|
-
|
|
120
|
+
te,
|
|
121
121
|
{
|
|
122
122
|
size: "small",
|
|
123
|
-
variant: r.variant ??
|
|
123
|
+
variant: r.variant ?? Tt[n],
|
|
124
124
|
onClick: o,
|
|
125
125
|
children: r.text
|
|
126
126
|
}
|
|
127
127
|
) })
|
|
128
128
|
] });
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function _n({
|
|
131
131
|
percentage: e = 0.5,
|
|
132
132
|
status: t = "discharging",
|
|
133
133
|
darkMode: n = !1,
|
|
@@ -136,47 +136,47 @@ function Yn({
|
|
|
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 ? "#ffffff" : "#000000";
|
|
139
|
-
const c = "var(--nc-battery-shell-bg)", l = 24, u = 14, f = 2,
|
|
139
|
+
const c = "var(--nc-battery-shell-bg)", l = 24, u = 14, f = 2, b = 0, d = 12, m = 0, A = 0, v = 0, w = l, y = u, h = y - m * 2, p = w - m * 2, g = Math.max(1, Math.min(4, y / 4)), x = o === 0 ? 0 : 0.05 + o * 0.95, C = l + f + d, T = 20, E = 0.65, S = Math.max(u, T * E), L = l + f + 1, k = (u - T * E) / 2;
|
|
140
140
|
return /* @__PURE__ */ N(
|
|
141
141
|
"svg",
|
|
142
142
|
{
|
|
143
143
|
className: "nc-battery",
|
|
144
144
|
width: C,
|
|
145
|
-
height:
|
|
146
|
-
viewBox: `0 0 ${C} ${
|
|
145
|
+
height: S,
|
|
146
|
+
viewBox: `0 0 ${C} ${S}`,
|
|
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: p *
|
|
150
|
+
/* @__PURE__ */ s("defs", { children: /* @__PURE__ */ s("mask", { id: `nc-battery-fill-mask-${o}`, children: /* @__PURE__ */ s("rect", { x: "0", y: "0", width: p * x, height: h, fill: "white" }) }) }),
|
|
151
151
|
/* @__PURE__ */ s(
|
|
152
152
|
"rect",
|
|
153
153
|
{
|
|
154
|
-
x:
|
|
155
|
-
y:
|
|
156
|
-
rx:
|
|
157
|
-
ry:
|
|
154
|
+
x: A,
|
|
155
|
+
y: v,
|
|
156
|
+
rx: g,
|
|
157
|
+
ry: g,
|
|
158
158
|
width: w,
|
|
159
|
-
height:
|
|
159
|
+
height: y,
|
|
160
160
|
fill: c
|
|
161
161
|
}
|
|
162
162
|
),
|
|
163
163
|
/* @__PURE__ */ s(
|
|
164
164
|
"rect",
|
|
165
165
|
{
|
|
166
|
-
x:
|
|
167
|
-
y:
|
|
166
|
+
x: A + m,
|
|
167
|
+
y: v + m,
|
|
168
168
|
width: p,
|
|
169
|
-
height:
|
|
169
|
+
height: h,
|
|
170
170
|
fill: a,
|
|
171
|
-
rx:
|
|
172
|
-
ry:
|
|
171
|
+
rx: g,
|
|
172
|
+
ry: g,
|
|
173
173
|
mask: `url(#nc-battery-fill-mask-${o})`
|
|
174
174
|
}
|
|
175
175
|
),
|
|
176
176
|
/* @__PURE__ */ s(
|
|
177
177
|
"text",
|
|
178
178
|
{
|
|
179
|
-
x:
|
|
179
|
+
x: A + w / 2,
|
|
180
180
|
y: u - 3,
|
|
181
181
|
fontSize: 11,
|
|
182
182
|
fontWeight: "bold",
|
|
@@ -188,7 +188,7 @@ function Yn({
|
|
|
188
188
|
/* @__PURE__ */ s(
|
|
189
189
|
"rect",
|
|
190
190
|
{
|
|
191
|
-
x: l +
|
|
191
|
+
x: l + b,
|
|
192
192
|
y: u * 0.26,
|
|
193
193
|
width: f,
|
|
194
194
|
height: u * 0.48,
|
|
@@ -197,12 +197,12 @@ function Yn({
|
|
|
197
197
|
fill: o === 1 ? a : c
|
|
198
198
|
}
|
|
199
199
|
),
|
|
200
|
-
t === "charging" ? /* @__PURE__ */ s("g", { transform: `translate(${
|
|
200
|
+
t === "charging" ? /* @__PURE__ */ s("g", { transform: `translate(${L}, ${k}) scale(${E})`, 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 Un({
|
|
206
206
|
value: e,
|
|
207
207
|
onChange: t,
|
|
208
208
|
options: n,
|
|
@@ -224,7 +224,7 @@ function Kn({
|
|
|
224
224
|
);
|
|
225
225
|
}) });
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function Et({ size: e }) {
|
|
228
228
|
return /* @__PURE__ */ s("svg", { className: `nc-checkbox-icon ${e === "small" ? "nc-small" : ""}`, viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ s(
|
|
229
229
|
"path",
|
|
230
230
|
{
|
|
@@ -236,7 +236,7 @@ function It({ size: e }) {
|
|
|
236
236
|
}
|
|
237
237
|
) });
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function qn({ checked: e, onChange: t, disabled: n, label: r, size: o = "default", labelColor: i, style: a, className: c = "" }) {
|
|
240
240
|
const l = o === "small";
|
|
241
241
|
return /* @__PURE__ */ N(
|
|
242
242
|
"label",
|
|
@@ -257,7 +257,7 @@ function _n({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
|
|
|
257
257
|
onKeyDown: (u) => {
|
|
258
258
|
n || (u.key === "Enter" || u.key === " ") && (u.preventDefault(), t(!e));
|
|
259
259
|
},
|
|
260
|
-
children: e && /* @__PURE__ */ s(
|
|
260
|
+
children: e && /* @__PURE__ */ s(Et, { size: o })
|
|
261
261
|
}
|
|
262
262
|
),
|
|
263
263
|
r && /* @__PURE__ */ s("span", { className: "nc-checkbox-text", style: i ? { color: i } : void 0, children: r })
|
|
@@ -265,34 +265,38 @@ function _n({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
|
|
|
265
265
|
}
|
|
266
266
|
);
|
|
267
267
|
}
|
|
268
|
-
function
|
|
269
|
-
const
|
|
270
|
-
return
|
|
271
|
-
r &&
|
|
272
|
-
}, [r]), /* @__PURE__ */
|
|
268
|
+
function Lt({ option: e, onChange: t, selected: n, highlighted: r, small: o, renderOption: i, index: a }) {
|
|
269
|
+
const c = F(null), { t: l } = re(), u = e.disabled === !0;
|
|
270
|
+
return D(() => {
|
|
271
|
+
r && c.current && c.current.scrollIntoView({ block: "nearest" });
|
|
272
|
+
}, [r]), /* @__PURE__ */ s(
|
|
273
273
|
"div",
|
|
274
274
|
{
|
|
275
|
-
ref:
|
|
276
|
-
className: `nc-combo-dropdown-option ${o ? "nc-small" : ""} ${r ? "nc-highlighted" : ""}`,
|
|
275
|
+
ref: c,
|
|
276
|
+
className: `nc-combo-dropdown-option ${o ? "nc-small" : ""} ${r ? "nc-highlighted" : ""} ${u ? "nc-disabled" : ""}`,
|
|
277
277
|
role: "option",
|
|
278
|
-
|
|
278
|
+
onClick: () => {
|
|
279
|
+
u || t(e.value, e.label);
|
|
280
|
+
},
|
|
279
281
|
"aria-selected": n,
|
|
282
|
+
"aria-disabled": u,
|
|
280
283
|
style: {
|
|
281
|
-
cursor: "pointer",
|
|
282
|
-
|
|
284
|
+
cursor: u ? "default" : "pointer",
|
|
285
|
+
opacity: u ? 0.4 : void 0,
|
|
286
|
+
background: r && !u ? "rgba(59,130,246,0.18)" : n && !u ? "rgba(59,130,246,0.12)" : void 0
|
|
283
287
|
},
|
|
284
|
-
children: [
|
|
288
|
+
children: i ? i(e, a, !!r) : /* @__PURE__ */ N(Le, { children: [
|
|
285
289
|
e.label,
|
|
286
290
|
e.default && /* @__PURE__ */ N("span", { style: { fontSize: "0.85em", color: "var(--nc-text-weak)", marginLeft: 6 }, children: [
|
|
287
291
|
"(",
|
|
288
|
-
|
|
292
|
+
l("common.default"),
|
|
289
293
|
")"
|
|
290
294
|
] })
|
|
291
|
-
]
|
|
295
|
+
] })
|
|
292
296
|
}
|
|
293
297
|
);
|
|
294
298
|
}
|
|
295
|
-
function
|
|
299
|
+
function Pt({
|
|
296
300
|
isOpen: e,
|
|
297
301
|
options: t,
|
|
298
302
|
onSelect: n,
|
|
@@ -300,44 +304,46 @@ function Et({
|
|
|
300
304
|
placement: o = "bottom",
|
|
301
305
|
anchorRef: i,
|
|
302
306
|
small: a,
|
|
303
|
-
highlightedIndex: c = -1
|
|
307
|
+
highlightedIndex: c = -1,
|
|
308
|
+
renderOption: l
|
|
304
309
|
}) {
|
|
305
|
-
const [
|
|
306
|
-
if (
|
|
310
|
+
const [u, f] = R({ top: 0, left: 0, width: 0 }), [b, d] = R(o), { t: m } = re();
|
|
311
|
+
if (D(() => {
|
|
307
312
|
if (e && i.current) {
|
|
308
|
-
const
|
|
309
|
-
let
|
|
313
|
+
const v = i.current.getBoundingClientRect();
|
|
314
|
+
let w = o;
|
|
310
315
|
if (o === "bottom") {
|
|
311
|
-
const
|
|
312
|
-
|
|
316
|
+
const y = window.innerHeight - v.bottom, h = v.top;
|
|
317
|
+
y < 320 && h > y && (w = "top");
|
|
313
318
|
}
|
|
314
|
-
|
|
315
|
-
top:
|
|
316
|
-
left:
|
|
317
|
-
width:
|
|
319
|
+
d(w), f({
|
|
320
|
+
top: w === "top" ? v.top - 4 : v.bottom + 4,
|
|
321
|
+
left: v.left,
|
|
322
|
+
width: v.width
|
|
318
323
|
});
|
|
319
324
|
}
|
|
320
325
|
}, [e, i, o]), !e) return null;
|
|
321
|
-
const
|
|
326
|
+
const A = /* @__PURE__ */ s(
|
|
322
327
|
"div",
|
|
323
328
|
{
|
|
324
329
|
className: "nc-combo-dropdown",
|
|
330
|
+
onMouseDown: (v) => v.stopPropagation(),
|
|
325
331
|
style: {
|
|
326
332
|
position: "fixed",
|
|
327
|
-
top:
|
|
328
|
-
bottom:
|
|
329
|
-
left:
|
|
330
|
-
width:
|
|
333
|
+
top: b === "top" ? void 0 : u.top,
|
|
334
|
+
bottom: b === "top" ? window.innerHeight - u.top : void 0,
|
|
335
|
+
left: u.left,
|
|
336
|
+
width: u.width,
|
|
331
337
|
zIndex: 1e3,
|
|
332
338
|
maxHeight: 300,
|
|
333
339
|
overflowY: "auto"
|
|
334
340
|
},
|
|
335
|
-
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: m("common.noResults") }) : t.map((v, w) => /* @__PURE__ */ s(Lt, { option: v, onChange: n, selected: v.value === r, highlighted: w === c, small: a, renderOption: l, index: w }, v.value))
|
|
336
342
|
}
|
|
337
343
|
);
|
|
338
|
-
return
|
|
344
|
+
return Ae(A, document.body);
|
|
339
345
|
}
|
|
340
|
-
function
|
|
346
|
+
function zt({ onClick: e, small: t }) {
|
|
341
347
|
return /* @__PURE__ */ s(
|
|
342
348
|
"span",
|
|
343
349
|
{
|
|
@@ -356,7 +362,7 @@ function Tt({ onClick: e, small: t }) {
|
|
|
356
362
|
}
|
|
357
363
|
);
|
|
358
364
|
}
|
|
359
|
-
function
|
|
365
|
+
function Bt({ open: e, small: t }) {
|
|
360
366
|
return /* @__PURE__ */ s(
|
|
361
367
|
"span",
|
|
362
368
|
{
|
|
@@ -366,143 +372,207 @@ function Pt({ open: e, small: t }) {
|
|
|
366
372
|
}
|
|
367
373
|
);
|
|
368
374
|
}
|
|
369
|
-
function
|
|
375
|
+
function Xn({
|
|
370
376
|
value: e,
|
|
371
377
|
onChange: t,
|
|
372
378
|
placeholder: n = "Select…",
|
|
373
379
|
options: r,
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
380
|
+
candidates: o,
|
|
381
|
+
renderOption: i,
|
|
382
|
+
renderSelected: a,
|
|
383
|
+
selectedOption: c,
|
|
384
|
+
disabled: l,
|
|
385
|
+
label: u,
|
|
386
|
+
clearable: f = !0,
|
|
387
|
+
allowTyping: b = !1,
|
|
388
|
+
placement: d = "bottom",
|
|
389
|
+
size: m = "default",
|
|
390
|
+
appearance: A = "default",
|
|
381
391
|
textAlign: v = "left",
|
|
382
|
-
style:
|
|
383
|
-
className:
|
|
392
|
+
style: w,
|
|
393
|
+
className: y
|
|
384
394
|
}) {
|
|
385
|
-
const [
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
+
const [h, p] = R(!1), [g, x] = R(""), [C, T] = R(-1), E = F(null), S = F(null), L = F(null), k = m === "small", { t: $ } = re(), P = !!o, H = b || P, [ae, X] = R([]), [K, _] = R(() => {
|
|
396
|
+
if (r && e) {
|
|
397
|
+
const I = r.find((W) => W.value === e);
|
|
398
|
+
return I ? I.label : "";
|
|
399
|
+
}
|
|
400
|
+
return o && e ? e : "";
|
|
401
|
+
});
|
|
402
|
+
D(() => {
|
|
403
|
+
if (!e) {
|
|
404
|
+
_("");
|
|
405
|
+
return;
|
|
395
406
|
}
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
407
|
+
if (r) {
|
|
408
|
+
const I = r.find((W) => W.value === e);
|
|
409
|
+
I && _(I.label);
|
|
410
|
+
} else o && _(e);
|
|
411
|
+
}, [e, r, o]);
|
|
412
|
+
const U = (I, W = !1) => {
|
|
413
|
+
if (!o) return;
|
|
414
|
+
L.current && clearTimeout(L.current);
|
|
415
|
+
const B = async () => {
|
|
416
|
+
try {
|
|
417
|
+
const G = await o(I);
|
|
418
|
+
X(G), T(-1);
|
|
419
|
+
} catch {
|
|
420
|
+
X([]);
|
|
421
|
+
}
|
|
422
|
+
};
|
|
423
|
+
W ? B() : L.current = setTimeout(B, 200);
|
|
424
|
+
}, j = Me(() => {
|
|
425
|
+
if (P) return ae;
|
|
426
|
+
const I = g.toLowerCase();
|
|
427
|
+
return H ? (r || []).filter((W) => W.label.toLowerCase().includes(I)) : r || [];
|
|
428
|
+
}, [r, g, H, P, ae]);
|
|
429
|
+
D(() => {
|
|
430
|
+
h && T(-1);
|
|
431
|
+
}, [h, j]), D(() => {
|
|
432
|
+
if (!f && !e && r && r.length > 0 && t) {
|
|
433
|
+
const I = r.find((W) => W.default) || r[0];
|
|
434
|
+
t(I.value);
|
|
400
435
|
}
|
|
401
|
-
|
|
436
|
+
}, [f, e, r, t]), D(() => {
|
|
437
|
+
function I(W) {
|
|
438
|
+
var B;
|
|
439
|
+
W.target instanceof Node && E.current && ((B = E.current.parentElement) != null && B.contains(W.target) || p(!1));
|
|
440
|
+
}
|
|
441
|
+
return document.addEventListener("mousedown", I), () => document.removeEventListener("mousedown", I);
|
|
402
442
|
}, []);
|
|
403
|
-
const
|
|
404
|
-
var
|
|
405
|
-
t == null || t(
|
|
406
|
-
},
|
|
407
|
-
t == null || t(void 0),
|
|
408
|
-
},
|
|
409
|
-
if (!
|
|
410
|
-
(
|
|
443
|
+
const z = c ?? (r ? r.find((I) => I.value === e) : e ? { label: K, value: e } : void 0), q = z && f, le = !l && !q, pe = `nc-align-${v}`, ve = !(h && H) && !!z, de = (I, W, B = !1) => {
|
|
444
|
+
var G;
|
|
445
|
+
_(W), t == null || t(I), p(!1), x(""), B && ((G = E.current) == null || G.blur());
|
|
446
|
+
}, we = () => {
|
|
447
|
+
t == null || t(void 0), x(""), p(!1);
|
|
448
|
+
}, ye = (I) => {
|
|
449
|
+
if (!h) {
|
|
450
|
+
(I.key === "ArrowDown" || I.key === "ArrowUp") && (p(!0), I.preventDefault());
|
|
411
451
|
return;
|
|
412
452
|
}
|
|
413
|
-
|
|
453
|
+
const W = (B, G) => {
|
|
454
|
+
if (G === 1) {
|
|
455
|
+
for (let V = B; V < j.length; V++)
|
|
456
|
+
if (!j[V].disabled) return V;
|
|
457
|
+
for (let V = 0; V < B; V++)
|
|
458
|
+
if (!j[V].disabled) return V;
|
|
459
|
+
} else {
|
|
460
|
+
for (let V = B; V >= 0; V--)
|
|
461
|
+
if (!j[V].disabled) return V;
|
|
462
|
+
for (let V = j.length - 1; V > B; V--)
|
|
463
|
+
if (!j[V].disabled) return V;
|
|
464
|
+
}
|
|
465
|
+
return B;
|
|
466
|
+
};
|
|
467
|
+
switch (I.key) {
|
|
414
468
|
case "ArrowDown":
|
|
415
|
-
|
|
416
|
-
const
|
|
417
|
-
return W
|
|
469
|
+
I.preventDefault(), T((B) => {
|
|
470
|
+
const G = B + 1, V = G >= j.length ? 0 : G;
|
|
471
|
+
return W(V, 1);
|
|
418
472
|
});
|
|
419
473
|
break;
|
|
420
474
|
case "ArrowUp":
|
|
421
|
-
|
|
422
|
-
const
|
|
423
|
-
return W
|
|
475
|
+
I.preventDefault(), T((B) => {
|
|
476
|
+
const G = B - 1, V = G < 0 ? j.length - 1 : G;
|
|
477
|
+
return W(V, -1);
|
|
424
478
|
});
|
|
425
479
|
break;
|
|
426
480
|
case "Enter":
|
|
427
|
-
|
|
481
|
+
I.preventDefault(), C >= 0 && C < j.length && !j[C].disabled && de(j[C].value, j[C].label, !0);
|
|
428
482
|
break;
|
|
429
483
|
case "Escape":
|
|
430
|
-
|
|
484
|
+
I.preventDefault(), p(!1), x("");
|
|
431
485
|
break;
|
|
432
486
|
}
|
|
433
487
|
};
|
|
434
|
-
return /* @__PURE__ */ N("div", { className: `nc-combo-container ${
|
|
435
|
-
|
|
488
|
+
return /* @__PURE__ */ N("div", { className: `nc-combo-container ${A === "transparent" ? "nc-transparent" : ""} ${A === "plain" ? "nc-plain" : ""} ${h ? "nc-open" : ""} ${pe} ${y || ""}`.trim(), style: { position: "relative", ...w }, children: [
|
|
489
|
+
u && /* @__PURE__ */ s("span", { className: `nc-label ${k ? "nc-small" : ""}`, children: u }),
|
|
436
490
|
/* @__PURE__ */ N(
|
|
437
491
|
"div",
|
|
438
492
|
{
|
|
439
|
-
ref:
|
|
493
|
+
ref: S,
|
|
440
494
|
style: { position: "relative", display: "flex", alignItems: "center" },
|
|
441
|
-
onMouseDown: (
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
495
|
+
onMouseDown: (I) => {
|
|
496
|
+
if (l || H && I.target === E.current) return;
|
|
497
|
+
const W = !h;
|
|
498
|
+
if (p((B) => (!B && H && z && x(z.label), !B)), P && W) {
|
|
499
|
+
const B = H && z ? z.label : "";
|
|
500
|
+
X([]), setTimeout(() => U(B, !0), 0);
|
|
501
|
+
}
|
|
502
|
+
H && !h && setTimeout(() => {
|
|
503
|
+
var B, G;
|
|
504
|
+
(B = E.current) == null || B.focus(), (G = E.current) == null || G.select();
|
|
505
|
+
}, 0);
|
|
446
506
|
},
|
|
447
507
|
children: [
|
|
448
508
|
/* @__PURE__ */ s(
|
|
449
509
|
"input",
|
|
450
510
|
{
|
|
451
|
-
ref:
|
|
452
|
-
className: `nc-input ${
|
|
511
|
+
ref: E,
|
|
512
|
+
className: `nc-input ${k ? "nc-small" : ""}`,
|
|
453
513
|
placeholder: n,
|
|
454
514
|
onFocus: () => {
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
515
|
+
if (!l && H) {
|
|
516
|
+
p(!0);
|
|
517
|
+
const I = z ? z.label : "";
|
|
518
|
+
z && (x(I), setTimeout(() => {
|
|
519
|
+
var W;
|
|
520
|
+
return (W = E.current) == null ? void 0 : W.select();
|
|
521
|
+
}, 0)), P && (X([]), U(I, !0));
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
onChange: (I) => {
|
|
525
|
+
const W = I.target.value;
|
|
526
|
+
H && (x(W), P && U(W));
|
|
459
527
|
},
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
readOnly: o || !c,
|
|
528
|
+
onKeyDown: ye,
|
|
529
|
+
value: h && H ? g : (z == null ? void 0 : z.label) || "",
|
|
530
|
+
readOnly: l || !H,
|
|
464
531
|
style: {
|
|
465
532
|
width: "100%",
|
|
466
|
-
paddingRight:
|
|
467
|
-
caretColor:
|
|
468
|
-
cursor:
|
|
469
|
-
userSelect:
|
|
470
|
-
color:
|
|
533
|
+
paddingRight: le || q ? k ? 32 : 44 : 12,
|
|
534
|
+
caretColor: b ? void 0 : "transparent",
|
|
535
|
+
cursor: b ? void 0 : "pointer",
|
|
536
|
+
userSelect: b ? void 0 : "none",
|
|
537
|
+
color: ve ? "transparent" : "var(--nc-text)"
|
|
471
538
|
}
|
|
472
539
|
}
|
|
473
540
|
),
|
|
474
|
-
|
|
541
|
+
ve && /* @__PURE__ */ s(
|
|
475
542
|
"div",
|
|
476
543
|
{
|
|
477
544
|
"aria-hidden": !0,
|
|
478
|
-
className: `nc-combo-overlay ${
|
|
545
|
+
className: `nc-combo-overlay ${pe}`,
|
|
479
546
|
style: {
|
|
480
547
|
position: "absolute",
|
|
481
|
-
left:
|
|
482
|
-
right:
|
|
548
|
+
left: k ? 8 : 12,
|
|
549
|
+
right: le || q ? k ? 12 : 24 : k ? 8 : 12,
|
|
483
550
|
top: "50%",
|
|
484
551
|
transform: "translateY(-50%)",
|
|
485
|
-
pointerEvents: "none"
|
|
552
|
+
pointerEvents: "none",
|
|
553
|
+
display: "flex",
|
|
554
|
+
alignItems: "center",
|
|
555
|
+
gap: 6
|
|
486
556
|
},
|
|
487
|
-
children: [
|
|
488
|
-
/* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${
|
|
489
|
-
(
|
|
557
|
+
children: a && z ? a(z) : /* @__PURE__ */ N(Le, { children: [
|
|
558
|
+
/* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${k ? "nc-small" : ""}`, children: z == null ? void 0 : z.label }),
|
|
559
|
+
(z == null ? void 0 : z.default) && /* @__PURE__ */ N("span", { className: `nc-combo-overlay-default ${k ? "nc-small" : ""}`, children: [
|
|
490
560
|
"(",
|
|
491
|
-
|
|
561
|
+
$("common.default"),
|
|
492
562
|
")"
|
|
493
563
|
] })
|
|
494
|
-
]
|
|
564
|
+
] })
|
|
495
565
|
}
|
|
496
566
|
),
|
|
497
|
-
|
|
498
|
-
|
|
567
|
+
q && /* @__PURE__ */ s(zt, { onClick: we, small: k }),
|
|
568
|
+
le && /* @__PURE__ */ s(Bt, { open: h, small: k })
|
|
499
569
|
]
|
|
500
570
|
}
|
|
501
571
|
),
|
|
502
|
-
/* @__PURE__ */ s(
|
|
572
|
+
/* @__PURE__ */ s(Pt, { isOpen: h, options: j, onSelect: de, selectedValue: e, placement: d, anchorRef: S, small: k, highlightedIndex: C, renderOption: i })
|
|
503
573
|
] });
|
|
504
574
|
}
|
|
505
|
-
function
|
|
575
|
+
function Jn({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default", title: o, "aria-label": i }) {
|
|
506
576
|
return /* @__PURE__ */ s(
|
|
507
577
|
"button",
|
|
508
578
|
{
|
|
@@ -512,11 +582,11 @@ function qn({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default"
|
|
|
512
582
|
title: o ?? (t ? "Refreshing..." : "Refresh"),
|
|
513
583
|
"aria-label": i ?? (t ? "Refreshing" : "Refresh"),
|
|
514
584
|
"data-size": r,
|
|
515
|
-
children: /* @__PURE__ */ s(
|
|
585
|
+
children: /* @__PURE__ */ s(bt, { size: r === "small" ? 14 : r === "large" ? 20 : 18, className: t ? "nc-spinning" : "" })
|
|
516
586
|
}
|
|
517
587
|
);
|
|
518
588
|
}
|
|
519
|
-
function
|
|
589
|
+
function Ze({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Close", "aria-label": o = "Close" }) {
|
|
520
590
|
return /* @__PURE__ */ s(
|
|
521
591
|
"button",
|
|
522
592
|
{
|
|
@@ -526,11 +596,11 @@ function Ue({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Clo
|
|
|
526
596
|
title: r,
|
|
527
597
|
"aria-label": o,
|
|
528
598
|
"data-size": n,
|
|
529
|
-
children: /* @__PURE__ */ s(
|
|
599
|
+
children: /* @__PURE__ */ s(Pe, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
|
|
530
600
|
}
|
|
531
601
|
);
|
|
532
602
|
}
|
|
533
|
-
function
|
|
603
|
+
function Qn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Edit", "aria-label": o = "Edit" }) {
|
|
534
604
|
return /* @__PURE__ */ s(
|
|
535
605
|
"button",
|
|
536
606
|
{
|
|
@@ -540,11 +610,11 @@ function Xn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Edi
|
|
|
540
610
|
title: r,
|
|
541
611
|
"aria-label": o,
|
|
542
612
|
"data-size": n,
|
|
543
|
-
children: /* @__PURE__ */ s(
|
|
613
|
+
children: /* @__PURE__ */ s(gt, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
|
|
544
614
|
}
|
|
545
615
|
);
|
|
546
616
|
}
|
|
547
|
-
function
|
|
617
|
+
function Zn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Delete", "aria-label": o = "Delete" }) {
|
|
548
618
|
return /* @__PURE__ */ s(
|
|
549
619
|
"button",
|
|
550
620
|
{
|
|
@@ -554,11 +624,11 @@ function Jn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Del
|
|
|
554
624
|
title: r,
|
|
555
625
|
"aria-label": o,
|
|
556
626
|
"data-size": n,
|
|
557
|
-
children: /* @__PURE__ */ s(
|
|
627
|
+
children: /* @__PURE__ */ s(vt, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
|
|
558
628
|
}
|
|
559
629
|
);
|
|
560
630
|
}
|
|
561
|
-
function
|
|
631
|
+
function er({ onClick: e, disabled: t = !1, children: n, title: r, "aria-label": o, size: i = "default" }) {
|
|
562
632
|
return /* @__PURE__ */ s(
|
|
563
633
|
"button",
|
|
564
634
|
{
|
|
@@ -572,7 +642,7 @@ function Zn({ onClick: e, disabled: t = !1, children: n, title: r, "aria-label":
|
|
|
572
642
|
}
|
|
573
643
|
);
|
|
574
644
|
}
|
|
575
|
-
function
|
|
645
|
+
function tr({
|
|
576
646
|
open: e,
|
|
577
647
|
onClose: t,
|
|
578
648
|
options: n,
|
|
@@ -580,27 +650,27 @@ function Qn({
|
|
|
580
650
|
anchor: o,
|
|
581
651
|
preferredDirection: i = "down"
|
|
582
652
|
}) {
|
|
583
|
-
const a =
|
|
584
|
-
if (
|
|
653
|
+
const a = F(null), [c, l] = R({ top: 0, left: 0 }), u = o || (r == null ? void 0 : r.current);
|
|
654
|
+
if (D(() => {
|
|
585
655
|
if (!e || !u || !a.current) return;
|
|
586
|
-
const d = u.getBoundingClientRect(), m = a.current.getBoundingClientRect(),
|
|
587
|
-
let
|
|
588
|
-
(!
|
|
656
|
+
const d = u.getBoundingClientRect(), m = a.current.getBoundingClientRect(), A = window.innerHeight, v = window.innerWidth, w = d.bottom + 8, y = w + m.height <= A - 8;
|
|
657
|
+
let h = i;
|
|
658
|
+
(!y && i === "down" || i === "up" && y) && (h = "up");
|
|
589
659
|
let p;
|
|
590
|
-
|
|
591
|
-
let
|
|
592
|
-
|
|
660
|
+
h === "down" ? p = w : p = d.top - m.height - 8;
|
|
661
|
+
let g = d.left;
|
|
662
|
+
g + m.width > v - 8 && (g = d.right - m.width), l({
|
|
593
663
|
top: Math.max(8, p),
|
|
594
664
|
// Ensure minimum 8px from top
|
|
595
|
-
left: Math.max(8,
|
|
665
|
+
left: Math.max(8, g)
|
|
596
666
|
// Ensure minimum 8px from left
|
|
597
667
|
});
|
|
598
|
-
}, [e, u, i]),
|
|
668
|
+
}, [e, u, i]), D(() => {
|
|
599
669
|
if (!e) return;
|
|
600
|
-
const d = (
|
|
601
|
-
a.current && !a.current.contains(
|
|
602
|
-
}, m = (
|
|
603
|
-
|
|
670
|
+
const d = (A) => {
|
|
671
|
+
a.current && !a.current.contains(A.target) && u && !u.contains(A.target) && t();
|
|
672
|
+
}, m = (A) => {
|
|
673
|
+
A.key === "Escape" && t();
|
|
604
674
|
};
|
|
605
675
|
return document.addEventListener("mousedown", d), document.addEventListener("keydown", m), () => {
|
|
606
676
|
document.removeEventListener("mousedown", d), document.removeEventListener("keydown", m);
|
|
@@ -608,8 +678,8 @@ function Qn({
|
|
|
608
678
|
}, [e, t, u]), !e) return null;
|
|
609
679
|
const f = (d) => {
|
|
610
680
|
d.type !== "separator" && !d.disabled && d.onClick && (d.onClick(), t());
|
|
611
|
-
},
|
|
612
|
-
return
|
|
681
|
+
}, b = n.some((d) => d.icon);
|
|
682
|
+
return Ae(
|
|
613
683
|
/* @__PURE__ */ s(
|
|
614
684
|
"div",
|
|
615
685
|
{
|
|
@@ -636,7 +706,7 @@ function Qn({
|
|
|
636
706
|
"nc-context-menu-item",
|
|
637
707
|
d.variant && d.variant !== "default" ? `nc-${d.variant}` : "",
|
|
638
708
|
d.disabled ? "nc-disabled" : "",
|
|
639
|
-
|
|
709
|
+
b && !d.icon ? "nc-indented" : ""
|
|
640
710
|
].filter(Boolean).join(" ");
|
|
641
711
|
return /* @__PURE__ */ N(
|
|
642
712
|
"button",
|
|
@@ -658,20 +728,20 @@ function Qn({
|
|
|
658
728
|
document.body
|
|
659
729
|
);
|
|
660
730
|
}
|
|
661
|
-
const
|
|
662
|
-
function
|
|
663
|
-
const e =
|
|
731
|
+
const et = ge(null);
|
|
732
|
+
function Dt() {
|
|
733
|
+
const e = ce(et);
|
|
664
734
|
if (!e)
|
|
665
735
|
throw new Error("useDialog must be used inside a Dialog component");
|
|
666
736
|
return e;
|
|
667
737
|
}
|
|
668
|
-
function
|
|
669
|
-
const { close: r } =
|
|
670
|
-
return /* @__PURE__ */ s(
|
|
738
|
+
function fe({ children: e, onClick: t, ...n }) {
|
|
739
|
+
const { close: r } = Dt(), { t: o } = re();
|
|
740
|
+
return /* @__PURE__ */ s(te, { onClick: (a) => {
|
|
671
741
|
t == null || t(a), r();
|
|
672
742
|
}, ...n, children: e ?? o("common.close") });
|
|
673
743
|
}
|
|
674
|
-
function
|
|
744
|
+
function nr({
|
|
675
745
|
open: e,
|
|
676
746
|
onClose: t,
|
|
677
747
|
title: n,
|
|
@@ -683,59 +753,59 @@ function er({
|
|
|
683
753
|
onSave: l,
|
|
684
754
|
onDelete: u,
|
|
685
755
|
onCancel: f,
|
|
686
|
-
onConnect:
|
|
756
|
+
onConnect: b,
|
|
687
757
|
closeOnOverlay: d = !0,
|
|
688
758
|
primaryDisabled: m = !1,
|
|
689
|
-
fullScreen:
|
|
690
|
-
hideTitleBar:
|
|
759
|
+
fullScreen: A = !1,
|
|
760
|
+
hideTitleBar: v = !1,
|
|
691
761
|
className: w = "",
|
|
692
|
-
onContentHeightChange:
|
|
762
|
+
onContentHeightChange: y
|
|
693
763
|
}) {
|
|
694
|
-
const
|
|
695
|
-
d &&
|
|
764
|
+
const h = F(null), p = F(null), { t: g } = re(), x = { close: t }, C = (S) => {
|
|
765
|
+
d && S.target === S.currentTarget && t();
|
|
696
766
|
};
|
|
697
|
-
if (
|
|
698
|
-
e &&
|
|
699
|
-
}, [e]),
|
|
700
|
-
if (!
|
|
701
|
-
const
|
|
702
|
-
for (const
|
|
703
|
-
const $ =
|
|
704
|
-
|
|
767
|
+
if (D(() => {
|
|
768
|
+
e && h.current && h.current.focus();
|
|
769
|
+
}, [e]), D(() => {
|
|
770
|
+
if (!y || !p.current) return;
|
|
771
|
+
const S = new ResizeObserver((L) => {
|
|
772
|
+
for (const k of L) {
|
|
773
|
+
const $ = k.contentRect.height;
|
|
774
|
+
y($);
|
|
705
775
|
}
|
|
706
776
|
});
|
|
707
|
-
return
|
|
708
|
-
|
|
777
|
+
return S.observe(p.current), () => {
|
|
778
|
+
S.disconnect();
|
|
709
779
|
};
|
|
710
|
-
}, [
|
|
780
|
+
}, [y]), !e) return null;
|
|
711
781
|
const T = () => {
|
|
712
782
|
switch (i) {
|
|
713
783
|
case "ok":
|
|
714
|
-
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(
|
|
784
|
+
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(te, { variant: "primary", onClick: c ?? t, disabled: m, children: g("common.ok") }) });
|
|
715
785
|
case "ok-cancel":
|
|
716
786
|
return /* @__PURE__ */ N("div", { className: "nc-dialog-footer", children: [
|
|
717
|
-
/* @__PURE__ */ s(
|
|
718
|
-
/* @__PURE__ */ s(
|
|
787
|
+
/* @__PURE__ */ s(fe, { onClick: f, children: g("common.cancel") }),
|
|
788
|
+
/* @__PURE__ */ s(te, { variant: "primary", onClick: c ?? t, disabled: m, children: g("common.ok") })
|
|
719
789
|
] });
|
|
720
790
|
case "save-cancel":
|
|
721
791
|
return /* @__PURE__ */ N("div", { className: "nc-dialog-footer", children: [
|
|
722
|
-
/* @__PURE__ */ s(
|
|
723
|
-
/* @__PURE__ */ s(
|
|
792
|
+
/* @__PURE__ */ s(fe, { onClick: f, children: g("common.cancel") }),
|
|
793
|
+
/* @__PURE__ */ s(te, { variant: "primary", onClick: l, disabled: m, children: g("common.save") })
|
|
724
794
|
] });
|
|
725
795
|
case "delete-cancel":
|
|
726
796
|
return /* @__PURE__ */ N("div", { className: "nc-dialog-footer", children: [
|
|
727
|
-
/* @__PURE__ */ s(
|
|
728
|
-
/* @__PURE__ */ s(
|
|
797
|
+
/* @__PURE__ */ s(fe, { onClick: f, children: g("common.cancel") }),
|
|
798
|
+
/* @__PURE__ */ s(te, { variant: "danger", onClick: u, disabled: m, children: g("common.delete") })
|
|
729
799
|
] });
|
|
730
800
|
case "connect":
|
|
731
801
|
return /* @__PURE__ */ N("div", { className: "nc-dialog-footer", children: [
|
|
732
|
-
/* @__PURE__ */ s(
|
|
733
|
-
/* @__PURE__ */ s(
|
|
802
|
+
/* @__PURE__ */ s(fe, { onClick: f, children: g("common.cancel") }),
|
|
803
|
+
/* @__PURE__ */ s(te, { variant: "primary", onClick: b, disabled: m, children: g("common.connect") })
|
|
734
804
|
] });
|
|
735
805
|
case "close":
|
|
736
|
-
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(
|
|
806
|
+
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(fe, { variant: "primary" }) });
|
|
737
807
|
case "gotit":
|
|
738
|
-
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(
|
|
808
|
+
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(fe, { variant: "primary", children: g("common.gotit") }) });
|
|
739
809
|
case "custom":
|
|
740
810
|
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: a });
|
|
741
811
|
case "none":
|
|
@@ -743,29 +813,29 @@ function er({
|
|
|
743
813
|
default:
|
|
744
814
|
return null;
|
|
745
815
|
}
|
|
746
|
-
},
|
|
816
|
+
}, E = /* @__PURE__ */ s(et.Provider, { value: x, children: /* @__PURE__ */ s("div", { className: `nc-dialog-overlay${A ? " nc-fullscreen" : ""}`, onClick: C, children: /* @__PURE__ */ N(
|
|
747
817
|
"div",
|
|
748
818
|
{
|
|
749
|
-
ref:
|
|
819
|
+
ref: h,
|
|
750
820
|
className: `nc-dialog-container ${w}`,
|
|
751
821
|
style: o,
|
|
752
822
|
tabIndex: -1,
|
|
753
823
|
role: "dialog",
|
|
754
824
|
"aria-modal": "true",
|
|
755
|
-
"aria-labelledby":
|
|
825
|
+
"aria-labelledby": v ? void 0 : "nc-dialog-title",
|
|
756
826
|
children: [
|
|
757
|
-
!
|
|
827
|
+
!v && /* @__PURE__ */ N("div", { className: "nc-dialog-header", children: [
|
|
758
828
|
/* @__PURE__ */ s("h3", { id: "nc-dialog-title", className: "nc-dialog-title", children: n }),
|
|
759
|
-
/* @__PURE__ */ s(
|
|
829
|
+
/* @__PURE__ */ s(Ze, { onClick: t, "aria-label": "Close dialog" })
|
|
760
830
|
] }),
|
|
761
831
|
/* @__PURE__ */ s("div", { ref: p, className: "nc-dialog-content", children: r }),
|
|
762
832
|
T()
|
|
763
833
|
]
|
|
764
834
|
}
|
|
765
835
|
) }) });
|
|
766
|
-
return
|
|
836
|
+
return A ? Ae(E, document.body) : E;
|
|
767
837
|
}
|
|
768
|
-
function
|
|
838
|
+
function Wt({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
|
|
769
839
|
const r = t === "small" ? 28 : 34;
|
|
770
840
|
return /* @__PURE__ */ s(
|
|
771
841
|
"button",
|
|
@@ -794,7 +864,7 @@ function zt({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
|
|
|
794
864
|
}
|
|
795
865
|
);
|
|
796
866
|
}
|
|
797
|
-
function
|
|
867
|
+
function Ht({ visible: e, onClick: t, size: n = "default" }) {
|
|
798
868
|
const r = n === "small" ? 28 : 34, o = n === "small" ? 16 : 18;
|
|
799
869
|
return /* @__PURE__ */ s(
|
|
800
870
|
"button",
|
|
@@ -818,11 +888,11 @@ function Bt({ visible: e, onClick: t, size: n = "default" }) {
|
|
|
818
888
|
alignItems: "center",
|
|
819
889
|
justifyContent: "center"
|
|
820
890
|
},
|
|
821
|
-
children: e ? /* @__PURE__ */ s(
|
|
891
|
+
children: e ? /* @__PURE__ */ s(wt, { size: o }) : /* @__PURE__ */ s(yt, { size: o })
|
|
822
892
|
}
|
|
823
893
|
);
|
|
824
894
|
}
|
|
825
|
-
function
|
|
895
|
+
function rr({
|
|
826
896
|
value: e,
|
|
827
897
|
defaultValue: t = "",
|
|
828
898
|
onChange: n,
|
|
@@ -834,124 +904,133 @@ function tr({
|
|
|
834
904
|
label: l,
|
|
835
905
|
clearable: u = !0,
|
|
836
906
|
type: f = "text",
|
|
837
|
-
className:
|
|
907
|
+
className: b = "",
|
|
838
908
|
size: d = "default",
|
|
839
909
|
appearance: m = "default",
|
|
840
|
-
style:
|
|
841
|
-
leadingIcon:
|
|
910
|
+
style: A,
|
|
911
|
+
leadingIcon: v,
|
|
842
912
|
showPasswordToggle: w = !1,
|
|
843
|
-
multiline:
|
|
844
|
-
rows:
|
|
913
|
+
multiline: y = !1,
|
|
914
|
+
rows: h = 3,
|
|
845
915
|
validator: p,
|
|
846
|
-
showErrorMessage:
|
|
916
|
+
showErrorMessage: g = !0
|
|
847
917
|
}) {
|
|
848
|
-
const
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
}, [
|
|
852
|
-
const
|
|
853
|
-
let
|
|
854
|
-
|
|
855
|
-
const
|
|
856
|
-
if (!
|
|
857
|
-
return
|
|
858
|
-
const
|
|
859
|
-
return
|
|
860
|
-
},
|
|
861
|
-
|
|
862
|
-
},
|
|
863
|
-
var
|
|
864
|
-
if (
|
|
865
|
-
|
|
918
|
+
const x = F(null), C = F(null), T = F(!1), [E, S] = R(!1), [L, k] = R(!1), [$, P] = R(!1), H = e !== void 0, [ae, X] = R(t), K = H ? e : ae, [_, U] = R(K), j = p ? p(K) : null, z = !!j, q = !y && m === "plain", le = q && L, pe = le ? _ : K;
|
|
919
|
+
D(() => {
|
|
920
|
+
le || U(K);
|
|
921
|
+
}, [K, le]);
|
|
922
|
+
const ve = f === "password", de = ve && w && !c && !y, we = u && pe && !c && (L || $), ye = d === "small" ? 32 : 44;
|
|
923
|
+
let I = 12;
|
|
924
|
+
we && de ? I = ye * 2 : (we || de) && (I = ye);
|
|
925
|
+
const B = v ? d === "small" ? 28 : 34 : void 0, G = () => {
|
|
926
|
+
if (!q)
|
|
927
|
+
return K;
|
|
928
|
+
const J = _ !== K;
|
|
929
|
+
return H || X(_), J && (n == null || n(_), r == null || r(_)), _;
|
|
930
|
+
}, V = () => {
|
|
931
|
+
U(K);
|
|
932
|
+
}, ft = () => {
|
|
933
|
+
var J, Z, Ge;
|
|
934
|
+
if (q) {
|
|
935
|
+
U(""), i == null || i(), (J = x.current) == null || J.focus();
|
|
866
936
|
return;
|
|
867
937
|
}
|
|
868
|
-
|
|
869
|
-
},
|
|
870
|
-
if (
|
|
871
|
-
|
|
938
|
+
H || X(""), n == null || n(""), i == null || i(), y ? (Z = C.current) == null || Z.focus() : (Ge = x.current) == null || Ge.focus();
|
|
939
|
+
}, He = (J) => {
|
|
940
|
+
if (q && J.key === "Escape") {
|
|
941
|
+
J.preventDefault(), T.current = !0, V(), J.currentTarget.blur();
|
|
872
942
|
return;
|
|
873
943
|
}
|
|
874
|
-
if (
|
|
875
|
-
const
|
|
876
|
-
|
|
944
|
+
if (J.key === "Enter" && !y) {
|
|
945
|
+
const Z = q ? G() : K;
|
|
946
|
+
q && (J.preventDefault(), T.current = !0, J.currentTarget.blur()), o == null || o(Z);
|
|
877
947
|
}
|
|
878
|
-
},
|
|
879
|
-
const
|
|
880
|
-
if (
|
|
881
|
-
|
|
948
|
+
}, Ve = (J) => {
|
|
949
|
+
const Z = J.target.value;
|
|
950
|
+
if (q) {
|
|
951
|
+
U(Z), n == null || n(Z);
|
|
882
952
|
return;
|
|
883
953
|
}
|
|
884
|
-
|
|
885
|
-
},
|
|
886
|
-
|
|
887
|
-
},
|
|
888
|
-
if (
|
|
889
|
-
T.current = !1,
|
|
954
|
+
H || X(Z), n == null || n(Z);
|
|
955
|
+
}, Oe = () => {
|
|
956
|
+
k(!0), q && U(K);
|
|
957
|
+
}, Fe = () => {
|
|
958
|
+
if (q && T.current) {
|
|
959
|
+
T.current = !1, k(!1);
|
|
890
960
|
return;
|
|
891
961
|
}
|
|
892
|
-
|
|
893
|
-
},
|
|
894
|
-
return /* @__PURE__ */ N(
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
962
|
+
q && G(), k(!1);
|
|
963
|
+
}, je = `nc-input ${d === "small" ? "nc-small " : ""}${!y && m === "plain" ? "nc-plain " : ""}${z ? "nc-error " : ""}${b}`;
|
|
964
|
+
return /* @__PURE__ */ N(
|
|
965
|
+
"div",
|
|
966
|
+
{
|
|
967
|
+
className: "nc-col",
|
|
968
|
+
style: { position: "relative", flex: 1, ...A },
|
|
969
|
+
onMouseEnter: () => P(!0),
|
|
970
|
+
onMouseLeave: () => P(!1),
|
|
971
|
+
children: [
|
|
972
|
+
l && /* @__PURE__ */ s("span", { className: "nc-label", children: l }),
|
|
973
|
+
/* @__PURE__ */ N("div", { style: { position: "relative", display: "flex", alignItems: y ? "flex-start" : "center" }, children: [
|
|
974
|
+
v && /* @__PURE__ */ s("span", { className: "nc-input-leading-icon", style: { height: y ? void 0 : "100%", top: y ? 10 : void 0 }, children: v }),
|
|
975
|
+
y ? /* @__PURE__ */ s(
|
|
976
|
+
"textarea",
|
|
977
|
+
{
|
|
978
|
+
ref: C,
|
|
979
|
+
className: je,
|
|
980
|
+
placeholder: a,
|
|
981
|
+
value: pe,
|
|
982
|
+
onChange: Ve,
|
|
983
|
+
onKeyDown: He,
|
|
984
|
+
onFocus: Oe,
|
|
985
|
+
onBlur: Fe,
|
|
986
|
+
readOnly: c,
|
|
987
|
+
"aria-disabled": c,
|
|
988
|
+
tabIndex: c ? -1 : void 0,
|
|
989
|
+
rows: h,
|
|
990
|
+
style: {
|
|
991
|
+
width: "100%",
|
|
992
|
+
paddingRight: I,
|
|
993
|
+
...B !== void 0 ? { paddingLeft: B } : {}
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
) : /* @__PURE__ */ s(
|
|
997
|
+
"input",
|
|
998
|
+
{
|
|
999
|
+
ref: x,
|
|
1000
|
+
type: ve && E ? "text" : f,
|
|
1001
|
+
className: je,
|
|
1002
|
+
placeholder: a,
|
|
1003
|
+
value: pe,
|
|
1004
|
+
onChange: Ve,
|
|
1005
|
+
onKeyDown: He,
|
|
1006
|
+
onFocus: Oe,
|
|
1007
|
+
onBlur: Fe,
|
|
1008
|
+
readOnly: c,
|
|
1009
|
+
"aria-disabled": c,
|
|
1010
|
+
tabIndex: c ? -1 : void 0,
|
|
1011
|
+
style: {
|
|
1012
|
+
width: "100%",
|
|
1013
|
+
paddingRight: I,
|
|
1014
|
+
...B !== void 0 ? { paddingLeft: B } : {}
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
),
|
|
1018
|
+
we && /* @__PURE__ */ s(Wt, { onClick: ft, size: d, rightOffset: de ? ye + 4 : 4 }),
|
|
1019
|
+
de && /* @__PURE__ */ s(Ht, { visible: E, onClick: () => S(!E), size: d })
|
|
1020
|
+
] }),
|
|
1021
|
+
z && g && /* @__PURE__ */ s("span", { className: "nc-error-message", children: j })
|
|
1022
|
+
]
|
|
1023
|
+
}
|
|
1024
|
+
);
|
|
946
1025
|
}
|
|
947
|
-
function
|
|
1026
|
+
function or({
|
|
948
1027
|
children: e,
|
|
949
1028
|
onClick: t,
|
|
950
1029
|
showBorder: n = !0,
|
|
951
1030
|
selectable: r = !1,
|
|
952
1031
|
style: o
|
|
953
1032
|
}) {
|
|
954
|
-
const [i, a] =
|
|
1033
|
+
const [i, a] = ze.useState(!1);
|
|
955
1034
|
return /* @__PURE__ */ s(
|
|
956
1035
|
"div",
|
|
957
1036
|
{
|
|
@@ -979,7 +1058,7 @@ function nr({
|
|
|
979
1058
|
}
|
|
980
1059
|
);
|
|
981
1060
|
}
|
|
982
|
-
function
|
|
1061
|
+
function sr({ title: e, titleTools: t, children: n, style: r }) {
|
|
983
1062
|
return /* @__PURE__ */ N("div", { className: "nc-list-group", style: r, children: [
|
|
984
1063
|
(e || t) && /* @__PURE__ */ N("div", { className: "nc-list-group-title", children: [
|
|
985
1064
|
/* @__PURE__ */ s("div", { children: e }),
|
|
@@ -994,15 +1073,15 @@ function rr({ title: e, titleTools: t, children: n, style: r }) {
|
|
|
994
1073
|
)
|
|
995
1074
|
] });
|
|
996
1075
|
}
|
|
997
|
-
function
|
|
998
|
-
const [i, a] =
|
|
999
|
-
|
|
1076
|
+
function ir({ values: e, onChange: t, options: n, placeholder: r = "Select…", label: o }) {
|
|
1077
|
+
const [i, a] = R(!1), [c, l] = R(""), u = F(null), f = Me(() => n.filter((d) => d.label.toLowerCase().includes(c.toLowerCase())), [n, c]);
|
|
1078
|
+
D(() => {
|
|
1000
1079
|
function d(m) {
|
|
1001
1080
|
!(m.target instanceof Node) || !u.current || u.current.contains(m.target) || a(!1);
|
|
1002
1081
|
}
|
|
1003
1082
|
return document.addEventListener("mousedown", d), () => document.removeEventListener("mousedown", d);
|
|
1004
1083
|
}, []);
|
|
1005
|
-
const
|
|
1084
|
+
const b = (d) => {
|
|
1006
1085
|
e.includes(d) ? t(e.filter((m) => m !== d)) : t([...e, d]);
|
|
1007
1086
|
};
|
|
1008
1087
|
return /* @__PURE__ */ N("div", { ref: u, className: "nc-col", style: { position: "relative" }, children: [
|
|
@@ -1010,7 +1089,7 @@ function or({ values: e, onChange: t, options: n, placeholder: r = "Select…",
|
|
|
1010
1089
|
/* @__PURE__ */ N("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: [
|
|
1011
1090
|
e.length === 0 && /* @__PURE__ */ s("span", { className: "nc-label", children: r }),
|
|
1012
1091
|
e.map((d) => {
|
|
1013
|
-
const m = n.find((
|
|
1092
|
+
const m = n.find((A) => A.value === d);
|
|
1014
1093
|
return m ? /* @__PURE__ */ N("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: [
|
|
1015
1094
|
m.label,
|
|
1016
1095
|
/* @__PURE__ */ s(
|
|
@@ -1018,7 +1097,7 @@ function or({ values: e, onChange: t, options: n, placeholder: r = "Select…",
|
|
|
1018
1097
|
{
|
|
1019
1098
|
className: "nc-button nc-ghost",
|
|
1020
1099
|
style: { padding: 0, minHeight: 0, height: 20, width: 20, display: "inline-flex", alignItems: "center", justifyContent: "center", border: "none" },
|
|
1021
|
-
onClick: () =>
|
|
1100
|
+
onClick: () => b(d),
|
|
1022
1101
|
"aria-label": `Remove ${m.label}`,
|
|
1023
1102
|
children: "✕"
|
|
1024
1103
|
}
|
|
@@ -1039,7 +1118,7 @@ function or({ values: e, onChange: t, options: n, placeholder: r = "Select…",
|
|
|
1039
1118
|
i && /* @__PURE__ */ N("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: [
|
|
1040
1119
|
f.map((d) => {
|
|
1041
1120
|
const m = e.includes(d.value);
|
|
1042
|
-
return /* @__PURE__ */ N("div", { className: "nc-section nc-row", style: { justifyContent: "space-between", cursor: "pointer", padding: 12 }, onMouseDown: () =>
|
|
1121
|
+
return /* @__PURE__ */ N("div", { className: "nc-section nc-row", style: { justifyContent: "space-between", cursor: "pointer", padding: 12 }, onMouseDown: () => b(d.value), children: [
|
|
1043
1122
|
/* @__PURE__ */ s("span", { children: d.label }),
|
|
1044
1123
|
/* @__PURE__ */ s("span", { children: m ? "✔️" : "" })
|
|
1045
1124
|
] }, d.value);
|
|
@@ -1048,7 +1127,7 @@ function or({ values: e, onChange: t, options: n, placeholder: r = "Select…",
|
|
|
1048
1127
|
] })
|
|
1049
1128
|
] });
|
|
1050
1129
|
}
|
|
1051
|
-
function
|
|
1130
|
+
function Se(e) {
|
|
1052
1131
|
if (!e) return null;
|
|
1053
1132
|
const t = /^\d{2}-\d{1,2}$/, n = /^\d{4}-\d{1,2}$/;
|
|
1054
1133
|
if (!t.test(e) && !n.test(e))
|
|
@@ -1056,7 +1135,7 @@ function ge(e) {
|
|
|
1056
1135
|
const r = e.split("-"), o = parseInt(r[1], 10);
|
|
1057
1136
|
return o < 1 || o > 12 ? "Month must be between 1 and 12" : null;
|
|
1058
1137
|
}
|
|
1059
|
-
function
|
|
1138
|
+
function Ne(e) {
|
|
1060
1139
|
if (!e) return "";
|
|
1061
1140
|
const t = e.split("-");
|
|
1062
1141
|
if (t.length !== 2) return e;
|
|
@@ -1068,18 +1147,18 @@ function ue(e) {
|
|
|
1068
1147
|
}
|
|
1069
1148
|
return `${n}-${r}`;
|
|
1070
1149
|
}
|
|
1071
|
-
function
|
|
1150
|
+
function Ye(e) {
|
|
1072
1151
|
if (!e) return "";
|
|
1073
|
-
const t =
|
|
1152
|
+
const t = Ne(e);
|
|
1074
1153
|
if (!/^\d{4}-\d{2}$/.test(t)) return e;
|
|
1075
1154
|
const [n, r] = t.split("-");
|
|
1076
1155
|
return `${n}/${r}`;
|
|
1077
1156
|
}
|
|
1078
|
-
function
|
|
1157
|
+
function Ke() {
|
|
1079
1158
|
const e = /* @__PURE__ */ new Date(), t = e.getFullYear(), n = String(e.getMonth() + 1).padStart(2, "0");
|
|
1080
1159
|
return `${t}-${n}`;
|
|
1081
1160
|
}
|
|
1082
|
-
function
|
|
1161
|
+
function cr({
|
|
1083
1162
|
startMonth: e,
|
|
1084
1163
|
endMonth: t,
|
|
1085
1164
|
onChange: n,
|
|
@@ -1088,41 +1167,41 @@ function sr({
|
|
|
1088
1167
|
disabled: i = !1,
|
|
1089
1168
|
size: a = "default"
|
|
1090
1169
|
}) {
|
|
1091
|
-
const [c, l] =
|
|
1092
|
-
|
|
1093
|
-
if (c &&
|
|
1094
|
-
const
|
|
1095
|
-
window.innerWidth -
|
|
1096
|
-
top:
|
|
1170
|
+
const [c, l] = R(!1), [u, f] = R(""), [b, d] = R(""), [m, A] = R({ top: 0, left: 0, width: 0, right: void 0 }), v = F(null), w = F(null);
|
|
1171
|
+
D(() => {
|
|
1172
|
+
if (c && v.current) {
|
|
1173
|
+
const k = v.current.getBoundingClientRect(), P = Math.max(k.width, 400);
|
|
1174
|
+
window.innerWidth - k.left < P && k.right >= P ? A({
|
|
1175
|
+
top: k.bottom + 4,
|
|
1097
1176
|
left: 0,
|
|
1098
1177
|
// Not used but type needs it, let's just use 0
|
|
1099
|
-
right: window.innerWidth -
|
|
1100
|
-
width:
|
|
1101
|
-
}) :
|
|
1102
|
-
top:
|
|
1103
|
-
left:
|
|
1178
|
+
right: window.innerWidth - k.right,
|
|
1179
|
+
width: P
|
|
1180
|
+
}) : A({
|
|
1181
|
+
top: k.bottom + 4,
|
|
1182
|
+
left: k.left,
|
|
1104
1183
|
right: void 0,
|
|
1105
|
-
width:
|
|
1184
|
+
width: P
|
|
1106
1185
|
});
|
|
1107
1186
|
}
|
|
1108
|
-
}, [c]),
|
|
1187
|
+
}, [c]), D(() => {
|
|
1109
1188
|
if (!c) return;
|
|
1110
|
-
const
|
|
1111
|
-
|
|
1189
|
+
const k = ($) => {
|
|
1190
|
+
v.current && !v.current.contains($.target) && w.current && !w.current.contains($.target) && l(!1);
|
|
1112
1191
|
};
|
|
1113
|
-
return document.addEventListener("mousedown",
|
|
1192
|
+
return document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k);
|
|
1114
1193
|
}, [c]);
|
|
1115
|
-
const
|
|
1116
|
-
f(e ||
|
|
1117
|
-
},
|
|
1194
|
+
const y = () => {
|
|
1195
|
+
f(e || Ke()), d(t || Ke()), l(!0);
|
|
1196
|
+
}, h = () => {
|
|
1118
1197
|
l(!1);
|
|
1119
1198
|
}, p = () => {
|
|
1120
|
-
const
|
|
1121
|
-
if (
|
|
1199
|
+
const k = Se(u), $ = Se(b);
|
|
1200
|
+
if (k || $)
|
|
1122
1201
|
return;
|
|
1123
|
-
const
|
|
1124
|
-
|
|
1125
|
-
},
|
|
1202
|
+
const P = Ne(u), H = Ne(b);
|
|
1203
|
+
P && H && (n == null || n(P, H)), l(!1);
|
|
1204
|
+
}, g = e && t ? `${Ye(e)} - ${Ye(t)}` : "Select month range", x = Se(u), C = Se(b), T = Ne(u), E = Ne(b), S = T && E && T > E, L = c ? Ae(
|
|
1126
1205
|
/* @__PURE__ */ s(
|
|
1127
1206
|
"div",
|
|
1128
1207
|
{
|
|
@@ -1143,13 +1222,13 @@ function sr({
|
|
|
1143
1222
|
"input",
|
|
1144
1223
|
{
|
|
1145
1224
|
type: "text",
|
|
1146
|
-
className: `nc-month-input ${
|
|
1225
|
+
className: `nc-month-input ${x ? "nc-error" : ""}`,
|
|
1147
1226
|
value: u,
|
|
1148
|
-
onChange: (
|
|
1227
|
+
onChange: (k) => f(k.target.value),
|
|
1149
1228
|
placeholder: "YY-M(M) or YYYY-M(M)"
|
|
1150
1229
|
}
|
|
1151
1230
|
),
|
|
1152
|
-
|
|
1231
|
+
x && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: x })
|
|
1153
1232
|
] }),
|
|
1154
1233
|
/* @__PURE__ */ N("div", { className: "nc-month-range-picker-column", children: [
|
|
1155
1234
|
/* @__PURE__ */ s("label", { className: "nc-label", children: "End Month" }),
|
|
@@ -1158,26 +1237,26 @@ function sr({
|
|
|
1158
1237
|
{
|
|
1159
1238
|
type: "text",
|
|
1160
1239
|
className: `nc-month-input ${C ? "nc-error" : ""}`,
|
|
1161
|
-
value:
|
|
1162
|
-
onChange: (
|
|
1240
|
+
value: b,
|
|
1241
|
+
onChange: (k) => d(k.target.value),
|
|
1163
1242
|
placeholder: "YY-M(M) or YYYY-M(M)"
|
|
1164
1243
|
}
|
|
1165
1244
|
),
|
|
1166
1245
|
C && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: C })
|
|
1167
1246
|
] })
|
|
1168
1247
|
] }),
|
|
1169
|
-
|
|
1248
|
+
S && !x && !C && /* @__PURE__ */ s("div", { className: "nc-month-range-error", children: "End month must be after or equal to start month" }),
|
|
1170
1249
|
/* @__PURE__ */ N("div", { className: "nc-month-range-picker-footer", children: [
|
|
1171
1250
|
/* @__PURE__ */ s(
|
|
1172
|
-
|
|
1251
|
+
te,
|
|
1173
1252
|
{
|
|
1174
1253
|
variant: "primary",
|
|
1175
1254
|
onClick: p,
|
|
1176
|
-
disabled: !u || !
|
|
1255
|
+
disabled: !u || !b || !!x || !!C || !!S,
|
|
1177
1256
|
children: "Apply"
|
|
1178
1257
|
}
|
|
1179
1258
|
),
|
|
1180
|
-
/* @__PURE__ */ s(
|
|
1259
|
+
/* @__PURE__ */ s(te, { variant: "ghost", onClick: h, children: "Cancel" })
|
|
1181
1260
|
] })
|
|
1182
1261
|
] })
|
|
1183
1262
|
}
|
|
@@ -1189,17 +1268,17 @@ function sr({
|
|
|
1189
1268
|
/* @__PURE__ */ s(
|
|
1190
1269
|
"button",
|
|
1191
1270
|
{
|
|
1192
|
-
ref:
|
|
1271
|
+
ref: v,
|
|
1193
1272
|
className: `nc-month-range-picker-input${a === "small" ? " nc-small" : ""}`,
|
|
1194
|
-
onClick:
|
|
1273
|
+
onClick: y,
|
|
1195
1274
|
disabled: i,
|
|
1196
|
-
children:
|
|
1275
|
+
children: g
|
|
1197
1276
|
}
|
|
1198
1277
|
),
|
|
1199
|
-
|
|
1278
|
+
L
|
|
1200
1279
|
] });
|
|
1201
1280
|
}
|
|
1202
|
-
function
|
|
1281
|
+
function ar({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disabled: a, size: c = "default" }) {
|
|
1203
1282
|
const l = c === "small", u = () => {
|
|
1204
1283
|
const d = e - o;
|
|
1205
1284
|
n !== void 0 && d < n || t(parseFloat(d.toFixed(10)));
|
|
@@ -1247,7 +1326,7 @@ function ir({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
|
|
|
1247
1326
|
] })
|
|
1248
1327
|
] });
|
|
1249
1328
|
}
|
|
1250
|
-
function
|
|
1329
|
+
function lr({
|
|
1251
1330
|
value: e,
|
|
1252
1331
|
onChange: t,
|
|
1253
1332
|
min: n = 0,
|
|
@@ -1262,7 +1341,7 @@ function cr({
|
|
|
1262
1341
|
const f = (d) => {
|
|
1263
1342
|
const m = parseFloat(d.target.value);
|
|
1264
1343
|
t(m);
|
|
1265
|
-
},
|
|
1344
|
+
}, b = (e - n) / (r - n) * 100;
|
|
1266
1345
|
return /* @__PURE__ */ N("div", { className: "nc-col", style: { gap: 6 }, children: [
|
|
1267
1346
|
i && /* @__PURE__ */ s("span", { className: "nc-label", children: i }),
|
|
1268
1347
|
/* @__PURE__ */ N("div", { style: { display: "flex", gap: 12, alignItems: "center" }, children: [
|
|
@@ -1279,7 +1358,7 @@ function cr({
|
|
|
1279
1358
|
disabled: a,
|
|
1280
1359
|
style: {
|
|
1281
1360
|
width: u,
|
|
1282
|
-
"--nc-slider-percentage": `${
|
|
1361
|
+
"--nc-slider-percentage": `${b}%`
|
|
1283
1362
|
}
|
|
1284
1363
|
}
|
|
1285
1364
|
),
|
|
@@ -1299,13 +1378,13 @@ function cr({
|
|
|
1299
1378
|
] })
|
|
1300
1379
|
] });
|
|
1301
1380
|
}
|
|
1302
|
-
const
|
|
1303
|
-
function
|
|
1381
|
+
const Vt = ({ 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" }) });
|
|
1382
|
+
function Ot({ children: e, className: t = "", style: n }) {
|
|
1304
1383
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panel ${t}`, style: n, children: e });
|
|
1305
1384
|
}
|
|
1306
|
-
function
|
|
1307
|
-
const i =
|
|
1308
|
-
(c) =>
|
|
1385
|
+
function dr({ active: e, children: t, keepMounted: n = !1, className: r = "", style: o }) {
|
|
1386
|
+
const i = At.toArray(t).filter(
|
|
1387
|
+
(c) => St(c) && (c.type === Ot || c.type.displayName === "TabPanel")
|
|
1309
1388
|
);
|
|
1310
1389
|
if (n)
|
|
1311
1390
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: i.map((c) => {
|
|
@@ -1324,87 +1403,87 @@ function ar({ active: e, children: t, keepMounted: n = !1, className: r = "", st
|
|
|
1324
1403
|
const a = i.find((c) => c.props.tab === e);
|
|
1325
1404
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: a });
|
|
1326
1405
|
}
|
|
1327
|
-
function
|
|
1328
|
-
const f =
|
|
1329
|
-
|
|
1330
|
-
const
|
|
1406
|
+
function ur({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, className: i, toolbar: a, multiline: c, orientation: l = "horizontal", style: u }) {
|
|
1407
|
+
const f = F(null), [b, d] = R(!1), [m, A] = R(!1), v = l === "verticalLeft" || l === "verticalRight", w = F(!1), y = F(0), h = F(0), p = F(!1);
|
|
1408
|
+
D(() => {
|
|
1409
|
+
const S = () => {
|
|
1331
1410
|
if (f.current)
|
|
1332
|
-
if (
|
|
1333
|
-
const { scrollTop:
|
|
1334
|
-
d(
|
|
1411
|
+
if (v) {
|
|
1412
|
+
const { scrollTop: k, scrollHeight: $, clientHeight: P } = f.current;
|
|
1413
|
+
d(k > 1), A(k < $ - P - 1);
|
|
1335
1414
|
} else {
|
|
1336
|
-
const { scrollLeft:
|
|
1337
|
-
d(
|
|
1415
|
+
const { scrollLeft: k, scrollWidth: $, clientWidth: P } = f.current;
|
|
1416
|
+
d(k > 1), A(k < $ - P - 1);
|
|
1338
1417
|
}
|
|
1339
|
-
},
|
|
1340
|
-
if (
|
|
1341
|
-
return
|
|
1342
|
-
|
|
1418
|
+
}, L = f.current;
|
|
1419
|
+
if (L)
|
|
1420
|
+
return S(), L.addEventListener("scroll", S), window.addEventListener("resize", S), () => {
|
|
1421
|
+
L.removeEventListener("scroll", S), window.removeEventListener("resize", S);
|
|
1343
1422
|
};
|
|
1344
|
-
}, [e,
|
|
1345
|
-
const
|
|
1346
|
-
f.current && (w.current = !0, p.current = !1,
|
|
1347
|
-
},
|
|
1423
|
+
}, [e, v]);
|
|
1424
|
+
const g = (S) => {
|
|
1425
|
+
f.current && (w.current = !0, p.current = !1, y.current = v ? S.clientY : S.clientX, h.current = v ? f.current.scrollTop : f.current.scrollLeft, f.current.style.cursor = "grabbing", f.current.style.userSelect = "none");
|
|
1426
|
+
}, x = (S) => {
|
|
1348
1427
|
if (!w.current || !f.current) return;
|
|
1349
|
-
const
|
|
1350
|
-
Math.abs(
|
|
1428
|
+
const L = v ? S.clientY : S.clientX, k = y.current - L;
|
|
1429
|
+
Math.abs(k) > 3 && (p.current = !0), v ? f.current.scrollTop = h.current + k : f.current.scrollLeft = h.current + k;
|
|
1351
1430
|
}, C = () => {
|
|
1352
1431
|
f.current && (w.current = !1, f.current.style.cursor = "", f.current.style.userSelect = "");
|
|
1353
1432
|
}, T = () => {
|
|
1354
1433
|
C();
|
|
1355
1434
|
};
|
|
1356
|
-
|
|
1357
|
-
const
|
|
1358
|
-
if (!
|
|
1359
|
-
const
|
|
1360
|
-
|
|
1435
|
+
D(() => {
|
|
1436
|
+
const S = f.current;
|
|
1437
|
+
if (!S || v) return;
|
|
1438
|
+
const L = (k) => {
|
|
1439
|
+
k.deltaY !== 0 && (k.preventDefault(), S.scrollLeft += k.deltaY * 0.3);
|
|
1361
1440
|
};
|
|
1362
|
-
return
|
|
1363
|
-
|
|
1441
|
+
return S.addEventListener("wheel", L, { passive: !1 }), () => {
|
|
1442
|
+
S.removeEventListener("wheel", L);
|
|
1364
1443
|
};
|
|
1365
|
-
}, [
|
|
1366
|
-
const
|
|
1367
|
-
p.current || n(
|
|
1444
|
+
}, [v]);
|
|
1445
|
+
const E = (S) => {
|
|
1446
|
+
p.current || n(S);
|
|
1368
1447
|
};
|
|
1369
|
-
return /* @__PURE__ */ N("div", { className: `nc-tab-container ${
|
|
1448
|
+
return /* @__PURE__ */ N("div", { className: `nc-tab-container ${v ? `nc-vertical nc-${l}` : ""} ${i || ""}`, style: u, children: [
|
|
1370
1449
|
/* @__PURE__ */ N("div", { className: "nc-tab-scroll-wrapper", children: [
|
|
1371
|
-
|
|
1450
|
+
b && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${v ? "nc-top" : "nc-left"}`, children: v ? /* @__PURE__ */ s(Vt, { size: 16 }) : /* @__PURE__ */ s(xt, { size: 16 }) }),
|
|
1372
1451
|
/* @__PURE__ */ s(
|
|
1373
1452
|
"div",
|
|
1374
1453
|
{
|
|
1375
1454
|
ref: f,
|
|
1376
1455
|
className: `nc-tab-scroll ${c ? "nc-multiline" : ""}`,
|
|
1377
|
-
onMouseDown:
|
|
1378
|
-
onMouseMove:
|
|
1456
|
+
onMouseDown: g,
|
|
1457
|
+
onMouseMove: x,
|
|
1379
1458
|
onMouseUp: C,
|
|
1380
1459
|
onMouseLeave: T,
|
|
1381
1460
|
style: { cursor: "grab" },
|
|
1382
|
-
children: e.map((
|
|
1383
|
-
const
|
|
1461
|
+
children: e.map((S) => {
|
|
1462
|
+
const L = typeof S == "string" ? S : S.id, k = typeof S == "string" ? S : S.label, $ = r && !(o != null && o.includes(L));
|
|
1384
1463
|
return /* @__PURE__ */ N(
|
|
1385
1464
|
"div",
|
|
1386
1465
|
{
|
|
1387
|
-
className: `nc-tab-item ${t ===
|
|
1388
|
-
onClick: () =>
|
|
1466
|
+
className: `nc-tab-item ${t === L ? "nc-active" : ""} ${$ ? "nc-closable" : ""}`,
|
|
1467
|
+
onClick: () => E(L),
|
|
1389
1468
|
role: "button",
|
|
1390
1469
|
tabIndex: 0,
|
|
1391
|
-
onKeyDown: (
|
|
1392
|
-
(
|
|
1470
|
+
onKeyDown: (P) => {
|
|
1471
|
+
(P.key === "Enter" || P.key === " ") && n(L);
|
|
1393
1472
|
},
|
|
1394
1473
|
children: [
|
|
1395
|
-
/* @__PURE__ */ s("span", { className: "nc-tab-label", children:
|
|
1474
|
+
/* @__PURE__ */ s("span", { className: "nc-tab-label", children: v ? k : typeof k == "string" ? k.toUpperCase() : k }),
|
|
1396
1475
|
$ && /* @__PURE__ */ s(
|
|
1397
1476
|
"span",
|
|
1398
1477
|
{
|
|
1399
1478
|
className: "nc-tab-close",
|
|
1400
1479
|
role: "button",
|
|
1401
1480
|
tabIndex: 0,
|
|
1402
|
-
"aria-label": `Close ${typeof
|
|
1403
|
-
onClick: (
|
|
1404
|
-
|
|
1481
|
+
"aria-label": `Close ${typeof k == "string" ? k : L}`,
|
|
1482
|
+
onClick: (P) => {
|
|
1483
|
+
P.stopPropagation(), r(L);
|
|
1405
1484
|
},
|
|
1406
|
-
onKeyDown: (
|
|
1407
|
-
(
|
|
1485
|
+
onKeyDown: (P) => {
|
|
1486
|
+
(P.key === "Enter" || P.key === " ") && (P.stopPropagation(), r(L));
|
|
1408
1487
|
},
|
|
1409
1488
|
children: /* @__PURE__ */ N("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1410
1489
|
/* @__PURE__ */ s("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
@@ -1414,17 +1493,17 @@ function lr({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, cla
|
|
|
1414
1493
|
)
|
|
1415
1494
|
]
|
|
1416
1495
|
},
|
|
1417
|
-
|
|
1496
|
+
L
|
|
1418
1497
|
);
|
|
1419
1498
|
})
|
|
1420
1499
|
}
|
|
1421
1500
|
),
|
|
1422
|
-
m && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${
|
|
1501
|
+
m && /* @__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 }) })
|
|
1423
1502
|
] }),
|
|
1424
1503
|
a && /* @__PURE__ */ s("div", { className: "nc-tab-toolbar", children: a })
|
|
1425
1504
|
] });
|
|
1426
1505
|
}
|
|
1427
|
-
function
|
|
1506
|
+
function pr({ checked: e, onChange: t, disabled: n, label: r }) {
|
|
1428
1507
|
return /* @__PURE__ */ N(
|
|
1429
1508
|
"label",
|
|
1430
1509
|
{
|
|
@@ -1476,7 +1555,7 @@ function dr({ checked: e, onChange: t, disabled: n, label: r }) {
|
|
|
1476
1555
|
}
|
|
1477
1556
|
);
|
|
1478
1557
|
}
|
|
1479
|
-
const
|
|
1558
|
+
const _e = [
|
|
1480
1559
|
"var(--nc-csv-col-0)",
|
|
1481
1560
|
"var(--nc-csv-col-1)",
|
|
1482
1561
|
"var(--nc-csv-col-2)",
|
|
@@ -1488,24 +1567,24 @@ const Fe = [
|
|
|
1488
1567
|
"var(--nc-csv-col-8)",
|
|
1489
1568
|
"var(--nc-csv-col-9)"
|
|
1490
1569
|
];
|
|
1491
|
-
function
|
|
1570
|
+
function Ft(e, t) {
|
|
1492
1571
|
const r = e.slice(0, t).split(`
|
|
1493
1572
|
`), o = r.length, a = r[o - 1].split(" "), c = a.length, l = a[c - 1].length + 1;
|
|
1494
1573
|
return { line: o, column: c, character: l, offset: t };
|
|
1495
1574
|
}
|
|
1496
|
-
function
|
|
1575
|
+
function jt(e, t, n, r) {
|
|
1497
1576
|
const o = e.split(`
|
|
1498
1577
|
`), i = Math.max(1, Math.min(t, o.length));
|
|
1499
1578
|
let a = 0;
|
|
1500
|
-
for (let
|
|
1501
|
-
a += o[
|
|
1579
|
+
for (let b = 0; b < i - 1; b++)
|
|
1580
|
+
a += o[b].length + 1;
|
|
1502
1581
|
const l = o[i - 1].split(" "), u = Math.max(1, Math.min(n, l.length));
|
|
1503
|
-
for (let
|
|
1504
|
-
a += l[
|
|
1582
|
+
for (let b = 0; b < u - 1; b++)
|
|
1583
|
+
a += l[b].length + 1;
|
|
1505
1584
|
const f = Math.max(1, Math.min(r, l[u - 1].length + 1));
|
|
1506
1585
|
return a += f - 1, a;
|
|
1507
1586
|
}
|
|
1508
|
-
function
|
|
1587
|
+
function Gt(e, t) {
|
|
1509
1588
|
const n = e.split(`
|
|
1510
1589
|
`), r = Math.max(1, Math.min(t, n.length));
|
|
1511
1590
|
let o = 0;
|
|
@@ -1513,76 +1592,76 @@ function Ot(e, t) {
|
|
|
1513
1592
|
o += n[i].length + 1;
|
|
1514
1593
|
return o;
|
|
1515
1594
|
}
|
|
1516
|
-
const
|
|
1595
|
+
const fr = Ct(
|
|
1517
1596
|
function({ value: t, onChange: n, placeholder: r, className: o, style: i, showLineNumbers: a = !1, onCursorChange: c, highlightLine: l }, u) {
|
|
1518
|
-
const f =
|
|
1519
|
-
|
|
1520
|
-
goToLine(
|
|
1597
|
+
const f = F(null), b = F(null), d = F(null);
|
|
1598
|
+
$t(u, () => ({
|
|
1599
|
+
goToLine(h) {
|
|
1521
1600
|
const p = f.current;
|
|
1522
1601
|
if (!p) return;
|
|
1523
|
-
const
|
|
1524
|
-
p.focus(), p.setSelectionRange(
|
|
1525
|
-
const
|
|
1526
|
-
p.scrollTop = (Math.max(1,
|
|
1602
|
+
const g = Gt(t, h);
|
|
1603
|
+
p.focus(), p.setSelectionRange(g, g);
|
|
1604
|
+
const x = parseFloat(getComputedStyle(p).lineHeight) || 18;
|
|
1605
|
+
p.scrollTop = (Math.max(1, h) - 1) * x, A(), m();
|
|
1527
1606
|
},
|
|
1528
|
-
goToPosition(
|
|
1529
|
-
const
|
|
1530
|
-
if (!
|
|
1531
|
-
const C =
|
|
1532
|
-
|
|
1533
|
-
const T = parseFloat(getComputedStyle(
|
|
1534
|
-
|
|
1607
|
+
goToPosition(h, p, g) {
|
|
1608
|
+
const x = f.current;
|
|
1609
|
+
if (!x) return;
|
|
1610
|
+
const C = jt(t, h, p, g);
|
|
1611
|
+
x.focus(), x.setSelectionRange(C, C);
|
|
1612
|
+
const T = parseFloat(getComputedStyle(x).lineHeight) || 18;
|
|
1613
|
+
x.scrollTop = (Math.max(1, h) - 1) * T, A(), m();
|
|
1535
1614
|
}
|
|
1536
1615
|
}), [t]);
|
|
1537
|
-
const m =
|
|
1616
|
+
const m = Y(() => {
|
|
1538
1617
|
if (!c || !f.current) return;
|
|
1539
|
-
const
|
|
1540
|
-
c(
|
|
1541
|
-
}, [c, t]),
|
|
1542
|
-
const
|
|
1543
|
-
|
|
1618
|
+
const h = Ft(t, f.current.selectionStart);
|
|
1619
|
+
c(h);
|
|
1620
|
+
}, [c, t]), A = Y(() => {
|
|
1621
|
+
const h = f.current;
|
|
1622
|
+
h && (b.current && (b.current.scrollTop = h.scrollTop, b.current.scrollLeft = h.scrollLeft), d.current && (d.current.scrollTop = h.scrollTop));
|
|
1544
1623
|
}, []);
|
|
1545
|
-
|
|
1624
|
+
D(() => {
|
|
1546
1625
|
if (l == null || l < 1) return;
|
|
1547
|
-
const
|
|
1548
|
-
if (!
|
|
1549
|
-
const p = parseFloat(getComputedStyle(
|
|
1550
|
-
(
|
|
1626
|
+
const h = f.current;
|
|
1627
|
+
if (!h) return;
|
|
1628
|
+
const p = parseFloat(getComputedStyle(h).lineHeight) || 18, g = (l - 1) * p, x = g + p;
|
|
1629
|
+
(g < h.scrollTop || x > h.scrollTop + h.clientHeight) && (h.scrollTop = g - h.clientHeight / 2 + p / 2), A();
|
|
1551
1630
|
}, [l]);
|
|
1552
|
-
const
|
|
1631
|
+
const v = Me(() => t.split(`
|
|
1553
1632
|
`).length, [t]), w = () => {
|
|
1554
|
-
const
|
|
1555
|
-
for (let p = 1; p <=
|
|
1556
|
-
|
|
1633
|
+
const h = [];
|
|
1634
|
+
for (let p = 1; p <= v; p++)
|
|
1635
|
+
h.push(
|
|
1557
1636
|
/* @__PURE__ */ s("div", { className: `nc-csv-line-number ${l === p ? "nc-csv-highlight" : ""}`, children: p }, p)
|
|
1558
1637
|
);
|
|
1559
|
-
return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref: d, children:
|
|
1560
|
-
},
|
|
1561
|
-
`).map((
|
|
1562
|
-
const C =
|
|
1563
|
-
return /* @__PURE__ */ N("div", { className: `nc-csv-line ${l ===
|
|
1564
|
-
C.map((T,
|
|
1565
|
-
|
|
1566
|
-
/* @__PURE__ */ s("span", { style: { color:
|
|
1567
|
-
] },
|
|
1568
|
-
|
|
1638
|
+
return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref: d, children: h });
|
|
1639
|
+
}, y = (h) => h ? h.split(`
|
|
1640
|
+
`).map((g, x) => {
|
|
1641
|
+
const C = g.split(" ");
|
|
1642
|
+
return /* @__PURE__ */ N("div", { className: `nc-csv-line ${l === x + 1 ? "nc-csv-highlight" : ""}`, children: [
|
|
1643
|
+
C.map((T, E) => /* @__PURE__ */ N("span", { children: [
|
|
1644
|
+
E > 0 && /* @__PURE__ */ s("span", { className: "nc-csv-tab-char", children: " " }),
|
|
1645
|
+
/* @__PURE__ */ s("span", { style: { color: _e[E % _e.length] }, children: T })
|
|
1646
|
+
] }, E)),
|
|
1647
|
+
g === "" && `
|
|
1569
1648
|
`
|
|
1570
|
-
] },
|
|
1649
|
+
] }, x);
|
|
1571
1650
|
}) : null;
|
|
1572
1651
|
return /* @__PURE__ */ N("div", { className: `nc-csv-textarea-container ${a ? "nc-csv-with-gutter" : ""} ${o ?? ""}`, style: i, children: [
|
|
1573
1652
|
a && w(),
|
|
1574
1653
|
/* @__PURE__ */ N("div", { className: "nc-csv-textarea-editor", children: [
|
|
1575
|
-
/* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref:
|
|
1654
|
+
/* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref: b, children: /* @__PURE__ */ s("pre", { className: "nc-csv-textarea-highlights", children: y(t) }) }),
|
|
1576
1655
|
/* @__PURE__ */ s(
|
|
1577
1656
|
"textarea",
|
|
1578
1657
|
{
|
|
1579
1658
|
ref: f,
|
|
1580
1659
|
className: "nc-csv-textarea-input",
|
|
1581
1660
|
value: t,
|
|
1582
|
-
onChange: (
|
|
1583
|
-
n(
|
|
1661
|
+
onChange: (h) => {
|
|
1662
|
+
n(h.target.value), requestAnimationFrame(m);
|
|
1584
1663
|
},
|
|
1585
|
-
onScroll:
|
|
1664
|
+
onScroll: A,
|
|
1586
1665
|
onSelect: m,
|
|
1587
1666
|
onKeyUp: m,
|
|
1588
1667
|
onClick: m,
|
|
@@ -1596,27 +1675,27 @@ const ur = Nt(
|
|
|
1596
1675
|
] });
|
|
1597
1676
|
}
|
|
1598
1677
|
);
|
|
1599
|
-
let
|
|
1600
|
-
const
|
|
1601
|
-
function
|
|
1602
|
-
const e =
|
|
1603
|
-
for (const t of Array.from(
|
|
1678
|
+
let ue = { notifications: [] };
|
|
1679
|
+
const Re = /* @__PURE__ */ new Set(), Ue = /* @__PURE__ */ new Map();
|
|
1680
|
+
function Te() {
|
|
1681
|
+
const e = ue.notifications.slice();
|
|
1682
|
+
for (const t of Array.from(Re))
|
|
1604
1683
|
try {
|
|
1605
1684
|
t(e);
|
|
1606
1685
|
} catch {
|
|
1607
1686
|
}
|
|
1608
1687
|
}
|
|
1609
|
-
function
|
|
1610
|
-
|
|
1688
|
+
function Yt(e) {
|
|
1689
|
+
Re.add(e);
|
|
1611
1690
|
try {
|
|
1612
|
-
e(
|
|
1691
|
+
e(ue.notifications.slice());
|
|
1613
1692
|
} catch {
|
|
1614
1693
|
}
|
|
1615
1694
|
return () => {
|
|
1616
|
-
|
|
1695
|
+
Re.delete(e);
|
|
1617
1696
|
};
|
|
1618
1697
|
}
|
|
1619
|
-
function
|
|
1698
|
+
function Kt(e) {
|
|
1620
1699
|
const t = `notification-${Date.now()}-${Math.random()}`, { duration: n, type: r, ...o } = e, i = {
|
|
1621
1700
|
id: t,
|
|
1622
1701
|
dismissible: !0,
|
|
@@ -1624,20 +1703,20 @@ function jt(e) {
|
|
|
1624
1703
|
type: r === "error" ? "danger" : r ?? "info",
|
|
1625
1704
|
duration: n ?? 5e3
|
|
1626
1705
|
};
|
|
1627
|
-
return
|
|
1628
|
-
|
|
1706
|
+
return ue.notifications = [i, ...ue.notifications], Te(), i.duration && i.duration > 0 && setTimeout(() => {
|
|
1707
|
+
tt(t);
|
|
1629
1708
|
}, i.duration), t;
|
|
1630
1709
|
}
|
|
1631
|
-
function
|
|
1632
|
-
const t =
|
|
1710
|
+
function tt(e) {
|
|
1711
|
+
const t = ue.notifications.find((r) => r.id === e);
|
|
1633
1712
|
if (!t) return;
|
|
1634
|
-
t.isRemoving = !0,
|
|
1713
|
+
t.isRemoving = !0, Te();
|
|
1635
1714
|
const n = window.setTimeout(() => {
|
|
1636
|
-
|
|
1715
|
+
ue.notifications = ue.notifications.filter((r) => r.id !== e), Te(), Ue.delete(e);
|
|
1637
1716
|
}, 300);
|
|
1638
|
-
|
|
1717
|
+
Ue.set(e, n);
|
|
1639
1718
|
}
|
|
1640
|
-
function
|
|
1719
|
+
function _t({ type: e }) {
|
|
1641
1720
|
switch (e) {
|
|
1642
1721
|
case "success":
|
|
1643
1722
|
return /* @__PURE__ */ s("svg", { viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ s(
|
|
@@ -1678,8 +1757,8 @@ function Gt({ type: e }) {
|
|
|
1678
1757
|
] });
|
|
1679
1758
|
}
|
|
1680
1759
|
}
|
|
1681
|
-
function
|
|
1682
|
-
const { t } =
|
|
1760
|
+
function Ut({ notification: e }) {
|
|
1761
|
+
const { t } = re(), n = e.type || "info", r = () => {
|
|
1683
1762
|
if (e.title) return e.title;
|
|
1684
1763
|
switch (n) {
|
|
1685
1764
|
case "success":
|
|
@@ -1692,14 +1771,14 @@ function Yt({ notification: e }) {
|
|
|
1692
1771
|
return t("common.info");
|
|
1693
1772
|
}
|
|
1694
1773
|
}, o = () => {
|
|
1695
|
-
|
|
1774
|
+
tt(e.id);
|
|
1696
1775
|
};
|
|
1697
1776
|
return /* @__PURE__ */ s(
|
|
1698
1777
|
"div",
|
|
1699
1778
|
{
|
|
1700
1779
|
className: `nc-notification nc-notification-${n}`,
|
|
1701
1780
|
children: /* @__PURE__ */ N("div", { className: "nc-notification-content", children: [
|
|
1702
|
-
/* @__PURE__ */ s("div", { className: `nc-notification-icon nc-notification-icon-${n}`, children: /* @__PURE__ */ s(
|
|
1781
|
+
/* @__PURE__ */ s("div", { className: `nc-notification-icon nc-notification-icon-${n}`, children: /* @__PURE__ */ s(_t, { type: n }) }),
|
|
1703
1782
|
/* @__PURE__ */ N("div", { className: "nc-notification-body", children: [
|
|
1704
1783
|
/* @__PURE__ */ s("div", { className: "nc-notification-title", children: r() }),
|
|
1705
1784
|
/* @__PURE__ */ s("div", { className: "nc-notification-message", children: e.message })
|
|
@@ -1710,31 +1789,31 @@ function Yt({ notification: e }) {
|
|
|
1710
1789
|
className: "nc-notification-dismiss",
|
|
1711
1790
|
onClick: o,
|
|
1712
1791
|
"aria-label": t("common.close"),
|
|
1713
|
-
children: /* @__PURE__ */ s(
|
|
1792
|
+
children: /* @__PURE__ */ s(Pe, { size: 16 })
|
|
1714
1793
|
}
|
|
1715
1794
|
)
|
|
1716
1795
|
] })
|
|
1717
1796
|
}
|
|
1718
1797
|
);
|
|
1719
1798
|
}
|
|
1720
|
-
function
|
|
1721
|
-
const [e, t] =
|
|
1722
|
-
return
|
|
1723
|
-
const f = new Set(c.current.map((d) => d.id)),
|
|
1724
|
-
|
|
1799
|
+
function hr() {
|
|
1800
|
+
const [e, t] = R([]), [n, r] = R(/* @__PURE__ */ new Map()), [o, i] = R(/* @__PURE__ */ new Set()), a = F(null), c = F([]);
|
|
1801
|
+
return D(() => Yt((u) => {
|
|
1802
|
+
const f = new Set(c.current.map((d) => d.id)), b = u.filter((d) => !f.has(d.id)).map((d) => d.id);
|
|
1803
|
+
b.length > 0 ? (t(u), i(new Set(b)), requestAnimationFrame(() => {
|
|
1725
1804
|
requestAnimationFrame(() => {
|
|
1726
1805
|
i(/* @__PURE__ */ new Set());
|
|
1727
1806
|
});
|
|
1728
1807
|
})) : t(u), c.current = u;
|
|
1729
|
-
}), []),
|
|
1808
|
+
}), []), D(() => {
|
|
1730
1809
|
if (!a.current) return;
|
|
1731
1810
|
const l = /* @__PURE__ */ new Map();
|
|
1732
1811
|
let u = 0;
|
|
1733
1812
|
const f = a.current.children;
|
|
1734
|
-
e.forEach((
|
|
1735
|
-
if (l.set(
|
|
1813
|
+
e.forEach((b, d) => {
|
|
1814
|
+
if (l.set(b.id, u), f[d]) {
|
|
1736
1815
|
const m = f[d].offsetHeight;
|
|
1737
|
-
|
|
1816
|
+
b.isRemoving || (u += m + 12);
|
|
1738
1817
|
}
|
|
1739
1818
|
}), r(l);
|
|
1740
1819
|
}, [e]), /* @__PURE__ */ s(
|
|
@@ -1758,7 +1837,7 @@ function pr() {
|
|
|
1758
1837
|
width: "100%"
|
|
1759
1838
|
},
|
|
1760
1839
|
children: e.map((l) => {
|
|
1761
|
-
const u = o.has(l.id), f = l.isRemoving,
|
|
1840
|
+
const u = o.has(l.id), f = l.isRemoving, b = n.get(l.id) || 0;
|
|
1762
1841
|
return /* @__PURE__ */ s(
|
|
1763
1842
|
"div",
|
|
1764
1843
|
{
|
|
@@ -1766,13 +1845,13 @@ function pr() {
|
|
|
1766
1845
|
position: "absolute",
|
|
1767
1846
|
top: 0,
|
|
1768
1847
|
left: 0,
|
|
1769
|
-
transform: u ? `translate3d(-40px, ${
|
|
1848
|
+
transform: u ? `translate3d(-40px, ${b}px, 0)` : `translate3d(0, ${b}px, 0)`,
|
|
1770
1849
|
// Only animate transform when not leaving, animate opacity always
|
|
1771
1850
|
transition: f ? "opacity 300ms ease-out" : "transform 300ms ease-out, opacity 300ms ease-out",
|
|
1772
1851
|
opacity: f ? 0 : 1,
|
|
1773
1852
|
width: "100%"
|
|
1774
1853
|
},
|
|
1775
|
-
children: /* @__PURE__ */ s(
|
|
1854
|
+
children: /* @__PURE__ */ s(Ut, { notification: l })
|
|
1776
1855
|
},
|
|
1777
1856
|
l.id
|
|
1778
1857
|
);
|
|
@@ -1782,14 +1861,14 @@ function pr() {
|
|
|
1782
1861
|
}
|
|
1783
1862
|
);
|
|
1784
1863
|
}
|
|
1785
|
-
function
|
|
1786
|
-
return
|
|
1864
|
+
function qt(e) {
|
|
1865
|
+
return Kt(e);
|
|
1787
1866
|
}
|
|
1788
|
-
const
|
|
1789
|
-
show: (e) =>
|
|
1867
|
+
const mr = {
|
|
1868
|
+
show: (e) => qt(e)
|
|
1790
1869
|
};
|
|
1791
|
-
function
|
|
1792
|
-
const t =
|
|
1870
|
+
function gr(e) {
|
|
1871
|
+
const t = It.createInstance(), n = {};
|
|
1793
1872
|
for (const o in e)
|
|
1794
1873
|
n[o] = { translation: e[o] };
|
|
1795
1874
|
const r = typeof document < "u" && document.documentElement.lang || "en";
|
|
@@ -1809,9 +1888,9 @@ function hr(e) {
|
|
|
1809
1888
|
}
|
|
1810
1889
|
}).observe(document.documentElement, { attributes: !0 }), t;
|
|
1811
1890
|
}
|
|
1812
|
-
class
|
|
1891
|
+
class Xt {
|
|
1813
1892
|
constructor() {
|
|
1814
|
-
|
|
1893
|
+
oe(this, "apps", /* @__PURE__ */ new Map());
|
|
1815
1894
|
}
|
|
1816
1895
|
/**
|
|
1817
1896
|
* Register an app definition.
|
|
@@ -1849,16 +1928,16 @@ class _t {
|
|
|
1849
1928
|
return this.apps.has(t);
|
|
1850
1929
|
}
|
|
1851
1930
|
}
|
|
1852
|
-
const
|
|
1853
|
-
class
|
|
1931
|
+
const me = new Xt(), qe = "nc-ui-app-state";
|
|
1932
|
+
class Jt {
|
|
1854
1933
|
constructor() {
|
|
1855
|
-
|
|
1856
|
-
|
|
1934
|
+
oe(this, "state");
|
|
1935
|
+
oe(this, "listeners", /* @__PURE__ */ new Map());
|
|
1857
1936
|
this.state = this.loadState();
|
|
1858
1937
|
}
|
|
1859
1938
|
loadState() {
|
|
1860
1939
|
try {
|
|
1861
|
-
const t = localStorage.getItem(
|
|
1940
|
+
const t = localStorage.getItem(qe);
|
|
1862
1941
|
if (t)
|
|
1863
1942
|
return JSON.parse(t);
|
|
1864
1943
|
} catch {
|
|
@@ -1867,7 +1946,7 @@ class Ut {
|
|
|
1867
1946
|
}
|
|
1868
1947
|
saveState() {
|
|
1869
1948
|
try {
|
|
1870
|
-
localStorage.setItem(
|
|
1949
|
+
localStorage.setItem(qe, JSON.stringify(this.state));
|
|
1871
1950
|
} catch {
|
|
1872
1951
|
}
|
|
1873
1952
|
}
|
|
@@ -1897,13 +1976,13 @@ class Ut {
|
|
|
1897
1976
|
(r = this.listeners.get(t)) == null || r.forEach((o) => o(n));
|
|
1898
1977
|
}
|
|
1899
1978
|
}
|
|
1900
|
-
const
|
|
1901
|
-
class
|
|
1979
|
+
const ne = new Jt();
|
|
1980
|
+
class Qt {
|
|
1902
1981
|
constructor() {
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1982
|
+
oe(this, "apps", []);
|
|
1983
|
+
oe(this, "activeAppId", null);
|
|
1984
|
+
oe(this, "listeners", /* @__PURE__ */ new Set());
|
|
1985
|
+
oe(this, "refReadyResolvers", /* @__PURE__ */ new Map());
|
|
1907
1986
|
}
|
|
1908
1987
|
/**
|
|
1909
1988
|
* Launch an app and wait for it to be ready (ref populated).
|
|
@@ -1915,16 +1994,16 @@ class qt {
|
|
|
1915
1994
|
*/
|
|
1916
1995
|
async launchApp(t, n) {
|
|
1917
1996
|
const { launchInBackground: r = !1 } = n || {};
|
|
1918
|
-
if (!
|
|
1997
|
+
if (!me.has(t))
|
|
1919
1998
|
return console.error(`Cannot launch app "${t}": not registered`), null;
|
|
1920
1999
|
const o = this.apps.find((a) => a.appId === t);
|
|
1921
2000
|
if (o)
|
|
1922
|
-
return r || (this.setActiveApp(t),
|
|
2001
|
+
return r || (this.setActiveApp(t), ne._setActiveAppId(t)), o.ref ? o : this.waitForRef(t);
|
|
1923
2002
|
const i = {
|
|
1924
2003
|
appId: t,
|
|
1925
2004
|
launchedAt: Date.now()
|
|
1926
2005
|
};
|
|
1927
|
-
return this.apps.push(i), r || (this.activeAppId = t,
|
|
2006
|
+
return this.apps.push(i), r || (this.activeAppId = t, ne._setActiveAppId(t)), this.notify(), this.waitForRef(t);
|
|
1928
2007
|
}
|
|
1929
2008
|
waitForRef(t) {
|
|
1930
2009
|
return new Promise((n) => {
|
|
@@ -1961,7 +2040,7 @@ class qt {
|
|
|
1961
2040
|
const r = this.apps[n];
|
|
1962
2041
|
if (r.ref && (r.ref = void 0), this.apps.splice(n, 1), this.activeAppId === t) {
|
|
1963
2042
|
const o = window.innerWidth >= 768;
|
|
1964
|
-
this.activeAppId = o && this.apps.length > 0 ? this.apps[this.apps.length - 1].appId : null,
|
|
2043
|
+
this.activeAppId = o && this.apps.length > 0 ? this.apps[this.apps.length - 1].appId : null, ne._setActiveAppId(this.activeAppId);
|
|
1965
2044
|
}
|
|
1966
2045
|
this.notify();
|
|
1967
2046
|
}
|
|
@@ -1973,7 +2052,7 @@ class qt {
|
|
|
1973
2052
|
console.warn(`Cannot activate app "${t}": not running`);
|
|
1974
2053
|
return;
|
|
1975
2054
|
}
|
|
1976
|
-
this.activeAppId !== t && (this.activeAppId = t, this.notify(),
|
|
2055
|
+
this.activeAppId !== t && (this.activeAppId = t, this.notify(), ne._setActiveAppId(t));
|
|
1977
2056
|
}
|
|
1978
2057
|
/**
|
|
1979
2058
|
* Toggle an app: if active, deactivate; if inactive, activate.
|
|
@@ -1991,7 +2070,7 @@ class qt {
|
|
|
1991
2070
|
* Get the currently active app definition.
|
|
1992
2071
|
*/
|
|
1993
2072
|
getActiveApp() {
|
|
1994
|
-
return this.activeAppId ?
|
|
2073
|
+
return this.activeAppId ? me.get(this.activeAppId) ?? null : null;
|
|
1995
2074
|
}
|
|
1996
2075
|
/**
|
|
1997
2076
|
* Get all running apps.
|
|
@@ -2017,14 +2096,14 @@ class qt {
|
|
|
2017
2096
|
this.listeners.forEach((t) => t());
|
|
2018
2097
|
}
|
|
2019
2098
|
}
|
|
2020
|
-
const
|
|
2021
|
-
function
|
|
2022
|
-
const e =
|
|
2099
|
+
const Q = new Qt(), nt = ge(null);
|
|
2100
|
+
function Zt() {
|
|
2101
|
+
const e = ce(nt);
|
|
2023
2102
|
if (!e)
|
|
2024
2103
|
throw new Error("useApp must be used inside an App");
|
|
2025
2104
|
return e;
|
|
2026
2105
|
}
|
|
2027
|
-
function
|
|
2106
|
+
function en({ size: e = 16 }) {
|
|
2028
2107
|
return /* @__PURE__ */ N(
|
|
2029
2108
|
"svg",
|
|
2030
2109
|
{
|
|
@@ -2043,7 +2122,7 @@ function Jt({ size: e = 16 }) {
|
|
|
2043
2122
|
}
|
|
2044
2123
|
);
|
|
2045
2124
|
}
|
|
2046
|
-
function
|
|
2125
|
+
function tn({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o }) {
|
|
2047
2126
|
return /* @__PURE__ */ N("div", { className: "nc-app-title-bar", children: [
|
|
2048
2127
|
/* @__PURE__ */ N("div", { className: "nc-app-title-bar-left", children: [
|
|
2049
2128
|
n && !o && /* @__PURE__ */ s(
|
|
@@ -2053,18 +2132,18 @@ function Zt({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o })
|
|
|
2053
2132
|
onClick: n,
|
|
2054
2133
|
title: "Back",
|
|
2055
2134
|
"aria-label": "Go back",
|
|
2056
|
-
children: /* @__PURE__ */ s(
|
|
2135
|
+
children: /* @__PURE__ */ s(en, { size: 16 })
|
|
2057
2136
|
}
|
|
2058
2137
|
),
|
|
2059
2138
|
/* @__PURE__ */ s("span", { className: "nc-app-title-bar-title", children: e })
|
|
2060
2139
|
] }),
|
|
2061
2140
|
/* @__PURE__ */ N("div", { className: "nc-app-title-bar-right", children: [
|
|
2062
2141
|
r && /* @__PURE__ */ s("div", { className: "nc-app-title-bar-toolbar", children: r }),
|
|
2063
|
-
/* @__PURE__ */ s(
|
|
2142
|
+
/* @__PURE__ */ s(Ze, { onClick: t, "aria-label": "Close application" })
|
|
2064
2143
|
] })
|
|
2065
2144
|
] });
|
|
2066
2145
|
}
|
|
2067
|
-
class
|
|
2146
|
+
class nn extends ze.Component {
|
|
2068
2147
|
constructor(t) {
|
|
2069
2148
|
super(t), this.state = { hasError: !1 };
|
|
2070
2149
|
}
|
|
@@ -2097,38 +2176,38 @@ class Qt extends Me.Component {
|
|
|
2097
2176
|
) : this.props.children;
|
|
2098
2177
|
}
|
|
2099
2178
|
}
|
|
2100
|
-
function
|
|
2101
|
-
const { t: r } =
|
|
2102
|
-
|
|
2179
|
+
function rt({ appId: e, isActive: t, onClose: n }) {
|
|
2180
|
+
const { t: r } = re(), o = me.get(e), [i, a] = R(""), [c, l] = R(null), [u, f] = R(null), [b, d] = R(!1), [m, A] = R(!1);
|
|
2181
|
+
ze.useEffect(() => {
|
|
2103
2182
|
o != null && o.titleKey && a(r(o.titleKey));
|
|
2104
2183
|
}, [o, r]);
|
|
2105
|
-
const
|
|
2106
|
-
a(
|
|
2107
|
-
}, []), w =
|
|
2108
|
-
l(() =>
|
|
2109
|
-
}, []),
|
|
2184
|
+
const v = Y((S) => {
|
|
2185
|
+
a(S);
|
|
2186
|
+
}, []), w = Y((S) => {
|
|
2187
|
+
l(() => S);
|
|
2188
|
+
}, []), y = Y(() => {
|
|
2110
2189
|
l(null);
|
|
2111
|
-
}, []),
|
|
2112
|
-
f(
|
|
2113
|
-
}, []), p =
|
|
2190
|
+
}, []), h = Y((S) => {
|
|
2191
|
+
f(S);
|
|
2192
|
+
}, []), p = Y(() => {
|
|
2114
2193
|
f(null);
|
|
2115
|
-
}, []),
|
|
2116
|
-
d(
|
|
2117
|
-
}, []),
|
|
2118
|
-
|
|
2119
|
-
}, []), C =
|
|
2120
|
-
setTitle:
|
|
2194
|
+
}, []), g = Y((S) => {
|
|
2195
|
+
d(S);
|
|
2196
|
+
}, []), x = Y((S) => {
|
|
2197
|
+
A(S);
|
|
2198
|
+
}, []), C = Me(() => ({
|
|
2199
|
+
setTitle: v,
|
|
2121
2200
|
setBackHandler: w,
|
|
2122
|
-
clearBackHandler:
|
|
2123
|
-
setToolbar:
|
|
2201
|
+
clearBackHandler: y,
|
|
2202
|
+
setToolbar: h,
|
|
2124
2203
|
clearToolbar: p,
|
|
2125
|
-
setHideBackButton:
|
|
2126
|
-
setHideTitleBar:
|
|
2204
|
+
setHideBackButton: g,
|
|
2205
|
+
setHideTitleBar: x,
|
|
2127
2206
|
close: n
|
|
2128
|
-
}), [
|
|
2207
|
+
}), [v, w, y, h, p, g, x, n]);
|
|
2129
2208
|
if (!o)
|
|
2130
2209
|
return null;
|
|
2131
|
-
const T = o.component,
|
|
2210
|
+
const T = o.component, E = !o.hideTitleBar && !m;
|
|
2132
2211
|
return /* @__PURE__ */ N(
|
|
2133
2212
|
"div",
|
|
2134
2213
|
{
|
|
@@ -2139,20 +2218,20 @@ function Ze({ appId: e, isActive: t, onClose: n }) {
|
|
|
2139
2218
|
minHeight: 0
|
|
2140
2219
|
},
|
|
2141
2220
|
children: [
|
|
2142
|
-
|
|
2143
|
-
|
|
2221
|
+
E && /* @__PURE__ */ s(
|
|
2222
|
+
tn,
|
|
2144
2223
|
{
|
|
2145
2224
|
title: i,
|
|
2146
2225
|
onClose: n,
|
|
2147
2226
|
onBack: c ?? void 0,
|
|
2148
2227
|
toolbar: u,
|
|
2149
|
-
hideBackButton:
|
|
2228
|
+
hideBackButton: b
|
|
2150
2229
|
}
|
|
2151
2230
|
),
|
|
2152
2231
|
/* @__PURE__ */ s(
|
|
2153
2232
|
"div",
|
|
2154
2233
|
{
|
|
2155
|
-
className:
|
|
2234
|
+
className: E ? "nc-app-content-wrapper" : "",
|
|
2156
2235
|
style: {
|
|
2157
2236
|
padding: o.padding,
|
|
2158
2237
|
flex: 1,
|
|
@@ -2162,8 +2241,8 @@ function Ze({ appId: e, isActive: t, onClose: n }) {
|
|
|
2162
2241
|
backgroundColor: "var(--nc-bg-tertiary)",
|
|
2163
2242
|
position: "relative"
|
|
2164
2243
|
},
|
|
2165
|
-
children: /* @__PURE__ */ s(
|
|
2166
|
-
|
|
2244
|
+
children: /* @__PURE__ */ s(nt.Provider, { value: C, children: /* @__PURE__ */ s(nn, { appId: e, children: /* @__PURE__ */ s(
|
|
2245
|
+
Mt,
|
|
2167
2246
|
{
|
|
2168
2247
|
fallback: /* @__PURE__ */ s(
|
|
2169
2248
|
"div",
|
|
@@ -2174,7 +2253,7 @@ function Ze({ appId: e, isActive: t, onClose: n }) {
|
|
|
2174
2253
|
justifyContent: "center",
|
|
2175
2254
|
flex: 1
|
|
2176
2255
|
},
|
|
2177
|
-
children: /* @__PURE__ */ s(
|
|
2256
|
+
children: /* @__PURE__ */ s(Qe, {})
|
|
2178
2257
|
}
|
|
2179
2258
|
),
|
|
2180
2259
|
children: /* @__PURE__ */ s(T, {})
|
|
@@ -2186,77 +2265,77 @@ function Ze({ appId: e, isActive: t, onClose: n }) {
|
|
|
2186
2265
|
}
|
|
2187
2266
|
);
|
|
2188
2267
|
}
|
|
2189
|
-
const
|
|
2268
|
+
const Ce = 768, $e = 1024, ot = {
|
|
2190
2269
|
isMobile: !1,
|
|
2191
2270
|
isTablet: !1,
|
|
2192
2271
|
isDesktop: !0,
|
|
2193
2272
|
width: typeof window < "u" ? window.innerWidth : 1024,
|
|
2194
2273
|
height: typeof window < "u" ? window.innerHeight : 768
|
|
2195
|
-
},
|
|
2196
|
-
function
|
|
2197
|
-
const [t, n] =
|
|
2198
|
-
if (typeof window > "u") return
|
|
2274
|
+
}, st = ge(ot);
|
|
2275
|
+
function br({ children: e }) {
|
|
2276
|
+
const [t, n] = R(() => {
|
|
2277
|
+
if (typeof window > "u") return ot;
|
|
2199
2278
|
const r = window.innerWidth, o = window.innerHeight;
|
|
2200
2279
|
return {
|
|
2201
|
-
isMobile: r <
|
|
2202
|
-
isTablet: r >=
|
|
2203
|
-
isDesktop: r >=
|
|
2280
|
+
isMobile: r < Ce,
|
|
2281
|
+
isTablet: r >= Ce && r < $e,
|
|
2282
|
+
isDesktop: r >= $e,
|
|
2204
2283
|
width: r,
|
|
2205
2284
|
height: o
|
|
2206
2285
|
};
|
|
2207
2286
|
});
|
|
2208
|
-
return
|
|
2287
|
+
return D(() => {
|
|
2209
2288
|
const r = () => {
|
|
2210
2289
|
const o = window.innerWidth, i = window.innerHeight;
|
|
2211
2290
|
n({
|
|
2212
|
-
isMobile: o <
|
|
2213
|
-
isTablet: o >=
|
|
2214
|
-
isDesktop: o >=
|
|
2291
|
+
isMobile: o < Ce,
|
|
2292
|
+
isTablet: o >= Ce && o < $e,
|
|
2293
|
+
isDesktop: o >= $e,
|
|
2215
2294
|
width: o,
|
|
2216
2295
|
height: i
|
|
2217
2296
|
});
|
|
2218
2297
|
};
|
|
2219
2298
|
return window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
|
|
2220
|
-
}, []), /* @__PURE__ */ s(
|
|
2299
|
+
}, []), /* @__PURE__ */ s(st.Provider, { value: t, children: e });
|
|
2221
2300
|
}
|
|
2222
|
-
function
|
|
2223
|
-
return
|
|
2301
|
+
function it() {
|
|
2302
|
+
return ce(st);
|
|
2224
2303
|
}
|
|
2225
|
-
const
|
|
2226
|
-
const t =
|
|
2304
|
+
const Be = "-", rn = (e) => {
|
|
2305
|
+
const t = sn(e), {
|
|
2227
2306
|
conflictingClassGroups: n,
|
|
2228
2307
|
conflictingClassGroupModifiers: r
|
|
2229
2308
|
} = e;
|
|
2230
2309
|
return {
|
|
2231
2310
|
getClassGroupId: (a) => {
|
|
2232
|
-
const c = a.split(
|
|
2233
|
-
return c[0] === "" && c.length !== 1 && c.shift(),
|
|
2311
|
+
const c = a.split(Be);
|
|
2312
|
+
return c[0] === "" && c.length !== 1 && c.shift(), ct(c, t) || on(a);
|
|
2234
2313
|
},
|
|
2235
2314
|
getConflictingClassGroupIds: (a, c) => {
|
|
2236
2315
|
const l = n[a] || [];
|
|
2237
2316
|
return c && r[a] ? [...l, ...r[a]] : l;
|
|
2238
2317
|
}
|
|
2239
2318
|
};
|
|
2240
|
-
},
|
|
2319
|
+
}, ct = (e, t) => {
|
|
2241
2320
|
var a;
|
|
2242
2321
|
if (e.length === 0)
|
|
2243
2322
|
return t.classGroupId;
|
|
2244
|
-
const n = e[0], r = t.nextPart.get(n), o = r ?
|
|
2323
|
+
const n = e[0], r = t.nextPart.get(n), o = r ? ct(e.slice(1), r) : void 0;
|
|
2245
2324
|
if (o)
|
|
2246
2325
|
return o;
|
|
2247
2326
|
if (t.validators.length === 0)
|
|
2248
2327
|
return;
|
|
2249
|
-
const i = e.join(
|
|
2328
|
+
const i = e.join(Be);
|
|
2250
2329
|
return (a = t.validators.find(({
|
|
2251
2330
|
validator: c
|
|
2252
2331
|
}) => c(i))) == null ? void 0 : a.classGroupId;
|
|
2253
|
-
},
|
|
2254
|
-
if (
|
|
2255
|
-
const t =
|
|
2332
|
+
}, Xe = /^\[(.+)\]$/, on = (e) => {
|
|
2333
|
+
if (Xe.test(e)) {
|
|
2334
|
+
const t = Xe.exec(e)[1], n = t == null ? void 0 : t.substring(0, t.indexOf(":"));
|
|
2256
2335
|
if (n)
|
|
2257
2336
|
return "arbitrary.." + n;
|
|
2258
2337
|
}
|
|
2259
|
-
},
|
|
2338
|
+
}, sn = (e) => {
|
|
2260
2339
|
const {
|
|
2261
2340
|
theme: t,
|
|
2262
2341
|
prefix: n
|
|
@@ -2264,19 +2343,19 @@ const Ie = "-", en = (e) => {
|
|
|
2264
2343
|
nextPart: /* @__PURE__ */ new Map(),
|
|
2265
2344
|
validators: []
|
|
2266
2345
|
};
|
|
2267
|
-
return
|
|
2268
|
-
|
|
2346
|
+
return an(Object.entries(e.classGroups), n).forEach(([i, a]) => {
|
|
2347
|
+
Ee(a, r, i, t);
|
|
2269
2348
|
}), r;
|
|
2270
|
-
},
|
|
2349
|
+
}, Ee = (e, t, n, r) => {
|
|
2271
2350
|
e.forEach((o) => {
|
|
2272
2351
|
if (typeof o == "string") {
|
|
2273
|
-
const i = o === "" ? t :
|
|
2352
|
+
const i = o === "" ? t : Je(t, o);
|
|
2274
2353
|
i.classGroupId = n;
|
|
2275
2354
|
return;
|
|
2276
2355
|
}
|
|
2277
2356
|
if (typeof o == "function") {
|
|
2278
|
-
if (
|
|
2279
|
-
|
|
2357
|
+
if (cn(o)) {
|
|
2358
|
+
Ee(o(r), t, n, r);
|
|
2280
2359
|
return;
|
|
2281
2360
|
}
|
|
2282
2361
|
t.validators.push({
|
|
@@ -2286,21 +2365,21 @@ const Ie = "-", en = (e) => {
|
|
|
2286
2365
|
return;
|
|
2287
2366
|
}
|
|
2288
2367
|
Object.entries(o).forEach(([i, a]) => {
|
|
2289
|
-
|
|
2368
|
+
Ee(a, Je(t, i), n, r);
|
|
2290
2369
|
});
|
|
2291
2370
|
});
|
|
2292
|
-
},
|
|
2371
|
+
}, Je = (e, t) => {
|
|
2293
2372
|
let n = e;
|
|
2294
|
-
return t.split(
|
|
2373
|
+
return t.split(Be).forEach((r) => {
|
|
2295
2374
|
n.nextPart.has(r) || n.nextPart.set(r, {
|
|
2296
2375
|
nextPart: /* @__PURE__ */ new Map(),
|
|
2297
2376
|
validators: []
|
|
2298
2377
|
}), n = n.nextPart.get(r);
|
|
2299
2378
|
}), n;
|
|
2300
|
-
},
|
|
2379
|
+
}, cn = (e) => e.isThemeGetter, an = (e, t) => t ? e.map(([n, r]) => {
|
|
2301
2380
|
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);
|
|
2302
2381
|
return [n, o];
|
|
2303
|
-
}) : e,
|
|
2382
|
+
}) : e, ln = (e) => {
|
|
2304
2383
|
if (e < 1)
|
|
2305
2384
|
return {
|
|
2306
2385
|
get: () => {
|
|
@@ -2324,40 +2403,40 @@ const Ie = "-", en = (e) => {
|
|
|
2324
2403
|
n.has(i) ? n.set(i, a) : o(i, a);
|
|
2325
2404
|
}
|
|
2326
2405
|
};
|
|
2327
|
-
},
|
|
2406
|
+
}, at = "!", dn = (e) => {
|
|
2328
2407
|
const {
|
|
2329
2408
|
separator: t,
|
|
2330
2409
|
experimentalParseClassName: n
|
|
2331
2410
|
} = e, r = t.length === 1, o = t[0], i = t.length, a = (c) => {
|
|
2332
2411
|
const l = [];
|
|
2333
|
-
let u = 0, f = 0,
|
|
2412
|
+
let u = 0, f = 0, b;
|
|
2334
2413
|
for (let w = 0; w < c.length; w++) {
|
|
2335
|
-
let
|
|
2414
|
+
let y = c[w];
|
|
2336
2415
|
if (u === 0) {
|
|
2337
|
-
if (
|
|
2416
|
+
if (y === o && (r || c.slice(w, w + i) === t)) {
|
|
2338
2417
|
l.push(c.slice(f, w)), f = w + i;
|
|
2339
2418
|
continue;
|
|
2340
2419
|
}
|
|
2341
|
-
if (
|
|
2342
|
-
|
|
2420
|
+
if (y === "/") {
|
|
2421
|
+
b = w;
|
|
2343
2422
|
continue;
|
|
2344
2423
|
}
|
|
2345
2424
|
}
|
|
2346
|
-
|
|
2425
|
+
y === "[" ? u++ : y === "]" && u--;
|
|
2347
2426
|
}
|
|
2348
|
-
const d = l.length === 0 ? c : c.substring(f), m = d.startsWith(
|
|
2427
|
+
const d = l.length === 0 ? c : c.substring(f), m = d.startsWith(at), A = m ? d.substring(1) : d, v = b && b > f ? b - f : void 0;
|
|
2349
2428
|
return {
|
|
2350
2429
|
modifiers: l,
|
|
2351
2430
|
hasImportantModifier: m,
|
|
2352
|
-
baseClassName:
|
|
2353
|
-
maybePostfixModifierPosition:
|
|
2431
|
+
baseClassName: A,
|
|
2432
|
+
maybePostfixModifierPosition: v
|
|
2354
2433
|
};
|
|
2355
2434
|
};
|
|
2356
2435
|
return n ? (c) => n({
|
|
2357
2436
|
className: c,
|
|
2358
2437
|
parseClassName: a
|
|
2359
2438
|
}) : a;
|
|
2360
|
-
},
|
|
2439
|
+
}, un = (e) => {
|
|
2361
2440
|
if (e.length <= 1)
|
|
2362
2441
|
return e;
|
|
2363
2442
|
const t = [];
|
|
@@ -2365,120 +2444,120 @@ const Ie = "-", en = (e) => {
|
|
|
2365
2444
|
return e.forEach((r) => {
|
|
2366
2445
|
r[0] === "[" ? (t.push(...n.sort(), r), n = []) : n.push(r);
|
|
2367
2446
|
}), t.push(...n.sort()), t;
|
|
2368
|
-
},
|
|
2369
|
-
cache:
|
|
2370
|
-
parseClassName:
|
|
2371
|
-
...
|
|
2372
|
-
}),
|
|
2447
|
+
}, pn = (e) => ({
|
|
2448
|
+
cache: ln(e.cacheSize),
|
|
2449
|
+
parseClassName: dn(e),
|
|
2450
|
+
...rn(e)
|
|
2451
|
+
}), fn = /\s+/, hn = (e, t) => {
|
|
2373
2452
|
const {
|
|
2374
2453
|
parseClassName: n,
|
|
2375
2454
|
getClassGroupId: r,
|
|
2376
2455
|
getConflictingClassGroupIds: o
|
|
2377
|
-
} = t, i = [], a = e.trim().split(
|
|
2456
|
+
} = t, i = [], a = e.trim().split(fn);
|
|
2378
2457
|
let c = "";
|
|
2379
2458
|
for (let l = a.length - 1; l >= 0; l -= 1) {
|
|
2380
2459
|
const u = a[l], {
|
|
2381
2460
|
modifiers: f,
|
|
2382
|
-
hasImportantModifier:
|
|
2461
|
+
hasImportantModifier: b,
|
|
2383
2462
|
baseClassName: d,
|
|
2384
2463
|
maybePostfixModifierPosition: m
|
|
2385
2464
|
} = n(u);
|
|
2386
|
-
let
|
|
2387
|
-
if (!
|
|
2388
|
-
if (!
|
|
2465
|
+
let A = !!m, v = r(A ? d.substring(0, m) : d);
|
|
2466
|
+
if (!v) {
|
|
2467
|
+
if (!A) {
|
|
2389
2468
|
c = u + (c.length > 0 ? " " + c : c);
|
|
2390
2469
|
continue;
|
|
2391
2470
|
}
|
|
2392
|
-
if (
|
|
2471
|
+
if (v = r(d), !v) {
|
|
2393
2472
|
c = u + (c.length > 0 ? " " + c : c);
|
|
2394
2473
|
continue;
|
|
2395
2474
|
}
|
|
2396
|
-
|
|
2475
|
+
A = !1;
|
|
2397
2476
|
}
|
|
2398
|
-
const w =
|
|
2399
|
-
if (i.includes(
|
|
2477
|
+
const w = un(f).join(":"), y = b ? w + at : w, h = y + v;
|
|
2478
|
+
if (i.includes(h))
|
|
2400
2479
|
continue;
|
|
2401
|
-
i.push(
|
|
2402
|
-
const p = o(
|
|
2403
|
-
for (let
|
|
2404
|
-
const
|
|
2405
|
-
i.push(
|
|
2480
|
+
i.push(h);
|
|
2481
|
+
const p = o(v, A);
|
|
2482
|
+
for (let g = 0; g < p.length; ++g) {
|
|
2483
|
+
const x = p[g];
|
|
2484
|
+
i.push(y + x);
|
|
2406
2485
|
}
|
|
2407
2486
|
c = u + (c.length > 0 ? " " + c : c);
|
|
2408
2487
|
}
|
|
2409
2488
|
return c;
|
|
2410
2489
|
};
|
|
2411
|
-
function
|
|
2490
|
+
function mn() {
|
|
2412
2491
|
let e = 0, t, n, r = "";
|
|
2413
2492
|
for (; e < arguments.length; )
|
|
2414
|
-
(t = arguments[e++]) && (n =
|
|
2493
|
+
(t = arguments[e++]) && (n = lt(t)) && (r && (r += " "), r += n);
|
|
2415
2494
|
return r;
|
|
2416
2495
|
}
|
|
2417
|
-
const
|
|
2496
|
+
const lt = (e) => {
|
|
2418
2497
|
if (typeof e == "string")
|
|
2419
2498
|
return e;
|
|
2420
2499
|
let t, n = "";
|
|
2421
2500
|
for (let r = 0; r < e.length; r++)
|
|
2422
|
-
e[r] && (t =
|
|
2501
|
+
e[r] && (t = lt(e[r])) && (n && (n += " "), n += t);
|
|
2423
2502
|
return n;
|
|
2424
2503
|
};
|
|
2425
|
-
function
|
|
2504
|
+
function gn(e, ...t) {
|
|
2426
2505
|
let n, r, o, i = a;
|
|
2427
2506
|
function a(l) {
|
|
2428
|
-
const u = t.reduce((f,
|
|
2429
|
-
return n =
|
|
2507
|
+
const u = t.reduce((f, b) => b(f), e());
|
|
2508
|
+
return n = pn(u), r = n.cache.get, o = n.cache.set, i = c, c(l);
|
|
2430
2509
|
}
|
|
2431
2510
|
function c(l) {
|
|
2432
2511
|
const u = r(l);
|
|
2433
2512
|
if (u)
|
|
2434
2513
|
return u;
|
|
2435
|
-
const f =
|
|
2514
|
+
const f = hn(l, n);
|
|
2436
2515
|
return o(l, f), f;
|
|
2437
2516
|
}
|
|
2438
2517
|
return function() {
|
|
2439
|
-
return i(
|
|
2518
|
+
return i(mn.apply(null, arguments));
|
|
2440
2519
|
};
|
|
2441
2520
|
}
|
|
2442
|
-
const
|
|
2521
|
+
const O = (e) => {
|
|
2443
2522
|
const t = (n) => n[e] || [];
|
|
2444
2523
|
return t.isThemeGetter = !0, t;
|
|
2445
|
-
},
|
|
2446
|
-
const r =
|
|
2524
|
+
}, dt = /^\[(?:([a-z-]+):)?(.+)\]$/i, bn = /^\d+\/\d+$/, vn = /* @__PURE__ */ new Set(["px", "full", "screen"]), wn = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, yn = /\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$/, xn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, kn = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Nn = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, ee = (e) => he(e) || vn.has(e) || bn.test(e), se = (e) => be(e, "length", Tn), he = (e) => !!e && !Number.isNaN(Number(e)), Ie = (e) => be(e, "number", he), xe = (e) => !!e && Number.isInteger(Number(e)), An = (e) => e.endsWith("%") && he(e.slice(0, -1)), M = (e) => dt.test(e), ie = (e) => wn.test(e), Sn = /* @__PURE__ */ new Set(["length", "size", "percentage"]), Cn = (e) => be(e, Sn, ut), $n = (e) => be(e, "position", ut), Mn = /* @__PURE__ */ new Set(["image", "url"]), In = (e) => be(e, Mn, Ln), Rn = (e) => be(e, "", En), ke = () => !0, be = (e, t, n) => {
|
|
2525
|
+
const r = dt.exec(e);
|
|
2447
2526
|
return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1;
|
|
2448
|
-
},
|
|
2527
|
+
}, Tn = (e) => (
|
|
2449
2528
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
2450
2529
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
2451
2530
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
2452
|
-
|
|
2453
|
-
),
|
|
2454
|
-
const e =
|
|
2531
|
+
yn.test(e) && !xn.test(e)
|
|
2532
|
+
), ut = () => !1, En = (e) => kn.test(e), Ln = (e) => Nn.test(e), Pn = () => {
|
|
2533
|
+
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"), u = O("grayscale"), f = O("hueRotate"), b = O("invert"), d = O("gap"), m = O("gradientColorStops"), A = O("gradientColorStopPositions"), v = O("inset"), w = O("margin"), y = O("opacity"), h = O("padding"), p = O("saturate"), g = O("scale"), x = O("sepia"), C = O("skew"), T = O("space"), E = O("translate"), S = () => ["auto", "contain", "none"], L = () => ["auto", "hidden", "clip", "visible", "scroll"], k = () => ["auto", M, t], $ = () => [M, t], P = () => ["", ee, se], H = () => ["auto", he, M], 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", M], j = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], z = () => [he, M];
|
|
2455
2534
|
return {
|
|
2456
2535
|
cacheSize: 500,
|
|
2457
2536
|
separator: ":",
|
|
2458
2537
|
theme: {
|
|
2459
|
-
colors: [
|
|
2460
|
-
spacing: [
|
|
2461
|
-
blur: ["none", "",
|
|
2462
|
-
brightness:
|
|
2538
|
+
colors: [ke],
|
|
2539
|
+
spacing: [ee, se],
|
|
2540
|
+
blur: ["none", "", ie, M],
|
|
2541
|
+
brightness: z(),
|
|
2463
2542
|
borderColor: [e],
|
|
2464
|
-
borderRadius: ["none", "", "full",
|
|
2543
|
+
borderRadius: ["none", "", "full", ie, M],
|
|
2465
2544
|
borderSpacing: $(),
|
|
2466
|
-
borderWidth:
|
|
2467
|
-
contrast:
|
|
2468
|
-
grayscale:
|
|
2469
|
-
hueRotate:
|
|
2470
|
-
invert:
|
|
2545
|
+
borderWidth: P(),
|
|
2546
|
+
contrast: z(),
|
|
2547
|
+
grayscale: U(),
|
|
2548
|
+
hueRotate: z(),
|
|
2549
|
+
invert: U(),
|
|
2471
2550
|
gap: $(),
|
|
2472
2551
|
gradientColorStops: [e],
|
|
2473
|
-
gradientColorStopPositions: [
|
|
2474
|
-
inset:
|
|
2475
|
-
margin:
|
|
2476
|
-
opacity:
|
|
2552
|
+
gradientColorStopPositions: [An, se],
|
|
2553
|
+
inset: k(),
|
|
2554
|
+
margin: k(),
|
|
2555
|
+
opacity: z(),
|
|
2477
2556
|
padding: $(),
|
|
2478
|
-
saturate:
|
|
2479
|
-
scale:
|
|
2480
|
-
sepia:
|
|
2481
|
-
skew:
|
|
2557
|
+
saturate: z(),
|
|
2558
|
+
scale: z(),
|
|
2559
|
+
sepia: U(),
|
|
2560
|
+
skew: z(),
|
|
2482
2561
|
space: $(),
|
|
2483
2562
|
translate: $()
|
|
2484
2563
|
},
|
|
@@ -2501,21 +2580,21 @@ const D = (e) => {
|
|
|
2501
2580
|
* @see https://tailwindcss.com/docs/columns
|
|
2502
2581
|
*/
|
|
2503
2582
|
columns: [{
|
|
2504
|
-
columns: [
|
|
2583
|
+
columns: [ie]
|
|
2505
2584
|
}],
|
|
2506
2585
|
/**
|
|
2507
2586
|
* Break After
|
|
2508
2587
|
* @see https://tailwindcss.com/docs/break-after
|
|
2509
2588
|
*/
|
|
2510
2589
|
"break-after": [{
|
|
2511
|
-
"break-after":
|
|
2590
|
+
"break-after": j()
|
|
2512
2591
|
}],
|
|
2513
2592
|
/**
|
|
2514
2593
|
* Break Before
|
|
2515
2594
|
* @see https://tailwindcss.com/docs/break-before
|
|
2516
2595
|
*/
|
|
2517
2596
|
"break-before": [{
|
|
2518
|
-
"break-before":
|
|
2597
|
+
"break-before": j()
|
|
2519
2598
|
}],
|
|
2520
2599
|
/**
|
|
2521
2600
|
* Break Inside
|
|
@@ -2574,49 +2653,49 @@ const D = (e) => {
|
|
|
2574
2653
|
* @see https://tailwindcss.com/docs/object-position
|
|
2575
2654
|
*/
|
|
2576
2655
|
"object-position": [{
|
|
2577
|
-
object: [...
|
|
2656
|
+
object: [...ae(), M]
|
|
2578
2657
|
}],
|
|
2579
2658
|
/**
|
|
2580
2659
|
* Overflow
|
|
2581
2660
|
* @see https://tailwindcss.com/docs/overflow
|
|
2582
2661
|
*/
|
|
2583
2662
|
overflow: [{
|
|
2584
|
-
overflow:
|
|
2663
|
+
overflow: L()
|
|
2585
2664
|
}],
|
|
2586
2665
|
/**
|
|
2587
2666
|
* Overflow X
|
|
2588
2667
|
* @see https://tailwindcss.com/docs/overflow
|
|
2589
2668
|
*/
|
|
2590
2669
|
"overflow-x": [{
|
|
2591
|
-
"overflow-x":
|
|
2670
|
+
"overflow-x": L()
|
|
2592
2671
|
}],
|
|
2593
2672
|
/**
|
|
2594
2673
|
* Overflow Y
|
|
2595
2674
|
* @see https://tailwindcss.com/docs/overflow
|
|
2596
2675
|
*/
|
|
2597
2676
|
"overflow-y": [{
|
|
2598
|
-
"overflow-y":
|
|
2677
|
+
"overflow-y": L()
|
|
2599
2678
|
}],
|
|
2600
2679
|
/**
|
|
2601
2680
|
* Overscroll Behavior
|
|
2602
2681
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2603
2682
|
*/
|
|
2604
2683
|
overscroll: [{
|
|
2605
|
-
overscroll:
|
|
2684
|
+
overscroll: S()
|
|
2606
2685
|
}],
|
|
2607
2686
|
/**
|
|
2608
2687
|
* Overscroll Behavior X
|
|
2609
2688
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2610
2689
|
*/
|
|
2611
2690
|
"overscroll-x": [{
|
|
2612
|
-
"overscroll-x":
|
|
2691
|
+
"overscroll-x": S()
|
|
2613
2692
|
}],
|
|
2614
2693
|
/**
|
|
2615
2694
|
* Overscroll Behavior Y
|
|
2616
2695
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2617
2696
|
*/
|
|
2618
2697
|
"overscroll-y": [{
|
|
2619
|
-
"overscroll-y":
|
|
2698
|
+
"overscroll-y": S()
|
|
2620
2699
|
}],
|
|
2621
2700
|
/**
|
|
2622
2701
|
* Position
|
|
@@ -2628,63 +2707,63 @@ const D = (e) => {
|
|
|
2628
2707
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2629
2708
|
*/
|
|
2630
2709
|
inset: [{
|
|
2631
|
-
inset: [
|
|
2710
|
+
inset: [v]
|
|
2632
2711
|
}],
|
|
2633
2712
|
/**
|
|
2634
2713
|
* Right / Left
|
|
2635
2714
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2636
2715
|
*/
|
|
2637
2716
|
"inset-x": [{
|
|
2638
|
-
"inset-x": [
|
|
2717
|
+
"inset-x": [v]
|
|
2639
2718
|
}],
|
|
2640
2719
|
/**
|
|
2641
2720
|
* Top / Bottom
|
|
2642
2721
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2643
2722
|
*/
|
|
2644
2723
|
"inset-y": [{
|
|
2645
|
-
"inset-y": [
|
|
2724
|
+
"inset-y": [v]
|
|
2646
2725
|
}],
|
|
2647
2726
|
/**
|
|
2648
2727
|
* Start
|
|
2649
2728
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2650
2729
|
*/
|
|
2651
2730
|
start: [{
|
|
2652
|
-
start: [
|
|
2731
|
+
start: [v]
|
|
2653
2732
|
}],
|
|
2654
2733
|
/**
|
|
2655
2734
|
* End
|
|
2656
2735
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2657
2736
|
*/
|
|
2658
2737
|
end: [{
|
|
2659
|
-
end: [
|
|
2738
|
+
end: [v]
|
|
2660
2739
|
}],
|
|
2661
2740
|
/**
|
|
2662
2741
|
* Top
|
|
2663
2742
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2664
2743
|
*/
|
|
2665
2744
|
top: [{
|
|
2666
|
-
top: [
|
|
2745
|
+
top: [v]
|
|
2667
2746
|
}],
|
|
2668
2747
|
/**
|
|
2669
2748
|
* Right
|
|
2670
2749
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2671
2750
|
*/
|
|
2672
2751
|
right: [{
|
|
2673
|
-
right: [
|
|
2752
|
+
right: [v]
|
|
2674
2753
|
}],
|
|
2675
2754
|
/**
|
|
2676
2755
|
* Bottom
|
|
2677
2756
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2678
2757
|
*/
|
|
2679
2758
|
bottom: [{
|
|
2680
|
-
bottom: [
|
|
2759
|
+
bottom: [v]
|
|
2681
2760
|
}],
|
|
2682
2761
|
/**
|
|
2683
2762
|
* Left
|
|
2684
2763
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2685
2764
|
*/
|
|
2686
2765
|
left: [{
|
|
2687
|
-
left: [
|
|
2766
|
+
left: [v]
|
|
2688
2767
|
}],
|
|
2689
2768
|
/**
|
|
2690
2769
|
* Visibility
|
|
@@ -2696,7 +2775,7 @@ const D = (e) => {
|
|
|
2696
2775
|
* @see https://tailwindcss.com/docs/z-index
|
|
2697
2776
|
*/
|
|
2698
2777
|
z: [{
|
|
2699
|
-
z: ["auto",
|
|
2778
|
+
z: ["auto", xe, M]
|
|
2700
2779
|
}],
|
|
2701
2780
|
// Flexbox and Grid
|
|
2702
2781
|
/**
|
|
@@ -2704,7 +2783,7 @@ const D = (e) => {
|
|
|
2704
2783
|
* @see https://tailwindcss.com/docs/flex-basis
|
|
2705
2784
|
*/
|
|
2706
2785
|
basis: [{
|
|
2707
|
-
basis:
|
|
2786
|
+
basis: k()
|
|
2708
2787
|
}],
|
|
2709
2788
|
/**
|
|
2710
2789
|
* Flex Direction
|
|
@@ -2732,28 +2811,28 @@ const D = (e) => {
|
|
|
2732
2811
|
* @see https://tailwindcss.com/docs/flex-grow
|
|
2733
2812
|
*/
|
|
2734
2813
|
grow: [{
|
|
2735
|
-
grow:
|
|
2814
|
+
grow: U()
|
|
2736
2815
|
}],
|
|
2737
2816
|
/**
|
|
2738
2817
|
* Flex Shrink
|
|
2739
2818
|
* @see https://tailwindcss.com/docs/flex-shrink
|
|
2740
2819
|
*/
|
|
2741
2820
|
shrink: [{
|
|
2742
|
-
shrink:
|
|
2821
|
+
shrink: U()
|
|
2743
2822
|
}],
|
|
2744
2823
|
/**
|
|
2745
2824
|
* Order
|
|
2746
2825
|
* @see https://tailwindcss.com/docs/order
|
|
2747
2826
|
*/
|
|
2748
2827
|
order: [{
|
|
2749
|
-
order: ["first", "last", "none",
|
|
2828
|
+
order: ["first", "last", "none", xe, M]
|
|
2750
2829
|
}],
|
|
2751
2830
|
/**
|
|
2752
2831
|
* Grid Template Columns
|
|
2753
2832
|
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
2754
2833
|
*/
|
|
2755
2834
|
"grid-cols": [{
|
|
2756
|
-
"grid-cols": [
|
|
2835
|
+
"grid-cols": [ke]
|
|
2757
2836
|
}],
|
|
2758
2837
|
/**
|
|
2759
2838
|
* Grid Column Start / End
|
|
@@ -2761,7 +2840,7 @@ const D = (e) => {
|
|
|
2761
2840
|
*/
|
|
2762
2841
|
"col-start-end": [{
|
|
2763
2842
|
col: ["auto", {
|
|
2764
|
-
span: ["full",
|
|
2843
|
+
span: ["full", xe, M]
|
|
2765
2844
|
}, M]
|
|
2766
2845
|
}],
|
|
2767
2846
|
/**
|
|
@@ -2769,21 +2848,21 @@ const D = (e) => {
|
|
|
2769
2848
|
* @see https://tailwindcss.com/docs/grid-column
|
|
2770
2849
|
*/
|
|
2771
2850
|
"col-start": [{
|
|
2772
|
-
"col-start":
|
|
2851
|
+
"col-start": H()
|
|
2773
2852
|
}],
|
|
2774
2853
|
/**
|
|
2775
2854
|
* Grid Column End
|
|
2776
2855
|
* @see https://tailwindcss.com/docs/grid-column
|
|
2777
2856
|
*/
|
|
2778
2857
|
"col-end": [{
|
|
2779
|
-
"col-end":
|
|
2858
|
+
"col-end": H()
|
|
2780
2859
|
}],
|
|
2781
2860
|
/**
|
|
2782
2861
|
* Grid Template Rows
|
|
2783
2862
|
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
2784
2863
|
*/
|
|
2785
2864
|
"grid-rows": [{
|
|
2786
|
-
"grid-rows": [
|
|
2865
|
+
"grid-rows": [ke]
|
|
2787
2866
|
}],
|
|
2788
2867
|
/**
|
|
2789
2868
|
* Grid Row Start / End
|
|
@@ -2791,7 +2870,7 @@ const D = (e) => {
|
|
|
2791
2870
|
*/
|
|
2792
2871
|
"row-start-end": [{
|
|
2793
2872
|
row: ["auto", {
|
|
2794
|
-
span: [
|
|
2873
|
+
span: [xe, M]
|
|
2795
2874
|
}, M]
|
|
2796
2875
|
}],
|
|
2797
2876
|
/**
|
|
@@ -2799,14 +2878,14 @@ const D = (e) => {
|
|
|
2799
2878
|
* @see https://tailwindcss.com/docs/grid-row
|
|
2800
2879
|
*/
|
|
2801
2880
|
"row-start": [{
|
|
2802
|
-
"row-start":
|
|
2881
|
+
"row-start": H()
|
|
2803
2882
|
}],
|
|
2804
2883
|
/**
|
|
2805
2884
|
* Grid Row End
|
|
2806
2885
|
* @see https://tailwindcss.com/docs/grid-row
|
|
2807
2886
|
*/
|
|
2808
2887
|
"row-end": [{
|
|
2809
|
-
"row-end":
|
|
2888
|
+
"row-end": H()
|
|
2810
2889
|
}],
|
|
2811
2890
|
/**
|
|
2812
2891
|
* Grid Auto Flow
|
|
@@ -2855,7 +2934,7 @@ const D = (e) => {
|
|
|
2855
2934
|
* @see https://tailwindcss.com/docs/justify-content
|
|
2856
2935
|
*/
|
|
2857
2936
|
"justify-content": [{
|
|
2858
|
-
justify: ["normal", ...
|
|
2937
|
+
justify: ["normal", ..._()]
|
|
2859
2938
|
}],
|
|
2860
2939
|
/**
|
|
2861
2940
|
* Justify Items
|
|
@@ -2876,7 +2955,7 @@ const D = (e) => {
|
|
|
2876
2955
|
* @see https://tailwindcss.com/docs/align-content
|
|
2877
2956
|
*/
|
|
2878
2957
|
"align-content": [{
|
|
2879
|
-
content: ["normal", ...
|
|
2958
|
+
content: ["normal", ..._(), "baseline"]
|
|
2880
2959
|
}],
|
|
2881
2960
|
/**
|
|
2882
2961
|
* Align Items
|
|
@@ -2897,7 +2976,7 @@ const D = (e) => {
|
|
|
2897
2976
|
* @see https://tailwindcss.com/docs/place-content
|
|
2898
2977
|
*/
|
|
2899
2978
|
"place-content": [{
|
|
2900
|
-
"place-content": [...
|
|
2979
|
+
"place-content": [..._(), "baseline"]
|
|
2901
2980
|
}],
|
|
2902
2981
|
/**
|
|
2903
2982
|
* Place Items
|
|
@@ -2919,63 +2998,63 @@ const D = (e) => {
|
|
|
2919
2998
|
* @see https://tailwindcss.com/docs/padding
|
|
2920
2999
|
*/
|
|
2921
3000
|
p: [{
|
|
2922
|
-
p: [
|
|
3001
|
+
p: [h]
|
|
2923
3002
|
}],
|
|
2924
3003
|
/**
|
|
2925
3004
|
* Padding X
|
|
2926
3005
|
* @see https://tailwindcss.com/docs/padding
|
|
2927
3006
|
*/
|
|
2928
3007
|
px: [{
|
|
2929
|
-
px: [
|
|
3008
|
+
px: [h]
|
|
2930
3009
|
}],
|
|
2931
3010
|
/**
|
|
2932
3011
|
* Padding Y
|
|
2933
3012
|
* @see https://tailwindcss.com/docs/padding
|
|
2934
3013
|
*/
|
|
2935
3014
|
py: [{
|
|
2936
|
-
py: [
|
|
3015
|
+
py: [h]
|
|
2937
3016
|
}],
|
|
2938
3017
|
/**
|
|
2939
3018
|
* Padding Start
|
|
2940
3019
|
* @see https://tailwindcss.com/docs/padding
|
|
2941
3020
|
*/
|
|
2942
3021
|
ps: [{
|
|
2943
|
-
ps: [
|
|
3022
|
+
ps: [h]
|
|
2944
3023
|
}],
|
|
2945
3024
|
/**
|
|
2946
3025
|
* Padding End
|
|
2947
3026
|
* @see https://tailwindcss.com/docs/padding
|
|
2948
3027
|
*/
|
|
2949
3028
|
pe: [{
|
|
2950
|
-
pe: [
|
|
3029
|
+
pe: [h]
|
|
2951
3030
|
}],
|
|
2952
3031
|
/**
|
|
2953
3032
|
* Padding Top
|
|
2954
3033
|
* @see https://tailwindcss.com/docs/padding
|
|
2955
3034
|
*/
|
|
2956
3035
|
pt: [{
|
|
2957
|
-
pt: [
|
|
3036
|
+
pt: [h]
|
|
2958
3037
|
}],
|
|
2959
3038
|
/**
|
|
2960
3039
|
* Padding Right
|
|
2961
3040
|
* @see https://tailwindcss.com/docs/padding
|
|
2962
3041
|
*/
|
|
2963
3042
|
pr: [{
|
|
2964
|
-
pr: [
|
|
3043
|
+
pr: [h]
|
|
2965
3044
|
}],
|
|
2966
3045
|
/**
|
|
2967
3046
|
* Padding Bottom
|
|
2968
3047
|
* @see https://tailwindcss.com/docs/padding
|
|
2969
3048
|
*/
|
|
2970
3049
|
pb: [{
|
|
2971
|
-
pb: [
|
|
3050
|
+
pb: [h]
|
|
2972
3051
|
}],
|
|
2973
3052
|
/**
|
|
2974
3053
|
* Padding Left
|
|
2975
3054
|
* @see https://tailwindcss.com/docs/padding
|
|
2976
3055
|
*/
|
|
2977
3056
|
pl: [{
|
|
2978
|
-
pl: [
|
|
3057
|
+
pl: [h]
|
|
2979
3058
|
}],
|
|
2980
3059
|
/**
|
|
2981
3060
|
* Margin
|
|
@@ -3085,8 +3164,8 @@ const D = (e) => {
|
|
|
3085
3164
|
*/
|
|
3086
3165
|
"max-w": [{
|
|
3087
3166
|
"max-w": [M, t, "none", "full", "min", "max", "fit", "prose", {
|
|
3088
|
-
screen: [
|
|
3089
|
-
},
|
|
3167
|
+
screen: [ie]
|
|
3168
|
+
}, ie]
|
|
3090
3169
|
}],
|
|
3091
3170
|
/**
|
|
3092
3171
|
* Height
|
|
@@ -3122,7 +3201,7 @@ const D = (e) => {
|
|
|
3122
3201
|
* @see https://tailwindcss.com/docs/font-size
|
|
3123
3202
|
*/
|
|
3124
3203
|
"font-size": [{
|
|
3125
|
-
text: ["base",
|
|
3204
|
+
text: ["base", ie, se]
|
|
3126
3205
|
}],
|
|
3127
3206
|
/**
|
|
3128
3207
|
* Font Smoothing
|
|
@@ -3139,14 +3218,14 @@ const D = (e) => {
|
|
|
3139
3218
|
* @see https://tailwindcss.com/docs/font-weight
|
|
3140
3219
|
*/
|
|
3141
3220
|
"font-weight": [{
|
|
3142
|
-
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black",
|
|
3221
|
+
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", Ie]
|
|
3143
3222
|
}],
|
|
3144
3223
|
/**
|
|
3145
3224
|
* Font Family
|
|
3146
3225
|
* @see https://tailwindcss.com/docs/font-family
|
|
3147
3226
|
*/
|
|
3148
3227
|
"font-family": [{
|
|
3149
|
-
font: [
|
|
3228
|
+
font: [ke]
|
|
3150
3229
|
}],
|
|
3151
3230
|
/**
|
|
3152
3231
|
* Font Variant Numeric
|
|
@@ -3190,14 +3269,14 @@ const D = (e) => {
|
|
|
3190
3269
|
* @see https://tailwindcss.com/docs/line-clamp
|
|
3191
3270
|
*/
|
|
3192
3271
|
"line-clamp": [{
|
|
3193
|
-
"line-clamp": ["none",
|
|
3272
|
+
"line-clamp": ["none", he, Ie]
|
|
3194
3273
|
}],
|
|
3195
3274
|
/**
|
|
3196
3275
|
* Line Height
|
|
3197
3276
|
* @see https://tailwindcss.com/docs/line-height
|
|
3198
3277
|
*/
|
|
3199
3278
|
leading: [{
|
|
3200
|
-
leading: ["none", "tight", "snug", "normal", "relaxed", "loose",
|
|
3279
|
+
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", ee, M]
|
|
3201
3280
|
}],
|
|
3202
3281
|
/**
|
|
3203
3282
|
* List Style Image
|
|
@@ -3233,7 +3312,7 @@ const D = (e) => {
|
|
|
3233
3312
|
* @see https://tailwindcss.com/docs/placeholder-opacity
|
|
3234
3313
|
*/
|
|
3235
3314
|
"placeholder-opacity": [{
|
|
3236
|
-
"placeholder-opacity": [
|
|
3315
|
+
"placeholder-opacity": [y]
|
|
3237
3316
|
}],
|
|
3238
3317
|
/**
|
|
3239
3318
|
* Text Alignment
|
|
@@ -3254,7 +3333,7 @@ const D = (e) => {
|
|
|
3254
3333
|
* @see https://tailwindcss.com/docs/text-opacity
|
|
3255
3334
|
*/
|
|
3256
3335
|
"text-opacity": [{
|
|
3257
|
-
"text-opacity": [
|
|
3336
|
+
"text-opacity": [y]
|
|
3258
3337
|
}],
|
|
3259
3338
|
/**
|
|
3260
3339
|
* Text Decoration
|
|
@@ -3266,21 +3345,21 @@ const D = (e) => {
|
|
|
3266
3345
|
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
3267
3346
|
*/
|
|
3268
3347
|
"text-decoration-style": [{
|
|
3269
|
-
decoration: [...
|
|
3348
|
+
decoration: [...X(), "wavy"]
|
|
3270
3349
|
}],
|
|
3271
3350
|
/**
|
|
3272
3351
|
* Text Decoration Thickness
|
|
3273
3352
|
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
3274
3353
|
*/
|
|
3275
3354
|
"text-decoration-thickness": [{
|
|
3276
|
-
decoration: ["auto", "from-font",
|
|
3355
|
+
decoration: ["auto", "from-font", ee, se]
|
|
3277
3356
|
}],
|
|
3278
3357
|
/**
|
|
3279
3358
|
* Text Underline Offset
|
|
3280
3359
|
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
3281
3360
|
*/
|
|
3282
3361
|
"underline-offset": [{
|
|
3283
|
-
"underline-offset": ["auto",
|
|
3362
|
+
"underline-offset": ["auto", ee, M]
|
|
3284
3363
|
}],
|
|
3285
3364
|
/**
|
|
3286
3365
|
* Text Decoration Color
|
|
@@ -3369,7 +3448,7 @@ const D = (e) => {
|
|
|
3369
3448
|
* @see https://tailwindcss.com/docs/background-opacity
|
|
3370
3449
|
*/
|
|
3371
3450
|
"bg-opacity": [{
|
|
3372
|
-
"bg-opacity": [
|
|
3451
|
+
"bg-opacity": [y]
|
|
3373
3452
|
}],
|
|
3374
3453
|
/**
|
|
3375
3454
|
* Background Origin
|
|
@@ -3383,7 +3462,7 @@ const D = (e) => {
|
|
|
3383
3462
|
* @see https://tailwindcss.com/docs/background-position
|
|
3384
3463
|
*/
|
|
3385
3464
|
"bg-position": [{
|
|
3386
|
-
bg: [...
|
|
3465
|
+
bg: [...ae(), $n]
|
|
3387
3466
|
}],
|
|
3388
3467
|
/**
|
|
3389
3468
|
* Background Repeat
|
|
@@ -3399,7 +3478,7 @@ const D = (e) => {
|
|
|
3399
3478
|
* @see https://tailwindcss.com/docs/background-size
|
|
3400
3479
|
*/
|
|
3401
3480
|
"bg-size": [{
|
|
3402
|
-
bg: ["auto", "cover", "contain",
|
|
3481
|
+
bg: ["auto", "cover", "contain", Cn]
|
|
3403
3482
|
}],
|
|
3404
3483
|
/**
|
|
3405
3484
|
* Background Image
|
|
@@ -3408,7 +3487,7 @@ const D = (e) => {
|
|
|
3408
3487
|
"bg-image": [{
|
|
3409
3488
|
bg: ["none", {
|
|
3410
3489
|
"gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
3411
|
-
},
|
|
3490
|
+
}, In]
|
|
3412
3491
|
}],
|
|
3413
3492
|
/**
|
|
3414
3493
|
* Background Color
|
|
@@ -3422,21 +3501,21 @@ const D = (e) => {
|
|
|
3422
3501
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3423
3502
|
*/
|
|
3424
3503
|
"gradient-from-pos": [{
|
|
3425
|
-
from: [
|
|
3504
|
+
from: [A]
|
|
3426
3505
|
}],
|
|
3427
3506
|
/**
|
|
3428
3507
|
* Gradient Color Stops Via Position
|
|
3429
3508
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3430
3509
|
*/
|
|
3431
3510
|
"gradient-via-pos": [{
|
|
3432
|
-
via: [
|
|
3511
|
+
via: [A]
|
|
3433
3512
|
}],
|
|
3434
3513
|
/**
|
|
3435
3514
|
* Gradient Color Stops To Position
|
|
3436
3515
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3437
3516
|
*/
|
|
3438
3517
|
"gradient-to-pos": [{
|
|
3439
|
-
to: [
|
|
3518
|
+
to: [A]
|
|
3440
3519
|
}],
|
|
3441
3520
|
/**
|
|
3442
3521
|
* Gradient Color Stops From
|
|
@@ -3633,14 +3712,14 @@ const D = (e) => {
|
|
|
3633
3712
|
* @see https://tailwindcss.com/docs/border-opacity
|
|
3634
3713
|
*/
|
|
3635
3714
|
"border-opacity": [{
|
|
3636
|
-
"border-opacity": [
|
|
3715
|
+
"border-opacity": [y]
|
|
3637
3716
|
}],
|
|
3638
3717
|
/**
|
|
3639
3718
|
* Border Style
|
|
3640
3719
|
* @see https://tailwindcss.com/docs/border-style
|
|
3641
3720
|
*/
|
|
3642
3721
|
"border-style": [{
|
|
3643
|
-
border: [...
|
|
3722
|
+
border: [...X(), "hidden"]
|
|
3644
3723
|
}],
|
|
3645
3724
|
/**
|
|
3646
3725
|
* Divide Width X
|
|
@@ -3671,14 +3750,14 @@ const D = (e) => {
|
|
|
3671
3750
|
* @see https://tailwindcss.com/docs/divide-opacity
|
|
3672
3751
|
*/
|
|
3673
3752
|
"divide-opacity": [{
|
|
3674
|
-
"divide-opacity": [
|
|
3753
|
+
"divide-opacity": [y]
|
|
3675
3754
|
}],
|
|
3676
3755
|
/**
|
|
3677
3756
|
* Divide Style
|
|
3678
3757
|
* @see https://tailwindcss.com/docs/divide-style
|
|
3679
3758
|
*/
|
|
3680
3759
|
"divide-style": [{
|
|
3681
|
-
divide:
|
|
3760
|
+
divide: X()
|
|
3682
3761
|
}],
|
|
3683
3762
|
/**
|
|
3684
3763
|
* Border Color
|
|
@@ -3755,21 +3834,21 @@ const D = (e) => {
|
|
|
3755
3834
|
* @see https://tailwindcss.com/docs/outline-style
|
|
3756
3835
|
*/
|
|
3757
3836
|
"outline-style": [{
|
|
3758
|
-
outline: ["", ...
|
|
3837
|
+
outline: ["", ...X()]
|
|
3759
3838
|
}],
|
|
3760
3839
|
/**
|
|
3761
3840
|
* Outline Offset
|
|
3762
3841
|
* @see https://tailwindcss.com/docs/outline-offset
|
|
3763
3842
|
*/
|
|
3764
3843
|
"outline-offset": [{
|
|
3765
|
-
"outline-offset": [
|
|
3844
|
+
"outline-offset": [ee, M]
|
|
3766
3845
|
}],
|
|
3767
3846
|
/**
|
|
3768
3847
|
* Outline Width
|
|
3769
3848
|
* @see https://tailwindcss.com/docs/outline-width
|
|
3770
3849
|
*/
|
|
3771
3850
|
"outline-w": [{
|
|
3772
|
-
outline: [
|
|
3851
|
+
outline: [ee, se]
|
|
3773
3852
|
}],
|
|
3774
3853
|
/**
|
|
3775
3854
|
* Outline Color
|
|
@@ -3783,7 +3862,7 @@ const D = (e) => {
|
|
|
3783
3862
|
* @see https://tailwindcss.com/docs/ring-width
|
|
3784
3863
|
*/
|
|
3785
3864
|
"ring-w": [{
|
|
3786
|
-
ring:
|
|
3865
|
+
ring: P()
|
|
3787
3866
|
}],
|
|
3788
3867
|
/**
|
|
3789
3868
|
* Ring Width Inset
|
|
@@ -3802,14 +3881,14 @@ const D = (e) => {
|
|
|
3802
3881
|
* @see https://tailwindcss.com/docs/ring-opacity
|
|
3803
3882
|
*/
|
|
3804
3883
|
"ring-opacity": [{
|
|
3805
|
-
"ring-opacity": [
|
|
3884
|
+
"ring-opacity": [y]
|
|
3806
3885
|
}],
|
|
3807
3886
|
/**
|
|
3808
3887
|
* Ring Offset Width
|
|
3809
3888
|
* @see https://tailwindcss.com/docs/ring-offset-width
|
|
3810
3889
|
*/
|
|
3811
3890
|
"ring-offset-w": [{
|
|
3812
|
-
"ring-offset": [
|
|
3891
|
+
"ring-offset": [ee, se]
|
|
3813
3892
|
}],
|
|
3814
3893
|
/**
|
|
3815
3894
|
* Ring Offset Color
|
|
@@ -3824,35 +3903,35 @@ const D = (e) => {
|
|
|
3824
3903
|
* @see https://tailwindcss.com/docs/box-shadow
|
|
3825
3904
|
*/
|
|
3826
3905
|
shadow: [{
|
|
3827
|
-
shadow: ["", "inner", "none",
|
|
3906
|
+
shadow: ["", "inner", "none", ie, Rn]
|
|
3828
3907
|
}],
|
|
3829
3908
|
/**
|
|
3830
3909
|
* Box Shadow Color
|
|
3831
3910
|
* @see https://tailwindcss.com/docs/box-shadow-color
|
|
3832
3911
|
*/
|
|
3833
3912
|
"shadow-color": [{
|
|
3834
|
-
shadow: [
|
|
3913
|
+
shadow: [ke]
|
|
3835
3914
|
}],
|
|
3836
3915
|
/**
|
|
3837
3916
|
* Opacity
|
|
3838
3917
|
* @see https://tailwindcss.com/docs/opacity
|
|
3839
3918
|
*/
|
|
3840
3919
|
opacity: [{
|
|
3841
|
-
opacity: [
|
|
3920
|
+
opacity: [y]
|
|
3842
3921
|
}],
|
|
3843
3922
|
/**
|
|
3844
3923
|
* Mix Blend Mode
|
|
3845
3924
|
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
3846
3925
|
*/
|
|
3847
3926
|
"mix-blend": [{
|
|
3848
|
-
"mix-blend": [...
|
|
3927
|
+
"mix-blend": [...K(), "plus-lighter", "plus-darker"]
|
|
3849
3928
|
}],
|
|
3850
3929
|
/**
|
|
3851
3930
|
* Background Blend Mode
|
|
3852
3931
|
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
3853
3932
|
*/
|
|
3854
3933
|
"bg-blend": [{
|
|
3855
|
-
"bg-blend":
|
|
3934
|
+
"bg-blend": K()
|
|
3856
3935
|
}],
|
|
3857
3936
|
// Filters
|
|
3858
3937
|
/**
|
|
@@ -3889,7 +3968,7 @@ const D = (e) => {
|
|
|
3889
3968
|
* @see https://tailwindcss.com/docs/drop-shadow
|
|
3890
3969
|
*/
|
|
3891
3970
|
"drop-shadow": [{
|
|
3892
|
-
"drop-shadow": ["", "none",
|
|
3971
|
+
"drop-shadow": ["", "none", ie, M]
|
|
3893
3972
|
}],
|
|
3894
3973
|
/**
|
|
3895
3974
|
* Grayscale
|
|
@@ -3910,7 +3989,7 @@ const D = (e) => {
|
|
|
3910
3989
|
* @see https://tailwindcss.com/docs/invert
|
|
3911
3990
|
*/
|
|
3912
3991
|
invert: [{
|
|
3913
|
-
invert: [
|
|
3992
|
+
invert: [b]
|
|
3914
3993
|
}],
|
|
3915
3994
|
/**
|
|
3916
3995
|
* Saturate
|
|
@@ -3924,7 +4003,7 @@ const D = (e) => {
|
|
|
3924
4003
|
* @see https://tailwindcss.com/docs/sepia
|
|
3925
4004
|
*/
|
|
3926
4005
|
sepia: [{
|
|
3927
|
-
sepia: [
|
|
4006
|
+
sepia: [x]
|
|
3928
4007
|
}],
|
|
3929
4008
|
/**
|
|
3930
4009
|
* Backdrop Filter
|
|
@@ -3974,14 +4053,14 @@ const D = (e) => {
|
|
|
3974
4053
|
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
3975
4054
|
*/
|
|
3976
4055
|
"backdrop-invert": [{
|
|
3977
|
-
"backdrop-invert": [
|
|
4056
|
+
"backdrop-invert": [b]
|
|
3978
4057
|
}],
|
|
3979
4058
|
/**
|
|
3980
4059
|
* Backdrop Opacity
|
|
3981
4060
|
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
3982
4061
|
*/
|
|
3983
4062
|
"backdrop-opacity": [{
|
|
3984
|
-
"backdrop-opacity": [
|
|
4063
|
+
"backdrop-opacity": [y]
|
|
3985
4064
|
}],
|
|
3986
4065
|
/**
|
|
3987
4066
|
* Backdrop Saturate
|
|
@@ -3995,7 +4074,7 @@ const D = (e) => {
|
|
|
3995
4074
|
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
3996
4075
|
*/
|
|
3997
4076
|
"backdrop-sepia": [{
|
|
3998
|
-
"backdrop-sepia": [
|
|
4077
|
+
"backdrop-sepia": [x]
|
|
3999
4078
|
}],
|
|
4000
4079
|
// Tables
|
|
4001
4080
|
/**
|
|
@@ -4053,7 +4132,7 @@ const D = (e) => {
|
|
|
4053
4132
|
* @see https://tailwindcss.com/docs/transition-duration
|
|
4054
4133
|
*/
|
|
4055
4134
|
duration: [{
|
|
4056
|
-
duration:
|
|
4135
|
+
duration: z()
|
|
4057
4136
|
}],
|
|
4058
4137
|
/**
|
|
4059
4138
|
* Transition Timing Function
|
|
@@ -4067,7 +4146,7 @@ const D = (e) => {
|
|
|
4067
4146
|
* @see https://tailwindcss.com/docs/transition-delay
|
|
4068
4147
|
*/
|
|
4069
4148
|
delay: [{
|
|
4070
|
-
delay:
|
|
4149
|
+
delay: z()
|
|
4071
4150
|
}],
|
|
4072
4151
|
/**
|
|
4073
4152
|
* Animation
|
|
@@ -4089,42 +4168,42 @@ const D = (e) => {
|
|
|
4089
4168
|
* @see https://tailwindcss.com/docs/scale
|
|
4090
4169
|
*/
|
|
4091
4170
|
scale: [{
|
|
4092
|
-
scale: [
|
|
4171
|
+
scale: [g]
|
|
4093
4172
|
}],
|
|
4094
4173
|
/**
|
|
4095
4174
|
* Scale X
|
|
4096
4175
|
* @see https://tailwindcss.com/docs/scale
|
|
4097
4176
|
*/
|
|
4098
4177
|
"scale-x": [{
|
|
4099
|
-
"scale-x": [
|
|
4178
|
+
"scale-x": [g]
|
|
4100
4179
|
}],
|
|
4101
4180
|
/**
|
|
4102
4181
|
* Scale Y
|
|
4103
4182
|
* @see https://tailwindcss.com/docs/scale
|
|
4104
4183
|
*/
|
|
4105
4184
|
"scale-y": [{
|
|
4106
|
-
"scale-y": [
|
|
4185
|
+
"scale-y": [g]
|
|
4107
4186
|
}],
|
|
4108
4187
|
/**
|
|
4109
4188
|
* Rotate
|
|
4110
4189
|
* @see https://tailwindcss.com/docs/rotate
|
|
4111
4190
|
*/
|
|
4112
4191
|
rotate: [{
|
|
4113
|
-
rotate: [
|
|
4192
|
+
rotate: [xe, M]
|
|
4114
4193
|
}],
|
|
4115
4194
|
/**
|
|
4116
4195
|
* Translate X
|
|
4117
4196
|
* @see https://tailwindcss.com/docs/translate
|
|
4118
4197
|
*/
|
|
4119
4198
|
"translate-x": [{
|
|
4120
|
-
"translate-x": [
|
|
4199
|
+
"translate-x": [E]
|
|
4121
4200
|
}],
|
|
4122
4201
|
/**
|
|
4123
4202
|
* Translate Y
|
|
4124
4203
|
* @see https://tailwindcss.com/docs/translate
|
|
4125
4204
|
*/
|
|
4126
4205
|
"translate-y": [{
|
|
4127
|
-
"translate-y": [
|
|
4206
|
+
"translate-y": [E]
|
|
4128
4207
|
}],
|
|
4129
4208
|
/**
|
|
4130
4209
|
* Skew X
|
|
@@ -4404,7 +4483,7 @@ const D = (e) => {
|
|
|
4404
4483
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
4405
4484
|
*/
|
|
4406
4485
|
"stroke-w": [{
|
|
4407
|
-
stroke: [
|
|
4486
|
+
stroke: [ee, se, Ie]
|
|
4408
4487
|
}],
|
|
4409
4488
|
/**
|
|
4410
4489
|
* Stroke
|
|
@@ -4479,39 +4558,39 @@ const D = (e) => {
|
|
|
4479
4558
|
"font-size": ["leading"]
|
|
4480
4559
|
}
|
|
4481
4560
|
};
|
|
4482
|
-
},
|
|
4483
|
-
function
|
|
4484
|
-
return
|
|
4561
|
+
}, zn = /* @__PURE__ */ gn(Pn);
|
|
4562
|
+
function Bn(...e) {
|
|
4563
|
+
return zn(Rt(e));
|
|
4485
4564
|
}
|
|
4486
|
-
function
|
|
4487
|
-
const [r, o] =
|
|
4488
|
-
|
|
4489
|
-
const w =
|
|
4490
|
-
o(
|
|
4565
|
+
function vr({ autoWidth: e = !0, className: t, style: n }) {
|
|
4566
|
+
const [r, o] = R(() => ne.getActiveAppId()), [i, a] = R(() => Q.getRunningApps()), { isMobile: c } = it();
|
|
4567
|
+
D(() => {
|
|
4568
|
+
const w = ne.subscribe("activeAppId", (y) => {
|
|
4569
|
+
o(y);
|
|
4491
4570
|
});
|
|
4492
4571
|
return () => {
|
|
4493
4572
|
w();
|
|
4494
4573
|
};
|
|
4495
|
-
}, []),
|
|
4496
|
-
a(
|
|
4497
|
-
}), []),
|
|
4574
|
+
}, []), D(() => Q.subscribe(() => {
|
|
4575
|
+
a(Q.getRunningApps());
|
|
4576
|
+
}), []), D(() => {
|
|
4498
4577
|
if (!new URLSearchParams(window.location.search).has("app")) {
|
|
4499
|
-
const
|
|
4500
|
-
|
|
4578
|
+
const h = ne.getActiveAppId();
|
|
4579
|
+
h && !Q.isRunning(h) && Q.launchApp(h);
|
|
4501
4580
|
}
|
|
4502
4581
|
}, []);
|
|
4503
4582
|
const l = (w) => {
|
|
4504
|
-
|
|
4505
|
-
}, u = r ?
|
|
4583
|
+
Q.closeApp(w);
|
|
4584
|
+
}, u = r ? me.get(r) : null, b = (u == null ? void 0 : u.width) ?? 400, d = r !== null, v = { ...{
|
|
4506
4585
|
overflow: "hidden",
|
|
4507
4586
|
display: d ? "flex" : "none",
|
|
4508
4587
|
flexDirection: "column",
|
|
4509
4588
|
flexShrink: 0,
|
|
4510
4589
|
// Only set width if autoWidth is enabled
|
|
4511
|
-
...e && d ? { width: c ? "100%" :
|
|
4590
|
+
...e && d ? { width: c ? "100%" : b } : {}
|
|
4512
4591
|
}, ...n };
|
|
4513
|
-
return /* @__PURE__ */ s("div", { className:
|
|
4514
|
-
|
|
4592
|
+
return /* @__PURE__ */ s("div", { className: Bn("nc-app-panel", t), style: v, children: i.map((w) => /* @__PURE__ */ s(
|
|
4593
|
+
rt,
|
|
4515
4594
|
{
|
|
4516
4595
|
appId: w.appId,
|
|
4517
4596
|
isActive: r === w.appId,
|
|
@@ -4520,49 +4599,49 @@ function gr({ autoWidth: e = !0, className: t, style: n }) {
|
|
|
4520
4599
|
w.appId
|
|
4521
4600
|
)) });
|
|
4522
4601
|
}
|
|
4523
|
-
function
|
|
4602
|
+
function wr({
|
|
4524
4603
|
pinnedAppIds: e,
|
|
4525
4604
|
className: t = "",
|
|
4526
4605
|
showIndicators: n = !0,
|
|
4527
4606
|
side: r = "left",
|
|
4528
4607
|
getBadge: o
|
|
4529
4608
|
}) {
|
|
4530
|
-
const { t: i } =
|
|
4531
|
-
|
|
4532
|
-
const p =
|
|
4533
|
-
l(
|
|
4609
|
+
const { t: i } = re(), { isMobile: a } = it(), [c, l] = R(() => ne.getActiveAppId()), [u, f] = R(() => Q.getRunningApps());
|
|
4610
|
+
D(() => {
|
|
4611
|
+
const p = ne.subscribe("activeAppId", (g) => {
|
|
4612
|
+
l(g);
|
|
4534
4613
|
});
|
|
4535
4614
|
return () => {
|
|
4536
4615
|
p();
|
|
4537
4616
|
};
|
|
4538
|
-
}, []),
|
|
4539
|
-
f(
|
|
4617
|
+
}, []), D(() => Q.subscribe(() => {
|
|
4618
|
+
f(Q.getRunningApps());
|
|
4540
4619
|
}), []);
|
|
4541
|
-
const
|
|
4542
|
-
c === p ?
|
|
4543
|
-
}, d = e.map((p) =>
|
|
4544
|
-
const
|
|
4545
|
-
return
|
|
4620
|
+
const b = (p) => {
|
|
4621
|
+
c === p ? Q.setActiveApp(null) : Q.launchApp(p);
|
|
4622
|
+
}, d = e.map((p) => me.get(p)).filter((p) => !!p), m = u.filter((p) => !e.includes(p.appId)).map((p) => ({ running: p, def: me.get(p.appId) })).filter((p) => !!p.def), A = (p) => u.some((g) => g.appId === p), v = (p) => p.titleKey ? String(i(p.titleKey)) : p.id, w = (p) => typeof p == "number" && p > 99 ? "99+" : p, y = (p, g) => {
|
|
4623
|
+
const x = o == null ? void 0 : o(p, g);
|
|
4624
|
+
return x ? /* @__PURE__ */ s(
|
|
4546
4625
|
"span",
|
|
4547
4626
|
{
|
|
4548
|
-
className: `nc-app-taskbar-badge nc-${
|
|
4549
|
-
"aria-label":
|
|
4550
|
-
children: w(
|
|
4627
|
+
className: `nc-app-taskbar-badge nc-${x.tone ?? "default"}`,
|
|
4628
|
+
"aria-label": x.ariaLabel,
|
|
4629
|
+
children: w(x.content)
|
|
4551
4630
|
}
|
|
4552
4631
|
) : null;
|
|
4553
|
-
},
|
|
4632
|
+
}, h = a ? 24 : 28;
|
|
4554
4633
|
return /* @__PURE__ */ N("div", { className: `nc-app-taskbar ${a ? "nc-mobile" : "nc-desktop"} nc-${r} ${t}`, children: [
|
|
4555
4634
|
d.map((p) => {
|
|
4556
|
-
const
|
|
4635
|
+
const g = p.icon, x = c === p.id, C = A(p.id), T = { isActive: x, isRunning: C, isPinned: !0 };
|
|
4557
4636
|
return /* @__PURE__ */ N(
|
|
4558
4637
|
"button",
|
|
4559
4638
|
{
|
|
4560
|
-
className: `nc-app-taskbar-button ${
|
|
4561
|
-
onClick: () =>
|
|
4562
|
-
title:
|
|
4639
|
+
className: `nc-app-taskbar-button ${x ? "nc-active" : ""} ${C ? "nc-running" : ""}`,
|
|
4640
|
+
onClick: () => b(p.id),
|
|
4641
|
+
title: v(p),
|
|
4563
4642
|
children: [
|
|
4564
|
-
/* @__PURE__ */ s(
|
|
4565
|
-
|
|
4643
|
+
/* @__PURE__ */ s(g, { size: h }),
|
|
4644
|
+
y(p, T),
|
|
4566
4645
|
n && C && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
|
|
4567
4646
|
]
|
|
4568
4647
|
},
|
|
@@ -4570,17 +4649,17 @@ function br({
|
|
|
4570
4649
|
);
|
|
4571
4650
|
}),
|
|
4572
4651
|
m.length > 0 && /* @__PURE__ */ s("div", { className: "nc-app-taskbar-separator" }),
|
|
4573
|
-
m.map(({ running: p, def:
|
|
4574
|
-
const
|
|
4652
|
+
m.map(({ running: p, def: g }) => {
|
|
4653
|
+
const x = g.icon, C = c === p.appId, T = { isActive: C, isRunning: !0, isPinned: !1 };
|
|
4575
4654
|
return /* @__PURE__ */ N(
|
|
4576
4655
|
"button",
|
|
4577
4656
|
{
|
|
4578
4657
|
className: `nc-app-taskbar-button ${C ? "nc-active" : ""} nc-running`,
|
|
4579
|
-
onClick: () =>
|
|
4580
|
-
title:
|
|
4658
|
+
onClick: () => b(p.appId),
|
|
4659
|
+
title: v(g),
|
|
4581
4660
|
children: [
|
|
4582
|
-
/* @__PURE__ */ s(
|
|
4583
|
-
|
|
4661
|
+
/* @__PURE__ */ s(x, { size: h }),
|
|
4662
|
+
y(g, T),
|
|
4584
4663
|
n && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
|
|
4585
4664
|
]
|
|
4586
4665
|
},
|
|
@@ -4589,7 +4668,7 @@ function br({
|
|
|
4589
4668
|
})
|
|
4590
4669
|
] });
|
|
4591
4670
|
}
|
|
4592
|
-
function
|
|
4671
|
+
function yr({
|
|
4593
4672
|
appId: e,
|
|
4594
4673
|
open: t,
|
|
4595
4674
|
onClose: n,
|
|
@@ -4613,7 +4692,7 @@ function vr({
|
|
|
4613
4692
|
style: i,
|
|
4614
4693
|
onClick: (l) => l.stopPropagation(),
|
|
4615
4694
|
children: /* @__PURE__ */ s(
|
|
4616
|
-
|
|
4695
|
+
rt,
|
|
4617
4696
|
{
|
|
4618
4697
|
appId: e,
|
|
4619
4698
|
isActive: !0,
|
|
@@ -4624,86 +4703,86 @@ function vr({
|
|
|
4624
4703
|
)
|
|
4625
4704
|
}
|
|
4626
4705
|
);
|
|
4627
|
-
return
|
|
4706
|
+
return Ae(c, document.body);
|
|
4628
4707
|
}
|
|
4629
|
-
const
|
|
4630
|
-
function
|
|
4631
|
-
const e =
|
|
4708
|
+
const De = ge(null), pt = ge(null);
|
|
4709
|
+
function xr() {
|
|
4710
|
+
const e = ce(De);
|
|
4632
4711
|
if (!e)
|
|
4633
4712
|
throw new Error("useNavStack must be used within a NavStackProvider");
|
|
4634
4713
|
return e;
|
|
4635
4714
|
}
|
|
4636
|
-
function
|
|
4637
|
-
const e =
|
|
4715
|
+
function kr() {
|
|
4716
|
+
const e = ce(pt);
|
|
4638
4717
|
if (!e)
|
|
4639
4718
|
throw new Error("useNavView must be used within NavStack");
|
|
4640
4719
|
return e;
|
|
4641
4720
|
}
|
|
4642
|
-
const
|
|
4643
|
-
function
|
|
4644
|
-
const { t: n } =
|
|
4721
|
+
const We = ge(null);
|
|
4722
|
+
function Nr({ rootView: e, children: t }) {
|
|
4723
|
+
const { t: n } = re(), r = Zt(), [o, i] = R([e]), [a, c] = R([null]), l = Y((g, x) => {
|
|
4645
4724
|
c((C) => {
|
|
4646
4725
|
const T = [...C];
|
|
4647
|
-
return T[
|
|
4726
|
+
return T[g] = x, T;
|
|
4648
4727
|
});
|
|
4649
|
-
}, []), u =
|
|
4650
|
-
c((
|
|
4651
|
-
const C = [...
|
|
4652
|
-
return C[
|
|
4728
|
+
}, []), u = Y((g) => {
|
|
4729
|
+
c((x) => {
|
|
4730
|
+
const C = [...x];
|
|
4731
|
+
return C[g] = null, C;
|
|
4653
4732
|
});
|
|
4654
|
-
}, []), f =
|
|
4655
|
-
i((
|
|
4656
|
-
}, []),
|
|
4657
|
-
i((
|
|
4658
|
-
}, []), d =
|
|
4733
|
+
}, []), f = Y((g) => {
|
|
4734
|
+
i((x) => [...x, g]), c((x) => [...x, null]);
|
|
4735
|
+
}, []), b = Y(() => {
|
|
4736
|
+
i((g) => g.length <= 1 ? g : g.slice(0, -1)), c((g) => g.slice(0, -1));
|
|
4737
|
+
}, []), d = Y(() => {
|
|
4659
4738
|
i([e]), c([null]);
|
|
4660
|
-
}, [e]), m = o.length,
|
|
4661
|
-
|
|
4662
|
-
r.setTitle(
|
|
4663
|
-
}, [
|
|
4664
|
-
|
|
4665
|
-
}, [
|
|
4666
|
-
const
|
|
4667
|
-
|
|
4739
|
+
}, [e]), m = o.length, A = m > 1, v = o.length - 1, w = o[o.length - 1], y = w != null && w.titleKey ? n(w.titleKey) : (w == null ? void 0 : w.title) ?? "";
|
|
4740
|
+
D(() => {
|
|
4741
|
+
r.setTitle(y);
|
|
4742
|
+
}, [y, r]), D(() => {
|
|
4743
|
+
A ? r.setBackHandler(b) : r.clearBackHandler();
|
|
4744
|
+
}, [A, b, r]), D(() => {
|
|
4745
|
+
const g = a[a.length - 1];
|
|
4746
|
+
g ? r.setToolbar(g) : r.clearToolbar();
|
|
4668
4747
|
}, [a, r]);
|
|
4669
|
-
const
|
|
4748
|
+
const h = {
|
|
4670
4749
|
push: f,
|
|
4671
|
-
pop:
|
|
4750
|
+
pop: b,
|
|
4672
4751
|
reset: d,
|
|
4673
4752
|
depth: m,
|
|
4674
|
-
canGoBack:
|
|
4675
|
-
currentTitle:
|
|
4753
|
+
canGoBack: A,
|
|
4754
|
+
currentTitle: y
|
|
4676
4755
|
}, p = {
|
|
4677
4756
|
stack: o,
|
|
4678
4757
|
toolbarStack: a,
|
|
4679
4758
|
updateToolbar: l,
|
|
4680
4759
|
clearToolbarAt: u,
|
|
4681
|
-
topIndex:
|
|
4760
|
+
topIndex: v
|
|
4682
4761
|
};
|
|
4683
|
-
return /* @__PURE__ */ s(
|
|
4762
|
+
return /* @__PURE__ */ s(De.Provider, { value: h, children: /* @__PURE__ */ s(We.Provider, { value: p, children: t }) });
|
|
4684
4763
|
}
|
|
4685
|
-
function
|
|
4686
|
-
const n =
|
|
4764
|
+
function Dn({ index: e, children: t }) {
|
|
4765
|
+
const n = ce(We);
|
|
4687
4766
|
if (!n)
|
|
4688
4767
|
throw new Error("NavViewProvider must be used within NavStackProvider");
|
|
4689
|
-
const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n, a =
|
|
4768
|
+
const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n, a = Y((u) => {
|
|
4690
4769
|
e === i && r(e, u);
|
|
4691
|
-
}, [e, i, r]), c =
|
|
4770
|
+
}, [e, i, r]), c = Y(() => {
|
|
4692
4771
|
e === i && o(e);
|
|
4693
4772
|
}, [e, i, o]), l = {
|
|
4694
4773
|
setToolbar: a,
|
|
4695
4774
|
clearToolbar: c
|
|
4696
4775
|
};
|
|
4697
|
-
return /* @__PURE__ */ s(
|
|
4776
|
+
return /* @__PURE__ */ s(pt.Provider, { value: l, children: t });
|
|
4698
4777
|
}
|
|
4699
|
-
function
|
|
4700
|
-
const e =
|
|
4778
|
+
function Ar() {
|
|
4779
|
+
const e = ce(De), t = ce(We);
|
|
4701
4780
|
if (!e || !t)
|
|
4702
4781
|
throw new Error("NavStackContainer must be used within a NavStackProvider");
|
|
4703
4782
|
const { stack: n } = t;
|
|
4704
4783
|
return /* @__PURE__ */ s("div", { className: "nav-stack-container", children: /* @__PURE__ */ s("div", { className: "nav-stack-content", children: n.map((r, o) => {
|
|
4705
4784
|
const i = o === n.length - 1;
|
|
4706
|
-
return /* @__PURE__ */ s(
|
|
4785
|
+
return /* @__PURE__ */ s(Dn, { index: o, children: /* @__PURE__ */ s(
|
|
4707
4786
|
"div",
|
|
4708
4787
|
{
|
|
4709
4788
|
style: { display: i ? "flex" : "none", flexDirection: "column", height: "100%" },
|
|
@@ -4713,55 +4792,55 @@ function kr() {
|
|
|
4713
4792
|
}) }) });
|
|
4714
4793
|
}
|
|
4715
4794
|
export {
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4795
|
+
Qe as ActivityIndicator,
|
|
4796
|
+
Kn as Alert,
|
|
4797
|
+
rt as AppContainer,
|
|
4798
|
+
nt as AppContext,
|
|
4799
|
+
yr as AppDialog,
|
|
4800
|
+
vr as AppPanel,
|
|
4801
|
+
wr as AppTaskbar,
|
|
4802
|
+
tn as AppTitleBar,
|
|
4803
|
+
_n as Battery,
|
|
4804
|
+
te as Button,
|
|
4805
|
+
Un as ButtonGroup,
|
|
4806
|
+
qn as Checkbox,
|
|
4807
|
+
Ze as CloseButton,
|
|
4808
|
+
Xn as ComboBox,
|
|
4809
|
+
tr as ContextMenu,
|
|
4810
|
+
fr as CsvTextArea,
|
|
4811
|
+
nr as Dialog,
|
|
4812
|
+
fe as DialogClose,
|
|
4813
|
+
Qn as EditButton,
|
|
4814
|
+
er as Hyperlink,
|
|
4815
|
+
rr as Input,
|
|
4816
|
+
sr as ListGroup,
|
|
4817
|
+
or as ListGroupItem,
|
|
4818
|
+
cr as MonthRangePicker,
|
|
4819
|
+
ir as MultiSelect,
|
|
4820
|
+
Ar as NavStackContainer,
|
|
4821
|
+
Nr as NavStackProvider,
|
|
4822
|
+
Ut as Notification,
|
|
4823
|
+
hr as NotificationContainer,
|
|
4824
|
+
ar as NumberInput,
|
|
4825
|
+
Jn as RefreshButton,
|
|
4826
|
+
lr as Slider,
|
|
4827
|
+
Ot as TabPanel,
|
|
4828
|
+
dr as TabPanels,
|
|
4829
|
+
ur as Tabs,
|
|
4830
|
+
pr as Toggle,
|
|
4831
|
+
Zn as TrashButton,
|
|
4832
|
+
br as ViewportProvider,
|
|
4833
|
+
me as appRegistry,
|
|
4834
|
+
ne as appStateStore,
|
|
4835
|
+
Bn as cn,
|
|
4836
|
+
gr as createAppI18nFactory,
|
|
4837
|
+
mr as notificationManager,
|
|
4838
|
+
Q as runningAppsStore,
|
|
4839
|
+
qt as showNotification,
|
|
4840
|
+
Zt as useApp,
|
|
4841
|
+
Dt as useDialog,
|
|
4842
|
+
xr as useNavStack,
|
|
4843
|
+
kr as useNavView,
|
|
4844
|
+
it as useViewport
|
|
4766
4845
|
};
|
|
4767
4846
|
//# sourceMappingURL=index.js.map
|