@bjj/nuxt-layer-shadcn-ui 0.11.2 → 0.11.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.
@@ -1,15 +1,24 @@
1
1
  <script setup lang="ts">
2
2
  import { SidebarTrigger } from '../../shadcn/sidebar'
3
- </script>
4
3
 
5
- <template>
6
- <header
7
- class="
4
+ const props = defineProps<{
5
+ class?: ClassValue
6
+ }>()
7
+
8
+ const mergedClass = computed(() =>
9
+ cn(
10
+ `
8
11
  h-14 gap-3 border-sidebar-border bg-card px-4 text-card-foreground
9
12
  group-has-data-[collapsible=icon]/sidebar-wrapper:h-12
10
13
  flex shrink-0 items-center border-b transition-[width,height] ease-linear
11
- "
12
- >
14
+ `,
15
+ props.class,
16
+ ),
17
+ )
18
+ </script>
19
+
20
+ <template>
21
+ <header :class="mergedClass">
13
22
  <SidebarTrigger class="-mx-1" />
14
23
  <Divider
15
24
  type="vertical"
@@ -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
  }
@@ -488,13 +488,16 @@ defineExpose({
488
488
 
489
489
  <!-- Filler: absorbs leftover height so data rows aren't stretched -->
490
490
  <TableRow
491
- v-if="height"
491
+ v-if="height && data?.length"
492
492
  data-virtual-row
493
493
  aria-hidden="true"
494
494
  class="hover:bg-transparent"
495
495
  style="height: 100%"
496
496
  >
497
- <TableCell :colspan="totalColumns" />
497
+ <TableCell
498
+ :colspan="totalColumns"
499
+ class="p-0!"
500
+ />
498
501
  </TableRow>
499
502
  </TableBody>
500
503
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bjj/nuxt-layer-shadcn-ui",
3
- "version": "0.11.2",
3
+ "version": "0.11.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": "4dcf9b4b5d9697cf2698778f3d2623db8cbceec9"
45
+ "gitHead": "a4c3ccd10674e57aba05d0319b942b0fc6829fa6"
46
46
  }