@orellabs/ui 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +507 -0
- package/dist/index.js +1882 -0
- package/dist/index.js.map +1 -0
- package/package.json +57 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1882 @@
|
|
|
1
|
+
import z, { useState as C, useRef as j, useEffect as T, useCallback as L } from "react";
|
|
2
|
+
import { jsxs as f, jsx as n, Fragment as B } from "react/jsx-runtime";
|
|
3
|
+
const e = {
|
|
4
|
+
// Brand
|
|
5
|
+
black: "#1A1A1A",
|
|
6
|
+
blackHover: "#2A2A2A",
|
|
7
|
+
red: "#D42B2B",
|
|
8
|
+
white: "#FFFFFF",
|
|
9
|
+
// Page & surface
|
|
10
|
+
pageBg: "#F1F1F1",
|
|
11
|
+
cardBg: "#FFFFFF",
|
|
12
|
+
bgSubtle: "#FAFAFA",
|
|
13
|
+
// Text
|
|
14
|
+
textPrimary: "#1A1A1A",
|
|
15
|
+
textSecondary: "#6B7280",
|
|
16
|
+
textTertiary: "#9CA3AF",
|
|
17
|
+
textDark: "#374151",
|
|
18
|
+
textDisabled: "#D1D5DB",
|
|
19
|
+
textInverse: "#FFFFFF",
|
|
20
|
+
// Borders
|
|
21
|
+
border: "#E5E5E5",
|
|
22
|
+
borderLight: "#D1D5DB",
|
|
23
|
+
borderSubtle: "#F3F4F6",
|
|
24
|
+
borderFocus: "#1A1A1A",
|
|
25
|
+
// Semantic — status
|
|
26
|
+
success: "#22C55E",
|
|
27
|
+
successBg: "#F0FDF4",
|
|
28
|
+
successBorder: "#BBF7D0",
|
|
29
|
+
warning: "#F59E0B",
|
|
30
|
+
warningBg: "#FFFBEB",
|
|
31
|
+
warningBorder: "#FDE68A",
|
|
32
|
+
error: "#EF4444",
|
|
33
|
+
errorHover: "#DC2626",
|
|
34
|
+
errorBg: "#FEF2F2",
|
|
35
|
+
errorBorder: "#FECACA",
|
|
36
|
+
info: "#2563EB",
|
|
37
|
+
infoBg: "#EFF6FF",
|
|
38
|
+
infoBorder: "#BFDBFE",
|
|
39
|
+
// Pro badge / neutral chip
|
|
40
|
+
neutralBg: "#F3F4F6",
|
|
41
|
+
neutralText: "#6B7280",
|
|
42
|
+
// Skeleton
|
|
43
|
+
skeletonBase: "#E5E5E5",
|
|
44
|
+
skeletonPulse: "#F1F2F4"
|
|
45
|
+
}, a = {
|
|
46
|
+
0: "0px",
|
|
47
|
+
1: "4px",
|
|
48
|
+
2: "8px",
|
|
49
|
+
3: "12px",
|
|
50
|
+
4: "16px",
|
|
51
|
+
5: "20px",
|
|
52
|
+
6: "24px",
|
|
53
|
+
8: "32px",
|
|
54
|
+
10: "40px",
|
|
55
|
+
12: "48px",
|
|
56
|
+
16: "64px",
|
|
57
|
+
20: "80px"
|
|
58
|
+
}, t = {
|
|
59
|
+
fontFamily: {
|
|
60
|
+
base: "-apple-system, 'Helvetica Neue', sans-serif",
|
|
61
|
+
mono: "'Menlo', 'Monaco', 'Courier New', monospace"
|
|
62
|
+
},
|
|
63
|
+
size: {
|
|
64
|
+
xs: "10px",
|
|
65
|
+
sm: "11px",
|
|
66
|
+
base: "13px",
|
|
67
|
+
md: "14px",
|
|
68
|
+
lg: "16px",
|
|
69
|
+
xl: "20px",
|
|
70
|
+
"2xl": "24px",
|
|
71
|
+
"3xl": "32px"
|
|
72
|
+
},
|
|
73
|
+
weight: {
|
|
74
|
+
normal: 400,
|
|
75
|
+
medium: 500,
|
|
76
|
+
semibold: 600,
|
|
77
|
+
bold: 700,
|
|
78
|
+
extrabold: 800
|
|
79
|
+
},
|
|
80
|
+
lineHeight: {
|
|
81
|
+
tight: 1.2,
|
|
82
|
+
snug: 1.4,
|
|
83
|
+
normal: 1.5,
|
|
84
|
+
relaxed: 1.55,
|
|
85
|
+
loose: 1.75
|
|
86
|
+
},
|
|
87
|
+
letterSpacing: {
|
|
88
|
+
tight: "-0.02em",
|
|
89
|
+
snug: "-0.01em",
|
|
90
|
+
normal: "0em",
|
|
91
|
+
wide: "0.02em"
|
|
92
|
+
}
|
|
93
|
+
}, m = {
|
|
94
|
+
none: "0px",
|
|
95
|
+
xs: "4px",
|
|
96
|
+
sm: "6px",
|
|
97
|
+
md: "8px",
|
|
98
|
+
lg: "10px",
|
|
99
|
+
xl: "12px",
|
|
100
|
+
"2xl": "16px",
|
|
101
|
+
full: "9999px"
|
|
102
|
+
}, I = {
|
|
103
|
+
none: "none",
|
|
104
|
+
sm: "0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04)",
|
|
105
|
+
md: "0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04)",
|
|
106
|
+
lg: "0 20px 60px rgba(0,0,0,0.18)",
|
|
107
|
+
focus: "0 0 0 3px rgba(26, 26, 26, 0.12)"
|
|
108
|
+
}, V = {
|
|
109
|
+
sm: {
|
|
110
|
+
padding: `${a[1]} ${a[3]}`,
|
|
111
|
+
fontSize: t.size.base,
|
|
112
|
+
height: "32px",
|
|
113
|
+
gap: a[1]
|
|
114
|
+
},
|
|
115
|
+
md: {
|
|
116
|
+
padding: `${a[2]} ${a[4]}`,
|
|
117
|
+
fontSize: t.size.md,
|
|
118
|
+
height: "40px",
|
|
119
|
+
gap: a[2]
|
|
120
|
+
},
|
|
121
|
+
lg: {
|
|
122
|
+
padding: `${a[3]} ${a[6]}`,
|
|
123
|
+
fontSize: t.size.md,
|
|
124
|
+
height: "48px",
|
|
125
|
+
gap: a[2]
|
|
126
|
+
}
|
|
127
|
+
}, O = {
|
|
128
|
+
primary: {
|
|
129
|
+
background: e.black,
|
|
130
|
+
color: e.textInverse,
|
|
131
|
+
border: "none",
|
|
132
|
+
hoverBg: e.blackHover
|
|
133
|
+
},
|
|
134
|
+
ghost: {
|
|
135
|
+
background: "transparent",
|
|
136
|
+
color: e.textPrimary,
|
|
137
|
+
border: `1px solid ${e.border}`,
|
|
138
|
+
hoverBg: e.bgSubtle
|
|
139
|
+
},
|
|
140
|
+
danger: {
|
|
141
|
+
background: e.error,
|
|
142
|
+
color: e.textInverse,
|
|
143
|
+
border: "none",
|
|
144
|
+
hoverBg: e.errorHover
|
|
145
|
+
},
|
|
146
|
+
text: {
|
|
147
|
+
background: "transparent",
|
|
148
|
+
color: e.textSecondary,
|
|
149
|
+
border: "none",
|
|
150
|
+
hoverBg: e.bgSubtle
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
function N({
|
|
154
|
+
variant: r,
|
|
155
|
+
size: i,
|
|
156
|
+
loading: o = !1,
|
|
157
|
+
disabled: l = !1,
|
|
158
|
+
fullWidth: s = !1,
|
|
159
|
+
leftIcon: d,
|
|
160
|
+
children: g,
|
|
161
|
+
onClick: u
|
|
162
|
+
}) {
|
|
163
|
+
const p = V[i], c = O[r], y = l || o, h = {
|
|
164
|
+
display: "inline-flex",
|
|
165
|
+
alignItems: "center",
|
|
166
|
+
justifyContent: "center",
|
|
167
|
+
gap: p.gap,
|
|
168
|
+
padding: p.padding,
|
|
169
|
+
fontSize: p.fontSize,
|
|
170
|
+
height: p.height,
|
|
171
|
+
fontFamily: t.fontFamily.base,
|
|
172
|
+
fontWeight: t.weight.semibold,
|
|
173
|
+
lineHeight: t.lineHeight.tight,
|
|
174
|
+
letterSpacing: t.letterSpacing.snug,
|
|
175
|
+
borderRadius: m.md,
|
|
176
|
+
background: c.background,
|
|
177
|
+
color: c.color,
|
|
178
|
+
border: c.border,
|
|
179
|
+
cursor: y ? "not-allowed" : "pointer",
|
|
180
|
+
opacity: y ? 0.5 : 1,
|
|
181
|
+
transition: "background 150ms ease, opacity 150ms ease, box-shadow 150ms ease",
|
|
182
|
+
width: s ? "100%" : void 0,
|
|
183
|
+
boxSizing: "border-box",
|
|
184
|
+
outline: "none"
|
|
185
|
+
};
|
|
186
|
+
return /* @__PURE__ */ f(
|
|
187
|
+
"button",
|
|
188
|
+
{
|
|
189
|
+
style: h,
|
|
190
|
+
onClick: u,
|
|
191
|
+
disabled: y,
|
|
192
|
+
onMouseEnter: (x) => {
|
|
193
|
+
y || (x.currentTarget.style.background = c.hoverBg);
|
|
194
|
+
},
|
|
195
|
+
onMouseLeave: (x) => {
|
|
196
|
+
y || (x.currentTarget.style.background = c.background);
|
|
197
|
+
},
|
|
198
|
+
onFocus: (x) => {
|
|
199
|
+
x.currentTarget.style.boxShadow = I.focus;
|
|
200
|
+
},
|
|
201
|
+
onBlur: (x) => {
|
|
202
|
+
x.currentTarget.style.boxShadow = "none";
|
|
203
|
+
},
|
|
204
|
+
children: [
|
|
205
|
+
o ? /* @__PURE__ */ n(K, {}) : d,
|
|
206
|
+
g
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
let D = !1;
|
|
212
|
+
function U() {
|
|
213
|
+
if (D || typeof document > "u") return;
|
|
214
|
+
const r = document.createElement("style");
|
|
215
|
+
r.textContent = "@keyframes ol-spin { to { transform: rotate(360deg) } }", document.head.appendChild(r), D = !0;
|
|
216
|
+
}
|
|
217
|
+
function K() {
|
|
218
|
+
return U(), /* @__PURE__ */ n(
|
|
219
|
+
"svg",
|
|
220
|
+
{
|
|
221
|
+
width: "16",
|
|
222
|
+
height: "16",
|
|
223
|
+
viewBox: "0 0 16 16",
|
|
224
|
+
fill: "none",
|
|
225
|
+
style: {
|
|
226
|
+
animation: "ol-spin 0.6s linear infinite"
|
|
227
|
+
},
|
|
228
|
+
children: /* @__PURE__ */ n(
|
|
229
|
+
"circle",
|
|
230
|
+
{
|
|
231
|
+
cx: "8",
|
|
232
|
+
cy: "8",
|
|
233
|
+
r: "6",
|
|
234
|
+
stroke: "currentColor",
|
|
235
|
+
strokeWidth: "2",
|
|
236
|
+
strokeLinecap: "round",
|
|
237
|
+
strokeDasharray: "28",
|
|
238
|
+
strokeDashoffset: "20",
|
|
239
|
+
opacity: "0.8"
|
|
240
|
+
}
|
|
241
|
+
)
|
|
242
|
+
}
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
const X = {
|
|
246
|
+
none: "0px",
|
|
247
|
+
sm: a[3],
|
|
248
|
+
md: a[6],
|
|
249
|
+
lg: a[8]
|
|
250
|
+
};
|
|
251
|
+
function ge({
|
|
252
|
+
padding: r = "md",
|
|
253
|
+
noBorder: i = !1,
|
|
254
|
+
shadow: o = !1,
|
|
255
|
+
children: l
|
|
256
|
+
}) {
|
|
257
|
+
const s = {
|
|
258
|
+
background: e.cardBg,
|
|
259
|
+
borderRadius: m.xl,
|
|
260
|
+
padding: X[r],
|
|
261
|
+
border: i ? "none" : `1px solid ${e.border}`,
|
|
262
|
+
boxShadow: o ? I.sm : I.none,
|
|
263
|
+
boxSizing: "border-box"
|
|
264
|
+
};
|
|
265
|
+
return /* @__PURE__ */ n("div", { style: s, children: l });
|
|
266
|
+
}
|
|
267
|
+
const G = {
|
|
268
|
+
success: { bg: e.successBg, color: e.success, dot: e.success },
|
|
269
|
+
warning: { bg: e.warningBg, color: e.warning, dot: e.warning },
|
|
270
|
+
error: { bg: e.errorBg, color: e.error, dot: e.error },
|
|
271
|
+
info: { bg: e.infoBg, color: e.info, dot: e.info },
|
|
272
|
+
neutral: { bg: e.neutralBg, color: e.neutralText, dot: e.textTertiary }
|
|
273
|
+
}, Y = z.memo(function({ tone: i, dot: o = !1, children: l }) {
|
|
274
|
+
const s = G[i], d = {
|
|
275
|
+
display: "inline-flex",
|
|
276
|
+
alignItems: "center",
|
|
277
|
+
gap: a[1],
|
|
278
|
+
padding: `2px ${a[2]}`,
|
|
279
|
+
fontSize: t.size.xs,
|
|
280
|
+
fontWeight: t.weight.semibold,
|
|
281
|
+
fontFamily: t.fontFamily.base,
|
|
282
|
+
lineHeight: t.lineHeight.tight,
|
|
283
|
+
borderRadius: m.xs,
|
|
284
|
+
background: s.bg,
|
|
285
|
+
color: s.color,
|
|
286
|
+
whiteSpace: "nowrap"
|
|
287
|
+
}, g = {
|
|
288
|
+
width: "5px",
|
|
289
|
+
height: "5px",
|
|
290
|
+
borderRadius: m.full,
|
|
291
|
+
background: s.dot,
|
|
292
|
+
flexShrink: 0
|
|
293
|
+
};
|
|
294
|
+
return /* @__PURE__ */ f("span", { style: d, children: [
|
|
295
|
+
o && /* @__PURE__ */ n("span", { style: g }),
|
|
296
|
+
l
|
|
297
|
+
] });
|
|
298
|
+
});
|
|
299
|
+
function ue({ stats: r, cols: i = 4 }) {
|
|
300
|
+
const o = {
|
|
301
|
+
display: "flex",
|
|
302
|
+
border: `1px solid ${e.border}`,
|
|
303
|
+
borderRadius: m.lg,
|
|
304
|
+
overflow: "hidden"
|
|
305
|
+
};
|
|
306
|
+
return /* @__PURE__ */ n("div", { style: o, children: r.map((l, s) => /* @__PURE__ */ n(q, { stat: l, isLast: s === r.length - 1 }, s)) });
|
|
307
|
+
}
|
|
308
|
+
function q({ stat: r, isLast: i }) {
|
|
309
|
+
const o = r.highlight, l = {
|
|
310
|
+
flex: 1,
|
|
311
|
+
padding: `${a[3]} ${a[4]}`,
|
|
312
|
+
textAlign: "center",
|
|
313
|
+
borderRight: i ? void 0 : `1px solid ${e.border}`,
|
|
314
|
+
background: o ? e.black : "transparent"
|
|
315
|
+
}, s = {
|
|
316
|
+
fontSize: t.size.xl,
|
|
317
|
+
fontWeight: t.weight.bold,
|
|
318
|
+
fontFamily: t.fontFamily.base,
|
|
319
|
+
lineHeight: t.lineHeight.tight,
|
|
320
|
+
color: r.color || (o ? e.textInverse : e.textPrimary),
|
|
321
|
+
display: "flex",
|
|
322
|
+
alignItems: "baseline",
|
|
323
|
+
justifyContent: "center",
|
|
324
|
+
gap: a[1],
|
|
325
|
+
margin: 0
|
|
326
|
+
}, d = {
|
|
327
|
+
fontSize: t.size.sm,
|
|
328
|
+
fontWeight: t.weight.medium,
|
|
329
|
+
color: e.textTertiary
|
|
330
|
+
}, g = {
|
|
331
|
+
fontSize: t.size.sm,
|
|
332
|
+
fontFamily: t.fontFamily.base,
|
|
333
|
+
color: e.textTertiary,
|
|
334
|
+
marginTop: "2px"
|
|
335
|
+
}, u = {
|
|
336
|
+
fontSize: t.size.xs,
|
|
337
|
+
color: e.textTertiary,
|
|
338
|
+
fontFamily: t.fontFamily.base,
|
|
339
|
+
marginTop: "4px"
|
|
340
|
+
};
|
|
341
|
+
return /* @__PURE__ */ f("div", { style: l, children: [
|
|
342
|
+
/* @__PURE__ */ f("p", { style: s, children: [
|
|
343
|
+
r.value,
|
|
344
|
+
r.unit && /* @__PURE__ */ n("span", { style: d, children: r.unit })
|
|
345
|
+
] }),
|
|
346
|
+
/* @__PURE__ */ n("div", { style: g, children: r.label }),
|
|
347
|
+
r.sub && /* @__PURE__ */ n("div", { style: u, children: r.sub })
|
|
348
|
+
] });
|
|
349
|
+
}
|
|
350
|
+
const fe = z.memo(function({ children: i, action: o }) {
|
|
351
|
+
const l = {
|
|
352
|
+
display: "flex",
|
|
353
|
+
alignItems: "center",
|
|
354
|
+
justifyContent: "space-between",
|
|
355
|
+
marginBottom: a[2]
|
|
356
|
+
}, s = {
|
|
357
|
+
fontSize: t.size.sm,
|
|
358
|
+
fontWeight: t.weight.medium,
|
|
359
|
+
fontFamily: t.fontFamily.base,
|
|
360
|
+
color: e.textSecondary,
|
|
361
|
+
margin: 0
|
|
362
|
+
};
|
|
363
|
+
return /* @__PURE__ */ f("div", { style: l, children: [
|
|
364
|
+
/* @__PURE__ */ n("p", { style: s, children: i }),
|
|
365
|
+
o && /* @__PURE__ */ n("div", { children: o })
|
|
366
|
+
] });
|
|
367
|
+
});
|
|
368
|
+
function pe({ tabs: r, active: i, onChange: o, size: l = "md" }) {
|
|
369
|
+
const s = {
|
|
370
|
+
display: "inline-flex",
|
|
371
|
+
alignItems: "center",
|
|
372
|
+
gap: a[1],
|
|
373
|
+
fontFamily: t.fontFamily.base
|
|
374
|
+
}, d = l === "sm" ? t.size.base : t.size.md, g = l === "sm" ? a[1] : a[2], u = l === "sm" ? a[3] : a[4];
|
|
375
|
+
return /* @__PURE__ */ n("div", { style: s, role: "tablist", children: r.map((p) => {
|
|
376
|
+
const c = p.id === i, y = {
|
|
377
|
+
padding: `${g} ${u}`,
|
|
378
|
+
fontSize: d,
|
|
379
|
+
fontWeight: c ? t.weight.semibold : t.weight.normal,
|
|
380
|
+
fontFamily: t.fontFamily.base,
|
|
381
|
+
color: c ? e.textInverse : e.textSecondary,
|
|
382
|
+
background: c ? e.black : "transparent",
|
|
383
|
+
border: "none",
|
|
384
|
+
borderRadius: m.full,
|
|
385
|
+
cursor: "pointer",
|
|
386
|
+
display: "flex",
|
|
387
|
+
alignItems: "center",
|
|
388
|
+
gap: a[2],
|
|
389
|
+
transition: "background 150ms ease, color 150ms ease",
|
|
390
|
+
whiteSpace: "nowrap"
|
|
391
|
+
}, h = {
|
|
392
|
+
fontSize: t.size.xs,
|
|
393
|
+
fontWeight: t.weight.semibold,
|
|
394
|
+
background: c ? "rgba(255,255,255,0.2)" : e.neutralBg,
|
|
395
|
+
color: c ? e.textInverse : e.textSecondary,
|
|
396
|
+
borderRadius: m.full,
|
|
397
|
+
padding: `0 ${a[2]}`,
|
|
398
|
+
minWidth: "20px",
|
|
399
|
+
textAlign: "center",
|
|
400
|
+
lineHeight: "20px"
|
|
401
|
+
};
|
|
402
|
+
return /* @__PURE__ */ f(
|
|
403
|
+
"button",
|
|
404
|
+
{
|
|
405
|
+
style: y,
|
|
406
|
+
role: "tab",
|
|
407
|
+
"aria-selected": c,
|
|
408
|
+
onClick: () => !c && o(p.id),
|
|
409
|
+
onMouseEnter: (x) => {
|
|
410
|
+
c || (x.currentTarget.style.background = e.neutralBg, x.currentTarget.style.color = e.textPrimary);
|
|
411
|
+
},
|
|
412
|
+
onMouseLeave: (x) => {
|
|
413
|
+
c || (x.currentTarget.style.background = "transparent", x.currentTarget.style.color = e.textSecondary);
|
|
414
|
+
},
|
|
415
|
+
children: [
|
|
416
|
+
p.label,
|
|
417
|
+
p.badge !== void 0 && /* @__PURE__ */ n("span", { style: h, children: p.badge })
|
|
418
|
+
]
|
|
419
|
+
},
|
|
420
|
+
p.id
|
|
421
|
+
);
|
|
422
|
+
}) });
|
|
423
|
+
}
|
|
424
|
+
function ye({
|
|
425
|
+
columns: r,
|
|
426
|
+
rows: i,
|
|
427
|
+
loading: o = !1,
|
|
428
|
+
emptyState: l,
|
|
429
|
+
onRowClick: s
|
|
430
|
+
}) {
|
|
431
|
+
const d = {
|
|
432
|
+
width: "100%",
|
|
433
|
+
borderCollapse: "collapse",
|
|
434
|
+
fontFamily: t.fontFamily.base,
|
|
435
|
+
fontSize: t.size.base
|
|
436
|
+
}, g = (c) => ({
|
|
437
|
+
textAlign: c.align || "left",
|
|
438
|
+
padding: `${a[3]} ${a[4]}`,
|
|
439
|
+
fontSize: t.size.sm,
|
|
440
|
+
fontWeight: t.weight.medium,
|
|
441
|
+
color: e.textTertiary,
|
|
442
|
+
borderBottom: `1px solid ${e.border}`,
|
|
443
|
+
width: c.width,
|
|
444
|
+
whiteSpace: "nowrap"
|
|
445
|
+
}), u = (c) => ({
|
|
446
|
+
textAlign: c.align || "left",
|
|
447
|
+
padding: `${a[3]} ${a[4]}`,
|
|
448
|
+
fontSize: t.size.base,
|
|
449
|
+
color: e.textPrimary,
|
|
450
|
+
borderBottom: `1px solid ${e.borderSubtle}`,
|
|
451
|
+
verticalAlign: "middle",
|
|
452
|
+
lineHeight: t.lineHeight.snug
|
|
453
|
+
}), p = {
|
|
454
|
+
cursor: s ? "pointer" : "default",
|
|
455
|
+
transition: "background 100ms ease"
|
|
456
|
+
};
|
|
457
|
+
return o ? /* @__PURE__ */ n("div", { style: { padding: a[8], textAlign: "center" }, children: /* @__PURE__ */ n("p", { style: { color: e.textTertiary, fontSize: t.size.base }, children: "Loading..." }) }) : i.length === 0 ? l ? /* @__PURE__ */ n(B, { children: l }) : /* @__PURE__ */ n("div", { style: { padding: a[8], textAlign: "center" }, children: /* @__PURE__ */ n("p", { style: { color: e.textTertiary, fontSize: t.size.base }, children: "No data" }) }) : /* @__PURE__ */ n("div", { style: { overflowX: "auto", borderRadius: m.md }, children: /* @__PURE__ */ f("table", { style: d, children: [
|
|
458
|
+
/* @__PURE__ */ n("thead", { children: /* @__PURE__ */ n("tr", { children: r.map((c) => /* @__PURE__ */ n("th", { style: g(c), children: c.header }, String(c.key))) }) }),
|
|
459
|
+
/* @__PURE__ */ n("tbody", { children: i.map((c, y) => /* @__PURE__ */ n(
|
|
460
|
+
"tr",
|
|
461
|
+
{
|
|
462
|
+
style: p,
|
|
463
|
+
onClick: () => s == null ? void 0 : s(c),
|
|
464
|
+
onMouseEnter: (h) => {
|
|
465
|
+
h.currentTarget.style.background = e.bgSubtle;
|
|
466
|
+
},
|
|
467
|
+
onMouseLeave: (h) => {
|
|
468
|
+
h.currentTarget.style.background = "transparent";
|
|
469
|
+
},
|
|
470
|
+
children: r.map((h) => /* @__PURE__ */ n("td", { style: u(h), children: h.render ? h.render(c) : String(c[h.key] ?? "") }, String(h.key)))
|
|
471
|
+
},
|
|
472
|
+
y
|
|
473
|
+
)) })
|
|
474
|
+
] }) });
|
|
475
|
+
}
|
|
476
|
+
function he({
|
|
477
|
+
label: r,
|
|
478
|
+
hint: i,
|
|
479
|
+
error: o,
|
|
480
|
+
prefix: l,
|
|
481
|
+
suffix: s,
|
|
482
|
+
type: d = "text",
|
|
483
|
+
placeholder: g,
|
|
484
|
+
disabled: u = !1,
|
|
485
|
+
value: p,
|
|
486
|
+
onChange: c
|
|
487
|
+
}) {
|
|
488
|
+
const y = !!o, h = {
|
|
489
|
+
display: "flex",
|
|
490
|
+
flexDirection: "column",
|
|
491
|
+
gap: a[1],
|
|
492
|
+
fontFamily: t.fontFamily.base
|
|
493
|
+
}, x = {
|
|
494
|
+
fontSize: t.size.base,
|
|
495
|
+
fontWeight: t.weight.medium,
|
|
496
|
+
color: e.textPrimary,
|
|
497
|
+
margin: 0
|
|
498
|
+
}, w = {
|
|
499
|
+
display: "flex",
|
|
500
|
+
alignItems: "center",
|
|
501
|
+
gap: a[2],
|
|
502
|
+
padding: `${a[2]} ${a[3]}`,
|
|
503
|
+
background: u ? e.bgSubtle : e.cardBg,
|
|
504
|
+
border: `1px solid ${y ? e.error : e.border}`,
|
|
505
|
+
borderRadius: m.md,
|
|
506
|
+
transition: "border-color 150ms ease, box-shadow 150ms ease",
|
|
507
|
+
cursor: u ? "not-allowed" : "text"
|
|
508
|
+
}, b = {
|
|
509
|
+
flex: 1,
|
|
510
|
+
border: "none",
|
|
511
|
+
outline: "none",
|
|
512
|
+
background: "transparent",
|
|
513
|
+
fontSize: t.size.md,
|
|
514
|
+
fontFamily: t.fontFamily.base,
|
|
515
|
+
color: u ? e.textDisabled : e.textPrimary,
|
|
516
|
+
cursor: u ? "not-allowed" : "text",
|
|
517
|
+
padding: 0,
|
|
518
|
+
width: "100%"
|
|
519
|
+
}, S = {
|
|
520
|
+
fontSize: t.size.sm,
|
|
521
|
+
color: y ? e.error : e.textTertiary,
|
|
522
|
+
margin: 0
|
|
523
|
+
}, k = {
|
|
524
|
+
fontSize: t.size.base,
|
|
525
|
+
color: e.textTertiary,
|
|
526
|
+
flexShrink: 0
|
|
527
|
+
};
|
|
528
|
+
return /* @__PURE__ */ f("div", { style: h, children: [
|
|
529
|
+
r && /* @__PURE__ */ n("p", { style: x, children: r }),
|
|
530
|
+
/* @__PURE__ */ f(
|
|
531
|
+
"div",
|
|
532
|
+
{
|
|
533
|
+
style: w,
|
|
534
|
+
onFocusCapture: (F) => {
|
|
535
|
+
const M = F.currentTarget;
|
|
536
|
+
M.style.borderColor = y ? e.error : e.borderFocus, M.style.boxShadow = I.focus;
|
|
537
|
+
},
|
|
538
|
+
onBlurCapture: (F) => {
|
|
539
|
+
const M = F.currentTarget;
|
|
540
|
+
M.style.borderColor = y ? e.error : e.border, M.style.boxShadow = "none";
|
|
541
|
+
},
|
|
542
|
+
children: [
|
|
543
|
+
l && /* @__PURE__ */ n("span", { style: k, children: l }),
|
|
544
|
+
/* @__PURE__ */ n(
|
|
545
|
+
"input",
|
|
546
|
+
{
|
|
547
|
+
type: d,
|
|
548
|
+
value: p,
|
|
549
|
+
onChange: (F) => c(F.target.value),
|
|
550
|
+
placeholder: g,
|
|
551
|
+
disabled: u,
|
|
552
|
+
"aria-invalid": y,
|
|
553
|
+
style: b
|
|
554
|
+
}
|
|
555
|
+
),
|
|
556
|
+
s && /* @__PURE__ */ n("span", { style: k, children: s })
|
|
557
|
+
]
|
|
558
|
+
}
|
|
559
|
+
),
|
|
560
|
+
(o || i) && /* @__PURE__ */ n("p", { style: S, children: o || i })
|
|
561
|
+
] });
|
|
562
|
+
}
|
|
563
|
+
function J(r) {
|
|
564
|
+
return r >= 75 ? e.success : r >= 50 ? e.warning : e.error;
|
|
565
|
+
}
|
|
566
|
+
function _(r) {
|
|
567
|
+
return r >= 75 ? e.successBg : r >= 50 ? e.warningBg : e.errorBg;
|
|
568
|
+
}
|
|
569
|
+
const me = z.memo(function({
|
|
570
|
+
score: i,
|
|
571
|
+
max: o = 100,
|
|
572
|
+
width: l = "100%",
|
|
573
|
+
showLabel: s = !0,
|
|
574
|
+
size: d = "md"
|
|
575
|
+
}) {
|
|
576
|
+
const g = Math.min(Math.max(i / o * 100, 0), 100), u = J(g), p = _(g), c = d === "sm" ? "6px" : "8px", y = {
|
|
577
|
+
display: "flex",
|
|
578
|
+
alignItems: "center",
|
|
579
|
+
gap: a[3],
|
|
580
|
+
width: l,
|
|
581
|
+
fontFamily: t.fontFamily.base
|
|
582
|
+
}, h = {
|
|
583
|
+
flex: 1,
|
|
584
|
+
height: c,
|
|
585
|
+
background: p,
|
|
586
|
+
borderRadius: m.full,
|
|
587
|
+
overflow: "hidden"
|
|
588
|
+
}, x = {
|
|
589
|
+
height: "100%",
|
|
590
|
+
width: `${g}%`,
|
|
591
|
+
background: u,
|
|
592
|
+
borderRadius: m.full,
|
|
593
|
+
transition: "width 400ms ease"
|
|
594
|
+
}, w = {
|
|
595
|
+
fontSize: d === "sm" ? t.size.xs : t.size.sm,
|
|
596
|
+
fontWeight: t.weight.semibold,
|
|
597
|
+
color: u,
|
|
598
|
+
minWidth: "36px",
|
|
599
|
+
textAlign: "right"
|
|
600
|
+
};
|
|
601
|
+
return /* @__PURE__ */ f("div", { style: y, children: [
|
|
602
|
+
/* @__PURE__ */ n("div", { style: h, children: /* @__PURE__ */ n("div", { style: x }) }),
|
|
603
|
+
s && /* @__PURE__ */ f("span", { style: w, children: [
|
|
604
|
+
Math.round(g),
|
|
605
|
+
"%"
|
|
606
|
+
] })
|
|
607
|
+
] });
|
|
608
|
+
}), W = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
609
|
+
function xe({
|
|
610
|
+
open: r,
|
|
611
|
+
onClose: i,
|
|
612
|
+
children: o,
|
|
613
|
+
maxWidth: l = 400,
|
|
614
|
+
title: s
|
|
615
|
+
}) {
|
|
616
|
+
const [d, g] = C(!1), u = j(null), p = z.useId();
|
|
617
|
+
if (T(() => {
|
|
618
|
+
if (!r) {
|
|
619
|
+
g(!1);
|
|
620
|
+
return;
|
|
621
|
+
}
|
|
622
|
+
const y = requestAnimationFrame(() => g(!0));
|
|
623
|
+
return () => cancelAnimationFrame(y);
|
|
624
|
+
}, [r]), T(() => {
|
|
625
|
+
if (!r) return;
|
|
626
|
+
const y = (h) => {
|
|
627
|
+
h.key === "Escape" && i();
|
|
628
|
+
};
|
|
629
|
+
return document.addEventListener("keydown", y), () => document.removeEventListener("keydown", y);
|
|
630
|
+
}, [r, i]), T(() => {
|
|
631
|
+
if (!r || !u.current) return;
|
|
632
|
+
const y = u.current, h = document.activeElement, x = y.querySelector(W);
|
|
633
|
+
x ? x.focus() : y.focus();
|
|
634
|
+
const w = (b) => {
|
|
635
|
+
if (b.key !== "Tab") return;
|
|
636
|
+
const S = y.querySelectorAll(W);
|
|
637
|
+
if (S.length === 0) return;
|
|
638
|
+
const k = S[0], F = S[S.length - 1];
|
|
639
|
+
b.shiftKey ? document.activeElement === k && (b.preventDefault(), F.focus()) : document.activeElement === F && (b.preventDefault(), k.focus());
|
|
640
|
+
};
|
|
641
|
+
return document.addEventListener("keydown", w), () => {
|
|
642
|
+
document.removeEventListener("keydown", w), h == null || h.focus();
|
|
643
|
+
};
|
|
644
|
+
}, [r]), !r) return null;
|
|
645
|
+
const c = /* @__PURE__ */ n(
|
|
646
|
+
"button",
|
|
647
|
+
{
|
|
648
|
+
onClick: i,
|
|
649
|
+
onMouseEnter: (y) => {
|
|
650
|
+
y.currentTarget.style.background = e.pageBg;
|
|
651
|
+
},
|
|
652
|
+
onMouseLeave: (y) => {
|
|
653
|
+
y.currentTarget.style.background = "transparent";
|
|
654
|
+
},
|
|
655
|
+
style: {
|
|
656
|
+
width: "28px",
|
|
657
|
+
height: "28px",
|
|
658
|
+
borderRadius: m.sm,
|
|
659
|
+
border: "none",
|
|
660
|
+
background: "transparent",
|
|
661
|
+
color: e.textTertiary,
|
|
662
|
+
cursor: "pointer",
|
|
663
|
+
display: "flex",
|
|
664
|
+
alignItems: "center",
|
|
665
|
+
justifyContent: "center",
|
|
666
|
+
flexShrink: 0
|
|
667
|
+
},
|
|
668
|
+
"aria-label": "Close",
|
|
669
|
+
children: /* @__PURE__ */ n("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ n(
|
|
670
|
+
"path",
|
|
671
|
+
{
|
|
672
|
+
d: "M1 1l10 10M11 1L1 11",
|
|
673
|
+
stroke: "currentColor",
|
|
674
|
+
strokeWidth: "1.5",
|
|
675
|
+
strokeLinecap: "round"
|
|
676
|
+
}
|
|
677
|
+
) })
|
|
678
|
+
}
|
|
679
|
+
);
|
|
680
|
+
return /* @__PURE__ */ n(
|
|
681
|
+
"div",
|
|
682
|
+
{
|
|
683
|
+
role: "presentation",
|
|
684
|
+
onClick: i,
|
|
685
|
+
style: {
|
|
686
|
+
position: "fixed",
|
|
687
|
+
inset: 0,
|
|
688
|
+
background: "rgba(0,0,0,0.32)",
|
|
689
|
+
display: "flex",
|
|
690
|
+
alignItems: "center",
|
|
691
|
+
justifyContent: "center",
|
|
692
|
+
zIndex: 100,
|
|
693
|
+
padding: a[4]
|
|
694
|
+
},
|
|
695
|
+
children: /* @__PURE__ */ n(
|
|
696
|
+
"div",
|
|
697
|
+
{
|
|
698
|
+
ref: u,
|
|
699
|
+
role: "dialog",
|
|
700
|
+
"aria-modal": "true",
|
|
701
|
+
"aria-labelledby": s ? p : void 0,
|
|
702
|
+
tabIndex: -1,
|
|
703
|
+
onClick: (y) => y.stopPropagation(),
|
|
704
|
+
onKeyDown: (y) => y.stopPropagation(),
|
|
705
|
+
style: {
|
|
706
|
+
background: e.cardBg,
|
|
707
|
+
borderRadius: m["2xl"],
|
|
708
|
+
width: "100%",
|
|
709
|
+
maxWidth: l,
|
|
710
|
+
boxShadow: I.lg,
|
|
711
|
+
opacity: d ? 1 : 0,
|
|
712
|
+
transform: d ? "none" : "translateY(10px) scale(0.97)",
|
|
713
|
+
transition: "opacity 0.18s ease, transform 0.18s ease",
|
|
714
|
+
outline: "none",
|
|
715
|
+
...s ? {
|
|
716
|
+
display: "flex",
|
|
717
|
+
flexDirection: "column",
|
|
718
|
+
maxHeight: "calc(100vh - 32px)",
|
|
719
|
+
overflow: "hidden"
|
|
720
|
+
} : {
|
|
721
|
+
padding: "28px 24px 24px",
|
|
722
|
+
position: "relative"
|
|
723
|
+
}
|
|
724
|
+
},
|
|
725
|
+
children: s ? /* @__PURE__ */ f(B, { children: [
|
|
726
|
+
/* @__PURE__ */ f(
|
|
727
|
+
"div",
|
|
728
|
+
{
|
|
729
|
+
style: {
|
|
730
|
+
display: "flex",
|
|
731
|
+
alignItems: "center",
|
|
732
|
+
justifyContent: "space-between",
|
|
733
|
+
padding: `${a[4]} ${a[5]}`,
|
|
734
|
+
borderBottom: `1px solid ${e.border}`,
|
|
735
|
+
flexShrink: 0
|
|
736
|
+
},
|
|
737
|
+
children: [
|
|
738
|
+
/* @__PURE__ */ n(
|
|
739
|
+
"span",
|
|
740
|
+
{
|
|
741
|
+
id: p,
|
|
742
|
+
style: {
|
|
743
|
+
fontWeight: t.weight.bold,
|
|
744
|
+
fontSize: t.size.base,
|
|
745
|
+
fontFamily: t.fontFamily.base,
|
|
746
|
+
color: e.textPrimary
|
|
747
|
+
},
|
|
748
|
+
children: s
|
|
749
|
+
}
|
|
750
|
+
),
|
|
751
|
+
c
|
|
752
|
+
]
|
|
753
|
+
}
|
|
754
|
+
),
|
|
755
|
+
/* @__PURE__ */ n("div", { style: { overflowY: "auto", flex: 1 }, children: o })
|
|
756
|
+
] }) : /* @__PURE__ */ f(B, { children: [
|
|
757
|
+
/* @__PURE__ */ n("div", { style: { position: "absolute", top: "14px", right: "14px" }, children: c }),
|
|
758
|
+
o
|
|
759
|
+
] })
|
|
760
|
+
}
|
|
761
|
+
)
|
|
762
|
+
}
|
|
763
|
+
);
|
|
764
|
+
}
|
|
765
|
+
function be({
|
|
766
|
+
options: r,
|
|
767
|
+
value: i,
|
|
768
|
+
onChange: o,
|
|
769
|
+
fullWidth: l = !1
|
|
770
|
+
}) {
|
|
771
|
+
const s = {
|
|
772
|
+
display: "inline-flex",
|
|
773
|
+
border: `1px solid ${e.border}`,
|
|
774
|
+
borderRadius: m.md,
|
|
775
|
+
overflow: "hidden",
|
|
776
|
+
fontFamily: t.fontFamily.base,
|
|
777
|
+
width: l ? "100%" : void 0
|
|
778
|
+
};
|
|
779
|
+
return /* @__PURE__ */ n("div", { style: s, role: "radiogroup", children: r.map((d, g) => {
|
|
780
|
+
const u = d.value === i, p = {
|
|
781
|
+
flex: l ? 1 : void 0,
|
|
782
|
+
padding: `${a[2]} ${a[4]}`,
|
|
783
|
+
fontSize: t.size.md,
|
|
784
|
+
fontWeight: u ? t.weight.semibold : t.weight.normal,
|
|
785
|
+
fontFamily: t.fontFamily.base,
|
|
786
|
+
color: u ? e.textInverse : e.textPrimary,
|
|
787
|
+
background: u ? e.black : e.cardBg,
|
|
788
|
+
border: "none",
|
|
789
|
+
borderRight: g < r.length - 1 ? `1px solid ${e.border}` : "none",
|
|
790
|
+
cursor: "pointer",
|
|
791
|
+
transition: "background 150ms ease, color 150ms ease",
|
|
792
|
+
textAlign: "center",
|
|
793
|
+
whiteSpace: "nowrap"
|
|
794
|
+
};
|
|
795
|
+
return /* @__PURE__ */ n(
|
|
796
|
+
"button",
|
|
797
|
+
{
|
|
798
|
+
style: p,
|
|
799
|
+
role: "radio",
|
|
800
|
+
"aria-checked": u,
|
|
801
|
+
onClick: () => o(d.value),
|
|
802
|
+
onMouseEnter: (c) => {
|
|
803
|
+
u || (c.currentTarget.style.background = e.bgSubtle);
|
|
804
|
+
},
|
|
805
|
+
onMouseLeave: (c) => {
|
|
806
|
+
u || (c.currentTarget.style.background = e.cardBg);
|
|
807
|
+
},
|
|
808
|
+
children: d.label
|
|
809
|
+
},
|
|
810
|
+
d.value
|
|
811
|
+
);
|
|
812
|
+
}) });
|
|
813
|
+
}
|
|
814
|
+
function v(r, i = "0 0 24 24") {
|
|
815
|
+
return function({ size: l = 20, filled: s, className: d, style: g, ...u }) {
|
|
816
|
+
return /* @__PURE__ */ n(
|
|
817
|
+
"svg",
|
|
818
|
+
{
|
|
819
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
820
|
+
width: l,
|
|
821
|
+
height: l,
|
|
822
|
+
viewBox: i,
|
|
823
|
+
fill: s ? "currentColor" : "none",
|
|
824
|
+
stroke: "currentColor",
|
|
825
|
+
strokeWidth: "1.5",
|
|
826
|
+
strokeLinecap: "round",
|
|
827
|
+
strokeLinejoin: "round",
|
|
828
|
+
className: d,
|
|
829
|
+
style: { flexShrink: 0, ...g },
|
|
830
|
+
...u,
|
|
831
|
+
children: typeof r == "string" ? /* @__PURE__ */ n("path", { d: r }) : r
|
|
832
|
+
}
|
|
833
|
+
);
|
|
834
|
+
};
|
|
835
|
+
}
|
|
836
|
+
const Q = v(
|
|
837
|
+
/* @__PURE__ */ f(B, { children: [
|
|
838
|
+
/* @__PURE__ */ n("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }),
|
|
839
|
+
/* @__PURE__ */ n("path", { d: "M7 11V7a5 5 0 0110 0v4" })
|
|
840
|
+
] })
|
|
841
|
+
), Se = v(
|
|
842
|
+
/* @__PURE__ */ f(B, { children: [
|
|
843
|
+
/* @__PURE__ */ n("circle", { cx: "11", cy: "11", r: "8" }),
|
|
844
|
+
/* @__PURE__ */ n("path", { d: "M21 21l-4.35-4.35" })
|
|
845
|
+
] })
|
|
846
|
+
), Z = v("M20 6L9 17l-5-5"), ee = v("M18 6L6 18M6 6l12 12"), we = v("M3 12h18M3 6h18M3 18h18"), A = v(
|
|
847
|
+
/* @__PURE__ */ f(B, { children: [
|
|
848
|
+
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10" }),
|
|
849
|
+
/* @__PURE__ */ n("path", { d: "M12 16v-4M12 8h.01" })
|
|
850
|
+
] })
|
|
851
|
+
), te = v(
|
|
852
|
+
/* @__PURE__ */ f(B, { children: [
|
|
853
|
+
/* @__PURE__ */ n("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }),
|
|
854
|
+
/* @__PURE__ */ n("path", { d: "M12 9v4M12 17h.01" })
|
|
855
|
+
] })
|
|
856
|
+
), ve = v("M5 3l14 9-14 9V3z"), ke = v(
|
|
857
|
+
"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"
|
|
858
|
+
), Fe = v(
|
|
859
|
+
/* @__PURE__ */ f(B, { children: [
|
|
860
|
+
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "3" }),
|
|
861
|
+
/* @__PURE__ */ n("path", { d: "M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-2 2 2 2 0 01-2-2v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83 0 2 2 0 010-2.83l.06-.06a1.65 1.65 0 00.33-1.82 1.65 1.65 0 00-1.51-1H3a2 2 0 01-2-2 2 2 0 012-2h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 010-2.83 2 2 0 012.83 0l.06.06a1.65 1.65 0 001.82.33H9a1.65 1.65 0 001-1.51V3a2 2 0 012-2 2 2 0 012 2v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 0 2 2 0 010 2.83l-.06.06a1.65 1.65 0 00-.33 1.82V9a1.65 1.65 0 001.51 1H21a2 2 0 012 2 2 2 0 01-2 2h-.09a1.65 1.65 0 00-1.51 1z" })
|
|
862
|
+
] })
|
|
863
|
+
), ze = v("M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M17 8l-5-5-5 5M12 3v12"), Ce = v("M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M7 10l5 5 5-5M12 15V3"), Ie = v("M5 12h14M12 5l7 7-7 7"), Be = v("M19 12H5M12 19l-7-7 7-7"), Me = v("M12 19V5M5 12l7-7 7 7"), Te = v("M12 5v14M19 12l-7 7-7-7"), $e = v("M9 18l6-6-6-6"), Le = v("M15 18l-6-6 6-6"), De = v("M18 15l-6-6-6 6"), We = v("M6 9l6 6 6-6");
|
|
864
|
+
function Ae({
|
|
865
|
+
checked: r,
|
|
866
|
+
onChange: i,
|
|
867
|
+
label: o,
|
|
868
|
+
sublabel: l,
|
|
869
|
+
disabled: s = !1,
|
|
870
|
+
locked: d = !1,
|
|
871
|
+
badge: g,
|
|
872
|
+
right: u
|
|
873
|
+
}) {
|
|
874
|
+
const p = !s && !d, c = {
|
|
875
|
+
display: "flex",
|
|
876
|
+
alignItems: "center",
|
|
877
|
+
gap: a[3],
|
|
878
|
+
padding: `${a[3]} ${a[4]}`,
|
|
879
|
+
background: r ? e.black : e.cardBg,
|
|
880
|
+
border: `1px solid ${r ? e.black : e.border}`,
|
|
881
|
+
borderRadius: m.lg,
|
|
882
|
+
cursor: p ? "pointer" : "default",
|
|
883
|
+
opacity: s ? 0.5 : 1,
|
|
884
|
+
transition: "background 150ms ease, border-color 150ms ease",
|
|
885
|
+
fontFamily: t.fontFamily.base
|
|
886
|
+
}, y = {
|
|
887
|
+
width: "8px",
|
|
888
|
+
height: "8px",
|
|
889
|
+
borderRadius: m.full,
|
|
890
|
+
background: r ? e.error : e.textTertiary,
|
|
891
|
+
flexShrink: 0
|
|
892
|
+
}, h = {
|
|
893
|
+
flex: 1,
|
|
894
|
+
display: "flex",
|
|
895
|
+
flexDirection: "column",
|
|
896
|
+
gap: "2px"
|
|
897
|
+
}, x = {
|
|
898
|
+
fontSize: t.size.md,
|
|
899
|
+
fontWeight: t.weight.semibold,
|
|
900
|
+
color: r ? e.textInverse : e.textPrimary,
|
|
901
|
+
lineHeight: t.lineHeight.tight
|
|
902
|
+
}, w = {
|
|
903
|
+
fontSize: t.size.sm,
|
|
904
|
+
color: r ? e.textTertiary : e.textSecondary,
|
|
905
|
+
lineHeight: t.lineHeight.tight
|
|
906
|
+
}, b = {
|
|
907
|
+
width: "20px",
|
|
908
|
+
height: "20px",
|
|
909
|
+
borderRadius: m.xs,
|
|
910
|
+
border: r ? "none" : `1.5px solid ${e.borderLight}`,
|
|
911
|
+
background: r ? e.error : "transparent",
|
|
912
|
+
display: "flex",
|
|
913
|
+
alignItems: "center",
|
|
914
|
+
justifyContent: "center",
|
|
915
|
+
flexShrink: 0,
|
|
916
|
+
transition: "background 150ms ease, border-color 150ms ease"
|
|
917
|
+
};
|
|
918
|
+
return /* @__PURE__ */ f(
|
|
919
|
+
"div",
|
|
920
|
+
{
|
|
921
|
+
style: c,
|
|
922
|
+
role: "checkbox",
|
|
923
|
+
"aria-checked": r,
|
|
924
|
+
tabIndex: p ? 0 : -1,
|
|
925
|
+
onClick: () => p && i(!r),
|
|
926
|
+
onKeyDown: (S) => {
|
|
927
|
+
(S.key === " " || S.key === "Enter") && (S.preventDefault(), p && i(!r));
|
|
928
|
+
},
|
|
929
|
+
onMouseEnter: (S) => {
|
|
930
|
+
p && !r && (S.currentTarget.style.borderColor = e.borderLight);
|
|
931
|
+
},
|
|
932
|
+
onMouseLeave: (S) => {
|
|
933
|
+
p && !r && (S.currentTarget.style.borderColor = e.border);
|
|
934
|
+
},
|
|
935
|
+
children: [
|
|
936
|
+
/* @__PURE__ */ n("span", { style: y }),
|
|
937
|
+
/* @__PURE__ */ f("div", { style: h, children: [
|
|
938
|
+
/* @__PURE__ */ n("span", { style: x, children: o }),
|
|
939
|
+
l && /* @__PURE__ */ n("span", { style: w, children: l })
|
|
940
|
+
] }),
|
|
941
|
+
g && /* @__PURE__ */ n("div", { children: g }),
|
|
942
|
+
u && /* @__PURE__ */ n("div", { children: u }),
|
|
943
|
+
d ? /* @__PURE__ */ n(Q, { size: 16, style: { color: e.textTertiary } }) : /* @__PURE__ */ n("div", { style: b, children: r && /* @__PURE__ */ n("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ n(
|
|
944
|
+
"path",
|
|
945
|
+
{
|
|
946
|
+
d: "M2.5 6l2.5 2.5 4.5-4.5",
|
|
947
|
+
stroke: e.textInverse,
|
|
948
|
+
strokeWidth: "1.5",
|
|
949
|
+
strokeLinecap: "round",
|
|
950
|
+
strokeLinejoin: "round"
|
|
951
|
+
}
|
|
952
|
+
) }) })
|
|
953
|
+
]
|
|
954
|
+
}
|
|
955
|
+
);
|
|
956
|
+
}
|
|
957
|
+
const ne = {
|
|
958
|
+
success: e.success,
|
|
959
|
+
warning: e.warning,
|
|
960
|
+
error: e.error,
|
|
961
|
+
info: e.info,
|
|
962
|
+
neutral: e.textTertiary
|
|
963
|
+
};
|
|
964
|
+
let R = !1;
|
|
965
|
+
function re() {
|
|
966
|
+
if (R || typeof document > "u") return;
|
|
967
|
+
const r = document.createElement("style");
|
|
968
|
+
r.textContent = "@keyframes ol-pulse { 0%, 100% { opacity: 1 } 50% { opacity: 0.4 } }", document.head.appendChild(r), R = !0;
|
|
969
|
+
}
|
|
970
|
+
const Re = z.memo(function({ tone: i, size: o = "md", pulse: l = !1 }) {
|
|
971
|
+
l && re();
|
|
972
|
+
const s = o === "sm" ? "6px" : "8px", d = {
|
|
973
|
+
width: s,
|
|
974
|
+
height: s,
|
|
975
|
+
borderRadius: m.full,
|
|
976
|
+
backgroundColor: ne[i],
|
|
977
|
+
display: "inline-block",
|
|
978
|
+
flexShrink: 0,
|
|
979
|
+
animation: l ? "ol-pulse 1.5s ease-in-out infinite" : void 0
|
|
980
|
+
};
|
|
981
|
+
return /* @__PURE__ */ n("span", { style: d });
|
|
982
|
+
});
|
|
983
|
+
function Ee({ title: r, sub: i, action: o }) {
|
|
984
|
+
const l = {
|
|
985
|
+
display: "flex",
|
|
986
|
+
alignItems: "flex-start",
|
|
987
|
+
justifyContent: "space-between",
|
|
988
|
+
gap: a[4],
|
|
989
|
+
marginBottom: a[5],
|
|
990
|
+
fontFamily: t.fontFamily.base
|
|
991
|
+
}, s = {
|
|
992
|
+
display: "flex",
|
|
993
|
+
flexDirection: "column",
|
|
994
|
+
gap: "2px"
|
|
995
|
+
}, d = {
|
|
996
|
+
fontSize: t.size.xl,
|
|
997
|
+
fontWeight: t.weight.bold,
|
|
998
|
+
color: e.textPrimary,
|
|
999
|
+
letterSpacing: t.letterSpacing.tight,
|
|
1000
|
+
lineHeight: t.lineHeight.tight,
|
|
1001
|
+
margin: 0
|
|
1002
|
+
}, g = {
|
|
1003
|
+
fontSize: t.size.base,
|
|
1004
|
+
color: e.textSecondary,
|
|
1005
|
+
margin: 0
|
|
1006
|
+
};
|
|
1007
|
+
return /* @__PURE__ */ f("div", { style: l, children: [
|
|
1008
|
+
/* @__PURE__ */ f("div", { style: s, children: [
|
|
1009
|
+
/* @__PURE__ */ n("h2", { style: d, children: r }),
|
|
1010
|
+
i && /* @__PURE__ */ n("p", { style: g, children: i })
|
|
1011
|
+
] }),
|
|
1012
|
+
o && /* @__PURE__ */ n("div", { style: { flexShrink: 0 }, children: o })
|
|
1013
|
+
] });
|
|
1014
|
+
}
|
|
1015
|
+
const oe = {
|
|
1016
|
+
error: e.error,
|
|
1017
|
+
warning: e.warning,
|
|
1018
|
+
info: e.info,
|
|
1019
|
+
neutral: e.textTertiary
|
|
1020
|
+
};
|
|
1021
|
+
function He({ items: r }) {
|
|
1022
|
+
const i = {
|
|
1023
|
+
display: "flex",
|
|
1024
|
+
flexDirection: "column",
|
|
1025
|
+
gap: a[3],
|
|
1026
|
+
fontFamily: t.fontFamily.base
|
|
1027
|
+
};
|
|
1028
|
+
return /* @__PURE__ */ n("div", { style: i, children: r.map((o, l) => {
|
|
1029
|
+
const s = oe[o.tone || "neutral"];
|
|
1030
|
+
return /* @__PURE__ */ f(
|
|
1031
|
+
"div",
|
|
1032
|
+
{
|
|
1033
|
+
style: {
|
|
1034
|
+
display: "flex",
|
|
1035
|
+
alignItems: "flex-start",
|
|
1036
|
+
gap: a[3]
|
|
1037
|
+
},
|
|
1038
|
+
children: [
|
|
1039
|
+
/* @__PURE__ */ n(
|
|
1040
|
+
"span",
|
|
1041
|
+
{
|
|
1042
|
+
style: {
|
|
1043
|
+
width: "8px",
|
|
1044
|
+
height: "8px",
|
|
1045
|
+
borderRadius: "50%",
|
|
1046
|
+
background: s,
|
|
1047
|
+
flexShrink: 0,
|
|
1048
|
+
marginTop: "5px"
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
),
|
|
1052
|
+
/* @__PURE__ */ n(
|
|
1053
|
+
"span",
|
|
1054
|
+
{
|
|
1055
|
+
style: {
|
|
1056
|
+
fontSize: t.size.base,
|
|
1057
|
+
color: e.textPrimary,
|
|
1058
|
+
lineHeight: t.lineHeight.relaxed
|
|
1059
|
+
},
|
|
1060
|
+
children: o.text
|
|
1061
|
+
}
|
|
1062
|
+
)
|
|
1063
|
+
]
|
|
1064
|
+
},
|
|
1065
|
+
l
|
|
1066
|
+
);
|
|
1067
|
+
}) });
|
|
1068
|
+
}
|
|
1069
|
+
const ie = {
|
|
1070
|
+
success: { IconComponent: Z, bg: e.cardBg, accent: e.success },
|
|
1071
|
+
error: { IconComponent: ee, bg: e.cardBg, accent: e.error },
|
|
1072
|
+
warning: { IconComponent: te, bg: e.cardBg, accent: e.warning },
|
|
1073
|
+
info: { IconComponent: A, bg: e.cardBg, accent: e.info },
|
|
1074
|
+
neutral: { IconComponent: A, bg: e.cardBg, accent: e.textTertiary }
|
|
1075
|
+
};
|
|
1076
|
+
function Pe({
|
|
1077
|
+
open: r,
|
|
1078
|
+
onClose: i,
|
|
1079
|
+
message: o,
|
|
1080
|
+
tone: l = "neutral",
|
|
1081
|
+
duration: s = 4e3,
|
|
1082
|
+
action: d
|
|
1083
|
+
}) {
|
|
1084
|
+
const [g, u] = C(!1);
|
|
1085
|
+
if (T(() => {
|
|
1086
|
+
if (!r) {
|
|
1087
|
+
u(!1);
|
|
1088
|
+
return;
|
|
1089
|
+
}
|
|
1090
|
+
const k = requestAnimationFrame(() => u(!0));
|
|
1091
|
+
return () => cancelAnimationFrame(k);
|
|
1092
|
+
}, [r]), T(() => {
|
|
1093
|
+
if (!r || s <= 0) return;
|
|
1094
|
+
const k = setTimeout(i, s);
|
|
1095
|
+
return () => clearTimeout(k);
|
|
1096
|
+
}, [r, s, i]), !r) return null;
|
|
1097
|
+
const p = ie[l], c = {
|
|
1098
|
+
position: "fixed",
|
|
1099
|
+
bottom: "20px",
|
|
1100
|
+
left: "50%",
|
|
1101
|
+
transform: g ? "translateX(-50%) translateY(0)" : "translateX(-50%) translateY(16px)",
|
|
1102
|
+
opacity: g ? 1 : 0,
|
|
1103
|
+
transition: "opacity 0.18s ease, transform 0.18s ease",
|
|
1104
|
+
zIndex: 200,
|
|
1105
|
+
pointerEvents: "auto"
|
|
1106
|
+
}, y = {
|
|
1107
|
+
display: "flex",
|
|
1108
|
+
alignItems: "center",
|
|
1109
|
+
gap: a[3],
|
|
1110
|
+
padding: `${a[3]} ${a[4]}`,
|
|
1111
|
+
background: p.bg,
|
|
1112
|
+
borderRadius: m.lg,
|
|
1113
|
+
boxShadow: I.lg,
|
|
1114
|
+
border: `1px solid ${e.border}`,
|
|
1115
|
+
fontFamily: t.fontFamily.base,
|
|
1116
|
+
maxWidth: "480px",
|
|
1117
|
+
minWidth: "280px"
|
|
1118
|
+
}, h = {
|
|
1119
|
+
width: "22px",
|
|
1120
|
+
height: "22px",
|
|
1121
|
+
borderRadius: m.full,
|
|
1122
|
+
background: p.accent,
|
|
1123
|
+
color: e.textInverse,
|
|
1124
|
+
display: "flex",
|
|
1125
|
+
alignItems: "center",
|
|
1126
|
+
justifyContent: "center",
|
|
1127
|
+
fontSize: "12px",
|
|
1128
|
+
fontWeight: t.weight.bold,
|
|
1129
|
+
flexShrink: 0,
|
|
1130
|
+
lineHeight: 1
|
|
1131
|
+
}, x = {
|
|
1132
|
+
flex: 1,
|
|
1133
|
+
fontSize: t.size.base,
|
|
1134
|
+
color: e.textPrimary,
|
|
1135
|
+
lineHeight: t.lineHeight.snug
|
|
1136
|
+
}, w = {
|
|
1137
|
+
fontSize: t.size.base,
|
|
1138
|
+
fontWeight: t.weight.semibold,
|
|
1139
|
+
color: p.accent,
|
|
1140
|
+
background: "none",
|
|
1141
|
+
border: "none",
|
|
1142
|
+
cursor: "pointer",
|
|
1143
|
+
padding: 0,
|
|
1144
|
+
whiteSpace: "nowrap",
|
|
1145
|
+
textDecoration: "underline",
|
|
1146
|
+
textUnderlineOffset: "2px",
|
|
1147
|
+
fontFamily: t.fontFamily.base
|
|
1148
|
+
}, b = {
|
|
1149
|
+
width: "24px",
|
|
1150
|
+
height: "24px",
|
|
1151
|
+
display: "flex",
|
|
1152
|
+
alignItems: "center",
|
|
1153
|
+
justifyContent: "center",
|
|
1154
|
+
background: "transparent",
|
|
1155
|
+
border: "none",
|
|
1156
|
+
borderRadius: m.xs,
|
|
1157
|
+
cursor: "pointer",
|
|
1158
|
+
color: e.textTertiary,
|
|
1159
|
+
flexShrink: 0
|
|
1160
|
+
}, S = p.IconComponent;
|
|
1161
|
+
return /* @__PURE__ */ n("div", { style: c, children: /* @__PURE__ */ f("div", { style: y, children: [
|
|
1162
|
+
/* @__PURE__ */ n("span", { style: h, children: /* @__PURE__ */ n(S, { size: 14 }) }),
|
|
1163
|
+
/* @__PURE__ */ n("span", { style: x, children: o }),
|
|
1164
|
+
d && /* @__PURE__ */ n("button", { style: w, onClick: d.onClick, children: d.label }),
|
|
1165
|
+
/* @__PURE__ */ n(
|
|
1166
|
+
"button",
|
|
1167
|
+
{
|
|
1168
|
+
style: b,
|
|
1169
|
+
onClick: i,
|
|
1170
|
+
"aria-label": "Dismiss",
|
|
1171
|
+
onMouseEnter: (k) => {
|
|
1172
|
+
k.currentTarget.style.background = e.pageBg;
|
|
1173
|
+
},
|
|
1174
|
+
onMouseLeave: (k) => {
|
|
1175
|
+
k.currentTarget.style.background = "transparent";
|
|
1176
|
+
},
|
|
1177
|
+
children: /* @__PURE__ */ n("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ n("path", { d: "M1 1l10 10M11 1L1 11", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) })
|
|
1178
|
+
}
|
|
1179
|
+
)
|
|
1180
|
+
] }) });
|
|
1181
|
+
}
|
|
1182
|
+
const E = z.memo(function({ children: i }) {
|
|
1183
|
+
const o = {
|
|
1184
|
+
fontFamily: t.fontFamily.mono,
|
|
1185
|
+
fontSize: t.size.sm,
|
|
1186
|
+
backgroundColor: e.bgSubtle,
|
|
1187
|
+
color: e.textDark,
|
|
1188
|
+
padding: `2px ${a[2]}`,
|
|
1189
|
+
borderRadius: m.md,
|
|
1190
|
+
border: `1px solid ${e.border}`,
|
|
1191
|
+
display: "inline-flex",
|
|
1192
|
+
alignItems: "center"
|
|
1193
|
+
};
|
|
1194
|
+
return /* @__PURE__ */ n("span", { style: o, children: i });
|
|
1195
|
+
}), $ = {
|
|
1196
|
+
added: e.success,
|
|
1197
|
+
modified: e.warning,
|
|
1198
|
+
destructive: e.error,
|
|
1199
|
+
safe: e.textTertiary
|
|
1200
|
+
}, le = {
|
|
1201
|
+
added: e.successBg,
|
|
1202
|
+
modified: e.warningBg,
|
|
1203
|
+
destructive: e.errorBg,
|
|
1204
|
+
safe: e.bgSubtle
|
|
1205
|
+
// slightly grey for unchanged/safe
|
|
1206
|
+
};
|
|
1207
|
+
function je({ title: r, handle: i, field: o, csvVal: l, storeVal: s, type: d, note: g }) {
|
|
1208
|
+
const u = {
|
|
1209
|
+
display: "grid",
|
|
1210
|
+
gridTemplateColumns: "2fr 1fr 1.5fr 1.5fr 1fr",
|
|
1211
|
+
gap: a[4],
|
|
1212
|
+
padding: a[4],
|
|
1213
|
+
backgroundColor: le[d],
|
|
1214
|
+
borderLeft: `4px solid ${$[d]}`,
|
|
1215
|
+
borderBottom: `1px solid ${e.border}`,
|
|
1216
|
+
fontFamily: t.fontFamily.base,
|
|
1217
|
+
alignItems: "start"
|
|
1218
|
+
}, p = {
|
|
1219
|
+
fontSize: t.size.md,
|
|
1220
|
+
color: e.textPrimary,
|
|
1221
|
+
margin: 0
|
|
1222
|
+
}, c = {
|
|
1223
|
+
fontSize: t.size.sm,
|
|
1224
|
+
color: e.textSecondary,
|
|
1225
|
+
fontFamily: t.fontFamily.mono,
|
|
1226
|
+
marginTop: a[1],
|
|
1227
|
+
marginBottom: 0
|
|
1228
|
+
};
|
|
1229
|
+
return /* @__PURE__ */ f("div", { style: u, children: [
|
|
1230
|
+
/* @__PURE__ */ f("div", { children: [
|
|
1231
|
+
/* @__PURE__ */ n("p", { style: { ...p, fontWeight: t.weight.bold }, children: r }),
|
|
1232
|
+
/* @__PURE__ */ n("p", { style: c, children: i })
|
|
1233
|
+
] }),
|
|
1234
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(E, { children: o }) }),
|
|
1235
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n("p", { style: { ...p, color: l ? e.textPrimary : e.error }, children: l || "(blank)" }) }),
|
|
1236
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n("p", { style: { ...p, color: e.textTertiary }, children: s || "—" }) }),
|
|
1237
|
+
/* @__PURE__ */ f("div", { children: [
|
|
1238
|
+
/* @__PURE__ */ f("div", { style: { display: "flex", alignItems: "center", gap: a[2] }, children: [
|
|
1239
|
+
/* @__PURE__ */ n("span", { style: { width: 8, height: 8, borderRadius: "50%", backgroundColor: $[d] } }),
|
|
1240
|
+
/* @__PURE__ */ n("span", { style: { fontSize: t.size.sm, fontWeight: t.weight.semibold, color: $[d] }, children: d === "added" ? "New" : d === "safe" ? "Unchanged" : d.charAt(0).toUpperCase() + d.slice(1) })
|
|
1241
|
+
] }),
|
|
1242
|
+
g && /* @__PURE__ */ f("p", { style: { fontSize: t.size.xs, color: $[d], marginTop: a[1], marginBottom: 0 }, children: [
|
|
1243
|
+
"⚠ ",
|
|
1244
|
+
g
|
|
1245
|
+
] })
|
|
1246
|
+
] })
|
|
1247
|
+
] });
|
|
1248
|
+
}
|
|
1249
|
+
function se({ severity: r, field: i, rowCount: o, message: l, fixable: s, onFix: d }) {
|
|
1250
|
+
const [g, u] = C(!1), c = {
|
|
1251
|
+
error: { tone: "error", outline: e.error },
|
|
1252
|
+
warning: { tone: "warning", outline: e.warning },
|
|
1253
|
+
info: { tone: "info", outline: e.info }
|
|
1254
|
+
}[r], y = {
|
|
1255
|
+
padding: a[4],
|
|
1256
|
+
borderBottom: `1px solid ${e.borderSubtle}`,
|
|
1257
|
+
fontFamily: t.fontFamily.base,
|
|
1258
|
+
display: "flex",
|
|
1259
|
+
flexDirection: "column",
|
|
1260
|
+
gap: a[3],
|
|
1261
|
+
backgroundColor: e.white
|
|
1262
|
+
}, h = {
|
|
1263
|
+
display: "flex",
|
|
1264
|
+
alignItems: "center",
|
|
1265
|
+
justifyContent: "space-between"
|
|
1266
|
+
}, x = {
|
|
1267
|
+
display: "flex",
|
|
1268
|
+
alignItems: "center",
|
|
1269
|
+
gap: a[3],
|
|
1270
|
+
flexWrap: "wrap"
|
|
1271
|
+
}, w = {
|
|
1272
|
+
border: `1px solid ${c.outline}`,
|
|
1273
|
+
color: c.outline,
|
|
1274
|
+
padding: `2px ${a[2]}`,
|
|
1275
|
+
borderRadius: m.full,
|
|
1276
|
+
fontSize: t.size.xs,
|
|
1277
|
+
fontWeight: t.weight.medium,
|
|
1278
|
+
backgroundColor: "transparent"
|
|
1279
|
+
};
|
|
1280
|
+
return /* @__PURE__ */ f("div", { style: y, children: [
|
|
1281
|
+
/* @__PURE__ */ f("div", { style: h, children: [
|
|
1282
|
+
/* @__PURE__ */ f("div", { style: x, children: [
|
|
1283
|
+
/* @__PURE__ */ n(Y, { tone: c.tone, dot: !0, children: r.charAt(0).toUpperCase() + r.slice(1) }),
|
|
1284
|
+
/* @__PURE__ */ n(E, { children: i }),
|
|
1285
|
+
/* @__PURE__ */ f("span", { style: w, children: [
|
|
1286
|
+
o.toLocaleString(),
|
|
1287
|
+
" rows affected"
|
|
1288
|
+
] })
|
|
1289
|
+
] }),
|
|
1290
|
+
/* @__PURE__ */ n("div", { children: s ? /* @__PURE__ */ n(N, { variant: "primary", size: "sm", onClick: d, children: "Auto-Fix" }) : /* @__PURE__ */ n("span", { style: { fontSize: t.size.sm, color: e.textTertiary }, children: "Manual fix" }) })
|
|
1291
|
+
] }),
|
|
1292
|
+
/* @__PURE__ */ n("p", { style: { margin: 0, fontSize: t.size.md, color: e.textDark }, children: l }),
|
|
1293
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
|
|
1294
|
+
"button",
|
|
1295
|
+
{
|
|
1296
|
+
onClick: () => u(!g),
|
|
1297
|
+
style: {
|
|
1298
|
+
background: "none",
|
|
1299
|
+
border: "none",
|
|
1300
|
+
padding: 0,
|
|
1301
|
+
color: e.textSecondary,
|
|
1302
|
+
fontSize: t.size.sm,
|
|
1303
|
+
cursor: "pointer",
|
|
1304
|
+
textDecoration: "underline",
|
|
1305
|
+
fontFamily: t.fontFamily.base
|
|
1306
|
+
},
|
|
1307
|
+
children: g ? "Hide sample rows ▲" : "View sample rows ▼"
|
|
1308
|
+
}
|
|
1309
|
+
) }),
|
|
1310
|
+
g && /* @__PURE__ */ f("div", { style: { display: "flex", gap: a[2], marginTop: a[1], flexWrap: "wrap" }, children: [
|
|
1311
|
+
[1, 2, 3].map((b) => /* @__PURE__ */ f("span", { style: {
|
|
1312
|
+
fontSize: t.size.xs,
|
|
1313
|
+
border: `1px solid ${e.border}`,
|
|
1314
|
+
padding: `2px ${a[2]}`,
|
|
1315
|
+
borderRadius: m.full,
|
|
1316
|
+
color: e.textSecondary
|
|
1317
|
+
}, children: [
|
|
1318
|
+
"row ",
|
|
1319
|
+
b
|
|
1320
|
+
] }, b)),
|
|
1321
|
+
o > 3 && /* @__PURE__ */ f("span", { style: { fontSize: t.size.xs, color: e.textTertiary, alignSelf: "center" }, children: [
|
|
1322
|
+
"+ ",
|
|
1323
|
+
o - 3,
|
|
1324
|
+
" more"
|
|
1325
|
+
] })
|
|
1326
|
+
] })
|
|
1327
|
+
] });
|
|
1328
|
+
}
|
|
1329
|
+
function Ve({ category: r, issues: i, defaultOpen: o = !0 }) {
|
|
1330
|
+
const [l, s] = C(o), d = i.some((b) => b.severity === "error"), g = i.some((b) => b.severity === "warning"), u = d ? e.error : g ? e.warning : e.info, p = i.reduce((b, S) => b + S.rowCount, 0), c = {
|
|
1331
|
+
backgroundColor: e.cardBg,
|
|
1332
|
+
borderRadius: m.lg,
|
|
1333
|
+
border: `1px solid ${e.border}`,
|
|
1334
|
+
marginBottom: a[4],
|
|
1335
|
+
overflow: "hidden",
|
|
1336
|
+
fontFamily: t.fontFamily.base
|
|
1337
|
+
}, y = {
|
|
1338
|
+
padding: a[4],
|
|
1339
|
+
display: "flex",
|
|
1340
|
+
alignItems: "center",
|
|
1341
|
+
justifyContent: "space-between",
|
|
1342
|
+
cursor: "pointer",
|
|
1343
|
+
backgroundColor: e.cardBg,
|
|
1344
|
+
borderBottom: l ? `1px solid ${e.border}` : "none",
|
|
1345
|
+
userSelect: "none"
|
|
1346
|
+
}, h = {
|
|
1347
|
+
display: "flex",
|
|
1348
|
+
alignItems: "center",
|
|
1349
|
+
gap: a[3]
|
|
1350
|
+
}, x = {
|
|
1351
|
+
width: 8,
|
|
1352
|
+
height: 8,
|
|
1353
|
+
borderRadius: "50%",
|
|
1354
|
+
backgroundColor: u,
|
|
1355
|
+
flexShrink: 0
|
|
1356
|
+
}, w = {
|
|
1357
|
+
backgroundColor: e.bgSubtle,
|
|
1358
|
+
border: `1px solid ${e.border}`,
|
|
1359
|
+
borderRadius: m.full,
|
|
1360
|
+
padding: `2px ${a[3]}`,
|
|
1361
|
+
fontSize: t.size.sm,
|
|
1362
|
+
color: e.textSecondary,
|
|
1363
|
+
fontWeight: t.weight.medium
|
|
1364
|
+
};
|
|
1365
|
+
return /* @__PURE__ */ f("div", { style: c, children: [
|
|
1366
|
+
/* @__PURE__ */ f("div", { style: y, onClick: () => s(!l), children: [
|
|
1367
|
+
/* @__PURE__ */ f("div", { style: h, children: [
|
|
1368
|
+
/* @__PURE__ */ n("span", { style: x }),
|
|
1369
|
+
/* @__PURE__ */ n("span", { style: { fontSize: t.size.lg, fontWeight: t.weight.bold, color: e.textPrimary }, children: r })
|
|
1370
|
+
] }),
|
|
1371
|
+
/* @__PURE__ */ f("div", { style: { display: "flex", alignItems: "center", gap: a[3] }, children: [
|
|
1372
|
+
/* @__PURE__ */ f("span", { style: w, children: [
|
|
1373
|
+
p.toLocaleString(),
|
|
1374
|
+
" rows"
|
|
1375
|
+
] }),
|
|
1376
|
+
/* @__PURE__ */ n("span", { style: {
|
|
1377
|
+
color: e.textTertiary,
|
|
1378
|
+
transform: l ? "rotate(180deg)" : "none",
|
|
1379
|
+
transition: "transform 200ms ease",
|
|
1380
|
+
fontSize: "12px"
|
|
1381
|
+
}, children: "▼" })
|
|
1382
|
+
] })
|
|
1383
|
+
] }),
|
|
1384
|
+
l && /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column" }, children: i.map((b, S) => /* @__PURE__ */ n("div", { style: {
|
|
1385
|
+
borderBottom: S === i.length - 1 ? "none" : `1px solid ${e.borderSubtle}`
|
|
1386
|
+
}, children: /* @__PURE__ */ n(se, { ...b }) }, S)) })
|
|
1387
|
+
] });
|
|
1388
|
+
}
|
|
1389
|
+
const Oe = z.memo(function({ value: i, label: o, tone: l = "neutral" }) {
|
|
1390
|
+
const d = {
|
|
1391
|
+
success: { border: e.successBorder, color: e.success },
|
|
1392
|
+
error: { border: e.errorBorder, color: e.error },
|
|
1393
|
+
info: { border: e.infoBorder, color: e.info },
|
|
1394
|
+
neutral: { border: e.border, color: e.textPrimary }
|
|
1395
|
+
}[l], g = {
|
|
1396
|
+
display: "flex",
|
|
1397
|
+
flexDirection: "column",
|
|
1398
|
+
gap: a[1],
|
|
1399
|
+
padding: a[4],
|
|
1400
|
+
borderRadius: m.lg,
|
|
1401
|
+
border: `1px solid ${d.border}`,
|
|
1402
|
+
backgroundColor: e.white,
|
|
1403
|
+
fontFamily: t.fontFamily.base,
|
|
1404
|
+
minWidth: "120px",
|
|
1405
|
+
flex: 1
|
|
1406
|
+
}, u = {
|
|
1407
|
+
fontSize: t.size["2xl"],
|
|
1408
|
+
fontWeight: t.weight.bold,
|
|
1409
|
+
color: d.color,
|
|
1410
|
+
margin: 0,
|
|
1411
|
+
lineHeight: 1
|
|
1412
|
+
}, p = {
|
|
1413
|
+
fontSize: t.size.sm,
|
|
1414
|
+
color: l === "neutral" ? e.textSecondary : d.color,
|
|
1415
|
+
margin: 0,
|
|
1416
|
+
marginTop: a[1]
|
|
1417
|
+
};
|
|
1418
|
+
return /* @__PURE__ */ f("div", { style: g, children: [
|
|
1419
|
+
/* @__PURE__ */ n("div", { style: u, children: i }),
|
|
1420
|
+
/* @__PURE__ */ n("div", { style: p, children: o })
|
|
1421
|
+
] });
|
|
1422
|
+
}), Ne = z.memo(function({ name: i }) {
|
|
1423
|
+
const o = {
|
|
1424
|
+
display: "inline-flex",
|
|
1425
|
+
alignItems: "center",
|
|
1426
|
+
padding: `2px ${a[3]}`,
|
|
1427
|
+
backgroundColor: e.neutralBg,
|
|
1428
|
+
color: e.textDark,
|
|
1429
|
+
fontSize: t.size.xs,
|
|
1430
|
+
fontFamily: t.fontFamily.base,
|
|
1431
|
+
fontWeight: t.weight.medium,
|
|
1432
|
+
borderRadius: m.full,
|
|
1433
|
+
whiteSpace: "nowrap"
|
|
1434
|
+
};
|
|
1435
|
+
return /* @__PURE__ */ n("span", { style: o, children: i });
|
|
1436
|
+
}), Ue = z.memo(function({ percent: i, height: o = 8 }) {
|
|
1437
|
+
const l = {
|
|
1438
|
+
width: "100%",
|
|
1439
|
+
backgroundColor: e.borderSubtle,
|
|
1440
|
+
borderRadius: m.full,
|
|
1441
|
+
height: `${o}px`,
|
|
1442
|
+
overflow: "hidden"
|
|
1443
|
+
}, s = {
|
|
1444
|
+
width: `${Math.max(0, Math.min(100, i))}%`,
|
|
1445
|
+
backgroundColor: e.black,
|
|
1446
|
+
height: "100%",
|
|
1447
|
+
transition: "width 300ms ease"
|
|
1448
|
+
};
|
|
1449
|
+
return /* @__PURE__ */ n("div", { style: l, role: "progressbar", "aria-valuenow": i, "aria-valuemin": 0, "aria-valuemax": 100, children: /* @__PURE__ */ n("div", { style: s }) });
|
|
1450
|
+
});
|
|
1451
|
+
function Ke({ steps: r }) {
|
|
1452
|
+
const i = {
|
|
1453
|
+
display: "flex",
|
|
1454
|
+
flexDirection: "column",
|
|
1455
|
+
gap: a[4],
|
|
1456
|
+
fontFamily: t.fontFamily.base
|
|
1457
|
+
};
|
|
1458
|
+
return /* @__PURE__ */ n("div", { style: i, children: r.map((o) => {
|
|
1459
|
+
const l = o.status === "pending", s = o.status === "running", d = o.status === "done", g = {
|
|
1460
|
+
display: "flex",
|
|
1461
|
+
alignItems: "center",
|
|
1462
|
+
justifyContent: "space-between",
|
|
1463
|
+
opacity: l ? 0.4 : 1
|
|
1464
|
+
}, u = {
|
|
1465
|
+
display: "flex",
|
|
1466
|
+
alignItems: "center",
|
|
1467
|
+
gap: a[3]
|
|
1468
|
+
}, p = {
|
|
1469
|
+
width: "20px",
|
|
1470
|
+
height: "20px",
|
|
1471
|
+
borderRadius: m.full,
|
|
1472
|
+
display: "flex",
|
|
1473
|
+
alignItems: "center",
|
|
1474
|
+
justifyContent: "center",
|
|
1475
|
+
backgroundColor: d ? e.success : s ? e.black : e.borderLight,
|
|
1476
|
+
color: e.white,
|
|
1477
|
+
flexShrink: 0
|
|
1478
|
+
};
|
|
1479
|
+
return /* @__PURE__ */ f("div", { style: g, children: [
|
|
1480
|
+
/* @__PURE__ */ f("div", { style: u, children: [
|
|
1481
|
+
/* @__PURE__ */ f("div", { style: p, children: [
|
|
1482
|
+
d && /* @__PURE__ */ n("svg", { width: "12", height: "12", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ n("path", { d: "M2.5 7.5L5.5 10.5L11.5 3.5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }),
|
|
1483
|
+
s && /* @__PURE__ */ n("div", { style: { width: 6, height: 6, backgroundColor: e.white, borderRadius: "50%" } })
|
|
1484
|
+
] }),
|
|
1485
|
+
/* @__PURE__ */ n("span", { style: {
|
|
1486
|
+
fontSize: t.size.md,
|
|
1487
|
+
color: e.textPrimary,
|
|
1488
|
+
fontWeight: s ? t.weight.semibold : t.weight.normal
|
|
1489
|
+
}, children: o.label })
|
|
1490
|
+
] }),
|
|
1491
|
+
o.value && /* @__PURE__ */ n("span", { style: {
|
|
1492
|
+
fontSize: t.size.sm,
|
|
1493
|
+
color: d ? e.success : e.textTertiary
|
|
1494
|
+
}, children: o.value })
|
|
1495
|
+
] }, o.id);
|
|
1496
|
+
}) });
|
|
1497
|
+
}
|
|
1498
|
+
function Xe({
|
|
1499
|
+
checked: r,
|
|
1500
|
+
onChange: i,
|
|
1501
|
+
value: o,
|
|
1502
|
+
name: l,
|
|
1503
|
+
disabled: s = !1,
|
|
1504
|
+
label: d,
|
|
1505
|
+
description: g,
|
|
1506
|
+
id: u
|
|
1507
|
+
}) {
|
|
1508
|
+
const [p, c] = C(!1), [y, h] = C(!1), x = z.useId(), w = u || x, b = {
|
|
1509
|
+
display: "flex",
|
|
1510
|
+
alignItems: "flex-start",
|
|
1511
|
+
gap: a[3],
|
|
1512
|
+
opacity: s ? 0.5 : 1,
|
|
1513
|
+
cursor: s ? "not-allowed" : "pointer",
|
|
1514
|
+
fontFamily: t.fontFamily.base
|
|
1515
|
+
}, S = {
|
|
1516
|
+
position: "relative",
|
|
1517
|
+
width: "18px",
|
|
1518
|
+
height: "18px",
|
|
1519
|
+
borderRadius: m.full,
|
|
1520
|
+
border: `1px solid ${r ? e.black : y && !s ? e.textTertiary : e.borderLight}`,
|
|
1521
|
+
backgroundColor: e.white,
|
|
1522
|
+
transition: "border-color 150ms ease, box-shadow 150ms ease",
|
|
1523
|
+
flexShrink: 0,
|
|
1524
|
+
boxShadow: p ? I.focus : "none",
|
|
1525
|
+
outline: "none",
|
|
1526
|
+
marginTop: "1px"
|
|
1527
|
+
// Optical alignment
|
|
1528
|
+
}, k = {
|
|
1529
|
+
position: "absolute",
|
|
1530
|
+
top: "50%",
|
|
1531
|
+
left: "50%",
|
|
1532
|
+
transform: `translate(-50%, -50%) scale(${r ? 1 : 0})`,
|
|
1533
|
+
width: "10px",
|
|
1534
|
+
height: "10px",
|
|
1535
|
+
borderRadius: m.full,
|
|
1536
|
+
backgroundColor: e.black,
|
|
1537
|
+
transition: "transform 150ms ease"
|
|
1538
|
+
}, F = {
|
|
1539
|
+
display: "flex",
|
|
1540
|
+
flexDirection: "column",
|
|
1541
|
+
gap: a[1]
|
|
1542
|
+
}, M = {
|
|
1543
|
+
fontSize: t.size.md,
|
|
1544
|
+
fontWeight: t.weight.medium,
|
|
1545
|
+
color: e.textPrimary,
|
|
1546
|
+
margin: 0,
|
|
1547
|
+
cursor: s ? "not-allowed" : "pointer"
|
|
1548
|
+
}, H = {
|
|
1549
|
+
fontSize: t.size.sm,
|
|
1550
|
+
color: e.textSecondary,
|
|
1551
|
+
margin: 0
|
|
1552
|
+
};
|
|
1553
|
+
return /* @__PURE__ */ f(
|
|
1554
|
+
"label",
|
|
1555
|
+
{
|
|
1556
|
+
style: b,
|
|
1557
|
+
htmlFor: w,
|
|
1558
|
+
onMouseEnter: () => h(!0),
|
|
1559
|
+
onMouseLeave: () => h(!1),
|
|
1560
|
+
children: [
|
|
1561
|
+
/* @__PURE__ */ f("div", { style: { position: "relative" }, children: [
|
|
1562
|
+
/* @__PURE__ */ n(
|
|
1563
|
+
"input",
|
|
1564
|
+
{
|
|
1565
|
+
id: w,
|
|
1566
|
+
type: "radio",
|
|
1567
|
+
name: l,
|
|
1568
|
+
value: o,
|
|
1569
|
+
checked: r,
|
|
1570
|
+
disabled: s,
|
|
1571
|
+
onChange: (P) => {
|
|
1572
|
+
s || i(P.target.checked);
|
|
1573
|
+
},
|
|
1574
|
+
onFocus: () => c(!0),
|
|
1575
|
+
onBlur: () => c(!1),
|
|
1576
|
+
style: {
|
|
1577
|
+
position: "absolute",
|
|
1578
|
+
opacity: 0,
|
|
1579
|
+
width: 0,
|
|
1580
|
+
height: 0,
|
|
1581
|
+
margin: 0
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
),
|
|
1585
|
+
/* @__PURE__ */ n("div", { style: S, "aria-hidden": "true", children: /* @__PURE__ */ n("div", { style: k }) })
|
|
1586
|
+
] }),
|
|
1587
|
+
(d || g) && /* @__PURE__ */ f("div", { style: F, children: [
|
|
1588
|
+
d && /* @__PURE__ */ n("span", { style: M, children: d }),
|
|
1589
|
+
g && /* @__PURE__ */ n("span", { style: H, children: g })
|
|
1590
|
+
] })
|
|
1591
|
+
]
|
|
1592
|
+
}
|
|
1593
|
+
);
|
|
1594
|
+
}
|
|
1595
|
+
function Ge({ steps: r, current: i }) {
|
|
1596
|
+
const o = {
|
|
1597
|
+
display: "flex",
|
|
1598
|
+
justifyContent: "space-between",
|
|
1599
|
+
width: "100%",
|
|
1600
|
+
fontFamily: t.fontFamily.base,
|
|
1601
|
+
position: "relative"
|
|
1602
|
+
}, l = 32, s = {
|
|
1603
|
+
position: "absolute",
|
|
1604
|
+
top: l / 2 - 1,
|
|
1605
|
+
// center vertically with circles
|
|
1606
|
+
left: l / 2,
|
|
1607
|
+
right: l / 2,
|
|
1608
|
+
height: 2,
|
|
1609
|
+
backgroundColor: e.border,
|
|
1610
|
+
zIndex: 1
|
|
1611
|
+
}, d = {
|
|
1612
|
+
height: "100%",
|
|
1613
|
+
width: `${(Math.min(i, r.length) - 1) / (r.length - 1) * 100}%`,
|
|
1614
|
+
backgroundColor: e.black,
|
|
1615
|
+
transition: "width 300ms ease"
|
|
1616
|
+
};
|
|
1617
|
+
return /* @__PURE__ */ f("div", { style: o, children: [
|
|
1618
|
+
/* @__PURE__ */ n("div", { style: s, children: /* @__PURE__ */ n("div", { style: d }) }),
|
|
1619
|
+
r.map((g, u) => {
|
|
1620
|
+
const p = u + 1, c = p < i, y = p === i, h = {
|
|
1621
|
+
width: l,
|
|
1622
|
+
height: l,
|
|
1623
|
+
borderRadius: "50%",
|
|
1624
|
+
display: "flex",
|
|
1625
|
+
alignItems: "center",
|
|
1626
|
+
justifyContent: "center",
|
|
1627
|
+
fontSize: t.size.md,
|
|
1628
|
+
fontWeight: t.weight.semibold,
|
|
1629
|
+
backgroundColor: c || y ? e.black : e.white,
|
|
1630
|
+
color: c || y ? e.white : e.textTertiary,
|
|
1631
|
+
border: c || y ? `2px solid ${e.black}` : `2px solid ${e.border}`,
|
|
1632
|
+
zIndex: 2,
|
|
1633
|
+
position: "relative",
|
|
1634
|
+
transition: "all 300ms ease"
|
|
1635
|
+
}, x = {
|
|
1636
|
+
position: "absolute",
|
|
1637
|
+
top: l + 8,
|
|
1638
|
+
left: "50%",
|
|
1639
|
+
transform: "translateX(-50%)",
|
|
1640
|
+
fontSize: t.size.sm,
|
|
1641
|
+
color: y || c ? e.textPrimary : e.textTertiary,
|
|
1642
|
+
fontWeight: y ? t.weight.semibold : t.weight.normal,
|
|
1643
|
+
whiteSpace: "nowrap"
|
|
1644
|
+
};
|
|
1645
|
+
return /* @__PURE__ */ f("div", { style: {
|
|
1646
|
+
position: "relative",
|
|
1647
|
+
display: "flex",
|
|
1648
|
+
flexDirection: "column",
|
|
1649
|
+
alignItems: "center"
|
|
1650
|
+
}, children: [
|
|
1651
|
+
/* @__PURE__ */ n("div", { style: h, children: c ? /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ n("path", { d: "M2.5 7.5L5.5 10.5L11.5 3.5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) : p }),
|
|
1652
|
+
/* @__PURE__ */ n("span", { style: x, children: g })
|
|
1653
|
+
] }, g);
|
|
1654
|
+
})
|
|
1655
|
+
] });
|
|
1656
|
+
}
|
|
1657
|
+
const Ye = z.memo(function({ label: i, value: o, highlight: l = !1, color: s }) {
|
|
1658
|
+
const d = {
|
|
1659
|
+
backgroundColor: l ? e.black : e.white,
|
|
1660
|
+
border: l ? "none" : `1px solid ${e.border}`,
|
|
1661
|
+
borderRadius: m.lg,
|
|
1662
|
+
padding: a[5],
|
|
1663
|
+
display: "flex",
|
|
1664
|
+
flexDirection: "column",
|
|
1665
|
+
gap: a[2],
|
|
1666
|
+
fontFamily: t.fontFamily.base,
|
|
1667
|
+
flex: 1,
|
|
1668
|
+
minWidth: 0
|
|
1669
|
+
// prevents overflow in flex contexts
|
|
1670
|
+
}, g = {
|
|
1671
|
+
fontSize: t.size.sm,
|
|
1672
|
+
color: l ? e.textDisabled : e.textSecondary,
|
|
1673
|
+
fontWeight: t.weight.semibold,
|
|
1674
|
+
textTransform: "uppercase",
|
|
1675
|
+
letterSpacing: "0.05em",
|
|
1676
|
+
margin: 0
|
|
1677
|
+
}, u = {
|
|
1678
|
+
fontSize: t.size["3xl"],
|
|
1679
|
+
fontWeight: t.weight.bold,
|
|
1680
|
+
color: l ? e.white : s || e.textPrimary,
|
|
1681
|
+
margin: 0,
|
|
1682
|
+
lineHeight: 1
|
|
1683
|
+
};
|
|
1684
|
+
return /* @__PURE__ */ f("div", { style: d, children: [
|
|
1685
|
+
/* @__PURE__ */ n("p", { style: g, children: i }),
|
|
1686
|
+
/* @__PURE__ */ n("p", { style: u, children: o })
|
|
1687
|
+
] });
|
|
1688
|
+
});
|
|
1689
|
+
function qe({ checked: r, onChange: i, disabled: o = !1, label: l, description: s, id: d }) {
|
|
1690
|
+
const [g, u] = C(!1), p = z.useId(), c = d || p, y = {
|
|
1691
|
+
display: "flex",
|
|
1692
|
+
alignItems: "flex-start",
|
|
1693
|
+
gap: a[3],
|
|
1694
|
+
opacity: o ? 0.5 : 1,
|
|
1695
|
+
cursor: o ? "not-allowed" : "pointer",
|
|
1696
|
+
fontFamily: t.fontFamily.base
|
|
1697
|
+
}, h = {
|
|
1698
|
+
position: "relative",
|
|
1699
|
+
width: "36px",
|
|
1700
|
+
height: "20px",
|
|
1701
|
+
backgroundColor: r ? e.black : e.borderLight,
|
|
1702
|
+
borderRadius: m.full,
|
|
1703
|
+
transition: "background-color 200ms ease",
|
|
1704
|
+
flexShrink: 0,
|
|
1705
|
+
boxShadow: g ? I.focus : "none",
|
|
1706
|
+
outline: "none"
|
|
1707
|
+
}, x = {
|
|
1708
|
+
position: "absolute",
|
|
1709
|
+
top: "2px",
|
|
1710
|
+
left: r ? "calc(100% - 18px)" : "2px",
|
|
1711
|
+
width: "16px",
|
|
1712
|
+
height: "16px",
|
|
1713
|
+
backgroundColor: e.white,
|
|
1714
|
+
borderRadius: m.full,
|
|
1715
|
+
transition: "left 200ms ease, transform 200ms ease",
|
|
1716
|
+
boxShadow: I.sm
|
|
1717
|
+
}, w = {
|
|
1718
|
+
display: "flex",
|
|
1719
|
+
flexDirection: "column",
|
|
1720
|
+
gap: a[1],
|
|
1721
|
+
marginTop: "1px"
|
|
1722
|
+
// Optical alignment with switch thumb
|
|
1723
|
+
}, b = {
|
|
1724
|
+
fontSize: t.size.md,
|
|
1725
|
+
fontWeight: t.weight.medium,
|
|
1726
|
+
color: e.textPrimary,
|
|
1727
|
+
margin: 0,
|
|
1728
|
+
cursor: o ? "not-allowed" : "pointer"
|
|
1729
|
+
}, S = {
|
|
1730
|
+
fontSize: t.size.sm,
|
|
1731
|
+
color: e.textSecondary,
|
|
1732
|
+
margin: 0
|
|
1733
|
+
};
|
|
1734
|
+
return /* @__PURE__ */ f(
|
|
1735
|
+
"label",
|
|
1736
|
+
{
|
|
1737
|
+
style: y,
|
|
1738
|
+
htmlFor: c,
|
|
1739
|
+
onMouseEnter: () => {
|
|
1740
|
+
},
|
|
1741
|
+
children: [
|
|
1742
|
+
/* @__PURE__ */ n(
|
|
1743
|
+
"div",
|
|
1744
|
+
{
|
|
1745
|
+
id: c,
|
|
1746
|
+
role: "switch",
|
|
1747
|
+
"aria-checked": r,
|
|
1748
|
+
"aria-disabled": o,
|
|
1749
|
+
tabIndex: o ? -1 : 0,
|
|
1750
|
+
onKeyDown: (F) => {
|
|
1751
|
+
(F.key === " " || F.key === "Enter") && (F.preventDefault(), o || i(!r));
|
|
1752
|
+
},
|
|
1753
|
+
onFocus: () => u(!0),
|
|
1754
|
+
onBlur: () => u(!1),
|
|
1755
|
+
onClick: (F) => {
|
|
1756
|
+
F.preventDefault(), o || i(!r);
|
|
1757
|
+
},
|
|
1758
|
+
style: h,
|
|
1759
|
+
children: /* @__PURE__ */ n("div", { style: x })
|
|
1760
|
+
}
|
|
1761
|
+
),
|
|
1762
|
+
(l || s) && /* @__PURE__ */ f("div", { style: w, children: [
|
|
1763
|
+
l && /* @__PURE__ */ n("span", { style: b, children: l }),
|
|
1764
|
+
s && /* @__PURE__ */ n("span", { style: S, children: s })
|
|
1765
|
+
] })
|
|
1766
|
+
]
|
|
1767
|
+
}
|
|
1768
|
+
);
|
|
1769
|
+
}
|
|
1770
|
+
const Je = z.memo(function({ value: i, label: o, suffix: l, inverse: s = !1 }) {
|
|
1771
|
+
const d = i > 0, g = i === 0;
|
|
1772
|
+
let u = e.textTertiary;
|
|
1773
|
+
g || (d ? u = s ? e.error : e.success : u = s ? e.success : e.error);
|
|
1774
|
+
const p = d ? "↑" : g ? "—" : "↓", c = g ? "" : `${d ? "+" : ""}${i}${l ?? ""}`, y = {
|
|
1775
|
+
display: "inline-flex",
|
|
1776
|
+
alignItems: "center",
|
|
1777
|
+
gap: a[1],
|
|
1778
|
+
color: u,
|
|
1779
|
+
fontSize: t.size.sm,
|
|
1780
|
+
fontWeight: t.weight.medium,
|
|
1781
|
+
fontFamily: t.fontFamily.base
|
|
1782
|
+
};
|
|
1783
|
+
return /* @__PURE__ */ f("span", { style: y, children: [
|
|
1784
|
+
/* @__PURE__ */ f("span", { children: [
|
|
1785
|
+
p,
|
|
1786
|
+
" ",
|
|
1787
|
+
c
|
|
1788
|
+
] }),
|
|
1789
|
+
o && /* @__PURE__ */ n("span", { style: { color: e.textSecondary, fontWeight: t.weight.normal, marginLeft: a[1] }, children: o })
|
|
1790
|
+
] });
|
|
1791
|
+
});
|
|
1792
|
+
function _e(r = !1) {
|
|
1793
|
+
const [i, o] = C(r), l = L(() => o(!0), []), s = L(() => o(!1), []), d = L(() => o((g) => !g), []);
|
|
1794
|
+
return { isOpen: i, open: l, close: s, toggle: d };
|
|
1795
|
+
}
|
|
1796
|
+
function Qe(r, i) {
|
|
1797
|
+
const [o, l] = C(() => {
|
|
1798
|
+
if (typeof window > "u") return i;
|
|
1799
|
+
try {
|
|
1800
|
+
const d = window.localStorage.getItem(r);
|
|
1801
|
+
return d ? JSON.parse(d) : i;
|
|
1802
|
+
} catch {
|
|
1803
|
+
return i;
|
|
1804
|
+
}
|
|
1805
|
+
}), s = L(
|
|
1806
|
+
(d) => {
|
|
1807
|
+
l((g) => {
|
|
1808
|
+
const u = d instanceof Function ? d(g) : d;
|
|
1809
|
+
try {
|
|
1810
|
+
window.localStorage.setItem(r, JSON.stringify(u));
|
|
1811
|
+
} catch {
|
|
1812
|
+
}
|
|
1813
|
+
return u;
|
|
1814
|
+
});
|
|
1815
|
+
},
|
|
1816
|
+
[r]
|
|
1817
|
+
);
|
|
1818
|
+
return [o, s];
|
|
1819
|
+
}
|
|
1820
|
+
function Ze(...r) {
|
|
1821
|
+
return r.filter(Boolean).join(" ");
|
|
1822
|
+
}
|
|
1823
|
+
export {
|
|
1824
|
+
He as ActionList,
|
|
1825
|
+
te as AlertIcon,
|
|
1826
|
+
Te as ArrowDownIcon,
|
|
1827
|
+
Be as ArrowLeftIcon,
|
|
1828
|
+
Ie as ArrowRightIcon,
|
|
1829
|
+
Me as ArrowUpIcon,
|
|
1830
|
+
Y as Badge,
|
|
1831
|
+
N as Button,
|
|
1832
|
+
ge as Card,
|
|
1833
|
+
Z as CheckIcon,
|
|
1834
|
+
Ae as CheckRow,
|
|
1835
|
+
We as ChevronDownIcon,
|
|
1836
|
+
Le as ChevronLeftIcon,
|
|
1837
|
+
$e as ChevronRightIcon,
|
|
1838
|
+
De as ChevronUpIcon,
|
|
1839
|
+
E as CodeChip,
|
|
1840
|
+
ye as DataTable,
|
|
1841
|
+
je as DiffRow,
|
|
1842
|
+
Ce as DownloadIcon,
|
|
1843
|
+
A as InfoIcon,
|
|
1844
|
+
he as Input,
|
|
1845
|
+
se as IssueCard,
|
|
1846
|
+
Ve as IssueGroup,
|
|
1847
|
+
Q as LockIcon,
|
|
1848
|
+
we as MenuIcon,
|
|
1849
|
+
Oe as MiniStat,
|
|
1850
|
+
xe as Modal,
|
|
1851
|
+
Ne as ModelTag,
|
|
1852
|
+
Ee as PageHeader,
|
|
1853
|
+
ve as PlayIcon,
|
|
1854
|
+
Ue as ProgressBar,
|
|
1855
|
+
Ke as ProgressList,
|
|
1856
|
+
Xe as Radio,
|
|
1857
|
+
me as ScoreBar,
|
|
1858
|
+
Se as SearchIcon,
|
|
1859
|
+
fe as SectionLabel,
|
|
1860
|
+
Fe as SettingsIcon,
|
|
1861
|
+
ke as StarIcon,
|
|
1862
|
+
ue as StatGrid,
|
|
1863
|
+
Re as StatusDot,
|
|
1864
|
+
Ge as StepBar,
|
|
1865
|
+
Ye as SummaryCard,
|
|
1866
|
+
qe as Switch,
|
|
1867
|
+
pe as TabBar,
|
|
1868
|
+
Pe as Toast,
|
|
1869
|
+
be as ToggleGroup,
|
|
1870
|
+
Je as Trend,
|
|
1871
|
+
ze as UploadIcon,
|
|
1872
|
+
ee as XIcon,
|
|
1873
|
+
e as colors,
|
|
1874
|
+
Ze as cx,
|
|
1875
|
+
m as radii,
|
|
1876
|
+
I as shadows,
|
|
1877
|
+
a as spacing,
|
|
1878
|
+
t as typography,
|
|
1879
|
+
Qe as useLocalStorage,
|
|
1880
|
+
_e as useModal
|
|
1881
|
+
};
|
|
1882
|
+
//# sourceMappingURL=index.js.map
|