@kingsimba/nc-ui 0.1.19 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +17 -7
- package/dist/index.js +1020 -1012
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { jsx as s, jsxs as
|
|
5
|
-
import { d as xe, E as
|
|
6
|
-
import ke, { useState as
|
|
7
|
-
import { createPortal as
|
|
8
|
-
import { useTranslation as
|
|
9
|
-
import
|
|
10
|
-
import { c as
|
|
11
|
-
function
|
|
1
|
+
var et = Object.defineProperty;
|
|
2
|
+
var tt = (e, t, n) => t in e ? et(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var U = (e, t, n) => tt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { jsx as s, jsxs as x, Fragment as nt } from "react/jsx-runtime";
|
|
5
|
+
import { d as xe, E as rt, R as ot, T as st, g as it, V as ct, b as at, a as lt, c as dt } from "./GeneratedIcons-HFZmBTBT.js";
|
|
6
|
+
import ke, { useState as T, useRef as W, useMemo as me, useEffect as B, createContext as se, useContext as J, Children as ut, isValidElement as pt, forwardRef as ft, useImperativeHandle as ht, useCallback as O, Suspense as mt } from "react";
|
|
7
|
+
import { createPortal as ue } from "react-dom";
|
|
8
|
+
import { useTranslation as Q } from "react-i18next";
|
|
9
|
+
import gt from "i18next";
|
|
10
|
+
import { c as bt } from "./clsx-OuTLNxxd.js";
|
|
11
|
+
function He({
|
|
12
12
|
size: e = "default",
|
|
13
13
|
color: t,
|
|
14
14
|
overlay: n = !1,
|
|
@@ -37,56 +37,57 @@ function Be({
|
|
|
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 K({ variant: e = "default", block: t, size: n = "default", appearance: r = "default", className: o, disabled: i, textSelectable: l, loading: c, onClick: d, children: p, ...f }) {
|
|
41
|
+
const m = [
|
|
42
42
|
"nc-button",
|
|
43
43
|
e !== "default" ? `nc-${e}` : "",
|
|
44
44
|
t ? "nc-block" : "",
|
|
45
45
|
n === "small" ? "nc-small" : "",
|
|
46
46
|
n === "large" ? "nc-large" : "",
|
|
47
|
-
|
|
48
|
-
i ? "nc-
|
|
49
|
-
l ? "nc-
|
|
50
|
-
|
|
47
|
+
r === "transparent" ? "nc-transparent" : "",
|
|
48
|
+
i || c ? "nc-disabled" : "",
|
|
49
|
+
l ? "nc-text-selectable" : "",
|
|
50
|
+
c ? "nc-loading" : "",
|
|
51
|
+
o ?? ""
|
|
51
52
|
].filter(Boolean).join(" ");
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
+
return /* @__PURE__ */ x(
|
|
53
54
|
"button",
|
|
54
55
|
{
|
|
55
|
-
className:
|
|
56
|
-
disabled:
|
|
57
|
-
onClick: (
|
|
58
|
-
if (!
|
|
59
|
-
if (
|
|
60
|
-
const
|
|
61
|
-
if (
|
|
56
|
+
className: m,
|
|
57
|
+
disabled: i || c,
|
|
58
|
+
onClick: (u) => {
|
|
59
|
+
if (!c) {
|
|
60
|
+
if (l) {
|
|
61
|
+
const v = window.getSelection();
|
|
62
|
+
if (v && v.toString().length > 0)
|
|
62
63
|
return;
|
|
63
64
|
}
|
|
64
|
-
|
|
65
|
+
d == null || d(u);
|
|
65
66
|
}
|
|
66
67
|
},
|
|
67
|
-
...
|
|
68
|
+
...f,
|
|
68
69
|
children: [
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
c && /* @__PURE__ */ s(
|
|
71
|
+
He,
|
|
71
72
|
{
|
|
72
73
|
size: "small",
|
|
73
74
|
className: "nc-button-spinner",
|
|
74
|
-
color: e !== "default" && e !== "ghost" ? "white" : void 0
|
|
75
|
+
color: r === "transparent" || e !== "default" && e !== "ghost" ? "white" : void 0
|
|
75
76
|
}
|
|
76
77
|
),
|
|
77
|
-
|
|
78
|
+
p
|
|
78
79
|
]
|
|
79
80
|
}
|
|
80
81
|
);
|
|
81
82
|
}
|
|
82
|
-
const
|
|
83
|
+
const vt = {
|
|
83
84
|
info: "primary",
|
|
84
85
|
success: "success",
|
|
85
86
|
warning: "warning",
|
|
86
87
|
error: "danger",
|
|
87
88
|
danger: "danger"
|
|
88
89
|
};
|
|
89
|
-
function
|
|
90
|
+
function Tn({
|
|
90
91
|
code: e,
|
|
91
92
|
text: t,
|
|
92
93
|
type: n,
|
|
@@ -94,15 +95,15 @@ function $n({
|
|
|
94
95
|
onAction: o,
|
|
95
96
|
children: i,
|
|
96
97
|
onClose: l,
|
|
97
|
-
className:
|
|
98
|
+
className: c = "",
|
|
98
99
|
style: d
|
|
99
100
|
}) {
|
|
100
|
-
const p = i ?? /* @__PURE__ */
|
|
101
|
+
const p = i ?? /* @__PURE__ */ x(nt, { children: [
|
|
101
102
|
e !== void 0 && /* @__PURE__ */ s("span", { className: "nc-alert-code", children: e }),
|
|
102
103
|
t
|
|
103
104
|
] });
|
|
104
|
-
return /* @__PURE__ */
|
|
105
|
-
/* @__PURE__ */
|
|
105
|
+
return /* @__PURE__ */ x("div", { className: `nc-alert nc-${n} ${c}`.trim(), style: d, children: [
|
|
106
|
+
/* @__PURE__ */ x("div", { className: "nc-alert-main", children: [
|
|
106
107
|
/* @__PURE__ */ s("div", { className: `nc-alert-message nc-${n}`, children: p }),
|
|
107
108
|
l && /* @__PURE__ */ s(
|
|
108
109
|
"button",
|
|
@@ -116,17 +117,17 @@ function $n({
|
|
|
116
117
|
)
|
|
117
118
|
] }),
|
|
118
119
|
r && /* @__PURE__ */ s("span", { className: "nc-alert-action", children: /* @__PURE__ */ s(
|
|
119
|
-
|
|
120
|
+
K,
|
|
120
121
|
{
|
|
121
122
|
size: "small",
|
|
122
|
-
variant: r.variant ??
|
|
123
|
+
variant: r.variant ?? vt[n],
|
|
123
124
|
onClick: o,
|
|
124
125
|
children: r.text
|
|
125
126
|
}
|
|
126
127
|
) })
|
|
127
128
|
] });
|
|
128
129
|
}
|
|
129
|
-
function
|
|
130
|
+
function zn({
|
|
130
131
|
percentage: e = 0.5,
|
|
131
132
|
status: t = "discharging",
|
|
132
133
|
darkMode: n = !1,
|
|
@@ -135,54 +136,54 @@ function Rn({
|
|
|
135
136
|
const o = Math.max(0, Math.min(1, Number(e) || 0));
|
|
136
137
|
let i;
|
|
137
138
|
r ? o < 0.1 ? i = "var(--nc-danger)" : o < 0.2 ? i = "var(--nc-warning)" : i = "var(--nc-success)" : i = n ? "#ffffff" : "#000000";
|
|
138
|
-
const l = n ? "rgba(255, 255, 255, 0.5)" : "rgba(0, 0, 0, 0.2)",
|
|
139
|
-
return /* @__PURE__ */
|
|
139
|
+
const l = n ? "rgba(255, 255, 255, 0.5)" : "rgba(0, 0, 0, 0.2)", c = 24, d = 14, p = 2, f = 0, m = 12, a = 0, u = 0, v = 0, h = c, g = d, A = g - a * 2, b = h - a * 2, y = Math.max(1, Math.min(4, g / 4)), w = o === 0 ? 0 : 0.05 + o * 0.95, k = c + p + m, E = 20, z = 0.65, M = Math.max(d, E * z), N = c + p + 1, R = (d - E * z) / 2;
|
|
140
|
+
return /* @__PURE__ */ x(
|
|
140
141
|
"svg",
|
|
141
142
|
{
|
|
142
143
|
className: "nc-battery",
|
|
143
|
-
width:
|
|
144
|
-
height:
|
|
145
|
-
viewBox: `0 0 ${
|
|
144
|
+
width: k,
|
|
145
|
+
height: M,
|
|
146
|
+
viewBox: `0 0 ${k} ${M}`,
|
|
146
147
|
role: "img",
|
|
147
148
|
"aria-label": `Battery ${o === 0 ? "-" : Math.round(o * 100) + "%"} ${t}`,
|
|
148
149
|
children: [
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
/* @__PURE__ */ s("mask", { id: `nc-battery-fill-mask-${o}`, children: /* @__PURE__ */ s("rect", { x: "0", y: "0", width:
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
/* @__PURE__ */ s("rect", { x: "0", y: "0", width:
|
|
153
|
-
/* @__PURE__ */ s("text", { x: u +
|
|
150
|
+
/* @__PURE__ */ x("defs", { children: [
|
|
151
|
+
/* @__PURE__ */ s("mask", { id: `nc-battery-fill-mask-${o}`, children: /* @__PURE__ */ s("rect", { x: "0", y: "0", width: b * w, height: A, fill: "white" }) }),
|
|
152
|
+
/* @__PURE__ */ x("mask", { id: `nc-battery-text-mask-${o}`, children: [
|
|
153
|
+
/* @__PURE__ */ s("rect", { x: "0", y: "0", width: k, height: M, fill: "white" }),
|
|
154
|
+
/* @__PURE__ */ s("text", { x: u + h / 2, y: d - 3, fontSize: 11, fontWeight: "bold", fill: "black", textAnchor: "middle", children: o === 0 ? "-" : Math.round(o * 100) })
|
|
154
155
|
] })
|
|
155
156
|
] }),
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ x("g", { mask: `url(#nc-battery-text-mask-${o})`, children: [
|
|
157
158
|
/* @__PURE__ */ s(
|
|
158
159
|
"rect",
|
|
159
160
|
{
|
|
160
161
|
x: u,
|
|
161
|
-
y:
|
|
162
|
-
rx:
|
|
163
|
-
ry:
|
|
164
|
-
width:
|
|
165
|
-
height:
|
|
162
|
+
y: v,
|
|
163
|
+
rx: y,
|
|
164
|
+
ry: y,
|
|
165
|
+
width: h,
|
|
166
|
+
height: g,
|
|
166
167
|
fill: l
|
|
167
168
|
}
|
|
168
169
|
),
|
|
169
170
|
/* @__PURE__ */ s(
|
|
170
171
|
"rect",
|
|
171
172
|
{
|
|
172
|
-
x: u +
|
|
173
|
-
y:
|
|
174
|
-
width:
|
|
175
|
-
height:
|
|
173
|
+
x: u + a,
|
|
174
|
+
y: v + a,
|
|
175
|
+
width: b,
|
|
176
|
+
height: A,
|
|
176
177
|
fill: i,
|
|
177
|
-
rx:
|
|
178
|
-
ry:
|
|
178
|
+
rx: y,
|
|
179
|
+
ry: y,
|
|
179
180
|
mask: `url(#nc-battery-fill-mask-${o})`
|
|
180
181
|
}
|
|
181
182
|
),
|
|
182
183
|
/* @__PURE__ */ s(
|
|
183
184
|
"rect",
|
|
184
185
|
{
|
|
185
|
-
x:
|
|
186
|
+
x: c + f,
|
|
186
187
|
y: d * 0.26,
|
|
187
188
|
width: p,
|
|
188
189
|
height: d * 0.48,
|
|
@@ -191,32 +192,34 @@ function Rn({
|
|
|
191
192
|
fill: o === 1 ? i : l
|
|
192
193
|
}
|
|
193
194
|
),
|
|
194
|
-
t === "charging" ? /* @__PURE__ */ s("g", { transform: `translate(${
|
|
195
|
+
t === "charging" ? /* @__PURE__ */ s("g", { transform: `translate(${N}, ${R}) scale(${z})`, fill: i, children: /* @__PURE__ */ s("path", { d: "M10 0 L2 11 H8 L5 20 L14 8 H8 L10 0 Z" }) }) : null
|
|
195
196
|
] })
|
|
196
197
|
]
|
|
197
198
|
}
|
|
198
199
|
);
|
|
199
200
|
}
|
|
200
|
-
function
|
|
201
|
+
function Pn({
|
|
201
202
|
value: e,
|
|
202
203
|
onChange: t,
|
|
203
204
|
options: n,
|
|
204
205
|
disabled: r,
|
|
205
|
-
|
|
206
|
-
size: i = "default"
|
|
206
|
+
size: o = "default"
|
|
207
207
|
}) {
|
|
208
|
-
return /* @__PURE__ */ s("div", { className: `nc-button-group ${
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
208
|
+
return /* @__PURE__ */ s("div", { className: `nc-button-group ${o === "small" ? "nc-small" : ""}`, children: n.map((i, l) => {
|
|
209
|
+
const c = r || !!i.disabled;
|
|
210
|
+
return /* @__PURE__ */ s(
|
|
211
|
+
"button",
|
|
212
|
+
{
|
|
213
|
+
className: `nc-button-group-item ${e === i.key ? "nc-active" : ""} ${l < n.length - 1 ? "nc-has-border" : ""}`,
|
|
214
|
+
onClick: () => !c && t(i.key),
|
|
215
|
+
disabled: c,
|
|
216
|
+
children: i.label
|
|
217
|
+
},
|
|
218
|
+
i.key
|
|
219
|
+
);
|
|
220
|
+
}) });
|
|
218
221
|
}
|
|
219
|
-
function
|
|
222
|
+
function wt({ size: e }) {
|
|
220
223
|
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(
|
|
221
224
|
"path",
|
|
222
225
|
{
|
|
@@ -228,12 +231,12 @@ function gt({ size: e }) {
|
|
|
228
231
|
}
|
|
229
232
|
) });
|
|
230
233
|
}
|
|
231
|
-
function
|
|
234
|
+
function Ln({ checked: e, onChange: t, disabled: n, label: r, size: o = "default", labelColor: i, style: l, className: c = "" }) {
|
|
232
235
|
const d = o === "small";
|
|
233
|
-
return /* @__PURE__ */
|
|
236
|
+
return /* @__PURE__ */ x(
|
|
234
237
|
"label",
|
|
235
238
|
{
|
|
236
|
-
className: `nc-checkbox-label ${d ? "nc-small" : ""} ${n ? "nc-disabled" : ""} ${
|
|
239
|
+
className: `nc-checkbox-label ${d ? "nc-small" : ""} ${n ? "nc-disabled" : ""} ${c}`.trim(),
|
|
237
240
|
style: l,
|
|
238
241
|
onClick: (p) => {
|
|
239
242
|
n || (p.preventDefault(), t(!e));
|
|
@@ -249,7 +252,7 @@ function zn({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
|
|
|
249
252
|
onKeyDown: (p) => {
|
|
250
253
|
n || (p.key === "Enter" || p.key === " ") && (p.preventDefault(), t(!e));
|
|
251
254
|
},
|
|
252
|
-
children: e && /* @__PURE__ */ s(
|
|
255
|
+
children: e && /* @__PURE__ */ s(wt, { size: o })
|
|
253
256
|
}
|
|
254
257
|
),
|
|
255
258
|
r && /* @__PURE__ */ s("span", { className: "nc-checkbox-text", style: i ? { color: i } : void 0, children: r })
|
|
@@ -257,11 +260,11 @@ function zn({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
|
|
|
257
260
|
}
|
|
258
261
|
);
|
|
259
262
|
}
|
|
260
|
-
function
|
|
261
|
-
const i = W(null), { t: l } =
|
|
263
|
+
function yt({ option: e, onChange: t, selected: n, highlighted: r, small: o }) {
|
|
264
|
+
const i = W(null), { t: l } = Q();
|
|
262
265
|
return B(() => {
|
|
263
266
|
r && i.current && i.current.scrollIntoView({ block: "nearest" });
|
|
264
|
-
}, [r]), /* @__PURE__ */
|
|
267
|
+
}, [r]), /* @__PURE__ */ x(
|
|
265
268
|
"div",
|
|
266
269
|
{
|
|
267
270
|
ref: i,
|
|
@@ -275,7 +278,7 @@ function bt({ option: e, onChange: t, selected: n, highlighted: r, small: o }) {
|
|
|
275
278
|
},
|
|
276
279
|
children: [
|
|
277
280
|
e.label,
|
|
278
|
-
e.default && /* @__PURE__ */
|
|
281
|
+
e.default && /* @__PURE__ */ x("span", { style: { fontSize: "0.85em", color: "var(--nc-text-weak)", marginLeft: 6 }, children: [
|
|
279
282
|
"(",
|
|
280
283
|
l("common.default"),
|
|
281
284
|
")"
|
|
@@ -284,7 +287,7 @@ function bt({ option: e, onChange: t, selected: n, highlighted: r, small: o }) {
|
|
|
284
287
|
}
|
|
285
288
|
);
|
|
286
289
|
}
|
|
287
|
-
function
|
|
290
|
+
function xt({
|
|
288
291
|
isOpen: e,
|
|
289
292
|
options: t,
|
|
290
293
|
onSelect: n,
|
|
@@ -292,21 +295,21 @@ function vt({
|
|
|
292
295
|
placement: o = "bottom",
|
|
293
296
|
anchorRef: i,
|
|
294
297
|
small: l,
|
|
295
|
-
highlightedIndex:
|
|
298
|
+
highlightedIndex: c = -1
|
|
296
299
|
}) {
|
|
297
|
-
const [d, p] =
|
|
300
|
+
const [d, p] = T({ top: 0, left: 0, width: 0 }), [f, m] = T(o), { t: a } = Q();
|
|
298
301
|
if (B(() => {
|
|
299
302
|
if (e && i.current) {
|
|
300
|
-
const
|
|
301
|
-
let
|
|
303
|
+
const v = i.current.getBoundingClientRect();
|
|
304
|
+
let h = o;
|
|
302
305
|
if (o === "bottom") {
|
|
303
|
-
const
|
|
304
|
-
|
|
306
|
+
const g = window.innerHeight - v.bottom, A = v.top;
|
|
307
|
+
g < 320 && A > g && (h = "top");
|
|
305
308
|
}
|
|
306
|
-
|
|
307
|
-
top:
|
|
308
|
-
left:
|
|
309
|
-
width:
|
|
309
|
+
m(h), p({
|
|
310
|
+
top: h === "top" ? v.top - 4 : v.bottom + 4,
|
|
311
|
+
left: v.left,
|
|
312
|
+
width: v.width
|
|
310
313
|
});
|
|
311
314
|
}
|
|
312
315
|
}, [e, i, o]), !e) return null;
|
|
@@ -324,12 +327,12 @@ function vt({
|
|
|
324
327
|
maxHeight: 300,
|
|
325
328
|
overflowY: "auto"
|
|
326
329
|
},
|
|
327
|
-
children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${l ? "nc-small" : ""}`, children:
|
|
330
|
+
children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${l ? "nc-small" : ""}`, children: a("common.noResults") }) : t.map((v, h) => /* @__PURE__ */ s(yt, { option: v, onChange: n, selected: v.value === r, highlighted: h === c, small: l }, v.value))
|
|
328
331
|
}
|
|
329
332
|
);
|
|
330
|
-
return
|
|
333
|
+
return ue(u, document.body);
|
|
331
334
|
}
|
|
332
|
-
function
|
|
335
|
+
function kt({ onClick: e, small: t }) {
|
|
333
336
|
return /* @__PURE__ */ s(
|
|
334
337
|
"button",
|
|
335
338
|
{
|
|
@@ -341,7 +344,7 @@ function wt({ onClick: e, small: t }) {
|
|
|
341
344
|
}
|
|
342
345
|
);
|
|
343
346
|
}
|
|
344
|
-
function
|
|
347
|
+
function Nt({ open: e, onClick: t, small: n }) {
|
|
345
348
|
return /* @__PURE__ */ s(
|
|
346
349
|
"button",
|
|
347
350
|
{
|
|
@@ -353,7 +356,7 @@ function yt({ open: e, onClick: t, small: n }) {
|
|
|
353
356
|
}
|
|
354
357
|
);
|
|
355
358
|
}
|
|
356
|
-
function
|
|
359
|
+
function Bn({
|
|
357
360
|
value: e,
|
|
358
361
|
onChange: t,
|
|
359
362
|
placeholder: n = "Select…",
|
|
@@ -361,19 +364,20 @@ function Tn({
|
|
|
361
364
|
disabled: o,
|
|
362
365
|
label: i,
|
|
363
366
|
clearable: l = !0,
|
|
364
|
-
allowTyping:
|
|
367
|
+
allowTyping: c = !1,
|
|
365
368
|
placement: d = "bottom",
|
|
366
369
|
size: p = "default",
|
|
367
|
-
|
|
368
|
-
|
|
370
|
+
appearance: f = "default",
|
|
371
|
+
style: m,
|
|
372
|
+
className: a
|
|
369
373
|
}) {
|
|
370
|
-
const [
|
|
371
|
-
const $ =
|
|
372
|
-
return
|
|
373
|
-
}, [r,
|
|
374
|
+
const [u, v] = T(!1), [h, g] = T(""), [A, b] = T(-1), y = W(null), w = W(null), k = p === "small", { t: E } = Q(), z = me(() => {
|
|
375
|
+
const $ = h.toLowerCase();
|
|
376
|
+
return c ? r.filter((P) => P.label.toLowerCase().includes($)) : r;
|
|
377
|
+
}, [r, h, c]);
|
|
374
378
|
B(() => {
|
|
375
|
-
|
|
376
|
-
}, [
|
|
379
|
+
u && b(-1);
|
|
380
|
+
}, [u, z]), B(() => {
|
|
377
381
|
if (!l && !e && r.length > 0 && t) {
|
|
378
382
|
const $ = r.find((P) => P.default) || r[0];
|
|
379
383
|
t($.value);
|
|
@@ -381,90 +385,90 @@ function Tn({
|
|
|
381
385
|
}, [l, e, r, t]), B(() => {
|
|
382
386
|
function $(P) {
|
|
383
387
|
var H;
|
|
384
|
-
P.target instanceof Node &&
|
|
388
|
+
P.target instanceof Node && y.current && ((H = y.current.parentElement) != null && H.contains(P.target) || v(!1));
|
|
385
389
|
}
|
|
386
390
|
return document.addEventListener("mousedown", $), () => document.removeEventListener("mousedown", $);
|
|
387
391
|
}, []);
|
|
388
|
-
const
|
|
392
|
+
const M = r.find(($) => $.value === e), N = M && l, R = !o && !N, C = !(u && c) && !!M, S = ($, P = !1) => {
|
|
389
393
|
var H;
|
|
390
|
-
t == null || t($),
|
|
391
|
-
},
|
|
392
|
-
t == null || t(void 0),
|
|
393
|
-
},
|
|
394
|
-
if (!
|
|
395
|
-
($.key === "ArrowDown" || $.key === "ArrowUp") && (
|
|
394
|
+
t == null || t($), v(!1), g(""), P && ((H = y.current) == null || H.blur());
|
|
395
|
+
}, L = () => {
|
|
396
|
+
t == null || t(void 0), g(""), v(!1);
|
|
397
|
+
}, V = ($) => {
|
|
398
|
+
if (!u) {
|
|
399
|
+
($.key === "ArrowDown" || $.key === "ArrowUp") && (v(!0), $.preventDefault());
|
|
396
400
|
return;
|
|
397
401
|
}
|
|
398
402
|
switch ($.key) {
|
|
399
403
|
case "ArrowDown":
|
|
400
|
-
$.preventDefault(),
|
|
404
|
+
$.preventDefault(), b((P) => {
|
|
401
405
|
const H = P + 1;
|
|
402
|
-
return H >=
|
|
406
|
+
return H >= z.length ? 0 : H;
|
|
403
407
|
});
|
|
404
408
|
break;
|
|
405
409
|
case "ArrowUp":
|
|
406
|
-
$.preventDefault(),
|
|
410
|
+
$.preventDefault(), b((P) => {
|
|
407
411
|
const H = P - 1;
|
|
408
|
-
return H < 0 ?
|
|
412
|
+
return H < 0 ? z.length - 1 : H;
|
|
409
413
|
});
|
|
410
414
|
break;
|
|
411
415
|
case "Enter":
|
|
412
|
-
$.preventDefault(),
|
|
416
|
+
$.preventDefault(), A >= 0 && A < z.length && S(z[A].value, !0);
|
|
413
417
|
break;
|
|
414
418
|
case "Escape":
|
|
415
|
-
$.preventDefault(),
|
|
419
|
+
$.preventDefault(), v(!1), g("");
|
|
416
420
|
break;
|
|
417
421
|
}
|
|
418
422
|
};
|
|
419
|
-
return /* @__PURE__ */
|
|
420
|
-
i && /* @__PURE__ */ s("span", { className: `nc-label ${
|
|
421
|
-
/* @__PURE__ */
|
|
423
|
+
return /* @__PURE__ */ x("div", { className: `nc-combo-container ${f === "transparent" ? "nc-transparent" : ""} ${a || ""}`.trim(), style: { position: "relative", ...m }, children: [
|
|
424
|
+
i && /* @__PURE__ */ s("span", { className: `nc-label ${k ? "nc-small" : ""}`, children: i }),
|
|
425
|
+
/* @__PURE__ */ x(
|
|
422
426
|
"div",
|
|
423
427
|
{
|
|
424
|
-
ref:
|
|
428
|
+
ref: w,
|
|
425
429
|
style: { position: "relative", display: "flex", alignItems: "center" },
|
|
426
430
|
onMouseDown: ($) => {
|
|
427
|
-
o ||
|
|
431
|
+
o || c && $.target === y.current || (v((P) => (!P && c && M && g(M.label), !P)), c && !u && setTimeout(() => {
|
|
428
432
|
var P, H;
|
|
429
|
-
(P =
|
|
433
|
+
(P = y.current) == null || P.focus(), (H = y.current) == null || H.select();
|
|
430
434
|
}, 0));
|
|
431
435
|
},
|
|
432
436
|
children: [
|
|
433
437
|
/* @__PURE__ */ s(
|
|
434
438
|
"input",
|
|
435
439
|
{
|
|
436
|
-
ref:
|
|
437
|
-
className: `nc-input ${
|
|
440
|
+
ref: y,
|
|
441
|
+
className: `nc-input ${k ? "nc-small" : ""}`,
|
|
438
442
|
placeholder: n,
|
|
439
443
|
onFocus: () => {
|
|
440
444
|
var $;
|
|
441
|
-
!o &&
|
|
445
|
+
!o && c && (v(!0), M && (g(M.label), setTimeout(() => {
|
|
442
446
|
var P;
|
|
443
|
-
return (P =
|
|
444
|
-
}, 0))),
|
|
447
|
+
return (P = y.current) == null ? void 0 : P.select();
|
|
448
|
+
}, 0))), c || ($ = y.current) == null || $.blur();
|
|
445
449
|
},
|
|
446
|
-
onChange: ($) =>
|
|
447
|
-
onKeyDown:
|
|
448
|
-
value:
|
|
449
|
-
readOnly: o || !
|
|
450
|
+
onChange: ($) => c && g($.target.value),
|
|
451
|
+
onKeyDown: V,
|
|
452
|
+
value: u && c ? h : (M == null ? void 0 : M.label) || "",
|
|
453
|
+
readOnly: o || !c,
|
|
450
454
|
style: {
|
|
451
455
|
width: "100%",
|
|
452
|
-
paddingRight:
|
|
453
|
-
caretColor:
|
|
454
|
-
cursor:
|
|
455
|
-
userSelect:
|
|
456
|
-
color:
|
|
456
|
+
paddingRight: R || N ? k ? 32 : 44 : 12,
|
|
457
|
+
caretColor: c ? void 0 : "transparent",
|
|
458
|
+
cursor: c ? void 0 : "pointer",
|
|
459
|
+
userSelect: c ? void 0 : "none",
|
|
460
|
+
color: C ? "transparent" : "var(--nc-text)"
|
|
457
461
|
}
|
|
458
462
|
}
|
|
459
463
|
),
|
|
460
|
-
|
|
464
|
+
C && /* @__PURE__ */ x(
|
|
461
465
|
"div",
|
|
462
466
|
{
|
|
463
467
|
"aria-hidden": !0,
|
|
464
468
|
style: {
|
|
465
469
|
position: "absolute",
|
|
466
|
-
left:
|
|
467
|
-
right:
|
|
470
|
+
left: k ? 8 : 12,
|
|
471
|
+
right: R || N ? k ? 12 : 24 : k ? 8 : 12,
|
|
468
472
|
top: "50%",
|
|
469
473
|
transform: "translateY(-50%)",
|
|
470
474
|
pointerEvents: "none",
|
|
@@ -476,24 +480,24 @@ function Tn({
|
|
|
476
480
|
textOverflow: "ellipsis"
|
|
477
481
|
},
|
|
478
482
|
children: [
|
|
479
|
-
/* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${
|
|
480
|
-
(
|
|
483
|
+
/* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${k ? "nc-small" : ""}`, children: M == null ? void 0 : M.label }),
|
|
484
|
+
(M == null ? void 0 : M.default) && /* @__PURE__ */ x("span", { className: `nc-combo-overlay-default ${k ? "nc-small" : ""}`, children: [
|
|
481
485
|
"(",
|
|
482
|
-
|
|
486
|
+
E("common.default"),
|
|
483
487
|
")"
|
|
484
488
|
] })
|
|
485
489
|
]
|
|
486
490
|
}
|
|
487
491
|
),
|
|
488
|
-
|
|
489
|
-
|
|
492
|
+
N && /* @__PURE__ */ s(kt, { onClick: L, small: k }),
|
|
493
|
+
R && /* @__PURE__ */ s(Nt, { open: u, onClick: () => v(($) => !$), small: k })
|
|
490
494
|
]
|
|
491
495
|
}
|
|
492
496
|
),
|
|
493
|
-
/* @__PURE__ */ s(
|
|
497
|
+
/* @__PURE__ */ s(xt, { isOpen: u, options: z, onSelect: S, selectedValue: e, placement: d, anchorRef: w, small: k, highlightedIndex: A })
|
|
494
498
|
] });
|
|
495
499
|
}
|
|
496
|
-
function
|
|
500
|
+
function Dn({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default", title: o, "aria-label": i }) {
|
|
497
501
|
return /* @__PURE__ */ s(
|
|
498
502
|
"button",
|
|
499
503
|
{
|
|
@@ -503,11 +507,11 @@ function Pn({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default"
|
|
|
503
507
|
title: o ?? (t ? "Refreshing..." : "Refresh"),
|
|
504
508
|
"aria-label": i ?? (t ? "Refreshing" : "Refresh"),
|
|
505
509
|
"data-size": r,
|
|
506
|
-
children: /* @__PURE__ */ s(
|
|
510
|
+
children: /* @__PURE__ */ s(ot, { size: r === "small" ? 14 : r === "large" ? 20 : 18, className: t ? "nc-spinning" : "" })
|
|
507
511
|
}
|
|
508
512
|
);
|
|
509
513
|
}
|
|
510
|
-
function
|
|
514
|
+
function We({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Close", "aria-label": o = "Close" }) {
|
|
511
515
|
return /* @__PURE__ */ s(
|
|
512
516
|
"button",
|
|
513
517
|
{
|
|
@@ -521,7 +525,7 @@ function De({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Clo
|
|
|
521
525
|
}
|
|
522
526
|
);
|
|
523
527
|
}
|
|
524
|
-
function
|
|
528
|
+
function Hn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Edit", "aria-label": o = "Edit" }) {
|
|
525
529
|
return /* @__PURE__ */ s(
|
|
526
530
|
"button",
|
|
527
531
|
{
|
|
@@ -531,11 +535,11 @@ function Ln({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Edi
|
|
|
531
535
|
title: r,
|
|
532
536
|
"aria-label": o,
|
|
533
537
|
"data-size": n,
|
|
534
|
-
children: /* @__PURE__ */ s(
|
|
538
|
+
children: /* @__PURE__ */ s(rt, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
|
|
535
539
|
}
|
|
536
540
|
);
|
|
537
541
|
}
|
|
538
|
-
function
|
|
542
|
+
function Wn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Delete", "aria-label": o = "Delete" }) {
|
|
539
543
|
return /* @__PURE__ */ s(
|
|
540
544
|
"button",
|
|
541
545
|
{
|
|
@@ -545,11 +549,11 @@ function Bn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Del
|
|
|
545
549
|
title: r,
|
|
546
550
|
"aria-label": o,
|
|
547
551
|
"data-size": n,
|
|
548
|
-
children: /* @__PURE__ */ s(
|
|
552
|
+
children: /* @__PURE__ */ s(st, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
|
|
549
553
|
}
|
|
550
554
|
);
|
|
551
555
|
}
|
|
552
|
-
function
|
|
556
|
+
function On({ onClick: e, disabled: t = !1, children: n, title: r, "aria-label": o, size: i = "default" }) {
|
|
553
557
|
return /* @__PURE__ */ s(
|
|
554
558
|
"button",
|
|
555
559
|
{
|
|
@@ -563,7 +567,7 @@ function Dn({ onClick: e, disabled: t = !1, children: n, title: r, "aria-label":
|
|
|
563
567
|
}
|
|
564
568
|
);
|
|
565
569
|
}
|
|
566
|
-
function
|
|
570
|
+
function Fn({
|
|
567
571
|
open: e,
|
|
568
572
|
onClose: t,
|
|
569
573
|
options: n,
|
|
@@ -571,36 +575,36 @@ function Hn({
|
|
|
571
575
|
anchor: o,
|
|
572
576
|
preferredDirection: i = "down"
|
|
573
577
|
}) {
|
|
574
|
-
const l = W(null), [
|
|
578
|
+
const l = W(null), [c, d] = T({ top: 0, left: 0 }), p = o || (r == null ? void 0 : r.current);
|
|
575
579
|
if (B(() => {
|
|
576
580
|
if (!e || !p || !l.current) return;
|
|
577
|
-
const
|
|
578
|
-
let
|
|
579
|
-
(!
|
|
580
|
-
let
|
|
581
|
-
|
|
582
|
-
let
|
|
583
|
-
|
|
584
|
-
top: Math.max(8,
|
|
581
|
+
const a = p.getBoundingClientRect(), u = l.current.getBoundingClientRect(), v = window.innerHeight, h = window.innerWidth, g = a.bottom + 8, A = g + u.height <= v - 8;
|
|
582
|
+
let b = i;
|
|
583
|
+
(!A && i === "down" || i === "up" && A) && (b = "up");
|
|
584
|
+
let y;
|
|
585
|
+
b === "down" ? y = g : y = a.top - u.height - 8;
|
|
586
|
+
let w = a.left;
|
|
587
|
+
w + u.width > h - 8 && (w = a.right - u.width), d({
|
|
588
|
+
top: Math.max(8, y),
|
|
585
589
|
// Ensure minimum 8px from top
|
|
586
|
-
left: Math.max(8,
|
|
590
|
+
left: Math.max(8, w)
|
|
587
591
|
// Ensure minimum 8px from left
|
|
588
592
|
});
|
|
589
593
|
}, [e, p, i]), B(() => {
|
|
590
594
|
if (!e) return;
|
|
591
|
-
const
|
|
592
|
-
l.current && !l.current.contains(
|
|
593
|
-
}, u = (
|
|
594
|
-
|
|
595
|
+
const a = (v) => {
|
|
596
|
+
l.current && !l.current.contains(v.target) && p && !p.contains(v.target) && t();
|
|
597
|
+
}, u = (v) => {
|
|
598
|
+
v.key === "Escape" && t();
|
|
595
599
|
};
|
|
596
|
-
return document.addEventListener("mousedown",
|
|
597
|
-
document.removeEventListener("mousedown",
|
|
600
|
+
return document.addEventListener("mousedown", a), document.addEventListener("keydown", u), () => {
|
|
601
|
+
document.removeEventListener("mousedown", a), document.removeEventListener("keydown", u);
|
|
598
602
|
};
|
|
599
603
|
}, [e, t, p]), !e) return null;
|
|
600
|
-
const f = (
|
|
601
|
-
|
|
602
|
-
},
|
|
603
|
-
return
|
|
604
|
+
const f = (a) => {
|
|
605
|
+
a.type !== "separator" && !a.disabled && a.onClick && (a.onClick(), t());
|
|
606
|
+
}, m = n.some((a) => a.icon);
|
|
607
|
+
return ue(
|
|
604
608
|
/* @__PURE__ */ s(
|
|
605
609
|
"div",
|
|
606
610
|
{
|
|
@@ -608,40 +612,40 @@ function Hn({
|
|
|
608
612
|
className: "nc-context-menu",
|
|
609
613
|
style: {
|
|
610
614
|
position: "fixed",
|
|
611
|
-
top: `${
|
|
612
|
-
left: `${
|
|
615
|
+
top: `${c.top}px`,
|
|
616
|
+
left: `${c.left}px`,
|
|
613
617
|
zIndex: 1e4
|
|
614
618
|
},
|
|
615
619
|
role: "menu",
|
|
616
|
-
children: n.map((
|
|
617
|
-
if (
|
|
620
|
+
children: n.map((a) => {
|
|
621
|
+
if (a.type === "separator")
|
|
618
622
|
return /* @__PURE__ */ s(
|
|
619
623
|
"div",
|
|
620
624
|
{
|
|
621
625
|
className: "nc-context-menu-separator",
|
|
622
626
|
role: "separator"
|
|
623
627
|
},
|
|
624
|
-
|
|
628
|
+
a.id
|
|
625
629
|
);
|
|
626
630
|
const u = [
|
|
627
631
|
"nc-context-menu-item",
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
632
|
+
a.variant && a.variant !== "default" ? `nc-${a.variant}` : "",
|
|
633
|
+
a.disabled ? "nc-disabled" : "",
|
|
634
|
+
m && !a.icon ? "nc-indented" : ""
|
|
631
635
|
].filter(Boolean).join(" ");
|
|
632
|
-
return /* @__PURE__ */
|
|
636
|
+
return /* @__PURE__ */ x(
|
|
633
637
|
"button",
|
|
634
638
|
{
|
|
635
639
|
className: u,
|
|
636
|
-
onClick: () => f(
|
|
637
|
-
disabled:
|
|
640
|
+
onClick: () => f(a),
|
|
641
|
+
disabled: a.disabled,
|
|
638
642
|
role: "menuitem",
|
|
639
643
|
children: [
|
|
640
|
-
|
|
641
|
-
/* @__PURE__ */ s("span", { className: "nc-context-menu-label", children:
|
|
644
|
+
a.icon && /* @__PURE__ */ s("span", { className: "nc-context-menu-icon", children: a.icon }),
|
|
645
|
+
/* @__PURE__ */ s("span", { className: "nc-context-menu-label", children: a.label })
|
|
642
646
|
]
|
|
643
647
|
},
|
|
644
|
-
|
|
648
|
+
a.id
|
|
645
649
|
);
|
|
646
650
|
})
|
|
647
651
|
}
|
|
@@ -649,20 +653,20 @@ function Hn({
|
|
|
649
653
|
document.body
|
|
650
654
|
);
|
|
651
655
|
}
|
|
652
|
-
const
|
|
653
|
-
function
|
|
654
|
-
const e =
|
|
656
|
+
const Oe = se(null);
|
|
657
|
+
function At() {
|
|
658
|
+
const e = J(Oe);
|
|
655
659
|
if (!e)
|
|
656
660
|
throw new Error("useDialog must be used inside a Dialog component");
|
|
657
661
|
return e;
|
|
658
662
|
}
|
|
659
663
|
function ne({ children: e, onClick: t, ...n }) {
|
|
660
|
-
const { close: r } =
|
|
661
|
-
return /* @__PURE__ */ s(
|
|
664
|
+
const { close: r } = At(), { t: o } = Q();
|
|
665
|
+
return /* @__PURE__ */ s(K, { onClick: (l) => {
|
|
662
666
|
t == null || t(l), r();
|
|
663
667
|
}, ...n, children: e ?? o("common.close") });
|
|
664
668
|
}
|
|
665
|
-
function
|
|
669
|
+
function Vn({
|
|
666
670
|
open: e,
|
|
667
671
|
onClose: t,
|
|
668
672
|
title: n,
|
|
@@ -670,63 +674,63 @@ function Wn({
|
|
|
670
674
|
style: o,
|
|
671
675
|
footerType: i = "ok-cancel",
|
|
672
676
|
footer: l,
|
|
673
|
-
onOk:
|
|
677
|
+
onOk: c,
|
|
674
678
|
onSave: d,
|
|
675
679
|
onDelete: p,
|
|
676
680
|
onCancel: f,
|
|
677
|
-
onConnect:
|
|
678
|
-
closeOnOverlay:
|
|
681
|
+
onConnect: m,
|
|
682
|
+
closeOnOverlay: a = !0,
|
|
679
683
|
primaryDisabled: u = !1,
|
|
680
|
-
fullScreen:
|
|
681
|
-
hideTitleBar:
|
|
682
|
-
className:
|
|
683
|
-
onContentHeightChange:
|
|
684
|
+
fullScreen: v = !1,
|
|
685
|
+
hideTitleBar: h = !1,
|
|
686
|
+
className: g = "",
|
|
687
|
+
onContentHeightChange: A
|
|
684
688
|
}) {
|
|
685
|
-
const
|
|
686
|
-
|
|
689
|
+
const b = W(null), y = W(null), { t: w } = Q(), k = { close: t }, E = (N) => {
|
|
690
|
+
a && N.target === N.currentTarget && t();
|
|
687
691
|
};
|
|
688
692
|
if (B(() => {
|
|
689
|
-
e &&
|
|
693
|
+
e && b.current && b.current.focus();
|
|
690
694
|
}, [e]), B(() => {
|
|
691
|
-
if (!
|
|
692
|
-
const
|
|
693
|
-
for (const
|
|
694
|
-
const S =
|
|
695
|
-
|
|
695
|
+
if (!A || !y.current) return;
|
|
696
|
+
const N = new ResizeObserver((R) => {
|
|
697
|
+
for (const C of R) {
|
|
698
|
+
const S = C.contentRect.height;
|
|
699
|
+
A(S);
|
|
696
700
|
}
|
|
697
701
|
});
|
|
698
|
-
return
|
|
699
|
-
|
|
702
|
+
return N.observe(y.current), () => {
|
|
703
|
+
N.disconnect();
|
|
700
704
|
};
|
|
701
|
-
}, [
|
|
702
|
-
const
|
|
705
|
+
}, [A]), !e) return null;
|
|
706
|
+
const z = () => {
|
|
703
707
|
switch (i) {
|
|
704
708
|
case "ok":
|
|
705
|
-
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(
|
|
709
|
+
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(K, { variant: "primary", onClick: c ?? t, disabled: u, children: w("common.ok") }) });
|
|
706
710
|
case "ok-cancel":
|
|
707
|
-
return /* @__PURE__ */
|
|
708
|
-
/* @__PURE__ */ s(
|
|
709
|
-
/* @__PURE__ */ s(ne, { onClick: f, children:
|
|
711
|
+
return /* @__PURE__ */ x("div", { className: "nc-dialog-footer", children: [
|
|
712
|
+
/* @__PURE__ */ s(K, { variant: "primary", onClick: c ?? t, disabled: u, children: w("common.ok") }),
|
|
713
|
+
/* @__PURE__ */ s(ne, { onClick: f, children: w("common.cancel") })
|
|
710
714
|
] });
|
|
711
715
|
case "save-cancel":
|
|
712
|
-
return /* @__PURE__ */
|
|
713
|
-
/* @__PURE__ */ s(
|
|
714
|
-
/* @__PURE__ */ s(ne, { onClick: f, children:
|
|
716
|
+
return /* @__PURE__ */ x("div", { className: "nc-dialog-footer", children: [
|
|
717
|
+
/* @__PURE__ */ s(K, { variant: "primary", onClick: d, disabled: u, children: w("common.save") }),
|
|
718
|
+
/* @__PURE__ */ s(ne, { onClick: f, children: w("common.cancel") })
|
|
715
719
|
] });
|
|
716
720
|
case "delete-cancel":
|
|
717
|
-
return /* @__PURE__ */
|
|
718
|
-
/* @__PURE__ */ s(
|
|
719
|
-
/* @__PURE__ */ s(ne, { onClick: f, children:
|
|
721
|
+
return /* @__PURE__ */ x("div", { className: "nc-dialog-footer", children: [
|
|
722
|
+
/* @__PURE__ */ s(K, { variant: "danger", onClick: p, disabled: u, children: w("common.delete") }),
|
|
723
|
+
/* @__PURE__ */ s(ne, { onClick: f, children: w("common.cancel") })
|
|
720
724
|
] });
|
|
721
725
|
case "connect":
|
|
722
|
-
return /* @__PURE__ */
|
|
723
|
-
/* @__PURE__ */ s(
|
|
724
|
-
/* @__PURE__ */ s(ne, { onClick: f, children:
|
|
726
|
+
return /* @__PURE__ */ x("div", { className: "nc-dialog-footer", children: [
|
|
727
|
+
/* @__PURE__ */ s(K, { variant: "primary", onClick: m, disabled: u, children: w("common.connect") }),
|
|
728
|
+
/* @__PURE__ */ s(ne, { onClick: f, children: w("common.cancel") })
|
|
725
729
|
] });
|
|
726
730
|
case "close":
|
|
727
731
|
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(ne, { variant: "primary" }) });
|
|
728
732
|
case "gotit":
|
|
729
|
-
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(ne, { variant: "primary", children:
|
|
733
|
+
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(ne, { variant: "primary", children: w("common.gotit") }) });
|
|
730
734
|
case "custom":
|
|
731
735
|
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: l });
|
|
732
736
|
case "none":
|
|
@@ -734,29 +738,29 @@ function Wn({
|
|
|
734
738
|
default:
|
|
735
739
|
return null;
|
|
736
740
|
}
|
|
737
|
-
},
|
|
741
|
+
}, M = /* @__PURE__ */ s(Oe.Provider, { value: k, children: /* @__PURE__ */ s("div", { className: `nc-dialog-overlay${v ? " nc-fullscreen" : ""}`, onClick: E, children: /* @__PURE__ */ x(
|
|
738
742
|
"div",
|
|
739
743
|
{
|
|
740
|
-
ref:
|
|
741
|
-
className: `nc-dialog-container ${
|
|
744
|
+
ref: b,
|
|
745
|
+
className: `nc-dialog-container ${g}`,
|
|
742
746
|
style: o,
|
|
743
747
|
tabIndex: -1,
|
|
744
748
|
role: "dialog",
|
|
745
749
|
"aria-modal": "true",
|
|
746
|
-
"aria-labelledby":
|
|
750
|
+
"aria-labelledby": h ? void 0 : "nc-dialog-title",
|
|
747
751
|
children: [
|
|
748
|
-
!
|
|
752
|
+
!h && /* @__PURE__ */ x("div", { className: "nc-dialog-header", children: [
|
|
749
753
|
/* @__PURE__ */ s("h3", { id: "nc-dialog-title", className: "nc-dialog-title", children: n }),
|
|
750
|
-
/* @__PURE__ */ s(
|
|
754
|
+
/* @__PURE__ */ s(We, { onClick: t, "aria-label": "Close dialog" })
|
|
751
755
|
] }),
|
|
752
|
-
/* @__PURE__ */ s("div", { ref:
|
|
753
|
-
|
|
756
|
+
/* @__PURE__ */ s("div", { ref: y, className: "nc-dialog-content", children: r }),
|
|
757
|
+
z()
|
|
754
758
|
]
|
|
755
759
|
}
|
|
756
760
|
) }) });
|
|
757
|
-
return
|
|
761
|
+
return v ? ue(M, document.body) : M;
|
|
758
762
|
}
|
|
759
|
-
function
|
|
763
|
+
function Ct({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
|
|
760
764
|
const r = t === "small" ? 28 : 34;
|
|
761
765
|
return /* @__PURE__ */ s(
|
|
762
766
|
"button",
|
|
@@ -785,7 +789,7 @@ function kt({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
|
|
|
785
789
|
}
|
|
786
790
|
);
|
|
787
791
|
}
|
|
788
|
-
function
|
|
792
|
+
function St({ visible: e, onClick: t, size: n = "default" }) {
|
|
789
793
|
const r = n === "small" ? 28 : 34, o = n === "small" ? 16 : 18;
|
|
790
794
|
return /* @__PURE__ */ s(
|
|
791
795
|
"button",
|
|
@@ -809,11 +813,11 @@ function Nt({ visible: e, onClick: t, size: n = "default" }) {
|
|
|
809
813
|
alignItems: "center",
|
|
810
814
|
justifyContent: "center"
|
|
811
815
|
},
|
|
812
|
-
children: e ? /* @__PURE__ */ s(
|
|
816
|
+
children: e ? /* @__PURE__ */ s(it, { size: o }) : /* @__PURE__ */ s(ct, { size: o })
|
|
813
817
|
}
|
|
814
818
|
);
|
|
815
819
|
}
|
|
816
|
-
function
|
|
820
|
+
function Gn({
|
|
817
821
|
value: e,
|
|
818
822
|
defaultValue: t = "",
|
|
819
823
|
onChange: n,
|
|
@@ -821,85 +825,89 @@ function On({
|
|
|
821
825
|
onClear: o,
|
|
822
826
|
placeholder: i,
|
|
823
827
|
disabled: l,
|
|
824
|
-
label:
|
|
828
|
+
label: c,
|
|
825
829
|
clearable: d = !0,
|
|
826
830
|
type: p = "text",
|
|
827
831
|
className: f = "",
|
|
828
|
-
size:
|
|
829
|
-
style:
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
832
|
+
size: m = "default",
|
|
833
|
+
style: a,
|
|
834
|
+
leadingIcon: u,
|
|
835
|
+
showPasswordToggle: v = !1,
|
|
836
|
+
multiline: h = !1,
|
|
837
|
+
rows: g = 3,
|
|
838
|
+
validator: A,
|
|
839
|
+
showErrorMessage: b = !0
|
|
835
840
|
}) {
|
|
836
|
-
const
|
|
837
|
-
let
|
|
838
|
-
H && P ?
|
|
839
|
-
const
|
|
840
|
-
var te,
|
|
841
|
-
|
|
842
|
-
},
|
|
843
|
-
te.key === "Enter" && !
|
|
844
|
-
},
|
|
845
|
-
const
|
|
846
|
-
|
|
847
|
-
},
|
|
848
|
-
|
|
849
|
-
},
|
|
850
|
-
|
|
851
|
-
},
|
|
852
|
-
return /* @__PURE__ */
|
|
853
|
-
|
|
854
|
-
/* @__PURE__ */
|
|
855
|
-
|
|
841
|
+
const y = W(null), w = W(null), [k, E] = T(!1), [z, M] = T(!1), N = e !== void 0, [R, C] = T(t), S = N ? e : R, L = A ? A(S) : null, V = !!L, $ = p === "password", P = $ && v && !l && !h, H = d && S && !l && z, Z = m === "small" ? 32 : 44;
|
|
842
|
+
let Y = 12;
|
|
843
|
+
H && P ? Y = Z * 2 : (H || P) && (Y = Z);
|
|
844
|
+
const F = u ? m === "small" ? 28 : 34 : void 0, Ze = () => {
|
|
845
|
+
var te, ce;
|
|
846
|
+
N || C(""), n == null || n(""), o == null || o(), h ? (te = w.current) == null || te.focus() : (ce = y.current) == null || ce.focus();
|
|
847
|
+
}, Se = (te) => {
|
|
848
|
+
te.key === "Enter" && !h && (r == null || r());
|
|
849
|
+
}, Ie = (te) => {
|
|
850
|
+
const ce = te.target.value;
|
|
851
|
+
N || C(ce), n == null || n(ce);
|
|
852
|
+
}, Me = () => {
|
|
853
|
+
M(!0);
|
|
854
|
+
}, $e = () => {
|
|
855
|
+
M(!1);
|
|
856
|
+
}, Re = `nc-input ${m === "small" ? "nc-small " : ""} ${V ? "nc-error " : ""}${f}`;
|
|
857
|
+
return /* @__PURE__ */ x("div", { className: "nc-col", style: { position: "relative", flex: 1, ...a }, children: [
|
|
858
|
+
c && /* @__PURE__ */ s("span", { className: "nc-label", children: c }),
|
|
859
|
+
/* @__PURE__ */ x("div", { style: { position: "relative", display: "flex", alignItems: h ? "flex-start" : "center" }, children: [
|
|
860
|
+
u && /* @__PURE__ */ s("span", { className: "nc-input-leading-icon", style: { height: h ? void 0 : "100%", top: h ? 10 : void 0 }, children: u }),
|
|
861
|
+
h ? /* @__PURE__ */ s(
|
|
856
862
|
"textarea",
|
|
857
863
|
{
|
|
858
|
-
ref:
|
|
859
|
-
className:
|
|
864
|
+
ref: w,
|
|
865
|
+
className: Re,
|
|
860
866
|
placeholder: i,
|
|
861
|
-
value:
|
|
862
|
-
onChange:
|
|
863
|
-
onKeyDown:
|
|
864
|
-
onFocus:
|
|
865
|
-
onBlur:
|
|
867
|
+
value: S,
|
|
868
|
+
onChange: Ie,
|
|
869
|
+
onKeyDown: Se,
|
|
870
|
+
onFocus: Me,
|
|
871
|
+
onBlur: $e,
|
|
866
872
|
readOnly: l,
|
|
867
873
|
"aria-disabled": l,
|
|
868
874
|
tabIndex: l ? -1 : void 0,
|
|
869
|
-
rows:
|
|
875
|
+
rows: g,
|
|
870
876
|
style: {
|
|
871
877
|
width: "100%",
|
|
872
|
-
paddingRight:
|
|
878
|
+
paddingRight: Y,
|
|
879
|
+
...F !== void 0 ? { paddingLeft: F } : {}
|
|
873
880
|
}
|
|
874
881
|
}
|
|
875
882
|
) : /* @__PURE__ */ s(
|
|
876
883
|
"input",
|
|
877
884
|
{
|
|
878
|
-
ref:
|
|
879
|
-
type: $ &&
|
|
880
|
-
className:
|
|
885
|
+
ref: y,
|
|
886
|
+
type: $ && k ? "text" : p,
|
|
887
|
+
className: Re,
|
|
881
888
|
placeholder: i,
|
|
882
|
-
value:
|
|
883
|
-
onChange:
|
|
884
|
-
onKeyDown:
|
|
885
|
-
onFocus:
|
|
886
|
-
onBlur:
|
|
889
|
+
value: S,
|
|
890
|
+
onChange: Ie,
|
|
891
|
+
onKeyDown: Se,
|
|
892
|
+
onFocus: Me,
|
|
893
|
+
onBlur: $e,
|
|
887
894
|
readOnly: l,
|
|
888
895
|
"aria-disabled": l,
|
|
889
896
|
tabIndex: l ? -1 : void 0,
|
|
890
897
|
style: {
|
|
891
898
|
width: "100%",
|
|
892
|
-
paddingRight:
|
|
899
|
+
paddingRight: Y,
|
|
900
|
+
...F !== void 0 ? { paddingLeft: F } : {}
|
|
893
901
|
}
|
|
894
902
|
}
|
|
895
903
|
),
|
|
896
|
-
H && /* @__PURE__ */ s(
|
|
897
|
-
P && /* @__PURE__ */ s(
|
|
904
|
+
H && /* @__PURE__ */ s(Ct, { onClick: Ze, size: m, rightOffset: P ? Z + 4 : 4 }),
|
|
905
|
+
P && /* @__PURE__ */ s(St, { visible: k, onClick: () => E(!k), size: m })
|
|
898
906
|
] }),
|
|
899
|
-
|
|
907
|
+
V && b && /* @__PURE__ */ s("span", { className: "nc-error-message", children: L })
|
|
900
908
|
] });
|
|
901
909
|
}
|
|
902
|
-
function
|
|
910
|
+
function Yn({
|
|
903
911
|
children: e,
|
|
904
912
|
onClick: t,
|
|
905
913
|
showBorder: n = !0,
|
|
@@ -934,9 +942,9 @@ function Fn({
|
|
|
934
942
|
}
|
|
935
943
|
);
|
|
936
944
|
}
|
|
937
|
-
function
|
|
938
|
-
return /* @__PURE__ */
|
|
939
|
-
(e || t) && /* @__PURE__ */
|
|
945
|
+
function jn({ title: e, titleTools: t, children: n, style: r }) {
|
|
946
|
+
return /* @__PURE__ */ x("div", { className: "nc-list-group", style: r, children: [
|
|
947
|
+
(e || t) && /* @__PURE__ */ x("div", { className: "nc-list-group-title", children: [
|
|
940
948
|
/* @__PURE__ */ s("div", { children: e }),
|
|
941
949
|
t && /* @__PURE__ */ s("div", { className: "nc-list-group-title-tools", children: t })
|
|
942
950
|
] }),
|
|
@@ -949,61 +957,61 @@ function Vn({ title: e, titleTools: t, children: n, style: r }) {
|
|
|
949
957
|
)
|
|
950
958
|
] });
|
|
951
959
|
}
|
|
952
|
-
function
|
|
953
|
-
const [i, l] =
|
|
960
|
+
function Kn({ values: e, onChange: t, options: n, placeholder: r = "Select…", label: o }) {
|
|
961
|
+
const [i, l] = T(!1), [c, d] = T(""), p = W(null), f = me(() => n.filter((a) => a.label.toLowerCase().includes(c.toLowerCase())), [n, c]);
|
|
954
962
|
B(() => {
|
|
955
|
-
function
|
|
963
|
+
function a(u) {
|
|
956
964
|
!(u.target instanceof Node) || !p.current || p.current.contains(u.target) || l(!1);
|
|
957
965
|
}
|
|
958
|
-
return document.addEventListener("mousedown",
|
|
966
|
+
return document.addEventListener("mousedown", a), () => document.removeEventListener("mousedown", a);
|
|
959
967
|
}, []);
|
|
960
|
-
const
|
|
961
|
-
e.includes(
|
|
968
|
+
const m = (a) => {
|
|
969
|
+
e.includes(a) ? t(e.filter((u) => u !== a)) : t([...e, a]);
|
|
962
970
|
};
|
|
963
|
-
return /* @__PURE__ */
|
|
971
|
+
return /* @__PURE__ */ x("div", { ref: p, className: "nc-col", style: { position: "relative" }, children: [
|
|
964
972
|
o && /* @__PURE__ */ s("span", { className: "nc-label", children: o }),
|
|
965
|
-
/* @__PURE__ */
|
|
973
|
+
/* @__PURE__ */ x("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: [
|
|
966
974
|
e.length === 0 && /* @__PURE__ */ s("span", { className: "nc-label", children: r }),
|
|
967
|
-
e.map((
|
|
968
|
-
const u = n.find((
|
|
969
|
-
return u ? /* @__PURE__ */
|
|
975
|
+
e.map((a) => {
|
|
976
|
+
const u = n.find((v) => v.value === a);
|
|
977
|
+
return u ? /* @__PURE__ */ x("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: [
|
|
970
978
|
u.label,
|
|
971
979
|
/* @__PURE__ */ s(
|
|
972
980
|
"button",
|
|
973
981
|
{
|
|
974
982
|
className: "nc-button nc-ghost",
|
|
975
983
|
style: { padding: 0, minHeight: 0, height: 20, width: 20, display: "inline-flex", alignItems: "center", justifyContent: "center", border: "none" },
|
|
976
|
-
onClick: () =>
|
|
984
|
+
onClick: () => m(a),
|
|
977
985
|
"aria-label": `Remove ${u.label}`,
|
|
978
986
|
children: "✕"
|
|
979
987
|
}
|
|
980
988
|
)
|
|
981
|
-
] },
|
|
989
|
+
] }, a) : null;
|
|
982
990
|
}),
|
|
983
991
|
/* @__PURE__ */ s(
|
|
984
992
|
"input",
|
|
985
993
|
{
|
|
986
994
|
className: "nc-input",
|
|
987
|
-
value:
|
|
988
|
-
onChange: (
|
|
995
|
+
value: c,
|
|
996
|
+
onChange: (a) => d(a.target.value),
|
|
989
997
|
onFocus: () => l(!0),
|
|
990
998
|
style: { minWidth: 50, border: "none", background: "transparent", padding: 4, minHeight: 32, flex: 1 }
|
|
991
999
|
}
|
|
992
1000
|
)
|
|
993
1001
|
] }),
|
|
994
|
-
i && /* @__PURE__ */
|
|
995
|
-
f.map((
|
|
996
|
-
const u = e.includes(
|
|
997
|
-
return /* @__PURE__ */
|
|
998
|
-
/* @__PURE__ */ s("span", { children:
|
|
1002
|
+
i && /* @__PURE__ */ x("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: [
|
|
1003
|
+
f.map((a) => {
|
|
1004
|
+
const u = e.includes(a.value);
|
|
1005
|
+
return /* @__PURE__ */ x("div", { className: "nc-section nc-row", style: { justifyContent: "space-between", cursor: "pointer", padding: 12 }, onMouseDown: () => m(a.value), children: [
|
|
1006
|
+
/* @__PURE__ */ s("span", { children: a.label }),
|
|
999
1007
|
/* @__PURE__ */ s("span", { children: u ? "✔️" : "" })
|
|
1000
|
-
] },
|
|
1008
|
+
] }, a.value);
|
|
1001
1009
|
}),
|
|
1002
1010
|
f.length === 0 && /* @__PURE__ */ s("div", { className: "nc-section nc-label", children: "No results" })
|
|
1003
1011
|
] })
|
|
1004
1012
|
] });
|
|
1005
1013
|
}
|
|
1006
|
-
function
|
|
1014
|
+
function pe(e) {
|
|
1007
1015
|
if (!e) return null;
|
|
1008
1016
|
const t = /^\d{2}-\d{1,2}$/, n = /^\d{4}-\d{1,2}$/;
|
|
1009
1017
|
if (!t.test(e) && !n.test(e))
|
|
@@ -1011,7 +1019,7 @@ function fe(e) {
|
|
|
1011
1019
|
const r = e.split("-"), o = parseInt(r[1], 10);
|
|
1012
1020
|
return o < 1 || o > 12 ? "Month must be between 1 and 12" : null;
|
|
1013
1021
|
}
|
|
1014
|
-
function
|
|
1022
|
+
function de(e) {
|
|
1015
1023
|
if (!e) return "";
|
|
1016
1024
|
const t = e.split("-");
|
|
1017
1025
|
if (t.length !== 2) return e;
|
|
@@ -1023,18 +1031,18 @@ function ue(e) {
|
|
|
1023
1031
|
}
|
|
1024
1032
|
return `${n}-${r}`;
|
|
1025
1033
|
}
|
|
1026
|
-
function
|
|
1034
|
+
function Ee(e) {
|
|
1027
1035
|
if (!e) return "";
|
|
1028
|
-
const t =
|
|
1036
|
+
const t = de(e);
|
|
1029
1037
|
if (!/^\d{4}-\d{2}$/.test(t)) return e;
|
|
1030
1038
|
const [n, r] = t.split("-");
|
|
1031
1039
|
return `${n}/${r}`;
|
|
1032
1040
|
}
|
|
1033
|
-
function
|
|
1041
|
+
function Te() {
|
|
1034
1042
|
const e = /* @__PURE__ */ new Date(), t = e.getFullYear(), n = String(e.getMonth() + 1).padStart(2, "0");
|
|
1035
1043
|
return `${t}-${n}`;
|
|
1036
1044
|
}
|
|
1037
|
-
function
|
|
1045
|
+
function _n({
|
|
1038
1046
|
startMonth: e,
|
|
1039
1047
|
endMonth: t,
|
|
1040
1048
|
onChange: n,
|
|
@@ -1043,45 +1051,45 @@ function Yn({
|
|
|
1043
1051
|
disabled: i = !1,
|
|
1044
1052
|
size: l = "default"
|
|
1045
1053
|
}) {
|
|
1046
|
-
const [
|
|
1054
|
+
const [c, d] = T(!1), [p, f] = T(""), [m, a] = T(""), [u, v] = T({ top: 0, left: 0, width: 0, right: void 0 }), h = W(null), g = W(null);
|
|
1047
1055
|
B(() => {
|
|
1048
|
-
if (
|
|
1049
|
-
const
|
|
1050
|
-
window.innerWidth -
|
|
1051
|
-
top:
|
|
1056
|
+
if (c && h.current) {
|
|
1057
|
+
const C = h.current.getBoundingClientRect(), L = Math.max(C.width, 400);
|
|
1058
|
+
window.innerWidth - C.left < L && C.right >= L ? v({
|
|
1059
|
+
top: C.bottom + 4,
|
|
1052
1060
|
left: 0,
|
|
1053
1061
|
// Not used but type needs it, let's just use 0
|
|
1054
|
-
right: window.innerWidth -
|
|
1062
|
+
right: window.innerWidth - C.right,
|
|
1055
1063
|
width: L
|
|
1056
|
-
}) :
|
|
1057
|
-
top:
|
|
1058
|
-
left:
|
|
1064
|
+
}) : v({
|
|
1065
|
+
top: C.bottom + 4,
|
|
1066
|
+
left: C.left,
|
|
1059
1067
|
right: void 0,
|
|
1060
1068
|
width: L
|
|
1061
1069
|
});
|
|
1062
1070
|
}
|
|
1063
|
-
}, [
|
|
1064
|
-
if (!
|
|
1065
|
-
const
|
|
1066
|
-
|
|
1071
|
+
}, [c]), B(() => {
|
|
1072
|
+
if (!c) return;
|
|
1073
|
+
const C = (S) => {
|
|
1074
|
+
h.current && !h.current.contains(S.target) && g.current && !g.current.contains(S.target) && d(!1);
|
|
1067
1075
|
};
|
|
1068
|
-
return document.addEventListener("mousedown",
|
|
1069
|
-
}, [
|
|
1070
|
-
const
|
|
1071
|
-
f(e ||
|
|
1072
|
-
},
|
|
1076
|
+
return document.addEventListener("mousedown", C), () => document.removeEventListener("mousedown", C);
|
|
1077
|
+
}, [c]);
|
|
1078
|
+
const A = () => {
|
|
1079
|
+
f(e || Te()), a(t || Te()), d(!0);
|
|
1080
|
+
}, b = () => {
|
|
1073
1081
|
d(!1);
|
|
1074
|
-
},
|
|
1075
|
-
const
|
|
1076
|
-
if (
|
|
1082
|
+
}, y = () => {
|
|
1083
|
+
const C = pe(p), S = pe(m);
|
|
1084
|
+
if (C || S)
|
|
1077
1085
|
return;
|
|
1078
|
-
const L =
|
|
1079
|
-
L &&
|
|
1080
|
-
},
|
|
1086
|
+
const L = de(p), V = de(m);
|
|
1087
|
+
L && V && (n == null || n(L, V)), d(!1);
|
|
1088
|
+
}, w = e && t ? `${Ee(e)} - ${Ee(t)}` : "Select month range", k = pe(p), E = pe(m), z = de(p), M = de(m), N = z && M && z > M, R = c ? ue(
|
|
1081
1089
|
/* @__PURE__ */ s(
|
|
1082
1090
|
"div",
|
|
1083
1091
|
{
|
|
1084
|
-
ref:
|
|
1092
|
+
ref: g,
|
|
1085
1093
|
className: "nc-month-range-picker-popup",
|
|
1086
1094
|
style: {
|
|
1087
1095
|
position: "fixed",
|
|
@@ -1090,89 +1098,89 @@ function Yn({
|
|
|
1090
1098
|
width: u.width,
|
|
1091
1099
|
zIndex: 1e3
|
|
1092
1100
|
},
|
|
1093
|
-
children: /* @__PURE__ */
|
|
1094
|
-
/* @__PURE__ */
|
|
1095
|
-
/* @__PURE__ */
|
|
1101
|
+
children: /* @__PURE__ */ x("div", { className: "nc-month-range-picker-content", children: [
|
|
1102
|
+
/* @__PURE__ */ x("div", { className: "nc-month-range-picker-row", children: [
|
|
1103
|
+
/* @__PURE__ */ x("div", { className: "nc-month-range-picker-column", children: [
|
|
1096
1104
|
/* @__PURE__ */ s("label", { className: "nc-label", children: "Start Month" }),
|
|
1097
1105
|
/* @__PURE__ */ s(
|
|
1098
1106
|
"input",
|
|
1099
1107
|
{
|
|
1100
1108
|
type: "text",
|
|
1101
|
-
className: `nc-month-input ${
|
|
1109
|
+
className: `nc-month-input ${k ? "nc-error" : ""}`,
|
|
1102
1110
|
value: p,
|
|
1103
|
-
onChange: (
|
|
1111
|
+
onChange: (C) => f(C.target.value),
|
|
1104
1112
|
placeholder: "YY-M(M) or YYYY-M(M)"
|
|
1105
1113
|
}
|
|
1106
1114
|
),
|
|
1107
|
-
|
|
1115
|
+
k && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: k })
|
|
1108
1116
|
] }),
|
|
1109
|
-
/* @__PURE__ */
|
|
1117
|
+
/* @__PURE__ */ x("div", { className: "nc-month-range-picker-column", children: [
|
|
1110
1118
|
/* @__PURE__ */ s("label", { className: "nc-label", children: "End Month" }),
|
|
1111
1119
|
/* @__PURE__ */ s(
|
|
1112
1120
|
"input",
|
|
1113
1121
|
{
|
|
1114
1122
|
type: "text",
|
|
1115
|
-
className: `nc-month-input ${
|
|
1116
|
-
value:
|
|
1117
|
-
onChange: (
|
|
1123
|
+
className: `nc-month-input ${E ? "nc-error" : ""}`,
|
|
1124
|
+
value: m,
|
|
1125
|
+
onChange: (C) => a(C.target.value),
|
|
1118
1126
|
placeholder: "YY-M(M) or YYYY-M(M)"
|
|
1119
1127
|
}
|
|
1120
1128
|
),
|
|
1121
|
-
|
|
1129
|
+
E && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: E })
|
|
1122
1130
|
] })
|
|
1123
1131
|
] }),
|
|
1124
|
-
|
|
1125
|
-
/* @__PURE__ */
|
|
1132
|
+
N && !k && !E && /* @__PURE__ */ s("div", { className: "nc-month-range-error", children: "End month must be after or equal to start month" }),
|
|
1133
|
+
/* @__PURE__ */ x("div", { className: "nc-month-range-picker-footer", children: [
|
|
1126
1134
|
/* @__PURE__ */ s(
|
|
1127
|
-
|
|
1135
|
+
K,
|
|
1128
1136
|
{
|
|
1129
1137
|
variant: "primary",
|
|
1130
|
-
onClick:
|
|
1131
|
-
disabled: !p || !
|
|
1138
|
+
onClick: y,
|
|
1139
|
+
disabled: !p || !m || !!k || !!E || !!N,
|
|
1132
1140
|
children: "Apply"
|
|
1133
1141
|
}
|
|
1134
1142
|
),
|
|
1135
|
-
/* @__PURE__ */ s(
|
|
1143
|
+
/* @__PURE__ */ s(K, { variant: "ghost", onClick: b, children: "Cancel" })
|
|
1136
1144
|
] })
|
|
1137
1145
|
] })
|
|
1138
1146
|
}
|
|
1139
1147
|
),
|
|
1140
1148
|
document.body
|
|
1141
1149
|
) : null;
|
|
1142
|
-
return /* @__PURE__ */
|
|
1150
|
+
return /* @__PURE__ */ x("div", { className: `nc-month-range-picker ${l === "small" ? "nc-small " : ""}${o}`, children: [
|
|
1143
1151
|
r && /* @__PURE__ */ s("label", { className: `nc-label${l === "small" ? " nc-small" : ""}`, children: r }),
|
|
1144
1152
|
/* @__PURE__ */ s(
|
|
1145
1153
|
"button",
|
|
1146
1154
|
{
|
|
1147
|
-
ref:
|
|
1155
|
+
ref: h,
|
|
1148
1156
|
className: `nc-month-range-picker-input${l === "small" ? " nc-small" : ""}`,
|
|
1149
|
-
onClick:
|
|
1157
|
+
onClick: A,
|
|
1150
1158
|
disabled: i,
|
|
1151
|
-
children:
|
|
1159
|
+
children: w
|
|
1152
1160
|
}
|
|
1153
1161
|
),
|
|
1154
|
-
|
|
1162
|
+
R
|
|
1155
1163
|
] });
|
|
1156
1164
|
}
|
|
1157
|
-
function
|
|
1158
|
-
const d =
|
|
1159
|
-
const
|
|
1160
|
-
n !== void 0 &&
|
|
1165
|
+
function Un({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disabled: l, size: c = "default" }) {
|
|
1166
|
+
const d = c === "small", p = () => {
|
|
1167
|
+
const a = e - o;
|
|
1168
|
+
n !== void 0 && a < n || t(parseFloat(a.toFixed(10)));
|
|
1161
1169
|
}, f = () => {
|
|
1162
|
-
const
|
|
1163
|
-
r !== void 0 &&
|
|
1170
|
+
const a = e + o;
|
|
1171
|
+
r !== void 0 && a > r || t(parseFloat(a.toFixed(10)));
|
|
1164
1172
|
};
|
|
1165
|
-
return /* @__PURE__ */
|
|
1173
|
+
return /* @__PURE__ */ x("div", { className: `nc-col nc-number-input-col ${d ? "nc-small" : ""}`, children: [
|
|
1166
1174
|
i && /* @__PURE__ */ s("span", { className: `nc-label ${d ? "nc-small" : ""}`, children: i }),
|
|
1167
|
-
/* @__PURE__ */
|
|
1175
|
+
/* @__PURE__ */ x("div", { className: `nc-number-input-container ${d ? "nc-small" : ""}`, children: [
|
|
1168
1176
|
/* @__PURE__ */ s(
|
|
1169
1177
|
"input",
|
|
1170
1178
|
{
|
|
1171
1179
|
className: `nc-input nc-number-input ${d ? "nc-small" : ""}`,
|
|
1172
1180
|
type: "number",
|
|
1173
1181
|
value: e,
|
|
1174
|
-
onChange: (
|
|
1175
|
-
const u = parseFloat(
|
|
1182
|
+
onChange: (a) => {
|
|
1183
|
+
const u = parseFloat(a.target.value);
|
|
1176
1184
|
isNaN(u) || n !== void 0 && u < n || r !== void 0 && u > r || t(u);
|
|
1177
1185
|
},
|
|
1178
1186
|
min: n,
|
|
@@ -1202,7 +1210,7 @@ function jn({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
|
|
|
1202
1210
|
] })
|
|
1203
1211
|
] });
|
|
1204
1212
|
}
|
|
1205
|
-
function
|
|
1213
|
+
function qn({
|
|
1206
1214
|
value: e,
|
|
1207
1215
|
onChange: t,
|
|
1208
1216
|
min: n = 0,
|
|
@@ -1210,17 +1218,17 @@ function Kn({
|
|
|
1210
1218
|
step: o = 1,
|
|
1211
1219
|
label: i,
|
|
1212
1220
|
disabled: l,
|
|
1213
|
-
showValue:
|
|
1221
|
+
showValue: c = !0,
|
|
1214
1222
|
formatValue: d = (f) => f.toString(),
|
|
1215
1223
|
width: p = 200
|
|
1216
1224
|
}) {
|
|
1217
|
-
const f = (
|
|
1218
|
-
const u = parseFloat(
|
|
1225
|
+
const f = (a) => {
|
|
1226
|
+
const u = parseFloat(a.target.value);
|
|
1219
1227
|
t(u);
|
|
1220
|
-
},
|
|
1221
|
-
return /* @__PURE__ */
|
|
1228
|
+
}, m = (e - n) / (r - n) * 100;
|
|
1229
|
+
return /* @__PURE__ */ x("div", { className: "nc-col", style: { gap: 6 }, children: [
|
|
1222
1230
|
i && /* @__PURE__ */ s("span", { className: "nc-label", children: i }),
|
|
1223
|
-
/* @__PURE__ */
|
|
1231
|
+
/* @__PURE__ */ x("div", { style: { display: "flex", gap: 12, alignItems: "center" }, children: [
|
|
1224
1232
|
/* @__PURE__ */ s(
|
|
1225
1233
|
"input",
|
|
1226
1234
|
{
|
|
@@ -1234,11 +1242,11 @@ function Kn({
|
|
|
1234
1242
|
disabled: l,
|
|
1235
1243
|
style: {
|
|
1236
1244
|
width: p,
|
|
1237
|
-
"--nc-slider-percentage": `${
|
|
1245
|
+
"--nc-slider-percentage": `${m}%`
|
|
1238
1246
|
}
|
|
1239
1247
|
}
|
|
1240
1248
|
),
|
|
1241
|
-
|
|
1249
|
+
c && /* @__PURE__ */ s(
|
|
1242
1250
|
"span",
|
|
1243
1251
|
{
|
|
1244
1252
|
style: {
|
|
@@ -1254,114 +1262,114 @@ function Kn({
|
|
|
1254
1262
|
] })
|
|
1255
1263
|
] });
|
|
1256
1264
|
}
|
|
1257
|
-
const
|
|
1258
|
-
function
|
|
1265
|
+
const It = ({ 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" }) });
|
|
1266
|
+
function Mt({ children: e, className: t = "", style: n }) {
|
|
1259
1267
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panel ${t}`, style: n, children: e });
|
|
1260
1268
|
}
|
|
1261
|
-
function
|
|
1262
|
-
const i =
|
|
1263
|
-
(
|
|
1269
|
+
function Xn({ active: e, children: t, keepMounted: n = !1, className: r = "", style: o }) {
|
|
1270
|
+
const i = ut.toArray(t).filter(
|
|
1271
|
+
(c) => pt(c) && (c.type === Mt || c.type.displayName === "TabPanel")
|
|
1264
1272
|
);
|
|
1265
1273
|
if (n)
|
|
1266
|
-
return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: i.map((
|
|
1267
|
-
const d =
|
|
1274
|
+
return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: i.map((c) => {
|
|
1275
|
+
const d = c.props.tab === e;
|
|
1268
1276
|
return /* @__PURE__ */ s(
|
|
1269
1277
|
"div",
|
|
1270
1278
|
{
|
|
1271
1279
|
className: `nc-tab-panel-wrapper ${d ? "nc-active" : ""}`,
|
|
1272
1280
|
style: { display: d ? void 0 : "none" },
|
|
1273
1281
|
"aria-hidden": !d,
|
|
1274
|
-
children:
|
|
1282
|
+
children: c
|
|
1275
1283
|
},
|
|
1276
|
-
|
|
1284
|
+
c.props.tab
|
|
1277
1285
|
);
|
|
1278
1286
|
}) });
|
|
1279
|
-
const l = i.find((
|
|
1287
|
+
const l = i.find((c) => c.props.tab === e);
|
|
1280
1288
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: l });
|
|
1281
1289
|
}
|
|
1282
|
-
function
|
|
1283
|
-
const f = W(null), [
|
|
1290
|
+
function Jn({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, className: i, toolbar: l, multiline: c, orientation: d = "horizontal", style: p }) {
|
|
1291
|
+
const f = W(null), [m, a] = T(!1), [u, v] = T(!1), h = d === "verticalLeft" || d === "verticalRight", g = W(!1), A = W(0), b = W(0), y = W(!1);
|
|
1284
1292
|
B(() => {
|
|
1285
|
-
const
|
|
1293
|
+
const N = () => {
|
|
1286
1294
|
if (f.current)
|
|
1287
|
-
if (
|
|
1288
|
-
const { scrollTop:
|
|
1289
|
-
|
|
1295
|
+
if (h) {
|
|
1296
|
+
const { scrollTop: C, scrollHeight: S, clientHeight: L } = f.current;
|
|
1297
|
+
a(C > 1), v(C < S - L - 1);
|
|
1290
1298
|
} else {
|
|
1291
|
-
const { scrollLeft:
|
|
1292
|
-
|
|
1299
|
+
const { scrollLeft: C, scrollWidth: S, clientWidth: L } = f.current;
|
|
1300
|
+
a(C > 1), v(C < S - L - 1);
|
|
1293
1301
|
}
|
|
1294
|
-
},
|
|
1295
|
-
if (
|
|
1296
|
-
return
|
|
1297
|
-
|
|
1302
|
+
}, R = f.current;
|
|
1303
|
+
if (R)
|
|
1304
|
+
return N(), R.addEventListener("scroll", N), window.addEventListener("resize", N), () => {
|
|
1305
|
+
R.removeEventListener("scroll", N), window.removeEventListener("resize", N);
|
|
1298
1306
|
};
|
|
1299
|
-
}, [e,
|
|
1300
|
-
const
|
|
1301
|
-
f.current && (
|
|
1302
|
-
},
|
|
1303
|
-
if (!
|
|
1304
|
-
const
|
|
1305
|
-
Math.abs(
|
|
1306
|
-
},
|
|
1307
|
-
f.current && (
|
|
1308
|
-
},
|
|
1309
|
-
|
|
1307
|
+
}, [e, h]);
|
|
1308
|
+
const w = (N) => {
|
|
1309
|
+
f.current && (g.current = !0, y.current = !1, A.current = h ? N.clientY : N.clientX, b.current = h ? f.current.scrollTop : f.current.scrollLeft, f.current.style.cursor = "grabbing", f.current.style.userSelect = "none");
|
|
1310
|
+
}, k = (N) => {
|
|
1311
|
+
if (!g.current || !f.current) return;
|
|
1312
|
+
const R = h ? N.clientY : N.clientX, C = A.current - R;
|
|
1313
|
+
Math.abs(C) > 3 && (y.current = !0), h ? f.current.scrollTop = b.current + C : f.current.scrollLeft = b.current + C;
|
|
1314
|
+
}, E = () => {
|
|
1315
|
+
f.current && (g.current = !1, f.current.style.cursor = "", f.current.style.userSelect = "");
|
|
1316
|
+
}, z = () => {
|
|
1317
|
+
E();
|
|
1310
1318
|
};
|
|
1311
1319
|
B(() => {
|
|
1312
|
-
const
|
|
1313
|
-
if (!
|
|
1314
|
-
const
|
|
1315
|
-
|
|
1320
|
+
const N = f.current;
|
|
1321
|
+
if (!N || h) return;
|
|
1322
|
+
const R = (C) => {
|
|
1323
|
+
C.deltaY !== 0 && (C.preventDefault(), N.scrollLeft += C.deltaY * 0.3);
|
|
1316
1324
|
};
|
|
1317
|
-
return
|
|
1318
|
-
|
|
1325
|
+
return N.addEventListener("wheel", R, { passive: !1 }), () => {
|
|
1326
|
+
N.removeEventListener("wheel", R);
|
|
1319
1327
|
};
|
|
1320
|
-
}, [
|
|
1321
|
-
const
|
|
1322
|
-
|
|
1328
|
+
}, [h]);
|
|
1329
|
+
const M = (N) => {
|
|
1330
|
+
y.current || n(N);
|
|
1323
1331
|
};
|
|
1324
|
-
return /* @__PURE__ */
|
|
1325
|
-
/* @__PURE__ */
|
|
1326
|
-
|
|
1332
|
+
return /* @__PURE__ */ x("div", { className: `nc-tab-container ${h ? `nc-vertical nc-${d}` : ""} ${i || ""}`, style: p, children: [
|
|
1333
|
+
/* @__PURE__ */ x("div", { className: "nc-tab-scroll-wrapper", children: [
|
|
1334
|
+
m && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${h ? "nc-top" : "nc-left"}`, children: h ? /* @__PURE__ */ s(It, { size: 16 }) : /* @__PURE__ */ s(at, { size: 16 }) }),
|
|
1327
1335
|
/* @__PURE__ */ s(
|
|
1328
1336
|
"div",
|
|
1329
1337
|
{
|
|
1330
1338
|
ref: f,
|
|
1331
|
-
className: `nc-tab-scroll ${
|
|
1332
|
-
onMouseDown:
|
|
1333
|
-
onMouseMove:
|
|
1334
|
-
onMouseUp:
|
|
1335
|
-
onMouseLeave:
|
|
1339
|
+
className: `nc-tab-scroll ${c ? "nc-multiline" : ""}`,
|
|
1340
|
+
onMouseDown: w,
|
|
1341
|
+
onMouseMove: k,
|
|
1342
|
+
onMouseUp: E,
|
|
1343
|
+
onMouseLeave: z,
|
|
1336
1344
|
style: { cursor: "grab" },
|
|
1337
|
-
children: e.map((
|
|
1338
|
-
const
|
|
1339
|
-
return /* @__PURE__ */
|
|
1345
|
+
children: e.map((N) => {
|
|
1346
|
+
const R = typeof N == "string" ? N : N.id, C = typeof N == "string" ? N : N.label, S = r && !(o != null && o.includes(R));
|
|
1347
|
+
return /* @__PURE__ */ x(
|
|
1340
1348
|
"div",
|
|
1341
1349
|
{
|
|
1342
|
-
className: `nc-tab-item ${t ===
|
|
1343
|
-
onClick: () =>
|
|
1350
|
+
className: `nc-tab-item ${t === R ? "nc-active" : ""} ${S ? "nc-closable" : ""}`,
|
|
1351
|
+
onClick: () => M(R),
|
|
1344
1352
|
role: "button",
|
|
1345
1353
|
tabIndex: 0,
|
|
1346
1354
|
onKeyDown: (L) => {
|
|
1347
|
-
(L.key === "Enter" || L.key === " ") && n(
|
|
1355
|
+
(L.key === "Enter" || L.key === " ") && n(R);
|
|
1348
1356
|
},
|
|
1349
1357
|
children: [
|
|
1350
|
-
/* @__PURE__ */ s("span", { className: "nc-tab-label", children:
|
|
1358
|
+
/* @__PURE__ */ s("span", { className: "nc-tab-label", children: h ? C : typeof C == "string" ? C.toUpperCase() : C }),
|
|
1351
1359
|
S && /* @__PURE__ */ s(
|
|
1352
1360
|
"span",
|
|
1353
1361
|
{
|
|
1354
1362
|
className: "nc-tab-close",
|
|
1355
1363
|
role: "button",
|
|
1356
1364
|
tabIndex: 0,
|
|
1357
|
-
"aria-label": `Close ${typeof
|
|
1365
|
+
"aria-label": `Close ${typeof C == "string" ? C : R}`,
|
|
1358
1366
|
onClick: (L) => {
|
|
1359
|
-
L.stopPropagation(), r(
|
|
1367
|
+
L.stopPropagation(), r(R);
|
|
1360
1368
|
},
|
|
1361
1369
|
onKeyDown: (L) => {
|
|
1362
|
-
(L.key === "Enter" || L.key === " ") && (L.stopPropagation(), r(
|
|
1370
|
+
(L.key === "Enter" || L.key === " ") && (L.stopPropagation(), r(R));
|
|
1363
1371
|
},
|
|
1364
|
-
children: /* @__PURE__ */
|
|
1372
|
+
children: /* @__PURE__ */ x("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1365
1373
|
/* @__PURE__ */ s("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1366
1374
|
/* @__PURE__ */ s("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
1367
1375
|
] })
|
|
@@ -1369,18 +1377,18 @@ function Un({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, cla
|
|
|
1369
1377
|
)
|
|
1370
1378
|
]
|
|
1371
1379
|
},
|
|
1372
|
-
|
|
1380
|
+
R
|
|
1373
1381
|
);
|
|
1374
1382
|
})
|
|
1375
1383
|
}
|
|
1376
1384
|
),
|
|
1377
|
-
u && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${
|
|
1385
|
+
u && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${h ? "nc-bottom" : "nc-right"}`, children: h ? /* @__PURE__ */ s(lt, { size: 16 }) : /* @__PURE__ */ s(dt, { size: 16 }) })
|
|
1378
1386
|
] }),
|
|
1379
1387
|
l && /* @__PURE__ */ s("div", { className: "nc-tab-toolbar", children: l })
|
|
1380
1388
|
] });
|
|
1381
1389
|
}
|
|
1382
|
-
function
|
|
1383
|
-
return /* @__PURE__ */
|
|
1390
|
+
function Qn({ checked: e, onChange: t, disabled: n, label: r }) {
|
|
1391
|
+
return /* @__PURE__ */ x(
|
|
1384
1392
|
"label",
|
|
1385
1393
|
{
|
|
1386
1394
|
className: "nc-row",
|
|
@@ -1431,7 +1439,7 @@ function qn({ checked: e, onChange: t, disabled: n, label: r }) {
|
|
|
1431
1439
|
}
|
|
1432
1440
|
);
|
|
1433
1441
|
}
|
|
1434
|
-
const
|
|
1442
|
+
const ze = [
|
|
1435
1443
|
"var(--nc-csv-col-0)",
|
|
1436
1444
|
"var(--nc-csv-col-1)",
|
|
1437
1445
|
"var(--nc-csv-col-2)",
|
|
@@ -1443,24 +1451,24 @@ const Ee = [
|
|
|
1443
1451
|
"var(--nc-csv-col-8)",
|
|
1444
1452
|
"var(--nc-csv-col-9)"
|
|
1445
1453
|
];
|
|
1446
|
-
function
|
|
1454
|
+
function $t(e, t) {
|
|
1447
1455
|
const r = e.slice(0, t).split(`
|
|
1448
|
-
`), o = r.length, l = r[o - 1].split(" "),
|
|
1449
|
-
return { line: o, column:
|
|
1456
|
+
`), o = r.length, l = r[o - 1].split(" "), c = l.length, d = l[c - 1].length + 1;
|
|
1457
|
+
return { line: o, column: c, character: d, offset: t };
|
|
1450
1458
|
}
|
|
1451
|
-
function
|
|
1459
|
+
function Rt(e, t, n, r) {
|
|
1452
1460
|
const o = e.split(`
|
|
1453
1461
|
`), i = Math.max(1, Math.min(t, o.length));
|
|
1454
1462
|
let l = 0;
|
|
1455
|
-
for (let
|
|
1456
|
-
l += o[
|
|
1463
|
+
for (let m = 0; m < i - 1; m++)
|
|
1464
|
+
l += o[m].length + 1;
|
|
1457
1465
|
const d = o[i - 1].split(" "), p = Math.max(1, Math.min(n, d.length));
|
|
1458
|
-
for (let
|
|
1459
|
-
l += d[
|
|
1466
|
+
for (let m = 0; m < p - 1; m++)
|
|
1467
|
+
l += d[m].length + 1;
|
|
1460
1468
|
const f = Math.max(1, Math.min(r, d[p - 1].length + 1));
|
|
1461
1469
|
return l += f - 1, l;
|
|
1462
1470
|
}
|
|
1463
|
-
function
|
|
1471
|
+
function Et(e, t) {
|
|
1464
1472
|
const n = e.split(`
|
|
1465
1473
|
`), r = Math.max(1, Math.min(t, n.length));
|
|
1466
1474
|
let o = 0;
|
|
@@ -1468,76 +1476,76 @@ function Mt(e, t) {
|
|
|
1468
1476
|
o += n[i].length + 1;
|
|
1469
1477
|
return o;
|
|
1470
1478
|
}
|
|
1471
|
-
const
|
|
1472
|
-
function({ value: t, onChange: n, placeholder: r, className: o, style: i, showLineNumbers: l = !1, onCursorChange:
|
|
1473
|
-
const f = W(null),
|
|
1474
|
-
|
|
1475
|
-
goToLine(
|
|
1479
|
+
const Zn = ft(
|
|
1480
|
+
function({ value: t, onChange: n, placeholder: r, className: o, style: i, showLineNumbers: l = !1, onCursorChange: c, highlightLine: d }, p) {
|
|
1481
|
+
const f = W(null), m = W(null), a = W(null);
|
|
1482
|
+
ht(p, () => ({
|
|
1483
|
+
goToLine(b) {
|
|
1484
|
+
const y = f.current;
|
|
1485
|
+
if (!y) return;
|
|
1486
|
+
const w = Et(t, b);
|
|
1487
|
+
y.focus(), y.setSelectionRange(w, w);
|
|
1488
|
+
const k = parseFloat(getComputedStyle(y).lineHeight) || 18;
|
|
1489
|
+
y.scrollTop = (Math.max(1, b) - 1) * k, v(), u();
|
|
1490
|
+
},
|
|
1491
|
+
goToPosition(b, y, w) {
|
|
1476
1492
|
const k = f.current;
|
|
1477
1493
|
if (!k) return;
|
|
1478
|
-
const
|
|
1479
|
-
k.focus(), k.setSelectionRange(
|
|
1480
|
-
const
|
|
1481
|
-
k.scrollTop = (Math.max(1,
|
|
1482
|
-
},
|
|
1483
|
-
goToPosition(h, k, b) {
|
|
1484
|
-
const C = f.current;
|
|
1485
|
-
if (!C) return;
|
|
1486
|
-
const R = It(t, h, k, b);
|
|
1487
|
-
C.focus(), C.setSelectionRange(R, R);
|
|
1488
|
-
const I = parseFloat(getComputedStyle(C).lineHeight) || 18;
|
|
1489
|
-
C.scrollTop = (Math.max(1, h) - 1) * I, w(), u();
|
|
1494
|
+
const E = Rt(t, b, y, w);
|
|
1495
|
+
k.focus(), k.setSelectionRange(E, E);
|
|
1496
|
+
const z = parseFloat(getComputedStyle(k).lineHeight) || 18;
|
|
1497
|
+
k.scrollTop = (Math.max(1, b) - 1) * z, v(), u();
|
|
1490
1498
|
}
|
|
1491
1499
|
}), [t]);
|
|
1492
1500
|
const u = O(() => {
|
|
1493
|
-
if (!
|
|
1494
|
-
const
|
|
1495
|
-
|
|
1496
|
-
}, [
|
|
1497
|
-
const
|
|
1498
|
-
|
|
1501
|
+
if (!c || !f.current) return;
|
|
1502
|
+
const b = $t(t, f.current.selectionStart);
|
|
1503
|
+
c(b);
|
|
1504
|
+
}, [c, t]), v = O(() => {
|
|
1505
|
+
const b = f.current;
|
|
1506
|
+
b && (m.current && (m.current.scrollTop = b.scrollTop, m.current.scrollLeft = b.scrollLeft), a.current && (a.current.scrollTop = b.scrollTop));
|
|
1499
1507
|
}, []);
|
|
1500
1508
|
B(() => {
|
|
1501
1509
|
if (d == null || d < 1) return;
|
|
1502
|
-
const
|
|
1503
|
-
if (!
|
|
1504
|
-
const
|
|
1505
|
-
(
|
|
1510
|
+
const b = f.current;
|
|
1511
|
+
if (!b) return;
|
|
1512
|
+
const y = parseFloat(getComputedStyle(b).lineHeight) || 18, w = (d - 1) * y, k = w + y;
|
|
1513
|
+
(w < b.scrollTop || k > b.scrollTop + b.clientHeight) && (b.scrollTop = w - b.clientHeight / 2 + y / 2), v();
|
|
1506
1514
|
}, [d]);
|
|
1507
|
-
const
|
|
1508
|
-
`).length, [t]),
|
|
1509
|
-
const
|
|
1510
|
-
for (let
|
|
1511
|
-
|
|
1512
|
-
/* @__PURE__ */ s("div", { className: `nc-csv-line-number ${d ===
|
|
1515
|
+
const h = me(() => t.split(`
|
|
1516
|
+
`).length, [t]), g = () => {
|
|
1517
|
+
const b = [];
|
|
1518
|
+
for (let y = 1; y <= h; y++)
|
|
1519
|
+
b.push(
|
|
1520
|
+
/* @__PURE__ */ s("div", { className: `nc-csv-line-number ${d === y ? "nc-csv-highlight" : ""}`, children: y }, y)
|
|
1513
1521
|
);
|
|
1514
|
-
return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref:
|
|
1515
|
-
},
|
|
1516
|
-
`).map((
|
|
1517
|
-
const
|
|
1518
|
-
return /* @__PURE__ */
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
/* @__PURE__ */ s("span", { style: { color:
|
|
1522
|
-
] },
|
|
1523
|
-
|
|
1522
|
+
return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref: a, children: b });
|
|
1523
|
+
}, A = (b) => b ? b.split(`
|
|
1524
|
+
`).map((w, k) => {
|
|
1525
|
+
const E = w.split(" ");
|
|
1526
|
+
return /* @__PURE__ */ x("div", { className: `nc-csv-line ${d === k + 1 ? "nc-csv-highlight" : ""}`, children: [
|
|
1527
|
+
E.map((z, M) => /* @__PURE__ */ x("span", { children: [
|
|
1528
|
+
M > 0 && /* @__PURE__ */ s("span", { className: "nc-csv-tab-char", children: " " }),
|
|
1529
|
+
/* @__PURE__ */ s("span", { style: { color: ze[M % ze.length] }, children: z })
|
|
1530
|
+
] }, M)),
|
|
1531
|
+
w === "" && `
|
|
1524
1532
|
`
|
|
1525
|
-
] },
|
|
1533
|
+
] }, k);
|
|
1526
1534
|
}) : null;
|
|
1527
|
-
return /* @__PURE__ */
|
|
1528
|
-
l &&
|
|
1529
|
-
/* @__PURE__ */
|
|
1530
|
-
/* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref:
|
|
1535
|
+
return /* @__PURE__ */ x("div", { className: `nc-csv-textarea-container ${l ? "nc-csv-with-gutter" : ""} ${o ?? ""}`, style: i, children: [
|
|
1536
|
+
l && g(),
|
|
1537
|
+
/* @__PURE__ */ x("div", { className: "nc-csv-textarea-editor", children: [
|
|
1538
|
+
/* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref: m, children: /* @__PURE__ */ s("pre", { className: "nc-csv-textarea-highlights", children: A(t) }) }),
|
|
1531
1539
|
/* @__PURE__ */ s(
|
|
1532
1540
|
"textarea",
|
|
1533
1541
|
{
|
|
1534
1542
|
ref: f,
|
|
1535
1543
|
className: "nc-csv-textarea-input",
|
|
1536
1544
|
value: t,
|
|
1537
|
-
onChange: (
|
|
1538
|
-
n(
|
|
1545
|
+
onChange: (b) => {
|
|
1546
|
+
n(b.target.value), requestAnimationFrame(u);
|
|
1539
1547
|
},
|
|
1540
|
-
onScroll:
|
|
1548
|
+
onScroll: v,
|
|
1541
1549
|
onSelect: u,
|
|
1542
1550
|
onKeyUp: u,
|
|
1543
1551
|
onClick: u,
|
|
@@ -1551,27 +1559,27 @@ const Xn = dt(
|
|
|
1551
1559
|
] });
|
|
1552
1560
|
}
|
|
1553
1561
|
);
|
|
1554
|
-
let
|
|
1555
|
-
const ve = /* @__PURE__ */ new Set(),
|
|
1562
|
+
let ee = { notifications: [] };
|
|
1563
|
+
const ve = /* @__PURE__ */ new Set(), Pe = /* @__PURE__ */ new Map();
|
|
1556
1564
|
function we() {
|
|
1557
|
-
const e =
|
|
1565
|
+
const e = ee.notifications.slice();
|
|
1558
1566
|
for (const t of Array.from(ve))
|
|
1559
1567
|
try {
|
|
1560
1568
|
t(e);
|
|
1561
1569
|
} catch {
|
|
1562
1570
|
}
|
|
1563
1571
|
}
|
|
1564
|
-
function
|
|
1572
|
+
function Tt(e) {
|
|
1565
1573
|
ve.add(e);
|
|
1566
1574
|
try {
|
|
1567
|
-
e(
|
|
1575
|
+
e(ee.notifications.slice());
|
|
1568
1576
|
} catch {
|
|
1569
1577
|
}
|
|
1570
1578
|
return () => {
|
|
1571
1579
|
ve.delete(e);
|
|
1572
1580
|
};
|
|
1573
1581
|
}
|
|
1574
|
-
function
|
|
1582
|
+
function zt(e) {
|
|
1575
1583
|
const t = `notification-${Date.now()}-${Math.random()}`, { duration: n, type: r, ...o } = e, i = {
|
|
1576
1584
|
id: t,
|
|
1577
1585
|
dismissible: !0,
|
|
@@ -1579,21 +1587,21 @@ function Rt(e) {
|
|
|
1579
1587
|
type: r === "error" ? "danger" : r ?? "info",
|
|
1580
1588
|
duration: n ?? 5e3
|
|
1581
1589
|
};
|
|
1582
|
-
return
|
|
1583
|
-
|
|
1590
|
+
return ee.notifications = [i, ...ee.notifications], we(), i.duration && i.duration > 0 && setTimeout(() => {
|
|
1591
|
+
Fe(t);
|
|
1584
1592
|
}, i.duration), t;
|
|
1585
1593
|
}
|
|
1586
|
-
function
|
|
1587
|
-
const t =
|
|
1594
|
+
function Fe(e) {
|
|
1595
|
+
const t = ee.notifications.find((r) => r.id === e);
|
|
1588
1596
|
if (!t) return;
|
|
1589
1597
|
t.isRemoving = !0, we();
|
|
1590
1598
|
const n = window.setTimeout(() => {
|
|
1591
|
-
|
|
1599
|
+
ee.notifications = ee.notifications.filter((r) => r.id !== e), we(), Pe.delete(e);
|
|
1592
1600
|
}, 300);
|
|
1593
|
-
|
|
1601
|
+
Pe.set(e, n);
|
|
1594
1602
|
}
|
|
1595
|
-
function
|
|
1596
|
-
const { t } =
|
|
1603
|
+
function Pt({ notification: e }) {
|
|
1604
|
+
const { t } = Q(), n = () => {
|
|
1597
1605
|
if (e.title) return e.title;
|
|
1598
1606
|
switch (e.type) {
|
|
1599
1607
|
case "success":
|
|
@@ -1606,14 +1614,14 @@ function Et({ notification: e }) {
|
|
|
1606
1614
|
return t("common.info");
|
|
1607
1615
|
}
|
|
1608
1616
|
}, r = () => {
|
|
1609
|
-
|
|
1617
|
+
Fe(e.id);
|
|
1610
1618
|
};
|
|
1611
1619
|
return /* @__PURE__ */ s(
|
|
1612
1620
|
"div",
|
|
1613
1621
|
{
|
|
1614
1622
|
className: `nc-notification nc-notification-${e.type || "info"}`,
|
|
1615
|
-
children: /* @__PURE__ */
|
|
1616
|
-
/* @__PURE__ */
|
|
1623
|
+
children: /* @__PURE__ */ x("div", { className: "nc-notification-content", children: [
|
|
1624
|
+
/* @__PURE__ */ x("div", { className: "nc-notification-body", style: { paddingRight: e.dismissible ? "8px" : "0" }, children: [
|
|
1617
1625
|
/* @__PURE__ */ s("div", { className: "nc-notification-title", children: n() }),
|
|
1618
1626
|
/* @__PURE__ */ s("div", { className: "nc-notification-message", children: e.message })
|
|
1619
1627
|
] }),
|
|
@@ -1629,24 +1637,24 @@ function Et({ notification: e }) {
|
|
|
1629
1637
|
}
|
|
1630
1638
|
);
|
|
1631
1639
|
}
|
|
1632
|
-
function
|
|
1633
|
-
const [e, t] =
|
|
1634
|
-
return B(() =>
|
|
1635
|
-
const f = new Set(
|
|
1636
|
-
|
|
1640
|
+
function er() {
|
|
1641
|
+
const [e, t] = T([]), [n, r] = T(/* @__PURE__ */ new Map()), [o, i] = T(/* @__PURE__ */ new Set()), l = W(null), c = W([]);
|
|
1642
|
+
return B(() => Tt((p) => {
|
|
1643
|
+
const f = new Set(c.current.map((a) => a.id)), m = p.filter((a) => !f.has(a.id)).map((a) => a.id);
|
|
1644
|
+
m.length > 0 ? (t(p), i(new Set(m)), requestAnimationFrame(() => {
|
|
1637
1645
|
requestAnimationFrame(() => {
|
|
1638
1646
|
i(/* @__PURE__ */ new Set());
|
|
1639
1647
|
});
|
|
1640
|
-
})) : t(p),
|
|
1648
|
+
})) : t(p), c.current = p;
|
|
1641
1649
|
}), []), B(() => {
|
|
1642
1650
|
if (!l.current) return;
|
|
1643
1651
|
const d = /* @__PURE__ */ new Map();
|
|
1644
1652
|
let p = 0;
|
|
1645
1653
|
const f = l.current.children;
|
|
1646
|
-
e.forEach((
|
|
1647
|
-
if (d.set(
|
|
1648
|
-
const u = f[
|
|
1649
|
-
|
|
1654
|
+
e.forEach((m, a) => {
|
|
1655
|
+
if (d.set(m.id, p), f[a]) {
|
|
1656
|
+
const u = f[a].offsetHeight;
|
|
1657
|
+
m.isRemoving || (p += u + 12);
|
|
1650
1658
|
}
|
|
1651
1659
|
}), r(d);
|
|
1652
1660
|
}, [e]), /* @__PURE__ */ s(
|
|
@@ -1668,7 +1676,7 @@ function Jn() {
|
|
|
1668
1676
|
position: "relative"
|
|
1669
1677
|
},
|
|
1670
1678
|
children: e.map((d) => {
|
|
1671
|
-
const p = o.has(d.id), f = d.isRemoving,
|
|
1679
|
+
const p = o.has(d.id), f = d.isRemoving, m = n.get(d.id) || 0;
|
|
1672
1680
|
return /* @__PURE__ */ s(
|
|
1673
1681
|
"div",
|
|
1674
1682
|
{
|
|
@@ -1676,13 +1684,13 @@ function Jn() {
|
|
|
1676
1684
|
position: "absolute",
|
|
1677
1685
|
top: 0,
|
|
1678
1686
|
left: 0,
|
|
1679
|
-
transform: p ? "translateY(-120px)" : `translateY(${
|
|
1687
|
+
transform: p ? "translateY(-120px)" : `translateY(${m}px)`,
|
|
1680
1688
|
// Only animate transform when not leaving, animate opacity always
|
|
1681
1689
|
transition: f ? "opacity 300ms ease-out" : "transform 300ms ease-out, opacity 300ms ease-out",
|
|
1682
1690
|
opacity: f ? 0 : 1,
|
|
1683
1691
|
width: "100%"
|
|
1684
1692
|
},
|
|
1685
|
-
children: /* @__PURE__ */ s(
|
|
1693
|
+
children: /* @__PURE__ */ s(Pt, { notification: d })
|
|
1686
1694
|
},
|
|
1687
1695
|
d.id
|
|
1688
1696
|
);
|
|
@@ -1692,14 +1700,14 @@ function Jn() {
|
|
|
1692
1700
|
}
|
|
1693
1701
|
);
|
|
1694
1702
|
}
|
|
1695
|
-
function
|
|
1696
|
-
return
|
|
1703
|
+
function Lt(e) {
|
|
1704
|
+
return zt(e);
|
|
1697
1705
|
}
|
|
1698
|
-
const
|
|
1699
|
-
show: (e) =>
|
|
1706
|
+
const tr = {
|
|
1707
|
+
show: (e) => Lt(e)
|
|
1700
1708
|
};
|
|
1701
|
-
function
|
|
1702
|
-
const t =
|
|
1709
|
+
function nr(e) {
|
|
1710
|
+
const t = gt.createInstance(), n = {};
|
|
1703
1711
|
for (const o in e)
|
|
1704
1712
|
n[o] = { translation: e[o] };
|
|
1705
1713
|
const r = typeof document < "u" && document.documentElement.lang || "en";
|
|
@@ -1714,14 +1722,14 @@ function Zn(e) {
|
|
|
1714
1722
|
}), typeof MutationObserver < "u" && typeof document < "u" && new MutationObserver((i) => {
|
|
1715
1723
|
for (const l of i)
|
|
1716
1724
|
if (l.type === "attributes" && l.attributeName === "lang") {
|
|
1717
|
-
const
|
|
1718
|
-
t.changeLanguage(
|
|
1725
|
+
const c = document.documentElement.lang || "en";
|
|
1726
|
+
t.changeLanguage(c);
|
|
1719
1727
|
}
|
|
1720
1728
|
}).observe(document.documentElement, { attributes: !0 }), t;
|
|
1721
1729
|
}
|
|
1722
|
-
class
|
|
1730
|
+
class Bt {
|
|
1723
1731
|
constructor() {
|
|
1724
|
-
|
|
1732
|
+
U(this, "apps", /* @__PURE__ */ new Map());
|
|
1725
1733
|
}
|
|
1726
1734
|
/**
|
|
1727
1735
|
* Register an app definition.
|
|
@@ -1759,16 +1767,16 @@ class Tt {
|
|
|
1759
1767
|
return this.apps.has(t);
|
|
1760
1768
|
}
|
|
1761
1769
|
}
|
|
1762
|
-
const oe = new
|
|
1763
|
-
class
|
|
1770
|
+
const oe = new Bt(), Le = "nc-ui-app-state";
|
|
1771
|
+
class Dt {
|
|
1764
1772
|
constructor() {
|
|
1765
|
-
|
|
1766
|
-
|
|
1773
|
+
U(this, "state");
|
|
1774
|
+
U(this, "listeners", /* @__PURE__ */ new Map());
|
|
1767
1775
|
this.state = this.loadState();
|
|
1768
1776
|
}
|
|
1769
1777
|
loadState() {
|
|
1770
1778
|
try {
|
|
1771
|
-
const t = localStorage.getItem(
|
|
1779
|
+
const t = localStorage.getItem(Le);
|
|
1772
1780
|
if (t)
|
|
1773
1781
|
return JSON.parse(t);
|
|
1774
1782
|
} catch {
|
|
@@ -1777,7 +1785,7 @@ class Pt {
|
|
|
1777
1785
|
}
|
|
1778
1786
|
saveState() {
|
|
1779
1787
|
try {
|
|
1780
|
-
localStorage.setItem(
|
|
1788
|
+
localStorage.setItem(Le, JSON.stringify(this.state));
|
|
1781
1789
|
} catch {
|
|
1782
1790
|
}
|
|
1783
1791
|
}
|
|
@@ -1807,13 +1815,13 @@ class Pt {
|
|
|
1807
1815
|
(r = this.listeners.get(t)) == null || r.forEach((o) => o(n));
|
|
1808
1816
|
}
|
|
1809
1817
|
}
|
|
1810
|
-
const
|
|
1811
|
-
class
|
|
1818
|
+
const _ = new Dt();
|
|
1819
|
+
class Ht {
|
|
1812
1820
|
constructor() {
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1821
|
+
U(this, "apps", []);
|
|
1822
|
+
U(this, "activeAppId", null);
|
|
1823
|
+
U(this, "listeners", /* @__PURE__ */ new Set());
|
|
1824
|
+
U(this, "refReadyResolvers", /* @__PURE__ */ new Map());
|
|
1817
1825
|
}
|
|
1818
1826
|
/**
|
|
1819
1827
|
* Launch an app and wait for it to be ready (ref populated).
|
|
@@ -1829,12 +1837,12 @@ class Lt {
|
|
|
1829
1837
|
return console.error(`Cannot launch app "${t}": not registered`), null;
|
|
1830
1838
|
const o = this.apps.find((l) => l.appId === t);
|
|
1831
1839
|
if (o)
|
|
1832
|
-
return r || (this.setActiveApp(t),
|
|
1840
|
+
return r || (this.setActiveApp(t), _._setActiveAppId(t)), o.ref ? o : this.waitForRef(t);
|
|
1833
1841
|
const i = {
|
|
1834
1842
|
appId: t,
|
|
1835
1843
|
launchedAt: Date.now()
|
|
1836
1844
|
};
|
|
1837
|
-
return this.apps.push(i), r || (this.activeAppId = t,
|
|
1845
|
+
return this.apps.push(i), r || (this.activeAppId = t, _._setActiveAppId(t)), this.notify(), this.waitForRef(t);
|
|
1838
1846
|
}
|
|
1839
1847
|
waitForRef(t) {
|
|
1840
1848
|
return new Promise((n) => {
|
|
@@ -1871,7 +1879,7 @@ class Lt {
|
|
|
1871
1879
|
const r = this.apps[n];
|
|
1872
1880
|
if (r.ref && (r.ref = void 0), this.apps.splice(n, 1), this.activeAppId === t) {
|
|
1873
1881
|
const o = window.innerWidth >= 768;
|
|
1874
|
-
this.activeAppId = o && this.apps.length > 0 ? this.apps[this.apps.length - 1].appId : null,
|
|
1882
|
+
this.activeAppId = o && this.apps.length > 0 ? this.apps[this.apps.length - 1].appId : null, _._setActiveAppId(this.activeAppId);
|
|
1875
1883
|
}
|
|
1876
1884
|
this.notify();
|
|
1877
1885
|
}
|
|
@@ -1883,7 +1891,7 @@ class Lt {
|
|
|
1883
1891
|
console.warn(`Cannot activate app "${t}": not running`);
|
|
1884
1892
|
return;
|
|
1885
1893
|
}
|
|
1886
|
-
this.activeAppId !== t && (this.activeAppId = t, this.notify(),
|
|
1894
|
+
this.activeAppId !== t && (this.activeAppId = t, this.notify(), _._setActiveAppId(t));
|
|
1887
1895
|
}
|
|
1888
1896
|
/**
|
|
1889
1897
|
* Toggle an app: if active, deactivate; if inactive, activate.
|
|
@@ -1927,15 +1935,15 @@ class Lt {
|
|
|
1927
1935
|
this.listeners.forEach((t) => t());
|
|
1928
1936
|
}
|
|
1929
1937
|
}
|
|
1930
|
-
const
|
|
1931
|
-
function
|
|
1932
|
-
const e =
|
|
1938
|
+
const G = new Ht(), Ve = se(null);
|
|
1939
|
+
function Wt() {
|
|
1940
|
+
const e = J(Ve);
|
|
1933
1941
|
if (!e)
|
|
1934
1942
|
throw new Error("useApp must be used inside an App");
|
|
1935
1943
|
return e;
|
|
1936
1944
|
}
|
|
1937
|
-
function
|
|
1938
|
-
return /* @__PURE__ */
|
|
1945
|
+
function Ot({ size: e = 16 }) {
|
|
1946
|
+
return /* @__PURE__ */ x(
|
|
1939
1947
|
"svg",
|
|
1940
1948
|
{
|
|
1941
1949
|
width: e,
|
|
@@ -1953,9 +1961,9 @@ function Dt({ size: e = 16 }) {
|
|
|
1953
1961
|
}
|
|
1954
1962
|
);
|
|
1955
1963
|
}
|
|
1956
|
-
function
|
|
1957
|
-
return /* @__PURE__ */
|
|
1958
|
-
/* @__PURE__ */
|
|
1964
|
+
function Ft({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o }) {
|
|
1965
|
+
return /* @__PURE__ */ x("div", { className: "nc-app-title-bar", children: [
|
|
1966
|
+
/* @__PURE__ */ x("div", { className: "nc-app-title-bar-left", children: [
|
|
1959
1967
|
n && !o && /* @__PURE__ */ s(
|
|
1960
1968
|
"button",
|
|
1961
1969
|
{
|
|
@@ -1963,18 +1971,18 @@ function Ht({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o })
|
|
|
1963
1971
|
onClick: n,
|
|
1964
1972
|
title: "Back",
|
|
1965
1973
|
"aria-label": "Go back",
|
|
1966
|
-
children: /* @__PURE__ */ s(
|
|
1974
|
+
children: /* @__PURE__ */ s(Ot, { size: 16 })
|
|
1967
1975
|
}
|
|
1968
1976
|
),
|
|
1969
1977
|
/* @__PURE__ */ s("span", { className: "nc-app-title-bar-title", children: e })
|
|
1970
1978
|
] }),
|
|
1971
|
-
/* @__PURE__ */
|
|
1979
|
+
/* @__PURE__ */ x("div", { className: "nc-app-title-bar-right", children: [
|
|
1972
1980
|
r && /* @__PURE__ */ s("div", { className: "nc-app-title-bar-toolbar", children: r }),
|
|
1973
|
-
/* @__PURE__ */ s(
|
|
1981
|
+
/* @__PURE__ */ s(We, { onClick: t, "aria-label": "Close application" })
|
|
1974
1982
|
] })
|
|
1975
1983
|
] });
|
|
1976
1984
|
}
|
|
1977
|
-
class
|
|
1985
|
+
class Vt extends ke.Component {
|
|
1978
1986
|
constructor(t) {
|
|
1979
1987
|
super(t), this.state = { hasError: !1 };
|
|
1980
1988
|
}
|
|
@@ -1985,7 +1993,7 @@ class Wt extends ke.Component {
|
|
|
1985
1993
|
console.error(`Error loading app ${this.props.appId}:`, t, n);
|
|
1986
1994
|
}
|
|
1987
1995
|
render() {
|
|
1988
|
-
return this.state.hasError ? /* @__PURE__ */
|
|
1996
|
+
return this.state.hasError ? /* @__PURE__ */ x(
|
|
1989
1997
|
"div",
|
|
1990
1998
|
{
|
|
1991
1999
|
style: {
|
|
@@ -2007,39 +2015,39 @@ class Wt extends ke.Component {
|
|
|
2007
2015
|
) : this.props.children;
|
|
2008
2016
|
}
|
|
2009
2017
|
}
|
|
2010
|
-
function
|
|
2011
|
-
const { t: r } =
|
|
2018
|
+
function Ge({ appId: e, isActive: t, onClose: n }) {
|
|
2019
|
+
const { t: r } = Q(), o = oe.get(e), [i, l] = T(""), [c, d] = T(null), [p, f] = T(null), [m, a] = T(!1), [u, v] = T(!1);
|
|
2012
2020
|
ke.useEffect(() => {
|
|
2013
2021
|
o != null && o.titleKey && l(r(o.titleKey));
|
|
2014
2022
|
}, [o, r]);
|
|
2015
|
-
const
|
|
2016
|
-
l(
|
|
2017
|
-
}, []),
|
|
2018
|
-
d(() =>
|
|
2019
|
-
}, []),
|
|
2023
|
+
const h = O((N) => {
|
|
2024
|
+
l(N);
|
|
2025
|
+
}, []), g = O((N) => {
|
|
2026
|
+
d(() => N);
|
|
2027
|
+
}, []), A = O(() => {
|
|
2020
2028
|
d(null);
|
|
2021
|
-
}, []),
|
|
2022
|
-
f(
|
|
2023
|
-
}, []),
|
|
2029
|
+
}, []), b = O((N) => {
|
|
2030
|
+
f(N);
|
|
2031
|
+
}, []), y = O(() => {
|
|
2024
2032
|
f(null);
|
|
2025
|
-
}, []),
|
|
2026
|
-
|
|
2027
|
-
}, []),
|
|
2028
|
-
|
|
2029
|
-
}, []),
|
|
2030
|
-
setTitle:
|
|
2031
|
-
setBackHandler:
|
|
2032
|
-
clearBackHandler:
|
|
2033
|
-
setToolbar:
|
|
2034
|
-
clearToolbar:
|
|
2035
|
-
setHideBackButton:
|
|
2036
|
-
setHideTitleBar:
|
|
2033
|
+
}, []), w = O((N) => {
|
|
2034
|
+
a(N);
|
|
2035
|
+
}, []), k = O((N) => {
|
|
2036
|
+
v(N);
|
|
2037
|
+
}, []), E = me(() => ({
|
|
2038
|
+
setTitle: h,
|
|
2039
|
+
setBackHandler: g,
|
|
2040
|
+
clearBackHandler: A,
|
|
2041
|
+
setToolbar: b,
|
|
2042
|
+
clearToolbar: y,
|
|
2043
|
+
setHideBackButton: w,
|
|
2044
|
+
setHideTitleBar: k,
|
|
2037
2045
|
close: n
|
|
2038
|
-
}), [
|
|
2046
|
+
}), [h, g, A, b, y, w, k, n]);
|
|
2039
2047
|
if (!o)
|
|
2040
2048
|
return null;
|
|
2041
|
-
const
|
|
2042
|
-
return /* @__PURE__ */
|
|
2049
|
+
const z = o.component, M = !o.hideTitleBar && !u;
|
|
2050
|
+
return /* @__PURE__ */ x(
|
|
2043
2051
|
"div",
|
|
2044
2052
|
{
|
|
2045
2053
|
style: {
|
|
@@ -2049,20 +2057,20 @@ function Fe({ appId: e, isActive: t, onClose: n }) {
|
|
|
2049
2057
|
minHeight: 0
|
|
2050
2058
|
},
|
|
2051
2059
|
children: [
|
|
2052
|
-
|
|
2053
|
-
|
|
2060
|
+
M && /* @__PURE__ */ s(
|
|
2061
|
+
Ft,
|
|
2054
2062
|
{
|
|
2055
2063
|
title: i,
|
|
2056
2064
|
onClose: n,
|
|
2057
|
-
onBack:
|
|
2065
|
+
onBack: c ?? void 0,
|
|
2058
2066
|
toolbar: p,
|
|
2059
|
-
hideBackButton:
|
|
2067
|
+
hideBackButton: m
|
|
2060
2068
|
}
|
|
2061
2069
|
),
|
|
2062
2070
|
/* @__PURE__ */ s(
|
|
2063
2071
|
"div",
|
|
2064
2072
|
{
|
|
2065
|
-
className:
|
|
2073
|
+
className: M ? "nc-app-content-wrapper" : "",
|
|
2066
2074
|
style: {
|
|
2067
2075
|
padding: o.padding,
|
|
2068
2076
|
flex: 1,
|
|
@@ -2072,8 +2080,8 @@ function Fe({ appId: e, isActive: t, onClose: n }) {
|
|
|
2072
2080
|
backgroundColor: "var(--nc-bg-secondary)",
|
|
2073
2081
|
position: "relative"
|
|
2074
2082
|
},
|
|
2075
|
-
children: /* @__PURE__ */ s(
|
|
2076
|
-
|
|
2083
|
+
children: /* @__PURE__ */ s(Ve.Provider, { value: E, children: /* @__PURE__ */ s(Vt, { appId: e, children: /* @__PURE__ */ s(
|
|
2084
|
+
mt,
|
|
2077
2085
|
{
|
|
2078
2086
|
fallback: /* @__PURE__ */ s(
|
|
2079
2087
|
"div",
|
|
@@ -2084,10 +2092,10 @@ function Fe({ appId: e, isActive: t, onClose: n }) {
|
|
|
2084
2092
|
justifyContent: "center",
|
|
2085
2093
|
flex: 1
|
|
2086
2094
|
},
|
|
2087
|
-
children: /* @__PURE__ */ s(
|
|
2095
|
+
children: /* @__PURE__ */ s(He, {})
|
|
2088
2096
|
}
|
|
2089
2097
|
),
|
|
2090
|
-
children: /* @__PURE__ */ s(
|
|
2098
|
+
children: /* @__PURE__ */ s(z, {})
|
|
2091
2099
|
}
|
|
2092
2100
|
) }) })
|
|
2093
2101
|
}
|
|
@@ -2096,21 +2104,21 @@ function Fe({ appId: e, isActive: t, onClose: n }) {
|
|
|
2096
2104
|
}
|
|
2097
2105
|
);
|
|
2098
2106
|
}
|
|
2099
|
-
const
|
|
2107
|
+
const fe = 768, he = 1024, Ye = {
|
|
2100
2108
|
isMobile: !1,
|
|
2101
2109
|
isTablet: !1,
|
|
2102
2110
|
isDesktop: !0,
|
|
2103
2111
|
width: typeof window < "u" ? window.innerWidth : 1024,
|
|
2104
2112
|
height: typeof window < "u" ? window.innerHeight : 768
|
|
2105
|
-
},
|
|
2106
|
-
function
|
|
2107
|
-
const [t, n] =
|
|
2108
|
-
if (typeof window > "u") return
|
|
2113
|
+
}, je = se(Ye);
|
|
2114
|
+
function rr({ children: e }) {
|
|
2115
|
+
const [t, n] = T(() => {
|
|
2116
|
+
if (typeof window > "u") return Ye;
|
|
2109
2117
|
const r = window.innerWidth, o = window.innerHeight;
|
|
2110
2118
|
return {
|
|
2111
|
-
isMobile: r <
|
|
2112
|
-
isTablet: r >=
|
|
2113
|
-
isDesktop: r >=
|
|
2119
|
+
isMobile: r < fe,
|
|
2120
|
+
isTablet: r >= fe && r < he,
|
|
2121
|
+
isDesktop: r >= he,
|
|
2114
2122
|
width: r,
|
|
2115
2123
|
height: o
|
|
2116
2124
|
};
|
|
@@ -2119,54 +2127,54 @@ function er({ children: e }) {
|
|
|
2119
2127
|
const r = () => {
|
|
2120
2128
|
const o = window.innerWidth, i = window.innerHeight;
|
|
2121
2129
|
n({
|
|
2122
|
-
isMobile: o <
|
|
2123
|
-
isTablet: o >=
|
|
2124
|
-
isDesktop: o >=
|
|
2130
|
+
isMobile: o < fe,
|
|
2131
|
+
isTablet: o >= fe && o < he,
|
|
2132
|
+
isDesktop: o >= he,
|
|
2125
2133
|
width: o,
|
|
2126
2134
|
height: i
|
|
2127
2135
|
});
|
|
2128
2136
|
};
|
|
2129
2137
|
return window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
|
|
2130
|
-
}, []), /* @__PURE__ */ s(
|
|
2138
|
+
}, []), /* @__PURE__ */ s(je.Provider, { value: t, children: e });
|
|
2131
2139
|
}
|
|
2132
|
-
function
|
|
2133
|
-
return
|
|
2140
|
+
function Ke() {
|
|
2141
|
+
return J(je);
|
|
2134
2142
|
}
|
|
2135
|
-
const Ne = "-",
|
|
2136
|
-
const t =
|
|
2143
|
+
const Ne = "-", Gt = (e) => {
|
|
2144
|
+
const t = jt(e), {
|
|
2137
2145
|
conflictingClassGroups: n,
|
|
2138
2146
|
conflictingClassGroupModifiers: r
|
|
2139
2147
|
} = e;
|
|
2140
2148
|
return {
|
|
2141
2149
|
getClassGroupId: (l) => {
|
|
2142
|
-
const
|
|
2143
|
-
return
|
|
2150
|
+
const c = l.split(Ne);
|
|
2151
|
+
return c[0] === "" && c.length !== 1 && c.shift(), _e(c, t) || Yt(l);
|
|
2144
2152
|
},
|
|
2145
|
-
getConflictingClassGroupIds: (l,
|
|
2153
|
+
getConflictingClassGroupIds: (l, c) => {
|
|
2146
2154
|
const d = n[l] || [];
|
|
2147
|
-
return
|
|
2155
|
+
return c && r[l] ? [...d, ...r[l]] : d;
|
|
2148
2156
|
}
|
|
2149
2157
|
};
|
|
2150
|
-
},
|
|
2158
|
+
}, _e = (e, t) => {
|
|
2151
2159
|
var l;
|
|
2152
2160
|
if (e.length === 0)
|
|
2153
2161
|
return t.classGroupId;
|
|
2154
|
-
const n = e[0], r = t.nextPart.get(n), o = r ?
|
|
2162
|
+
const n = e[0], r = t.nextPart.get(n), o = r ? _e(e.slice(1), r) : void 0;
|
|
2155
2163
|
if (o)
|
|
2156
2164
|
return o;
|
|
2157
2165
|
if (t.validators.length === 0)
|
|
2158
2166
|
return;
|
|
2159
2167
|
const i = e.join(Ne);
|
|
2160
2168
|
return (l = t.validators.find(({
|
|
2161
|
-
validator:
|
|
2162
|
-
}) =>
|
|
2163
|
-
},
|
|
2164
|
-
if (
|
|
2165
|
-
const t =
|
|
2169
|
+
validator: c
|
|
2170
|
+
}) => c(i))) == null ? void 0 : l.classGroupId;
|
|
2171
|
+
}, Be = /^\[(.+)\]$/, Yt = (e) => {
|
|
2172
|
+
if (Be.test(e)) {
|
|
2173
|
+
const t = Be.exec(e)[1], n = t == null ? void 0 : t.substring(0, t.indexOf(":"));
|
|
2166
2174
|
if (n)
|
|
2167
2175
|
return "arbitrary.." + n;
|
|
2168
2176
|
}
|
|
2169
|
-
},
|
|
2177
|
+
}, jt = (e) => {
|
|
2170
2178
|
const {
|
|
2171
2179
|
theme: t,
|
|
2172
2180
|
prefix: n
|
|
@@ -2174,18 +2182,18 @@ const Ne = "-", Ot = (e) => {
|
|
|
2174
2182
|
nextPart: /* @__PURE__ */ new Map(),
|
|
2175
2183
|
validators: []
|
|
2176
2184
|
};
|
|
2177
|
-
return
|
|
2185
|
+
return _t(Object.entries(e.classGroups), n).forEach(([i, l]) => {
|
|
2178
2186
|
ye(l, r, i, t);
|
|
2179
2187
|
}), r;
|
|
2180
2188
|
}, ye = (e, t, n, r) => {
|
|
2181
2189
|
e.forEach((o) => {
|
|
2182
2190
|
if (typeof o == "string") {
|
|
2183
|
-
const i = o === "" ? t :
|
|
2191
|
+
const i = o === "" ? t : De(t, o);
|
|
2184
2192
|
i.classGroupId = n;
|
|
2185
2193
|
return;
|
|
2186
2194
|
}
|
|
2187
2195
|
if (typeof o == "function") {
|
|
2188
|
-
if (
|
|
2196
|
+
if (Kt(o)) {
|
|
2189
2197
|
ye(o(r), t, n, r);
|
|
2190
2198
|
return;
|
|
2191
2199
|
}
|
|
@@ -2196,10 +2204,10 @@ const Ne = "-", Ot = (e) => {
|
|
|
2196
2204
|
return;
|
|
2197
2205
|
}
|
|
2198
2206
|
Object.entries(o).forEach(([i, l]) => {
|
|
2199
|
-
ye(l,
|
|
2207
|
+
ye(l, De(t, i), n, r);
|
|
2200
2208
|
});
|
|
2201
2209
|
});
|
|
2202
|
-
},
|
|
2210
|
+
}, De = (e, t) => {
|
|
2203
2211
|
let n = e;
|
|
2204
2212
|
return t.split(Ne).forEach((r) => {
|
|
2205
2213
|
n.nextPart.has(r) || n.nextPart.set(r, {
|
|
@@ -2207,10 +2215,10 @@ const Ne = "-", Ot = (e) => {
|
|
|
2207
2215
|
validators: []
|
|
2208
2216
|
}), n = n.nextPart.get(r);
|
|
2209
2217
|
}), n;
|
|
2210
|
-
},
|
|
2211
|
-
const o = r.map((i) => typeof i == "string" ? t + i : typeof i == "object" ? Object.fromEntries(Object.entries(i).map(([l,
|
|
2218
|
+
}, Kt = (e) => e.isThemeGetter, _t = (e, t) => t ? e.map(([n, r]) => {
|
|
2219
|
+
const o = r.map((i) => typeof i == "string" ? t + i : typeof i == "object" ? Object.fromEntries(Object.entries(i).map(([l, c]) => [t + l, c])) : i);
|
|
2212
2220
|
return [n, o];
|
|
2213
|
-
}) : e,
|
|
2221
|
+
}) : e, Ut = (e) => {
|
|
2214
2222
|
if (e < 1)
|
|
2215
2223
|
return {
|
|
2216
2224
|
get: () => {
|
|
@@ -2234,40 +2242,40 @@ const Ne = "-", Ot = (e) => {
|
|
|
2234
2242
|
n.has(i) ? n.set(i, l) : o(i, l);
|
|
2235
2243
|
}
|
|
2236
2244
|
};
|
|
2237
|
-
},
|
|
2245
|
+
}, Ue = "!", qt = (e) => {
|
|
2238
2246
|
const {
|
|
2239
2247
|
separator: t,
|
|
2240
2248
|
experimentalParseClassName: n
|
|
2241
|
-
} = e, r = t.length === 1, o = t[0], i = t.length, l = (
|
|
2249
|
+
} = e, r = t.length === 1, o = t[0], i = t.length, l = (c) => {
|
|
2242
2250
|
const d = [];
|
|
2243
|
-
let p = 0, f = 0,
|
|
2244
|
-
for (let
|
|
2245
|
-
let
|
|
2251
|
+
let p = 0, f = 0, m;
|
|
2252
|
+
for (let g = 0; g < c.length; g++) {
|
|
2253
|
+
let A = c[g];
|
|
2246
2254
|
if (p === 0) {
|
|
2247
|
-
if (
|
|
2248
|
-
d.push(
|
|
2255
|
+
if (A === o && (r || c.slice(g, g + i) === t)) {
|
|
2256
|
+
d.push(c.slice(f, g)), f = g + i;
|
|
2249
2257
|
continue;
|
|
2250
2258
|
}
|
|
2251
|
-
if (
|
|
2252
|
-
|
|
2259
|
+
if (A === "/") {
|
|
2260
|
+
m = g;
|
|
2253
2261
|
continue;
|
|
2254
2262
|
}
|
|
2255
2263
|
}
|
|
2256
|
-
|
|
2264
|
+
A === "[" ? p++ : A === "]" && p--;
|
|
2257
2265
|
}
|
|
2258
|
-
const
|
|
2266
|
+
const a = d.length === 0 ? c : c.substring(f), u = a.startsWith(Ue), v = u ? a.substring(1) : a, h = m && m > f ? m - f : void 0;
|
|
2259
2267
|
return {
|
|
2260
2268
|
modifiers: d,
|
|
2261
2269
|
hasImportantModifier: u,
|
|
2262
|
-
baseClassName:
|
|
2263
|
-
maybePostfixModifierPosition:
|
|
2270
|
+
baseClassName: v,
|
|
2271
|
+
maybePostfixModifierPosition: h
|
|
2264
2272
|
};
|
|
2265
2273
|
};
|
|
2266
|
-
return n ? (
|
|
2267
|
-
className:
|
|
2274
|
+
return n ? (c) => n({
|
|
2275
|
+
className: c,
|
|
2268
2276
|
parseClassName: l
|
|
2269
2277
|
}) : l;
|
|
2270
|
-
},
|
|
2278
|
+
}, Xt = (e) => {
|
|
2271
2279
|
if (e.length <= 1)
|
|
2272
2280
|
return e;
|
|
2273
2281
|
const t = [];
|
|
@@ -2275,119 +2283,119 @@ const Ne = "-", Ot = (e) => {
|
|
|
2275
2283
|
return e.forEach((r) => {
|
|
2276
2284
|
r[0] === "[" ? (t.push(...n.sort(), r), n = []) : n.push(r);
|
|
2277
2285
|
}), t.push(...n.sort()), t;
|
|
2278
|
-
},
|
|
2279
|
-
cache:
|
|
2280
|
-
parseClassName:
|
|
2281
|
-
...
|
|
2282
|
-
}),
|
|
2286
|
+
}, Jt = (e) => ({
|
|
2287
|
+
cache: Ut(e.cacheSize),
|
|
2288
|
+
parseClassName: qt(e),
|
|
2289
|
+
...Gt(e)
|
|
2290
|
+
}), Qt = /\s+/, Zt = (e, t) => {
|
|
2283
2291
|
const {
|
|
2284
2292
|
parseClassName: n,
|
|
2285
2293
|
getClassGroupId: r,
|
|
2286
2294
|
getConflictingClassGroupIds: o
|
|
2287
|
-
} = t, i = [], l = e.trim().split(
|
|
2288
|
-
let
|
|
2295
|
+
} = t, i = [], l = e.trim().split(Qt);
|
|
2296
|
+
let c = "";
|
|
2289
2297
|
for (let d = l.length - 1; d >= 0; d -= 1) {
|
|
2290
2298
|
const p = l[d], {
|
|
2291
2299
|
modifiers: f,
|
|
2292
|
-
hasImportantModifier:
|
|
2293
|
-
baseClassName:
|
|
2300
|
+
hasImportantModifier: m,
|
|
2301
|
+
baseClassName: a,
|
|
2294
2302
|
maybePostfixModifierPosition: u
|
|
2295
2303
|
} = n(p);
|
|
2296
|
-
let
|
|
2297
|
-
if (!
|
|
2298
|
-
if (!
|
|
2299
|
-
|
|
2304
|
+
let v = !!u, h = r(v ? a.substring(0, u) : a);
|
|
2305
|
+
if (!h) {
|
|
2306
|
+
if (!v) {
|
|
2307
|
+
c = p + (c.length > 0 ? " " + c : c);
|
|
2300
2308
|
continue;
|
|
2301
2309
|
}
|
|
2302
|
-
if (
|
|
2303
|
-
|
|
2310
|
+
if (h = r(a), !h) {
|
|
2311
|
+
c = p + (c.length > 0 ? " " + c : c);
|
|
2304
2312
|
continue;
|
|
2305
2313
|
}
|
|
2306
|
-
|
|
2314
|
+
v = !1;
|
|
2307
2315
|
}
|
|
2308
|
-
const
|
|
2309
|
-
if (i.includes(
|
|
2316
|
+
const g = Xt(f).join(":"), A = m ? g + Ue : g, b = A + h;
|
|
2317
|
+
if (i.includes(b))
|
|
2310
2318
|
continue;
|
|
2311
|
-
i.push(
|
|
2312
|
-
const
|
|
2313
|
-
for (let
|
|
2314
|
-
const
|
|
2315
|
-
i.push(
|
|
2319
|
+
i.push(b);
|
|
2320
|
+
const y = o(h, v);
|
|
2321
|
+
for (let w = 0; w < y.length; ++w) {
|
|
2322
|
+
const k = y[w];
|
|
2323
|
+
i.push(A + k);
|
|
2316
2324
|
}
|
|
2317
|
-
|
|
2325
|
+
c = p + (c.length > 0 ? " " + c : c);
|
|
2318
2326
|
}
|
|
2319
|
-
return
|
|
2327
|
+
return c;
|
|
2320
2328
|
};
|
|
2321
|
-
function
|
|
2329
|
+
function en() {
|
|
2322
2330
|
let e = 0, t, n, r = "";
|
|
2323
2331
|
for (; e < arguments.length; )
|
|
2324
|
-
(t = arguments[e++]) && (n =
|
|
2332
|
+
(t = arguments[e++]) && (n = qe(t)) && (r && (r += " "), r += n);
|
|
2325
2333
|
return r;
|
|
2326
2334
|
}
|
|
2327
|
-
const
|
|
2335
|
+
const qe = (e) => {
|
|
2328
2336
|
if (typeof e == "string")
|
|
2329
2337
|
return e;
|
|
2330
2338
|
let t, n = "";
|
|
2331
2339
|
for (let r = 0; r < e.length; r++)
|
|
2332
|
-
e[r] && (t =
|
|
2340
|
+
e[r] && (t = qe(e[r])) && (n && (n += " "), n += t);
|
|
2333
2341
|
return n;
|
|
2334
2342
|
};
|
|
2335
|
-
function
|
|
2343
|
+
function tn(e, ...t) {
|
|
2336
2344
|
let n, r, o, i = l;
|
|
2337
2345
|
function l(d) {
|
|
2338
|
-
const p = t.reduce((f,
|
|
2339
|
-
return n =
|
|
2346
|
+
const p = t.reduce((f, m) => m(f), e());
|
|
2347
|
+
return n = Jt(p), r = n.cache.get, o = n.cache.set, i = c, c(d);
|
|
2340
2348
|
}
|
|
2341
|
-
function
|
|
2349
|
+
function c(d) {
|
|
2342
2350
|
const p = r(d);
|
|
2343
2351
|
if (p)
|
|
2344
2352
|
return p;
|
|
2345
|
-
const f =
|
|
2353
|
+
const f = Zt(d, n);
|
|
2346
2354
|
return o(d, f), f;
|
|
2347
2355
|
}
|
|
2348
2356
|
return function() {
|
|
2349
|
-
return i(
|
|
2357
|
+
return i(en.apply(null, arguments));
|
|
2350
2358
|
};
|
|
2351
2359
|
}
|
|
2352
2360
|
const D = (e) => {
|
|
2353
2361
|
const t = (n) => n[e] || [];
|
|
2354
2362
|
return t.isThemeGetter = !0, t;
|
|
2355
|
-
},
|
|
2356
|
-
const r =
|
|
2363
|
+
}, Xe = /^\[(?:([a-z-]+):)?(.+)\]$/i, nn = /^\d+\/\d+$/, rn = /* @__PURE__ */ new Set(["px", "full", "screen"]), on = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, sn = /\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$/, cn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, an = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, ln = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, j = (e) => re(e) || rn.has(e) || nn.test(e), q = (e) => ie(e, "length", bn), re = (e) => !!e && !Number.isNaN(Number(e)), be = (e) => ie(e, "number", re), ae = (e) => !!e && Number.isInteger(Number(e)), dn = (e) => e.endsWith("%") && re(e.slice(0, -1)), I = (e) => Xe.test(e), X = (e) => on.test(e), un = /* @__PURE__ */ new Set(["length", "size", "percentage"]), pn = (e) => ie(e, un, Je), fn = (e) => ie(e, "position", Je), hn = /* @__PURE__ */ new Set(["image", "url"]), mn = (e) => ie(e, hn, wn), gn = (e) => ie(e, "", vn), le = () => !0, ie = (e, t, n) => {
|
|
2364
|
+
const r = Xe.exec(e);
|
|
2357
2365
|
return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1;
|
|
2358
|
-
},
|
|
2366
|
+
}, bn = (e) => (
|
|
2359
2367
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
2360
2368
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
2361
2369
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
2362
|
-
|
|
2363
|
-
),
|
|
2364
|
-
const e = D("colors"), t = D("spacing"), n = D("blur"), r = D("brightness"), o = D("borderColor"), i = D("borderRadius"), l = D("borderSpacing"),
|
|
2370
|
+
sn.test(e) && !cn.test(e)
|
|
2371
|
+
), Je = () => !1, vn = (e) => an.test(e), wn = (e) => ln.test(e), yn = () => {
|
|
2372
|
+
const e = D("colors"), t = D("spacing"), n = D("blur"), r = D("brightness"), o = D("borderColor"), i = D("borderRadius"), l = D("borderSpacing"), c = D("borderWidth"), d = D("contrast"), p = D("grayscale"), f = D("hueRotate"), m = D("invert"), a = D("gap"), u = D("gradientColorStops"), v = D("gradientColorStopPositions"), h = D("inset"), g = D("margin"), A = D("opacity"), b = D("padding"), y = D("saturate"), w = D("scale"), k = D("sepia"), E = D("skew"), z = D("space"), M = D("translate"), N = () => ["auto", "contain", "none"], R = () => ["auto", "hidden", "clip", "visible", "scroll"], C = () => ["auto", I, t], S = () => [I, t], L = () => ["", j, q], V = () => ["auto", re, I], $ = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], P = () => ["solid", "dashed", "dotted", "double", "none"], H = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], Z = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], Y = () => ["", "0", I], ge = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], F = () => [re, I];
|
|
2365
2373
|
return {
|
|
2366
2374
|
cacheSize: 500,
|
|
2367
2375
|
separator: ":",
|
|
2368
2376
|
theme: {
|
|
2369
|
-
colors: [
|
|
2370
|
-
spacing: [
|
|
2371
|
-
blur: ["none", "",
|
|
2377
|
+
colors: [le],
|
|
2378
|
+
spacing: [j, q],
|
|
2379
|
+
blur: ["none", "", X, I],
|
|
2372
2380
|
brightness: F(),
|
|
2373
2381
|
borderColor: [e],
|
|
2374
|
-
borderRadius: ["none", "", "full",
|
|
2382
|
+
borderRadius: ["none", "", "full", X, I],
|
|
2375
2383
|
borderSpacing: S(),
|
|
2376
2384
|
borderWidth: L(),
|
|
2377
2385
|
contrast: F(),
|
|
2378
|
-
grayscale:
|
|
2386
|
+
grayscale: Y(),
|
|
2379
2387
|
hueRotate: F(),
|
|
2380
|
-
invert:
|
|
2388
|
+
invert: Y(),
|
|
2381
2389
|
gap: S(),
|
|
2382
2390
|
gradientColorStops: [e],
|
|
2383
|
-
gradientColorStopPositions: [
|
|
2384
|
-
inset:
|
|
2385
|
-
margin:
|
|
2391
|
+
gradientColorStopPositions: [dn, q],
|
|
2392
|
+
inset: C(),
|
|
2393
|
+
margin: C(),
|
|
2386
2394
|
opacity: F(),
|
|
2387
2395
|
padding: S(),
|
|
2388
2396
|
saturate: F(),
|
|
2389
2397
|
scale: F(),
|
|
2390
|
-
sepia:
|
|
2398
|
+
sepia: Y(),
|
|
2391
2399
|
skew: F(),
|
|
2392
2400
|
space: S(),
|
|
2393
2401
|
translate: S()
|
|
@@ -2399,7 +2407,7 @@ const D = (e) => {
|
|
|
2399
2407
|
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
2400
2408
|
*/
|
|
2401
2409
|
aspect: [{
|
|
2402
|
-
aspect: ["auto", "square", "video",
|
|
2410
|
+
aspect: ["auto", "square", "video", I]
|
|
2403
2411
|
}],
|
|
2404
2412
|
/**
|
|
2405
2413
|
* Container
|
|
@@ -2411,21 +2419,21 @@ const D = (e) => {
|
|
|
2411
2419
|
* @see https://tailwindcss.com/docs/columns
|
|
2412
2420
|
*/
|
|
2413
2421
|
columns: [{
|
|
2414
|
-
columns: [
|
|
2422
|
+
columns: [X]
|
|
2415
2423
|
}],
|
|
2416
2424
|
/**
|
|
2417
2425
|
* Break After
|
|
2418
2426
|
* @see https://tailwindcss.com/docs/break-after
|
|
2419
2427
|
*/
|
|
2420
2428
|
"break-after": [{
|
|
2421
|
-
"break-after":
|
|
2429
|
+
"break-after": ge()
|
|
2422
2430
|
}],
|
|
2423
2431
|
/**
|
|
2424
2432
|
* Break Before
|
|
2425
2433
|
* @see https://tailwindcss.com/docs/break-before
|
|
2426
2434
|
*/
|
|
2427
2435
|
"break-before": [{
|
|
2428
|
-
"break-before":
|
|
2436
|
+
"break-before": ge()
|
|
2429
2437
|
}],
|
|
2430
2438
|
/**
|
|
2431
2439
|
* Break Inside
|
|
@@ -2484,49 +2492,49 @@ const D = (e) => {
|
|
|
2484
2492
|
* @see https://tailwindcss.com/docs/object-position
|
|
2485
2493
|
*/
|
|
2486
2494
|
"object-position": [{
|
|
2487
|
-
object: [
|
|
2495
|
+
object: [...$(), I]
|
|
2488
2496
|
}],
|
|
2489
2497
|
/**
|
|
2490
2498
|
* Overflow
|
|
2491
2499
|
* @see https://tailwindcss.com/docs/overflow
|
|
2492
2500
|
*/
|
|
2493
2501
|
overflow: [{
|
|
2494
|
-
overflow:
|
|
2502
|
+
overflow: R()
|
|
2495
2503
|
}],
|
|
2496
2504
|
/**
|
|
2497
2505
|
* Overflow X
|
|
2498
2506
|
* @see https://tailwindcss.com/docs/overflow
|
|
2499
2507
|
*/
|
|
2500
2508
|
"overflow-x": [{
|
|
2501
|
-
"overflow-x":
|
|
2509
|
+
"overflow-x": R()
|
|
2502
2510
|
}],
|
|
2503
2511
|
/**
|
|
2504
2512
|
* Overflow Y
|
|
2505
2513
|
* @see https://tailwindcss.com/docs/overflow
|
|
2506
2514
|
*/
|
|
2507
2515
|
"overflow-y": [{
|
|
2508
|
-
"overflow-y":
|
|
2516
|
+
"overflow-y": R()
|
|
2509
2517
|
}],
|
|
2510
2518
|
/**
|
|
2511
2519
|
* Overscroll Behavior
|
|
2512
2520
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2513
2521
|
*/
|
|
2514
2522
|
overscroll: [{
|
|
2515
|
-
overscroll:
|
|
2523
|
+
overscroll: N()
|
|
2516
2524
|
}],
|
|
2517
2525
|
/**
|
|
2518
2526
|
* Overscroll Behavior X
|
|
2519
2527
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2520
2528
|
*/
|
|
2521
2529
|
"overscroll-x": [{
|
|
2522
|
-
"overscroll-x":
|
|
2530
|
+
"overscroll-x": N()
|
|
2523
2531
|
}],
|
|
2524
2532
|
/**
|
|
2525
2533
|
* Overscroll Behavior Y
|
|
2526
2534
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2527
2535
|
*/
|
|
2528
2536
|
"overscroll-y": [{
|
|
2529
|
-
"overscroll-y":
|
|
2537
|
+
"overscroll-y": N()
|
|
2530
2538
|
}],
|
|
2531
2539
|
/**
|
|
2532
2540
|
* Position
|
|
@@ -2538,63 +2546,63 @@ const D = (e) => {
|
|
|
2538
2546
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2539
2547
|
*/
|
|
2540
2548
|
inset: [{
|
|
2541
|
-
inset: [
|
|
2549
|
+
inset: [h]
|
|
2542
2550
|
}],
|
|
2543
2551
|
/**
|
|
2544
2552
|
* Right / Left
|
|
2545
2553
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2546
2554
|
*/
|
|
2547
2555
|
"inset-x": [{
|
|
2548
|
-
"inset-x": [
|
|
2556
|
+
"inset-x": [h]
|
|
2549
2557
|
}],
|
|
2550
2558
|
/**
|
|
2551
2559
|
* Top / Bottom
|
|
2552
2560
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2553
2561
|
*/
|
|
2554
2562
|
"inset-y": [{
|
|
2555
|
-
"inset-y": [
|
|
2563
|
+
"inset-y": [h]
|
|
2556
2564
|
}],
|
|
2557
2565
|
/**
|
|
2558
2566
|
* Start
|
|
2559
2567
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2560
2568
|
*/
|
|
2561
2569
|
start: [{
|
|
2562
|
-
start: [
|
|
2570
|
+
start: [h]
|
|
2563
2571
|
}],
|
|
2564
2572
|
/**
|
|
2565
2573
|
* End
|
|
2566
2574
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2567
2575
|
*/
|
|
2568
2576
|
end: [{
|
|
2569
|
-
end: [
|
|
2577
|
+
end: [h]
|
|
2570
2578
|
}],
|
|
2571
2579
|
/**
|
|
2572
2580
|
* Top
|
|
2573
2581
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2574
2582
|
*/
|
|
2575
2583
|
top: [{
|
|
2576
|
-
top: [
|
|
2584
|
+
top: [h]
|
|
2577
2585
|
}],
|
|
2578
2586
|
/**
|
|
2579
2587
|
* Right
|
|
2580
2588
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2581
2589
|
*/
|
|
2582
2590
|
right: [{
|
|
2583
|
-
right: [
|
|
2591
|
+
right: [h]
|
|
2584
2592
|
}],
|
|
2585
2593
|
/**
|
|
2586
2594
|
* Bottom
|
|
2587
2595
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2588
2596
|
*/
|
|
2589
2597
|
bottom: [{
|
|
2590
|
-
bottom: [
|
|
2598
|
+
bottom: [h]
|
|
2591
2599
|
}],
|
|
2592
2600
|
/**
|
|
2593
2601
|
* Left
|
|
2594
2602
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2595
2603
|
*/
|
|
2596
2604
|
left: [{
|
|
2597
|
-
left: [
|
|
2605
|
+
left: [h]
|
|
2598
2606
|
}],
|
|
2599
2607
|
/**
|
|
2600
2608
|
* Visibility
|
|
@@ -2606,7 +2614,7 @@ const D = (e) => {
|
|
|
2606
2614
|
* @see https://tailwindcss.com/docs/z-index
|
|
2607
2615
|
*/
|
|
2608
2616
|
z: [{
|
|
2609
|
-
z: ["auto",
|
|
2617
|
+
z: ["auto", ae, I]
|
|
2610
2618
|
}],
|
|
2611
2619
|
// Flexbox and Grid
|
|
2612
2620
|
/**
|
|
@@ -2614,7 +2622,7 @@ const D = (e) => {
|
|
|
2614
2622
|
* @see https://tailwindcss.com/docs/flex-basis
|
|
2615
2623
|
*/
|
|
2616
2624
|
basis: [{
|
|
2617
|
-
basis:
|
|
2625
|
+
basis: C()
|
|
2618
2626
|
}],
|
|
2619
2627
|
/**
|
|
2620
2628
|
* Flex Direction
|
|
@@ -2635,35 +2643,35 @@ const D = (e) => {
|
|
|
2635
2643
|
* @see https://tailwindcss.com/docs/flex
|
|
2636
2644
|
*/
|
|
2637
2645
|
flex: [{
|
|
2638
|
-
flex: ["1", "auto", "initial", "none",
|
|
2646
|
+
flex: ["1", "auto", "initial", "none", I]
|
|
2639
2647
|
}],
|
|
2640
2648
|
/**
|
|
2641
2649
|
* Flex Grow
|
|
2642
2650
|
* @see https://tailwindcss.com/docs/flex-grow
|
|
2643
2651
|
*/
|
|
2644
2652
|
grow: [{
|
|
2645
|
-
grow:
|
|
2653
|
+
grow: Y()
|
|
2646
2654
|
}],
|
|
2647
2655
|
/**
|
|
2648
2656
|
* Flex Shrink
|
|
2649
2657
|
* @see https://tailwindcss.com/docs/flex-shrink
|
|
2650
2658
|
*/
|
|
2651
2659
|
shrink: [{
|
|
2652
|
-
shrink:
|
|
2660
|
+
shrink: Y()
|
|
2653
2661
|
}],
|
|
2654
2662
|
/**
|
|
2655
2663
|
* Order
|
|
2656
2664
|
* @see https://tailwindcss.com/docs/order
|
|
2657
2665
|
*/
|
|
2658
2666
|
order: [{
|
|
2659
|
-
order: ["first", "last", "none",
|
|
2667
|
+
order: ["first", "last", "none", ae, I]
|
|
2660
2668
|
}],
|
|
2661
2669
|
/**
|
|
2662
2670
|
* Grid Template Columns
|
|
2663
2671
|
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
2664
2672
|
*/
|
|
2665
2673
|
"grid-cols": [{
|
|
2666
|
-
"grid-cols": [
|
|
2674
|
+
"grid-cols": [le]
|
|
2667
2675
|
}],
|
|
2668
2676
|
/**
|
|
2669
2677
|
* Grid Column Start / End
|
|
@@ -2671,29 +2679,29 @@ const D = (e) => {
|
|
|
2671
2679
|
*/
|
|
2672
2680
|
"col-start-end": [{
|
|
2673
2681
|
col: ["auto", {
|
|
2674
|
-
span: ["full",
|
|
2675
|
-
},
|
|
2682
|
+
span: ["full", ae, I]
|
|
2683
|
+
}, I]
|
|
2676
2684
|
}],
|
|
2677
2685
|
/**
|
|
2678
2686
|
* Grid Column Start
|
|
2679
2687
|
* @see https://tailwindcss.com/docs/grid-column
|
|
2680
2688
|
*/
|
|
2681
2689
|
"col-start": [{
|
|
2682
|
-
"col-start":
|
|
2690
|
+
"col-start": V()
|
|
2683
2691
|
}],
|
|
2684
2692
|
/**
|
|
2685
2693
|
* Grid Column End
|
|
2686
2694
|
* @see https://tailwindcss.com/docs/grid-column
|
|
2687
2695
|
*/
|
|
2688
2696
|
"col-end": [{
|
|
2689
|
-
"col-end":
|
|
2697
|
+
"col-end": V()
|
|
2690
2698
|
}],
|
|
2691
2699
|
/**
|
|
2692
2700
|
* Grid Template Rows
|
|
2693
2701
|
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
2694
2702
|
*/
|
|
2695
2703
|
"grid-rows": [{
|
|
2696
|
-
"grid-rows": [
|
|
2704
|
+
"grid-rows": [le]
|
|
2697
2705
|
}],
|
|
2698
2706
|
/**
|
|
2699
2707
|
* Grid Row Start / End
|
|
@@ -2701,22 +2709,22 @@ const D = (e) => {
|
|
|
2701
2709
|
*/
|
|
2702
2710
|
"row-start-end": [{
|
|
2703
2711
|
row: ["auto", {
|
|
2704
|
-
span: [
|
|
2705
|
-
},
|
|
2712
|
+
span: [ae, I]
|
|
2713
|
+
}, I]
|
|
2706
2714
|
}],
|
|
2707
2715
|
/**
|
|
2708
2716
|
* Grid Row Start
|
|
2709
2717
|
* @see https://tailwindcss.com/docs/grid-row
|
|
2710
2718
|
*/
|
|
2711
2719
|
"row-start": [{
|
|
2712
|
-
"row-start":
|
|
2720
|
+
"row-start": V()
|
|
2713
2721
|
}],
|
|
2714
2722
|
/**
|
|
2715
2723
|
* Grid Row End
|
|
2716
2724
|
* @see https://tailwindcss.com/docs/grid-row
|
|
2717
2725
|
*/
|
|
2718
2726
|
"row-end": [{
|
|
2719
|
-
"row-end":
|
|
2727
|
+
"row-end": V()
|
|
2720
2728
|
}],
|
|
2721
2729
|
/**
|
|
2722
2730
|
* Grid Auto Flow
|
|
@@ -2730,42 +2738,42 @@ const D = (e) => {
|
|
|
2730
2738
|
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
2731
2739
|
*/
|
|
2732
2740
|
"auto-cols": [{
|
|
2733
|
-
"auto-cols": ["auto", "min", "max", "fr",
|
|
2741
|
+
"auto-cols": ["auto", "min", "max", "fr", I]
|
|
2734
2742
|
}],
|
|
2735
2743
|
/**
|
|
2736
2744
|
* Grid Auto Rows
|
|
2737
2745
|
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
2738
2746
|
*/
|
|
2739
2747
|
"auto-rows": [{
|
|
2740
|
-
"auto-rows": ["auto", "min", "max", "fr",
|
|
2748
|
+
"auto-rows": ["auto", "min", "max", "fr", I]
|
|
2741
2749
|
}],
|
|
2742
2750
|
/**
|
|
2743
2751
|
* Gap
|
|
2744
2752
|
* @see https://tailwindcss.com/docs/gap
|
|
2745
2753
|
*/
|
|
2746
2754
|
gap: [{
|
|
2747
|
-
gap: [
|
|
2755
|
+
gap: [a]
|
|
2748
2756
|
}],
|
|
2749
2757
|
/**
|
|
2750
2758
|
* Gap X
|
|
2751
2759
|
* @see https://tailwindcss.com/docs/gap
|
|
2752
2760
|
*/
|
|
2753
2761
|
"gap-x": [{
|
|
2754
|
-
"gap-x": [
|
|
2762
|
+
"gap-x": [a]
|
|
2755
2763
|
}],
|
|
2756
2764
|
/**
|
|
2757
2765
|
* Gap Y
|
|
2758
2766
|
* @see https://tailwindcss.com/docs/gap
|
|
2759
2767
|
*/
|
|
2760
2768
|
"gap-y": [{
|
|
2761
|
-
"gap-y": [
|
|
2769
|
+
"gap-y": [a]
|
|
2762
2770
|
}],
|
|
2763
2771
|
/**
|
|
2764
2772
|
* Justify Content
|
|
2765
2773
|
* @see https://tailwindcss.com/docs/justify-content
|
|
2766
2774
|
*/
|
|
2767
2775
|
"justify-content": [{
|
|
2768
|
-
justify: ["normal", ...
|
|
2776
|
+
justify: ["normal", ...Z()]
|
|
2769
2777
|
}],
|
|
2770
2778
|
/**
|
|
2771
2779
|
* Justify Items
|
|
@@ -2786,7 +2794,7 @@ const D = (e) => {
|
|
|
2786
2794
|
* @see https://tailwindcss.com/docs/align-content
|
|
2787
2795
|
*/
|
|
2788
2796
|
"align-content": [{
|
|
2789
|
-
content: ["normal", ...
|
|
2797
|
+
content: ["normal", ...Z(), "baseline"]
|
|
2790
2798
|
}],
|
|
2791
2799
|
/**
|
|
2792
2800
|
* Align Items
|
|
@@ -2807,7 +2815,7 @@ const D = (e) => {
|
|
|
2807
2815
|
* @see https://tailwindcss.com/docs/place-content
|
|
2808
2816
|
*/
|
|
2809
2817
|
"place-content": [{
|
|
2810
|
-
"place-content": [...
|
|
2818
|
+
"place-content": [...Z(), "baseline"]
|
|
2811
2819
|
}],
|
|
2812
2820
|
/**
|
|
2813
2821
|
* Place Items
|
|
@@ -2829,133 +2837,133 @@ const D = (e) => {
|
|
|
2829
2837
|
* @see https://tailwindcss.com/docs/padding
|
|
2830
2838
|
*/
|
|
2831
2839
|
p: [{
|
|
2832
|
-
p: [
|
|
2840
|
+
p: [b]
|
|
2833
2841
|
}],
|
|
2834
2842
|
/**
|
|
2835
2843
|
* Padding X
|
|
2836
2844
|
* @see https://tailwindcss.com/docs/padding
|
|
2837
2845
|
*/
|
|
2838
2846
|
px: [{
|
|
2839
|
-
px: [
|
|
2847
|
+
px: [b]
|
|
2840
2848
|
}],
|
|
2841
2849
|
/**
|
|
2842
2850
|
* Padding Y
|
|
2843
2851
|
* @see https://tailwindcss.com/docs/padding
|
|
2844
2852
|
*/
|
|
2845
2853
|
py: [{
|
|
2846
|
-
py: [
|
|
2854
|
+
py: [b]
|
|
2847
2855
|
}],
|
|
2848
2856
|
/**
|
|
2849
2857
|
* Padding Start
|
|
2850
2858
|
* @see https://tailwindcss.com/docs/padding
|
|
2851
2859
|
*/
|
|
2852
2860
|
ps: [{
|
|
2853
|
-
ps: [
|
|
2861
|
+
ps: [b]
|
|
2854
2862
|
}],
|
|
2855
2863
|
/**
|
|
2856
2864
|
* Padding End
|
|
2857
2865
|
* @see https://tailwindcss.com/docs/padding
|
|
2858
2866
|
*/
|
|
2859
2867
|
pe: [{
|
|
2860
|
-
pe: [
|
|
2868
|
+
pe: [b]
|
|
2861
2869
|
}],
|
|
2862
2870
|
/**
|
|
2863
2871
|
* Padding Top
|
|
2864
2872
|
* @see https://tailwindcss.com/docs/padding
|
|
2865
2873
|
*/
|
|
2866
2874
|
pt: [{
|
|
2867
|
-
pt: [
|
|
2875
|
+
pt: [b]
|
|
2868
2876
|
}],
|
|
2869
2877
|
/**
|
|
2870
2878
|
* Padding Right
|
|
2871
2879
|
* @see https://tailwindcss.com/docs/padding
|
|
2872
2880
|
*/
|
|
2873
2881
|
pr: [{
|
|
2874
|
-
pr: [
|
|
2882
|
+
pr: [b]
|
|
2875
2883
|
}],
|
|
2876
2884
|
/**
|
|
2877
2885
|
* Padding Bottom
|
|
2878
2886
|
* @see https://tailwindcss.com/docs/padding
|
|
2879
2887
|
*/
|
|
2880
2888
|
pb: [{
|
|
2881
|
-
pb: [
|
|
2889
|
+
pb: [b]
|
|
2882
2890
|
}],
|
|
2883
2891
|
/**
|
|
2884
2892
|
* Padding Left
|
|
2885
2893
|
* @see https://tailwindcss.com/docs/padding
|
|
2886
2894
|
*/
|
|
2887
2895
|
pl: [{
|
|
2888
|
-
pl: [
|
|
2896
|
+
pl: [b]
|
|
2889
2897
|
}],
|
|
2890
2898
|
/**
|
|
2891
2899
|
* Margin
|
|
2892
2900
|
* @see https://tailwindcss.com/docs/margin
|
|
2893
2901
|
*/
|
|
2894
2902
|
m: [{
|
|
2895
|
-
m: [
|
|
2903
|
+
m: [g]
|
|
2896
2904
|
}],
|
|
2897
2905
|
/**
|
|
2898
2906
|
* Margin X
|
|
2899
2907
|
* @see https://tailwindcss.com/docs/margin
|
|
2900
2908
|
*/
|
|
2901
2909
|
mx: [{
|
|
2902
|
-
mx: [
|
|
2910
|
+
mx: [g]
|
|
2903
2911
|
}],
|
|
2904
2912
|
/**
|
|
2905
2913
|
* Margin Y
|
|
2906
2914
|
* @see https://tailwindcss.com/docs/margin
|
|
2907
2915
|
*/
|
|
2908
2916
|
my: [{
|
|
2909
|
-
my: [
|
|
2917
|
+
my: [g]
|
|
2910
2918
|
}],
|
|
2911
2919
|
/**
|
|
2912
2920
|
* Margin Start
|
|
2913
2921
|
* @see https://tailwindcss.com/docs/margin
|
|
2914
2922
|
*/
|
|
2915
2923
|
ms: [{
|
|
2916
|
-
ms: [
|
|
2924
|
+
ms: [g]
|
|
2917
2925
|
}],
|
|
2918
2926
|
/**
|
|
2919
2927
|
* Margin End
|
|
2920
2928
|
* @see https://tailwindcss.com/docs/margin
|
|
2921
2929
|
*/
|
|
2922
2930
|
me: [{
|
|
2923
|
-
me: [
|
|
2931
|
+
me: [g]
|
|
2924
2932
|
}],
|
|
2925
2933
|
/**
|
|
2926
2934
|
* Margin Top
|
|
2927
2935
|
* @see https://tailwindcss.com/docs/margin
|
|
2928
2936
|
*/
|
|
2929
2937
|
mt: [{
|
|
2930
|
-
mt: [
|
|
2938
|
+
mt: [g]
|
|
2931
2939
|
}],
|
|
2932
2940
|
/**
|
|
2933
2941
|
* Margin Right
|
|
2934
2942
|
* @see https://tailwindcss.com/docs/margin
|
|
2935
2943
|
*/
|
|
2936
2944
|
mr: [{
|
|
2937
|
-
mr: [
|
|
2945
|
+
mr: [g]
|
|
2938
2946
|
}],
|
|
2939
2947
|
/**
|
|
2940
2948
|
* Margin Bottom
|
|
2941
2949
|
* @see https://tailwindcss.com/docs/margin
|
|
2942
2950
|
*/
|
|
2943
2951
|
mb: [{
|
|
2944
|
-
mb: [
|
|
2952
|
+
mb: [g]
|
|
2945
2953
|
}],
|
|
2946
2954
|
/**
|
|
2947
2955
|
* Margin Left
|
|
2948
2956
|
* @see https://tailwindcss.com/docs/margin
|
|
2949
2957
|
*/
|
|
2950
2958
|
ml: [{
|
|
2951
|
-
ml: [
|
|
2959
|
+
ml: [g]
|
|
2952
2960
|
}],
|
|
2953
2961
|
/**
|
|
2954
2962
|
* Space Between X
|
|
2955
2963
|
* @see https://tailwindcss.com/docs/space
|
|
2956
2964
|
*/
|
|
2957
2965
|
"space-x": [{
|
|
2958
|
-
"space-x": [
|
|
2966
|
+
"space-x": [z]
|
|
2959
2967
|
}],
|
|
2960
2968
|
/**
|
|
2961
2969
|
* Space Between X Reverse
|
|
@@ -2967,7 +2975,7 @@ const D = (e) => {
|
|
|
2967
2975
|
* @see https://tailwindcss.com/docs/space
|
|
2968
2976
|
*/
|
|
2969
2977
|
"space-y": [{
|
|
2970
|
-
"space-y": [
|
|
2978
|
+
"space-y": [z]
|
|
2971
2979
|
}],
|
|
2972
2980
|
/**
|
|
2973
2981
|
* Space Between Y Reverse
|
|
@@ -2980,51 +2988,51 @@ const D = (e) => {
|
|
|
2980
2988
|
* @see https://tailwindcss.com/docs/width
|
|
2981
2989
|
*/
|
|
2982
2990
|
w: [{
|
|
2983
|
-
w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw",
|
|
2991
|
+
w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", I, t]
|
|
2984
2992
|
}],
|
|
2985
2993
|
/**
|
|
2986
2994
|
* Min-Width
|
|
2987
2995
|
* @see https://tailwindcss.com/docs/min-width
|
|
2988
2996
|
*/
|
|
2989
2997
|
"min-w": [{
|
|
2990
|
-
"min-w": [
|
|
2998
|
+
"min-w": [I, t, "min", "max", "fit"]
|
|
2991
2999
|
}],
|
|
2992
3000
|
/**
|
|
2993
3001
|
* Max-Width
|
|
2994
3002
|
* @see https://tailwindcss.com/docs/max-width
|
|
2995
3003
|
*/
|
|
2996
3004
|
"max-w": [{
|
|
2997
|
-
"max-w": [
|
|
2998
|
-
screen: [
|
|
2999
|
-
},
|
|
3005
|
+
"max-w": [I, t, "none", "full", "min", "max", "fit", "prose", {
|
|
3006
|
+
screen: [X]
|
|
3007
|
+
}, X]
|
|
3000
3008
|
}],
|
|
3001
3009
|
/**
|
|
3002
3010
|
* Height
|
|
3003
3011
|
* @see https://tailwindcss.com/docs/height
|
|
3004
3012
|
*/
|
|
3005
3013
|
h: [{
|
|
3006
|
-
h: [
|
|
3014
|
+
h: [I, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
3007
3015
|
}],
|
|
3008
3016
|
/**
|
|
3009
3017
|
* Min-Height
|
|
3010
3018
|
* @see https://tailwindcss.com/docs/min-height
|
|
3011
3019
|
*/
|
|
3012
3020
|
"min-h": [{
|
|
3013
|
-
"min-h": [
|
|
3021
|
+
"min-h": [I, t, "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
3014
3022
|
}],
|
|
3015
3023
|
/**
|
|
3016
3024
|
* Max-Height
|
|
3017
3025
|
* @see https://tailwindcss.com/docs/max-height
|
|
3018
3026
|
*/
|
|
3019
3027
|
"max-h": [{
|
|
3020
|
-
"max-h": [
|
|
3028
|
+
"max-h": [I, t, "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
3021
3029
|
}],
|
|
3022
3030
|
/**
|
|
3023
3031
|
* Size
|
|
3024
3032
|
* @see https://tailwindcss.com/docs/size
|
|
3025
3033
|
*/
|
|
3026
3034
|
size: [{
|
|
3027
|
-
size: [
|
|
3035
|
+
size: [I, t, "auto", "min", "max", "fit"]
|
|
3028
3036
|
}],
|
|
3029
3037
|
// Typography
|
|
3030
3038
|
/**
|
|
@@ -3032,7 +3040,7 @@ const D = (e) => {
|
|
|
3032
3040
|
* @see https://tailwindcss.com/docs/font-size
|
|
3033
3041
|
*/
|
|
3034
3042
|
"font-size": [{
|
|
3035
|
-
text: ["base",
|
|
3043
|
+
text: ["base", X, q]
|
|
3036
3044
|
}],
|
|
3037
3045
|
/**
|
|
3038
3046
|
* Font Smoothing
|
|
@@ -3056,7 +3064,7 @@ const D = (e) => {
|
|
|
3056
3064
|
* @see https://tailwindcss.com/docs/font-family
|
|
3057
3065
|
*/
|
|
3058
3066
|
"font-family": [{
|
|
3059
|
-
font: [
|
|
3067
|
+
font: [le]
|
|
3060
3068
|
}],
|
|
3061
3069
|
/**
|
|
3062
3070
|
* Font Variant Numeric
|
|
@@ -3093,7 +3101,7 @@ const D = (e) => {
|
|
|
3093
3101
|
* @see https://tailwindcss.com/docs/letter-spacing
|
|
3094
3102
|
*/
|
|
3095
3103
|
tracking: [{
|
|
3096
|
-
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest",
|
|
3104
|
+
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", I]
|
|
3097
3105
|
}],
|
|
3098
3106
|
/**
|
|
3099
3107
|
* Line Clamp
|
|
@@ -3107,21 +3115,21 @@ const D = (e) => {
|
|
|
3107
3115
|
* @see https://tailwindcss.com/docs/line-height
|
|
3108
3116
|
*/
|
|
3109
3117
|
leading: [{
|
|
3110
|
-
leading: ["none", "tight", "snug", "normal", "relaxed", "loose",
|
|
3118
|
+
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", j, I]
|
|
3111
3119
|
}],
|
|
3112
3120
|
/**
|
|
3113
3121
|
* List Style Image
|
|
3114
3122
|
* @see https://tailwindcss.com/docs/list-style-image
|
|
3115
3123
|
*/
|
|
3116
3124
|
"list-image": [{
|
|
3117
|
-
"list-image": ["none",
|
|
3125
|
+
"list-image": ["none", I]
|
|
3118
3126
|
}],
|
|
3119
3127
|
/**
|
|
3120
3128
|
* List Style Type
|
|
3121
3129
|
* @see https://tailwindcss.com/docs/list-style-type
|
|
3122
3130
|
*/
|
|
3123
3131
|
"list-style-type": [{
|
|
3124
|
-
list: ["none", "disc", "decimal",
|
|
3132
|
+
list: ["none", "disc", "decimal", I]
|
|
3125
3133
|
}],
|
|
3126
3134
|
/**
|
|
3127
3135
|
* List Style Position
|
|
@@ -3143,7 +3151,7 @@ const D = (e) => {
|
|
|
3143
3151
|
* @see https://tailwindcss.com/docs/placeholder-opacity
|
|
3144
3152
|
*/
|
|
3145
3153
|
"placeholder-opacity": [{
|
|
3146
|
-
"placeholder-opacity": [
|
|
3154
|
+
"placeholder-opacity": [A]
|
|
3147
3155
|
}],
|
|
3148
3156
|
/**
|
|
3149
3157
|
* Text Alignment
|
|
@@ -3164,7 +3172,7 @@ const D = (e) => {
|
|
|
3164
3172
|
* @see https://tailwindcss.com/docs/text-opacity
|
|
3165
3173
|
*/
|
|
3166
3174
|
"text-opacity": [{
|
|
3167
|
-
"text-opacity": [
|
|
3175
|
+
"text-opacity": [A]
|
|
3168
3176
|
}],
|
|
3169
3177
|
/**
|
|
3170
3178
|
* Text Decoration
|
|
@@ -3176,21 +3184,21 @@ const D = (e) => {
|
|
|
3176
3184
|
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
3177
3185
|
*/
|
|
3178
3186
|
"text-decoration-style": [{
|
|
3179
|
-
decoration: [...
|
|
3187
|
+
decoration: [...P(), "wavy"]
|
|
3180
3188
|
}],
|
|
3181
3189
|
/**
|
|
3182
3190
|
* Text Decoration Thickness
|
|
3183
3191
|
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
3184
3192
|
*/
|
|
3185
3193
|
"text-decoration-thickness": [{
|
|
3186
|
-
decoration: ["auto", "from-font",
|
|
3194
|
+
decoration: ["auto", "from-font", j, q]
|
|
3187
3195
|
}],
|
|
3188
3196
|
/**
|
|
3189
3197
|
* Text Underline Offset
|
|
3190
3198
|
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
3191
3199
|
*/
|
|
3192
3200
|
"underline-offset": [{
|
|
3193
|
-
"underline-offset": ["auto",
|
|
3201
|
+
"underline-offset": ["auto", j, I]
|
|
3194
3202
|
}],
|
|
3195
3203
|
/**
|
|
3196
3204
|
* Text Decoration Color
|
|
@@ -3228,7 +3236,7 @@ const D = (e) => {
|
|
|
3228
3236
|
* @see https://tailwindcss.com/docs/vertical-align
|
|
3229
3237
|
*/
|
|
3230
3238
|
"vertical-align": [{
|
|
3231
|
-
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super",
|
|
3239
|
+
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", I]
|
|
3232
3240
|
}],
|
|
3233
3241
|
/**
|
|
3234
3242
|
* Whitespace
|
|
@@ -3256,7 +3264,7 @@ const D = (e) => {
|
|
|
3256
3264
|
* @see https://tailwindcss.com/docs/content
|
|
3257
3265
|
*/
|
|
3258
3266
|
content: [{
|
|
3259
|
-
content: ["none",
|
|
3267
|
+
content: ["none", I]
|
|
3260
3268
|
}],
|
|
3261
3269
|
// Backgrounds
|
|
3262
3270
|
/**
|
|
@@ -3279,7 +3287,7 @@ const D = (e) => {
|
|
|
3279
3287
|
* @see https://tailwindcss.com/docs/background-opacity
|
|
3280
3288
|
*/
|
|
3281
3289
|
"bg-opacity": [{
|
|
3282
|
-
"bg-opacity": [
|
|
3290
|
+
"bg-opacity": [A]
|
|
3283
3291
|
}],
|
|
3284
3292
|
/**
|
|
3285
3293
|
* Background Origin
|
|
@@ -3293,7 +3301,7 @@ const D = (e) => {
|
|
|
3293
3301
|
* @see https://tailwindcss.com/docs/background-position
|
|
3294
3302
|
*/
|
|
3295
3303
|
"bg-position": [{
|
|
3296
|
-
bg: [
|
|
3304
|
+
bg: [...$(), fn]
|
|
3297
3305
|
}],
|
|
3298
3306
|
/**
|
|
3299
3307
|
* Background Repeat
|
|
@@ -3309,7 +3317,7 @@ const D = (e) => {
|
|
|
3309
3317
|
* @see https://tailwindcss.com/docs/background-size
|
|
3310
3318
|
*/
|
|
3311
3319
|
"bg-size": [{
|
|
3312
|
-
bg: ["auto", "cover", "contain",
|
|
3320
|
+
bg: ["auto", "cover", "contain", pn]
|
|
3313
3321
|
}],
|
|
3314
3322
|
/**
|
|
3315
3323
|
* Background Image
|
|
@@ -3318,7 +3326,7 @@ const D = (e) => {
|
|
|
3318
3326
|
"bg-image": [{
|
|
3319
3327
|
bg: ["none", {
|
|
3320
3328
|
"gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
3321
|
-
},
|
|
3329
|
+
}, mn]
|
|
3322
3330
|
}],
|
|
3323
3331
|
/**
|
|
3324
3332
|
* Background Color
|
|
@@ -3332,21 +3340,21 @@ const D = (e) => {
|
|
|
3332
3340
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3333
3341
|
*/
|
|
3334
3342
|
"gradient-from-pos": [{
|
|
3335
|
-
from: [
|
|
3343
|
+
from: [v]
|
|
3336
3344
|
}],
|
|
3337
3345
|
/**
|
|
3338
3346
|
* Gradient Color Stops Via Position
|
|
3339
3347
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3340
3348
|
*/
|
|
3341
3349
|
"gradient-via-pos": [{
|
|
3342
|
-
via: [
|
|
3350
|
+
via: [v]
|
|
3343
3351
|
}],
|
|
3344
3352
|
/**
|
|
3345
3353
|
* Gradient Color Stops To Position
|
|
3346
3354
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3347
3355
|
*/
|
|
3348
3356
|
"gradient-to-pos": [{
|
|
3349
|
-
to: [
|
|
3357
|
+
to: [v]
|
|
3350
3358
|
}],
|
|
3351
3359
|
/**
|
|
3352
3360
|
* Gradient Color Stops From
|
|
@@ -3480,84 +3488,84 @@ const D = (e) => {
|
|
|
3480
3488
|
* @see https://tailwindcss.com/docs/border-width
|
|
3481
3489
|
*/
|
|
3482
3490
|
"border-w": [{
|
|
3483
|
-
border: [
|
|
3491
|
+
border: [c]
|
|
3484
3492
|
}],
|
|
3485
3493
|
/**
|
|
3486
3494
|
* Border Width X
|
|
3487
3495
|
* @see https://tailwindcss.com/docs/border-width
|
|
3488
3496
|
*/
|
|
3489
3497
|
"border-w-x": [{
|
|
3490
|
-
"border-x": [
|
|
3498
|
+
"border-x": [c]
|
|
3491
3499
|
}],
|
|
3492
3500
|
/**
|
|
3493
3501
|
* Border Width Y
|
|
3494
3502
|
* @see https://tailwindcss.com/docs/border-width
|
|
3495
3503
|
*/
|
|
3496
3504
|
"border-w-y": [{
|
|
3497
|
-
"border-y": [
|
|
3505
|
+
"border-y": [c]
|
|
3498
3506
|
}],
|
|
3499
3507
|
/**
|
|
3500
3508
|
* Border Width Start
|
|
3501
3509
|
* @see https://tailwindcss.com/docs/border-width
|
|
3502
3510
|
*/
|
|
3503
3511
|
"border-w-s": [{
|
|
3504
|
-
"border-s": [
|
|
3512
|
+
"border-s": [c]
|
|
3505
3513
|
}],
|
|
3506
3514
|
/**
|
|
3507
3515
|
* Border Width End
|
|
3508
3516
|
* @see https://tailwindcss.com/docs/border-width
|
|
3509
3517
|
*/
|
|
3510
3518
|
"border-w-e": [{
|
|
3511
|
-
"border-e": [
|
|
3519
|
+
"border-e": [c]
|
|
3512
3520
|
}],
|
|
3513
3521
|
/**
|
|
3514
3522
|
* Border Width Top
|
|
3515
3523
|
* @see https://tailwindcss.com/docs/border-width
|
|
3516
3524
|
*/
|
|
3517
3525
|
"border-w-t": [{
|
|
3518
|
-
"border-t": [
|
|
3526
|
+
"border-t": [c]
|
|
3519
3527
|
}],
|
|
3520
3528
|
/**
|
|
3521
3529
|
* Border Width Right
|
|
3522
3530
|
* @see https://tailwindcss.com/docs/border-width
|
|
3523
3531
|
*/
|
|
3524
3532
|
"border-w-r": [{
|
|
3525
|
-
"border-r": [
|
|
3533
|
+
"border-r": [c]
|
|
3526
3534
|
}],
|
|
3527
3535
|
/**
|
|
3528
3536
|
* Border Width Bottom
|
|
3529
3537
|
* @see https://tailwindcss.com/docs/border-width
|
|
3530
3538
|
*/
|
|
3531
3539
|
"border-w-b": [{
|
|
3532
|
-
"border-b": [
|
|
3540
|
+
"border-b": [c]
|
|
3533
3541
|
}],
|
|
3534
3542
|
/**
|
|
3535
3543
|
* Border Width Left
|
|
3536
3544
|
* @see https://tailwindcss.com/docs/border-width
|
|
3537
3545
|
*/
|
|
3538
3546
|
"border-w-l": [{
|
|
3539
|
-
"border-l": [
|
|
3547
|
+
"border-l": [c]
|
|
3540
3548
|
}],
|
|
3541
3549
|
/**
|
|
3542
3550
|
* Border Opacity
|
|
3543
3551
|
* @see https://tailwindcss.com/docs/border-opacity
|
|
3544
3552
|
*/
|
|
3545
3553
|
"border-opacity": [{
|
|
3546
|
-
"border-opacity": [
|
|
3554
|
+
"border-opacity": [A]
|
|
3547
3555
|
}],
|
|
3548
3556
|
/**
|
|
3549
3557
|
* Border Style
|
|
3550
3558
|
* @see https://tailwindcss.com/docs/border-style
|
|
3551
3559
|
*/
|
|
3552
3560
|
"border-style": [{
|
|
3553
|
-
border: [...
|
|
3561
|
+
border: [...P(), "hidden"]
|
|
3554
3562
|
}],
|
|
3555
3563
|
/**
|
|
3556
3564
|
* Divide Width X
|
|
3557
3565
|
* @see https://tailwindcss.com/docs/divide-width
|
|
3558
3566
|
*/
|
|
3559
3567
|
"divide-x": [{
|
|
3560
|
-
"divide-x": [
|
|
3568
|
+
"divide-x": [c]
|
|
3561
3569
|
}],
|
|
3562
3570
|
/**
|
|
3563
3571
|
* Divide Width X Reverse
|
|
@@ -3569,7 +3577,7 @@ const D = (e) => {
|
|
|
3569
3577
|
* @see https://tailwindcss.com/docs/divide-width
|
|
3570
3578
|
*/
|
|
3571
3579
|
"divide-y": [{
|
|
3572
|
-
"divide-y": [
|
|
3580
|
+
"divide-y": [c]
|
|
3573
3581
|
}],
|
|
3574
3582
|
/**
|
|
3575
3583
|
* Divide Width Y Reverse
|
|
@@ -3581,14 +3589,14 @@ const D = (e) => {
|
|
|
3581
3589
|
* @see https://tailwindcss.com/docs/divide-opacity
|
|
3582
3590
|
*/
|
|
3583
3591
|
"divide-opacity": [{
|
|
3584
|
-
"divide-opacity": [
|
|
3592
|
+
"divide-opacity": [A]
|
|
3585
3593
|
}],
|
|
3586
3594
|
/**
|
|
3587
3595
|
* Divide Style
|
|
3588
3596
|
* @see https://tailwindcss.com/docs/divide-style
|
|
3589
3597
|
*/
|
|
3590
3598
|
"divide-style": [{
|
|
3591
|
-
divide:
|
|
3599
|
+
divide: P()
|
|
3592
3600
|
}],
|
|
3593
3601
|
/**
|
|
3594
3602
|
* Border Color
|
|
@@ -3665,21 +3673,21 @@ const D = (e) => {
|
|
|
3665
3673
|
* @see https://tailwindcss.com/docs/outline-style
|
|
3666
3674
|
*/
|
|
3667
3675
|
"outline-style": [{
|
|
3668
|
-
outline: ["", ...
|
|
3676
|
+
outline: ["", ...P()]
|
|
3669
3677
|
}],
|
|
3670
3678
|
/**
|
|
3671
3679
|
* Outline Offset
|
|
3672
3680
|
* @see https://tailwindcss.com/docs/outline-offset
|
|
3673
3681
|
*/
|
|
3674
3682
|
"outline-offset": [{
|
|
3675
|
-
"outline-offset": [
|
|
3683
|
+
"outline-offset": [j, I]
|
|
3676
3684
|
}],
|
|
3677
3685
|
/**
|
|
3678
3686
|
* Outline Width
|
|
3679
3687
|
* @see https://tailwindcss.com/docs/outline-width
|
|
3680
3688
|
*/
|
|
3681
3689
|
"outline-w": [{
|
|
3682
|
-
outline: [
|
|
3690
|
+
outline: [j, q]
|
|
3683
3691
|
}],
|
|
3684
3692
|
/**
|
|
3685
3693
|
* Outline Color
|
|
@@ -3712,14 +3720,14 @@ const D = (e) => {
|
|
|
3712
3720
|
* @see https://tailwindcss.com/docs/ring-opacity
|
|
3713
3721
|
*/
|
|
3714
3722
|
"ring-opacity": [{
|
|
3715
|
-
"ring-opacity": [
|
|
3723
|
+
"ring-opacity": [A]
|
|
3716
3724
|
}],
|
|
3717
3725
|
/**
|
|
3718
3726
|
* Ring Offset Width
|
|
3719
3727
|
* @see https://tailwindcss.com/docs/ring-offset-width
|
|
3720
3728
|
*/
|
|
3721
3729
|
"ring-offset-w": [{
|
|
3722
|
-
"ring-offset": [
|
|
3730
|
+
"ring-offset": [j, q]
|
|
3723
3731
|
}],
|
|
3724
3732
|
/**
|
|
3725
3733
|
* Ring Offset Color
|
|
@@ -3734,35 +3742,35 @@ const D = (e) => {
|
|
|
3734
3742
|
* @see https://tailwindcss.com/docs/box-shadow
|
|
3735
3743
|
*/
|
|
3736
3744
|
shadow: [{
|
|
3737
|
-
shadow: ["", "inner", "none",
|
|
3745
|
+
shadow: ["", "inner", "none", X, gn]
|
|
3738
3746
|
}],
|
|
3739
3747
|
/**
|
|
3740
3748
|
* Box Shadow Color
|
|
3741
3749
|
* @see https://tailwindcss.com/docs/box-shadow-color
|
|
3742
3750
|
*/
|
|
3743
3751
|
"shadow-color": [{
|
|
3744
|
-
shadow: [
|
|
3752
|
+
shadow: [le]
|
|
3745
3753
|
}],
|
|
3746
3754
|
/**
|
|
3747
3755
|
* Opacity
|
|
3748
3756
|
* @see https://tailwindcss.com/docs/opacity
|
|
3749
3757
|
*/
|
|
3750
3758
|
opacity: [{
|
|
3751
|
-
opacity: [
|
|
3759
|
+
opacity: [A]
|
|
3752
3760
|
}],
|
|
3753
3761
|
/**
|
|
3754
3762
|
* Mix Blend Mode
|
|
3755
3763
|
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
3756
3764
|
*/
|
|
3757
3765
|
"mix-blend": [{
|
|
3758
|
-
"mix-blend": [...
|
|
3766
|
+
"mix-blend": [...H(), "plus-lighter", "plus-darker"]
|
|
3759
3767
|
}],
|
|
3760
3768
|
/**
|
|
3761
3769
|
* Background Blend Mode
|
|
3762
3770
|
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
3763
3771
|
*/
|
|
3764
3772
|
"bg-blend": [{
|
|
3765
|
-
"bg-blend":
|
|
3773
|
+
"bg-blend": H()
|
|
3766
3774
|
}],
|
|
3767
3775
|
// Filters
|
|
3768
3776
|
/**
|
|
@@ -3799,7 +3807,7 @@ const D = (e) => {
|
|
|
3799
3807
|
* @see https://tailwindcss.com/docs/drop-shadow
|
|
3800
3808
|
*/
|
|
3801
3809
|
"drop-shadow": [{
|
|
3802
|
-
"drop-shadow": ["", "none",
|
|
3810
|
+
"drop-shadow": ["", "none", X, I]
|
|
3803
3811
|
}],
|
|
3804
3812
|
/**
|
|
3805
3813
|
* Grayscale
|
|
@@ -3820,21 +3828,21 @@ const D = (e) => {
|
|
|
3820
3828
|
* @see https://tailwindcss.com/docs/invert
|
|
3821
3829
|
*/
|
|
3822
3830
|
invert: [{
|
|
3823
|
-
invert: [
|
|
3831
|
+
invert: [m]
|
|
3824
3832
|
}],
|
|
3825
3833
|
/**
|
|
3826
3834
|
* Saturate
|
|
3827
3835
|
* @see https://tailwindcss.com/docs/saturate
|
|
3828
3836
|
*/
|
|
3829
3837
|
saturate: [{
|
|
3830
|
-
saturate: [
|
|
3838
|
+
saturate: [y]
|
|
3831
3839
|
}],
|
|
3832
3840
|
/**
|
|
3833
3841
|
* Sepia
|
|
3834
3842
|
* @see https://tailwindcss.com/docs/sepia
|
|
3835
3843
|
*/
|
|
3836
3844
|
sepia: [{
|
|
3837
|
-
sepia: [
|
|
3845
|
+
sepia: [k]
|
|
3838
3846
|
}],
|
|
3839
3847
|
/**
|
|
3840
3848
|
* Backdrop Filter
|
|
@@ -3884,28 +3892,28 @@ const D = (e) => {
|
|
|
3884
3892
|
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
3885
3893
|
*/
|
|
3886
3894
|
"backdrop-invert": [{
|
|
3887
|
-
"backdrop-invert": [
|
|
3895
|
+
"backdrop-invert": [m]
|
|
3888
3896
|
}],
|
|
3889
3897
|
/**
|
|
3890
3898
|
* Backdrop Opacity
|
|
3891
3899
|
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
3892
3900
|
*/
|
|
3893
3901
|
"backdrop-opacity": [{
|
|
3894
|
-
"backdrop-opacity": [
|
|
3902
|
+
"backdrop-opacity": [A]
|
|
3895
3903
|
}],
|
|
3896
3904
|
/**
|
|
3897
3905
|
* Backdrop Saturate
|
|
3898
3906
|
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
3899
3907
|
*/
|
|
3900
3908
|
"backdrop-saturate": [{
|
|
3901
|
-
"backdrop-saturate": [
|
|
3909
|
+
"backdrop-saturate": [y]
|
|
3902
3910
|
}],
|
|
3903
3911
|
/**
|
|
3904
3912
|
* Backdrop Sepia
|
|
3905
3913
|
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
3906
3914
|
*/
|
|
3907
3915
|
"backdrop-sepia": [{
|
|
3908
|
-
"backdrop-sepia": [
|
|
3916
|
+
"backdrop-sepia": [k]
|
|
3909
3917
|
}],
|
|
3910
3918
|
// Tables
|
|
3911
3919
|
/**
|
|
@@ -3956,7 +3964,7 @@ const D = (e) => {
|
|
|
3956
3964
|
* @see https://tailwindcss.com/docs/transition-property
|
|
3957
3965
|
*/
|
|
3958
3966
|
transition: [{
|
|
3959
|
-
transition: ["none", "all", "", "colors", "opacity", "shadow", "transform",
|
|
3967
|
+
transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", I]
|
|
3960
3968
|
}],
|
|
3961
3969
|
/**
|
|
3962
3970
|
* Transition Duration
|
|
@@ -3970,7 +3978,7 @@ const D = (e) => {
|
|
|
3970
3978
|
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
3971
3979
|
*/
|
|
3972
3980
|
ease: [{
|
|
3973
|
-
ease: ["linear", "in", "out", "in-out",
|
|
3981
|
+
ease: ["linear", "in", "out", "in-out", I]
|
|
3974
3982
|
}],
|
|
3975
3983
|
/**
|
|
3976
3984
|
* Transition Delay
|
|
@@ -3984,7 +3992,7 @@ const D = (e) => {
|
|
|
3984
3992
|
* @see https://tailwindcss.com/docs/animation
|
|
3985
3993
|
*/
|
|
3986
3994
|
animate: [{
|
|
3987
|
-
animate: ["none", "spin", "ping", "pulse", "bounce",
|
|
3995
|
+
animate: ["none", "spin", "ping", "pulse", "bounce", I]
|
|
3988
3996
|
}],
|
|
3989
3997
|
// Transforms
|
|
3990
3998
|
/**
|
|
@@ -3999,63 +4007,63 @@ const D = (e) => {
|
|
|
3999
4007
|
* @see https://tailwindcss.com/docs/scale
|
|
4000
4008
|
*/
|
|
4001
4009
|
scale: [{
|
|
4002
|
-
scale: [
|
|
4010
|
+
scale: [w]
|
|
4003
4011
|
}],
|
|
4004
4012
|
/**
|
|
4005
4013
|
* Scale X
|
|
4006
4014
|
* @see https://tailwindcss.com/docs/scale
|
|
4007
4015
|
*/
|
|
4008
4016
|
"scale-x": [{
|
|
4009
|
-
"scale-x": [
|
|
4017
|
+
"scale-x": [w]
|
|
4010
4018
|
}],
|
|
4011
4019
|
/**
|
|
4012
4020
|
* Scale Y
|
|
4013
4021
|
* @see https://tailwindcss.com/docs/scale
|
|
4014
4022
|
*/
|
|
4015
4023
|
"scale-y": [{
|
|
4016
|
-
"scale-y": [
|
|
4024
|
+
"scale-y": [w]
|
|
4017
4025
|
}],
|
|
4018
4026
|
/**
|
|
4019
4027
|
* Rotate
|
|
4020
4028
|
* @see https://tailwindcss.com/docs/rotate
|
|
4021
4029
|
*/
|
|
4022
4030
|
rotate: [{
|
|
4023
|
-
rotate: [
|
|
4031
|
+
rotate: [ae, I]
|
|
4024
4032
|
}],
|
|
4025
4033
|
/**
|
|
4026
4034
|
* Translate X
|
|
4027
4035
|
* @see https://tailwindcss.com/docs/translate
|
|
4028
4036
|
*/
|
|
4029
4037
|
"translate-x": [{
|
|
4030
|
-
"translate-x": [
|
|
4038
|
+
"translate-x": [M]
|
|
4031
4039
|
}],
|
|
4032
4040
|
/**
|
|
4033
4041
|
* Translate Y
|
|
4034
4042
|
* @see https://tailwindcss.com/docs/translate
|
|
4035
4043
|
*/
|
|
4036
4044
|
"translate-y": [{
|
|
4037
|
-
"translate-y": [
|
|
4045
|
+
"translate-y": [M]
|
|
4038
4046
|
}],
|
|
4039
4047
|
/**
|
|
4040
4048
|
* Skew X
|
|
4041
4049
|
* @see https://tailwindcss.com/docs/skew
|
|
4042
4050
|
*/
|
|
4043
4051
|
"skew-x": [{
|
|
4044
|
-
"skew-x": [
|
|
4052
|
+
"skew-x": [E]
|
|
4045
4053
|
}],
|
|
4046
4054
|
/**
|
|
4047
4055
|
* Skew Y
|
|
4048
4056
|
* @see https://tailwindcss.com/docs/skew
|
|
4049
4057
|
*/
|
|
4050
4058
|
"skew-y": [{
|
|
4051
|
-
"skew-y": [
|
|
4059
|
+
"skew-y": [E]
|
|
4052
4060
|
}],
|
|
4053
4061
|
/**
|
|
4054
4062
|
* Transform Origin
|
|
4055
4063
|
* @see https://tailwindcss.com/docs/transform-origin
|
|
4056
4064
|
*/
|
|
4057
4065
|
"transform-origin": [{
|
|
4058
|
-
origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left",
|
|
4066
|
+
origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", I]
|
|
4059
4067
|
}],
|
|
4060
4068
|
// Interactivity
|
|
4061
4069
|
/**
|
|
@@ -4077,7 +4085,7 @@ const D = (e) => {
|
|
|
4077
4085
|
* @see https://tailwindcss.com/docs/cursor
|
|
4078
4086
|
*/
|
|
4079
4087
|
cursor: [{
|
|
4080
|
-
cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out",
|
|
4088
|
+
cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", I]
|
|
4081
4089
|
}],
|
|
4082
4090
|
/**
|
|
4083
4091
|
* Caret Color
|
|
@@ -4299,7 +4307,7 @@ const D = (e) => {
|
|
|
4299
4307
|
* @see https://tailwindcss.com/docs/will-change
|
|
4300
4308
|
*/
|
|
4301
4309
|
"will-change": [{
|
|
4302
|
-
"will-change": ["auto", "scroll", "contents", "transform",
|
|
4310
|
+
"will-change": ["auto", "scroll", "contents", "transform", I]
|
|
4303
4311
|
}],
|
|
4304
4312
|
// SVG
|
|
4305
4313
|
/**
|
|
@@ -4314,7 +4322,7 @@ const D = (e) => {
|
|
|
4314
4322
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
4315
4323
|
*/
|
|
4316
4324
|
"stroke-w": [{
|
|
4317
|
-
stroke: [
|
|
4325
|
+
stroke: [j, q, be]
|
|
4318
4326
|
}],
|
|
4319
4327
|
/**
|
|
4320
4328
|
* Stroke
|
|
@@ -4389,99 +4397,99 @@ const D = (e) => {
|
|
|
4389
4397
|
"font-size": ["leading"]
|
|
4390
4398
|
}
|
|
4391
4399
|
};
|
|
4392
|
-
},
|
|
4393
|
-
function
|
|
4394
|
-
return
|
|
4400
|
+
}, xn = /* @__PURE__ */ tn(yn);
|
|
4401
|
+
function kn(...e) {
|
|
4402
|
+
return xn(bt(e));
|
|
4395
4403
|
}
|
|
4396
|
-
function
|
|
4397
|
-
const [r, o] =
|
|
4404
|
+
function or({ autoWidth: e = !0, className: t, style: n }) {
|
|
4405
|
+
const [r, o] = T(() => _.getActiveAppId()), [i, l] = T(() => G.getRunningApps()), { isMobile: c } = Ke();
|
|
4398
4406
|
B(() => {
|
|
4399
|
-
const
|
|
4400
|
-
o(
|
|
4407
|
+
const g = _.subscribe("activeAppId", (A) => {
|
|
4408
|
+
o(A);
|
|
4401
4409
|
});
|
|
4402
4410
|
return () => {
|
|
4403
|
-
|
|
4411
|
+
g();
|
|
4404
4412
|
};
|
|
4405
|
-
}, []), B(() =>
|
|
4406
|
-
l(
|
|
4413
|
+
}, []), B(() => G.subscribe(() => {
|
|
4414
|
+
l(G.getRunningApps());
|
|
4407
4415
|
}), []), B(() => {
|
|
4408
4416
|
if (!new URLSearchParams(window.location.search).has("app")) {
|
|
4409
|
-
const
|
|
4410
|
-
|
|
4417
|
+
const b = _.getActiveAppId();
|
|
4418
|
+
b && !G.isRunning(b) && G.launchApp(b);
|
|
4411
4419
|
}
|
|
4412
4420
|
}, []);
|
|
4413
|
-
const d = (
|
|
4414
|
-
|
|
4415
|
-
}, p = r ? oe.get(r) : null,
|
|
4421
|
+
const d = (g) => {
|
|
4422
|
+
G.closeApp(g);
|
|
4423
|
+
}, p = r ? oe.get(r) : null, m = (p == null ? void 0 : p.width) ?? 400, a = r !== null, h = { ...{
|
|
4416
4424
|
overflow: "hidden",
|
|
4417
|
-
display:
|
|
4425
|
+
display: a ? "flex" : "none",
|
|
4418
4426
|
flexDirection: "column",
|
|
4419
4427
|
flexShrink: 0,
|
|
4420
4428
|
// Only set width if autoWidth is enabled
|
|
4421
|
-
...e &&
|
|
4429
|
+
...e && a ? { width: c ? "100%" : m } : {}
|
|
4422
4430
|
}, ...n };
|
|
4423
|
-
return /* @__PURE__ */ s("div", { className:
|
|
4424
|
-
|
|
4431
|
+
return /* @__PURE__ */ s("div", { className: kn("nc-app-panel", t), style: h, children: i.map((g) => /* @__PURE__ */ s(
|
|
4432
|
+
Ge,
|
|
4425
4433
|
{
|
|
4426
|
-
appId:
|
|
4427
|
-
isActive: r ===
|
|
4428
|
-
onClose: () => d(
|
|
4434
|
+
appId: g.appId,
|
|
4435
|
+
isActive: r === g.appId,
|
|
4436
|
+
onClose: () => d(g.appId)
|
|
4429
4437
|
},
|
|
4430
|
-
|
|
4438
|
+
g.appId
|
|
4431
4439
|
)) });
|
|
4432
4440
|
}
|
|
4433
|
-
function
|
|
4434
|
-
const { isMobile: n } =
|
|
4441
|
+
function sr({ pinnedAppIds: e, className: t = "" }) {
|
|
4442
|
+
const { isMobile: n } = Ke(), [r, o] = T(() => _.getActiveAppId()), [i, l] = T(() => G.getRunningApps());
|
|
4435
4443
|
B(() => {
|
|
4436
|
-
const
|
|
4444
|
+
const a = _.subscribe("activeAppId", (u) => {
|
|
4437
4445
|
o(u);
|
|
4438
4446
|
});
|
|
4439
4447
|
return () => {
|
|
4440
|
-
|
|
4448
|
+
a();
|
|
4441
4449
|
};
|
|
4442
|
-
}, []), B(() =>
|
|
4443
|
-
l(
|
|
4450
|
+
}, []), B(() => G.subscribe(() => {
|
|
4451
|
+
l(G.getRunningApps());
|
|
4444
4452
|
}), []);
|
|
4445
|
-
const
|
|
4446
|
-
r ===
|
|
4447
|
-
}, d = e.map((
|
|
4448
|
-
return /* @__PURE__ */
|
|
4449
|
-
d.map((
|
|
4450
|
-
const u =
|
|
4451
|
-
return /* @__PURE__ */
|
|
4453
|
+
const c = (a) => {
|
|
4454
|
+
r === a ? G.setActiveApp(null) : G.launchApp(a);
|
|
4455
|
+
}, d = e.map((a) => oe.get(a)).filter((a) => !!a), p = i.filter((a) => !e.includes(a.appId)).map((a) => ({ running: a, def: oe.get(a.appId) })).filter((a) => !!a.def), f = (a) => i.some((u) => u.appId === a), m = n ? 24 : 28;
|
|
4456
|
+
return /* @__PURE__ */ x("div", { className: `nc-app-taskbar ${n ? "nc-mobile" : "nc-desktop"} ${t}`, children: [
|
|
4457
|
+
d.map((a) => {
|
|
4458
|
+
const u = a.icon, v = r === a.id, h = f(a.id);
|
|
4459
|
+
return /* @__PURE__ */ x(
|
|
4452
4460
|
"button",
|
|
4453
4461
|
{
|
|
4454
|
-
className: `nc-app-taskbar-button ${
|
|
4455
|
-
onClick: () => a
|
|
4456
|
-
title:
|
|
4462
|
+
className: `nc-app-taskbar-button ${v ? "nc-active" : ""} ${h ? "nc-running" : ""}`,
|
|
4463
|
+
onClick: () => c(a.id),
|
|
4464
|
+
title: a.titleKey || a.id,
|
|
4457
4465
|
children: [
|
|
4458
|
-
/* @__PURE__ */ s(u, { size:
|
|
4459
|
-
|
|
4466
|
+
/* @__PURE__ */ s(u, { size: m }),
|
|
4467
|
+
h && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
|
|
4460
4468
|
]
|
|
4461
4469
|
},
|
|
4462
|
-
|
|
4470
|
+
a.id
|
|
4463
4471
|
);
|
|
4464
4472
|
}),
|
|
4465
4473
|
p.length > 0 && /* @__PURE__ */ s("div", { className: "nc-app-taskbar-separator" }),
|
|
4466
|
-
p.map(({ running:
|
|
4467
|
-
const
|
|
4468
|
-
return /* @__PURE__ */
|
|
4474
|
+
p.map(({ running: a, def: u }) => {
|
|
4475
|
+
const v = u.icon, h = r === a.appId;
|
|
4476
|
+
return /* @__PURE__ */ x(
|
|
4469
4477
|
"button",
|
|
4470
4478
|
{
|
|
4471
|
-
className: `nc-app-taskbar-button ${
|
|
4472
|
-
onClick: () => a
|
|
4479
|
+
className: `nc-app-taskbar-button ${h ? "nc-active" : ""} nc-running`,
|
|
4480
|
+
onClick: () => c(a.appId),
|
|
4473
4481
|
title: u.titleKey || u.id,
|
|
4474
4482
|
children: [
|
|
4475
|
-
/* @__PURE__ */ s(
|
|
4483
|
+
/* @__PURE__ */ s(v, { size: m }),
|
|
4476
4484
|
/* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
|
|
4477
4485
|
]
|
|
4478
4486
|
},
|
|
4479
|
-
|
|
4487
|
+
a.appId
|
|
4480
4488
|
);
|
|
4481
4489
|
})
|
|
4482
4490
|
] });
|
|
4483
4491
|
}
|
|
4484
|
-
function
|
|
4492
|
+
function ir({
|
|
4485
4493
|
appId: e,
|
|
4486
4494
|
open: t,
|
|
4487
4495
|
onClose: n,
|
|
@@ -4493,7 +4501,7 @@ function rr({
|
|
|
4493
4501
|
r && d.target === d.currentTarget && n();
|
|
4494
4502
|
};
|
|
4495
4503
|
if (!t) return null;
|
|
4496
|
-
const
|
|
4504
|
+
const c = /* @__PURE__ */ s(
|
|
4497
4505
|
"div",
|
|
4498
4506
|
{
|
|
4499
4507
|
className: "nc-dialog-overlay nc-fullscreen",
|
|
@@ -4505,7 +4513,7 @@ function rr({
|
|
|
4505
4513
|
style: i,
|
|
4506
4514
|
onClick: (d) => d.stopPropagation(),
|
|
4507
4515
|
children: /* @__PURE__ */ s(
|
|
4508
|
-
|
|
4516
|
+
Ge,
|
|
4509
4517
|
{
|
|
4510
4518
|
appId: e,
|
|
4511
4519
|
isActive: !0,
|
|
@@ -4516,86 +4524,86 @@ function rr({
|
|
|
4516
4524
|
)
|
|
4517
4525
|
}
|
|
4518
4526
|
);
|
|
4519
|
-
return
|
|
4527
|
+
return ue(c, document.body);
|
|
4520
4528
|
}
|
|
4521
|
-
const Ae = se(null),
|
|
4522
|
-
function
|
|
4523
|
-
const e =
|
|
4529
|
+
const Ae = se(null), Qe = se(null);
|
|
4530
|
+
function cr() {
|
|
4531
|
+
const e = J(Ae);
|
|
4524
4532
|
if (!e)
|
|
4525
4533
|
throw new Error("useNavStack must be used within a NavStackProvider");
|
|
4526
4534
|
return e;
|
|
4527
4535
|
}
|
|
4528
|
-
function
|
|
4529
|
-
const e =
|
|
4536
|
+
function ar() {
|
|
4537
|
+
const e = J(Qe);
|
|
4530
4538
|
if (!e)
|
|
4531
4539
|
throw new Error("useNavView must be used within NavStack");
|
|
4532
4540
|
return e;
|
|
4533
4541
|
}
|
|
4534
4542
|
const Ce = se(null);
|
|
4535
|
-
function
|
|
4536
|
-
const { t: n } =
|
|
4537
|
-
|
|
4538
|
-
const
|
|
4539
|
-
return
|
|
4543
|
+
function lr({ rootView: e, children: t }) {
|
|
4544
|
+
const { t: n } = Q(), r = Wt(), [o, i] = T([e]), [l, c] = T([null]), d = O((w, k) => {
|
|
4545
|
+
c((E) => {
|
|
4546
|
+
const z = [...E];
|
|
4547
|
+
return z[w] = k, z;
|
|
4540
4548
|
});
|
|
4541
|
-
}, []), p = O((
|
|
4542
|
-
|
|
4543
|
-
const
|
|
4544
|
-
return
|
|
4549
|
+
}, []), p = O((w) => {
|
|
4550
|
+
c((k) => {
|
|
4551
|
+
const E = [...k];
|
|
4552
|
+
return E[w] = null, E;
|
|
4545
4553
|
});
|
|
4546
|
-
}, []), f = O((
|
|
4547
|
-
i((
|
|
4548
|
-
}, []),
|
|
4549
|
-
i((
|
|
4550
|
-
}, []),
|
|
4551
|
-
i([e]),
|
|
4552
|
-
}, [e]), u = o.length,
|
|
4554
|
+
}, []), f = O((w) => {
|
|
4555
|
+
i((k) => [...k, w]), c((k) => [...k, null]);
|
|
4556
|
+
}, []), m = O(() => {
|
|
4557
|
+
i((w) => w.length <= 1 ? w : w.slice(0, -1)), c((w) => w.slice(0, -1));
|
|
4558
|
+
}, []), a = O(() => {
|
|
4559
|
+
i([e]), c([null]);
|
|
4560
|
+
}, [e]), u = o.length, v = u > 1, h = o.length - 1, g = o[o.length - 1], A = g != null && g.titleKey ? n(g.titleKey) : (g == null ? void 0 : g.title) ?? "";
|
|
4553
4561
|
B(() => {
|
|
4554
|
-
r.setTitle(
|
|
4555
|
-
}, [
|
|
4556
|
-
|
|
4557
|
-
}, [
|
|
4558
|
-
const
|
|
4559
|
-
|
|
4562
|
+
r.setTitle(A);
|
|
4563
|
+
}, [A, r]), B(() => {
|
|
4564
|
+
v ? r.setBackHandler(m) : r.clearBackHandler();
|
|
4565
|
+
}, [v, m, r]), B(() => {
|
|
4566
|
+
const w = l[l.length - 1];
|
|
4567
|
+
w ? r.setToolbar(w) : r.clearToolbar();
|
|
4560
4568
|
}, [l, r]);
|
|
4561
|
-
const
|
|
4569
|
+
const b = {
|
|
4562
4570
|
push: f,
|
|
4563
|
-
pop:
|
|
4564
|
-
reset:
|
|
4571
|
+
pop: m,
|
|
4572
|
+
reset: a,
|
|
4565
4573
|
depth: u,
|
|
4566
|
-
canGoBack:
|
|
4567
|
-
currentTitle:
|
|
4568
|
-
},
|
|
4574
|
+
canGoBack: v,
|
|
4575
|
+
currentTitle: A
|
|
4576
|
+
}, y = {
|
|
4569
4577
|
stack: o,
|
|
4570
4578
|
toolbarStack: l,
|
|
4571
4579
|
updateToolbar: d,
|
|
4572
4580
|
clearToolbarAt: p,
|
|
4573
|
-
topIndex:
|
|
4581
|
+
topIndex: h
|
|
4574
4582
|
};
|
|
4575
|
-
return /* @__PURE__ */ s(Ae.Provider, { value:
|
|
4583
|
+
return /* @__PURE__ */ s(Ae.Provider, { value: b, children: /* @__PURE__ */ s(Ce.Provider, { value: y, children: t }) });
|
|
4576
4584
|
}
|
|
4577
|
-
function
|
|
4578
|
-
const n =
|
|
4585
|
+
function Nn({ index: e, children: t }) {
|
|
4586
|
+
const n = J(Ce);
|
|
4579
4587
|
if (!n)
|
|
4580
4588
|
throw new Error("NavViewProvider must be used within NavStackProvider");
|
|
4581
4589
|
const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n, l = O((p) => {
|
|
4582
4590
|
e === i && r(e, p);
|
|
4583
|
-
}, [e, i, r]),
|
|
4591
|
+
}, [e, i, r]), c = O(() => {
|
|
4584
4592
|
e === i && o(e);
|
|
4585
4593
|
}, [e, i, o]), d = {
|
|
4586
4594
|
setToolbar: l,
|
|
4587
|
-
clearToolbar:
|
|
4595
|
+
clearToolbar: c
|
|
4588
4596
|
};
|
|
4589
|
-
return /* @__PURE__ */ s(
|
|
4597
|
+
return /* @__PURE__ */ s(Qe.Provider, { value: d, children: t });
|
|
4590
4598
|
}
|
|
4591
|
-
function
|
|
4592
|
-
const e =
|
|
4599
|
+
function dr() {
|
|
4600
|
+
const e = J(Ae), t = J(Ce);
|
|
4593
4601
|
if (!e || !t)
|
|
4594
4602
|
throw new Error("NavStackContainer must be used within a NavStackProvider");
|
|
4595
4603
|
const { stack: n } = t;
|
|
4596
4604
|
return /* @__PURE__ */ s("div", { className: "nav-stack-container", children: /* @__PURE__ */ s("div", { className: "nav-stack-content", children: n.map((r, o) => {
|
|
4597
4605
|
const i = o === n.length - 1;
|
|
4598
|
-
return /* @__PURE__ */ s(
|
|
4606
|
+
return /* @__PURE__ */ s(Nn, { index: o, children: /* @__PURE__ */ s(
|
|
4599
4607
|
"div",
|
|
4600
4608
|
{
|
|
4601
4609
|
style: { display: i ? "flex" : "none", flexDirection: "column", height: "100%" },
|
|
@@ -4605,55 +4613,55 @@ function cr() {
|
|
|
4605
4613
|
}) }) });
|
|
4606
4614
|
}
|
|
4607
4615
|
export {
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4616
|
+
He as ActivityIndicator,
|
|
4617
|
+
Tn as Alert,
|
|
4618
|
+
Ge as AppContainer,
|
|
4619
|
+
Ve as AppContext,
|
|
4620
|
+
ir as AppDialog,
|
|
4621
|
+
or as AppPanel,
|
|
4622
|
+
sr as AppTaskbar,
|
|
4623
|
+
Ft as AppTitleBar,
|
|
4624
|
+
zn as Battery,
|
|
4625
|
+
K as Button,
|
|
4626
|
+
Pn as ButtonGroup,
|
|
4627
|
+
Ln as Checkbox,
|
|
4628
|
+
We as CloseButton,
|
|
4629
|
+
Bn as ComboBox,
|
|
4630
|
+
Fn as ContextMenu,
|
|
4631
|
+
Zn as CsvTextArea,
|
|
4632
|
+
Vn as Dialog,
|
|
4625
4633
|
ne as DialogClose,
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4634
|
+
Hn as EditButton,
|
|
4635
|
+
On as Hyperlink,
|
|
4636
|
+
Gn as Input,
|
|
4637
|
+
jn as ListGroup,
|
|
4638
|
+
Yn as ListGroupItem,
|
|
4639
|
+
_n as MonthRangePicker,
|
|
4640
|
+
Kn as MultiSelect,
|
|
4641
|
+
dr as NavStackContainer,
|
|
4642
|
+
lr as NavStackProvider,
|
|
4643
|
+
Pt as Notification,
|
|
4644
|
+
er as NotificationContainer,
|
|
4645
|
+
Un as NumberInput,
|
|
4646
|
+
Dn as RefreshButton,
|
|
4647
|
+
qn as Slider,
|
|
4648
|
+
Mt as TabPanel,
|
|
4649
|
+
Xn as TabPanels,
|
|
4650
|
+
Jn as Tabs,
|
|
4651
|
+
Qn as Toggle,
|
|
4652
|
+
Wn as TrashButton,
|
|
4653
|
+
rr as ViewportProvider,
|
|
4646
4654
|
oe as appRegistry,
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4655
|
+
_ as appStateStore,
|
|
4656
|
+
kn as cn,
|
|
4657
|
+
nr as createAppI18nFactory,
|
|
4658
|
+
tr as notificationManager,
|
|
4659
|
+
G as runningAppsStore,
|
|
4660
|
+
Lt as showNotification,
|
|
4661
|
+
Wt as useApp,
|
|
4662
|
+
At as useDialog,
|
|
4663
|
+
cr as useNavStack,
|
|
4664
|
+
ar as useNavView,
|
|
4665
|
+
Ke as useViewport
|
|
4658
4666
|
};
|
|
4659
4667
|
//# sourceMappingURL=index.js.map
|