veloce-vue 0.22.0 → 0.23.0
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/Layout.vue.d.ts +7 -17
- package/components/Layout.vue.js +56 -70
- package/package.json +1 -1
|
@@ -1,34 +1,24 @@
|
|
|
1
|
-
import { DefineComponent,
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
declare function __VLS_template(): {
|
|
3
3
|
attrs: Partial<{}>;
|
|
4
4
|
slots: {
|
|
5
|
-
'
|
|
5
|
+
'left-actions'?(_: {}): any;
|
|
6
|
+
'right-actions'?(_: {}): any;
|
|
6
7
|
sidebar?(_: {
|
|
7
8
|
showSidebar: true;
|
|
8
9
|
onClose: () => void;
|
|
9
10
|
}): any;
|
|
11
|
+
view?(_: {}): any;
|
|
10
12
|
};
|
|
11
13
|
refs: {};
|
|
12
14
|
rootEl: any;
|
|
13
15
|
};
|
|
14
16
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
-
declare const __VLS_component: DefineComponent<
|
|
16
|
-
brandName: {
|
|
17
|
-
type: StringConstructor;
|
|
18
|
-
default: string;
|
|
19
|
-
};
|
|
20
|
-
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
17
|
+
declare const __VLS_component: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
21
18
|
sidebar: (showSidebar: boolean) => any;
|
|
22
|
-
}, string, PublicProps, Readonly<
|
|
23
|
-
brandName: {
|
|
24
|
-
type: StringConstructor;
|
|
25
|
-
default: string;
|
|
26
|
-
};
|
|
27
|
-
}>> & Readonly<{
|
|
19
|
+
}, string, PublicProps, Readonly<{}> & Readonly<{
|
|
28
20
|
onSidebar?: ((showSidebar: boolean) => any) | undefined;
|
|
29
|
-
}>, {
|
|
30
|
-
brandName: string;
|
|
31
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
21
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
32
22
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
33
23
|
export default _default;
|
|
34
24
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
package/components/Layout.vue.js
CHANGED
|
@@ -1,83 +1,69 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as u, ref as f, onMounted as p, createElementBlock as h, openBlock as n, Fragment as b, createElementVNode as o, createVNode as l, renderSlot as i, unref as e, withCtx as c, createBlock as v, createCommentVNode as _, normalizeClass as g } from "vue";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
import { AnimatePresence as
|
|
5
|
-
import
|
|
6
|
-
import { useStorage as
|
|
3
|
+
import w from "../icons/Hamburger.vue.js";
|
|
4
|
+
import { AnimatePresence as x, motion as k } from "motion-v";
|
|
5
|
+
import C from "./Button.vue.js";
|
|
6
|
+
import { useStorage as S } from "@vueuse/core";
|
|
7
7
|
/* empty css */
|
|
8
|
-
const
|
|
8
|
+
const B = { class: "flex h-14 items-center justify-between gap-4 border-b px-4" }, $ = { class: "flex items-center gap-2" }, y = { class: "header-actions flex items-center gap-2" }, z = { class: "relative h-[calc(100dvh-3.5rem)] overflow-hidden" }, M = /* @__PURE__ */ u({
|
|
9
9
|
__name: "Layout",
|
|
10
|
-
props: {
|
|
11
|
-
brandName: { type: String, default: "VeloceVue" }
|
|
12
|
-
},
|
|
13
10
|
emits: ["sidebar"],
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
t.value = !t.value,
|
|
11
|
+
setup(N, { emit: d }) {
|
|
12
|
+
const m = d, t = S("showSidebar", !1), a = f(!0);
|
|
13
|
+
p(() => setTimeout(() => a.value = !1, 100));
|
|
14
|
+
const r = () => {
|
|
15
|
+
t.value = !t.value, m("sidebar", t.value);
|
|
19
16
|
};
|
|
20
|
-
return (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
17
|
+
return (s, V) => (n(), h(b, null, [
|
|
18
|
+
o("header", B, [
|
|
19
|
+
o("div", $, [
|
|
20
|
+
l(e(C), {
|
|
21
|
+
icon: e(w),
|
|
22
|
+
iconClass: "size-6",
|
|
23
|
+
class: "p-1!",
|
|
24
|
+
variant: "soft",
|
|
25
|
+
onClick: r
|
|
26
|
+
}, null, 8, ["icon"]),
|
|
27
|
+
i(s.$slots, "left-actions")
|
|
28
|
+
]),
|
|
29
|
+
o("div", y, [
|
|
30
|
+
i(s.$slots, "right-actions")
|
|
31
|
+
])
|
|
32
|
+
]),
|
|
33
|
+
o("main", z, [
|
|
34
|
+
l(e(x), null, {
|
|
35
|
+
default: c(() => [
|
|
36
|
+
e(t) ? (n(), v(e(k).div, {
|
|
33
37
|
key: 0,
|
|
34
|
-
|
|
38
|
+
class: "bg-background absolute bottom-0 left-0 top-0 z-50 w-[240px] shrink-0 overflow-hidden border-r",
|
|
39
|
+
initial: a.value && e(t) ? { x: 0 } : { x: -240 },
|
|
40
|
+
animate: { x: 0 },
|
|
41
|
+
exit: { x: -240 },
|
|
42
|
+
transition: {
|
|
43
|
+
duration: 0.3,
|
|
44
|
+
ease: [0.4, 0, 0.2, 1]
|
|
45
|
+
}
|
|
35
46
|
}, {
|
|
36
|
-
default:
|
|
37
|
-
|
|
47
|
+
default: c(() => [
|
|
48
|
+
i(s.$slots, "sidebar", {
|
|
49
|
+
showSidebar: e(t),
|
|
50
|
+
onClose: r
|
|
51
|
+
})
|
|
38
52
|
]),
|
|
39
|
-
_:
|
|
40
|
-
})) :
|
|
53
|
+
_: 3
|
|
54
|
+
}, 8, ["initial"])) : _("", !0)
|
|
41
55
|
]),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
class: "bg-background absolute bottom-0 left-0 top-0 z-50 w-[240px] shrink-0 overflow-hidden border-r",
|
|
52
|
-
initial: s.value && e(t) ? { x: 0 } : { x: -240 },
|
|
53
|
-
animate: { x: 0 },
|
|
54
|
-
exit: { x: -240 },
|
|
55
|
-
transition: {
|
|
56
|
-
duration: 0.3,
|
|
57
|
-
ease: [0.4, 0, 0.2, 1]
|
|
58
|
-
}
|
|
59
|
-
}, {
|
|
60
|
-
default: n(() => [
|
|
61
|
-
f(c.$slots, "sidebar", {
|
|
62
|
-
showSidebar: e(t),
|
|
63
|
-
onClose: l
|
|
64
|
-
})
|
|
65
|
-
]),
|
|
66
|
-
_: 3
|
|
67
|
-
}, 8, ["initial"])) : u("", !0)
|
|
68
|
-
]),
|
|
69
|
-
_: 3
|
|
70
|
-
}),
|
|
71
|
-
o("div", {
|
|
72
|
-
class: S([{ "lg:ml-[240px]": e(t) }, "h-full overflow-auto p-2 transition-[margin-left] duration-300 ease-in-out"])
|
|
73
|
-
}, [
|
|
74
|
-
r(b)
|
|
75
|
-
], 2)
|
|
76
|
-
])
|
|
77
|
-
], 64);
|
|
78
|
-
};
|
|
56
|
+
_: 3
|
|
57
|
+
}),
|
|
58
|
+
o("div", {
|
|
59
|
+
class: g([{ "lg:ml-[240px]": e(t) }, "h-full overflow-auto p-2 transition-[margin-left] duration-300 ease-in-out"])
|
|
60
|
+
}, [
|
|
61
|
+
i(s.$slots, "view")
|
|
62
|
+
], 2)
|
|
63
|
+
])
|
|
64
|
+
], 64));
|
|
79
65
|
}
|
|
80
66
|
});
|
|
81
67
|
export {
|
|
82
|
-
|
|
68
|
+
M as default
|
|
83
69
|
};
|