@falcondev-oss/nuxt-layers-base 0.6.0 → 0.6.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.
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import type { ButtonProps, FooterSlots, HeaderSlots, NavigationMenuItem } from '@nuxt/ui'
3
- import { omit } from 'remeda'
3
+ import { omit, pickBy, pipe } from 'remeda'
4
4
 
5
5
  defineProps<{
6
6
  header?: {
@@ -72,9 +72,16 @@ const omitFooterSlots = [
72
72
  </slot>
73
73
  </template>
74
74
 
75
- <template v-for="(_, name) in omit(slots, omitHeaderSlots)" #[name]="slotData">
75
+ <template
76
+ v-for="(_, name) in pipe(
77
+ slots,
78
+ pickBy((_, key) => key.startsWith('header-')),
79
+ omit(omitHeaderSlots),
80
+ )"
81
+ #[name]="slotData"
82
+ >
76
83
  <!-- @vue-ignore -->
77
- <slot :name="name" v-bind="slotData || {}" />
84
+ <slot :name="name.replace('header-', '')" v-bind="slotData || {}" />
78
85
  </template>
79
86
  </UHeader>
80
87
  <UMain>
@@ -98,9 +105,16 @@ const omitFooterSlots = [
98
105
  />
99
106
  </template>
100
107
 
101
- <template v-for="(_, name) in omit(slots, omitFooterSlots)" #[name]="slotData">
108
+ <template
109
+ v-for="(_, name) in pipe(
110
+ slots,
111
+ pickBy((_, key) => key.startsWith('footer-')),
112
+ omit(omitFooterSlots),
113
+ )"
114
+ #[name]="slotData"
115
+ >
102
116
  <!-- @vue-ignore -->
103
- <slot :name="name" v-bind="slotData || {}" />
117
+ <slot :name="name.replace('footer-', '')" v-bind="slotData || {}" />
104
118
  </template>
105
119
  </UFooter>
106
120
  </div>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@falcondev-oss/nuxt-layers-base",
3
3
  "type": "module",
4
- "version": "0.6.0",
4
+ "version": "0.6.1",
5
5
  "description": "Nuxt layer with lots of useful helpers and @nuxt/ui components",
6
6
  "license": "MIT",
7
7
  "repository": "github:falcondev-oss/nuxt-layers",