vlite3 0.2.5 → 0.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/components/Button.vue.js +43 -34
- package/components/Carousel/Carousel.vue.d.ts +10 -42
- package/components/ChoiceBox/ChoiceBox.vue.js +19 -19
- package/components/ColorPicker/ColorIro.vue.d.ts +18 -1
- package/components/ColorPicker/ColorIro.vue.js +59 -61
- package/components/ColorPicker/ColorPicker.vue.d.ts +2 -0
- package/components/ColorPicker/ColorPicker.vue.js +81 -26
- package/components/Input.vue.js +1 -1
- package/components/Tabes/Tabes.vue.js +10 -10
- package/components/ThemeToggle.vue.d.ts +1 -1
- package/components/ThemeToggle.vue.js +10 -12
- package/components/Workbook/Sheet.vue.d.ts +6 -0
- package/components/Workbook/Sheet.vue.js +69 -54
- package/components/Workbook/Workbook.vue.d.ts +3 -0
- package/components/Workbook/Workbook.vue.js +2 -2
- package/components/Workbook/Workbook.vue2.js +69 -63
- package/components/Workbook/types.d.ts +3 -0
- package/package.json +2 -2
- package/style.css +4 -0
|
@@ -6,6 +6,7 @@ interface Props {
|
|
|
6
6
|
size?: 'sm' | 'md' | 'lg';
|
|
7
7
|
position?: TooltTipPlacement;
|
|
8
8
|
btnProps?: ButtonProps;
|
|
9
|
+
showInput?: boolean;
|
|
9
10
|
}
|
|
10
11
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
11
12
|
"update:modelValue": (value: string) => any;
|
|
@@ -18,5 +19,6 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
18
19
|
size: "sm" | "md" | "lg";
|
|
19
20
|
modelValue: string;
|
|
20
21
|
position: TooltTipPlacement;
|
|
22
|
+
showInput: boolean;
|
|
21
23
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
22
24
|
export default _default;
|
|
@@ -1,56 +1,111 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as z, ref as p, watch as i, openBlock as a, createBlock as f, unref as v, withCtx as u, createElementBlock as h, createVNode as c, createCommentVNode as d, createElementVNode as $, mergeProps as w } from "vue";
|
|
2
|
+
import B from "../Dropdown/Dropdown.vue.js";
|
|
3
3
|
import "@iconify/vue";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import O from "../Input.vue.js";
|
|
5
|
+
import y from "../Button.vue.js";
|
|
6
|
+
import E from "./ColorIro.vue.js";
|
|
6
7
|
/* empty css */
|
|
7
|
-
|
|
8
|
+
import { useEyeDropper as P } from "@vueuse/core";
|
|
9
|
+
const I = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "p-2 w-max flex flex-col justify-center"
|
|
12
|
+
}, N = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "flex items-center gap-1.5 w-full"
|
|
15
|
+
}, D = { class: "w-32" }, q = /* @__PURE__ */ z({
|
|
8
16
|
__name: "ColorPicker",
|
|
9
17
|
props: {
|
|
10
18
|
modelValue: { default: "#000000" },
|
|
11
19
|
disabled: { type: Boolean, default: !1 },
|
|
12
20
|
size: { default: "md" },
|
|
13
21
|
position: { default: "bottom" },
|
|
14
|
-
btnProps: {}
|
|
22
|
+
btnProps: {},
|
|
23
|
+
showInput: { type: Boolean, default: !0 }
|
|
15
24
|
},
|
|
16
25
|
emits: ["update:modelValue", "change"],
|
|
17
|
-
setup(
|
|
18
|
-
const
|
|
19
|
-
|
|
26
|
+
setup(o, { emit: V }) {
|
|
27
|
+
const n = o, m = V, r = p(!1), t = p(n.modelValue || "#000000"), { isSupported: b, open: g, sRGBHex: k } = P();
|
|
28
|
+
i(k, (e) => {
|
|
29
|
+
e && (t.value = e);
|
|
30
|
+
});
|
|
31
|
+
const x = async () => {
|
|
32
|
+
try {
|
|
33
|
+
await g();
|
|
34
|
+
} catch (e) {
|
|
35
|
+
console.error("Error opening eyedropper:", e);
|
|
36
|
+
}
|
|
20
37
|
};
|
|
21
|
-
|
|
22
|
-
|
|
38
|
+
i(
|
|
39
|
+
() => n.modelValue,
|
|
40
|
+
(e) => {
|
|
41
|
+
e && e !== t.value && (t.value = e);
|
|
42
|
+
}
|
|
43
|
+
), i(t, (e) => {
|
|
44
|
+
/^#([0-9A-F]{3,8})$/i.test(e) && e !== n.modelValue && (m("update:modelValue", e), m("change", e));
|
|
45
|
+
});
|
|
46
|
+
const C = (e) => {
|
|
47
|
+
t.value = e;
|
|
48
|
+
};
|
|
49
|
+
return (e, l) => (a(), f(v(B), {
|
|
50
|
+
disabled: o.disabled,
|
|
23
51
|
class: "w-auto",
|
|
24
|
-
position:
|
|
52
|
+
position: o.position,
|
|
25
53
|
offset: [0, 8],
|
|
26
54
|
searchable: !1,
|
|
27
|
-
"close-on-select": !1
|
|
55
|
+
"close-on-select": !1,
|
|
56
|
+
onOnOpen: l[1] || (l[1] = (s) => r.value = !0),
|
|
57
|
+
onOnClose: l[2] || (l[2] = (s) => r.value = !1)
|
|
28
58
|
}, {
|
|
29
|
-
trigger:
|
|
30
|
-
|
|
31
|
-
style: { backgroundColor:
|
|
59
|
+
trigger: u(({ isOpen: s }) => [
|
|
60
|
+
c(y, w({
|
|
61
|
+
style: { backgroundColor: o.modelValue }
|
|
32
62
|
}, {
|
|
33
63
|
rounded: "full",
|
|
34
64
|
size: "xs",
|
|
35
65
|
icon: " ",
|
|
36
66
|
variant: "outline",
|
|
37
|
-
...
|
|
67
|
+
...o.btnProps || {}
|
|
38
68
|
}), null, 16, ["style"])
|
|
39
69
|
]),
|
|
40
|
-
default:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
color:
|
|
70
|
+
default: u(() => [
|
|
71
|
+
r.value ? (a(), h("div", I, [
|
|
72
|
+
c(E, {
|
|
73
|
+
color: o.modelValue,
|
|
44
74
|
"show-header": !1,
|
|
45
|
-
size:
|
|
46
|
-
"onUpdate:color":
|
|
47
|
-
},
|
|
48
|
-
|
|
75
|
+
size: o.size,
|
|
76
|
+
"onUpdate:color": C
|
|
77
|
+
}, {
|
|
78
|
+
bottom: u(() => [
|
|
79
|
+
o.showInput ? (a(), h("div", N, [
|
|
80
|
+
v(b) ? (a(), f(y, {
|
|
81
|
+
key: 0,
|
|
82
|
+
onClick: x,
|
|
83
|
+
icon: "pepicons-pop:color-picker",
|
|
84
|
+
variant: "outline",
|
|
85
|
+
size: "sm",
|
|
86
|
+
class: "px-2 shrink-0"
|
|
87
|
+
})) : d("", !0),
|
|
88
|
+
$("div", D, [
|
|
89
|
+
c(O, {
|
|
90
|
+
modelValue: t.value,
|
|
91
|
+
"onUpdate:modelValue": l[0] || (l[0] = (s) => t.value = s),
|
|
92
|
+
size: "sm",
|
|
93
|
+
"show-clear-button": !1,
|
|
94
|
+
placeholder: "#000000",
|
|
95
|
+
class: "flex-1 w-full",
|
|
96
|
+
"input-class": "font-mono text-xs uppercase "
|
|
97
|
+
}, null, 8, ["modelValue"])
|
|
98
|
+
])
|
|
99
|
+
])) : d("", !0)
|
|
100
|
+
]),
|
|
101
|
+
_: 1
|
|
102
|
+
}, 8, ["color", "size"])
|
|
103
|
+
])) : d("", !0)
|
|
49
104
|
]),
|
|
50
105
|
_: 1
|
|
51
106
|
}, 8, ["disabled", "position"]));
|
|
52
107
|
}
|
|
53
108
|
});
|
|
54
109
|
export {
|
|
55
|
-
|
|
110
|
+
q as default
|
|
56
111
|
};
|
package/components/Input.vue.js
CHANGED
|
@@ -47,7 +47,7 @@ const Y = ["type", "value", "placeholder", "disabled", "min", "max"], Z = { clas
|
|
|
47
47
|
"outline-b": "border-b border-input bg-transparent rounded-none focus-visible:border-primary",
|
|
48
48
|
transparent: "border-none bg-transparent shadow-none"
|
|
49
49
|
}, i = {
|
|
50
|
-
sm: "h-
|
|
50
|
+
sm: "h-7.5 text-xs",
|
|
51
51
|
md: "h-9 text-sm",
|
|
52
52
|
lg: "h-10 text-base"
|
|
53
53
|
};
|
|
@@ -15,7 +15,7 @@ const q = ["aria-selected", "disabled", "onClick"], K = /* @__PURE__ */ M({
|
|
|
15
15
|
setup(s, { emit: x }) {
|
|
16
16
|
const r = s, v = x, d = g(null), f = g(/* @__PURE__ */ new Map()), h = (e, n) => {
|
|
17
17
|
e ? f.value.set(n, e) : f.value.delete(n);
|
|
18
|
-
},
|
|
18
|
+
}, m = g({
|
|
19
19
|
width: "0px",
|
|
20
20
|
height: "0px",
|
|
21
21
|
transform: "translate(0px, 0px)",
|
|
@@ -24,14 +24,14 @@ const q = ["aria-selected", "disabled", "onClick"], K = /* @__PURE__ */ M({
|
|
|
24
24
|
await D();
|
|
25
25
|
const e = d.value, n = f.value.get(r.modelValue);
|
|
26
26
|
if (!e || !n) {
|
|
27
|
-
|
|
27
|
+
m.value.opacity = 0;
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
|
-
const a = e.getBoundingClientRect(), t = n.getBoundingClientRect(),
|
|
31
|
-
|
|
30
|
+
const a = e.getBoundingClientRect(), t = n.getBoundingClientRect(), b = t.left - a.left, $ = t.top - a.top, B = t.width, L = t.height;
|
|
31
|
+
m.value = {
|
|
32
32
|
width: `${B}px`,
|
|
33
33
|
height: `${L}px`,
|
|
34
|
-
transform: `translate(${
|
|
34
|
+
transform: `translate(${b}px, ${$}px)`,
|
|
35
35
|
opacity: 1
|
|
36
36
|
};
|
|
37
37
|
};
|
|
@@ -48,8 +48,8 @@ const q = ["aria-selected", "disabled", "onClick"], K = /* @__PURE__ */ M({
|
|
|
48
48
|
line: "bg-transparent gap-6 rounded-none p-0 border-b border-border w-full"
|
|
49
49
|
}[r.variant], r.block ? "flex w-full" : ""]), w = {
|
|
50
50
|
sm: "text-xs px-2.5 py-1",
|
|
51
|
-
md: "text-
|
|
52
|
-
lg: "text-
|
|
51
|
+
md: "-text-fs-2 px-3 py-1",
|
|
52
|
+
lg: "-text-fs-1 px-4 py-1"
|
|
53
53
|
}, z = p(() => [r.variant === "line" ? "relative z-10 flex items-center justify-center gap-2 font-medium transition-colors duration-50 ease-out cursor-pointer select-none outline-none focus-visible:ring-2 focus-visible:ring-primary/50 pb-2 border-b-2 border-transparent hover:text-foreground" : "relative z-10 flex-1 flex items-center justify-center gap-2 font-medium transition-colors duration-50 ease-out cursor-pointer select-none rounded-md outline-none focus-visible:ring-2 focus-visible:ring-primary/50"]), V = (e) => {
|
|
54
54
|
const n = e.value === r.modelValue, a = r.variant === "line";
|
|
55
55
|
let t = "";
|
|
@@ -81,8 +81,8 @@ const q = ["aria-selected", "disabled", "onClick"], K = /* @__PURE__ */ M({
|
|
|
81
81
|
}
|
|
82
82
|
else
|
|
83
83
|
t = a ? "text-muted-foreground" : "text-muted-foreground hover:text-foreground/80";
|
|
84
|
-
const
|
|
85
|
-
return [z.value, t,
|
|
84
|
+
const b = e.disabled ? "opacity-50 cursor-not-allowed" : "";
|
|
85
|
+
return [z.value, t, b].join(" ");
|
|
86
86
|
}, R = p(() => {
|
|
87
87
|
const e = "absolute left-0 top-0 transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)] z-0 pointer-events-none";
|
|
88
88
|
return r.variant === "line" ? `${e} !h-[2px] !top-auto bottom-0` : `${e} rounded-md shadow-sm`;
|
|
@@ -104,7 +104,7 @@ const q = ["aria-selected", "disabled", "onClick"], K = /* @__PURE__ */ M({
|
|
|
104
104
|
s.modelValue !== void 0 ? (i(), u("div", {
|
|
105
105
|
key: 0,
|
|
106
106
|
class: l([R.value, S()]),
|
|
107
|
-
style: A(
|
|
107
|
+
style: A(m.value)
|
|
108
108
|
}, null, 6)) : y("", !0),
|
|
109
109
|
(i(!0), u(E, null, I(s.options, (a) => (i(), u("button", {
|
|
110
110
|
key: a.value,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {},
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLButtonElement>;
|
|
2
2
|
export default _default;
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import { defineComponent as n, openBlock as
|
|
1
|
+
import { defineComponent as n, openBlock as i, createBlock as c, unref as e } from "vue";
|
|
2
2
|
import { useTheme as m } from "../composables/useTheme.js";
|
|
3
3
|
import r from "./Button.vue.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ n({
|
|
5
5
|
__name: "ThemeToggle",
|
|
6
|
-
setup(
|
|
6
|
+
setup(l) {
|
|
7
7
|
const { theme: o, toggleTheme: t } = m();
|
|
8
|
-
return (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}, null, 8, ["icon", "title", "onClick"])
|
|
15
|
-
]));
|
|
8
|
+
return (a, h) => (i(), c(r, {
|
|
9
|
+
icon: e(o) === "light" ? "lucide:sun" : "lucide:moon",
|
|
10
|
+
variant: "secondary",
|
|
11
|
+
title: e(o) === "light" ? "Switch to dark mode" : "Switch to light mode",
|
|
12
|
+
onClick: e(t)
|
|
13
|
+
}, null, 8, ["icon", "title", "onClick"]));
|
|
16
14
|
}
|
|
17
15
|
});
|
|
18
16
|
export {
|
|
19
|
-
|
|
17
|
+
p as default
|
|
20
18
|
};
|
|
@@ -12,6 +12,9 @@ interface Props {
|
|
|
12
12
|
cancel?: string;
|
|
13
13
|
};
|
|
14
14
|
allowIconChange?: boolean;
|
|
15
|
+
itemClass?: string;
|
|
16
|
+
activeItemClass?: string;
|
|
17
|
+
inactiveItemClass?: string;
|
|
15
18
|
}
|
|
16
19
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
17
20
|
select: (id: string) => any;
|
|
@@ -30,10 +33,13 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
30
33
|
"onEdit-end"?: (id: string) => any;
|
|
31
34
|
onDuplicate?: (id: string) => any;
|
|
32
35
|
}>, {
|
|
36
|
+
itemClass: string;
|
|
33
37
|
isEditing: boolean;
|
|
34
38
|
canDelete: boolean;
|
|
35
39
|
confirmDelete: boolean;
|
|
36
40
|
allowIconChange: boolean;
|
|
41
|
+
activeItemClass: string;
|
|
42
|
+
inactiveItemClass: string;
|
|
37
43
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
38
44
|
inputRef: HTMLInputElement;
|
|
39
45
|
}, HTMLDivElement>;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as S, ref as g, computed as y, openBlock as a, createElementBlock as c, normalizeClass as D, createElementVNode as r, withModifiers as f, createBlock as b, withCtx as v, createVNode as d, createCommentVNode as C, withDirectives as V, vModelText as N, toDisplayString as k, unref as O, createTextVNode as j, nextTick as M } from "vue";
|
|
2
2
|
import u from "../Icon.vue.js";
|
|
3
3
|
import R from "../Dropdown/Dropdown.vue.js";
|
|
4
4
|
import z from "../IconPicker.vue.js";
|
|
5
5
|
const A = {
|
|
6
6
|
type: "button",
|
|
7
7
|
class: "flex items-center justify-center rounded hover:bg-accent transition-colors p-0.5 outline-none focus-visible:ring-2 focus-visible:ring-primary/20 mt-1"
|
|
8
|
-
},
|
|
8
|
+
}, K = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "flex items-center justify-center p-0.5"
|
|
11
|
-
},
|
|
11
|
+
}, U = { class: "flex-1 min-w-0 pr-1" }, q = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "block truncate text-sm font-medium leading-normal"
|
|
14
|
-
},
|
|
15
|
-
class: /* @__PURE__ */
|
|
16
|
-
}, Q = /* @__PURE__ */
|
|
14
|
+
}, F = { class: "p-1 rounded-md hover:bg-accent text-muted-foreground hover:text-foreground transition-colors" }, G = {
|
|
15
|
+
class: /* @__PURE__ */ D(["flex items-center"])
|
|
16
|
+
}, Q = /* @__PURE__ */ S({
|
|
17
17
|
__name: "Sheet",
|
|
18
18
|
props: {
|
|
19
19
|
sheet: {},
|
|
@@ -22,23 +22,26 @@ const A = {
|
|
|
22
22
|
canDelete: { type: Boolean, default: !0 },
|
|
23
23
|
confirmDelete: { type: Boolean, default: !1 },
|
|
24
24
|
confirmDeleteTexts: {},
|
|
25
|
-
allowIconChange: { type: Boolean, default: !0 }
|
|
25
|
+
allowIconChange: { type: Boolean, default: !0 },
|
|
26
|
+
itemClass: { default: "" },
|
|
27
|
+
activeItemClass: { default: "" },
|
|
28
|
+
inactiveItemClass: { default: "" }
|
|
26
29
|
},
|
|
27
30
|
emits: ["select", "update:title", "update:icon", "edit-start", "edit-end", "duplicate", "delete"],
|
|
28
|
-
setup(
|
|
29
|
-
const e =
|
|
30
|
-
s.value = e.sheet.title,
|
|
31
|
+
setup(i, { emit: w }) {
|
|
32
|
+
const e = i, l = w, m = g(null), s = g(e.sheet.title), p = () => {
|
|
33
|
+
s.value = e.sheet.title, l("edit-start", e.sheet.id), M(() => {
|
|
31
34
|
m.value?.focus(), m.value?.select();
|
|
32
35
|
});
|
|
33
|
-
},
|
|
36
|
+
}, h = () => {
|
|
34
37
|
if (!e.isEditing) return;
|
|
35
|
-
const
|
|
36
|
-
|
|
38
|
+
const t = s.value.trim();
|
|
39
|
+
t ? l("update:title", e.sheet.id, t) : s.value = e.sheet.title, l("edit-end", e.sheet.id);
|
|
37
40
|
}, E = () => {
|
|
38
|
-
s.value = e.sheet.title,
|
|
39
|
-
}, T = (
|
|
40
|
-
|
|
41
|
-
},
|
|
41
|
+
s.value = e.sheet.title, l("edit-end", e.sheet.id);
|
|
42
|
+
}, T = (t) => {
|
|
43
|
+
t.key === "Enter" && h(), t.key === "Escape" && E();
|
|
44
|
+
}, B = y(() => [
|
|
42
45
|
{ label: "Rename", value: "rename", icon: "lucide:pencil" },
|
|
43
46
|
{ label: "Duplicate", value: "duplicate", icon: "lucide:copy" },
|
|
44
47
|
{
|
|
@@ -52,76 +55,88 @@ const A = {
|
|
|
52
55
|
description: e.confirmDeleteTexts?.description,
|
|
53
56
|
confirmText: e.confirmDeleteTexts?.confirm,
|
|
54
57
|
cancelText: e.confirmDeleteTexts?.cancel,
|
|
55
|
-
variant: "danger"
|
|
58
|
+
variant: "danger",
|
|
59
|
+
onConfirm: () => {
|
|
60
|
+
e.canDelete && l("delete", e.sheet.id);
|
|
61
|
+
}
|
|
56
62
|
} : void 0
|
|
57
63
|
}
|
|
58
|
-
]),
|
|
59
|
-
if (
|
|
60
|
-
if (!e.canDelete) return;
|
|
61
|
-
|
|
64
|
+
]), I = (t) => {
|
|
65
|
+
if (t.value === "rename" && p(), t.value === "duplicate" && l("duplicate", e.sheet.id), t.value === "delete") {
|
|
66
|
+
if (!e.canDelete || e.confirmDelete) return;
|
|
67
|
+
l("delete", e.sheet.id);
|
|
62
68
|
}
|
|
63
|
-
},
|
|
69
|
+
}, x = (t) => {
|
|
70
|
+
t && t.value && t.value !== "delete" || e.canDelete && l("delete", e.sheet.id);
|
|
71
|
+
}, $ = y(() => [
|
|
64
72
|
"group relative flex items-center min-w-[120px] max-w-[240px] h-9 px-3 border-r border-border select-none cursor-pointer transition-all duration-200 ease-out",
|
|
65
|
-
e.
|
|
73
|
+
e.itemClass,
|
|
74
|
+
e.isActive ? `bg-muted text-foreground ring-1 ring-border ring-b-0 z-10 ${e.activeItemClass}` : `text-muted-foreground hover:bg-accent/50 ${e.inactiveItemClass}`,
|
|
66
75
|
e.isEditing ? "cursor-text" : ""
|
|
67
|
-
].join(" "));
|
|
68
|
-
return (
|
|
69
|
-
class:
|
|
70
|
-
onClick: n[
|
|
76
|
+
].filter(Boolean).join(" "));
|
|
77
|
+
return (t, n) => (a(), c("div", {
|
|
78
|
+
class: D($.value),
|
|
79
|
+
onClick: n[5] || (n[5] = (o) => l("select", i.sheet.id)),
|
|
71
80
|
onDblclick: p
|
|
72
81
|
}, [
|
|
73
82
|
r("div", {
|
|
74
|
-
onClick: n[1] || (n[1] =
|
|
83
|
+
onClick: n[1] || (n[1] = f(() => {
|
|
75
84
|
}, ["stop"])),
|
|
76
85
|
class: "mr-2 flex items-center shrink-0"
|
|
77
86
|
}, [
|
|
78
|
-
(
|
|
87
|
+
(i.sheet.icon || i.isEditing) && i.allowIconChange ? (a(), b(z, {
|
|
79
88
|
key: 0,
|
|
80
|
-
value:
|
|
89
|
+
value: i.sheet.icon || "lucide:file",
|
|
81
90
|
position: "bottom-start",
|
|
82
|
-
onOnSelect: n[0] || (n[0] = (
|
|
91
|
+
onOnSelect: n[0] || (n[0] = (o) => l("update:icon", i.sheet.id, o))
|
|
83
92
|
}, {
|
|
84
|
-
default:
|
|
93
|
+
default: v(() => [
|
|
85
94
|
r("button", A, [
|
|
86
95
|
d(u, {
|
|
87
|
-
icon:
|
|
96
|
+
icon: i.sheet.icon || "lucide:file",
|
|
88
97
|
class: "w-4 h-4 opacity-70 hover:opacity-100 transition-opacity"
|
|
89
98
|
}, null, 8, ["icon"])
|
|
90
99
|
])
|
|
91
100
|
]),
|
|
92
101
|
_: 1
|
|
93
|
-
}, 8, ["value"])) :
|
|
102
|
+
}, 8, ["value"])) : i.sheet.icon ? (a(), c("div", K, [
|
|
94
103
|
d(u, {
|
|
95
|
-
icon:
|
|
104
|
+
icon: i.sheet.icon,
|
|
96
105
|
class: "w-4 h-4 opacity-70"
|
|
97
106
|
}, null, 8, ["icon"])
|
|
98
|
-
])) :
|
|
107
|
+
])) : C("", !0)
|
|
99
108
|
]),
|
|
100
|
-
r("div",
|
|
101
|
-
|
|
109
|
+
r("div", U, [
|
|
110
|
+
i.isEditing ? V((a(), c("input", {
|
|
102
111
|
key: 0,
|
|
103
112
|
ref_key: "inputRef",
|
|
104
113
|
ref: m,
|
|
105
|
-
"onUpdate:modelValue": n[2] || (n[2] = (
|
|
114
|
+
"onUpdate:modelValue": n[2] || (n[2] = (o) => s.value = o),
|
|
106
115
|
type: "text",
|
|
107
116
|
class: "w-full bg-transparent border-none outline-none p-0 text-sm font-medium text-foreground placeholder-muted-foreground focus:ring-0",
|
|
108
|
-
onBlur:
|
|
117
|
+
onBlur: h,
|
|
109
118
|
onKeydown: T,
|
|
110
|
-
onClick: n[3] || (n[3] =
|
|
119
|
+
onClick: n[3] || (n[3] = f(() => {
|
|
111
120
|
}, ["stop"]))
|
|
112
121
|
}, null, 544)), [
|
|
113
|
-
[
|
|
114
|
-
]) : (
|
|
122
|
+
[N, s.value]
|
|
123
|
+
]) : (a(), c("span", q, k(i.sheet.title), 1))
|
|
115
124
|
]),
|
|
116
|
-
r("div",
|
|
117
|
-
|
|
118
|
-
|
|
125
|
+
r("div", {
|
|
126
|
+
class: "opacity-0 group-hover:opacity-100 transition-opacity ml-auto pl-1 flex items-center bg-inherit",
|
|
127
|
+
onClick: n[4] || (n[4] = f(() => {
|
|
128
|
+
}, ["stop"]))
|
|
129
|
+
}, [
|
|
130
|
+
d(O(R), {
|
|
131
|
+
options: B.value,
|
|
119
132
|
position: "bottom-end",
|
|
120
133
|
width: "140px",
|
|
121
134
|
teleport: !0,
|
|
122
|
-
onOnSelect:
|
|
135
|
+
onOnSelect: I,
|
|
136
|
+
onOnConfirm: x,
|
|
137
|
+
onConfirm: x
|
|
123
138
|
}, {
|
|
124
|
-
trigger:
|
|
139
|
+
trigger: v(() => [
|
|
125
140
|
r("button", F, [
|
|
126
141
|
d(u, {
|
|
127
142
|
icon: "lucide:more-vertical",
|
|
@@ -129,14 +144,14 @@ const A = {
|
|
|
129
144
|
})
|
|
130
145
|
])
|
|
131
146
|
]),
|
|
132
|
-
item:
|
|
147
|
+
item: v(({ option: o }) => [
|
|
133
148
|
r("div", G, [
|
|
134
|
-
|
|
149
|
+
o?.icon ? (a(), b(u, {
|
|
135
150
|
key: 0,
|
|
136
|
-
icon:
|
|
151
|
+
icon: o?.icon,
|
|
137
152
|
class: "w-3.5 h-3.5 mr-2 opacity-70"
|
|
138
|
-
}, null, 8, ["icon"])) :
|
|
139
|
-
|
|
153
|
+
}, null, 8, ["icon"])) : C("", !0),
|
|
154
|
+
j(" " + k(o?.label), 1)
|
|
140
155
|
])
|
|
141
156
|
]),
|
|
142
157
|
_: 1
|
|
@@ -33,11 +33,14 @@ declare const __VLS_component: import('vue').DefineComponent<WorkbookProps, {},
|
|
|
33
33
|
"onUpdate:sheets"?: (sheets: WorkbookSheet[]) => any;
|
|
34
34
|
}>, {
|
|
35
35
|
variant: "chrome" | "folder" | "simple" | "card";
|
|
36
|
+
itemClass: string;
|
|
36
37
|
modelValue: string;
|
|
37
38
|
editable: boolean;
|
|
38
39
|
draggable: boolean;
|
|
39
40
|
confirmDelete: boolean;
|
|
40
41
|
allowIconChange: boolean;
|
|
42
|
+
activeItemClass: string;
|
|
43
|
+
inactiveItemClass: string;
|
|
41
44
|
sheets: WorkbookSheet[];
|
|
42
45
|
addable: boolean;
|
|
43
46
|
addButtonPosition: AddButtonPosition;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Workbook.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const _ = /* @__PURE__ */ r(o, [["__scopeId", "data-v-833e6dc5"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
_ as default
|
|
7
7
|
};
|