@orellabs/ui 0.1.2 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +124 -122
- package/dist/index.js.map +1 -1
- package/package.json +10 -3
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import z, { useState as C, useRef as
|
|
1
|
+
import z, { useState as C, useRef as O, useEffect as T, useCallback as L } from "react";
|
|
2
2
|
import { jsxs as f, jsx as n, Fragment as B } from "react/jsx-runtime";
|
|
3
3
|
const e = {
|
|
4
4
|
// Brand
|
|
@@ -105,7 +105,7 @@ const e = {
|
|
|
105
105
|
md: "0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04)",
|
|
106
106
|
lg: "0 20px 60px rgba(0,0,0,0.18)",
|
|
107
107
|
focus: "0 0 0 3px rgba(26, 26, 26, 0.12)"
|
|
108
|
-
},
|
|
108
|
+
}, D = {
|
|
109
109
|
sm: {
|
|
110
110
|
padding: `${a[1]} ${a[3]}`,
|
|
111
111
|
fontSize: t.size.base,
|
|
@@ -124,7 +124,7 @@ const e = {
|
|
|
124
124
|
height: "48px",
|
|
125
125
|
gap: a[2]
|
|
126
126
|
}
|
|
127
|
-
},
|
|
127
|
+
}, W = {
|
|
128
128
|
primary: {
|
|
129
129
|
background: e.black,
|
|
130
130
|
color: e.textInverse,
|
|
@@ -151,8 +151,8 @@ const e = {
|
|
|
151
151
|
}
|
|
152
152
|
};
|
|
153
153
|
function N({
|
|
154
|
-
variant: r,
|
|
155
|
-
size: i,
|
|
154
|
+
variant: r = "primary",
|
|
155
|
+
size: i = "md",
|
|
156
156
|
loading: o = !1,
|
|
157
157
|
disabled: l = !1,
|
|
158
158
|
fullWidth: s = !1,
|
|
@@ -160,7 +160,7 @@ function N({
|
|
|
160
160
|
children: g,
|
|
161
161
|
onClick: u
|
|
162
162
|
}) {
|
|
163
|
-
const p =
|
|
163
|
+
const p = D[i] || D.md, c = W[r] || W.primary, y = l || o, h = {
|
|
164
164
|
display: "inline-flex",
|
|
165
165
|
alignItems: "center",
|
|
166
166
|
justifyContent: "center",
|
|
@@ -189,32 +189,32 @@ function N({
|
|
|
189
189
|
style: h,
|
|
190
190
|
onClick: u,
|
|
191
191
|
disabled: y,
|
|
192
|
-
onMouseEnter: (
|
|
193
|
-
y || (
|
|
192
|
+
onMouseEnter: (b) => {
|
|
193
|
+
y || (b.currentTarget.style.background = c.hoverBg);
|
|
194
194
|
},
|
|
195
|
-
onMouseLeave: (
|
|
196
|
-
y || (
|
|
195
|
+
onMouseLeave: (b) => {
|
|
196
|
+
y || (b.currentTarget.style.background = c.background);
|
|
197
197
|
},
|
|
198
|
-
onFocus: (
|
|
199
|
-
|
|
198
|
+
onFocus: (b) => {
|
|
199
|
+
b.currentTarget.style.boxShadow = I.focus;
|
|
200
200
|
},
|
|
201
|
-
onBlur: (
|
|
202
|
-
|
|
201
|
+
onBlur: (b) => {
|
|
202
|
+
b.currentTarget.style.boxShadow = "none";
|
|
203
203
|
},
|
|
204
204
|
children: [
|
|
205
|
-
o ? /* @__PURE__ */ n(
|
|
205
|
+
o ? /* @__PURE__ */ n(X, {}) : d,
|
|
206
206
|
g
|
|
207
207
|
]
|
|
208
208
|
}
|
|
209
209
|
);
|
|
210
210
|
}
|
|
211
|
-
let
|
|
211
|
+
let A = !1;
|
|
212
212
|
function U() {
|
|
213
|
-
if (
|
|
213
|
+
if (A || typeof document > "u") return;
|
|
214
214
|
const r = document.createElement("style");
|
|
215
|
-
r.textContent = "@keyframes ol-spin { to { transform: rotate(360deg) } }", document.head.appendChild(r),
|
|
215
|
+
r.textContent = "@keyframes ol-spin { to { transform: rotate(360deg) } }", document.head.appendChild(r), A = !0;
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function X() {
|
|
218
218
|
return U(), /* @__PURE__ */ n(
|
|
219
219
|
"svg",
|
|
220
220
|
{
|
|
@@ -242,7 +242,7 @@ function K() {
|
|
|
242
242
|
}
|
|
243
243
|
);
|
|
244
244
|
}
|
|
245
|
-
const
|
|
245
|
+
const G = {
|
|
246
246
|
none: "0px",
|
|
247
247
|
sm: a[3],
|
|
248
248
|
md: a[6],
|
|
@@ -257,21 +257,21 @@ function ge({
|
|
|
257
257
|
const s = {
|
|
258
258
|
background: e.cardBg,
|
|
259
259
|
borderRadius: m.xl,
|
|
260
|
-
padding:
|
|
260
|
+
padding: G[r],
|
|
261
261
|
border: i ? "none" : `1px solid ${e.border}`,
|
|
262
262
|
boxShadow: o ? I.sm : I.none,
|
|
263
263
|
boxSizing: "border-box"
|
|
264
264
|
};
|
|
265
265
|
return /* @__PURE__ */ n("div", { style: s, children: l });
|
|
266
266
|
}
|
|
267
|
-
const
|
|
267
|
+
const K = {
|
|
268
268
|
success: { bg: e.successBg, color: e.success, dot: e.success },
|
|
269
269
|
warning: { bg: e.warningBg, color: e.warning, dot: e.warning },
|
|
270
270
|
error: { bg: e.errorBg, color: e.error, dot: e.error },
|
|
271
271
|
info: { bg: e.infoBg, color: e.info, dot: e.info },
|
|
272
272
|
neutral: { bg: e.neutralBg, color: e.neutralText, dot: e.textTertiary }
|
|
273
273
|
}, Y = z.memo(function({ tone: i, dot: o = !1, children: l }) {
|
|
274
|
-
const s =
|
|
274
|
+
const s = K[i], d = {
|
|
275
275
|
display: "inline-flex",
|
|
276
276
|
alignItems: "center",
|
|
277
277
|
gap: a[1],
|
|
@@ -406,11 +406,11 @@ function pe({ tabs: r, active: i, onChange: o, size: l = "md" }) {
|
|
|
406
406
|
role: "tab",
|
|
407
407
|
"aria-selected": c,
|
|
408
408
|
onClick: () => !c && o(p.id),
|
|
409
|
-
onMouseEnter: (
|
|
410
|
-
c || (
|
|
409
|
+
onMouseEnter: (b) => {
|
|
410
|
+
c || (b.currentTarget.style.background = e.neutralBg, b.currentTarget.style.color = e.textPrimary);
|
|
411
411
|
},
|
|
412
|
-
onMouseLeave: (
|
|
413
|
-
c || (
|
|
412
|
+
onMouseLeave: (b) => {
|
|
413
|
+
c || (b.currentTarget.style.background = "transparent", b.currentTarget.style.color = e.textSecondary);
|
|
414
414
|
},
|
|
415
415
|
children: [
|
|
416
416
|
p.label,
|
|
@@ -490,7 +490,7 @@ function he({
|
|
|
490
490
|
flexDirection: "column",
|
|
491
491
|
gap: a[1],
|
|
492
492
|
fontFamily: t.fontFamily.base
|
|
493
|
-
},
|
|
493
|
+
}, b = {
|
|
494
494
|
fontSize: t.size.base,
|
|
495
495
|
fontWeight: t.weight.medium,
|
|
496
496
|
color: e.textPrimary,
|
|
@@ -505,7 +505,7 @@ function he({
|
|
|
505
505
|
borderRadius: m.md,
|
|
506
506
|
transition: "border-color 150ms ease, box-shadow 150ms ease",
|
|
507
507
|
cursor: u ? "not-allowed" : "text"
|
|
508
|
-
},
|
|
508
|
+
}, x = {
|
|
509
509
|
flex: 1,
|
|
510
510
|
border: "none",
|
|
511
511
|
outline: "none",
|
|
@@ -516,17 +516,17 @@ function he({
|
|
|
516
516
|
cursor: u ? "not-allowed" : "text",
|
|
517
517
|
padding: 0,
|
|
518
518
|
width: "100%"
|
|
519
|
-
},
|
|
519
|
+
}, k = {
|
|
520
520
|
fontSize: t.size.sm,
|
|
521
521
|
color: y ? e.error : e.textTertiary,
|
|
522
522
|
margin: 0
|
|
523
|
-
},
|
|
523
|
+
}, S = {
|
|
524
524
|
fontSize: t.size.base,
|
|
525
525
|
color: e.textTertiary,
|
|
526
526
|
flexShrink: 0
|
|
527
527
|
};
|
|
528
528
|
return /* @__PURE__ */ f("div", { style: h, children: [
|
|
529
|
-
r && /* @__PURE__ */ n("p", { style:
|
|
529
|
+
r && /* @__PURE__ */ n("p", { style: b, children: r }),
|
|
530
530
|
/* @__PURE__ */ f(
|
|
531
531
|
"div",
|
|
532
532
|
{
|
|
@@ -540,7 +540,7 @@ function he({
|
|
|
540
540
|
M.style.borderColor = y ? e.error : e.border, M.style.boxShadow = "none";
|
|
541
541
|
},
|
|
542
542
|
children: [
|
|
543
|
-
l && /* @__PURE__ */ n("span", { style:
|
|
543
|
+
l && /* @__PURE__ */ n("span", { style: S, children: l }),
|
|
544
544
|
/* @__PURE__ */ n(
|
|
545
545
|
"input",
|
|
546
546
|
{
|
|
@@ -550,14 +550,14 @@ function he({
|
|
|
550
550
|
placeholder: g,
|
|
551
551
|
disabled: u,
|
|
552
552
|
"aria-invalid": y,
|
|
553
|
-
style:
|
|
553
|
+
style: x
|
|
554
554
|
}
|
|
555
555
|
),
|
|
556
|
-
s && /* @__PURE__ */ n("span", { style:
|
|
556
|
+
s && /* @__PURE__ */ n("span", { style: S, children: s })
|
|
557
557
|
]
|
|
558
558
|
}
|
|
559
559
|
),
|
|
560
|
-
(o || i) && /* @__PURE__ */ n("p", { style:
|
|
560
|
+
(o || i) && /* @__PURE__ */ n("p", { style: k, children: o || i })
|
|
561
561
|
] });
|
|
562
562
|
}
|
|
563
563
|
function J(r) {
|
|
@@ -585,7 +585,7 @@ const me = z.memo(function({
|
|
|
585
585
|
background: p,
|
|
586
586
|
borderRadius: m.full,
|
|
587
587
|
overflow: "hidden"
|
|
588
|
-
},
|
|
588
|
+
}, b = {
|
|
589
589
|
height: "100%",
|
|
590
590
|
width: `${g}%`,
|
|
591
591
|
background: u,
|
|
@@ -599,21 +599,21 @@ const me = z.memo(function({
|
|
|
599
599
|
textAlign: "right"
|
|
600
600
|
};
|
|
601
601
|
return /* @__PURE__ */ f("div", { style: y, children: [
|
|
602
|
-
/* @__PURE__ */ n("div", { style: h, children: /* @__PURE__ */ n("div", { style:
|
|
602
|
+
/* @__PURE__ */ n("div", { style: h, children: /* @__PURE__ */ n("div", { style: b }) }),
|
|
603
603
|
s && /* @__PURE__ */ f("span", { style: w, children: [
|
|
604
604
|
Math.round(g),
|
|
605
605
|
"%"
|
|
606
606
|
] })
|
|
607
607
|
] });
|
|
608
|
-
}),
|
|
609
|
-
function
|
|
608
|
+
}), R = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
609
|
+
function be({
|
|
610
610
|
open: r,
|
|
611
611
|
onClose: i,
|
|
612
612
|
children: o,
|
|
613
613
|
maxWidth: l = 400,
|
|
614
614
|
title: s
|
|
615
615
|
}) {
|
|
616
|
-
const [d, g] = C(!1), u =
|
|
616
|
+
const [d, g] = C(!1), u = O(null), p = z.useId();
|
|
617
617
|
if (T(() => {
|
|
618
618
|
if (!r) {
|
|
619
619
|
g(!1);
|
|
@@ -629,14 +629,14 @@ function xe({
|
|
|
629
629
|
return document.addEventListener("keydown", y), () => document.removeEventListener("keydown", y);
|
|
630
630
|
}, [r, i]), T(() => {
|
|
631
631
|
if (!r || !u.current) return;
|
|
632
|
-
const y = u.current, h = document.activeElement,
|
|
633
|
-
|
|
634
|
-
const w = (
|
|
635
|
-
if (
|
|
636
|
-
const
|
|
637
|
-
if (
|
|
638
|
-
const
|
|
639
|
-
|
|
632
|
+
const y = u.current, h = document.activeElement, b = y.querySelector(R);
|
|
633
|
+
b ? b.focus() : y.focus();
|
|
634
|
+
const w = (x) => {
|
|
635
|
+
if (x.key !== "Tab") return;
|
|
636
|
+
const k = y.querySelectorAll(R);
|
|
637
|
+
if (k.length === 0) return;
|
|
638
|
+
const S = k[0], F = k[k.length - 1];
|
|
639
|
+
x.shiftKey ? document.activeElement === S && (x.preventDefault(), F.focus()) : document.activeElement === F && (x.preventDefault(), S.focus());
|
|
640
640
|
};
|
|
641
641
|
return document.addEventListener("keydown", w), () => {
|
|
642
642
|
document.removeEventListener("keydown", w), h == null || h.focus();
|
|
@@ -762,7 +762,7 @@ function xe({
|
|
|
762
762
|
}
|
|
763
763
|
);
|
|
764
764
|
}
|
|
765
|
-
function
|
|
765
|
+
function xe({
|
|
766
766
|
options: r,
|
|
767
767
|
value: i,
|
|
768
768
|
onChange: o,
|
|
@@ -843,7 +843,7 @@ const Q = v(
|
|
|
843
843
|
/* @__PURE__ */ n("circle", { cx: "11", cy: "11", r: "8" }),
|
|
844
844
|
/* @__PURE__ */ n("path", { d: "M21 21l-4.35-4.35" })
|
|
845
845
|
] })
|
|
846
|
-
), Z = v("M20 6L9 17l-5-5"), ee = v("M18 6L6 18M6 6l12 12"), we = v("M3 12h18M3 6h18M3 18h18"),
|
|
846
|
+
), Z = v("M20 6L9 17l-5-5"), ee = v("M18 6L6 18M6 6l12 12"), we = v("M3 12h18M3 6h18M3 18h18"), E = v(
|
|
847
847
|
/* @__PURE__ */ f(B, { children: [
|
|
848
848
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10" }),
|
|
849
849
|
/* @__PURE__ */ n("path", { d: "M12 16v-4M12 8h.01" })
|
|
@@ -894,16 +894,16 @@ function Ae({
|
|
|
894
894
|
display: "flex",
|
|
895
895
|
flexDirection: "column",
|
|
896
896
|
gap: "2px"
|
|
897
|
-
},
|
|
897
|
+
}, b = {
|
|
898
898
|
fontSize: t.size.md,
|
|
899
899
|
fontWeight: t.weight.semibold,
|
|
900
900
|
color: r ? e.textInverse : e.textPrimary,
|
|
901
901
|
lineHeight: t.lineHeight.tight
|
|
902
|
-
}, w = {
|
|
902
|
+
}, w = z.useId(), x = {
|
|
903
903
|
fontSize: t.size.sm,
|
|
904
904
|
color: r ? e.textTertiary : e.textSecondary,
|
|
905
905
|
lineHeight: t.lineHeight.tight
|
|
906
|
-
},
|
|
906
|
+
}, k = {
|
|
907
907
|
width: "20px",
|
|
908
908
|
height: "20px",
|
|
909
909
|
borderRadius: m.xs,
|
|
@@ -921,6 +921,7 @@ function Ae({
|
|
|
921
921
|
style: c,
|
|
922
922
|
role: "checkbox",
|
|
923
923
|
"aria-checked": r,
|
|
924
|
+
"aria-labelledby": w,
|
|
924
925
|
tabIndex: p ? 0 : -1,
|
|
925
926
|
onClick: () => p && i(!r),
|
|
926
927
|
onKeyDown: (S) => {
|
|
@@ -934,13 +935,13 @@ function Ae({
|
|
|
934
935
|
},
|
|
935
936
|
children: [
|
|
936
937
|
/* @__PURE__ */ n("span", { style: y }),
|
|
937
|
-
/* @__PURE__ */ f("div", { style: h, children: [
|
|
938
|
-
/* @__PURE__ */ n("span", { style:
|
|
939
|
-
l && /* @__PURE__ */ n("span", { style:
|
|
938
|
+
/* @__PURE__ */ f("div", { style: h, id: w, children: [
|
|
939
|
+
/* @__PURE__ */ n("span", { style: b, children: o }),
|
|
940
|
+
l && /* @__PURE__ */ n("span", { style: x, children: l })
|
|
940
941
|
] }),
|
|
941
942
|
g && /* @__PURE__ */ n("div", { children: g }),
|
|
942
943
|
u && /* @__PURE__ */ n("div", { children: u }),
|
|
943
|
-
d ? /* @__PURE__ */ n(Q, { size: 16, style: { color: e.textTertiary } }) : /* @__PURE__ */ n("div", { style:
|
|
944
|
+
d ? /* @__PURE__ */ n(Q, { size: 16, style: { color: e.textTertiary } }) : /* @__PURE__ */ n("div", { style: k, children: r && /* @__PURE__ */ n("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ n(
|
|
944
945
|
"path",
|
|
945
946
|
{
|
|
946
947
|
d: "M2.5 6l2.5 2.5 4.5-4.5",
|
|
@@ -961,11 +962,11 @@ const ne = {
|
|
|
961
962
|
info: e.info,
|
|
962
963
|
neutral: e.textTertiary
|
|
963
964
|
};
|
|
964
|
-
let
|
|
965
|
+
let H = !1;
|
|
965
966
|
function re() {
|
|
966
|
-
if (
|
|
967
|
+
if (H || typeof document > "u") return;
|
|
967
968
|
const r = document.createElement("style");
|
|
968
|
-
r.textContent = "@keyframes ol-pulse { 0%, 100% { opacity: 1 } 50% { opacity: 0.4 } }", document.head.appendChild(r),
|
|
969
|
+
r.textContent = "@keyframes ol-pulse { 0%, 100% { opacity: 1 } 50% { opacity: 0.4 } }", document.head.appendChild(r), H = !0;
|
|
969
970
|
}
|
|
970
971
|
const Re = z.memo(function({ tone: i, size: o = "md", pulse: l = !1 }) {
|
|
971
972
|
l && re();
|
|
@@ -1070,8 +1071,8 @@ const ie = {
|
|
|
1070
1071
|
success: { IconComponent: Z, bg: e.cardBg, accent: e.success },
|
|
1071
1072
|
error: { IconComponent: ee, bg: e.cardBg, accent: e.error },
|
|
1072
1073
|
warning: { IconComponent: te, bg: e.cardBg, accent: e.warning },
|
|
1073
|
-
info: { IconComponent:
|
|
1074
|
-
neutral: { IconComponent:
|
|
1074
|
+
info: { IconComponent: E, bg: e.cardBg, accent: e.info },
|
|
1075
|
+
neutral: { IconComponent: E, bg: e.cardBg, accent: e.textTertiary }
|
|
1075
1076
|
};
|
|
1076
1077
|
function Pe({
|
|
1077
1078
|
open: r,
|
|
@@ -1087,12 +1088,12 @@ function Pe({
|
|
|
1087
1088
|
u(!1);
|
|
1088
1089
|
return;
|
|
1089
1090
|
}
|
|
1090
|
-
const
|
|
1091
|
-
return () => cancelAnimationFrame(
|
|
1091
|
+
const S = requestAnimationFrame(() => u(!0));
|
|
1092
|
+
return () => cancelAnimationFrame(S);
|
|
1092
1093
|
}, [r]), T(() => {
|
|
1093
1094
|
if (!r || s <= 0) return;
|
|
1094
|
-
const
|
|
1095
|
-
return () => clearTimeout(
|
|
1095
|
+
const S = setTimeout(i, s);
|
|
1096
|
+
return () => clearTimeout(S);
|
|
1096
1097
|
}, [r, s, i]), !r) return null;
|
|
1097
1098
|
const p = ie[l], c = {
|
|
1098
1099
|
position: "fixed",
|
|
@@ -1128,7 +1129,7 @@ function Pe({
|
|
|
1128
1129
|
fontWeight: t.weight.bold,
|
|
1129
1130
|
flexShrink: 0,
|
|
1130
1131
|
lineHeight: 1
|
|
1131
|
-
},
|
|
1132
|
+
}, b = {
|
|
1132
1133
|
flex: 1,
|
|
1133
1134
|
fontSize: t.size.base,
|
|
1134
1135
|
color: e.textPrimary,
|
|
@@ -1145,7 +1146,7 @@ function Pe({
|
|
|
1145
1146
|
textDecoration: "underline",
|
|
1146
1147
|
textUnderlineOffset: "2px",
|
|
1147
1148
|
fontFamily: t.fontFamily.base
|
|
1148
|
-
},
|
|
1149
|
+
}, x = {
|
|
1149
1150
|
width: "24px",
|
|
1150
1151
|
height: "24px",
|
|
1151
1152
|
display: "flex",
|
|
@@ -1157,29 +1158,29 @@ function Pe({
|
|
|
1157
1158
|
cursor: "pointer",
|
|
1158
1159
|
color: e.textTertiary,
|
|
1159
1160
|
flexShrink: 0
|
|
1160
|
-
},
|
|
1161
|
+
}, k = p.IconComponent;
|
|
1161
1162
|
return /* @__PURE__ */ n("div", { style: c, children: /* @__PURE__ */ f("div", { style: y, children: [
|
|
1162
|
-
/* @__PURE__ */ n("span", { style: h, children: /* @__PURE__ */ n(
|
|
1163
|
-
/* @__PURE__ */ n("span", { style:
|
|
1163
|
+
/* @__PURE__ */ n("span", { style: h, children: /* @__PURE__ */ n(k, { size: 14 }) }),
|
|
1164
|
+
/* @__PURE__ */ n("span", { style: b, children: o }),
|
|
1164
1165
|
d && /* @__PURE__ */ n("button", { style: w, onClick: d.onClick, children: d.label }),
|
|
1165
1166
|
/* @__PURE__ */ n(
|
|
1166
1167
|
"button",
|
|
1167
1168
|
{
|
|
1168
|
-
style:
|
|
1169
|
+
style: x,
|
|
1169
1170
|
onClick: i,
|
|
1170
1171
|
"aria-label": "Dismiss",
|
|
1171
|
-
onMouseEnter: (
|
|
1172
|
-
|
|
1172
|
+
onMouseEnter: (S) => {
|
|
1173
|
+
S.currentTarget.style.background = e.pageBg;
|
|
1173
1174
|
},
|
|
1174
|
-
onMouseLeave: (
|
|
1175
|
-
|
|
1175
|
+
onMouseLeave: (S) => {
|
|
1176
|
+
S.currentTarget.style.background = "transparent";
|
|
1176
1177
|
},
|
|
1177
1178
|
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
|
}
|
|
1179
1180
|
)
|
|
1180
1181
|
] }) });
|
|
1181
1182
|
}
|
|
1182
|
-
const
|
|
1183
|
+
const P = z.memo(function({ children: i }) {
|
|
1183
1184
|
const o = {
|
|
1184
1185
|
fontFamily: t.fontFamily.mono,
|
|
1185
1186
|
fontSize: t.size.sm,
|
|
@@ -1231,7 +1232,7 @@ function je({ title: r, handle: i, field: o, csvVal: l, storeVal: s, type: d, no
|
|
|
1231
1232
|
/* @__PURE__ */ n("p", { style: { ...p, fontWeight: t.weight.bold }, children: r }),
|
|
1232
1233
|
/* @__PURE__ */ n("p", { style: c, children: i })
|
|
1233
1234
|
] }),
|
|
1234
|
-
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
|
|
1235
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(P, { children: o }) }),
|
|
1235
1236
|
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n("p", { style: { ...p, color: l ? e.textPrimary : e.error }, children: l || "(blank)" }) }),
|
|
1236
1237
|
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n("p", { style: { ...p, color: e.textTertiary }, children: s || "—" }) }),
|
|
1237
1238
|
/* @__PURE__ */ f("div", { children: [
|
|
@@ -1263,7 +1264,7 @@ function se({ severity: r, field: i, rowCount: o, message: l, fixable: s, onFix:
|
|
|
1263
1264
|
display: "flex",
|
|
1264
1265
|
alignItems: "center",
|
|
1265
1266
|
justifyContent: "space-between"
|
|
1266
|
-
},
|
|
1267
|
+
}, b = {
|
|
1267
1268
|
display: "flex",
|
|
1268
1269
|
alignItems: "center",
|
|
1269
1270
|
gap: a[3],
|
|
@@ -1279,9 +1280,9 @@ function se({ severity: r, field: i, rowCount: o, message: l, fixable: s, onFix:
|
|
|
1279
1280
|
};
|
|
1280
1281
|
return /* @__PURE__ */ f("div", { style: y, children: [
|
|
1281
1282
|
/* @__PURE__ */ f("div", { style: h, children: [
|
|
1282
|
-
/* @__PURE__ */ f("div", { style:
|
|
1283
|
+
/* @__PURE__ */ f("div", { style: b, children: [
|
|
1283
1284
|
/* @__PURE__ */ n(Y, { tone: c.tone, dot: !0, children: r.charAt(0).toUpperCase() + r.slice(1) }),
|
|
1284
|
-
/* @__PURE__ */ n(
|
|
1285
|
+
/* @__PURE__ */ n(P, { children: i }),
|
|
1285
1286
|
/* @__PURE__ */ f("span", { style: w, children: [
|
|
1286
1287
|
o.toLocaleString(),
|
|
1287
1288
|
" rows affected"
|
|
@@ -1308,7 +1309,7 @@ function se({ severity: r, field: i, rowCount: o, message: l, fixable: s, onFix:
|
|
|
1308
1309
|
}
|
|
1309
1310
|
) }),
|
|
1310
1311
|
g && /* @__PURE__ */ f("div", { style: { display: "flex", gap: a[2], marginTop: a[1], flexWrap: "wrap" }, children: [
|
|
1311
|
-
[1, 2, 3].map((
|
|
1312
|
+
[1, 2, 3].map((x) => /* @__PURE__ */ f("span", { style: {
|
|
1312
1313
|
fontSize: t.size.xs,
|
|
1313
1314
|
border: `1px solid ${e.border}`,
|
|
1314
1315
|
padding: `2px ${a[2]}`,
|
|
@@ -1316,8 +1317,8 @@ function se({ severity: r, field: i, rowCount: o, message: l, fixable: s, onFix:
|
|
|
1316
1317
|
color: e.textSecondary
|
|
1317
1318
|
}, children: [
|
|
1318
1319
|
"row ",
|
|
1319
|
-
|
|
1320
|
-
] },
|
|
1320
|
+
x
|
|
1321
|
+
] }, x)),
|
|
1321
1322
|
o > 3 && /* @__PURE__ */ f("span", { style: { fontSize: t.size.xs, color: e.textTertiary, alignSelf: "center" }, children: [
|
|
1322
1323
|
"+ ",
|
|
1323
1324
|
o - 3,
|
|
@@ -1327,7 +1328,7 @@ function se({ severity: r, field: i, rowCount: o, message: l, fixable: s, onFix:
|
|
|
1327
1328
|
] });
|
|
1328
1329
|
}
|
|
1329
1330
|
function Ve({ category: r, issues: i, defaultOpen: o = !0 }) {
|
|
1330
|
-
const [l, s] = C(o), d = i.some((
|
|
1331
|
+
const [l, s] = C(o), d = i.some((x) => x.severity === "error"), g = i.some((x) => x.severity === "warning"), u = d ? e.error : g ? e.warning : e.info, p = i.reduce((x, k) => x + k.rowCount, 0), c = {
|
|
1331
1332
|
backgroundColor: e.cardBg,
|
|
1332
1333
|
borderRadius: m.lg,
|
|
1333
1334
|
border: `1px solid ${e.border}`,
|
|
@@ -1347,7 +1348,7 @@ function Ve({ category: r, issues: i, defaultOpen: o = !0 }) {
|
|
|
1347
1348
|
display: "flex",
|
|
1348
1349
|
alignItems: "center",
|
|
1349
1350
|
gap: a[3]
|
|
1350
|
-
},
|
|
1351
|
+
}, b = {
|
|
1351
1352
|
width: 8,
|
|
1352
1353
|
height: 8,
|
|
1353
1354
|
borderRadius: "50%",
|
|
@@ -1365,7 +1366,7 @@ function Ve({ category: r, issues: i, defaultOpen: o = !0 }) {
|
|
|
1365
1366
|
return /* @__PURE__ */ f("div", { style: c, children: [
|
|
1366
1367
|
/* @__PURE__ */ f("div", { style: y, onClick: () => s(!l), children: [
|
|
1367
1368
|
/* @__PURE__ */ f("div", { style: h, children: [
|
|
1368
|
-
/* @__PURE__ */ n("span", { style:
|
|
1369
|
+
/* @__PURE__ */ n("span", { style: b }),
|
|
1369
1370
|
/* @__PURE__ */ n("span", { style: { fontSize: t.size.lg, fontWeight: t.weight.bold, color: e.textPrimary }, children: r })
|
|
1370
1371
|
] }),
|
|
1371
1372
|
/* @__PURE__ */ f("div", { style: { display: "flex", alignItems: "center", gap: a[3] }, children: [
|
|
@@ -1381,9 +1382,9 @@ function Ve({ category: r, issues: i, defaultOpen: o = !0 }) {
|
|
|
1381
1382
|
}, children: "▼" })
|
|
1382
1383
|
] })
|
|
1383
1384
|
] }),
|
|
1384
|
-
l && /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column" }, children: i.map((
|
|
1385
|
-
borderBottom:
|
|
1386
|
-
}, children: /* @__PURE__ */ n(se, { ...
|
|
1385
|
+
l && /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column" }, children: i.map((x, k) => /* @__PURE__ */ n("div", { style: {
|
|
1386
|
+
borderBottom: k === i.length - 1 ? "none" : `1px solid ${e.borderSubtle}`
|
|
1387
|
+
}, children: /* @__PURE__ */ n(se, { ...x }) }, k)) })
|
|
1387
1388
|
] });
|
|
1388
1389
|
}
|
|
1389
1390
|
const Oe = z.memo(function({ value: i, label: o, tone: l = "neutral" }) {
|
|
@@ -1448,7 +1449,7 @@ const Oe = z.memo(function({ value: i, label: o, tone: l = "neutral" }) {
|
|
|
1448
1449
|
};
|
|
1449
1450
|
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
|
});
|
|
1451
|
-
function
|
|
1452
|
+
function Xe({ steps: r }) {
|
|
1452
1453
|
const i = {
|
|
1453
1454
|
display: "flex",
|
|
1454
1455
|
flexDirection: "column",
|
|
@@ -1495,7 +1496,7 @@ function Ke({ steps: r }) {
|
|
|
1495
1496
|
] }, o.id);
|
|
1496
1497
|
}) });
|
|
1497
1498
|
}
|
|
1498
|
-
function
|
|
1499
|
+
function Ge({
|
|
1499
1500
|
checked: r,
|
|
1500
1501
|
onChange: i,
|
|
1501
1502
|
value: o,
|
|
@@ -1505,14 +1506,14 @@ function Xe({
|
|
|
1505
1506
|
description: g,
|
|
1506
1507
|
id: u
|
|
1507
1508
|
}) {
|
|
1508
|
-
const [p, c] = C(!1), [y, h] = C(!1),
|
|
1509
|
+
const [p, c] = C(!1), [y, h] = C(!1), b = z.useId(), w = u || b, x = {
|
|
1509
1510
|
display: "flex",
|
|
1510
1511
|
alignItems: "flex-start",
|
|
1511
1512
|
gap: a[3],
|
|
1512
1513
|
opacity: s ? 0.5 : 1,
|
|
1513
1514
|
cursor: s ? "not-allowed" : "pointer",
|
|
1514
1515
|
fontFamily: t.fontFamily.base
|
|
1515
|
-
},
|
|
1516
|
+
}, k = {
|
|
1516
1517
|
position: "relative",
|
|
1517
1518
|
width: "18px",
|
|
1518
1519
|
height: "18px",
|
|
@@ -1525,7 +1526,7 @@ function Xe({
|
|
|
1525
1526
|
outline: "none",
|
|
1526
1527
|
marginTop: "1px"
|
|
1527
1528
|
// Optical alignment
|
|
1528
|
-
},
|
|
1529
|
+
}, S = {
|
|
1529
1530
|
position: "absolute",
|
|
1530
1531
|
top: "50%",
|
|
1531
1532
|
left: "50%",
|
|
@@ -1545,7 +1546,7 @@ function Xe({
|
|
|
1545
1546
|
color: e.textPrimary,
|
|
1546
1547
|
margin: 0,
|
|
1547
1548
|
cursor: s ? "not-allowed" : "pointer"
|
|
1548
|
-
},
|
|
1549
|
+
}, j = {
|
|
1549
1550
|
fontSize: t.size.sm,
|
|
1550
1551
|
color: e.textSecondary,
|
|
1551
1552
|
margin: 0
|
|
@@ -1553,7 +1554,7 @@ function Xe({
|
|
|
1553
1554
|
return /* @__PURE__ */ f(
|
|
1554
1555
|
"label",
|
|
1555
1556
|
{
|
|
1556
|
-
style:
|
|
1557
|
+
style: x,
|
|
1557
1558
|
htmlFor: w,
|
|
1558
1559
|
onMouseEnter: () => h(!0),
|
|
1559
1560
|
onMouseLeave: () => h(!1),
|
|
@@ -1568,8 +1569,8 @@ function Xe({
|
|
|
1568
1569
|
value: o,
|
|
1569
1570
|
checked: r,
|
|
1570
1571
|
disabled: s,
|
|
1571
|
-
onChange: (
|
|
1572
|
-
s || i(
|
|
1572
|
+
onChange: (V) => {
|
|
1573
|
+
s || i(V.target.checked);
|
|
1573
1574
|
},
|
|
1574
1575
|
onFocus: () => c(!0),
|
|
1575
1576
|
onBlur: () => c(!1),
|
|
@@ -1582,17 +1583,17 @@ function Xe({
|
|
|
1582
1583
|
}
|
|
1583
1584
|
}
|
|
1584
1585
|
),
|
|
1585
|
-
/* @__PURE__ */ n("div", { style:
|
|
1586
|
+
/* @__PURE__ */ n("div", { style: k, "aria-hidden": "true", children: /* @__PURE__ */ n("div", { style: S }) })
|
|
1586
1587
|
] }),
|
|
1587
1588
|
(d || g) && /* @__PURE__ */ f("div", { style: F, children: [
|
|
1588
1589
|
d && /* @__PURE__ */ n("span", { style: M, children: d }),
|
|
1589
|
-
g && /* @__PURE__ */ n("span", { style:
|
|
1590
|
+
g && /* @__PURE__ */ n("span", { style: j, children: g })
|
|
1590
1591
|
] })
|
|
1591
1592
|
]
|
|
1592
1593
|
}
|
|
1593
1594
|
);
|
|
1594
1595
|
}
|
|
1595
|
-
function
|
|
1596
|
+
function Ke({ steps: r, current: i }) {
|
|
1596
1597
|
const o = {
|
|
1597
1598
|
display: "flex",
|
|
1598
1599
|
justifyContent: "space-between",
|
|
@@ -1632,7 +1633,7 @@ function Ge({ steps: r, current: i }) {
|
|
|
1632
1633
|
zIndex: 2,
|
|
1633
1634
|
position: "relative",
|
|
1634
1635
|
transition: "all 300ms ease"
|
|
1635
|
-
},
|
|
1636
|
+
}, b = {
|
|
1636
1637
|
position: "absolute",
|
|
1637
1638
|
top: l + 8,
|
|
1638
1639
|
left: "50%",
|
|
@@ -1649,7 +1650,7 @@ function Ge({ steps: r, current: i }) {
|
|
|
1649
1650
|
alignItems: "center"
|
|
1650
1651
|
}, children: [
|
|
1651
1652
|
/* @__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:
|
|
1653
|
+
/* @__PURE__ */ n("span", { style: b, children: g })
|
|
1653
1654
|
] }, g);
|
|
1654
1655
|
})
|
|
1655
1656
|
] });
|
|
@@ -1704,7 +1705,7 @@ function qe({ checked: r, onChange: i, disabled: o = !1, label: l, description:
|
|
|
1704
1705
|
flexShrink: 0,
|
|
1705
1706
|
boxShadow: g ? I.focus : "none",
|
|
1706
1707
|
outline: "none"
|
|
1707
|
-
},
|
|
1708
|
+
}, b = {
|
|
1708
1709
|
position: "absolute",
|
|
1709
1710
|
top: "2px",
|
|
1710
1711
|
left: r ? "calc(100% - 18px)" : "2px",
|
|
@@ -1720,16 +1721,18 @@ function qe({ checked: r, onChange: i, disabled: o = !1, label: l, description:
|
|
|
1720
1721
|
gap: a[1],
|
|
1721
1722
|
marginTop: "1px"
|
|
1722
1723
|
// Optical alignment with switch thumb
|
|
1723
|
-
},
|
|
1724
|
+
}, x = {
|
|
1724
1725
|
fontSize: t.size.md,
|
|
1725
1726
|
fontWeight: t.weight.medium,
|
|
1726
1727
|
color: e.textPrimary,
|
|
1727
1728
|
margin: 0,
|
|
1728
1729
|
cursor: o ? "not-allowed" : "pointer"
|
|
1729
|
-
},
|
|
1730
|
+
}, k = {
|
|
1730
1731
|
fontSize: t.size.sm,
|
|
1731
1732
|
color: e.textSecondary,
|
|
1732
1733
|
margin: 0
|
|
1734
|
+
}, S = (F) => {
|
|
1735
|
+
(F.key === " " || F.key === "Enter") && (F.preventDefault(), o || i(!r));
|
|
1733
1736
|
};
|
|
1734
1737
|
return /* @__PURE__ */ f(
|
|
1735
1738
|
"label",
|
|
@@ -1746,22 +1749,21 @@ function qe({ checked: r, onChange: i, disabled: o = !1, label: l, description:
|
|
|
1746
1749
|
role: "switch",
|
|
1747
1750
|
"aria-checked": r,
|
|
1748
1751
|
"aria-disabled": o,
|
|
1752
|
+
"aria-labelledby": l || s ? `${c}-label` : void 0,
|
|
1749
1753
|
tabIndex: o ? -1 : 0,
|
|
1750
|
-
onKeyDown:
|
|
1751
|
-
(F.key === " " || F.key === "Enter") && (F.preventDefault(), o || i(!r));
|
|
1752
|
-
},
|
|
1754
|
+
onKeyDown: S,
|
|
1753
1755
|
onFocus: () => u(!0),
|
|
1754
1756
|
onBlur: () => u(!1),
|
|
1755
1757
|
onClick: (F) => {
|
|
1756
1758
|
F.preventDefault(), o || i(!r);
|
|
1757
1759
|
},
|
|
1758
1760
|
style: h,
|
|
1759
|
-
children: /* @__PURE__ */ n("div", { style:
|
|
1761
|
+
children: /* @__PURE__ */ n("div", { style: b })
|
|
1760
1762
|
}
|
|
1761
1763
|
),
|
|
1762
|
-
(l || s) && /* @__PURE__ */ f("div", { style: w, children: [
|
|
1763
|
-
l && /* @__PURE__ */ n("span", { style:
|
|
1764
|
-
s && /* @__PURE__ */ n("span", { style:
|
|
1764
|
+
(l || s) && /* @__PURE__ */ f("div", { style: w, id: `${c}-label`, children: [
|
|
1765
|
+
l && /* @__PURE__ */ n("span", { style: x, children: l }),
|
|
1766
|
+
s && /* @__PURE__ */ n("span", { style: k, children: s })
|
|
1765
1767
|
] })
|
|
1766
1768
|
]
|
|
1767
1769
|
}
|
|
@@ -1836,24 +1838,24 @@ export {
|
|
|
1836
1838
|
Le as ChevronLeftIcon,
|
|
1837
1839
|
$e as ChevronRightIcon,
|
|
1838
1840
|
De as ChevronUpIcon,
|
|
1839
|
-
|
|
1841
|
+
P as CodeChip,
|
|
1840
1842
|
ye as DataTable,
|
|
1841
1843
|
je as DiffRow,
|
|
1842
1844
|
Ce as DownloadIcon,
|
|
1843
|
-
|
|
1845
|
+
E as InfoIcon,
|
|
1844
1846
|
he as Input,
|
|
1845
1847
|
se as IssueCard,
|
|
1846
1848
|
Ve as IssueGroup,
|
|
1847
1849
|
Q as LockIcon,
|
|
1848
1850
|
we as MenuIcon,
|
|
1849
1851
|
Oe as MiniStat,
|
|
1850
|
-
|
|
1852
|
+
be as Modal,
|
|
1851
1853
|
Ne as ModelTag,
|
|
1852
1854
|
Ee as PageHeader,
|
|
1853
1855
|
ve as PlayIcon,
|
|
1854
1856
|
Ue as ProgressBar,
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
+
Xe as ProgressList,
|
|
1858
|
+
Ge as Radio,
|
|
1857
1859
|
me as ScoreBar,
|
|
1858
1860
|
Se as SearchIcon,
|
|
1859
1861
|
fe as SectionLabel,
|
|
@@ -1861,12 +1863,12 @@ export {
|
|
|
1861
1863
|
ke as StarIcon,
|
|
1862
1864
|
ue as StatGrid,
|
|
1863
1865
|
Re as StatusDot,
|
|
1864
|
-
|
|
1866
|
+
Ke as StepBar,
|
|
1865
1867
|
Ye as SummaryCard,
|
|
1866
1868
|
qe as Switch,
|
|
1867
1869
|
pe as TabBar,
|
|
1868
1870
|
Pe as Toast,
|
|
1869
|
-
|
|
1871
|
+
xe as ToggleGroup,
|
|
1870
1872
|
Je as Trend,
|
|
1871
1873
|
ze as UploadIcon,
|
|
1872
1874
|
ee as XIcon,
|