vlite3 1.5.34 → 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/CommandPalette/CommandPaletteContent2.vue.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem2.vue.js → CommandPaletteItem.vue.js} +1 -1
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/Timeline/Timeline.vue.d.ts +3 -1
- package/components/Timeline/Timeline.vue.js +24 -22
- package/docs/components/app-shell.md +2 -0
- package/docs-manifest.json +3 -3
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/appshell.type.d.ts +6 -0
- package/types/timeline.type.d.ts +1 -0
|
@@ -1,139 +1,187 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { useRoute as
|
|
3
|
-
import { useLocalStorage as
|
|
4
|
-
import { useBreadcrumb as
|
|
5
|
-
import { useRtl as
|
|
6
|
-
const
|
|
7
|
-
function
|
|
8
|
-
const
|
|
1
|
+
import { computed as n, shallowRef as I, ref as d, provide as L, watch as k, onMounted as Y, onUnmounted as _, nextTick as U } from "vue";
|
|
2
|
+
import { useRoute as V } from "vue-router";
|
|
3
|
+
import { useLocalStorage as W, useBreakpoints as F, breakpointsTailwind as K } from "@vueuse/core";
|
|
4
|
+
import { useBreadcrumb as q } from "../../composables/useBreadcrumb.js";
|
|
5
|
+
import { useRtl as G } from "../../composables/useRtl.js";
|
|
6
|
+
const J = /* @__PURE__ */ Symbol("appshell-layout-ctx");
|
|
7
|
+
function ne(e, v) {
|
|
8
|
+
const O = e.breadcrumb ? q({
|
|
9
9
|
homeIcon: e.breadcrumbHomeIcon,
|
|
10
10
|
labelMap: e.breadcrumbLabels || {}
|
|
11
|
-
}) : { items:
|
|
12
|
-
|
|
13
|
-
compact:
|
|
14
|
-
renderNestedTabs:
|
|
15
|
-
setNestedTabs: (l,
|
|
16
|
-
|
|
11
|
+
}) : { items: n(() => []) }, f = I([]), u = d("");
|
|
12
|
+
L("navbar-context", {
|
|
13
|
+
compact: n(() => e.compact),
|
|
14
|
+
renderNestedTabs: n(() => e.renderNestedTabs),
|
|
15
|
+
setNestedTabs: (l, i) => {
|
|
16
|
+
f.value = l, u.value = i;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
const
|
|
20
|
-
() =>
|
|
21
|
-
)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
const b = d(!1), w = d(null), s = d(null), H = n(
|
|
20
|
+
() => (e.breakpointSource ?? "viewport") === "container" ? "@container" : ""
|
|
21
|
+
);
|
|
22
|
+
k(w, (l, i, t) => {
|
|
23
|
+
if ((e.breakpointSource ?? "viewport") !== "container" || !l) {
|
|
24
|
+
s.value = null;
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const o = new ResizeObserver((a) => {
|
|
28
|
+
s.value = a[0]?.contentRect.width ?? 0;
|
|
29
|
+
});
|
|
30
|
+
o.observe(l), t(() => o.disconnect());
|
|
31
|
+
});
|
|
32
|
+
const x = d(!1), r = d(null), h = d(null), j = G(), y = n(() => j.value), R = n(
|
|
33
|
+
() => y.value ? "opacity-0 translate-x-2" : "opacity-0 -translate-x-2"
|
|
34
|
+
), c = W("vlite-appshell-sidebar-visible", !0), $ = n(() => e.sidebarToggle && v), E = () => {
|
|
35
|
+
c.value = !c.value;
|
|
36
|
+
}, B = n(() => e.hideSidebar || $.value && !c.value), M = (l) => {
|
|
37
|
+
f.value.find((t) => t.value === l) && (typeof l == "string" && l.startsWith("/") ? import("vue-router").then(({ useRouter: t }) => {
|
|
38
|
+
t().push(l).catch(() => {
|
|
26
39
|
});
|
|
27
|
-
}) :
|
|
28
|
-
},
|
|
29
|
-
|
|
40
|
+
}) : u.value = l);
|
|
41
|
+
}, S = () => {
|
|
42
|
+
x.value = window.scrollY > 10;
|
|
30
43
|
};
|
|
31
|
-
|
|
32
|
-
window.addEventListener("scroll",
|
|
33
|
-
}),
|
|
34
|
-
window.removeEventListener("scroll",
|
|
44
|
+
Y(() => {
|
|
45
|
+
window.addEventListener("scroll", S, { passive: !0 });
|
|
46
|
+
}), _(() => {
|
|
47
|
+
window.removeEventListener("scroll", S);
|
|
35
48
|
});
|
|
36
|
-
const
|
|
37
|
-
const l = e.mobileBreakpoint || "md",
|
|
38
|
-
sm:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
49
|
+
const p = n(() => {
|
|
50
|
+
const l = e.mobileBreakpoint || "md", i = e.compact ? "w-20" : "", t = (e.breakpointSource ?? "viewport") === "container", o = {
|
|
51
|
+
sm: {
|
|
52
|
+
mobileTrigger: "sm:hidden",
|
|
53
|
+
desktopContent: "hidden sm:flex",
|
|
54
|
+
sidebarLayout: `flex flex-col max-sm:w-full ${i} h-auto sm:h-full sm:max-h-screen shrink-0`,
|
|
55
|
+
mobileHeader: "sm:hidden flex items-center justify-between px-4 py-3 shrink-0 bg-background",
|
|
56
|
+
desktopSidebar: "hidden sm:flex flex-col h-full w-full overflow-hidden",
|
|
57
|
+
desktopOnly: "hidden sm:flex",
|
|
58
|
+
mobileSidebar: "max-sm:hidden"
|
|
59
|
+
},
|
|
60
|
+
md: {
|
|
61
|
+
mobileTrigger: "md:hidden",
|
|
62
|
+
desktopContent: "hidden md:flex",
|
|
63
|
+
sidebarLayout: `flex flex-col max-md:w-full ${i} h-auto md:h-full md:max-h-screen shrink-0`,
|
|
64
|
+
mobileHeader: "md:hidden flex items-center justify-between px-4 py-3 shrink-0 bg-background",
|
|
65
|
+
desktopSidebar: "hidden md:flex flex-col h-full w-full overflow-hidden",
|
|
66
|
+
desktopOnly: "hidden md:flex",
|
|
67
|
+
mobileSidebar: "max-md:hidden"
|
|
68
|
+
},
|
|
69
|
+
lg: {
|
|
70
|
+
mobileTrigger: "lg:hidden",
|
|
71
|
+
desktopContent: "hidden lg:flex",
|
|
72
|
+
sidebarLayout: `flex flex-col max-lg:w-full ${i} h-auto lg:h-full lg:max-h-screen shrink-0`,
|
|
73
|
+
mobileHeader: "lg:hidden flex items-center justify-between px-4 py-3 shrink-0 bg-background",
|
|
74
|
+
desktopSidebar: "hidden lg:flex flex-col h-full w-full overflow-hidden",
|
|
75
|
+
desktopOnly: "hidden lg:flex",
|
|
76
|
+
mobileSidebar: "max-lg:hidden"
|
|
77
|
+
},
|
|
78
|
+
xl: {
|
|
79
|
+
mobileTrigger: "xl:hidden",
|
|
80
|
+
desktopContent: "hidden xl:flex",
|
|
81
|
+
sidebarLayout: `flex flex-col max-xl:w-full ${i} h-auto xl:h-full xl:max-h-screen shrink-0`,
|
|
82
|
+
mobileHeader: "xl:hidden flex items-center justify-between px-4 py-3 shrink-0 bg-background",
|
|
83
|
+
desktopSidebar: "hidden xl:flex flex-col h-full w-full overflow-hidden",
|
|
84
|
+
desktopOnly: "hidden xl:flex",
|
|
85
|
+
mobileSidebar: "max-xl:hidden"
|
|
86
|
+
}
|
|
87
|
+
}, a = {
|
|
88
|
+
sm: {
|
|
89
|
+
mobileTrigger: "@min-[640px]:hidden",
|
|
90
|
+
desktopContent: "hidden @min-[640px]:flex",
|
|
91
|
+
sidebarLayout: `flex flex-col @max-[639px]:w-full ${i} h-auto @min-[640px]:h-full @min-[640px]:max-h-screen shrink-0`,
|
|
92
|
+
mobileHeader: "@min-[640px]:hidden flex items-center justify-between px-4 py-3 shrink-0 bg-background",
|
|
93
|
+
desktopSidebar: "hidden @min-[640px]:flex flex-col h-full w-full overflow-hidden",
|
|
94
|
+
desktopOnly: "hidden @min-[640px]:flex",
|
|
95
|
+
mobileSidebar: "@max-[639px]:hidden"
|
|
96
|
+
},
|
|
97
|
+
md: {
|
|
98
|
+
mobileTrigger: "@min-[768px]:hidden",
|
|
99
|
+
desktopContent: "hidden @min-[768px]:flex",
|
|
100
|
+
sidebarLayout: `flex flex-col @max-[767px]:w-full ${i} h-auto @min-[768px]:h-full @min-[768px]:max-h-screen shrink-0`,
|
|
101
|
+
mobileHeader: "@min-[768px]:hidden flex items-center justify-between px-4 py-3 shrink-0 bg-background",
|
|
102
|
+
desktopSidebar: "hidden @min-[768px]:flex flex-col h-full w-full overflow-hidden",
|
|
103
|
+
desktopOnly: "hidden @min-[768px]:flex",
|
|
104
|
+
mobileSidebar: "@max-[767px]:hidden"
|
|
105
|
+
},
|
|
106
|
+
lg: {
|
|
107
|
+
mobileTrigger: "@min-[1024px]:hidden",
|
|
108
|
+
desktopContent: "hidden @min-[1024px]:flex",
|
|
109
|
+
sidebarLayout: `flex flex-col @max-[1023px]:w-full ${i} h-auto @min-[1024px]:h-full @min-[1024px]:max-h-screen shrink-0`,
|
|
110
|
+
mobileHeader: "@min-[1024px]:hidden flex items-center justify-between px-4 py-3 shrink-0 bg-background",
|
|
111
|
+
desktopSidebar: "hidden @min-[1024px]:flex flex-col h-full w-full overflow-hidden",
|
|
112
|
+
desktopOnly: "hidden @min-[1024px]:flex",
|
|
113
|
+
mobileSidebar: "@max-[1023px]:hidden"
|
|
114
|
+
},
|
|
115
|
+
xl: {
|
|
116
|
+
mobileTrigger: "@min-[1280px]:hidden",
|
|
117
|
+
desktopContent: "hidden @min-[1280px]:flex",
|
|
118
|
+
sidebarLayout: `flex flex-col @max-[1279px]:w-full ${i} h-auto @min-[1280px]:h-full @min-[1280px]:max-h-screen shrink-0`,
|
|
119
|
+
mobileHeader: "@min-[1280px]:hidden flex items-center justify-between px-4 py-3 shrink-0 bg-background",
|
|
120
|
+
desktopSidebar: "hidden @min-[1280px]:flex flex-col h-full w-full overflow-hidden",
|
|
121
|
+
desktopOnly: "hidden @min-[1280px]:flex",
|
|
122
|
+
mobileSidebar: "@max-[1279px]:hidden"
|
|
123
|
+
}
|
|
75
124
|
};
|
|
76
|
-
|
|
77
|
-
|
|
125
|
+
return (t ? a : o)[l];
|
|
126
|
+
}), z = n(() => {
|
|
127
|
+
const l = e.variant === "sidebar", i = {
|
|
78
128
|
fixed: "relative z-40",
|
|
79
129
|
sticky: "relative z-40",
|
|
80
130
|
relative: "relative z-10",
|
|
81
131
|
absolute: "relative z-40"
|
|
82
|
-
},
|
|
83
|
-
e.glass && (
|
|
132
|
+
}, t = "bg-body", o = [
|
|
133
|
+
e.glass && (x.value || l || e.floating) ? "bg-background/95" : "bg-background",
|
|
84
134
|
e.border && !e.floating ? l ? "border-e border-border" : "border-b border-border" : "",
|
|
85
135
|
e.floating ? "m-4 rounded shadow-lg border border-border/50" : "",
|
|
86
|
-
|
|
87
|
-
],
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
xl: "max-xl:hidden"
|
|
92
|
-
}[h] : "";
|
|
93
|
-
let g = "";
|
|
94
|
-
return l ? g = y.value.sidebarLayout : g = `flex items-center gap-4 w-full px-4 sm:px-6 lg:px-8 ${e.height}`, [s, n[e.position], ...r, g, x, e.class].filter(Boolean).join(" ");
|
|
95
|
-
}), O = t(() => {
|
|
136
|
+
x.value && !e.floating && !l && e.position === "sticky" ? "shadow-sm" : ""
|
|
137
|
+
], a = l ? p.value.mobileSidebar : "";
|
|
138
|
+
let m = "";
|
|
139
|
+
return l ? m = p.value.sidebarLayout : (e.breakpointSource ?? "viewport") === "container" ? m = `flex items-center gap-4 w-full px-4 @min-[640px]:px-6 @min-[1024px]:px-8 ${e.height}` : m = `flex items-center gap-4 w-full px-4 sm:px-6 lg:px-8 ${e.height}`, [t, i[e.position], ...o, m, a, e.class].filter(Boolean).join(" ");
|
|
140
|
+
}), N = n(() => {
|
|
96
141
|
if (e.variant === "sidebar")
|
|
97
142
|
return "flex-1 py-4 overflow-y-auto scrollbar-thin scrollbar-stable";
|
|
98
143
|
if (e.centerPosition === "left")
|
|
99
144
|
return "flex items-center justify-start";
|
|
100
|
-
}),
|
|
101
|
-
|
|
102
|
-
() =>
|
|
145
|
+
}), g = V();
|
|
146
|
+
k(
|
|
147
|
+
() => g.path,
|
|
103
148
|
() => {
|
|
104
|
-
|
|
105
|
-
|
|
149
|
+
b.value = !1, U(() => {
|
|
150
|
+
r.value && (r.value.scrollTop = 0, r.value.firstElementChild && (r.value.firstElementChild.scrollTop = 0)), h.value && (h.value.scrollTop = 0);
|
|
106
151
|
});
|
|
107
152
|
}
|
|
108
153
|
);
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
l && (
|
|
154
|
+
const P = { sm: 640, md: 768, lg: 1024, xl: 1280 }, A = F(K).greater(e.mobileBreakpoint), T = n(() => (e.breakpointSource ?? "viewport") !== "container" ? A.value : s.value == null ? null : s.value >= P[e.mobileBreakpoint || "md"]);
|
|
155
|
+
k(T, (l) => {
|
|
156
|
+
l && (b.value = !1);
|
|
112
157
|
});
|
|
113
|
-
const
|
|
158
|
+
const D = n(() => g.meta?.title || g.name || ""), C = {
|
|
114
159
|
props: e,
|
|
115
160
|
isLayoutMode: v,
|
|
116
|
-
isMobileMenuOpen:
|
|
117
|
-
isSidebarVisible:
|
|
161
|
+
isMobileMenuOpen: b,
|
|
162
|
+
isSidebarVisible: c,
|
|
118
163
|
sidebarHidden: B,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
164
|
+
isDesktop: T,
|
|
165
|
+
shellRef: w,
|
|
166
|
+
shellClass: H,
|
|
167
|
+
pageTitle: D,
|
|
168
|
+
isScrolled: x,
|
|
169
|
+
isRtl: y,
|
|
170
|
+
sidebarSlideFromClass: R,
|
|
171
|
+
mainScrollRef: r,
|
|
172
|
+
layoutMainRef: h,
|
|
173
|
+
toggleSidebar: E,
|
|
174
|
+
handleNestedTabClick: M,
|
|
175
|
+
breakpointClasses: p,
|
|
176
|
+
containerClasses: z,
|
|
177
|
+
centerClasses: N,
|
|
178
|
+
breadcrumbData: O,
|
|
179
|
+
nestedTabsItems: f,
|
|
180
|
+
activeNestedTab: u
|
|
133
181
|
};
|
|
134
|
-
return
|
|
182
|
+
return L(J, C), C;
|
|
135
183
|
}
|
|
136
184
|
export {
|
|
137
|
-
|
|
138
|
-
|
|
185
|
+
J as APPSHELL_LAYOUT_KEY,
|
|
186
|
+
ne as useAppShell
|
|
139
187
|
};
|
|
@@ -4,7 +4,7 @@ import _ 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 "./
|
|
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",
|
|
@@ -3,7 +3,7 @@ import L from "./Icon.vue.js";
|
|
|
3
3
|
import v from "./Modal.vue.js";
|
|
4
4
|
import N from "./CommandPalette/CommandPaletteContent.vue.js";
|
|
5
5
|
import { $t as U } from "../utils/i18n.js";
|
|
6
|
-
/* empty css
|
|
6
|
+
/* empty css */
|
|
7
7
|
const V = { class: "block truncate -text-fs-1.5" }, S = { class: "ms-auto inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border border-border/80 bg-background text-muted-foreground ms-1" }, A = /* @__PURE__ */ x({
|
|
8
8
|
__name: "NavbarCommandPalette",
|
|
9
9
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component } from 'vue';
|
|
2
|
-
import { TimelineStep, TimelineMode, TimelineDirection, TimelineTextPosition, TimelineLineStyle, TimelineIndicatorType } from '../../types';
|
|
2
|
+
import { TimelineStep, TimelineMode, TimelineDirection, TimelineTextPosition, TimelineLineStyle, TimelineIndicatorType, TimelineTone } from '../../types';
|
|
3
3
|
interface Props {
|
|
4
4
|
steps: TimelineStep[];
|
|
5
5
|
mode?: TimelineMode;
|
|
@@ -10,6 +10,7 @@ interface Props {
|
|
|
10
10
|
textPosition?: TimelineTextPosition;
|
|
11
11
|
lineStyle?: TimelineLineStyle;
|
|
12
12
|
indicatorType?: TimelineIndicatorType;
|
|
13
|
+
tone?: TimelineTone;
|
|
13
14
|
clickable?: boolean;
|
|
14
15
|
class?: string;
|
|
15
16
|
}
|
|
@@ -57,6 +58,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
57
58
|
textPosition: TimelineTextPosition;
|
|
58
59
|
lineStyle: TimelineLineStyle;
|
|
59
60
|
as: string;
|
|
61
|
+
tone: TimelineTone;
|
|
60
62
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
61
63
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
62
64
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as V, useAttrs as z, useSlots as E, computed as S, openBlock as c, createBlock as x, createElementBlock as y, mergeProps as
|
|
1
|
+
import { defineComponent as V, useAttrs as z, useSlots as E, computed as S, openBlock as c, createBlock as x, createElementBlock as y, mergeProps as s, createElementVNode as b, normalizeClass as F, normalizeStyle as P, createCommentVNode as $, Fragment as w, renderList as O, isMemoSame as G, withCtx as u, renderSlot as m, cloneVNode as L, h as C, Comment as R, Text as q } from "vue";
|
|
2
2
|
import D from "./TimelineItem.vue.js";
|
|
3
3
|
const H = {
|
|
4
4
|
key: 0,
|
|
@@ -21,38 +21,40 @@ const H = {
|
|
|
21
21
|
textPosition: { default: "bottom" },
|
|
22
22
|
lineStyle: { default: "solid" },
|
|
23
23
|
indicatorType: { default: "icon" },
|
|
24
|
+
tone: { default: "primary" },
|
|
24
25
|
clickable: { type: Boolean, default: !1 },
|
|
25
26
|
class: { default: "" }
|
|
26
27
|
},
|
|
27
28
|
emits: ["step-click"],
|
|
28
29
|
setup(t, { emit: T }) {
|
|
29
|
-
const e = t, j = z(),
|
|
30
|
-
A("step-click", i,
|
|
30
|
+
const e = t, j = z(), v = E(), A = T, d = S(() => e.direction === "vertical"), h = S(() => e.steps.length <= 1 ? 0 : Math.min(e.activeStep, e.steps.length - 1) / (e.steps.length - 1) * 100), B = (i, o) => {
|
|
31
|
+
A("step-click", i, o);
|
|
31
32
|
}, g = (i) => {
|
|
32
|
-
const
|
|
33
|
+
const o = [];
|
|
33
34
|
for (const l of i)
|
|
34
35
|
if (!(l.type === R || l.type === q && !String(l.children ?? "").trim())) {
|
|
35
36
|
if (l.type === w && Array.isArray(l.children)) {
|
|
36
|
-
|
|
37
|
+
o.push(...g(l.children));
|
|
37
38
|
continue;
|
|
38
39
|
}
|
|
39
|
-
|
|
40
|
+
o.push(l);
|
|
40
41
|
}
|
|
41
|
-
return
|
|
42
|
+
return o;
|
|
42
43
|
}, M = () => typeof e.gap == "number" ? `${Number.isFinite(e.gap) ? Math.max(0, e.gap) : 0}px` : e.gap, N = () => {
|
|
43
|
-
const i = e.steps.flatMap((a, p) => g(
|
|
44
|
+
const i = e.steps.flatMap((a, p) => g(v.item?.({ step: a, index: p }) ?? []).map((f) => L(f, { class: "vlite-timeline__content-item" }))), o = s(j, {
|
|
44
45
|
class: ["vlite-timeline", "vlite-timeline--content", e.class],
|
|
45
46
|
style: { "--vlite-timeline-gap": M() },
|
|
46
47
|
"data-vlite-timeline-indicator": e.indicatorType === "number" ? "number" : "dot",
|
|
47
|
-
"data-vlite-timeline-line": e.lineStyle
|
|
48
|
+
"data-vlite-timeline-line": e.lineStyle,
|
|
49
|
+
"data-vlite-timeline-tone": e.tone
|
|
48
50
|
});
|
|
49
|
-
if (typeof e.as == "string") return C(e.as,
|
|
51
|
+
if (typeof e.as == "string") return C(e.as, o, i);
|
|
50
52
|
const l = Object.fromEntries(
|
|
51
|
-
Object.entries(
|
|
53
|
+
Object.entries(v).filter(([a]) => a !== "item")
|
|
52
54
|
);
|
|
53
|
-
return l.default = () => i, C(e.as,
|
|
55
|
+
return l.default = () => i, C(e.as, o, l);
|
|
54
56
|
};
|
|
55
|
-
return (i,
|
|
57
|
+
return (i, o) => t.mode === "content" ? (c(), x(N, { key: 0 })) : (c(), y("nav", s({ key: 1 }, i.$attrs, {
|
|
56
58
|
"aria-label": "Progress",
|
|
57
59
|
class: ["w-full pb-5", e.class]
|
|
58
60
|
}), [
|
|
@@ -68,13 +70,13 @@ const H = {
|
|
|
68
70
|
!d.value && t.textPosition === "bottom" ? (c(), y("div", H, [
|
|
69
71
|
b("div", {
|
|
70
72
|
class: "h-full bg-primary transition-all duration-300 ease-in-out",
|
|
71
|
-
style: P({ width: `${
|
|
73
|
+
style: P({ width: `${h.value}%` })
|
|
72
74
|
}, null, 4)
|
|
73
75
|
])) : $("", !0),
|
|
74
76
|
!d.value && t.textPosition === "right" ? (c(), y("div", I, [
|
|
75
77
|
b("div", {
|
|
76
78
|
class: "h-full bg-primary transition-all duration-300 ease-in-out",
|
|
77
|
-
style: P({ width: `${
|
|
79
|
+
style: P({ width: `${h.value}%` })
|
|
78
80
|
}, null, 4)
|
|
79
81
|
])) : $("", !0),
|
|
80
82
|
(c(!0), y(w, null, O(t.steps, (l, a, p, r) => {
|
|
@@ -104,27 +106,27 @@ const H = {
|
|
|
104
106
|
onStepClick: B
|
|
105
107
|
}, {
|
|
106
108
|
indicator: u((n) => [
|
|
107
|
-
m(i.$slots, "indicator",
|
|
109
|
+
m(i.$slots, "indicator", s({ ref_for: !0 }, n))
|
|
108
110
|
]),
|
|
109
111
|
title: u((n) => [
|
|
110
|
-
m(i.$slots, "title",
|
|
112
|
+
m(i.$slots, "title", s({ ref_for: !0 }, n))
|
|
111
113
|
]),
|
|
112
114
|
subtitle: u((n) => [
|
|
113
|
-
m(i.$slots, "subtitle",
|
|
115
|
+
m(i.$slots, "subtitle", s({ ref_for: !0 }, n))
|
|
114
116
|
]),
|
|
115
117
|
status: u((n) => [
|
|
116
|
-
m(i.$slots, "status",
|
|
118
|
+
m(i.$slots, "status", s({ ref_for: !0 }, n))
|
|
117
119
|
]),
|
|
118
120
|
content: u((n) => [
|
|
119
|
-
m(i.$slots, "content",
|
|
121
|
+
m(i.$slots, "content", s({ ref_for: !0 }, n))
|
|
120
122
|
]),
|
|
121
123
|
body: u((n) => [
|
|
122
|
-
m(i.$slots, "body",
|
|
124
|
+
m(i.$slots, "body", s({ ref_for: !0 }, n))
|
|
123
125
|
]),
|
|
124
126
|
_: 3
|
|
125
127
|
}, 8, ["step", "index", "is-last", "active-step", "direction", "text-position", "line-style", "indicator-type", "clickable"]));
|
|
126
128
|
return k.memo = f, k;
|
|
127
|
-
},
|
|
129
|
+
}, o, 0), 128))
|
|
128
130
|
], 2)
|
|
129
131
|
], 16));
|
|
130
132
|
}
|
|
@@ -25,6 +25,7 @@ By using `AppShell`, you separate the concern of *where* your UI elements live f
|
|
|
25
25
|
| `sidebarToggle` | `boolean` | `false` | Enables the desktop sidebar toggle feature. Renders a toggle if configured via `#header`. Preference is persisted in `localStorage`. |
|
|
26
26
|
| `renderNestedTabs` | `boolean` | `false` | When `true`, clicking a top-level sidebar item with children extracts those children and renders them as a `NavbarTabs` bar at the top of `#main`. |
|
|
27
27
|
| `mobileBreakpoint` | `'sm' \| 'md' \| 'lg' \| 'xl'` | `'md'` | The Tailwind breakpoint at which the layout switches from mobile (hamburger drawer) to the full desktop sidebar layout. |
|
|
28
|
+
| `breakpointSource` | `'viewport' \| 'container'` | `'viewport'` | `viewport` follows the browser. `container` follows the shell's own width, so a sized canvas (such as a preview frame) switches layout without resizing the browser. |
|
|
28
29
|
| `contentClass` | `string` | `''` | Additional CSS classes applied to the main scrollable area. |
|
|
29
30
|
| `rightClass` | `string` | `''` | Additional CSS classes applied to the bottom-pinned footer area (`#sidebar-footer`) or right header section. |
|
|
30
31
|
| `menuClass` | `string` | `''` | Additional CSS classes applied to the menu wrapper. |
|
|
@@ -98,6 +99,7 @@ When using the `<template #header>` slot, you are granted several powerful scope
|
|
|
98
99
|
| `toggleSidebar` | `() => void` | Show/hide the desktop sidebar dynamically. |
|
|
99
100
|
| `breadcrumbItems`| `BreadcrumbItem[]` | Auto-generated breadcrumb array from the current route. To be fed into `<Breadcrumb>`. |
|
|
100
101
|
| `pageTitle` | `string` | The page title inferred automatically from `route.meta.title` or `route.name`. |
|
|
102
|
+
| `isDesktop` | `boolean \| null` | True at or above `mobileBreakpoint`. `null` only while `breakpointSource="container"` is still measuring. Also passed to `#sidebar`, `#main`, and `#mobile-sidebar`. |
|
|
101
103
|
|
|
102
104
|
---
|
|
103
105
|
|
package/docs-manifest.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"managedBy": "vlite3",
|
|
3
3
|
"manifestVersion": 1,
|
|
4
4
|
"packageName": "vlite3",
|
|
5
|
-
"packageVersion": "1.5.
|
|
6
|
-
"generatedAt": "2026-
|
|
5
|
+
"packageVersion": "1.5.35",
|
|
6
|
+
"generatedAt": "2026-10-01T15:52:37.283Z",
|
|
7
7
|
"files": {
|
|
8
8
|
"component-index.md": {
|
|
9
9
|
"sha256": "e49e0418bda4262d9181fcd9a79cce02513027b34aab865663da7e2d93e7c702"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"sha256": "4600f3b731be8a10131e6a606c9ed1a9e93c4598ce8207492c3543f2fe2f9ee7"
|
|
16
16
|
},
|
|
17
17
|
"components/app-shell.md": {
|
|
18
|
-
"sha256": "
|
|
18
|
+
"sha256": "a376b4d8b09785dbaeb99852eb967ad8da328d78db5af98978fbb0f197e6416a"
|
|
19
19
|
},
|
|
20
20
|
"components/async-select.md": {
|
|
21
21
|
"sha256": "7b9cfe11e57327566a0c9d3c49869130afaa445f59d486889dde1d540e01c3c7"
|