vlite3 1.5.33 → 1.5.35
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.d.ts +1 -0
- package/components/AppShell/AppShell.vue.js +5 -4
- package/components/AppShell/AppShellLayoutClassic.vue.d.ts +15 -4
- package/components/AppShell/AppShellLayoutClassic.vue.js +106 -97
- package/components/AppShell/AppShellLayoutDashboard.vue.d.ts +15 -4
- package/components/AppShell/AppShellLayoutDashboard.vue.js +87 -78
- package/components/AppShell/AppShellLayoutDock.vue.d.ts +15 -4
- package/components/AppShell/AppShellLayoutDock.vue.js +83 -74
- package/components/AppShell/AppShellLayoutHeaderShell.vue.d.ts +15 -4
- package/components/AppShell/AppShellLayoutHeaderShell.vue.js +82 -73
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.d.ts +15 -4
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +82 -73
- package/components/AppShell/AppShellLayoutStorefront.vue.d.ts +7 -1
- package/components/AppShell/AppShellLayoutStorefront.vue.js +119 -107
- package/components/AppShell/index.d.ts +1 -1
- package/components/AppShell/useAppShell.d.ts +11 -0
- package/components/AppShell/useAppShell.js +157 -109
- package/components/CategoryManager/CategoryManager2.vue.js +1 -1
- package/components/CommandPalette/CommandPaletteContent2.vue.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem2.vue.js → CommandPaletteItem.vue.js} +1 -1
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Form/{AccordionView.vue.js → AccordionView2.vue.js} +1 -1
- package/components/Form/Form2.vue.js +3 -2
- package/components/Form/index2.vue.js +1 -1
- package/components/ImportData/ImportData.vue.js +3 -2
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/Screen/ScreenFilter.vue.js +1 -1
- package/components/Timeline/Timeline.vue.d.ts +12 -3
- package/components/Timeline/Timeline.vue.js +90 -61
- package/components/Timeline/Timeline3.vue.js +5 -0
- package/docs/components/app-shell.md +2 -0
- package/docs-manifest.json +3 -3
- package/index.js +502 -501
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/appshell.type.d.ts +6 -0
- package/types/timeline.type.d.ts +2 -0
- package/components/Timeline/Timeline2.vue.js +0 -4
- /package/components/Dropdown/{DropdownMenu2.vue.js → DropdownMenu3.vue.js} +0 -0
|
@@ -1,187 +1,199 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { defineComponent as P, inject as V, computed as k, openBlock as i, createElementBlock as a, normalizeClass as r, unref as e, renderSlot as l, createCommentVNode as d, withDirectives as _, createElementVNode as n, createVNode as f, vShow as N, isRef as w, createSlots as j, withCtx as C } from "vue";
|
|
2
|
+
import D from "../Icon.vue.js";
|
|
3
|
+
import B from "../SidePanel.vue.js";
|
|
4
|
+
import E from "../Navbar/NavbarTabs.vue.js";
|
|
5
|
+
import L from "../Breadcrumb/Breadcrumb.vue.js";
|
|
6
6
|
/* empty css */
|
|
7
|
-
import { APPSHELL_LAYOUT_KEY as
|
|
8
|
-
import { normalizeRoutePrefix as
|
|
9
|
-
const
|
|
7
|
+
import { APPSHELL_LAYOUT_KEY as M } from "./useAppShell.js";
|
|
8
|
+
import { normalizeRoutePrefix as O } from "../CategoryMenu/utils.js";
|
|
9
|
+
const A = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "shrink-0 w-full"
|
|
12
|
-
},
|
|
12
|
+
}, U = { class: "w-full mx-auto px-3 sm:px-4 md:px-6 lg:px-8" }, H = ["aria-label"], Y = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "flex items-center justify-center min-w-0 flex-1 px-2"
|
|
15
|
-
},
|
|
15
|
+
}, I = { class: "w-full min-w-0 mx-auto overflow-hidden" }, K = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "shrink-0 w-full"
|
|
18
|
-
},
|
|
18
|
+
}, q = {
|
|
19
19
|
key: 2,
|
|
20
20
|
class: "shrink-0 w-full border-t border-border bg-background"
|
|
21
|
-
},
|
|
21
|
+
}, F = { class: "flex flex-col h-full" }, G = {
|
|
22
22
|
class: "flex-1 overflow-y-auto px-3.5 py-4 space-y-4 scrollbar-thin scrollbar-stable",
|
|
23
23
|
style: { "will-change": "transform", contain: "layout style" }
|
|
24
|
-
},
|
|
24
|
+
}, J = {
|
|
25
25
|
key: 0,
|
|
26
26
|
class: "mt-auto border-t border-border px-3.5 py-3"
|
|
27
|
-
},
|
|
27
|
+
}, ne = /* @__PURE__ */ P({
|
|
28
28
|
__name: "AppShellLayoutStorefront",
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
-
props:
|
|
32
|
-
isMobileMenuOpen:
|
|
33
|
-
isSidebarVisible:
|
|
34
|
-
toggleSidebar:
|
|
35
|
-
pageTitle:
|
|
36
|
-
breadcrumbData:
|
|
29
|
+
setup(Q) {
|
|
30
|
+
const $ = V(M), {
|
|
31
|
+
props: o,
|
|
32
|
+
isMobileMenuOpen: t,
|
|
33
|
+
isSidebarVisible: W,
|
|
34
|
+
toggleSidebar: X,
|
|
35
|
+
pageTitle: Z,
|
|
36
|
+
breadcrumbData: g,
|
|
37
37
|
breakpointClasses: m,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
isDesktop: c,
|
|
39
|
+
shellRef: h,
|
|
40
|
+
shellClass: x,
|
|
41
|
+
nestedTabsItems: v,
|
|
42
|
+
activeNestedTab: p,
|
|
43
|
+
handleNestedTabClick: S,
|
|
44
|
+
mainScrollRef: R,
|
|
45
|
+
layoutMainRef: T
|
|
46
|
+
} = $, z = k(() => [
|
|
44
47
|
"w-full shrink-0 bg-background transition-shadow duration-200",
|
|
45
48
|
{
|
|
46
49
|
fixed: "fixed top-0 start-0 z-50",
|
|
47
50
|
sticky: "sticky top-0 z-50",
|
|
48
51
|
relative: "relative z-20",
|
|
49
52
|
absolute: "absolute top-0 start-0 w-full z-50"
|
|
50
|
-
}[
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
].filter(Boolean).join(" ")),
|
|
56
|
-
return (
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
}[o.position || "sticky"],
|
|
54
|
+
o.border ? "border-b border-border" : "",
|
|
55
|
+
o.glass ? "bg-background/90 backdrop-blur-md" : "",
|
|
56
|
+
o.floating ? "m-3 rounded-lg border border-border shadow-sm overflow-hidden" : "",
|
|
57
|
+
o.class
|
|
58
|
+
].filter(Boolean).join(" ")), y = k(() => O(o.categoryRoutePrefix));
|
|
59
|
+
return (s, u) => (i(), a("div", {
|
|
60
|
+
ref_key: "shellRef",
|
|
61
|
+
ref: h,
|
|
62
|
+
class: r(["vlite-app-layout flex flex-col w-full h-full min-h-0 bg-body text-foreground overflow-hidden", e(x)])
|
|
63
|
+
}, [
|
|
64
|
+
s.$slots.announcement ? (i(), a("div", A, [
|
|
65
|
+
l(s.$slots, "announcement")
|
|
59
66
|
])) : d("", !0),
|
|
60
|
-
|
|
61
|
-
class:
|
|
67
|
+
_(n("header", {
|
|
68
|
+
class: r(z.value)
|
|
62
69
|
}, [
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
class:
|
|
70
|
+
n("div", U, [
|
|
71
|
+
n("div", {
|
|
72
|
+
class: r(["flex w-full items-center justify-between gap-3 md:gap-6", e(o).height])
|
|
66
73
|
}, [
|
|
67
|
-
|
|
68
|
-
class:
|
|
74
|
+
n("div", {
|
|
75
|
+
class: r(["flex items-center gap-2 sm:gap-4 min-w-0 shrink-0", { "flex-1": !s.$slots.center }])
|
|
69
76
|
}, [
|
|
70
|
-
l(
|
|
71
|
-
isOpen: e(
|
|
72
|
-
|
|
77
|
+
l(s.$slots, "mobile-trigger", {
|
|
78
|
+
isOpen: e(t),
|
|
79
|
+
isDesktop: e(c),
|
|
80
|
+
toggle: () => t.value = !e(t)
|
|
73
81
|
}, () => [
|
|
74
|
-
|
|
82
|
+
n("button", {
|
|
75
83
|
type: "button",
|
|
76
|
-
class:
|
|
77
|
-
"aria-label": e(
|
|
78
|
-
onClick: u[0] || (u[0] = (b) =>
|
|
84
|
+
class: r(["inline-flex items-center justify-center w-9 h-9 rounded-md text-muted-foreground hover:text-foreground hover:bg-accent", [e(m).mobileTrigger, e(o).mobileTriggerClass]]),
|
|
85
|
+
"aria-label": e(t) ? "Close menu" : "Open menu",
|
|
86
|
+
onClick: u[0] || (u[0] = (b) => t.value = !e(t))
|
|
79
87
|
}, [
|
|
80
|
-
f(
|
|
81
|
-
icon: e(
|
|
88
|
+
f(D, {
|
|
89
|
+
icon: e(t) ? "lucide:x" : "lucide:menu",
|
|
82
90
|
class: "w-5 h-5"
|
|
83
91
|
}, null, 8, ["icon"])
|
|
84
|
-
], 10,
|
|
92
|
+
], 10, H)
|
|
85
93
|
]),
|
|
86
|
-
l(
|
|
94
|
+
l(s.$slots, "left")
|
|
87
95
|
], 2),
|
|
88
|
-
|
|
89
|
-
l(
|
|
96
|
+
s.$slots.center ? (i(), a("div", Y, [
|
|
97
|
+
l(s.$slots, "center")
|
|
90
98
|
])) : d("", !0),
|
|
91
|
-
|
|
92
|
-
class:
|
|
99
|
+
n("div", {
|
|
100
|
+
class: r(["flex items-center justify-end gap-2 sm:gap-4 min-w-0 shrink-0", [e(o).rightClass, { "flex-1": !s.$slots.center }]])
|
|
93
101
|
}, [
|
|
94
|
-
l(
|
|
102
|
+
l(s.$slots, "right")
|
|
95
103
|
], 2)
|
|
96
104
|
], 2),
|
|
97
|
-
|
|
105
|
+
s.$slots["mobile-bottom"] ? (i(), a("div", {
|
|
98
106
|
key: 0,
|
|
99
|
-
class:
|
|
107
|
+
class: r(["pb-3 w-full", e(m).mobileTrigger])
|
|
100
108
|
}, [
|
|
101
|
-
l(
|
|
109
|
+
l(s.$slots, "mobile-bottom")
|
|
102
110
|
], 2)) : d("", !0)
|
|
103
111
|
]),
|
|
104
|
-
|
|
112
|
+
s.$slots.categories ? (i(), a("div", {
|
|
105
113
|
key: 0,
|
|
106
|
-
class:
|
|
114
|
+
class: r(["w-full min-w-0 overflow-hidden border-t border-border bg-background", [e(m).desktopContent, e(o).menuClass]])
|
|
107
115
|
}, [
|
|
108
|
-
|
|
109
|
-
l(
|
|
116
|
+
n("div", I, [
|
|
117
|
+
l(s.$slots, "categories", { categoryRoutePrefix: y.value })
|
|
110
118
|
])
|
|
111
119
|
], 2)) : d("", !0)
|
|
112
120
|
], 2), [
|
|
113
|
-
[
|
|
121
|
+
[N, !e(o).hideHeader]
|
|
114
122
|
]),
|
|
115
|
-
|
|
123
|
+
s.$slots.main ? (i(), a("main", {
|
|
116
124
|
key: 1,
|
|
117
125
|
ref_key: "layoutMainRef",
|
|
118
|
-
ref:
|
|
126
|
+
ref: T,
|
|
119
127
|
class: "flex-1 overflow-hidden w-full relative flex flex-col min-h-0"
|
|
120
128
|
}, [
|
|
121
|
-
e(
|
|
122
|
-
f(
|
|
123
|
-
modelValue: e(
|
|
124
|
-
"onUpdate:modelValue": u[1] || (u[1] = (b) =>
|
|
125
|
-
onChange: e(
|
|
126
|
-
items: e(
|
|
129
|
+
e(o).renderNestedTabs && e(v).length > 0 ? (i(), a("div", K, [
|
|
130
|
+
f(E, {
|
|
131
|
+
modelValue: e(p),
|
|
132
|
+
"onUpdate:modelValue": u[1] || (u[1] = (b) => w(p) ? p.value = b : null),
|
|
133
|
+
onChange: e(S),
|
|
134
|
+
items: e(v)
|
|
127
135
|
}, null, 8, ["modelValue", "onChange", "items"])
|
|
128
136
|
])) : d("", !0),
|
|
129
|
-
e(
|
|
137
|
+
e(o).breadcrumb && e(o).breadcrumbPosition === "main" && e(g).items.value.length > 1 ? (i(), a("div", {
|
|
130
138
|
key: 1,
|
|
131
|
-
class:
|
|
139
|
+
class: r(["shrink-0 w-full border-b border-border px-6 py-2", e(o).breadcrumbClass])
|
|
132
140
|
}, [
|
|
133
|
-
f(e(
|
|
134
|
-
items: e(
|
|
135
|
-
variant: e(
|
|
136
|
-
separator: e(
|
|
137
|
-
size: e(
|
|
141
|
+
f(e(L), {
|
|
142
|
+
items: e(g).items.value,
|
|
143
|
+
variant: e(o).breadcrumbVariant,
|
|
144
|
+
separator: e(o).breadcrumbSeparator,
|
|
145
|
+
size: e(o).breadcrumbSize
|
|
138
146
|
}, null, 8, ["items", "variant", "separator", "size"])
|
|
139
147
|
], 2)) : d("", !0),
|
|
140
|
-
|
|
148
|
+
n("div", {
|
|
141
149
|
ref_key: "mainScrollRef",
|
|
142
|
-
ref:
|
|
150
|
+
ref: R,
|
|
143
151
|
style: { "will-change": "transform", contain: "layout style" },
|
|
144
|
-
class:
|
|
152
|
+
class: r(["flex-1 overflow-y-auto w-full relative h-full scrollbar-thin scrollbar-stable", e(o).contentClass])
|
|
145
153
|
}, [
|
|
146
|
-
l(
|
|
154
|
+
l(s.$slots, "main", { isDesktop: e(c) })
|
|
147
155
|
], 2)
|
|
148
156
|
], 512)) : d("", !0),
|
|
149
|
-
|
|
150
|
-
l(
|
|
157
|
+
s.$slots.footer ? (i(), a("footer", q, [
|
|
158
|
+
l(s.$slots, "footer")
|
|
151
159
|
])) : d("", !0),
|
|
152
|
-
f(
|
|
153
|
-
show: e(
|
|
154
|
-
"onUpdate:show": u[2] || (u[2] = (b) =>
|
|
160
|
+
f(B, {
|
|
161
|
+
show: e(t),
|
|
162
|
+
"onUpdate:show": u[2] || (u[2] = (b) => w(t) ? t.value = b : null),
|
|
155
163
|
position: "left",
|
|
156
164
|
size: "sm",
|
|
157
165
|
triggerClass: e(m).mobileTrigger,
|
|
158
|
-
class:
|
|
166
|
+
class: r(["z-60", e(m).mobileTrigger]),
|
|
159
167
|
headerClass: "ps-3! pe-4.5! py-3!",
|
|
160
|
-
bodyClass: "p-0!"
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
168
|
+
bodyClass: "p-0!",
|
|
169
|
+
"teleport-target": e(o).breakpointSource === "container" && e(h) || void 0
|
|
170
|
+
}, j({
|
|
171
|
+
default: C(() => [
|
|
172
|
+
n("div", F, [
|
|
173
|
+
n("div", G, [
|
|
174
|
+
l(s.$slots, "mobile-sidebar", {
|
|
175
|
+
isDesktop: e(c),
|
|
176
|
+
categoryRoutePrefix: y.value
|
|
177
|
+
})
|
|
166
178
|
]),
|
|
167
|
-
|
|
168
|
-
l(
|
|
179
|
+
s.$slots["mobile-sidebar-footer"] ? (i(), a("div", J, [
|
|
180
|
+
l(s.$slots, "mobile-sidebar-footer")
|
|
169
181
|
])) : d("", !0)
|
|
170
182
|
])
|
|
171
183
|
]),
|
|
172
184
|
_: 2
|
|
173
185
|
}, [
|
|
174
|
-
|
|
186
|
+
s.$slots["mobile-sidebar-header"] ? {
|
|
175
187
|
name: "header",
|
|
176
|
-
fn:
|
|
177
|
-
l(
|
|
188
|
+
fn: C(() => [
|
|
189
|
+
l(s.$slots, "mobile-sidebar-header")
|
|
178
190
|
]),
|
|
179
191
|
key: "0"
|
|
180
192
|
} : void 0
|
|
181
|
-
]), 1032, ["show", "triggerClass", "class"])
|
|
182
|
-
]));
|
|
193
|
+
]), 1032, ["show", "triggerClass", "teleport-target", "class"])
|
|
194
|
+
], 2));
|
|
183
195
|
}
|
|
184
196
|
});
|
|
185
197
|
export {
|
|
186
|
-
|
|
198
|
+
ne as default
|
|
187
199
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as AppShell } from './AppShell.vue';
|
|
2
|
-
export type { AppShellProps, AppShellLayoutMode } from '../../types/appshell.type';
|
|
2
|
+
export type { AppShellProps, AppShellLayoutMode, AppShellBreakpointSource, } from '../../types/appshell.type';
|
|
@@ -9,6 +9,15 @@ export interface AppShellLayoutContext {
|
|
|
9
9
|
isMobileMenuOpen: Ref<boolean>;
|
|
10
10
|
isSidebarVisible: Ref<boolean>;
|
|
11
11
|
sidebarHidden: ComputedRef<boolean>;
|
|
12
|
+
/**
|
|
13
|
+
* True at or above `mobileBreakpoint`.
|
|
14
|
+
* Null while `breakpointSource="container"` has not measured the shell yet.
|
|
15
|
+
*/
|
|
16
|
+
isDesktop: ComputedRef<boolean | null>;
|
|
17
|
+
/** Root element measured when `breakpointSource` is `container`. */
|
|
18
|
+
shellRef: Ref<HTMLElement | null>;
|
|
19
|
+
/** `@container` when breakpoint behavior follows the shell width. */
|
|
20
|
+
shellClass: ComputedRef<string>;
|
|
12
21
|
pageTitle: ComputedRef<string>;
|
|
13
22
|
isScrolled: Ref<boolean>;
|
|
14
23
|
/** Document / shell reading direction */
|
|
@@ -26,6 +35,8 @@ export interface AppShellLayoutContext {
|
|
|
26
35
|
mobileHeader: string;
|
|
27
36
|
desktopSidebar: string;
|
|
28
37
|
desktopOnly: string;
|
|
38
|
+
/** Hides the desktop sidebar column below `mobileBreakpoint`. */
|
|
39
|
+
mobileSidebar: string;
|
|
29
40
|
}>;
|
|
30
41
|
/** Container classes — used by classic / standalone layouts */
|
|
31
42
|
containerClasses: ComputedRef<string>;
|