@bjj/nuxt-layer-shadcn-ui 0.11.1 → 0.11.3

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.
@@ -1,19 +1,28 @@
1
1
  <script setup lang="ts">
2
2
  import { SidebarTrigger } from '../../shadcn/sidebar'
3
+
4
+ const props = defineProps<{
5
+ class?: ClassValue
6
+ }>()
7
+
8
+ const mergedClass = computed(() =>
9
+ cn(
10
+ `
11
+ h-14 gap-3 border-sidebar-border bg-card px-4 text-card-foreground
12
+ group-has-data-[collapsible=icon]/sidebar-wrapper:h-12
13
+ flex shrink-0 items-center border-b transition-[width,height] ease-linear
14
+ `,
15
+ props.class,
16
+ ),
17
+ )
3
18
  </script>
4
19
 
5
20
  <template>
6
- <header
7
- class="
8
- flex h-14 shrink-0 items-center gap-2 border-b border-sidebar-border
9
- bg-card px-4 text-card-foreground transition-[width,height] ease-linear
10
- group-has-data-[collapsible=icon]/sidebar-wrapper:h-12
11
- "
12
- >
13
- <SidebarTrigger class="-ml-1" />
21
+ <header :class="mergedClass">
22
+ <SidebarTrigger class="-mx-1" />
14
23
  <Divider
15
24
  type="vertical"
16
- class="mr-2 h-4!"
25
+ class="h-4!"
17
26
  />
18
27
  <div class="flex flex-1 items-center">
19
28
  <slot />
@@ -13,12 +13,17 @@ import {
13
13
  SidebarRail,
14
14
  } from '../../shadcn/sidebar'
15
15
 
16
- withDefaults(defineProps<AdminLayoutProps>(), {
16
+ const props = withDefaults(defineProps<AdminLayoutProps>(), {
17
17
  headerDropdown: undefined,
18
18
  footerDropdown: undefined,
19
19
  variant: 'sidebar',
20
20
  collapsible: 'icon',
21
+ contentClass: undefined,
21
22
  })
23
+
24
+ const mergedContentClass = computed(() =>
25
+ cn('flex-1 overflow-auto', props.contentClass),
26
+ )
22
27
  </script>
23
28
 
24
29
  <template>
@@ -64,7 +69,7 @@ withDefaults(defineProps<AdminLayoutProps>(), {
64
69
  </div>
65
70
  </Navbar>
66
71
 
67
- <div class="flex-1 overflow-auto">
72
+ <div :class="mergedContentClass">
68
73
  <slot />
69
74
  </div>
70
75
  </SidebarInset>
@@ -40,4 +40,5 @@ export interface AdminLayoutProps {
40
40
  footerDropdown?: AdminLayoutSidebarDropdownConfig
41
41
  variant?: 'sidebar' | 'floating' | 'inset'
42
42
  collapsible?: 'offcanvas' | 'icon' | 'none'
43
+ contentClass?: ClassValue
43
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bjj/nuxt-layer-shadcn-ui",
3
- "version": "0.11.1",
3
+ "version": "0.11.3",
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": "66008dcf98691829c141d73a70f913f63496c569"
45
+ "gitHead": "c90e3206bff10a9ed1d9f03172db3cdb2e03c44c"
46
46
  }