@falcondev-oss/nuxt-layers-base 0.10.2 → 0.11.0

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,5 +1,11 @@
1
1
  <script setup lang="ts">
2
- import type { NavigationMenuItem } from '@nuxt/ui'
2
+ import type {
3
+ DashboardNavbarProps,
4
+ DashboardPanelProps,
5
+ DashboardSidebarProps,
6
+ DashboardToolbarProps,
7
+ NavigationMenuItem,
8
+ } from '@nuxt/ui'
3
9
 
4
10
  defineProps<{
5
11
  sidebar?: {
@@ -13,15 +19,25 @@ defineProps<{
13
19
  name: string
14
20
  avatarSrc?: string
15
21
  }
22
+ ui?: DashboardSidebarProps['ui']
23
+ itemsUi?: NavigationMenuItem['ui']
24
+ bottomItemsUi?: NavigationMenuItem['ui']
16
25
  }
17
- navbar?: {
18
- title?: string
19
- }
20
- toolbar?: {
21
- items?: NavigationMenuItem[]
22
- itemsEnd?: NavigationMenuItem[]
26
+ panel?: {
27
+ navbar?: {
28
+ title?: string
29
+ ui?: DashboardNavbarProps['ui']
30
+ }
31
+ toolbar?: {
32
+ items?: NavigationMenuItem[]
33
+ itemsEnd?: NavigationMenuItem[]
34
+ ui?: DashboardToolbarProps['ui']
35
+ itemsUi?: NavigationMenuItem['ui']
36
+ itemsEndUi?: NavigationMenuItem['ui']
37
+ }
38
+ container?: boolean
39
+ ui?: DashboardPanelProps['ui']
23
40
  }
24
- container?: boolean
25
41
  }>()
26
42
 
27
43
  defineSlots<{
@@ -33,7 +49,14 @@ const config = useRuntimeConfig()
33
49
 
34
50
  <template>
35
51
  <UDashboardGroup storage="local" :storage-key="`${config.public.projectId}-dashboard`" unit="rem">
36
- <UDashboardSidebar v-if="sidebar" collapsible resizable class="bg-white" mode="drawer">
52
+ <UDashboardSidebar
53
+ v-if="sidebar"
54
+ :ui="sidebar.ui"
55
+ collapsible
56
+ resizable
57
+ class="bg-white"
58
+ mode="drawer"
59
+ >
37
60
  <template v-if="sidebar.logo?.src || sidebar.logo?.iconSrc" #header="{ collapsed }">
38
61
  <img
39
62
  v-if="!collapsed && sidebar.logo.src"
@@ -55,6 +78,7 @@ const config = useRuntimeConfig()
55
78
  :collapsed="collapsed"
56
79
  :items="sidebar.items"
57
80
  orientation="vertical"
81
+ :ui="sidebar.itemsUi"
58
82
  />
59
83
 
60
84
  <UNavigationMenu
@@ -63,6 +87,7 @@ const config = useRuntimeConfig()
63
87
  :items="sidebar.bottomItems"
64
88
  orientation="vertical"
65
89
  class="mt-auto"
90
+ :ui="sidebar.bottomItemsUi"
66
91
  />
67
92
  </template>
68
93
  <template v-if="sidebar.userMenu" #footer="{ collapsed }">
@@ -81,18 +106,28 @@ const config = useRuntimeConfig()
81
106
  </UDashboardSidebar>
82
107
  <UDashboardPanel>
83
108
  <template #header>
84
- <UDashboardNavbar v-if="navbar" class="bg-white" :title="navbar.title">
109
+ <UDashboardNavbar
110
+ v-if="panel?.navbar"
111
+ :ui="panel.navbar.ui"
112
+ class="bg-white"
113
+ :title="panel.navbar.title"
114
+ >
85
115
  <template #leading>
86
116
  <UDashboardSidebarCollapse />
87
117
  </template>
88
118
  </UDashboardNavbar>
89
- <UDashboardToolbar v-if="toolbar" class="bg-white">
90
- <UNavigationMenu :items="toolbar.items" highlight />
91
- <UNavigationMenu :items="toolbar.itemsEnd" class="ml-auto" highlight />
119
+ <UDashboardToolbar v-if="panel?.toolbar" :ui="panel.toolbar.ui" class="bg-white">
120
+ <UNavigationMenu :items="panel.toolbar.items" highlight :ui="panel.toolbar.itemsUi" />
121
+ <UNavigationMenu
122
+ :items="panel.toolbar.itemsEnd"
123
+ class="ml-auto"
124
+ highlight
125
+ :ui="panel.toolbar.itemsEndUi"
126
+ />
92
127
  </UDashboardToolbar>
93
128
  </template>
94
129
  <template #body>
95
- <UContainer v-if="container">
130
+ <UContainer v-if="panel?.container">
96
131
  <slot />
97
132
  </UContainer>
98
133
  <slot v-else />
@@ -13,6 +13,7 @@ import type {
13
13
  InferOutput,
14
14
  } from '@nuxt/ui'
15
15
  import type { Reactive } from 'vue'
16
+ import NuxtUIAuthForm from '@nuxt/ui/components/AuthForm.vue'
16
17
  import { useForwardProps } from 'reka-ui'
17
18
 
18
19
  const props = defineProps<
@@ -22,14 +23,14 @@ const props = defineProps<
22
23
  >()
23
24
  const slots = defineSlots<AuthFormSlots<Reactive<InferInput<T>>, F>>()
24
25
 
25
- const forwarded = useForwardProps(props)
26
+ const forwarded = useForwardProps(props) as ComputedRef<Omit<typeof props, 'onSubmit'>>
26
27
  </script>
27
28
 
28
29
  <template>
29
- <UAuthForm v-bind="forwarded">
30
+ <NuxtUIAuthForm v-bind="forwarded">
30
31
  <template v-for="(_, name) in slots" #[name]="slotData">
31
32
  <!-- @vue-ignore -->
32
33
  <slot :name="name" v-bind="slotData || {}" />
33
34
  </template>
34
- </UAuthForm>
35
+ </NuxtUIAuthForm>
35
36
  </template>
package/nuxt.config.ts CHANGED
@@ -10,6 +10,11 @@ export default defineNuxtConfig({
10
10
  // dev
11
11
  typescript: {
12
12
  strict: true,
13
+ tsConfig: {
14
+ compilerOptions: {
15
+ allowArbitraryExtensions: true,
16
+ },
17
+ },
13
18
  },
14
19
  nitro: {
15
20
  experimental: {
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.10.2",
4
+ "version": "0.11.0",
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",