@useinsider/ab-components 0.0.115-beta.5 → 0.0.116-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ab-components.cjs.js +38 -38
- package/dist/ab-components.cjs.js.map +1 -1
- package/dist/ab-components.es.js +142 -139
- package/dist/ab-components.es.js.map +1 -1
- package/dist/ab-components.iife.js +19 -19
- package/dist/ab-components.iife.js.map +1 -1
- package/dist/ab-components.umd.js +19 -19
- package/dist/ab-components.umd.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/ab-components.es.js
CHANGED
|
@@ -417,11 +417,11 @@ const aa = async (e, a, t) => {
|
|
|
417
417
|
x: c,
|
|
418
418
|
y: v
|
|
419
419
|
} = Gt(u, n, r), I = n, w = {}, S = 0;
|
|
420
|
-
for (let
|
|
420
|
+
for (let T = 0; T < i.length; T++) {
|
|
421
421
|
const {
|
|
422
422
|
name: B,
|
|
423
423
|
fn: g
|
|
424
|
-
} = i[
|
|
424
|
+
} = i[T], {
|
|
425
425
|
x: A,
|
|
426
426
|
y: D,
|
|
427
427
|
data: h,
|
|
@@ -453,7 +453,7 @@ const aa = async (e, a, t) => {
|
|
|
453
453
|
}) : P.rects), {
|
|
454
454
|
x: c,
|
|
455
455
|
y: v
|
|
456
|
-
} = Gt(u, I, r)),
|
|
456
|
+
} = Gt(u, I, r)), T = -1);
|
|
457
457
|
}
|
|
458
458
|
return {
|
|
459
459
|
x: c,
|
|
@@ -529,10 +529,10 @@ const oa = (e) => ({
|
|
|
529
529
|
const v = fn(c), I = {
|
|
530
530
|
x: t,
|
|
531
531
|
y: n
|
|
532
|
-
}, w = Pt(o), S = Rt(w),
|
|
532
|
+
}, w = Pt(o), S = Rt(w), T = await l.getDimensions(u), B = w === "y", g = B ? "top" : "left", A = B ? "bottom" : "right", D = B ? "clientHeight" : "clientWidth", h = s.reference[S] + s.reference[w] - I[w] - s.floating[S], P = I[w] - s.reference[w], j = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(u));
|
|
533
533
|
let R = j ? j[D] : 0;
|
|
534
534
|
(!R || !await (l.isElement == null ? void 0 : l.isElement(j))) && (R = i.floating[D] || s.floating[S]);
|
|
535
|
-
const F = h / 2 - P / 2,
|
|
535
|
+
const F = h / 2 - P / 2, $ = R / 2 - T[S] / 2 - 1, H = Oe(v[g], $), W = Oe(v[A], $), ee = H, ne = R - T[S] - W, f = R / 2 - T[S] / 2 + F, d = Et(ee, f, ne), k = !r.arrow && et(o) != null && f !== d && s.reference[S] / 2 - (f < ee ? H : W) - T[S] / 2 < 0, b = k ? f < ee ? f - ee : f - ne : 0;
|
|
536
536
|
return {
|
|
537
537
|
[w]: I[w] + b,
|
|
538
538
|
data: {
|
|
@@ -564,23 +564,23 @@ const oa = (e) => ({
|
|
|
564
564
|
fallbackPlacements: I,
|
|
565
565
|
fallbackStrategy: w = "bestFit",
|
|
566
566
|
fallbackAxisSideDirection: S = "none",
|
|
567
|
-
flipAlignment:
|
|
567
|
+
flipAlignment: T = !0,
|
|
568
568
|
...B
|
|
569
569
|
} = Je(e, a);
|
|
570
570
|
if ((t = s.arrow) != null && t.alignmentOffset)
|
|
571
571
|
return {};
|
|
572
|
-
const g = Re(o), A = Ee(i), D = Re(i) === i, h = await (r.isRTL == null ? void 0 : r.isRTL(u.floating)), P = I || (D ||
|
|
573
|
-
!I && j && P.push(...ta(i,
|
|
574
|
-
const R = [i, ...P], F = await zt(a, B),
|
|
572
|
+
const g = Re(o), A = Ee(i), D = Re(i) === i, h = await (r.isRTL == null ? void 0 : r.isRTL(u.floating)), P = I || (D || !T ? [vt(i)] : Xn(i)), j = S !== "none";
|
|
573
|
+
!I && j && P.push(...ta(i, T, S, h));
|
|
574
|
+
const R = [i, ...P], F = await zt(a, B), $ = [];
|
|
575
575
|
let H = ((n = s.flip) == null ? void 0 : n.overflows) || [];
|
|
576
|
-
if (c &&
|
|
576
|
+
if (c && $.push(F[g]), v) {
|
|
577
577
|
const f = Qn(o, l, h);
|
|
578
|
-
|
|
578
|
+
$.push(F[f[0]], F[f[1]]);
|
|
579
579
|
}
|
|
580
580
|
if (H = [...H, {
|
|
581
581
|
placement: o,
|
|
582
|
-
overflows:
|
|
583
|
-
}],
|
|
582
|
+
overflows: $
|
|
583
|
+
}], !$.every((f) => f <= 0)) {
|
|
584
584
|
var W, ee;
|
|
585
585
|
const f = (((W = s.flip) == null ? void 0 : W.index) || 0) + 1, d = R[f];
|
|
586
586
|
if (d && (!(v === "alignment" ? A !== Ee(d) : !1) || // We leave the current main axis only if every placement on that axis
|
|
@@ -714,16 +714,16 @@ const ra = function(e) {
|
|
|
714
714
|
const B = v === "y" ? "top" : "left", g = v === "y" ? "bottom" : "right", A = S + c[B], D = S - c[g];
|
|
715
715
|
S = Et(A, S, D);
|
|
716
716
|
}
|
|
717
|
-
const
|
|
717
|
+
const T = i.fn({
|
|
718
718
|
...a,
|
|
719
719
|
[I]: w,
|
|
720
720
|
[v]: S
|
|
721
721
|
});
|
|
722
722
|
return {
|
|
723
|
-
|
|
723
|
+
...T,
|
|
724
724
|
data: {
|
|
725
|
-
x:
|
|
726
|
-
y:
|
|
725
|
+
x: T.x - t,
|
|
726
|
+
y: T.y - n,
|
|
727
727
|
enabled: {
|
|
728
728
|
[I]: s,
|
|
729
729
|
[v]: l
|
|
@@ -749,23 +749,23 @@ const ra = function(e) {
|
|
|
749
749
|
...u
|
|
750
750
|
} = Je(e, a), c = await zt(a, u), v = Re(o), I = et(o), w = Ee(o) === "y", {
|
|
751
751
|
width: S,
|
|
752
|
-
height:
|
|
752
|
+
height: T
|
|
753
753
|
} = s.floating;
|
|
754
754
|
let B, g;
|
|
755
755
|
v === "top" || v === "bottom" ? (B = v, g = I === (await (l.isRTL == null ? void 0 : l.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (g = v, B = I === "end" ? "top" : "bottom");
|
|
756
|
-
const A =
|
|
756
|
+
const A = T - c.top - c.bottom, D = S - c.left - c.right, h = Oe(T - c[B], A), P = Oe(S - c[g], D), j = !a.middlewareData.shift;
|
|
757
757
|
let R = h, F = P;
|
|
758
758
|
if ((t = a.middlewareData.shift) != null && t.enabled.x && (F = D), (n = a.middlewareData.shift) != null && n.enabled.y && (R = A), j && !I) {
|
|
759
759
|
const H = me(c.left, 0), W = me(c.right, 0), ee = me(c.top, 0), ne = me(c.bottom, 0);
|
|
760
|
-
w ? F = S - 2 * (H !== 0 || W !== 0 ? H + W : me(c.left, c.right)) : R =
|
|
760
|
+
w ? F = S - 2 * (H !== 0 || W !== 0 ? H + W : me(c.left, c.right)) : R = T - 2 * (ee !== 0 || ne !== 0 ? ee + ne : me(c.top, c.bottom));
|
|
761
761
|
}
|
|
762
762
|
await r({
|
|
763
763
|
...a,
|
|
764
764
|
availableWidth: F,
|
|
765
765
|
availableHeight: R
|
|
766
766
|
});
|
|
767
|
-
const
|
|
768
|
-
return S !==
|
|
767
|
+
const $ = await l.getDimensions(i.floating);
|
|
768
|
+
return S !== $.width || T !== $.height ? {
|
|
769
769
|
reset: {
|
|
770
770
|
rects: !0
|
|
771
771
|
}
|
|
@@ -935,10 +935,10 @@ function Fe(e, a, t, n) {
|
|
|
935
935
|
let r = (o.left + i.x) / l.x, u = (o.top + i.y) / l.y, c = o.width / l.x, v = o.height / l.y;
|
|
936
936
|
if (s) {
|
|
937
937
|
const I = ge(s), w = n && we(n) ? ge(n) : n;
|
|
938
|
-
let S = I,
|
|
939
|
-
for (;
|
|
940
|
-
const B = Qe(
|
|
941
|
-
r *= B.x, u *= B.y, c *= B.x, v *= B.y, r += D, u += h, S = ge(
|
|
938
|
+
let S = I, T = Dt(S);
|
|
939
|
+
for (; T && n && w !== S; ) {
|
|
940
|
+
const B = Qe(T), g = T.getBoundingClientRect(), A = xe(T), D = g.left + (T.clientLeft + parseFloat(A.paddingLeft)) * B.x, h = g.top + (T.clientTop + parseFloat(A.paddingTop)) * B.y;
|
|
941
|
+
r *= B.x, u *= B.y, c *= B.x, v *= B.y, r += D, u += h, S = ge(T), T = Dt(S);
|
|
942
942
|
}
|
|
943
943
|
}
|
|
944
944
|
return bt({
|
|
@@ -1195,8 +1195,8 @@ function Da(e, a) {
|
|
|
1195
1195
|
} = u;
|
|
1196
1196
|
if (i || a(), !I || !w)
|
|
1197
1197
|
return;
|
|
1198
|
-
const S = _t(v),
|
|
1199
|
-
rootMargin: -S + "px " +
|
|
1198
|
+
const S = _t(v), T = _t(o.clientWidth - (c + I)), B = _t(o.clientHeight - (v + w)), g = _t(c), D = {
|
|
1199
|
+
rootMargin: -S + "px " + -T + "px " + -B + "px " + -g + "px",
|
|
1200
1200
|
threshold: me(0, Oe(1, r)) || 1
|
|
1201
1201
|
};
|
|
1202
1202
|
let h = !0;
|
|
@@ -1247,11 +1247,11 @@ function yt(e, a, t, n) {
|
|
|
1247
1247
|
(D = w) == null || D.observe(a);
|
|
1248
1248
|
})), t();
|
|
1249
1249
|
}), u && !r && w.observe(u), w.observe(a));
|
|
1250
|
-
let S,
|
|
1250
|
+
let S, T = r ? Fe(e) : null;
|
|
1251
1251
|
r && B();
|
|
1252
1252
|
function B() {
|
|
1253
1253
|
const g = Fe(e);
|
|
1254
|
-
|
|
1254
|
+
T && !wn(T, g) && t(), T = g, S = requestAnimationFrame(B);
|
|
1255
1255
|
}
|
|
1256
1256
|
return t(), () => {
|
|
1257
1257
|
var g;
|
|
@@ -1320,7 +1320,7 @@ function Ct(e, a, t) {
|
|
|
1320
1320
|
}), r = M(() => {
|
|
1321
1321
|
var R;
|
|
1322
1322
|
return (R = Ge(t.transform)) != null ? R : !0;
|
|
1323
|
-
}), u = M(() => Ot(e.value)), c = M(() => Ot(a.value)), v = O(0), I = O(0), w = O(i.value), S = O(l.value),
|
|
1323
|
+
}), u = M(() => Ot(e.value)), c = M(() => Ot(a.value)), v = O(0), I = O(0), w = O(i.value), S = O(l.value), T = Sn({}), B = O(!1), g = M(() => {
|
|
1324
1324
|
const R = {
|
|
1325
1325
|
position: w.value,
|
|
1326
1326
|
left: "0",
|
|
@@ -1328,17 +1328,17 @@ function Ct(e, a, t) {
|
|
|
1328
1328
|
};
|
|
1329
1329
|
if (!c.value)
|
|
1330
1330
|
return R;
|
|
1331
|
-
const F = en(c.value, v.value),
|
|
1331
|
+
const F = en(c.value, v.value), $ = en(c.value, I.value);
|
|
1332
1332
|
return r.value ? {
|
|
1333
1333
|
...R,
|
|
1334
|
-
transform: "translate(" + F + "px, " +
|
|
1334
|
+
transform: "translate(" + F + "px, " + $ + "px)",
|
|
1335
1335
|
...xn(c.value) >= 1.5 && {
|
|
1336
1336
|
willChange: "transform"
|
|
1337
1337
|
}
|
|
1338
1338
|
} : {
|
|
1339
1339
|
position: w.value,
|
|
1340
1340
|
left: F + "px",
|
|
1341
|
-
top:
|
|
1341
|
+
top: $ + "px"
|
|
1342
1342
|
};
|
|
1343
1343
|
});
|
|
1344
1344
|
let A;
|
|
@@ -1351,7 +1351,7 @@ function Ct(e, a, t) {
|
|
|
1351
1351
|
placement: l.value,
|
|
1352
1352
|
strategy: i.value
|
|
1353
1353
|
}).then((F) => {
|
|
1354
|
-
v.value = F.x, I.value = F.y, w.value = F.strategy, S.value = F.placement,
|
|
1354
|
+
v.value = F.x, I.value = F.y, w.value = F.strategy, S.value = F.placement, T.value = F.middlewareData, B.value = R !== !1;
|
|
1355
1355
|
});
|
|
1356
1356
|
}
|
|
1357
1357
|
function h() {
|
|
@@ -1381,7 +1381,7 @@ function Ct(e, a, t) {
|
|
|
1381
1381
|
y: Ue(I),
|
|
1382
1382
|
strategy: Ue(w),
|
|
1383
1383
|
placement: Ue(S),
|
|
1384
|
-
middlewareData: Ue(
|
|
1384
|
+
middlewareData: Ue(T),
|
|
1385
1385
|
isPositioned: Ue(B),
|
|
1386
1386
|
floatingStyles: g,
|
|
1387
1387
|
update: D
|
|
@@ -1427,7 +1427,8 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
1427
1427
|
status: { type: Boolean },
|
|
1428
1428
|
preventXss: { type: Boolean },
|
|
1429
1429
|
iconName: {},
|
|
1430
|
-
hideDelay: {}
|
|
1430
|
+
hideDelay: {},
|
|
1431
|
+
showDelay: {}
|
|
1431
1432
|
},
|
|
1432
1433
|
setup(e) {
|
|
1433
1434
|
const a = {
|
|
@@ -1447,22 +1448,24 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
1447
1448
|
xt(),
|
|
1448
1449
|
Ha({ element: r, padding: Vt })
|
|
1449
1450
|
]
|
|
1450
|
-
}),
|
|
1451
|
-
t.value && (clearTimeout(t.value), t.value = null), n.value && (clearTimeout(n.value), n.value = null)
|
|
1451
|
+
}), T = () => {
|
|
1452
|
+
t.value && (clearTimeout(t.value), t.value = null), n.value && (clearTimeout(n.value), n.value = null);
|
|
1453
|
+
const $ = s.showDelay ?? Qa;
|
|
1454
|
+
window.wasTooltipShown || $ <= 0 ? u.value = !0 : t.value = setTimeout(() => {
|
|
1452
1455
|
if (!o.value) {
|
|
1453
1456
|
t.value = null;
|
|
1454
1457
|
return;
|
|
1455
1458
|
}
|
|
1456
1459
|
u.value = !0, window.wasTooltipShown = !0, t.value = null;
|
|
1457
|
-
},
|
|
1460
|
+
}, $);
|
|
1458
1461
|
}, B = () => {
|
|
1459
1462
|
t.value && (clearTimeout(t.value), t.value = null), n.value && (clearTimeout(n.value), n.value = null);
|
|
1460
|
-
const
|
|
1461
|
-
|
|
1463
|
+
const $ = s.hideDelay ?? 0;
|
|
1464
|
+
$ > 0 ? n.value = setTimeout(() => {
|
|
1462
1465
|
o.value && (u.value = !1), n.value = null;
|
|
1463
|
-
},
|
|
1466
|
+
}, $) : u.value = !1;
|
|
1464
1467
|
}, g = () => {
|
|
1465
|
-
|
|
1468
|
+
T();
|
|
1466
1469
|
}, A = () => {
|
|
1467
1470
|
B();
|
|
1468
1471
|
}, D = () => {
|
|
@@ -1481,14 +1484,14 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
1481
1484
|
...v.value,
|
|
1482
1485
|
display: h.value ? "inline-block" : "none"
|
|
1483
1486
|
})), j = M(() => {
|
|
1484
|
-
const [
|
|
1487
|
+
const [$] = S.value.split("-");
|
|
1485
1488
|
return {
|
|
1486
|
-
[a[
|
|
1489
|
+
[a[$]]: "-4px"
|
|
1487
1490
|
};
|
|
1488
1491
|
}), R = M(() => {
|
|
1489
1492
|
if (!s.arrowPlacement)
|
|
1490
1493
|
return {};
|
|
1491
|
-
const [
|
|
1494
|
+
const [$] = S.value.split("-"), H = $ === "top" || $ === "bottom" ? "left" : "top";
|
|
1492
1495
|
switch (s.arrowPlacement) {
|
|
1493
1496
|
case "start":
|
|
1494
1497
|
return { [H]: `${Vt}px` };
|
|
@@ -1500,9 +1503,9 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
1500
1503
|
return {};
|
|
1501
1504
|
}
|
|
1502
1505
|
}), F = M(() => {
|
|
1503
|
-
var
|
|
1506
|
+
var $, H;
|
|
1504
1507
|
return r.value ? {
|
|
1505
|
-
left: ((
|
|
1508
|
+
left: (($ = w.value.arrow) == null ? void 0 : $.x) != null ? `${w.value.arrow.x}px` : "",
|
|
1506
1509
|
top: ((H = w.value.arrow) == null ? void 0 : H.y) != null ? `${w.value.arrow.y}px` : "",
|
|
1507
1510
|
right: "",
|
|
1508
1511
|
bottom: "",
|
|
@@ -1510,20 +1513,20 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
1510
1513
|
...R.value
|
|
1511
1514
|
} : {};
|
|
1512
1515
|
});
|
|
1513
|
-
return (
|
|
1516
|
+
return ($, H) => (_(), m(le, null, [
|
|
1514
1517
|
V("div", {
|
|
1515
|
-
id:
|
|
1518
|
+
id: $.id,
|
|
1516
1519
|
ref_key: "triggerRef",
|
|
1517
1520
|
ref: i,
|
|
1518
1521
|
class: y(p(at).trigger),
|
|
1519
1522
|
onMouseenter: g,
|
|
1520
1523
|
onMouseleave: A
|
|
1521
1524
|
}, [
|
|
1522
|
-
|
|
1525
|
+
$.iconName ? (_(), te(p(Z), {
|
|
1523
1526
|
key: 0,
|
|
1524
1527
|
color: p(at).trigger__icon,
|
|
1525
|
-
name:
|
|
1526
|
-
}, null, 8, ["color", "name"])) : pe(
|
|
1528
|
+
name: $.iconName
|
|
1529
|
+
}, null, 8, ["color", "name"])) : pe($.$slots, "default", { key: 1 })
|
|
1527
1530
|
], 42, Ka),
|
|
1528
1531
|
(_(), te(cn, { to: "body" }, [
|
|
1529
1532
|
V("div", {
|
|
@@ -1534,13 +1537,13 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
1534
1537
|
onMouseenter: g,
|
|
1535
1538
|
onMouseleave: A
|
|
1536
1539
|
}, [
|
|
1537
|
-
|
|
1540
|
+
$.$slots.contentSlot ? pe($.$slots, "contentSlot", { key: 0 }) : (_(), m("div", {
|
|
1538
1541
|
key: 1,
|
|
1539
1542
|
class: y(p(at).bubble__content)
|
|
1540
1543
|
}, [
|
|
1541
1544
|
V("div", { innerHTML: c.value }, null, 8, Ga)
|
|
1542
1545
|
], 2)),
|
|
1543
|
-
|
|
1546
|
+
$.$slots.contentSlot ? L("", !0) : (_(), m("div", {
|
|
1544
1547
|
key: 2,
|
|
1545
1548
|
ref_key: "floatingArrowRef",
|
|
1546
1549
|
ref: r,
|
|
@@ -1612,11 +1615,11 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
1612
1615
|
return new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime();
|
|
1613
1616
|
}
|
|
1614
1617
|
const I = O(""), w = M(() => c(t.min, t.format)), S = M(() => c(t.max, t.format));
|
|
1615
|
-
function
|
|
1618
|
+
function T(d) {
|
|
1616
1619
|
const k = v(d), b = w.value ? v(w.value) : null, x = S.value ? v(S.value) : null;
|
|
1617
1620
|
return (b === null || k >= b) && (x === null || k <= x);
|
|
1618
1621
|
}
|
|
1619
|
-
const B = M(() => c(I.value, t.format)), g = M(() => B.value !== null &&
|
|
1622
|
+
const B = M(() => c(I.value, t.format)), g = M(() => B.value !== null && T(B.value));
|
|
1620
1623
|
function A() {
|
|
1621
1624
|
const d = c(t.modelValue, t.format);
|
|
1622
1625
|
I.value = d ? u(d, t.format) : "";
|
|
@@ -1650,7 +1653,7 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
1650
1653
|
label: Q.getDate(),
|
|
1651
1654
|
display: u(Q, t.format),
|
|
1652
1655
|
inCurrentMonth: Q.getMonth() === k,
|
|
1653
|
-
disabled:
|
|
1656
|
+
disabled: !T(Q),
|
|
1654
1657
|
selected: E !== null && v(Q) === E
|
|
1655
1658
|
});
|
|
1656
1659
|
}
|
|
@@ -1660,7 +1663,7 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
1660
1663
|
const d = h.value.month - 1;
|
|
1661
1664
|
h.value = d < 0 ? { year: h.value.year - 1, month: 11 } : { year: h.value.year, month: d };
|
|
1662
1665
|
}
|
|
1663
|
-
function
|
|
1666
|
+
function $() {
|
|
1664
1667
|
const d = h.value.month + 1;
|
|
1665
1668
|
h.value = d > 11 ? { year: h.value.year + 1, month: 0 } : { year: h.value.year, month: d };
|
|
1666
1669
|
}
|
|
@@ -1733,7 +1736,7 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
1733
1736
|
class: "ab-calendar__nav",
|
|
1734
1737
|
"data-testid": "calendar-next",
|
|
1735
1738
|
"aria-label": d.nextMonthLabel,
|
|
1736
|
-
onClick:
|
|
1739
|
+
onClick: $
|
|
1737
1740
|
}, [
|
|
1738
1741
|
G(Z, {
|
|
1739
1742
|
class: "ab-calendar__nav-icon",
|
|
@@ -2055,7 +2058,7 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
2055
2058
|
}, S = () => {
|
|
2056
2059
|
let f = "0-9";
|
|
2057
2060
|
return t.allowDecimal && (f += "\\."), t.allowComma && (f += ","), new RegExp(`[^${f}]+`, "g");
|
|
2058
|
-
},
|
|
2061
|
+
}, T = (f) => {
|
|
2059
2062
|
if (!(f != null && f.target))
|
|
2060
2063
|
return;
|
|
2061
2064
|
const d = f.target, { selectionStart: k } = d;
|
|
@@ -2084,13 +2087,13 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
2084
2087
|
}, j = (f) => {
|
|
2085
2088
|
var b;
|
|
2086
2089
|
const d = f;
|
|
2087
|
-
u.value && (
|
|
2090
|
+
u.value && (T(d), B(d)), I(d);
|
|
2088
2091
|
const k = ((b = d == null ? void 0 : d.target) == null ? void 0 : b.value) || "";
|
|
2089
2092
|
o.value = k, n("input", k), n("update:modelValue", k);
|
|
2090
2093
|
}, R = (f) => {
|
|
2091
2094
|
var b;
|
|
2092
2095
|
const d = f;
|
|
2093
|
-
u.value && (
|
|
2096
|
+
u.value && (T(d), B(d)), I(d);
|
|
2094
2097
|
const k = ((b = d == null ? void 0 : d.target) == null ? void 0 : b.value) || "";
|
|
2095
2098
|
o.value = k, n("change", k), n("update:modelValue", k);
|
|
2096
2099
|
}, F = (f) => {
|
|
@@ -2132,7 +2135,7 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
2132
2135
|
}), J = ce.join("");
|
|
2133
2136
|
const C = k + J.length, U = x.slice(0, k) + J + x.slice(b);
|
|
2134
2137
|
d.value = U, d.setSelectionRange(C, C), o.value = U, n("input", U), n("update:modelValue", U);
|
|
2135
|
-
},
|
|
2138
|
+
}, $ = (f) => {
|
|
2136
2139
|
n("leftIconClick", f);
|
|
2137
2140
|
}, H = (f) => {
|
|
2138
2141
|
n("rightIconClick", f);
|
|
@@ -2180,7 +2183,7 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
2180
2183
|
class: "in-basic-text-input-wrapper__icon-left",
|
|
2181
2184
|
name: f.leftIconName,
|
|
2182
2185
|
size: 24,
|
|
2183
|
-
onClick:
|
|
2186
|
+
onClick: $
|
|
2184
2187
|
}, null, 8, ["name"])) : L("", !0),
|
|
2185
2188
|
V("input", {
|
|
2186
2189
|
id: f.id,
|
|
@@ -2316,7 +2319,7 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
2316
2319
|
for (let E = x; E < d.length; E += b)
|
|
2317
2320
|
k.push(d.slice(E, E + b));
|
|
2318
2321
|
return k;
|
|
2319
|
-
}),
|
|
2322
|
+
}), T = M(() => {
|
|
2320
2323
|
const d = o.value, k = 1 - Math.abs(d * 6 % 2 - 1);
|
|
2321
2324
|
let b = 0, x = 0, E = 0;
|
|
2322
2325
|
return d < 1 / 6 ? (b = 1, x = k) : d < 2 / 6 ? (b = k, x = 1) : d < 3 / 6 ? (x = 1, E = k) : d < 4 / 6 ? (x = k, E = 1) : d < 5 / 6 ? (b = k, E = 1) : (b = 1, E = k), `rgb(${Math.round(b * 255)}, ${Math.round(x * 255)}, ${Math.round(E * 255)})`;
|
|
@@ -2333,7 +2336,7 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
2333
2336
|
}), oe(
|
|
2334
2337
|
() => t.color,
|
|
2335
2338
|
(d) => {
|
|
2336
|
-
d && (c.value = !0, d.toLowerCase() === "transparent" ? f() :
|
|
2339
|
+
d && (c.value = !0, d.toLowerCase() === "transparent" ? f() : $(d), setTimeout(() => {
|
|
2337
2340
|
c.value = !1;
|
|
2338
2341
|
}, 0));
|
|
2339
2342
|
},
|
|
@@ -2401,18 +2404,18 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
2401
2404
|
}
|
|
2402
2405
|
function j(d) {
|
|
2403
2406
|
const k = t.showOpacityInHex ? 8 : 6, b = String(d).replace(/[^0-9A-Fa-f]/g, "").slice(0, k).toUpperCase();
|
|
2404
|
-
r.value = b, t.showOpacityInHex ? (b.length === 6 || b.length === 8) &&
|
|
2407
|
+
r.value = b, t.showOpacityInHex ? (b.length === 6 || b.length === 8) && $(b) : b.length === 6 && $(b);
|
|
2405
2408
|
}
|
|
2406
2409
|
function R(d) {
|
|
2407
2410
|
var E;
|
|
2408
2411
|
const k = ((E = d.clipboardData) == null ? void 0 : E.getData("text")) || "", b = t.showOpacityInHex ? 8 : 6, x = k.replace(/^#/, "").replace(/[^0-9A-Fa-f]/g, "").slice(0, b).toUpperCase();
|
|
2409
|
-
t.showOpacityInHex ? x.length === 6 || x.length === 8 ? (r.value = x,
|
|
2412
|
+
t.showOpacityInHex ? x.length === 6 || x.length === 8 ? (r.value = x, $(x), d.preventDefault()) : x.length > 0 && (r.value = x, d.preventDefault()) : x.length === 6 ? (r.value = x, $(x), d.preventDefault()) : x.length > 0 && (r.value = x, d.preventDefault());
|
|
2410
2413
|
}
|
|
2411
2414
|
function F() {
|
|
2412
2415
|
const d = t.showOpacityInHex ? 8 : 6;
|
|
2413
2416
|
r.value.length !== d && A();
|
|
2414
2417
|
}
|
|
2415
|
-
function
|
|
2418
|
+
function $(d) {
|
|
2416
2419
|
const k = d.startsWith("#") ? d.slice(1) : d, b = /^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(k), x = /^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(k), E = x || b;
|
|
2417
2420
|
if (!E) {
|
|
2418
2421
|
const X = /rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/.exec(d);
|
|
@@ -2451,7 +2454,7 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
2451
2454
|
u.value.includes(d) || u.value.push(d);
|
|
2452
2455
|
}
|
|
2453
2456
|
function ne(d) {
|
|
2454
|
-
|
|
2457
|
+
$(d);
|
|
2455
2458
|
}
|
|
2456
2459
|
function f() {
|
|
2457
2460
|
r.value = "", i.value = 0, o.value = 0, s.value = 0, l.value = 0.4, n("color-change", "transparent");
|
|
@@ -2474,7 +2477,7 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
2474
2477
|
class: "color-picker__color-canvas",
|
|
2475
2478
|
style: se({
|
|
2476
2479
|
background: `linear-gradient(to bottom, transparent, black),
|
|
2477
|
-
linear-gradient(to right, white, ${
|
|
2480
|
+
linear-gradient(to right, white, ${T.value})`
|
|
2478
2481
|
}),
|
|
2479
2482
|
onMousedown: D
|
|
2480
2483
|
}, [
|
|
@@ -2553,7 +2556,7 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
2553
2556
|
key: `preset-${x}-${q}`,
|
|
2554
2557
|
color: E,
|
|
2555
2558
|
"is-transparent": E === "transparent",
|
|
2556
|
-
onClick: (Y) => E === "transparent" ? H(0) :
|
|
2559
|
+
onClick: (Y) => E === "transparent" ? H(0) : $(E)
|
|
2557
2560
|
}, null, 8, ["color", "is-transparent", "onClick"]))), 128))
|
|
2558
2561
|
]))), 128)),
|
|
2559
2562
|
S.value.length === 0 ? (_(), m("div", Zo, [
|
|
@@ -2659,36 +2662,36 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
2659
2662
|
const t = Cn, n = e, o = a, s = O(), l = O(), i = O(!1), r = O(null), u = O(""), c = O(null), v = O({ x: 0, y: 0, width: 0, shouldOpenUp: !1, height: n.menuHeight }), I = Wt([...n.items]), w = Wt([...n.items]), S = () => {
|
|
2660
2663
|
if (!s.value)
|
|
2661
2664
|
return;
|
|
2662
|
-
const { offsetTop:
|
|
2665
|
+
const { offsetTop: $, offsetLeft: H, offsetWidth: W } = s.value, ee = window.innerHeight, ne = $ + s.value.offsetHeight, f = ne + n.menuHeight > ee;
|
|
2663
2666
|
v.value = {
|
|
2664
2667
|
x: H + window.scrollX,
|
|
2665
|
-
y: f ?
|
|
2668
|
+
y: f ? $ + window.scrollY : ne + window.scrollY,
|
|
2666
2669
|
width: W,
|
|
2667
2670
|
shouldOpenUp: f,
|
|
2668
2671
|
height: n.menuHeight
|
|
2669
2672
|
};
|
|
2670
|
-
},
|
|
2673
|
+
}, T = () => {
|
|
2671
2674
|
S(), i.value = !i.value;
|
|
2672
2675
|
}, B = () => {
|
|
2673
2676
|
c.value = null, u.value = "", I.splice(0, I.length, ...w);
|
|
2674
2677
|
}, g = () => {
|
|
2675
2678
|
i.value = !1, B();
|
|
2676
|
-
}, A = (
|
|
2677
|
-
r.value =
|
|
2679
|
+
}, A = ($) => {
|
|
2680
|
+
r.value = $, o("select-item", $), o("update:modelValue", $.value), g();
|
|
2678
2681
|
}, D = () => {
|
|
2679
|
-
const
|
|
2682
|
+
const $ = u.value.trim(), H = n.validateAddItem($, w);
|
|
2680
2683
|
if (H) {
|
|
2681
2684
|
c.value = H, o("add-error", H);
|
|
2682
2685
|
return;
|
|
2683
2686
|
}
|
|
2684
2687
|
const W = {
|
|
2685
|
-
text:
|
|
2686
|
-
value:
|
|
2688
|
+
text: $,
|
|
2689
|
+
value: $
|
|
2687
2690
|
};
|
|
2688
2691
|
w.push(W), B(), o("item-added", W);
|
|
2689
2692
|
}, h = () => {
|
|
2690
|
-
const
|
|
2691
|
-
I.splice(0, I.length,
|
|
2693
|
+
const $ = At(w, "text", u.value);
|
|
2694
|
+
I.splice(0, I.length, ...$);
|
|
2692
2695
|
}, P = () => {
|
|
2693
2696
|
c.value = "";
|
|
2694
2697
|
}, j = M(() => ({
|
|
@@ -2699,36 +2702,36 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
2699
2702
|
}));
|
|
2700
2703
|
qe(() => {
|
|
2701
2704
|
if (S(), n.modelValue) {
|
|
2702
|
-
const
|
|
2703
|
-
|
|
2705
|
+
const $ = w.find((H) => H.value === n.modelValue);
|
|
2706
|
+
$ && (r.value = $);
|
|
2704
2707
|
}
|
|
2705
2708
|
});
|
|
2706
2709
|
const R = M(() => r.value ? r.value.text : "");
|
|
2707
|
-
oe(() => n.modelValue, (
|
|
2710
|
+
oe(() => n.modelValue, ($) => {
|
|
2708
2711
|
var H;
|
|
2709
|
-
if (((H = r.value) == null ? void 0 : H.value) !==
|
|
2710
|
-
const W = w.find((ee) => ee.value ===
|
|
2712
|
+
if (((H = r.value) == null ? void 0 : H.value) !== $) {
|
|
2713
|
+
const W = w.find((ee) => ee.value === $);
|
|
2711
2714
|
W && (r.value = W);
|
|
2712
2715
|
}
|
|
2713
2716
|
}), oe(
|
|
2714
2717
|
() => n.items,
|
|
2715
|
-
(
|
|
2716
|
-
w.splice(0, w.length,
|
|
2718
|
+
($) => {
|
|
2719
|
+
w.splice(0, w.length, ...$), I.splice(0, I.length, ...$);
|
|
2717
2720
|
},
|
|
2718
2721
|
{ deep: !0 }
|
|
2719
2722
|
);
|
|
2720
2723
|
const F = O({ handler: g, exclude: [s, l] });
|
|
2721
|
-
return (
|
|
2724
|
+
return ($, H) => (_(), m(le, null, [
|
|
2722
2725
|
V("div", {
|
|
2723
2726
|
ref_key: "dropdownRef",
|
|
2724
2727
|
ref: s,
|
|
2725
2728
|
class: y(p(re).dropdown)
|
|
2726
2729
|
}, [
|
|
2727
|
-
|
|
2730
|
+
$.label ? (_(), m("label", {
|
|
2728
2731
|
key: 0,
|
|
2729
2732
|
class: y(p(re).dropdown__label),
|
|
2730
|
-
for:
|
|
2731
|
-
}, z(
|
|
2733
|
+
for: $.id
|
|
2734
|
+
}, z($.label), 11, gl)) : L("", !0),
|
|
2732
2735
|
V("button", {
|
|
2733
2736
|
class: y([
|
|
2734
2737
|
p(re).dropdown__valueContent,
|
|
@@ -2736,15 +2739,15 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
2736
2739
|
[p(re)["dropdown__valueContent--open"]]: i.value
|
|
2737
2740
|
}
|
|
2738
2741
|
]),
|
|
2739
|
-
onClick:
|
|
2742
|
+
onClick: T
|
|
2740
2743
|
}, [
|
|
2741
2744
|
V("span", {
|
|
2742
2745
|
class: y(p(re).dropdown__value)
|
|
2743
2746
|
}, z(R.value), 3),
|
|
2744
|
-
|
|
2747
|
+
$.placeholder && !R.value ? (_(), m("span", {
|
|
2745
2748
|
key: 0,
|
|
2746
2749
|
class: y(p(re).dropdown__placeholder)
|
|
2747
|
-
}, z(
|
|
2750
|
+
}, z($.placeholder), 3)) : L("", !0),
|
|
2748
2751
|
(_(), m("svg", {
|
|
2749
2752
|
fill: "none",
|
|
2750
2753
|
height: "17",
|
|
@@ -2783,7 +2786,7 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
2783
2786
|
[p(re)["menu__searchInput--error"]]: c.value
|
|
2784
2787
|
}
|
|
2785
2788
|
]),
|
|
2786
|
-
placeholder:
|
|
2789
|
+
placeholder: $.searchPlaceHolder,
|
|
2787
2790
|
"onUpdate:modelValue": H[0] || (H[0] = (W) => u.value = W),
|
|
2788
2791
|
onFocus: P,
|
|
2789
2792
|
onInput: h
|
|
@@ -2799,7 +2802,7 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
2799
2802
|
key: 0,
|
|
2800
2803
|
class: y(p(re).menu__addButton),
|
|
2801
2804
|
onClick: D
|
|
2802
|
-
}, z(
|
|
2805
|
+
}, z($.addButtonText), 3)) : L("", !0)
|
|
2803
2806
|
], 2)) : L("", !0),
|
|
2804
2807
|
V("ul", {
|
|
2805
2808
|
class: y(p(re).menu__itemContainer)
|
|
@@ -3012,7 +3015,7 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
3012
3015
|
const t = e, n = a, o = O(null), s = O(null), l = O(null), i = O(""), r = O(""), u = /* @__PURE__ */ new Map(), c = `in-cascading-menu-search-${Math.random().toString(36).slice(2, 9)}`, v = M(() => t.searchInputId ?? c), I = M(() => `${v.value}-child`), w = M(() => t.items.flatMap((C) => "kind" in C && C.kind === "group" ? [
|
|
3013
3016
|
{ type: "group-header", label: C.label },
|
|
3014
3017
|
...C.items.map((U) => ({ type: "item", item: U }))
|
|
3015
|
-
] : [{ type: "item", item: C }])), S = M(() => w.value.filter((C) => C.type === "item").map((C) => C.item)),
|
|
3018
|
+
] : [{ type: "item", item: C }])), S = M(() => w.value.filter((C) => C.type === "item").map((C) => C.item)), T = M(() => t.searchable), B = M(() => T.value && r.value.trim().length > 0), g = M(() => {
|
|
3016
3019
|
const C = {
|
|
3017
3020
|
width: `${t.width}px`,
|
|
3018
3021
|
maxWidth: `${t.width}px`
|
|
@@ -3026,7 +3029,7 @@ const qa = "_bubble_6zub9_1", Ya = "_trigger_6zub9_43", Wa = "_trigger__icon_6zu
|
|
|
3026
3029
|
strategy: "fixed",
|
|
3027
3030
|
whileElementsMounted: yt,
|
|
3028
3031
|
middleware: [wt(3), kt(), xt({ padding: 8 })]
|
|
3029
|
-
}),
|
|
3032
|
+
}), $ = M(() => t.submenuPlacement === "left"), H = M(() => $.value ? "left-start" : "right-start"), W = M(() => $.value ? ["right-start"] : ["left-start"]), ee = M(() => [
|
|
3030
3033
|
wt({ mainAxis: 0, crossAxis: -8 }),
|
|
3031
3034
|
kt({ fallbackPlacements: W.value }),
|
|
3032
3035
|
xt({ padding: 8 }),
|
|
@@ -3293,12 +3296,12 @@ const oi = "_root_avx14_36", li = "_sizeMedium_avx14_44", on = {
|
|
|
3293
3296
|
emits: ["update:modelValue", "escape", "clear"],
|
|
3294
3297
|
setup(e, { expose: a, emit: t }) {
|
|
3295
3298
|
const n = e, o = t, s = An("search"), l = M(() => n.id || s), i = M(() => n.name || l.value), r = O(null), u = M(() => n.modelValue.length > 0), c = M(() => n.clearable && u.value ? ii : "line-search");
|
|
3296
|
-
function v(
|
|
3297
|
-
o("update:modelValue", String(
|
|
3299
|
+
function v(T) {
|
|
3300
|
+
o("update:modelValue", String(T));
|
|
3298
3301
|
}
|
|
3299
|
-
function I(
|
|
3300
|
-
if (
|
|
3301
|
-
if (
|
|
3302
|
+
function I(T) {
|
|
3303
|
+
if (T.key === "Escape") {
|
|
3304
|
+
if (T.stopPropagation(), n.modelValue) {
|
|
3302
3305
|
o("update:modelValue", ""), o("clear");
|
|
3303
3306
|
return;
|
|
3304
3307
|
}
|
|
@@ -3310,11 +3313,11 @@ const oi = "_root_avx14_36", li = "_sizeMedium_avx14_44", on = {
|
|
|
3310
3313
|
}
|
|
3311
3314
|
function S() {
|
|
3312
3315
|
var B, g;
|
|
3313
|
-
const
|
|
3314
|
-
|
|
3316
|
+
const T = (g = (B = r.value) == null ? void 0 : B.$el) == null ? void 0 : g.querySelector("input");
|
|
3317
|
+
T == null || T.focus();
|
|
3315
3318
|
}
|
|
3316
|
-
return a({ focus: S }), (
|
|
3317
|
-
class: y([p(on).root,
|
|
3319
|
+
return a({ focus: S }), (T, B) => (_(), m("div", {
|
|
3320
|
+
class: y([p(on).root, T.size === "medium" && p(on).sizeMedium]),
|
|
3318
3321
|
onKeydown: I
|
|
3319
3322
|
}, [
|
|
3320
3323
|
G(ut, {
|
|
@@ -3324,9 +3327,9 @@ const oi = "_root_avx14_36", li = "_sizeMedium_avx14_44", on = {
|
|
|
3324
3327
|
"right-icon-status": "",
|
|
3325
3328
|
"helper-message-status": !1,
|
|
3326
3329
|
"label-status": !1,
|
|
3327
|
-
"model-value":
|
|
3330
|
+
"model-value": T.modelValue,
|
|
3328
3331
|
name: i.value,
|
|
3329
|
-
"placeholder-text":
|
|
3332
|
+
"placeholder-text": T.placeholder,
|
|
3330
3333
|
"right-icon-name": c.value,
|
|
3331
3334
|
onRightIconClick: w,
|
|
3332
3335
|
"onUpdate:modelValue": v
|
|
@@ -3510,7 +3513,7 @@ const oi = "_root_avx14_36", li = "_sizeMedium_avx14_44", on = {
|
|
|
3510
3513
|
return "right-end";
|
|
3511
3514
|
const h = o.position === "top" ? "top" : "bottom";
|
|
3512
3515
|
return o.align === "center" ? h : o.align === "right" ? `${h}-end` : `${h}-start`;
|
|
3513
|
-
}), I = M(() => o.positionStrategy === "fixed" ? "fixed" : "absolute"), w = M(() => [wt(o.gap), kt(), xt({ padding: Mi })]), { floatingStyles: S, isPositioned:
|
|
3516
|
+
}), I = M(() => o.positionStrategy === "fixed" ? "fixed" : "absolute"), w = M(() => [wt(o.gap), kt(), xt({ padding: Mi })]), { floatingStyles: S, isPositioned: T } = Ct(r, i, {
|
|
3514
3517
|
placement: v,
|
|
3515
3518
|
strategy: I,
|
|
3516
3519
|
middleware: w,
|
|
@@ -3558,7 +3561,7 @@ const oi = "_root_avx14_36", li = "_sizeMedium_avx14_44", on = {
|
|
|
3558
3561
|
ref_key: "contentRef",
|
|
3559
3562
|
ref: i,
|
|
3560
3563
|
class: y(["popover__content", {
|
|
3561
|
-
"popover__content--visible": p(
|
|
3564
|
+
"popover__content--visible": p(T),
|
|
3562
3565
|
"popover__content--elevated": h.elevated
|
|
3563
3566
|
}]),
|
|
3564
3567
|
style: se([p(S), B.value]),
|
|
@@ -3620,7 +3623,7 @@ const oi = "_root_avx14_36", li = "_sizeMedium_avx14_44", on = {
|
|
|
3620
3623
|
s.value = !1, I();
|
|
3621
3624
|
}, S = (A) => {
|
|
3622
3625
|
l.value = A, o("select-item", A), o("update:modelValue", A.value), w();
|
|
3623
|
-
},
|
|
3626
|
+
}, T = () => {
|
|
3624
3627
|
const A = i.value.trim(), D = n.validateAddItem(A, c.value);
|
|
3625
3628
|
if (D) {
|
|
3626
3629
|
r.value = D, o("add-error", D);
|
|
@@ -3711,7 +3714,7 @@ const oi = "_root_avx14_36", li = "_sizeMedium_avx14_44", on = {
|
|
|
3711
3714
|
size: "small",
|
|
3712
3715
|
variant: "text",
|
|
3713
3716
|
label: A.addButtonText,
|
|
3714
|
-
onClick:
|
|
3717
|
+
onClick: T
|
|
3715
3718
|
}, null, 8, ["label"])) : L("", !0)
|
|
3716
3719
|
])) : L("", !0),
|
|
3717
3720
|
u.value.length === 0 && A.searchable ? pe(A.$slots, "no-results", { key: 1 }, void 0, !0) : (_(), m("ul", Vi, [
|
|
@@ -3844,7 +3847,7 @@ const oi = "_root_avx14_36", li = "_sizeMedium_avx14_44", on = {
|
|
|
3844
3847
|
B(), s("cut", g);
|
|
3845
3848
|
}, S = (g) => {
|
|
3846
3849
|
B(), s("paste", g);
|
|
3847
|
-
},
|
|
3850
|
+
}, T = (g) => {
|
|
3848
3851
|
B(), s("blur", g);
|
|
3849
3852
|
}, B = () => {
|
|
3850
3853
|
n.preventXss && l.value && (l.value.value = i(l.value.value));
|
|
@@ -3883,7 +3886,7 @@ const oi = "_root_avx14_36", li = "_sizeMedium_avx14_44", on = {
|
|
|
3883
3886
|
rows: g.rowLength,
|
|
3884
3887
|
style: se(o.value),
|
|
3885
3888
|
value: r.value,
|
|
3886
|
-
onBlur:
|
|
3889
|
+
onBlur: T,
|
|
3887
3890
|
onClick: v,
|
|
3888
3891
|
onCut: w,
|
|
3889
3892
|
onInput: I,
|
|
@@ -4335,20 +4338,20 @@ const ms = ["src"], Tr = /* @__PURE__ */ K({
|
|
|
4335
4338
|
const n = t, o = e;
|
|
4336
4339
|
let s, l;
|
|
4337
4340
|
const i = O(null), r = new Blob([rs(o.monacoVsPath)], { type: "text/html" }), u = URL.createObjectURL(r), c = fs(), v = async () => {
|
|
4338
|
-
var
|
|
4339
|
-
const S = (B = (
|
|
4341
|
+
var T, B;
|
|
4342
|
+
const S = (B = (T = i.value) == null ? void 0 : T.contentWindow) == null ? void 0 : B.monaco;
|
|
4340
4343
|
return S && (await c[o.language](s, S)).valid || !1;
|
|
4341
4344
|
};
|
|
4342
4345
|
async function I() {
|
|
4343
4346
|
const S = i.value;
|
|
4344
4347
|
if (!(S != null && S.contentWindow) || !S.contentDocument)
|
|
4345
4348
|
return;
|
|
4346
|
-
const { contentDocument:
|
|
4349
|
+
const { contentDocument: T, contentWindow: B } = S;
|
|
4347
4350
|
await B.editorPromise;
|
|
4348
|
-
const { monaco: g } = B, A =
|
|
4351
|
+
const { monaco: g } = B, A = T.querySelector(".editor");
|
|
4349
4352
|
if (!A)
|
|
4350
4353
|
return;
|
|
4351
|
-
if (
|
|
4354
|
+
if (T.body.appendChild(A), o.language === "liquid")
|
|
4352
4355
|
try {
|
|
4353
4356
|
ps(g, () => o.liquidVariables);
|
|
4354
4357
|
} catch (h) {
|
|
@@ -4393,7 +4396,7 @@ const ms = ["src"], Tr = /* @__PURE__ */ K({
|
|
|
4393
4396
|
n("update:shouldShowLengthError", !1);
|
|
4394
4397
|
}, 100));
|
|
4395
4398
|
try {
|
|
4396
|
-
const h =
|
|
4399
|
+
const h = T.createElement("style"), P = o.errorGlyph ? ".monaco-editor .margin { background-color: #dcdee6 !important; } .monaco-editor .line-numbers { color: #91949f !important; text-align: center !important; font-family: Figtree, sans-serif !important; font-size: 15px !important; } .monaco-editor .view-overlays .current-line { border: none !important; background-color: #cceeff44 !important; }" : "";
|
|
4397
4400
|
h.textContent = `
|
|
4398
4401
|
${P}
|
|
4399
4402
|
.decorationsOverviewRuler { display: none !important; }
|
|
@@ -4431,46 +4434,46 @@ const ms = ["src"], Tr = /* @__PURE__ */ K({
|
|
|
4431
4434
|
color: #91949f;
|
|
4432
4435
|
white-space: pre;
|
|
4433
4436
|
}
|
|
4434
|
-
`,
|
|
4437
|
+
`, T.head.appendChild(h);
|
|
4435
4438
|
const j = s.createDecorationsCollection(), R = s.getModel();
|
|
4436
4439
|
if (l = g.editor.onDidChangeMarkers(() => {
|
|
4437
4440
|
if (!R)
|
|
4438
4441
|
return;
|
|
4439
|
-
const F = g.editor.getModelMarkers({ resource: R.uri }).filter((
|
|
4440
|
-
o.errorGlyph && j.set(F.map((
|
|
4441
|
-
range: new g.Range(
|
|
4442
|
+
const F = g.editor.getModelMarkers({ resource: R.uri }).filter(($) => $.severity === g.MarkerSeverity.Error);
|
|
4443
|
+
o.errorGlyph && j.set(F.map(($) => ({
|
|
4444
|
+
range: new g.Range($.startLineNumber, 1, $.startLineNumber, 1),
|
|
4442
4445
|
options: {
|
|
4443
4446
|
isWholeLine: !0,
|
|
4444
4447
|
linesDecorationsClassName: "monaco-error-glyph"
|
|
4445
4448
|
}
|
|
4446
4449
|
}))), n("update:valid", F.length === 0);
|
|
4447
4450
|
}), o.errorGlyph) {
|
|
4448
|
-
const F =
|
|
4449
|
-
F.className = "monaco-error-tooltip", F.style.display = "none",
|
|
4450
|
-
const
|
|
4451
|
+
const F = T.createElement("div");
|
|
4452
|
+
F.className = "monaco-error-tooltip", F.style.display = "none", T.body.appendChild(F);
|
|
4453
|
+
const $ = () => {
|
|
4451
4454
|
F.style.display = "none";
|
|
4452
4455
|
};
|
|
4453
4456
|
s.onMouseMove((H) => {
|
|
4454
4457
|
var f;
|
|
4455
4458
|
if (H.target.type !== g.editor.MouseTargetType.GUTTER_LINE_DECORATIONS || !H.target.position || !R) {
|
|
4456
|
-
|
|
4459
|
+
$();
|
|
4457
4460
|
return;
|
|
4458
4461
|
}
|
|
4459
4462
|
const W = H.target.position.lineNumber, ee = g.editor.getModelMarkers({ resource: R.uri }).find((d) => d.severity === g.MarkerSeverity.Error && d.startLineNumber === W);
|
|
4460
4463
|
if (!ee) {
|
|
4461
|
-
|
|
4464
|
+
$();
|
|
4462
4465
|
return;
|
|
4463
4466
|
}
|
|
4464
4467
|
const ne = (f = H.target.element) == null ? void 0 : f.getBoundingClientRect();
|
|
4465
4468
|
F.textContent = ee.message, F.style.display = "block", ne && (F.style.left = `${ne.left}px`, F.style.top = `${ne.bottom + 3}px`);
|
|
4466
|
-
}), s.onMouseLeave(
|
|
4469
|
+
}), s.onMouseLeave($);
|
|
4467
4470
|
}
|
|
4468
4471
|
} catch (h) {
|
|
4469
4472
|
console.error("[MonacoEditor] error-line highlight setup failed", h);
|
|
4470
4473
|
}
|
|
4471
4474
|
if (o.placeholder)
|
|
4472
4475
|
try {
|
|
4473
|
-
const h =
|
|
4476
|
+
const h = T.createElement("div"), P = s.getOption(g.editor.EditorOption.fontInfo);
|
|
4474
4477
|
h.className = "monaco-placeholder", h.textContent = o.placeholder, h.style.left = `${s.getLayoutInfo().contentLeft}px`, h.style.fontFamily = P.fontFamily, h.style.fontSize = `${P.fontSize}px`, h.style.lineHeight = `${P.lineHeight}px`, A.appendChild(h);
|
|
4475
4478
|
const j = () => {
|
|
4476
4479
|
h.style.display = s.getValue().length === 0 ? "block" : "none";
|
|
@@ -4484,8 +4487,8 @@ const ms = ["src"], Tr = /* @__PURE__ */ K({
|
|
|
4484
4487
|
return oe(
|
|
4485
4488
|
() => o.liquidVariables,
|
|
4486
4489
|
() => {
|
|
4487
|
-
var
|
|
4488
|
-
const S = (B = (
|
|
4490
|
+
var T, B;
|
|
4491
|
+
const S = (B = (T = i.value) == null ? void 0 : T.contentWindow) == null ? void 0 : B.monaco;
|
|
4489
4492
|
s && S && o.language === "liquid" && !o.disableValidation && c.liquid(s, S, o.liquidVariables.map((g) => g.key));
|
|
4490
4493
|
}
|
|
4491
4494
|
), Ln(() => {
|
|
@@ -4496,7 +4499,7 @@ const ms = ["src"], Tr = /* @__PURE__ */ K({
|
|
|
4496
4499
|
code: s.getValue(),
|
|
4497
4500
|
valid: S
|
|
4498
4501
|
};
|
|
4499
|
-
} }), (S,
|
|
4502
|
+
} }), (S, T) => (_(), m("iframe", {
|
|
4500
4503
|
ref_key: "iframe",
|
|
4501
4504
|
ref: i,
|
|
4502
4505
|
sandbox: "allow-same-origin allow-scripts allow-forms allow-modals allow-popups",
|