@falcondev-oss/nuxt-layers-base 0.27.1 → 0.28.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.
@@ -8,6 +8,7 @@ const props = withDefaults(
8
8
  submitLabel?: string
9
9
  submitButtonProps?: ButtonProps
10
10
  actions?: ButtonProps[]
11
+ actionsTeleportTo?: string
11
12
  form: FormHandle
12
13
  disableSubmitIfUnchanged?: boolean
13
14
  successToast?: Partial<Toast>
@@ -42,9 +43,7 @@ watch(
42
43
  },
43
44
  })
44
45
  },
45
- {
46
- immediate: true,
47
- },
46
+ { immediate: true },
48
47
  )
49
48
 
50
49
  const actionsWithSubmit = computed(() => {
@@ -78,12 +77,9 @@ const rootErrors = computed(() => props.form.errors?.filter((error) => error.pat
78
77
  </li>
79
78
  </ul>
80
79
  <div class="flex items-center justify-end gap-4">
81
- <UActions
82
- :defaults="{
83
- variant: 'subtle',
84
- }"
85
- :actions="actionsWithSubmit"
86
- />
80
+ <Teleport defer :disabled="!props.actionsTeleportTo" :to="props.actionsTeleportTo">
81
+ <UActions :defaults="{ variant: 'subtle' }" :actions="actionsWithSubmit" />
82
+ </Teleport>
87
83
  </div>
88
84
  </div>
89
85
  </form>
@@ -1,12 +1,18 @@
1
1
  <script setup lang="ts">
2
- import type { CardSlots } from '@nuxt/ui'
2
+ import type { CardProps, CardSlots } from '@nuxt/ui'
3
+ import { useForwardProps } from 'reka-ui'
4
+ const props = defineProps<CardProps>()
3
5
  const slots = defineSlots<CardSlots>()
6
+
7
+ const forwarded = useForwardProps(props)
4
8
  </script>
5
9
 
6
10
  <template>
7
11
  <UCard
12
+ v-bind="forwarded"
8
13
  :ui="{
9
14
  body: 'p-0!',
15
+ ...forwarded.ui,
10
16
  }"
11
17
  >
12
18
  <template v-for="(_, name) of slots" #[name]>
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.27.1",
4
+ "version": "0.28.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",