@falcondev-oss/nuxt-layers-base 0.29.1 → 0.30.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.
|
@@ -123,7 +123,7 @@ const model_ = { model }
|
|
|
123
123
|
</span>
|
|
124
124
|
</template>
|
|
125
125
|
|
|
126
|
-
<template #help>
|
|
126
|
+
<template v-if="field.schema.examples" #help>
|
|
127
127
|
<template v-if="Array.isArray(field.schema.examples)">
|
|
128
128
|
<ul>
|
|
129
129
|
<li v-for="(example, index) in field.schema.examples" :key="index">
|
|
@@ -131,7 +131,7 @@ const model_ = { model }
|
|
|
131
131
|
</li>
|
|
132
132
|
</ul>
|
|
133
133
|
</template>
|
|
134
|
-
<p v-else
|
|
134
|
+
<p v-else>
|
|
135
135
|
{{ field.schema.examples }}
|
|
136
136
|
</p>
|
|
137
137
|
</template>
|
|
@@ -70,14 +70,17 @@ const rootErrors = computed(() => props.form.errors?.filter((error) => error.pat
|
|
|
70
70
|
<template>
|
|
71
71
|
<form class="w-full" @submit.prevent="() => form.submit()">
|
|
72
72
|
<slot />
|
|
73
|
-
<div
|
|
73
|
+
<div
|
|
74
|
+
v-show="rootErrors?.length || !actionsTeleportTo"
|
|
75
|
+
class="col-span-full flex w-full flex-col gap-4"
|
|
76
|
+
>
|
|
74
77
|
<ul v-if="rootErrors?.length" class="text-error text-sm">
|
|
75
78
|
<li v-for="error of rootErrors" :key="`${error.path}:${error.message}`">
|
|
76
79
|
{{ error.path }}:{{ error.message }}
|
|
77
80
|
</li>
|
|
78
81
|
</ul>
|
|
79
|
-
<div class="flex items-center justify-end gap-4">
|
|
80
|
-
<Teleport defer :disabled="!
|
|
82
|
+
<div v-show="!actionsTeleportTo" class="flex items-center justify-end gap-4">
|
|
83
|
+
<Teleport defer :disabled="!actionsTeleportTo" :to="actionsTeleportTo">
|
|
81
84
|
<UActions :defaults="{ variant: 'subtle' }" :actions="actionsWithSubmit" />
|
|
82
85
|
</Teleport>
|
|
83
86
|
</div>
|
|
@@ -1,17 +1,38 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { DateValue } from '@internationalized/date'
|
|
3
|
+
import type { CalendarProps, InputDateProps } from '@nuxt/ui'
|
|
4
|
+
|
|
5
|
+
defineProps<{
|
|
6
|
+
input?: InputDateProps
|
|
7
|
+
calendar?: CalendarProps
|
|
8
|
+
disabled?: boolean
|
|
9
|
+
loading?: boolean
|
|
10
|
+
placeholder?: string
|
|
11
|
+
}>()
|
|
12
|
+
|
|
13
|
+
const emit = defineEmits<{
|
|
14
|
+
blur: []
|
|
15
|
+
}>()
|
|
3
16
|
|
|
4
17
|
const inputDate = useTemplateRef('inputDate')
|
|
5
18
|
|
|
6
19
|
const model = defineModel<DateValue | null>({ required: true })
|
|
7
20
|
const open = ref(false)
|
|
21
|
+
|
|
22
|
+
watch(open, () => {
|
|
23
|
+
if (!open.value) emit('blur')
|
|
24
|
+
})
|
|
8
25
|
</script>
|
|
9
26
|
|
|
10
27
|
<template>
|
|
11
28
|
<UInputDate
|
|
12
29
|
ref="inputDate"
|
|
13
|
-
|
|
30
|
+
v-bind="input"
|
|
31
|
+
:disabled
|
|
32
|
+
:loading
|
|
14
33
|
:range="false"
|
|
34
|
+
:model-value="model"
|
|
35
|
+
@blur="() => emit('blur')"
|
|
15
36
|
@update:model-value="
|
|
16
37
|
(val) => {
|
|
17
38
|
model = val ?? null
|
|
@@ -25,6 +46,7 @@ const open = ref(false)
|
|
|
25
46
|
<template #content>
|
|
26
47
|
<div class="p-2">
|
|
27
48
|
<UCalendar
|
|
49
|
+
v-bind="calendar"
|
|
28
50
|
:model-value="model ?? undefined"
|
|
29
51
|
:multiple="false"
|
|
30
52
|
:range="false"
|
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.
|
|
4
|
+
"version": "0.30.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",
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
"pnpm": "10"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
|
+
"@falcondev-oss/form-core": "^0.22.4",
|
|
18
|
+
"@falcondev-oss/form-vue": "^0.22.4",
|
|
19
|
+
"@internationalized/date": "^3.12.0",
|
|
17
20
|
"@nuxt/ui": "~4.5.0"
|
|
18
21
|
},
|
|
19
22
|
"dependencies": {
|
|
20
|
-
"@falcondev-oss/form-core": "^0.22.4",
|
|
21
|
-
"@falcondev-oss/form-vue": "^0.22.4",
|
|
22
23
|
"@falcondev-oss/trpc-typed-form-data": "^0.4.1",
|
|
23
24
|
"@falcondev-oss/trpc-vue-query": "^0.5.2",
|
|
24
25
|
"@iconify-json/lucide": "^1.2.96",
|
|
25
|
-
"@internationalized/date": "^3.12.0",
|
|
26
26
|
"@nuxt/icon": "^2.2.1",
|
|
27
27
|
"@nuxtjs/color-mode": "^4.0.0",
|
|
28
28
|
"@tanstack/vue-query": "^5.92.9",
|