@vacano/ui 1.15.1 → 1.15.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 +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +194 -193
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { j as a, a as m, F as Qe, X as Et, e as Xt, L as Yt } from "./X-DAuAfjix
|
|
|
6
6
|
import { css as De, Global as Wt, keyframes as U } from "@emotion/react";
|
|
7
7
|
import { useState as L, useCallback as E, Children as Nt, isValidElement as Ge, cloneElement as Ct, useEffect as Z, createContext as Se, useContext as ke, useRef as B, useLayoutEffect as It, useReducer as Tt, useMemo as $e } from "react";
|
|
8
8
|
import { s as d, B as ve, i as Ut } from "./ToggleGroup-C44x4Sx1.js";
|
|
9
|
-
import { A as rc, C as nc, a as ic, b as lc, j as ac, D as dc, F as cc, l as sc, I as pc, m as
|
|
9
|
+
import { A as rc, C as nc, a as ic, b as lc, j as ac, D as dc, F as cc, l as sc, I as pc, m as gc, K as uc, n as hc, M as fc, O as xc, R as bc, c as $c, d as yc, S as mc, T as vc, e as wc, f as Sc, g as kc, h as zc, k as Ec } from "./ToggleGroup-C44x4Sx1.js";
|
|
10
10
|
import { n as z } from "./tooling-YDHxmiMT.js";
|
|
11
11
|
import { createPortal as et } from "react-dom";
|
|
12
12
|
import { C as qt, a as Vt, b as Zt } from "./CircleX-RQVijA2m.js";
|
|
@@ -137,13 +137,13 @@ const Gt = De`
|
|
|
137
137
|
cursor: ${({ $disabled: e }) => e ? "not-allowed" : "pointer"};
|
|
138
138
|
font-size: 14px;
|
|
139
139
|
font-weight: 600;
|
|
140
|
-
color: ${i.black};
|
|
140
|
+
color: ${({ $expanded: e }) => e ? i.black : i["iron-grey"]};
|
|
141
141
|
text-align: left;
|
|
142
142
|
outline: none;
|
|
143
143
|
transition: color 0.2s ease;
|
|
144
144
|
|
|
145
145
|
&:hover {
|
|
146
|
-
color: ${i
|
|
146
|
+
color: ${i.black};
|
|
147
147
|
}
|
|
148
148
|
`, eo = d.span`
|
|
149
149
|
display: flex;
|
|
@@ -176,9 +176,9 @@ const Gt = De`
|
|
|
176
176
|
ref: s,
|
|
177
177
|
value: c,
|
|
178
178
|
variant: p = "outlined",
|
|
179
|
-
...
|
|
179
|
+
...u
|
|
180
180
|
}) => {
|
|
181
|
-
const [
|
|
181
|
+
const [g, h] = L(o), x = c !== void 0, f = x ? c : g, y = E(
|
|
182
182
|
(b) => {
|
|
183
183
|
const $ = f.includes(b);
|
|
184
184
|
let v;
|
|
@@ -189,7 +189,7 @@ const Gt = De`
|
|
|
189
189
|
return /* @__PURE__ */ a(
|
|
190
190
|
Kt,
|
|
191
191
|
{
|
|
192
|
-
...
|
|
192
|
+
...u,
|
|
193
193
|
ref: s,
|
|
194
194
|
$variant: p,
|
|
195
195
|
className: pe("container", e),
|
|
@@ -209,6 +209,7 @@ const Gt = De`
|
|
|
209
209
|
type: "button",
|
|
210
210
|
"aria-expanded": $,
|
|
211
211
|
$disabled: !!b.disabled,
|
|
212
|
+
$expanded: $,
|
|
212
213
|
disabled: b.disabled,
|
|
213
214
|
onClick: () => y(b.value),
|
|
214
215
|
className: pe("trigger", t == null ? void 0 : t.trigger),
|
|
@@ -287,7 +288,7 @@ const Gt = De`
|
|
|
287
288
|
font-weight: 600;
|
|
288
289
|
color: ${i.black};
|
|
289
290
|
line-height: 1.4;
|
|
290
|
-
`,
|
|
291
|
+
`, go = d.div`
|
|
291
292
|
font-size: 14px;
|
|
292
293
|
color: ${i["iron-grey"]};
|
|
293
294
|
line-height: 1.5;
|
|
@@ -314,11 +315,11 @@ const Gt = De`
|
|
|
314
315
|
r && /* @__PURE__ */ a(co, { $variant: c, className: ze("icon", t == null ? void 0 : t.icon), children: /* @__PURE__ */ a("span", { children: r }) }),
|
|
315
316
|
/* @__PURE__ */ m(so, { children: [
|
|
316
317
|
s && /* @__PURE__ */ a(po, { className: ze("title", t == null ? void 0 : t.title), children: s }),
|
|
317
|
-
o && /* @__PURE__ */ a(
|
|
318
|
+
o && /* @__PURE__ */ a(go, { className: ze("description", t == null ? void 0 : t.description), children: o })
|
|
318
319
|
] })
|
|
319
320
|
]
|
|
320
321
|
}
|
|
321
|
-
),
|
|
322
|
+
), uo = (e) => {
|
|
322
323
|
var o, r;
|
|
323
324
|
const t = e.trim().split(/\s+/);
|
|
324
325
|
if (t.length >= 2) {
|
|
@@ -387,7 +388,7 @@ const Gt = De`
|
|
|
387
388
|
}
|
|
388
389
|
`, bo = d.span`
|
|
389
390
|
letter-spacing: 0.5px;
|
|
390
|
-
`,
|
|
391
|
+
`, ge = z("avatar"), $o = ({
|
|
391
392
|
bordered: e = !1,
|
|
392
393
|
className: t,
|
|
393
394
|
classnames: o,
|
|
@@ -397,18 +398,18 @@ const Gt = De`
|
|
|
397
398
|
name: s,
|
|
398
399
|
radius: c = "full",
|
|
399
400
|
ref: p,
|
|
400
|
-
size:
|
|
401
|
-
src:
|
|
401
|
+
size: u = "md",
|
|
402
|
+
src: g,
|
|
402
403
|
...h
|
|
403
404
|
}) => {
|
|
404
|
-
const [x, f] = L(!1), y =
|
|
405
|
+
const [x, f] = L(!1), y = g && !x;
|
|
405
406
|
return /* @__PURE__ */ a(
|
|
406
407
|
fo,
|
|
407
408
|
{
|
|
408
409
|
...h,
|
|
409
410
|
ref: p,
|
|
410
|
-
className:
|
|
411
|
-
$size:
|
|
411
|
+
className: ge("container", t),
|
|
412
|
+
$size: u,
|
|
412
413
|
$radius: c,
|
|
413
414
|
$color: r,
|
|
414
415
|
$bordered: e,
|
|
@@ -416,12 +417,12 @@ const Gt = De`
|
|
|
416
417
|
children: y ? /* @__PURE__ */ a(
|
|
417
418
|
xo,
|
|
418
419
|
{
|
|
419
|
-
className:
|
|
420
|
-
src:
|
|
420
|
+
className: ge("image", o == null ? void 0 : o.image),
|
|
421
|
+
src: g,
|
|
421
422
|
alt: s || "",
|
|
422
423
|
onError: () => f(!0)
|
|
423
424
|
}
|
|
424
|
-
) : l ? /* @__PURE__ */ a(ot, { className:
|
|
425
|
+
) : l ? /* @__PURE__ */ a(ot, { className: ge("fallback", o == null ? void 0 : o.fallback), $size: u, children: l }) : s ? /* @__PURE__ */ a(bo, { className: ge("initials", o == null ? void 0 : o.initials), children: uo(s) }) : /* @__PURE__ */ a(ot, { className: ge("fallback", o == null ? void 0 : o.fallback), $size: u, children: /* @__PURE__ */ a("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" }) }) })
|
|
425
426
|
}
|
|
426
427
|
);
|
|
427
428
|
}, yo = d.div`
|
|
@@ -453,14 +454,14 @@ const Gt = De`
|
|
|
453
454
|
size: l = "md",
|
|
454
455
|
...s
|
|
455
456
|
}) => {
|
|
456
|
-
const c = Nt.toArray(e).filter(Ge), p = c.slice(0, r),
|
|
457
|
+
const c = Nt.toArray(e).filter(Ge), p = c.slice(0, r), u = c.length - r;
|
|
457
458
|
return /* @__PURE__ */ m(yo, { ...s, ref: n, className: rt("container", t), $size: l, children: [
|
|
458
459
|
p.map(
|
|
459
|
-
(
|
|
460
|
+
(g) => Ge(g) ? Ct(g, { size: l }) : g
|
|
460
461
|
),
|
|
461
|
-
|
|
462
|
+
u > 0 && /* @__PURE__ */ m(mo, { className: rt("count", o == null ? void 0 : o.count), $size: l, children: [
|
|
462
463
|
"+",
|
|
463
|
-
|
|
464
|
+
u
|
|
464
465
|
] })
|
|
465
466
|
] });
|
|
466
467
|
}, vo = {
|
|
@@ -545,8 +546,8 @@ const Gt = De`
|
|
|
545
546
|
invisible: s = !1,
|
|
546
547
|
placement: c = "top-right",
|
|
547
548
|
ref: p,
|
|
548
|
-
shape:
|
|
549
|
-
showOutline:
|
|
549
|
+
shape: u = "rectangle",
|
|
550
|
+
showOutline: g = !0,
|
|
550
551
|
size: h = "md",
|
|
551
552
|
variant: x = "solid",
|
|
552
553
|
...f
|
|
@@ -560,8 +561,8 @@ const Gt = De`
|
|
|
560
561
|
$dot: l,
|
|
561
562
|
$invisible: s,
|
|
562
563
|
$placement: c,
|
|
563
|
-
$shape:
|
|
564
|
-
$showOutline:
|
|
564
|
+
$shape: u,
|
|
565
|
+
$showOutline: g,
|
|
565
566
|
$size: h,
|
|
566
567
|
$variant: x,
|
|
567
568
|
children: !l && n
|
|
@@ -678,15 +679,15 @@ const Gt = De`
|
|
|
678
679
|
maxItems: s,
|
|
679
680
|
ref: c,
|
|
680
681
|
separator: p,
|
|
681
|
-
size:
|
|
682
|
-
variant:
|
|
682
|
+
size: u = "md",
|
|
683
|
+
variant: g = "light",
|
|
683
684
|
...h
|
|
684
685
|
}) => {
|
|
685
686
|
const x = Nt.toArray(e).filter(
|
|
686
687
|
(w) => Ge(w)
|
|
687
|
-
), f = x.length, y = s !== void 0 && f > s, b = (w) => /* @__PURE__ */ a(Io, { className: Ee("separator", o == null ? void 0 : o.separator), $size:
|
|
688
|
+
), f = x.length, y = s !== void 0 && f > s, b = (w) => /* @__PURE__ */ a(Io, { className: Ee("separator", o == null ? void 0 : o.separator), $size: u, children: p || /* @__PURE__ */ a(Lo, {}) }, w), $ = (w, S, I) => {
|
|
688
689
|
const { current: R, disabled: T, href: C, startContent: N, endContent: A } = w.props, k = R || I, _ = r || T && !k;
|
|
689
|
-
return /* @__PURE__ */ m(it, { $size:
|
|
690
|
+
return /* @__PURE__ */ m(it, { $size: u, $current: k, $disabled: !!_, children: [
|
|
690
691
|
/* @__PURE__ */ m(
|
|
691
692
|
Co,
|
|
692
693
|
{
|
|
@@ -708,7 +709,7 @@ const Gt = De`
|
|
|
708
709
|
const w = x.slice(0, l), S = x.slice(f - n);
|
|
709
710
|
return /* @__PURE__ */ m(Qe, { children: [
|
|
710
711
|
w.map((I, R) => $(I, R, !1)),
|
|
711
|
-
/* @__PURE__ */ m(it, { $size:
|
|
712
|
+
/* @__PURE__ */ m(it, { $size: u, $current: !1, $disabled: !1, children: [
|
|
712
713
|
/* @__PURE__ */ a(
|
|
713
714
|
To,
|
|
714
715
|
{
|
|
@@ -733,10 +734,10 @@ const Gt = De`
|
|
|
733
734
|
...h,
|
|
734
735
|
ref: c,
|
|
735
736
|
className: Ee("container", t),
|
|
736
|
-
$variant:
|
|
737
|
-
$size:
|
|
737
|
+
$variant: g,
|
|
738
|
+
$size: u,
|
|
738
739
|
"aria-label": "Breadcrumbs",
|
|
739
|
-
children: /* @__PURE__ */ a(No, { className: Ee("list", o == null ? void 0 : o.list), $size:
|
|
740
|
+
children: /* @__PURE__ */ a(No, { className: Ee("list", o == null ? void 0 : o.list), $size: u, children: v() })
|
|
740
741
|
}
|
|
741
742
|
);
|
|
742
743
|
}, lt = {
|
|
@@ -820,8 +821,8 @@ const Gt = De`
|
|
|
820
821
|
fullWidth: s = !1,
|
|
821
822
|
hoverable: c = !1,
|
|
822
823
|
pressable: p = !1,
|
|
823
|
-
radius:
|
|
824
|
-
ref:
|
|
824
|
+
radius: u = "lg",
|
|
825
|
+
ref: g,
|
|
825
826
|
shadow: h = "md",
|
|
826
827
|
...x
|
|
827
828
|
}) => {
|
|
@@ -830,7 +831,7 @@ const Gt = De`
|
|
|
830
831
|
Ro,
|
|
831
832
|
{
|
|
832
833
|
...x,
|
|
833
|
-
ref:
|
|
834
|
+
ref: g,
|
|
834
835
|
className: Mo("container", r),
|
|
835
836
|
$blurred: e,
|
|
836
837
|
$border: t,
|
|
@@ -839,7 +840,7 @@ const Gt = De`
|
|
|
839
840
|
$fullWidth: s,
|
|
840
841
|
$hoverable: c,
|
|
841
842
|
$pressable: p,
|
|
842
|
-
$radius:
|
|
843
|
+
$radius: u,
|
|
843
844
|
$shadow: f,
|
|
844
845
|
tabIndex: p && !n ? 0 : void 0,
|
|
845
846
|
role: p ? "button" : void 0,
|
|
@@ -896,7 +897,7 @@ const Gt = De`
|
|
|
896
897
|
align-items: center;
|
|
897
898
|
gap: 8px;
|
|
898
899
|
`, Vo = ({ confirmation: e, onDone: t }) => {
|
|
899
|
-
const [o, r] = L(!1), [n, l] = L(!1), { message: s, onConfirm: c, onCancel: p, options:
|
|
900
|
+
const [o, r] = L(!1), [n, l] = L(!1), { message: s, onConfirm: c, onCancel: p, options: u } = e, g = u.confirmLabel || jo, h = u.cancelLabel || Ho, x = E(
|
|
900
901
|
(b) => {
|
|
901
902
|
r(!0), setTimeout(() => {
|
|
902
903
|
b == null || b(), t();
|
|
@@ -926,7 +927,7 @@ const Gt = De`
|
|
|
926
927
|
/* @__PURE__ */ a(Uo, { children: s }),
|
|
927
928
|
/* @__PURE__ */ m(qo, { children: [
|
|
928
929
|
/* @__PURE__ */ a(ve, { variant: "system", size: "compact", onClick: y, disabled: n, children: h }),
|
|
929
|
-
/* @__PURE__ */ a(ve, { variant: "danger", size: "compact", onClick: f, loading: n, children:
|
|
930
|
+
/* @__PURE__ */ a(ve, { variant: "danger", size: "compact", onClick: f, loading: n, children: g })
|
|
930
931
|
] })
|
|
931
932
|
] });
|
|
932
933
|
}, At = Se(null), Zo = () => {
|
|
@@ -954,7 +955,7 @@ const Gt = De`
|
|
|
954
955
|
if (!e)
|
|
955
956
|
throw new Error("useConfirmation must be used within ConfirmationProvider");
|
|
956
957
|
return e;
|
|
957
|
-
},
|
|
958
|
+
}, ue = {
|
|
958
959
|
sm: `${ce.sm}px`,
|
|
959
960
|
md: `${ce.md}px`,
|
|
960
961
|
lg: `${ce.lg}px`,
|
|
@@ -964,23 +965,23 @@ const Gt = De`
|
|
|
964
965
|
width: 100%;
|
|
965
966
|
|
|
966
967
|
${se("sm")} {
|
|
967
|
-
max-width: ${
|
|
968
|
+
max-width: ${ue.sm};
|
|
968
969
|
}
|
|
969
970
|
|
|
970
971
|
${se("md")} {
|
|
971
|
-
max-width: ${
|
|
972
|
+
max-width: ${ue.md};
|
|
972
973
|
}
|
|
973
974
|
|
|
974
975
|
${se("lg")} {
|
|
975
|
-
max-width: ${
|
|
976
|
+
max-width: ${ue.lg};
|
|
976
977
|
}
|
|
977
978
|
|
|
978
979
|
${se("xl")} {
|
|
979
|
-
max-width: ${
|
|
980
|
+
max-width: ${ue.xl};
|
|
980
981
|
}
|
|
981
982
|
|
|
982
983
|
${se("2xl")} {
|
|
983
|
-
max-width: ${
|
|
984
|
+
max-width: ${ue["2xl"]};
|
|
984
985
|
}
|
|
985
986
|
`, Ko = z("container"), dd = ({
|
|
986
987
|
children: e,
|
|
@@ -1154,7 +1155,7 @@ const Gt = De`
|
|
|
1154
1155
|
opacity 0.15s ease,
|
|
1155
1156
|
transform 0.15s ease,
|
|
1156
1157
|
visibility 0.15s;
|
|
1157
|
-
`, Ce = z("dropdown"), Ie = 4,
|
|
1158
|
+
`, Ce = z("dropdown"), Ie = 4, gr = 100, gd = ({
|
|
1158
1159
|
align: e = "left",
|
|
1159
1160
|
autoClose: t = !0,
|
|
1160
1161
|
children: o,
|
|
@@ -1164,14 +1165,14 @@ const Gt = De`
|
|
|
1164
1165
|
onOpen: s,
|
|
1165
1166
|
open: c,
|
|
1166
1167
|
portalRenderNode: p,
|
|
1167
|
-
ref:
|
|
1168
|
-
trigger:
|
|
1168
|
+
ref: u,
|
|
1169
|
+
trigger: g,
|
|
1169
1170
|
...h
|
|
1170
1171
|
}) => {
|
|
1171
1172
|
const [x, f] = L(!1), [y, b] = L({ top: 0, left: 0 }), [$, v] = L("bottom"), w = B(null), S = B(null), I = B(null), R = c !== void 0, T = R ? c : x, C = E(() => {
|
|
1172
1173
|
var X, Y;
|
|
1173
1174
|
if (!S.current) return;
|
|
1174
|
-
const P = S.current.getBoundingClientRect(), j = ((X = I.current) == null ? void 0 : X.offsetHeight) ??
|
|
1175
|
+
const P = S.current.getBoundingClientRect(), j = ((X = I.current) == null ? void 0 : X.offsetHeight) ?? gr, q = ((Y = I.current) == null ? void 0 : Y.offsetWidth) ?? 160, H = window.innerHeight - P.bottom - Ie, G = P.top - Ie, K = H < j && G > H ? "top" : "bottom";
|
|
1175
1176
|
if (v(K), p) {
|
|
1176
1177
|
let J;
|
|
1177
1178
|
e === "left" ? J = P.left : J = P.right - q;
|
|
@@ -1231,19 +1232,19 @@ const Gt = De`
|
|
|
1231
1232
|
children: o
|
|
1232
1233
|
}
|
|
1233
1234
|
);
|
|
1234
|
-
return /* @__PURE__ */ m(dr, { ...h, ref:
|
|
1235
|
+
return /* @__PURE__ */ m(dr, { ...h, ref: u ?? w, className: Ce("container", r), children: [
|
|
1235
1236
|
/* @__PURE__ */ a(
|
|
1236
1237
|
cr,
|
|
1237
1238
|
{
|
|
1238
1239
|
ref: S,
|
|
1239
1240
|
onClick: N,
|
|
1240
1241
|
className: Ce("trigger", n == null ? void 0 : n.trigger),
|
|
1241
|
-
children: Ct(
|
|
1242
|
+
children: Ct(g)
|
|
1242
1243
|
}
|
|
1243
1244
|
),
|
|
1244
1245
|
_
|
|
1245
1246
|
] });
|
|
1246
|
-
},
|
|
1247
|
+
}, ur = d.div`
|
|
1247
1248
|
display: flex;
|
|
1248
1249
|
flex-direction: column;
|
|
1249
1250
|
align-items: center;
|
|
@@ -1330,7 +1331,7 @@ const Gt = De`
|
|
|
1330
1331
|
align-items: center;
|
|
1331
1332
|
gap: 12px;
|
|
1332
1333
|
margin-top: 20px;
|
|
1333
|
-
`, fe = z("empty-state"),
|
|
1334
|
+
`, fe = z("empty-state"), ud = ({
|
|
1334
1335
|
actions: e,
|
|
1335
1336
|
className: t,
|
|
1336
1337
|
classnames: o,
|
|
@@ -1339,7 +1340,7 @@ const Gt = De`
|
|
|
1339
1340
|
ref: l,
|
|
1340
1341
|
title: s,
|
|
1341
1342
|
...c
|
|
1342
|
-
}) => /* @__PURE__ */ m(
|
|
1343
|
+
}) => /* @__PURE__ */ m(ur, { ...c, ref: l, className: fe("container", t), children: [
|
|
1343
1344
|
n && /* @__PURE__ */ m(hr, { className: fe("icon", o == null ? void 0 : o.icon), children: [
|
|
1344
1345
|
/* @__PURE__ */ a(xr, {}),
|
|
1345
1346
|
/* @__PURE__ */ a(fr, {}),
|
|
@@ -1593,8 +1594,8 @@ const Lr = {
|
|
|
1593
1594
|
hint: s,
|
|
1594
1595
|
icon: c,
|
|
1595
1596
|
maxSize: p,
|
|
1596
|
-
multiple:
|
|
1597
|
-
onChange:
|
|
1597
|
+
multiple: u = !1,
|
|
1598
|
+
onChange: g,
|
|
1598
1599
|
onReject: h,
|
|
1599
1600
|
ref: x,
|
|
1600
1601
|
...f
|
|
@@ -1609,7 +1610,7 @@ const Lr = {
|
|
|
1609
1610
|
h == null || h(A, "type");
|
|
1610
1611
|
const k = N.filter((_) => ct(_, e));
|
|
1611
1612
|
if (k.length === 0) return;
|
|
1612
|
-
|
|
1613
|
+
g == null || g(k);
|
|
1613
1614
|
return;
|
|
1614
1615
|
}
|
|
1615
1616
|
}
|
|
@@ -1619,13 +1620,13 @@ const Lr = {
|
|
|
1619
1620
|
h == null || h(A, "size");
|
|
1620
1621
|
const k = N.filter((_) => _.size <= p);
|
|
1621
1622
|
if (k.length === 0) return;
|
|
1622
|
-
|
|
1623
|
+
g == null || g(k);
|
|
1623
1624
|
return;
|
|
1624
1625
|
}
|
|
1625
1626
|
}
|
|
1626
|
-
|
|
1627
|
+
g == null || g(N);
|
|
1627
1628
|
},
|
|
1628
|
-
[e, p,
|
|
1629
|
+
[e, p, g, h]
|
|
1629
1630
|
), w = () => {
|
|
1630
1631
|
var C;
|
|
1631
1632
|
l || (C = y.current) == null || C.click();
|
|
@@ -1668,7 +1669,7 @@ const Lr = {
|
|
|
1668
1669
|
ref: y,
|
|
1669
1670
|
type: "file",
|
|
1670
1671
|
accept: e,
|
|
1671
|
-
multiple:
|
|
1672
|
+
multiple: u,
|
|
1672
1673
|
onChange: S,
|
|
1673
1674
|
tabIndex: -1
|
|
1674
1675
|
}
|
|
@@ -1724,8 +1725,8 @@ const Lr = {
|
|
|
1724
1725
|
onRetry: s,
|
|
1725
1726
|
className: c,
|
|
1726
1727
|
classnames: p,
|
|
1727
|
-
ref:
|
|
1728
|
-
}) => /* @__PURE__ */ m(Ar, { ref:
|
|
1728
|
+
ref: u
|
|
1729
|
+
}) => /* @__PURE__ */ m(Ar, { ref: u, className: re("item", c), $status: o, children: [
|
|
1729
1730
|
/* @__PURE__ */ a(Rr, { className: re("icon", p == null ? void 0 : p.icon), $status: o, children: n || /* @__PURE__ */ a(qr, {}) }),
|
|
1730
1731
|
/* @__PURE__ */ m(Pr, { children: [
|
|
1731
1732
|
/* @__PURE__ */ m(Br, { children: [
|
|
@@ -1982,7 +1983,7 @@ const Lr = {
|
|
|
1982
1983
|
font-size: 14px;
|
|
1983
1984
|
}
|
|
1984
1985
|
}
|
|
1985
|
-
`,
|
|
1986
|
+
`, gn = (e) => `
|
|
1986
1987
|
.${e} {
|
|
1987
1988
|
display: block;
|
|
1988
1989
|
z-index: 101;
|
|
@@ -2000,7 +2001,7 @@ const Lr = {
|
|
|
2000
2001
|
position: absolute;
|
|
2001
2002
|
touch-action: none;
|
|
2002
2003
|
}
|
|
2003
|
-
`,
|
|
2004
|
+
`, un = (e) => `
|
|
2004
2005
|
.${e} {
|
|
2005
2006
|
position: absolute;
|
|
2006
2007
|
z-index: 2;
|
|
@@ -2177,8 +2178,8 @@ const Lr = {
|
|
|
2177
2178
|
${cn(t.container[0])}
|
|
2178
2179
|
${sn(t.footer[0])}
|
|
2179
2180
|
${pn(t.header[0])}
|
|
2180
|
-
${
|
|
2181
|
-
${
|
|
2181
|
+
${gn(t.handlerMove[0])}
|
|
2182
|
+
${un(t.portalArea[0])}
|
|
2182
2183
|
${hn(t.portal[0])}
|
|
2183
2184
|
${fn(t.previewImage[0])}
|
|
2184
2185
|
${xn(t.preview[0])}
|
|
@@ -2279,12 +2280,12 @@ const kn = (e) => {
|
|
|
2279
2280
|
if (!r)
|
|
2280
2281
|
return o.frame;
|
|
2281
2282
|
const { width: n, height: l } = r.getBoundingClientRect(), s = n / l, c = t.width / t.height;
|
|
2282
|
-
let p,
|
|
2283
|
-
return s > c ? (p = l * c,
|
|
2283
|
+
let p, u, g = 0, h = 0;
|
|
2284
|
+
return s > c ? (p = l * c, u = l, h = (n - p) / 2) : (p = n, u = n * (t.height / t.width), g = (l - u) / 2), {
|
|
2284
2285
|
width: p,
|
|
2285
|
-
height:
|
|
2286
|
+
height: u,
|
|
2286
2287
|
left: h,
|
|
2287
|
-
top:
|
|
2288
|
+
top: g
|
|
2288
2289
|
};
|
|
2289
2290
|
}, Nn = (e, t, o) => {
|
|
2290
2291
|
const [r, n] = t, l = r + e > o.width ? (o.width - e) / 2 : r, s = n + e > o.height ? (o.height - e) / 2 : n;
|
|
@@ -2423,11 +2424,11 @@ const In = (e) => {
|
|
|
2423
2424
|
r && (r.style.marginLeft = `-${e.left}px`, r.style.marginTop = `-${e.top}px`);
|
|
2424
2425
|
}, Oe = 1, Qn = (e) => {
|
|
2425
2426
|
var f, y;
|
|
2426
|
-
const t = e(), o = document.createElement("canvas"), r = t.frame.width || Oe, n = t.frame.height || Oe, l = t.sourceWidth / r, s = t.sourceHeight / n, c = t.portal.left * l, p = t.portal.top * s,
|
|
2427
|
+
const t = e(), o = document.createElement("canvas"), r = t.frame.width || Oe, n = t.frame.height || Oe, l = t.sourceWidth / r, s = t.sourceHeight / n, c = t.portal.left * l, p = t.portal.top * s, u = Math.max(
|
|
2427
2428
|
t.portal.size * Math.min(l, s),
|
|
2428
2429
|
Oe
|
|
2429
|
-
),
|
|
2430
|
-
o.width =
|
|
2430
|
+
), g = t.config.outputSize > 0 ? t.config.outputSize : u;
|
|
2431
|
+
o.width = g, o.height = g;
|
|
2431
2432
|
const h = document.querySelector(
|
|
2432
2433
|
`.${(f = t.css) == null ? void 0 : f.sourceImage[0]}`
|
|
2433
2434
|
);
|
|
@@ -2435,12 +2436,12 @@ const In = (e) => {
|
|
|
2435
2436
|
h,
|
|
2436
2437
|
c,
|
|
2437
2438
|
p,
|
|
2438
|
-
|
|
2439
|
-
|
|
2439
|
+
u,
|
|
2440
|
+
u,
|
|
2440
2441
|
0,
|
|
2441
2442
|
0,
|
|
2442
|
-
|
|
2443
|
-
|
|
2443
|
+
g,
|
|
2444
|
+
g
|
|
2444
2445
|
));
|
|
2445
2446
|
const x = o.toDataURL(
|
|
2446
2447
|
`image/${t.config.type}`,
|
|
@@ -2470,8 +2471,8 @@ const In = (e) => {
|
|
|
2470
2471
|
}, ei = (e, t, o) => {
|
|
2471
2472
|
const { emitted: r, portal: n, frame: l, config: s } = t();
|
|
2472
2473
|
let c = r.left - r.X + e.clientX, p = r.top - r.Y + e.clientY;
|
|
2473
|
-
const
|
|
2474
|
-
c <
|
|
2474
|
+
const u = s.framePadding, g = l.width - s.framePadding - n.size, h = s.framePadding, x = l.height - s.framePadding - n.size;
|
|
2475
|
+
c < u && (c = u), c > g && (c = g), p < h && (p = h), p > x && (p = x), o({
|
|
2475
2476
|
portal: {
|
|
2476
2477
|
...n,
|
|
2477
2478
|
left: c,
|
|
@@ -2479,30 +2480,30 @@ const In = (e) => {
|
|
|
2479
2480
|
}
|
|
2480
2481
|
});
|
|
2481
2482
|
}, ti = (e, t, o) => {
|
|
2482
|
-
const { action: r, emitted: n, portal: l, frame: s, config: c } = t(), p = e.pageX - n.X,
|
|
2483
|
+
const { action: r, emitted: n, portal: l, frame: s, config: c } = t(), p = e.pageX - n.X, u = e.pageY - n.Y;
|
|
2483
2484
|
switch (r) {
|
|
2484
2485
|
case W.RESIZE_BR: {
|
|
2485
|
-
let
|
|
2486
|
-
return
|
|
2486
|
+
let g = n.size + Math.max(p, u);
|
|
2487
|
+
return g < c.minPortalSize && (g = c.minPortalSize), n.top + g > s.height - c.framePadding && (g = s.height - n.top - c.framePadding), n.left + g > s.width - c.framePadding && (g = s.width - n.left - c.framePadding), o({
|
|
2487
2488
|
portal: {
|
|
2488
2489
|
...l,
|
|
2489
|
-
size:
|
|
2490
|
+
size: g
|
|
2490
2491
|
}
|
|
2491
2492
|
});
|
|
2492
2493
|
}
|
|
2493
2494
|
case W.RESIZE_TR: {
|
|
2494
|
-
let
|
|
2495
|
-
return
|
|
2495
|
+
let g = p + u > 0 ? n.size + p : n.size - u, h = p + u > 0 ? n.top - p : n.top + u;
|
|
2496
|
+
return g < c.minPortalSize && (h = n.top + n.size - c.minPortalSize, g = c.minPortalSize), n.left + g > s.width - c.framePadding && (g = s.width - n.left - c.framePadding, h = n.top - s.width + n.left + n.size), h < c.framePadding && (g = n.top + n.size, h = c.framePadding), o({
|
|
2496
2497
|
portal: {
|
|
2497
2498
|
...l,
|
|
2498
2499
|
top: h,
|
|
2499
|
-
size:
|
|
2500
|
+
size: g
|
|
2500
2501
|
}
|
|
2501
2502
|
});
|
|
2502
2503
|
}
|
|
2503
2504
|
case W.RESIZE_TL: {
|
|
2504
|
-
const
|
|
2505
|
-
let h = n.size -
|
|
2505
|
+
const g = Math.min(p, u);
|
|
2506
|
+
let h = n.size - g, x = n.left + g, f = n.top + g;
|
|
2506
2507
|
if (h < c.minPortalSize) {
|
|
2507
2508
|
const y = n.size - c.minPortalSize;
|
|
2508
2509
|
h = c.minPortalSize, x = n.left + y, f = n.top + y;
|
|
@@ -2525,19 +2526,19 @@ const In = (e) => {
|
|
|
2525
2526
|
});
|
|
2526
2527
|
}
|
|
2527
2528
|
case W.RESIZE_BL: {
|
|
2528
|
-
let
|
|
2529
|
-
return
|
|
2529
|
+
let g = p + u > 0 ? n.size + u : n.size - p, h = p + u > 0 ? n.left - u : n.left + p;
|
|
2530
|
+
return g < c.minPortalSize && (h = n.left + n.size - c.minPortalSize, g = c.minPortalSize), g + n.top > s.height - c.framePadding && (h = n.left - s.height + n.top + n.size, g = s.height - n.top - c.framePadding), h < c.framePadding && (h = c.framePadding, g = n.left + n.size - c.framePadding), o({
|
|
2530
2531
|
portal: {
|
|
2531
2532
|
...l,
|
|
2532
2533
|
left: h,
|
|
2533
|
-
size:
|
|
2534
|
+
size: g
|
|
2534
2535
|
}
|
|
2535
2536
|
});
|
|
2536
2537
|
}
|
|
2537
2538
|
default:
|
|
2538
2539
|
return;
|
|
2539
2540
|
}
|
|
2540
|
-
},
|
|
2541
|
+
}, gt = (e) => {
|
|
2541
2542
|
if ("touches" in e && e.touches.length > 0) {
|
|
2542
2543
|
const o = e.touches[0];
|
|
2543
2544
|
return {
|
|
@@ -2575,7 +2576,7 @@ const In = (e) => {
|
|
|
2575
2576
|
let s = null, c = null;
|
|
2576
2577
|
const p = (b) => {
|
|
2577
2578
|
b.preventDefault();
|
|
2578
|
-
const { portal: $ } = e(), v =
|
|
2579
|
+
const { portal: $ } = e(), v = gt(b);
|
|
2579
2580
|
if (b.target) {
|
|
2580
2581
|
const w = b.target.getAttribute("data-action"), S = {
|
|
2581
2582
|
X: v.pageX,
|
|
@@ -2589,12 +2590,12 @@ const In = (e) => {
|
|
|
2589
2590
|
emitted: S
|
|
2590
2591
|
});
|
|
2591
2592
|
}
|
|
2592
|
-
},
|
|
2593
|
+
}, u = () => {
|
|
2593
2594
|
const { action: b } = e();
|
|
2594
2595
|
s !== null && (cancelAnimationFrame(s), s = null), c = null, b && t({
|
|
2595
2596
|
action: null
|
|
2596
2597
|
});
|
|
2597
|
-
},
|
|
2598
|
+
}, g = () => {
|
|
2598
2599
|
if (s = null, !c)
|
|
2599
2600
|
return;
|
|
2600
2601
|
const b = c;
|
|
@@ -2610,14 +2611,14 @@ const In = (e) => {
|
|
|
2610
2611
|
}
|
|
2611
2612
|
}, h = (b) => {
|
|
2612
2613
|
const { action: $ } = e();
|
|
2613
|
-
$ && (b.preventDefault(), c =
|
|
2614
|
+
$ && (b.preventDefault(), c = gt(b), s === null && (s = requestAnimationFrame(g)));
|
|
2614
2615
|
};
|
|
2615
|
-
return l && (l.addEventListener("mouseup",
|
|
2616
|
+
return l && (l.addEventListener("mouseup", u), l.addEventListener("touchend", u), l.addEventListener("touchcancel", u)), r && (r.addEventListener("mousedown", p), r.addEventListener("touchstart", p, {
|
|
2616
2617
|
passive: !1
|
|
2617
2618
|
})), n && (n.addEventListener("mousemove", h), n.addEventListener("touchmove", h, {
|
|
2618
2619
|
passive: !1
|
|
2619
2620
|
})), () => {
|
|
2620
|
-
s !== null && cancelAnimationFrame(s), l && (l.removeEventListener("mouseup",
|
|
2621
|
+
s !== null && cancelAnimationFrame(s), l && (l.removeEventListener("mouseup", u), l.removeEventListener("touchend", u), l.removeEventListener("touchcancel", u)), r && (r.removeEventListener("mousedown", p), r.removeEventListener("touchstart", p)), n && (n.removeEventListener(
|
|
2621
2622
|
"mousemove",
|
|
2622
2623
|
h
|
|
2623
2624
|
), n.removeEventListener(
|
|
@@ -2625,12 +2626,12 @@ const In = (e) => {
|
|
|
2625
2626
|
h
|
|
2626
2627
|
));
|
|
2627
2628
|
};
|
|
2628
|
-
},
|
|
2629
|
+
}, ut = 1024 * 1024, ri = (e, t) => {
|
|
2629
2630
|
if (!t.allowedTypes.includes(e.type))
|
|
2630
2631
|
return `Invalid file type "${e.type}". Allowed types: ${t.allowedTypes.join(", ")}`;
|
|
2631
2632
|
if (t.maxFileSize > 0 && e.size > t.maxFileSize) {
|
|
2632
|
-
const o = (t.maxFileSize /
|
|
2633
|
-
return `File size (${(e.size /
|
|
2633
|
+
const o = (t.maxFileSize / ut).toFixed(2);
|
|
2634
|
+
return `File size (${(e.size / ut).toFixed(2)}MB) exceeds maximum allowed size (${o}MB)`;
|
|
2634
2635
|
}
|
|
2635
2636
|
return null;
|
|
2636
2637
|
}, ni = (e, t, o, r, n, l, s) => {
|
|
@@ -2641,9 +2642,9 @@ const In = (e) => {
|
|
|
2641
2642
|
c("Can't read file input");
|
|
2642
2643
|
return;
|
|
2643
2644
|
}
|
|
2644
|
-
const p = e.target.files[0], { config:
|
|
2645
|
-
if (
|
|
2646
|
-
c(
|
|
2645
|
+
const p = e.target.files[0], { config: u } = t(), g = ri(p, u);
|
|
2646
|
+
if (g) {
|
|
2647
|
+
c(g), e.target.value = "";
|
|
2647
2648
|
return;
|
|
2648
2649
|
}
|
|
2649
2650
|
const h = new FileReader();
|
|
@@ -2698,8 +2699,8 @@ const In = (e) => {
|
|
|
2698
2699
|
t,
|
|
2699
2700
|
o
|
|
2700
2701
|
), p = Un(
|
|
2701
|
-
(
|
|
2702
|
-
|
|
2702
|
+
(u) => ni(
|
|
2703
|
+
u,
|
|
2703
2704
|
n,
|
|
2704
2705
|
l,
|
|
2705
2706
|
e,
|
|
@@ -2792,8 +2793,8 @@ const In = (e) => {
|
|
|
2792
2793
|
onCrop: s,
|
|
2793
2794
|
onError: c,
|
|
2794
2795
|
outputSize: p = Q.outputSize,
|
|
2795
|
-
portalSize:
|
|
2796
|
-
type:
|
|
2796
|
+
portalSize: u = Q.portalSize,
|
|
2797
|
+
type: g = Q.type
|
|
2797
2798
|
} = e, h = B(null);
|
|
2798
2799
|
return { open: E(() => {
|
|
2799
2800
|
h.current || (ai(), h.current = ii(
|
|
@@ -2801,10 +2802,10 @@ const In = (e) => {
|
|
|
2801
2802
|
y && (s == null || s({ base64: f, blob: y, state: b }));
|
|
2802
2803
|
},
|
|
2803
2804
|
{
|
|
2804
|
-
portalSize:
|
|
2805
|
+
portalSize: u,
|
|
2805
2806
|
outputSize: p,
|
|
2806
2807
|
compression: n,
|
|
2807
|
-
type:
|
|
2808
|
+
type: g,
|
|
2808
2809
|
maxFileSize: l,
|
|
2809
2810
|
allowedTypes: t,
|
|
2810
2811
|
applyButtonLabel: o,
|
|
@@ -2824,8 +2825,8 @@ const In = (e) => {
|
|
|
2824
2825
|
s,
|
|
2825
2826
|
c,
|
|
2826
2827
|
p,
|
|
2827
|
-
|
|
2828
|
-
|
|
2828
|
+
u,
|
|
2829
|
+
g
|
|
2829
2830
|
]) };
|
|
2830
2831
|
}, je = z("image-cropper"), yd = ({
|
|
2831
2832
|
allowedTypes: e,
|
|
@@ -2837,8 +2838,8 @@ const In = (e) => {
|
|
|
2837
2838
|
compression: s,
|
|
2838
2839
|
maxFileSize: c,
|
|
2839
2840
|
onCrop: p,
|
|
2840
|
-
onError:
|
|
2841
|
-
outputSize:
|
|
2841
|
+
onError: u,
|
|
2842
|
+
outputSize: g,
|
|
2842
2843
|
portalSize: h,
|
|
2843
2844
|
previewSize: x = 120,
|
|
2844
2845
|
ref: f,
|
|
@@ -2855,8 +2856,8 @@ const In = (e) => {
|
|
|
2855
2856
|
onCrop: (I) => {
|
|
2856
2857
|
w(I.base64), p == null || p(I);
|
|
2857
2858
|
},
|
|
2858
|
-
onError:
|
|
2859
|
-
outputSize:
|
|
2859
|
+
onError: u,
|
|
2860
|
+
outputSize: g,
|
|
2860
2861
|
portalSize: h,
|
|
2861
2862
|
type: y
|
|
2862
2863
|
});
|
|
@@ -2935,10 +2936,10 @@ const In = (e) => {
|
|
|
2935
2936
|
size: c = "default",
|
|
2936
2937
|
...p
|
|
2937
2938
|
}) => {
|
|
2938
|
-
const [
|
|
2939
|
+
const [u, g] = L(o), h = l !== void 0, x = h ? l : u, f = E(() => {
|
|
2939
2940
|
if (r) return;
|
|
2940
2941
|
const y = !x;
|
|
2941
|
-
h ||
|
|
2942
|
+
h || g(y), n == null || n(y);
|
|
2942
2943
|
}, [r, x, h, n]);
|
|
2943
2944
|
return /* @__PURE__ */ a(
|
|
2944
2945
|
si,
|
|
@@ -2984,7 +2985,7 @@ const In = (e) => {
|
|
|
2984
2985
|
] })
|
|
2985
2986
|
}
|
|
2986
2987
|
);
|
|
2987
|
-
},
|
|
2988
|
+
}, gi = 5e3, ft = {
|
|
2988
2989
|
default: {
|
|
2989
2990
|
background: "#374151",
|
|
2990
2991
|
text: i.white
|
|
@@ -3005,7 +3006,7 @@ const In = (e) => {
|
|
|
3005
3006
|
background: i["steel-blue"],
|
|
3006
3007
|
text: i.white
|
|
3007
3008
|
}
|
|
3008
|
-
}, Mt = Se(null), xt = (e) => ft[e] ?? ft.default,
|
|
3009
|
+
}, Mt = Se(null), xt = (e) => ft[e] ?? ft.default, ui = d.div`
|
|
3009
3010
|
position: fixed;
|
|
3010
3011
|
top: 0;
|
|
3011
3012
|
left: 0;
|
|
@@ -3111,15 +3112,15 @@ const In = (e) => {
|
|
|
3111
3112
|
queue: []
|
|
3112
3113
|
}, vd = ({ children: e }) => {
|
|
3113
3114
|
const [t, o] = Tt(yi, mi), r = E(
|
|
3114
|
-
(c, p = "default",
|
|
3115
|
-
const
|
|
3115
|
+
(c, p = "default", u = gi) => {
|
|
3116
|
+
const g = `notification-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
3116
3117
|
o({
|
|
3117
3118
|
type: "ADD_NOTIFICATION",
|
|
3118
3119
|
payload: {
|
|
3119
|
-
id:
|
|
3120
|
+
id: g,
|
|
3120
3121
|
message: c,
|
|
3121
3122
|
variant: p,
|
|
3122
|
-
duration:
|
|
3123
|
+
duration: u
|
|
3123
3124
|
}
|
|
3124
3125
|
});
|
|
3125
3126
|
},
|
|
@@ -3135,7 +3136,7 @@ const In = (e) => {
|
|
|
3135
3136
|
}, []);
|
|
3136
3137
|
return /* @__PURE__ */ m(Mt.Provider, { value: { show: r, hide: n }, children: [
|
|
3137
3138
|
e,
|
|
3138
|
-
/* @__PURE__ */ a(
|
|
3139
|
+
/* @__PURE__ */ a(ui, { children: t.current && /* @__PURE__ */ a(
|
|
3139
3140
|
$i,
|
|
3140
3141
|
{
|
|
3141
3142
|
notification: t.current,
|
|
@@ -3206,7 +3207,7 @@ const In = (e) => {
|
|
|
3206
3207
|
border-top: 1px solid ${i.gray};
|
|
3207
3208
|
background-color: rgba(0, 0, 0, 0.01);
|
|
3208
3209
|
`, Ii = ({ confirmation: e, onDone: t }) => {
|
|
3209
|
-
const [o, r] = L(!1), [n, l] = L(!1), { label: s, description: c, onConfirm: p, onDiscard:
|
|
3210
|
+
const [o, r] = L(!1), [n, l] = L(!1), { label: s, description: c, onConfirm: p, onDiscard: u, options: g } = e, h = g.confirmLabel || vi, x = g.discardLabel || wi, f = E(
|
|
3210
3211
|
($) => {
|
|
3211
3212
|
r(!0), setTimeout(() => {
|
|
3212
3213
|
$ == null || $(), t();
|
|
@@ -3225,8 +3226,8 @@ const In = (e) => {
|
|
|
3225
3226
|
}
|
|
3226
3227
|
f();
|
|
3227
3228
|
}, [f, p]), b = E(() => {
|
|
3228
|
-
n || f(
|
|
3229
|
-
}, [f, n,
|
|
3229
|
+
n || f(u);
|
|
3230
|
+
}, [f, n, u]);
|
|
3230
3231
|
return Z(() => {
|
|
3231
3232
|
const $ = (v) => {
|
|
3232
3233
|
v.key === "Escape" && !n && b();
|
|
@@ -3243,14 +3244,14 @@ const In = (e) => {
|
|
|
3243
3244
|
}, Ti = () => {
|
|
3244
3245
|
}, Sd = ({ children: e }) => {
|
|
3245
3246
|
const [t, o] = L(null), r = E(
|
|
3246
|
-
(l, s, c, p,
|
|
3247
|
+
(l, s, c, p, u) => {
|
|
3247
3248
|
o({
|
|
3248
3249
|
open: !0,
|
|
3249
3250
|
label: l,
|
|
3250
3251
|
description: s,
|
|
3251
3252
|
onConfirm: c,
|
|
3252
3253
|
onDiscard: p || Ti,
|
|
3253
|
-
options:
|
|
3254
|
+
options: u || {}
|
|
3254
3255
|
});
|
|
3255
3256
|
},
|
|
3256
3257
|
[]
|
|
@@ -3369,15 +3370,15 @@ const In = (e) => {
|
|
|
3369
3370
|
icon: s,
|
|
3370
3371
|
logo: c,
|
|
3371
3372
|
ref: p,
|
|
3372
|
-
title:
|
|
3373
|
-
...
|
|
3374
|
-
}) => /* @__PURE__ */ m(Pi, { ...
|
|
3373
|
+
title: u,
|
|
3374
|
+
...g
|
|
3375
|
+
}) => /* @__PURE__ */ m(Pi, { ...g, ref: p, className: ee("container", t), children: [
|
|
3375
3376
|
/* @__PURE__ */ a(Bi, { $size: l, className: ee("grid", o == null ? void 0 : o.grid) }),
|
|
3376
3377
|
/* @__PURE__ */ m(_i, { children: [
|
|
3377
3378
|
c && /* @__PURE__ */ a(Mi, { children: c }),
|
|
3378
3379
|
s && /* @__PURE__ */ a(Di, { className: ee("icon"), children: s }),
|
|
3379
|
-
(
|
|
3380
|
-
|
|
3380
|
+
(u || r) && /* @__PURE__ */ m(Fi, { className: ee("header", o == null ? void 0 : o.header), children: [
|
|
3381
|
+
u && /* @__PURE__ */ a(Oi, { className: ee("title", o == null ? void 0 : o.title), children: u }),
|
|
3381
3382
|
r && /* @__PURE__ */ a(ji, { className: ee("description", o == null ? void 0 : o.description), children: r })
|
|
3382
3383
|
] }),
|
|
3383
3384
|
e && /* @__PURE__ */ a(Hi, { className: ee("content", o == null ? void 0 : o.content), children: e }),
|
|
@@ -3395,11 +3396,11 @@ const In = (e) => {
|
|
|
3395
3396
|
const x = o * 2 + r + 2, f = Array.from({ length: r }, (b, $) => $ + 1), y = Array.from({ length: x }, (b, $) => e - x + $ + 1);
|
|
3396
3397
|
return [...f, "dots", ...y];
|
|
3397
3398
|
}
|
|
3398
|
-
const
|
|
3399
|
+
const u = Array.from({ length: r }, (x, f) => f + 1), g = Array.from(
|
|
3399
3400
|
{ length: s - l + 1 },
|
|
3400
3401
|
(x, f) => l + f
|
|
3401
3402
|
), h = Array.from({ length: r }, (x, f) => e - r + f + 1);
|
|
3402
|
-
return [...
|
|
3403
|
+
return [...u, "dots", ...g, "dots", ...h];
|
|
3403
3404
|
}, Wi = d.nav`
|
|
3404
3405
|
display: inline-flex;
|
|
3405
3406
|
align-items: center;
|
|
@@ -3508,13 +3509,13 @@ const In = (e) => {
|
|
|
3508
3509
|
onChange: s,
|
|
3509
3510
|
page: c,
|
|
3510
3511
|
ref: p,
|
|
3511
|
-
showControls:
|
|
3512
|
-
siblings:
|
|
3512
|
+
showControls: u = !1,
|
|
3513
|
+
siblings: g = 1,
|
|
3513
3514
|
total: h,
|
|
3514
3515
|
variant: x = "flat",
|
|
3515
3516
|
...f
|
|
3516
3517
|
}) => {
|
|
3517
|
-
const y = c !== void 0, [b, $] = L(n), v = y ? c : b, w = B(/* @__PURE__ */ new Map()), S = B(null), I = B(null), R = Yi(h, v,
|
|
3518
|
+
const y = c !== void 0, [b, $] = L(n), v = y ? c : b, w = B(/* @__PURE__ */ new Map()), S = B(null), I = B(null), R = Yi(h, v, g, e), T = E(
|
|
3518
3519
|
(k) => {
|
|
3519
3520
|
y || $(k), s == null || s(k);
|
|
3520
3521
|
},
|
|
@@ -3544,7 +3545,7 @@ const In = (e) => {
|
|
|
3544
3545
|
k.style.transform = `translateX(${H}px)`;
|
|
3545
3546
|
}, [v, R]), /* @__PURE__ */ m(Wi, { ...f, ref: p || S, className: ae("container", t), children: [
|
|
3546
3547
|
/* @__PURE__ */ a(Vi, { ref: I, className: ae("cursor", o == null ? void 0 : o.cursor) }),
|
|
3547
|
-
|
|
3548
|
+
u && /* @__PURE__ */ a(
|
|
3548
3549
|
bt,
|
|
3549
3550
|
{
|
|
3550
3551
|
className: ae("controls", o == null ? void 0 : o.controls),
|
|
@@ -3586,7 +3587,7 @@ const In = (e) => {
|
|
|
3586
3587
|
k
|
|
3587
3588
|
)
|
|
3588
3589
|
),
|
|
3589
|
-
|
|
3590
|
+
u && /* @__PURE__ */ a(
|
|
3590
3591
|
bt,
|
|
3591
3592
|
{
|
|
3592
3593
|
className: ae("controls", o == null ? void 0 : o.controls),
|
|
@@ -3676,10 +3677,10 @@ const In = (e) => {
|
|
|
3676
3677
|
variant: c = "light",
|
|
3677
3678
|
...p
|
|
3678
3679
|
}) => {
|
|
3679
|
-
const
|
|
3680
|
+
const u = s || r;
|
|
3680
3681
|
return /* @__PURE__ */ m(Gi, { ...p, ref: l, className: xe("container", t), $variant: c, children: [
|
|
3681
3682
|
n && /* @__PURE__ */ a(Ki, { className: xe("label", o == null ? void 0 : o.label), children: n }),
|
|
3682
|
-
|
|
3683
|
+
u && /* @__PURE__ */ m(Ji, { children: [
|
|
3683
3684
|
s && /* @__PURE__ */ a(Qi, { className: xe("title", o == null ? void 0 : o.title), $variant: c, children: s }),
|
|
3684
3685
|
r && /* @__PURE__ */ a(
|
|
3685
3686
|
el,
|
|
@@ -3803,7 +3804,7 @@ const In = (e) => {
|
|
|
3803
3804
|
justify-content: center;
|
|
3804
3805
|
padding: 48px 24px;
|
|
3805
3806
|
gap: 28px;
|
|
3806
|
-
`,
|
|
3807
|
+
`, gl = d.div`
|
|
3807
3808
|
position: relative;
|
|
3808
3809
|
width: 64px;
|
|
3809
3810
|
height: 64px;
|
|
@@ -3819,7 +3820,7 @@ const In = (e) => {
|
|
|
3819
3820
|
opacity: ${(e) => e.$index === 0 ? 1 : e.$index === 1 ? 0.6 : 0.35};
|
|
3820
3821
|
animation: ${(e) => e.$index === 0 ? dl : e.$index === 1 ? cl : sl}
|
|
3821
3822
|
${(e) => e.$index === 0 ? 3 : e.$index === 1 ? 2 : 4.5}s linear infinite;
|
|
3822
|
-
`,
|
|
3823
|
+
`, ul = d.span`
|
|
3823
3824
|
position: absolute;
|
|
3824
3825
|
width: 1px;
|
|
3825
3826
|
height: 1px;
|
|
@@ -3851,19 +3852,19 @@ const In = (e) => {
|
|
|
3851
3852
|
width: 0.65em;
|
|
3852
3853
|
text-align: center;
|
|
3853
3854
|
`, Sl = z("split-flap-text"), kl = ({ className: e, ref: t, text: o, ...r }) => {
|
|
3854
|
-
const [n, l] = L(() => o.split("")), s = B(o), c = B([]), p = B(null),
|
|
3855
|
+
const [n, l] = L(() => o.split("")), s = B(o), c = B([]), p = B(null), u = B([]), g = B(o.split("")), h = E(() => {
|
|
3855
3856
|
p.current && (clearInterval(p.current), p.current = null);
|
|
3856
|
-
for (const f of
|
|
3857
|
+
for (const f of u.current)
|
|
3857
3858
|
clearTimeout(f);
|
|
3858
|
-
|
|
3859
|
+
u.current = [];
|
|
3859
3860
|
}, []), x = E(
|
|
3860
3861
|
(f) => {
|
|
3861
|
-
h(),
|
|
3862
|
+
h(), g.current = f, c.current = f.map((y) => y === " "), p.current = setInterval(() => {
|
|
3862
3863
|
l(
|
|
3863
|
-
(y) => y.map((b, $) => c.current[$] ?
|
|
3864
|
+
(y) => y.map((b, $) => c.current[$] ? g.current[$] : $l())
|
|
3864
3865
|
);
|
|
3865
|
-
}, ml()),
|
|
3866
|
-
c.current[b] = !0, c.current.every(Boolean) && (p.current && (clearInterval(p.current), p.current = null), l([...
|
|
3866
|
+
}, ml()), u.current = f.map((y, b) => setTimeout(() => {
|
|
3867
|
+
c.current[b] = !0, c.current.every(Boolean) && (p.current && (clearInterval(p.current), p.current = null), l([...g.current]));
|
|
3867
3868
|
}, yl(b)));
|
|
3868
3869
|
},
|
|
3869
3870
|
[h]
|
|
@@ -3880,12 +3881,12 @@ const In = (e) => {
|
|
|
3880
3881
|
ref: l,
|
|
3881
3882
|
...s
|
|
3882
3883
|
}) => {
|
|
3883
|
-
const c = $e(() => nl(n), [n]), p = $e(() => il(r), [r]),
|
|
3884
|
-
(S) => (h.current >=
|
|
3884
|
+
const c = $e(() => nl(n), [n]), p = $e(() => il(r), [r]), u = $e(() => ll(c), [c]), g = B([]), h = B(0), x = E(
|
|
3885
|
+
(S) => (h.current >= g.current.length && (g.current = yt(c.length, S), h.current = 0), g.current[h.current++]),
|
|
3885
3886
|
[c.length]
|
|
3886
3887
|
), [f, y] = L(() => {
|
|
3887
|
-
|
|
3888
|
-
const S =
|
|
3888
|
+
g.current = yt(c.length);
|
|
3889
|
+
const S = g.current[0];
|
|
3889
3890
|
return h.current = 1, S;
|
|
3890
3891
|
}), b = B(null), $ = E(() => {
|
|
3891
3892
|
y((S) => x(S));
|
|
@@ -3893,15 +3894,15 @@ const In = (e) => {
|
|
|
3893
3894
|
Z(() => (b.current = setInterval($, p), () => {
|
|
3894
3895
|
b.current && clearInterval(b.current);
|
|
3895
3896
|
}), [$, p]);
|
|
3896
|
-
const v = c[f], w = al(v,
|
|
3897
|
+
const v = c[f], w = al(v, u);
|
|
3897
3898
|
return /* @__PURE__ */ m(pl, { ...s, ref: l, className: Pe("container", e), role: "status", children: [
|
|
3898
|
-
/* @__PURE__ */ m(
|
|
3899
|
+
/* @__PURE__ */ m(gl, { className: Pe("indicator", t == null ? void 0 : t.indicator), children: [
|
|
3899
3900
|
/* @__PURE__ */ a(Ye, { $index: 0 }),
|
|
3900
3901
|
/* @__PURE__ */ a(Ye, { $index: 1 }),
|
|
3901
3902
|
/* @__PURE__ */ a(Ye, { $index: 2 })
|
|
3902
3903
|
] }),
|
|
3903
3904
|
/* @__PURE__ */ a(kl, { text: w, className: Pe("board", t == null ? void 0 : t.board) }),
|
|
3904
|
-
/* @__PURE__ */ a(
|
|
3905
|
+
/* @__PURE__ */ a(ul, { children: v }),
|
|
3905
3906
|
o && /* @__PURE__ */ a(hl, { className: Pe("description", t == null ? void 0 : t.description), children: o })
|
|
3906
3907
|
] });
|
|
3907
3908
|
}, Je = {
|
|
@@ -3969,8 +3970,8 @@ const In = (e) => {
|
|
|
3969
3970
|
defaultMessage: t = "Saving"
|
|
3970
3971
|
}) => {
|
|
3971
3972
|
const [o, r] = L(!1), [n, l] = L(t), s = E(
|
|
3972
|
-
(
|
|
3973
|
-
l(
|
|
3973
|
+
(u) => {
|
|
3974
|
+
l(u ?? t), r(!0);
|
|
3974
3975
|
},
|
|
3975
3976
|
[t]
|
|
3976
3977
|
), c = E(() => {
|
|
@@ -4177,12 +4178,12 @@ const In = (e) => {
|
|
|
4177
4178
|
value: s,
|
|
4178
4179
|
...c
|
|
4179
4180
|
}) => {
|
|
4180
|
-
const [p,
|
|
4181
|
+
const [p, u] = L(o), g = s !== void 0, h = g ? s : p, x = E(
|
|
4181
4182
|
(f) => {
|
|
4182
4183
|
const b = h.includes(f) ? h.filter(($) => $ !== f) : [...h, f];
|
|
4183
|
-
|
|
4184
|
+
g || u(b), r == null || r(b);
|
|
4184
4185
|
},
|
|
4185
|
-
[h,
|
|
4186
|
+
[h, g, r]
|
|
4186
4187
|
);
|
|
4187
4188
|
return /* @__PURE__ */ a(Ol, { ...c, ref: n, className: Be("container", e), children: l.map((f) => {
|
|
4188
4189
|
const y = h.includes(f.value), b = f.status ?? "pending", $ = b !== "pending", v = f.lines && f.lines.length > 0, w = ra[b];
|
|
@@ -4285,7 +4286,7 @@ const In = (e) => {
|
|
|
4285
4286
|
value: s,
|
|
4286
4287
|
...c
|
|
4287
4288
|
}) => {
|
|
4288
|
-
const p = $e(() => l.findIndex((
|
|
4289
|
+
const p = $e(() => l.findIndex((u) => u.value === s), [l, s]);
|
|
4289
4290
|
return /* @__PURE__ */ a(
|
|
4290
4291
|
na,
|
|
4291
4292
|
{
|
|
@@ -4293,8 +4294,8 @@ const In = (e) => {
|
|
|
4293
4294
|
ref: n,
|
|
4294
4295
|
$orientation: r,
|
|
4295
4296
|
className: be("container", e),
|
|
4296
|
-
children: l.map((
|
|
4297
|
-
const h =
|
|
4297
|
+
children: l.map((u, g) => {
|
|
4298
|
+
const h = u.value === s, x = g < p, f = g === l.length - 1;
|
|
4298
4299
|
return /* @__PURE__ */ m(ia, { $orientation: r, children: [
|
|
4299
4300
|
/* @__PURE__ */ m(
|
|
4300
4301
|
la,
|
|
@@ -4303,7 +4304,7 @@ const In = (e) => {
|
|
|
4303
4304
|
$active: h,
|
|
4304
4305
|
$completed: x,
|
|
4305
4306
|
$clickable: !!o,
|
|
4306
|
-
onClick: () => o == null ? void 0 : o(
|
|
4307
|
+
onClick: () => o == null ? void 0 : o(u.value),
|
|
4307
4308
|
className: be("step", t == null ? void 0 : t.step),
|
|
4308
4309
|
children: [
|
|
4309
4310
|
/* @__PURE__ */ a(
|
|
@@ -4312,7 +4313,7 @@ const In = (e) => {
|
|
|
4312
4313
|
$active: h,
|
|
4313
4314
|
$completed: x,
|
|
4314
4315
|
className: be("circle", t == null ? void 0 : t.circle),
|
|
4315
|
-
children:
|
|
4316
|
+
children: g + 1
|
|
4316
4317
|
}
|
|
4317
4318
|
),
|
|
4318
4319
|
/* @__PURE__ */ a(
|
|
@@ -4321,7 +4322,7 @@ const In = (e) => {
|
|
|
4321
4322
|
$active: h,
|
|
4322
4323
|
$completed: x,
|
|
4323
4324
|
className: be("label", t == null ? void 0 : t.label),
|
|
4324
|
-
children:
|
|
4325
|
+
children: u.label
|
|
4325
4326
|
}
|
|
4326
4327
|
)
|
|
4327
4328
|
]
|
|
@@ -4335,7 +4336,7 @@ const In = (e) => {
|
|
|
4335
4336
|
className: be("line", t == null ? void 0 : t.line)
|
|
4336
4337
|
}
|
|
4337
4338
|
)
|
|
4338
|
-
] },
|
|
4339
|
+
] }, u.value);
|
|
4339
4340
|
})
|
|
4340
4341
|
}
|
|
4341
4342
|
);
|
|
@@ -4375,10 +4376,10 @@ const In = (e) => {
|
|
|
4375
4376
|
children: c.label
|
|
4376
4377
|
},
|
|
4377
4378
|
c.value
|
|
4378
|
-
)) }),
|
|
4379
|
+
)) }), ga = d.div`
|
|
4379
4380
|
display: flex;
|
|
4380
4381
|
flex-direction: column;
|
|
4381
|
-
`,
|
|
4382
|
+
`, ua = d.div`
|
|
4382
4383
|
display: grid;
|
|
4383
4384
|
grid-template-columns: 20px 1fr;
|
|
4384
4385
|
gap: 0 12px;
|
|
@@ -4417,9 +4418,9 @@ const In = (e) => {
|
|
|
4417
4418
|
color: ${i["iron-grey"]};
|
|
4418
4419
|
margin-top: 8px;
|
|
4419
4420
|
line-height: 1.5;
|
|
4420
|
-
`, te = z("timeline"), Dd = ({ className: e, classnames: t, items: o, ref: r, ...n }) => /* @__PURE__ */ a(
|
|
4421
|
+
`, te = z("timeline"), Dd = ({ className: e, classnames: t, items: o, ref: r, ...n }) => /* @__PURE__ */ a(ga, { ...n, ref: r, className: te("container", e), children: o.map((l, s) => {
|
|
4421
4422
|
const c = s === o.length - 1;
|
|
4422
|
-
return /* @__PURE__ */ m(
|
|
4423
|
+
return /* @__PURE__ */ m(ua, { className: te("item", t == null ? void 0 : t.item), children: [
|
|
4423
4424
|
/* @__PURE__ */ m(ha, { $last: c, children: [
|
|
4424
4425
|
/* @__PURE__ */ a(fa, { className: te("dot", t == null ? void 0 : t.dot) }),
|
|
4425
4426
|
/* @__PURE__ */ a(xa, { className: te("line", t == null ? void 0 : t.line), $last: c })
|
|
@@ -4427,7 +4428,7 @@ const In = (e) => {
|
|
|
4427
4428
|
/* @__PURE__ */ m(ba, { className: te("content", t == null ? void 0 : t.content), $last: c, children: [
|
|
4428
4429
|
/* @__PURE__ */ a($a, { className: te("title", t == null ? void 0 : t.title), children: l.title }),
|
|
4429
4430
|
l.description && /* @__PURE__ */ a(ya, { className: te("description", t == null ? void 0 : t.description), children: l.description }),
|
|
4430
|
-
l.
|
|
4431
|
+
l.content && /* @__PURE__ */ a(ma, { className: te("body", t == null ? void 0 : t.body), children: l.content })
|
|
4431
4432
|
] })
|
|
4432
4433
|
] }, s);
|
|
4433
4434
|
}) }), Ot = Se(null), qe = 3, St = {
|
|
@@ -4806,9 +4807,9 @@ const In = (e) => {
|
|
|
4806
4807
|
portalRenderNode: s,
|
|
4807
4808
|
ref: c,
|
|
4808
4809
|
variant: p = "dark",
|
|
4809
|
-
...
|
|
4810
|
+
...u
|
|
4810
4811
|
}) => {
|
|
4811
|
-
const [
|
|
4812
|
+
const [g, h] = L(!1), [x, f] = L(null), [y, b] = L(l), [$, v] = L({ top: 0, left: 0 }), w = B(null), S = B(null), I = E(() => {
|
|
4812
4813
|
var G, K;
|
|
4813
4814
|
if (!w.current) return;
|
|
4814
4815
|
const N = w.current.getBoundingClientRect(), A = ((G = S.current) == null ? void 0 : G.offsetWidth) ?? 100, k = ((K = S.current) == null ? void 0 : K.offsetHeight) ?? 30, _ = N.top - oe, P = window.innerHeight - N.bottom - oe, j = N.left - oe, q = window.innerWidth - N.right - oe;
|
|
@@ -4836,8 +4837,8 @@ const In = (e) => {
|
|
|
4836
4837
|
}
|
|
4837
4838
|
}, [l, s]);
|
|
4838
4839
|
It(() => {
|
|
4839
|
-
|
|
4840
|
-
}, [
|
|
4840
|
+
g && I();
|
|
4841
|
+
}, [g, I]);
|
|
4841
4842
|
const R = () => {
|
|
4842
4843
|
const N = setTimeout(() => {
|
|
4843
4844
|
h(!0);
|
|
@@ -4853,7 +4854,7 @@ const In = (e) => {
|
|
|
4853
4854
|
className: Ze("content", o == null ? void 0 : o.content),
|
|
4854
4855
|
$placement: y,
|
|
4855
4856
|
$variant: p,
|
|
4856
|
-
$visible:
|
|
4857
|
+
$visible: g,
|
|
4857
4858
|
style: { top: $.top, left: $.left },
|
|
4858
4859
|
children: r
|
|
4859
4860
|
}
|
|
@@ -4866,14 +4867,14 @@ const In = (e) => {
|
|
|
4866
4867
|
className: Ze("content", o == null ? void 0 : o.content),
|
|
4867
4868
|
$placement: y,
|
|
4868
4869
|
$variant: p,
|
|
4869
|
-
$visible:
|
|
4870
|
+
$visible: g,
|
|
4870
4871
|
children: r
|
|
4871
4872
|
}
|
|
4872
4873
|
);
|
|
4873
4874
|
return /* @__PURE__ */ m(
|
|
4874
4875
|
Aa,
|
|
4875
4876
|
{
|
|
4876
|
-
...
|
|
4877
|
+
...u,
|
|
4877
4878
|
ref: (N) => {
|
|
4878
4879
|
w.current = N, typeof c == "function" ? c(N) : c && (c.current = N);
|
|
4879
4880
|
},
|
|
@@ -4914,8 +4915,8 @@ const In = (e) => {
|
|
|
4914
4915
|
src: c,
|
|
4915
4916
|
...p
|
|
4916
4917
|
}) => {
|
|
4917
|
-
const
|
|
4918
|
-
return /* @__PURE__ */ m(_a, { ...p, ref: s, className: _e("container", o), $reverse:
|
|
4918
|
+
const u = e === "right";
|
|
4919
|
+
return /* @__PURE__ */ m(_a, { ...p, ref: s, className: _e("container", o), $reverse: u, children: [
|
|
4919
4920
|
/* @__PURE__ */ a(
|
|
4920
4921
|
$o,
|
|
4921
4922
|
{
|
|
@@ -4926,7 +4927,7 @@ const In = (e) => {
|
|
|
4926
4927
|
className: _e("avatar", r == null ? void 0 : r.avatar)
|
|
4927
4928
|
}
|
|
4928
4929
|
),
|
|
4929
|
-
/* @__PURE__ */ m(Ma, { $align:
|
|
4930
|
+
/* @__PURE__ */ m(Ma, { $align: u ? "right" : "left", children: [
|
|
4930
4931
|
/* @__PURE__ */ a(Da, { className: _e("name", r == null ? void 0 : r.name), children: l }),
|
|
4931
4932
|
n && /* @__PURE__ */ a(Fa, { className: _e("description", r == null ? void 0 : r.description), children: n })
|
|
4932
4933
|
] })
|
|
@@ -4958,8 +4959,8 @@ export {
|
|
|
4958
4959
|
cd as DateRange,
|
|
4959
4960
|
sd as Divider,
|
|
4960
4961
|
pd as Drawer,
|
|
4961
|
-
|
|
4962
|
-
|
|
4962
|
+
gd as Dropdown,
|
|
4963
|
+
ud as EmptyState,
|
|
4963
4964
|
cc as FieldLabel,
|
|
4964
4965
|
sc as FieldMessage,
|
|
4965
4966
|
hd as FieldRow,
|
|
@@ -4972,8 +4973,8 @@ export {
|
|
|
4972
4973
|
pc as Input,
|
|
4973
4974
|
V as KEYFRAMES,
|
|
4974
4975
|
Wd as KEY_SYMBOLS,
|
|
4975
|
-
|
|
4976
|
-
|
|
4976
|
+
gc as KeySymbol,
|
|
4977
|
+
uc as KeysBindings,
|
|
4977
4978
|
md as MenuButton,
|
|
4978
4979
|
hc as Modal,
|
|
4979
4980
|
fc as MultiSelect,
|