vlite3 1.1.11 → 1.2.2
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/AppShell/AppShell.vue.js +76 -0
- package/components/AppShell/AppShell.vue2.js +4 -0
- package/components/AppShell/AppShellLayoutClassic.vue.js +279 -0
- package/components/AppShell/AppShellLayoutClassic.vue2.js +4 -0
- package/components/AppShell/AppShellLayoutDashboard.vue.js +171 -0
- package/components/AppShell/AppShellLayoutDashboard.vue2.js +4 -0
- package/components/AppShell/AppShellLayoutDock.vue.js +165 -0
- package/components/AppShell/AppShellLayoutDock.vue2.js +4 -0
- package/components/AppShell/AppShellLayoutHeaderShell.vue.js +173 -0
- package/components/AppShell/AppShellLayoutHeaderShell.vue2.js +4 -0
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +166 -0
- package/components/AppShell/AppShellLayoutSidebarFirst.vue2.js +4 -0
- package/components/AppShell/useAppShell.js +134 -0
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
- package/components/DataTable/DataTable.vue.d.ts +3 -3
- package/components/DataTable/DataTableRow.vue.d.ts +1 -1
- package/components/Dropdown/Dropdown.vue.js +11 -11
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/CustomFields.vue2.js +15 -2
- package/components/Invoice/InvoiceVariant1.vue.js +225 -176
- package/components/Invoice/InvoiceVariant2.vue.js +174 -125
- package/components/Invoice/InvoiceVariant3.vue.js +186 -157
- package/components/Invoice/InvoiceVariant4.vue.js +200 -156
- package/components/Invoice/types.d.ts +10 -1
- package/components/List/ListFieldRow.vue.js +16 -16
- package/components/List/utils.d.ts +2 -2
- package/components/List/utils.js +6 -9
- package/components/NavbarCommandPalette.vue.js +2 -2
- package/components/Price/Price.vue.d.ts +2 -0
- package/components/Price/Price.vue.js +15 -12
- package/components/Screen/Screen.vue.d.ts +36 -10
- package/components/Screen/Screen.vue.js +398 -304
- package/components/Screen/components/ScreenToolbar.vue.d.ts +62 -0
- package/components/Screen/components/ScreenToolbar.vue.js +116 -0
- package/components/Screen/components/ScreenToolbar.vue2.js +4 -0
- package/components/Screen/types.d.ts +9 -0
- package/components/Stats/StatItem.vue.js +88 -87
- package/components/Stats/Stats.vue.js +20 -20
- package/components/Stats/types.d.ts +3 -1
- package/composables/useBreadcrumb.js +27 -0
- package/core/config.d.ts +10 -0
- package/core/config.js +11 -9
- package/index.d.ts +1 -0
- package/index.js +215 -213
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/appshell.type.d.ts +1 -1
- package/types/config.type.d.ts +2 -0
- package/types/list.type.d.ts +4 -0
- package/utils/functions.d.ts +9 -10
- package/utils/functions.js +78 -63
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { defineComponent as u, computed as d, markRaw as e, openBlock as f, createBlock as i, resolveDynamicComponent as m, createSlots as c, renderList as p, withCtx as b, renderSlot as _, normalizeProps as g, guardReactiveProps as h } from "vue";
|
|
2
|
+
import { useAppShell as y } from "./useAppShell.js";
|
|
3
|
+
import o from "./AppShellLayoutSidebarFirst.vue.js";
|
|
4
|
+
import v from "./AppShellLayoutDashboard.vue.js";
|
|
5
|
+
import B from "./AppShellLayoutDock.vue.js";
|
|
6
|
+
import C from "./AppShellLayoutClassic.vue.js";
|
|
7
|
+
import $ from "./AppShellLayoutHeaderShell.vue.js";
|
|
8
|
+
const S = {
|
|
9
|
+
inheritAttrs: !1
|
|
10
|
+
}, V = /* @__PURE__ */ u({
|
|
11
|
+
...S,
|
|
12
|
+
__name: "AppShell",
|
|
13
|
+
props: {
|
|
14
|
+
variant: { default: "sidebar" },
|
|
15
|
+
position: { default: "sticky" },
|
|
16
|
+
centerPosition: { default: "center" },
|
|
17
|
+
glass: { type: Boolean, default: !1 },
|
|
18
|
+
border: { type: Boolean, default: !0 },
|
|
19
|
+
floating: { type: Boolean, default: !1 },
|
|
20
|
+
class: { default: "" },
|
|
21
|
+
height: { default: "h-16" },
|
|
22
|
+
compact: { type: Boolean, default: !1 },
|
|
23
|
+
renderNestedTabs: { type: Boolean, default: !1 },
|
|
24
|
+
logo: {},
|
|
25
|
+
logoAlt: {},
|
|
26
|
+
mobileBreakpoint: { default: "md" },
|
|
27
|
+
logoClass: { default: "" },
|
|
28
|
+
contentClass: { default: "" },
|
|
29
|
+
menuClass: { default: "" },
|
|
30
|
+
rightClass: { default: "" },
|
|
31
|
+
mobileTriggerClass: { default: "" },
|
|
32
|
+
mobileMenuVariant: { default: "sidepanel" },
|
|
33
|
+
sidebarToggle: { type: Boolean, default: !1 },
|
|
34
|
+
breadcrumb: { type: Boolean, default: !1 },
|
|
35
|
+
breadcrumbPosition: { default: "header" },
|
|
36
|
+
breadcrumbVariant: { default: "default" },
|
|
37
|
+
breadcrumbSeparator: { default: "chevron" },
|
|
38
|
+
breadcrumbSize: { default: "sm" },
|
|
39
|
+
breadcrumbLabels: {},
|
|
40
|
+
breadcrumbHomeIcon: { default: "lucide:home" },
|
|
41
|
+
breadcrumbClass: { default: "" },
|
|
42
|
+
layoutMode: { default: "variant1" }
|
|
43
|
+
},
|
|
44
|
+
emits: ["toggle-mobile"],
|
|
45
|
+
setup(l) {
|
|
46
|
+
const a = l;
|
|
47
|
+
y(a, !0);
|
|
48
|
+
const s = d(() => {
|
|
49
|
+
switch (a.layoutMode) {
|
|
50
|
+
case "variant1":
|
|
51
|
+
return e(o);
|
|
52
|
+
case "variant2":
|
|
53
|
+
return e(v);
|
|
54
|
+
case "variant3":
|
|
55
|
+
return e(B);
|
|
56
|
+
case "variant4":
|
|
57
|
+
return e(C);
|
|
58
|
+
case "variant5":
|
|
59
|
+
return e($);
|
|
60
|
+
default:
|
|
61
|
+
return e(o);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
return (t, k) => (f(), i(m(s.value), null, c({ _: 2 }, [
|
|
65
|
+
p(t.$slots, (A, r) => ({
|
|
66
|
+
name: r,
|
|
67
|
+
fn: b((n) => [
|
|
68
|
+
_(t.$slots, r, g(h(n ?? {})))
|
|
69
|
+
])
|
|
70
|
+
}))
|
|
71
|
+
]), 1024));
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
export {
|
|
75
|
+
V as default
|
|
76
|
+
};
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { defineComponent as B, inject as E, ref as $, openBlock as a, createElementBlock as n, renderSlot as l, unref as e, createCommentVNode as b, createElementVNode as i, createVNode as u, Transition as L, withCtx as g, withDirectives as A, normalizeStyle as H, normalizeClass as d, Fragment as y, vShow as U, isRef as w, createBlock as D, createSlots as I, createTextVNode as Y } from "vue";
|
|
2
|
+
import { onClickOutside as j } from "@vueuse/core";
|
|
3
|
+
import C from "../Icon.vue.js";
|
|
4
|
+
import F from "../SidePanel.vue.js";
|
|
5
|
+
import K from "../Navbar/NavbarTabs.vue.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import q from "../Breadcrumb/Breadcrumb.vue.js";
|
|
8
|
+
/* empty css */
|
|
9
|
+
import { APPSHELL_LAYOUT_KEY as G } from "./useAppShell.js";
|
|
10
|
+
const J = { class: "vlite-app-layout flex flex-col w-full h-full bg-body overflow-hidden" }, Q = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "w-full shrink-0 z-50 flex flex-col relative border-b"
|
|
13
|
+
}, W = { class: "flex flex-1 w-full overflow-hidden relative" }, X = { class: "flex items-center gap-4 shrink-0 z-10" }, Z = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "shrink-0 w-full"
|
|
16
|
+
}, _ = {
|
|
17
|
+
class: "flex flex-col max-h-[80vh] overflow-y-auto scrollbar-thin",
|
|
18
|
+
style: { "will-change": "transform", contain: "layout style" }
|
|
19
|
+
}, ee = { class: "space-y-1 p-2" }, se = { class: "space-y-1 p-2" }, le = { class: "flex flex-col space-y-6 pt-4 h-full" }, oe = {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: "flex flex-col space-y-1"
|
|
22
|
+
}, re = {
|
|
23
|
+
key: 1,
|
|
24
|
+
class: "flex flex-col space-y-4 flex-1 overflow-y-auto px-3.5! scrollbar-thin scrollbar-stable",
|
|
25
|
+
style: { "will-change": "transform", contain: "layout style" }
|
|
26
|
+
}, te = {
|
|
27
|
+
key: 2,
|
|
28
|
+
class: "mt-auto pt-2 border-t border-border px-3! py-2!"
|
|
29
|
+
}, ve = /* @__PURE__ */ B({
|
|
30
|
+
__name: "AppShellLayoutClassic",
|
|
31
|
+
setup(ae) {
|
|
32
|
+
const T = E(G), {
|
|
33
|
+
props: o,
|
|
34
|
+
sidebarHidden: S,
|
|
35
|
+
isMobileMenuOpen: r,
|
|
36
|
+
isSidebarVisible: z,
|
|
37
|
+
toggleSidebar: V,
|
|
38
|
+
pageTitle: R,
|
|
39
|
+
breadcrumbData: c,
|
|
40
|
+
breakpointClasses: f,
|
|
41
|
+
containerClasses: x,
|
|
42
|
+
centerClasses: M,
|
|
43
|
+
nestedTabsItems: h,
|
|
44
|
+
activeNestedTab: p,
|
|
45
|
+
handleNestedTabClick: O,
|
|
46
|
+
mainScrollRef: N,
|
|
47
|
+
layoutMainRef: P
|
|
48
|
+
} = T, k = $(null), v = $(null);
|
|
49
|
+
return j(
|
|
50
|
+
k,
|
|
51
|
+
() => {
|
|
52
|
+
r.value = !1;
|
|
53
|
+
},
|
|
54
|
+
{ ignore: [v] }
|
|
55
|
+
), (s, t) => (a(), n("div", J, [
|
|
56
|
+
s.$slots.header ? (a(), n("header", Q, [
|
|
57
|
+
l(s.$slots, "header", {
|
|
58
|
+
isOpen: e(r),
|
|
59
|
+
toggle: () => r.value = !e(r),
|
|
60
|
+
sidebarVisible: e(z),
|
|
61
|
+
toggleSidebar: e(V),
|
|
62
|
+
breadcrumbItems: e(c).items.value,
|
|
63
|
+
pageTitle: e(R)
|
|
64
|
+
})
|
|
65
|
+
])) : b("", !0),
|
|
66
|
+
i("div", W, [
|
|
67
|
+
u(L, {
|
|
68
|
+
"enter-active-class": "transition-all duration-300 ease-in-out overflow-hidden",
|
|
69
|
+
"leave-active-class": "transition-all duration-300 ease-in-out overflow-hidden",
|
|
70
|
+
"enter-from-class": "opacity-0",
|
|
71
|
+
"enter-to-class": "opacity-100",
|
|
72
|
+
"leave-from-class": "opacity-100",
|
|
73
|
+
"leave-to-class": "opacity-0"
|
|
74
|
+
}, {
|
|
75
|
+
default: g(() => [
|
|
76
|
+
A(i("nav", {
|
|
77
|
+
class: d(e(x)),
|
|
78
|
+
role: "navigation",
|
|
79
|
+
style: H(e(o).sidebarToggle ? "transition: width 0.3s ease, opacity 0.3s ease;" : "")
|
|
80
|
+
}, [
|
|
81
|
+
e(o).variant === "header" ? (a(), n(y, { key: 0 }, [
|
|
82
|
+
i("div", X, [
|
|
83
|
+
l(s.$slots, "mobile-trigger", {
|
|
84
|
+
isOpen: e(r),
|
|
85
|
+
toggle: () => r.value = !e(r)
|
|
86
|
+
}, () => [
|
|
87
|
+
i("button", {
|
|
88
|
+
type: "button",
|
|
89
|
+
ref_key: "mobileTriggerRef",
|
|
90
|
+
ref: v,
|
|
91
|
+
class: d(["p-2 -ml-2 text-muted-foreground hover:bg-accent rounded-md shrink-0", [e(f).mobileTrigger, e(o).mobileTriggerClass]]),
|
|
92
|
+
onClick: t[0] || (t[0] = (m) => r.value = !e(r))
|
|
93
|
+
}, [
|
|
94
|
+
u(C, {
|
|
95
|
+
icon: "lucide:menu",
|
|
96
|
+
class: "w-5 h-5"
|
|
97
|
+
}),
|
|
98
|
+
t[4] || (t[4] = i("span", { class: "sr-only" }, "Open Menu", -1))
|
|
99
|
+
], 2)
|
|
100
|
+
]),
|
|
101
|
+
s.$slots?.left ? (a(), n("div", {
|
|
102
|
+
key: 0,
|
|
103
|
+
class: d(["items-center gap-1 overflow-x-auto no-scrollbar mask-gradient", e(f).desktopContent])
|
|
104
|
+
}, [
|
|
105
|
+
l(s.$slots, "left")
|
|
106
|
+
], 2)) : b("", !0)
|
|
107
|
+
]),
|
|
108
|
+
s.$slots?.center ? (a(), n("div", {
|
|
109
|
+
key: 0,
|
|
110
|
+
class: d([e(M), "max-w-full", e(o).contentClass])
|
|
111
|
+
}, [
|
|
112
|
+
l(s.$slots, "center")
|
|
113
|
+
], 2)) : b("", !0),
|
|
114
|
+
i("div", {
|
|
115
|
+
class: d(["flex items-center gap-2 shrink-0 max-w-[40%] z-10", [
|
|
116
|
+
{
|
|
117
|
+
"ml-auto": e(o).centerPosition === "left" || e(o).centerPosition === "center"
|
|
118
|
+
},
|
|
119
|
+
e(o).rightClass
|
|
120
|
+
]])
|
|
121
|
+
}, [
|
|
122
|
+
l(s.$slots, "right")
|
|
123
|
+
], 2)
|
|
124
|
+
], 64)) : (a(), n(y, { key: 1 }, [
|
|
125
|
+
s.$slots.header ? b("", !0) : (a(), n("div", {
|
|
126
|
+
key: 0,
|
|
127
|
+
class: d(e(f).mobileHeader)
|
|
128
|
+
}, [
|
|
129
|
+
l(s.$slots, "mobile-trigger", {
|
|
130
|
+
isOpen: e(r),
|
|
131
|
+
toggle: () => r.value = !e(r)
|
|
132
|
+
}, () => [
|
|
133
|
+
i("button", {
|
|
134
|
+
type: "button",
|
|
135
|
+
ref_key: "mobileTriggerRef",
|
|
136
|
+
ref: v,
|
|
137
|
+
class: d(["p-2 -mr-2 text-muted-foreground hover:bg-accent rounded-md", e(o).mobileTriggerClass]),
|
|
138
|
+
onClick: t[1] || (t[1] = (m) => r.value = !e(r))
|
|
139
|
+
}, [
|
|
140
|
+
u(C, {
|
|
141
|
+
icon: "lucide:menu",
|
|
142
|
+
class: "w-5 h-5"
|
|
143
|
+
}),
|
|
144
|
+
t[5] || (t[5] = i("span", { class: "sr-only" }, "Open Menu", -1))
|
|
145
|
+
], 2)
|
|
146
|
+
])
|
|
147
|
+
], 2)),
|
|
148
|
+
i("div", {
|
|
149
|
+
class: d(e(f).desktopSidebar)
|
|
150
|
+
}, [
|
|
151
|
+
i("div", {
|
|
152
|
+
class: d(["flex-1 px-2.5 pt-0 pb-4 overflow-y-auto space-y-4 scrollbar-thin scrollbar-stable", e(o).contentClass]),
|
|
153
|
+
style: { "will-change": "transform", contain: "layout style" }
|
|
154
|
+
}, [
|
|
155
|
+
l(s.$slots, "left"),
|
|
156
|
+
l(s.$slots, "sidebar"),
|
|
157
|
+
l(s.$slots, "center")
|
|
158
|
+
], 2),
|
|
159
|
+
s.$slots?.["sidebar-footer"] ? (a(), n("div", {
|
|
160
|
+
key: 0,
|
|
161
|
+
class: d(["p-2 border-t border-border shrink-0 bg-background mt-auto", e(o).rightClass])
|
|
162
|
+
}, [
|
|
163
|
+
l(s.$slots, "sidebar-footer")
|
|
164
|
+
], 2)) : b("", !0)
|
|
165
|
+
], 2)
|
|
166
|
+
], 64))
|
|
167
|
+
], 6), [
|
|
168
|
+
[U, !e(S)]
|
|
169
|
+
])
|
|
170
|
+
]),
|
|
171
|
+
_: 3
|
|
172
|
+
}),
|
|
173
|
+
s.$slots.main ? (a(), n("main", {
|
|
174
|
+
key: 0,
|
|
175
|
+
ref_key: "layoutMainRef",
|
|
176
|
+
ref: P,
|
|
177
|
+
class: "flex-1 overflow-y-auto w-full relative h-full flex flex-col scrollbar-thin scrollbar-stable"
|
|
178
|
+
}, [
|
|
179
|
+
e(o).renderNestedTabs && e(h).length > 0 ? (a(), n("div", Z, [
|
|
180
|
+
u(K, {
|
|
181
|
+
modelValue: e(p),
|
|
182
|
+
"onUpdate:modelValue": t[2] || (t[2] = (m) => w(p) ? p.value = m : null),
|
|
183
|
+
onChange: e(O),
|
|
184
|
+
items: e(h)
|
|
185
|
+
}, null, 8, ["modelValue", "onChange", "items"])
|
|
186
|
+
])) : b("", !0),
|
|
187
|
+
e(o).breadcrumb && e(o).breadcrumbPosition === "main" && e(c).items.value.length > 1 ? (a(), n("div", {
|
|
188
|
+
key: 1,
|
|
189
|
+
class: d(["shrink-0 w-full border-b border-border px-6 py-2", e(o).breadcrumbClass])
|
|
190
|
+
}, [
|
|
191
|
+
u(e(q), {
|
|
192
|
+
items: e(c).items.value,
|
|
193
|
+
variant: e(o).breadcrumbVariant,
|
|
194
|
+
separator: e(o).breadcrumbSeparator,
|
|
195
|
+
size: e(o).breadcrumbSize
|
|
196
|
+
}, null, 8, ["items", "variant", "separator", "size"])
|
|
197
|
+
], 2)) : b("", !0),
|
|
198
|
+
i("div", {
|
|
199
|
+
ref_key: "mainScrollRef",
|
|
200
|
+
ref: N,
|
|
201
|
+
style: { "will-change": "transform", contain: "layout style" },
|
|
202
|
+
class: "flex-1 overflow-y-auto w-full relative h-full scrollbar-thin scrollbar-stable"
|
|
203
|
+
}, [
|
|
204
|
+
l(s.$slots, "main")
|
|
205
|
+
], 512)
|
|
206
|
+
], 512)) : b("", !0),
|
|
207
|
+
e(o).mobileMenuVariant === "dropdown" ? (a(), n(y, { key: 1 }, [
|
|
208
|
+
e(r) ? (a(), n("div", {
|
|
209
|
+
key: 0,
|
|
210
|
+
ref_key: "mobileMenuRef",
|
|
211
|
+
ref: k,
|
|
212
|
+
class: d(["absolute top-[calc(100%_+_1px)] left-0 w-full bg-body border border-border shadow-xl z-50 flex flex-col transition-all duration-300 origin-top overflow-hidden will-change-transform", e(o).menuClass])
|
|
213
|
+
}, [
|
|
214
|
+
i("div", _, [
|
|
215
|
+
l(s.$slots, "mobile-menu", {}, () => [
|
|
216
|
+
i("div", ee, [
|
|
217
|
+
l(s.$slots, "left")
|
|
218
|
+
]),
|
|
219
|
+
t[6] || (t[6] = i("div", { class: "h-px bg-border my-1 mx-2" }, null, -1)),
|
|
220
|
+
i("div", se, [
|
|
221
|
+
l(s.$slots, "center")
|
|
222
|
+
])
|
|
223
|
+
])
|
|
224
|
+
])
|
|
225
|
+
], 2)) : b("", !0)
|
|
226
|
+
], 64)) : (a(), D(F, {
|
|
227
|
+
key: 2,
|
|
228
|
+
show: e(r),
|
|
229
|
+
"onUpdate:show": t[3] || (t[3] = (m) => w(r) ? r.value = m : null),
|
|
230
|
+
position: "left",
|
|
231
|
+
size: "sm",
|
|
232
|
+
triggerClass: e(f).mobileTrigger,
|
|
233
|
+
class: d(["z-60", e(f).mobileTrigger]),
|
|
234
|
+
headerClass: "pl-3! pr-4.5! py-3!",
|
|
235
|
+
bodyClass: "p-0!"
|
|
236
|
+
}, I({
|
|
237
|
+
default: g(() => [
|
|
238
|
+
i("div", le, [
|
|
239
|
+
e(o).variant === "header" ? (a(), n("div", oe, [
|
|
240
|
+
l(s.$slots, "mobile-menu", {}, () => [
|
|
241
|
+
l(s.$slots, "left"),
|
|
242
|
+
t[8] || (t[8] = i("div", { class: "h-px bg-border my-2" }, null, -1)),
|
|
243
|
+
l(s.$slots, "center")
|
|
244
|
+
])
|
|
245
|
+
])) : (a(), n("div", re, [
|
|
246
|
+
l(s.$slots, "left"),
|
|
247
|
+
l(s.$slots, "mobile-sidebar", {}, () => [
|
|
248
|
+
l(s.$slots, "sidebar")
|
|
249
|
+
]),
|
|
250
|
+
l(s.$slots, "center")
|
|
251
|
+
])),
|
|
252
|
+
s.$slots?.["mobile-sidebar-footer"] || s.$slots?.["sidebar-footer"] ? (a(), n("div", te, [
|
|
253
|
+
l(s.$slots, "mobile-sidebar-footer", {}, () => [
|
|
254
|
+
l(s.$slots, "sidebar-footer")
|
|
255
|
+
])
|
|
256
|
+
])) : b("", !0)
|
|
257
|
+
])
|
|
258
|
+
]),
|
|
259
|
+
_: 2
|
|
260
|
+
}, [
|
|
261
|
+
s.$slots["mobile-sidebar-header"] || s.$slots["sidebar-header"] ? {
|
|
262
|
+
name: "header",
|
|
263
|
+
fn: g(() => [
|
|
264
|
+
l(s.$slots, "mobile-sidebar-header", {}, () => [
|
|
265
|
+
l(s.$slots, "sidebar-header", {}, () => [
|
|
266
|
+
t[7] || (t[7] = Y("Brand", -1))
|
|
267
|
+
])
|
|
268
|
+
])
|
|
269
|
+
]),
|
|
270
|
+
key: "0"
|
|
271
|
+
} : void 0
|
|
272
|
+
]), 1032, ["show", "triggerClass", "class"]))
|
|
273
|
+
])
|
|
274
|
+
]));
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
export {
|
|
278
|
+
ve as default
|
|
279
|
+
};
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { defineComponent as V, inject as z, openBlock as a, createElementBlock as o, createVNode as m, Transition as N, withCtx as p, withDirectives as _, createElementVNode as n, normalizeClass as b, unref as e, renderSlot as l, createCommentVNode as t, vShow as R, isRef as g, createSlots as B, createTextVNode as E } from "vue";
|
|
2
|
+
import L from "../SidePanel.vue.js";
|
|
3
|
+
import M from "../Navbar/NavbarTabs.vue.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import P from "../Breadcrumb/Breadcrumb.vue.js";
|
|
6
|
+
import "@iconify/vue";
|
|
7
|
+
/* empty css */
|
|
8
|
+
import { APPSHELL_LAYOUT_KEY as A } from "./useAppShell.js";
|
|
9
|
+
const D = { class: "vlite-app-layout flex flex-row w-full h-full bg-muted/20 p-0 sm:p-2.5 gap-0 sm:gap-2.5 overflow-hidden" }, O = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "flex items-center"
|
|
12
|
+
}, U = { class: "flex flex-col flex-1 min-w-0 h-full overflow-hidden bg-background rounded-xl max-sm:rounded-none border border-border max-sm:border-0 shadow-sm" }, H = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "w-full shrink-0 z-20 bg-background border-b border-border"
|
|
15
|
+
}, I = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "shrink-0 w-full"
|
|
18
|
+
}, Y = { class: "flex flex-col h-full" }, j = {
|
|
19
|
+
class: "flex-1 overflow-y-auto px-3.5 pt-4 scrollbar-thin scrollbar-stable",
|
|
20
|
+
style: { "will-change": "transform", contain: "layout style" }
|
|
21
|
+
}, K = {
|
|
22
|
+
key: 0,
|
|
23
|
+
class: "mt-auto"
|
|
24
|
+
}, se = /* @__PURE__ */ V({
|
|
25
|
+
__name: "AppShellLayoutDashboard",
|
|
26
|
+
setup(q) {
|
|
27
|
+
const y = z(A), {
|
|
28
|
+
props: r,
|
|
29
|
+
sidebarHidden: w,
|
|
30
|
+
isMobileMenuOpen: i,
|
|
31
|
+
isSidebarVisible: k,
|
|
32
|
+
toggleSidebar: $,
|
|
33
|
+
pageTitle: x,
|
|
34
|
+
breadcrumbData: u,
|
|
35
|
+
breakpointClasses: f,
|
|
36
|
+
nestedTabsItems: v,
|
|
37
|
+
activeNestedTab: c,
|
|
38
|
+
handleNestedTabClick: C,
|
|
39
|
+
mainScrollRef: S,
|
|
40
|
+
layoutMainRef: T
|
|
41
|
+
} = y;
|
|
42
|
+
return (s, d) => (a(), o("div", D, [
|
|
43
|
+
m(N, {
|
|
44
|
+
"enter-active-class": "transition-all duration-300 ease-in-out",
|
|
45
|
+
"leave-active-class": "transition-all duration-300 ease-in-out",
|
|
46
|
+
"enter-from-class": "opacity-0 -translate-x-2",
|
|
47
|
+
"enter-to-class": "opacity-100 translate-x-0",
|
|
48
|
+
"leave-from-class": "opacity-100 translate-x-0",
|
|
49
|
+
"leave-to-class": "opacity-0 -translate-x-2"
|
|
50
|
+
}, {
|
|
51
|
+
default: p(() => [
|
|
52
|
+
_(n("nav", {
|
|
53
|
+
class: b([
|
|
54
|
+
"shrink-0 h-full flex flex-col bg-background rounded-xl max-sm:rounded-none border border-border max-sm:border-0 shadow-sm overflow-hidden z-30",
|
|
55
|
+
e(f).mobileTrigger === "md:hidden" ? "max-md:hidden" : "",
|
|
56
|
+
e(r).class
|
|
57
|
+
]),
|
|
58
|
+
role: "navigation",
|
|
59
|
+
"aria-label": "Sidebar"
|
|
60
|
+
}, [
|
|
61
|
+
s.$slots["sidebar-header"] ? (a(), o("div", O, [
|
|
62
|
+
l(s.$slots, "sidebar-header")
|
|
63
|
+
])) : t("", !0),
|
|
64
|
+
n("div", {
|
|
65
|
+
class: b(["flex-1 overflow-y-auto overflow-x-hidden scrollbar-thin scrollbar-stable", e(r).contentClass]),
|
|
66
|
+
style: { "will-change": "transform", contain: "layout style" }
|
|
67
|
+
}, [
|
|
68
|
+
l(s.$slots, "sidebar")
|
|
69
|
+
], 2),
|
|
70
|
+
s.$slots["sidebar-footer"] ? (a(), o("div", {
|
|
71
|
+
key: 1,
|
|
72
|
+
class: b(["shrink-0 bg-transparent", e(r).rightClass])
|
|
73
|
+
}, [
|
|
74
|
+
l(s.$slots, "sidebar-footer")
|
|
75
|
+
], 2)) : t("", !0)
|
|
76
|
+
], 2), [
|
|
77
|
+
[R, !e(w)]
|
|
78
|
+
])
|
|
79
|
+
]),
|
|
80
|
+
_: 3
|
|
81
|
+
}),
|
|
82
|
+
n("div", U, [
|
|
83
|
+
s.$slots.header ? (a(), o("header", H, [
|
|
84
|
+
l(s.$slots, "header", {
|
|
85
|
+
isOpen: e(i),
|
|
86
|
+
toggle: () => i.value = !e(i),
|
|
87
|
+
sidebarVisible: e(k),
|
|
88
|
+
toggleSidebar: e($),
|
|
89
|
+
breadcrumbItems: e(u).items.value,
|
|
90
|
+
pageTitle: e(x)
|
|
91
|
+
})
|
|
92
|
+
])) : t("", !0),
|
|
93
|
+
s.$slots.main ? (a(), o("main", {
|
|
94
|
+
key: 1,
|
|
95
|
+
ref_key: "layoutMainRef",
|
|
96
|
+
ref: T,
|
|
97
|
+
class: "flex-1 overflow-y-auto w-full relative h-full flex flex-col min-h-0 scrollbar-thin scrollbar-stable"
|
|
98
|
+
}, [
|
|
99
|
+
e(r).renderNestedTabs && e(v).length > 0 ? (a(), o("div", I, [
|
|
100
|
+
m(M, {
|
|
101
|
+
modelValue: e(c),
|
|
102
|
+
"onUpdate:modelValue": d[0] || (d[0] = (h) => g(c) ? c.value = h : null),
|
|
103
|
+
onChange: e(C),
|
|
104
|
+
items: e(v)
|
|
105
|
+
}, null, 8, ["modelValue", "onChange", "items"])
|
|
106
|
+
])) : t("", !0),
|
|
107
|
+
e(r).breadcrumb && e(r).breadcrumbPosition === "main" && e(u).items.value.length > 1 ? (a(), o("div", {
|
|
108
|
+
key: 1,
|
|
109
|
+
class: b(["shrink-0 w-full px-6 py-2 border-b border-border", e(r).breadcrumbClass])
|
|
110
|
+
}, [
|
|
111
|
+
m(e(P), {
|
|
112
|
+
items: e(u).items.value,
|
|
113
|
+
variant: e(r).breadcrumbVariant,
|
|
114
|
+
separator: e(r).breadcrumbSeparator,
|
|
115
|
+
size: e(r).breadcrumbSize
|
|
116
|
+
}, null, 8, ["items", "variant", "separator", "size"])
|
|
117
|
+
], 2)) : t("", !0),
|
|
118
|
+
n("div", {
|
|
119
|
+
ref_key: "mainScrollRef",
|
|
120
|
+
ref: S,
|
|
121
|
+
style: { "will-change": "transform", contain: "layout style" },
|
|
122
|
+
class: "flex-1 overflow-y-auto pt-2 w-full relative h-full scrollbar-thin scrollbar-stable"
|
|
123
|
+
}, [
|
|
124
|
+
l(s.$slots, "main")
|
|
125
|
+
], 512)
|
|
126
|
+
], 512)) : t("", !0)
|
|
127
|
+
]),
|
|
128
|
+
m(L, {
|
|
129
|
+
show: e(i),
|
|
130
|
+
"onUpdate:show": d[1] || (d[1] = (h) => g(i) ? i.value = h : null),
|
|
131
|
+
position: "left",
|
|
132
|
+
size: "sm",
|
|
133
|
+
triggerClass: e(f).mobileTrigger,
|
|
134
|
+
class: b(["z-60", e(f).mobileTrigger]),
|
|
135
|
+
headerClass: "pl-3! pr-4.5! py-3!",
|
|
136
|
+
bodyClass: "p-0!"
|
|
137
|
+
}, B({
|
|
138
|
+
default: p(() => [
|
|
139
|
+
n("div", Y, [
|
|
140
|
+
n("div", j, [
|
|
141
|
+
l(s.$slots, "mobile-sidebar", {}, () => [
|
|
142
|
+
l(s.$slots, "sidebar")
|
|
143
|
+
])
|
|
144
|
+
]),
|
|
145
|
+
s.$slots["mobile-sidebar-footer"] || s.$slots["sidebar-footer"] ? (a(), o("div", K, [
|
|
146
|
+
l(s.$slots, "mobile-sidebar-footer", {}, () => [
|
|
147
|
+
l(s.$slots, "sidebar-footer")
|
|
148
|
+
])
|
|
149
|
+
])) : t("", !0)
|
|
150
|
+
])
|
|
151
|
+
]),
|
|
152
|
+
_: 2
|
|
153
|
+
}, [
|
|
154
|
+
s.$slots["mobile-sidebar-header"] || s.$slots["sidebar-header"] ? {
|
|
155
|
+
name: "header",
|
|
156
|
+
fn: p(() => [
|
|
157
|
+
l(s.$slots, "mobile-sidebar-header", {}, () => [
|
|
158
|
+
l(s.$slots, "sidebar-header", {}, () => [
|
|
159
|
+
d[2] || (d[2] = E("Brand", -1))
|
|
160
|
+
])
|
|
161
|
+
])
|
|
162
|
+
]),
|
|
163
|
+
key: "0"
|
|
164
|
+
} : void 0
|
|
165
|
+
]), 1032, ["show", "triggerClass", "class"])
|
|
166
|
+
]));
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
export {
|
|
170
|
+
se as default
|
|
171
|
+
};
|