@bjj/nuxt-layer-shadcn-ui 0.13.2 → 0.13.4
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.
|
@@ -76,7 +76,7 @@ const dropdownItems = computed<DropdownItem[]>(() =>
|
|
|
76
76
|
|
|
77
77
|
<template #profile="{ item }">
|
|
78
78
|
<div
|
|
79
|
-
class="gap-2 px-
|
|
79
|
+
class="gap-2 px-2 py-1.5 text-sm flex w-full items-center text-left"
|
|
80
80
|
>
|
|
81
81
|
<Avatar
|
|
82
82
|
:image="item.icon ? undefined : (item.image || undefined)"
|
|
@@ -105,9 +105,16 @@ function hasActiveChild (item: AdminLayoutSidebarMenuItem): boolean {
|
|
|
105
105
|
v-for="child in item.children"
|
|
106
106
|
:key="child.label"
|
|
107
107
|
>
|
|
108
|
+
<!-- The vendored sub-button renders `data-active=""` when active while its
|
|
109
|
+
built-in styles only match `data-active="true"`, so the active styles
|
|
110
|
+
are re-applied here via an attribute-presence selector. -->
|
|
108
111
|
<SidebarMenuSubButton
|
|
109
112
|
:asChild="isLink(child)"
|
|
110
113
|
:isActive="isActive(child.href)"
|
|
114
|
+
class="
|
|
115
|
+
data-active:bg-sidebar-accent
|
|
116
|
+
data-active:text-sidebar-accent-foreground
|
|
117
|
+
"
|
|
111
118
|
>
|
|
112
119
|
<WebLink
|
|
113
120
|
v-if="isLink(child)"
|
|
@@ -150,7 +157,7 @@ function hasActiveChild (item: AdminLayoutSidebarMenuItem): boolean {
|
|
|
150
157
|
<Icon
|
|
151
158
|
v-if="isExternal(item.href!)"
|
|
152
159
|
name="external-link"
|
|
153
|
-
class="
|
|
160
|
+
class="size-3.5 text-sidebar-foreground/50 ml-auto"
|
|
154
161
|
/>
|
|
155
162
|
</WebLink>
|
|
156
163
|
<template v-else>
|
|
@@ -181,7 +188,7 @@ function hasActiveChild (item: AdminLayoutSidebarMenuItem): boolean {
|
|
|
181
188
|
v-if="isLink(action)"
|
|
182
189
|
:href="action.href"
|
|
183
190
|
unstyled
|
|
184
|
-
class="flex items-center
|
|
191
|
+
class="gap-2 flex items-center"
|
|
185
192
|
>
|
|
186
193
|
<Icon
|
|
187
194
|
v-if="action.icon"
|
|
@@ -224,7 +231,7 @@ function hasActiveChild (item: AdminLayoutSidebarMenuItem): boolean {
|
|
|
224
231
|
<Icon
|
|
225
232
|
v-if="isExternal(item.href!)"
|
|
226
233
|
name="external-link"
|
|
227
|
-
class="
|
|
234
|
+
class="size-3.5 text-sidebar-foreground/50 ml-auto"
|
|
228
235
|
/>
|
|
229
236
|
</WebLink>
|
|
230
237
|
<template v-else>
|
|
@@ -74,9 +74,7 @@ const menus: AdminLayoutSidebarMenuItem[] = [
|
|
|
74
74
|
},
|
|
75
75
|
]
|
|
76
76
|
|
|
77
|
-
// Footer dropdown: the
|
|
78
|
-
// and preference sub-menus live inside the menu. The profile item carries a
|
|
79
|
-
// `command`, so it is clickable (opens a workspace switcher).
|
|
77
|
+
// Footer dropdown menu: the profile carries a `command`, so it is clickable.
|
|
80
78
|
const menuItems: AdminLayoutSidebarDropdownMenuItem[] = [
|
|
81
79
|
{ type: 'profile', icon: 'building-2', title: 'Acme Inc.', subtitle: 'Owner', command: () => {}, actionIcon: 'arrow-left-right' },
|
|
82
80
|
{ type: 'separator' },
|
|
@@ -219,8 +217,7 @@ export const Inset: Story = {
|
|
|
219
217
|
},
|
|
220
218
|
}
|
|
221
219
|
|
|
222
|
-
//
|
|
223
|
-
// drawer and the floating trigger (top-left) becomes the way to open it.
|
|
220
|
+
// Phone viewport: the sidebar collapses into the drawer opened by the floating trigger.
|
|
224
221
|
export const Mobile: Story = {
|
|
225
222
|
parameters: {
|
|
226
223
|
...noControls,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bjj/nuxt-layer-shadcn-ui",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.4",
|
|
4
4
|
"description": "Nuxt layer providing shadcn-vue based UI components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./nuxt.config.ts",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"vue-i18n": "^11",
|
|
43
43
|
"vue-router": "^4 || ^5"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "aa52d8ae39f985ab89d0533a53f8f10d8b437561"
|
|
46
46
|
}
|