@bjj/nuxt-layer-shadcn-ui 0.12.16 → 0.13.1

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.
@@ -0,0 +1,80 @@
1
+ <script setup lang="ts">
2
+ import { SidebarTrigger, useSidebar } from '../../shadcn/sidebar'
3
+
4
+ defineProps<{
5
+ /** Brand name shown next to the logo. Hidden while the sidebar is collapsed. */
6
+ brandName?: string
7
+ }>()
8
+
9
+ defineSlots<{
10
+ /** Brand logo/mark. Shown in every state; on a collapsed sidebar it is
11
+ replaced by the collapse toggle on hover. */
12
+ logo?: () => any
13
+ }>()
14
+
15
+ const { state } = useSidebar()
16
+ const T = useTranslations('components.ui.AdminLayout')
17
+
18
+ // The trigger toggles the sidebar, so its label reflects the resulting action.
19
+ const toggleLabel = computed(() =>
20
+ state.value === 'collapsed' ? T('expandSidebar') : T('collapseSidebar'),
21
+ )
22
+ </script>
23
+
24
+ <template>
25
+ <!--
26
+ Brand row. Expanded: [logo + name] on the left, collapse toggle on the right.
27
+ Collapsed (`data-collapsible=icon` on the sidebar root): only the logo shows,
28
+ centered; hovering the row swaps it for the toggle so the sidebar can be
29
+ re-expanded. The toggle keeps capturing clicks even while transparent, so a
30
+ click anywhere on the collapsed brand expands the sidebar.
31
+ -->
32
+ <div
33
+ class="
34
+ group/brand h-8 gap-2 relative flex items-center
35
+ group-data-[collapsible=icon]:justify-center
36
+ "
37
+ >
38
+ <div
39
+ class="
40
+ min-w-0 gap-2 flex flex-1 items-center
41
+ group-data-[collapsible=icon]:flex-none
42
+ "
43
+ >
44
+ <span
45
+ class="
46
+ size-8 flex shrink-0 items-center justify-center transition-opacity
47
+ group-data-[collapsible=icon]:group-hover/brand:opacity-0
48
+ "
49
+ >
50
+ <slot name="logo" />
51
+ </span>
52
+ <span
53
+ v-if="brandName"
54
+ class="
55
+ text-base font-semibold truncate
56
+ group-data-[collapsible=icon]:hidden
57
+ "
58
+ >
59
+ {{ brandName }}
60
+ </span>
61
+ </div>
62
+
63
+ <Tooltip
64
+ :text="toggleLabel"
65
+ position="right"
66
+ >
67
+ <SidebarTrigger
68
+ class="
69
+ text-muted-foreground
70
+ group-data-[collapsible=icon]:inset-0
71
+ shrink-0 cursor-pointer transition-opacity
72
+ group-data-[collapsible=icon]:absolute
73
+ group-data-[collapsible=icon]:m-auto
74
+ group-data-[collapsible=icon]:opacity-0
75
+ group-data-[collapsible=icon]:group-hover/brand:opacity-100
76
+ "
77
+ />
78
+ </Tooltip>
79
+ </div>
80
+ </template>
@@ -15,13 +15,16 @@ const props = defineProps<{
15
15
 
16
16
  const { isMobile } = useSidebar()
17
17
 
18
- // Transform 'profile' items to Dropdown's custom-label items with slot 'profile'.
19
- // Other items pass through unchanged.
18
+ // Render 'profile' items via the 'profile' slot. A profile with a `command`
19
+ // becomes a clickable item (`custom-action`, padding reset so the slot owns it);
20
+ // otherwise it stays a static label. Other items pass through unchanged.
20
21
  const dropdownItems = computed<DropdownItem[]>(() =>
21
22
  (props.menuItems ?? []).map(item => {
22
23
  if (item.type === 'profile') {
23
- const { type: _, ...rest } = item
24
- return { type: 'custom-label', slot: 'profile', ...rest }
24
+ const { type: _, command, ...rest } = item
25
+ return command
26
+ ? { type: 'custom-action', slot: 'profile', command, ...rest, class: 'p-0' }
27
+ : { type: 'custom-label', slot: 'profile', ...rest }
25
28
  }
26
29
  return item
27
30
  }),
@@ -58,19 +61,19 @@ const dropdownItems = computed<DropdownItem[]>(() =>
58
61
  class="size-4"
59
62
  />
60
63
  </Avatar>
61
- <div class="grid flex-1 text-left text-sm/tight">
62
- <span class="truncate font-medium">
64
+ <div class="text-sm/tight grid flex-1 text-left">
65
+ <span class="font-medium truncate">
63
66
  {{ profile?.title }}
64
67
  </span>
65
- <span class="truncate text-xs">
68
+ <span class="text-xs truncate">
66
69
  {{ profile?.subtitle }}
67
70
  </span>
68
71
  </div>
69
- <ChevronsUpDown class="ml-auto size-4" />
72
+ <ChevronsUpDown class="size-4 ml-auto" />
70
73
  </SidebarMenuButton>
71
74
 
72
75
  <template #profile="{ item }">
73
- <div class="flex items-center gap-2 px-1 py-1.5 text-left text-sm">
76
+ <div class="gap-2 px-1 py-1.5 text-sm flex items-center text-left">
74
77
  <Avatar
75
78
  :image="item.icon ? undefined : (item.image || undefined)"
76
79
  :fallbackLabel="item.icon ? undefined : item.title?.charAt(0)?.toUpperCase()"
@@ -83,17 +86,21 @@ const dropdownItems = computed<DropdownItem[]>(() =>
83
86
  class="size-4"
84
87
  />
85
88
  </Avatar>
86
- <div class="grid flex-1 text-left text-sm/tight">
87
- <span class="truncate font-semibold">
89
+ <div class="text-sm/tight grid flex-1 text-left">
90
+ <span class="font-semibold truncate">
88
91
  {{ item.title }}
89
92
  </span>
90
93
  <span
91
94
  v-if="item.subtitle"
92
- class="truncate text-xs"
95
+ class="text-xs truncate"
93
96
  >
94
97
  {{ item.subtitle }}
95
98
  </span>
96
99
  </div>
100
+ <ChevronsUpDown
101
+ v-if="item.command"
102
+ class="size-4 text-muted-foreground ml-auto shrink-0"
103
+ />
97
104
  </div>
98
105
  </template>
99
106
  </Dropdown>
@@ -0,0 +1,4 @@
1
+ {
2
+ "collapseSidebar": "Collapse sidebar",
3
+ "expandSidebar": "Expand sidebar"
4
+ }
@@ -1,8 +1,6 @@
1
1
  import type { Meta, StoryObj } from '@storybook/vue3'
2
2
  import type { AdminLayoutSidebarDropdownProfile, AdminLayoutSidebarMenuItem, AdminLayoutSidebarDropdownMenuItem } from './types'
3
3
  import AdminLayout from './index.vue'
4
- import Avatar from '../Avatar/index.vue'
5
- import Breadcrumb from '../Breadcrumb/index.vue'
6
4
  import Button from '../Button/index.vue'
7
5
  import Card from '../Card/index.vue'
8
6
 
@@ -76,11 +74,33 @@ const menus: AdminLayoutSidebarMenuItem[] = [
76
74
  },
77
75
  ]
78
76
 
77
+ // Footer dropdown: the trigger shows the signed-in user; the workspace/org info
78
+ // and preference sub-menus live inside the menu. The profile item carries a
79
+ // `command`, so it is clickable (opens a workspace switcher).
79
80
  const menuItems: AdminLayoutSidebarDropdownMenuItem[] = [
80
- { type: 'profile', title: 'Demo User', subtitle: 'demo@example.com' },
81
- { type: 'action', label: 'Account', icon: 'badge-check', command: () => {} },
82
- { type: 'action', label: 'Billing', icon: 'credit-card', command: () => {} },
83
- { type: 'action', label: 'Notifications', icon: 'bell', command: () => {} },
81
+ { type: 'profile', icon: 'building-2', title: 'Acme Inc.', subtitle: 'Owner', command: () => {} },
82
+ { type: 'separator' },
83
+ { type: 'action', label: 'Change Password', icon: 'lock-keyhole', command: () => {} },
84
+ { type: 'separator' },
85
+ {
86
+ type: 'action',
87
+ label: 'Language',
88
+ icon: 'languages',
89
+ subMenus: [
90
+ { label: 'English', active: true, command: () => {} },
91
+ { label: '日本語', command: () => {} },
92
+ ],
93
+ },
94
+ {
95
+ type: 'action',
96
+ label: 'Theme',
97
+ icon: 'sun-moon',
98
+ subMenus: [
99
+ { label: 'Light', icon: 'sun', active: true, command: () => {} },
100
+ { label: 'System', icon: 'monitor', command: () => {} },
101
+ { label: 'Dark', icon: 'moon', command: () => {} },
102
+ ],
103
+ },
84
104
  { type: 'separator' },
85
105
  { type: 'action', label: 'Sign Out', icon: 'log-out', command: () => {} },
86
106
  ]
@@ -91,13 +111,8 @@ const profile: AdminLayoutSidebarDropdownProfile = {
91
111
  }
92
112
 
93
113
  const layoutContent = `
94
- <template #navbar-left>
95
- <Breadcrumb :model="breadcrumb" />
96
- </template>
97
- <template #navbar-right>
98
- <Button variant="ghost" size="icon" icon="search" aria-label="Search" />
99
- <Button variant="ghost" size="icon" icon="bell" aria-label="Notifications" />
100
- <Avatar label="DU" size="small" />
114
+ <template #logo>
115
+ <div class="flex size-7 items-center justify-center rounded-md bg-primary text-sm font-bold text-primary-foreground">A</div>
101
116
  </template>
102
117
 
103
118
  <div class="space-y-6 p-6">
@@ -148,26 +163,22 @@ const meta = {
148
163
  component: AdminLayout,
149
164
  argTypes: {
150
165
  menus: { control: 'object' },
151
- headerDropdown: { control: 'object' },
166
+ brandName: { control: 'text' },
152
167
  footerDropdown: { control: 'object' },
153
168
  variant: { control: 'select', options: variants },
154
169
  collapsible: { control: 'select', options: collapsibles },
155
170
  },
156
171
  args: {
157
172
  menus,
158
- headerDropdown: undefined,
173
+ brandName: 'Acme Inc.',
159
174
  footerDropdown: { profile, menuItems },
160
175
  variant: 'sidebar',
161
176
  collapsible: 'icon',
162
177
  },
163
178
  render: args => ({
164
- components: { AdminLayout, Avatar, Breadcrumb, Button, Card },
179
+ components: { AdminLayout, Button, Card },
165
180
  setup () {
166
- const breadcrumb = [
167
- { label: 'Dashboard', href: '#' },
168
- { label: 'Overview' },
169
- ]
170
- return { args, breadcrumb }
181
+ return { args }
171
182
  },
172
183
  template: `<AdminLayout v-bind="args">${layoutContent}</AdminLayout>`,
173
184
  }),
@@ -206,3 +217,23 @@ export const Inset: Story = {
206
217
  variant: 'inset',
207
218
  },
208
219
  }
220
+
221
+ // Pins the canvas to a phone viewport so the sidebar collapses into the mobile
222
+ // drawer and the floating trigger (top-left) becomes the way to open it.
223
+ export const Mobile: Story = {
224
+ parameters: {
225
+ ...noControls,
226
+ viewport: {
227
+ options: {
228
+ mobile: {
229
+ name: 'Mobile',
230
+ styles: { width: '390px', height: '844px' },
231
+ type: 'mobile',
232
+ },
233
+ },
234
+ },
235
+ },
236
+ globals: {
237
+ viewport: { value: 'mobile', isRotated: false },
238
+ },
239
+ }
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import type { AdminLayoutProps } from './types'
3
- import Navbar from './Navbar.vue'
3
+ import SidebarBrand from './SidebarBrand.vue'
4
4
  import SidebarDropdown from './SidebarDropdown.vue'
5
5
  import SidebarMenus from './SidebarMenus.vue'
6
6
  import {
@@ -11,10 +11,11 @@ import {
11
11
  SidebarInset,
12
12
  SidebarProvider,
13
13
  SidebarRail,
14
+ SidebarTrigger,
14
15
  } from '../../shadcn/sidebar'
15
16
 
16
17
  const props = withDefaults(defineProps<AdminLayoutProps>(), {
17
- headerDropdown: undefined,
18
+ brandName: undefined,
18
19
  footerDropdown: undefined,
19
20
  variant: 'sidebar',
20
21
  collapsible: 'icon',
@@ -22,11 +23,10 @@ const props = withDefaults(defineProps<AdminLayoutProps>(), {
22
23
  })
23
24
 
24
25
  defineSlots<{
25
- 'default'?: () => any
26
- 'header'?: () => any
27
- 'footer'?: () => any
28
- 'navbar-left'?: () => any
29
- 'navbar-right'?: () => any
26
+ default?: () => any
27
+ header?: () => any
28
+ footer?: () => any
29
+ logo?: () => any
30
30
  }>()
31
31
 
32
32
  const mergedContentClass = computed(() =>
@@ -42,11 +42,11 @@ const mergedContentClass = computed(() =>
42
42
  >
43
43
  <SidebarHeader>
44
44
  <slot name="header">
45
- <SidebarDropdown
46
- v-if="headerDropdown"
47
- :profile="headerDropdown.profile"
48
- :menuItems="headerDropdown.menuItems"
49
- />
45
+ <SidebarBrand :brandName="brandName">
46
+ <template #logo>
47
+ <slot name="logo" />
48
+ </template>
49
+ </SidebarBrand>
50
50
  </slot>
51
51
  </SidebarHeader>
52
52
 
@@ -67,15 +67,22 @@ const mergedContentClass = computed(() =>
67
67
  <SidebarRail />
68
68
  </Sidebar>
69
69
 
70
- <SidebarInset class="min-w-0">
71
- <Navbar>
72
- <div class="gap-3 flex flex-1 items-center">
73
- <slot name="navbar-left" />
74
- </div>
75
- <div class="gap-3 flex items-center">
76
- <slot name="navbar-right" />
77
- </div>
78
- </Navbar>
70
+ <!-- Top padding on mobile reserves a safe area for the floating trigger. -->
71
+ <SidebarInset
72
+ class="
73
+ min-w-0 pt-14
74
+ md:pt-0
75
+ "
76
+ >
77
+ <!-- Mobile-only trigger: the desktop toggle lives in the sidebar header. -->
78
+ <SidebarTrigger
79
+ class="
80
+ left-3 top-3 size-9 rounded-md bg-background/80 shadow-sm
81
+ backdrop-blur-sm
82
+ md:hidden
83
+ absolute z-30 cursor-pointer border
84
+ "
85
+ />
79
86
 
80
87
  <div :class="mergedContentClass">
81
88
  <slot />
@@ -23,11 +23,13 @@ export interface AdminLayoutSidebarDropdownProfile {
23
23
  * Menu item for the SidebarDropdown.
24
24
  *
25
25
  * Union of Dropdown's DropdownItem with an extra 'profile' variant that renders
26
- * a profile header (avatar + title + subtitle) as a label inside the menu.
26
+ * a profile header (avatar + title + subtitle) inside the menu. Without a
27
+ * `command` it is a static label; with one it becomes a clickable item (the
28
+ * profile is rendered with a trailing switch affordance).
27
29
  */
28
30
  export type AdminLayoutSidebarDropdownMenuItem
29
31
  = | DropdownItem
30
- | ({ type: 'profile' } & AdminLayoutSidebarDropdownProfile)
32
+ | ({ type: 'profile', command?: () => void } & AdminLayoutSidebarDropdownProfile)
31
33
 
32
34
  export interface AdminLayoutSidebarDropdownConfig {
33
35
  profile?: AdminLayoutSidebarDropdownProfile | null
@@ -36,7 +38,8 @@ export interface AdminLayoutSidebarDropdownConfig {
36
38
 
37
39
  export interface AdminLayoutProps {
38
40
  menus: AdminLayoutSidebarMenuItem[]
39
- headerDropdown?: AdminLayoutSidebarDropdownConfig
41
+ /** Brand name shown next to the logo in the sidebar header (hidden when collapsed). */
42
+ brandName?: string
40
43
  footerDropdown?: AdminLayoutSidebarDropdownConfig
41
44
  variant?: 'sidebar' | 'floating' | 'inset'
42
45
  collapsible?: 'offcanvas' | 'icon' | 'none'
@@ -27,6 +27,10 @@
27
27
  },
28
28
  "components": {
29
29
  "ui": {
30
+ "AdminLayout": {
31
+ "collapseSidebar": "طي الشريط الجانبي",
32
+ "expandSidebar": "توسيع الشريط الجانبي"
33
+ },
30
34
  "AsyncDataTable": {
31
35
  "actions": "الإجراءات",
32
36
  "loadFailed": "فشل التحميل"
@@ -27,6 +27,10 @@
27
27
  },
28
28
  "components": {
29
29
  "ui": {
30
+ "AdminLayout": {
31
+ "collapseSidebar": "Seitenleiste einklappen",
32
+ "expandSidebar": "Seitenleiste aufklappen"
33
+ },
30
34
  "AsyncDataTable": {
31
35
  "actions": "Aktionen",
32
36
  "loadFailed": "Fehler beim Laden"
@@ -27,6 +27,10 @@
27
27
  },
28
28
  "components": {
29
29
  "ui": {
30
+ "AdminLayout": {
31
+ "collapseSidebar": "Collapse sidebar",
32
+ "expandSidebar": "Expand sidebar"
33
+ },
30
34
  "AsyncDataTable": {
31
35
  "actions": "Actions",
32
36
  "loadFailed": "Failed to load"
@@ -27,6 +27,10 @@
27
27
  },
28
28
  "components": {
29
29
  "ui": {
30
+ "AdminLayout": {
31
+ "collapseSidebar": "Contraer barra lateral",
32
+ "expandSidebar": "Expandir barra lateral"
33
+ },
30
34
  "AsyncDataTable": {
31
35
  "actions": "Acciones",
32
36
  "loadFailed": "No se pudo cargar"
@@ -27,6 +27,10 @@
27
27
  },
28
28
  "components": {
29
29
  "ui": {
30
+ "AdminLayout": {
31
+ "collapseSidebar": "Réduire la barre latérale",
32
+ "expandSidebar": "Développer la barre latérale"
33
+ },
30
34
  "AsyncDataTable": {
31
35
  "actions": "Actions",
32
36
  "loadFailed": "Échec du chargement"
@@ -27,6 +27,10 @@
27
27
  },
28
28
  "components": {
29
29
  "ui": {
30
+ "AdminLayout": {
31
+ "collapseSidebar": "साइडबार को संक्षिप्त करें",
32
+ "expandSidebar": "साइडबार को विस्तार करें"
33
+ },
30
34
  "AsyncDataTable": {
31
35
  "actions": "क्रियाएं",
32
36
  "loadFailed": "लोड करने में विफल"
@@ -27,6 +27,10 @@
27
27
  },
28
28
  "components": {
29
29
  "ui": {
30
+ "AdminLayout": {
31
+ "collapseSidebar": "Sembunyikan bilah samping",
32
+ "expandSidebar": "Tampilkan bilah samping"
33
+ },
30
34
  "AsyncDataTable": {
31
35
  "actions": "Tindakan",
32
36
  "loadFailed": "Gagal memuat"
@@ -27,6 +27,10 @@
27
27
  },
28
28
  "components": {
29
29
  "ui": {
30
+ "AdminLayout": {
31
+ "collapseSidebar": "Comprimi barra laterale",
32
+ "expandSidebar": "Espandi barra laterale"
33
+ },
30
34
  "AsyncDataTable": {
31
35
  "actions": "Azioni",
32
36
  "loadFailed": "Caricamento non riuscito"
@@ -27,6 +27,10 @@
27
27
  },
28
28
  "components": {
29
29
  "ui": {
30
+ "AdminLayout": {
31
+ "collapseSidebar": "サイドバーを閉じる",
32
+ "expandSidebar": "サイドバーを開く"
33
+ },
30
34
  "AsyncDataTable": {
31
35
  "actions": "アクション",
32
36
  "loadFailed": "読み込みに失敗しました"
@@ -27,6 +27,10 @@
27
27
  },
28
28
  "components": {
29
29
  "ui": {
30
+ "AdminLayout": {
31
+ "collapseSidebar": "사이드바 축소",
32
+ "expandSidebar": "사이드바 확장"
33
+ },
30
34
  "AsyncDataTable": {
31
35
  "actions": "작업",
32
36
  "loadFailed": "로드 실패"
@@ -27,6 +27,10 @@
27
27
  },
28
28
  "components": {
29
29
  "ui": {
30
+ "AdminLayout": {
31
+ "collapseSidebar": "Samenvouwen",
32
+ "expandSidebar": "Uitvouwen"
33
+ },
30
34
  "AsyncDataTable": {
31
35
  "actions": "Acties",
32
36
  "loadFailed": "Laden mislukt"
@@ -27,6 +27,10 @@
27
27
  },
28
28
  "components": {
29
29
  "ui": {
30
+ "AdminLayout": {
31
+ "collapseSidebar": "Zwiń pasek boczny",
32
+ "expandSidebar": "Rozwiń pasek boczny"
33
+ },
30
34
  "AsyncDataTable": {
31
35
  "actions": "Akcje",
32
36
  "loadFailed": "Nie udało się załadować"
@@ -27,6 +27,10 @@
27
27
  },
28
28
  "components": {
29
29
  "ui": {
30
+ "AdminLayout": {
31
+ "collapseSidebar": "Recolher barra lateral",
32
+ "expandSidebar": "Expandir barra lateral"
33
+ },
30
34
  "AsyncDataTable": {
31
35
  "actions": "Ações",
32
36
  "loadFailed": "Falha ao carregar"
@@ -27,6 +27,10 @@
27
27
  },
28
28
  "components": {
29
29
  "ui": {
30
+ "AdminLayout": {
31
+ "collapseSidebar": "Свернуть боковую панель",
32
+ "expandSidebar": "Развернуть боковую панель"
33
+ },
30
34
  "AsyncDataTable": {
31
35
  "actions": "Действия",
32
36
  "loadFailed": "Ошибка загрузки"
@@ -27,6 +27,10 @@
27
27
  },
28
28
  "components": {
29
29
  "ui": {
30
+ "AdminLayout": {
31
+ "collapseSidebar": "ยุบแถบด้านข้าง",
32
+ "expandSidebar": "ขยายแถบด้านข้าง"
33
+ },
30
34
  "AsyncDataTable": {
31
35
  "actions": "การกระทำ",
32
36
  "loadFailed": "ไม่สามารถโหลดได้"
@@ -27,6 +27,10 @@
27
27
  },
28
28
  "components": {
29
29
  "ui": {
30
+ "AdminLayout": {
31
+ "collapseSidebar": "Kenar çubuğunu daralt",
32
+ "expandSidebar": "Kenar çubuğunu genişlet"
33
+ },
30
34
  "AsyncDataTable": {
31
35
  "actions": "İşlemler",
32
36
  "loadFailed": "Yüklenemedi"
@@ -27,6 +27,10 @@
27
27
  },
28
28
  "components": {
29
29
  "ui": {
30
+ "AdminLayout": {
31
+ "collapseSidebar": "Thu gọn thanh bên",
32
+ "expandSidebar": "Mở rộng thanh bên"
33
+ },
30
34
  "AsyncDataTable": {
31
35
  "actions": "Hành động",
32
36
  "loadFailed": "Không thể tải"
@@ -27,6 +27,10 @@
27
27
  },
28
28
  "components": {
29
29
  "ui": {
30
+ "AdminLayout": {
31
+ "collapseSidebar": "折叠侧边栏",
32
+ "expandSidebar": "展开侧边栏"
33
+ },
30
34
  "AsyncDataTable": {
31
35
  "actions": "操作",
32
36
  "loadFailed": "加载失败"
@@ -27,6 +27,10 @@
27
27
  },
28
28
  "components": {
29
29
  "ui": {
30
+ "AdminLayout": {
31
+ "collapseSidebar": "收起側邊欄",
32
+ "expandSidebar": "展開側邊欄"
33
+ },
30
34
  "AsyncDataTable": {
31
35
  "actions": "操作",
32
36
  "loadFailed": "載入失敗"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bjj/nuxt-layer-shadcn-ui",
3
- "version": "0.12.16",
3
+ "version": "0.13.1",
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": "e4a930eee97e686f984f1970ec4cb4e6baec363e"
45
+ "gitHead": "42a4cad8de149d6e77b16e1d76ed5d3671498b79"
46
46
  }
@@ -1,35 +0,0 @@
1
- <script setup lang="ts">
2
- import { SidebarTrigger } from '../../shadcn/sidebar'
3
-
4
- const props = defineProps<{
5
- class?: ClassValue
6
- }>()
7
-
8
- defineSlots<{
9
- default?: () => any
10
- }>()
11
-
12
- const mergedClass = computed(() =>
13
- cn(
14
- `
15
- h-14 gap-3 border-sidebar-border bg-card px-4 text-card-foreground
16
- group-has-data-[collapsible=icon]/sidebar-wrapper:h-12
17
- flex shrink-0 items-center border-b transition-[width,height] ease-linear
18
- `,
19
- props.class,
20
- ),
21
- )
22
- </script>
23
-
24
- <template>
25
- <header :class="mergedClass">
26
- <SidebarTrigger class="-mx-1" />
27
- <Divider
28
- type="vertical"
29
- class="h-4!"
30
- />
31
- <div class="flex flex-1 items-center">
32
- <slot />
33
- </div>
34
- </header>
35
- </template>