vlite3 1.2.4 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -8
- package/components/AvatarGroup/AvatarGroup.vue.js +10 -9
- package/components/Beacon.vue.d.ts +13 -0
- package/components/Button.vue.js +18 -18
- package/components/Chart/GanttChart.vue.d.ts +67 -0
- package/components/Chart/GanttChart.vue.js +7 -0
- package/components/Chart/GanttChart.vue2.js +911 -0
- package/components/Chart/SpeedometerChart.vue.d.ts +54 -0
- package/components/Chart/SpeedometerChart.vue.js +558 -0
- package/components/Chart/SpeedometerChart.vue2.js +4 -0
- package/components/Chart/index.d.ts +3 -1
- package/components/Chart/types.d.ts +106 -0
- package/components/ChoiceBox/ChoiceBox.vue.d.ts +46 -1
- package/components/ChoiceBox/ChoiceBox.vue.js +274 -91
- package/components/ChoiceBox/index.d.ts +1 -1
- package/components/{CopyButton.vue.d.ts → Clipboard.vue.d.ts} +4 -3
- package/components/{CopyButton.vue.js → Clipboard.vue.js} +19 -19
- package/components/Clipboard.vue2.js +4 -0
- package/components/ColorPicker/ColorPicker.vue.js +1 -1
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
- package/components/DataTable/DataTableHeader.vue.js +33 -30
- package/components/DataTable/types.d.ts +1 -1
- package/components/ImageComparison/ImageComparison.vue.d.ts +29 -0
- package/components/ImageComparison/ImageComparison.vue.js +126 -0
- package/components/ImageComparison/ImageComparison.vue2.js +4 -0
- package/components/ImageComparison/index.d.ts +1 -0
- package/components/ImportData/ImportData.vue.js +1 -1
- package/components/Modal.vue.js +1 -1
- package/components/Modal.vue2.js +92 -86
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/OTPInput/OTPInput.vue.d.ts +18 -0
- package/components/OTPInput/OTPInput.vue.js +127 -82
- package/components/Persona.vue.d.ts +25 -0
- package/components/PricingPlan/PricingPlanItem.vue.js +19 -19
- package/components/Radio.vue.d.ts +41 -0
- package/components/Radio.vue.js +97 -0
- package/components/Radio.vue2.js +4 -0
- package/components/RadioGroup.vue.d.ts +38 -0
- package/components/RadioGroup.vue.js +37 -0
- package/components/RadioGroup.vue2.js +4 -0
- package/components/SidePanel.vue.js +1 -1
- package/components/SidePanel.vue2.js +45 -57
- package/components/SidebarMenu/SidebarMenuItem.vue.js +70 -74
- package/components/Slider.vue.d.ts +7 -0
- package/components/Slider.vue.js +194 -120
- package/components/ThemeToggle.vue.js +10 -10
- package/components/Timeline/Timeline.vue.d.ts +1 -1
- package/components/index.d.ts +3 -1
- package/index.d.ts +4 -1
- package/index.js +148 -138
- package/package.json +1 -1
- package/style.css +58 -40
- package/types/form.type.d.ts +23 -0
- package/components/CopyButton.vue2.js +0 -4
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import { defineComponent as f, ref as p, computed as
|
|
1
|
+
import { defineComponent as f, ref as p, computed as i, openBlock as m, createBlock as x, normalizeClass as T, withCtx as v, renderSlot as y, createCommentVNode as I } from "vue";
|
|
2
2
|
import C from "./Button.vue.js";
|
|
3
|
-
import { $t as
|
|
4
|
-
const
|
|
5
|
-
__name: "
|
|
3
|
+
import { $t as d } from "../utils/i18n.js";
|
|
4
|
+
const w = /* @__PURE__ */ f({
|
|
5
|
+
__name: "Clipboard",
|
|
6
6
|
props: {
|
|
7
7
|
textToCopy: {},
|
|
8
8
|
variant: { default: "outline" },
|
|
9
9
|
size: { default: "md" },
|
|
10
|
-
rounded: {},
|
|
10
|
+
rounded: { default: "full" },
|
|
11
11
|
class: {},
|
|
12
12
|
disabled: { type: Boolean },
|
|
13
13
|
defaultIcon: { default: "lucide:copy" },
|
|
14
14
|
copiedIcon: { default: "lucide:check" },
|
|
15
15
|
defaultText: {},
|
|
16
16
|
copiedText: {},
|
|
17
|
-
defaultTextI18n: { default: "vlite.
|
|
18
|
-
copiedTextI18n: { default: "vlite.
|
|
17
|
+
defaultTextI18n: { default: "vlite.clipboard.copy" },
|
|
18
|
+
copiedTextI18n: { default: "vlite.clipboard.copied" },
|
|
19
19
|
asIcon: { type: Boolean, default: !1 }
|
|
20
20
|
},
|
|
21
21
|
emits: ["copy", "error"],
|
|
22
|
-
setup(o, { emit:
|
|
23
|
-
const e = o,
|
|
22
|
+
setup(o, { emit: r }) {
|
|
23
|
+
const e = o, l = r, a = p(!1);
|
|
24
24
|
let n = null;
|
|
25
|
-
const u =
|
|
25
|
+
const u = i(() => a.value ? e.copiedIcon : e.defaultIcon), c = i(() => {
|
|
26
26
|
if (!e.asIcon)
|
|
27
27
|
if (a.value) {
|
|
28
28
|
if (e.copiedText) return e.copiedText;
|
|
29
|
-
const t =
|
|
29
|
+
const t = d(e.copiedTextI18n);
|
|
30
30
|
return t !== e.copiedTextI18n ? t : "Copied";
|
|
31
31
|
} else {
|
|
32
32
|
if (e.defaultText) return e.defaultText;
|
|
33
|
-
const t =
|
|
33
|
+
const t = d(e.defaultTextI18n);
|
|
34
34
|
return t !== e.defaultTextI18n ? t : "Copy";
|
|
35
35
|
}
|
|
36
36
|
}), s = async () => {
|
|
37
37
|
if (!e.disabled)
|
|
38
38
|
try {
|
|
39
|
-
await navigator.clipboard.writeText(e.textToCopy), a.value = !0,
|
|
39
|
+
await navigator.clipboard.writeText(e.textToCopy), a.value = !0, l("copy", e.textToCopy), n && clearTimeout(n), n = setTimeout(() => {
|
|
40
40
|
a.value = !1;
|
|
41
41
|
}, 500);
|
|
42
42
|
} catch (t) {
|
|
43
|
-
|
|
43
|
+
l("error", t instanceof Error ? t : new Error("Copy failed"));
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
|
-
return (t,
|
|
46
|
+
return (t, b) => (m(), x(C, {
|
|
47
47
|
variant: o.variant,
|
|
48
48
|
size: o.size,
|
|
49
49
|
rounded: o.rounded,
|
|
50
50
|
class: T(e.class),
|
|
51
51
|
disabled: o.disabled,
|
|
52
52
|
icon: u.value,
|
|
53
|
-
text:
|
|
53
|
+
text: c.value,
|
|
54
54
|
"as-icon": o.asIcon,
|
|
55
55
|
onClick: s
|
|
56
56
|
}, {
|
|
57
|
-
default:
|
|
58
|
-
!o.asIcon && !
|
|
57
|
+
default: v(() => [
|
|
58
|
+
!o.asIcon && !c.value ? y(t.$slots, "default", {
|
|
59
59
|
key: 0,
|
|
60
60
|
copied: a.value
|
|
61
61
|
}) : I("", !0)
|
|
@@ -65,5 +65,5 @@ const z = /* @__PURE__ */ f({
|
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
export {
|
|
68
|
-
|
|
68
|
+
w as default
|
|
69
69
|
};
|
|
@@ -11,7 +11,7 @@ import E from "./ColorIro.vue.js";
|
|
|
11
11
|
import { useEyeDropper as P } from "@vueuse/core";
|
|
12
12
|
const I = {
|
|
13
13
|
key: 0,
|
|
14
|
-
class: "p-
|
|
14
|
+
class: "p-1 w-max flex flex-col justify-center"
|
|
15
15
|
}, N = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "flex items-center gap-1.5 w-full"
|
|
@@ -4,7 +4,7 @@ import k from "../Icon.vue.js";
|
|
|
4
4
|
import { $t as E } from "../../utils/i18n.js";
|
|
5
5
|
import { useCommandPaletteItems as Y } from "./useCommandPaletteItems.js";
|
|
6
6
|
import { useCommandPaletteNav as Z } from "./useCommandPaletteNav.js";
|
|
7
|
-
import ee from "./CommandPaletteItem.
|
|
7
|
+
import ee from "./CommandPaletteItem.vue.js";
|
|
8
8
|
const te = { class: "command-palette-content flex flex-col w-full h-full max-h-[70vh]" }, oe = { class: "flex items-center gap-3 px-4 py-3 border-b border-border/80 shrink-0" }, se = ["placeholder"], ne = ["aria-label"], re = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "flex flex-col items-center justify-center py-14 px-6 text-center select-none",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { $t as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as y, computed as t, openBlock as s, createElementBlock as i, normalizeClass as a, createElementVNode as c, toDisplayString as v, createVNode as C, createCommentVNode as b } from "vue";
|
|
2
|
+
import w from "../Icon.vue.js";
|
|
3
|
+
import { $t as B } from "../../utils/i18n.js";
|
|
4
|
+
const _ = { class: "text-xs font-bold! uppercase tracking-wider text-gray-900 truncate" }, k = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "w-4 h-4 shrink-0"
|
|
7
|
-
},
|
|
7
|
+
}, j = /* @__PURE__ */ y({
|
|
8
8
|
__name: "DataTableHeader",
|
|
9
9
|
props: {
|
|
10
10
|
header: {},
|
|
@@ -15,43 +15,46 @@ const B = { class: "text-xs font-bold! uppercase tracking-wider text-gray-900 tr
|
|
|
15
15
|
cellBordered: { type: Boolean }
|
|
16
16
|
},
|
|
17
17
|
emits: ["sort"],
|
|
18
|
-
setup(
|
|
19
|
-
const e =
|
|
20
|
-
() => e.sortConfig?.field ===
|
|
21
|
-
),
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
setup(l, { emit: d }) {
|
|
19
|
+
const e = l, u = d, n = t(() => e.header.sortKey || e.header.field), f = t(
|
|
20
|
+
() => e.sortConfig?.field === n.value && e.sortConfig?.order
|
|
21
|
+
), p = t(() => !e.sortConfig || e.sortConfig.field !== n.value ? "lucide:chevrons-up-down" : e.sortConfig.order === "asc" ? "lucide:arrow-up" : e.sortConfig.order === "desc" ? "lucide:arrow-down" : "lucide:chevrons-up-down"), r = t(() => {
|
|
22
|
+
const o = !!e.header.title || !!e.header.titleI18n;
|
|
23
|
+
return e.tableSortable && e.header.sortable !== !1 && o;
|
|
24
|
+
}), h = () => {
|
|
25
|
+
r.value && u("sort", e.header.field);
|
|
26
|
+
}, m = t(() => ({
|
|
24
27
|
left: "justify-start text-left",
|
|
25
28
|
center: "justify-center text-center",
|
|
26
29
|
right: "justify-end text-right"
|
|
27
|
-
})[e.header.align || "left"]),
|
|
28
|
-
() => e.header.titleI18n ?
|
|
29
|
-
),
|
|
30
|
-
return (
|
|
30
|
+
})[e.header.align || "left"]), g = t(
|
|
31
|
+
() => e.header.titleI18n ? B(e.header.titleI18n) : e.header.title
|
|
32
|
+
), x = t(() => e.size === "xs" || e.compact ? `py-1.5! ${e.cellBordered ? "px-3!" : ""}` : e.size === "sm" ? `py-2! ${e.cellBordered ? "px-3!" : ""}` : e.size === "lg" ? `py-4! ${e.cellBordered ? "px-4!" : ""}` : `py-3! ${e.cellBordered ? "px-3.5!" : ""}`);
|
|
33
|
+
return (o, S) => (s(), i("th", {
|
|
31
34
|
scope: "col",
|
|
32
|
-
class:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
class: a(["group/th px-3 text-left align-middle font-medium text-muted-foreground transition-colors [&:has([role=checkbox])]:pr-0 overflow-hidden max-w-[400px]", [
|
|
36
|
+
x.value,
|
|
37
|
+
r.value ? "cursor-pointer hover:bg-muted/50" : "",
|
|
38
|
+
l.header.hideOnMobile ? "hidden md:table-cell" : ""
|
|
36
39
|
]]),
|
|
37
|
-
onClick:
|
|
40
|
+
onClick: h
|
|
38
41
|
}, [
|
|
39
|
-
|
|
40
|
-
class:
|
|
42
|
+
c("div", {
|
|
43
|
+
class: a(["flex items-center gap-2 space-x-2", m.value])
|
|
41
44
|
}, [
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
icon:
|
|
46
|
-
class:
|
|
47
|
-
|
|
45
|
+
c("span", _, v(g.value), 1),
|
|
46
|
+
r.value ? (s(), i("span", k, [
|
|
47
|
+
C(w, {
|
|
48
|
+
icon: p.value,
|
|
49
|
+
class: a(["w-3.5 h-3.5 transition-all text-muted-foreground mt-0.5", [
|
|
50
|
+
f.value ? "opacity-100 text-foreground" : "opacity-0 group-hover/th:opacity-100"
|
|
48
51
|
]])
|
|
49
52
|
}, null, 8, ["icon", "class"])
|
|
50
|
-
])) :
|
|
53
|
+
])) : b("", !0)
|
|
51
54
|
], 2)
|
|
52
55
|
], 2));
|
|
53
56
|
}
|
|
54
57
|
});
|
|
55
58
|
export {
|
|
56
|
-
|
|
59
|
+
j as default
|
|
57
60
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
beforeImage: string;
|
|
3
|
+
afterImage: string;
|
|
4
|
+
beforeLabel?: string;
|
|
5
|
+
afterLabel?: string;
|
|
6
|
+
initialPosition?: number;
|
|
7
|
+
hover?: boolean;
|
|
8
|
+
width?: string | number;
|
|
9
|
+
height?: string | number;
|
|
10
|
+
containerClass?: string;
|
|
11
|
+
handleClass?: string;
|
|
12
|
+
showHandle?: boolean;
|
|
13
|
+
variant?: 'one' | 'two';
|
|
14
|
+
};
|
|
15
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
16
|
+
width: string | number;
|
|
17
|
+
height: string | number;
|
|
18
|
+
variant: "one" | "two";
|
|
19
|
+
containerClass: string;
|
|
20
|
+
hover: boolean;
|
|
21
|
+
beforeLabel: string;
|
|
22
|
+
afterLabel: string;
|
|
23
|
+
initialPosition: number;
|
|
24
|
+
handleClass: string;
|
|
25
|
+
showHandle: boolean;
|
|
26
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
27
|
+
containerRef: HTMLDivElement;
|
|
28
|
+
}, HTMLDivElement>;
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { defineComponent as k, ref as w, onMounted as C, onUnmounted as E, computed as M, openBlock as a, createElementBlock as i, normalizeStyle as b, normalizeClass as s, createElementVNode as n, toDisplayString as v, createCommentVNode as r, setBlockTracking as p, createVNode as B } from "vue";
|
|
2
|
+
import X from "../Icon.vue.js";
|
|
3
|
+
const z = ["src"], I = ["src"], j = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "absolute top-4 flex w-full justify-center pointer-events-none"
|
|
6
|
+
}, D = { class: "bg-[#4846468d] backdrop-blur-sm px-3 py-1 rounded-full -text-fs-3 font-medium text-[white] whitespace-nowrap" }, P = { class: "bg-[#4846468d] backdrop-blur-sm px-3 py-1 rounded-full -text-fs-3 font-medium text-[white] whitespace-nowrap" }, R = /* @__PURE__ */ k({
|
|
7
|
+
__name: "ImageComparison",
|
|
8
|
+
props: {
|
|
9
|
+
beforeImage: {},
|
|
10
|
+
afterImage: {},
|
|
11
|
+
beforeLabel: { default: "Before" },
|
|
12
|
+
afterLabel: { default: "After" },
|
|
13
|
+
initialPosition: { default: 50 },
|
|
14
|
+
hover: { type: Boolean, default: !1 },
|
|
15
|
+
width: { default: "100%" },
|
|
16
|
+
height: { default: "auto" },
|
|
17
|
+
containerClass: { default: "" },
|
|
18
|
+
handleClass: { default: "" },
|
|
19
|
+
showHandle: { type: Boolean, default: !0 },
|
|
20
|
+
variant: { default: "one" }
|
|
21
|
+
},
|
|
22
|
+
setup(o) {
|
|
23
|
+
const u = o, l = w(u.initialPosition), c = w(!1), h = w(null), m = (e) => {
|
|
24
|
+
if (!h.value) return;
|
|
25
|
+
const t = h.value.getBoundingClientRect(), L = (e - t.left) / t.width * 100;
|
|
26
|
+
l.value = Math.max(0, Math.min(100, L));
|
|
27
|
+
}, y = (e) => {
|
|
28
|
+
u.hover && !c.value && m(e.clientX);
|
|
29
|
+
}, g = (e) => {
|
|
30
|
+
c.value = !0;
|
|
31
|
+
const t = "touches" in e ? e.touches[0].clientX : e.clientX;
|
|
32
|
+
m(t);
|
|
33
|
+
}, d = (e) => {
|
|
34
|
+
if (!c.value) return;
|
|
35
|
+
"touches" in e && e.cancelable && e.preventDefault();
|
|
36
|
+
const t = "touches" in e ? e.touches[0].clientX : e.clientX;
|
|
37
|
+
m(t);
|
|
38
|
+
}, f = () => {
|
|
39
|
+
c.value = !1;
|
|
40
|
+
};
|
|
41
|
+
C(() => {
|
|
42
|
+
window.addEventListener("mousemove", d), window.addEventListener("touchmove", d, { passive: !1 }), window.addEventListener("mouseup", f), window.addEventListener("touchend", f);
|
|
43
|
+
}), E(() => {
|
|
44
|
+
window.removeEventListener("mousemove", d), window.removeEventListener("touchmove", d), window.removeEventListener("mouseup", f), window.removeEventListener("touchend", f);
|
|
45
|
+
});
|
|
46
|
+
const x = M(() => {
|
|
47
|
+
const e = (t) => typeof t == "number" ? `${t}px` : t;
|
|
48
|
+
return {
|
|
49
|
+
width: e(u.width),
|
|
50
|
+
height: e(u.height)
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
return (e, t) => (a(), i("div", {
|
|
54
|
+
ref_key: "containerRef",
|
|
55
|
+
ref: h,
|
|
56
|
+
class: s(["relative overflow-hidden select-none cursor-ew-resize rounded-2xl group", o.containerClass]),
|
|
57
|
+
style: b(x.value),
|
|
58
|
+
onMousemove: y,
|
|
59
|
+
onMousedown: g,
|
|
60
|
+
onTouchstartPassive: g
|
|
61
|
+
}, [
|
|
62
|
+
n("img", {
|
|
63
|
+
src: o.afterImage,
|
|
64
|
+
class: s(["block w-full object-cover select-none", u.height === "auto" ? "h-auto" : "h-full"]),
|
|
65
|
+
alt: "After",
|
|
66
|
+
draggable: "false"
|
|
67
|
+
}, null, 10, z),
|
|
68
|
+
o.afterLabel && o.variant === "one" ? (a(), i("div", {
|
|
69
|
+
key: 0,
|
|
70
|
+
class: s(["absolute top-4 right-4 bg-[#4846468d] px-3 py-1 -text-fs-4 rounded-full -text-fs-3 font-medium text-[white] transition-opacity duration-300 pointer-events-none", l.value > 80 ? "opacity-0" : "opacity-100"])
|
|
71
|
+
}, v(o.afterLabel), 3)) : r("", !0),
|
|
72
|
+
n("div", {
|
|
73
|
+
class: "absolute inset-0 w-full h-full",
|
|
74
|
+
style: b({ clipPath: `inset(0 ${100 - l.value}% 0 0)`, willChange: "clip-path" })
|
|
75
|
+
}, [
|
|
76
|
+
n("img", {
|
|
77
|
+
src: o.beforeImage,
|
|
78
|
+
class: "absolute inset-0 w-full h-full object-cover select-none",
|
|
79
|
+
alt: "Before",
|
|
80
|
+
draggable: "false"
|
|
81
|
+
}, null, 8, I)
|
|
82
|
+
], 4),
|
|
83
|
+
o.beforeLabel && o.variant === "one" ? (a(), i("div", {
|
|
84
|
+
key: 1,
|
|
85
|
+
class: s(["absolute top-4 left-4 bg-[#4846468d] px-3 py-1 -text-fs-4 rounded-full -text-fs-3 font-medium text-[white] transition-opacity duration-300 pointer-events-none z-10", l.value < 20 ? "opacity-0" : "opacity-100"])
|
|
86
|
+
}, v(o.beforeLabel), 3)) : r("", !0),
|
|
87
|
+
n("div", {
|
|
88
|
+
class: "absolute top-0 bottom-0 flex flex-col items-center justify-center cursor-ew-resize z-20 pointer-events-none",
|
|
89
|
+
style: b({
|
|
90
|
+
left: `${l.value}%`,
|
|
91
|
+
transform: "translateX(-50%)",
|
|
92
|
+
willChange: "transform"
|
|
93
|
+
})
|
|
94
|
+
}, [
|
|
95
|
+
o.variant === "two" ? (a(), i("div", j, [
|
|
96
|
+
o.beforeLabel ? (a(), i("div", {
|
|
97
|
+
key: 0,
|
|
98
|
+
class: s(["absolute right-full pr-3 transition-opacity duration-300", l.value < 23 ? "opacity-0" : "opacity-100"])
|
|
99
|
+
}, [
|
|
100
|
+
n("div", D, v(o.beforeLabel), 1)
|
|
101
|
+
], 2)) : r("", !0),
|
|
102
|
+
o.afterLabel ? (a(), i("div", {
|
|
103
|
+
key: 1,
|
|
104
|
+
class: s(["absolute left-full pl-3 transition-opacity duration-300", l.value > 78 ? "opacity-0" : "opacity-100"])
|
|
105
|
+
}, [
|
|
106
|
+
n("div", P, v(o.afterLabel), 1)
|
|
107
|
+
], 2)) : r("", !0)
|
|
108
|
+
])) : r("", !0),
|
|
109
|
+
t[1] || (t[1] = n("div", { class: "w-px h-full bg-[white]" }, null, -1)),
|
|
110
|
+
o.showHandle ? (a(), i("div", {
|
|
111
|
+
key: 1,
|
|
112
|
+
class: s(["w-7 h-7 border-[1.5px] border-[white] rounded-full flex-shrink-0 flex items-center justify-center transform transition-all duration-200", [c.value ? "scale-110 " : "group-hover:scale-105", o.handleClass]])
|
|
113
|
+
}, [
|
|
114
|
+
t[0] || (p(-1, !0), (t[0] = B(X, {
|
|
115
|
+
icon: "lucide:chevrons-left-right",
|
|
116
|
+
class: "w-4 h-4 text-[white]"
|
|
117
|
+
})).cacheIndex = 0, p(1), t[0])
|
|
118
|
+
], 2)) : r("", !0),
|
|
119
|
+
t[2] || (t[2] = n("div", { class: "w-px h-full bg-[white]" }, null, -1))
|
|
120
|
+
], 4)
|
|
121
|
+
], 38));
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
export {
|
|
125
|
+
R as default
|
|
126
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ImageComparison } from './ImageComparison.vue';
|
|
@@ -159,7 +159,7 @@ const xe = { class: "px-2" }, ye = { class: "min-h-[300px]" }, De = {
|
|
|
159
159
|
ue(pe(fe), {
|
|
160
160
|
steps: Y.value,
|
|
161
161
|
"active-step": a.value - 1,
|
|
162
|
-
class: "mb-
|
|
162
|
+
class: "mb-8"
|
|
163
163
|
}, null, 8, ["steps", "active-step"]),
|
|
164
164
|
B("div", ye, [
|
|
165
165
|
a.value === 1 ? (n(), d(he, {
|
package/components/Modal.vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Modal.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b47509d4"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
package/components/Modal.vue2.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useKeyStroke as
|
|
4
|
-
import { $t as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as R, ref as f, inject as V, computed as p, markRaw as W, watch as T, provide as K, nextTick as L, onMounted as A, onUnmounted as U, openBlock as s, createElementBlock as a, Fragment as q, mergeProps as B, withModifiers as S, renderSlot as v, createCommentVNode as r, createBlock as I, Teleport as G, normalizeClass as i, createVNode as z, Transition as H, withCtx as J, createElementVNode as h, toDisplayString as F, resolveDynamicComponent as Q } from "vue";
|
|
2
|
+
import X from "./Button.vue.js";
|
|
3
|
+
import { useKeyStroke as Y } from "../composables/useKeyStroke.js";
|
|
4
|
+
import { $t as O } from "../utils/i18n.js";
|
|
5
|
+
const Z = ["data-testid"], _ = ["data-testid"], ee = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "flex-none flex flex-col space-y-1.5 pb-0 border-b border-border/90"
|
|
8
|
-
},
|
|
8
|
+
}, te = { class: "text-lg font-semibold leading-none tracking-tight" }, oe = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "text-sm text-muted-foreground mb-3.5"
|
|
11
|
-
},
|
|
11
|
+
}, de = /* @__PURE__ */ R({
|
|
12
12
|
inheritAttrs: !1,
|
|
13
13
|
__name: "Modal",
|
|
14
14
|
props: {
|
|
@@ -28,113 +28,119 @@ const X = ["data-testid"], Y = ["data-testid"], Z = {
|
|
|
28
28
|
bodyProps: {}
|
|
29
29
|
},
|
|
30
30
|
emits: ["close", "update:show", "onOpen"],
|
|
31
|
-
setup(
|
|
32
|
-
const
|
|
31
|
+
setup(o, { emit: j }) {
|
|
32
|
+
const t = o, u = j, l = f(t.show), k = f(!1), b = f(!1), C = f(null);
|
|
33
33
|
let c = null;
|
|
34
|
-
const
|
|
34
|
+
const g = f(!1), d = V("dropdown-context", null), w = p(() => t.body ? W(t.body) : void 0);
|
|
35
35
|
T(
|
|
36
|
-
() =>
|
|
36
|
+
() => t.show,
|
|
37
37
|
(e) => {
|
|
38
|
-
l.value = e, e && (u("onOpen"),
|
|
38
|
+
l.value = e, e && (u("onOpen"), d?.close());
|
|
39
39
|
}
|
|
40
40
|
);
|
|
41
|
-
const
|
|
42
|
-
l.value = !0,
|
|
43
|
-
}, D = (e) => {
|
|
44
|
-
k.value = e;
|
|
41
|
+
const D = () => {
|
|
42
|
+
l.value = !0, d?.close();
|
|
45
43
|
}, E = (e) => {
|
|
46
|
-
|
|
44
|
+
k.value = e;
|
|
45
|
+
}, M = (e) => {
|
|
46
|
+
g.value = e;
|
|
47
47
|
}, m = () => {
|
|
48
48
|
if (k.value) {
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
b.value = !0, c && clearTimeout(c), c = setTimeout(() => {
|
|
50
|
+
b.value = !1;
|
|
51
51
|
}, 1e3);
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
54
|
l.value = !1, u("update:show", !1), u("close");
|
|
55
|
-
},
|
|
55
|
+
}, y = () => {
|
|
56
56
|
l.value = !1, u("update:show", !1), u("close");
|
|
57
57
|
};
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
}, { onKeyStroke:
|
|
62
|
-
|
|
63
|
-
e ? (
|
|
64
|
-
}), L(() => {
|
|
65
|
-
l.value && a?.onChildToggle?.(!0);
|
|
58
|
+
K("modal-context", { close: m, setSubmitting: E, registerFormFooter: M });
|
|
59
|
+
const N = () => {
|
|
60
|
+
t.closeOutside && m();
|
|
61
|
+
}, { onKeyStroke: P } = Y();
|
|
62
|
+
P("Escape", m), T(l, async (e) => {
|
|
63
|
+
e ? (d?.onChildToggle?.(!0), document.body.style.overflow = "hidden", await L(), C.value?.focus()) : (document.body.style.overflow = "", d?.onChildToggle?.(!1), g.value = !1);
|
|
66
64
|
}), A(() => {
|
|
67
|
-
l.value &&
|
|
65
|
+
l.value && d?.onChildToggle?.(!0);
|
|
66
|
+
}), U(() => {
|
|
67
|
+
l.value && d?.onChildToggle?.(!1), document.body.style.overflow = "", c && clearTimeout(c);
|
|
68
68
|
});
|
|
69
|
-
const
|
|
70
|
-
() =>
|
|
69
|
+
const n = p(() => t.titleI18n ? O(t.titleI18n) : t.title), x = p(
|
|
70
|
+
() => t.descriptionI18n ? O(t.descriptionI18n) : t.description
|
|
71
71
|
);
|
|
72
|
-
return (e, $) => (s(),
|
|
73
|
-
e.$slots?.trigger || e.$slots?.default ? (s(),
|
|
72
|
+
return (e, $) => (s(), a(q, null, [
|
|
73
|
+
e.$slots?.trigger || e.$slots?.default ? (s(), a("span", B({
|
|
74
74
|
key: 0,
|
|
75
|
-
onClick: S(
|
|
76
|
-
class: `${
|
|
75
|
+
onClick: S(D, ["stop"]),
|
|
76
|
+
class: `${o.triggerClass}`
|
|
77
77
|
}, e.$attrs, {
|
|
78
|
-
"data-testid": e.$attrs["data-testid"] ? `${e.$attrs["data-testid"]}-trigger` :
|
|
78
|
+
"data-testid": e.$attrs["data-testid"] ? `${e.$attrs["data-testid"]}-trigger` : n.value ? `modal-trigger-${n.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "modal-trigger"
|
|
79
79
|
}), [
|
|
80
80
|
v(e.$slots, "trigger", {}, () => [
|
|
81
|
-
|
|
81
|
+
o.body ? v(e.$slots, "default", { key: 0 }, void 0, !0) : r("", !0)
|
|
82
82
|
], !0)
|
|
83
|
-
], 16,
|
|
84
|
-
(s(), I(
|
|
85
|
-
l.value ? (s(),
|
|
83
|
+
], 16, Z)) : r("", !0),
|
|
84
|
+
(s(), I(G, { to: "body" }, [
|
|
85
|
+
l.value ? (s(), a("div", {
|
|
86
86
|
key: 0,
|
|
87
|
-
class: i(["fixed inset-0 z-50 flex items-center justify-center p-4 v-modal-overlay",
|
|
88
|
-
onClick:
|
|
87
|
+
class: i(["fixed inset-0 z-50 flex items-center justify-center p-4 v-modal-overlay", o.backdrop ? "v-modal-backdrop" : ""]),
|
|
88
|
+
onClick: N
|
|
89
89
|
}, [
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
class: i(["flex items-center justify-between py-2 px-4 rounded-t-md", t.headerClass])
|
|
90
|
+
z(H, { name: "modal-dialog" }, {
|
|
91
|
+
default: J(() => [
|
|
92
|
+
l.value ? (s(), a("div", {
|
|
93
|
+
key: 0,
|
|
94
|
+
ref_key: "modalRef",
|
|
95
|
+
ref: C,
|
|
96
|
+
tabindex: "-1",
|
|
97
|
+
role: "dialog",
|
|
98
|
+
"aria-modal": "true",
|
|
99
|
+
class: i(["modal-body relative w-full rounded border border-border/60 bg-body shadow-lg text-foreground flex flex-col max-h-[85vh] sm:max-h-[90vh] focus:outline-none", [o.maxWidth]]),
|
|
100
|
+
"data-testid": e.$attrs["data-testid"] || (n.value ? `modal-${n.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "modal"),
|
|
101
|
+
onClick: $[0] || ($[0] = S(() => {
|
|
102
|
+
}, ["stop"]))
|
|
104
103
|
}, [
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
104
|
+
n.value ? (s(), a("div", ee, [
|
|
105
|
+
h("div", {
|
|
106
|
+
class: i(["flex items-center justify-between py-2 px-4 rounded-t-md", o.headerClass])
|
|
107
|
+
}, [
|
|
108
|
+
h("h3", te, F(n.value), 1),
|
|
109
|
+
z(X, {
|
|
110
|
+
rounded: "full",
|
|
111
|
+
size: "sm",
|
|
112
|
+
icon: "lucide:x",
|
|
113
|
+
variant: "ghost",
|
|
114
|
+
class: i(["hover:bg-gray-250/25!", { "blink-bg": b.value }]),
|
|
115
|
+
"data-testid": "modal-close-btn",
|
|
116
|
+
onClick: m
|
|
117
|
+
}, null, 8, ["class"])
|
|
118
|
+
], 2)
|
|
119
|
+
])) : r("", !0),
|
|
120
|
+
h("div", {
|
|
121
|
+
class: i(["flex-1 overflow-y-auto px-4 pt-4 min-h-0 scrollbar-thin scrollbar-stable", [g.value ? "pb-0" : "pb-3.5", o.bodyClass]])
|
|
122
|
+
}, [
|
|
123
|
+
x.value ? (s(), a("p", oe, F(x.value), 1)) : r("", !0),
|
|
124
|
+
w.value ? (s(), I(Q(w.value), B({ key: 1 }, { ...o.bodyProps, ...e.$attrs }, { close: y }), null, 16)) : v(e.$slots, "default", {
|
|
125
|
+
key: 2,
|
|
126
|
+
close: y
|
|
127
|
+
}, void 0, !0)
|
|
128
|
+
], 2),
|
|
129
|
+
e.$slots.footer ? (s(), a("div", {
|
|
130
|
+
key: 1,
|
|
131
|
+
class: i([o.footerClass, "flex-none flex items-center px-4 py-3 border-t border-border/75 rounded-b-xl bg-body"])
|
|
132
|
+
}, [
|
|
133
|
+
v(e.$slots, "footer", { close: y }, void 0, !0)
|
|
134
|
+
], 2)) : r("", !0)
|
|
135
|
+
], 10, _)) : r("", !0)
|
|
136
|
+
]),
|
|
137
|
+
_: 3
|
|
138
|
+
})
|
|
139
|
+
], 2)) : r("", !0)
|
|
134
140
|
]))
|
|
135
141
|
], 64));
|
|
136
142
|
}
|
|
137
143
|
});
|
|
138
144
|
export {
|
|
139
|
-
|
|
145
|
+
de as default
|
|
140
146
|
};
|