@squirrel-cloud/ui-vue 0.4.35 → 0.4.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +629 -624
- package/dist/index.umd.cjs +6 -6
- package/dist/types/components/alert/index.d.ts +1 -2
- package/dist/types/components/article/index.d.ts +1 -2
- package/dist/types/components/avatar/index.d.ts +1 -2
- package/dist/types/components/backtop/index.d.ts +1 -2
- package/dist/types/components/badge/index.d.ts +1 -2
- package/dist/types/components/blur/index.d.ts +1 -2
- package/dist/types/components/button/index.d.ts +2 -3
- package/dist/types/components/card/index.d.ts +1 -2
- package/dist/types/components/checkbox/index.d.ts +2 -3
- package/dist/types/components/code/index.d.ts +1 -2
- package/dist/types/components/dialog/index.d.ts +1 -2
- package/dist/types/components/divider/index.d.ts +1 -2
- package/dist/types/components/editor/index.d.ts +1 -2
- package/dist/types/components/form/index.d.ts +1 -2
- package/dist/types/components/image/index.d.ts +2 -3
- package/dist/types/components/image-crop/index.d.ts +1 -2
- package/dist/types/components/input/index.d.ts +1 -2
- package/dist/types/components/mask/index.d.ts +1 -2
- package/dist/types/components/menu/index.d.ts +1 -2
- package/dist/types/components/only-child/index.d.ts +1 -2
- package/dist/types/components/pagination/index.d.ts +1 -2
- package/dist/types/components/popover/index.d.ts +1 -2
- package/dist/types/components/progress/index.d.ts +1 -2
- package/dist/types/components/radio/index.d.ts +2 -3
- package/dist/types/components/segmented/index.d.ts +2 -3
- package/dist/types/components/select/index.d.ts +1 -2
- package/dist/types/components/swipe/index.d.ts +1 -2
- package/dist/types/components/switch/index.d.ts +1 -2
- package/dist/types/components/table/index.d.ts +1 -2
- package/dist/types/components/tag/index.d.ts +2 -3
- package/dist/types/components/text/index.d.ts +1 -2
- package/dist/types/components/timeline/index.d.ts +2 -3
- package/dist/types/components/tooltip/index.d.ts +1 -2
- package/dist/types/components/upload/index.d.ts +1 -2
- package/dist/types/components/vnode-renderer/index.d.ts +1 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as R, computed as
|
|
2
|
-
import { WarningFilled as ft, CloseFilled as pt, InfoFilled as st, CheckFilled as vt, JumpTo as Et, CaretUp as Mt, Loading as
|
|
1
|
+
import { defineComponent as R, computed as y, openBlock as v, createBlock as S, unref as r, normalizeClass as W, withCtx as N, resolveDynamicComponent as fe, createCommentVNode as P, createTextVNode as Oe, toDisplayString as J, h as De, ref as T, watch as ae, createElementBlock as w, normalizeStyle as Z, onMounted as ie, onBeforeUnmount as ye, Transition as ke, withDirectives as re, createElementVNode as E, renderSlot as F, vShow as he, useSlots as Ne, createVNode as z, inject as me, shallowRef as ue, provide as Ce, toRef as oe, useModel as le, vModelCheckbox as ut, mergeModels as G, toRaw as ze, Fragment as se, renderList as pe, useAttrs as Ze, Teleport as ct, mergeProps as ve, withModifiers as be, nextTick as $e, vModelDynamic as zt, vModelText as Rt, render as Ue, cloneVNode as Lt, Text as It, Comment as At, vModelRadio as dt } from "vue";
|
|
2
|
+
import { WarningFilled as ft, CloseFilled as pt, InfoFilled as st, CheckFilled as vt, JumpTo as Et, CaretUp as Mt, Loading as Ve, Check as mt, Close as Je, Bold as Pt, Italic as Dt, Underline as Ot, Strikethrough as Nt, Hide as ht, ListUl as Ut, ListOl as Vt, View as gt, ArrowLeft as bt, ArrowRight as yt, ZoomIn as Ft, ZoomOut as Ht, FlipHorizontal as jt, FlipVertical as Wt, Clockwise as Xt, Couterclockwise as Yt, FitSize as Kt, Fullscreen as Gt, Ellipsis as Zt, ArrowDown as Jt } from "@squirrel-cloud/icons-vue";
|
|
3
3
|
import Qt from "markdown-it";
|
|
4
4
|
import { RouterLink as en } from "vue-router";
|
|
5
5
|
import { autoUpdate as tn, computePosition as nn, offset as sn, flip as on, shift as an } from "@floating-ui/dom";
|
|
@@ -19,16 +19,16 @@ const Qe = {
|
|
|
19
19
|
text: {}
|
|
20
20
|
},
|
|
21
21
|
setup(u) {
|
|
22
|
-
const o = u, s =
|
|
22
|
+
const o = u, s = y(() => {
|
|
23
23
|
const n = [];
|
|
24
24
|
return o.type && n.push(`is-${o.type}`), n;
|
|
25
|
-
}), e =
|
|
25
|
+
}), e = y(() => o.icon ? o.icon : o.showIcon && o.type ? Qe[o.type] : void 0);
|
|
26
26
|
return (n, t) => (v(), S(r(xe), {
|
|
27
|
-
class:
|
|
27
|
+
class: W(["sq-alert", s.value])
|
|
28
28
|
}, {
|
|
29
29
|
default: N(() => [
|
|
30
30
|
e.value ? (v(), S(fe(e.value), { key: 0 })) : P("", !0),
|
|
31
|
-
Oe(" " +
|
|
31
|
+
Oe(" " + J(o.text), 1)
|
|
32
32
|
]),
|
|
33
33
|
_: 1
|
|
34
34
|
}, 8, ["class"]));
|
|
@@ -203,7 +203,7 @@ function dn() {
|
|
|
203
203
|
const c = [], d = { children: [] };
|
|
204
204
|
let l = d;
|
|
205
205
|
return t.forEach((i) => {
|
|
206
|
-
var M, I, L,
|
|
206
|
+
var M, I, L, V, j, te, ne, k, C, b, x, g;
|
|
207
207
|
const { type: p, children: m, content: h, attrs: f, tag: _, hidden: $, info: B } = i;
|
|
208
208
|
switch (p) {
|
|
209
209
|
case "heading_open":
|
|
@@ -229,8 +229,8 @@ function dn() {
|
|
|
229
229
|
attrs: f ? Object.fromEntries(f) : {}
|
|
230
230
|
};
|
|
231
231
|
if (p === "link_open") {
|
|
232
|
-
const O = i.attrGet("href") ?? "",
|
|
233
|
-
O != null && O.startsWith("http") && !O.includes(
|
|
232
|
+
const O = i.attrGet("href") ?? "", H = document.location.origin;
|
|
233
|
+
O != null && O.startsWith("http") && !O.includes(H) && (q.attrs.target = "_blank", q.attrs.rel = "noopener noreferrer", q.attrs.dataOuter = "", (M = q.children) == null || M.push({ tag: Et }));
|
|
234
234
|
}
|
|
235
235
|
if (p === "table_open") {
|
|
236
236
|
const O = {
|
|
@@ -264,7 +264,7 @@ function dn() {
|
|
|
264
264
|
break;
|
|
265
265
|
}
|
|
266
266
|
case "code_inline": {
|
|
267
|
-
(
|
|
267
|
+
(V = l.children) == null || V.push({
|
|
268
268
|
tag: (a == null ? void 0 : a[_]) ?? _,
|
|
269
269
|
children: [h],
|
|
270
270
|
attrs: f ? Object.fromEntries(f) : {}
|
|
@@ -274,13 +274,13 @@ function dn() {
|
|
|
274
274
|
case "inline": {
|
|
275
275
|
if (m) {
|
|
276
276
|
const q = e(m, a);
|
|
277
|
-
(
|
|
277
|
+
(j = l.children) == null || j.push(...q ?? []);
|
|
278
278
|
} else
|
|
279
|
-
(
|
|
279
|
+
(te = l.children) == null || te.push(h);
|
|
280
280
|
break;
|
|
281
281
|
}
|
|
282
282
|
case "text": {
|
|
283
|
-
h !== "" && ((
|
|
283
|
+
h !== "" && ((ne = l.children) == null || ne.push(h));
|
|
284
284
|
break;
|
|
285
285
|
}
|
|
286
286
|
case "image": {
|
|
@@ -302,18 +302,18 @@ function dn() {
|
|
|
302
302
|
break;
|
|
303
303
|
}
|
|
304
304
|
case "hr": {
|
|
305
|
-
(
|
|
305
|
+
(b = l.children) == null || b.push({
|
|
306
306
|
tag: (a == null ? void 0 : a[_]) ?? _
|
|
307
307
|
});
|
|
308
308
|
break;
|
|
309
309
|
}
|
|
310
310
|
case "input": {
|
|
311
|
-
const q = f ? Object.fromEntries(f) : {}, O = q.type ?? "text",
|
|
312
|
-
tag: (a == null ? void 0 : a[
|
|
311
|
+
const q = f ? Object.fromEntries(f) : {}, O = q.type ?? "text", H = `${_}-${O}`, X = {
|
|
312
|
+
tag: (a == null ? void 0 : a[H]) ?? _,
|
|
313
313
|
children: [],
|
|
314
314
|
attrs: q
|
|
315
315
|
};
|
|
316
|
-
O === "checkbox" && (
|
|
316
|
+
O === "checkbox" && (X.attrs.value = `task-list-${lt}`, lt++), (x = l.children) == null || x.push(X);
|
|
317
317
|
break;
|
|
318
318
|
}
|
|
319
319
|
case "html_inline": {
|
|
@@ -322,15 +322,15 @@ function dn() {
|
|
|
322
322
|
else {
|
|
323
323
|
const q = h.match(/^<(\w+)/);
|
|
324
324
|
if (!q) return;
|
|
325
|
-
const O = q[1],
|
|
325
|
+
const O = q[1], H = {
|
|
326
326
|
tag: (a == null ? void 0 : a[O]) ?? O,
|
|
327
327
|
children: []
|
|
328
|
-
},
|
|
329
|
-
if (
|
|
330
|
-
const A =
|
|
331
|
-
A.replace(/(\w+)=["']?([^"'\s>]+)["']?/g, (
|
|
328
|
+
}, X = h.match(/<[^>]+>/);
|
|
329
|
+
if (X) {
|
|
330
|
+
const A = X[0], D = {};
|
|
331
|
+
A.replace(/(\w+)=["']?([^"'\s>]+)["']?/g, (K, ce, ge) => (D[ce] = ge, "")), Object.keys(D).length > 0 && (H.attrs = D);
|
|
332
332
|
}
|
|
333
|
-
(g = l.children) == null || g.push(
|
|
333
|
+
(g = l.children) == null || g.push(H), c.push(l), l = H;
|
|
334
334
|
}
|
|
335
335
|
break;
|
|
336
336
|
}
|
|
@@ -420,7 +420,7 @@ const { md2tokens: vn, tokens2vueh: mn } = dn(), hn = "sq-article", gn = R({
|
|
|
420
420
|
}
|
|
421
421
|
},
|
|
422
422
|
setup(u) {
|
|
423
|
-
const o =
|
|
423
|
+
const o = y(() => ({
|
|
424
424
|
hr: Re,
|
|
425
425
|
blur: Cn,
|
|
426
426
|
img: Ke,
|
|
@@ -457,17 +457,17 @@ const { md2tokens: vn, tokens2vueh: mn } = dn(), hn = "sq-article", gn = R({
|
|
|
457
457
|
size: { default: "md" }
|
|
458
458
|
},
|
|
459
459
|
setup(u) {
|
|
460
|
-
const o = u, s = T(!0), e =
|
|
460
|
+
const o = u, s = T(!0), e = y(() => {
|
|
461
461
|
const c = [];
|
|
462
462
|
return o.size !== "md" && c.push(`sq-avatar--${o.size}`), o.round && c.push("is-round"), c;
|
|
463
|
-
}), n =
|
|
463
|
+
}), n = y(() => {
|
|
464
464
|
if (!o.randomColor) return;
|
|
465
465
|
const { getRandomColor: c } = rn();
|
|
466
466
|
return {
|
|
467
467
|
"--avatar-bg-color": c()
|
|
468
468
|
};
|
|
469
|
-
}), t =
|
|
470
|
-
|
|
469
|
+
}), t = y(() => o.alt.charAt(0).toUpperCase());
|
|
470
|
+
ae(
|
|
471
471
|
() => o.src,
|
|
472
472
|
() => {
|
|
473
473
|
s.value = !0;
|
|
@@ -477,8 +477,8 @@ const { md2tokens: vn, tokens2vueh: mn } = dn(), hn = "sq-article", gn = R({
|
|
|
477
477
|
s.value = !1;
|
|
478
478
|
}
|
|
479
479
|
return (c, d) => (v(), w("div", {
|
|
480
|
-
class:
|
|
481
|
-
style:
|
|
480
|
+
class: W(["sq-avatar", e.value]),
|
|
481
|
+
style: Z(n.value)
|
|
482
482
|
}, [
|
|
483
483
|
o.src && s.value ? (v(), w("img", {
|
|
484
484
|
key: 0,
|
|
@@ -487,7 +487,7 @@ const { md2tokens: vn, tokens2vueh: mn } = dn(), hn = "sq-article", gn = R({
|
|
|
487
487
|
onError: a
|
|
488
488
|
}, null, 40, bn)) : (v(), w("span", {
|
|
489
489
|
key: 1,
|
|
490
|
-
textContent:
|
|
490
|
+
textContent: J(t.value)
|
|
491
491
|
}, null, 8, yn))
|
|
492
492
|
], 6));
|
|
493
493
|
}
|
|
@@ -503,8 +503,8 @@ const { md2tokens: vn, tokens2vueh: mn } = dn(), hn = "sq-article", gn = R({
|
|
|
503
503
|
progressProps: {}
|
|
504
504
|
},
|
|
505
505
|
setup(u) {
|
|
506
|
-
const { throttle: o } = fn(), s = o(d), e = new ResizeObserver(l), n = u, t = T(100), a = T(0), c =
|
|
507
|
-
|
|
506
|
+
const { throttle: o } = fn(), s = o(d), e = new ResizeObserver(l), n = u, t = T(100), a = T(0), c = y(() => a.value > n.visibilityHeight);
|
|
507
|
+
ie(() => {
|
|
508
508
|
var m;
|
|
509
509
|
l(), s(), window.addEventListener("scroll", s);
|
|
510
510
|
const p = document.querySelector(n.target) ?? document.body;
|
|
@@ -544,7 +544,7 @@ const { md2tokens: vn, tokens2vueh: mn } = dn(), hn = "sq-article", gn = R({
|
|
|
544
544
|
stroke: (f = n.progressProps) == null ? void 0 : f.stroke,
|
|
545
545
|
color: (_ = n.progressProps) == null ? void 0 : _.color
|
|
546
546
|
}, null, 8, ["value", "max", "type", "stroke", "color"])) : P("", !0),
|
|
547
|
-
|
|
547
|
+
F(p.$slots, "default", {}, () => [
|
|
548
548
|
(v(), S(fe(n.icon)))
|
|
549
549
|
])
|
|
550
550
|
])
|
|
@@ -569,18 +569,18 @@ const { md2tokens: vn, tokens2vueh: mn } = dn(), hn = "sq-article", gn = R({
|
|
|
569
569
|
dot: { type: Boolean }
|
|
570
570
|
},
|
|
571
571
|
setup(u) {
|
|
572
|
-
const o = Ne(), s = u, e =
|
|
572
|
+
const o = Ne(), s = u, e = y(() => {
|
|
573
573
|
const c = [`is-${s.type}`];
|
|
574
574
|
return s.dot && c.push("is-dot"), c;
|
|
575
|
-
}), n =
|
|
575
|
+
}), n = y(() => o.default ? "sup" : "div"), t = y(() => !s.dot && s.text || s.showZero ? !0 : s.count > 0), a = y(() => s.dot ? "" : s.text ? s.text : s.max && s.count > s.max ? `${s.max}+` : `${s.count}`);
|
|
576
576
|
return (c, d) => (v(), S(ke, { name: "sq-zoom" }, {
|
|
577
577
|
default: N(() => [
|
|
578
578
|
r(o).default || t.value ? (v(), w("span", {
|
|
579
579
|
key: 0,
|
|
580
|
-
class:
|
|
581
|
-
style:
|
|
580
|
+
class: W(["sq-badge", e.value]),
|
|
581
|
+
style: Z({ "--badge-color": s.color })
|
|
582
582
|
}, [
|
|
583
|
-
|
|
583
|
+
F(c.$slots, "default"),
|
|
584
584
|
(v(), S(fe(n.value), { class: "sq-badge-label" }, {
|
|
585
585
|
default: N(() => [
|
|
586
586
|
z(ke, {
|
|
@@ -590,7 +590,7 @@ const { md2tokens: vn, tokens2vueh: mn } = dn(), hn = "sq-article", gn = R({
|
|
|
590
590
|
t.value ? (v(), w("span", {
|
|
591
591
|
key: 0,
|
|
592
592
|
class: "sq-badge-label-inner",
|
|
593
|
-
textContent:
|
|
593
|
+
textContent: J(a.value)
|
|
594
594
|
}, null, 8, kn)) : P("", !0)
|
|
595
595
|
]),
|
|
596
596
|
_: 1
|
|
@@ -609,16 +609,16 @@ const { md2tokens: vn, tokens2vueh: mn } = dn(), hn = "sq-article", gn = R({
|
|
|
609
609
|
setup(u) {
|
|
610
610
|
return (o, s) => (v(), S(r(xe), { class: "sq-blur" }, {
|
|
611
611
|
default: N(() => [
|
|
612
|
-
|
|
612
|
+
F(o.$slots, "default")
|
|
613
613
|
]),
|
|
614
614
|
_: 3
|
|
615
615
|
}));
|
|
616
616
|
}
|
|
617
617
|
});
|
|
618
618
|
function Sn(u) {
|
|
619
|
-
const { getOption: o } = Le(), s = me(Ee, void 0), e = me(_t, void 0), n =
|
|
619
|
+
const { getOption: o } = Le(), s = me(Ee, void 0), e = me(_t, void 0), n = y(
|
|
620
620
|
() => r(e) ? void 0 : u.text
|
|
621
|
-
), t =
|
|
621
|
+
), t = y(
|
|
622
622
|
() => {
|
|
623
623
|
var l, i;
|
|
624
624
|
return o(
|
|
@@ -628,12 +628,12 @@ function Sn(u) {
|
|
|
628
628
|
"md"
|
|
629
629
|
);
|
|
630
630
|
}
|
|
631
|
-
), a =
|
|
631
|
+
), a = y(
|
|
632
632
|
() => {
|
|
633
633
|
var l;
|
|
634
634
|
return o((l = r(e)) == null ? void 0 : l.type, u.type);
|
|
635
635
|
}
|
|
636
|
-
), c =
|
|
636
|
+
), c = y(
|
|
637
637
|
() => {
|
|
638
638
|
var l, i;
|
|
639
639
|
return o(
|
|
@@ -642,7 +642,7 @@ function Sn(u) {
|
|
|
642
642
|
(i = r(s)) == null ? void 0 : i.round
|
|
643
643
|
);
|
|
644
644
|
}
|
|
645
|
-
), d =
|
|
645
|
+
), d = y(
|
|
646
646
|
() => {
|
|
647
647
|
var l, i, p;
|
|
648
648
|
return o(
|
|
@@ -656,7 +656,7 @@ function Sn(u) {
|
|
|
656
656
|
return { btnTextType: n, btnSize: t, btnType: a, btnRound: c, btnDisabled: d };
|
|
657
657
|
}
|
|
658
658
|
function Bn(u) {
|
|
659
|
-
const { getOption: o } = Le(), s = me(Ee, void 0), e = me(kt, void 0), n =
|
|
659
|
+
const { getOption: o } = Le(), s = me(Ee, void 0), e = me(kt, void 0), n = y(
|
|
660
660
|
() => {
|
|
661
661
|
var l, i;
|
|
662
662
|
return o(
|
|
@@ -666,22 +666,22 @@ function Bn(u) {
|
|
|
666
666
|
"md"
|
|
667
667
|
);
|
|
668
668
|
}
|
|
669
|
-
), t =
|
|
669
|
+
), t = y(
|
|
670
670
|
() => {
|
|
671
671
|
var l;
|
|
672
672
|
return o((l = r(e)) == null ? void 0 : l.form, u.form);
|
|
673
673
|
}
|
|
674
|
-
), a =
|
|
674
|
+
), a = y(
|
|
675
675
|
() => {
|
|
676
676
|
var l;
|
|
677
677
|
return o((l = r(e)) == null ? void 0 : l.name, u.name);
|
|
678
678
|
}
|
|
679
|
-
), c =
|
|
679
|
+
), c = y(
|
|
680
680
|
() => {
|
|
681
681
|
var l;
|
|
682
682
|
return o((l = r(e)) == null ? void 0 : l.variant, u.variant);
|
|
683
683
|
}
|
|
684
|
-
), d =
|
|
684
|
+
), d = y(
|
|
685
685
|
() => {
|
|
686
686
|
var l, i, p;
|
|
687
687
|
return o(
|
|
@@ -721,8 +721,8 @@ function xt() {
|
|
|
721
721
|
o.value = !1, e.value = void 0, f == null || f();
|
|
722
722
|
}
|
|
723
723
|
function i(f, _, $, B, M) {
|
|
724
|
-
const I = s.value / M, L = f * I,
|
|
725
|
-
return [
|
|
724
|
+
const I = s.value / M, L = f * I, V = _ * I, [j, te] = h($, B);
|
|
725
|
+
return [j - L, te - V];
|
|
726
726
|
}
|
|
727
727
|
function p(f, _) {
|
|
728
728
|
const $ = f - u.x, B = _ - u.y;
|
|
@@ -756,22 +756,22 @@ function xt() {
|
|
|
756
756
|
};
|
|
757
757
|
}
|
|
758
758
|
function Tn(u) {
|
|
759
|
-
const { getOption: o } = Le(), s = me(Ee, void 0), e = me(tt, void 0), n =
|
|
759
|
+
const { getOption: o } = Le(), s = me(Ee, void 0), e = me(tt, void 0), n = y(
|
|
760
760
|
() => {
|
|
761
761
|
var d;
|
|
762
762
|
return o(u.size, (d = r(s)) == null ? void 0 : d.size, "md");
|
|
763
763
|
}
|
|
764
|
-
), t =
|
|
764
|
+
), t = y(
|
|
765
765
|
() => {
|
|
766
766
|
var d;
|
|
767
767
|
return o(u.round, (d = r(s)) == null ? void 0 : d.round);
|
|
768
768
|
}
|
|
769
|
-
), a =
|
|
769
|
+
), a = y(
|
|
770
770
|
() => {
|
|
771
771
|
var d;
|
|
772
772
|
return o((d = r(s)) == null ? void 0 : d.disabled, u.disabled);
|
|
773
773
|
}
|
|
774
|
-
), c =
|
|
774
|
+
), c = y(
|
|
775
775
|
() => {
|
|
776
776
|
var d;
|
|
777
777
|
return o((d = r(s)) == null ? void 0 : d.readonly, u.readonly);
|
|
@@ -792,7 +792,7 @@ function Ae() {
|
|
|
792
792
|
return { getText: u };
|
|
793
793
|
}
|
|
794
794
|
function zn(u) {
|
|
795
|
-
const { getOption: o } = Le(), s = me(Ee, void 0), e = me(St, void 0), n =
|
|
795
|
+
const { getOption: o } = Le(), s = me(Ee, void 0), e = me(St, void 0), n = y(
|
|
796
796
|
() => {
|
|
797
797
|
var l, i;
|
|
798
798
|
return o(
|
|
@@ -802,22 +802,22 @@ function zn(u) {
|
|
|
802
802
|
"md"
|
|
803
803
|
);
|
|
804
804
|
}
|
|
805
|
-
), t =
|
|
805
|
+
), t = y(
|
|
806
806
|
() => {
|
|
807
807
|
var l;
|
|
808
808
|
return o((l = r(e)) == null ? void 0 : l.form, u.form);
|
|
809
809
|
}
|
|
810
|
-
), a =
|
|
810
|
+
), a = y(
|
|
811
811
|
() => {
|
|
812
812
|
var l;
|
|
813
813
|
return o((l = r(e)) == null ? void 0 : l.name, u.name);
|
|
814
814
|
}
|
|
815
|
-
), c =
|
|
815
|
+
), c = y(
|
|
816
816
|
() => {
|
|
817
817
|
var l;
|
|
818
818
|
return o((l = r(e)) == null ? void 0 : l.variant, u.variant);
|
|
819
819
|
}
|
|
820
|
-
), d =
|
|
820
|
+
), d = y(
|
|
821
821
|
() => {
|
|
822
822
|
var l, i, p;
|
|
823
823
|
return o(
|
|
@@ -840,7 +840,7 @@ function zn(u) {
|
|
|
840
840
|
function Rn(u) {
|
|
841
841
|
const { getOption: o } = Le(), s = me(Bt, void 0);
|
|
842
842
|
return {
|
|
843
|
-
segmentedDisabled:
|
|
843
|
+
segmentedDisabled: y(
|
|
844
844
|
() => {
|
|
845
845
|
var n;
|
|
846
846
|
return o((n = r(s)) == null ? void 0 : n.disabled, u.disabled);
|
|
@@ -855,12 +855,12 @@ function Ln() {
|
|
|
855
855
|
};
|
|
856
856
|
}
|
|
857
857
|
function In(u) {
|
|
858
|
-
const { getOption: o } = Le(), s = me(Ee, void 0), e = me(tt, void 0), n =
|
|
858
|
+
const { getOption: o } = Le(), s = me(Ee, void 0), e = me(tt, void 0), n = y(
|
|
859
859
|
() => {
|
|
860
860
|
var a;
|
|
861
861
|
return o(u.size, (a = r(s)) == null ? void 0 : a.size, "md");
|
|
862
862
|
}
|
|
863
|
-
), t =
|
|
863
|
+
), t = y(
|
|
864
864
|
() => {
|
|
865
865
|
var a, c;
|
|
866
866
|
return o(
|
|
@@ -872,7 +872,7 @@ function In(u) {
|
|
|
872
872
|
);
|
|
873
873
|
return { switchSize: n, switchDisabled: t, id: e };
|
|
874
874
|
}
|
|
875
|
-
const An = ["disabled", "form", "type"], En = "sq-button",
|
|
875
|
+
const An = ["disabled", "form", "type"], En = "sq-button", ee = /* @__PURE__ */ R({
|
|
876
876
|
name: En,
|
|
877
877
|
__name: "button",
|
|
878
878
|
props: {
|
|
@@ -889,12 +889,12 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
889
889
|
},
|
|
890
890
|
emits: ["click"],
|
|
891
891
|
setup(u, { emit: o }) {
|
|
892
|
-
const s = o, e = u, { btnTextType: n, btnSize: t, btnType: a, btnRound: c, btnDisabled: d } = Sn(e), l =
|
|
892
|
+
const s = o, e = u, { btnTextType: n, btnSize: t, btnType: a, btnRound: c, btnDisabled: d } = Sn(e), l = y(() => {
|
|
893
893
|
const m = [], h = r(t), f = r(a), _ = r(c), $ = r(n);
|
|
894
894
|
return h !== "md" && m.push(`sq-button--${h}`), f && m.push(`is-${f}`), _ && m.push("is-round"), $ && m.push("is-text"), $ && e.bg && m.push("has-bg"), m;
|
|
895
|
-
}), i =
|
|
895
|
+
}), i = y(() => e.loading ? Ve : e.icon), p = y(() => e.loading || r(d));
|
|
896
896
|
return (m, h) => (v(), w("button", {
|
|
897
|
-
class:
|
|
897
|
+
class: W(["sq-button", l.value]),
|
|
898
898
|
disabled: p.value,
|
|
899
899
|
form: e.form,
|
|
900
900
|
type: e.nativeType,
|
|
@@ -905,7 +905,7 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
905
905
|
}, {
|
|
906
906
|
default: N(() => [
|
|
907
907
|
i.value ? (v(), S(fe(i.value), { key: 0 })) : P("", !0),
|
|
908
|
-
|
|
908
|
+
F(m.$slots, "default")
|
|
909
909
|
]),
|
|
910
910
|
_: 3
|
|
911
911
|
}, 8, ["size"])
|
|
@@ -931,17 +931,17 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
931
931
|
disabled: oe(o, "disabled")
|
|
932
932
|
})
|
|
933
933
|
), (s, e) => (v(), w("div", Mn, [
|
|
934
|
-
|
|
934
|
+
F(s.$slots, "default")
|
|
935
935
|
]));
|
|
936
936
|
}
|
|
937
937
|
}), _t = Symbol("button-group-context-keys"), Dn = { class: "sq-card" }, On = {
|
|
938
938
|
key: 0,
|
|
939
939
|
class: "sq-card-header"
|
|
940
|
-
}, Nn = ["textContent"],
|
|
940
|
+
}, Nn = ["textContent"], Un = {
|
|
941
941
|
key: 1,
|
|
942
942
|
class: "sq-card-footer"
|
|
943
|
-
},
|
|
944
|
-
name:
|
|
943
|
+
}, Vn = "sq-card", Ta = /* @__PURE__ */ R({
|
|
944
|
+
name: Vn,
|
|
945
945
|
__name: "card",
|
|
946
946
|
props: {
|
|
947
947
|
title: {},
|
|
@@ -952,21 +952,21 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
952
952
|
return (e, n) => (v(), w("section", Dn, [
|
|
953
953
|
s.title || r(o).title ? (v(), w("div", On, [
|
|
954
954
|
E("h2", {
|
|
955
|
-
class:
|
|
956
|
-
textContent:
|
|
955
|
+
class: W({ "has-decorative": s.decorative }),
|
|
956
|
+
textContent: J(s.title)
|
|
957
957
|
}, null, 10, Nn),
|
|
958
|
-
|
|
958
|
+
F(e.$slots, "title")
|
|
959
959
|
])) : P("", !0),
|
|
960
|
-
|
|
961
|
-
r(o).footer ? (v(), w("div",
|
|
962
|
-
|
|
960
|
+
F(e.$slots, "default"),
|
|
961
|
+
r(o).footer ? (v(), w("div", Un, [
|
|
962
|
+
F(e.$slots, "footer")
|
|
963
963
|
])) : P("", !0)
|
|
964
964
|
]));
|
|
965
965
|
}
|
|
966
966
|
}), Fn = ["autofocus", "name", "form", "value", "disabled"], Hn = ["textContent"], jn = "sq-checkbox", $t = /* @__PURE__ */ R({
|
|
967
967
|
name: jn,
|
|
968
968
|
__name: "checkbox",
|
|
969
|
-
props: /* @__PURE__ */
|
|
969
|
+
props: /* @__PURE__ */ G({
|
|
970
970
|
form: {},
|
|
971
971
|
name: {},
|
|
972
972
|
disabled: { type: Boolean, default: void 0 },
|
|
@@ -980,7 +980,7 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
980
980
|
checked: { type: Boolean, default: !1 },
|
|
981
981
|
checkedModifiers: {}
|
|
982
982
|
}),
|
|
983
|
-
emits: /* @__PURE__ */
|
|
983
|
+
emits: /* @__PURE__ */ G(["change"], ["update:checked"]),
|
|
984
984
|
setup(u, { emit: o }) {
|
|
985
985
|
const s = o, e = u, {
|
|
986
986
|
checkboxSize: n,
|
|
@@ -989,21 +989,21 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
989
989
|
checkboxName: c,
|
|
990
990
|
checkboxVariant: d,
|
|
991
991
|
groupContext: l
|
|
992
|
-
} = Bn(e), i =
|
|
992
|
+
} = Bn(e), i = le(u, "checked"), p = y(() => {
|
|
993
993
|
const h = [], f = r(n), _ = r(t), $ = r(d);
|
|
994
994
|
return f !== "md" && h.push(`sq-selection--${f}`), m.value && h.push("is-checked"), _ && h.push("is-disabled"), $ && h.push(`is-${$}`), h;
|
|
995
|
-
}), m =
|
|
996
|
-
return
|
|
995
|
+
}), m = y(() => l ? r(l).list.includes(e.value) : i.value);
|
|
996
|
+
return ae(m, (h) => {
|
|
997
997
|
if (i.value !== h) {
|
|
998
998
|
i.value = h;
|
|
999
999
|
return;
|
|
1000
1000
|
}
|
|
1001
|
-
}),
|
|
1001
|
+
}), ae(i, (h) => {
|
|
1002
1002
|
m.value !== h && l && l.value.toggleItem(e.value);
|
|
1003
|
-
}),
|
|
1003
|
+
}), ie(() => {
|
|
1004
1004
|
i.value = m.value;
|
|
1005
1005
|
}), (h, f) => (v(), w("label", {
|
|
1006
|
-
class:
|
|
1006
|
+
class: W(["sq-selection sq-checkbox", p.value])
|
|
1007
1007
|
}, [
|
|
1008
1008
|
re(E("input", {
|
|
1009
1009
|
type: "checkbox",
|
|
@@ -1019,7 +1019,7 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1019
1019
|
]),
|
|
1020
1020
|
r(d) !== "solid" ? (v(), w("span", {
|
|
1021
1021
|
key: 0,
|
|
1022
|
-
class:
|
|
1022
|
+
class: W(["sq-checkbox-box", { "is-indeterminate": e.indeterminate && !m.value }])
|
|
1023
1023
|
}, [
|
|
1024
1024
|
m.value ? (v(), S(r(mt), {
|
|
1025
1025
|
key: 0,
|
|
@@ -1029,7 +1029,7 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1029
1029
|
e.label ? (v(), w("span", {
|
|
1030
1030
|
key: 1,
|
|
1031
1031
|
class: "sq-selection-label",
|
|
1032
|
-
textContent:
|
|
1032
|
+
textContent: J(e.label)
|
|
1033
1033
|
}, null, 8, Hn)) : P("", !0)
|
|
1034
1034
|
], 2));
|
|
1035
1035
|
}
|
|
@@ -1047,7 +1047,7 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1047
1047
|
},
|
|
1048
1048
|
emits: ["change", "update:value"],
|
|
1049
1049
|
setup(u, { emit: o }) {
|
|
1050
|
-
const { nextId: s } = Fe(), { getText: e } = Ae(), n = o, t = u, a = T(t.value ?? []), c =
|
|
1050
|
+
const { nextId: s } = Fe(), { getText: e } = Ae(), n = o, t = u, a = T(t.value ?? []), c = y(() => t.name ?? `sq-checkbox-${s()}`), d = y(() => t.items.map((i) => typeof i == "string" ? {
|
|
1051
1051
|
text: i,
|
|
1052
1052
|
value: i
|
|
1053
1053
|
} : typeof i == "number" ? {
|
|
@@ -1065,7 +1065,7 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1065
1065
|
list: a,
|
|
1066
1066
|
toggleItem: l
|
|
1067
1067
|
})
|
|
1068
|
-
),
|
|
1068
|
+
), ae(
|
|
1069
1069
|
() => t.value,
|
|
1070
1070
|
(i) => {
|
|
1071
1071
|
const p = i || [], m = [.../* @__PURE__ */ new Set([...p, a.value])];
|
|
@@ -1076,7 +1076,7 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1076
1076
|
a.value.includes(i) ? a.value = a.value.filter((p) => p !== i) : a.value.push(i), n("change", ze(a.value)), n("update:value", ze(a.value));
|
|
1077
1077
|
}
|
|
1078
1078
|
return (i, p) => (v(), w("div", Wn, [
|
|
1079
|
-
|
|
1079
|
+
F(i.$slots, "default", {}, () => [
|
|
1080
1080
|
(v(!0), w(se, null, pe(d.value, (m, h) => (v(), S(r($t), {
|
|
1081
1081
|
key: h,
|
|
1082
1082
|
disabled: m.disabled === !0,
|
|
@@ -1096,7 +1096,7 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1096
1096
|
},
|
|
1097
1097
|
setup(u) {
|
|
1098
1098
|
const { getHighlighterAsync: o, releaseHighlighter: s } = pn(), e = u, n = T("");
|
|
1099
|
-
return
|
|
1099
|
+
return ie(async () => {
|
|
1100
1100
|
const t = await o();
|
|
1101
1101
|
n.value = t.codeToHtml(e.code, {
|
|
1102
1102
|
theme: e.theme,
|
|
@@ -1113,7 +1113,7 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1113
1113
|
name: Jn,
|
|
1114
1114
|
inheritAttrs: !1,
|
|
1115
1115
|
__name: "mask",
|
|
1116
|
-
props: /* @__PURE__ */
|
|
1116
|
+
props: /* @__PURE__ */ G({
|
|
1117
1117
|
keyboard: { type: Boolean, default: !0 },
|
|
1118
1118
|
maskCloseable: { type: Boolean },
|
|
1119
1119
|
beforeClose: {}
|
|
@@ -1121,12 +1121,12 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1121
1121
|
visible: { type: Boolean, default: !1 },
|
|
1122
1122
|
visibleModifiers: {}
|
|
1123
1123
|
}),
|
|
1124
|
-
emits: /* @__PURE__ */
|
|
1124
|
+
emits: /* @__PURE__ */ G(["open", "opened", "close", "closed"], ["update:visible"]),
|
|
1125
1125
|
setup(u, { emit: o }) {
|
|
1126
1126
|
const { nextZIndex: s } = et(), e = Ze();
|
|
1127
1127
|
let n;
|
|
1128
|
-
const t = o, a = u, c = T(0), d = T(!1), l =
|
|
1129
|
-
d.value = l.value,
|
|
1128
|
+
const t = o, a = u, c = T(0), d = T(!1), l = le(u, "visible");
|
|
1129
|
+
d.value = l.value, ae(l, (h) => {
|
|
1130
1130
|
const f = document.scrollingElement;
|
|
1131
1131
|
h ? (n = f.style.overflow, f.style.overflow = "hidden", c.value = s(), d.value = !0, document.addEventListener("keydown", i)) : (f.style.overflow = n, document.removeEventListener("keydown", i));
|
|
1132
1132
|
}), ye(() => {
|
|
@@ -1163,7 +1163,7 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1163
1163
|
class: "sq-mask",
|
|
1164
1164
|
style: { zIndex: c.value }
|
|
1165
1165
|
}, r(e), { onClick: p }), [
|
|
1166
|
-
|
|
1166
|
+
F(h.$slots, "default")
|
|
1167
1167
|
], 16)), [
|
|
1168
1168
|
[he, l.value]
|
|
1169
1169
|
]) : P("", !0)
|
|
@@ -1182,7 +1182,7 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1182
1182
|
name: ss,
|
|
1183
1183
|
inheritAttrs: !1,
|
|
1184
1184
|
__name: "dialog",
|
|
1185
|
-
props: /* @__PURE__ */
|
|
1185
|
+
props: /* @__PURE__ */ G({
|
|
1186
1186
|
type: {},
|
|
1187
1187
|
title: {},
|
|
1188
1188
|
okText: { default: "确认" },
|
|
@@ -1199,23 +1199,23 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1199
1199
|
visible: { type: Boolean, default: !1 },
|
|
1200
1200
|
visibleModifiers: {}
|
|
1201
1201
|
}),
|
|
1202
|
-
emits: /* @__PURE__ */
|
|
1202
|
+
emits: /* @__PURE__ */ G(["open", "opened", "close", "closed"], ["update:visible"]),
|
|
1203
1203
|
setup(u, { emit: o }) {
|
|
1204
|
-
const s = Ne(), e = Ze(), n = o, t = u, a = T(!1), c = T(!1), d =
|
|
1204
|
+
const s = Ne(), e = Ze(), n = o, t = u, a = T(!1), c = T(!1), d = le(u, "visible"), l = y(() => !!t.title || !!s.header), i = y(() => {
|
|
1205
1205
|
const M = [];
|
|
1206
1206
|
return t.type && M.push(`is-${t.type}`), l.value && M.push("has-header"), [M];
|
|
1207
|
-
}), p =
|
|
1207
|
+
}), p = y(() => t.type ? Qe[t.type] : void 0), m = y(() => ({
|
|
1208
1208
|
type: t.type ?? "primary",
|
|
1209
1209
|
loading: a.value && c.value,
|
|
1210
1210
|
disabled: a.value && !c.value,
|
|
1211
1211
|
...t.okButtonProps
|
|
1212
|
-
})), h =
|
|
1212
|
+
})), h = y(() => ({
|
|
1213
1213
|
text: !0,
|
|
1214
1214
|
bg: !0,
|
|
1215
1215
|
loading: a.value && !c.value,
|
|
1216
1216
|
disabled: a.value && c.value,
|
|
1217
1217
|
...t.cancelButtonProps
|
|
1218
|
-
})), f =
|
|
1218
|
+
})), f = y(
|
|
1219
1219
|
() => m.value.loading || h.value.loading || !d.value
|
|
1220
1220
|
);
|
|
1221
1221
|
function _(M) {
|
|
@@ -1246,18 +1246,18 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1246
1246
|
}, {
|
|
1247
1247
|
default: N(() => [
|
|
1248
1248
|
E("div", {
|
|
1249
|
-
class:
|
|
1250
|
-
style:
|
|
1249
|
+
class: W(["sq-dialog", [i.value, r(e).class]]),
|
|
1250
|
+
style: Z(r(e).style)
|
|
1251
1251
|
}, [
|
|
1252
1252
|
l.value ? (v(), w("div", Qn, [
|
|
1253
1253
|
p.value ? (v(), S(fe(p.value), {
|
|
1254
1254
|
key: 0,
|
|
1255
1255
|
class: "sq-dialog-header-icon"
|
|
1256
1256
|
})) : P("", !0),
|
|
1257
|
-
|
|
1257
|
+
F(M.$slots, "header", {}, () => [
|
|
1258
1258
|
E("span", {
|
|
1259
1259
|
class: "sq-dialog-header-title",
|
|
1260
|
-
textContent:
|
|
1260
|
+
textContent: J(t.title)
|
|
1261
1261
|
}, null, 8, es)
|
|
1262
1262
|
]),
|
|
1263
1263
|
z(r(Je), {
|
|
@@ -1266,19 +1266,19 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1266
1266
|
})
|
|
1267
1267
|
])) : P("", !0),
|
|
1268
1268
|
E("div", ts, [
|
|
1269
|
-
|
|
1269
|
+
F(M.$slots, "default")
|
|
1270
1270
|
]),
|
|
1271
1271
|
t.footer ? (v(), w("div", ns, [
|
|
1272
|
-
|
|
1273
|
-
z(r(
|
|
1272
|
+
F(M.$slots, "footer", {}, () => [
|
|
1273
|
+
z(r(ee), ve(h.value, { onClick: $ }), {
|
|
1274
1274
|
default: N(() => [
|
|
1275
|
-
Oe(
|
|
1275
|
+
Oe(J(t.cancelText), 1)
|
|
1276
1276
|
]),
|
|
1277
1277
|
_: 1
|
|
1278
1278
|
}, 16),
|
|
1279
|
-
z(r(
|
|
1279
|
+
z(r(ee), ve(m.value, { onClick: B }), {
|
|
1280
1280
|
default: N(() => [
|
|
1281
|
-
Oe(
|
|
1281
|
+
Oe(J(t.okText), 1)
|
|
1282
1282
|
]),
|
|
1283
1283
|
_: 1
|
|
1284
1284
|
}, 16)
|
|
@@ -1300,13 +1300,13 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1300
1300
|
size: {}
|
|
1301
1301
|
},
|
|
1302
1302
|
setup(u) {
|
|
1303
|
-
const o = Ne(), s = u, e =
|
|
1303
|
+
const o = Ne(), s = u, e = y(() => {
|
|
1304
1304
|
const n = [`sq-divider--${s.direction}`];
|
|
1305
1305
|
return ["none", "solid", "dotted", "dashed"].includes(s.variant) && n.push("is-thin"), o.default && s.direction !== "vertical" && n.push(`text-${s.orientation}`), n;
|
|
1306
1306
|
});
|
|
1307
1307
|
return (n, t) => (v(), w("div", {
|
|
1308
|
-
class:
|
|
1309
|
-
style:
|
|
1308
|
+
class: W(["sq-divider", e.value]),
|
|
1309
|
+
style: Z({ "--divider-line-type": s.variant })
|
|
1310
1310
|
}, [
|
|
1311
1311
|
r(o).default && s.direction !== "vertical" ? (v(), S(r(xe), {
|
|
1312
1312
|
key: 0,
|
|
@@ -1314,7 +1314,7 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1314
1314
|
size: s.size
|
|
1315
1315
|
}, {
|
|
1316
1316
|
default: N(() => [
|
|
1317
|
-
|
|
1317
|
+
F(n.$slots, "default")
|
|
1318
1318
|
]),
|
|
1319
1319
|
_: 3
|
|
1320
1320
|
}, 8, ["ellipsis", "size"])) : P("", !0)
|
|
@@ -1352,7 +1352,7 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1352
1352
|
disabled: n.disabled
|
|
1353
1353
|
}, {
|
|
1354
1354
|
default: N(() => [
|
|
1355
|
-
z(r(
|
|
1355
|
+
z(r(ee), {
|
|
1356
1356
|
text: "",
|
|
1357
1357
|
icon: r(Pt),
|
|
1358
1358
|
disabled: n.disabled,
|
|
@@ -1402,7 +1402,7 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1402
1402
|
disabled: n.disabled
|
|
1403
1403
|
}, {
|
|
1404
1404
|
default: N(() => [
|
|
1405
|
-
z(r(
|
|
1405
|
+
z(r(ee), {
|
|
1406
1406
|
text: "",
|
|
1407
1407
|
icon: r(Dt),
|
|
1408
1408
|
disabled: n.disabled,
|
|
@@ -1444,7 +1444,7 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1444
1444
|
disabled: n.disabled
|
|
1445
1445
|
}, {
|
|
1446
1446
|
default: N(() => [
|
|
1447
|
-
z(r(
|
|
1447
|
+
z(r(ee), {
|
|
1448
1448
|
text: "",
|
|
1449
1449
|
icon: r(Ot),
|
|
1450
1450
|
disabled: n.disabled,
|
|
@@ -1482,7 +1482,7 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1482
1482
|
disabled: e.disabled
|
|
1483
1483
|
}, {
|
|
1484
1484
|
default: N(() => [
|
|
1485
|
-
z(r(
|
|
1485
|
+
z(r(ee), {
|
|
1486
1486
|
text: "",
|
|
1487
1487
|
icon: r(Nt),
|
|
1488
1488
|
disabled: e.disabled,
|
|
@@ -1524,7 +1524,7 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1524
1524
|
disabled: e.disabled
|
|
1525
1525
|
}, {
|
|
1526
1526
|
default: N(() => [
|
|
1527
|
-
z(r(
|
|
1527
|
+
z(r(ee), {
|
|
1528
1528
|
text: "",
|
|
1529
1529
|
icon: r(ht),
|
|
1530
1530
|
disabled: e.disabled,
|
|
@@ -1574,9 +1574,9 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1574
1574
|
disabled: e.disabled
|
|
1575
1575
|
}, {
|
|
1576
1576
|
default: N(() => [
|
|
1577
|
-
z(r(
|
|
1577
|
+
z(r(ee), {
|
|
1578
1578
|
text: "",
|
|
1579
|
-
icon: r(
|
|
1579
|
+
icon: r(Ut),
|
|
1580
1580
|
disabled: e.disabled,
|
|
1581
1581
|
onClick: n
|
|
1582
1582
|
}, null, 8, ["icon", "disabled"])
|
|
@@ -1629,9 +1629,9 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1629
1629
|
disabled: e.disabled
|
|
1630
1630
|
}, {
|
|
1631
1631
|
default: N(() => [
|
|
1632
|
-
z(r(
|
|
1632
|
+
z(r(ee), {
|
|
1633
1633
|
text: "",
|
|
1634
|
-
icon: r(
|
|
1634
|
+
icon: r(Vt),
|
|
1635
1635
|
disabled: e.disabled,
|
|
1636
1636
|
onClick: n
|
|
1637
1637
|
}, null, 8, ["icon", "disabled"])
|
|
@@ -1642,7 +1642,7 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1642
1642
|
}), xs = { class: "sq-editor-body" }, _s = { class: "sq-editor-toolbar" }, $s = { class: "sq-editor-control" }, ks = "sq-editor", za = /* @__PURE__ */ R({
|
|
1643
1643
|
name: ks,
|
|
1644
1644
|
__name: "editor",
|
|
1645
|
-
props: /* @__PURE__ */
|
|
1645
|
+
props: /* @__PURE__ */ G({
|
|
1646
1646
|
round: { type: Boolean },
|
|
1647
1647
|
disabled: { type: Boolean },
|
|
1648
1648
|
placeholder: {},
|
|
@@ -1670,21 +1670,21 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1670
1670
|
let s;
|
|
1671
1671
|
const e = u, n = T("edit"), t = T([]), a = T(!1), c = T(""), d = T(), l = T({}), i = ue(null), p = ue(null), m = ue(null), h = ue(
|
|
1672
1672
|
null
|
|
1673
|
-
), f =
|
|
1673
|
+
), f = le(u, "value"), _ = y(() => {
|
|
1674
1674
|
const x = [];
|
|
1675
1675
|
return e.size !== "md" && x.push(`sq-editor--${e.size}`), e.round && x.push("is-round"), x;
|
|
1676
|
-
}), $ =
|
|
1676
|
+
}), $ = y(
|
|
1677
1677
|
() => c.value.length && !c.value.includes(`
|
|
1678
1678
|
`) && c.value !== " " && !e.disabled
|
|
1679
|
-
), B =
|
|
1679
|
+
), B = y(
|
|
1680
1680
|
() => d.value !== void 0 && !c.value.length && !e.disabled
|
|
1681
|
-
), M =
|
|
1681
|
+
), M = y(
|
|
1682
1682
|
() => typeof e.beforePreview == "function" ? e.beforePreview(f.value) : f.value
|
|
1683
1683
|
);
|
|
1684
|
-
|
|
1685
|
-
document.addEventListener("selectionchange",
|
|
1684
|
+
ie(() => {
|
|
1685
|
+
document.addEventListener("selectionchange", V), document.addEventListener("click", j);
|
|
1686
1686
|
}), ye(() => {
|
|
1687
|
-
document.removeEventListener("selectionchange",
|
|
1687
|
+
document.removeEventListener("selectionchange", V), document.removeEventListener("click", j);
|
|
1688
1688
|
});
|
|
1689
1689
|
function I(x) {
|
|
1690
1690
|
x === "edit" && $e(() => {
|
|
@@ -1693,12 +1693,12 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1693
1693
|
});
|
|
1694
1694
|
}
|
|
1695
1695
|
function L(x) {
|
|
1696
|
-
var O,
|
|
1696
|
+
var O, H, X;
|
|
1697
1697
|
const g = t.value[d.value], q = (g == null ? void 0 : g.replace(" ", "")) ?? "";
|
|
1698
1698
|
if (x.key === "Tab") {
|
|
1699
1699
|
x.preventDefault();
|
|
1700
1700
|
const A = g.substring(0, l.value.startOfRow), D = g.substring(l.value.endOfRow);
|
|
1701
|
-
t.value[d.value] = `${A} ${D}`,
|
|
1701
|
+
t.value[d.value] = `${A} ${D}`, b(t.value, 1, 1);
|
|
1702
1702
|
return;
|
|
1703
1703
|
}
|
|
1704
1704
|
if (x.ctrlKey)
|
|
@@ -1707,10 +1707,10 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1707
1707
|
(O = p.value) == null || O.setBold();
|
|
1708
1708
|
return;
|
|
1709
1709
|
case "I":
|
|
1710
|
-
(
|
|
1710
|
+
(H = m.value) == null || H.setItalic();
|
|
1711
1711
|
return;
|
|
1712
1712
|
case "U":
|
|
1713
|
-
x.preventDefault(), (
|
|
1713
|
+
x.preventDefault(), (X = h.value) == null || X.setUnderline();
|
|
1714
1714
|
return;
|
|
1715
1715
|
}
|
|
1716
1716
|
if (x.key === "Enter") {
|
|
@@ -1718,49 +1718,49 @@ const An = ["disabled", "form", "type"], En = "sq-button", te = /* @__PURE__ */
|
|
|
1718
1718
|
x.preventDefault();
|
|
1719
1719
|
const A = g.substring(0, g.indexOf("- "));
|
|
1720
1720
|
if (q !== "- ") {
|
|
1721
|
-
const
|
|
1721
|
+
const K = 3 + A.length;
|
|
1722
1722
|
t.value[d.value] = `${g}
|
|
1723
|
-
${A}- `,
|
|
1723
|
+
${A}- `, te(x.target), b(t.value, K, K);
|
|
1724
1724
|
return;
|
|
1725
1725
|
}
|
|
1726
1726
|
const D = 2 + A.length;
|
|
1727
|
-
t.value[d.value] = g.substring(D),
|
|
1727
|
+
t.value[d.value] = g.substring(D), b(t.value, -D, -D);
|
|
1728
1728
|
return;
|
|
1729
1729
|
}
|
|
1730
1730
|
if (C(g)) {
|
|
1731
1731
|
x.preventDefault();
|
|
1732
|
-
const A = q.match(/^\d+\.\s/)[0],
|
|
1732
|
+
const A = q.match(/^\d+\.\s/)[0], K = `${parseInt(A) + 1}. `, ce = g.substring(0, g.indexOf(A));
|
|
1733
1733
|
if (q !== A) {
|
|
1734
|
-
const we =
|
|
1734
|
+
const we = K.length + ce.length + 1;
|
|
1735
1735
|
t.value[d.value] = `${g}
|
|
1736
|
-
${ce}${
|
|
1736
|
+
${ce}${K}`, te(x.target), b(t.value, we, we);
|
|
1737
1737
|
return;
|
|
1738
1738
|
}
|
|
1739
1739
|
const ge = A.length + ce.length;
|
|
1740
|
-
t.value[d.value] = g.substring(ge),
|
|
1740
|
+
t.value[d.value] = g.substring(ge), b(t.value, -ge, -ge);
|
|
1741
1741
|
return;
|
|
1742
1742
|
}
|
|
1743
1743
|
}
|
|
1744
1744
|
}
|
|
1745
|
-
function
|
|
1745
|
+
function V(x) {
|
|
1746
1746
|
var q;
|
|
1747
1747
|
const g = window.getSelection();
|
|
1748
1748
|
(g == null ? void 0 : g.focusNode) === ((q = i.value) == null ? void 0 : q.$el) && (s = x.target, !((s == null ? void 0 : s.selectionStart) === void 0 || (s == null ? void 0 : s.selectionEnd) === void 0) && (l.value.start = (s == null ? void 0 : s.selectionStart) ?? 0, l.value.end = (s == null ? void 0 : s.selectionEnd) ?? 0, c.value = f.value.substring(
|
|
1749
1749
|
l.value.start,
|
|
1750
1750
|
l.value.end
|
|
1751
|
-
),
|
|
1751
|
+
), ne()));
|
|
1752
1752
|
}
|
|
1753
|
-
function
|
|
1753
|
+
function j() {
|
|
1754
1754
|
c.value = "", d.value = void 0;
|
|
1755
1755
|
}
|
|
1756
|
-
function
|
|
1756
|
+
function te(x) {
|
|
1757
1757
|
const g = x.selectionStart, O = f.value.substring(0, g ?? 0).split(`
|
|
1758
|
-
`).length + 1,
|
|
1759
|
-
D +
|
|
1758
|
+
`).length + 1, H = x.scrollTop, X = window.getComputedStyle(x), A = parseFloat(X.lineHeight), D = parseFloat(X.height), ce = parseFloat(X.paddingBlockStart) + A * O;
|
|
1759
|
+
D + H > ce || requestAnimationFrame(() => {
|
|
1760
1760
|
x.scrollTo({ top: ce - D });
|
|
1761
1761
|
});
|
|
1762
1762
|
}
|
|
1763
|
-
function
|
|
1763
|
+
function ne() {
|
|
1764
1764
|
const x = s.selectionStart, g = f.value.substring(0, x ?? 0);
|
|
1765
1765
|
d.value = g.split(`
|
|
1766
1766
|
`).length - 1;
|
|
@@ -1775,7 +1775,7 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
1775
1775
|
function C(x) {
|
|
1776
1776
|
return /^\d+\.\s+/.test(x.replace(" ", ""));
|
|
1777
1777
|
}
|
|
1778
|
-
function
|
|
1778
|
+
function b(x, g = 0, q = 0) {
|
|
1779
1779
|
a.value || (t.value = [...x], f.value = t.value.join(`
|
|
1780
1780
|
`), l.value.start += g, l.value.end += q, l.value.startOfRow += g, l.value.endOfRow += q, s == null || s.focus(), a.value = !0, $e(() => {
|
|
1781
1781
|
s == null || s.setSelectionRange(l.value.start, l.value.end), setTimeout(() => {
|
|
@@ -1784,7 +1784,7 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
1784
1784
|
}));
|
|
1785
1785
|
}
|
|
1786
1786
|
return (x, g) => (v(), w("div", {
|
|
1787
|
-
class:
|
|
1787
|
+
class: W(["sq-editor", _.value]),
|
|
1788
1788
|
onClick: g[2] || (g[2] = be(() => {
|
|
1789
1789
|
}, ["stop"]))
|
|
1790
1790
|
}, [
|
|
@@ -1799,7 +1799,7 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
1799
1799
|
"selected-val": c.value,
|
|
1800
1800
|
"selected-row": d.value,
|
|
1801
1801
|
"select-info": l.value,
|
|
1802
|
-
onUpdateText:
|
|
1802
|
+
onUpdateText: b
|
|
1803
1803
|
}, null, 8, ["disabled", "rows", "selected-val", "selected-row", "select-info"]),
|
|
1804
1804
|
z(us, {
|
|
1805
1805
|
ref_key: "italicRef",
|
|
@@ -1809,7 +1809,7 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
1809
1809
|
"selected-val": c.value,
|
|
1810
1810
|
"selected-row": d.value,
|
|
1811
1811
|
"select-info": l.value,
|
|
1812
|
-
onUpdateText:
|
|
1812
|
+
onUpdateText: b
|
|
1813
1813
|
}, null, 8, ["disabled", "rows", "selected-val", "selected-row", "select-info"]),
|
|
1814
1814
|
z(ds, {
|
|
1815
1815
|
ref_key: "underlineRef",
|
|
@@ -1819,7 +1819,7 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
1819
1819
|
"selected-val": c.value,
|
|
1820
1820
|
"selected-row": d.value,
|
|
1821
1821
|
"select-info": l.value,
|
|
1822
|
-
onUpdateText:
|
|
1822
|
+
onUpdateText: b
|
|
1823
1823
|
}, null, 8, ["disabled", "rows", "selected-val", "selected-row", "select-info"]),
|
|
1824
1824
|
z(ps, {
|
|
1825
1825
|
disabled: !$.value,
|
|
@@ -1827,7 +1827,7 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
1827
1827
|
"selected-val": c.value,
|
|
1828
1828
|
"selected-row": d.value,
|
|
1829
1829
|
"select-info": l.value,
|
|
1830
|
-
onUpdateText:
|
|
1830
|
+
onUpdateText: b
|
|
1831
1831
|
}, null, 8, ["disabled", "rows", "selected-val", "selected-row", "select-info"]),
|
|
1832
1832
|
z(ms, {
|
|
1833
1833
|
disabled: !$.value,
|
|
@@ -1835,7 +1835,7 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
1835
1835
|
"selected-val": c.value,
|
|
1836
1836
|
"selected-row": d.value,
|
|
1837
1837
|
"select-info": l.value,
|
|
1838
|
-
onUpdateText:
|
|
1838
|
+
onUpdateText: b
|
|
1839
1839
|
}, null, 8, ["disabled", "rows", "selected-val", "selected-row", "select-info"]),
|
|
1840
1840
|
z(r(Re), { direction: "vertical" }),
|
|
1841
1841
|
z(gs, {
|
|
@@ -1844,7 +1844,7 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
1844
1844
|
"selected-val": c.value,
|
|
1845
1845
|
"selected-row": d.value,
|
|
1846
1846
|
"select-info": l.value,
|
|
1847
|
-
onUpdateText:
|
|
1847
|
+
onUpdateText: b
|
|
1848
1848
|
}, null, 8, ["disabled", "rows", "selected-val", "selected-row", "select-info"]),
|
|
1849
1849
|
z(ys, {
|
|
1850
1850
|
disabled: !B.value,
|
|
@@ -1852,13 +1852,13 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
1852
1852
|
"selected-val": c.value,
|
|
1853
1853
|
"selected-row": d.value,
|
|
1854
1854
|
"select-info": l.value,
|
|
1855
|
-
onUpdateText:
|
|
1855
|
+
onUpdateText: b
|
|
1856
1856
|
}, null, 8, ["disabled", "rows", "selected-val", "selected-row", "select-info"])
|
|
1857
1857
|
]),
|
|
1858
1858
|
z(r(Re))
|
|
1859
1859
|
], 64)) : P("", !0),
|
|
1860
1860
|
z(r(nt), {
|
|
1861
|
-
class:
|
|
1861
|
+
class: W({ "has-shadow": !e.md }),
|
|
1862
1862
|
ref_key: "inputRef",
|
|
1863
1863
|
ref: i,
|
|
1864
1864
|
type: "textarea",
|
|
@@ -1891,7 +1891,7 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
1891
1891
|
"onUpdate:value": g[1] || (g[1] = (q) => n.value = q),
|
|
1892
1892
|
onChange: I
|
|
1893
1893
|
}, null, 8, ["size", "round", "disabled", "value"]),
|
|
1894
|
-
|
|
1894
|
+
F(x.$slots, "control")
|
|
1895
1895
|
])
|
|
1896
1896
|
], 2));
|
|
1897
1897
|
}
|
|
@@ -1909,16 +1909,16 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
1909
1909
|
setup(u) {
|
|
1910
1910
|
const { nextId: o } = Fe(), s = u, e = T(""), n = T("");
|
|
1911
1911
|
Ce(tt, e);
|
|
1912
|
-
const t =
|
|
1912
|
+
const t = y(() => {
|
|
1913
1913
|
const d = [];
|
|
1914
1914
|
return s.isRequired && d.push("is-required"), d;
|
|
1915
|
-
}), a =
|
|
1916
|
-
|
|
1915
|
+
}), a = y(() => ["input", "switch", "select"].includes(s.type));
|
|
1916
|
+
ae(
|
|
1917
1917
|
() => s.errorMsg,
|
|
1918
1918
|
(d) => {
|
|
1919
1919
|
d && (n.value = d);
|
|
1920
1920
|
}
|
|
1921
|
-
),
|
|
1921
|
+
), ie(() => {
|
|
1922
1922
|
a.value && (e.value = `sq-form-item-${o()}`);
|
|
1923
1923
|
});
|
|
1924
1924
|
function c() {
|
|
@@ -1926,16 +1926,16 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
1926
1926
|
}
|
|
1927
1927
|
return (d, l) => (v(), w("div", {
|
|
1928
1928
|
class: "sq-form-item",
|
|
1929
|
-
style:
|
|
1929
|
+
style: Z({ "--form-label-width": s.labelWidth })
|
|
1930
1930
|
}, [
|
|
1931
1931
|
s.label || s.showLabel ? (v(), w("label", {
|
|
1932
1932
|
key: 0,
|
|
1933
|
-
class:
|
|
1934
|
-
textContent:
|
|
1933
|
+
class: W(["sq-form-item-label", t.value]),
|
|
1934
|
+
textContent: J(s.label),
|
|
1935
1935
|
for: s.type !== "custom" ? e.value : void 0
|
|
1936
1936
|
}, null, 10, ws)) : P("", !0),
|
|
1937
1937
|
E("div", qs, [
|
|
1938
|
-
|
|
1938
|
+
F(d.$slots, "default"),
|
|
1939
1939
|
z(ke, {
|
|
1940
1940
|
appear: "",
|
|
1941
1941
|
name: "sq-zoom-top",
|
|
@@ -1944,7 +1944,7 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
1944
1944
|
default: N(() => [
|
|
1945
1945
|
re(E("span", {
|
|
1946
1946
|
class: "sq-form-item-check",
|
|
1947
|
-
textContent:
|
|
1947
|
+
textContent: J(n.value)
|
|
1948
1948
|
}, null, 8, Cs), [
|
|
1949
1949
|
[he, s.errorMsg]
|
|
1950
1950
|
])
|
|
@@ -1985,16 +1985,16 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
1985
1985
|
readonly: oe(t, "readonly")
|
|
1986
1986
|
})
|
|
1987
1987
|
);
|
|
1988
|
-
const a = T({}), c = T([]), d = T({}), l =
|
|
1988
|
+
const a = T({}), c = T([]), d = T({}), l = y(() => {
|
|
1989
1989
|
const k = [`is-${t.layout}`];
|
|
1990
1990
|
return t.size !== "md" && k.push(`sq-form--${t.size}`), t.requiredMark !== "hidden" && k.push(`required-${t.requiredMark}`), k;
|
|
1991
|
-
}), i =
|
|
1991
|
+
}), i = y(() => ({
|
|
1992
1992
|
"--form-label-width": t.labelWidth
|
|
1993
|
-
})), p =
|
|
1993
|
+
})), p = y(() => {
|
|
1994
1994
|
const k = t.step;
|
|
1995
1995
|
return k === void 0 ? t.items : t.items.filter((C) => C.step === void 0 ? C : Array.isArray(C.step) ? C.step.includes(k) : C.step === k);
|
|
1996
1996
|
});
|
|
1997
|
-
|
|
1997
|
+
ie(() => {
|
|
1998
1998
|
e = structuredClone(ze(t.formData));
|
|
1999
1999
|
});
|
|
2000
2000
|
function m(k) {
|
|
@@ -2002,129 +2002,129 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2002
2002
|
return (C = k.rule) == null ? void 0 : C.required;
|
|
2003
2003
|
}
|
|
2004
2004
|
function h(k) {
|
|
2005
|
-
if (d.value[k]) return
|
|
2005
|
+
if (d.value[k]) return Ve;
|
|
2006
2006
|
if (c.value.includes(k)) return vt;
|
|
2007
2007
|
if (a.value[k])
|
|
2008
2008
|
return t.invalidStatus === "error" ? pt : ft;
|
|
2009
2009
|
}
|
|
2010
|
-
async function f(k, C,
|
|
2011
|
-
if (!
|
|
2012
|
-
const g =
|
|
2010
|
+
async function f(k, C, b, x = !0) {
|
|
2011
|
+
if (!b) return;
|
|
2012
|
+
const g = b.trigger ?? "change", q = Array.isArray(g) ? "array" : "string";
|
|
2013
2013
|
if (C) {
|
|
2014
2014
|
if (q === "array" && !g.includes(C)) return;
|
|
2015
2015
|
if (q === "string" && g !== C) return;
|
|
2016
2016
|
}
|
|
2017
|
-
c.value = c.value.filter((A) => A !== k),
|
|
2017
|
+
c.value = c.value.filter((A) => A !== k), j(k), d.value[k] = new AbortController(), await $e();
|
|
2018
2018
|
const O = t.formData[k];
|
|
2019
|
-
let
|
|
2020
|
-
const
|
|
2021
|
-
return
|
|
2019
|
+
let H = !1;
|
|
2020
|
+
const X = b.validateType ?? "string";
|
|
2021
|
+
return b.validateFunc ? H = await $(k, O, b, C) : X === "string" ? H = B(k, O, b) : X === "boolean" ? H = M(k, O, b) : X === "list" && (H = I(k, O, b)), x && n("validate", k, H, ze(c.value)), d.value[k].signal.aborted || j(k), H;
|
|
2022
2022
|
}
|
|
2023
2023
|
function _(k) {
|
|
2024
2024
|
if (a.value[k]) return t.invalidStatus;
|
|
2025
2025
|
}
|
|
2026
|
-
async function $(k, C,
|
|
2027
|
-
const g = d.value[k].signal, q = await
|
|
2026
|
+
async function $(k, C, b, x) {
|
|
2027
|
+
const g = d.value[k].signal, q = await b.validateFunc(C, g, x);
|
|
2028
2028
|
if (q === void 0) {
|
|
2029
2029
|
c.value = c.value.filter((O) => O !== k), delete a.value[k];
|
|
2030
2030
|
return;
|
|
2031
2031
|
}
|
|
2032
|
-
return q === !0 ?
|
|
2032
|
+
return q === !0 ? V(k) : q === !1 ? L(k, "字段验证失败") : q ? L(k, q) : V(k), q === !0 || typeof q == "string" && !q;
|
|
2033
2033
|
}
|
|
2034
|
-
function B(k, C,
|
|
2035
|
-
return
|
|
2034
|
+
function B(k, C, b) {
|
|
2035
|
+
return b.required && !C ? (L(k, b.requiredText ?? "字段必填"), !1) : b.pattern && C && !b.pattern.test(C) ? (L(k, b.patternText ?? "字段验证失败"), !1) : (V(k), !0);
|
|
2036
2036
|
}
|
|
2037
|
-
function M(k, C,
|
|
2038
|
-
return
|
|
2037
|
+
function M(k, C, b) {
|
|
2038
|
+
return b.required && C === void 0 ? (L(k, b.requiredText ?? "字段必填"), !1) : (V(k), !0);
|
|
2039
2039
|
}
|
|
2040
|
-
function I(k, C,
|
|
2041
|
-
return
|
|
2040
|
+
function I(k, C, b) {
|
|
2041
|
+
return b.required && (!C || !C.length) ? (L(k, b.requiredText ?? "字段必填"), !1) : b.pattern && C && C.map((q) => q.toString()).map((q) => b.pattern.test(q)).includes(!1) ? (L(k, b.patternText ?? "字段验证失败"), !1) : (V(k), !0);
|
|
2042
2042
|
}
|
|
2043
2043
|
function L(k, C) {
|
|
2044
|
-
c.value = c.value.filter((
|
|
2044
|
+
c.value = c.value.filter((b) => b !== k), a.value[k] = C;
|
|
2045
2045
|
}
|
|
2046
|
-
function
|
|
2046
|
+
function V(k) {
|
|
2047
2047
|
c.value.push(k), delete a.value[k];
|
|
2048
2048
|
}
|
|
2049
|
-
function
|
|
2049
|
+
function j(k) {
|
|
2050
2050
|
var C;
|
|
2051
2051
|
(C = d.value[k]) == null || C.abort(), delete d.value[k];
|
|
2052
2052
|
}
|
|
2053
|
-
function
|
|
2053
|
+
function te() {
|
|
2054
2054
|
n("update:formData", structuredClone(e)), a.value = {}, c.value = [], n("validate", "SQFORM", !1, ze(c.value));
|
|
2055
2055
|
}
|
|
2056
|
-
function
|
|
2057
|
-
const
|
|
2056
|
+
function ne(k = !0) {
|
|
2057
|
+
const b = (k ? t.items : p.value).filter(
|
|
2058
2058
|
(x) => x.type !== "custom" && x.rule && !c.value.includes(x.binding)
|
|
2059
2059
|
).map((x) => {
|
|
2060
2060
|
const g = x;
|
|
2061
2061
|
return f(g.binding, void 0, g.rule, !1);
|
|
2062
2062
|
});
|
|
2063
|
-
return Promise.all(
|
|
2063
|
+
return Promise.all(b).then((x) => (n("validate", "SQFORM", !x.includes(!1), ze(c.value)), x));
|
|
2064
2064
|
}
|
|
2065
|
-
return o({ resetFields:
|
|
2066
|
-
class:
|
|
2067
|
-
style:
|
|
2065
|
+
return o({ resetFields: te, validate: ne }), (k, C) => (v(), w("form", {
|
|
2066
|
+
class: W(["sq-form", l.value]),
|
|
2067
|
+
style: Z(i.value),
|
|
2068
2068
|
onSubmit: C[0] || (C[0] = be(() => {
|
|
2069
2069
|
}, ["prevent"]))
|
|
2070
2070
|
}, [
|
|
2071
|
-
(v(!0), w(se, null, pe(p.value, (
|
|
2072
|
-
class:
|
|
2073
|
-
type:
|
|
2071
|
+
(v(!0), w(se, null, pe(p.value, (b, x) => (v(), S(Bs, {
|
|
2072
|
+
class: W(b.itemClass),
|
|
2073
|
+
type: b.type,
|
|
2074
2074
|
key: x,
|
|
2075
|
-
"label-width":
|
|
2076
|
-
label:
|
|
2077
|
-
"show-label":
|
|
2078
|
-
"is-required": m(
|
|
2079
|
-
"error-msg": t.hasFeedback ? a.value[
|
|
2075
|
+
"label-width": b.labelWidth,
|
|
2076
|
+
label: b.label,
|
|
2077
|
+
"show-label": b.showLabel && t.layout !== "vertical",
|
|
2078
|
+
"is-required": m(b),
|
|
2079
|
+
"error-msg": t.hasFeedback ? a.value[b.binding] : ""
|
|
2080
2080
|
}, {
|
|
2081
2081
|
default: N(() => [
|
|
2082
|
-
|
|
2082
|
+
b.type === "input" ? (v(), S(r(nt), ve({
|
|
2083
2083
|
key: 0,
|
|
2084
2084
|
ref_for: !0
|
|
2085
|
-
},
|
|
2086
|
-
name:
|
|
2087
|
-
status: _(
|
|
2088
|
-
"suffix-icon": h(
|
|
2089
|
-
value: t.formData[
|
|
2090
|
-
"onUpdate:value": (g) => t.formData[
|
|
2091
|
-
onChange: (g) => f(
|
|
2092
|
-
onInput: (g) => f(
|
|
2093
|
-
onBlur: (g) => f(
|
|
2094
|
-
}), null, 16, ["name", "status", "suffix-icon", "value", "onUpdate:value", "onChange", "onInput", "onBlur"])) :
|
|
2085
|
+
}, b.props, {
|
|
2086
|
+
name: b.name,
|
|
2087
|
+
status: _(b.binding),
|
|
2088
|
+
"suffix-icon": h(b.binding),
|
|
2089
|
+
value: t.formData[b.binding],
|
|
2090
|
+
"onUpdate:value": (g) => t.formData[b.binding] = g,
|
|
2091
|
+
onChange: (g) => f(b.binding, "change", b.rule),
|
|
2092
|
+
onInput: (g) => f(b.binding, "input", b.rule),
|
|
2093
|
+
onBlur: (g) => f(b.binding, "blur", b.rule)
|
|
2094
|
+
}), null, 16, ["name", "status", "suffix-icon", "value", "onUpdate:value", "onChange", "onInput", "onBlur"])) : b.type === "checkbox" ? (v(), S(r(Yn), ve({
|
|
2095
2095
|
key: 1,
|
|
2096
2096
|
ref_for: !0
|
|
2097
|
-
},
|
|
2098
|
-
name:
|
|
2099
|
-
value: t.formData[
|
|
2100
|
-
"onUpdate:value": (g) => t.formData[
|
|
2101
|
-
onChange: (g) => f(
|
|
2102
|
-
}), null, 16, ["name", "value", "onUpdate:value", "onChange"])) :
|
|
2097
|
+
}, b.props, {
|
|
2098
|
+
name: b.name,
|
|
2099
|
+
value: t.formData[b.binding],
|
|
2100
|
+
"onUpdate:value": (g) => t.formData[b.binding] = g,
|
|
2101
|
+
onChange: (g) => f(b.binding, "change", b.rule)
|
|
2102
|
+
}), null, 16, ["name", "value", "onUpdate:value", "onChange"])) : b.type === "radio" ? (v(), S(r(Eo), ve({
|
|
2103
2103
|
key: 2,
|
|
2104
2104
|
ref_for: !0
|
|
2105
|
-
},
|
|
2106
|
-
name:
|
|
2107
|
-
value: t.formData[
|
|
2108
|
-
"onUpdate:value": (g) => t.formData[
|
|
2109
|
-
onChange: (g) => f(
|
|
2110
|
-
}), null, 16, ["name", "value", "onUpdate:value", "onChange"])) :
|
|
2105
|
+
}, b.props, {
|
|
2106
|
+
name: b.name,
|
|
2107
|
+
value: t.formData[b.binding],
|
|
2108
|
+
"onUpdate:value": (g) => t.formData[b.binding] = g,
|
|
2109
|
+
onChange: (g) => f(b.binding, "change", b.rule)
|
|
2110
|
+
}), null, 16, ["name", "value", "onUpdate:value", "onChange"])) : b.type === "switch" ? (v(), S(r(Zo), ve({
|
|
2111
2111
|
key: 3,
|
|
2112
2112
|
ref_for: !0
|
|
2113
|
-
},
|
|
2114
|
-
name:
|
|
2115
|
-
loading: d.value[
|
|
2116
|
-
checked: t.formData[
|
|
2117
|
-
"onUpdate:checked": (g) => t.formData[
|
|
2118
|
-
onChange: (g) => f(
|
|
2119
|
-
}), null, 16, ["name", "loading", "checked", "onUpdate:checked", "onChange"])) :
|
|
2113
|
+
}, b.props, {
|
|
2114
|
+
name: b.name,
|
|
2115
|
+
loading: d.value[b.binding] !== void 0,
|
|
2116
|
+
checked: t.formData[b.binding],
|
|
2117
|
+
"onUpdate:checked": (g) => t.formData[b.binding] = g,
|
|
2118
|
+
onChange: (g) => f(b.binding, "change", b.rule)
|
|
2119
|
+
}), null, 16, ["name", "loading", "checked", "onUpdate:checked", "onChange"])) : b.type === "select" ? (v(), S(r(jo), ve({
|
|
2120
2120
|
key: 4,
|
|
2121
2121
|
ref_for: !0
|
|
2122
|
-
},
|
|
2123
|
-
name:
|
|
2124
|
-
value: t.formData[
|
|
2125
|
-
"onUpdate:value": (g) => t.formData[
|
|
2126
|
-
onChange: (g) => f(
|
|
2127
|
-
}), null, 16, ["name", "value", "onUpdate:value", "onChange"])) :
|
|
2122
|
+
}, b.props, {
|
|
2123
|
+
name: b.name,
|
|
2124
|
+
value: t.formData[b.binding],
|
|
2125
|
+
"onUpdate:value": (g) => t.formData[b.binding] = g,
|
|
2126
|
+
onChange: (g) => f(b.binding, "change", b.rule)
|
|
2127
|
+
}), null, 16, ["name", "value", "onUpdate:value", "onChange"])) : F(k.$slots, b.slot, { key: 5 })
|
|
2128
2128
|
]),
|
|
2129
2129
|
_: 2
|
|
2130
2130
|
}, 1032, ["class", "type", "label-width", "label", "show-label", "is-required", "error-msg"]))), 128))
|
|
@@ -2155,16 +2155,16 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2155
2155
|
},
|
|
2156
2156
|
emits: ["load", "error"],
|
|
2157
2157
|
setup(u, { emit: o }) {
|
|
2158
|
-
const s = new IntersectionObserver(_), e = o, n = u, t = T(!1), a = T(n.src), c = T(!1), d = T(!1), l = T(!1), i = ue(null), p =
|
|
2158
|
+
const s = new IntersectionObserver(_), e = o, n = u, t = T(!1), a = T(n.src), c = T(!1), d = T(!1), l = T(!1), i = ue(null), p = y(() => t.value && !c.value), m = y(() => ({
|
|
2159
2159
|
height: p.value ? void 0 : "var(--image-placeholder-height)",
|
|
2160
2160
|
aspectRatio: p.value ? void 0 : n.aspectRatio
|
|
2161
2161
|
}));
|
|
2162
|
-
|
|
2162
|
+
ae(
|
|
2163
2163
|
() => n.src,
|
|
2164
2164
|
() => {
|
|
2165
2165
|
c.value = !1, t.value = !1, a.value = n.src;
|
|
2166
2166
|
}
|
|
2167
|
-
),
|
|
2167
|
+
), ie(() => {
|
|
2168
2168
|
s.observe(i.value);
|
|
2169
2169
|
}), ye(() => {
|
|
2170
2170
|
s.disconnect();
|
|
@@ -2187,7 +2187,7 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2187
2187
|
}
|
|
2188
2188
|
return (B, M) => (v(), w("div", {
|
|
2189
2189
|
class: "sq-image",
|
|
2190
|
-
style:
|
|
2190
|
+
style: Z(m.value),
|
|
2191
2191
|
ref_key: "imgRef",
|
|
2192
2192
|
ref: i
|
|
2193
2193
|
}, [
|
|
@@ -2205,7 +2205,7 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2205
2205
|
type: I.type
|
|
2206
2206
|
}, null, 8, Ls))), 128)),
|
|
2207
2207
|
E("img", {
|
|
2208
|
-
style:
|
|
2208
|
+
style: Z({ objectFit: n.objectFit }),
|
|
2209
2209
|
crossorigin: n.crossorigin,
|
|
2210
2210
|
alt: n.alt,
|
|
2211
2211
|
src: a.value,
|
|
@@ -2221,7 +2221,7 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2221
2221
|
z(r(gt))
|
|
2222
2222
|
])) : P("", !0),
|
|
2223
2223
|
c.value ? (v(), w("div", As, [
|
|
2224
|
-
|
|
2224
|
+
F(B.$slots, "error", {}, () => [
|
|
2225
2225
|
M[1] || (M[1] = E("span", null, "图片加载失败", -1))
|
|
2226
2226
|
])
|
|
2227
2227
|
])) : P("", !0),
|
|
@@ -2236,7 +2236,7 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2236
2236
|
}), Ms = ["src"], Ps = "sq-image-viewer", Ds = /* @__PURE__ */ R({
|
|
2237
2237
|
name: Ps,
|
|
2238
2238
|
__name: "image-viewer",
|
|
2239
|
-
props: /* @__PURE__ */
|
|
2239
|
+
props: /* @__PURE__ */ G({
|
|
2240
2240
|
srcList: {},
|
|
2241
2241
|
toolbar: { type: Boolean, default: !0 },
|
|
2242
2242
|
minScale: { default: 0.5 },
|
|
@@ -2268,79 +2268,79 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2268
2268
|
getImagePoint: h
|
|
2269
2269
|
} = xt(), f = { x: 0, y: 0 };
|
|
2270
2270
|
let _ = 0;
|
|
2271
|
-
const $ = u, B = T(!1), M = T(!1), I = T(0), L = T(0),
|
|
2272
|
-
const
|
|
2271
|
+
const $ = u, B = T(!1), M = T(!1), I = T(0), L = T(0), V = T(!0), j = le(u, "visible"), te = y(() => $.srcList[L.value]), ne = y(() => {
|
|
2272
|
+
const Y = B.value ? -1 : 1, U = M.value ? -1 : 1;
|
|
2273
2273
|
return {
|
|
2274
2274
|
transform: [
|
|
2275
|
-
`scale(${e.value *
|
|
2275
|
+
`scale(${e.value * Y}, ${e.value * U})`,
|
|
2276
2276
|
`rotate(${I.value}deg)`
|
|
2277
2277
|
].join(" "),
|
|
2278
2278
|
marginInlineStart: `${n.value.x}px`,
|
|
2279
2279
|
marginBlockStart: `${n.value.y}px`,
|
|
2280
|
-
transition:
|
|
2280
|
+
transition: V.value ? void 0 : "none"
|
|
2281
2281
|
};
|
|
2282
2282
|
});
|
|
2283
2283
|
function k() {
|
|
2284
|
-
|
|
2284
|
+
V.value = !0;
|
|
2285
2285
|
}
|
|
2286
|
-
function C(
|
|
2287
|
-
|
|
2286
|
+
function C(Y) {
|
|
2287
|
+
Y.deltaY < 0 ? H(Y.x, Y.y) : X(Y.x, Y.y);
|
|
2288
2288
|
}
|
|
2289
|
-
function
|
|
2290
|
-
!o.value || !$.moveable ||
|
|
2289
|
+
function b(Y) {
|
|
2290
|
+
!o.value || !$.moveable || Y.pointerType === "touch" || p(Y.x, Y.y);
|
|
2291
2291
|
}
|
|
2292
|
-
function x(
|
|
2293
|
-
if (
|
|
2292
|
+
function x(Y) {
|
|
2293
|
+
if (Y.touches.length === 1) {
|
|
2294
2294
|
if (!o.value || !$.moveable) return;
|
|
2295
|
-
const
|
|
2296
|
-
p(
|
|
2297
|
-
} else if (
|
|
2295
|
+
const U = Y.touches[0];
|
|
2296
|
+
p(U.screenX, U.screenY);
|
|
2297
|
+
} else if (Y.touches.length === 2) {
|
|
2298
2298
|
if (!s.value) return;
|
|
2299
|
-
o.value = !1,
|
|
2300
|
-
const
|
|
2299
|
+
o.value = !1, V.value = !1;
|
|
2300
|
+
const U = Y.touches.item(0), Q = Y.touches.item(1), _e = m(U, Q), Me = _e / s.value;
|
|
2301
2301
|
let qe = e.value * Me;
|
|
2302
2302
|
qe = Math.min($.maxScale, qe), qe = Math.max($.minScale, qe);
|
|
2303
|
-
const We = (
|
|
2303
|
+
const We = (U.clientX + Q.clientX) / 2, Xe = (U.clientY + Q.clientY) / 2;
|
|
2304
2304
|
A(qe, We, Xe), s.value = _e;
|
|
2305
2305
|
}
|
|
2306
2306
|
}
|
|
2307
|
-
function g(
|
|
2308
|
-
const
|
|
2309
|
-
f.x = _e /
|
|
2307
|
+
function g(Y) {
|
|
2308
|
+
const Q = Y.target.getBoundingClientRect(), _e = window.innerWidth, Me = window.innerHeight;
|
|
2309
|
+
f.x = _e / Q.width, f.y = Me / Q.height, _ = Math.min(f.x, f.y), e.value = Math.min(_, 1);
|
|
2310
2310
|
}
|
|
2311
2311
|
function q() {
|
|
2312
2312
|
e.value = Math.min(f.x, f.y, 1), B.value = !1, M.value = !1, I.value = 0, n.value = { x: 0, y: 0 };
|
|
2313
2313
|
}
|
|
2314
|
-
function O(
|
|
2315
|
-
L.value +=
|
|
2314
|
+
function O(Y) {
|
|
2315
|
+
L.value += Y;
|
|
2316
2316
|
}
|
|
2317
|
-
function
|
|
2317
|
+
function H(Y, U) {
|
|
2318
2318
|
if (e.value >= $.maxScale) return;
|
|
2319
|
-
const
|
|
2320
|
-
A(
|
|
2321
|
-
}
|
|
2322
|
-
function Y
|
|
2323
|
-
const
|
|
2324
|
-
if (e.value <=
|
|
2325
|
-
const _e = Math.max(
|
|
2326
|
-
A(_e,
|
|
2327
|
-
}
|
|
2328
|
-
function A(
|
|
2329
|
-
if (!
|
|
2330
|
-
e.value =
|
|
2319
|
+
const Q = Math.min($.maxScale, e.value * (1 + $.scaleStep));
|
|
2320
|
+
A(Q, Y, U);
|
|
2321
|
+
}
|
|
2322
|
+
function X(Y, U) {
|
|
2323
|
+
const Q = Math.min(_, $.minScale);
|
|
2324
|
+
if (e.value <= Q) return;
|
|
2325
|
+
const _e = Math.max(Q, e.value / (1 + $.scaleStep));
|
|
2326
|
+
A(_e, Y, U);
|
|
2327
|
+
}
|
|
2328
|
+
function A(Y, U, Q) {
|
|
2329
|
+
if (!U || !Q) {
|
|
2330
|
+
e.value = Y;
|
|
2331
2331
|
return;
|
|
2332
2332
|
}
|
|
2333
|
-
|
|
2334
|
-
const _e = e.value, [Me, qe] = h(
|
|
2335
|
-
e.value =
|
|
2336
|
-
const [We, Xe] = i(Me, qe,
|
|
2337
|
-
n.value.x += We * 2, n.value.y += Xe * 2,
|
|
2333
|
+
V.value = !1;
|
|
2334
|
+
const _e = e.value, [Me, qe] = h(U, Q);
|
|
2335
|
+
e.value = Y, $e(() => {
|
|
2336
|
+
const [We, Xe] = i(Me, qe, U, Q, _e);
|
|
2337
|
+
n.value.x += We * 2, n.value.y += Xe * 2, V.value = !0;
|
|
2338
2338
|
});
|
|
2339
2339
|
}
|
|
2340
2340
|
function D() {
|
|
2341
2341
|
e.value = Math.min(f.x, f.y), n.value = { x: 0, y: 0 };
|
|
2342
2342
|
}
|
|
2343
|
-
function
|
|
2343
|
+
function K() {
|
|
2344
2344
|
e.value = 1, n.value = { x: 0, y: 0 };
|
|
2345
2345
|
}
|
|
2346
2346
|
function ce() {
|
|
@@ -2349,68 +2349,68 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2349
2349
|
function ge() {
|
|
2350
2350
|
M.value = !M.value;
|
|
2351
2351
|
}
|
|
2352
|
-
function we(
|
|
2353
|
-
I.value +=
|
|
2352
|
+
function we(Y) {
|
|
2353
|
+
I.value += Y;
|
|
2354
2354
|
}
|
|
2355
2355
|
function je() {
|
|
2356
|
-
|
|
2356
|
+
j.value = !1;
|
|
2357
2357
|
}
|
|
2358
|
-
return (
|
|
2358
|
+
return (Y, U) => (v(), S(r(wt), {
|
|
2359
2359
|
class: "sq-image-viewer-mask",
|
|
2360
|
-
visible:
|
|
2361
|
-
"onUpdate:visible":
|
|
2360
|
+
visible: j.value,
|
|
2361
|
+
"onUpdate:visible": U[10] || (U[10] = (Q) => j.value = Q),
|
|
2362
2362
|
keyboard: $.keyboard,
|
|
2363
2363
|
"mask-closeable": $.maskCloseable,
|
|
2364
2364
|
onWheelPassive: C,
|
|
2365
|
-
onPointermove:
|
|
2365
|
+
onPointermove: b,
|
|
2366
2366
|
onPointerup: r(c),
|
|
2367
2367
|
onTouchmovePassive: x,
|
|
2368
|
-
onTouchend:
|
|
2368
|
+
onTouchend: U[11] || (U[11] = () => r(l)(k)),
|
|
2369
2369
|
onClosed: q
|
|
2370
2370
|
}, {
|
|
2371
2371
|
default: N(() => [
|
|
2372
2372
|
E("img", {
|
|
2373
2373
|
ref_key: "imgRef",
|
|
2374
2374
|
ref: t,
|
|
2375
|
-
style:
|
|
2376
|
-
src:
|
|
2377
|
-
onClick:
|
|
2375
|
+
style: Z(ne.value),
|
|
2376
|
+
src: te.value,
|
|
2377
|
+
onClick: U[0] || (U[0] = be(() => {
|
|
2378
2378
|
}, ["stop"])),
|
|
2379
2379
|
onLoad: g,
|
|
2380
|
-
onPointerdown:
|
|
2380
|
+
onPointerdown: U[1] || (U[1] = be(
|
|
2381
2381
|
//@ts-ignore
|
|
2382
|
-
(...
|
|
2382
|
+
(...Q) => r(a) && r(a)(...Q),
|
|
2383
2383
|
["prevent"]
|
|
2384
2384
|
)),
|
|
2385
|
-
onTouchstartPassive:
|
|
2386
|
-
(...
|
|
2385
|
+
onTouchstartPassive: U[2] || (U[2] = //@ts-ignore
|
|
2386
|
+
(...Q) => r(d) && r(d)(...Q))
|
|
2387
2387
|
}, null, 44, Ms),
|
|
2388
|
-
z(r(
|
|
2388
|
+
z(r(ee), {
|
|
2389
2389
|
class: "sq-image-viewer-close",
|
|
2390
2390
|
round: "",
|
|
2391
2391
|
icon: r(Je),
|
|
2392
2392
|
onClick: be(je, ["stop"])
|
|
2393
2393
|
}, null, 8, ["icon"]),
|
|
2394
2394
|
$.srcList.length > 1 ? (v(), w(se, { key: 0 }, [
|
|
2395
|
-
z(r(
|
|
2395
|
+
z(r(ee), {
|
|
2396
2396
|
class: "sq-image-viewer-prev",
|
|
2397
2397
|
round: "",
|
|
2398
2398
|
icon: r(bt),
|
|
2399
2399
|
disabled: L.value === 0,
|
|
2400
|
-
onClick:
|
|
2400
|
+
onClick: U[3] || (U[3] = (Q) => O(-1))
|
|
2401
2401
|
}, null, 8, ["icon", "disabled"]),
|
|
2402
|
-
z(r(
|
|
2402
|
+
z(r(ee), {
|
|
2403
2403
|
class: "sq-image-viewer-next",
|
|
2404
2404
|
round: "",
|
|
2405
2405
|
icon: r(yt),
|
|
2406
2406
|
disabled: L.value === $.srcList.length - 1,
|
|
2407
|
-
onClick:
|
|
2407
|
+
onClick: U[4] || (U[4] = (Q) => O(1))
|
|
2408
2408
|
}, null, 8, ["icon", "disabled"])
|
|
2409
2409
|
], 64)) : P("", !0),
|
|
2410
2410
|
$.toolbar ? (v(), w("div", {
|
|
2411
2411
|
key: 1,
|
|
2412
2412
|
class: "sq-image-viewer-toolbar",
|
|
2413
|
-
onClick:
|
|
2413
|
+
onClick: U[9] || (U[9] = be(() => {
|
|
2414
2414
|
}, ["stop"]))
|
|
2415
2415
|
}, [
|
|
2416
2416
|
z(r(de), {
|
|
@@ -2418,11 +2418,11 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2418
2418
|
shadow: !1
|
|
2419
2419
|
}, {
|
|
2420
2420
|
default: N(() => [
|
|
2421
|
-
z(r(
|
|
2421
|
+
z(r(ee), {
|
|
2422
2422
|
text: "",
|
|
2423
2423
|
icon: r(Ft),
|
|
2424
2424
|
disabled: r(e) >= $.maxScale,
|
|
2425
|
-
onClick:
|
|
2425
|
+
onClick: U[5] || (U[5] = () => H())
|
|
2426
2426
|
}, null, 8, ["icon", "disabled"])
|
|
2427
2427
|
]),
|
|
2428
2428
|
_: 1
|
|
@@ -2432,11 +2432,11 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2432
2432
|
shadow: !1
|
|
2433
2433
|
}, {
|
|
2434
2434
|
default: N(() => [
|
|
2435
|
-
z(r(
|
|
2435
|
+
z(r(ee), {
|
|
2436
2436
|
text: "",
|
|
2437
2437
|
icon: r(Ht),
|
|
2438
2438
|
disabled: r(e) <= $.minScale,
|
|
2439
|
-
onClick:
|
|
2439
|
+
onClick: U[6] || (U[6] = () => X())
|
|
2440
2440
|
}, null, 8, ["icon", "disabled"])
|
|
2441
2441
|
]),
|
|
2442
2442
|
_: 1
|
|
@@ -2447,7 +2447,7 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2447
2447
|
shadow: !1
|
|
2448
2448
|
}, {
|
|
2449
2449
|
default: N(() => [
|
|
2450
|
-
z(r(
|
|
2450
|
+
z(r(ee), {
|
|
2451
2451
|
text: "",
|
|
2452
2452
|
icon: r(jt),
|
|
2453
2453
|
onClick: ce
|
|
@@ -2460,7 +2460,7 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2460
2460
|
shadow: !1
|
|
2461
2461
|
}, {
|
|
2462
2462
|
default: N(() => [
|
|
2463
|
-
z(r(
|
|
2463
|
+
z(r(ee), {
|
|
2464
2464
|
text: "",
|
|
2465
2465
|
icon: r(Wt),
|
|
2466
2466
|
onClick: ge
|
|
@@ -2474,10 +2474,10 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2474
2474
|
shadow: !1
|
|
2475
2475
|
}, {
|
|
2476
2476
|
default: N(() => [
|
|
2477
|
-
z(r(
|
|
2477
|
+
z(r(ee), {
|
|
2478
2478
|
text: "",
|
|
2479
2479
|
icon: r(Xt),
|
|
2480
|
-
onClick:
|
|
2480
|
+
onClick: U[7] || (U[7] = (Q) => we(90))
|
|
2481
2481
|
}, null, 8, ["icon"])
|
|
2482
2482
|
]),
|
|
2483
2483
|
_: 1
|
|
@@ -2487,10 +2487,10 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2487
2487
|
shadow: !1
|
|
2488
2488
|
}, {
|
|
2489
2489
|
default: N(() => [
|
|
2490
|
-
z(r(
|
|
2490
|
+
z(r(ee), {
|
|
2491
2491
|
text: "",
|
|
2492
2492
|
icon: r(Yt),
|
|
2493
|
-
onClick:
|
|
2493
|
+
onClick: U[8] || (U[8] = (Q) => we(-90))
|
|
2494
2494
|
}, null, 8, ["icon"])
|
|
2495
2495
|
]),
|
|
2496
2496
|
_: 1
|
|
@@ -2501,10 +2501,10 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2501
2501
|
shadow: !1
|
|
2502
2502
|
}, {
|
|
2503
2503
|
default: N(() => [
|
|
2504
|
-
z(r(
|
|
2504
|
+
z(r(ee), {
|
|
2505
2505
|
text: "",
|
|
2506
2506
|
icon: r(Kt),
|
|
2507
|
-
onClick:
|
|
2507
|
+
onClick: K
|
|
2508
2508
|
}, null, 8, ["icon"])
|
|
2509
2509
|
]),
|
|
2510
2510
|
_: 1
|
|
@@ -2514,7 +2514,7 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2514
2514
|
shadow: !1
|
|
2515
2515
|
}, {
|
|
2516
2516
|
default: N(() => [
|
|
2517
|
-
z(r(
|
|
2517
|
+
z(r(ee), {
|
|
2518
2518
|
text: "",
|
|
2519
2519
|
icon: r(Gt),
|
|
2520
2520
|
onClick: D
|
|
@@ -2552,35 +2552,35 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2552
2552
|
getImagePoint: f
|
|
2553
2553
|
} = xt();
|
|
2554
2554
|
let _ = 0;
|
|
2555
|
-
const $ = u, B = ue(null), M =
|
|
2555
|
+
const $ = u, B = ue(null), M = y(() => ({
|
|
2556
2556
|
transform: `scale(${n.value})`,
|
|
2557
2557
|
marginInlineStart: `${t.value.x}px`,
|
|
2558
2558
|
marginBlockStart: `${t.value.y}px`
|
|
2559
2559
|
}));
|
|
2560
|
-
|
|
2560
|
+
ae(
|
|
2561
2561
|
() => $.aspectRatio,
|
|
2562
2562
|
() => {
|
|
2563
2563
|
$e(I);
|
|
2564
2564
|
}
|
|
2565
|
-
),
|
|
2566
|
-
document.addEventListener("pointermove",
|
|
2565
|
+
), ie(() => {
|
|
2566
|
+
document.addEventListener("pointermove", V), document.addEventListener("pointerup", d);
|
|
2567
2567
|
}), ye(() => {
|
|
2568
|
-
document.removeEventListener("pointermove",
|
|
2568
|
+
document.removeEventListener("pointermove", V), document.removeEventListener("pointerup", d);
|
|
2569
2569
|
});
|
|
2570
2570
|
function I() {
|
|
2571
2571
|
const x = a.value;
|
|
2572
2572
|
if (!x) return;
|
|
2573
2573
|
t.value = { x: 0, y: 0 };
|
|
2574
|
-
const g = B.value.getBoundingClientRect(), q = x.naturalWidth, O = x.naturalHeight,
|
|
2575
|
-
_ = Math.max(
|
|
2574
|
+
const g = B.value.getBoundingClientRect(), q = x.naturalWidth, O = x.naturalHeight, H = g.width / q, X = g.height / O;
|
|
2575
|
+
_ = Math.max(H, X), n.value = _;
|
|
2576
2576
|
}
|
|
2577
2577
|
function L(x) {
|
|
2578
|
-
x.deltaY < 0 ?
|
|
2578
|
+
x.deltaY < 0 ? te(x.x, x.y) : ne(x.x, x.y);
|
|
2579
2579
|
}
|
|
2580
|
-
function
|
|
2580
|
+
function V(x) {
|
|
2581
2581
|
!s.value || x.pointerType === "touch" || (m(x.x, x.y), C());
|
|
2582
2582
|
}
|
|
2583
|
-
function
|
|
2583
|
+
function j(x) {
|
|
2584
2584
|
if (x.touches.length === 1) {
|
|
2585
2585
|
if (!s.value) return;
|
|
2586
2586
|
const g = x.touches[0];
|
|
@@ -2588,27 +2588,27 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2588
2588
|
} else if (x.touches.length === 2) {
|
|
2589
2589
|
if (!e.value) return;
|
|
2590
2590
|
s.value = !1;
|
|
2591
|
-
const g = x.touches.item(0), q = x.touches.item(1), O = h(g, q),
|
|
2592
|
-
let
|
|
2593
|
-
|
|
2591
|
+
const g = x.touches.item(0), q = x.touches.item(1), O = h(g, q), H = O / e.value;
|
|
2592
|
+
let X = n.value * H;
|
|
2593
|
+
X = Math.min($.maxScale, X), X = Math.max(_, X);
|
|
2594
2594
|
const A = (g.clientX + q.clientX) / 2, D = (g.clientY + q.clientY) / 2;
|
|
2595
|
-
k(A, D,
|
|
2595
|
+
k(A, D, X), e.value = O;
|
|
2596
2596
|
}
|
|
2597
2597
|
}
|
|
2598
|
-
function
|
|
2598
|
+
function te(x, g) {
|
|
2599
2599
|
if (n.value >= $.maxScale) return;
|
|
2600
2600
|
const q = Math.min($.maxScale, n.value * (1 + 0.1));
|
|
2601
2601
|
k(x, g, q);
|
|
2602
2602
|
}
|
|
2603
|
-
function
|
|
2603
|
+
function ne(x, g) {
|
|
2604
2604
|
if (n.value <= _) return;
|
|
2605
2605
|
const q = Math.max(_, n.value / (1 + 0.1));
|
|
2606
2606
|
k(x, g, q);
|
|
2607
2607
|
}
|
|
2608
2608
|
function k(x, g, q) {
|
|
2609
|
-
const O = n.value, [
|
|
2609
|
+
const O = n.value, [H, X] = f(x, g);
|
|
2610
2610
|
n.value = q, $e(() => {
|
|
2611
|
-
const [A, D] = p(
|
|
2611
|
+
const [A, D] = p(H, X, x, g, O);
|
|
2612
2612
|
t.value.x += A * 2, t.value.y += D * 2, C();
|
|
2613
2613
|
});
|
|
2614
2614
|
}
|
|
@@ -2616,45 +2616,45 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2616
2616
|
$e(() => {
|
|
2617
2617
|
const x = a.value.getBoundingClientRect(), g = B.value.getBoundingClientRect(), q = x.left >= g.left, O = x.right <= g.right;
|
|
2618
2618
|
q ? t.value.x -= (x.left - g.left) * 2 : O && (t.value.x += (g.right - x.right) * 2);
|
|
2619
|
-
const
|
|
2620
|
-
|
|
2619
|
+
const H = x.top >= g.top, X = x.bottom <= g.bottom;
|
|
2620
|
+
H ? t.value.y -= (x.top - g.top) * 2 : X && (t.value.y += (g.bottom - x.bottom) * 2);
|
|
2621
2621
|
});
|
|
2622
2622
|
}
|
|
2623
|
-
async function
|
|
2623
|
+
async function b(x = "base64") {
|
|
2624
2624
|
if (!$.src) return;
|
|
2625
|
-
const g = a.value.naturalWidth, q = a.value.naturalHeight, O = g / q,
|
|
2625
|
+
const g = a.value.naturalWidth, q = a.value.naturalHeight, O = g / q, X = g > q && O < $.aspectRatio || g < q && O > $.aspectRatio ? g / q : 1, A = n.value / _ / X;
|
|
2626
2626
|
let D = document.createElement("canvas");
|
|
2627
2627
|
D.style.display = "none", $.aspectRatio >= O ? (D.width = g, D.height = g / $.aspectRatio) : (D.width = q * $.aspectRatio, D.height = q);
|
|
2628
|
-
let
|
|
2628
|
+
let K = D.getContext("2d");
|
|
2629
2629
|
const ce = a.value.getBoundingClientRect(), ge = B.value.getBoundingClientRect(), we = (ce.left - ge.left) / n.value, je = (ce.top - ge.top) / n.value;
|
|
2630
|
-
return
|
|
2630
|
+
return K == null || K.drawImage(
|
|
2631
2631
|
a.value,
|
|
2632
2632
|
we * A,
|
|
2633
2633
|
je * A,
|
|
2634
2634
|
g * A,
|
|
2635
2635
|
q * A
|
|
2636
|
-
), new Promise((
|
|
2637
|
-
x === "base64" ?
|
|
2638
|
-
|
|
2636
|
+
), new Promise((Y) => {
|
|
2637
|
+
x === "base64" ? Y(D.toDataURL("image/png")) : D == null || D.toBlob((U) => {
|
|
2638
|
+
Y(U ?? void 0);
|
|
2639
2639
|
}, "image/png");
|
|
2640
2640
|
}).finally(() => {
|
|
2641
|
-
|
|
2641
|
+
K = void 0, D = void 0;
|
|
2642
2642
|
});
|
|
2643
2643
|
}
|
|
2644
|
-
return o({ cropImageAsync:
|
|
2644
|
+
return o({ cropImageAsync: b }), (x, g) => (v(), w("div", {
|
|
2645
2645
|
class: "sq-image-crop",
|
|
2646
|
-
style:
|
|
2646
|
+
style: Z({ "--image-crop-ratio": $.aspectRatio }),
|
|
2647
2647
|
onWheel: be(L, ["prevent", "stop"]),
|
|
2648
2648
|
onPointerdown: g[0] || (g[0] = //@ts-ignore
|
|
2649
2649
|
(...q) => r(c) && r(c)(...q)),
|
|
2650
2650
|
onTouchstartPassive: g[1] || (g[1] = //@ts-ignore
|
|
2651
2651
|
(...q) => r(l) && r(l)(...q)),
|
|
2652
|
-
onTouchmovePassive:
|
|
2652
|
+
onTouchmovePassive: j,
|
|
2653
2653
|
onTouchend: g[2] || (g[2] = () => r(i)())
|
|
2654
2654
|
}, [
|
|
2655
2655
|
E("div", {
|
|
2656
2656
|
class: "sq-image-crop-cropper",
|
|
2657
|
-
style:
|
|
2657
|
+
style: Z(`${$.aspectRatio > 1 ? "width" : "height"}: 100%`),
|
|
2658
2658
|
ref_key: "cropperRef",
|
|
2659
2659
|
ref: B
|
|
2660
2660
|
}, null, 4),
|
|
@@ -2662,19 +2662,19 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2662
2662
|
key: 0,
|
|
2663
2663
|
ref_key: "imgRef",
|
|
2664
2664
|
ref: a,
|
|
2665
|
-
style:
|
|
2665
|
+
style: Z(M.value),
|
|
2666
2666
|
src: $.src,
|
|
2667
2667
|
onLoad: I
|
|
2668
2668
|
}, null, 44, Os)) : P("", !0)
|
|
2669
2669
|
], 36));
|
|
2670
2670
|
}
|
|
2671
|
-
}),
|
|
2671
|
+
}), Us = {
|
|
2672
2672
|
key: 0,
|
|
2673
2673
|
class: "sq-input-prefix"
|
|
2674
|
-
},
|
|
2674
|
+
}, Vs = ["id", "disabled", "readonly", "placeholder", "type", "maxlength", "minlength", "autocomplete", "name", "autofocus", "form", "inputmode"], Fs = ["id", "disabled", "readonly", "placeholder", "type", "maxlength", "minlength", "autocomplete", "name", "autofocus", "form", "inputmode", "rows", "cols"], Hs = { class: "sq-input-suffix" }, js = "sq-input", nt = /* @__PURE__ */ R({
|
|
2675
2675
|
name: js,
|
|
2676
2676
|
__name: "input",
|
|
2677
|
-
props: /* @__PURE__ */
|
|
2677
|
+
props: /* @__PURE__ */ G({
|
|
2678
2678
|
status: {},
|
|
2679
2679
|
round: { type: Boolean, default: void 0 },
|
|
2680
2680
|
prefixIcon: {},
|
|
@@ -2700,27 +2700,27 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2700
2700
|
value: { default: "" },
|
|
2701
2701
|
valueModifiers: {}
|
|
2702
2702
|
}),
|
|
2703
|
-
emits: /* @__PURE__ */
|
|
2703
|
+
emits: /* @__PURE__ */ G(["click", "focus", "blur", "input", "change", "clear"], ["update:value"]),
|
|
2704
2704
|
setup(u, { expose: o, emit: s }) {
|
|
2705
|
-
const e = Ne(), n = s, t = u, { inputSize: a, inputRound: c, inputDisabled: d, inputReadonly: l, id: i } = Tn(t), p =
|
|
2706
|
-
const A = [], D = r(a),
|
|
2707
|
-
return D !== "md" && A.push(`sq-input--${D}`), t.status && A.push(`is-${t.status}`),
|
|
2708
|
-
}), $ =
|
|
2705
|
+
const e = Ne(), n = s, t = u, { inputSize: a, inputRound: c, inputDisabled: d, inputReadonly: l, id: i } = Tn(t), p = le(u, "value"), m = T(!1), h = T(!1), f = ue(null), _ = y(() => {
|
|
2706
|
+
const A = [], D = r(a), K = r(c), ce = r(ne);
|
|
2707
|
+
return D !== "md" && A.push(`sq-input--${D}`), t.status && A.push(`is-${t.status}`), K && A.push("is-round"), ce && A.push("is-disabled"), A;
|
|
2708
|
+
}), $ = y(() => r(h) ? ht : gt), B = y(() => r(h) ? "text" : t.type), M = y(() => e.prefix || t.prefixIcon), I = y(() => r(m) && r(p).length), L = y(
|
|
2709
2709
|
() => t.type === "password" && r(I)
|
|
2710
|
-
),
|
|
2711
|
-
() => r(L) || r(
|
|
2712
|
-
),
|
|
2710
|
+
), V = y(() => t.clearable && r(I)), j = y(() => t.loading ? Ve : t.suffixIcon), te = y(
|
|
2711
|
+
() => r(L) || r(V) || r(j) || e.suffix
|
|
2712
|
+
), ne = y(() => t.loading || r(d)), k = y(() => {
|
|
2713
2713
|
if (t.type === "textarea")
|
|
2714
|
-
return r(
|
|
2714
|
+
return r(ne) || r(l) ? "none" : t.resize;
|
|
2715
2715
|
});
|
|
2716
2716
|
function C(A) {
|
|
2717
2717
|
n("focus", A), !r(l) && (m.value = !0);
|
|
2718
2718
|
}
|
|
2719
|
-
function
|
|
2719
|
+
function b(A) {
|
|
2720
2720
|
n("blur", A), !r(l) && (m.value = !1);
|
|
2721
2721
|
}
|
|
2722
2722
|
function x() {
|
|
2723
|
-
setTimeout(
|
|
2723
|
+
setTimeout(H);
|
|
2724
2724
|
}
|
|
2725
2725
|
function g(A) {
|
|
2726
2726
|
n("click", A);
|
|
@@ -2731,30 +2731,30 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2731
2731
|
function O() {
|
|
2732
2732
|
h.value = !h.value;
|
|
2733
2733
|
}
|
|
2734
|
-
function
|
|
2734
|
+
function H() {
|
|
2735
2735
|
var A;
|
|
2736
2736
|
(A = f.value) == null || A.focus();
|
|
2737
2737
|
}
|
|
2738
|
-
function
|
|
2738
|
+
function X() {
|
|
2739
2739
|
var A;
|
|
2740
2740
|
m.value = !1, (A = f.value) == null || A.blur();
|
|
2741
2741
|
}
|
|
2742
|
-
return o({ focus:
|
|
2743
|
-
class:
|
|
2742
|
+
return o({ focus: H, blur: X }), (A, D) => (v(), w("div", {
|
|
2743
|
+
class: W(["sq-input", _.value]),
|
|
2744
2744
|
onClick: g,
|
|
2745
2745
|
onPointerdown: x
|
|
2746
2746
|
}, [
|
|
2747
|
-
M.value ? (v(), w("span",
|
|
2748
|
-
|
|
2747
|
+
M.value ? (v(), w("span", Us, [
|
|
2748
|
+
F(A.$slots, "prefix", {}, () => [
|
|
2749
2749
|
(v(), S(fe(t.prefixIcon)))
|
|
2750
2750
|
])
|
|
2751
2751
|
])) : P("", !0),
|
|
2752
2752
|
t.type !== "textarea" ? re((v(), w("input", {
|
|
2753
2753
|
key: 1,
|
|
2754
2754
|
class: "sq-input-inner",
|
|
2755
|
-
"onUpdate:modelValue": D[0] || (D[0] = (
|
|
2755
|
+
"onUpdate:modelValue": D[0] || (D[0] = (K) => p.value = K),
|
|
2756
2756
|
id: r(i),
|
|
2757
|
-
disabled:
|
|
2757
|
+
disabled: ne.value,
|
|
2758
2758
|
readonly: r(l),
|
|
2759
2759
|
placeholder: t.placeholder,
|
|
2760
2760
|
type: B.value,
|
|
@@ -2768,18 +2768,18 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2768
2768
|
ref_key: "inputRef",
|
|
2769
2769
|
ref: f,
|
|
2770
2770
|
onFocus: C,
|
|
2771
|
-
onBlur:
|
|
2772
|
-
onInput: D[1] || (D[1] = (
|
|
2773
|
-
onChange: D[2] || (D[2] = (
|
|
2774
|
-
}, null, 40,
|
|
2771
|
+
onBlur: b,
|
|
2772
|
+
onInput: D[1] || (D[1] = (K) => n("input", K)),
|
|
2773
|
+
onChange: D[2] || (D[2] = (K) => n("change", K))
|
|
2774
|
+
}, null, 40, Vs)), [
|
|
2775
2775
|
[zt, p.value]
|
|
2776
2776
|
]) : re((v(), w("textarea", {
|
|
2777
2777
|
key: 2,
|
|
2778
2778
|
class: "sq-input-inner",
|
|
2779
|
-
style:
|
|
2780
|
-
"onUpdate:modelValue": D[3] || (D[3] = (
|
|
2779
|
+
style: Z({ resize: k.value }),
|
|
2780
|
+
"onUpdate:modelValue": D[3] || (D[3] = (K) => p.value = K),
|
|
2781
2781
|
id: r(i),
|
|
2782
|
-
disabled:
|
|
2782
|
+
disabled: ne.value,
|
|
2783
2783
|
readonly: r(l),
|
|
2784
2784
|
placeholder: t.placeholder,
|
|
2785
2785
|
type: B.value,
|
|
@@ -2795,9 +2795,9 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2795
2795
|
ref_key: "inputRef",
|
|
2796
2796
|
ref: f,
|
|
2797
2797
|
onFocus: C,
|
|
2798
|
-
onBlur:
|
|
2799
|
-
onInput: D[4] || (D[4] = (
|
|
2800
|
-
onChange: D[5] || (D[5] = (
|
|
2798
|
+
onBlur: b,
|
|
2799
|
+
onInput: D[4] || (D[4] = (K) => n("input", K)),
|
|
2800
|
+
onChange: D[5] || (D[5] = (K) => n("change", K))
|
|
2801
2801
|
}, null, 44, Fs)), [
|
|
2802
2802
|
[Rt, p.value]
|
|
2803
2803
|
]),
|
|
@@ -2807,23 +2807,23 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2807
2807
|
class: "sq-input-suffix-pwd",
|
|
2808
2808
|
onPointerdown: O
|
|
2809
2809
|
}, null, 32)) : P("", !0),
|
|
2810
|
-
|
|
2810
|
+
V.value ? (v(), S(r(Je), {
|
|
2811
2811
|
key: 1,
|
|
2812
2812
|
class: "sq-input-suffix-clear",
|
|
2813
2813
|
onPointerdown: q
|
|
2814
2814
|
})) : P("", !0),
|
|
2815
|
-
|
|
2816
|
-
|
|
2815
|
+
F(A.$slots, "suffix", {}, () => [
|
|
2816
|
+
j.value ? (v(), S(fe(j.value), { key: 0 })) : P("", !0)
|
|
2817
2817
|
])
|
|
2818
2818
|
], 512), [
|
|
2819
|
-
[he,
|
|
2819
|
+
[he, te.value]
|
|
2820
2820
|
])
|
|
2821
2821
|
], 34));
|
|
2822
2822
|
}
|
|
2823
2823
|
}), Ws = ["onClick"], Xs = ["textContent"], Ys = ["onClick"], Ks = ["textContent"], Gs = "sq-menu", Ia = /* @__PURE__ */ R({
|
|
2824
2824
|
name: Gs,
|
|
2825
2825
|
__name: "menu",
|
|
2826
|
-
props: /* @__PURE__ */
|
|
2826
|
+
props: /* @__PURE__ */ G({
|
|
2827
2827
|
router: { type: Boolean },
|
|
2828
2828
|
items: {},
|
|
2829
2829
|
direction: { default: "vertical" }
|
|
@@ -2831,9 +2831,9 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2831
2831
|
active: {},
|
|
2832
2832
|
activeModifiers: {}
|
|
2833
2833
|
}),
|
|
2834
|
-
emits: /* @__PURE__ */
|
|
2834
|
+
emits: /* @__PURE__ */ G(["click", "change"], ["update:active"]),
|
|
2835
2835
|
setup(u, { emit: o }) {
|
|
2836
|
-
const { getText: s } = Ae(), e = o, n = u, t =
|
|
2836
|
+
const { getText: s } = Ae(), e = o, n = u, t = le(u, "active"), a = y(() => [`sq-menu--${n.direction}`]);
|
|
2837
2837
|
function c(l, i) {
|
|
2838
2838
|
l.disabled || i();
|
|
2839
2839
|
}
|
|
@@ -2841,7 +2841,7 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2841
2841
|
e("click", l.value, i), !(l.disabled || l.value === t.value) && (e("change", l.value), t.value = l.value);
|
|
2842
2842
|
}
|
|
2843
2843
|
return (l, i) => (v(), w("menu", {
|
|
2844
|
-
class:
|
|
2844
|
+
class: W(["sq-menu", a.value])
|
|
2845
2845
|
}, [
|
|
2846
2846
|
n.router ? (v(!0), w(se, { key: 0 }, pe(n.items, (p) => (v(), S(r(en), {
|
|
2847
2847
|
custom: "",
|
|
@@ -2850,13 +2850,13 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2850
2850
|
}, {
|
|
2851
2851
|
default: N(({ navigate: m, isActive: h }) => [
|
|
2852
2852
|
E("li", {
|
|
2853
|
-
class:
|
|
2853
|
+
class: W(["sq-menu-item", { "is-active": h, "is-disabled": p.disabled }]),
|
|
2854
2854
|
onClick: (f) => c(p, m)
|
|
2855
2855
|
}, [
|
|
2856
|
-
|
|
2856
|
+
F(l.$slots, "default", ve({ ref_for: !0 }, p), () => [
|
|
2857
2857
|
p.icon ? (v(), S(fe(p.icon), { key: 0 })) : P("", !0),
|
|
2858
2858
|
E("span", {
|
|
2859
|
-
textContent:
|
|
2859
|
+
textContent: J(r(s)(p))
|
|
2860
2860
|
}, null, 8, Xs),
|
|
2861
2861
|
n.direction === "vertical" ? re((v(), S(r(it), {
|
|
2862
2862
|
key: 1,
|
|
@@ -2871,17 +2871,17 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2871
2871
|
]),
|
|
2872
2872
|
_: 2
|
|
2873
2873
|
}, 1032, ["to"]))), 128)) : (v(!0), w(se, { key: 1 }, pe(n.items, (p) => (v(), w("li", {
|
|
2874
|
-
class:
|
|
2874
|
+
class: W(["sq-menu-item", {
|
|
2875
2875
|
"is-active": t.value === p.value,
|
|
2876
2876
|
"is-disabled": p.disabled
|
|
2877
2877
|
}]),
|
|
2878
2878
|
key: p.value,
|
|
2879
2879
|
onClick: (m) => d(p, m)
|
|
2880
2880
|
}, [
|
|
2881
|
-
|
|
2881
|
+
F(l.$slots, "default", ve({ ref_for: !0 }, p), () => [
|
|
2882
2882
|
p.icon ? (v(), S(fe(p.icon), { key: 0 })) : P("", !0),
|
|
2883
2883
|
E("span", {
|
|
2884
|
-
textContent:
|
|
2884
|
+
textContent: J(r(s)(p))
|
|
2885
2885
|
}, null, 8, Ks),
|
|
2886
2886
|
n.direction === "vertical" ? re((v(), S(r(it), {
|
|
2887
2887
|
key: 1,
|
|
@@ -2908,8 +2908,8 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2908
2908
|
id: {}
|
|
2909
2909
|
},
|
|
2910
2910
|
setup(u, { expose: o }) {
|
|
2911
|
-
const s = u, e = T(!0), n =
|
|
2912
|
-
|
|
2911
|
+
const s = u, e = T(!0), n = y(() => s.type ? Qe[s.type] : void 0);
|
|
2912
|
+
ie(() => {
|
|
2913
2913
|
setTimeout(t, s.closeAfter);
|
|
2914
2914
|
});
|
|
2915
2915
|
function t() {
|
|
@@ -2923,9 +2923,9 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2923
2923
|
}, {
|
|
2924
2924
|
default: N(() => [
|
|
2925
2925
|
re(E("div", {
|
|
2926
|
-
class:
|
|
2926
|
+
class: W(["sq-message", `is-${s.type}`]),
|
|
2927
2927
|
id: s.id,
|
|
2928
|
-
style:
|
|
2928
|
+
style: Z({ top: `${s.offsetTop}px` })
|
|
2929
2929
|
}, [
|
|
2930
2930
|
z(r(xe), { class: "sq-message-inner" }, {
|
|
2931
2931
|
default: N(() => [
|
|
@@ -2935,7 +2935,7 @@ ${ce}${G}`, ne(x.target), y(t.value, we, we);
|
|
|
2935
2935
|
})) : P("", !0),
|
|
2936
2936
|
E("div", {
|
|
2937
2937
|
class: "sq-message-content",
|
|
2938
|
-
textContent:
|
|
2938
|
+
textContent: J(s.message)
|
|
2939
2939
|
}, null, 8, Js)
|
|
2940
2940
|
]),
|
|
2941
2941
|
_: 1
|
|
@@ -2981,10 +2981,10 @@ const Ge = (u = {}) => {
|
|
|
2981
2981
|
};
|
|
2982
2982
|
const c = n.onDestroy;
|
|
2983
2983
|
n.onDestroy = () => {
|
|
2984
|
-
c == null || c(),
|
|
2984
|
+
c == null || c(), Ue(null, t), t.remove(), t = null;
|
|
2985
2985
|
};
|
|
2986
2986
|
const d = z(eo, n);
|
|
2987
|
-
return
|
|
2987
|
+
return Ue(d, t), Te.push({ vm: d }), s.appendChild(t.firstElementChild), {
|
|
2988
2988
|
close: () => {
|
|
2989
2989
|
var l, i;
|
|
2990
2990
|
(i = (l = d.component) == null ? void 0 : l.exposed) == null || i.close();
|
|
@@ -3013,7 +3013,7 @@ const Aa = Ge, ao = ["textContent"], lo = "sq-message-box", io = /* @__PURE__ */
|
|
|
3013
3013
|
},
|
|
3014
3014
|
setup(u, { expose: o }) {
|
|
3015
3015
|
const s = u, e = T(!1);
|
|
3016
|
-
|
|
3016
|
+
ie(() => {
|
|
3017
3017
|
e.value = !0;
|
|
3018
3018
|
});
|
|
3019
3019
|
function n() {
|
|
@@ -3034,7 +3034,7 @@ const Aa = Ge, ao = ["textContent"], lo = "sq-message-box", io = /* @__PURE__ */
|
|
|
3034
3034
|
}, {
|
|
3035
3035
|
default: N(() => [
|
|
3036
3036
|
E("span", {
|
|
3037
|
-
textContent:
|
|
3037
|
+
textContent: J(s.message)
|
|
3038
3038
|
}, null, 8, ao)
|
|
3039
3039
|
]),
|
|
3040
3040
|
_: 1
|
|
@@ -3048,11 +3048,11 @@ const Aa = Ge, ao = ["textContent"], lo = "sq-message-box", io = /* @__PURE__ */
|
|
|
3048
3048
|
...o
|
|
3049
3049
|
}, e = s.onDestroy;
|
|
3050
3050
|
s.onDestroy = () => {
|
|
3051
|
-
e == null || e(),
|
|
3051
|
+
e == null || e(), Ue(null, n), n.remove(), n = null;
|
|
3052
3052
|
};
|
|
3053
3053
|
let n = document.createElement("div");
|
|
3054
3054
|
const t = z(io, s);
|
|
3055
|
-
return
|
|
3055
|
+
return Ue(t, n), {
|
|
3056
3056
|
close: () => {
|
|
3057
3057
|
var a, c;
|
|
3058
3058
|
(c = (a = t.component) == null ? void 0 : a.exposed) == null || c.close();
|
|
@@ -3063,7 +3063,7 @@ const Aa = Ge, ao = ["textContent"], lo = "sq-message-box", io = /* @__PURE__ */
|
|
|
3063
3063
|
}, uo = "sq-pagination-prev", co = /* @__PURE__ */ R({
|
|
3064
3064
|
name: uo,
|
|
3065
3065
|
__name: "pagination-prev",
|
|
3066
|
-
props: /* @__PURE__ */
|
|
3066
|
+
props: /* @__PURE__ */ G({
|
|
3067
3067
|
disabled: { type: Boolean },
|
|
3068
3068
|
size: {},
|
|
3069
3069
|
maxPage: {}
|
|
@@ -3073,10 +3073,10 @@ const Aa = Ge, ao = ["textContent"], lo = "sq-message-box", io = /* @__PURE__ */
|
|
|
3073
3073
|
}),
|
|
3074
3074
|
emits: ["update:current"],
|
|
3075
3075
|
setup(u) {
|
|
3076
|
-
const o = u, s =
|
|
3076
|
+
const o = u, s = le(u, "current"), e = (n) => {
|
|
3077
3077
|
s.value += n;
|
|
3078
3078
|
};
|
|
3079
|
-
return (n, t) => (v(), S(r(
|
|
3079
|
+
return (n, t) => (v(), S(r(ee), {
|
|
3080
3080
|
icon: r(bt),
|
|
3081
3081
|
size: o.size,
|
|
3082
3082
|
disabled: s.value === 1 || o.disabled,
|
|
@@ -3086,7 +3086,7 @@ const Aa = Ge, ao = ["textContent"], lo = "sq-message-box", io = /* @__PURE__ */
|
|
|
3086
3086
|
}), fo = "sq-pagination-next", po = /* @__PURE__ */ R({
|
|
3087
3087
|
name: fo,
|
|
3088
3088
|
__name: "pagination-next",
|
|
3089
|
-
props: /* @__PURE__ */
|
|
3089
|
+
props: /* @__PURE__ */ G({
|
|
3090
3090
|
disabled: { type: Boolean },
|
|
3091
3091
|
size: {},
|
|
3092
3092
|
maxPage: {}
|
|
@@ -3096,10 +3096,10 @@ const Aa = Ge, ao = ["textContent"], lo = "sq-message-box", io = /* @__PURE__ */
|
|
|
3096
3096
|
}),
|
|
3097
3097
|
emits: ["update:current"],
|
|
3098
3098
|
setup(u) {
|
|
3099
|
-
const o = u, s =
|
|
3099
|
+
const o = u, s = le(u, "current"), e = (n) => {
|
|
3100
3100
|
s.value += n;
|
|
3101
3101
|
};
|
|
3102
|
-
return (n, t) => (v(), S(r(
|
|
3102
|
+
return (n, t) => (v(), S(r(ee), {
|
|
3103
3103
|
icon: r(yt),
|
|
3104
3104
|
size: o.size,
|
|
3105
3105
|
disabled: s.value === o.maxPage || o.disabled,
|
|
@@ -3109,7 +3109,7 @@ const Aa = Ge, ao = ["textContent"], lo = "sq-message-box", io = /* @__PURE__ */
|
|
|
3109
3109
|
}), vo = { class: "sq-pagination-pager" }, mo = "sq-pagination-pager", ho = /* @__PURE__ */ R({
|
|
3110
3110
|
name: mo,
|
|
3111
3111
|
__name: "pagination-pager",
|
|
3112
|
-
props: /* @__PURE__ */
|
|
3112
|
+
props: /* @__PURE__ */ G({
|
|
3113
3113
|
disabled: { type: Boolean },
|
|
3114
3114
|
size: {},
|
|
3115
3115
|
list: {}
|
|
@@ -3119,12 +3119,12 @@ const Aa = Ge, ao = ["textContent"], lo = "sq-message-box", io = /* @__PURE__ */
|
|
|
3119
3119
|
}),
|
|
3120
3120
|
emits: ["update:current"],
|
|
3121
3121
|
setup(u) {
|
|
3122
|
-
const o = u, s =
|
|
3122
|
+
const o = u, s = le(u, "current"), e = (n) => {
|
|
3123
3123
|
s.value = n;
|
|
3124
3124
|
};
|
|
3125
3125
|
return (n, t) => (v(), w("div", vo, [
|
|
3126
3126
|
(v(!0), w(se, null, pe(o.list, (a) => (v(), w(se, { key: a }, [
|
|
3127
|
-
a ? (v(), S(r(
|
|
3127
|
+
a ? (v(), S(r(ee), {
|
|
3128
3128
|
key: 0,
|
|
3129
3129
|
type: s.value === a ? "primary" : void 0,
|
|
3130
3130
|
size: o.size,
|
|
@@ -3132,10 +3132,10 @@ const Aa = Ge, ao = ["textContent"], lo = "sq-message-box", io = /* @__PURE__ */
|
|
|
3132
3132
|
onClick: (c) => e(a)
|
|
3133
3133
|
}, {
|
|
3134
3134
|
default: N(() => [
|
|
3135
|
-
Oe(
|
|
3135
|
+
Oe(J(a), 1)
|
|
3136
3136
|
]),
|
|
3137
3137
|
_: 2
|
|
3138
|
-
}, 1032, ["type", "size", "disabled", "onClick"])) : (v(), S(r(
|
|
3138
|
+
}, 1032, ["type", "size", "disabled", "onClick"])) : (v(), S(r(ee), {
|
|
3139
3139
|
key: 1,
|
|
3140
3140
|
icon: r(Zt),
|
|
3141
3141
|
size: o.size,
|
|
@@ -3157,7 +3157,7 @@ const Aa = Ge, ao = ["textContent"], lo = "sq-message-box", io = /* @__PURE__ */
|
|
|
3157
3157
|
size: o.size === "sm" ? "sm" : "md"
|
|
3158
3158
|
}, {
|
|
3159
3159
|
default: N(() => [
|
|
3160
|
-
E("span", null, "共 " +
|
|
3160
|
+
E("span", null, "共 " + J(o.total) + " 条", 1)
|
|
3161
3161
|
]),
|
|
3162
3162
|
_: 1
|
|
3163
3163
|
}, 8, ["size"]));
|
|
@@ -3165,7 +3165,7 @@ const Aa = Ge, ao = ["textContent"], lo = "sq-message-box", io = /* @__PURE__ */
|
|
|
3165
3165
|
}), yo = { class: "sq-pagination" }, xo = "sq-pagination", Ma = /* @__PURE__ */ R({
|
|
3166
3166
|
name: xo,
|
|
3167
3167
|
__name: "pagination",
|
|
3168
|
-
props: /* @__PURE__ */
|
|
3168
|
+
props: /* @__PURE__ */ G({
|
|
3169
3169
|
total: { default: 0 },
|
|
3170
3170
|
disabled: { type: Boolean, default: !1 },
|
|
3171
3171
|
size: {},
|
|
@@ -3179,14 +3179,14 @@ const Aa = Ge, ao = ["textContent"], lo = "sq-message-box", io = /* @__PURE__ */
|
|
|
3179
3179
|
}),
|
|
3180
3180
|
emits: ["update:current", "update:pageSize"],
|
|
3181
3181
|
setup(u) {
|
|
3182
|
-
const o = u, s =
|
|
3182
|
+
const o = u, s = le(u, "current"), e = le(u, "pageSize"), n = y(() => Math.ceil(o.total / e.value) || 1), t = y(() => {
|
|
3183
3183
|
const c = [], d = Math.floor(o.pagerCount / 2) - 1;
|
|
3184
3184
|
let l = s.value - d, i = s.value + d;
|
|
3185
3185
|
l < 2 && (l = 2, i = l + d * 2), i > n.value - 1 && (i = n.value - 1, l = i - d * 2);
|
|
3186
3186
|
for (let p = 1; p <= n.value; p++)
|
|
3187
3187
|
p === 1 || p === n.value || p >= l && p <= i ? c.push(p) : (p === l - 1 || p === i + 1) && c.push(0);
|
|
3188
3188
|
return c;
|
|
3189
|
-
}), a =
|
|
3189
|
+
}), a = y(() => {
|
|
3190
3190
|
const c = o.layout ?? ["prev", "pager", "next"], d = [];
|
|
3191
3191
|
for (const l of c)
|
|
3192
3192
|
switch (l) {
|
|
@@ -3257,7 +3257,7 @@ function rt(u) {
|
|
|
3257
3257
|
const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
3258
3258
|
name: ko,
|
|
3259
3259
|
__name: "popover",
|
|
3260
|
-
props: /* @__PURE__ */
|
|
3260
|
+
props: /* @__PURE__ */ G({
|
|
3261
3261
|
placement: { default: "top" },
|
|
3262
3262
|
offset: {},
|
|
3263
3263
|
teleported: { type: Boolean, default: !0 },
|
|
@@ -3273,51 +3273,51 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3273
3273
|
visible: { type: Boolean, default: !1 },
|
|
3274
3274
|
visibleModifiers: {}
|
|
3275
3275
|
}),
|
|
3276
|
-
emits: /* @__PURE__ */
|
|
3276
|
+
emits: /* @__PURE__ */ G(["openChange"], ["update:visible"]),
|
|
3277
3277
|
setup(u, { emit: o }) {
|
|
3278
3278
|
const { getCssVar: s } = He(), { nextZIndex: e } = et(), n = Ze(), t = parseInt(s("--sq-padding-sm")), a = parseInt(s("--sq-padding-md"));
|
|
3279
3279
|
let c, d, l = !1;
|
|
3280
|
-
const i = o, p = u, m =
|
|
3280
|
+
const i = o, p = u, m = le(u, "visible"), h = T(0), f = T({}), _ = T(!1), $ = ue(null), B = ue(null), M = y(() => {
|
|
3281
3281
|
const C = [];
|
|
3282
3282
|
return p.shadow && C.push("has-shadow"), [C];
|
|
3283
3283
|
});
|
|
3284
|
-
|
|
3284
|
+
ae(m, (C) => {
|
|
3285
3285
|
if (C === l) return;
|
|
3286
3286
|
l = C, k();
|
|
3287
|
-
const
|
|
3287
|
+
const b = C ? p.showAfter : p.hideAfter;
|
|
3288
3288
|
c = setTimeout(() => {
|
|
3289
3289
|
_.value = C;
|
|
3290
|
-
},
|
|
3291
|
-
}),
|
|
3292
|
-
C ? (h.value = e(),
|
|
3290
|
+
}, b);
|
|
3291
|
+
}), ae(_, (C) => {
|
|
3292
|
+
C ? (h.value = e(), ne(), d = tn(
|
|
3293
3293
|
$.value.$el,
|
|
3294
3294
|
B.value,
|
|
3295
|
-
|
|
3295
|
+
ne
|
|
3296
3296
|
)) : d == null || d(), i("openChange", C);
|
|
3297
|
-
}),
|
|
3298
|
-
|
|
3297
|
+
}), ie(() => {
|
|
3298
|
+
ne();
|
|
3299
3299
|
}), ye(() => {
|
|
3300
|
-
k(), document.removeEventListener("click",
|
|
3300
|
+
k(), document.removeEventListener("click", te);
|
|
3301
3301
|
});
|
|
3302
3302
|
function I() {
|
|
3303
|
-
p.trigger !== "hover" || p.disabled ||
|
|
3303
|
+
p.trigger !== "hover" || p.disabled || j(!1);
|
|
3304
3304
|
}
|
|
3305
3305
|
function L() {
|
|
3306
|
-
p.trigger === "hover" &&
|
|
3306
|
+
p.trigger === "hover" && te();
|
|
3307
3307
|
}
|
|
3308
|
-
function
|
|
3309
|
-
p.trigger === "click" && !p.disabled && !m.value && (C.stopPropagation(),
|
|
3308
|
+
function V(C) {
|
|
3309
|
+
p.trigger === "click" && !p.disabled && !m.value && (C.stopPropagation(), j());
|
|
3310
3310
|
}
|
|
3311
|
-
function
|
|
3312
|
-
m.value = !0, C && document.addEventListener("click",
|
|
3311
|
+
function j(C = !0) {
|
|
3312
|
+
m.value = !0, C && document.addEventListener("click", te);
|
|
3313
3313
|
}
|
|
3314
|
-
function
|
|
3315
|
-
m.value = !1, document.removeEventListener("click",
|
|
3314
|
+
function te() {
|
|
3315
|
+
m.value = !1, document.removeEventListener("click", te);
|
|
3316
3316
|
}
|
|
3317
|
-
async function
|
|
3318
|
-
var O,
|
|
3319
|
-
const C = typeof ((O = $.value) == null ? void 0 : O.$el.getBoundingClientRect),
|
|
3320
|
-
if (C !== "function" ||
|
|
3317
|
+
async function ne() {
|
|
3318
|
+
var O, H;
|
|
3319
|
+
const C = typeof ((O = $.value) == null ? void 0 : O.$el.getBoundingClientRect), b = typeof ((H = B.value) == null ? void 0 : H.getBoundingClientRect);
|
|
3320
|
+
if (C !== "function" || b !== "function") return;
|
|
3321
3321
|
const x = await nn($.value.$el, B.value, {
|
|
3322
3322
|
placement: p.placement,
|
|
3323
3323
|
middleware: [
|
|
@@ -3334,18 +3334,18 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3334
3334
|
function k() {
|
|
3335
3335
|
c && (clearTimeout(c), c = void 0);
|
|
3336
3336
|
}
|
|
3337
|
-
return (C,
|
|
3337
|
+
return (C, b) => (v(), w(se, null, [
|
|
3338
3338
|
z(r($o), {
|
|
3339
|
-
class:
|
|
3340
|
-
style:
|
|
3339
|
+
class: W(["sq-popover-trigger", r(n).class]),
|
|
3340
|
+
style: Z(r(n).style),
|
|
3341
3341
|
ref_key: "triggerRef",
|
|
3342
3342
|
ref: $,
|
|
3343
3343
|
onMouseenter: I,
|
|
3344
3344
|
onMouseleave: L,
|
|
3345
|
-
onClick:
|
|
3345
|
+
onClick: V
|
|
3346
3346
|
}, {
|
|
3347
3347
|
default: N(() => [
|
|
3348
|
-
|
|
3348
|
+
F(C.$slots, "reference")
|
|
3349
3349
|
]),
|
|
3350
3350
|
_: 3
|
|
3351
3351
|
}, 8, ["class", "style"]),
|
|
@@ -3358,14 +3358,14 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3358
3358
|
}, {
|
|
3359
3359
|
default: N(() => [
|
|
3360
3360
|
re(E("div", {
|
|
3361
|
-
class:
|
|
3362
|
-
style:
|
|
3361
|
+
class: W(["sq-popover", [M.value, p.popoverClass]]),
|
|
3362
|
+
style: Z([{ ...f.value, zIndex: h.value }, p.popoverStyle]),
|
|
3363
3363
|
ref_key: "popverRef",
|
|
3364
3364
|
ref: B,
|
|
3365
|
-
onClick:
|
|
3365
|
+
onClick: b[0] || (b[0] = be(() => {
|
|
3366
3366
|
}, ["stop"]))
|
|
3367
3367
|
}, [
|
|
3368
|
-
|
|
3368
|
+
F(C.$slots, "default")
|
|
3369
3369
|
], 6), [
|
|
3370
3370
|
[he, _.value]
|
|
3371
3371
|
])
|
|
@@ -3392,13 +3392,13 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3392
3392
|
label: { type: Boolean, default: !0 }
|
|
3393
3393
|
},
|
|
3394
3394
|
setup(u) {
|
|
3395
|
-
const o = new ResizeObserver(l), s = u, e = T(100), n = ue(null), t =
|
|
3395
|
+
const o = new ResizeObserver(l), s = u, e = T(100), n = ue(null), t = y(() => {
|
|
3396
3396
|
const i = [];
|
|
3397
3397
|
return s.color || i.push(`is-${s.type}`), s.variant && i.push(`is-${s.variant}`), i;
|
|
3398
|
-
}), a =
|
|
3398
|
+
}), a = y(() => {
|
|
3399
3399
|
const i = s.max - s.min;
|
|
3400
3400
|
return (s.value - s.min) * 100 / i;
|
|
3401
|
-
}), c =
|
|
3401
|
+
}), c = y(() => `${Math.round(a.value * 10) / 10} %`), d = y(() => {
|
|
3402
3402
|
const i = {};
|
|
3403
3403
|
if (i["--progress-stroke"] = `${s.stroke}px`, !s.variant)
|
|
3404
3404
|
i["--progress-value"] = `${a.value}%`;
|
|
@@ -3412,7 +3412,7 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3412
3412
|
}
|
|
3413
3413
|
return i;
|
|
3414
3414
|
});
|
|
3415
|
-
|
|
3415
|
+
ie(() => {
|
|
3416
3416
|
o.observe(n.value);
|
|
3417
3417
|
}), ye(() => {
|
|
3418
3418
|
o.disconnect();
|
|
@@ -3421,10 +3421,10 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3421
3421
|
e.value = n.value.getBoundingClientRect().width;
|
|
3422
3422
|
}
|
|
3423
3423
|
return (i, p) => (v(), w("div", {
|
|
3424
|
-
class:
|
|
3424
|
+
class: W(["sq-progress", t.value]),
|
|
3425
3425
|
ref_key: "progressRef",
|
|
3426
3426
|
ref: n,
|
|
3427
|
-
style:
|
|
3427
|
+
style: Z(d.value)
|
|
3428
3428
|
}, [
|
|
3429
3429
|
s.variant === "circle" ? (v(), w(se, { key: 0 }, [
|
|
3430
3430
|
p[0] || (p[0] = E("svg", {
|
|
@@ -3444,9 +3444,9 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3444
3444
|
})
|
|
3445
3445
|
], -1)),
|
|
3446
3446
|
s.label ? (v(), w("div", wo, [
|
|
3447
|
-
|
|
3447
|
+
F(i.$slots, "default", { percentage: a.value }, () => [
|
|
3448
3448
|
E("span", {
|
|
3449
|
-
textContent:
|
|
3449
|
+
textContent: J(c.value)
|
|
3450
3450
|
}, null, 8, qo)
|
|
3451
3451
|
])
|
|
3452
3452
|
])) : P("", !0)
|
|
@@ -3459,7 +3459,7 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3459
3459
|
}, zo = ["textContent"], Ro = "sq-radio", Lo = /* @__PURE__ */ R({
|
|
3460
3460
|
name: Ro,
|
|
3461
3461
|
__name: "radio",
|
|
3462
|
-
props: /* @__PURE__ */
|
|
3462
|
+
props: /* @__PURE__ */ G({
|
|
3463
3463
|
form: {},
|
|
3464
3464
|
name: {},
|
|
3465
3465
|
disabled: { type: Boolean, default: void 0 },
|
|
@@ -3472,7 +3472,7 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3472
3472
|
checked: { type: Boolean, default: !1 },
|
|
3473
3473
|
checkedModifiers: {}
|
|
3474
3474
|
}),
|
|
3475
|
-
emits: /* @__PURE__ */
|
|
3475
|
+
emits: /* @__PURE__ */ G(["change"], ["update:checked"]),
|
|
3476
3476
|
setup(u, { emit: o }) {
|
|
3477
3477
|
const s = o, e = u, {
|
|
3478
3478
|
radioSize: n,
|
|
@@ -3481,23 +3481,23 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3481
3481
|
radioName: c,
|
|
3482
3482
|
radioVariant: d,
|
|
3483
3483
|
groupContext: l
|
|
3484
|
-
} = zn(e), i = T(), p =
|
|
3484
|
+
} = zn(e), i = T(), p = le(u, "checked"), m = y(() => {
|
|
3485
3485
|
const f = [], _ = r(n), $ = r(t), B = r(d);
|
|
3486
3486
|
return _ !== "md" && f.push(`sq-selection--${_}`), h.value && f.push("is-checked"), $ && f.push("is-disabled"), B && f.push(`is-${B}`), f;
|
|
3487
|
-
}), h =
|
|
3488
|
-
return
|
|
3487
|
+
}), h = y(() => l ? r(l).checked === e.value : p.value);
|
|
3488
|
+
return ae(i, (f) => {
|
|
3489
3489
|
p.value = f === e.value;
|
|
3490
|
-
}),
|
|
3490
|
+
}), ae(h, (f) => {
|
|
3491
3491
|
if (f ? i.value = e.value ?? "on" : i.value = void 0, p.value !== f) {
|
|
3492
3492
|
p.value = f;
|
|
3493
3493
|
return;
|
|
3494
3494
|
}
|
|
3495
|
-
}),
|
|
3495
|
+
}), ae(p, (f) => {
|
|
3496
3496
|
h.value !== f && l && l.value.toggleItem(e.value);
|
|
3497
|
-
}),
|
|
3497
|
+
}), ie(() => {
|
|
3498
3498
|
p.value = h.value, i.value = p.value ? e.value ?? "on" : void 0;
|
|
3499
3499
|
}), (f, _) => (v(), w("label", {
|
|
3500
|
-
class:
|
|
3500
|
+
class: W(["sq-selection sq-radio", m.value])
|
|
3501
3501
|
}, [
|
|
3502
3502
|
re(E("input", {
|
|
3503
3503
|
type: "radio",
|
|
@@ -3515,7 +3515,7 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3515
3515
|
e.label ? (v(), w("span", {
|
|
3516
3516
|
key: 1,
|
|
3517
3517
|
class: "sq-selection-label",
|
|
3518
|
-
textContent:
|
|
3518
|
+
textContent: J(e.label)
|
|
3519
3519
|
}, null, 8, zo)) : P("", !0)
|
|
3520
3520
|
], 2));
|
|
3521
3521
|
}
|
|
@@ -3533,7 +3533,7 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3533
3533
|
},
|
|
3534
3534
|
emits: ["change", "update:value"],
|
|
3535
3535
|
setup(u, { emit: o }) {
|
|
3536
|
-
const { nextId: s } = Fe(), { getText: e } = Ae(), n = o, t = u, a = T(t.value), c =
|
|
3536
|
+
const { nextId: s } = Fe(), { getText: e } = Ae(), n = o, t = u, a = T(t.value), c = y(() => t.name ?? `sq-radio-${s()}`), d = y(() => t.items.map((i) => typeof i == "string" ? {
|
|
3537
3537
|
text: i,
|
|
3538
3538
|
value: i
|
|
3539
3539
|
} : typeof i == "number" ? {
|
|
@@ -3551,7 +3551,7 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3551
3551
|
checked: a,
|
|
3552
3552
|
toggleItem: l
|
|
3553
3553
|
})
|
|
3554
|
-
),
|
|
3554
|
+
), ae(
|
|
3555
3555
|
() => t.value,
|
|
3556
3556
|
(i) => {
|
|
3557
3557
|
i !== a.value && (a.value = i);
|
|
@@ -3561,7 +3561,7 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3561
3561
|
a.value = i, n("change", a.value), n("update:value", a.value);
|
|
3562
3562
|
}
|
|
3563
3563
|
return (i, p) => (v(), w("div", Io, [
|
|
3564
|
-
|
|
3564
|
+
F(i.$slots, "default", {}, () => [
|
|
3565
3565
|
(v(!0), w(se, null, pe(d.value, (m, h) => (v(), S(r(Lo), {
|
|
3566
3566
|
key: h,
|
|
3567
3567
|
disabled: m.disabled === !0,
|
|
@@ -3574,7 +3574,7 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3574
3574
|
}), St = Symbol("radio-group-context-keys"), Mo = "sq-segmented", Po = /* @__PURE__ */ R({
|
|
3575
3575
|
name: Mo,
|
|
3576
3576
|
__name: "segmented",
|
|
3577
|
-
props: /* @__PURE__ */
|
|
3577
|
+
props: /* @__PURE__ */ G({
|
|
3578
3578
|
name: {},
|
|
3579
3579
|
size: { default: "md" },
|
|
3580
3580
|
disabled: { type: Boolean, default: void 0 },
|
|
@@ -3584,18 +3584,18 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3584
3584
|
value: { default: "" },
|
|
3585
3585
|
valueModifiers: {}
|
|
3586
3586
|
}),
|
|
3587
|
-
emits: /* @__PURE__ */
|
|
3587
|
+
emits: /* @__PURE__ */ G(["change", "update:value"], ["update:value"]),
|
|
3588
3588
|
setup(u, { emit: o }) {
|
|
3589
|
-
const { nextId: s } = Fe(), e = o, n = u, t = T(), a = T(), c =
|
|
3589
|
+
const { nextId: s } = Fe(), e = o, n = u, t = T(), a = T(), c = le(u, "value"), d = y(() => n.items.map((f) => typeof f == "string" ? {
|
|
3590
3590
|
text: f,
|
|
3591
3591
|
value: f
|
|
3592
|
-
} : f)), l =
|
|
3592
|
+
} : f)), l = y(() => {
|
|
3593
3593
|
const f = [];
|
|
3594
3594
|
return n.size !== "md" && f.push(`sq-segmented--${n.size}`), n.round && f.push("is-round"), f;
|
|
3595
|
-
}), i =
|
|
3595
|
+
}), i = y(() => {
|
|
3596
3596
|
const f = {};
|
|
3597
3597
|
return t.value && (f.width = `${t.value}px`), a.value && (f.left = `${a.value}px`), f;
|
|
3598
|
-
}), p =
|
|
3598
|
+
}), p = y(() => n.name ?? `sq-segmented-${s()}`);
|
|
3599
3599
|
Ce(
|
|
3600
3600
|
Bt,
|
|
3601
3601
|
T({
|
|
@@ -3606,7 +3606,7 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3606
3606
|
toggleItem: m,
|
|
3607
3607
|
updateThumb: h
|
|
3608
3608
|
})
|
|
3609
|
-
),
|
|
3609
|
+
), ie(() => {
|
|
3610
3610
|
var f;
|
|
3611
3611
|
c.value || (c.value = (f = d.value[0]) == null ? void 0 : f.value);
|
|
3612
3612
|
});
|
|
@@ -3617,13 +3617,13 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3617
3617
|
a.value = f == null ? void 0 : f.offsetLeft, t.value = f == null ? void 0 : f.clientWidth;
|
|
3618
3618
|
}
|
|
3619
3619
|
return (f, _) => (v(), w("div", {
|
|
3620
|
-
class:
|
|
3620
|
+
class: W(["sq-segmented", l.value])
|
|
3621
3621
|
}, [
|
|
3622
3622
|
E("div", {
|
|
3623
3623
|
class: "sq-segmented-thumb",
|
|
3624
|
-
style:
|
|
3624
|
+
style: Z(i.value)
|
|
3625
3625
|
}, null, 4),
|
|
3626
|
-
|
|
3626
|
+
F(f.$slots, "default", {}, () => [
|
|
3627
3627
|
(v(!0), w(se, null, pe(d.value, ($) => (v(), S(r(No), ve({
|
|
3628
3628
|
key: $.value
|
|
3629
3629
|
}, { ref_for: !0 }, $), null, 16))), 128))
|
|
@@ -3640,16 +3640,16 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3640
3640
|
disabled: { type: Boolean }
|
|
3641
3641
|
},
|
|
3642
3642
|
setup(u) {
|
|
3643
|
-
const o = u, { segmentedDisabled: s, parentContext: e } = Rn(o), { getText: n } = Ae(), t = T(), a = ue(null), c =
|
|
3643
|
+
const o = u, { segmentedDisabled: s, parentContext: e } = Rn(o), { getText: n } = Ae(), t = T(), a = ue(null), c = y(() => {
|
|
3644
3644
|
const p = [], m = r(s);
|
|
3645
3645
|
return d.value && p.push("is-active"), m && p.push("is-disabled"), p;
|
|
3646
|
-
}), d =
|
|
3647
|
-
|
|
3646
|
+
}), d = y(() => r(e).active === o.value), l = y(() => r(e).size !== "sm" ? "md" : "sm");
|
|
3647
|
+
ae(d, (p) => {
|
|
3648
3648
|
if (p) {
|
|
3649
3649
|
if (t.value = o.value ?? "on", !e) return;
|
|
3650
3650
|
e.value.updateThumb(a.value);
|
|
3651
3651
|
} else t.value = void 0;
|
|
3652
|
-
}),
|
|
3652
|
+
}), ie(() => {
|
|
3653
3653
|
t.value = d.value ? o.value ?? "on" : void 0, !(!d.value || !e) && e.value.updateThumb(a.value);
|
|
3654
3654
|
});
|
|
3655
3655
|
function i() {
|
|
@@ -3658,7 +3658,7 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3658
3658
|
return (p, m) => {
|
|
3659
3659
|
var h;
|
|
3660
3660
|
return v(), w("label", {
|
|
3661
|
-
class:
|
|
3661
|
+
class: W(["sq-segmented-item", c.value]),
|
|
3662
3662
|
ref_key: "itemRef",
|
|
3663
3663
|
ref: a
|
|
3664
3664
|
}, [
|
|
@@ -3672,11 +3672,11 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3672
3672
|
}, null, 40, Do), [
|
|
3673
3673
|
[dt, t.value]
|
|
3674
3674
|
]),
|
|
3675
|
-
|
|
3675
|
+
F(p.$slots, "default", {}, () => [
|
|
3676
3676
|
z(r(xe), { size: l.value }, {
|
|
3677
3677
|
default: N(() => [
|
|
3678
3678
|
o.icon ? (v(), S(fe(o.icon), { key: 0 })) : P("", !0),
|
|
3679
|
-
Oe(" " +
|
|
3679
|
+
Oe(" " + J(r(n)(o)), 1)
|
|
3680
3680
|
]),
|
|
3681
3681
|
_: 1
|
|
3682
3682
|
}, 8, ["size"])
|
|
@@ -3686,7 +3686,7 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3686
3686
|
}
|
|
3687
3687
|
}), Bt = Symbol(
|
|
3688
3688
|
"segmented-context-keys"
|
|
3689
|
-
),
|
|
3689
|
+
), Uo = ["textContent"], Vo = /* @__PURE__ */ R({
|
|
3690
3690
|
__name: "select-item",
|
|
3691
3691
|
props: {
|
|
3692
3692
|
value: {},
|
|
@@ -3694,27 +3694,27 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3694
3694
|
disabled: { type: Boolean }
|
|
3695
3695
|
},
|
|
3696
3696
|
setup(u) {
|
|
3697
|
-
const { parentContext: o } = Ln(), s = u, { getText: e } = Ae(), n =
|
|
3697
|
+
const { parentContext: o } = Ln(), s = u, { getText: e } = Ae(), n = y(() => {
|
|
3698
3698
|
const c = [];
|
|
3699
3699
|
return t.value && c.push("is-active"), s.disabled && c.push("is-disabled"), c;
|
|
3700
|
-
}), t =
|
|
3700
|
+
}), t = y(() => r(o).active === s.value);
|
|
3701
3701
|
function a(c) {
|
|
3702
3702
|
!o || c.disabled || t.value || o.value.toggleItem(s.value);
|
|
3703
3703
|
}
|
|
3704
3704
|
return (c, d) => (v(), w("li", {
|
|
3705
|
-
class:
|
|
3705
|
+
class: W(n.value),
|
|
3706
3706
|
onClick: d[0] || (d[0] = (l) => a(s))
|
|
3707
3707
|
}, [
|
|
3708
3708
|
E("span", {
|
|
3709
|
-
textContent:
|
|
3710
|
-
}, null, 8,
|
|
3709
|
+
textContent: J(r(e)(s))
|
|
3710
|
+
}, null, 8, Uo),
|
|
3711
3711
|
t.value ? (v(), S(r(mt), { key: 0 })) : P("", !0)
|
|
3712
3712
|
], 2));
|
|
3713
3713
|
}
|
|
3714
3714
|
}), Fo = ["textContent"], Ho = "sq-select", jo = /* @__PURE__ */ R({
|
|
3715
3715
|
name: Ho,
|
|
3716
3716
|
__name: "select",
|
|
3717
|
-
props: /* @__PURE__ */
|
|
3717
|
+
props: /* @__PURE__ */ G({
|
|
3718
3718
|
status: {},
|
|
3719
3719
|
round: { type: Boolean, default: void 0 },
|
|
3720
3720
|
prefixIcon: {},
|
|
@@ -3731,11 +3731,11 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3731
3731
|
value: { default: "" },
|
|
3732
3732
|
valueModifiers: {}
|
|
3733
3733
|
}),
|
|
3734
|
-
emits: /* @__PURE__ */
|
|
3734
|
+
emits: /* @__PURE__ */ G(["focus", "blur", "select", "clear"], ["update:value"]),
|
|
3735
3735
|
setup(u, { emit: o }) {
|
|
3736
3736
|
const { getText: s } = Ae();
|
|
3737
3737
|
let e = "";
|
|
3738
|
-
const n = o, t = u, a = T(!1), c = T(), d = T(""), l = ue(null), i =
|
|
3738
|
+
const n = o, t = u, a = T(!1), c = T(), d = T(""), l = ue(null), i = le(u, "value"), p = y(() => t.items.map((L) => typeof L == "string" ? {
|
|
3739
3739
|
text: L,
|
|
3740
3740
|
value: L
|
|
3741
3741
|
} : L));
|
|
@@ -3745,22 +3745,22 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3745
3745
|
active: i,
|
|
3746
3746
|
toggleItem: h
|
|
3747
3747
|
})
|
|
3748
|
-
),
|
|
3748
|
+
), ae(a, () => {
|
|
3749
3749
|
e = d.value;
|
|
3750
|
-
}),
|
|
3750
|
+
}), ae(i, f), ie(() => {
|
|
3751
3751
|
f();
|
|
3752
3752
|
});
|
|
3753
3753
|
function m(L) {
|
|
3754
|
-
var
|
|
3754
|
+
var j;
|
|
3755
3755
|
if (!L || typeof c.value < "u") return;
|
|
3756
|
-
const
|
|
3757
|
-
c.value =
|
|
3756
|
+
const V = (j = l.value) == null ? void 0 : j.$el;
|
|
3757
|
+
c.value = V.getBoundingClientRect().width;
|
|
3758
3758
|
}
|
|
3759
3759
|
function h(L) {
|
|
3760
3760
|
a.value && (i.value = L, a.value = !1, n("select", L));
|
|
3761
3761
|
}
|
|
3762
3762
|
function f() {
|
|
3763
|
-
const L = p.value.find((
|
|
3763
|
+
const L = p.value.find((V) => V.value === i.value);
|
|
3764
3764
|
if (!L) {
|
|
3765
3765
|
d.value = "";
|
|
3766
3766
|
return;
|
|
@@ -3782,8 +3782,8 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3782
3782
|
function I() {
|
|
3783
3783
|
d.value = e;
|
|
3784
3784
|
}
|
|
3785
|
-
return (L,
|
|
3786
|
-
class:
|
|
3785
|
+
return (L, V) => (v(), S(r(Ct), {
|
|
3786
|
+
class: W(["sq-select", { "dropdown-opened": a.value }]),
|
|
3787
3787
|
placement: "bottom-start",
|
|
3788
3788
|
trigger: "manual",
|
|
3789
3789
|
"popover-class": "sq-select-dropdown",
|
|
@@ -3791,13 +3791,13 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3791
3791
|
"hide-after": 100,
|
|
3792
3792
|
"popover-style": { width: `${c.value}px` },
|
|
3793
3793
|
visible: a.value,
|
|
3794
|
-
"onUpdate:visible":
|
|
3794
|
+
"onUpdate:visible": V[3] || (V[3] = (j) => a.value = j),
|
|
3795
3795
|
onOpenChange: m
|
|
3796
3796
|
}, {
|
|
3797
3797
|
reference: N(() => [
|
|
3798
3798
|
z(r(nt), {
|
|
3799
3799
|
value: d.value,
|
|
3800
|
-
"onUpdate:value":
|
|
3800
|
+
"onUpdate:value": V[0] || (V[0] = (j) => d.value = j),
|
|
3801
3801
|
disabled: t.disabled,
|
|
3802
3802
|
placeholder: t.placeholder,
|
|
3803
3803
|
"prefix-icon": t.prefixIcon,
|
|
@@ -3821,17 +3821,17 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3821
3821
|
default: N(() => [
|
|
3822
3822
|
p.value.length ? (v(), w("menu", {
|
|
3823
3823
|
key: 1,
|
|
3824
|
-
onMousedown:
|
|
3824
|
+
onMousedown: V[2] || (V[2] = be(() => {
|
|
3825
3825
|
}, ["prevent"]))
|
|
3826
3826
|
}, [
|
|
3827
|
-
(v(!0), w(se, null, pe(p.value, (
|
|
3828
|
-
key:
|
|
3829
|
-
}, { ref_for: !0 },
|
|
3827
|
+
(v(!0), w(se, null, pe(p.value, (j) => (v(), S(Vo, ve({
|
|
3828
|
+
key: j.value
|
|
3829
|
+
}, { ref_for: !0 }, j), null, 16))), 128))
|
|
3830
3830
|
], 32)) : (v(), w("div", {
|
|
3831
3831
|
key: 0,
|
|
3832
3832
|
class: "sq-select-dropdown-empty",
|
|
3833
|
-
textContent:
|
|
3834
|
-
onMousedown:
|
|
3833
|
+
textContent: J(t.emptyText),
|
|
3834
|
+
onMousedown: V[1] || (V[1] = be(() => {
|
|
3835
3835
|
}, ["prevent", "stop"]))
|
|
3836
3836
|
}, null, 40, Fo))
|
|
3837
3837
|
]),
|
|
@@ -3843,7 +3843,7 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3843
3843
|
), Wo = "sq-swipe", Pa = /* @__PURE__ */ R({
|
|
3844
3844
|
name: Wo,
|
|
3845
3845
|
__name: "swipe",
|
|
3846
|
-
props: /* @__PURE__ */
|
|
3846
|
+
props: /* @__PURE__ */ G({
|
|
3847
3847
|
direction: { default: "horizontal" },
|
|
3848
3848
|
topSrc: {},
|
|
3849
3849
|
bottomSrc: {},
|
|
@@ -3857,67 +3857,72 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3857
3857
|
},
|
|
3858
3858
|
valueModifiers: {}
|
|
3859
3859
|
}),
|
|
3860
|
-
emits: /* @__PURE__ */
|
|
3860
|
+
emits: /* @__PURE__ */ G(["change"], ["update:value"]),
|
|
3861
3861
|
setup(u, { emit: o }) {
|
|
3862
3862
|
const { getCssVar: s } = He(), e = { x: 0, y: 0 }, n = s("--sq-component-size-md"), t = parseInt(n), a = t / 2;
|
|
3863
3863
|
let c = !1, d = 0, l = [0, 0];
|
|
3864
|
-
const i = o, p = u, m = T(0), h = ue(null), f =
|
|
3865
|
-
const
|
|
3866
|
-
return
|
|
3867
|
-
}), B =
|
|
3864
|
+
const i = o, p = u, m = T(0), h = ue(null), f = le(u, "value"), _ = y(() => [`sq-swipe-${p.direction}`]), $ = y(() => {
|
|
3865
|
+
const k = {}, C = p.direction === "horizontal" ? "left" : "top";
|
|
3866
|
+
return k[C] = `${m.value}px`, k;
|
|
3867
|
+
}), B = y(
|
|
3868
3868
|
() => p.direction === "horizontal" ? "right" : "bottom"
|
|
3869
|
-
), M =
|
|
3869
|
+
), M = y(() => p.disabled ? void 0 : `linear-gradient(${[
|
|
3870
3870
|
`to ${B.value}`,
|
|
3871
3871
|
`#000 ${m.value}px`,
|
|
3872
3872
|
`transparent ${m.value + 1}px`
|
|
3873
|
-
].join(",")})`), I =
|
|
3873
|
+
].join(",")})`), I = y(() => p.disabled ? void 0 : `linear-gradient(${[
|
|
3874
3874
|
`to ${B.value}`,
|
|
3875
3875
|
`transparent ${m.value}px`,
|
|
3876
3876
|
`#000 ${m.value + 1}px`
|
|
3877
3877
|
].join(",")})`);
|
|
3878
|
-
|
|
3879
|
-
|
|
3878
|
+
ae(f, () => {
|
|
3879
|
+
c || L();
|
|
3880
|
+
}), ie(() => {
|
|
3881
|
+
L(), document.addEventListener("pointermove", te), document.addEventListener("pointerup", j);
|
|
3882
|
+
}), ye(() => {
|
|
3883
|
+
document.removeEventListener("pointermove", te), document.removeEventListener("pointerup", j);
|
|
3884
|
+
});
|
|
3885
|
+
function L() {
|
|
3886
|
+
const k = h.value.getBoundingClientRect(), C = f.value >= 0 && f.value <= 1 ? f.value : 0.5;
|
|
3880
3887
|
if (p.direction === "horizontal") {
|
|
3881
|
-
l = [a,
|
|
3882
|
-
const
|
|
3883
|
-
m.value = a +
|
|
3888
|
+
l = [a, k.width - a];
|
|
3889
|
+
const b = (k.width - t) * C;
|
|
3890
|
+
m.value = a + b;
|
|
3884
3891
|
} else {
|
|
3885
|
-
l = [a,
|
|
3886
|
-
const
|
|
3887
|
-
m.value = a +
|
|
3892
|
+
l = [a, k.height - a];
|
|
3893
|
+
const b = (k.height - t) * C;
|
|
3894
|
+
m.value = a + b;
|
|
3888
3895
|
}
|
|
3889
|
-
d = m.value
|
|
3890
|
-
}), ye(() => {
|
|
3891
|
-
document.removeEventListener("pointermove", W), document.removeEventListener("pointerup", U);
|
|
3892
|
-
});
|
|
3893
|
-
function L(F) {
|
|
3894
|
-
c = !0, e.x = F.x, e.y = F.y;
|
|
3896
|
+
d = m.value;
|
|
3895
3897
|
}
|
|
3896
|
-
function
|
|
3898
|
+
function V(k) {
|
|
3899
|
+
c = !0, e.x = k.x, e.y = k.y;
|
|
3900
|
+
}
|
|
3901
|
+
function j() {
|
|
3897
3902
|
c = !1;
|
|
3898
3903
|
}
|
|
3899
|
-
function
|
|
3900
|
-
c && ne(
|
|
3904
|
+
function te(k) {
|
|
3905
|
+
c && ne(k.x, k.y);
|
|
3901
3906
|
}
|
|
3902
|
-
function ne(
|
|
3903
|
-
let
|
|
3904
|
-
p.direction === "horizontal" ? (
|
|
3905
|
-
const [
|
|
3906
|
-
d -=
|
|
3907
|
-
const
|
|
3908
|
-
d <
|
|
3907
|
+
function ne(k, C) {
|
|
3908
|
+
let b = 0;
|
|
3909
|
+
p.direction === "horizontal" ? (b = e.x - k, e.x = k) : (b = e.y - C, e.y = C);
|
|
3910
|
+
const [x, g] = l;
|
|
3911
|
+
d -= b;
|
|
3912
|
+
const q = m.value;
|
|
3913
|
+
d < x ? m.value = x : d > g ? m.value = g : m.value = d, q !== m.value && (f.value = (m.value - a) / (g - x), i("change", m.value / (g + a)));
|
|
3909
3914
|
}
|
|
3910
|
-
return (
|
|
3911
|
-
class:
|
|
3915
|
+
return (k, C) => (v(), w("div", {
|
|
3916
|
+
class: W(["sq-swipe", _.value]),
|
|
3912
3917
|
ref_key: "swipeRef",
|
|
3913
3918
|
ref: h
|
|
3914
3919
|
}, [
|
|
3915
|
-
|
|
3920
|
+
F(k.$slots, "default", {}, () => [
|
|
3916
3921
|
E("div", {
|
|
3917
3922
|
class: "sq-swipe-top",
|
|
3918
|
-
style:
|
|
3923
|
+
style: Z({ mask: M.value })
|
|
3919
3924
|
}, [
|
|
3920
|
-
|
|
3925
|
+
F(k.$slots, "top", {}, () => [
|
|
3921
3926
|
p.topSrc ? (v(), S(r(Ke), {
|
|
3922
3927
|
key: 0,
|
|
3923
3928
|
src: p.topSrc,
|
|
@@ -3927,9 +3932,9 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3927
3932
|
], 4),
|
|
3928
3933
|
E("div", {
|
|
3929
3934
|
class: "sq-swipe-bottom",
|
|
3930
|
-
style:
|
|
3935
|
+
style: Z({ mask: I.value })
|
|
3931
3936
|
}, [
|
|
3932
|
-
|
|
3937
|
+
F(k.$slots, "bottom", {}, () => [
|
|
3933
3938
|
p.bottomSrc ? (v(), S(r(Ke), {
|
|
3934
3939
|
key: 0,
|
|
3935
3940
|
src: p.bottomSrc,
|
|
@@ -3940,11 +3945,11 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3940
3945
|
]),
|
|
3941
3946
|
re(E("div", {
|
|
3942
3947
|
class: "sq-swipe-separator",
|
|
3943
|
-
style:
|
|
3948
|
+
style: Z($.value)
|
|
3944
3949
|
}, [
|
|
3945
3950
|
E("button", {
|
|
3946
3951
|
class: "sq-swipe-slider",
|
|
3947
|
-
onPointerdown:
|
|
3952
|
+
onPointerdown: V
|
|
3948
3953
|
}, null, 32)
|
|
3949
3954
|
], 4), [
|
|
3950
3955
|
[he, !p.disabled]
|
|
@@ -3954,7 +3959,7 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3954
3959
|
}), Xo = ["id", "autofocus", "name", "form", "disabled"], Yo = { class: "sq-switch-track" }, Ko = { class: "sq-switch-thumb" }, Go = "sq-switch", Zo = /* @__PURE__ */ R({
|
|
3955
3960
|
name: Go,
|
|
3956
3961
|
__name: "switch",
|
|
3957
|
-
props: /* @__PURE__ */
|
|
3962
|
+
props: /* @__PURE__ */ G({
|
|
3958
3963
|
form: {},
|
|
3959
3964
|
name: {},
|
|
3960
3965
|
disabled: { type: Boolean },
|
|
@@ -3966,14 +3971,14 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3966
3971
|
checked: { type: Boolean, default: !1 },
|
|
3967
3972
|
checkedModifiers: {}
|
|
3968
3973
|
}),
|
|
3969
|
-
emits: /* @__PURE__ */
|
|
3974
|
+
emits: /* @__PURE__ */ G(["change", "click"], ["update:checked"]),
|
|
3970
3975
|
setup(u, { emit: o }) {
|
|
3971
|
-
const s = o, e = u, { switchSize: n, switchDisabled: t, id: a } = In(e), c =
|
|
3976
|
+
const s = o, e = u, { switchSize: n, switchDisabled: t, id: a } = In(e), c = le(u, "checked"), d = y(() => {
|
|
3972
3977
|
const l = [], i = r(n), p = r(t);
|
|
3973
3978
|
return i !== "md" && l.push(`sq-switch--${i}`), c.value && l.push("is-checked"), (p || e.loading) && l.push("is-disabled"), e.variant && l.push(`is-${e.variant}`), l;
|
|
3974
3979
|
});
|
|
3975
3980
|
return (l, i) => (v(), w("label", {
|
|
3976
|
-
class:
|
|
3981
|
+
class: W(["sq-switch", d.value])
|
|
3977
3982
|
}, [
|
|
3978
3983
|
re(E("input", {
|
|
3979
3984
|
type: "checkbox",
|
|
@@ -3990,7 +3995,7 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
3990
3995
|
]),
|
|
3991
3996
|
E("span", Yo, [
|
|
3992
3997
|
E("span", Ko, [
|
|
3993
|
-
e.loading ? (v(), S(r(
|
|
3998
|
+
e.loading ? (v(), S(r(Ve), { key: 0 })) : P("", !0)
|
|
3994
3999
|
])
|
|
3995
4000
|
])
|
|
3996
4001
|
], 2));
|
|
@@ -4021,16 +4026,16 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
4021
4026
|
cols: { default: () => [] }
|
|
4022
4027
|
},
|
|
4023
4028
|
setup(u) {
|
|
4024
|
-
const { getCssUnit: o } = He(), s = new ResizeObserver(l), e = u, n = T(!1), t = ue(null), a =
|
|
4029
|
+
const { getCssUnit: o } = He(), s = new ResizeObserver(l), e = u, n = T(!1), t = ue(null), a = y(() => {
|
|
4025
4030
|
const h = [];
|
|
4026
4031
|
return e.stripe && h.push("is-striped"), e.border && h.push("has-border"), h;
|
|
4027
|
-
}), c =
|
|
4032
|
+
}), c = y(() => ({
|
|
4028
4033
|
gridTemplateColumns: e.cols.map((h) => h.width ? o(h.width) : "1fr").join(" ")
|
|
4029
|
-
})), d =
|
|
4034
|
+
})), d = y(() => ({
|
|
4030
4035
|
...c.value,
|
|
4031
4036
|
paddingInlineEnd: n.value ? "6px" : "0"
|
|
4032
4037
|
}));
|
|
4033
|
-
|
|
4038
|
+
ie(() => {
|
|
4034
4039
|
s.observe(t.value);
|
|
4035
4040
|
}), ye(() => {
|
|
4036
4041
|
s.disconnect();
|
|
@@ -4065,20 +4070,20 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
4065
4070
|
return typeof f.formatter == "function" ? f.formatter(h, h[f.binding]) : typeof h[f.binding] > "u" ? "" : h[f.binding];
|
|
4066
4071
|
}
|
|
4067
4072
|
return (h, f) => (v(), w("div", {
|
|
4068
|
-
class:
|
|
4073
|
+
class: W(["sq-table", a.value])
|
|
4069
4074
|
}, [
|
|
4070
4075
|
E("div", ea, [
|
|
4071
4076
|
E("div", {
|
|
4072
4077
|
class: "sq-table-header",
|
|
4073
|
-
style:
|
|
4078
|
+
style: Z(d.value)
|
|
4074
4079
|
}, [
|
|
4075
4080
|
(v(!0), w(se, null, pe(e.cols, (_) => (v(), w("div", {
|
|
4076
4081
|
class: "sq-table-cell",
|
|
4077
|
-
style:
|
|
4082
|
+
style: Z({ "justify-content": p(_.align) }),
|
|
4078
4083
|
key: _.binding
|
|
4079
4084
|
}, [
|
|
4080
4085
|
E("span", {
|
|
4081
|
-
textContent:
|
|
4086
|
+
textContent: J(_.title)
|
|
4082
4087
|
}, null, 8, ta)
|
|
4083
4088
|
], 4))), 128))
|
|
4084
4089
|
], 4),
|
|
@@ -4089,12 +4094,12 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
4089
4094
|
}, [
|
|
4090
4095
|
(v(!0), w(se, null, pe(e.data, (_, $) => (v(), w("div", {
|
|
4091
4096
|
class: "sq-table-row",
|
|
4092
|
-
style:
|
|
4097
|
+
style: Z(c.value),
|
|
4093
4098
|
key: i(_, $)
|
|
4094
4099
|
}, [
|
|
4095
4100
|
(v(!0), w(se, null, pe(e.cols, (B, M) => (v(), w("div", {
|
|
4096
|
-
class:
|
|
4097
|
-
style:
|
|
4101
|
+
class: W(["sq-table-cell", B.columnClass]),
|
|
4102
|
+
style: Z({ "justify-content": p(B.align) }),
|
|
4098
4103
|
key: `${B.binding}-${i(_, M)}`
|
|
4099
4104
|
}, [
|
|
4100
4105
|
typeof B.cellRender == "function" ? (v(), S(r(Qo), {
|
|
@@ -4102,7 +4107,7 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
4102
4107
|
content: B.cellRender(_, _[B.binding])
|
|
4103
4108
|
}, null, 8, ["content"])) : (v(), w("span", {
|
|
4104
4109
|
key: 1,
|
|
4105
|
-
textContent:
|
|
4110
|
+
textContent: J(m(_, B))
|
|
4106
4111
|
}, null, 8, na))
|
|
4107
4112
|
], 6))), 128))
|
|
4108
4113
|
], 4))), 128))
|
|
@@ -4110,9 +4115,9 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
4110
4115
|
[he, e.data.length]
|
|
4111
4116
|
]),
|
|
4112
4117
|
e.data.length ? P("", !0) : (v(), w("div", sa, [
|
|
4113
|
-
|
|
4118
|
+
F(h.$slots, "empty", {}, () => [
|
|
4114
4119
|
E("span", {
|
|
4115
|
-
textContent:
|
|
4120
|
+
textContent: J(e.emptyText)
|
|
4116
4121
|
}, null, 8, oa)
|
|
4117
4122
|
])
|
|
4118
4123
|
]))
|
|
@@ -4129,16 +4134,16 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
4129
4134
|
size: { default: "md" }
|
|
4130
4135
|
},
|
|
4131
4136
|
setup(u) {
|
|
4132
|
-
const o = u, s =
|
|
4137
|
+
const o = u, s = y(() => {
|
|
4133
4138
|
const n = [];
|
|
4134
4139
|
return o.size !== "md" && n.push(`sq-tag--${o.size}`), o.variant && o.type && n.push(`is-${o.variant}`), o.type && n.push(`is-${o.type}`), o.round && n.push("is-round"), n;
|
|
4135
|
-
}), e =
|
|
4140
|
+
}), e = y(() => o.size === "lg" ? "md" : "sm");
|
|
4136
4141
|
return (n, t) => (v(), S(r(xe), {
|
|
4137
|
-
class:
|
|
4142
|
+
class: W(["sq-tag", s.value]),
|
|
4138
4143
|
size: e.value
|
|
4139
4144
|
}, {
|
|
4140
4145
|
default: N(() => [
|
|
4141
|
-
|
|
4146
|
+
F(n.$slots, "default")
|
|
4142
4147
|
]),
|
|
4143
4148
|
_: 3
|
|
4144
4149
|
}, 8, ["class", "size"]));
|
|
@@ -4154,17 +4159,17 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
4154
4159
|
},
|
|
4155
4160
|
emits: ["change"],
|
|
4156
4161
|
setup(u, { emit: o }) {
|
|
4157
|
-
const s = o, e = u, n =
|
|
4162
|
+
const s = o, e = u, n = y(() => {
|
|
4158
4163
|
const a = [];
|
|
4159
4164
|
return e.size !== "md" && a.push(`sq-tag--${e.size}`), e.type && a.push(`is-${e.type}`), e.round && a.push("is-round"), e.checked && a.push("is-checked"), a;
|
|
4160
|
-
}), t =
|
|
4165
|
+
}), t = y(() => e.size === "lg" ? "md" : "sm");
|
|
4161
4166
|
return (a, c) => (v(), S(r(xe), {
|
|
4162
|
-
class:
|
|
4167
|
+
class: W(["sq-check-tag", n.value]),
|
|
4163
4168
|
size: t.value,
|
|
4164
4169
|
onClick: c[0] || (c[0] = (d) => s("change", !e.checked))
|
|
4165
4170
|
}, {
|
|
4166
4171
|
default: N(() => [
|
|
4167
|
-
|
|
4172
|
+
F(a.$slots, "default")
|
|
4168
4173
|
]),
|
|
4169
4174
|
_: 3
|
|
4170
4175
|
}, 8, ["class", "size"]));
|
|
@@ -4177,20 +4182,20 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
4177
4182
|
size: { default: "md" }
|
|
4178
4183
|
},
|
|
4179
4184
|
setup(u) {
|
|
4180
|
-
const o = u, s =
|
|
4185
|
+
const o = u, s = y(() => {
|
|
4181
4186
|
const t = [];
|
|
4182
4187
|
return o.size !== "md" && t.push(`sq-text--${o.size}`), o.ellipsis !== void 0 && o.ellipsis !== !1 && t.push(e.value > 1 ? "multi-line" : "single-line"), t;
|
|
4183
|
-
}), e =
|
|
4188
|
+
}), e = y(() => typeof o.ellipsis == "number" ? Number(Math.max(o.ellipsis, 1).toFixed(0)) : 1), n = y(
|
|
4184
4189
|
() => o.ellipsis ? `--row-num: ${e.value}` : ""
|
|
4185
4190
|
);
|
|
4186
4191
|
return (t, a) => (v(), w("span", {
|
|
4187
|
-
class:
|
|
4188
|
-
style:
|
|
4192
|
+
class: W(["sq-text", s.value]),
|
|
4193
|
+
style: Z(n.value)
|
|
4189
4194
|
}, [
|
|
4190
|
-
|
|
4195
|
+
F(t.$slots, "default")
|
|
4191
4196
|
], 6));
|
|
4192
4197
|
}
|
|
4193
|
-
}), ua = "sq-timeline",
|
|
4198
|
+
}), ua = "sq-timeline", Ua = /* @__PURE__ */ R({
|
|
4194
4199
|
name: ua,
|
|
4195
4200
|
__name: "timeline",
|
|
4196
4201
|
props: {
|
|
@@ -4198,17 +4203,17 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
4198
4203
|
variant: {}
|
|
4199
4204
|
},
|
|
4200
4205
|
setup(u) {
|
|
4201
|
-
const o = u, s =
|
|
4206
|
+
const o = u, s = y(() => {
|
|
4202
4207
|
const e = [`align-${o.align}`];
|
|
4203
4208
|
return o.variant && e.push(`is-${o.variant}`), e;
|
|
4204
4209
|
});
|
|
4205
4210
|
return (e, n) => (v(), w("div", {
|
|
4206
|
-
class:
|
|
4211
|
+
class: W(["sq-timeline", s.value])
|
|
4207
4212
|
}, [
|
|
4208
|
-
|
|
4213
|
+
F(e.$slots, "default")
|
|
4209
4214
|
], 2));
|
|
4210
4215
|
}
|
|
4211
|
-
}), ca = { class: "sq-timeline-dot" }, da = { class: "sq-timeline-content" }, fa = ["textContent"], pa = ["textContent"], va = { class: "content-info" }, ma = "sq-timeline-item",
|
|
4216
|
+
}), ca = { class: "sq-timeline-dot" }, da = { class: "sq-timeline-content" }, fa = ["textContent"], pa = ["textContent"], va = { class: "content-info" }, ma = "sq-timeline-item", Va = /* @__PURE__ */ R({
|
|
4212
4217
|
name: ma,
|
|
4213
4218
|
__name: "timeline-item",
|
|
4214
4219
|
props: {
|
|
@@ -4220,16 +4225,16 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
4220
4225
|
title: {}
|
|
4221
4226
|
},
|
|
4222
4227
|
setup(u) {
|
|
4223
|
-
const o = u, s =
|
|
4228
|
+
const o = u, s = y(() => {
|
|
4224
4229
|
const n = [];
|
|
4225
4230
|
return o.type && n.push(`is-${o.type}`), o.hollow && n.push("is-hollow"), n;
|
|
4226
|
-
}), e =
|
|
4231
|
+
}), e = y(() => {
|
|
4227
4232
|
const n = {};
|
|
4228
4233
|
return o.color && (n["--timeline-dot-color"] = o.color), n;
|
|
4229
4234
|
});
|
|
4230
4235
|
return (n, t) => (v(), w("div", {
|
|
4231
|
-
class:
|
|
4232
|
-
style:
|
|
4236
|
+
class: W(["sq-timeline-item", s.value]),
|
|
4237
|
+
style: Z(e.value)
|
|
4233
4238
|
}, [
|
|
4234
4239
|
E("span", ca, [
|
|
4235
4240
|
o.icon ? (v(), S(fe(o.icon), { key: 0 })) : P("", !0)
|
|
@@ -4238,15 +4243,15 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
4238
4243
|
o.title ? (v(), w("h2", {
|
|
4239
4244
|
key: 0,
|
|
4240
4245
|
class: "content-title",
|
|
4241
|
-
textContent:
|
|
4246
|
+
textContent: J(o.title)
|
|
4242
4247
|
}, null, 8, fa)) : P("", !0),
|
|
4243
4248
|
o.timestamp ? (v(), w("span", {
|
|
4244
4249
|
key: 1,
|
|
4245
4250
|
class: "content-time",
|
|
4246
|
-
textContent:
|
|
4251
|
+
textContent: J(o.timestamp)
|
|
4247
4252
|
}, null, 8, pa)) : P("", !0),
|
|
4248
4253
|
E("div", va, [
|
|
4249
|
-
|
|
4254
|
+
F(n.$slots, "default")
|
|
4250
4255
|
])
|
|
4251
4256
|
])
|
|
4252
4257
|
], 6));
|
|
@@ -4264,7 +4269,7 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
4264
4269
|
popoverClass: {}
|
|
4265
4270
|
},
|
|
4266
4271
|
setup(u) {
|
|
4267
|
-
const o = u, s =
|
|
4272
|
+
const o = u, s = y(() => {
|
|
4268
4273
|
const e = ["sq-tooltip"], n = o.popoverClass;
|
|
4269
4274
|
return Array.isArray(n) ? e.push(...n) : typeof n == "string" && e.push(n), e;
|
|
4270
4275
|
});
|
|
@@ -4279,11 +4284,11 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
4279
4284
|
shadow: o.shadow
|
|
4280
4285
|
}, {
|
|
4281
4286
|
reference: N(() => [
|
|
4282
|
-
|
|
4287
|
+
F(e.$slots, "default")
|
|
4283
4288
|
]),
|
|
4284
4289
|
default: N(() => [
|
|
4285
4290
|
E("span", {
|
|
4286
|
-
textContent:
|
|
4291
|
+
textContent: J(o.tip)
|
|
4287
4292
|
}, null, 8, ha)
|
|
4288
4293
|
]),
|
|
4289
4294
|
_: 3
|
|
@@ -4347,7 +4352,7 @@ const ko = "sq-popover", Ct = /* @__PURE__ */ R({
|
|
|
4347
4352
|
multiple: n.multiple,
|
|
4348
4353
|
onChange: a
|
|
4349
4354
|
}, null, 40, ba),
|
|
4350
|
-
|
|
4355
|
+
F(m.$slots, "default")
|
|
4351
4356
|
], 32));
|
|
4352
4357
|
}
|
|
4353
4358
|
});
|
|
@@ -4365,7 +4370,7 @@ export {
|
|
|
4365
4370
|
Sa as SqBacktop,
|
|
4366
4371
|
it as SqBadge,
|
|
4367
4372
|
Cn as SqBlur,
|
|
4368
|
-
|
|
4373
|
+
ee as SqButton,
|
|
4369
4374
|
Ba as SqButtonGroup,
|
|
4370
4375
|
Ta as SqCard,
|
|
4371
4376
|
Na as SqCheckTag,
|
|
@@ -4396,8 +4401,8 @@ export {
|
|
|
4396
4401
|
Da as SqTable,
|
|
4397
4402
|
Oa as SqTag,
|
|
4398
4403
|
xe as SqText,
|
|
4399
|
-
|
|
4400
|
-
|
|
4404
|
+
Ua as SqTimeline,
|
|
4405
|
+
Va as SqTimelineItem,
|
|
4401
4406
|
de as SqTooltip,
|
|
4402
4407
|
Fa as SqUpload
|
|
4403
4408
|
};
|