@leavepulse/ui 0.28.3 → 0.28.5
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/dist/chunks/{LpAddressInput-BTqnUXZG.js → LpAddressInput-Bk6D8Bcy.js} +3 -3
- package/dist/chunks/{LpAppShell-B5k0J3Cf.js → LpAppShell-CGX0DlIW.js} +11 -6
- package/dist/chunks/{LpCard-gu11ZmSt.js → LpCard-DSefTGEH.js} +7 -1
- package/dist/chunks/{LpFormField-CesaPWPO.js → LpFormField-fV_2ZdCk.js} +7 -3
- package/dist/chunks/{LpInput-jwqXlAy0.js → LpInput-CYcTL9gj.js} +1 -1
- package/dist/chunks/{LpPasswordInput-Bmo6q9Kd.js → LpPasswordInput-DrYE4J5d.js} +1 -1
- package/dist/chunks/{LpSelect-Cw8-gL5F.js → LpSelect-ANIVtrpM.js} +1 -1
- package/dist/chunks/{LpSidebar-7Vpy2IJc.js → LpSidebar-CWehDCxN.js} +34 -8
- package/dist/chunks/LpSidebarNav-5RGNr2D3.js +185 -0
- package/dist/chunks/{LpTextarea-1ENb3ZAO.js → LpTextarea-BMIOfw5l.js} +1 -1
- package/dist/components/LpAddressInput.vue.js +1 -1
- package/dist/components/LpAppShell.vue.d.ts +17 -11
- package/dist/components/LpAppShell.vue.js +1 -1
- package/dist/components/LpCard.vue.js +1 -1
- package/dist/components/LpFormField.vue.d.ts +3 -1
- package/dist/components/LpFormField.vue.js +1 -1
- package/dist/components/LpInput.vue.js +1 -1
- package/dist/components/LpPasswordInput.vue.js +1 -1
- package/dist/components/LpSelect.vue.js +1 -1
- package/dist/components/LpSidebar.vue.d.ts +32 -10
- package/dist/components/LpSidebar.vue.js +1 -1
- package/dist/components/LpSidebarNav.vue.d.ts +11 -2
- package/dist/components/LpSidebarNav.vue.js +1 -1
- package/dist/components/LpTextarea.vue.js +1 -1
- package/dist/components/sidebar.d.ts +18 -0
- package/dist/index.js +9 -9
- package/package.json +1 -1
- package/src/components/LpAppShell.vue +27 -3
- package/src/components/LpCard.vue +7 -1
- package/src/components/LpFormField.vue +13 -3
- package/src/components/LpSelect.vue +0 -0
- package/src/components/LpSidebar.vue +67 -1
- package/src/components/LpSidebarNav.vue +83 -4
- package/src/components/sidebar.ts +18 -0
- package/dist/chunks/LpSidebarNav-CFX5NxGs.js +0 -126
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, createElementVNode, createCommentVNode, Fragment, renderList, createBlock, withCtx, toDisplayString, resolveDynamicComponent, normalizeClass, unref, renderSlot, createTextVNode } from "vue";
|
|
2
|
-
import { Motion } from "motion-v";
|
|
3
|
-
import { usePillTransition } from "../composables/usePillTransition.js";
|
|
4
|
-
import { _ as _sfc_main$4 } from "./LpBadge-BPodVcJa.js";
|
|
5
|
-
import { _ as _sfc_main$2 } from "./LpContextMenu-D0mzXqA7.js";
|
|
6
|
-
import { _ as _sfc_main$3 } from "./LpIcon-CCnX5_2j.js";
|
|
7
|
-
import { _ as _sfc_main$1 } from "./LpScrollArea-D8xyKXcF.js";
|
|
8
|
-
const _hoisted_1 = {
|
|
9
|
-
key: 0,
|
|
10
|
-
class: "flex min-h-0 flex-1 flex-col gap-4"
|
|
11
|
-
};
|
|
12
|
-
const _hoisted_2 = {
|
|
13
|
-
key: 0,
|
|
14
|
-
class: "flex items-center gap-3 px-1"
|
|
15
|
-
};
|
|
16
|
-
const _hoisted_3 = { class: "space-y-1" };
|
|
17
|
-
const _hoisted_4 = {
|
|
18
|
-
key: 0,
|
|
19
|
-
class: "px-2 pb-1 pt-2 text-[11px] font-semibold uppercase tracking-[0.08em] text-muted"
|
|
20
|
-
};
|
|
21
|
-
const _hoisted_5 = { class: "relative z-10 min-w-0 flex-1 truncate text-left" };
|
|
22
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
23
|
-
__name: "LpSidebarNav",
|
|
24
|
-
props: {
|
|
25
|
-
groups: {},
|
|
26
|
-
pillId: {},
|
|
27
|
-
itemActive: {},
|
|
28
|
-
loading: { type: Boolean },
|
|
29
|
-
skeletonRows: { default: 6 },
|
|
30
|
-
skeletonHeader: { type: Boolean, default: true }
|
|
31
|
-
},
|
|
32
|
-
emits: ["activate"],
|
|
33
|
-
setup(__props, { emit: __emit }) {
|
|
34
|
-
const emit = __emit;
|
|
35
|
-
const pillTransition = usePillTransition();
|
|
36
|
-
return (_ctx, _cache) => {
|
|
37
|
-
return __props.loading ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
38
|
-
__props.skeletonHeader ? (openBlock(), createElementBlock("div", _hoisted_2, [..._cache[0] || (_cache[0] = [
|
|
39
|
-
createElementVNode("div", { class: "size-10 shrink-0 animate-pulse rounded-pill bg-surface-soft" }, null, -1),
|
|
40
|
-
createElementVNode("div", { class: "flex-1 space-y-2" }, [
|
|
41
|
-
createElementVNode("div", { class: "h-3.5 w-24 animate-pulse rounded bg-surface-soft" }),
|
|
42
|
-
createElementVNode("div", { class: "h-3 w-16 animate-pulse rounded bg-surface-soft/60" })
|
|
43
|
-
], -1)
|
|
44
|
-
])])) : createCommentVNode("", true),
|
|
45
|
-
createElementVNode("div", _hoisted_3, [
|
|
46
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.skeletonRows, (n) => {
|
|
47
|
-
return openBlock(), createElementBlock("div", {
|
|
48
|
-
key: n,
|
|
49
|
-
class: "h-9 animate-pulse rounded-control bg-surface-soft"
|
|
50
|
-
});
|
|
51
|
-
}), 128))
|
|
52
|
-
])
|
|
53
|
-
])) : (openBlock(), createBlock(_sfc_main$1, {
|
|
54
|
-
key: 1,
|
|
55
|
-
class: "min-h-0 flex-1",
|
|
56
|
-
"content-class": "flex min-h-full flex-col gap-4"
|
|
57
|
-
}, {
|
|
58
|
-
default: withCtx(() => [
|
|
59
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.groups, (section, si) => {
|
|
60
|
-
return openBlock(), createElementBlock("div", {
|
|
61
|
-
key: si,
|
|
62
|
-
class: "flex flex-col gap-0.5"
|
|
63
|
-
}, [
|
|
64
|
-
section.title ? (openBlock(), createElementBlock("p", _hoisted_4, toDisplayString(section.title), 1)) : createCommentVNode("", true),
|
|
65
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(section.items, (item) => {
|
|
66
|
-
return openBlock(), createBlock(_sfc_main$2, {
|
|
67
|
-
key: item.id,
|
|
68
|
-
items: item.menu ?? []
|
|
69
|
-
}, {
|
|
70
|
-
default: withCtx(() => [
|
|
71
|
-
(openBlock(), createBlock(resolveDynamicComponent(item.href && !item.disabled ? "a" : "button"), {
|
|
72
|
-
href: item.href && !item.disabled ? item.href : void 0,
|
|
73
|
-
type: item.href ? void 0 : "button",
|
|
74
|
-
disabled: item.href ? void 0 : item.disabled,
|
|
75
|
-
"aria-current": __props.itemActive(item) ? "page" : void 0,
|
|
76
|
-
"aria-disabled": item.disabled || void 0,
|
|
77
|
-
class: normalizeClass(["group/item relative flex items-center gap-3 rounded-control px-3 py-2 text-sm font-medium outline-none transition-colors duration-[var(--duration-fast)] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring", item.disabled ? "cursor-not-allowed text-muted/50" : __props.itemActive(item) ? "text-ink" : "text-muted hover:text-ink"]),
|
|
78
|
-
onClick: ($event) => emit("activate", item)
|
|
79
|
-
}, {
|
|
80
|
-
default: withCtx(() => [
|
|
81
|
-
__props.itemActive(item) ? (openBlock(), createBlock(unref(Motion), {
|
|
82
|
-
key: 0,
|
|
83
|
-
"layout-id": __props.pillId,
|
|
84
|
-
transition: unref(pillTransition),
|
|
85
|
-
class: "absolute inset-0 z-0 rounded-control bg-brand-soft"
|
|
86
|
-
}, null, 8, ["layout-id", "transition"])) : createCommentVNode("", true),
|
|
87
|
-
renderSlot(_ctx.$slots, "item", {
|
|
88
|
-
item,
|
|
89
|
-
active: __props.itemActive(item)
|
|
90
|
-
}, () => [
|
|
91
|
-
item.icon ? (openBlock(), createBlock(_sfc_main$3, {
|
|
92
|
-
key: 0,
|
|
93
|
-
name: item.icon,
|
|
94
|
-
size: 17,
|
|
95
|
-
class: normalizeClass(["relative z-10 shrink-0 transition-colors", __props.itemActive(item) ? "text-brand" : ""])
|
|
96
|
-
}, null, 8, ["name", "class"])) : createCommentVNode("", true),
|
|
97
|
-
createElementVNode("span", _hoisted_5, toDisplayString(item.label), 1),
|
|
98
|
-
item.badge != null ? (openBlock(), createBlock(_sfc_main$4, {
|
|
99
|
-
key: 1,
|
|
100
|
-
tone: __props.itemActive(item) ? "brand" : "neutral",
|
|
101
|
-
class: "relative z-10 shrink-0"
|
|
102
|
-
}, {
|
|
103
|
-
default: withCtx(() => [
|
|
104
|
-
createTextVNode(toDisplayString(item.badge), 1)
|
|
105
|
-
]),
|
|
106
|
-
_: 2
|
|
107
|
-
}, 1032, ["tone"])) : createCommentVNode("", true)
|
|
108
|
-
])
|
|
109
|
-
]),
|
|
110
|
-
_: 2
|
|
111
|
-
}, 1032, ["href", "type", "disabled", "aria-current", "aria-disabled", "class", "onClick"]))
|
|
112
|
-
]),
|
|
113
|
-
_: 2
|
|
114
|
-
}, 1032, ["items"]);
|
|
115
|
-
}), 128))
|
|
116
|
-
]);
|
|
117
|
-
}), 128))
|
|
118
|
-
]),
|
|
119
|
-
_: 3
|
|
120
|
-
}));
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
export {
|
|
125
|
-
_sfc_main as _
|
|
126
|
-
};
|