@oiij/chrome-tabs 0.0.2 → 0.0.4
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/TabItem.vue.d.ts +1 -1
- package/dist/Tabs.vue.d.ts +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.js +243 -246
- package/dist/index.umd.cjs +7 -7
- package/package.json +9 -6
package/dist/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { inject as
|
1
|
+
import { inject as Be, onBeforeMount as Le, createElementBlock as _, openBlock as E, createStaticVNode as je, createElementVNode as k, defineComponent as $e, computed as M, h as re, normalizeClass as C, unref as b, createCommentVNode as Q, createBlock as X, resolveDynamicComponent as ie, withModifiers as Te, createVNode as q, onMounted as ke, nextTick as we, watch as O, getCurrentScope as Pe, onScopeDispose as ze, getCurrentInstance as Ce, toValue as B, shallowRef as ee, ref as Oe, mergeModels as se, useModel as De, normalizeStyle as Ve, renderSlot as ue, TransitionGroup as He, withCtx as We, Fragment as Fe, renderList as qe, mergeProps as Ge } from "vue";
|
2
2
|
function Ze(e) {
|
3
3
|
let t = ".", n = "__", o = "--", r;
|
4
4
|
if (e) {
|
@@ -8,51 +8,51 @@ function Ze(e) {
|
|
8
8
|
const i = {
|
9
9
|
install(l) {
|
10
10
|
r = l.c;
|
11
|
-
const
|
12
|
-
|
11
|
+
const p = l.context;
|
12
|
+
p.bem = {}, p.bem.b = null, p.bem.els = null;
|
13
13
|
}
|
14
14
|
};
|
15
15
|
function s(l) {
|
16
|
-
let
|
16
|
+
let p, h;
|
17
17
|
return {
|
18
18
|
before(m) {
|
19
|
-
|
19
|
+
p = m.bem.b, h = m.bem.els, m.bem.els = null;
|
20
20
|
},
|
21
21
|
after(m) {
|
22
|
-
m.bem.b =
|
22
|
+
m.bem.b = p, m.bem.els = h;
|
23
23
|
},
|
24
24
|
$({ context: m, props: $ }) {
|
25
|
-
return l = typeof l == "string" ? l : l({ context: m, props: $ }), m.bem.b = l, `${
|
25
|
+
return l = typeof l == "string" ? l : l({ context: m, props: $ }), m.bem.b = l, `${$?.bPrefix || t}${m.bem.b}`;
|
26
26
|
}
|
27
27
|
};
|
28
28
|
}
|
29
29
|
function u(l) {
|
30
|
-
let
|
30
|
+
let p;
|
31
31
|
return {
|
32
32
|
before(h) {
|
33
|
-
|
33
|
+
p = h.bem.els;
|
34
34
|
},
|
35
35
|
after(h) {
|
36
|
-
h.bem.els =
|
36
|
+
h.bem.els = p;
|
37
37
|
},
|
38
38
|
$({ context: h, props: m }) {
|
39
|
-
return l = typeof l == "string" ? l : l({ context: h, props: m }), h.bem.els = l.split(",").map(($) => $.trim()), h.bem.els.map(($) => `${
|
39
|
+
return l = typeof l == "string" ? l : l({ context: h, props: m }), h.bem.els = l.split(",").map(($) => $.trim()), h.bem.els.map(($) => `${m?.bPrefix || t}${h.bem.b}${n}${$}`).join(", ");
|
40
40
|
}
|
41
41
|
};
|
42
42
|
}
|
43
43
|
function f(l) {
|
44
44
|
return {
|
45
|
-
$({ context:
|
46
|
-
l = typeof l == "string" ? l : l({ context:
|
47
|
-
const m = l.split(",").map((
|
48
|
-
function $(
|
49
|
-
return m.map((
|
45
|
+
$({ context: p, props: h }) {
|
46
|
+
l = typeof l == "string" ? l : l({ context: p, props: h });
|
47
|
+
const m = l.split(",").map((L) => L.trim());
|
48
|
+
function $(L) {
|
49
|
+
return m.map((D) => `&${h?.bPrefix || t}${p.bem.b}${L !== void 0 ? `${n}${L}` : ""}${o}${D}`).join(", ");
|
50
50
|
}
|
51
|
-
const
|
52
|
-
if (
|
53
|
-
if (process.env.NODE_ENV !== "production" &&
|
51
|
+
const T = p.bem.els;
|
52
|
+
if (T !== null) {
|
53
|
+
if (process.env.NODE_ENV !== "production" && T.length >= 2)
|
54
54
|
throw Error(`[css-render/plugin-bem]: m(${l}) is invalid, using modifier inside multiple elements is not allowed`);
|
55
|
-
return $(
|
55
|
+
return $(T[0]);
|
56
56
|
} else
|
57
57
|
return $();
|
58
58
|
}
|
@@ -60,12 +60,12 @@ function Ze(e) {
|
|
60
60
|
}
|
61
61
|
function c(l) {
|
62
62
|
return {
|
63
|
-
$({ context:
|
64
|
-
l = typeof l == "string" ? l : l({ context:
|
65
|
-
const m =
|
63
|
+
$({ context: p, props: h }) {
|
64
|
+
l = typeof l == "string" ? l : l({ context: p, props: h });
|
65
|
+
const m = p.bem.els;
|
66
66
|
if (process.env.NODE_ENV !== "production" && m !== null && m.length >= 2)
|
67
67
|
throw Error(`[css-render/plugin-bem]: notM(${l}) is invalid, using modifier inside multiple elements is not allowed`);
|
68
|
-
return `&:not(${
|
68
|
+
return `&:not(${h?.bPrefix || t}${p.bem.b}${m !== null && m.length > 0 ? `${n}${m[0]}` : ""}${o}${l})`;
|
69
69
|
}
|
70
70
|
};
|
71
71
|
}
|
@@ -145,7 +145,7 @@ function Xe(e) {
|
|
145
145
|
const t = document.createElement("style");
|
146
146
|
return t.setAttribute("cssr-id", e), t;
|
147
147
|
}
|
148
|
-
function
|
148
|
+
function V(e) {
|
149
149
|
return e ? /^\s*@(s|m)/.test(e) : !1;
|
150
150
|
}
|
151
151
|
const et = /[A-Z]/g;
|
@@ -207,21 +207,21 @@ function Me(e, t, n, o, r) {
|
|
207
207
|
const i = e.$;
|
208
208
|
let s = "";
|
209
209
|
if (!i || typeof i == "string")
|
210
|
-
|
210
|
+
V(i) ? s = i : t.push(i);
|
211
211
|
else if (typeof i == "function") {
|
212
212
|
const c = i({
|
213
213
|
context: o.context,
|
214
214
|
props: r
|
215
215
|
});
|
216
|
-
|
216
|
+
V(c) ? s = c : t.push(c);
|
217
217
|
} else if (i.before && i.before(o.context), !i.$ || typeof i.$ == "string")
|
218
|
-
|
218
|
+
V(i.$) ? s = i.$ : t.push(i.$);
|
219
219
|
else if (i.$) {
|
220
220
|
const c = i.$({
|
221
221
|
context: o.context,
|
222
222
|
props: r
|
223
223
|
});
|
224
|
-
|
224
|
+
V(c) ? s = c : t.push(c);
|
225
225
|
}
|
226
226
|
const u = Qe(t), f = ae(u, e.props, o, r);
|
227
227
|
s ? n.push(`${s} {`) : f.length && n.push(f), e.children && te(e.children, {
|
@@ -304,7 +304,7 @@ function at(e = {}) {
|
|
304
304
|
const { id: t, parent: n } = e;
|
305
305
|
it(this.instance, this, t, n);
|
306
306
|
}
|
307
|
-
const
|
307
|
+
const H = function(e, t, n, o) {
|
308
308
|
return {
|
309
309
|
instance: e,
|
310
310
|
$: t,
|
@@ -316,7 +316,7 @@ const _ = function(e, t, n, o) {
|
|
316
316
|
unmount: at
|
317
317
|
};
|
318
318
|
}, ct = function(e, t, n, o) {
|
319
|
-
return Array.isArray(t) ?
|
319
|
+
return Array.isArray(t) ? H(e, { $: null }, null, t) : Array.isArray(n) ? H(e, t, null, n) : Array.isArray(o) ? H(e, t, n, o) : H(e, t, n, null);
|
320
320
|
};
|
321
321
|
function ft(e = {}) {
|
322
322
|
const t = {
|
@@ -349,23 +349,23 @@ function mt(e, t) {
|
|
349
349
|
${t}
|
350
350
|
</style>`;
|
351
351
|
}
|
352
|
-
function
|
352
|
+
function pt(e, t, n) {
|
353
353
|
const { styles: o, ids: r } = n;
|
354
354
|
r.has(e) || o !== null && (r.add(e), o.push(mt(e, t)));
|
355
355
|
}
|
356
|
-
const
|
357
|
-
function
|
358
|
-
if (
|
356
|
+
const vt = typeof document < "u";
|
357
|
+
function bt() {
|
358
|
+
if (vt)
|
359
359
|
return;
|
360
|
-
const e =
|
360
|
+
const e = Be(ht, null);
|
361
361
|
if (e !== null)
|
362
362
|
return {
|
363
|
-
adapter: (t, n) =>
|
363
|
+
adapter: (t, n) => pt(t, n, e),
|
364
364
|
context: e
|
365
365
|
};
|
366
366
|
}
|
367
367
|
function gt(e, t) {
|
368
|
-
const n =
|
368
|
+
const n = bt();
|
369
369
|
function o() {
|
370
370
|
t.mount({
|
371
371
|
id: e,
|
@@ -373,14 +373,14 @@ function gt(e, t) {
|
|
373
373
|
ssr: n
|
374
374
|
});
|
375
375
|
}
|
376
|
-
n ? o() :
|
376
|
+
n ? o() : Le(() => {
|
377
377
|
o();
|
378
378
|
});
|
379
379
|
}
|
380
|
-
const { cssr: xt, plugin: yt, namespace: Ne } = dt(), { c:
|
380
|
+
const { cssr: xt, plugin: yt, namespace: Ne } = dt(), { c: g, cB: W, cE: x, cM: U, cNotM: fe } = { ...xt, ...yt }, P = `${Ne}-chrome-tabs`, w = `${Ne}-chrome-tabs-item`, j = "all .2s cubic-bezier(.4, 0, .2, 1)";
|
381
381
|
function $t() {
|
382
|
-
return
|
383
|
-
|
382
|
+
return g([
|
383
|
+
W("chrome-tabs", {
|
384
384
|
display: "flex",
|
385
385
|
width: "100%",
|
386
386
|
height: "40px",
|
@@ -389,15 +389,18 @@ function $t() {
|
|
389
389
|
backgroundColor: "var(--background-color)",
|
390
390
|
color: "var(--background-color-dark)"
|
391
391
|
}, [
|
392
|
-
|
393
|
-
|
392
|
+
g("div", {
|
393
|
+
boxSizing: "border-box"
|
394
394
|
}),
|
395
|
-
|
395
|
+
g(".group-move, .group-enter-active, .group-leave-active", {
|
396
|
+
transition: j
|
397
|
+
}),
|
398
|
+
g(".group-enter-from, .group-leave-to", {
|
396
399
|
opacity: 0
|
397
400
|
}),
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
+
g(".group-leave-active", {}),
|
402
|
+
x("prefix", {}),
|
403
|
+
x("icon", {
|
401
404
|
width: "28px",
|
402
405
|
height: "28px",
|
403
406
|
display: "flex",
|
@@ -406,18 +409,18 @@ function $t() {
|
|
406
409
|
padding: "5px",
|
407
410
|
borderRadius: "10px",
|
408
411
|
backgroundColor: "var(--active-background-color)",
|
409
|
-
transition:
|
412
|
+
transition: j
|
410
413
|
}, [
|
411
|
-
|
414
|
+
g("svg", {
|
412
415
|
width: "100%",
|
413
416
|
height: "100%",
|
414
417
|
fill: "currentColor"
|
415
418
|
}),
|
416
|
-
|
419
|
+
g("&:hover", {
|
417
420
|
backgroundColor: "var(--primary-color)"
|
418
421
|
})
|
419
422
|
]),
|
420
|
-
|
423
|
+
x("content", {
|
421
424
|
flex: "1",
|
422
425
|
height: "100%",
|
423
426
|
minWidth: 0,
|
@@ -425,26 +428,26 @@ function $t() {
|
|
425
428
|
marginLeft: "-6px",
|
426
429
|
padding: "0 10px"
|
427
430
|
}),
|
428
|
-
|
431
|
+
x("scroll", {
|
429
432
|
position: "relative",
|
430
433
|
display: "flex",
|
431
434
|
alignItems: "center",
|
432
435
|
height: "100%"
|
433
436
|
}, [
|
434
|
-
|
437
|
+
x("icon", {
|
435
438
|
marginLeft: "5px",
|
436
439
|
borderRadius: "50%",
|
437
440
|
backgroundColor: "transparent",
|
438
441
|
flexShrink: 0
|
439
442
|
}, [
|
440
|
-
|
443
|
+
g("&:hover", {
|
441
444
|
backgroundColor: "var(--primary-color)"
|
442
445
|
})
|
443
446
|
])
|
444
447
|
]),
|
445
|
-
|
448
|
+
x("suffix", {})
|
446
449
|
]),
|
447
|
-
|
450
|
+
W("chrome-tabs-item", {
|
448
451
|
position: "relative",
|
449
452
|
margin: "0 -5px",
|
450
453
|
height: "100%",
|
@@ -460,24 +463,24 @@ function $t() {
|
|
460
463
|
filter: "grayscale(0.5)"
|
461
464
|
}),
|
462
465
|
U("active", [
|
463
|
-
|
466
|
+
x("background", {
|
464
467
|
opacity: 1
|
465
468
|
})
|
466
469
|
]),
|
467
470
|
fe("active", [
|
468
|
-
|
469
|
-
|
471
|
+
g("&:hover", {}, [
|
472
|
+
x("content", {
|
470
473
|
backgroundColor: "var(--primary-color)"
|
471
474
|
})
|
472
475
|
])
|
473
476
|
]),
|
474
|
-
|
477
|
+
g("&::first-child", {
|
475
478
|
marginLeft: "0 !important"
|
476
479
|
}),
|
477
|
-
|
480
|
+
g("&::last-child", {
|
478
481
|
marginRight: "0 !important"
|
479
482
|
}),
|
480
|
-
|
483
|
+
x("content", {
|
481
484
|
position: "relative",
|
482
485
|
zIndex: 1,
|
483
486
|
height: "28px",
|
@@ -486,17 +489,19 @@ function $t() {
|
|
486
489
|
gap: "5px",
|
487
490
|
borderRadius: "10px",
|
488
491
|
padding: "0 10px",
|
489
|
-
transition:
|
492
|
+
transition: j
|
490
493
|
}),
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
+
x("slot", {}),
|
495
|
+
x("icon", {
|
496
|
+
lineHeight: 1
|
497
|
+
}, [
|
498
|
+
g("svg", {
|
494
499
|
width: "1.2em",
|
495
500
|
height: "1.2em",
|
496
501
|
fill: "currentColor"
|
497
502
|
})
|
498
503
|
]),
|
499
|
-
|
504
|
+
x("close", {
|
500
505
|
width: "16px",
|
501
506
|
height: "16px",
|
502
507
|
padding: "2px",
|
@@ -504,18 +509,18 @@ function $t() {
|
|
504
509
|
alignItems: "center",
|
505
510
|
justifyContent: "center",
|
506
511
|
borderRadius: "50%",
|
507
|
-
transition:
|
512
|
+
transition: j
|
508
513
|
}, [
|
509
|
-
|
514
|
+
g("&:hover", {
|
510
515
|
backgroundColor: "rgba(0,0,0,0.1)"
|
511
516
|
}),
|
512
|
-
|
517
|
+
g("svg", {
|
513
518
|
width: "100%",
|
514
519
|
height: "100%",
|
515
520
|
fill: "currentColor"
|
516
521
|
})
|
517
522
|
]),
|
518
|
-
|
523
|
+
x("background", {
|
519
524
|
position: "absolute",
|
520
525
|
opacity: 0,
|
521
526
|
left: 0,
|
@@ -525,27 +530,27 @@ function $t() {
|
|
525
530
|
width: "100%",
|
526
531
|
display: "flex",
|
527
532
|
alignItems: "flex-end",
|
528
|
-
transition:
|
533
|
+
transition: j
|
529
534
|
}, [
|
530
|
-
|
535
|
+
x("block", {
|
531
536
|
height: "100%",
|
532
537
|
flex: 1,
|
533
538
|
minWidth: 0,
|
534
539
|
borderRadius: "10px 10px 0 0",
|
535
540
|
backgroundColor: "var(--active-background-color)"
|
536
541
|
}),
|
537
|
-
|
542
|
+
g("svg", {
|
538
543
|
fill: "var(--active-background-color)"
|
539
544
|
})
|
540
545
|
]),
|
541
|
-
|
546
|
+
x("line", {
|
542
547
|
position: "absolute",
|
543
548
|
bottom: "12px",
|
544
549
|
right: "4px",
|
545
550
|
height: "16px",
|
546
551
|
width: "2px",
|
547
552
|
borderRadius: "1px",
|
548
|
-
transition:
|
553
|
+
transition: j,
|
549
554
|
backgroundColor: "var(--primary-color)",
|
550
555
|
opacity: 0
|
551
556
|
}, [
|
@@ -554,32 +559,32 @@ function $t() {
|
|
554
559
|
})
|
555
560
|
])
|
556
561
|
]),
|
557
|
-
|
558
|
-
|
562
|
+
g(".dark", [
|
563
|
+
W("chrome-tabs", {
|
559
564
|
backgroundColor: "var(--background-color-dark)",
|
560
565
|
color: "var(--background-color)"
|
561
566
|
}, [
|
562
|
-
|
567
|
+
x("icon", {
|
563
568
|
backgroundColor: "var(--active-background-color-dark)"
|
564
569
|
}, [
|
565
|
-
|
570
|
+
g("&:hover", {
|
566
571
|
backgroundColor: "var(--primary-color-dark)"
|
567
572
|
})
|
568
573
|
])
|
569
574
|
]),
|
570
|
-
|
575
|
+
W("chrome-tabs-item", {}, [
|
571
576
|
fe("active", [
|
572
|
-
|
573
|
-
|
577
|
+
g("&:hover", {}, [
|
578
|
+
x("content", {
|
574
579
|
backgroundColor: "var(--primary-color-dark)"
|
575
580
|
})
|
576
581
|
])
|
577
582
|
]),
|
578
|
-
|
579
|
-
|
583
|
+
x("background", {}, [
|
584
|
+
x("block", {
|
580
585
|
backgroundColor: "var(--active-background-color-dark)"
|
581
586
|
}),
|
582
|
-
|
587
|
+
g("svg", {
|
583
588
|
fill: "var(--active-background-color-dark)"
|
584
589
|
})
|
585
590
|
])
|
@@ -601,8 +606,8 @@ const Z = (e, t) => {
|
|
601
606
|
viewBox: "0 0 24 24"
|
602
607
|
};
|
603
608
|
function Ct(e, t, n, o, r, i) {
|
604
|
-
return
|
605
|
-
|
609
|
+
return E(), _("svg", wt, t[0] || (t[0] = [
|
610
|
+
je('<g fill="none" stroke="#757575" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path stroke-dasharray="16" stroke-dashoffset="16" d="M12 3c4.97 0 9 4.03 9 9"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="16;0"></animate><animateTransform attributeName="transform" dur="1.5s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"></animateTransform></path><path stroke-dasharray="64" stroke-dashoffset="64" stroke-opacity=".3" d="M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z"><animate fill="freeze" attributeName="stroke-dashoffset" dur="1.2s" values="64;0"></animate></path></g>', 1)
|
606
611
|
]));
|
607
612
|
}
|
608
613
|
const Et = /* @__PURE__ */ Z(kt, [["render", Ct]]), It = {
|
@@ -614,14 +619,14 @@ const Et = /* @__PURE__ */ Z(kt, [["render", Ct]]), It = {
|
|
614
619
|
viewBox: "0 0 24 24"
|
615
620
|
};
|
616
621
|
function Nt(e, t, n, o, r, i) {
|
617
|
-
return
|
622
|
+
return E(), _("svg", Mt, t[0] || (t[0] = [
|
618
623
|
k("path", {
|
619
624
|
fill: "#757575",
|
620
625
|
d: "m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z"
|
621
626
|
}, null, -1)
|
622
627
|
]));
|
623
628
|
}
|
624
|
-
const St = /* @__PURE__ */ Z(It, [["render", Nt]]),
|
629
|
+
const St = /* @__PURE__ */ Z(It, [["render", Nt]]), _t = /* @__PURE__ */ $e({
|
625
630
|
__name: "TabItem",
|
626
631
|
props: {
|
627
632
|
label: { type: [String, Function] },
|
@@ -638,53 +643,50 @@ const St = /* @__PURE__ */ Z(It, [["render", Nt]]), At = /* @__PURE__ */ $e({
|
|
638
643
|
},
|
639
644
|
emits: ["itemClick", "itemContextmenu", "itemClose"],
|
640
645
|
setup(e, { emit: t }) {
|
641
|
-
const n = t, o =
|
646
|
+
const n = t, o = M(() => e.activeIndex !== e.index && e.activeIndex !== e.index - 1), r = M(() => e.activeIndex === e.index), i = M(() => typeof e.label == "string" ? re("span", { class: `${w}__label` }, e.label) : e.label), s = M(() => e.loadingIcon ?? re(Et));
|
642
647
|
function u(d) {
|
643
|
-
|
644
|
-
d.stopPropagation(), n("itemClick", d), (a = e.onClick) == null || a.call(e, d);
|
648
|
+
d.stopPropagation(), n("itemClick", d), e.onClick?.(d);
|
645
649
|
}
|
646
650
|
function f(d) {
|
647
|
-
|
648
|
-
n("itemContextmenu", d), (a = e.onContextMenu) == null || a.call(e, d);
|
651
|
+
n("itemContextmenu", d), e.onContextMenu?.(d);
|
649
652
|
}
|
650
653
|
function c() {
|
651
|
-
|
652
|
-
n("itemClose"), (d = e.onClose) == null || d.call(e);
|
654
|
+
n("itemClose"), e.onClose?.();
|
653
655
|
}
|
654
|
-
return (d, a) => (
|
655
|
-
class:
|
656
|
-
|
656
|
+
return (d, a) => (E(), _("div", {
|
657
|
+
class: C([
|
658
|
+
b(w),
|
657
659
|
{
|
658
|
-
[`${
|
659
|
-
[`${
|
660
|
+
[`${b(w)}--active`]: r.value,
|
661
|
+
[`${b(w)}--disabled`]: d.disabled
|
660
662
|
}
|
661
663
|
]),
|
662
664
|
onClick: u,
|
663
665
|
onContextmenu: f
|
664
666
|
}, [
|
665
667
|
k("div", {
|
666
|
-
class:
|
668
|
+
class: C([`${b(w)}__content`])
|
667
669
|
}, [
|
668
670
|
k("div", {
|
669
|
-
class:
|
671
|
+
class: C([`${b(w)}__icon`])
|
670
672
|
}, [
|
671
|
-
(
|
673
|
+
(E(), X(ie(d.loading ? s.value : d.icon)))
|
672
674
|
], 2),
|
673
675
|
k("div", {
|
674
|
-
class:
|
676
|
+
class: C([`${b(w)}__slot`])
|
675
677
|
}, [
|
676
|
-
(
|
678
|
+
(E(), X(ie(i.value)))
|
677
679
|
], 2),
|
678
|
-
d.closable ? (
|
680
|
+
d.closable ? (E(), _("div", {
|
679
681
|
key: 0,
|
680
|
-
class:
|
681
|
-
onClick:
|
682
|
+
class: C([`${b(w)}__close`]),
|
683
|
+
onClick: Te(c, ["stop"])
|
682
684
|
}, [
|
683
685
|
q(St)
|
684
686
|
], 2)) : Q("", !0)
|
685
687
|
], 2),
|
686
688
|
k("div", {
|
687
|
-
class:
|
689
|
+
class: C([`${b(w)}__background`])
|
688
690
|
}, [
|
689
691
|
a[0] || (a[0] = k("svg", {
|
690
692
|
width: "10",
|
@@ -693,7 +695,7 @@ const St = /* @__PURE__ */ Z(It, [["render", Nt]]), At = /* @__PURE__ */ $e({
|
|
693
695
|
k("path", { d: "M 0 10 A 10 10 0 0 0 10 0 L 10 10 Z" })
|
694
696
|
], -1)),
|
695
697
|
k("div", {
|
696
|
-
class:
|
698
|
+
class: C([`${b(w)}__block`])
|
697
699
|
}, null, 2),
|
698
700
|
a[1] || (a[1] = k("svg", {
|
699
701
|
width: "10",
|
@@ -703,19 +705,19 @@ const St = /* @__PURE__ */ Z(It, [["render", Nt]]), At = /* @__PURE__ */ $e({
|
|
703
705
|
], -1))
|
704
706
|
], 2),
|
705
707
|
k("div", {
|
706
|
-
class:
|
708
|
+
class: C([`${b(w)}__line`, o.value ? `${b(w)}__line--show` : ""])
|
707
709
|
}, null, 2)
|
708
710
|
], 34));
|
709
711
|
}
|
710
712
|
});
|
711
713
|
function Se(e) {
|
712
|
-
return
|
714
|
+
return Pe() ? (ze(e), !0) : !1;
|
713
715
|
}
|
714
|
-
const
|
716
|
+
const At = typeof window < "u" && typeof document < "u";
|
715
717
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
716
|
-
const
|
718
|
+
const Rt = Object.prototype.toString, Bt = (e) => Rt.call(e) === "[object Object]", de = () => {
|
717
719
|
};
|
718
|
-
function
|
720
|
+
function Lt(e, t) {
|
719
721
|
function n(...o) {
|
720
722
|
return new Promise((r, i) => {
|
721
723
|
Promise.resolve(e(() => t.apply(this, o), { fn: t, thisArg: this, args: o })).then(r).catch(i);
|
@@ -723,19 +725,19 @@ function jt(e, t) {
|
|
723
725
|
}
|
724
726
|
return n;
|
725
727
|
}
|
726
|
-
function
|
728
|
+
function jt(e, t = {}) {
|
727
729
|
let n, o, r = de;
|
728
730
|
const i = (f) => {
|
729
731
|
clearTimeout(f), r(), r = de;
|
730
732
|
};
|
731
733
|
let s;
|
732
734
|
return (f) => {
|
733
|
-
const c =
|
734
|
-
return n && i(n), c <= 0 || d !== void 0 && d <= 0 ? (o && (i(o), o =
|
735
|
+
const c = B(e), d = B(t.maxWait);
|
736
|
+
return n && i(n), c <= 0 || d !== void 0 && d <= 0 ? (o && (i(o), o = void 0), Promise.resolve(f())) : new Promise((a, v) => {
|
735
737
|
r = t.rejectOnCancel ? v : a, s = f, d && !o && (o = setTimeout(() => {
|
736
|
-
n && i(n), o =
|
738
|
+
n && i(n), o = void 0, a(s());
|
737
739
|
}, d)), n = setTimeout(() => {
|
738
|
-
o && i(o), o =
|
740
|
+
o && i(o), o = void 0, a(f());
|
739
741
|
}, c);
|
740
742
|
});
|
741
743
|
};
|
@@ -743,20 +745,20 @@ function Tt(e, t = {}) {
|
|
743
745
|
function G(e) {
|
744
746
|
return Array.isArray(e) ? e : [e];
|
745
747
|
}
|
746
|
-
function
|
748
|
+
function Tt(e) {
|
747
749
|
return Ce();
|
748
750
|
}
|
749
|
-
function
|
750
|
-
return
|
751
|
-
|
751
|
+
function Pt(e, t = 200, n = {}) {
|
752
|
+
return Lt(
|
753
|
+
jt(t, n),
|
752
754
|
e
|
753
755
|
);
|
754
756
|
}
|
755
|
-
function
|
756
|
-
|
757
|
+
function zt(e, t = !0, n) {
|
758
|
+
Tt() ? ke(e, n) : t ? e() : we(e);
|
757
759
|
}
|
758
|
-
function
|
759
|
-
return
|
760
|
+
function Ot(e, t, n) {
|
761
|
+
return O(
|
760
762
|
e,
|
761
763
|
t,
|
762
764
|
{
|
@@ -765,37 +767,37 @@ function Dt(e, t, n) {
|
|
765
767
|
}
|
766
768
|
);
|
767
769
|
}
|
768
|
-
const oe =
|
769
|
-
function
|
770
|
+
const oe = At ? window : void 0;
|
771
|
+
function R(e) {
|
770
772
|
var t;
|
771
|
-
const n =
|
772
|
-
return (t = n
|
773
|
+
const n = B(e);
|
774
|
+
return (t = n?.$el) != null ? t : n;
|
773
775
|
}
|
774
|
-
function
|
776
|
+
function Dt(...e) {
|
775
777
|
const t = [], n = () => {
|
776
778
|
t.forEach((u) => u()), t.length = 0;
|
777
|
-
}, o = (u, f, c, d) => (u.addEventListener(f, c, d), () => u.removeEventListener(f, c, d)), r =
|
778
|
-
const u = G(
|
779
|
+
}, o = (u, f, c, d) => (u.addEventListener(f, c, d), () => u.removeEventListener(f, c, d)), r = M(() => {
|
780
|
+
const u = G(B(e[0])).filter((f) => f != null);
|
779
781
|
return u.every((f) => typeof f != "string") ? u : void 0;
|
780
|
-
}), i =
|
782
|
+
}), i = Ot(
|
781
783
|
() => {
|
782
784
|
var u, f;
|
783
785
|
return [
|
784
|
-
(f = (u = r.value) == null ? void 0 : u.map((c) =>
|
785
|
-
G(
|
786
|
-
G(
|
786
|
+
(f = (u = r.value) == null ? void 0 : u.map((c) => R(c))) != null ? f : [oe].filter((c) => c != null),
|
787
|
+
G(B(r.value ? e[1] : e[0])),
|
788
|
+
G(b(r.value ? e[2] : e[1])),
|
787
789
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
788
|
-
|
790
|
+
B(r.value ? e[3] : e[2])
|
789
791
|
];
|
790
792
|
},
|
791
793
|
([u, f, c, d]) => {
|
792
|
-
if (n(), !
|
794
|
+
if (n(), !u?.length || !f?.length || !c?.length)
|
793
795
|
return;
|
794
|
-
const a =
|
796
|
+
const a = Bt(d) ? { ...d } : d;
|
795
797
|
t.push(
|
796
798
|
...u.flatMap(
|
797
799
|
(v) => f.flatMap(
|
798
|
-
(
|
800
|
+
(S) => c.map((l) => o(v, S, l, a))
|
799
801
|
)
|
800
802
|
)
|
801
803
|
);
|
@@ -806,25 +808,25 @@ function Vt(...e) {
|
|
806
808
|
};
|
807
809
|
return Se(n), s;
|
808
810
|
}
|
809
|
-
function
|
811
|
+
function Vt() {
|
810
812
|
const e = ee(!1), t = Ce();
|
811
813
|
return t && ke(() => {
|
812
814
|
e.value = !0;
|
813
815
|
}, t), e;
|
814
816
|
}
|
815
|
-
function
|
816
|
-
const t =
|
817
|
-
return
|
817
|
+
function Ht(e) {
|
818
|
+
const t = Vt();
|
819
|
+
return M(() => (t.value, !!e()));
|
818
820
|
}
|
819
|
-
function
|
821
|
+
function Wt(e, t, n = {}) {
|
820
822
|
const { window: o = oe, ...r } = n;
|
821
823
|
let i;
|
822
|
-
const s =
|
824
|
+
const s = Ht(() => o && "ResizeObserver" in o), u = () => {
|
823
825
|
i && (i.disconnect(), i = void 0);
|
824
|
-
}, f =
|
825
|
-
const a =
|
826
|
-
return Array.isArray(a) ? a.map((v) =>
|
827
|
-
}), c =
|
826
|
+
}, f = M(() => {
|
827
|
+
const a = B(e);
|
828
|
+
return Array.isArray(a) ? a.map((v) => R(v)) : [R(a)];
|
829
|
+
}), c = O(
|
828
830
|
f,
|
829
831
|
(a) => {
|
830
832
|
if (u(), s.value && o) {
|
@@ -843,33 +845,33 @@ function Ht(e, t, n = {}) {
|
|
843
845
|
};
|
844
846
|
}
|
845
847
|
function Ft(e, t = { width: 0, height: 0 }, n = {}) {
|
846
|
-
const { window: o = oe, box: r = "content-box" } = n, i =
|
848
|
+
const { window: o = oe, box: r = "content-box" } = n, i = M(() => {
|
847
849
|
var a, v;
|
848
|
-
return (v = (a =
|
849
|
-
}), s = ee(t.width), u = ee(t.height), { stop: f } =
|
850
|
+
return (v = (a = R(e)) == null ? void 0 : a.namespaceURI) == null ? void 0 : v.includes("svg");
|
851
|
+
}), s = ee(t.width), u = ee(t.height), { stop: f } = Wt(
|
850
852
|
e,
|
851
853
|
([a]) => {
|
852
854
|
const v = r === "border-box" ? a.borderBoxSize : r === "content-box" ? a.contentBoxSize : a.devicePixelContentBoxSize;
|
853
855
|
if (o && i.value) {
|
854
|
-
const
|
855
|
-
if (
|
856
|
-
const l =
|
856
|
+
const S = R(e);
|
857
|
+
if (S) {
|
858
|
+
const l = S.getBoundingClientRect();
|
857
859
|
s.value = l.width, u.value = l.height;
|
858
860
|
}
|
859
861
|
} else if (v) {
|
860
|
-
const
|
861
|
-
s.value =
|
862
|
+
const S = G(v);
|
863
|
+
s.value = S.reduce((l, { inlineSize: p }) => l + p, 0), u.value = S.reduce((l, { blockSize: p }) => l + p, 0);
|
862
864
|
} else
|
863
865
|
s.value = a.contentRect.width, u.value = a.contentRect.height;
|
864
866
|
},
|
865
867
|
n
|
866
868
|
);
|
867
|
-
|
868
|
-
const a =
|
869
|
+
zt(() => {
|
870
|
+
const a = R(e);
|
869
871
|
a && (s.value = "offsetWidth" in a ? a.offsetWidth : t.width, u.value = "offsetHeight" in a ? a.offsetHeight : t.height);
|
870
872
|
});
|
871
|
-
const c =
|
872
|
-
() =>
|
873
|
+
const c = O(
|
874
|
+
() => R(e),
|
873
875
|
(a) => {
|
874
876
|
s.value = a ? t.width : 0, u.value = a ? t.height : 0;
|
875
877
|
}
|
@@ -884,11 +886,10 @@ function Ft(e, t = { width: 0, height: 0 }, n = {}) {
|
|
884
886
|
};
|
885
887
|
}
|
886
888
|
function qt(e) {
|
887
|
-
const { activeClassName: t = ".active", enableWheel: n = !0, direction: o = "vertical" } = e ?? {}, r =
|
889
|
+
const { activeClassName: t = ".active", enableWheel: n = !0, direction: o = "vertical" } = e ?? {}, r = Oe(), { width: i, height: s } = Ft(r);
|
888
890
|
async function u(d) {
|
889
|
-
var v;
|
890
891
|
await we();
|
891
|
-
const a =
|
892
|
+
const a = r.value?.querySelector(t);
|
892
893
|
a && a.scrollIntoView({
|
893
894
|
behavior: "smooth",
|
894
895
|
block: "nearest",
|
@@ -897,68 +898,67 @@ function qt(e) {
|
|
897
898
|
});
|
898
899
|
}
|
899
900
|
function f(d) {
|
900
|
-
var v, w;
|
901
901
|
if (!n) return;
|
902
902
|
d.preventDefault();
|
903
903
|
const { deltaY: a } = d;
|
904
904
|
switch (o) {
|
905
905
|
case "vertical":
|
906
|
-
|
906
|
+
r.value?.scrollBy({
|
907
907
|
top: a > 0 ? s.value : -s.value,
|
908
908
|
behavior: "smooth"
|
909
909
|
});
|
910
910
|
break;
|
911
911
|
case "horizontal":
|
912
|
-
|
912
|
+
r.value?.scrollBy({
|
913
913
|
left: a > 0 ? i.value : -i.value,
|
914
914
|
behavior: "smooth"
|
915
915
|
});
|
916
916
|
break;
|
917
917
|
}
|
918
918
|
}
|
919
|
-
|
920
|
-
const c =
|
921
|
-
return
|
919
|
+
Dt(r, "wheel", f);
|
920
|
+
const c = Pt(u, 500);
|
921
|
+
return O([i, s], () => {
|
922
922
|
c();
|
923
923
|
}), {
|
924
924
|
scrollRef: r,
|
925
925
|
scrollToView: u
|
926
926
|
};
|
927
927
|
}
|
928
|
-
var Gt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) },
|
928
|
+
var Gt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
|
929
929
|
return typeof e == "string" ? e.length > 0 : typeof e == "number";
|
930
930
|
}, y = function(e, t, n) {
|
931
931
|
return t === void 0 && (t = 0), n === void 0 && (n = Math.pow(10, t)), Math.round(n * e) / n + 0;
|
932
|
-
},
|
932
|
+
}, N = function(e, t, n) {
|
933
933
|
return t === void 0 && (t = 0), n === void 0 && (n = 1), e > n ? n : e > t ? e : t;
|
934
|
-
},
|
934
|
+
}, _e = function(e) {
|
935
935
|
return (e = isFinite(e) ? e % 360 : 0) > 0 ? e : e + 360;
|
936
936
|
}, he = function(e) {
|
937
|
-
return { r:
|
937
|
+
return { r: N(e.r, 0, 255), g: N(e.g, 0, 255), b: N(e.b, 0, 255), a: N(e.a) };
|
938
938
|
}, K = function(e) {
|
939
939
|
return { r: y(e.r), g: y(e.g), b: y(e.b), a: y(e.a, 3) };
|
940
940
|
}, Zt = /^#([0-9a-f]{3,8})$/i, F = function(e) {
|
941
941
|
var t = e.toString(16);
|
942
942
|
return t.length < 2 ? "0" + t : t;
|
943
|
-
},
|
943
|
+
}, Ae = function(e) {
|
944
944
|
var t = e.r, n = e.g, o = e.b, r = e.a, i = Math.max(t, n, o), s = i - Math.min(t, n, o), u = s ? i === t ? (n - o) / s : i === n ? 2 + (o - t) / s : 4 + (t - n) / s : 0;
|
945
945
|
return { h: 60 * (u < 0 ? u + 6 : u), s: i ? s / i * 100 : 0, v: i / 255 * 100, a: r };
|
946
|
-
},
|
946
|
+
}, Re = function(e) {
|
947
947
|
var t = e.h, n = e.s, o = e.v, r = e.a;
|
948
948
|
t = t / 360 * 6, n /= 100, o /= 100;
|
949
949
|
var i = Math.floor(t), s = o * (1 - n), u = o * (1 - (t - i) * n), f = o * (1 - (1 - t + i) * n), c = i % 6;
|
950
950
|
return { r: 255 * [o, u, s, s, f, o][c], g: 255 * [f, o, o, u, s, s][c], b: 255 * [s, s, f, o, o, u][c], a: r };
|
951
951
|
}, me = function(e) {
|
952
|
-
return { h:
|
953
|
-
},
|
952
|
+
return { h: _e(e.h), s: N(e.s, 0, 100), l: N(e.l, 0, 100), a: N(e.a) };
|
953
|
+
}, pe = function(e) {
|
954
954
|
return { h: y(e.h), s: y(e.s), l: y(e.l), a: y(e.a, 3) };
|
955
|
-
},
|
956
|
-
return
|
955
|
+
}, ve = function(e) {
|
956
|
+
return Re((n = (t = e).s, { h: t.h, s: (n *= ((o = t.l) < 50 ? o : 100 - o) / 100) > 0 ? 2 * n / (o + n) * 100 : 0, v: o + n, a: t.a }));
|
957
957
|
var t, n, o;
|
958
|
-
},
|
959
|
-
return { h: (t =
|
958
|
+
}, z = function(e) {
|
959
|
+
return { h: (t = Ae(e)).h, s: (r = (200 - (n = t.s)) * (o = t.v) / 100) > 0 && r < 200 ? n * o / 100 / (r <= 100 ? r : 200 - r) * 100 : 0, l: r / 2, a: t.a };
|
960
960
|
var t, n, o, r;
|
961
|
-
}, Ut = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Kt = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Yt = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Jt = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,
|
961
|
+
}, Ut = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Kt = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Yt = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Jt = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, be = { string: [[function(e) {
|
962
962
|
var t = Zt.exec(e);
|
963
963
|
return t ? (e = t[1]).length <= 4 ? { r: parseInt(e[0] + e[0], 16), g: parseInt(e[1] + e[1], 16), b: parseInt(e[2] + e[2], 16), a: e.length === 4 ? y(parseInt(e[3] + e[3], 16) / 255, 2) : 1 } : e.length === 6 || e.length === 8 ? { r: parseInt(e.substr(0, 2), 16), g: parseInt(e.substr(2, 2), 16), b: parseInt(e.substr(4, 2), 16), a: e.length === 8 ? y(parseInt(e.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
|
964
964
|
}, "hex"], [function(e) {
|
@@ -968,22 +968,22 @@ var Gt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
|
|
968
968
|
var t = Ut.exec(e) || Kt.exec(e);
|
969
969
|
if (!t) return null;
|
970
970
|
var n, o, r = me({ h: (n = t[1], o = t[2], o === void 0 && (o = "deg"), Number(n) * (Gt[o] || 1)), s: Number(t[3]), l: Number(t[4]), a: t[5] === void 0 ? 1 : Number(t[5]) / (t[6] ? 100 : 1) });
|
971
|
-
return
|
971
|
+
return ve(r);
|
972
972
|
}, "hsl"]], object: [[function(e) {
|
973
973
|
var t = e.r, n = e.g, o = e.b, r = e.a, i = r === void 0 ? 1 : r;
|
974
|
-
return
|
974
|
+
return A(t) && A(n) && A(o) ? he({ r: Number(t), g: Number(n), b: Number(o), a: Number(i) }) : null;
|
975
975
|
}, "rgb"], [function(e) {
|
976
976
|
var t = e.h, n = e.s, o = e.l, r = e.a, i = r === void 0 ? 1 : r;
|
977
|
-
if (!
|
977
|
+
if (!A(t) || !A(n) || !A(o)) return null;
|
978
978
|
var s = me({ h: Number(t), s: Number(n), l: Number(o), a: Number(i) });
|
979
|
-
return
|
979
|
+
return ve(s);
|
980
980
|
}, "hsl"], [function(e) {
|
981
981
|
var t = e.h, n = e.s, o = e.v, r = e.a, i = r === void 0 ? 1 : r;
|
982
|
-
if (!
|
982
|
+
if (!A(t) || !A(n) || !A(o)) return null;
|
983
983
|
var s = function(u) {
|
984
|
-
return { h:
|
984
|
+
return { h: _e(u.h), s: N(u.s, 0, 100), v: N(u.v, 0, 100), a: N(u.a) };
|
985
985
|
}({ h: Number(t), s: Number(n), v: Number(o), a: Number(i) });
|
986
|
-
return
|
986
|
+
return Re(s);
|
987
987
|
}, "hsv"]] }, ge = function(e, t) {
|
988
988
|
for (var n = 0; n < t.length; n++) {
|
989
989
|
var o = t[n][0](e);
|
@@ -991,15 +991,15 @@ var Gt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
|
|
991
991
|
}
|
992
992
|
return [null, void 0];
|
993
993
|
}, Qt = function(e) {
|
994
|
-
return typeof e == "string" ? ge(e.trim(),
|
994
|
+
return typeof e == "string" ? ge(e.trim(), be.string) : typeof e == "object" && e !== null ? ge(e, be.object) : [null, void 0];
|
995
995
|
}, Y = function(e, t) {
|
996
|
-
var n =
|
997
|
-
return { h: n.h, s:
|
996
|
+
var n = z(e);
|
997
|
+
return { h: n.h, s: N(n.s + 100 * t, 0, 100), l: n.l, a: n.a };
|
998
998
|
}, J = function(e) {
|
999
999
|
return (299 * e.r + 587 * e.g + 114 * e.b) / 1e3 / 255;
|
1000
1000
|
}, xe = function(e, t) {
|
1001
|
-
var n =
|
1002
|
-
return { h: n.h, s: n.s, l:
|
1001
|
+
var n = z(e);
|
1002
|
+
return { h: n.h, s: n.s, l: N(n.l + 100 * t, 0, 100), a: n.a };
|
1003
1003
|
}, ye = function() {
|
1004
1004
|
function e(t) {
|
1005
1005
|
this.parsed = Qt(t)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
|
@@ -1021,38 +1021,38 @@ var Gt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
|
|
1021
1021
|
return t = K(this.rgba), n = t.r, o = t.g, r = t.b, (i = t.a) < 1 ? "rgba(" + n + ", " + o + ", " + r + ", " + i + ")" : "rgb(" + n + ", " + o + ", " + r + ")";
|
1022
1022
|
var t, n, o, r, i;
|
1023
1023
|
}, e.prototype.toHsl = function() {
|
1024
|
-
return
|
1024
|
+
return pe(z(this.rgba));
|
1025
1025
|
}, e.prototype.toHslString = function() {
|
1026
|
-
return t =
|
1026
|
+
return t = pe(z(this.rgba)), n = t.h, o = t.s, r = t.l, (i = t.a) < 1 ? "hsla(" + n + ", " + o + "%, " + r + "%, " + i + ")" : "hsl(" + n + ", " + o + "%, " + r + "%)";
|
1027
1027
|
var t, n, o, r, i;
|
1028
1028
|
}, e.prototype.toHsv = function() {
|
1029
|
-
return t =
|
1029
|
+
return t = Ae(this.rgba), { h: y(t.h), s: y(t.s), v: y(t.v), a: y(t.a, 3) };
|
1030
1030
|
var t;
|
1031
1031
|
}, e.prototype.invert = function() {
|
1032
|
-
return
|
1032
|
+
return I({ r: 255 - (t = this.rgba).r, g: 255 - t.g, b: 255 - t.b, a: t.a });
|
1033
1033
|
var t;
|
1034
1034
|
}, e.prototype.saturate = function(t) {
|
1035
|
-
return t === void 0 && (t = 0.1),
|
1035
|
+
return t === void 0 && (t = 0.1), I(Y(this.rgba, t));
|
1036
1036
|
}, e.prototype.desaturate = function(t) {
|
1037
|
-
return t === void 0 && (t = 0.1),
|
1037
|
+
return t === void 0 && (t = 0.1), I(Y(this.rgba, -t));
|
1038
1038
|
}, e.prototype.grayscale = function() {
|
1039
|
-
return
|
1039
|
+
return I(Y(this.rgba, -1));
|
1040
1040
|
}, e.prototype.lighten = function(t) {
|
1041
|
-
return t === void 0 && (t = 0.1),
|
1041
|
+
return t === void 0 && (t = 0.1), I(xe(this.rgba, t));
|
1042
1042
|
}, e.prototype.darken = function(t) {
|
1043
|
-
return t === void 0 && (t = 0.1),
|
1043
|
+
return t === void 0 && (t = 0.1), I(xe(this.rgba, -t));
|
1044
1044
|
}, e.prototype.rotate = function(t) {
|
1045
1045
|
return t === void 0 && (t = 15), this.hue(this.hue() + t);
|
1046
1046
|
}, e.prototype.alpha = function(t) {
|
1047
|
-
return typeof t == "number" ?
|
1047
|
+
return typeof t == "number" ? I({ r: (n = this.rgba).r, g: n.g, b: n.b, a: t }) : y(this.rgba.a, 3);
|
1048
1048
|
var n;
|
1049
1049
|
}, e.prototype.hue = function(t) {
|
1050
|
-
var n =
|
1051
|
-
return typeof t == "number" ?
|
1050
|
+
var n = z(this.rgba);
|
1051
|
+
return typeof t == "number" ? I({ h: t, s: n.s, l: n.l, a: n.a }) : y(n.h);
|
1052
1052
|
}, e.prototype.isEqual = function(t) {
|
1053
|
-
return this.toHex() ===
|
1053
|
+
return this.toHex() === I(t).toHex();
|
1054
1054
|
}, e;
|
1055
|
-
}(),
|
1055
|
+
}(), I = function(e) {
|
1056
1056
|
return e instanceof ye ? e : new ye(e);
|
1057
1057
|
};
|
1058
1058
|
const Xt = {
|
@@ -1064,7 +1064,7 @@ const Xt = {
|
|
1064
1064
|
viewBox: "0 0 24 24"
|
1065
1065
|
};
|
1066
1066
|
function tn(e, t, n, o, r, i) {
|
1067
|
-
return
|
1067
|
+
return E(), _("svg", en, t[0] || (t[0] = [
|
1068
1068
|
k("path", {
|
1069
1069
|
fill: "#757575",
|
1070
1070
|
d: "M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"
|
@@ -1080,7 +1080,7 @@ const nn = /* @__PURE__ */ Z(Xt, [["render", tn]]), on = {
|
|
1080
1080
|
viewBox: "0 0 24 24"
|
1081
1081
|
};
|
1082
1082
|
function sn(e, t, n, o, r, i) {
|
1083
|
-
return
|
1083
|
+
return E(), _("svg", rn, t[0] || (t[0] = [
|
1084
1084
|
k("path", {
|
1085
1085
|
fill: "#757575",
|
1086
1086
|
d: "m12 15l-4.243-4.242l1.415-1.414L12 12.172l2.828-2.828l1.415 1.414z"
|
@@ -1102,39 +1102,36 @@ const un = /* @__PURE__ */ Z(on, [["render", sn]]), an = /* @__PURE__ */ $e({
|
|
1102
1102
|
setup(e, { emit: t }) {
|
1103
1103
|
const n = t;
|
1104
1104
|
gt("n-chrome-tabs", $t());
|
1105
|
-
const { background: o = "#E5E7EB", active: r = "#fff", primary: i = "rgba(251,191,36,1)" } = e.colors ?? {}, s =
|
1106
|
-
|
1107
|
-
return (h = e.options) == null ? void 0 : h.findIndex((m) => m.key === s.value);
|
1108
|
-
}), { scrollRef: f, scrollToView: c } = qt({ activeClassName: `.${C}--active`, direction: "horizontal" });
|
1109
|
-
D(s, () => {
|
1105
|
+
const { background: o = "#E5E7EB", active: r = "#fff", primary: i = "rgba(251,191,36,1)" } = e.colors ?? {}, s = De(e, "value"), u = M(() => e.options?.findIndex((h) => h.key === s.value)), { scrollRef: f, scrollToView: c } = qt({ activeClassName: `.${w}--active`, direction: "horizontal" });
|
1106
|
+
O(s, () => {
|
1110
1107
|
c();
|
1111
1108
|
}, {
|
1112
1109
|
immediate: !0
|
1113
1110
|
});
|
1114
|
-
const d =
|
1115
|
-
function
|
1111
|
+
const d = M(() => I(o).darken(0.9).toHex()), a = M(() => I(r).darken(0.8).toHex()), v = M(() => I(i).darken(0.3).toHex());
|
1112
|
+
function S(h) {
|
1116
1113
|
n("click", h);
|
1117
1114
|
}
|
1118
1115
|
function l(h) {
|
1119
1116
|
n("contextmenu", h);
|
1120
1117
|
}
|
1121
|
-
function
|
1118
|
+
function p(h) {
|
1122
1119
|
n("close", h);
|
1123
1120
|
}
|
1124
|
-
return (h, m) => (
|
1125
|
-
class:
|
1126
|
-
style:
|
1127
|
-
"--background-color": `${
|
1121
|
+
return (h, m) => (E(), _("div", {
|
1122
|
+
class: C([b(P)]),
|
1123
|
+
style: Ve({
|
1124
|
+
"--background-color": `${b(o)}`,
|
1128
1125
|
"--background-color-dark": `${d.value}`,
|
1129
|
-
"--active-background-color": `${
|
1126
|
+
"--active-background-color": `${b(r)}`,
|
1130
1127
|
"--active-background-color-dark": `${a.value}`,
|
1131
|
-
"--primary-color": `${
|
1128
|
+
"--primary-color": `${b(i)}`,
|
1132
1129
|
"--primary-color-dark": `${v.value}`
|
1133
1130
|
})
|
1134
1131
|
}, [
|
1135
|
-
h.dropdown ? (
|
1132
|
+
h.dropdown ? (E(), _("div", {
|
1136
1133
|
key: 0,
|
1137
|
-
class:
|
1134
|
+
class: C([`${b(P)}__icon`])
|
1138
1135
|
}, [
|
1139
1136
|
q(un)
|
1140
1137
|
], 2)) : Q("", !0),
|
@@ -1142,29 +1139,29 @@ const un = /* @__PURE__ */ Z(on, [["render", sn]]), an = /* @__PURE__ */ $e({
|
|
1142
1139
|
k("div", {
|
1143
1140
|
ref_key: "scrollRef",
|
1144
1141
|
ref: f,
|
1145
|
-
class:
|
1142
|
+
class: C([`${b(P)}__content`])
|
1146
1143
|
}, [
|
1147
|
-
q(
|
1144
|
+
q(He, {
|
1148
1145
|
name: "group",
|
1149
1146
|
tag: "div",
|
1150
|
-
class:
|
1147
|
+
class: C([`${b(P)}__scroll`])
|
1151
1148
|
}, {
|
1152
|
-
default:
|
1153
|
-
(
|
1154
|
-
index:
|
1149
|
+
default: We(() => [
|
1150
|
+
(E(!0), _(Fe, null, qe(h.options, ({ key: $, ...T }, L) => (E(), X(_t, Ge({ key: $ }, { ref_for: !0 }, T, {
|
1151
|
+
index: L,
|
1155
1152
|
"active-index": u.value,
|
1156
|
-
onItemClick: (
|
1157
|
-
onItemContextmenu: (
|
1158
|
-
onItemClose: (
|
1153
|
+
onItemClick: (D) => S($),
|
1154
|
+
onItemContextmenu: (D) => l($),
|
1155
|
+
onItemClose: (D) => p($)
|
1159
1156
|
}), null, 16, ["index", "active-index", "onItemClick", "onItemContextmenu", "onItemClose"]))), 128))
|
1160
1157
|
]),
|
1161
1158
|
_: 1
|
1162
1159
|
}, 8, ["class"])
|
1163
1160
|
], 2),
|
1164
1161
|
ue(h.$slots, "suffix"),
|
1165
|
-
h.addable ? (
|
1162
|
+
h.addable ? (E(), _("div", {
|
1166
1163
|
key: 1,
|
1167
|
-
class:
|
1164
|
+
class: C([`${b(P)}__icon`]),
|
1168
1165
|
onClick: m[0] || (m[0] = ($) => n("add"))
|
1169
1166
|
}, [
|
1170
1167
|
q(nn)
|
@@ -1173,6 +1170,6 @@ const un = /* @__PURE__ */ Z(on, [["render", sn]]), an = /* @__PURE__ */ $e({
|
|
1173
1170
|
}
|
1174
1171
|
});
|
1175
1172
|
export {
|
1176
|
-
|
1173
|
+
_t as CTabItem,
|
1177
1174
|
an as CTabs
|
1178
1175
|
};
|